From 41f1f72e9502f5c3de6ca16b303803dfcf1df594 Mon Sep 17 00:00:00 2001 From: Thomas Stephen Lee Date: Fri, 4 Sep 2015 22:04:10 +0530 Subject: add/remove/update books --- APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb | 314 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb | 313 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb | 615 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb | 215 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb | 414 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb | 478 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb | 212 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb | 288 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb | 774 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb | 236 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb | 651 - APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb | 0 APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt | 0 .../screenshots/Screenshot_(1).png | Bin .../screenshots/Screenshot_(2).png | Bin .../screenshots/Screenshot_(3).png | Bin .../ch2.ipynb | 1106 + .../ch3.ipynb | 1812 + .../ch4.ipynb | 940 + .../ch5.ipynb | 2140 + .../ch6.ipynb | 1358 + .../ch7.ipynb | 443 + .../ch8.ipynb | 338 + .../ch9.ipynb | 863 + .../screenshots/ch2.png | Bin 0 -> 65004 bytes .../screenshots/ch5.png | Bin 0 -> 80229 bytes .../screenshots/ch7.png | Bin 0 -> 75536 bytes .../README.txt | 10 + Advance_Semiconductor_Devices/ChapterNo1.ipynb | 800 - Advance_Semiconductor_Devices/ChapterNo2.ipynb | 1248 - Advance_Semiconductor_Devices/ChapterNo3.ipynb | 992 - Advance_Semiconductor_Devices/ChapterNo4.ipynb | 928 - Advance_Semiconductor_Devices/ChapterNo6.ipynb | 76 - Advance_Semiconductor_Devices/ChapterNo7.ipynb | 154 - Advance_Semiconductor_Devices/ChapterNo8.ipynb | 576 - Advance_Semiconductor_Devices/ChapterNo9.ipynb | 1684 - Advance_Semiconductor_Devices/README.txt | 10 - .../screenshots/Chapter1.png | Bin 216653 -> 0 bytes .../screenshots/Chapter3.png | Bin 190518 -> 0 bytes .../screenshots/Chapter7.png | Bin 205361 -> 0 bytes .../screenshots/Chapter_1.png | Bin 150308 -> 0 bytes .../screenshots/Chapter_1_1.png | Bin 140791 -> 0 bytes .../screenshots/Chapter_1_2.png | Bin 140791 -> 0 bytes .../screenshots/Chapter_2.png | Bin 146297 -> 0 bytes .../screenshots/Chapter_2_1.png | Bin 136650 -> 0 bytes .../screenshots/Chapter_2_2.png | Bin 136650 -> 0 bytes .../screenshots/Chapter_3.png | Bin 143266 -> 0 bytes .../screenshots/Chapter_3_1.png | Bin 136718 -> 0 bytes .../screenshots/Chapter_3_2.png | Bin 136718 -> 0 bytes .../ChapterNo1.ipynb | 800 + .../ChapterNo2.ipynb | 1248 + .../ChapterNo3.ipynb | 992 + .../ChapterNo4.ipynb | 928 + .../ChapterNo6.ipynb | 76 + .../ChapterNo7.ipynb | 154 + .../ChapterNo8.ipynb | 576 + .../ChapterNo9.ipynb | 1684 + .../README.txt | 10 + .../screenshots/Chapter1.png | Bin 0 -> 216653 bytes .../screenshots/Chapter3.png | Bin 0 -> 190518 bytes .../screenshots/Chapter7.png | Bin 0 -> 205361 bytes .../screenshots/Chapter_1.png | Bin 0 -> 150308 bytes .../screenshots/Chapter_1_1.png | Bin 0 -> 140791 bytes .../screenshots/Chapter_1_2.png | Bin 0 -> 140791 bytes .../screenshots/Chapter_2.png | Bin 0 -> 146297 bytes .../screenshots/Chapter_2_1.png | Bin 0 -> 136650 bytes .../screenshots/Chapter_2_2.png | Bin 0 -> 136650 bytes .../screenshots/Chapter_3.png | Bin 0 -> 143266 bytes .../screenshots/Chapter_3_1.png | Bin 0 -> 136718 bytes .../screenshots/Chapter_3_2.png | Bin 0 -> 136718 bytes .../Chapter01.ipynb | 499 - .../Chapter04.ipynb | 95 - .../Chapter05.ipynb | 188 - .../Chapter06.ipynb | 112 - .../Chapter08.ipynb | 154 - .../Chapter09.ipynb | 97 - .../Chapter12.ipynb | 111 - .../Chapter14.ipynb | 226 - .../Chapter15.ipynb | 76 - .../Chapter16.ipynb | 280 - .../Chapter18.ipynb | 155 - .../Chapter19.ipynb | 160 - .../Chapter20.ipynb | 286 - .../Chapter21.ipynb | 256 - .../Chapter22.ipynb | 88 - .../Chapter23.ipynb | 390 - .../Chapter24.ipynb | 198 - .../Chapter25.ipynb | 490 - .../Chapter26.ipynb | 82 - .../Chapter27.ipynb | 109 - .../README.txt | 10 - .../screenshots/1.png | Bin 36115 -> 0 bytes .../screenshots/2.png | Bin 55871 -> 0 bytes .../screenshots/3.png | Bin 33263 -> 0 bytes .../screenshots/a.png | Bin 212056 -> 0 bytes .../screenshots/a_1.png | Bin 212056 -> 0 bytes .../screenshots/b.png | Bin 221122 -> 0 bytes .../screenshots/b_1.png | Bin 221122 -> 0 bytes .../screenshots/c.png | Bin 227233 -> 0 bytes .../screenshots/c_1.png | Bin 227233 -> 0 bytes .../Chapter01.ipynb | 499 + .../Chapter04.ipynb | 95 + .../Chapter05.ipynb | 188 + .../Chapter06.ipynb | 112 + .../Chapter08.ipynb | 154 + .../Chapter09.ipynb | 97 + .../Chapter12.ipynb | 111 + .../Chapter14.ipynb | 226 + .../Chapter15.ipynb | 76 + .../Chapter16.ipynb | 280 + .../Chapter18.ipynb | 155 + .../Chapter19.ipynb | 160 + .../Chapter20.ipynb | 286 + .../Chapter21.ipynb | 256 + .../Chapter22.ipynb | 88 + .../Chapter23.ipynb | 390 + .../Chapter24.ipynb | 198 + .../Chapter25.ipynb | 490 + .../Chapter26.ipynb | 82 + .../Chapter27.ipynb | 109 + .../README.txt | 10 + .../screenshots/a.png | Bin 0 -> 212056 bytes .../screenshots/b.png | Bin 0 -> 221122 bytes .../screenshots/c.png | Bin 0 -> 227233 bytes ...ultiplicaton_of_Algerbrraical_Expressions.ipynb | 0 .../Chapter_11_Factors.ipynb | 0 .../Chapter_12_Fractions.ipynb | 0 .../Chapter_13_Graphs_of_Quadratic_Functions.ipynb | 0 .../Chapter_14_Quardartic_Equations.ipynb | 0 .../Chapter_16_Logarithms.ipynb | 0 .../Chapter_18_Variation.ipynb | 0 .../Chapter_1_The_Meaning_of_Algebra.ipynb | 0 ...hapter_20_Rational_and_Irrational_Numbers.ipynb | 0 .../Chapter_21_Series.ipynb | 0 ...Chapter_2_Elementry_Operations_in_Algebra.ipynb | 0 ...apter_3_Brackets_and_Operations_with_Them.ipynb | 0 .../Chapter_4_Positive_and_Negative_Numbers.ipynb | 0 .../Chapter_5_Simple_Equations.ipynb | 0 .../Chapter_7_Simultaneous_Equations.ipynb | 0 ..._8_Graphical_Representation_of_Quantities.ipynb | 0 ...The_Law_of_Straight_Line_and_Co_ordinates.ipynb | 0 .../screenshots/cha8a.png | Bin .../screenshots/cha8b.png | Bin .../screenshots/cha8c.png | Bin .../Chaper01.ipynb | 0 .../Chaper02.ipynb | 0 .../Chaper03.ipynb | 0 .../Chaper04.ipynb | 0 .../Chaper05.ipynb | 0 .../Chaper06.ipynb | 0 .../Chaper07.ipynb | 0 .../Chaper08.ipynb | 0 .../Chaper10.ipynb | 0 .../screenshots/snap2.png | Bin .../screenshots/snap4.png | Bin .../screenshots/snap4_2.png | Bin .../chapter1.ipynb | 0 .../chapter10.ipynb | 0 .../chapter11.ipynb | 0 .../chapter12.ipynb | 0 .../chapter13.ipynb | 0 .../chapter14.ipynb | 0 .../chapter15.ipynb | 0 .../chapter3.ipynb | 0 .../chapter4.ipynb | 0 .../chapter6.ipynb | 0 .../chapter7.ipynb | 0 .../chapter8.ipynb | 0 .../chapter9.ipynb | 0 .../screenshots/HPBW_FNBW_CH10.png | Bin .../screenshots/designValues_ch11.png | Bin .../screenshots/gain_fnbw_hpbw.png | Bin .../README.txt | 0 Applied_Physics-II/chapter1.ipynb | 1353 - Applied_Physics-II/chapter2.ipynb | 1480 - Applied_Physics-II/chapter3.ipynb | 836 - Applied_Physics-II/chapter4.ipynb | 163 - Applied_Physics-II/chapter5.ipynb | 1166 - Applied_Physics-II/chapter6.ipynb | 1183 - Applied_Physics-II/screenshots/Ex2_2.png | Bin 28955 -> 0 bytes Applied_Physics-II/screenshots/Ex2_2_1.png | Bin 28955 -> 0 bytes Applied_Physics-II/screenshots/Ex2_2_2.png | Bin 28955 -> 0 bytes Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb | 1353 + Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb | 1480 + Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb | 836 + Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb | 163 + Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb | 1166 + Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb | 1183 + .../screenshots/Ex2_2.png | Bin 0 -> 28955 bytes .../screenshots/Ex2_2_1.png | Bin 0 -> 28955 bytes .../screenshots/Ex2_2_2.png | Bin 0 -> 28955 bytes Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb | 0 Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb | 0 Applied_Physics-I_by_I_A_Shaikh/README.txt | 0 Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb | 0 Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb | 0 .../screenshots/Capture1_1.png | Bin .../screenshots/Capture3_1.png | Bin .../screenshots/Capture4_1.png | Bin .../Chapter_01_Bonding_in_Solids_.ipynb | 248 - .../Chapter_01_Bonding_in_Solids__1.ipynb | 248 - Applied_Physics/Chapter_02_Crystal_Structure.ipynb | 291 - .../Chapter_02_Crystal_Structure_1.ipynb | 291 - .../Chapter_03_Planes_in_Crystals.ipynb | 144 - .../Chapter_03_Planes_in_Crystals_1.ipynb | 144 - .../Chapter_04_Crystal_Diffraction.ipynb | 494 - .../Chapter_04_Crystal_Diffraction_1.ipynb | 503 - ...hapter_05_Principles_of_Quantum_Mechanics.ipynb | 1258 - ...pter_05_Principles_of_Quantum_Mechanics_1.ipynb | 1258 - ...Electron_Theory_and_Band_Theory_of_Metals.ipynb | 561 - ...ectron_Theory_and_Band_Theory_of_Metals_1.ipynb | 561 - .../Chapter_07_Dielectric_Properties.ipynb | 488 - .../Chapter_07_Dielectric_Properties_1.ipynb | 488 - .../Chapter_08_Magnetic_Properties.ipynb | 323 - .../Chapter_08_Magnetic_Properties_1.ipynb | 323 - Applied_Physics/Chapter_09_Semiconductors.ipynb | 782 - Applied_Physics/Chapter_09_Semiconductors_1.ipynb | 782 - Applied_Physics/Chapter_10_Superconductivity.ipynb | 316 - .../Chapter_10_Superconductivity_1.ipynb | 316 - Applied_Physics/Chapter_12Fibre_Optics.ipynb | 365 - Applied_Physics/Chapter_12_Fibre_Optics.ipynb | 365 - ...alculation_of__mean_free_path_of_electron_1.png | Bin 140005 -> 0 bytes .../Calculation_of__potential_energy_1.png | Bin 149135 -> 0 bytes .../Calculation_of_lattice_constant_1.png | Bin 141934 -> 0 bytes Applied_Physics_II/Chapter_1.ipynb | 1108 - Applied_Physics_II/Chapter_2.ipynb | 1000 - Applied_Physics_II/Chapter_3.ipynb | 779 - Applied_Physics_II/Chapter_4.ipynb | 141 - Applied_Physics_II/Chapter_5.ipynb | 1097 - Applied_Physics_II/Chapter_6.ipynb | 189 - Applied_Physics_II/Chapter_7.ipynb | 178 - Applied_Physics_II/README.txt | 10 - Applied_Physics_II/screenshots/halfangular.png | Bin 57768 -> 0 bytes Applied_Physics_II/screenshots/probability.png | Bin 36433 -> 0 bytes Applied_Physics_II/screenshots/visiblerange.png | Bin 67578 -> 0 bytes Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb | 1108 + Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb | 1000 + Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb | 779 + Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb | 141 + Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb | 1097 + Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb | 189 + Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb | 178 + Applied_Physics_II_by_H_J_Sawant/README.txt | 10 + .../screenshots/halfangular.png | Bin 0 -> 57768 bytes .../screenshots/probability.png | Bin 0 -> 36433 bytes .../screenshots/visiblerange.png | Bin 0 -> 67578 bytes .../Chapter1.ipynb | 0 .../Chapter10.ipynb | 0 .../Chapter11.ipynb | 0 .../Chapter12.ipynb | 0 .../Chapter2.ipynb | 0 .../Chapter3.ipynb | 0 .../Chapter4.ipynb | 0 .../Chapter5.ipynb | 0 .../Chapter6.ipynb | 0 .../Chapter7.ipynb | 0 .../Chapter8.ipynb | 0 .../Chapter9.ipynb | 0 .../screenshots/1_AP.png | Bin .../screenshots/2_AP.png | Bin .../screenshots/3_AP.png | Bin .../Chapter11.ipynb | 608 + .../Chapter12.ipynb | 665 + .../Chapter2.ipynb | 441 + .../Chapter3.ipynb | 1601 + .../screenshots/1.png | Bin 0 -> 32020 bytes .../screenshots/2.png | Bin 0 -> 30429 bytes .../screenshots/3.png | Bin 0 -> 29220 bytes .../Chapter_01_Bonding_in_Solids__1.ipynb | 248 + .../Chapter_02_Crystal_Structure_1.ipynb | 291 + .../Chapter_03_Planes_in_Crystals_1.ipynb | 144 + .../Chapter_04_Crystal_Diffraction_1.ipynb | 503 + ...pter_05_Principles_of_Quantum_Mechanics_1.ipynb | 1258 + ...ectron_Theory_and_Band_Theory_of_Metals_1.ipynb | 561 + .../Chapter_07_Dielectric_Properties_1.ipynb | 488 + .../Chapter_08_Magnetic_Properties_1.ipynb | 323 + .../Chapter_09_Semiconductors_1.ipynb | 782 + .../Chapter_10_Superconductivity_1.ipynb | 316 + .../Chapter_12_Fibre_Optics.ipynb | 365 + ...alculation_of__mean_free_path_of_electron_1.png | Bin 0 -> 140005 bytes .../Calculation_of__potential_energy_1.png | Bin 0 -> 149135 bytes .../Calculation_of_lattice_constant_1.png | Bin 0 -> 141934 bytes .../Chapter10_1.ipynb | 167 + .../Chapter11_1.ipynb | 277 + Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb | 214 + Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb | 1031 + Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb | 586 + Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb | 390 + Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb | 429 + Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb | 465 + Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb | 931 + Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb | 194 + .../screenshots/11.png | Bin 0 -> 65346 bytes .../screenshots/22.png | Bin 0 -> 57824 bytes .../screenshots/33.png | Bin 0 -> 53465 bytes .../screenshots/Untitled1.png | Bin 0 -> 47283 bytes .../screenshots/Untitled2.png | Bin 0 -> 45340 bytes .../screenshots/Untitled3.png | Bin 0 -> 47568 bytes .../README.txt | 0 .../ch10_1.ipynb | 0 .../ch11_1.ipynb | 0 .../ch12_1.ipynb | 0 .../ch1_1.ipynb | 0 .../ch2_1.ipynb | 0 .../ch3_1.ipynb | 0 .../ch4_1.ipynb | 0 .../ch5_1.ipynb | 0 .../ch6_1.ipynb | 0 .../ch7_1.ipynb | 0 .../ch8_1.ipynb | 0 .../ch9_1.ipynb | 0 .../screenshots/ch1_e_accelerated.png | Bin .../screenshots/ch2_r_and__v_for_e.png | Bin .../screenshots/ch5_L-S_coupling.png | Bin .../chapter1.ipynb | 0 .../chapter2.ipynb | 0 .../chapter3.ipynb | 0 .../chapter4.ipynb | 0 .../screenshots/ch1.png | Bin .../screenshots/ch2.png | Bin .../screenshots/ch4.png | Bin .../ch1.ipynb | 0 .../ch12.ipynb | 0 .../ch13.ipynb | 0 .../ch14.ipynb | 0 .../ch15.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../screenshots/ch13.png | Bin .../screenshots/ch14.png | Bin .../screenshots/ch2.png | Bin .../PartBCh1.ipynb | 0 .../PartBCh2.ipynb | 0 .../PartBCh4.ipynb | 0 .../PartBCh6.ipynb | 0 .../README.txt | 10 + .../ch1.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../screenshots/amptitudesvsoutputfreqB4.png | Bin .../screenshots/ch1.png | Bin .../screenshots/ch6.png | Bin .../Chapter1.ipynb | 117 - .../Chapter10.ipynb | 362 - .../Chapter11.ipynb | 616 - .../Chapter12.ipynb | 445 - .../Chapter2.ipynb | 239 - .../Chapter3.ipynb | 499 - .../Chapter4.ipynb | 688 - .../Chapter5.ipynb | 475 - .../Chapter6.ipynb | 652 - .../Chapter7.ipynb | 582 - .../Chapter8.ipynb | 703 - .../Chapter9.ipynb | 549 - C_Programming_for_the_Absolute_Beginner/README.txt | 10 - .../screenshots/1.png | Bin 15413 -> 0 bytes .../screenshots/1_1.png | Bin 15413 -> 0 bytes .../screenshots/2.png | Bin 9440 -> 0 bytes .../screenshots/2_1.png | Bin 9440 -> 0 bytes .../screenshots/3.png | Bin 32643 -> 0 bytes .../screenshots/3_1.png | Bin 32643 -> 0 bytes .../Chapter10_1.ipynb | 362 + .../Chapter11_1.ipynb | 616 + .../Chapter12_1.ipynb | 445 + .../Chapter5_1.ipynb | 475 + .../Chapter6_1.ipynb | 652 + .../Chapter7_1.ipynb | 582 + .../Chapter8_1.ipynb | 703 + .../Chapter9_1.ipynb | 515 + .../Chapter_1.ipynb | 117 + .../Chapter_2.ipynb | 239 + .../Chapter_3.ipynb | 499 + .../Chapter_4.ipynb | 688 + .../README.txt | 10 + .../screenshots/1.png | Bin 0 -> 15413 bytes .../screenshots/1_1.png | Bin 0 -> 15413 bytes .../screenshots/2.png | Bin 0 -> 9440 bytes .../screenshots/2_1.png | Bin 0 -> 9440 bytes .../screenshots/3.png | Bin 0 -> 32643 bytes .../screenshots/3_1.png | Bin 0 -> 32643 bytes Chemical_Engineering_Thermodynamics/README.txt | 10 - Chemical_Engineering_Thermodynamics/ch1.ipynb | 145 - Chemical_Engineering_Thermodynamics/ch10.ipynb | 202 - Chemical_Engineering_Thermodynamics/ch11.ipynb | 585 - Chemical_Engineering_Thermodynamics/ch12.ipynb | 716 - Chemical_Engineering_Thermodynamics/ch13.ipynb | 235 - Chemical_Engineering_Thermodynamics/ch14.ipynb | 846 - Chemical_Engineering_Thermodynamics/ch2.ipynb | 117 - Chemical_Engineering_Thermodynamics/ch3.ipynb | 897 - Chemical_Engineering_Thermodynamics/ch4.ipynb | 1291 - Chemical_Engineering_Thermodynamics/ch5.ipynb | 974 - Chemical_Engineering_Thermodynamics/ch6.ipynb | 214 - Chemical_Engineering_Thermodynamics/ch7.ipynb | 255 - Chemical_Engineering_Thermodynamics/ch8.ipynb | 600 - Chemical_Engineering_Thermodynamics/ch9.ipynb | 1125 - .../hardythe1/attachment/20150521.pdf | Bin 230939 -> 0 bytes .../screenshots/1.png | Bin 144195 -> 0 bytes .../screenshots/2.png | Bin 144507 -> 0 bytes .../screenshots/3.png | Bin 167523 -> 0 bytes .../screenshots/Plot_of_gE-RTx1x2_vs_x1.png | Bin 8932 -> 0 bytes .../Plot_of_ln(gamma1-gamma2)_vs_x1.png | Bin 13438 -> 0 bytes .../screenshots/T-x-y_diagram.png | Bin 23932 -> 0 bytes .../screenshots/ch1.png | Bin 80229 -> 0 bytes .../screenshots/ch8.png | Bin 79322 -> 0 bytes .../screenshots/pic111.png | Bin 134032 -> 0 bytes .../screenshots/pic222.png | Bin 140462 -> 0 bytes .../screenshots/pic333.png | Bin 149247 -> 0 bytes .../screenshots/pressureVSvol3.png | Bin 11626 -> 0 bytes .../README.txt | 10 + .../ch10_1.ipynb | 2536 ++ .../ch11_1.ipynb | 320 + .../ch12_1.ipynb | 503 + .../ch13_1.ipynb | 304 + .../ch14_1.ipynb | 715 + .../ch15_1.ipynb | 2056 + .../ch16_1.ipynb | 738 + .../ch17_1.ipynb | 2044 + .../ch18_1.ipynb | 587 + .../ch1_2.ipynb | 770 + .../ch2_2.ipynb | 1276 + .../ch3_2.ipynb | 1524 + .../ch4_2.ipynb | 1508 + .../ch5_2.ipynb | 743 + .../ch6_2.ipynb | 847 + .../ch7_2.ipynb | 1542 + .../ch8_2.ipynb | 752 + .../screenshots/pic111.png | Bin 0 -> 134032 bytes .../screenshots/pic222.png | Bin 0 -> 140462 bytes .../screenshots/pic333.png | Bin 0 -> 149247 bytes .../README.txt | 0 .../screenshots/ch1.png | Bin 0 -> 38618 bytes .../screenshots/ch8.png | Bin 0 -> 46857 bytes .../screenshots/pressureVSvol3.png | Bin 0 -> 37261 bytes .../README.txt | 10 + .../ch1.ipynb | 145 + .../ch10.ipynb | 202 + .../ch11.ipynb | 585 + .../ch12.ipynb | 716 + .../ch13.ipynb | 235 + .../ch14.ipynb | 846 + .../ch2.ipynb | 117 + .../ch3.ipynb | 897 + .../ch4.ipynb | 1291 + .../ch5.ipynb | 974 + .../ch6.ipynb | 214 + .../ch7.ipynb | 255 + .../ch8.ipynb | 600 + .../ch9.ipynb | 1125 + .../screenshots/Plot_of_gE-RTx1x2_vs_x1.png | Bin 0 -> 8932 bytes .../Plot_of_ln(gamma1-gamma2)_vs_x1.png | Bin 0 -> 13438 bytes .../screenshots/T-x-y_diagram.png | Bin 0 -> 23932 bytes .../screenshots/pressureVSvol3.png | Bin 0 -> 11626 bytes .../README.txt | 0 DC_Machines_and_Synchronous_Machines/README.txt | 10 - DC_Machines_and_Synchronous_Machines/ch1.ipynb | 1633 - DC_Machines_and_Synchronous_Machines/ch2.ipynb | 2010 - DC_Machines_and_Synchronous_Machines/ch3.ipynb | 1912 - DC_Machines_and_Synchronous_Machines/ch4.ipynb | 1114 - DC_Machines_and_Synchronous_Machines/ch5.ipynb | 1612 - DC_Machines_and_Synchronous_Machines/ch6.ipynb | 2427 -- DC_Machines_and_Synchronous_Machines/ch7.ipynb | 1711 - .../screenshots/ch1.png | Bin 351995 -> 0 bytes .../screenshots/ch1_1.png | Bin 351995 -> 0 bytes .../screenshots/ch1_2.png | Bin 351995 -> 0 bytes .../screenshots/ch4.png | Bin 361595 -> 0 bytes .../screenshots/ch4_1.png | Bin 361595 -> 0 bytes .../screenshots/ch4_2.png | Bin 361595 -> 0 bytes .../screenshots/ch7.png | Bin 373164 -> 0 bytes .../screenshots/ch7_1.png | Bin 373164 -> 0 bytes .../screenshots/ch7_2.png | Bin 373164 -> 0 bytes .../README.txt | 10 + .../ch1_2.ipynb | 1625 + .../ch2_2.ipynb | 1995 + .../ch3_2.ipynb | 1904 + .../ch4_2.ipynb | 1106 + .../ch5_2.ipynb | 1604 + .../ch6_2.ipynb | 2419 ++ .../ch7_2.ipynb | 1702 + .../screenshots/ch1.png | Bin 0 -> 351995 bytes .../screenshots/ch1_1.png | Bin 0 -> 351995 bytes .../screenshots/ch1_2.png | Bin 0 -> 351995 bytes .../screenshots/ch4.png | Bin 0 -> 361595 bytes .../screenshots/ch4_1.png | Bin 0 -> 361595 bytes .../screenshots/ch4_2.png | Bin 0 -> 361595 bytes .../screenshots/ch7.png | Bin 0 -> 373164 bytes .../screenshots/ch7_1.png | Bin 0 -> 373164 bytes .../screenshots/ch7_2.png | Bin 0 -> 373164 bytes Digital_Communications/Chapter2.ipynb | 290 - Digital_Communications/Chapter3.ipynb | 2238 - Digital_Communications/Chapter4.ipynb | 273 - Digital_Communications/Chapter5.ipynb | 105 - Digital_Communications/Chapter6.ipynb | 158 - Digital_Communications/Chapter7.ipynb | 431 - Digital_Communications/Chapter8.ipynb | 1439 - Digital_Communications/Chapter9.ipynb | 166 - Digital_Communications/ChapterNo2.ipynb | 290 - Digital_Communications/ChapterNo3.ipynb | 2238 - Digital_Communications/ChapterNo4.ipynb | 273 - Digital_Communications/ChapterNo5.ipynb | 105 - Digital_Communications/ChapterNo6.ipynb | 158 - Digital_Communications/ChapterNo7.ipynb | 431 - Digital_Communications/ChapterNo8.ipynb | 1439 - Digital_Communications/ChapterNo9.ipynb | 182 - Digital_Communications/README.txt | 10 - Digital_Communications/screenshots/Chapter1.png | Bin 209810 -> 0 bytes Digital_Communications/screenshots/chapter2.png | Bin 205124 -> 0 bytes Digital_Communications/screenshots/chapter2_1.png | Bin 122271 -> 0 bytes Digital_Communications/screenshots/chapter2_2.png | Bin 209679 -> 0 bytes Digital_Communications/screenshots/chapter2_3.png | Bin 209679 -> 0 bytes Digital_Communications/screenshots/chapter3.png | Bin 229268 -> 0 bytes Digital_Communications/screenshots/chapter3_1.png | Bin 193440 -> 0 bytes Digital_Communications/screenshots/chapter3_2.png | Bin 208477 -> 0 bytes Digital_Communications/screenshots/chapter3_3.png | Bin 208477 -> 0 bytes Digital_Communications/screenshots/chapter4.png | Bin 228102 -> 0 bytes Digital_Communications/screenshots/chapter4_1.png | Bin 210555 -> 0 bytes Digital_Communications/screenshots/chapter4_2.png | Bin 206602 -> 0 bytes Digital_Communications/screenshots/chapter4_3.png | Bin 206602 -> 0 bytes Digital_Communications/screenshots/chapter6.png | Bin 159825 -> 0 bytes Digital_Communications/screenshots/chapter7.png | Bin 146443 -> 0 bytes Digital_Communications_by_S._Sharma/Chapter2.ipynb | 290 + Digital_Communications_by_S._Sharma/Chapter3.ipynb | 2238 + Digital_Communications_by_S._Sharma/Chapter4.ipynb | 273 + Digital_Communications_by_S._Sharma/Chapter5.ipynb | 105 + Digital_Communications_by_S._Sharma/Chapter6.ipynb | 158 + Digital_Communications_by_S._Sharma/Chapter7.ipynb | 431 + Digital_Communications_by_S._Sharma/Chapter8.ipynb | 1439 + Digital_Communications_by_S._Sharma/Chapter9.ipynb | 166 + Digital_Communications_by_S._Sharma/README.txt | 10 + .../screenshots/Chapter1.png | Bin 0 -> 209810 bytes .../screenshots/chapter2.png | Bin 0 -> 205124 bytes .../screenshots/chapter2_1.png | Bin 0 -> 122271 bytes .../screenshots/chapter2_2.png | Bin 0 -> 209679 bytes .../screenshots/chapter2_3.png | Bin 0 -> 209679 bytes .../screenshots/chapter3.png | Bin 0 -> 229268 bytes .../screenshots/chapter3_1.png | Bin 0 -> 193440 bytes .../screenshots/chapter3_2.png | Bin 0 -> 208477 bytes .../screenshots/chapter3_3.png | Bin 0 -> 208477 bytes .../screenshots/chapter4.png | Bin 0 -> 228102 bytes .../screenshots/chapter4_1.png | Bin 0 -> 210555 bytes .../screenshots/chapter4_2.png | Bin 0 -> 206602 bytes .../screenshots/chapter4_3.png | Bin 0 -> 206602 bytes .../screenshots/chapter6.png | Bin 0 -> 159825 bytes .../screenshots/chapter7.png | Bin 0 -> 146443 bytes .../README.txt | 10 + .../chap2.ipynb | 0 .../chap2_1.ipynb | 0 .../chap2_2.ipynb | 1 + .../chapter1.ipynb | 0 .../chapter1_1.ipynb | 0 .../chapter1_2.ipynb | 1 + .../chapter3_2.ipynb | 0 .../chapter3_3.ipynb | 0 .../chapter3_4.ipynb | 1 + .../chapter4_2.ipynb | 0 .../chapter4_3.ipynb | 0 .../chapter4_4.ipynb | 1 + .../chapter5_2.ipynb | 0 .../chapter5_3.ipynb | 0 .../chapter5_4.ipynb | 1 + .../chapter6.ipynb | 0 .../chapter6_1.ipynb | 0 .../chapter6_2.ipynb | 1 + .../screenshots/ch2.png | Bin .../screenshots/ch2_1.png | Bin .../screenshots/ch2_2.png | Bin 0 -> 57344 bytes .../screenshots/ch4.png | Bin .../screenshots/ch4_1.png | Bin .../screenshots/ch4_2.png | Bin 0 -> 60556 bytes .../screenshots/ch5.png | Bin .../screenshots/ch5_1.png | Bin 0 -> 43857 bytes .../screenshots/chapter5.ipynb | 0 .../Chapter10_1.ipynb | 0 .../Chapter10_2.ipynb | 0 .../Chapter10_3.ipynb | 0 .../Chapter10_4.ipynb | 0 .../Chapter10_5.ipynb | 0 .../Chapter1_1.ipynb | 0 .../Chapter1_2.ipynb | 0 .../Chapter1_3.ipynb | 0 .../Chapter1_4.ipynb | 0 .../Chapter1_5.ipynb | 0 .../Chapter2_(1).ipynb | 0 .../Chapter2_1.ipynb | 0 .../Chapter2_2.ipynb | 0 .../Chapter2_3.ipynb | 0 .../Chapter2_4.ipynb | 0 .../Chapter3_1.ipynb | 0 .../Chapter3_2.ipynb | 0 .../Chapter3_3.ipynb | 0 .../Chapter3_4.ipynb | 0 .../Chapter3_5.ipynb | 0 .../Chapter4_1.ipynb | 0 .../Chapter4_2.ipynb | 0 .../Chapter4_3.ipynb | 0 .../Chapter4_4.ipynb | 0 .../Chapter4_5.ipynb | 0 .../Chapter5_1.ipynb | 0 .../Chapter5_2.ipynb | 0 .../Chapter5_3.ipynb | 0 .../Chapter5_4.ipynb | 0 .../Chapter5_5.ipynb | 0 .../Chapter6_1.ipynb | 0 .../Chapter6_2.ipynb | 0 .../Chapter6_3.ipynb | 0 .../Chapter6_4.ipynb | 0 .../Chapter6_5.ipynb | 0 .../Chapter7_(1).ipynb | 0 .../Chapter7_1.ipynb | 0 .../Chapter7_2.ipynb | 0 .../Chapter7_3.ipynb | 0 .../Chapter7_4.ipynb | 0 .../Chapter8_1.ipynb | 0 .../Chapter8_2.ipynb | 0 .../Chapter8_3.ipynb | 0 .../Chapter8_4.ipynb | 0 .../Chapter8_5.ipynb | 0 .../Chapter9_1.ipynb | 0 .../Chapter9_2.ipynb | 0 .../Chapter9_3.ipynb | 0 .../Chapter9_4.ipynb | 0 .../Chapter9_5.ipynb | 0 .../README.txt | 0 .../screenshots/chapter4.png | Bin .../screenshots/chapter4_1.png | Bin .../screenshots/chapter4_2.png | Bin .../screenshots/chapter8.png | Bin .../screenshots/chapter8_1.png | Bin .../screenshots/chapter8_2.png | Bin .../screenshots/chapter9.png | Bin .../screenshots/chapter9_1.png | Bin .../screenshots/chapter9_2.png | Bin .../.ipynb_checkpoints/chapter10-checkpoint.ipynb | 364 - .../.ipynb_checkpoints/chapter3-checkpoint.ipynb | 460 - .../.ipynb_checkpoints/chapter5-checkpoint.ipynb | 609 - ELECTRIC_MACHINERY/README.txt | 10 - ELECTRIC_MACHINERY/chapter1.ipynb | 560 - ELECTRIC_MACHINERY/chapter10.ipynb | 538 - ELECTRIC_MACHINERY/chapter11.ipynb | 975 - ELECTRIC_MACHINERY/chapter2.ipynb | 761 - ELECTRIC_MACHINERY/chapter3.ipynb | 430 - ELECTRIC_MACHINERY/chapter4.ipynb | 277 - ELECTRIC_MACHINERY/chapter5.ipynb | 596 - ELECTRIC_MACHINERY/chapter6.ipynb | 534 - ELECTRIC_MACHINERY/chapter7.ipynb | 473 - ELECTRIC_MACHINERY/chapter8.ipynb | 392 - ELECTRIC_MACHINERY/chapter9.ipynb | 390 - ELECTRIC_MACHINERY/screenshots/capture1.png | Bin 16803 -> 0 bytes ELECTRIC_MACHINERY/screenshots/capture2.png | Bin 44656 -> 0 bytes ELECTRIC_MACHINERY/screenshots/capture3.png | Bin 30178 -> 0 bytes .../.ipynb_checkpoints/chapter10-checkpoint.ipynb | 364 + .../.ipynb_checkpoints/chapter3-checkpoint.ipynb | 460 + .../.ipynb_checkpoints/chapter5-checkpoint.ipynb | 609 + .../README.txt | 10 + .../chapter1.ipynb | 560 + .../chapter10.ipynb | 538 + .../chapter11.ipynb | 975 + .../chapter2.ipynb | 761 + .../chapter3.ipynb | 430 + .../chapter4.ipynb | 277 + .../chapter5.ipynb | 596 + .../chapter6.ipynb | 534 + .../chapter7.ipynb | 473 + .../chapter8.ipynb | 427 + .../chapter9.ipynb | 390 + .../screenshots/capture1.png | Bin 0 -> 16803 bytes .../screenshots/capture2.png | Bin 0 -> 44656 bytes .../screenshots/capture3.png | Bin 0 -> 30178 bytes .../ch10.ipynb | 0 .../ch12.ipynb | 0 .../ch13.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../ch8.ipynb | 0 .../ch9.ipynb | 0 .../chC.ipynb | 0 .../screenshots/Voltage_Time7.png | Bin .../screenshots/currentVoltageJunction7.png | Bin .../screenshots/transmissionsystem10.png | Bin .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../screenshots/2.png | Bin .../screenshots/4.png | Bin .../screenshots/5.png | Bin .../README.txt | 0 .../Chapter1.ipynb | 0 .../Chapter2.ipynb | 0 .../Chapter3.ipynb | 0 .../Chapter4.ipynb | 0 .../Chapter5.ipynb | 0 .../Chapter6.ipynb | 0 .../screenshots/c3.png | Bin .../screenshots/c5.png | Bin .../screenshots/c6.png | Bin .../README.txt | 10 + .../ch1.ipynb | 0 .../ch10.ipynb | 0 .../ch11.ipynb | 0 .../ch12.ipynb | 0 .../ch13.ipynb | 0 .../ch14.ipynb | 0 .../ch15.ipynb | 0 .../ch16.ipynb | 0 .../ch17.ipynb | 0 .../ch19.ipynb | 0 .../ch2.ipynb | 0 .../ch20.ipynb | 0 .../ch21.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../ch8.ipynb | 0 .../ch9.ipynb | 0 .../screenshots/LinearAmplitudeSpectrum.png | Bin .../screenshots/SpectralDigram5.png | Bin .../screenshots/amplitudeSpectrum3.png | Bin .../Chapter_10_1.ipynb | 0 .../Chapter_10_2.ipynb | 0 .../Chapter_10_3.ipynb | 0 .../Chapter_11_1.ipynb | 0 .../Chapter_11_2.ipynb | 0 .../Chapter_11_3.ipynb | 0 .../Chapter_12_1.ipynb | 0 .../Chapter_12_2.ipynb | 0 .../Chapter_12_3.ipynb | 0 .../Chapter_14_1.ipynb | 0 .../Chapter_14_2.ipynb | 0 .../Chapter_14_3.ipynb | 0 .../Chapter_15_1.ipynb | 0 .../Chapter_15_2.ipynb | 0 .../Chapter_15_3.ipynb | 0 .../Chapter_18_1.ipynb | 0 .../Chapter_18_2.ipynb | 0 .../Chapter_18_3.ipynb | 0 .../Chapter_19_1.ipynb | 0 .../Chapter_19_2.ipynb | 0 .../Chapter_19_3.ipynb | 0 .../Chapter_1_1.ipynb | 0 .../Chapter_1_2.ipynb | 0 .../Chapter_1_3.ipynb | 0 .../Chapter_21_1.ipynb | 0 .../Chapter_21_2.ipynb | 0 .../Chapter_21_3.ipynb | 0 .../Chapter_2_1.ipynb | 0 .../Chapter_2_2.ipynb | 0 .../Chapter_2_3.ipynb | 0 .../Chapter_3_1.ipynb | 0 .../Chapter_3_2.ipynb | 0 .../Chapter_3_3.ipynb | 0 .../Chapter_4_1.ipynb | 0 .../Chapter_4_2.ipynb | 0 .../Chapter_4_3.ipynb | 0 .../Chapter_5_1.ipynb | 0 .../Chapter_5_2.ipynb | 0 .../Chapter_5_3.ipynb | 0 .../Chapter_6_1.ipynb | 0 .../Chapter_6_2.ipynb | 0 .../Chapter_6_3.ipynb | 0 .../Chapter_7_1.ipynb | 0 .../Chapter_7_2.ipynb | 0 .../Chapter_7_3.ipynb | 0 .../Chapter_8_1.ipynb | 0 .../Chapter_8_2.ipynb | 0 .../Chapter_8_3.ipynb | 0 .../Chapter_9_1.ipynb | 0 .../Chapter_9_2.ipynb | 0 .../Chapter_9_3.ipynb | 0 .../README.txt | 0 .../screenshots/Capture01.PNG | Bin .../screenshots/Capture02.PNG | Bin .../screenshots/Capture04.PNG | Bin .../screenshots/Capture04_1.PNG | Bin .../screenshots/Capture05.PNG | Bin .../screenshots/Capture05_1.PNG | Bin .../screenshots/Capture06.PNG | Bin .../screenshots/Capture06_1.PNG | Bin .../screenshots/captue03.PNG | Bin Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb | 0 Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb | 0 Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb | 0 Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb | 0 Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb | 0 .../screenshots/1.png | Bin .../screenshots/2.png | Bin .../screenshots/5.png | Bin .../Chapter_01.ipynb | 0 .../Chapter_02.ipynb | 0 .../Chapter_03.ipynb | 0 .../Chapter_04.ipynb | 0 .../Chapter_05.ipynb | 0 .../Chapter_06.ipynb | 0 .../Chapter_07.ipynb | 0 .../Chapter_08.ipynb | 0 .../Chapter_10.ipynb | 0 .../screenshots/snap2.png | Bin .../screenshots/snap3.png | Bin .../screenshots/snap3_1.png | Bin .../Chapter1.ipynb | 0 .../Chapter11.ipynb | 0 .../Chapter11_1.ipynb | 0 .../Chapter12.ipynb | 0 .../Chapter12_1.ipynb | 0 .../Chapter16.ipynb | 0 .../Chapter16_1.ipynb | 0 .../Chapter1_1.ipynb | 0 .../Chapter2.ipynb | 0 .../Chapter2_1.ipynb | 0 .../Chapter3.ipynb | 0 .../Chapter3_1.ipynb | 0 .../Chapter4.ipynb | 0 .../Chapter4_1.ipynb | 0 .../Chapter5.ipynb | 0 .../Chapter5_1.ipynb | 0 .../Chapter6.ipynb | 0 .../Chapter6_1.ipynb | 0 .../Chapter7.ipynb | 0 .../Chapter7_1.ipynb | 0 .../Chapter8.ipynb | 0 .../Chapter8_1.ipynb | 0 .../Chapter9.ipynb | 0 .../Chapter9_1.ipynb | 0 .../README.txt | 0 .../screenshots/crt.png | Bin .../screenshots/crt_1.png | Bin .../screenshots/fullwave.png | Bin .../screenshots/fullwave_1.png | Bin .../screenshots/ramp.png | Bin .../screenshots/ramp_1.png | Bin .../R.K.RAJPUTCHAPTER_12.ipynb | 0 .../R.K.RAJPUTCHAPTER_8.ipynb | 0 .../R.K.RAJPUT_CHAPTER_1_.ipynb | 0 .../R.K.RAJPUT_CHAPTER_2_.ipynb | 0 .../R.K.RAJPUT_CHAPTER_7.ipynb | 0 .../R.K._RAJPUT_CHAPTER_6.ipynb | 0 .../R.k.Rajput5.ipynb | 0 .../screenshots/r.k.rajput12.png | Bin .../screenshots/r.k_rajput.png | Bin .../screenshots/r.krajput.png | Bin .../Chapter10_1.ipynb | 0 .../Chapter1_1.ipynb | 0 .../Chapter2_1.ipynb | 0 .../Chapter3_1.ipynb | 0 .../Chapter4_1.ipynb | 0 .../Chapter6_1.ipynb | 0 .../Chapter7_1.ipynb | 0 .../Chapter8_1.ipynb | 0 .../Chapter9_1.ipynb | 0 .../README.txt | 0 .../screenshots/chap1.png | Bin .../screenshots/chap4.png | Bin .../screenshots/chap7.png | Bin Engineering_Economics/Chapter1.ipynb | 83 - Engineering_Economics/Chapter10.ipynb | 357 - Engineering_Economics/Chapter11.ipynb | 306 - Engineering_Economics/Chapter12.ipynb | 104 - Engineering_Economics/Chapter13.ipynb | 104 - Engineering_Economics/Chapter16.ipynb | 297 - Engineering_Economics/Chapter2.ipynb | 372 - Engineering_Economics/Chapter3.ipynb | 360 - Engineering_Economics/Chapter4.ipynb | 388 - Engineering_Economics/Chapter5.ipynb | 352 - Engineering_Economics/Chapter6.ipynb | 230 - Engineering_Economics/Chapter7.ipynb | 125 - Engineering_Economics/Chapter8.ipynb | 619 - Engineering_Economics/Chapter9.ipynb | 209 - Engineering_Economics/README.txt | 10 - .../screenshots/Depriciation_and_Book_value.png | Bin 62544 -> 0 bytes .../screenshots/Economic_order_and_Time.png | Bin 69387 -> 0 bytes .../screenshots/Expected_Saving.png | Bin 188820 -> 0 bytes .../screenshots/Present_Worth.png | Bin 82273 -> 0 bytes Engineering_Economics/screenshots/future_sum.png | Bin 99835 -> 0 bytes .../screenshots/maturity_value.png | Bin 110032 -> 0 bytes .../Chapter10_1.ipynb | 125 + .../Chapter11_1.ipynb | 104 + .../Chapter12_1.ipynb | 104 + .../Chapter13_1.ipynb | 104 + .../Chapter16_1.ipynb | 134 + .../Chapter1_1.ipynb | 83 + .../Chapter2_1.ipynb | 146 + .../Chapter3_1.ipynb | 209 + .../Chapter4_1.ipynb | 167 + .../Chapter5_1.ipynb | 125 + .../Chapter6_1.ipynb | 230 + .../Chapter7_1.ipynb | 125 + .../Chapter8_1.ipynb | 230 + .../Chapter9_1.ipynb | 209 + .../README.txt | 10 + .../screenshots/Depriciation_and_Book_value.png | Bin 0 -> 62544 bytes .../screenshots/Economic_order_and_Time.png | Bin 0 -> 69387 bytes .../screenshots/Expected_Saving.png | Bin 0 -> 188820 bytes .../screenshots/Present_Worth.png | Bin 0 -> 82273 bytes .../screenshots/future_sum.png | Bin 0 -> 99835 bytes .../screenshots/maturity_value.png | Bin 0 -> 110032 bytes .../appendix_13.ipynb | 0 .../appendix_14.ipynb | 0 .../appendix_15.ipynb | 0 .../appendix_16.ipynb | 0 .../chapter02_13.ipynb | 0 .../chapter02_14.ipynb | 0 .../chapter02_15.ipynb | 0 .../chapter02_16.ipynb | 0 .../chapter02_17.ipynb | 0 .../chapter03_13.ipynb | 0 .../chapter03_14.ipynb | 0 .../chapter03_15.ipynb | 0 .../chapter03_16.ipynb | 0 .../chapter04_13.ipynb | 0 .../chapter04_14.ipynb | 0 .../chapter04_15.ipynb | 0 .../chapter04_16.ipynb | 0 .../chapter05_13.ipynb | 0 .../chapter05_14.ipynb | 0 .../chapter05_15.ipynb | 0 .../chapter05_16.ipynb | 0 .../chapter06_13.ipynb | 0 .../chapter06_14.ipynb | 0 .../chapter06_15.ipynb | 0 .../chapter06_16.ipynb | 0 .../chapter07_13.ipynb | 0 .../chapter07_14.ipynb | 0 .../chapter07_15.ipynb | 0 .../chapter07_16.ipynb | 0 .../chapter08_13.ipynb | 0 .../chapter08_14.ipynb | 0 .../chapter08_15.ipynb | 0 .../chapter08_16.ipynb | 0 .../chapter09_13.ipynb | 0 .../chapter09_14.ipynb | 0 .../chapter09_15.ipynb | 0 .../chapter09_16.ipynb | 0 .../chapter10_13.ipynb | 0 .../chapter10_14.ipynb | 0 .../chapter10_15.ipynb | 0 .../chapter10_16.ipynb | 0 .../chapter12_13.ipynb | 0 .../chapter12_14.ipynb | 0 .../chapter12_15.ipynb | 0 .../chapter13_13.ipynb | 0 .../chapter13_14.ipynb | 0 .../chapter13_15.ipynb | 0 .../chapter14_13.ipynb | 0 .../chapter14_14.ipynb | 0 .../chapter14_15.ipynb | 0 .../chapter15_13.ipynb | 0 .../chapter15_14.ipynb | 0 .../chapter15_15.ipynb | 0 .../chapter16_13.ipynb | 0 .../chapter16_14.ipynb | 0 .../chapter16_15.ipynb | 0 .../chapter17_13.ipynb | 0 .../chapter17_14.ipynb | 0 .../chapter17_15.ipynb | 0 .../chapter18_13.ipynb | 0 .../chapter18_14.ipynb | 0 .../chapter18_15.ipynb | 0 .../chapter19_13.ipynb | 0 .../chapter19_14.ipynb | 0 .../chapter19_15.ipynb | 0 .../chapter20_13.ipynb | 0 .../chapter20_14.ipynb | 0 .../chapter20_15.ipynb | 0 .../chapter21_13.ipynb | 0 .../chapter21_14.ipynb | 0 .../chapter21_15.ipynb | 0 .../chapter22_13.ipynb | 0 .../chapter22_14.ipynb | 0 .../chapter22_15.ipynb | 0 .../chapter23_13.ipynb | 0 .../chapter23_14.ipynb | 0 .../chapter23_15.ipynb | 0 .../chapter24_13.ipynb | 0 .../chapter24_14.ipynb | 0 .../chapter24_15.ipynb | 0 .../chapter25_13.ipynb | 0 .../chapter25_14.ipynb | 0 .../chapter25_15.ipynb | 0 .../screenshots/bending_moment_diagram_.png | Bin .../screenshots/shear_force_diagram_.png | Bin .../screenshots/shear_force_diagram_1.png | Bin .../Chapter1.ipynb | 0 .../Chapter10.ipynb | 0 .../Chapter11.ipynb | 0 .../Chapter12.ipynb | 0 .../Chapter13.ipynb | 0 .../Chapter15.ipynb | 0 .../Chapter2.ipynb | 0 .../Chapter3.ipynb | 0 .../Chapter4.ipynb | 0 .../Chapter5.ipynb | 0 .../Chapter6.ipynb | 0 .../Chapter7.ipynb | 0 .../Chapter8.ipynb | 0 .../Chapter9.ipynb | 0 Engineering_Physics_by_G._Vijayakumari/README.txt | 0 .../screenshots/11.png | Bin .../screenshots/22.png | Bin .../screenshots/33.png | Bin Engineering_Physics_by_P.K.Palanisamy/README.txt | 0 .../Chapter10_1.ipynb | 0 .../Chapter10_2.ipynb | 0 .../Chapter11_1.ipynb | 0 .../Chapter11_2.ipynb | 0 .../Chapter12_1.ipynb | 0 .../Chapter12_2.ipynb | 0 .../Chapter13_1.ipynb | 0 .../Chapter13_2.ipynb | 0 .../Chapter14_1.ipynb | 0 .../Chapter14_2.ipynb | 0 .../Chapter15_1.ipynb | 0 .../Chapter15_2.ipynb | 0 .../Chapter16_1.ipynb | 0 .../Chapter16_2.ipynb | 0 .../Chapter1_1.ipynb | 0 .../Chapter1_2.ipynb | 0 .../Chapter2_1.ipynb | 0 .../Chapter2_2.ipynb | 0 .../Chapter3_1.ipynb | 0 .../Chapter3_2.ipynb | 0 .../Chapter4_1.ipynb | 0 .../Chapter4_2.ipynb | 0 .../Chapter5_1.ipynb | 0 .../Chapter5_2.ipynb | 0 .../Chapter6_1.ipynb | 0 .../Chapter6_2.ipynb | 0 .../Chapter7_1.ipynb | 0 .../Chapter7_2.ipynb | 0 .../Chapter8_1.ipynb | 0 .../Chapter8_2.ipynb | 0 .../Chapter9_1.ipynb | 0 .../Chapter9_2.ipynb | 0 .../README.txt | 0 .../screenshots/chap15.png | Bin .../screenshots/chap15_1.png | Bin .../screenshots/chap2.png | Bin .../screenshots/chap2_1.png | Bin .../screenshots/chap4.png | Bin .../screenshots/chap4_1.png | Bin .../Chapter10_1.ipynb | 0 .../Chapter11_1.ipynb | 0 .../Chapter14_1.ipynb | 0 .../Chapter1_1.ipynb | 0 .../Chapter2_1.ipynb | 0 .../Chapter3_1.ipynb | 0 .../Chapter4_1.ipynb | 0 .../Chapter5_1.ipynb | 0 .../Chapter6_1.ipynb | 0 .../Chapter7_1.ipynb | 0 .../Chapter8_1.ipynb | 0 .../Chapter9_1.ipynb | 0 Engineering_Physics_by_S._Mani_Naidu/README.txt | 0 .../screenshots/11.png | Bin .../screenshots/22.png | Bin .../screenshots/33.png | Bin .../Chapter12.ipynb | 287 + .../Chapter12.ipynb.bkup | 287 - .../chapter1.ipynb | 0 .../chapter10.ipynb | 0 .../chapter11.ipynb | 0 .../chapter12.ipynb | 0 .../chapter13.ipynb | 0 .../chapter2.ipynb | 0 .../chapter3.ipynb | 0 .../chapter4.ipynb | 0 .../chapter5.ipynb | 0 .../chapter6.ipynb | 0 .../chapter7.ipynb | 0 .../chapter9.ipynb | 0 .../screenshots/Capture1.png | Bin .../screenshots/Capture3.png | Bin .../screenshots/Capture4.png | Bin Fluid_Mechanics/Chapter_1.ipynb | 61 - Fluid_Mechanics/Chapter_10.ipynb | 341 - Fluid_Mechanics/Chapter_11.ipynb | 120 - Fluid_Mechanics/Chapter_12.ipynb | 319 - Fluid_Mechanics/Chapter_13.ipynb | 142 - Fluid_Mechanics/Chapter_14.ipynb | 365 - Fluid_Mechanics/Chapter_15.ipynb | 114 - Fluid_Mechanics/Chapter_16.ipynb | 144 - Fluid_Mechanics/Chapter_17.ipynb | 274 - Fluid_Mechanics/Chapter_2.ipynb | 493 - Fluid_Mechanics/Chapter_20.ipynb | 115 - Fluid_Mechanics/Chapter_22.ipynb | 191 - Fluid_Mechanics/Chapter_23.ipynb | 302 - Fluid_Mechanics/Chapter_24.ipynb | 183 - Fluid_Mechanics/Chapter_25.ipynb | 328 - Fluid_Mechanics/Chapter_3.ipynb | 372 - Fluid_Mechanics/Chapter_4.ipynb | 185 - Fluid_Mechanics/Chapter_5.ipynb | 517 - Fluid_Mechanics/Chapter_6.ipynb | 504 - Fluid_Mechanics/Chapter_7.ipynb | 221 - Fluid_Mechanics/Chapter_8.ipynb | 73 - Fluid_Mechanics/Chapter_9.ipynb | 337 - Fluid_Mechanics/README.txt | 10 - .../Screenshot_from_2014-04-24_10_11_42.png | Bin 38369 -> 0 bytes Fluid_Mechanics/screenshots/ch11.png | Bin 70706 -> 0 bytes Fluid_Mechanics/screenshots/ch3.png | Bin 67888 -> 0 bytes Fluid_Mechanics/screenshots/ch5.png | Bin 69757 -> 0 bytes Fluid_Mechanics/screenshots/incresepressure.png | Bin 48265 -> 0 bytes Fluid_Mechanics/screenshots/plot1.png | Bin 27945 -> 0 bytes Fluid_Mechanics/screenshots/plot2.png | Bin 14805 -> 0 bytes Fluid_Mechanics/screenshots/veldistrtn.png | Bin 45080 -> 0 bytes Fluid_Mechanics/screenshots/veldistrtn_1.png | Bin 41027 -> 0 bytes .../README.txt | 0 .../screenshots/ch11.png | Bin 0 -> 70706 bytes .../screenshots/ch3.png | Bin 0 -> 67888 bytes .../screenshots/ch5.png | Bin 0 -> 69757 bytes Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb | 609 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb | 451 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb | 333 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb | 365 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb | 970 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb | 541 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb | 558 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb | 578 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb | 144 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb | 428 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb | 396 + Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb | 847 + .../screenshots/plot1.png | Bin 0 -> 27945 bytes .../screenshots/plot2.png | Bin 0 -> 14805 bytes .../screenshots/plot3.png | Bin 0 -> 38369 bytes Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb | 61 + Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb | 341 + Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb | 120 + Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb | 319 + Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb | 142 + Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb | 365 + Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb | 114 + Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb | 144 + Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb | 274 + Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb | 493 + Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb | 115 + Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb | 191 + Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb | 302 + Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb | 183 + Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb | 328 + Fluid_Mechanics_by_John_F_Douglas/Chapter_3.ipynb | 372 + Fluid_Mechanics_by_John_F_Douglas/Chapter_4.ipynb | 185 + Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb | 517 + Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb | 504 + Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb | 221 + Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb | 73 + Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb | 337 + Fluid_Mechanics_by_John_F_Douglas/README.txt | 10 + .../Screenshot_from_2014-04-24_10_11_42.png | Bin 0 -> 38369 bytes .../screenshots/ch11.png | Bin 0 -> 70706 bytes .../screenshots/ch3.png | Bin 0 -> 67888 bytes .../screenshots/ch5.png | Bin 0 -> 69757 bytes .../screenshots/incresepressure.png | Bin 0 -> 48265 bytes .../screenshots/plot1.png | Bin 0 -> 27945 bytes .../screenshots/plot2.png | Bin 0 -> 14805 bytes .../screenshots/veldistrtn.png | Bin 0 -> 45080 bytes .../screenshots/veldistrtn_1.png | Bin 0 -> 41027 bytes .../README.txt | 0 Fluid_mechanics/Chapter_10.ipynb | 234 - Fluid_mechanics/Chapter_11.ipynb | 485 - Fluid_mechanics/Chapter_2.ipynb | 406 - Fluid_mechanics/Chapter_3.ipynb | 105 - Fluid_mechanics/Chapter_4.ipynb | 777 - Fluid_mechanics/Chapter_5.ipynb | 244 - Fluid_mechanics/Chapter_6.ipynb | 118 - Fluid_mechanics/Chapter_7.ipynb | 874 - Fluid_mechanics/Chapter_8.ipynb | 802 - Fluid_mechanics/Chapter_9.ipynb | 450 - Fluid_mechanics/README.txt | 10 - Fluid_mechanics/screenshots/chap2.png | Bin 63575 -> 0 bytes Fluid_mechanics/screenshots/chap3.png | Bin 67113 -> 0 bytes Fluid_mechanics/screenshots/chap4.png | Bin 42703 -> 0 bytes Fluid_mechanics_by_Pao/Chapter_10.ipynb | 234 + Fluid_mechanics_by_Pao/Chapter_11.ipynb | 485 + Fluid_mechanics_by_Pao/Chapter_2.ipynb | 406 + Fluid_mechanics_by_Pao/Chapter_3.ipynb | 105 + Fluid_mechanics_by_Pao/Chapter_4.ipynb | 777 + Fluid_mechanics_by_Pao/Chapter_5.ipynb | 244 + Fluid_mechanics_by_Pao/Chapter_6.ipynb | 118 + Fluid_mechanics_by_Pao/Chapter_7.ipynb | 874 + Fluid_mechanics_by_Pao/Chapter_8.ipynb | 802 + Fluid_mechanics_by_Pao/Chapter_9.ipynb | 450 + Fluid_mechanics_by_Pao/README.txt | 10 + Fluid_mechanics_by_Pao/screenshots/chap2.png | Bin 0 -> 63575 bytes Fluid_mechanics_by_Pao/screenshots/chap3.png | Bin 0 -> 67113 bytes Fluid_mechanics_by_Pao/screenshots/chap4.png | Bin 0 -> 42703 bytes Fluidization_Engineering/README.txt | 10 - Fluidization_Engineering/ch10.ipynb | 304 - Fluidization_Engineering/ch11.ipynb | 356 - Fluidization_Engineering/ch12.ipynb | 396 - Fluidization_Engineering/ch13.ipynb | 308 - Fluidization_Engineering/ch14.ipynb | 416 - Fluidization_Engineering/ch15.ipynb | 294 - Fluidization_Engineering/ch16.ipynb | 428 - Fluidization_Engineering/ch17.ipynb | 446 - Fluidization_Engineering/ch18.ipynb | 570 - Fluidization_Engineering/ch3.ipynb | 267 - Fluidization_Engineering/ch4.ipynb | 306 - Fluidization_Engineering/ch5.ipynb | 137 - Fluidization_Engineering/ch6.ipynb | 499 - Fluidization_Engineering/ch7.ipynb | 399 - Fluidization_Engineering/ch8.ipynb | 218 - Fluidization_Engineering/ch9.ipynb | 265 - .../screenshots/plotkbckbedb.png | Bin 14155 -> 0 bytes .../screenshots/relationnubedrep.png | Bin 8780 -> 0 bytes .../screenshots/relationshebdrep.png | Bin 9690 -> 0 bytes .../README.txt | 10 + .../ch10.ipynb | 304 + .../ch11.ipynb | 356 + .../ch12.ipynb | 396 + .../ch13.ipynb | 308 + .../ch14.ipynb | 416 + .../ch15.ipynb | 294 + .../ch16.ipynb | 428 + .../ch17.ipynb | 446 + .../ch18.ipynb | 570 + .../ch3.ipynb | 267 + .../ch4.ipynb | 306 + .../ch5.ipynb | 137 + .../ch6.ipynb | 499 + .../ch7.ipynb | 399 + .../ch8.ipynb | 218 + .../ch9.ipynb | 265 + .../screenshots/plotkbckbedb.png | Bin 0 -> 14155 bytes .../screenshots/relationnubedrep.png | Bin 0 -> 8780 bytes .../screenshots/relationshebdrep.png | Bin 0 -> 9690 bytes .../Chapter01.ipynb | 578 - .../Chapter02.ipynb | 767 - .../Chapter03.ipynb | 440 - .../Chapter04.ipynb | 1337 - .../Chapter05.ipynb | 987 - .../Chapter06.ipynb | 1424 - .../Chapter07.ipynb | 254 - .../Chapter08.ipynb | 420 - .../Chapter09.ipynb | 109 - .../Chapter10.ipynb | 372 - .../Chapter11.ipynb | 304 - .../Chapter12.ipynb | 829 - .../Chapter13.ipynb | 57 - .../Chapter14.ipynb | 234 - .../Chapter15.ipynb | 266 - .../Chapter16.ipynb | 333 - .../Chapter17.ipynb | 310 - .../Chapter18.ipynb | 490 - .../Chapter19.ipynb | 126 - .../Chapter20.ipynb | 61 - .../Chapter21.ipynb | 174 - .../Chapter22.ipynb | 2300 - .../README.txt | 10 - .../screenshots/Calculation.png | Bin 75696 -> 0 bytes .../screenshots/Decision_Making_Odd_or_Even.png | Bin 64818 -> 0 bytes .../screenshots/Decision_Making_Odd_or_Even_1.png | Bin 64818 -> 0 bytes .../screenshots/Decision_Making_Odd_or_Even_2.png | Bin 64818 -> 0 bytes .../screenshots/Decision_Making_Odd_or_Even_3.png | Bin 64818 -> 0 bytes .../screenshots/Slope_and_Midpoint_of_a_line.png | Bin 112481 -> 0 bytes .../screenshots/Slope_and_Midpoint_of_a_line_1.png | Bin 112481 -> 0 bytes .../screenshots/Slope_and_Midpoint_of_a_line_2.png | Bin 112481 -> 0 bytes .../screenshots/Slope_and_Midpoint_of_a_line_3.png | Bin 112481 -> 0 bytes .../screenshots/Slope_and_Midpoint_of_a_line_4.png | Bin 112481 -> 0 bytes .../screenshots/Standard_Deviation.png | Bin 117100 -> 0 bytes .../screenshots/Tower_of_Honoi.png | Bin 77814 -> 0 bytes .../screenshots/Tower_of_Honoi_1.png | Bin 77814 -> 0 bytes .../screenshots/add_two_numbers.png | Bin 57166 -> 0 bytes .../screenshots/add_two_numbers_with_A.png | Bin 51307 -> 0 bytes .../Chapter01.ipynb | 578 + .../Chapter02.ipynb | 767 + .../Chapter03.ipynb | 440 + .../Chapter04.ipynb | 1337 + .../Chapter05.ipynb | 987 + .../Chapter06.ipynb | 1424 + .../Chapter07.ipynb | 254 + .../Chapter08.ipynb | 420 + .../Chapter09.ipynb | 109 + .../Chapter10.ipynb | 372 + .../Chapter11.ipynb | 304 + .../Chapter12.ipynb | 829 + .../Chapter13.ipynb | 57 + .../Chapter14.ipynb | 234 + .../Chapter15.ipynb | 266 + .../Chapter16.ipynb | 333 + .../Chapter17.ipynb | 310 + .../Chapter18.ipynb | 490 + .../Chapter19.ipynb | 126 + .../Chapter20.ipynb | 61 + .../Chapter21.ipynb | 174 + .../Chapter22.ipynb | 2300 + .../README.txt | 10 + .../screenshots/Calculation.png | Bin 0 -> 75696 bytes .../screenshots/Decision_Making_Odd_or_Even.png | Bin 0 -> 64818 bytes .../screenshots/Decision_Making_Odd_or_Even_1.png | Bin 0 -> 64818 bytes .../screenshots/Decision_Making_Odd_or_Even_2.png | Bin 0 -> 64818 bytes .../screenshots/Decision_Making_Odd_or_Even_3.png | Bin 0 -> 64818 bytes .../screenshots/Slope_and_Midpoint_of_a_line.png | Bin 0 -> 112481 bytes .../screenshots/Slope_and_Midpoint_of_a_line_1.png | Bin 0 -> 112481 bytes .../screenshots/Slope_and_Midpoint_of_a_line_2.png | Bin 0 -> 112481 bytes .../screenshots/Slope_and_Midpoint_of_a_line_3.png | Bin 0 -> 112481 bytes .../screenshots/Slope_and_Midpoint_of_a_line_4.png | Bin 0 -> 112481 bytes .../screenshots/Standard_Deviation.png | Bin 0 -> 117100 bytes .../screenshots/Tower_of_Honoi.png | Bin 0 -> 77814 bytes .../screenshots/Tower_of_Honoi_1.png | Bin 0 -> 77814 bytes .../screenshots/add_two_numbers.png | Bin 0 -> 57166 bytes .../screenshots/add_two_numbers_with_A.png | Bin 0 -> 51307 bytes Fundamentals_Of_Thermodynamics/Chapter10.ipynb | 164 - Fundamentals_Of_Thermodynamics/Chapter11.ipynb | 424 - Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb | 529 - Fundamentals_Of_Thermodynamics/Chapter12.ipynb | 486 - Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb | 478 - Fundamentals_Of_Thermodynamics/Chapter13.ipynb | 262 - Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb | 385 - Fundamentals_Of_Thermodynamics/Chapter14.ipynb | 295 - Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb | 325 - Fundamentals_Of_Thermodynamics/Chapter15.ipynb | 248 - Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb | 921 - Fundamentals_Of_Thermodynamics/Chapter16.ipynb | 128 - Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb | 377 - Fundamentals_Of_Thermodynamics/Chapter17.ipynb | 434 - Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb | 462 - Fundamentals_Of_Thermodynamics/Chapter2.ipynb | 314 - Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb | 379 - Fundamentals_Of_Thermodynamics/Chapter3.ipynb | 403 - Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb | 571 - Fundamentals_Of_Thermodynamics/Chapter4.ipynb | 198 - Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb | 198 - Fundamentals_Of_Thermodynamics/Chapter5.ipynb | 469 - Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb | 635 - Fundamentals_Of_Thermodynamics/Chapter6.ipynb | 566 - Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb | 652 - Fundamentals_Of_Thermodynamics/Chapter7.ipynb | 188 - Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb | 217 - Fundamentals_Of_Thermodynamics/Chapter8.ipynb | 452 - Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb | 444 - Fundamentals_Of_Thermodynamics/Chapter9.ipynb | 519 - Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb | 588 - Fundamentals_Of_Thermodynamics/README.txt | 10 - Fundamentals_Of_Thermodynamics/chapter10.ipynb | 474 - .../screenshots/heat_transfer_6.png | Bin 334272 -> 0 bytes .../screenshots/reversible_work_6.png | Bin 86259 -> 0 bytes .../screenshots/velocity_6.png | Bin 84713 -> 0 bytes .../Chapter10_6.ipynb | 164 + .../Chapter11_6.ipynb | 529 + .../Chapter12_6.ipynb | 478 + .../Chapter13_6.ipynb | 385 + .../Chapter14_6.ipynb | 325 + .../Chapter15_6.ipynb | 921 + .../Chapter16_6.ipynb | 377 + .../Chapter17_6.ipynb | 462 + .../Chapter2_6.ipynb | 379 + .../Chapter3_6.ipynb | 571 + .../Chapter4_6.ipynb | 198 + .../Chapter5_6.ipynb | 635 + .../Chapter6_6.ipynb | 652 + .../Chapter7_6.ipynb | 217 + .../Chapter8_6.ipynb | 444 + .../Chapter9_6.ipynb | 588 + .../README.txt | 10 + .../screenshots/heat_transfer_6.png | Bin 0 -> 334272 bytes .../screenshots/reversible_work_6.png | Bin 0 -> 86259 bytes .../screenshots/velocity_6.png | Bin 0 -> 84713 bytes .../Chapter_12_High_Voltage_cables_1.ipynb | 536 + .../Chapter_16_High_Voltage_Genration_1.ipynb | 749 + ...High_Voltage_Engineering_in_Industries__1.ipynb | 398 + .../Chapter_2_Electric_Fields_1.ipynb | 310 + ...ion_and_Deionization_Processes_in_Gases_1.ipynb | 699 + ...Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb | 557 + .../Chapter_5_The_Corona_Discharge_1.ipynb | 428 + ...hpater_14_Overvoltages_on_Power_systems_1.ipynb | 74 + .../README.txt | 10 + .../screenshots/Cha_12.png | Bin 0 -> 61472 bytes .../screenshots/Cha_16.png | Bin 0 -> 40900 bytes .../screenshots/Cha_3.png | Bin 0 -> 51482 bytes .../ch1.ipynb | 49 + .../ch10.ipynb | 142 + .../ch11.ipynb | 175 + .../ch12.ipynb | 169 + .../ch13.ipynb | 121 + .../ch14.ipynb | 130 + .../ch15.ipynb | 127 + .../ch2.ipynb | 112 + .../ch3.ipynb | 133 + .../ch4.ipynb | 112 + .../ch5.ipynb | 229 + .../ch6.ipynb | 265 + .../ch7.ipynb | 175 + .../ch8.ipynb | 239 + .../ch9.ipynb | 175 + .../screenshots/15FileIO&apmatrixes.png | Bin 0 -> 115506 bytes .../screenshots/2Variables&Types.png | Bin 0 -> 112754 bytes .../screenshots/9MoreStructures.png | Bin 0 -> 114525 bytes .../Ch_01.ipynb | 0 .../Ch_02.ipynb | 0 .../Ch_03.ipynb | 0 .../Ch_04.ipynb | 0 .../Ch_05.ipynb | 0 .../Ch_06.ipynb | 0 .../Ch_08.ipynb | 0 .../Ch_10.ipynb | 0 .../Ch_12.ipynb | 0 .../Ch_13.ipynb | 0 .../Ch_14.ipynb | 0 .../screenshots/snap1.png | Bin .../screenshots/snap4.png | Bin .../screenshots/snap5.png | Bin .../README.txt | 0 .../README.txt | 0 .../chapter1_1.ipynb | 0 .../chapter2_1.ipynb | 0 .../chapter3_1.ipynb | 0 .../chapter4_1.ipynb | 0 .../chapter6_1.ipynb | 0 .../screenshots/Ch2_firingAngleandEff.png | Bin .../screenshots/Ch6Requiredhp.png | Bin .../screenshots/Ch6Thermal_time_cons.png | Bin .../Chapter1.ipynb | 0 .../Chapter10.ipynb | 0 .../Chapter11.ipynb | 0 .../Chapter12.ipynb | 0 .../Chapter2.ipynb | 0 .../Chapter3.ipynb | 0 .../Chapter4.ipynb | 0 .../Chapter5.ipynb | 0 .../Chapter6.ipynb | 0 .../Chapter7.ipynb | 0 .../Chapter8.ipynb | 0 .../Chapter9.ipynb | 0 .../screenshots/chapter10.png | Bin .../screenshots/chapter3.png | Bin .../screenshots/chapter4.png | Bin .../README.txt | 0 .../README.txt | 0 .../ch10_1.ipynb | 0 .../ch10_2.ipynb | 0 .../ch11_1.ipynb | 0 .../ch11_2.ipynb | 0 .../ch12_1.ipynb | 0 .../ch12_2.ipynb | 0 .../ch14_1.ipynb | 0 .../ch14_2.ipynb | 0 .../ch15_1.ipynb | 0 .../ch15_2.ipynb | 0 .../ch16_1.ipynb | 0 .../ch16_2.ipynb | 0 .../ch17_1.ipynb | 0 .../ch17_2.ipynb | 0 .../ch18_1.ipynb | 0 .../ch18_2.ipynb | 0 .../ch19_1.ipynb | 0 .../ch19_2.ipynb | 0 .../ch20_1.ipynb | 0 .../ch20_2.ipynb | 0 .../ch21_1.ipynb | 0 .../ch21_2.ipynb | 0 .../ch2_1.ipynb | 0 .../ch2_2.ipynb | 0 .../ch3_1.ipynb | 0 .../ch3_2.ipynb | 0 .../ch4_1.ipynb | 0 .../ch4_2.ipynb | 0 .../ch5_1.ipynb | 0 .../ch5_2.ipynb | 0 .../ch6_1.ipynb | 0 .../ch6_2.ipynb | 0 .../ch8_1.ipynb | 0 .../ch8_2.ipynb | 0 .../screenshots/ch10.png | Bin .../screenshots/ch10_1.png | Bin .../screenshots/ch4.png | Bin .../screenshots/ch4_1.png | Bin .../screenshots/ch5.png | Bin .../screenshots/ch5_1.png | Bin .../chapter01.ipynb | 0 .../chapter02.ipynb | 0 .../chapter03.ipynb | 0 .../chapter04.ipynb | 0 .../chapter05.ipynb | 0 .../chapter06.ipynb | 0 .../chapter07.ipynb | 0 .../chapter08.ipynb | 0 .../chapter09.ipynb | 0 .../chapter10.ipynb | 0 .../chapter11.ipynb | 0 .../screenshots/Closed_Loop_Gain.png | Bin .../screenshots/per_error.png | Bin .../screenshots/waveform.png | Bin Magnifying_C/Chapter_10.ipynb | 336 - Magnifying_C/Chapter_11.ipynb | 1664 - Magnifying_C/Chapter_12.ipynb | 2137 - Magnifying_C/Chapter_2.ipynb | 203 - Magnifying_C/Chapter_3.ipynb | 1060 - Magnifying_C/Chapter_4.ipynb | 1070 - Magnifying_C/Chapter_5.ipynb | 909 - Magnifying_C/Chapter_6.ipynb | 951 - Magnifying_C/Chapter_7.ipynb | 862 - Magnifying_C/Chapter_8.ipynb | 2718 -- Magnifying_C/Chapter_9.ipynb | 1093 - Magnifying_C/README.txt | 10 - Magnifying_C/screenshots/chapter_10.png | Bin 22773 -> 0 bytes Magnifying_C/screenshots/chapter_2.png | Bin 19444 -> 0 bytes Magnifying_C/screenshots/chapter_6.png | Bin 25491 -> 0 bytes Magnifying_C/screenshots/ss_1.png | Bin 31802 -> 0 bytes Magnifying_C/screenshots/ss_2.png | Bin 42634 -> 0 bytes Magnifying_C/screenshots/ss_3.png | Bin 39397 -> 0 bytes Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb | 336 + Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb | 1664 + Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb | 2137 + Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb | 203 + Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb | 1060 + Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb | 1070 + Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb | 909 + Magnifying_C_by_Arpita_Goyal/Chapter_6_3.ipynb | 951 + Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb | 862 + Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb | 2718 ++ Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb | 1093 + Magnifying_C_by_Arpita_Goyal/README.txt | 10 + .../screenshots/chapter_10.png | Bin 0 -> 22773 bytes .../screenshots/chapter_2.png | Bin 0 -> 19444 bytes .../screenshots/chapter_6.png | Bin 0 -> 25491 bytes Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png | Bin 0 -> 31802 bytes Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png | Bin 0 -> 42634 bytes Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png | Bin 0 -> 39397 bytes .../README.txt | 0 .../chapter1_1.ipynb | 0 .../chapter2_1.ipynb | 0 .../chapter3_1.ipynb | 0 .../chapter5_1.ipynb | 0 .../chapter6_1.ipynb | 0 .../chapter7_1.ipynb | 0 .../chapter8_1.ipynb | 0 .../screenshots/ch2_normalized_freq.png | Bin .../screenshots/ch3_refractive_index.png | Bin .../screenshots/ch6_ext_eff.png | Bin Oscillations_and_Waves_by_S._Prakash/README.txt | 0 Power_Electronics/README.txt | 10 - Power_Electronics/chapter10.ipynb | 228 - Power_Electronics/chapter11.ipynb | 299 - Power_Electronics/chapter12.ipynb | 1997 - Power_Electronics/chapter13.ipynb | 342 - Power_Electronics/chapter14.ipynb | 93 - Power_Electronics/chapter2.ipynb | 233 - Power_Electronics/chapter3.ipynb | 1001 - Power_Electronics/chapter4.ipynb | 946 - Power_Electronics/chapter5.ipynb | 511 - Power_Electronics/chapter6.ipynb | 1761 - Power_Electronics/chapter7.ipynb | 1036 - Power_Electronics/chapter8.ipynb | 984 - Power_Electronics/chapter9.ipynb | 388 - Power_Electronics/screenshots/Capture.png | Bin 71211 -> 0 bytes Power_Electronics/screenshots/Capture1.png | Bin 26614 -> 0 bytes Power_Electronics/screenshots/Capture2.png | Bin 51127 -> 0 bytes Power_Electronics/screenshots/Chapter2.png | Bin 226408 -> 0 bytes Power_Electronics/screenshots/Chapter2_1.png | Bin 226408 -> 0 bytes Power_Electronics/screenshots/Chapter2_2.png | Bin 226408 -> 0 bytes Power_Electronics/screenshots/Chapter2_3.png | Bin 226408 -> 0 bytes Power_Electronics/screenshots/Chapter2_4.png | Bin 226408 -> 0 bytes Power_Electronics/screenshots/Chapter3.png | Bin 230367 -> 0 bytes Power_Electronics/screenshots/Chapter3_1.png | Bin 230367 -> 0 bytes Power_Electronics/screenshots/Chapter3_2.png | Bin 230367 -> 0 bytes Power_Electronics/screenshots/Chapter3_3.png | Bin 230367 -> 0 bytes Power_Electronics/screenshots/Chapter3_4.png | Bin 230367 -> 0 bytes Power_Electronics/screenshots/Chapter4.png | Bin 222170 -> 0 bytes Power_Electronics/screenshots/Chapter4_1.png | Bin 222170 -> 0 bytes Power_Electronics/screenshots/Chapter4_2.png | Bin 222170 -> 0 bytes Power_Electronics/screenshots/Chapter4_3.png | Bin 222170 -> 0 bytes Power_Electronics/screenshots/Chapter4_4.png | Bin 222170 -> 0 bytes Power_Electronics/screenshots/ex1_2.PNG | Bin 127466 -> 0 bytes Power_Electronics/screenshots/ex1_2_1.PNG | Bin 127466 -> 0 bytes Power_Electronics/screenshots/ex1_9.PNG | Bin 21973 -> 0 bytes Power_Electronics/screenshots/ex1_9_1.PNG | Bin 21973 -> 0 bytes Power_Electronics/screenshots/ex9_6.PNG | Bin 53508 -> 0 bytes Power_Electronics/screenshots/ex9_6_1.PNG | Bin 53508 -> 0 bytes .../Power_electronics_ch_10_3.ipynb | 283 + .../Power_electronics_ch_12_3.ipynb | 1030 + .../Power_electronics_ch_13_3.ipynb | 965 + .../Power_electronics_ch_1_3.ipynb | 449 + .../Power_electronics_ch_2_3.ipynb | 2357 ++ .../Power_electronics_ch_3_3.ipynb | 2276 + .../Power_electronics_ch_4_3.ipynb | 983 + .../Power_electronics_ch_5_3.ipynb | 1095 + .../Power_electronics_ch_6_3.ipynb | 852 + .../Power_electronics_ch_7_3.ipynb | 204 + .../Power_electronics_ch_8_3.ipynb | 576 + .../Power_electronics_ch_9_3.ipynb | 1255 + .../README.txt | 10 + .../screenshots/Capture.png | Bin 0 -> 71211 bytes .../screenshots/Capture1.png | Bin 0 -> 26614 bytes .../screenshots/Capture2.png | Bin 0 -> 51127 bytes .../screenshots/Chapter2.png | Bin 0 -> 226408 bytes .../screenshots/Chapter2_1.png | Bin 0 -> 226408 bytes .../screenshots/Chapter2_2.png | Bin 0 -> 226408 bytes .../screenshots/Chapter2_3.png | Bin 0 -> 226408 bytes .../screenshots/Chapter2_4.png | Bin 0 -> 226408 bytes .../screenshots/Chapter3.png | Bin 0 -> 230367 bytes .../screenshots/Chapter3_1.png | Bin 0 -> 230367 bytes .../screenshots/Chapter3_2.png | Bin 0 -> 230367 bytes .../screenshots/Chapter3_3.png | Bin 0 -> 230367 bytes .../screenshots/Chapter3_4.png | Bin 0 -> 230367 bytes .../screenshots/Chapter4.png | Bin 0 -> 222170 bytes .../screenshots/Chapter4_1.png | Bin 0 -> 222170 bytes .../screenshots/Chapter4_2.png | Bin 0 -> 222170 bytes .../screenshots/Chapter4_3.png | Bin 0 -> 222170 bytes .../screenshots/Chapter4_4.png | Bin 0 -> 222170 bytes .../screenshots/ex1_2.PNG | Bin 0 -> 127466 bytes .../screenshots/ex1_2_1.PNG | Bin 0 -> 127466 bytes .../screenshots/ex1_9.PNG | Bin 0 -> 21973 bytes .../screenshots/ex1_9_1.PNG | Bin 0 -> 21973 bytes .../screenshots/ex9_6.PNG | Bin 0 -> 53508 bytes .../screenshots/ex9_6_1.PNG | Bin 0 -> 53508 bytes .../temp/chapter10.ipynb | 228 + .../temp/chapter11.ipynb | 299 + .../temp/chapter12.ipynb | 1997 + .../temp/chapter13.ipynb | 342 + .../temp/chapter14.ipynb | 93 + .../temp/chapter2.ipynb | 233 + .../temp/chapter3.ipynb | 1001 + .../temp/chapter4.ipynb | 946 + .../temp/chapter5.ipynb | 511 + .../temp/chapter6.ipynb | 1761 + .../temp/chapter7.ipynb | 1036 + .../temp/chapter8.ipynb | 984 + .../temp/chapter9.ipynb | 388 + Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb | 228 + Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb | 299 + Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb | 1997 + Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb | 342 + Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb | 93 + Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb | 233 + Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb | 1001 + Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb | 946 + Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb | 511 + Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb | 1761 + Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb | 1036 + Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb | 984 + Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb | 388 + .../screenshots/Chapter2_4.png | Bin 0 -> 226408 bytes .../screenshots/Chapter3_4.png | Bin 0 -> 230367 bytes .../screenshots/Chapter4_4.png | Bin 0 -> 222170 bytes .../chapter1.ipynb | 249 - .../chapter10.ipynb | 101 - .../chapter11.ipynb | 143 - .../chapter12.ipynb | 101 - .../chapter13.ipynb | 339 - .../chapter14.ipynb | 229 - .../chapter16.ipynb | 216 - .../chapter17.ipynb | 142 - .../chapter19.ipynb | 128 - .../chapter22.ipynb | 94 - .../chapter3.ipynb | 331 - .../chapter4.ipynb | 123 - .../chapter5.ipynb | 253 - .../chapter6.ipynb | 148 - .../chapter7.ipynb | 221 - .../chapter8.ipynb | 185 - .../chapter9.ipynb | 274 - .../chapter_2.ipynb | 1143 - .../screenshots/image_1.png | Bin 29057 -> 0 bytes .../screenshots/image_2.png | Bin 45775 -> 0 bytes .../screenshots/image_3.png | Bin 34289 -> 0 bytes .../chapter10_1.ipynb | 101 + .../chapter11_1.ipynb | 143 + .../chapter12_1.ipynb | 101 + .../chapter13_1.ipynb | 339 + .../chapter14_1.ipynb | 229 + .../chapter16_1.ipynb | 217 + .../chapter17_1.ipynb | 142 + .../chapter19_1.ipynb | 128 + .../chapter1_1.ipynb | 249 + .../chapter3_1.ipynb | 331 + .../chapter4_1.ipynb | 123 + .../chapter5_1.ipynb | 253 + .../chapter6_1.ipynb | 148 + .../chapter7_1.ipynb | 221 + .../chapter8_1.ipynb | 185 + .../chapter9_1.ipynb | 274 + .../chapter_2_1.ipynb | 1143 + .../screenshots/image_1.png | Bin 0 -> 29057 bytes .../screenshots/image_2.png | Bin 0 -> 45775 bytes .../screenshots/image_3.png | Bin 0 -> 34289 bytes .../temp/chapter1.ipynb | 249 + .../temp/chapter10.ipynb | 101 + .../temp/chapter11.ipynb | 143 + .../temp/chapter12.ipynb | 101 + .../temp/chapter13.ipynb | 339 + .../temp/chapter14.ipynb | 229 + .../temp/chapter16.ipynb | 216 + .../temp/chapter17.ipynb | 142 + .../temp/chapter19.ipynb | 128 + .../temp/chapter22.ipynb | 94 + .../temp/chapter3.ipynb | 331 + .../temp/chapter4.ipynb | 123 + .../temp/chapter5.ipynb | 253 + .../temp/chapter6.ipynb | 148 + .../temp/chapter7.ipynb | 221 + .../temp/chapter8.ipynb | 185 + .../temp/chapter9.ipynb | 274 + .../temp/chapter_2.ipynb | 1143 + .../Chapter01.ipynb | 249 - .../Chapter01_1.ipynb | 249 - .../Chapter01_2.ipynb | 249 - .../Chapter02.ipynb | 95 - .../Chapter02_1.ipynb | 95 - .../Chapter02_2.ipynb | 95 - .../Chapter03.ipynb | 412 - .../Chapter03_1.ipynb | 412 - .../Chapter03_2.ipynb | 412 - .../Chapter04.ipynb | 365 - .../Chapter04_1.ipynb | 373 - .../Chapter04_2.ipynb | 373 - .../Chapter05.ipynb | 550 - .../Chapter05_1.ipynb | 550 - .../Chapter05_2.ipynb | 550 - .../Chapter06.ipynb | 351 - .../Chapter06_1.ipynb | 351 - .../Chapter06_2.ipynb | 351 - .../Chapter07.ipynb | 358 - .../Chapter07_1.ipynb | 358 - .../Chapter07_2.ipynb | 358 - .../Chapter08.ipynb | 527 - .../Chapter08_1.ipynb | 527 - .../Chapter08_2.ipynb | 527 - .../Chapter09.ipynb | 512 - .../Chapter09_1.ipynb | 512 - .../Chapter09_2.ipynb | 520 - .../Chapter10.ipynb | 211 - .../Chapter10_1.ipynb | 211 - .../Chapter10_2.ipynb | 211 - .../Chapter11.ipynb | 650 - .../Chapter11_1.ipynb | 650 - .../Chapter11_2.ipynb | 650 - .../Chapter12.ipynb | 443 - .../Chapter12_1.ipynb | 443 - .../Chapter12_2.ipynb | 443 - .../Chapter13.ipynb | 176 - .../Chapter13_1.ipynb | 176 - .../Chapter13_2.ipynb | 176 - .../Chapter14.ipynb | 152 - .../Chapter14_1.ipynb | 152 - .../Chapter14_2.ipynb | 152 - .../screenshots/ex1.2.png | Bin 69150 -> 0 bytes .../screenshots/ex1.2_1.png | Bin 69150 -> 0 bytes .../screenshots/ex1.2_2.png | Bin 69150 -> 0 bytes .../screenshots/ex13.1.png | Bin 52414 -> 0 bytes .../screenshots/ex13.1_1.png | Bin 52414 -> 0 bytes .../screenshots/ex13.1_2.png | Bin 52414 -> 0 bytes .../screenshots/ex14.2.png | Bin 57139 -> 0 bytes .../screenshots/ex14.2_1.png | Bin 57139 -> 0 bytes .../screenshots/ex14.2_2.png | Bin 57139 -> 0 bytes .../Chapter01_2.ipynb | 249 + .../Chapter02_2.ipynb | 95 + .../Chapter03_2.ipynb | 412 + .../Chapter04_2.ipynb | 373 + .../Chapter05_2.ipynb | 550 + .../Chapter06_2.ipynb | 351 + .../Chapter07_2.ipynb | 358 + .../Chapter08_2.ipynb | 527 + .../Chapter09_2.ipynb | 520 + .../Chapter10_2.ipynb | 211 + .../Chapter11_2.ipynb | 650 + .../Chapter12_2.ipynb | 443 + .../Chapter13_2.ipynb | 176 + .../Chapter14_2.ipynb | 152 + .../screenshots/ex1.2.png | Bin 0 -> 69150 bytes .../screenshots/ex13.2.png | Bin 0 -> 12162 bytes .../screenshots/ex14.2.png | Bin 0 -> 57139 bytes .../README.txt | 0 .../ch1.ipynb | 0 .../ch10.ipynb | 0 .../ch11.ipynb | 0 .../ch12.ipynb | 0 .../ch13.ipynb | 0 .../ch14.ipynb | 0 .../ch15.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../ch8.ipynb | 0 .../ch9.ipynb | 0 .../screenshots/TvsuT-t1.png | Bin .../screenshots/tVsut-T12.png | Bin .../screenshots/tvsV2t1.png | Bin ...10_Stream_Line_Flow_and_Heat_Convection_1.ipynb | 0 ...10_Stream_Line_Flow_and_Heat_Convection_2.ipynb | 0 ...10_Stream_Line_Flow_and_Heat_Convection_3.ipynb | 0 ...10_Stream_Line_Flow_and_Heat_Convection_4.ipynb | 0 ..._Calculations_for_Process_Heat_Conditions.ipynb | 0 ...alculations_for_Process_Heat_Conditions_1.ipynb | 0 ...alculations_for_Process_Heat_Conditions_2.ipynb | 0 ...alculations_for_Process_Heat_Conditions_3.ipynb | 0 ...r_12_Condensation_of_Single_Vapours_____1.ipynb | 0 ...r_12_Condensation_of_Single_Vapours_____2.ipynb | 0 ...r_12_Condensation_of_Single_Vapours_____3.ipynb | 0 ...r_12_Condensation_of_Single_Vapours_____4.ipynb | 0 .../Chapter_14_Evapouration_1.ipynb | 0 .../Chapter_14_Evapouration_2.ipynb | 0 .../Chapter_14_Evapouration_3.ipynb | 0 .../Chapter_14_Evapouration_4.ipynb | 0 ...__Vaporizers_Evapourators_and_Reboilers_1.ipynb | 0 ...__Vaporizers_Evapourators_and_Reboilers_2.ipynb | 0 ...__Vaporizers_Evapourators_and_Reboilers_3.ipynb | 0 ...__Vaporizers_Evapourators_and_Reboilers_4.ipynb | 0 .../Chapter_16_Extented_Surfaces_1.ipynb | 0 .../Chapter_16_Extented_Surfaces_2.ipynb | 0 .../Chapter_16_Extented_Surfaces_3.ipynb | 0 .../Chapter_16_Extented_Surfaces_4.ipynb | 0 ..._Direct_Contact_Transfer__Cooling_Tower_1.ipynb | 0 ..._Direct_Contact_Transfer__Cooling_Tower_2.ipynb | 0 ..._Direct_Contact_Transfer__Cooling_Tower_3.ipynb | 0 ..._Direct_Contact_Transfer__Cooling_Tower_4.ipynb | 0 ...r_18_Batch_and_Unsteady_State_Processes_1.ipynb | 0 ...r_18_Batch_and_Unsteady_State_Processes_2.ipynb | 0 ...r_18_Batch_and_Unsteady_State_Processes_3.ipynb | 0 ...r_18_Batch_and_Unsteady_State_Processes_4.ipynb | 0 .../Chapter_19_Furnace_Calculations_1.ipynb | 0 .../Chapter_19_Furnace_Calculations_2.ipynb | 0 .../Chapter_19_Furnace_Calculations_3.ipynb | 0 .../Chapter_19_Furnace_Calculations_4.ipynb | 0 .../Chapter_20_Additoinal_Applications_1.ipynb | 0 .../Chapter_20_Additoinal_Applications_2.ipynb | 0 .../Chapter_20_Additoinal_Applications_3.ipynb | 0 .../Chapter_20_Additoinal_Applications_4.ipynb | 0 .../Chapter_2_Conduction_1.ipynb | 0 .../Chapter_2_Conduction_2.ipynb | 0 .../Chapter_2_Conduction_3.ipynb | 0 .../Chapter_2_Conduction_4.ipynb | 0 .../Chapter_4_Radiation_1.ipynb | 0 .../Chapter_4_Radiation_2.ipynb | 0 .../Chapter_4_Radiation_3.ipynb | 0 .../Chapter_4_Radiation_4.ipynb | 0 .../Chapter_5_Temperature_1.ipynb | 0 .../Chapter_5_Temperature_2.ipynb | 0 .../Chapter_5_Temperature_3.ipynb | 0 .../Chapter_5_Temperature_4.ipynb | 0 ...er_6_Counterflow_Double_Pipe_Exchangers_1.ipynb | 0 ...er_6_Counterflow_Double_Pipe_Exchangers_2.ipynb | 0 ...er_6_Counterflow_Double_Pipe_Exchangers_3.ipynb | 0 ...er_6_Counterflow_Double_Pipe_Exchangers_4.ipynb | 0 ...-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb | 0 ...-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb | 0 ...-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb | 0 ...-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb | 0 ...rrangements_for_increased_heat_recovery_1.ipynb | 0 ...rrangements_for_increased_heat_recovery_2.ipynb | 0 ...rrangements_for_increased_heat_recovery_3.ipynb | 0 ...rrangements_for_increased_heat_recovery_4.ipynb | 0 .../Chapter_9_Gases_1.ipynb | 0 .../Chapter_9_Gases_2.ipynb | 0 .../Chapter_9_Gases_3.ipynb | 0 .../Chapter_9_Gases_4.ipynb | 0 Process_Heat_Transfer_by_D._Q._Kern/README.txt | 0 .../screenshots/CH15.png | Bin .../screenshots/CH15_1.png | Bin .../screenshots/CH15_2.png | Bin .../screenshots/CH15_3.png | Bin .../screenshots/CH16.png | Bin .../screenshots/CH16_1.png | Bin .../screenshots/CH16_2.png | Bin .../screenshots/CH16_3.png | Bin .../screenshots/CH17.png | Bin .../screenshots/CH17_1.png | Bin .../screenshots/CH17_2.png | Bin .../screenshots/CH17_3.png | Bin .../KamthaneChapter10.ipynb | 2940 -- .../KamthaneChapter11.ipynb | 446 - .../KamthaneChapter12.ipynb | 849 - .../KamthaneChapter13.ipynb | 2367 -- .../KamthaneChapter14.ipynb | 2311 - .../KamthaneChapter15.ipynb | 1480 - .../KamthaneChapter16.ipynb | 2160 - .../KamthaneChapter3.ipynb | 1060 - .../KamthaneChapter4.ipynb | 972 - .../KamthaneChapter5.ipynb | 2624 -- .../KamthaneChapter6.ipynb | 42312 ------------------- .../KamthaneChapter7.ipynb | 3644 -- .../KamthaneChapter8.ipynb | 2750 -- .../KamthaneChapter9.ipynb | 1999 - Programming_in_C_using_ANSI_C/README.txt | 10 - .../screenshots/screenshot1.png | Bin 124312 -> 0 bytes .../screenshots/screenshot1_1.png | Bin 124312 -> 0 bytes .../screenshots/screenshot2.png | Bin 133043 -> 0 bytes .../screenshots/screenshot2_1.png | Bin 133043 -> 0 bytes .../screenshots/screenshot3.png | Bin 125297 -> 0 bytes .../screenshots/screenshot3_1.png | Bin 125297 -> 0 bytes .../KamthaneChapter10.ipynb | 2940 ++ .../KamthaneChapter11.ipynb | 446 + .../KamthaneChapter12.ipynb | 849 + .../KamthaneChapter13.ipynb | 2367 ++ .../KamthaneChapter14.ipynb | 2311 + .../KamthaneChapter15.ipynb | 754 + .../KamthaneChapter16.ipynb | 2160 + .../KamthaneChapter3.ipynb | 1060 + .../KamthaneChapter4.ipynb | 972 + .../KamthaneChapter5.ipynb | 2624 ++ .../KamthaneChapter6.ipynb | 42312 +++++++++++++++++++ .../KamthaneChapter7.ipynb | 3644 ++ .../KamthaneChapter8.ipynb | 2750 ++ .../KamthaneChapter9.ipynb | 1999 + .../README.txt | 10 + .../screenshots/screenshot1.png | Bin 0 -> 124312 bytes .../screenshots/screenshot1_1.png | Bin 0 -> 124312 bytes .../screenshots/screenshot2.png | Bin 0 -> 133043 bytes .../screenshots/screenshot2_1.png | Bin 0 -> 133043 bytes .../screenshots/screenshot3.png | Bin 0 -> 125297 bytes .../screenshots/screenshot3_1.png | Bin 0 -> 125297 bytes .../Chapter10_1.ipynb | 0 .../Chapter11_1.ipynb | 0 .../Chapter12_1.ipynb | 0 .../Chapter13_1.ipynb | 0 .../Chapter14_1.ipynb | 0 .../Chapter15_1.ipynb | 0 .../Chapter16_1.ipynb | 0 .../Chapter17_1.ipynb | 0 .../Chapter18_1.ipynb | 0 .../Chapter19_1.ipynb | 0 .../Chapter1_1.ipynb | 0 .../Chapter20_1.ipynb | 0 .../Chapter21_1.ipynb | 0 .../Chapter22_1.ipynb | 0 .../Chapter23_1.ipynb | 0 .../Chapter24_1.ipynb | 0 .../Chapter25_1.ipynb | 0 .../Chapter2_1.ipynb | 0 .../Chapter3_1.ipynb | 0 .../Chapter4_1.ipynb | 0 .../Chapter5_1.ipynb | 0 .../Chapter6_1.ipynb | 0 .../Chapter7_1.ipynb | 0 .../Chapter8_1.ipynb | 0 .../Chapter9_1.ipynb | 0 .../README.txt | 0 .../screenshots/11q.png | Bin .../screenshots/22q.png | Bin .../screenshots/33q.png | Bin Quantum_mechanics_by_M.C.Jain/README.txt | 0 Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb | 0 Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb | 0 Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb | 0 Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb | 0 Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb | 0 Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb | 0 Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb | 0 .../screenshots/image1.png | Bin .../screenshots/image2.png | Bin .../screenshots/image3.png | Bin .../ch10.ipynb | 0 .../ch11.ipynb | 0 .../ch12.ipynb | 0 .../ch13.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../ch8.ipynb | 0 .../ch9.ipynb | 0 .../screenshots/S-parameters.png | Bin .../screenshots/load_imp.png | Bin .../screenshots/polarization_loss_factor.png | Bin .../Chapter10_2.ipynb | 160 + .../Chapter11_2.ipynb | 297 + .../Chapter12_2.ipynb | 199 + .../Chapter13_2.ipynb | 201 + .../Chapter14_2.ipynb | 233 + .../Chapter2_2.ipynb | 146 + .../Chapter3_2.ipynb | 341 + .../Chapter4_2.ipynb | 449 + .../Chapter5_2.ipynb | 259 + .../Chapter6_2.ipynb | 407 + .../Chapter7_2.ipynb | 253 + .../Chapter8_2.ipynb | 220 + .../Chapter9_2.ipynb | 414 + .../screenshots/Untitled1_1.png | Bin 0 -> 60134 bytes .../screenshots/Untitled1_2.png | Bin 0 -> 60134 bytes .../screenshots/Untitled4_1.png | Bin 0 -> 84418 bytes ...Chapter_10_Switched_Mode_Power_Supplies_1.ipynb | 0 ...ter_1_Circuit_Analysis_Port_Point_of_View.ipynb | 0 .../Chapter_2_Semiconductor_Diodes_1.ipynb | 0 ...teristics_of_Bipolar_Junction_Transistors.ipynb | 0 ...s_of_Field_Effect_Transistors_And_Triodes.ipynb | 0 .../Chapter_5_Transistor_Bias_Considerations.ipynb | 0 ..._Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb | 0 ...al_Midfrequency_Fet_And_Triode_Amplifiers.ipynb | 0 ...Chapter_8_Frequency_Effects_In_Amplifiers.ipynb | 0 .../Chapter_9_Operational_Amplifiers.ipynb | 0 .../README.txt | 0 .../screenshots/c1.png | Bin .../screenshots/c2.png | Bin .../screenshots/c3.png | Bin .../README.txt | 0 .../Ch_01.ipynb | 0 .../Ch_02.ipynb | 0 .../Ch_03.ipynb | 0 .../Ch_04.ipynb | 0 .../Ch_05.ipynb | 0 .../Ch_06.ipynb | 0 .../Ch_07.ipynb | 0 .../screenshots/3.png | Bin .../screenshots/6.png | Bin .../screenshots/6_2.png | Bin ...bstations_Equipment_and_Bus_bar_Layouts_1.ipynb | 0 ...bstations_Equipment_and_Bus_bar_Layouts_2.ipynb | 0 .../Chapter_18-b_Nutral_Grounding_1.ipynb | 0 .../Chapter_18-b_Nutral_Grounding_2.ipynb | 0 ...r_19_Introduction_to_Fault_Calculations_1.ipynb | 0 ...r_19_Introduction_to_Fault_Calculations_2.ipynb | 0 ...al_Faults_and_Current_Limiting_Reactors_1.ipynb | 0 ...al_Faults_and_Current_Limiting_Reactors_2.ipynb | 0 .../Chapter_21_Symmentrical_Components_1.ipynb | 0 .../Chapter_21_Symmentrical_Components_2.ipynb | 0 ...ntrical_Faults_on_an_Unloaded_Generator_1.ipynb | 0 ...ntrical_Faults_on_an_Unloaded_Generator_2.ipynb | 0 .../Chapter_23_Faults_on_Power_Systems_1.ipynb | 0 .../Chapter_23_Faults_on_Power_Systems_2.ipynb | 0 .../Chapter_32_Protection_of_Transformers_1.ipynb | 0 .../Chapter_32_Protection_of_Transformers_2.ipynb | 0 .../Chapter_33_Protection_of_Generators.ipynb | 0 .../Chapter_33_Protection_of_Generators_1.ipynb | 0 ...ent_Transformers_and_Their_Applications_1.ipynb | 0 ...ent_Transformers_and_Their_Applications_2.ipynb | 0 ...age_Transformers_and_Their_Applications_1.ipynb | 0 ...age_Transformers_and_Their_Applications_2.ipynb | 0 ..._Fault_Clearing_and_Switching_Phenomena_1.ipynb | 0 ..._Fault_Clearing_and_Switching_Phenomena_2.ipynb | 0 .../Chapter_44_Power_system_Stability_1.ipynb | 0 .../Chapter_44_Power_system_Stability_2.ipynb | 0 ..._Control,Load_sheeding_and_Static_relay_1.ipynb | 0 ..._Control,Load_sheeding_and_Static_relay_2.ipynb | 0 ...omputer_Aided_Protection_and_Automation_1.ipynb | 0 ...omputer_Aided_Protection_and_Automation_2.ipynb | 0 .../Chapter_57_Power_Flow_Calculations_1.ipynb | 0 .../Chapter_57_Power_Flow_Calculations_2.ipynb | 0 .../Chapter_58_Applications_of_Switchgear_1.ipynb | 0 .../Chapter_58_Applications_of_Switchgear_2.ipynb | 0 .../README.txt | 0 .../screenshots/Cha_22.png | Bin .../screenshots/Cha_22_1.png | Bin .../screenshots/Cha_33.png | Bin .../screenshots/Cha_33_1.png | Bin .../screenshots/Cha_44.png | Bin .../screenshots/Cha_44_1.png | Bin The_Spirit_of_C/Chapter1.ipynb | 198 - The_Spirit_of_C/Chapter10.ipynb | 1020 - The_Spirit_of_C/Chapter11.ipynb | 383 - The_Spirit_of_C/Chapter12.ipynb | 455 - The_Spirit_of_C/Chapter13.ipynb | 346 - The_Spirit_of_C/Chapter14.ipynb | 298 - The_Spirit_of_C/chapter2.ipynb | 119 - The_Spirit_of_C/chapter3.ipynb | 241 - The_Spirit_of_C/chapter4.ipynb | 148 - The_Spirit_of_C/chapter5.ipynb | 218 - The_Spirit_of_C/chapter6.ipynb | 494 - The_Spirit_of_C/chapter7.ipynb | 690 - The_Spirit_of_C/chapter8.ipynb | 567 - The_Spirit_of_C/chapter9.ipynb | 590 - The_Spirit_of_C/screenshots/Screenshot_1.png | Bin 414085 -> 0 bytes The_Spirit_of_C/screenshots/Screenshot_2.png | Bin 319968 -> 0 bytes The_Spirit_of_C/screenshots/Screenshot_3.png | Bin 211398 -> 0 bytes .../chapter1.ipynb | 198 + .../chapter10.ipynb | 1020 + .../chapter11.ipynb | 383 + .../chapter12.ipynb | 455 + .../chapter13.ipynb | 346 + .../chapter14.ipynb | 298 + .../chapter2.ipynb | 119 + .../chapter3.ipynb | 241 + .../chapter4.ipynb | 148 + .../chapter5.ipynb | 218 + .../chapter6.ipynb | 494 + .../chapter7.ipynb | 690 + .../chapter8.ipynb | 567 + .../chapter9.ipynb | 590 + .../screenshots/Screenshot_1.png | Bin 0 -> 414085 bytes .../screenshots/Screenshot_2.png | Bin 0 -> 319968 bytes .../screenshots/Screenshot_3.png | Bin 0 -> 211398 bytes Thermal_Engineering_by_K_K_Ramalingam/README.txt | 0 .../Chapter1.ipynb | 387 - .../Chapter10.ipynb | 628 - .../Chapter11.ipynb | 353 - .../Chapter12.ipynb | 262 - .../Chapter13.ipynb | 453 - .../Chapter14.ipynb | 393 - .../Chapter15.ipynb | 686 - .../Chapter16.ipynb | 378 - .../Chapter17.ipynb | 812 - .../Chapter2.ipynb | 588 - .../Chapter3.ipynb | 756 - .../Chapter4.ipynb | 720 - .../Chapter5.ipynb | 614 - .../Chapter6.ipynb | 315 - .../Chapter7.ipynb | 1049 - .../Chapter8.ipynb | 764 - .../Chapter9.ipynb | 540 - Thermodynamics_An_Engineering_Approach/README.txt | 10 - .../screenshots/Chapter_10_Ex_10-1_Screenshot.png | Bin 45520 -> 0 bytes .../Chapter_10_Ex_10-1_Screenshot_1.png | Bin 45520 -> 0 bytes .../screenshots/Chapter_14_Ex_14-2_Screenshot.png | Bin 44124 -> 0 bytes .../Chapter_14_Ex_14-2_Screenshot_1.png | Bin 44124 -> 0 bytes .../screenshots/Chapter_8_Ex_8-4_Screenshot.png | Bin 48121 -> 0 bytes .../screenshots/Chapter_8_Ex_8-4_Screenshot_1.png | Bin 48121 -> 0 bytes .../Chapter10_1.ipynb | 628 + .../Chapter11_1.ipynb | 353 + .../Chapter12_1.ipynb | 262 + .../Chapter13_1.ipynb | 453 + .../Chapter14_1.ipynb | 393 + .../Chapter15_1.ipynb | 686 + .../Chapter16_1.ipynb | 378 + .../Chapter17_1.ipynb | 812 + .../Chapter1_1.ipynb | 387 + .../Chapter2_1.ipynb | 588 + .../Chapter3_1.ipynb | 756 + .../Chapter4_1.ipynb | 720 + .../Chapter5_1.ipynb | 614 + .../Chapter6_1.ipynb | 315 + .../Chapter7_1.ipynb | 1049 + .../Chapter8_1.ipynb | 764 + .../Chapter9_1.ipynb | 540 + .../README.txt | 10 + .../screenshots/Chapter_10_Ex_10-1_Screenshot.png | Bin 0 -> 45520 bytes .../Chapter_10_Ex_10-1_Screenshot_1.png | Bin 0 -> 45520 bytes .../screenshots/Chapter_14_Ex_14-2_Screenshot.png | Bin 0 -> 44124 bytes .../Chapter_14_Ex_14-2_Screenshot_1.png | Bin 0 -> 44124 bytes .../screenshots/Chapter_8_Ex_8-4_Screenshot.png | Bin 0 -> 48121 bytes .../screenshots/Chapter_8_Ex_8-4_Screenshot_1.png | Bin 0 -> 48121 bytes Thermodynamics_Demystified/Chapter1.ipynb | 209 - Thermodynamics_Demystified/Chapter2.ipynb | 322 - Thermodynamics_Demystified/Chapter3.ipynb | 330 - Thermodynamics_Demystified/Chapter4.ipynb | 729 - Thermodynamics_Demystified/Chapter5.ipynb | 594 - Thermodynamics_Demystified/Chapter6.ipynb | 704 - Thermodynamics_Demystified/Chapter7.ipynb | 624 - Thermodynamics_Demystified/Chapter8.ipynb | 530 - Thermodynamics_Demystified/Chapter9.ipynb | 630 - Thermodynamics_Demystified/README.txt | 10 - .../screenshots/Carnotrefrigerator.png | Bin 50808 -> 0 bytes .../screenshots/carnotrefrigerator.png | Bin 28318 -> 0 bytes .../screenshots/carnotrefrigerator_1.png | Bin 28318 -> 0 bytes .../screenshots/carnotrefrigerator_2.png | Bin 28318 -> 0 bytes .../screenshots/internalenergy.png | Bin 95606 -> 0 bytes .../screenshots/internalenergy_1.png | Bin 95606 -> 0 bytes .../screenshots/internalenergy_2.png | Bin 95606 -> 0 bytes .../screenshots/internalenergy_3.png | Bin 95606 -> 0 bytes .../screenshots/quasiequilibrium.png | Bin 50808 -> 0 bytes .../screenshots/quasiequilibrium_1.png | Bin 50808 -> 0 bytes .../screenshots/quasiequilibrium_2.png | Bin 50808 -> 0 bytes .../screenshots/quasiequilibrium_3.png | Bin 41877 -> 0 bytes .../Chapter1_2.ipynb | 209 + .../Chapter2_2.ipynb | 322 + .../Chapter3_2.ipynb | 330 + .../Chapter4_2.ipynb | 719 + .../Chapter5_2.ipynb | 586 + .../Chapter6_2.ipynb | 695 + .../Chapter7_2.ipynb | 616 + .../Chapter8_2.ipynb | 530 + .../Chapter9_2.ipynb | 630 + .../README.txt | 10 + .../screenshots/Carnotrefrigerator.png | Bin 0 -> 50808 bytes .../screenshots/carnotrefrigerator.png | Bin 0 -> 28318 bytes .../screenshots/carnotrefrigerator_1.png | Bin 0 -> 28318 bytes .../screenshots/carnotrefrigerator_2.png | Bin 0 -> 28318 bytes .../screenshots/internalenergy.png | Bin 0 -> 95606 bytes .../screenshots/internalenergy_1.png | Bin 0 -> 95606 bytes .../screenshots/internalenergy_2.png | Bin 0 -> 95606 bytes .../screenshots/internalenergy_3.png | Bin 0 -> 95606 bytes .../screenshots/quasiequilibrium.png | Bin 0 -> 50808 bytes .../screenshots/quasiequilibrium_1.png | Bin 0 -> 50808 bytes .../screenshots/quasiequilibrium_2.png | Bin 0 -> 50808 bytes .../screenshots/quasiequilibrium_3.png | Bin 0 -> 41877 bytes .../README.txt | 10 + .../ch10_1.ipynb | 0 .../ch10_2.ipynb | 758 + .../ch11_1.ipynb | 0 .../ch11_2.ipynb | 1390 + .../ch1_1.ipynb | 0 .../ch1_2.ipynb | 394 + .../ch2_1.ipynb | 0 .../ch2_2.ipynb | 562 + .../ch3_1.ipynb | 0 .../ch3_2.ipynb | 901 + .../ch4_1.ipynb | 0 .../ch4_2.ipynb | 656 + .../ch5_1.ipynb | 0 .../ch5_2.ipynb | 1536 + .../ch6_1.ipynb | 0 .../ch6_2.ipynb | 1796 + .../ch7_1.ipynb | 0 .../ch7_2.ipynb | 1099 + .../ch8_1.ipynb | 0 .../ch8_2.ipynb | 697 + .../ch9_1.ipynb | 0 .../ch9_2.ipynb | 528 + .../screenshots/ch1.png | Bin .../screenshots/ch11.png | Bin .../screenshots/ch11_1.png | Bin 0 -> 98511 bytes .../screenshots/ch1_1.png | Bin 0 -> 63829 bytes .../screenshots/ch3.png | Bin .../screenshots/ch3_1.png | Bin 0 -> 82001 bytes ...apter_17_Homogeneous_Chemical_Reactions_1.ipynb | 0 .../Chapter_10_Absorption.ipynb | 0 ...1_Mass_Transfer_in_Biology_and_Medicine_1.ipynb | 0 .../Chapter_12_Diffrential_Distillation_1.ipynb | 0 .../Chapter_13_Staged_Distillation_1.ipynb | 0 .../Chapter_14_Extraction_1.ipynb | 0 .../Chapter_15_Adsorption_1.ipynb | 0 ...ns_and_Heterogeneous_Chemical_Reactions_1.ipynb | 0 .../Chapter_18_Membranes_1.ipynb | 0 ...ontrolled_Release_and_Related_Phenomena_1.ipynb | 0 .../Chapter_20_Heat_Transfer_1.ipynb | 0 ..._21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb | 0 ...er_3_Diffusion_in_Concentrated_Solution_1.ipynb | 0 .../Chapter_4_Dispersion_1.ipynb | 0 ...apter_5_Values_of_Diffusion_Coefficient_1.ipynb | 0 ...pter_6_Diffusion_of_Interacting_Species_1.ipynb | 0 ...hapter_8_Fundamentals_of_Mass_Transfer__1.ipynb | 0 .../Chapter_9__Theories_of_Mass_Transfer_1.ipynb | 0 .../README.txt | 0 .../screenshots/CH19.png | Bin .../screenshots/CH3.png | Bin .../screenshots/CH5.png | Bin .../ch1.ipynb | 0 .../ch10.ipynb | 0 .../ch11.ipynb | 0 .../ch12.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../ch8.ipynb | 0 .../ch9.ipynb | 0 .../screenshots/energy_stored3.png | Bin .../screenshots/magnetic_flux12.png | Bin .../screenshots/pitch_factor7.png | Bin .../README.txt | 0 .../chapter10_1.ipynb | 0 .../chapter10_2.ipynb | 0 .../chapter10_3.ipynb | 0 .../chapter11_1.ipynb | 0 .../chapter11_2.ipynb | 0 .../chapter11_3.ipynb | 0 .../chapter12_1.ipynb | 0 .../chapter12_2.ipynb | 0 .../chapter12_3.ipynb | 0 .../chapter13_1.ipynb | 0 .../chapter13_2.ipynb | 0 .../chapter13_3.ipynb | 0 .../chapter2_1.ipynb | 0 .../chapter2_2.ipynb | 0 .../chapter2_3.ipynb | 0 .../chapter3_1.ipynb | 0 .../chapter3_2.ipynb | 0 .../chapter3_3.ipynb | 0 .../chapter4_1.ipynb | 0 .../chapter4_2.ipynb | 0 .../chapter4_3.ipynb | 0 .../chapter5_1.ipynb | 0 .../chapter5_2.ipynb | 0 .../chapter5_3.ipynb | 0 .../chapter6_1.ipynb | 0 .../chapter6_2.ipynb | 0 .../chapter6_3.ipynb | 0 .../chapter7-Copy1.ipynb | 0 .../chapter7_1.ipynb | 0 .../chapter7_2.ipynb | 0 .../chapter8_1.ipynb | 0 .../chapter8_2.ipynb | 0 .../chapter8_3.ipynb | 0 .../chapter9_1.ipynb | 0 .../chapter9_2.ipynb | 0 .../chapter9_3.ipynb | 0 .../chapter_1_1.ipynb | 0 .../chapter_1_2.ipynb | 0 .../chapter_1_3.ipynb | 0 .../screenshots/Screenshot_(49).png | Bin .../screenshots/Screenshot_(49)_1.png | Bin .../screenshots/Screenshot_(49)_2.png | Bin .../screenshots/Screenshot_(50).png | Bin .../screenshots/Screenshot_(50)_1.png | Bin .../screenshots/Screenshot_(50)_2.png | Bin .../screenshots/Screenshot_(51).png | Bin .../screenshots/Screenshot_(51)_1.png | Bin .../screenshots/Screenshot_(51)_2.png | Bin ..._10_Solid_Solutions_and_Phase_Equilibrium.ipynb | 0 ...0_Solid_Solutions_and_Phase_Equilibrium_1.ipynb | 155 + ...Strengthening_and_Eutectic_Phase_Diagrams.ipynb | 0 ...rengthening_and_Eutectic_Phase_Diagrams_1.ipynb | 198 + ..._by_Phase_Transmission_and_Heat_Treatment.ipynb | 0 ...y_Phase_Transmission_and_Heat_Treatment_1.ipynb | 211 + ...13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb | 0 ..._Heat_treatment_of_Steels_and_Cast_Iron_1.ipynb | 103 + .../Chapter_14_Nonferrous_Alloy.ipynb | 0 .../Chapter_14_Nonferrous_Alloy_1.ipynb | 76 + .../Chapter_15_Ceramic_Materials.ipynb | 0 .../Chapter_15_Ceramic_Materials_1.ipynb | 111 + .../Chapter_16_Polymers.ipynb | 0 .../Chapter_16_Polymers_1.ipynb | 221 + ...posites_Teamwork_and_Synergy_in_Materials.ipynb | 0 ...sites_Teamwork_and_Synergy_in_Materials_1.ipynb | 374 + .../Chapter_2_Atomic_Structure_.ipynb | 0 .../Chapter_2_Atomic_Structure__1.ipynb | 131 + .../Chapter_3_Atomic_and_Ionic_Arrangements.ipynb | 0 ...Chapter_3_Atomic_and_Ionic_Arrangements_1.ipynb | 419 + ...fections_in_Atomic_and_Ionic_Arrangements.ipynb | 0 ...ctions_in_Atomic_and_Ionic_Arrangements_1.ipynb | 301 + ...pter_5_Atoms_and_Ion_Moments_in_Materials.ipynb | 0 ...er_5_Atoms_and_Ion_Moments_in_Materials_1.ipynb | 352 + .../Chapter_6_Mechanical_Properties_part_one.ipynb | 0 ...hapter_6_Mechanical_Properties_part_one_1.ipynb | 292 + .../Chapter_7_Mechanical_Properties_part_two.ipynb | 0 ...hapter_7_Mechanical_Properties_part_two_1.ipynb | 245 + ...Chapter_8_Strain_Hardening_and_Annealing_.ipynb | 0 ...apter_8_Strain_Hardening_and_Annealing__1.ipynb | 223 + .../Chapter_9_Principles_of_Solidification.ipynb | 0 .../Chapter_9_Principles_of_Solidification_1.ipynb | 191 + .../screenshots/cha_10.png | Bin .../screenshots/cha_10_1.png | Bin 0 -> 99655 bytes .../screenshots/cha_11.png | Bin .../screenshots/cha_11_1.png | Bin 0 -> 451054 bytes .../screenshots/cha_4.png | Bin .../screenshots/cha_4_1.png | Bin 0 -> 69365 bytes .../ch10.ipynb | 0 .../ch2.ipynb | 0 .../ch3.ipynb | 0 .../ch4.ipynb | 0 .../ch5.ipynb | 0 .../ch6.ipynb | 0 .../ch7.ipynb | 0 .../ch8.ipynb | 0 .../ch9.ipynb | 0 .../screenshots/same3_7.png | Bin .../screenshots/same7.png | Bin .../screenshots/shearAndBendingMoment7.png | Bin sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb | 0 sample_notebooks/AdityaAnand/Chapter_8.ipynb | 0 .../AdityaAnand/Chapter_8_-_Gravitation.ipynb | 0 .../AdityaAnand/Chapter_8_-_Gravitation_1.ipynb | 0 .../AdityaAnand/Chapter_8_-_Gravitation_2.ipynb | 0 sample_notebooks/AjayKumar Verma/chapter4.ipynb | 0 sample_notebooks/AmitRasmiya/ch5.ipynb | 0 sample_notebooks/AmitSexana/Ch_03.ipynb | 0 sample_notebooks/AnandMandali/ch5.ipynb | 0 sample_notebooks/Anshulkhare/Chapter9.ipynb | 388 + .../DeepTrambadia/Diode_Applications.ipynb | 0 sample_notebooks/DeepTrambadia/Untitled0.ipynb | 0 sample_notebooks/DeepTrambadia/sc201.ipynb | 0 sample_notebooks/DeepTrambadia/sc201_1.ipynb | 0 sample_notebooks/DeepTrambadia/sc223.ipynb | 0 sample_notebooks/DivyangGandhi/ch2.ipynb | 0 sample_notebooks/JigneshBhadani/ch5.ipynb | 0 .../Chapter_7_Wave_Guides.ipynb | 0 sample_notebooks/MohdAnwar/Chapter4_1.ipynb | 0 sample_notebooks/MohdIrfan/Chapter6.ipynb | 0 sample_notebooks/MohdIrfan/Chapter6_1.ipynb | 0 sample_notebooks/MohdRizwan/chapter04.ipynb | 0 sample_notebooks/ParthThakkar/ch6.ipynb | 0 sample_notebooks/PreetiRani/ch6.ipynb | 0 sample_notebooks/SINDHUARROJU/Chapter12.ipynb | 0 sample_notebooks/SPANDANAARROJU/Chapter11.ipynb | 0 sample_notebooks/SachinNaik/ch5.ipynb | 0 sample_notebooks/SaurabhBarot/ch2.ipynb | 0 sample_notebooks/SundeepKatta/Chapter2.ipynb | 0 sample_notebooks/SurajAhir/ch1.ipynb | 0 sample_notebooks/VishalSangani/ch1.ipynb | 0 .../keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb | 0 ...ter_2_Nuclear_Sturcture_and_Radioactivity.ipynb | 0 .../Chapter_7_Wave_Guides.ipynb | 0 sample_notebooks/sanketkhair/chapter4.ipynb | 0 2387 files changed, 315401 insertions(+), 256380 deletions(-) delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb delete mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png mode change 100644 => 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch8.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch9.ipynb create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch2.png create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch5.png create mode 100755 A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch7.png create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/README.txt delete mode 100755 Advance_Semiconductor_Devices/ChapterNo1.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo2.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo3.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo4.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo6.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo7.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo8.ipynb delete mode 100755 Advance_Semiconductor_Devices/ChapterNo9.ipynb delete mode 100755 Advance_Semiconductor_Devices/README.txt delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter1.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter3.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter7.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_1.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_1_1.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_1_2.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_2.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_2_1.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_2_2.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_3.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_3_1.png delete mode 100755 Advance_Semiconductor_Devices/screenshots/Chapter_3_2.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo2.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo3.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo4.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo6.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo7.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo8.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo9.ipynb create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/README.txt create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter1.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter3.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter7.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_1.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_2.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_1.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_2.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_1.png create mode 100755 Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_2.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter01.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter04.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter05.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter06.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter08.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter09.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter12.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter14.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter15.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter16.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter18.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter19.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter20.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter21.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter22.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter23.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter24.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter25.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter26.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/Chapter27.ipynb delete mode 100755 Aircraft_Structures_for_Engineering_Students/README.txt delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/1.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/2.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/3.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/a.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/b.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/c.png delete mode 100755 Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter01.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter04.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter05.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter06.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter08.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter09.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter12.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter14.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter15.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter16.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter18.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter19.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter20.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter21.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter22.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter23.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter24.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter25.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter26.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter27.ipynb create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/README.txt create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/a.png create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/b.png create mode 100755 Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/c.png mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png mode change 100644 => 100755 Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png mode change 100644 => 100755 Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png mode change 100644 => 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt delete mode 100755 Applied_Physics-II/chapter1.ipynb delete mode 100755 Applied_Physics-II/chapter2.ipynb delete mode 100755 Applied_Physics-II/chapter3.ipynb delete mode 100755 Applied_Physics-II/chapter4.ipynb delete mode 100755 Applied_Physics-II/chapter5.ipynb delete mode 100755 Applied_Physics-II/chapter6.ipynb delete mode 100755 Applied_Physics-II/screenshots/Ex2_2.png delete mode 100755 Applied_Physics-II/screenshots/Ex2_2_1.png delete mode 100755 Applied_Physics-II/screenshots/Ex2_2_2.png create mode 100755 Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb create mode 100755 Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb create mode 100755 Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb create mode 100755 Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb create mode 100755 Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb create mode 100755 Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb create mode 100755 Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2.png create mode 100755 Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_1.png create mode 100755 Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_2.png mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/README.txt mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png mode change 100644 => 100755 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png delete mode 100755 Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb delete mode 100755 Applied_Physics/Chapter_01_Bonding_in_Solids__1.ipynb delete mode 100755 Applied_Physics/Chapter_02_Crystal_Structure.ipynb delete mode 100755 Applied_Physics/Chapter_02_Crystal_Structure_1.ipynb delete mode 100755 Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb delete mode 100755 Applied_Physics/Chapter_03_Planes_in_Crystals_1.ipynb delete mode 100755 Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb delete mode 100755 Applied_Physics/Chapter_04_Crystal_Diffraction_1.ipynb delete mode 100755 Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb delete mode 100755 Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb delete mode 100755 Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb delete mode 100755 Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb delete mode 100755 Applied_Physics/Chapter_07_Dielectric_Properties.ipynb delete mode 100755 Applied_Physics/Chapter_07_Dielectric_Properties_1.ipynb delete mode 100755 Applied_Physics/Chapter_08_Magnetic_Properties.ipynb delete mode 100755 Applied_Physics/Chapter_08_Magnetic_Properties_1.ipynb delete mode 100755 Applied_Physics/Chapter_09_Semiconductors.ipynb delete mode 100755 Applied_Physics/Chapter_09_Semiconductors_1.ipynb delete mode 100755 Applied_Physics/Chapter_10_Superconductivity.ipynb delete mode 100755 Applied_Physics/Chapter_10_Superconductivity_1.ipynb delete mode 100755 Applied_Physics/Chapter_12Fibre_Optics.ipynb delete mode 100755 Applied_Physics/Chapter_12_Fibre_Optics.ipynb delete mode 100755 Applied_Physics/screenshots/Calculation_of__mean_free_path_of_electron_1.png delete mode 100755 Applied_Physics/screenshots/Calculation_of__potential_energy_1.png delete mode 100755 Applied_Physics/screenshots/Calculation_of_lattice_constant_1.png delete mode 100755 Applied_Physics_II/Chapter_1.ipynb delete mode 100755 Applied_Physics_II/Chapter_2.ipynb delete mode 100755 Applied_Physics_II/Chapter_3.ipynb delete mode 100755 Applied_Physics_II/Chapter_4.ipynb delete mode 100755 Applied_Physics_II/Chapter_5.ipynb delete mode 100755 Applied_Physics_II/Chapter_6.ipynb delete mode 100755 Applied_Physics_II/Chapter_7.ipynb delete mode 100755 Applied_Physics_II/README.txt delete mode 100755 Applied_Physics_II/screenshots/halfangular.png delete mode 100755 Applied_Physics_II/screenshots/probability.png delete mode 100755 Applied_Physics_II/screenshots/visiblerange.png create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb create mode 100755 Applied_Physics_II_by_H_J_Sawant/README.txt create mode 100755 Applied_Physics_II_by_H_J_Sawant/screenshots/halfangular.png create mode 100755 Applied_Physics_II_by_H_J_Sawant/screenshots/probability.png create mode 100755 Applied_Physics_II_by_H_J_Sawant/screenshots/visiblerange.png mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png mode change 100644 => 100755 Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png create mode 100755 Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_01_Bonding_in_Solids__1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_02_Crystal_Structure_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_03_Planes_in_Crystals_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_04_Crystal_Diffraction_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_07_Dielectric_Properties_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_08_Magnetic_Properties_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_09_Semiconductors_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_10_Superconductivity_1.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/Chapter_12_Fibre_Optics.ipynb create mode 100755 Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__mean_free_path_of_electron_1.png create mode 100755 Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__potential_energy_1.png create mode 100755 Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of_lattice_constant_1.png create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb create mode 100755 Applied_Physics_by_P_K_Palanisamy/screenshots/11.png create mode 100755 Applied_Physics_by_P_K_Palanisamy/screenshots/22.png create mode 100755 Applied_Physics_by_P_K_Palanisamy/screenshots/33.png create mode 100755 Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png create mode 100755 Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png create mode 100755 Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png mode change 100644 => 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png mode change 100644 => 100755 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png mode change 100644 => 100755 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb create mode 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png mode change 100644 => 100755 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter1.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter10.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter11.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter12.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter2.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter3.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter4.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter5.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter6.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter7.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter8.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/Chapter9.ipynb delete mode 100755 C_Programming_for_the_Absolute_Beginner/README.txt delete mode 100755 C_Programming_for_the_Absolute_Beginner/screenshots/1.png delete mode 100755 C_Programming_for_the_Absolute_Beginner/screenshots/1_1.png delete mode 100755 C_Programming_for_the_Absolute_Beginner/screenshots/2.png delete mode 100755 C_Programming_for_the_Absolute_Beginner/screenshots/2_1.png delete mode 100755 C_Programming_for_the_Absolute_Beginner/screenshots/3.png delete mode 100755 C_Programming_for_the_Absolute_Beginner/screenshots/3_1.png create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter10_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter11_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter12_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter5_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter6_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter7_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter8_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter9_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_1.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_2.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_3.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_4.ipynb create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/README.txt create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1.png create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1_1.png create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2.png create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2_1.png create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3.png create mode 100755 C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3_1.png delete mode 100755 Chemical_Engineering_Thermodynamics/README.txt delete mode 100755 Chemical_Engineering_Thermodynamics/ch1.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch10.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch11.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch12.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch13.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch14.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch2.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch3.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch4.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch5.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch6.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch7.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch8.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/ch9.ipynb delete mode 100755 Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/1.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/2.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/3.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/Plot_of_gE-RTx1x2_vs_x1.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/T-x-y_diagram.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/ch1.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/ch8.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/pic111.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/pic222.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/pic333.png delete mode 100755 Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic111.png create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic222.png create mode 100755 Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic333.png mode change 100644 => 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/README.txt create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch10.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch11.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch12.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch13.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch14.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch3.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch4.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch5.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch6.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch7.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch8.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch9.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_gE-RTx1x2_vs_x1.png create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/T-x-y_diagram.png create mode 100755 Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/pressureVSvol3.png mode change 100644 => 100755 Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt delete mode 100755 DC_Machines_and_Synchronous_Machines/README.txt delete mode 100755 DC_Machines_and_Synchronous_Machines/ch1.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/ch2.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/ch3.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/ch4.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/ch5.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/ch6.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/ch7.ipynb delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch1.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch1_1.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch1_2.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch4.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch4_1.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch4_2.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch7.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch7_1.png delete mode 100755 DC_Machines_and_Synchronous_Machines/screenshots/ch7_2.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/README.txt create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch1_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch2_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch3_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch4_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch5_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch6_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch7_2.ipynb create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_1.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_2.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_1.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_2.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_1.png create mode 100755 DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_2.png delete mode 100755 Digital_Communications/Chapter2.ipynb delete mode 100755 Digital_Communications/Chapter3.ipynb delete mode 100755 Digital_Communications/Chapter4.ipynb delete mode 100755 Digital_Communications/Chapter5.ipynb delete mode 100755 Digital_Communications/Chapter6.ipynb delete mode 100755 Digital_Communications/Chapter7.ipynb delete mode 100755 Digital_Communications/Chapter8.ipynb delete mode 100755 Digital_Communications/Chapter9.ipynb delete mode 100755 Digital_Communications/ChapterNo2.ipynb delete mode 100755 Digital_Communications/ChapterNo3.ipynb delete mode 100755 Digital_Communications/ChapterNo4.ipynb delete mode 100755 Digital_Communications/ChapterNo5.ipynb delete mode 100755 Digital_Communications/ChapterNo6.ipynb delete mode 100755 Digital_Communications/ChapterNo7.ipynb delete mode 100755 Digital_Communications/ChapterNo8.ipynb delete mode 100755 Digital_Communications/ChapterNo9.ipynb delete mode 100755 Digital_Communications/README.txt delete mode 100755 Digital_Communications/screenshots/Chapter1.png delete mode 100755 Digital_Communications/screenshots/chapter2.png delete mode 100755 Digital_Communications/screenshots/chapter2_1.png delete mode 100755 Digital_Communications/screenshots/chapter2_2.png delete mode 100755 Digital_Communications/screenshots/chapter2_3.png delete mode 100755 Digital_Communications/screenshots/chapter3.png delete mode 100755 Digital_Communications/screenshots/chapter3_1.png delete mode 100755 Digital_Communications/screenshots/chapter3_2.png delete mode 100755 Digital_Communications/screenshots/chapter3_3.png delete mode 100755 Digital_Communications/screenshots/chapter4.png delete mode 100755 Digital_Communications/screenshots/chapter4_1.png delete mode 100755 Digital_Communications/screenshots/chapter4_2.png delete mode 100755 Digital_Communications/screenshots/chapter4_3.png delete mode 100755 Digital_Communications/screenshots/chapter6.png delete mode 100755 Digital_Communications/screenshots/chapter7.png create mode 100755 Digital_Communications_by_S._Sharma/Chapter2.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter3.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter4.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter5.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter6.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter7.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter8.ipynb create mode 100755 Digital_Communications_by_S._Sharma/Chapter9.ipynb create mode 100755 Digital_Communications_by_S._Sharma/README.txt create mode 100755 Digital_Communications_by_S._Sharma/screenshots/Chapter1.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter2.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter2_1.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter2_2.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter2_3.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter3.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter3_1.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter3_2.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter3_3.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter4.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter4_1.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter4_2.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter4_3.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter6.png create mode 100755 Digital_Communications_by_S._Sharma/screenshots/chapter7.png create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png mode change 100644 => 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png mode change 100644 => 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png delete mode 100755 ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter10-checkpoint.ipynb delete mode 100755 ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter3-checkpoint.ipynb delete mode 100755 ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter5-checkpoint.ipynb delete mode 100755 ELECTRIC_MACHINERY/README.txt delete mode 100755 ELECTRIC_MACHINERY/chapter1.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter10.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter11.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter2.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter3.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter4.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter5.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter6.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter7.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter8.ipynb delete mode 100755 ELECTRIC_MACHINERY/chapter9.ipynb delete mode 100755 ELECTRIC_MACHINERY/screenshots/capture1.png delete mode 100755 ELECTRIC_MACHINERY/screenshots/capture2.png delete mode 100755 ELECTRIC_MACHINERY/screenshots/capture3.png create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter10-checkpoint.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter3-checkpoint.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter5-checkpoint.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/README.txt create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter1.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter10.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter11.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter2.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter3.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter4.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter5.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter6.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter7.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter9.ipynb create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture1.png create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture2.png create mode 100755 ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture3.png mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png mode change 100644 => 100755 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png mode change 100644 => 100755 Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png mode change 100644 => 100755 Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png mode change 100644 => 100755 Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png create mode 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png mode change 100644 => 100755 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG mode change 100644 => 100755 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/screenshots/1.png mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/screenshots/2.png mode change 100644 => 100755 Electronic_Devices_by_K._C._Nandi/screenshots/5.png mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png mode change 100644 => 100755 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png mode change 100644 => 100755 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png mode change 100644 => 100755 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png mode change 100644 => 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png delete mode 100755 Engineering_Economics/Chapter1.ipynb delete mode 100755 Engineering_Economics/Chapter10.ipynb delete mode 100755 Engineering_Economics/Chapter11.ipynb delete mode 100755 Engineering_Economics/Chapter12.ipynb delete mode 100755 Engineering_Economics/Chapter13.ipynb delete mode 100755 Engineering_Economics/Chapter16.ipynb delete mode 100755 Engineering_Economics/Chapter2.ipynb delete mode 100755 Engineering_Economics/Chapter3.ipynb delete mode 100755 Engineering_Economics/Chapter4.ipynb delete mode 100755 Engineering_Economics/Chapter5.ipynb delete mode 100755 Engineering_Economics/Chapter6.ipynb delete mode 100755 Engineering_Economics/Chapter7.ipynb delete mode 100755 Engineering_Economics/Chapter8.ipynb delete mode 100755 Engineering_Economics/Chapter9.ipynb delete mode 100755 Engineering_Economics/README.txt delete mode 100755 Engineering_Economics/screenshots/Depriciation_and_Book_value.png delete mode 100755 Engineering_Economics/screenshots/Economic_order_and_Time.png delete mode 100755 Engineering_Economics/screenshots/Expected_Saving.png delete mode 100755 Engineering_Economics/screenshots/Present_Worth.png delete mode 100755 Engineering_Economics/screenshots/future_sum.png delete mode 100755 Engineering_Economics/screenshots/maturity_value.png create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter13_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter16_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter1_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter6_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter7_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/Chapter9_1.ipynb create mode 100755 Engineering_Economics_by_R_Panneerselvam/README.txt create mode 100755 Engineering_Economics_by_R_Panneerselvam/screenshots/Depriciation_and_Book_value.png create mode 100755 Engineering_Economics_by_R_Panneerselvam/screenshots/Economic_order_and_Time.png create mode 100755 Engineering_Economics_by_R_Panneerselvam/screenshots/Expected_Saving.png create mode 100755 Engineering_Economics_by_R_Panneerselvam/screenshots/Present_Worth.png create mode 100755 Engineering_Economics_by_R_Panneerselvam/screenshots/future_sum.png create mode 100755 Engineering_Economics_by_R_Panneerselvam/screenshots/maturity_value.png mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png mode change 100644 => 100755 Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/README.txt mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/screenshots/11.png mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/screenshots/22.png mode change 100644 => 100755 Engineering_Physics_by_G._Vijayakumari/screenshots/33.png mode change 100644 => 100755 Engineering_Physics_by_P.K.Palanisamy/README.txt mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png mode change 100644 => 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/README.txt mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png mode change 100644 => 100755 Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png create mode 100755 Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb delete mode 100755 Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb.bkup mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png mode change 100644 => 100755 Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png delete mode 100755 Fluid_Mechanics/Chapter_1.ipynb delete mode 100755 Fluid_Mechanics/Chapter_10.ipynb delete mode 100755 Fluid_Mechanics/Chapter_11.ipynb delete mode 100755 Fluid_Mechanics/Chapter_12.ipynb delete mode 100755 Fluid_Mechanics/Chapter_13.ipynb delete mode 100755 Fluid_Mechanics/Chapter_14.ipynb delete mode 100755 Fluid_Mechanics/Chapter_15.ipynb delete mode 100755 Fluid_Mechanics/Chapter_16.ipynb delete mode 100755 Fluid_Mechanics/Chapter_17.ipynb delete mode 100755 Fluid_Mechanics/Chapter_2.ipynb delete mode 100755 Fluid_Mechanics/Chapter_20.ipynb delete mode 100755 Fluid_Mechanics/Chapter_22.ipynb delete mode 100755 Fluid_Mechanics/Chapter_23.ipynb delete mode 100755 Fluid_Mechanics/Chapter_24.ipynb delete mode 100755 Fluid_Mechanics/Chapter_25.ipynb delete mode 100755 Fluid_Mechanics/Chapter_3.ipynb delete mode 100755 Fluid_Mechanics/Chapter_4.ipynb delete mode 100755 Fluid_Mechanics/Chapter_5.ipynb delete mode 100755 Fluid_Mechanics/Chapter_6.ipynb delete mode 100755 Fluid_Mechanics/Chapter_7.ipynb delete mode 100755 Fluid_Mechanics/Chapter_8.ipynb delete mode 100755 Fluid_Mechanics/Chapter_9.ipynb delete mode 100755 Fluid_Mechanics/README.txt delete mode 100755 Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png delete mode 100755 Fluid_Mechanics/screenshots/ch11.png delete mode 100755 Fluid_Mechanics/screenshots/ch3.png delete mode 100755 Fluid_Mechanics/screenshots/ch5.png delete mode 100755 Fluid_Mechanics/screenshots/incresepressure.png delete mode 100755 Fluid_Mechanics/screenshots/plot1.png delete mode 100755 Fluid_Mechanics/screenshots/plot2.png delete mode 100755 Fluid_Mechanics/screenshots/veldistrtn.png delete mode 100755 Fluid_Mechanics/screenshots/veldistrtn_1.png mode change 100644 => 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch11.png create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch3.png create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch5.png create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot1.png create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot2.png create mode 100755 Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot3.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_3.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_4.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb create mode 100755 Fluid_Mechanics_by_John_F_Douglas/README.txt create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/incresepressure.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn.png create mode 100755 Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn_1.png mode change 100644 => 100755 Fluid_Power_With_Applications_by_A._Esposito/README.txt delete mode 100755 Fluid_mechanics/Chapter_10.ipynb delete mode 100755 Fluid_mechanics/Chapter_11.ipynb delete mode 100755 Fluid_mechanics/Chapter_2.ipynb delete mode 100755 Fluid_mechanics/Chapter_3.ipynb delete mode 100755 Fluid_mechanics/Chapter_4.ipynb delete mode 100755 Fluid_mechanics/Chapter_5.ipynb delete mode 100755 Fluid_mechanics/Chapter_6.ipynb delete mode 100755 Fluid_mechanics/Chapter_7.ipynb delete mode 100755 Fluid_mechanics/Chapter_8.ipynb delete mode 100755 Fluid_mechanics/Chapter_9.ipynb delete mode 100755 Fluid_mechanics/README.txt delete mode 100755 Fluid_mechanics/screenshots/chap2.png delete mode 100755 Fluid_mechanics/screenshots/chap3.png delete mode 100755 Fluid_mechanics/screenshots/chap4.png create mode 100755 Fluid_mechanics_by_Pao/Chapter_10.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_11.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_2.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_3.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_4.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_5.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_6.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_7.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_8.ipynb create mode 100755 Fluid_mechanics_by_Pao/Chapter_9.ipynb create mode 100755 Fluid_mechanics_by_Pao/README.txt create mode 100755 Fluid_mechanics_by_Pao/screenshots/chap2.png create mode 100755 Fluid_mechanics_by_Pao/screenshots/chap3.png create mode 100755 Fluid_mechanics_by_Pao/screenshots/chap4.png delete mode 100755 Fluidization_Engineering/README.txt delete mode 100755 Fluidization_Engineering/ch10.ipynb delete mode 100755 Fluidization_Engineering/ch11.ipynb delete mode 100755 Fluidization_Engineering/ch12.ipynb delete mode 100755 Fluidization_Engineering/ch13.ipynb delete mode 100755 Fluidization_Engineering/ch14.ipynb delete mode 100755 Fluidization_Engineering/ch15.ipynb delete mode 100755 Fluidization_Engineering/ch16.ipynb delete mode 100755 Fluidization_Engineering/ch17.ipynb delete mode 100755 Fluidization_Engineering/ch18.ipynb delete mode 100755 Fluidization_Engineering/ch3.ipynb delete mode 100755 Fluidization_Engineering/ch4.ipynb delete mode 100755 Fluidization_Engineering/ch5.ipynb delete mode 100755 Fluidization_Engineering/ch6.ipynb delete mode 100755 Fluidization_Engineering/ch7.ipynb delete mode 100755 Fluidization_Engineering/ch8.ipynb delete mode 100755 Fluidization_Engineering/ch9.ipynb delete mode 100755 Fluidization_Engineering/screenshots/plotkbckbedb.png delete mode 100755 Fluidization_Engineering/screenshots/relationnubedrep.png delete mode 100755 Fluidization_Engineering/screenshots/relationshebdrep.png create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/README.txt create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch10.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch11.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch12.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch13.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch14.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch15.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch16.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch17.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch18.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch3.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch4.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch5.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch6.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch7.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch8.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch9.ipynb create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/plotkbckbedb.png create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/relationnubedrep.png create mode 100755 Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/relationshebdrep.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter01.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter02.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter03.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter04.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter05.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter06.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter07.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter08.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter10.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter11.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter12.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter13.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter14.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter15.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter16.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter17.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter18.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter19.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter21.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/Chapter22.ipynb delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/README.txt delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Calculation.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_1.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_2.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_3.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_1.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_2.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_3.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_4.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Standard_Deviation.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi_1.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers.png delete mode 100755 Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers_with_A.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter01.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter02.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter03.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter04.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter05.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter06.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter07.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter08.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter09.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter10.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter11.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter12.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter13.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter14.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter15.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter16.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter17.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter18.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter19.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter20.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter21.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter22.ipynb create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/README.txt create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Calculation.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_1.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_2.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_3.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_1.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_2.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_3.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_4.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Standard_Deviation.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi_1.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers.png create mode 100755 Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers_with_A.png delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter10.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter11.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter12.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter13.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter14.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter15.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter16.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter17.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter2.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter3.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter4.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter5.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter7.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter8.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter9.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/README.txt delete mode 100755 Fundamentals_Of_Thermodynamics/chapter10.ipynb delete mode 100755 Fundamentals_Of_Thermodynamics/screenshots/heat_transfer_6.png delete mode 100755 Fundamentals_Of_Thermodynamics/screenshots/reversible_work_6.png delete mode 100755 Fundamentals_Of_Thermodynamics/screenshots/velocity_6.png create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter10_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter11_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter12_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter13_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter14_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter15_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter16_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter17_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter2_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter3_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter4_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter5_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter6_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter7_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter8_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter9_6.ipynb create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/README.txt create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/heat_transfer_6.png create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/reversible_work_6.png create mode 100755 Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/velocity_6.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png create mode 100755 How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png mode change 100644 => 100755 Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png mode change 100644 => 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png mode change 100644 => 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png mode change 100644 => 100755 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png mode change 100644 => 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png mode change 100644 => 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png mode change 100644 => 100755 Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png delete mode 100755 Magnifying_C/Chapter_10.ipynb delete mode 100755 Magnifying_C/Chapter_11.ipynb delete mode 100755 Magnifying_C/Chapter_12.ipynb delete mode 100755 Magnifying_C/Chapter_2.ipynb delete mode 100755 Magnifying_C/Chapter_3.ipynb delete mode 100755 Magnifying_C/Chapter_4.ipynb delete mode 100755 Magnifying_C/Chapter_5.ipynb delete mode 100755 Magnifying_C/Chapter_6.ipynb delete mode 100755 Magnifying_C/Chapter_7.ipynb delete mode 100755 Magnifying_C/Chapter_8.ipynb delete mode 100755 Magnifying_C/Chapter_9.ipynb delete mode 100755 Magnifying_C/README.txt delete mode 100755 Magnifying_C/screenshots/chapter_10.png delete mode 100755 Magnifying_C/screenshots/chapter_2.png delete mode 100755 Magnifying_C/screenshots/chapter_6.png delete mode 100755 Magnifying_C/screenshots/ss_1.png delete mode 100755 Magnifying_C/screenshots/ss_2.png delete mode 100755 Magnifying_C/screenshots/ss_3.png create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_6_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb create mode 100755 Magnifying_C_by_Arpita_Goyal/README.txt create mode 100755 Magnifying_C_by_Arpita_Goyal/screenshots/chapter_10.png create mode 100755 Magnifying_C_by_Arpita_Goyal/screenshots/chapter_2.png create mode 100755 Magnifying_C_by_Arpita_Goyal/screenshots/chapter_6.png create mode 100755 Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png create mode 100755 Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png create mode 100755 Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png mode change 100644 => 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png mode change 100644 => 100755 Oscillations_and_Waves_by_S._Prakash/README.txt delete mode 100755 Power_Electronics/README.txt delete mode 100755 Power_Electronics/chapter10.ipynb delete mode 100755 Power_Electronics/chapter11.ipynb delete mode 100755 Power_Electronics/chapter12.ipynb delete mode 100755 Power_Electronics/chapter13.ipynb delete mode 100755 Power_Electronics/chapter14.ipynb delete mode 100755 Power_Electronics/chapter2.ipynb delete mode 100755 Power_Electronics/chapter3.ipynb delete mode 100755 Power_Electronics/chapter4.ipynb delete mode 100755 Power_Electronics/chapter5.ipynb delete mode 100755 Power_Electronics/chapter6.ipynb delete mode 100755 Power_Electronics/chapter7.ipynb delete mode 100755 Power_Electronics/chapter8.ipynb delete mode 100755 Power_Electronics/chapter9.ipynb delete mode 100755 Power_Electronics/screenshots/Capture.png delete mode 100755 Power_Electronics/screenshots/Capture1.png delete mode 100755 Power_Electronics/screenshots/Capture2.png delete mode 100755 Power_Electronics/screenshots/Chapter2.png delete mode 100755 Power_Electronics/screenshots/Chapter2_1.png delete mode 100755 Power_Electronics/screenshots/Chapter2_2.png delete mode 100755 Power_Electronics/screenshots/Chapter2_3.png delete mode 100755 Power_Electronics/screenshots/Chapter2_4.png delete mode 100755 Power_Electronics/screenshots/Chapter3.png delete mode 100755 Power_Electronics/screenshots/Chapter3_1.png delete mode 100755 Power_Electronics/screenshots/Chapter3_2.png delete mode 100755 Power_Electronics/screenshots/Chapter3_3.png delete mode 100755 Power_Electronics/screenshots/Chapter3_4.png delete mode 100755 Power_Electronics/screenshots/Chapter4.png delete mode 100755 Power_Electronics/screenshots/Chapter4_1.png delete mode 100755 Power_Electronics/screenshots/Chapter4_2.png delete mode 100755 Power_Electronics/screenshots/Chapter4_3.png delete mode 100755 Power_Electronics/screenshots/Chapter4_4.png delete mode 100755 Power_Electronics/screenshots/ex1_2.PNG delete mode 100755 Power_Electronics/screenshots/ex1_2_1.PNG delete mode 100755 Power_Electronics/screenshots/ex1_9.PNG delete mode 100755 Power_Electronics/screenshots/ex1_9_1.PNG delete mode 100755 Power_Electronics/screenshots/ex9_6.PNG delete mode 100755 Power_Electronics/screenshots/ex9_6_1.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/README.txt create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture1.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture2.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_1.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_2.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_3.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_4.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_1.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_2.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_3.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_4.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_1.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_2.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_3.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_4.png create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2_1.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9_1.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6_1.PNG create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter10.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter11.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter12.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter13.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter14.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter2.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter3.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter4.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter5.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter6.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter7.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter8.ipynb create mode 100755 Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter9.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb create mode 100755 Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png create mode 100755 Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png create mode 100755 Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter1.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter10.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter11.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter12.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter13.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter14.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter16.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter17.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter19.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter22.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter3.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter4.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter5.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter6.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter7.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter8.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter9.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/chapter_2.ipynb delete mode 100755 Principles_Of_Electronic_Communication_Systems/screenshots/image_1.png delete mode 100755 Principles_Of_Electronic_Communication_Systems/screenshots/image_2.png delete mode 100755 Principles_Of_Electronic_Communication_Systems/screenshots/image_3.png create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter1_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_1.png create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_2.png create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_3.png create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter10.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter11.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter12.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter13.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter14.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter16.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter17.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter19.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter22.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter3.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter4.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter5.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter6.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter7.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter8.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter9.ipynb create mode 100755 Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter01.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter01_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter01_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter02.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter02_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter02_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter03.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter03_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter03_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter04.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter04_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter04_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter05.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter05_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter05_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter06.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter06_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter06_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter07.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter07_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter07_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter08.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter08_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter08_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter09.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter09_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter09_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter10.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter10_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter10_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter11.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter11_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter11_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter12.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter12_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter12_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter13.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter13_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter13_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter14.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter14_1.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/Chapter14_2.ipynb delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex1.2.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex13.1.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex14.2.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png delete mode 100755 Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter01_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter02_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter03_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter04_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter05_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter06_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter07_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter08_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter09_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter10_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter11_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter12_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter13_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter14_2.ipynb create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex1.2.png create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png create mode 100755 Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex14.2.png mode change 100644 => 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png mode change 100644 => 100755 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/README.txt mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png mode change 100644 => 100755 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter16.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter3.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter4.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter5.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter6.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter7.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter8.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter9.ipynb delete mode 100755 Programming_in_C_using_ANSI_C/README.txt delete mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot1.png delete mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot1_1.png delete mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot2.png delete mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot2_1.png delete mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot3.png delete mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot3_1.png create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter10.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter11.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter12.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter13.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter14.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter15.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter16.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter3.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter4.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter5.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter6.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter7.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter8.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter9.ipynb create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/README.txt create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot1.png create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot1_1.png create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot2.png create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot2_1.png create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot3.png create mode 100755 Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot3_1.png mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9_1.ipynb mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/README.txt mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/11q.png mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/22q.png mode change 100644 => 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/33q.png mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/README.txt mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/screenshots/image1.png mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/screenshots/image2.png mode change 100644 => 100755 Quantum_mechanics_by_M.C.Jain/screenshots/image3.png mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch10.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch11.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch12.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch13.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch2.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch3.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch4.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch5.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png mode change 100644 => 100755 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter10_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter11_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter12_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter13_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter14_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter2_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter3_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter4_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter5_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter6_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter7_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter8_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter9_2.ipynb create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_1.png create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_2.png create mode 100755 SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled4_1.png mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png mode change 100644 => 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png mode change 100644 => 100755 Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_07.ipynb mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/3.png mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6.png mode change 100644 => 100755 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6_2.png mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png mode change 100644 => 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png delete mode 100755 The_Spirit_of_C/Chapter1.ipynb delete mode 100755 The_Spirit_of_C/Chapter10.ipynb delete mode 100755 The_Spirit_of_C/Chapter11.ipynb delete mode 100755 The_Spirit_of_C/Chapter12.ipynb delete mode 100755 The_Spirit_of_C/Chapter13.ipynb delete mode 100755 The_Spirit_of_C/Chapter14.ipynb delete mode 100755 The_Spirit_of_C/chapter2.ipynb delete mode 100755 The_Spirit_of_C/chapter3.ipynb delete mode 100755 The_Spirit_of_C/chapter4.ipynb delete mode 100755 The_Spirit_of_C/chapter5.ipynb delete mode 100755 The_Spirit_of_C/chapter6.ipynb delete mode 100755 The_Spirit_of_C/chapter7.ipynb delete mode 100755 The_Spirit_of_C/chapter8.ipynb delete mode 100755 The_Spirit_of_C/chapter9.ipynb delete mode 100755 The_Spirit_of_C/screenshots/Screenshot_1.png delete mode 100755 The_Spirit_of_C/screenshots/Screenshot_2.png delete mode 100755 The_Spirit_of_C/screenshots/Screenshot_3.png create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter1.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter10.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter11.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter12.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter13.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter14.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter2.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter3.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter4.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter5.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter6.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter7.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter8.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter9.ipynb create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_1.png create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_2.png create mode 100755 The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_3.png mode change 100644 => 100755 Thermal_Engineering_by_K_K_Ramalingam/README.txt delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter1.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter10.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter11.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter12.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter13.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter14.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter15.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter16.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter17.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter2.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter3.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter4.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter5.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter6.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter7.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter8.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/Chapter9.ipynb delete mode 100755 Thermodynamics_An_Engineering_Approach/README.txt delete mode 100755 Thermodynamics_An_Engineering_Approach/screenshots/Chapter_10_Ex_10-1_Screenshot.png delete mode 100755 Thermodynamics_An_Engineering_Approach/screenshots/Chapter_10_Ex_10-1_Screenshot_1.png delete mode 100755 Thermodynamics_An_Engineering_Approach/screenshots/Chapter_14_Ex_14-2_Screenshot.png delete mode 100755 Thermodynamics_An_Engineering_Approach/screenshots/Chapter_14_Ex_14-2_Screenshot_1.png delete mode 100755 Thermodynamics_An_Engineering_Approach/screenshots/Chapter_8_Ex_8-4_Screenshot.png delete mode 100755 Thermodynamics_An_Engineering_Approach/screenshots/Chapter_8_Ex_8-4_Screenshot_1.png create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter10_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter11_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter12_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter13_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter14_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter15_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter16_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter17_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter1_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter2_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter3_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter4_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter5_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter6_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter7_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter8_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter9_1.ipynb create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/README.txt create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_10_Ex_10-1_Screenshot.png create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_10_Ex_10-1_Screenshot_1.png create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_14_Ex_14-2_Screenshot.png create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_14_Ex_14-2_Screenshot_1.png create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_8_Ex_8-4_Screenshot.png create mode 100755 Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_8_Ex_8-4_Screenshot_1.png delete mode 100755 Thermodynamics_Demystified/Chapter1.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter2.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter3.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter4.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter5.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter6.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter7.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter8.ipynb delete mode 100755 Thermodynamics_Demystified/Chapter9.ipynb delete mode 100755 Thermodynamics_Demystified/README.txt delete mode 100755 Thermodynamics_Demystified/screenshots/Carnotrefrigerator.png delete mode 100755 Thermodynamics_Demystified/screenshots/carnotrefrigerator.png delete mode 100755 Thermodynamics_Demystified/screenshots/carnotrefrigerator_1.png delete mode 100755 Thermodynamics_Demystified/screenshots/carnotrefrigerator_2.png delete mode 100755 Thermodynamics_Demystified/screenshots/internalenergy.png delete mode 100755 Thermodynamics_Demystified/screenshots/internalenergy_1.png delete mode 100755 Thermodynamics_Demystified/screenshots/internalenergy_2.png delete mode 100755 Thermodynamics_Demystified/screenshots/internalenergy_3.png delete mode 100755 Thermodynamics_Demystified/screenshots/quasiequilibrium.png delete mode 100755 Thermodynamics_Demystified/screenshots/quasiequilibrium_1.png delete mode 100755 Thermodynamics_Demystified/screenshots/quasiequilibrium_2.png delete mode 100755 Thermodynamics_Demystified/screenshots/quasiequilibrium_3.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter1_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter2_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter3_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter4_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter5_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter6_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter7_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter8_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/Chapter9_2.ipynb create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/README.txt create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/Carnotrefrigerator.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator_1.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator_2.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_1.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_2.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_3.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_1.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_2.png create mode 100755 Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_3.png create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/README.txt mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_2.ipynb mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11_1.png create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1_1.png mode change 100644 => 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3_1.png mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png mode change 100644 => 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch4.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch5.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch6.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch7.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch8.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch9.ipynb mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/energy_stored3.png mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/magnetic_flux12.png mode change 100644 => 100755 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/pitch_factor7.png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/README.txt mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png mode change 100644 => 100755 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure__1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing__1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification_1.ipynb mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10_1.png mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11_1.png mode change 100644 => 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png create mode 100755 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4_1.png mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch10.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch2.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch3.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch4.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch5.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch6.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch7.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch8.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch9.ipynb mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same3_7.png mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same7.png mode change 100644 => 100755 _Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/shearAndBendingMoment7.png mode change 100644 => 100755 sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb mode change 100644 => 100755 sample_notebooks/AdityaAnand/Chapter_8.ipynb mode change 100644 => 100755 sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb mode change 100644 => 100755 sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb mode change 100644 => 100755 sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb mode change 100644 => 100755 sample_notebooks/AjayKumar Verma/chapter4.ipynb mode change 100644 => 100755 sample_notebooks/AmitRasmiya/ch5.ipynb mode change 100644 => 100755 sample_notebooks/AmitSexana/Ch_03.ipynb mode change 100644 => 100755 sample_notebooks/AnandMandali/ch5.ipynb create mode 100755 sample_notebooks/Anshulkhare/Chapter9.ipynb mode change 100644 => 100755 sample_notebooks/DeepTrambadia/Diode_Applications.ipynb mode change 100644 => 100755 sample_notebooks/DeepTrambadia/Untitled0.ipynb mode change 100644 => 100755 sample_notebooks/DeepTrambadia/sc201.ipynb mode change 100644 => 100755 sample_notebooks/DeepTrambadia/sc201_1.ipynb mode change 100644 => 100755 sample_notebooks/DeepTrambadia/sc223.ipynb mode change 100644 => 100755 sample_notebooks/DivyangGandhi/ch2.ipynb mode change 100644 => 100755 sample_notebooks/JigneshBhadani/ch5.ipynb mode change 100644 => 100755 sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb mode change 100644 => 100755 sample_notebooks/MohdAnwar/Chapter4_1.ipynb mode change 100644 => 100755 sample_notebooks/MohdIrfan/Chapter6.ipynb mode change 100644 => 100755 sample_notebooks/MohdIrfan/Chapter6_1.ipynb mode change 100644 => 100755 sample_notebooks/MohdRizwan/chapter04.ipynb mode change 100644 => 100755 sample_notebooks/ParthThakkar/ch6.ipynb mode change 100644 => 100755 sample_notebooks/PreetiRani/ch6.ipynb mode change 100644 => 100755 sample_notebooks/SINDHUARROJU/Chapter12.ipynb mode change 100644 => 100755 sample_notebooks/SPANDANAARROJU/Chapter11.ipynb mode change 100644 => 100755 sample_notebooks/SachinNaik/ch5.ipynb mode change 100644 => 100755 sample_notebooks/SaurabhBarot/ch2.ipynb mode change 100644 => 100755 sample_notebooks/SundeepKatta/Chapter2.ipynb mode change 100644 => 100755 sample_notebooks/SurajAhir/ch1.ipynb mode change 100644 => 100755 sample_notebooks/VishalSangani/ch1.ipynb mode change 100644 => 100755 sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb mode change 100644 => 100755 sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb mode change 100644 => 100755 sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb mode change 100644 => 100755 sample_notebooks/sanketkhair/chapter4.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb deleted file mode 100755 index 1dc0f01d..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#Chapter 1(A):Bonding in Solids" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.1, Page number 1.14" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "-2*a/r**3 + 90*b/r**11\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "from sympy import *\n", - "import numpy as np\n", - "\n", - "#Variable declaration\n", - "n=1;\n", - "m=9;\n", - "a=Symbol('a')\n", - "b=Symbol('b')\n", - "r=Symbol('r')\n", - "\n", - "#Calculation\n", - "y=(-a/(r**n))+(b/(r**m));\n", - "y=diff(y,r);\n", - "y=diff(y,r);\n", - "\n", - "#Result\n", - "print y\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "young's modulus is 157 GPa\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "a=7.68*10**-29; \n", - "r0=2.5*10**-10; #radius(m)\n", - "\n", - "#Calculation\n", - "b=a*(r0**8)/9;\n", - "y=((-2*a*r0**8)+(90*b))/r0**11; \n", - "E=y/r0; #young's modulus(Pa)\n", - "\n", - "#Result\n", - "print \"young's modulus is\",int(E/10**9),\"GPa\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.2, Page number 1.15" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Effective charge = 0.72 *10**-29 coulomb\n" - ] - } - ], - "source": [ - "import math\n", - "\n", - "#variable declarations\n", - "d=((1.98)*10**-29)*1/3; #dipole moment\n", - "b=(0.92); #bond length\n", - "EC=d/(b*10**-10); #Effective charge\n", - "\n", - "#Result\n", - "print \"Effective charge =\",round((EC*10**19),2),\"*10**-29 coulomb\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.3, Page number 1.15" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cohesive energy = 668.9 *10**3 kJ/kmol\n", - "#Answer varies due to rounding of numbers\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "A=1.748 #Madelung Constant \n", - "N=6.02*10**26 #Avagadro Number\n", - "e=1.6*10**-19\n", - "n=9.5\n", - "r=(0.324*10**-9)*10**3\n", - "E=8.85*10**-12\n", - "#Calculations\n", - "U=((N*A*(e)**2)/(4*math.pi*E*r))*(1-1/n) #Cohesive energy\n", - "\n", - "#Result\n", - "print \"Cohesive energy =\",round(U/10**3,1),\"*10**3 kJ/kmol\"\n", - "print \"#Answer varies due to rounding of numbers\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.4, Page number 1.15" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Coulomb energy = -2.88 eV\n", - "Energy required = -1.88 eV\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "#variable declaration\n", - "I=5; #Ionisation energy\n", - "A=4; #Electron Affinity\n", - "e=(1.6*10**-19)\n", - "E=8.85*10**-12 #epsilon constant\n", - "r=0.5*10**-19 #dist between A and B\n", - "\n", - "#Calculations\n", - "C=-(e**2/(4*math.pi*E*r*e))/10**10 #Coulomb energy\n", - "E_c=I-A+C #Energy required\n", - "\n", - "#Result\n", - "print \"Coulomb energy =\",round(C,2),\"eV\"\n", - "print \"Energy required =\",round(E_c,2),\"eV\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.5, Page number 1.16" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Energy required= 1.49 eV\n", - "Distance of separation = 9.66 Angstrom\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "I=5.14; #Ionization energy\n", - "A=3.65; #Electron Affinity\n", - "e=(1.6*10**-19);\n", - "E=8.85*10**-12; \n", - "#calculations\n", - "E_c=I-A #Energy required\n", - "r=e**2/(4*math.pi*E*E_c*e) #Distance of separation\n", - "\n", - "#Result\n", - "print \"Energy required=\",E_c,\"eV\"\n", - "print \"Distance of separation =\",round(r/10**-10,2),\"Angstrom\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.6, Page number 1.16" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Energy required= 1.49 eV\n", - "Energy required = -6.1 eV\n", - "Bond Energy = 4.61 eV\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration \n", - "I=5.14; #Ionization energy\n", - "A=3.65; #Electron Affinity\n", - "e=(1.6*10**-19);\n", - "E=8.85*10**-12; \n", - "r=236*10**-12;\n", - "\n", - "#Calculations\n", - "E_c=I-A #Energy required\n", - "C=-(e**2/(4*math.pi*E*r*e)) #Potentential energy in eV\n", - "BE=-(E_c+C) #Bond Energy\n", - "#Result\n", - "print \"Energy required=\",E_c,\"eV\"\n", - "print \"Energy required =\",round(C,1),\"eV\"\n", - "print \"Bond Energy =\",round(BE,2),\"eV\"\n", - "\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb deleted file mode 100755 index 0df96e78..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#Crystal Structures" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.1, Page number 1.36" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a= 5.43 Angstorm\n", - "density = 6.88 kg/m**3\n", - "#Answer given in the textbook is wrong\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "d=2.351 #bond lenght\n", - "N=6.02*10**26 #Avagadro number\n", - "n=8 #number of atoms in unit cell\n", - "A=28.09 #Atomin mass of silicon\n", - "m=6.02*10**26 #1mole\n", - "\n", - "#Calculations\n", - "a=(4*d)/math.sqrt(3)\n", - "p=(n*A)/((a*10**-10)*m) #density\n", - "\n", - "#Result\n", - "print \"a=\",round(a,2),\"Angstorm\"\n", - "print \"density =\",round(p*10**16,2),\"kg/m**3\"\n", - "print\"#Answer given in the textbook is wrong\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.2, Page number 1.36" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " radius of largest sphere is 0.154700538379252*r\n", - "maximum radius of sphere is 0.414213562373095*r\n" - ] - } - ], - "source": [ - " import math\n", - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration\n", - "r=Symbol('r')\n", - "\n", - "#Calculation\n", - "a1=4*r/math.sqrt(3);\n", - "R1=(a1/2)-r; #radius of largest sphere\n", - "a2=4*r/math.sqrt(2);\n", - "R2=(a2/2)-r; #maximum radius of sphere\n", - "\n", - "#Result\n", - "print \"radius of largest sphere is\",R1\n", - "print \"maximum radius of sphere is\",R2 \n", - " " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.3, Page number 1.37" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a1= 2.905 Angstrom\n", - "Unit cell volume =a1**3 = 24.521 *10**-30 m**3\n", - "Volume occupied by one atom = 12.26 *10**-30 m**3\n", - "a2= 3.654 Angstorm\n", - "Unit cell volume =a2**3 = 48.8 *10**-30 m**3\n", - "Volume occupied by one atom = 12.2 *10**-30 m**3\n", - "Volume Change in % = 0.493\n", - "Density Change in % = 0.5\n", - "Thus the increase of density or the decrease of volume is about 0.5%\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "r1=1.258 #Atomic radius of BCC\n", - "r2=1.292 #Atomic radius of FCC\n", - "\n", - "#calculations\n", - "a1=(4*r1)/math.sqrt(3) #in BCC\n", - "b1=((a1)**3)*10**-30 #Unit cell volume\n", - "v1=(b1)/2 #Volume occupied by one atom\n", - "a2=2*math.sqrt(2)*r2 #in FCC\n", - "b2=(a2)**3*10**-30 #Unit cell volume\n", - "v2=(b2)/4 #Volume occupied by one atom \n", - "v_c=((v1)-(v2))*100/(v1) #Volume Change in % \n", - "d_c=((v1)-(v2))*100/(v2) #Density Change in %\n", - "\n", - "#Results\n", - "print \"a1=\",round(a1,3),\"Angstrom\" \n", - "print \"Unit cell volume =a1**3 =\",round((b1)/10**-30,3),\"*10**-30 m**3\"\n", - "print \"Volume occupied by one atom =\",round(v1/10**-30,2),\"*10**-30 m**3\"\n", - "print \"a2=\",round(a2,3),\"Angstorm\"\n", - "print \"Unit cell volume =a2**3 =\",round((b2)/10**-30,3),\"*10**-30 m**3\"\n", - "print \"Volume occupied by one atom =\",round(v2/10**-30,2),\"*10**-30 m**3\"\n", - "print \"Volume Change in % =\",round(v_c,3)\n", - "print \"Density Change in % =\",round(d_c,2)\n", - "print \"Thus the increase of density or the decrease of volume is about 0.5%\"" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "##Example 1.4, Page number 1.38" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a= 0.563 *10**-9 metre\n", - "spacing between the nearest neighbouring ions = 0.2814 nm\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "n=4 \n", - "M=58.5 #Molecular wt. of NaCl\n", - "N=6.02*10**26 #Avagadro number\n", - "rho=2180 #density\n", - "\n", - "#Calculations\n", - "a=((n*M)/(N*rho))**(1/3) \n", - "s=a/2\n", - "\n", - "#Result\n", - "print \"a=\",round(a/10**-9,3),\"*10**-9 metre\"\n", - "print \"spacing between the nearest neighbouring ions =\",round(s/10**-9,4),\"nm\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 1.5, Page number 1.38" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "lattice constant, a= 0.36 nm\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "n=4 \n", - "A=63.55 #Atomic wt. of NaCl\n", - "N=6.02*10**26 #Avagadro number\n", - "rho=8930 #density\n", - "\n", - "#Calculations\n", - "a=((n*A)/(N*rho))**(1/3) #Lattice Constant\n", - "\n", - "#Result\n", - "print \"lattice constant, a=\",round(a*10**9,2),\"nm\"" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "##Example 1.6, Page number 1.39" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Density of iron = 8805.0 kg/m**-3\n" - ] - } - ], - "source": [ - "import math\n", - "\n", - "#variable declaration\n", - "r=0.123 #Atomic radius\n", - "n=4\n", - "A=55.8 #Atomic wt\n", - "a=2*math.sqrt(2) \n", - "N=6.02*10**26 #Avagadro number\n", - "\n", - "#Calculations\n", - "rho=(n*A)/((a*r*10**-9)**3*N)\n", - "\n", - "#Result\n", - "print \"Density of iron =\",round(rho),\"kg/m**-3\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb deleted file mode 100755 index c257bf8c..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb +++ /dev/null @@ -1,615 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#2: Crystal Planes and X-ray Diffraction" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.1, Page number 2.12" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "i)Number of atoms per unit area of (100)plane= 1/(4*R**2)\n", - "ii)Number of atoms per unit area of (110)plane= 2.82842712474619*R**2\n", - "iii)Number of atoms per unit area of (111)plane= 2.3094010767585*R**2\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "from sympy import *\n", - "#Variable declaration\n", - "R=Symbol('R')\n", - "a=2*R\n", - "\n", - "#Results\n", - "print\"i)Number of atoms per unit area of (100)plane=\",1/a**2\n", - "print\"ii)Number of atoms per unit area of (110)plane=\",1/math.sqrt(2)*a**2\n", - "print\"iii)Number of atoms per unit area of (111)plane=\",1/math.sqrt(3)*a**2" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.2, Page number 2.13" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "i)Surface area of the face ABCD = 13.0 *10**-14 mm**2\n", - "ii)Surface area of plane (110) = 1.09 *10**13 atoms/mm**2\n", - "iii)Surface area of pane(111)= 1.772 *10**13 atoms/mm**2\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "a=3.61*10**-7\n", - "BC=math.sqrt(2)/2\n", - "AD=(math.sqrt(6))/2\n", - "#Result\n", - "print\"i)Surface area of the face ABCD =\",round(a**2*10**14),\"*10**-14 mm**2\"\n", - "print\"ii)Surface area of plane (110) =\",round((2/(a*math.sqrt(2)*a)/10**13),2),\"*10**13 atoms/mm**2\"\n", - "print\"iii)Surface area of pane(111)=\",round(2/(BC*AD*a**2)*10**-13,3),\"*10**13 atoms/mm**2\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.3, Page number 2.14" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "d1 = 1.0\n", - "d2 = 0.707\n", - "d3 = 0.577\n", - "d1:d2:d3 = 1.0 : 0.707 : 0.577\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "h1=1\n", - "k1=0\n", - "l1=0\n", - "h2=1\n", - "k2=1\n", - "l2=0\n", - "h3=1\n", - "k3=1\n", - "l3=1\n", - "a=1\n", - "\n", - "#Calculations\n", - "d1=a/(math.sqrt(h1**2+k1**2+l1**2))\n", - "d2=a/(math.sqrt(h2**2+k2**2+l2**2))\n", - "d3=a/(math.sqrt(h3**2+k3**2+l3**2))\n", - "\n", - "#Result\n", - "print\"d1 =\",d1 \n", - "print\"d2 =\",round(d2,3)\n", - "print\"d3 =\",round(d3,3)\n", - "print\"d1:d2:d3 =\",d1,\":\",round(d2,3),\":\",round(d3,3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.4, Page number 2.15" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "d(220) = 159.1 pm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "h=2\n", - "k=2\n", - "l=0\n", - "a=450\n", - "\n", - "#Calculations\n", - "d=a/(math.sqrt(h**2+k**2+l**2))\n", - "\n", - "#Result\n", - "print\"d(220) =\",round(d,1),\"pm\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.5, Page number 2.15" - ] - }, - { - "cell_type": "code", - "execution_count": 49, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a = 3.615 Angstroms\n", - "d = 2.087 Angstroms\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "a=3.615\n", - "r=1.278\n", - "h=1\n", - "k=1\n", - "l=1\n", - "\n", - "#Calculations\n", - "a=(4*r)/math.sqrt(2)\n", - "d=a/(math.sqrt(h**2+k**2+l**2))\n", - "\n", - "#Result\n", - "print\"a =\",round(a,3),\"Angstroms\"\n", - "print\"d =\",round(d,3),\"Angstroms\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.7, Page number 2.15" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "d = 1.45 *10**-10 m\n", - "a = 4.1 *10**-10 m\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "n=1\n", - "lamda=1.54\n", - "theta=32*math.pi/180\n", - "h=2\n", - "k=2\n", - "l=0\n", - "\n", - "#Calculations\n", - "d=(n*lamda*10**-10)/(2*math.sin(theta)) #derived from 2dsin(theta)=n*l\n", - "a=d*(math.sqrt(h**2+k**2+l**2))\n", - "\n", - "#Results\n", - "print\"d =\",round(d*10**10,2),\"*10**-10 m\"\n", - "print\"a =\",round(a*10**10,1),\"*10**-10 m\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.8, Page number 2.16" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "i. d/n = 2.582 Angstroms\n", - "ii. d/n = 1.824 Angstroms\n", - "iii.d/n = 1.289 Angstroms\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "lamda=0.58\n", - "theta1=6.45*math.pi/180\n", - "theta2=9.15*math.pi/180\n", - "theta3=13*math.pi/180\n", - "\n", - "#Calculations\n", - "dbyn1=lamda/(2*(math.sin(theta1)))\n", - "dbyn2=lamda/(2*math.sin(theta2))\n", - "dbyn3=lamda/(2*math.sin(theta3))\n", - " \n", - "#Results\n", - "print\"i. d/n =\",round(dbyn1,3),\"Angstroms\"\n", - "print\"ii. d/n =\",round(dbyn2,3),\"Angstroms\"\n", - "print\"iii.d/n =\",round(dbyn3,3),\"Angstroms\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.9, Page number 2.16" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "n = 1.53\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "d=1.18\n", - "theta=90*math.pi/180\n", - "lamda=1.540\n", - "\n", - "#Calculations\n", - "n=(2*d*math.sin(theta))/lamda\n", - "\n", - "#Result\n", - "print\"n =\",round(n,2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.10, Page number 2.17" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a = 3.51 Angstorms\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "lamda=0.58\n", - "theta=9.5*math.pi/180\n", - "n=1\n", - "d=0.5 #d200=a/math.sqrt(2**2+0**2+0**2)=0.5a\n", - "#Calculations\n", - "a=n*lamda/(2*d*math.sin(theta)) #2*d*sin(theta)=n*lamda \n", - "\n", - "#Result\n", - "print\"a =\",round(a,2),\"Angstorms\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.11, Page number 2.17" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "sin(theta3) = 26 35.9387574495\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "lamda=0.842\n", - "n1=1\n", - "q=(8+(35/60))*(math.pi/180)\n", - "n2=3\n", - "d=1\n", - "#Calculations\n", - "#n*lamda=2*d*sin(theta)\n", - "#n1*0.842=2*d*sin(q)\n", - "#n3*0.842=2*d*sin(theta3)\n", - "#Dividing both the eauations, we get\n", - "#(n2*lamda)/(n1*lamda)=2*d*math.sin(theta3)/2*d*math.sin(q)\n", - "theta3=math.asin((((n2*lamda)/(n1*lamda))*(2*d*math.sin(q)))/(2*d))\n", - "d=theta3*180/math.pi;\n", - "a_d=int(d);\n", - "a_m=(d-int(d))*60\n", - "\n", - "#Result\n", - "print\"sin(theta3) =\",a_d,a_m\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.12, Page number 2.18" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "d = 2.22 Angstorms\n", - "sqrt(h**2+k**2+l**2) = 1.424\n", - "Therefore, h**2+k**2+l**2 =sqrt(2)\n", - "h =1, k=1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "a=3.16\n", - "lamda=1.54\n", - "n=1\n", - "theta=20.3*math.pi/180\n", - "\n", - "#Calculations\n", - "d=(n*lamda)/(2*math.sin(theta))\n", - "x=a/d #let math.sqrt(h**2+k**2+l**2)=x\n", - "\n", - "#Result\n", - "print\"d =\",round(d,2),\"Angstorms\"\n", - "print\"sqrt(h**2+k**2+l**2) =\",round(x,3)\n", - "print\"Therefore, h**2+k**2+l**2 =sqrt(2)\"\n", - "print\"h =1, k=1\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.13, Page number 2.18" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a = 4.09 Angstroms\n", - "d = 2.36 Angstroms\n", - "lamda = 1.552 Angstroms\n", - "E = 8.0 *10**3 eV\n" - ] - } - ], - "source": [ - "## importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "n=4\n", - "A=107.87\n", - "rho=10500\n", - "N=6.02*10**26\n", - "h=1;\n", - "k=1;\n", - "l=1;\n", - "H=6.625*10**-34\n", - "e=1.6*10**-19\n", - "theta=(19+(12/60))*math.pi/180\n", - "C=3*10**8\n", - "#Calculations\n", - "a=((n*A)/(rho*N))**(1/3)*10**10\n", - "d=a/math.sqrt(h**2+k**2+l**2)\n", - "lamda=2*d*math.sin(theta)\n", - "E=(H*C)/(lamda*10**-10*e)\n", - "\n", - "#Result\n", - "print\"a =\",round(a,2),\"Angstroms\"\n", - "print\"d =\",round(d,2),\"Angstroms\"\n", - "print\"lamda =\",round(lamda,3),\"Angstroms\"\n", - "print\"E =\",round(E/10**3),\"*10**3 eV\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 2.14, Page number 2.19" - ] - }, - { - "cell_type": "code", - "execution_count": 72, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "d = 2.64 Angstorms\n", - "sin(theta)= 0.288\n", - "X = 7.554 cm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "a=4.57\n", - "h=1\n", - "k=1\n", - "l=1\n", - "lamda=1.52\n", - "twotheta=33.5*math.pi/180\n", - "r=5 #radius\n", - "#Calculations\n", - "d=a/(h**2+k**2+l**2)**(1/2)\n", - "sintheta=lamda/(2*d)\n", - "X=r/math.tan(twotheta)\n", - "\n", - "#Result\n", - "print\"d =\",round(d,2),\"Angstorms\"\n", - "print\"sin(theta)=\",round(sintheta,3)\n", - "print\"X =\",round(X,3),\"cm\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb deleted file mode 100755 index 6553b45b..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb +++ /dev/null @@ -1,215 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#3(A):Defects In Solids " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.1, Page number 3.17" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "at 0K, The number of vacancies per kilomole of copper is 0\n", - "at 300K, The number of vacancies per kilomole of copper is 7.577 *10**5\n", - "at 900K, The numb ber of vacancies per kilomole of copper is 6.502 *10**19\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "N=6.023*10**26\n", - "deltaHv=120\n", - "B=1.38*10**-23\n", - "k=6.023*10**23\n", - "\n", - "#Calculations\n", - "n0=0 # 0 in denominator\n", - "n300=N*math.exp(-deltaHv*10**3/(k*B*300)) #The number of vacancies per kilomole of copper\n", - "n900=N*math.exp(-(deltaHv*10**3)/(k*B*900))\n", - "\n", - "#Results\n", - "print\"at 0K, The number of vacancies per kilomole of copper is\",n0\n", - "print\"at 300K, The number of vacancies per kilomole of copper is\",round(n300/10**5,3),\"*10**5\"\n", - "print\"at 900K, The numb ber of vacancies per kilomole of copper is\",round(n900/10**19,3),\"*10**19\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.2, Page number 3.16" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Fraction of vacancies at 1000 degrees C = 8.5 *10**-7\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration\n", - "F_500=1*10**-10\n", - "delta_Hv=Symbol('delta_Hv')\n", - "k=Symbol('k')\n", - "T1=500+273\n", - "T2=1000+273\n", - "\n", - "\n", - "#Calculations\n", - "lnx=math.log(F_500)*T1/T2;\n", - "x=math.exp(round(lnx,2))\n", - "\n", - "print\"Fraction of vacancies at 1000 degrees C =\",round(x*10**7,1),\"*10**-7\" " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.3, Page number 3.17" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Volume of unit cell of NaCl = 1.794 *10**-28 m**3\n", - "Total number of ion pairs 'N' =' 2.23 *10**28\n", - "The concentration of Schottky defects per m**3 at 300K = 6.42 *10**11\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "a=(2*2.82*10**-10)\n", - "delta_Hs=1.971*1.6*10**-19\n", - "k=1.38*10**-23\n", - "T=300\n", - "\n", - "#Calculations\n", - "V=a**3 #Volume of unit cell of NaCl\n", - "N=4/V #Total number of ion pairs\n", - "n=N*math.e**-(delta_Hs/(2*k*T)) \n", - "\n", - "#Result\n", - "print\"Volume of unit cell of NaCl =\",round(V*10**28,3),\"*10**-28 m**3\"\n", - "print\"Total number of ion pairs 'N' ='\",round(N/10**28,2),\"*10**28\"\n", - "print\"The concentration of Schottky defects per m**3 at 300K =\",round(n/10**11,2),\"*10**11\"\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.4, Page number 3.18" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The number that must be created on heating from 0 to 500K is n= 9.22 *10**12 per cm**3\n", - "As one step is 2 Angstorms, 5*10**7 vacancies are required for 1cm\n", - "The amount of climb down by the dislocation is 0.369 cm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "N=6.023*10**23\n", - "delta_Hv=1.6*10**-19\n", - "k=1.38*10**-23\n", - "T=500\n", - "mv=5.55; #molar volume\n", - "x=2*10**-8; #numbber of cm in 1 angstrom\n", - "\n", - "#Calculations\n", - "n=N*math.exp(-delta_Hv/(k*T))/mv\n", - "a=round(n/(5*10**7*10**6),4)*x;\n", - "\n", - "#Result\n", - "print\"The number that must be created on heating from 0 to 500K is n=\",round(n/10**12,2),\"*10**12 per cm**3\" #into cm**3\n", - "print\"As one step is 2 Angstorms, 5*10**7 vacancies are required for 1cm\"\n", - "print\"The amount of climb down by the dislocation is\",a*10**8,\"cm\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb deleted file mode 100755 index 5fa9129c..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb +++ /dev/null @@ -1,414 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#3(B):Principles of Quantum Mechanics" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.1, Page number 3.41" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Velocity = 1.38 *10**6 m/s\n", - "Wavelength = 0.00286 Angstorm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "KE=10 #Kinetic Energy of neutron in keV\n", - "m=1.675*10**-27\n", - "h=6.625*10**-34\n", - "#Calculations\n", - "KE=10**4*1.6*10**-19 #in joule\n", - "v=((2*KE)/m)**(1/2) #derived from KE=1/2*m*v**2\n", - "lamda=h/(m*v)\n", - "#Results\n", - "print\"Velocity =\",round(v/10**6,2),\"*10**6 m/s\"\n", - "print\"Wavelength =\",round(lamda*10**10,5),\"Angstorm\"\n", - " " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.2, Page number 3.41" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Momentum 2.4133\n", - "de Brolie wavelength = 2.73 *10**-11 m\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "E=2*1000*1.6*10**-19 #in joules\n", - "m=9.1*10**-31\n", - "h=6.6*10*10**-34\n", - "\n", - "#Calculations\n", - "p=math.sqrt(2*m*E)\n", - "lamda= h/p\n", - "\n", - "#Result\n", - "print\"Momentum\",round(p*10**23,4)\n", - "print\"de Brolie wavelength =\",round(lamda*10**10,2),\"*10**-11 m\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.3, Page number 3.41" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "wavelength = 1.807 Angstorm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "M=1.676*10**-27 #Mass of neutron\n", - "m=0.025\n", - "v=1.602*10**-19\n", - "h=6.62*10**-34\n", - "\n", - "#Calculations\n", - "mv=(2*m*v)**(1/2)\n", - "lamda=h/(mv*M**(1/2))\n", - "\n", - "#Result\n", - "print\"wavelength =\",round(lamda*10**10,3),\"Angstorm\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.4, Page number 3.42" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Wavelength = 0.1226 Angstorm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "V=10000\n", - "\n", - "#Calculation\n", - "lamda=12.26/math.sqrt(V)\n", - "\n", - "#Result\n", - "print\"Wavelength =\",lamda,\"Angstorm\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.5, Page number 3.42" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false, - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The permitted electron energies = 38.0 *n**2 eV\n", - "E1= 38.0 eV\n", - "E2= 151.0 eV\n", - "E3= 339.0 eV\n", - "#Answer varies due to rounding of numbers\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration\n", - "e=1.6*10**-19; #charge of electron(coulomb)\n", - "L=10**-10 #1Angstrom=10**-10 m\n", - "n1=1;\n", - "n2=2;\n", - "n3=3;\n", - "h=6.626*10**-34\n", - "m=9.1*10**-31\n", - "L=10**-10\n", - "\n", - "#Calculations\n", - "E1=(h**2)/(8*m*L**2*e)\n", - "E2=4*E1\n", - "E3=9*E1\n", - "#Result\n", - "print\"The permitted electron energies =\",round(E1),\"*n**2 eV\"\n", - "print\"E1=\",round(E1),\"eV\"\n", - "print\"E2=\",round(E2),\"eV\"\n", - "print\"E3=\",round(E3),\"eV\"\n", - "print\"#Answer varies due to rounding of numbers\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.6, Page number 3.42" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "si**2 delta(x)= 0.2\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "i=1*10**-10; #interval\n", - "L=10*10**-10; #width\n", - "\n", - "#Calculations\n", - "si2=2*i/L;\n", - "\n", - "#Result\n", - "print\"si**2 delta(x)=\",si2" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.7, Page number 3.43" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " E1 = 1.81 *10**-37 Joule\n", - "E2 = 3.62 *10**-37 Joule\n", - "E2-E1 = 1.81 *10**-37 J\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "nx=1\n", - "ny=1\n", - "nz=1\n", - "a=1\n", - "h=6.63*10**-34\n", - "m=9.1*10**-31\n", - "\n", - "#Calculations\n", - "E1=h**2*(nx**2+ny**2+nz**2)/(8*m*a**2)\n", - "E2=(h**2*6)/(8*m*a**2) #nx**2+ny**2+nz**2=6\n", - "diff=E2-E1\n", - "#Result\n", - "print\"E1 =\",round(E1*10**37,2),\"*10**-37 Joule\"\n", - "print\"E2 =\",round(E2*10**37,2),\"*10**-37 Joule\"\n", - "print\"E2-E1 =\",round(diff*10**37,2),\"*10**-37 J\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 3.8, Page number 3.43" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "E1 = 3.28 *10**-13 J\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "m=1.67*10**-27\n", - "a=10**-14\n", - "h=1.054*10**-34\n", - "\n", - "#Calculations\n", - "E1=(1*math.pi*h)**2/(2*m*a**2)\n", - "\n", - "#Result\n", - "print\"E1 =\",round(E1*10**13,2),\"*10**-13 J\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "#Example number 3.9, Page number 3.44" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a= 0.0158\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "from scipy.integrate import quad\n", - "#Variable declarations\n", - "k=1;\n", - "\n", - "#Calculations\n", - "def zintg(x):\n", - " return 2*k*math.exp(-2*k*x)\n", - "a=quad(zintg,2/k,3/k)[0]\n", - "\n", - "#Result\n", - "print \"a=\",round(a,4)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb deleted file mode 100755 index 84e4acb8..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb +++ /dev/null @@ -1,478 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#4: Electron Theory of Metals" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.1, Page number 4.28" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "energy difference is 1.81 *10**-37 J\n", - "3/2*k*T = E2 = 3.62 *10**-37 J\n", - "T = 1.75 *10**-14 K\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "m=9.1*10**-31; #mass(kg)\n", - "nx=ny=nz=1;\n", - "n=6;\n", - "a=1; #edge(m)\n", - "h=6.63*10**-34; #planck's constant\n", - "k=1.38\n", - "#Calculation\n", - "E1=h**2*(nx**2+ny**2+nz**2)/(8*m*a**2);\n", - "E2=h**2*n/(8*m*a**2);\n", - "E=E2-E1; #energy difference(J)\n", - "T=(2*E2*10**37)/(3*k*10**-23)\n", - "#Result\n", - "print \"energy difference is\",round(E*10**37,2),\"*10**-37 J\"\n", - "print \"3/2*k*T = E2 =\",round(E2*10**37,2),\"*10**-37 J\"\n", - "print \"T =\",round(T/10**23,2),\"*10**-14 K\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.2, Page number 4.28" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "temperature is 1261 K\n", - "answer varies due to rounding off errors\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "y=1/100; #percentage of probability\n", - "x=0.5*1.6*10**-19; #energy(J)\n", - "k=1.38*10**-23; #boltzmann constant\n", - "\n", - "#Calculation\n", - "xbykT=math.log((1/y)-1);\n", - "T=x/(k*xbykT); #temperature(K)\n", - "\n", - "#Result\n", - "print \"temperature is\",int(T),\"K\"\n", - "print \"answer varies due to rounding off errors\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.3, Page number 4.29" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "fermi energy is 3.2 eV\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "d=970; #density(kg/m**3)\n", - "Na=6.02*10**26; #avagadro number\n", - "w=23; #atomic weight\n", - "m=9.1*10**-31; #mass(kg)\n", - "h=6.62*10**-34; #planck's constant\n", - "\n", - "#Calculation\n", - "N=d*Na/w; #number of atoms/m**3\n", - "x=h**2/(8*m);\n", - "y=(3*N/math.pi)**(2/3);\n", - "EF=x*y; #fermi energy(J)\n", - "\n", - "#Result\n", - "print \"fermi energy is\",round(EF/(1.6*10**-19),1),\"eV\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.4, Page number 4.29" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "p(E) = 0.269\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "kT=1;\n", - "E_EF=1;\n", - "\n", - "#Calculations\n", - "p_E=1/(1+math.exp(E_EF/kT)) \n", - " \n", - "#Result \n", - "print \"p(E) =\",round(p_E,3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.5, Page number 4.29" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "N = 2.4 *10**26 states\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "from scipy.integrate import quad \n", - "\n", - "#Variable declarations\n", - "m=9.1*10**-31\n", - "h=6.626*10**-34\n", - "Ef=3.1\n", - "Ef1=Ef+0.02\n", - "e=1.6*10**-19\n", - "#Calculations\n", - "def zintg(E):\n", - " return math.pi*((8*m)**(3/2))*(E**(1/2)*e**(3/2))/(2*(h**3))\n", - "N=quad(zintg,Ef,Ef1)[0]\n", - "\n", - "#Result\n", - "print\"N =\",round(N*10**-26,1),\"*10**26 states\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.6, Page number 4.30" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "n = 8.5 *10**28 /m**3\n", - "The drift speed Vd = 36.6 *10**-5 m/s\n", - "The mean free collision time Tc = 2.087 *10**-14 seconds\n", - "Mean free path = 3.34 *10**-8 m(answer varies due to rounding off errors)\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "N=6.023*10**26 #Avagadro number\n", - "D=8960 #density \n", - "F_e=1 #no.of free electrons per atom \n", - "W=63.54 #Atomic weight\n", - "i=10\n", - "e=1.602*10**-19\n", - "m=9.1*10**-31\n", - "rho=2*10**-8\n", - "Cbar=1.6*10**6 #mean thermal velocity(m/s)\n", - "\n", - "#Calculations\n", - "n=(N*D*F_e)/W\n", - "A=math.pi*0.08**2*10**-4\n", - "Vd=i/(A*n*e) #Drift speed\n", - "Tc=m/(n*(e**2)*rho)\n", - "lamda=Tc*Cbar\n", - "\n", - "#Result\n", - "print\"n =\",round(n/10**28,1),\"*10**28 /m**3\"\n", - "print\"The drift speed Vd =\",round(Vd*10**5,1),\"*10**-5 m/s\"\n", - "print\"The mean free collision time Tc =\",round(Tc*10**14,3),\"*10**-14 seconds\"\n", - "print\"Mean free path =\",round(lamda*10**8,2),\"*10**-8 m\"\"(answer varies due to rounding off errors)\" \n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.7, Page number 4.30" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The mean free collision time = 4.8 *10**7 ohm**-1 m**-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "##Variable declaration\n", - "n=8.5*10**28\n", - "e=1.602*10**-19\n", - "t=2*10**-14\n", - "m=9.1*10**-31\n", - "\n", - "#Calculations\n", - "Tc=n*(e**2)*t/m\n", - "\n", - "#Result\n", - "print \"The mean free collision time =\",round(Tc/10**7,1),\"*10**7 ohm**-1 m**-1\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.8, Page number 4.31" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Relaxation time = 4.0 *10**-14 second\n", - "Mobility = 7.0 *10**-3 m**2/volt-s\n", - "Drift Velocity= 0.7 m/s\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration\n", - "e=1.6*10**-19\n", - "E=1 #(V/m)\n", - "rho=1.54*10**-8\n", - "n=5.8*10**28\n", - "\n", - "#Calculations\n", - "T=m/(rho*n*e**2)\n", - "Me=(e*T)/m\n", - "Vd=Me*E\n", - "\n", - "#Result \n", - "print\"Relaxation time =\",round(T*10**14),\"*10**-14 second\"\n", - "print\"Mobility =\",round(Me*10**3),\"*10**-3 m**2/volt-s\"\n", - "print\"Drift Velocity=\",round(Vd*100,1),\"m/s\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.9, Page number 4.31" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Temperature coefficient of resistivity,a = 5.7\n", - "rho_973 = 5.51 *10**-8 ohm-m\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "\n", - "##Variable declaration\n", - "rho_r=0\n", - "T=300\n", - "rho=1.7*10**-18\n", - "\n", - "#Calculations \n", - "a=rho/T\n", - "rho_973=a*973\n", - "\n", - "#Results\n", - "print\"Temperature coefficient of resistivity,a =\",round(a*10**21,1)\n", - "print\"rho_973 =\",round(rho_973*10**18,2),\"*10**-8 ohm-m\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 4.10, Page number 4.31" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Increase in resistivity in copper = 0.54 *10**-8 ohm m\n", - "Total resistivity of copper alloy = 2.04 *10**-8 ohm m\n", - "The resistivity of alloy at 3K = 0.54 *10**-8 ohm m\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "\n", - "##Variable declaration\n", - "rho1=1.2*10**-8\n", - "p1=0.4\n", - "rho2=0.12*10**-8\n", - "p2=0.5\n", - "rho3=1.5*10**-8\n", - "#Calculations\n", - "R=(rho1*p1)+(rho2*p2)\n", - "R_c=R+rho3\n", - "\n", - "#Results\n", - "print\"Increase in resistivity in copper =\",round(R*10**8,2),\"*10**-8 ohm m\"\n", - "print\"Total resistivity of copper alloy =\",round(R_c*10**8,2),\"*10**-8 ohm m\"\n", - "print\"The resistivity of alloy at 3K =\",round(R*10**8,2),\"*10**-8 ohm m\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb deleted file mode 100755 index 28d3f8c6..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb +++ /dev/null @@ -1,212 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#5(A): Dielectric Properties" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.1, Page number 5.27" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "insulation resistance is 0.85 *10**18 ohm\n", - "answer varies due to rounding off errors\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "rho=5*10**16; #resistivity(ohm m)\n", - "l=5*10**-2; #thickness(m)\n", - "b=8*10**-2; #length(m)\n", - "w=3*10**-2; #width(m)\n", - "\n", - "#Calculation\n", - "A=b*w; #area(m**2)\n", - "Rv=rho*l/A; \n", - "X=l+b; #length(m)\n", - "Y=w; #perpendicular(m)\n", - "Rs=Rv*X/Y; \n", - "Ri=Rs*Rv/(Rs+Rv); #insulation resistance(ohm)\n", - "\n", - "#Result\n", - "print \"insulation resistance is\",round(Ri/10**18,2),\"*10**18 ohm\"\n", - "print \"answer varies due to rounding off errors\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.2, Page number 5.28" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "polarisability of He is 0.185 *10**-40 farad m**2\n", - "relative permittivity is 1.000056\n", - "answer varies due to rounding off errors\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "epsilon0=8.84*10**-12;\n", - "R=0.55*10**-10; #radius(m)\n", - "N=2.7*10**25; #number of atoms\n", - "\n", - "#Calculation\n", - "alpha_e=4*math.pi*epsilon0*R**3; #polarisability of He(farad m**2)\n", - "epsilonr=1+(N*alpha_e/epsilon0); #relative permittivity\n", - "\n", - "#Result\n", - "print \"polarisability of He is\",round(alpha_e*10**40,3),\"*10**-40 farad m**2\"\n", - "print \"relative permittivity is\",round(epsilonr,6)\n", - "print \"answer varies due to rounding off errors\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.3, Page number 5.28" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "field strength is 3.535 *10**7 V/m\n", - "total dipole moment is 33.4 *10**-12 Cm\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "A=360*10**-4; #area(m**2)\n", - "V=15; #voltage(V)\n", - "C=6*10**-6; #capacitance(farad)\n", - "epsilonr=8;\n", - "epsilon0=8.84*10**-12;\n", - "\n", - "#Calculation\n", - "E=V*C/(epsilon0*epsilonr*A); #field strength(V/m)\n", - "dm=epsilon0*(epsilonr-1)*V*A; #total dipole moment(Cm)\n", - "\n", - "#Result\n", - "print \"field strength is\",round(E/10**7,3),\"*10**7 V/m\"\n", - "print \"total dipole moment is\",round(dm*10**12,1),\"*10**-12 Cm\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.4, Page number 5.29" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "the complex polarizability is (3.50379335033-0.0600074383321j) *10**-40 F-m**2\n", - "answer cant be rouned off to 2 decimals as given in the textbook. Since it is a complex number and complex cant be converted to float\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "epsilonr=4.36; #dielectric constant\n", - "t=2.8*10**-2; #loss tangent(t)\n", - "N=4*10**28; #number of electrons\n", - "epsilon0=8.84*10**-12; \n", - "\n", - "#Calculation\n", - "epsilon_r = epsilonr*t;\n", - "epsilonstar = (complex(epsilonr,-epsilon_r));\n", - "alphastar = (epsilonstar-1)/(epsilonstar+2);\n", - "alpha_star = 3*epsilon0*alphastar/N; #complex polarizability(Fm**2)\n", - "\n", - "#Result\n", - "print \"the complex polarizability is\",alpha_star*10**40,\"*10**-40 F-m**2\"\n", - "print \"answer cant be rouned off to 2 decimals as given in the textbook. Since it is a complex number and complex cant be converted to float\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb deleted file mode 100755 index 0ada6386..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb +++ /dev/null @@ -1,288 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#5(B): Magnetic Properties" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.1, Page number 5.65" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "temperature rise is 8.43 K\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "El=10**-2*50; #energy loss(J)\n", - "H=El*60; #heat produced(J)\n", - "d=7.7*10**3; #iron rod(kg/m**3)\n", - "s=0.462*10**-3; #specific heat(J/kg K)\n", - "\n", - "#Calculation\n", - "theta=H/(d*s); #temperature rise(K)\n", - "\n", - "#Result\n", - "print \"temperature rise is\",round(theta,2),\"K\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.2, Page number 5.65" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "magnetic field at the centre is 14.0 weber/m**2\n", - "dipole moment is 9.0 *10**-24 ampere/m**2\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "e=1.6*10**-19; #charge(coulomb)\n", - "new=6.8*10**15; #frequency(revolutions per second)\n", - "mew0=4*math.pi*10**-7;\n", - "R=5.1*10**-11; #radius(m)\n", - "\n", - "#Calculation\n", - "i=round(e*new,4); #current(ampere)\n", - "B=mew0*i/(2*R); #magnetic field at the centre(weber/m**2)\n", - "A=math.pi*R**2;\n", - "d=i*A; #dipole moment(ampere/m**2)\n", - "\n", - "#Result\n", - "print \"magnetic field at the centre is\",round(B),\"weber/m**2\"\n", - "print \"dipole moment is\",round(d*10**24),\"*10**-24 ampere/m**2\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.3, Page number 5.65" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "intensity of magnetisation is 5.0 ampere/m\n", - "flux density in material is 1.257 weber/m**2\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "chi=0.5*10**-5; #magnetic susceptibility\n", - "H=10**6; #field strength(ampere/m)\n", - "mew0=4*math.pi*10**-7;\n", - "\n", - "#Calculation\n", - "I=chi*H; #intensity of magnetisation(ampere/m)\n", - "B=mew0*(I+H); #flux density in material(weber/m**2)\n", - "\n", - "#Result\n", - "print \"intensity of magnetisation is\",I,\"ampere/m\"\n", - "print \"flux density in material is\",round(B,3),\"weber/m**2\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.4, Page number 5.65" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "number of Bohr magnetons is 2.22 bohr magneon/atom\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "B=9.27*10**-24; #bohr magneton(ampere m**2)\n", - "a=2.86*10**-10; #edge(m)\n", - "Is=1.76*10**6; #saturation value of magnetisation(ampere/m)\n", - "\n", - "#Calculation\n", - "N=2/a**3;\n", - "mew_bar=Is/N; #number of Bohr magnetons(ampere m**2)\n", - "mew_bar=mew_bar/B; #number of Bohr magnetons(bohr magneon/atom)\n", - "\n", - "#Result\n", - "print \"number of Bohr magnetons is\",round(mew_bar,2),\"bohr magneon/atom\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.5, Page number 5.66" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "average magnetic moment is 2.79 *10**-3 bohr magneton/spin\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "mew0=4*math.pi*10**-7;\n", - "H=9.27*10**-24; #bohr magneton(ampere m**2)\n", - "beta=10**6; #field(ampere/m)\n", - "k=1.38*10**-23; #boltzmann constant\n", - "T=303; #temperature(K)\n", - "\n", - "#Calculation\n", - "mm=mew0*H*beta/(k*T); #average magnetic moment(bohr magneton/spin)\n", - "\n", - "#Result\n", - "print \"average magnetic moment is\",round(mm*10**3,2),\"*10**-3 bohr magneton/spin\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 5.6, Page number 5.66" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "hysteresis loss per cycle is 188.0 J/m**3\n", - "hysteresis loss per second is 9400.0 watt/m**3\n", - "power loss is 1.23 watt/kg\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "A=94; #area(m**2)\n", - "vy=0.1; #value of length(weber/m**2)\n", - "vx=20; #value of unit length\n", - "n=50; #number of magnetization cycles\n", - "d=7650; #density(kg/m**3)\n", - "\n", - "#Calculation\n", - "h=A*vy*vx; #hysteresis loss per cycle(J/m**3)\n", - "hs=h*n; #hysteresis loss per second(watt/m**3)\n", - "pl=hs/d; #power loss(watt/kg)\n", - "\n", - "#Result\n", - "print \"hysteresis loss per cycle is\",h,\"J/m**3\"\n", - "print \"hysteresis loss per second is\",hs,\"watt/m**3\"\n", - "print \"power loss is\",round(pl,2),\"watt/kg\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb deleted file mode 100755 index ad04957e..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb +++ /dev/null @@ -1,774 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#6(A): Semiconductors" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.1, Page number 6.21" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "number of electron hole pairs is 2.32 *10**16 per cubic metre\n", - "answer varies due to rounding off errors\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "ni1=2.5*10**19; #number of electron hole pairs\n", - "T1=300; #temperature(K)\n", - "Eg1=0.72*1.6*10**-19; #energy gap(J)\n", - "k=1.38*10**-23; #boltzmann constant\n", - "T2=310; #temperature(K)\n", - "Eg2=1.12*1.6*10**-19; #energy gap(J)\n", - "\n", - "#Calculation\n", - "x1=-Eg1/(2*k*T1);\n", - "y1=(T1**(3/2))*math.exp(x1);\n", - "x2=-Eg2/(2*k*T2);\n", - "y2=(T2**(3/2))*math.exp(x2);\n", - "ni=ni1*(y2/y1); #number of electron hole pairs\n", - "\n", - "#Result\n", - "print \"number of electron hole pairs is\",round(ni/10**16,2),\"*10**16 per cubic metre\"\n", - "print \"answer varies due to rounding off errors\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.2, Page number 6.22" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "intrinsic conductivity is 1.434 *10**4 ohm-1 m-1\n", - "intrinsic resistivity is 0.697 *10**-4 ohm m\n", - "answer varies due to rounding off errors\n", - "number of germanium atoms per m**3 is 4.5 *10**28\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "w=72.6; #atomic weight\n", - "d=5400; #density(kg/m**3)\n", - "Na=6.025*10**26; #avagadro number\n", - "mew_e=0.4; #mobility of electron(m**2/Vs)\n", - "mew_h=0.2; #mobility of holes(m**2/Vs)\n", - "e=1.6*10**-19;\n", - "m=9.108*10**-31; #mass(kg)\n", - "ni=2.1*10**19; #number of electron hole pairs\n", - "Eg=0.7; #band gap(eV)\n", - "k=1.38*10**-23; #boltzmann constant\n", - "h=6.625*10**-34; #plancks constant\n", - "T=300; #temperature(K)\n", - "\n", - "#Calculation\n", - "sigmab=ni*e*(mew_e+mew_h); #intrinsic conductivity(ohm-1 m-1)\n", - "rhob=1/sigmab; #resistivity(ohm m)\n", - "n=Na*d/w; #number of germanium atoms per m**3\n", - "p=n/10**5; #boron density\n", - "sigma=p*e*mew_h;\n", - "rho=1/sigma;\n", - "\n", - "#Result\n", - "print \"intrinsic conductivity is\",round(sigma/10**4,3),\"*10**4 ohm-1 m-1\"\n", - "print \"intrinsic resistivity is\",round(rho*10**4,3),\"*10**-4 ohm m\"\n", - "print \"answer varies due to rounding off errors\"\n", - "print \"number of germanium atoms per m**3 is\",round(n/10**28,1),\"*10**28\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.3, Page number 6.23" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "charge carrier density is 2 *10**22 per m**3\n", - "electron mobility is 0.035 m**2/Vs\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "e=1.6*10**-19;\n", - "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n", - "sigma=112; #conductivity(ohm-1 m-1)\n", - "\n", - "#Calculation\n", - "ne=3*math.pi/(8*RH*e); #charge carrier density(per m**3)\n", - "mew_e=sigma/(e*ne); #electron mobility(m**2/Vs)\n", - "\n", - "#Result\n", - "print \"charge carrier density is\",int(ne/10**22),\"*10**22 per m**3\"\n", - "print \"electron mobility is\",round(mew_e,3),\"m**2/Vs\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.4, Page number 6.24" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "intrinsic conductivity is 0.432 *10**-3 ohm-1 m-1 10.4\n", - "conductivity during donor impurity is 10.4 ohm-1 m-1\n", - "conductivity during acceptor impurity is 4 ohm-1 m-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "mew_e=0.13; #mobility of electron(m**2/Vs)\n", - "mew_h=0.05; #mobility of holes(m**2/Vs)\n", - "e=1.6*10**-19;\n", - "ni=1.5*10**16; #number of electron hole pairs\n", - "N=5*10**28;\n", - "\n", - "#Calculation\n", - "sigma1=ni*e*(mew_e+mew_h); #intrinsic conductivity(ohm-1 m-1)\n", - "ND=N/10**8;\n", - "n=ni**2/ND;\n", - "sigma2=ND*e*mew_e; #conductivity(ohm-1 m-1)\n", - "sigma3=ND*e*mew_h; #conductivity(ohm-1 m-1)\n", - "\n", - "#Result\n", - "print \"intrinsic conductivity is\",round(sigma1*10**3,3),\"*10**-3 ohm-1 m-1\",sigma2\n", - "print \"conductivity during donor impurity is\",sigma2,\"ohm-1 m-1\"\n", - "print \"conductivity during acceptor impurity is\",int(sigma3),\"ohm-1 m-1\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.5, Page number 6.24" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "conductivity is 4.97 mho m-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "e=1.6*10**-19;\n", - "Eg=0.72; #band gap(eV)\n", - "k=1.38*10**-23; #boltzmann constant\n", - "T1=293; #temperature(K)\n", - "T2=313; #temperature(K)\n", - "sigma1=2; #conductivity(mho m-1)\n", - "\n", - "#Calculation\n", - "x=(Eg*e/(2*k))*((1/T1)-(1/T2));\n", - "y=round(x/2.303,3);\n", - "z=round(math.log10(sigma1),3);\n", - "log_sigma2=y+z;\n", - "sigma2=10**log_sigma2; #conductivity(mho m-1)\n", - "\n", - "#Result\n", - "print \"conductivity is\",round(sigma2,2),\"mho m-1\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.6, Page number 6.25" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a)Concentration in N-type\n", - "n = 1.442 *10**24 m**-3\n", - "Hence p = 1.56 *10**8 m**-3\n", - "b)Concentration in P-type\n", - "p = 3.75 *10**24 m**-3\n", - "Hence n = 0.6 *10**8 m**-3\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "ni=1.5*10**16\n", - "mu_n=1300*10**-4\n", - "mu_p=500*10**-4\n", - "e=1.6*10**-19\n", - "sigma=3*10**4\n", - "\n", - "#Calculations\n", - "#Concentration in N-type\n", - "n1=sigma/(e*mu_n)\n", - "p1=ni**2/n1\n", - "#Concentration in P-type\n", - "p=sigma/(e*mu_p)\n", - "n2=(ni**2)/p\n", - "\n", - "#Result\n", - "print\"a)Concentration in N-type\"\n", - "print\"n =\",round(n1*10**-24,3),\"*10**24 m**-3\"\n", - "print\"Hence p =\",round(p1/10**8,2),\"*10**8 m**-3\"\n", - "print\"b)Concentration in P-type\"\n", - "print\"p =\",round(p/10**24,2),\"*10**24 m**-3\"\n", - "print\"Hence n =\",round(n2/10**8,1),\"*10**8 m**-3\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.7, Page number 6.26" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Jx = 1000.0 ampere/m**2\n", - "Ey = 0.183 V/m\n", - "Vy = 1.83 mV\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "i=10**-2\n", - "A=0.01*0.001\n", - "RH=3.66*10**-4\n", - "Bz=0.5\n", - "\n", - "#Calculations\n", - "Jx=i/A\n", - "Ey=RH*(Bz*Jx)\n", - "Vy=Ey*0.01\n", - "\n", - "#Result\n", - "print\"Jx =\",Jx,\"ampere/m**2\"\n", - "print\"Ey =\",round(Ey,3),\"V/m\"\n", - "print\"Vy =\",round(Vy*10**3,2),\"mV\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.8, Page number 6.26" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Position of fermi level = 0.5764 eV\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "Ev=0\n", - "Ec=1.12\n", - "k=1.38*10**-23\n", - "T=300\n", - "mh=0.28\n", - "mc=0.12\n", - "e=1.6*10**-19\n", - "#Calculations\n", - "Ef=((Ec+Ev)/2)+((3*k*T)/(4*e))*math.log(mh/mc)\n", - "\n", - "#Result\n", - "print\"Position of fermi level =\",round(Ef,4),\"eV\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.9, Page number 6.26" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Conductivity of intrinsic germanium at 300K = 2.24 ohm**-1 m**-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "ni=2.5*10**19\n", - "mu_e=0.38\n", - "mu_h=0.18\n", - "e=1.6*10**-19\n", - "\n", - "#Calculations\n", - "sigmai=ni*e*(mu_e+mu_h)\n", - "\n", - "#Result\n", - "print\"Conductivity of intrinsic germanium at 300K =\",round(sigmai,2),\"ohm**-1 m**-1\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.10, Page number 6.27" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Conductivity = 1.1593 *10**-3 ohm**-1 m**-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "m=9.1*10**-31\n", - "k=1.38*10**-23\n", - "T=300\n", - "h=6.626*10**-34\n", - "Eg=1.1\n", - "e=1.6*10**-19\n", - "mu_e=0.48\n", - "mu_h=0.013\n", - "#Calculations\n", - "ni=2*((2*math.pi*m*k*T)/h**2)**(3/2)*math.exp(-(Eg*e)/(2*k*T))\n", - "sigma=ni*e*(mu_e+mu_h)\n", - " \n", - "#Result\n", - "print\"Conductivity =\",round(sigma*10**3,4),\"*10**-3 ohm**-1 m**-1\" " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.11, Page number 6.27" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "p = 2.0 *10**23 m**-3\n", - "The electron concentration is given by n = 2.0 *10**9 m**-3\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "Na=5*10**23\n", - "Nd=3*10**23\n", - "ni=2*10**16\n", - "#Calculations\n", - "p=((Na-Nd)+(Na-Nd))/2\n", - "\n", - "#Result\n", - "print\"p =\",p*10**-23,\"*10**23 m**-3\"\n", - "print\"The electron concentration is given by n =\",ni**2/p*10**-9,\"*10**9 m**-3\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.12, Page number 6.28" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Rh = 3.7 *10**-6 C**-1 m**3\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "Vh=37*10**-6\n", - "thick=1*10**-3\n", - "width=5\n", - "Iy=20*10**-3\n", - "Bz=0.5\n", - "\n", - "#Calculations\n", - "Rh=(Vh*width*thick)/(width*Iy*Bz)\n", - "\n", - "#Result\n", - "print\"Rh =\",round(Rh*10**6,1),\"*10**-6 C**-1 m**3\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.13, Page number 6.28" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dn = 33.54 cm**2 s**-1\n", - "Dp = 12.9 cm**2 s**-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "Vt=0.0258\n", - "mu_n=1300\n", - "mu_p=500\n", - "\n", - "#Calculations\n", - "Dn=Vt*mu_n\n", - "Dp=Vt*mu_p\n", - "\n", - "#Result\n", - "print\"Dn =\",Dn,\"cm**2 s**-1\"\n", - "print\"Dp =\",Dp,\"cm**2 s**-1\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.14, Page number 6.29" - ] - }, - { - "cell_type": "code", - "execution_count": 63, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The hole concentration 'p' = 1.125 *10**13 /m**3\n", - "'n'= Nd = 2.0 *10**19\n", - "Electrical Conductivity = 0.384 ohm**-1 m**-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "ni=1.5*10**16\n", - "Nd=2*10**19\n", - "e=1.602*100**-19\n", - "mu_n=0.12\n", - "\n", - "#Calculations\n", - "p=ni**2/Nd\n", - "E_c=e*Nd*mu_n\n", - "\n", - "#Result\n", - "print\"The hole concentration 'p' =\",round(p*10**-13,3),\"*10**13 /m**3\"\n", - "print\"'n'= Nd =\",round(Nd*10**-19),\"*10**19\"\n", - "print\"Electrical Conductivity =\",round(E_c*10**19,3),\"ohm**-1 m**-1\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.15, Page number 6.29" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "mu_p= 1389.0 cm**2/V-s\n", - "n= 6.0355 *10**13/cm**3\n", - "p= 1.0355 *10**13/cm**3\n", - "J= 582.5 A/m**2\n", - "#Answer varies due to rounding of numbers\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "N=1/60\n", - "e=1.6*10**-19\n", - "ni=2.5*10**13\n", - "b=5*10**13\n", - "E=2\n", - "\n", - "#Calculations\n", - "n=(b+math.sqrt(2*b**2))/2\n", - "mu_p=N/(3*e*ni)\n", - "mu_i=2*mu_p\n", - "np=ni**2\n", - "p=(ni**2)/n\n", - "e=1.6*10**-19\n", - "E=2\n", - "J=(e*E)*((n*mu_i)+(p*mu_p))\n", - "#Result\n", - "print\"mu_p=\",round(mu_p),\"cm**2/V-s\"\n", - "print\"n=\",round(n/10**13,4),\"*10**13/cm**3\"\n", - "print\"p=\",round(p*10**-13,4),\"*10**13/cm**3\"\n", - "print\"J=\",round(J*10**4,1),\"A/m**2\"\n", - "print\"#Answer varies due to rounding of numbers\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example number 6.16, Page number 6.30" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ni = 2.293 *10**19 /m**3\n", - "Drift velocity of holes 1900.0 ms**-1\n", - "Drift velocity of electrons= 3900.0 ms**-1\n" - ] - } - ], - "source": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "rho=47*10**-2\n", - "e=1.6*10**-19\n", - "mu_n=0.39\n", - "mu_p=0.19\n", - "E=10**4\n", - "\n", - "#Calculations\n", - "ni=1/(rho*e*(mu_n+mu_p))\n", - "Dh=mu_p*E\n", - "De=mu_n*E\n", - "\n", - "#Results\n", - "print\"ni =\",round(ni/10**19,3),\"*10**19 /m**3\"\n", - "print\"Drift velocity of holes\",Dh,\"ms**-1\"\n", - "print\"Drift velocity of electrons=\",De,\"ms**-1\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb deleted file mode 100755 index 48386845..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb +++ /dev/null @@ -1,236 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Chapter 7:LASERS " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 7.1, Page number 7.32" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Divergence = -2.0 *10**-3 radian\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "r1 = 7; #in radians\n", - "r2 = 3; #in radians\n", - "d1 = 4; #Converting from mm to radians\n", - "d2 = 6; #Converting from mm to radians\n", - "\n", - "#calculations\n", - "D = (r2-r1)/(d2*10**3-d1*10**3) #Divergence\n", - "\n", - "#Result\n", - "print \"Divergence =\",round(D*10**3,3),\"*10**-3 radian\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 7.2, Page number 7.32" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Frequency (V) = 4.32 *10**14 Hz\n", - "Relative Population= 1.081 *10**30\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "C=3*10**8 #The speed of light\n", - "Lamda=6943 #Wavelength\n", - "T=300 #Temperature in Kelvin\n", - "h=6.626*10**-34 #Planck constant \n", - "k=1.38*10**-23 #Boltzmann's constant\n", - "\n", - "#Calculations\n", - "\n", - "V=(C)/(Lamda*10**-10) #Frequency\n", - "R=math.exp(h*V/(k*T)) #Relative population\n", - "\n", - "#Result\n", - "print \"Frequency (V) =\",round(V/10**14,2),\"*10**14 Hz\"\n", - "print \"Relative Population=\",round(R/10**30,3),\"*10**30\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 7.3, Page number 7.32" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Frequency= 4.74 *10**14 Hz\n", - "no.of photons emitted= 7.322 *10**15 photons/sec\n", - "Power density = 2.3 kWm**-2\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "C=3*10**8 #Velocity of light\n", - "W=632.8*10**-9 #wavelength\n", - "P=2.3\n", - "t=1\n", - "h=6.626*10**-34 #Planck constant \n", - "S=1*10**-6\n", - "\n", - "#Calculations\n", - "V=C/W #Frequency\n", - "n=((P*10**-3)*t)/(h*V) #no.of photons emitted\n", - "PD=P*10**-3/S #Power density\n", - "\n", - "#Result\n", - "print \"Frequency=\",round(V/10**14,2),\"*10**14 Hz\"\n", - "print \"no.of photons emitted=\",round(n/10**15,3),\"*10**15 photons/sec\"\n", - "print \"Power density =\",round(PD/1000,1),\"kWm**-2\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 7.4, Page number 7.33" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Wavelenght = 8628.0 Angstrom\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "h=6.626*10**-34 #Planck constant \n", - "C=3*10**8 #Velocity of light\n", - "E_g=1.44 #bandgap \n", - "\n", - "#calculations\n", - "lamda=(h*C)*10**10/(E_g*1.6*10**-19) #Wavelenght\n", - "\n", - "#Result\n", - "print \"Wavelenght =\",round(lamda),\"Angstrom\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 7.5, Page number 7.33" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Band gap = 0.8 eV\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "W=1.55 #wavelength\n", - "\n", - "#Calculations\n", - "E_g=(1.24)/W #Bandgap in eV \n", - "\n", - "#Result\n", - "print \"Band gap =\",E_g,\"eV\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb deleted file mode 100755 index 4ab9cd1c..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb +++ /dev/null @@ -1,651 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#Chapter 8:Fiber Optics" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.1, Page number 8.28" - ] - }, - { - "cell_type": "code", - "execution_count": 125, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The Critical angle = 78.5 degrees\n", - "The numerical aperture = 0.3\n", - "The acceptance angle = 17.4 degrees\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "n1=1.50 #Core refractive index\n", - "n2=1.47 #Cladding refractive index\n", - "\n", - "#Calculations\n", - "C_a=math.asin(n2/n1) #Critical angle \n", - "N_a=(n1**2-n2**2)**(1/2)\n", - "A_a=math.asin(N_a)\n", - "\n", - "#Results\n", - "print \"The Critical angle =\",round(C_a*180/math.pi,1),\"degrees\"\n", - "print \"The numerical aperture =\",round(N_a,2)\n", - "print \"The acceptance angle =\",round(A_a*180/math.pi,1),\"degrees\"\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.2, Page number 8.28" - ] - }, - { - "cell_type": "code", - "execution_count": 126, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "N = 490.0\n", - "Fiber can support 490.0 guided modes\n", - "In graded index fiber, No.of modes propogated inside the fiber = 245.0 only\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "d=50 #diameter\n", - "N_a=0.2 #Numerical aperture\n", - "lamda=1 #wavelength\n", - "\n", - "#Calculations\n", - "N=4.9*(((d*10**-6*N_a)/(lamda*10**-6))**2)\n", - "\n", - "#Result\n", - "print \"N =\",N\n", - "print \"Fiber can support\",N,\"guided modes\"\n", - "print \"In graded index fiber, No.of modes propogated inside the fiber =\",N/2,\"only\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.3, Page number 8.29" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Numerical aperture = 0.008691\n", - "No. of modes that can be propogated = 1.0\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "d=50 #diameter\n", - "n1=1.450\n", - "n2=1.447\n", - "lamda=1 #wavelength\n", - "\n", - "#Calculations\n", - "N_a=(n1**2-n2**2) #Numerical aperture\n", - "N=4.9*(((d*10**-6*N_a)/(lamda*10**-6))**2)\n", - "\n", - "#Results\n", - "print \"Numerical aperture =\",N_a\n", - "print \"No. of modes that can be propogated =\",round(N)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.4, Page number 8.29" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Numerical aperture = 0.46\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "delta=0.05 \n", - "n1=1.46\n", - "\n", - "#Calculation\n", - "N_a=n1*(2*delta)**(1/2) #Numerical aperture\n", - "\n", - "#Result\n", - "print \"Numerical aperture =\",round(N_a,2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.5, Page number 8.29" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "V number = 94.72\n", - "maximum no.of modes propogating through fiber = 4486.0\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "a=50\n", - "n1=1.53\n", - "n2=1.50\n", - "lamda=1 #wavelength\n", - "\n", - "#Calculations\n", - "N_a=(n1**2-n2**2) #Numerical aperture\n", - "V=((2*math.pi*a)/lamda)*N_a**(1/2)\n", - "\n", - "#Result\n", - "print \"V number =\",round(V,2)\n", - "print \"maximum no.of modes propogating through fiber =\",round(N)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.6, Page number 8.29" - ] - }, - { - "cell_type": "code", - "execution_count": 64, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Number of modes = 24589.0 modes\n", - "No.of modes is doubled to account for the two possible polarisations\n", - "Total No.of modes = 49178.0\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "a=100\n", - "N_a=0.3 #Numerical aperture\n", - "lamda=850 #wavelength\n", - "\n", - "#Calculations\n", - "V_n=(2*(math.pi)**2*a**2*10**-12*N_a**2)/lamda**2*10**-18\n", - "#Result\n", - "print \"Number of modes =\",round(V_n/10**-36),\"modes\"\n", - "print \"No.of modes is doubled to account for the two possible polarisations\"\n", - "print \"Total No.of modes =\",round(V_n/10**-36)*2\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.7, Page number 8.29" - ] - }, - { - "cell_type": "code", - "execution_count": 88, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cutoff Wavellength = 1.315 micro m.\n" - ] - } - ], - "source": [ - "import math\n", - "\n", - "#variable declaration\n", - "a=5;\n", - "n1=1.48;\n", - "delta=0.01;\n", - "V=25;\n", - "\n", - "#Calculation\n", - "lamda=(math.pi*(a*10**-6)*n1*math.sqrt(2*delta))/V # Cutoff Wavelength\n", - "\n", - "#Result\n", - "print \"Cutoff Wavellength =\",round(lamda*10**7,3),\"micro m.\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.8, Page number 8.30" - ] - }, - { - "cell_type": "code", - "execution_count": 87, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Maximum core radius= 9.95 micro m\n" - ] - } - ], - "source": [ - "import math\n", - "\n", - "#variable declaration\n", - "V=2.405\n", - "lamda=1.3\n", - "N_a=0.05\n", - "\n", - "#Calculations\n", - "a_max=(V*lamda)/(2*math.pi*N_a)\n", - "\n", - "#Result\n", - "print \"Maximum core radius=\",round(a_max,2),\"micro m\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.9, Page number 8.30" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Acceptance angle, theta_a = 17.46 degrees\n", - "For skew rays,theta_as 34.83 degrees\n", - "#Answer given in the textbook is wrong\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "N_a=0.3\n", - "gamma=45\n", - "\n", - "#Calculations\n", - "theta_a=math.asin(N_a)\n", - "theta_as=math.asin((N_a)/math.cos(gamma))\n", - "\n", - "#Results\n", - "print \"Acceptance angle, theta_a =\",round(theta_a*180/math.pi,2),\"degrees\"\n", - "print \"For skew rays,theta_as \",round(theta_as*180/math.pi,2),\"degrees\"\n", - "print\"#Answer given in the textbook is wrong\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.10, Page number 8.30" - ] - }, - { - "cell_type": "code", - "execution_count": 115, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Numerical aperture = 0.303\n", - "Acceptance angle = 17.63 degrees\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "n1=1.53\n", - "delta=0.0196\n", - "\n", - "#Calculations\n", - "N_a=n1*(2*delta)**(1/2)\n", - "A_a=math.asin(N_a)\n", - "#Result\n", - "print \"Numerical aperture =\",round(N_a,3)\n", - "print \"Acceptance angle =\",round(A_a*180/math.pi,2),\"degrees\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.11, Page number 8.30" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "delta = 0.01\n", - "Core radius,a = 1.55 micro m\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "n1=1.480\n", - "n2=1.465\n", - "V=2.405\n", - "lamda=850*10**-9\n", - "\n", - "#Calculations\n", - "delta=(n1**2-n2**2)/(2*n1**2)\n", - "a=(V*lamda*10**-9)/(2*math.pi*n1*math.sqrt(2*delta))\n", - "\n", - "#Results\n", - "print \"delta =\",round(delta,2)\n", - "print \"Core radius,a =\",round(a*10**15,2),\"micro m\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.12, Page number 8.31" - ] - }, - { - "cell_type": "code", - "execution_count": 147, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Critical angle= 83.38 degrees\n", - "Fiber length covered in one reflection= 430.84 micro m\n", - "Total no.of reflections per metre= 2321.0\n", - "Since L=1m, Total dist. travelled by light over one metre of fiber = 1.0067 m\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "n1=1.5\n", - "n2=1.49\n", - "a=25\n", - "\n", - "#Calculations\n", - "C_a=math.asin(n2/n1) #Critical angle\n", - "L=2*a*math.tan(C_a) \n", - "N_r=10**6/L \n", - "\n", - "#Result\n", - "print \"Critical angle=\",round(C_a*180/math.pi,2),\"degrees\"\n", - "print \"Fiber length covered in one reflection=\",round(L,2),\"micro m\"\n", - "print \"Total no.of reflections per metre=\",round(N_r)\n", - "print \"Since L=1m, Total dist. travelled by light over one metre of fiber =\",round(1/math.sin(C_a),4),\"m\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.13, Page number 8.31" - ] - }, - { - "cell_type": "code", - "execution_count": 155, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "No.of modes = 154.69 =155(approx)\n", - "Taking the two possible polarizations, Total No.of nodes = 309.0\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "alpha=1.85\n", - "lamda=1.3*10**-6\n", - "a=25*10**-6\n", - "N_a=0.21\n", - "\n", - "#Calculations\n", - "V_n=((2*math.pi**2)*a**2*N_a**2)/lamda**2\n", - "N_m=(alpha/(alpha+2))*V_n\n", - "\n", - "print \"No.of modes =\",round(N_m,2),\"=155(approx)\"\n", - "print \"Taking the two possible polarizations, Total No.of nodes =\",round(N_m*2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.14, Page number 8.32" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a)Signal attention per unit length = 3.9 dB km**-1\n", - "b)Overall signal attenuation = 39.0 dB\n", - "#Answer given in the textbook is wrong\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "P_i=100\n", - "P_o=2\n", - "L=10\n", - "\n", - "#Calculations\n", - "S=(10/L)*math.log(P_i/P_o)\n", - "O=S*L\n", - "\n", - "#Result\n", - "print \"a)Signal attention per unit length =\",round(S,1),\"dB km**-1\"\n", - "print \"b)Overall signal attenuation =\",round(O),\"dB\"\n", - "print \"#Answer given in the textbook is wrong\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##Example 8.15, Page number 8.32" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Total dispersion = 1343.3 ns\n", - "Bandwidth length product = 37.22 Hz-km\n", - "#Answer given in the text book is wrong\n" - ] - } - ], - "source": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "L=10\n", - "n1=1.55\n", - "delta=0.026\n", - "C=3*10**5\n", - "\n", - "#Calculations\n", - "delta_T=(L*n1*delta)/C\n", - "B_W=10/(2*delta_T)\n", - "\n", - "#Result\n", - "print \"Total dispersion =\",round(delta_T/10**-9,1),\"ns\"\n", - "print \"Bandwidth length product =\",round(B_W/10**5,2),\"Hz-km\"\n", - "print \"#Answer given in the text book is wrong\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt b/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png old mode 100644 new mode 100755 diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png old mode 100644 new mode 100755 diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb new file mode 100755 index 00000000..11572a64 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb @@ -0,0 +1,1106 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c32f4c771b7aa90d25f7c7a71e72b94eccb8c650a9b70156e8a9a1623dc111e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Static Characteristics of Instruments and Measurement systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating static error and static correction\n", + "# Variables\n", + "Am = 127.50;\n", + "At = 127.43;\n", + "\n", + "# Calculations and Results\n", + "e = Am-At;\n", + "print \"Static error(V) = \", e\n", + "\n", + "Sc = -e;\n", + "print \"Static Correction(V) = \", Sc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static error(V) = 0.07\n", + "Static Correction(V) = -0.07\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating true value of the temperature\n", + "\n", + "# Variables\n", + "Am = 95.45;\n", + "Sc = -0.08;\n", + "\n", + "# Calculations\n", + "At = Am+Sc;\n", + "\n", + "# Results\n", + "print \"True Temperature(Degree C) = \", At\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "True Temperature(Degree C) = 95.37\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating Relative error (expressed as a percentage of f.s.d)\n", + "\n", + "# Variables\n", + "Am = 1.46;\n", + "At = 1.50;\n", + "\n", + "# Calculations and Results\n", + "e = Am-At;\n", + "print \"Absolute error(V) = \", e\n", + "Sc = -e;\n", + "print \"Absolute Correction(V) = \", Sc\n", + "RE = (e/At)*100;\n", + "print \"Relative Error in terms of true value(in percentage) = \", RE\n", + "REF = (e/2.5)*100;\n", + "print \"Relative Error in terms of true value(in percentage) = \", REF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute error(V) = -0.04\n", + "Absolute Correction(V) = 0.04\n", + "Relative Error in terms of true value(in percentage) = -2.66666666667\n", + "Relative Error in terms of true value(in percentage) = -1.6\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating static error and static correction\n", + "\n", + "# Variables\n", + "Am = 0.000161;\n", + "At = 0.159*10**-3;\n", + "\n", + "# Calculations and Results\n", + "e = Am-At;\n", + "print \"Static error(m3/s) = \", e\n", + "\n", + "Sc = -e;\n", + "print \"Static Correction(m3/s) = \", Sc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static error(m3/s) = 2e-06\n", + "Static Correction(m3/s) = -2e-06\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating maximum static error \n", + "\n", + "# Variables\n", + "#Span of the thermometer(degree C)\n", + "S = 200.-150;\n", + "#Accuracy of the thermometer(in terms of percentage of span)\n", + "A = 0.0025;\n", + "\n", + "# Calculations\n", + "e = A*S;\n", + "\n", + "# Results\n", + "print \"Maximum Static error(degree C) = \", e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Static error(degree C) = 0.125\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the pressure for a dial reading of 100\n", + "\n", + "# Calculations\n", + "P = ((27.58-6.895)/150)*100+6.895;\n", + "\n", + "# Results\n", + "print \"pressure for a dial reading of 100(kN/m2) = \", P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure for a dial reading of 100(kN/m2) = 20.685\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the noise output voltage of the amplifier\n", + "\n", + "# Variables\n", + "Bw = 100.*10**3;\n", + "Sn = 7.*10**-21;\n", + "R = 50.*10**3;\n", + "\n", + "# Calculations and Results\n", + "A = (Sn*R*Bw)**0.5;\n", + "En = 2*A;\n", + "print \"Noise voltage at input(V) = \", En\n", + "\n", + "Ga = 100;\n", + "Eno = En*Ga;\n", + "print \"Noise voltage at output(V) = \", Eno\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise voltage at input(V) = 1.18321595662e-05\n", + "Noise voltage at output(V) = 0.00118321595662\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the noise voltage\n", + "\n", + "# Variables\n", + "Sn = 20.;\n", + "Vs = 3;\n", + "\n", + "# Calculations\n", + "Vn = Vs/(Sn)**0.5;\n", + "\n", + "# Results\n", + "print \"noise Voltage(mV) = \", Vn" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "noise Voltage(mV) = 0.67082039325\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# calculating the signal to noise ratio at input\n", + "# calculating the signal to noise ratio at output\n", + "#calculating the noise factor and noise figure\n", + "\n", + "# Calculations and Results\n", + "print \"signal to noise ratio at input\"\n", + "Sni = (3.*10**-6/(1*10**-6))**2;\n", + "print \"signal to noise ratio at input = \", Sni\n", + "print \"signal to noise ratio at output\"\n", + "Sno = (60.*10**-6/(20*10**-6))**2;\n", + "print \"signal to noise ratio at output = \", Sno\n", + "print \"New signal to noise ratio at output\"\n", + "Snno = (60.*10**-6/(25*10**-6))**2;\n", + "print \"signal to noise ratio at output = \", Snno\n", + "\n", + "F = Sni/Snno;\n", + "print \"noise Factor = \", F\n", + "\n", + "nf = 10*math.log10(F);\n", + "print \"noise Figure(dB) = \", nf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "signal to noise ratio at input\n", + "signal to noise ratio at input = 9.0\n", + "signal to noise ratio at output\n", + "signal to noise ratio at output = 9.0\n", + "New signal to noise ratio at output\n", + "signal to noise ratio at output = 5.76\n", + "noise Factor = 1.5625\n", + "noise Figure(dB) = 1.93820026016\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the ratio of output signal to noise signal \n", + "\n", + "# Variables\n", + "Bw = 100.*10**3;\n", + "K = 1.38*10**-23;\n", + "T = 300.;\n", + "R = 120.;\n", + "\n", + "# Calculations and Results\n", + "A = (K*T*R*Bw)**0.5;\n", + "En = 2*A;\n", + "print \"Noise voltage (V) = \", En\n", + "Eno = 0.12*10**-3;\n", + "print \"Noise voltage at output(V) = \", Eno\n", + "Ra = Eno/En;\n", + "print \"Ratio of signal votage to Noise voltage = \", Ra\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise voltage (V) = 4.45780214904e-07\n", + "Noise voltage at output(V) = 0.00012\n", + "Ratio of signal votage to Noise voltage = 269.190951029\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#calculating the average force and range of error\n", + "F1 = 10.03;\n", + "F2 = 10.10;\n", + "F3 = 10.11;\n", + "F4 = 10.08;\n", + "\n", + "# Calculations and Results\n", + "Fav = (F1+F2+F3+F4)/4;\n", + "print \"Average Force(N) = \", Fav\n", + "Fmax = F3;\n", + "MaxR = Fmax-Fav;\n", + "Fmin = F1;\n", + "MinR = Fav-Fmin;\n", + "AvgR = (MaxR+MinR)/2;\n", + "print \"Average range of error (N) = \", AvgR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average Force(N) = 10.08\n", + "Average range of error (N) = 0.04\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#calculating the sum of resistances connected in series with uncertainity of one unit\n", + "R1 = 72.3;\n", + "R2 = 2.73;\n", + "R3 = 0.612;\n", + "\n", + "# Calculations\n", + "R = (R1+R2+R3);\n", + "\n", + "# Results\n", + "print \"sum of resistances(ohm) = \", R\n", + "\n", + "print \"the resultant resistance is 75.6 ohm with 6 as first doutful figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum of resistances(ohm) = 75.642\n", + "the resultant resistance is 75.6 ohm with 6 as first doutful figure\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#calculating the power with uncertainity of one unit in voltage and current\n", + "\n", + "# Variables\n", + "V = 12.16;\n", + "I = 1.34;\n", + "\n", + "# Calculations\n", + "P = V*I;\n", + "\n", + "# Results\n", + "print \"Power(W) = \", P\n", + "\n", + "print \"the resultant is 16.2 W with 2 as first doutful figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power(W) = 16.2944\n", + "the resultant is 16.2 W with 2 as first doutful figure\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the sum of resistances connected in series with appropriate number of significant figure\n", + "\n", + "# Variables\n", + "R1 = 28.7;\n", + "R2 = 3.624;\n", + "\n", + "# Calculations\n", + "R = (R1+R2);\n", + "\n", + "# Results\n", + "print \"sum of resistances(ohm) = \", R\n", + "\n", + "print \"the resultant resistance is 32.3 ohm as one of the resistance is accurate to three significant figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum of resistances(ohm) = 32.324\n", + "the resultant resistance is 32.3 ohm as one of the resistance is accurate to three significant figure\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page No : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the voltage drop with appropriate number of significant figure\n", + "\n", + "# Variables\n", + "R = 31.27;\n", + "I = 4.37;\n", + "\n", + "# Calculations\n", + "E = I*R;\n", + "\n", + "# Results\n", + "print \"voltage drop(V) = \", E\n", + "\n", + "print \"the voltage drop is 137 V as one of the resistance is accurate to three significant figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage drop(V) = 136.6499\n", + "the voltage drop is 137 V as one of the resistance is accurate to three significant figure\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the sensitivity and deflection factor of wheatstone bridge\n", + "\n", + "# Variables\n", + "Mo = 3.;\n", + "Mi = 7;\n", + "\n", + "# Calculations and Results\n", + "Sen = Mo/Mi;\n", + "print \"sensitivity(mm per ohm) = \", Sen\n", + "Df = Mi/Mo;\n", + "print \"deflection factor( ohm per mm) = \", Df\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sensitivity(mm per ohm) = 0.428571428571\n", + "deflection factor( ohm per mm) = 2.33333333333\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the volume of the mercury thermometer\n", + "\n", + "# Calculations and Results\n", + "Ac = (math.pi/4)*0.25**2;\n", + "print \"Area of mercury thermometer\", Ac\n", + "Lc = 13.8*10**3;\n", + "Vc = Ac*Lc;\n", + "print \"Volume of mercury thermometer(mm3)\", Vc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of mercury thermometer 0.0490873852123\n", + "Volume of mercury thermometer(mm3) 677.40591593\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the maximum position deviation, resistance deviation \n", + "\n", + "# Variables\n", + "Pl = 0.001;\n", + "FSD = 320;\n", + "R = 10000;\n", + "\n", + "# Calculations and Results\n", + "MDD = (Pl*FSD);\n", + "print \"Maximum lacement deviation(degree) =\",MDD\n", + "MRD = Pl*R;\n", + "print \"Maximum lacement deviation(ohm) = \",MRD\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum lacement deviation(degree) = 0.32\n", + "Maximum lacement deviation(ohm) = 10.0\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page No : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the dead zone\n", + "\n", + "# Variables\n", + "s = 600;\n", + "\n", + "# Calculations\n", + "Dz = 0.00125*s;\n", + "\n", + "# Results\n", + "print \"Dead zone(degree C) = \", Dz\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dead zone(degree C) = 0.75\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the Resolution\n", + "\n", + "# Variables\n", + "Fs = 200.;\n", + "D = 100.;\n", + "\n", + "# Calculations\n", + "SD = Fs/D;\n", + "R = SD/10;\n", + "\n", + "# Results\n", + "print \"resolution (V) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution (V) = 0.2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the Resolution\n", + "\n", + "# Variables\n", + "Fs = 9.999;\n", + "D = 9999;\n", + "\n", + "# Calculations\n", + "SD = Fs/D;\n", + "R = SD;\n", + "\n", + "# Results\n", + "print \"resolution (V) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution (V) = 0.001\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 Page No : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the reading of the multimeter and percentage error\n", + "\n", + "# Variables\n", + "Zl = 20000.;\n", + "Zo = 10000.;\n", + "Eo = 6.;\n", + "\n", + "# Calculations and Results\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n", + "PE = ((El-Eo)/Eo)*100;\n", + "print \"Percentage error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of the multimeter (V) = 4.0\n", + "Percentage error = -33.3333333333\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the reading of the multimeter and percentage error\n", + "\n", + "# Variables\n", + "Zl = 20000.;\n", + "Zo = 1000.;\n", + "Eo = 6;\n", + "\n", + "# Calculations and Results\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n", + "PE = ((El-Eo)/Eo)*100;\n", + "print \"Percentage error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of the multimeter (V) = 5.71428571429\n", + "Percentage error = -4.7619047619\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the loading error\n", + "\n", + "# Variables\n", + "Zl = 1000.;\n", + "Zo = 200*200./400;\n", + "Eo = 100*200./400;\n", + "\n", + "# Calculations and Results\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n", + "PE = ((El-Eo)/Eo)*100;\n", + "print \"Percentage loading error = \", PE\n", + "Ac = 100+PE;\n", + "print \"Accuracy = \", Ac\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of the multimeter (V) = 45.4545454545\n", + "Percentage loading error = -9.09090909091\n", + "Accuracy = 90.9090909091\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#calculating the voltage across the oscilloscope\n", + "\n", + "# Variables\n", + "C = 50*10.**-6;\n", + "\n", + "# Calculations and Results\n", + "f = 100000.;\n", + "print \"frequency = \", f\n", + "Xc = 1./(2*math.pi*f*C);\n", + "R = 10.**6;\n", + "Zl = (R*-1j*Xc)/(R-1j*Xc);\n", + "Eo = 1.;\n", + "Zo = 10.*10**3;\n", + "\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency = 100000.0\n", + "Reading of the multimeter (V) = (1.02334395478e-11-3.18309886181e-06j)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28 Page No : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the actual value of current, measured value of current and percentage error\n", + "\n", + "# Variables\n", + "Eo = 10.-((10.*1000)/(1000+1000));\n", + "Zo = ((1000.*1000)/(1000+1000))+500;\n", + "\n", + "# Calculations and Results\n", + "Io = Eo/Zo;\n", + "print \"Actual value of current (A) = \", Io\n", + "Zl = 100.;\n", + "Il = Eo/(Zo+Zl);\n", + "print \"Measured value of current (A) = \", Il\n", + "PE = ((Il-Io)/Io)*100;\n", + "print \"Percentage loading error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual value of current (A) = 0.005\n", + "Measured value of current (A) = 0.00454545454545\n", + "Percentage loading error = -9.09090909091\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the maximum available power\n", + "\n", + "# Variables\n", + "Eo = 80.*10**-3;\n", + "Il = 5.*10**-9;\n", + "Rl = 6.*10**6;\n", + "\n", + "# Calculations\n", + "Ro = (Eo/Il)-Rl;\n", + "Pmax = (Eo**2)/(4*Ro);\n", + "\n", + "# Results\n", + "print \"Maximum available Power(W) = \", Pmax\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum available Power(W) = 1.6e-10\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb new file mode 100755 index 00000000..21e7112d --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb @@ -0,0 +1,1812 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ffa422208323473e7fa809c26d007c1a4e73e5340d80167d553ec696ed3e811" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Errors in Measurements and Their Statistical Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating guarantee value of capacitance\n", + "\n", + "# Variables\n", + "As = 1;\n", + "Er = 0.05;\n", + "\n", + "# Calculations and Results\n", + "Aau = As*(1+Er);\n", + "print \"Upper limit(micro F) = \", Aau\n", + "Aal = As*(1-Er);\n", + "print \"Lower limit(micro F) = \", Aal\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper limit(micro F) = 1.05\n", + "Lower limit(micro F) = 0.95\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating percentage limiting error\n", + "\n", + "# Variables\n", + "As = 150.;\n", + "Er = 0.01;\n", + "\n", + "# Calculations\n", + "dA = As*Er;\n", + "As1 = 75.;\n", + "Er = (dA/As1)*100;\n", + "\n", + "# Results\n", + "print \"Percentage limiting error = \", Er\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage limiting error = 2.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the range of readings\n", + "\n", + "# Variables\n", + "fsd = 1000.;\n", + "TP = 100.;\n", + "\n", + "# Calculations and Results\n", + "Efsd = (1./100)*1000;\n", + "print \"magnitude of Error when specified in terms of full scale deflection (w) = \", Efsd\n", + "print \"Thus the meter will read between 90W and 110W\"\n", + "\n", + "Etv = (1./100)*100;\n", + "print \"magnitude of Error when specified in terms of true value (w) = \", Etv\n", + "print \"Thus the meter will read between 99W and 101W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnitude of Error when specified in terms of full scale deflection (w) = 10.0\n", + "Thus the meter will read between 90W and 110W\n", + "magnitude of Error when specified in terms of true value (w) = 1.0\n", + "Thus the meter will read between 99W and 101W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the limiting error in percent\n", + "\n", + "# Variables\n", + "dA = 0.05*5*10**-6;\n", + "As = 2.5*10**-6;\n", + "\n", + "# Calculations\n", + "Er = (dA/As)*100;\n", + "\n", + "# Results\n", + "print \"percemtage limiting error = +/-\", Er\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percemtage limiting error = +/- 10.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the range of readings specified interms of f.s.d. and true value\n", + "\n", + "print \"Range when specified interms of f.s.d.\"\n", + "\n", + "# Calculations and Results\n", + "Error_fsd = 1.*1000./100\n", + "Range_lower_value = 100-Error_fsd;\n", + "print \"Lower value of range (kN/m2)\", Range_lower_value\n", + "Range_upper_value = 100+Error_fsd;\n", + "print \"Upper value of range (kN/m2)\", Range_upper_value\n", + "print \"Range when specified interms of True value\",\n", + "Error_true = 1*100/100.\n", + "Range_lower_value = 100-Error_true;\n", + "print \"Lower value of range (kN/m2)\", Range_lower_value\n", + "Range_upper_value = 100+Error_true;\n", + "print \"Upper value of range (kN/m2)\", Range_upper_value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range when specified interms of f.s.d.\n", + "Lower value of range (kN/m2) 90.0\n", + "Upper value of range (kN/m2) 110.0\n", + "Range when specified interms of True value Lower value of range (kN/m2) 99.0\n", + "Upper value of range (kN/m2) 101.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the magnitude and limiting error in ohm and in percentage of the resistance\n", + "\n", + "# Variables\n", + "R1 = 37.;\n", + "R1_le = 5.*R1/100;\n", + "R2 = 75.;\n", + "R2_le = 5.*R2/100;\n", + "R3 = 50.;\n", + "R3_le = 5.*R3/100;\n", + "\n", + "# Calculations and Results\n", + "R = R1+R2+R3;\n", + "print \"Value of resistance (ohm) = \", R\n", + "\n", + "R_le = R1_le+R2_le+R3_le;\n", + "print \"Limiting Value of resistance (ohm) = \", R_le\n", + "\n", + "Limiting_error_percentage = R_le*100/R;\n", + "print \"Limiting Value of resistance (percentage) = +/-\", Limiting_error_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance (ohm) = 162.0\n", + "Limiting Value of resistance (ohm) = 8.1\n", + "Limiting Value of resistance (percentage) = +/- 5.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the value of relative limiting error in resistance\n", + "\n", + "# Variables\n", + "Re_P = 1.5;\n", + "Re_I = 1;\n", + "\n", + "# Calculations\n", + "Re_resistance = (Re_P+2*Re_I);\n", + "\n", + "# Results\n", + "print \"the value of relative limiting error of resistance in percentage(+/-) = \", Re_resistance" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of relative limiting error of resistance in percentage(+/-) = 3.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the guaranteed values of the resistance\n", + "\n", + "# Variables\n", + "R1 = 100.;\n", + "R1_le_perunit = 0.5; # R1_le_perunit indicates dR1/R1 = 0.5%\n", + "R2 = 1000.;\n", + "R2_le_perunit = 0.5;\n", + "R3 = 842.;\n", + "R3_le_perunit = 0.5;\n", + "\n", + "# Calculations and Results\n", + "Rx = R2*R3/R1;\n", + "print \"Value of resistance (ohm) = \", Rx\n", + "Rx_le_perunit = R1_le_perunit+R2_le_perunit+R3_le_perunit;\n", + "\n", + "print \"Limiting Value of resistance per unit (dRx/Rx) = \", Rx_le_perunit\n", + "Er_Le = Rx_le_perunit*Rx/100;\n", + "print \"Limiting Value of resistance (ohm) = +/-\", Er_Le\n", + "print \"Guarantee value of the resistance (ohm) = \",\n", + "G1 = Rx+Er_Le;\n", + "G2 = Rx-Er_Le;\n", + "print G1,G2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance (ohm) = 8420.0\n", + "Limiting Value of resistance per unit (dRx/Rx) = 1.5\n", + "Limiting Value of resistance (ohm) = +/- 126.3\n", + "Guarantee value of the resistance (ohm) = 8546.3 8293.7\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the percentage limiting error and range of resistance values\n", + "print \"error in decade a = so, decade a is set at 4000 ohm\",\n", + "Er_a = 4000.*0.1/100;\n", + "print Er_a\n", + "print \"error in decade b = so, decade b is set at 600 ohm\",\n", + "Er_b = 600*0.1/100.;\n", + "print Er_b\n", + "print \"error in decade c = so, decade c is set at 30 ohm\",\n", + "Er_c = 30*0.1/100.;\n", + "print Er_c\n", + "print \"error in decade d = so, decade d is set at 9 ohm\",\n", + "Er_d = 9*0.1/100;\n", + "print Er_d\n", + "Er_total = Er_a+Er_b+Er_c+Er_d;\n", + "Re_le_percentage = Er_total*100./4639;\n", + "print \"Percentage Relative limiting error = \", Re_le_percentage\n", + "Range_lower = 4639-Er_total;\n", + "print \"Lower value of range (ohm) = \", Range_lower\n", + "Range_upper = 4639+Er_total;\n", + "print \"upper value of range (ohm) = \", Range_upper\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error in decade a = so, decade a is set at 4000 ohm 4.0\n", + "error in decade b = so, decade b is set at 600 ohm 0.6\n", + "error in decade c = so, decade c is set at 30 ohm 0.03\n", + "error in decade d = so, decade d is set at 9 ohm 0.009\n", + "Percentage Relative limiting error = 0.1\n", + "Lower value of range (ohm) = 4634.361\n", + "upper value of range (ohm) = 4643.639\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the magnitude of power and limiting error\n", + "\n", + "# Variables\n", + "F = 4.58;\n", + "L = 397.;\n", + "R = 1202.*10**-9;\n", + "t = 60.;\n", + "\n", + "# Calculations and Results\n", + "P = (2*math.pi*9.81*F*L*R)/(t*10**6);\n", + "print \"Magnitude of power (W) = \", P\n", + "dF_pu = 0.02/F; # per unit error in force\n", + "dL_pu = 1.3/L; # per unit error in Length\n", + "dR_pu = 1/R; # per unit error in revolution\n", + "dt_pu = 0.5/t; # per unit error in time\n", + "dP_pu = dF_pu+dL_pu+dR_pu+dt_pu;\n", + "dP_le = dP_pu*P;\n", + "print \"Magnitude of limiting error in power (W)\", dP_le\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of power (W) = 2.24521573806e-09\n", + "Magnitude of limiting error in power (W) 0.00186789998434\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the magnitude of Force and limiting error\n", + "\n", + "# Variables\n", + "E = 200.*10**9;\n", + "L = 25.*10**-3;\n", + "b = 4.75*10**-3;\n", + "d = 0.9*10**-3;\n", + "\n", + "# Calculations and Results\n", + "I = (b*d**3)/12;\n", + "x = 2.5*10**-3;\n", + "F = (3*E*I*x)/(L**3);\n", + "print \"Magnitude of Force (N) = \", F\n", + "\n", + "dE_pu = 0./E; # per unit error in E\n", + "db_pu = 0.0075/b; \n", + "dd_pu = 0.0075/d; \n", + "dx_pu = 0.025/x; \n", + "dL_pu = 0.025/L;\n", + "dF_pu = (dE_pu+db_pu+3*dd_pu+dx_pu+3*dL_pu)*10**-3;\n", + "\n", + "print \"limiting error in force (N) = +/-\", dF_pu\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of Force (N) = 27.702\n", + "limiting error in force (N) = +/- 0.0395789473684\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the power loss and relative error \n", + "\n", + "# Variables\n", + "I = 64.*10**-3;\n", + "R = 3200.;\n", + "\n", + "# Calculations and Results\n", + "P = (I**2)*R;\n", + "print \"Power(W) = \", P\n", + "Re = 2*0.75+0.2;\n", + "print \"Relative error (%) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power(W) = 13.1072\n", + "Relative error (%) = 1.7\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the true power as a percentage of measured power\n", + "\n", + "# Variables\n", + "I = 30.4;\n", + "R = 0.015;\n", + "\n", + "# Calculations\n", + "I_true = I*(1+0.012);\n", + "R_true = R*(1-0.003);\n", + "P_true = (I_true**2)*R_true;\n", + "P_measured = (I**2)*R;\n", + "R = P_true*100/P_measured;\n", + "\n", + "# Results\n", + "print \"true power as a percentage of measured power(%) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "true power as a percentage of measured power(%) = 102.1071568\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total resistance, error of each register and fractional error of total resistance\n", + "\n", + "# Variables\n", + "R1 = 250.;\n", + "R2 = 500.;\n", + "R3 = 375.;\n", + "\n", + "# Calculations and Results\n", + "R_true = 1/((1/R1)+(1/R2)+(1/R3));\n", + "print \" True value of resistance(ohm) = \", R_true\n", + "\n", + "dR1 = 0.025*R1;\n", + "dR2 = -0.36*R2;\n", + "dR3 = 0.014*R3;\n", + "R1_effective = R1+dR1;\n", + "R2_effective = R2+dR2;\n", + "R3_effective = R3+dR3;\n", + "R_effective = 1/((1/R1_effective)+(1/R2_effective)+(1/R3_effective));\n", + "print \" Effective value of resistance(ohm) = \", R_effective\n", + "\n", + "Fractional_error = (R_true-R_effective)/R_true;\n", + "print \"Fractional_error\", Fractional_error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " True value of resistance(ohm) = 115.384615385\n", + " Effective value of resistance(ohm) = 103.548741621\n", + "Fractional_error 0.102577572617\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#\n", + "print \"When all the components have 0% error then resonant frequency (Hz)\",\n", + "\n", + "# Variables\n", + "L = 160.*10**-6;\n", + "C = 160.*10**-12;\n", + "fr = (1./(2*math.pi))*(1/(L*C))**0.5;\n", + "print fr\n", + "\n", + "# Calculations and Results\n", + "print \"When all the components have +10% error then resonant frequency (Hz)\",\n", + "L_new = (160.*10**-6)+0.1*L;\n", + "C_new = (160.*10**-12)+0.1*C;\n", + "fr_new = (1./(2*math.pi))*(1/(L_new*C_new))**0.5;\n", + "print fr_new\n", + "\n", + "error = (fr_new-fr)/fr;\n", + "print \"error = \", error\n", + "\n", + "print \"When all the components have -10% error then resonant frequency (Hz)\",\n", + "L_new = (160.*10**-6)-0.1*L;\n", + "C_new = (160.*10**-12)-0.1*C;\n", + "fr_new = (1./(2*math.pi))*(1/(L_new*C_new))**0.5;\n", + "print fr_new\n", + "\n", + "error = (fr_new-fr)/fr;\n", + "print \"error = \", error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When all the components have 0% error then resonant frequency (Hz) 994718.394324\n", + "When all the components have +10% error then resonant frequency (Hz) 904289.449386\n", + "error = -0.0909090909091\n", + "When all the components have -10% error then resonant frequency (Hz) 1105242.66036\n", + "error = 0.111111111111\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# calculate the Volume and relative error \n", + "\n", + "# Variables\n", + "L = 250.;\n", + "d = 50.;\n", + "\n", + "# Calculations and Results\n", + "V = ((math.pi/4)*d**2)*L;\n", + "print \"Volume(mm3) = \", V\n", + "Re = 2*0.2-0.5;\n", + "print \"Relative error (%) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume(mm3) = 490873.852123\n", + "Relative error (%) = -0.1\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the per unit change in the value of spring for different temperature ranges\n", + "\n", + "# Variables\n", + "dG_pu = -240*10**-6;\n", + "dD_pu = 11.8*10**-6;\n", + "\n", + "# Calculations and Results\n", + "print \"for temperature change of 20 degree C to 50 degree C (%) = \",\n", + "d_th = 30;\n", + "dK_pu = (dG_pu+dD_pu)*d_th*100;\n", + "print dK_pu\n", + "\n", + "print \"for temperature change of 20 degree C to -50 degree C (%) = \",\n", + "d_th = -70;\n", + "dK_pu = (dG_pu+dD_pu)*d_th*100;\n", + "print dK_pu\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for temperature change of 20 degree C to 50 degree C (%) = -0.6846\n", + "for temperature change of 20 degree C to -50 degree C (%) = 1.5974\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate apparent resistance, actual resistance and error\n", + "\n", + "# Variables\n", + "Et = 100.;\n", + "It = 5.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Rt = Et/It;\n", + "print \"apparent value of resistance (ohm) = \", Rt\n", + "Rv = 1000.*150;\n", + "\n", + "Rx = Rt*Rv/(Rv-Rt);\n", + "print \"true value of resistance(ohm)\", Rx\n", + "\n", + "Er_percentage = (Rt-Rx)/Rx*100;\n", + "print \"percentage error = \", Er_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "apparent value of resistance (ohm) = 20000.0\n", + "true value of resistance(ohm) 23076.9230769\n", + "percentage error = -13.3333333333\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate apparent resistance, actual resistance and error\n", + "\n", + "# Variables\n", + "Et = 40.;\n", + "It = 800.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Rt = Et/It;\n", + "print \"apparent value of resistance (ohm) = \", Rt\n", + "Rv = 1000.*150;\n", + "Rx = Rt*Rv/(Rv-Rt);\n", + "print \"true value of resistance(ohm)\", Rx\n", + "Er_percentage = ((Rt-Rx)/Rx)*100;\n", + "print \"percentage error = \", Er_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "apparent value of resistance (ohm) = 50.0\n", + "true value of resistance(ohm) 50.0166722241\n", + "percentage error = -0.0333333333333\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the error and percentage error in the measurement of deflection\n", + "\n", + "# Variables\n", + "l = 0.2;\n", + "E = 200*10**9;\n", + "b = 20.*10**-3;\n", + "d = 5.*10**-3;\n", + "D = (4.*l**3)/(E*b*d**3);\n", + "F = 1*9.81;\n", + "\n", + "# Calculations and Results\n", + "x_true = D*F;\n", + "print \"True value of deflection\", x_true\n", + "x_indicated = D*10.31/(1+.1*D);\n", + "print \"Indicated value of deflection\", x_indicated\n", + "Er = x_indicated-x_true;\n", + "print \"error = \", Er\n", + "Er_percentage = Er*100/x_true;\n", + "print \"Percentage error = \", Er_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "True value of deflection 0.00062784\n", + "Indicated value of deflection 0.000659835777051\n", + "error = 3.1995777051e-05\n", + "Percentage error = 5.09616734375\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#to find the mean,deviations from the mean, Average deviation, standard deviation and variance\n", + "\n", + "x = [532. ,548, 543, 535, 546, 531, 543, 536];\n", + "X = sum(x);\n", + "n = 8; \n", + "a = 0.;\n", + "\n", + "# Calculations and Results\n", + "Mean = X/n;\n", + "print \"mean (kHZ)\", X/n\n", + "d = []\n", + "for i in range(n):\n", + " d.append(x[i]-Mean)\n", + " print \"deviations = \", d[i]\n", + " a = a+(abs(d[i]))\n", + " \n", + "d_average = a/n;\n", + "print \"Average deviation (kHz) = \", d_average\n", + "d_2 = sum(array(d)**2);\n", + "s = math.sqrt(d_2/(n-1))\n", + "print \"standard deviation(kHz)\", s\n", + "V = s**2;\n", + "print \"varaince (kHZ)2 = \", V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean (kHZ) 539.25\n", + "deviations = -7.25\n", + "deviations = 8.75\n", + "deviations = 3.75\n", + "deviations = -4.25\n", + "deviations = 6.75\n", + "deviations = -8.25\n", + "deviations = 3.75\n", + "deviations = -3.25\n", + "Average deviation (kHz) = 5.75\n", + "standard deviation(kHz) 6.54107898482\n", + "varaince (kHZ)2 = 42.7857142857\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 Page No : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import array\n", + "#to find the mean,standard deviation, probable error and range\n", + "\n", + "# Variables\n", + "x = [41.7, 42, 41.8, 42, 42.1, 41.9, 42, 41.9, 42.5, 41.8];\n", + "X = sum(x) \n", + "print X\n", + "d = [-.27, .03, -.17, .03, .13, -.07, .03, -.07, .53, -.17];\n", + "\n", + "# Calculations and Results\n", + "d_2 = sum(array(d)**2);\n", + "n = 10.;\n", + "print \"mean length(deg C)\", X/n\n", + "print \"standard deviation(if data is infinite)(deg C)\", math.sqrt(d_2/n)\n", + "print \"standard deviation(deg C)\", math.sqrt(d_2/(n-1))\n", + "r1 = .6745*math.sqrt(d_2/(n-1));\n", + "print \"probable error of 1 reading(deg C)\", r1\n", + "print \"probable error of mean(deg C)\", r1/math.sqrt(n-1)\n", + "print \"range(deg C)\", max(x)-min(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "419.7\n", + "mean length(deg C) 41.97\n", + "standard deviation(if data is infinite)(deg C) 0.21\n", + "standard deviation(deg C) 0.221359436212\n", + "probable error of 1 reading(deg C) 0.149306939725\n", + "probable error of mean(deg C) 0.0497689799083\n", + "range(deg C) 0.8\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#to find the arithematic mean, maen deviation,standard deviation, prpobable error of 1 reading, standard deviation and probable error of mean, standard deviation of standard deviation\n", + "\n", + "# Variables\n", + "T = [397, 398, 399, 400, 401, 402, 403, 404, 405];\n", + "f = [1, 3, 12, 23, 37, 16, 4, 2, 2];\n", + "\n", + "# Calculations and Results\n", + "Tf = sum(abs(array(T).transpose()*f));\n", + "print \"mean temp(deg C)\", Tf/sum(f)\n", + "d = [-3.78, -2.78, -1.78, -.78, .22, 1.22, 2.22, 3.22, 4.22];\n", + "d = array(d)\n", + "print \"mean deviation(deg C)\", sum(array(f).transpose()*d)/sum(f)\n", + "print \"standard deviation(deg C)\", math.sqrt(sum(array(f).transpose()*d**2)/sum(f))\n", + "print \"probable error of 1 reading(deg C)\", .6745*math.sqrt(sum(array(f).transpose()*d**2)/sum(f))\n", + "print \"probable error of mean(deg C)\", (.6745*math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f))\n", + "print \"standard deviation of mean(deg C)\", (math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f))\n", + "print \"standard deviation of standard deviation(deg C)\", (math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f)*2)\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " mean temp(deg C) 400\n", + "mean deviation(deg C) -1.7763568394e-17\n", + "standard deviation(deg C) 1.38260623462\n", + "probable error of 1 reading(deg C) 0.932567905249\n", + "probable error of mean(deg C) 0.0932567905249\n", + "standard deviation of mean(deg C) 0.138260623462\n", + "standard deviation of standard deviation(deg C) 0.0977650244208\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#to find probable no of resistors\n", + "\n", + "# Variables\n", + "x = .15; #deviation \n", + "o = .1; #standard deviation\n", + "t = x/o;\n", + "A = .4432 #area under gaussian curve corresponding to t\n", + "\n", + "# Calculations\n", + "n = 2*A*1000;\n", + "\n", + "# Results\n", + "print \"no of resistors\", math.floor(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of resistors 886.0\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 Page No : 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find no of 100 rsding exceed 30mm\n", + "\n", + "# Variables\n", + "x = 30-26.3; #mean value 26.3\n", + "r = 2.5;\n", + "o = r/.6745;\n", + "t = x/o;\n", + "A = .3413;#area under gaussian curve corresponding to t\n", + "\n", + "# Calculations\n", + "n = 2*A*100;\n", + "nn = 100-math.floor(n);\n", + "\n", + "# Results\n", + "print \"no of readings exceed\", nn/2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of readings exceed 16.0\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 Page No : 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find no of rods of desired length\n", + "\n", + "# Variables\n", + "n = 25000.; #no of rods\n", + "n1 = 12500.; #length>10mm\n", + "n2 = 2000.; #length>10.25\n", + "a = n1-n2; #101.96:\n", + " print \"rejected value\", x[i]\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 0.49953805 0.18672828 1.84653522 0.56337678 2.04762722 0.26014282\n", + " 0.76127684 0.04309114 0.31440574 0.21864765]\n", + "rejected value 0.00433\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#calculate standard deviation\n", + "\n", + "# Variables\n", + "x = array([.9 ,2.3, 3.3, 4.5, 5.7, 6.7]);\n", + "y = array([1.1, 1.6, 2.6, 3.2, 4 ,5]);\n", + "n = 6.;\n", + "\n", + "# Calculations\n", + "a = ((n*sum(x*y)-(sum(x)*sum(y)))/((sum(x**2)*n)-sum(x)**2));\n", + "b = ((sum(y)*sum(x**2)-(sum(x)*sum(x*y)))/((sum(x**2)*n)-sum(x)**2));\n", + "\n", + "sdy = math.sqrt((1/n)*sum((a*x+b-y)**2));\n", + "sdx = sdy/a;\n", + "\n", + "sa = math.sqrt(n/(n*sum(x**2)-sum(x)**2))*sdy;\n", + "sb = math.sqrt(sum(x**2)/(n*sum(x**2)-sum(x)**2))*sdy;\n", + "\n", + "# Results\n", + "print \"s_a\", sa\n", + "print \"s_b\", sb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "s_a 0.0354898238647\n", + "s_b 0.155116651415\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.34 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#determine value of total current considering errors as limiting errors ans as smath.radians(numpy.arcmath.tan(rd deviations\n", + "\n", + "# Variables\n", + "I1 = 200.;\n", + "I2 = 100.;\n", + "dI1 = 2.;\n", + "dI2 = 5.;\n", + "\n", + "# Calculations and Results\n", + "I = I1+I2;\n", + "dI = ((I1/I)*(dI1/I1)+(I2/I)*(dI2/I2));\n", + "print \"error considered as limiting errors\"\n", + "print \"I\", I\n", + "print \"dI\", dI*I\n", + "sdI = math.sqrt(dI1**2+dI2**2);\n", + "print \"error considered as standard deviations\"\n", + "print \"I\", I\n", + "print \"sdI\", sdI\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error considered as limiting errors\n", + "I 300.0\n", + "dI 7.0\n", + "error considered as standard deviations\n", + "I 300.0\n", + "sdI 5.38516480713\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.35 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#determine probable error in the computed value of resistnce\n", + "\n", + "# Variables\n", + "r_V = 12.;\n", + "I = 10.;\n", + "r_Rv = r_V/I;\n", + "V = 100.;\n", + "r1 = 2.;\n", + "\n", + "# Calculations\n", + "r_Ri = V*r1/I**2;\n", + "r_R = math.sqrt(r_Rv**2+r_Ri**2);\n", + "\n", + "# Results\n", + "print \"r_R\", r_R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "r_R 2.33238075794\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.37 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find Cq and its possible errors\n", + "\n", + "# Variables\n", + "d = 12.5;\n", + "A = (math.pi/4)*d**2*10**-6;\n", + "W = 392.;\n", + "t = 600.;\n", + "p = 1000.;\n", + "g = 9.81;\n", + "h = 3.66;\n", + "\n", + "# Calculations and Results\n", + "Cq = W/(t*p*A*math.sqrt(2*g*h));\n", + "print \"Cq\", Cq\n", + "dW = .23/W;\n", + "dt = 2/t;\n", + "dp = .1/100;\n", + "dA = 2*.002;\n", + "dg = .1/100;\n", + "dh = .003/h;\n", + "dd = .002;\n", + "dCq = Cq*(dW+dt+dp+dA+dg/2+dh/2);\n", + "print \"%age absolute error\", dCq*100/Cq\n", + "\n", + "sdCq = Cq*math.sqrt(dW**2+dt**2+dp**2+4*dd**2+.25*(dg**2+dh**2));\n", + "print \"%age standard deviation error\", sdCq*100/Cq\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cq 0.628253425224\n", + "%age absolute error 0.982990409278\n", + "%age standard deviation error 0.537339132325\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.38 Page No : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 110.2;\n", + "I = 5.3;\n", + "\n", + "# Calculations and Results\n", + "P = V*I\n", + "print \"power(W) dissipated\", P\n", + "w_v = .2;\n", + "w_i = 0.06;\n", + "dp = math.sqrt((w_v*I)**2+(w_i*V)**2);\n", + "print \"uncertainity in power(%)\", dp*100/P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power(W) dissipated 584.06\n", + "uncertainity in power(%) 1.14653078526\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.39 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find uncertainity in combined resistance in both series and in parrallel\n", + "\n", + "# Variables\n", + "R1 = 100.;\n", + "R2 = 50.;\n", + "wR1 = .1;\n", + "wR2 = 0.03;\n", + "\n", + "# Calculations and Results\n", + "print \"series conn\"\n", + "R = R1+R2\n", + "print \"resistance(ohm)\", R\n", + "dR1 = 1;\n", + "dR2 = 1;\n", + "wR = math.sqrt((dR1*wR1)**2+(dR2*wR2)**2)\n", + "print \"uncertainity in resistance(ohm)\", wR\n", + "\n", + "print \"parrallel conn\"\n", + "R = R1*R2*(R1+R2)**-1\n", + "print \"resistance(ohm)\", R\n", + "dR1 = (R2/(R1+R2))-((R1*R2)/(R1+R2)**2);\n", + "dR2 = (R1/(R1+R2))-((R1*R2)/(R1+R2)**2);\n", + "wR = math.sqrt((dR1*wR1)**2+(dR2*wR2)**2)\n", + "print \"uncertainity in resistance(ohm)\", wR\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "series conn\n", + "resistance(ohm) 150.0\n", + "uncertainity in resistance(ohm) 0.104403065089\n", + "parrallel conn\n", + "resistance(ohm) 33.3333333333\n", + "uncertainity in resistance(ohm) 0.0173561103909\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.40 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to calculate uncertainity in measurement\n", + "\n", + "# Variables\n", + "l = 150;\n", + "dl = 0.01;\n", + "b = 50;\n", + "\n", + "# Calculations and Results\n", + "wA = l*dl;\n", + "print \"when no uncertainity in measurement of length\"\n", + "print \"uncertainity in measurement of area(m*m)\", wA\n", + "\n", + "print \"when no certainity in measurement of length\"\n", + "wA = 1.5*1.5;\n", + "wB = 0.01;\n", + "wL = math.sqrt((wA**2-(l*wB)**2)/b**2);\n", + "print \"uncertainity in measurement of length(m)\", wL\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when no uncertainity in measurement of length\n", + "uncertainity in measurement of area(m*m) 1.5\n", + "when no certainity in measurement of length\n", + "uncertainity in measurement of length(m) 0.0335410196625\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.41 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to calculate uncertainity in power\n", + "\n", + "# Variables\n", + "E = 100.;\n", + "dE = .01;\n", + "I = 10.;\n", + "dI = 0.01;\n", + "R = 10.;\n", + "dR = .01;\n", + "\n", + "# Calculations and Results\n", + "dP = math.sqrt(4*dE**2+dR**2)*100; #P = E**2/R\n", + "print \"%age uncertainity in power measurement\", dP\n", + "\n", + "dP = math.sqrt(dE**2+dI**2)*100; #P = E*I\n", + "print \"%age uncertainity in power measurement\", dP\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "%age uncertainity in power measurement 2.2360679775\n", + "%age uncertainity in power measurement 1.41421356237\n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb new file mode 100755 index 00000000..fd3f3073 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb @@ -0,0 +1,940 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4dacb9cd40c034de14bd116989b8eaf4736b7fcde46866cbd61e09de312f6cad" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Dynamic Characteristics of Instruments and Measurement systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# calculating the temperature after 1.5 s\n", + "\n", + "# Variables\n", + "th0 = 100.;\n", + "t = 1.5;\n", + "tc = 3.5;\n", + "\n", + "# Calculations\n", + "th = th0*(1-math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"temperature after 1.5 s (degree C)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature after 1.5 s (degree C) 34.8560942469\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# calculate time to read half of the temperature difference\n", + "# Variables\n", + "tc = 10./5;\n", + "th = 1.;\n", + "th0 = 2.;\n", + "\n", + "# Calculations\n", + "t = -tc*math.log(1-(th/th0));\n", + "\n", + "# Results\n", + "print \"Time to read half of the temperature difference (s)\", t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time to read half of the temperature difference (s) 1.38629436112\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the temperature after 10s\n", + "\n", + "# Variables\n", + "th0 = 25;\n", + "thi = 150;\n", + "t = 10.;\n", + "tc = 6;\n", + "\n", + "# Calculations\n", + "th = th0+(thi-th0)*(math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"the temperature after 10s (degree C)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temperature after 10s (degree C) 48.6094503547\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the value of resistance after 15s\n", + "\n", + "# Variables\n", + "R0 = 29.44;\n", + "Rs = 100.;\n", + "t = 15.;\n", + "tc = 5.5;\n", + "\n", + "# Calculations\n", + "R_15 = Rs+R0*(1-math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"value of resistance after 15s(ohm)\", R_15\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of resistance after 15s(ohm) 127.514700449\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the depth after one hour\n", + "\n", + "# Variables\n", + "Qm = 0.16*10**-3;\n", + "Hin = 1.2;\n", + "K1 = Qm/(Hin)**0.5;\n", + "Qo = 0.2*10**-3;\n", + "Ho = (Qo/K1)**2;\n", + "R = Hin/Qm;\n", + "C = 0.1;\n", + "tc = R*C;\n", + "t = 3600;\n", + "\n", + "# Calculations\n", + "H = Ho+(Hin-Ho)*math.exp(-t/tc);\n", + "\n", + "# Results\n", + "print \"the depth after one hour(m)\", H\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the depth after one hour(m) 1.86944492074\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Calculate time constant\n", + "\n", + "# Variables\n", + "S = 3.5;\n", + "Ac = (math.pi/4)*(0.25)**2;\n", + "alpha = 0.18*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Vb = S*Ac/alpha;\n", + "print \"volume of bulb(mm2)\", Vb\n", + "\n", + "Rb = ((Vb/math.pi)*(3/.4))**(1./3);\n", + "Ab = 4*math.pi*Rb**2;\n", + "D = 13.56*10**3;\n", + "s = 139;\n", + "H = 12;\n", + "tc = (D*s*Vb*10**-9)/(H*Ab*10**-6);\n", + "print \"time constant (s)\", tc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "volume of bulb(mm2) 954.476934684\n", + "time constant (s) 68.8965695836\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "ess = 5;\n", + "A = 0.1;\n", + "\n", + "# Calculations\n", + "tc = ess/A;\n", + "\n", + "# Results\n", + "print \"time constant(s)\", tc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time constant(s) 50.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the temperature at a depth of 1000 m\n", + "\n", + "# Variables\n", + "th0 = 20.;\n", + "t = 2000.;\n", + "\n", + "# Calculations\n", + "thr = th0-0.005*(t-50)-0.25*math.exp(-t/50);\n", + "\n", + "# Results\n", + "print \"temperature at a depth of 1000 m (degree C)\", thr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature at a depth of 1000 m (degree C) 10.25\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the value of resistance at different values of time\n", + "\n", + "# Variables\n", + "Gain = 0.3925;\n", + "T = 75.;\n", + "p_duration = Gain*T;\n", + "tc = 5.5;\n", + "Rin = 100.;\n", + "t = 1;\n", + "\n", + "# Calculations and Results\n", + "Rt = p_duration*(1-math.exp(-t/tc))+Rin;\n", + "print \"Value of resistance after 1s(ohm) = \", Rt\n", + "t = 2;\n", + "Rt = p_duration*(1-math.exp(-t/tc))+Rin;\n", + "print \"Value of resistance after 2s(ohm) = \", Rt\n", + "t = 3;\n", + "Rt = p_duration*(1-math.exp(-t/tc))+Rin;\n", + "print \"Value of resistance after 3s(ohm) = \", Rt\n", + "R_inc = Rt-Rin;\n", + "t = 5;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 5s(ohm) = \", Rt\n", + "t = 10;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 10s(ohm) = \", Rt\n", + "t = 20;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 20s(ohm) = \", Rt\n", + "t = 30;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 30s(ohm) = \", Rt" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance after 1s(ohm) = 104.893898474\n", + "Value of resistance after 2s(ohm) = 108.974200608\n", + "Value of resistance after 3s(ohm) = 112.376164418\n", + "Value of resistance after 5s(ohm) = 108.603215552\n", + "Value of resistance after 10s(ohm) = 103.46615228\n", + "Value of resistance after 20s(ohm) = 100.562627957\n", + "Value of resistance after 30s(ohm) = 100.091326114\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "M = 8*10**-3;\n", + "K = 1000.;\n", + "\n", + "# Calculations and Results\n", + "wn = (K/M)**0.5;\n", + "print \"for critically damped system eta = 1\",\n", + "B = 2*(K*M);\n", + "print \"Damping constant for critically damped system (N/ms-1) = \", B\n", + "eta = 0.6;\n", + "wd = wn*(1-eta**2)**0.5;\n", + "print \"frequency of damped oscillations (rad/s) = \", wd\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for critically damped system eta = 1 Damping constant for critically damped system (N/ms-1) = 16.0\n", + "frequency of damped oscillations (rad/s) = 282.842712475\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "K = (40.*10**-6)/(math.pi/2);\n", + "J = 0.5*10**-6;\n", + "B = 5.*10**-6;\n", + "\n", + "# Calculations and Results\n", + "eta = B/(2*(K*J)**0.5);\n", + "print \"damping ratio = \", eta\n", + "wn = (K/J)**0.5;\n", + "print \"natural frequency (rad/sec)\", wn\n", + "wd = wn*(1-(eta)**2)**0.5;\n", + "print \"frequency of damped oscillations (rad/s)\", wd\n", + "tc = 1/wn;\n", + "print \"time constant (s)\", tc\n", + "ess = 2*eta/wn;\n", + "print \" steady state error (V) = \", \"for a ramp input of 5V\"\n", + "ess = 5*2*eta/wn;\n", + "print \"\", ess\n", + "T_lag = 2*eta*tc;\n", + "print \"Time lag (s)\", T_lag\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "damping ratio = 0.70062390205\n", + "natural frequency (rad/sec) 7.13649646461\n", + "frequency of damped oscillations (rad/s) 5.09210975819\n", + "time constant (s) 0.14012478041\n", + " steady state error (V) = for a ramp input of 5V\n", + " 0.981747704247\n", + "Time lag (s) 0.196349540849\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the natural frequency \n", + "\n", + "# Variables\n", + "wn = 2*math.pi*30;\n", + "print \" for a frequency of 30 Hz wn = (K/M+5*10**-3)**0.5.........(i)\",\n", + "print \"But wn = (K/M)**0.5.........(ii)\",\n", + "print \"for a frequency of 25 Hz wn = (K/M+5*10**-3+5*10**-3)**0.5.........(iii) \",\n", + "print \" (ii) and (iii)\", \"on solving (i)\"\n", + "\n", + "# Calculations and Results\n", + "M = 6.36*10**-3;\n", + "K = 403.6;\n", + "print \"M = \", M\n", + "print \"K = \", K\n", + "wn = (K/M)**0.5;\n", + "f = wn/(2*math.pi);\n", + "print \"natural frequency (Hz)\", f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " for a frequency of 30 Hz wn = (K/M+5*10**-3)**0.5.........(i) But wn = (K/M)**0.5.........(ii) for a frequency of 25 Hz wn = (K/M+5*10**-3+5*10**-3)**0.5.........(iii) (ii) and (iii) on solving (i)\n", + "M = 0.00636\n", + "K = 403.6\n", + "natural frequency (Hz) 40.0928706266\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "K = 60.*10**3;\n", + "M = 30.;\n", + "\n", + "# Calculations and Results\n", + "wn = (K/M)**0.5;\n", + "print \"natural frequency (rad/sec)\", wn\n", + "eta = 0.7;\n", + "ts = 4/(eta*wn);\n", + "print \"setteling time (s)\", ts\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "natural frequency (rad/sec) 44.72135955\n", + "setteling time (s) 0.127775313\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate time lag and ratio of output and input\n", + "\n", + "# Variables\n", + "print \"when time period is 600s\"\n", + "w = 2*math.pi/600;\n", + "tc = 60.;\n", + "\n", + "# Calculations and Results\n", + "T_lag = (1/w)*math.atan(w*tc);\n", + "print \"time lag (s) = \", T_lag\n", + "M = 1/((1+(w*tc)**2)**0.5);\n", + "print \"ratio of output and input = \", M\n", + "print \"when time period is 120s\",\n", + "w = 2*math.pi/120;\n", + "tc = 60;\n", + "T_lag = (1/w)*math.atan(w*tc);\n", + "print \"time lag (s) = \", T_lag\n", + "M = 1/((1+(w*tc)**2)**0.5);\n", + "print \"ratio of output and input = \", M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when time period is 600s\n", + "time lag (s) = 53.5698460589\n", + "ratio of output and input = 0.846733015965\n", + "when time period is 120s time lag (s) = 24.1144042829\n", + "ratio of output and input = 0.303314471053\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 Page No : 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the maximum allowable time constant and phase shift\n", + "\n", + "# Variables\n", + "M = 1-0.05;\n", + "w = 2*math.pi*100;\n", + "\n", + "# Calculations and Results\n", + "tc = (((1/M**2)-1)/(w**2))**0.5;\n", + "print \"maximum allowable time constant (s)\", tc\n", + "print \"phase shift at 50 Hz (degree) = \",\n", + "ph = (-math.atan(2*math.pi*50*tc))*(180/math.pi);\n", + "print ph\n", + "print \"phase shift at 100 Hz (degree) = \",\n", + "ph = (-math.atan(2*math.pi*100*tc))*(180/math.pi);\n", + "print ph\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum allowable time constant (s) 0.00052311700055\n", + "phase shift at 50 Hz (degree) = -9.33268272936\n", + "phase shift at 100 Hz (degree) = -18.1948723388\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate maximum value of indicated temperature and delay time\n", + "\n", + "# Variables\n", + "T = 120.;\n", + "w = 2*math.pi/T;\n", + "tc1 = 40.;\n", + "tc2 = 20.;\n", + "\n", + "# Calculations and Results\n", + "M = (1/((1+(w*tc1)**2)**0.5))*(1/((1+(w*tc2)**2)**0.5));\n", + "M_temp = M*10;\n", + "print \"maximum value of indicated temperature (degree C)\", M_temp\n", + "ph = ((math.atan(w*tc1)+math.atan(w*tc2)));\n", + "T_lag = ph/w;\n", + "print \"Time lag (s)\", T_lag\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of indicated temperature (degree C) 2.975684577\n", + "Time lag (s) 36.9326231389\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Find the output \n", + "print \"when tc = 0.2\",\n", + "print \"output = 1/(1+(2*0.2)**2)**0.5]math.sin[2t-math.atan(2*0.2)]+3/(1+(2*0.2)**2)**0.5]math.sin[20t-math.atan(20*0.2)]\",\n", + "print \"on solving output = 0.93 math.sin(2t-21.8)+0.073 math.sin(20t-76)\",\n", + "print \"when tc = 0.002\",\n", + "print \"output = 1/(1+(2*0.002)**2)**0.5]math.sin[2t-math.atan(2*0.002)]+3/(1+(2*0.002)**2)**0.5]math.sin[20t-math.atan(20*0.002)]\",\n", + "print \"on solving output = 1math.sin(2t-0.23)+0.3 math.sin(20t-2.3)\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when tc = 0.2 output = 1/(1+(2*0.2)**2)**0.5]math.sin[2t-math.atan(2*0.2)]+3/(1+(2*0.2)**2)**0.5]math.sin[20t-math.atan(20*0.2)] on solving output = 0.93 math.sin(2t-21.8)+0.073 math.sin(20t-76) when tc = 0.002 output = 1/(1+(2*0.002)**2)**0.5]math.sin[2t-math.atan(2*0.002)]+3/(1+(2*0.002)**2)**0.5]math.sin[20t-math.atan(20*0.002)] on solving output = 1math.sin(2t-0.23)+0.3 math.sin(20t-2.3)\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Calculate maximum and minimum value of indicated temperature, phase shift, time lag \n", + "\n", + "# Variables\n", + "T_max = 640.;\n", + "T_min = 600.;\n", + "T_mean = (T_max+T_min)/2;\n", + "Ai = T_mean-T_min;\n", + "w = 2*math.pi/80;\n", + "tc = 10;\n", + "\n", + "# Calculations and Results\n", + "Ao = Ai/((1+(w*tc)**2))**0.5;\n", + "T_max_indicated = T_mean+Ao;\n", + "print \"Maximum value of indicated temperature(degree C) = \", T_max_indicated\n", + "T_min_indicated = T_mean-Ao;\n", + "print \"Minimum value of indicated temperature(degree C) = \", T_min_indicated\n", + "ph = -math.atan(w*tc);\n", + "Time_lag = -ph/w;\n", + "print \"Time lag (s)\", Time_lag\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of indicated temperature(degree C) = 635.728782002\n", + "Minimum value of indicated temperature(degree C) = 604.271217998\n", + "Time lag (s) 8.47689466383\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 Page No : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# determine damping ratio\n", + "\n", + "\n", + "# Variables\n", + "w = 2.;\n", + "K = 1.5;\n", + "J = 200.*10**-3;\n", + "wn = (K/J)**0.5;\n", + "u = w/wn;\n", + "M = 1.1;\n", + "\n", + "# Calculations and Results\n", + "eta = (((1/(M**2))-((1-u**2)**2))/(2*u)**2)**0.5;\n", + "print \"damping ratio = \", eta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "damping ratio = 0.534147321328\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 Page No : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the frequency range\n", + "\n", + "# Variables\n", + "eta = 0.6;\n", + "fn = 1000;\n", + "M = 1.1;\n", + "print \"M = 1/[[(1-u**2)**2]+(2*u*eta)**2]**0.5 ..........(i)\",\n", + "print \"on solving u**4-0.5u**2+0.173 = 0\",\n", + "print \"the above equation gives imaginary values for frequency so for eta = 0.6 the output is not 1.1\",\n", + "print \" on solving equation (i) we have\", \"Now let M = 0.9\"\n", + "print \"u**4-0.56u**2-0.234 = 0\",\n", + "print \"on solving u = 0.916\",\n", + "\n", + "# Calculations and Results\n", + "u = 0.916;\n", + "f = u*fn;\n", + "print \"maximum value of range (Hz) = \", f\n", + "print \" the range of the frequency is from 0 to 916 Hz\", \"So\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M = 1/[[(1-u**2)**2]+(2*u*eta)**2]**0.5 ..........(i) on solving u**4-0.5u**2+0.173 = 0 the above equation gives imaginary values for frequency so for eta = 0.6 the output is not 1.1 on solving equation (i) we have Now let M = 0.9\n", + "u**4-0.56u**2-0.234 = 0 on solving u = 0.916 maximum value of range (Hz) = 916.0\n", + " the range of the frequency is from 0 to 916 Hz So\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# determine the error\n", + "\n", + "# Variables\n", + "w = 6.;\n", + "wn = 4.;\n", + "u = w/wn;\n", + "eta = 0.66;\n", + "\n", + "# Calculations\n", + "M = 1/(((1-u**2)**2)+(2*eta*u)**2)**0.5;\n", + "Error = (M-1)*100;\n", + "\n", + "# Results\n", + "print \"error (%) = \", Error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error (%) = -57.2934157194\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb new file mode 100755 index 00000000..6eb31891 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb @@ -0,0 +1,2140 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dcab5285f135b4dffae4292e0eb7017128ede4af1f4e78fe0491e5a728481399" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Primary Sensing Elements and Transducers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "D = 15.*10**-3;\n", + "P = 300.*10**3;\n", + "sm = 300.*10**6;\n", + "\n", + "# Calculations and Results\n", + "t = (3*D**2*P/(16*sm))**0.5;\n", + "print \" thickness(m) = \", t\n", + "P = 150*10**3;\n", + "v = 0.28;\n", + "E = 200*10**9;\n", + "dm = 3*(1-v**2)*D**4*P/(256*E*t**3);\n", + "print \" deflection at center for Pressure of 150 kN/m2(m) = \", dm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " thickness(m) = 0.000205395959064\n", + " deflection at center for Pressure of 150 kN/m2(m) = 4.73232289684e-05\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "T = 100.;\n", + "G = 80.*10**9;\n", + "d = 2.*15*10**-3;\n", + "\n", + "# Calculations\n", + "th = 16*T/(math.pi*G*d**3)\n", + "\n", + "# Results\n", + "print \" angle of twist(rad) = \", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " angle of twist(rad) = 0.000235785100877\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "E = 110*10**9;\n", + "t = 0.073*10**-3;\n", + "b = 0.51*10**-3;\n", + "l = 370*10**-3;\n", + "\n", + "# Calculations\n", + "th = math.pi/2;\n", + "T = (E*b*t**3)*th/(12*l);\n", + "\n", + "# Results\n", + "print \" Controlling torque(Nm) = \", T\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Controlling torque(Nm) = 7.72090748389e-06\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Rnormal = 10000./2;\n", + "Rpl = 10000./50;\n", + "Rc1 = Rnormal-3850;\n", + "\n", + "# Calculations and Results\n", + "Dnormal = Rc1/Rpl;\n", + "print \"Displacement(mm) = \", Dnormal\n", + "Rc2 = Rnormal-7560;\n", + "Dnormal = Rc2/Rpl;\n", + "print \"Displacement(mm) = \", Dnormal\n", + "print \"since one lacement is positive and other is negative so two lacements are in the opposite direction\"\n", + "Re = 10*1./200;\n", + "print \"Resolution (mm) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displacement(mm) = 5.75\n", + "Displacement(mm) = -12.8\n", + "since one lacement is positive and other is negative so two lacements are in the opposite direction\n", + "Resolution (mm) = 0.05\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot\n", + "\n", + "# Variables\n", + "# plot the graph of error versus K\n", + "K = [0, 0.25, 0.5, 0.75, 1];\n", + "V = [0, -0.174, -0.454, -0.524, 0];\n", + "\n", + "# Results\n", + "plot(K,V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 8, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG6pJREFUeJzt3XmUFOXVx/HvCCLyGiGIsoooi4ArLqBRoAWMuAQTPagk\nUYyamKCRY2KiaIxjfBVZh0WBERSXGCXGRAXcQGg0iuhERBB5FZQTQAYRxBHEBHTeP2630zQ9M91d\n3bX+Puf0mW6mpupSDLdvP89Tt0BERERERERERERERERERERERERERAJuILAK+AC4McP3uwKLga+A\n37oYl4iIFEEDYDXQAdgXeBvolrbNwcBJwP+ixC8i4rl9HP58TyzxrwV2AY8D56dtsxmoSHxfREQ8\n5jTxtwXWpbxen/gzERHxKaeJv7ogUYiIiGsaOvz5DcChKa8Pxar+nHXs2LF6zZ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fj4EngfWJ15+6FZzLsjkXG4EDE88PxBL/bpfic9srwGd1fD+nvOl24m+LrfJJWp/4\ns/q2CWPCy+ZcpLqSmnf0MMn2d+J8YGridbULcXkhm3PRGVtYsRCoAC51JzTXZXMupgNHAR9jwxvD\n3QnNl3LKm25/LMr2P2xJnj8XJLn8nc4ArgBOK1IsXsrmPEzALvyrxn430n8/wiKbc7EvdjFkf+wq\n+MXYx/oPihiXF7I5FzdjQ0AxoCN2welxwBfFC8vXss6bbif+DcChKa8PpeYja23btEv8Wdhkcy7A\nJnSnY2P8dX3UC6pszsOJ2Ed9sLHcs7GP/88UPTp3ZXMu1mHDOzsTj5exZBe2xJ/NufgecGfi+Rrs\nYtEjsU9CUePrvNkQ+wfqADSi/sndUwjnhCZkdy7aY+OcYW5lnc15SDWT8K7qyeZcdMWun2mAVfzL\nge7uheiabM7FeOC2xPOW2BtDc5fi80IHspvc9WXePBv4PyyhjUj82dWJR9I9ie8vwz7WhlV952IG\nNmG1NPF4w+0AXZLN70RSmBM/ZHcubsBW9iwHrnM1OnfVdy5aALOxPLEcm/gOq8ewuYz/Yp/6riC6\neVNERERERERERERERERERERERERERERERERExL/+H8kNkIiUDlrEAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "RAB = 125.;\n", + "Rtotal = 5000.;\n", + "R2 = 75/125.*Rtotal;\n", + "R4 = 2500.;\n", + "ei = 5.;\n", + "\n", + "# Calculations\n", + "eo = ((R2/Rtotal)-(R4/Rtotal))*ei;\n", + "\n", + "# Results\n", + "print \"output voltage (V) = \", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage (V) = 0.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rm = 10000.;\n", + "Rp = Rm/15.;\n", + "R = 600.;\n", + "P = 5.;\n", + "\n", + "# Calculations and Results\n", + "ei = (P*R)**0.5;\n", + "print \"Maximum excitation voltage (V) = \", ei\n", + "S = ei/360;\n", + "print \"Sensitivity (V/degree) = \", S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum excitation voltage (V) = 54.7722557505\n", + "Sensitivity (V/degree) = 0.152145154863\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rwga = 1./400;\n", + "\n", + "# Calculations\n", + "Re = Rwga/5;\n", + "\n", + "# Results\n", + "print \"Resolution (mm) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution (mm) = 0.0005\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "mo = 0.8;\n", + "sr = 250;\n", + "sm = sr/mo;\n", + "\n", + "# Calculations and Results\n", + "R = sm*1;\n", + "print \"resolution of 1mm movement\", R\n", + "Rq = 300/1000;\n", + "print \"resolution required = \", Rq\n", + "print \"since the resolution of potentiometer is higher than the resolution required so it is suitable for the application\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution of 1mm movement 312.5\n", + "resolution required = 0\n", + "since the resolution of potentiometer is higher than the resolution required so it is suitable for the application\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations and Results\n", + "Pd = (10.**2)/150;\n", + "print \"Power dissipation (W) = \", Pd\n", + "th_pot = 80.+Pd*30*10**-3;\n", + "PDa = 1-(10*10**-3)*(th_pot-35);\n", + "print \"Power dissipation allowed(W) = \", PDa\n", + "print \"Since power dissipation is higher than the dissipation allowed so potentiometer is not suitable\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipation (W) = 0.666666666667\n", + "Power dissipation allowed(W) = 0.5498\n", + "Since power dissipation is higher than the dissipation allowed so potentiometer is not suitable\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Gf = 4.2;\n", + "\n", + "# Calculations\n", + "v = (Gf-1)/2;\n", + "\n", + "# Results\n", + "print \"Possion s ratio = \", v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Possion s ratio = 1.6\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "strain = -5.*10**-6;\n", + "Gf = -12.1;\n", + "R = 120.;\n", + "\n", + "# Calculations and Results\n", + "dR_nickel = Gf*R*strain;\n", + "print \"change in resistance of nickel(ohm) = \", dR_nickel\n", + "Gf = 2;\n", + "R = 120;\n", + "dR_nicrome = Gf*R*strain;\n", + "print \"change in resistance of nicrome(ohm) = \", dR_nicrome\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in resistance of nickel(ohm) = 0.00726\n", + "change in resistance of nicrome(ohm) = -0.0012\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s = 100.*10**6;\n", + "E = 200.*10**9;\n", + "\n", + "# Calculations\n", + "strain = s/E;\n", + "Gf = 2;\n", + "r_perunit = Gf*strain*100;\n", + "\n", + "# Results\n", + "print \"Percentage change in resistance = \", r_perunit\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage change in resistance = 0.1\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "b = 0.02;\n", + "d = 0.003;\n", + "I = (b*d**3)/12;\n", + "E = 200*10**9;\n", + "x = 12.7*10**-3;\n", + "l = 0.25;\n", + "F = 3*E*I*x/l**3;\n", + "x = 0.15;\n", + "M = F*x;\n", + "t = 0.003;\n", + "\n", + "# Calculations\n", + "s = (M*t)/(I*2);\n", + "strain = s/E;\n", + "dR = 0.152;\n", + "R = 120;\n", + "Gf = (dR/R)/strain;\n", + "\n", + "# Results\n", + "print \"Gauge factor = \", Gf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gauge factor = 2.30873918538\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "dR = 0.013;\n", + "R = 240;\n", + "l = 0.1;\n", + "Gf = 2.2;\n", + "\n", + "# Calculations and Results\n", + "dl = (dR/R)*l/Gf;\n", + "print \"change in length(m) = \", dl\n", + "strain = dl/l;\n", + "E = 207*10**9;\n", + "s = E*strain;\n", + "A = 4*10**-4;\n", + "F = s*A;\n", + "print \"Force(N)\", F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in length(m) = 2.46212121212e-06\n", + "Force(N) 2038.63636364\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "th1 = 30.;\n", + "th2 = 60.;\n", + "th0 = th1+th2/2;\n", + "Rth1 = 4.8;\n", + "Rth2 = 6.2;\n", + "Rth0 = 5.5;\n", + "\n", + "# Calculations\n", + "ath0 = (1/Rth0)*(Rth2-Rth1)/(th2-th1);\n", + "\n", + "# Results\n", + "print \"alpha at o degree(/degree C) = \", ath0\n", + "print \"5.5[1+0.0085(th-45)]\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha at o degree(/degree C) = 0.00848484848485\n", + "5.5[1+0.0085(th-45)]\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "th1 = 100.;\n", + "th2 = 130.;\n", + "\n", + "# Calculations\n", + "th0 = th1+th2/2;\n", + "Rth1 = 573.40;\n", + "Rth2 = 605.52;\n", + "Rth0 = 589.48;\n", + "ath0 = (1/Rth0)*(Rth2-Rth1)/(th2-th1);\n", + "\n", + "# Results\n", + "print \"alpha at o degree(/degree C) = \", ath0\n", + "print \"Linear approximation is: Rth = 589.48[1+0.00182(th-115)]\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha at o degree(/degree C) = 0.00181629006356\n", + "Linear approximation is: Rth = 589.48[1+0.00182(th-115)]\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rth0 = 100.;\n", + "ath0 = 0.00392;\n", + "dth = 65.-25;\n", + "\n", + "# Calculations and Results\n", + "R65 = Rth0*(1+ath0*dth);\n", + "print \"resistance at 65 degree C(ohm) = \", R65\n", + "\n", + "th = (((150./100)-1)/ath0)+25;\n", + "print \"Temperature (degree C)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at 65 degree C(ohm) = 115.68\n", + "Temperature (degree C) 152.551020408\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rth0 = 10;\n", + "ath0 = 0.00393;\n", + "dth = 150-20;\n", + "\n", + "# Calculations\n", + "R150 = Rth0*(1+ath0*dth);\n", + "\n", + "# Results\n", + "print \"resistance at 150 degree C(ohm) = \", R150\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at 150 degree C(ohm) = 15.109\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "th = 30.;\n", + "th0 = 50.;\n", + "tc = 120.;\n", + "\n", + "# Calculations\n", + "t = -120*(math.log(1-(th/th0)));\n", + "\n", + "# Results\n", + "print \"time(s) = \", t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time(s) = 109.954887825\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R25 = 100;\n", + "ath = -0.05;\n", + "dth = 35-25;\n", + "\n", + "# Calculations\n", + "R35 = R25*(1+ath*dth);\n", + "\n", + "# Results\n", + "print \"resistance at 35 degree C(ohm) = \", R35\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at 35 degree C(ohm) = 50.0\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page No : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Ro = 3980.;\n", + "Ta = 273.;\n", + "\n", + "# Calculations and Results\n", + "print \"3980 = a*3980*math.exp(b/273)\",\n", + "Rt50 = 794;\n", + "Ta50 = 273+50;\n", + "print \"794 = a*3980*math.exp(b/323)\",\n", + "print \"on solving\",\n", + "print \" b = 2843\", \"a = 30*10**-6\"\n", + "Ta40 = 273+40;\n", + "Rt40 = (30*10**-6)*3980*math.exp(2843./313);\n", + "print \"resistance at 40 degree C (ohm)\", Rt40\n", + "Rt100 = (30*10**-6)*3980*math.exp(2843./373);\n", + "print \"resistance at 100 degree C (ohm)\", Rt100\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3980 = a*3980*math.exp(b/273) 794 = a*3980*math.exp(b/323) on solving b = 2843 a = 30*10**-6\n", + "resistance at 40 degree C (ohm) 1051.3086649\n", + "resistance at 100 degree C (ohm) 243.887690913\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "th = ((1-1800./2000)/0.05)+70;\n", + "dth = th-70;\n", + "\n", + "# Results\n", + "print \"change in temperature (degree C)\", dth\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in temperature (degree C) 2.0\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page No : 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C = 500.*10**-12;\n", + "R20 = 10000.*(1-0.05*(20-25));\n", + "\n", + "# Calculations and Results\n", + "f20 = 1/(2*math.pi*R20*C);\n", + "print \"Frequency of oscillation at 20 degree C (Hz)\", f20\n", + "R25 = 10000*(1-0.05*(25-25));\n", + "f25 = 1./(2*math.pi*R25*C);\n", + "print \"Frequency of oscillation at 25 degree C (Hz)\", f25\n", + "R30 = 10000*(1-0.05*(30-25));\n", + "f30 = 1./(2*math.pi*R30*C);\n", + "print \"Frequency of oscillation at 30 degree C (Hz)\", f30\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillation at 20 degree C (Hz) 25464.7908947\n", + "Frequency of oscillation at 25 degree C (Hz) 31830.9886184\n", + "Frequency of oscillation at 30 degree C (Hz) 42441.3181578\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations and Results\n", + "Se_thermocouple = 500-(-72);\n", + "print \"Sensitivity of thermocouple (micro V/degree C) = \", Se_thermocouple\n", + "Vo = Se_thermocouple*100*10**-6;\n", + "print \"maximum output voltage(V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sensitivity of thermocouple (micro V/degree C) = 572\n", + "maximum output voltage(V) = 0.0572\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculations and results\n", + "ET = 27.07+0.8;\n", + "print 'Required e.m.f.(mV)',ET\n", + "print \"temperature corresponding to 27.87 mV is 620 degree C\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required e.m.f.(mV) 27.87\n", + "temperature corresponding to 27.87 mV is 620 degree C\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rm = 50;\n", + "Re = 12;\n", + "\n", + "# Calculations and Results\n", + "E = 33.3*10**-3;\n", + "i = 0.1*10**-3;\n", + "Rs = (E/i)-Rm-Re;\n", + "print \"series resistance (ohm) = \", Rs\n", + "Re = 13;\n", + "i1 = E/(Rs+Re+Rm);\n", + "AE = ((i1-i)/i)*800;\n", + "print \"approximate error due to rise in resistance of 1 ohm in Re (degree C) = \", AE\n", + "R_change = 50*0.00426*10;\n", + "i1 = E/(Rs+Re+Rm+R_change);\n", + "AE = ((i1-i)/i)*800;\n", + "print \"approximate error due to rise in Temp. of 10 (degree C) = \", AE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "series resistance (ohm) = 271.0\n", + "approximate error due to rise in resistance of 1 ohm in Re (degree C) = -2.39520958084\n", + "approximate error due to rise in Temp. of 10 (degree C) = -7.44949870586\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E_20 = 0.112*10**-3;# emf at 20degree C\n", + "E_900 = 8.446*10**-3;\n", + "E_1200 = 11.946*10**-3;\n", + "\n", + "# Calculations and Results\n", + "E1 = E_900-E_20;\n", + "E2 = E_1200-E_20;\n", + "print \"E1 = 1.08*R1/(R1+2.5+R2) (i)\",\n", + "print \"E2 = 1.08*(R1+2.5)/(R1+2.5+R2) (ii)\",\n", + "print \"on solving (i) and (ii)\",\n", + "R1 = 5.95;\n", + "R2 = 762.6;\n", + "print \"value of resistance R1 (ohm) = \", R1\n", + "print \"value of resistance R2 (ohm) = \", R2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E1 = 1.08*R1/(R1+2.5+R2) (i) E2 = 1.08*(R1+2.5)/(R1+2.5+R2) (ii) on solving (i) and (ii) value of resistance R1 (ohm) = 5.95\n", + "value of resistance R2 (ohm) = 762.6\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "linearity_percentage = (0.003/1.5)*100;\n", + "\n", + "# Results\n", + "print \"percentage linearity = \", linearity_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage linearity = 0.2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "print \"lacement = 0.5\"\n", + "Vo = 2.*10**-3;\n", + "Se_LVDT = Vo\n", + "print \"lacement \"\n", + "print \"senstivity of the LVDT (V/mm)\", Se_LVDT\n", + "\n", + "# Calculations and Results\n", + "Af = 250.;\n", + "Se_instrument = Se_LVDT*Af;\n", + "print \"senstivity of instrument (V/mm)\", Se_instrument\n", + "sd = 5./100;\n", + "Vo_min = 50./5;\n", + "Re_instrument = 1*1/1000;\n", + "print \"resolution of instrument in mm\", Re_instrument\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lacement = 0.5\n", + "lacement \n", + "senstivity of the LVDT (V/mm) 0.002\n", + "senstivity of instrument (V/mm) 0.5\n", + "resolution of instrument in mm 0\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "b = 0.02;\n", + "t = 0.004;\n", + "I = (1./12)*b*t**3;\n", + "F = 25.;\n", + "l = 0.25;\n", + "E = 200.*10**9;\n", + "\n", + "# Calculations and Results\n", + "x = (F*l**3)/(3*E*I);\n", + "print \"deflection (m)\", x\n", + "DpF = x/F;\n", + "Se = DpF*0.5*1000;\n", + "Re = (10./1000)*(2./10);\n", + "F_min = Re/Se;\n", + "F_max = 10/Se;\n", + "print \"minimum force (N)\", F_min\n", + "print \"maximum force (N)\", F_max\n", + "print \"\", Se\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "deflection (m) 0.006103515625\n", + "minimum force (N) 0.016384\n", + "maximum force (N) 81.92\n", + " 0.1220703125\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"permittivity of the air e0 = 8.85*10**-12\"\n", + "# Variables\n", + "e0 = 8.85*10**-12;\n", + "w = 25*10**-3;\n", + "\n", + "# Calculations\n", + "d = 0.25*10**-3;\n", + "Se = -4*e0*w/d;\n", + "\n", + "# Results\n", + "print \"sensitivity of the transducer (F/m) = \", Se\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "permittivity of the air e0 = 8.85*10**-12\n", + "sensitivity of the transducer (F/m) = -3.54e-09\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C1 = 370*10**-12;\n", + "d1 = 3.5*10**-3;\n", + "\n", + "# Calculations\n", + "d2 = 2.9*10**-3;\n", + "C2 = C1*d1/d2;\n", + "\n", + "# Results\n", + "print \"the value of the capacitance afte the application of pressure (F) = \", C2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of the capacitance afte the application of pressure (F) = 4.46551724138e-10\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "fo1 = 100.*10**3;\n", + "d1 = 4.;\n", + "d2 = 3.7;\n", + "\n", + "# Calculations\n", + "fo2 = ((d2/d1)**0.5)*fo1;\n", + "dfo = fo1-fo2;\n", + "\n", + "# Results\n", + "print \"change in frequency of the oscillator (Hz)\", dfo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in frequency of the oscillator (Hz) 3823.07969164\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "L_air = (3.1-3)/2;\n", + "D_stress = 100/L_air;\n", + "e0 = 8.85*10**-12;\n", + "l = 20.*10**-3;\n", + "D2 = 3.1;\n", + "D1 = 3;\n", + "\n", + "# Calculations and Results\n", + "C = (2*math.pi)*e0*l/(math.log(D2/D1));\n", + "print \"capacitance(F) = \", C\n", + "l = (20*10**-3)-(2*10**-3);\n", + "C_new = (2*math.pi)*e0*l/(math.log(D2/D1));\n", + "C_change = C-C_new;\n", + "print \"change in capacitance(F) = \", C_change\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance(F) = 3.39167370734e-11\n", + "change in capacitance(F) = 3.39167370734e-12\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "M = 0.95;\n", + "w = 2.*math.pi*20;\n", + "\n", + "# Calculations and Results\n", + "tc = (1/w)*((M**2)/(1-M**2))**0.5;\n", + "print \"time constant (s)\", tc\n", + "ph = ((math.pi/2)-(math.atan(w*tc)))*(180/math.pi);\n", + "print \"phase shift(deg)\", ph\n", + "C = (8.85*10**-12*300*10**-6)/(0.125*10**-3);\n", + "R = tc/C;\n", + "print \"series resistance (ohm)\", R\n", + "M = 1./(1+(1./(2*math.pi*5*tc)**2))**0.5;\n", + "print \"amplitude ratio = \", M\n", + "Eb = 100;\n", + "x = 0.125*10**-3;\n", + "Vs = Eb/x;\n", + "print \"voltage sensitivity (V/m)\", Vs\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time constant (s) 0.0242109278459\n", + "phase shift(deg) 18.1948723388\n", + "series resistance (ohm) 1139874192.37\n", + "amplitude ratio = 0.605390338483\n", + "voltage sensitivity (V/m) 800000.0\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "e0 = 8.85*10**-12;\n", + "A = 500*10**-6;\n", + "d = 0.2*10**-3;\n", + "C = e0*A/d;\n", + "d1 = 0.18*10**-3;\n", + "C_new = e0*A/d1;\n", + "\n", + "# Calculations and Results\n", + "C_change = C_new-C;\n", + "Ratio = (C_change/C)/(0.02/0.2);\n", + "print \"ratio of per unit change of capacitance to per unit change of diaplacement\", Ratio\n", + "d1 = 0.19*10**-3;\n", + "e1 = 1;\n", + "d2 = 0.01*10**-3;\n", + "e2 = 8;\n", + "C = (e0*A)/((d1/e1)+(d2/e2));\n", + "d1_new = 0.17*10**-3;\n", + "C_new = (e0*A)/((d1_new/e1)+(d2/e2));\n", + "C_change = C_new-C;\n", + "Ratio = (C_change/C)/(0.02/0.2);\n", + "print \"ratio of per unit change of capacitance to per unit change of diaplacement\", Ratio\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of per unit change of capacitance to per unit change of diaplacement 1.11111111111\n", + "ratio of per unit change of capacitance to per unit change of diaplacement 1.16788321168\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "g = 0.055;\n", + "t = 2*10**-3;\n", + "P = 1.5*10**6;\n", + "\n", + "# Calculations and Results\n", + "Eo = g*t*P;\n", + "print \"output voltage(V) = \", Eo\n", + "e = 40.6*10**-12;\n", + "d = e*g;\n", + "print \"charge sensitivity (C/N) = \", d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage(V) = 165.0\n", + "charge sensitivity (C/N) = 2.233e-12\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "g = 0.055;\n", + "t = 1.5*10**-3;\n", + "Eo = 100;\n", + "\n", + "# Calculations\n", + "P = Eo/(g*t);\n", + "A = 25.*10**-6;\n", + "F = P*A;\n", + "\n", + "# Results\n", + "print \"Force(N) = \", F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force(N) = 30.303030303\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 25.*10**-6;\n", + "F = 5.;\n", + "P = F/A;\n", + "d = 150*10**-12;\n", + "e = 12.5*10**-9;\n", + "g = d/(e);\n", + "t = 1.25*10**-3;\n", + "\n", + "# Calculations\n", + "Eo = (g*t*P);\n", + "strain = P/(12*10**6);\n", + "Q = d*F;\n", + "C = Q/Eo;\n", + "\n", + "# Results\n", + "print \"strain = \", strain\n", + "print \"charge(C) = \", Q\n", + "print \"capacitance(F) = \", C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strain = 0.0166666666667\n", + "charge(C) = 7.5e-10\n", + "capacitance(F) = 2.5e-10\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = 2.*10**-12;\n", + "t = 1.*10**-3;\n", + "Fmax = 0.01;\n", + "e0 = 8.85*10**-12;\n", + "er = 5.;\n", + "\n", + "# Calculations and Results\n", + "A = 100*10**-6;\n", + "Eo_peak_to_peak = 2*d*t*Fmax/(e0*er*A);\n", + "print \"peak voltage swing under open conditions\", Eo_peak_to_peak\n", + "Rl = 100*10**6;\n", + "Cl = 20*10**-12;\n", + "d1 = 1*10**-3;\n", + "Cp = e0*er*A/d1;\n", + "C = Cp+Cl;\n", + "w = 1000;\n", + "m = (w*Cp*Rl/(1+(w*C*Rl)**2)**0.5);\n", + "El_peak_to_peak = (2*d*t*Fmax/(e0*er*A))*m;\n", + "\n", + "print \"peak voltage swing under loaded conditions\", El_peak_to_peak\n", + "E = 90*10**9;\n", + "dt = 2*Fmax*t/(A*E);\n", + "print \"maximum change in crystal thickness (m)\", dt\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak voltage swing under open conditions 0.0090395480226\n", + "peak voltage swing under loaded conditions 0.00151556405344\n", + "maximum change in crystal thickness (m) 2.22222222222e-12\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "M = 0.95;\n", + "tc = 1.5*10**-3;\n", + "\n", + "# Calculations and Results\n", + "w = (1/tc)*((M**2)/(1-M**2))**0.5;\n", + "print \"minimum frequency (rad/s)\", w\n", + "ph = ((math.pi/2)-(math.atan(w*tc)))*(180/math.pi);\n", + "print \"phase shift(deg)\", ph\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum frequency (rad/s) 2028.2899482\n", + "phase shift(deg) 18.1948723388\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.45 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Kq = 40.*10**-3;\n", + "Cp = 1000.*10**-12;\n", + "\n", + "# Calculations and Results\n", + "K = Kq/Cp;\n", + "print \"sensitivity of the transducer(V/m)\", K\n", + "Cc = 300*10**-12;\n", + "Ca = 50*10**-12;\n", + "C = Cp+Cc+Ca;\n", + "Hf = Kq/C;\n", + "print \"high frequency sensitivity (V/m)\", Hf\n", + "R = 1*10**6;\n", + "tc = R*C;\n", + "M = 0.95;\n", + "w = (1/tc)*((M**2)/(1-M**2))**0.5;\n", + "f = w/(2*math.pi);\n", + "print \"minimum frequency (s)\", w\n", + "print \"now f = 10Hz\",\n", + "f = 10;\n", + "w = 2*math.pi*f;\n", + "tc = (1/w)*((M**2)/(1-M**2))**0.5;\n", + "C_new = tc/R;\n", + "Ce = C_new-C;\n", + "print \"external shunt capacitance(F)\", Ce\n", + "Hf_new = Kq/C_new;\n", + "print \"new value of high frequency sensitivity (V/m)\", Hf_new\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sensitivity of the transducer(V/m) 40000000.0\n", + "high frequency sensitivity (V/m) 29629629.6296\n", + "minimum frequency (s) 2253.655498\n", + "now f = 10Hz external shunt capacitance(F) 4.70718556919e-08\n", + "new value of high frequency sensitivity (V/m) 826073.256145\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.46 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#\n", + "\n", + "# Variables\n", + "R = 10.**6;\n", + "C = 2500.*10**-12;\n", + "tc = R*C;\n", + "t = 2.*10**-3;\n", + "d = 100.*10**-12;\n", + "\n", + "# Calculations and Results\n", + "F = 0.1;\n", + "el = 10.**3*(d*F*(math.exp(-t/tc))/C);\n", + "print \"voltage just before t = 2ms (mV)\", el\n", + "el_after = 10.**3*(d*F*(math.exp(-t/tc)-1)/C);\n", + "print \"voltage just after t = 2ms (mV)\", el_after\n", + "print \"when t = 10ms\",\n", + "t = 10.*10**-3;\n", + "T = 2.*10\n", + "e_10 = 10.**3*(d*F*(math.exp((-T/tc)-1))*(math.exp(-(t-T))/tc)/C)\n", + "print \"output voltage 10 ms after the application of impulse(mV) \", e_10\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage just before t = 2ms (mV) 1.79731585647\n", + "voltage just after t = 2ms (mV) -2.20268414353\n", + "when t = 10ms output voltage 10 ms after the application of impulse(mV) 0.0\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.47 Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# to prove time constant should be approximately 20T to keep undershoot within 5%\n", + "# Variables\n", + "print \"Let T = 1\",\n", + "T = 1.;\n", + "el = 0.95;\n", + "\n", + "# Calculations\n", + "tc = -T/math.log(el);\n", + "\n", + "# Results\n", + "print \"time constant\", tc\n", + "print \"as T = 1 so time constant should be approximately equal to 20T\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Let T = 1 time constant 19.4957257462\n", + "as T = 1 so time constant should be approximately equal to 20T\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.48 Page No : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Kh = -1*10**-6;\n", + "I = 3;\n", + "B = 0.5;\n", + "\n", + "# Calculations\n", + "t = 2.*10**-3;\n", + "Eh = Kh*I*B/t;\n", + "\n", + "# Results\n", + "print \"output voltage (V)\", Eh\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage (V) -0.00075\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.49 Page No : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations\n", + "Th_wavelength = 1.24*10**-6/1.8\n", + "\n", + "# Results\n", + "print \"Threshold wavelength (m)\", Th_wavelength\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold wavelength (m) 6.88888888889e-07\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.50 Page No : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E_imparted = (1.24*10**-6)/(0.2537*10**-6);\n", + "B_energy = E_imparted-4.30;\n", + "em_ratio = 0.176*10**12;\n", + "\n", + "# Calculations\n", + "v = (2*B_energy*em_ratio)**0.5;\n", + "\n", + "# Results\n", + "print \"maximum velocity of emitted photo electrons (m/s)\", v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum velocity of emitted photo electrons (m/s) 454815.603242\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.51 Page No : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Ri = 30;\n", + "Rf = 100;\n", + "t = 10.;\n", + "tc = 72.;\n", + "\n", + "# Calculations\n", + "Rt = Ri+(Rf-Ri)*(1-math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"resistance of the cell (K ohm)\", Rt\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance of the cell (K ohm) 39.0772691917\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.52 Page No : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "I_power = 250*0.2*10**-6;\n", + "print \"incident power (W)\", I_power\n", + "\n", + "Rl = 10.*10**3;\n", + "C = 2.*10**-12;\n", + "fc = 1./(2*math.pi*Rl*C);\n", + "print \"cut off frequency (Hz)\", fc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "incident power (W) 5e-05\n", + "cut off frequency (Hz) 7957747.15459\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.53 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I = 2.2*10**-3;\n", + "Eo = 0.33;\n", + "Rl = 100.;\n", + "\n", + "# Calculations and Results\n", + "Ri = (Eo/I)-100;\n", + "print \"internal resistance of cell (ohm)\", Ri\n", + "Vo = 0.33*(math.log(25)/math.log(10));\n", + "print \"open circuit voltage for a radiant incidence of 25 W/m2 (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "internal resistance of cell (ohm) 50.0\n", + "open circuit voltage for a radiant incidence of 25 W/m2 (V) = 0.461320202862\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.54 Page No : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "A = 1935*10**-6;\n", + "r = 0.914;\n", + "S_angle = A/r**2;\n", + "I = 180.;\n", + "\n", + "# Calculations\n", + "L_flux = I*S_angle;\n", + "\n", + "# Results\n", + "print \"lumnious flux = \", L_flux\n", + "print \"Corresponding to lumnious flux o.417 lm and a load resistance of 800 ohm the current is 120 micro Ampere\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lumnious flux = 0.416928019765\n", + "Corresponding to lumnious flux o.417 lm and a load resistance of 800 ohm the current is 120 micro Ampere\n" + ] + } + ], + "prompt_number": 63 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb new file mode 100755 index 00000000..2166ed92 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb @@ -0,0 +1,1358 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:918235f4b2bfd4a24a1f3adb5ce3a07d29dd6848cf00df31612a375f1aec5802" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Signal Conditioning" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 100.;\n", + "R1 = 1.*10**3;\n", + "\n", + "# Calculations\n", + "Rf = -A*R1;\n", + "\n", + "# Results\n", + "print \"feedback resistance (ohm) = \", Rf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "feedback resistance (ohm) = -100000.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rf = 10.;\n", + "R1 = 1.;\n", + "Avol = 200000.;\n", + "\n", + "# Calculations\n", + "A = -(Rf/R1)*(1./(1.+(1./Avol)*((R1+Rf)/R1)));\n", + "\n", + "# Results\n", + "print \"closed loop gain = \", A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "closed loop gain = -9.99945003025\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations and Results\n", + "Sa = 10;\n", + "print \" saturation voltage = \", Sa\n", + "Vom = Sa;\n", + "print \"maximum output voltage\", Vom\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " saturation voltage = 10\n", + "maximum output voltage 10\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vos = 5.*10**-3;\n", + "Rf = 10.;\n", + "R1 = 1.;\n", + "\n", + "# Calculations\n", + "Vo = -Vos*(1+Rf/R1);\n", + "\n", + "# Results\n", + "print \"output voltage due to offset voltage (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage due to offset voltage (V) = -0.055\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rf = 10.;\n", + "R1 = 1;\n", + "\n", + "# Calculations\n", + "A = Rf/R1;\n", + "\n", + "# Results\n", + "print \"Amplification Factor = \", A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplification Factor = 10.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V1 = 1.;\n", + "V2 = -2.;\n", + "Rf = 500.;\n", + "R1 = 250.;\n", + "R2 = 100.;\n", + "\n", + "# Calculations\n", + "Vo = -(((Rf/R1)*V1)+((Rf/R2)*V2));\n", + "\n", + "# Results\n", + "print \"output voltage(V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage(V) = 8.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rf = 100.*10**3;\n", + "R1 = 1*10**3;\n", + "\n", + "# Calculations and Results\n", + "A = Rf/R1;\n", + "print \"Gain = \", A\n", + "print \"If multiplier is 10\",\n", + "A = 10;\n", + "Rf = A*R1;\n", + "print \" feedback resistance (Ohm) = \", Rf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 100.0\n", + "If multiplier is 10 feedback resistance (Ohm) = 10000\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "g = 10.;\n", + "Rf = 10.;\n", + "\n", + "# Calculations and Results\n", + "R1 = Rf/g;\n", + "print \"resistance R1(Kilo-ohms) = \", R1\n", + "R2 = Rf/(0.5*g);\n", + "print \"resistance R1(Kilo-ohms) = \", R2\n", + "R3 = Rf/(0.333*g);\n", + "print \"resistance R1(Kilo-ohms) = \", R3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance R1(Kilo-ohms) = 1.0\n", + "resistance R1(Kilo-ohms) = 2.0\n", + "resistance R1(Kilo-ohms) = 3.003003003\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Voramp = -10;\n", + "print \"if voltage source is 10V then RC = 1 ms and if C = 1 micro-F\"\n", + "\n", + "# Calculations\n", + "C = 1;\n", + "R = 1*10**-3*10**6;\n", + "\n", + "# Results\n", + "print \"value of resistance (ohm) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if voltage source is 10V then RC = 1 ms and if C = 1 micro-F\n", + "value of resistance (ohm) = 1000.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V2 = 5.*10**-3;\n", + "V1 = 3.*10**-3;\n", + "Vo = 300.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Vd = V2-V1;\n", + "Ad = Vo/Vd;\n", + "print \"difference mode gain = \", Ad\n", + "V2 = 155*10**-3;\n", + "V1 = 153*10**-3;\n", + "Vo = Ad*(V2-V1);\n", + "print \"output voltage (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference mode gain = 150.0\n", + "output voltage (V) = 0.3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 3.;\n", + "Vd = 30.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Ad = Vo/Vd;\n", + "print \"difference mode gain = \", Ad\n", + "Vo = 5.*10**-3;\n", + "Vc = 500.*10**-3;\n", + "Ac = Vo/Vc;\n", + "print \"Common mode gain = \", Ac\n", + "CMRR = Ad/Ac;\n", + "print \"Common mode rejection ratio = \", CMRR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference mode gain = 100.0\n", + "Common mode gain = 0.01\n", + "Common mode rejection ratio = 10000.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V2 = 30.*10**-3;\n", + "V1 = -30.*10**-3;\n", + "Vd = V2-V1;\n", + "Ad = 150.;\n", + "Vos = Ad*Vd;\n", + "Ac = 0.04;\n", + "Vc = 600.*10**-3;\n", + "\n", + "# Calculations\n", + "Von = Ac*Vc;\n", + "SNR = Vos/Von;\n", + "CMRR = Ad/Ac;\n", + "\n", + "# Results\n", + "print \"Signal to Noise Ratio = \", SNR\n", + "\n", + "print \"CMRR = \", CMRR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal to Noise Ratio = 375.0\n", + "CMRR = 3750.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page No : 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ci = 10.*10**-12;\n", + "Vi = 10.;\n", + "Eo = 8.85*10**-12;\n", + "\n", + "# Calculations and Results\n", + "A = 200.*10**-6;\n", + "K = -Ci*Vi/(Eo*A);\n", + "print \"sensitivity (V/mm) = \", K\n", + "d = 1*10**-6;\n", + "Vo = K*d;\n", + "print \"output voltage (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sensitivity (V/mm) = -56497.1751412\n", + "output voltage (V) = -0.0564971751412\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations and Results\n", + "MXtc = 10.**10*1000*10**-12;\n", + "print \"Maximum time constant (s)\", MXtc\n", + "MNtc = 10.**8*10*10**-12;\n", + "print \"Minimum time constant (s)\", MNtc\n", + "AR = 0.95;\n", + "fmin = (AR)/(2*math.pi*MXtc*(1-AR**2)**0.5);\n", + "print \"minimum frequency (Hz)\", fmin\n", + "fmax = (AR)/(2*math.pi*MNtc*(1-AR**2)**0.5);\n", + "print \"Maximum frequency (Hz)\", fmax\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum time constant (s) 10.0\n", + "Minimum time constant (s) 0.001\n", + "minimum frequency (Hz) 0.0484218556919\n", + "Maximum frequency (Hz) 484.218556919\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "g = 0.501;\n", + "f = 50;\n", + "\n", + "# Calculations and Results\n", + "w = 2*math.pi*f;\n", + "tc = (1-g**2)**0.5/(w*g);\n", + "print \"time constant (s)\", tc\n", + "R = 10000;\n", + "C = (tc/R)*10**6;\n", + "print \"capacitance (micro-F)\", C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time constant (s) 0.00549861130167\n", + "capacitance (micro-F) 0.549861130167\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R1 = 10.*10**3;\n", + "R2 = 1.*10**6;\n", + "\n", + "# Calculations and Results\n", + "A = R2/(R1+R2);\n", + "print \"gain = \", A\n", + "C2 = (0.01)*10**-6;\n", + "C1 = 100.*10**-12;\n", + "fcl = 1./(2*math.pi*C2*R2);\n", + "print \"lower cut off frequency (Hz)\", fcl\n", + "fcu = 1./(2*math.pi*R1*C1);\n", + "print \"upper cut off frequency (Hz)\", fcu\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gain = 0.990099009901\n", + "lower cut off frequency (Hz) 15.9154943092\n", + "upper cut off frequency (Hz) 159154.943092\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R = 1.*10**6;\n", + "fo = 10.*10**3;\n", + "\n", + "# Calculations\n", + "C = 1/(2*math.pi*fo*R);\n", + "\n", + "# Results\n", + "print \"the value of C (F)\", C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of C (F) 1.59154943092e-11\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 Page No : 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Rt = 100.;\n", + "K = 1.;\n", + "\n", + "# Calculations and Results\n", + "Rb = K*Rt;\n", + "ei = 10;\n", + "print \"When K = 1\"\n", + "eo = ((K*Rt/Rb)/(1+(K*Rt/Rb)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "Se = (ei*Rb)/((Rb+K*Rt)**2);\n", + "print \"sensitivity (V/ohm) = \", Se\n", + "K = 0.95;\n", + "print \"When K = 0.95\",\n", + "eo = ((K*Rt/Rb)/(1+(K*Rt/Rb)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "Se = (ei*Rb)/((Rb+K*Rt)**2);\n", + "print \"sensitivity (V/ohm) = \", Se\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When K = 1\n", + "output voltage (V) = 5.0\n", + "sensitivity (V/ohm) = 0.025\n", + "When K = 0.95 output voltage (V) = 4.87179487179\n", + "sensitivity (V/ohm) = 0.0262984878369\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20 Page No : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "ei = 100.;\n", + "K = 0.25;\n", + "print \"When K = 0.25\"\n", + "\n", + "# Calculations and Results\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "K = 0.5;\n", + "print \"When K = 0.5\",\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "K = 0.6;\n", + "print \"When K = 0.6\",\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "K = 0.8;\n", + "print \"When K = 0.8\",\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When K = 0.25\n", + "output voltage (V) = 4.0\n", + "When K = 0.5 output voltage (V) = 7.69230769231\n", + "When K = 0.6 output voltage (V) = 9.09090909091\n", + "When K = 0.8 output voltage (V) = 11.7647058824\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21 Page No : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R2 = 119;\n", + "R3 = 119.7;\n", + "R1 = 120.4;\n", + "R4 = R2*R3/R1;\n", + "R4 = 121.2;\n", + "ei = 12;\n", + "\n", + "# Calculations\n", + "eo = ((R1*R4-R2*R3)/((R1+R3)*(R2+R4)))*ei;\n", + "\n", + "# Results\n", + "print \" output voltage (V) = \", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " output voltage (V) = 0.0724469161996\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "ei = 6.;\n", + "R = 10000.;\n", + "print \"if dR = 0.05R\"\n", + "\n", + "# Calculations and Results\n", + "dR = 0.05*R;\n", + "eo = ((dR/R)/(4+2*(dR/R)))*ei;\n", + "print \"output voltage (V)\", eo\n", + "print \"if dR = -0.05R\"\n", + "dR = -0.05*R;\n", + "eo = ((dR/R)/(4+2*(dR/R)))*ei;\n", + "print \"output voltage (V)\", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if dR = 0.05R\n", + "output voltage (V) 0.0731707317073\n", + "if dR = -0.05R\n", + "output voltage (V) -0.0769230769231\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23 Page No : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "R2 = 800;\n", + "R3 = 800;\n", + "R4 = 800;\n", + "Rm = 100;\n", + "R = 800.;\n", + "ei = 4;\n", + "\n", + "# Calculations\n", + "im = 0.8*10**-6;\n", + "dR = (im*R**2)*(4*(1+Rm/R))/ei;\n", + "R1 = R+dR;\n", + "\n", + "# Results\n", + "print \"resistance of unknown resistor (ohm) = \", R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance of unknown resistor (ohm) = 800.576\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 Page No : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R2 = 1000.;\n", + "R3 = 1000.;\n", + "R1 = 1010.;\n", + "R4 = 1000.;\n", + "ei = 100.;\n", + "\n", + "# Calculations and Results\n", + "eo = ((R1*R4-R2*R3)/((R1+R3)*(R2+R4)))*ei;\n", + "print \" open circuit voltage (V) = \", eo\n", + "Ro = (R1*R4/(R1+R4))+(R2*R3/(R2+R3));\n", + "Rm = 4000;\n", + "im = eo/(Ro+Rm);\n", + "print \"current (A) = \", im\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " open circuit voltage (V) = 0.248756218905\n", + "current (A) = 4.97265042268e-05\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 100.;\n", + "P = 250.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "i = (P/R)**0.5;\n", + "print \"maximum permissible current (A) = \", i\n", + "ei = 2*i*R;\n", + "print \"maximum supply voltage (V) = \", ei\n", + "Rs = 100.;\n", + "Ps = 10.**2/Rs;\n", + "print \"Power dissipation in series resistance (W)\", Ps\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum permissible current (A) = 0.05\n", + "maximum supply voltage (V) = 10.0\n", + "Power dissipation in series resistance (W) 1.0\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = (0.1/0.2)*10**-3;\n", + "R = 1000.;\n", + "eim = 2*(P*R)**0.5;\n", + "dth = 0.1;\n", + "\n", + "# Calculations\n", + "dR = (4.5/100)*dth*R;\n", + "eom = (dR/(4*R))*eim;\n", + "Sem = eom/dth;\n", + "\n", + "# Results\n", + "print \"maximum voltage sensitivity of the bridge (V) = \", Sem\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum voltage sensitivity of the bridge (V) = 0.0159099025767\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 Page No : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations and Results\n", + "Reso = 10.*10**-3/10;\n", + "print \"resolution of the instrument = \", Reso\n", + "n = 10.;\n", + "Q = 10/2**n;\n", + "Eq = Q/(2*3**0.5);\n", + "print \"quantization error = \", Eq\n", + "D = (2**n)-1;\n", + "print \"decesion levels = \", D\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution of the instrument = 0.001\n", + "quantization error = 0.00281909311128\n", + "decesion levels = 1023.0\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28 Page No : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ra = 10.;\n", + "b = 5.;\n", + "\n", + "# Calculations and Results\n", + "Wmsb = Ra/2;\n", + "print \"weight of MSB (V) = \", Wmsb\n", + "Wlsb = Ra/2**b;\n", + "print \"weight of LSB (V) = \", Wlsb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "weight of MSB (V) = 5.0\n", + "weight of LSB (V) = 0.3125\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E = 10.;\n", + "\n", + "# Calculations and Results\n", + "ER = E*256/255;\n", + "print \"Reference voltage (V) = \", ER\n", + "n = 8.;\n", + "CVlsb = (2**-n)*ER;\n", + "PC = CVlsb*100/E;\n", + "print \"Percentage change = \", PC\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference voltage (V) = 10.0392156863\n", + "Percentage change = 0.392156862745\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.30 Page No : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "n = 14.;\n", + "print \"number of bits = \", n\n", + "E = 10.;\n", + "Q = 10.;\n", + "LSB = E/2**n;\n", + "print \"Value of LSB (V) = \", LSB\n", + "Eq = Q/(2*(3**0.5));\n", + "print \"Quantization error (V) = \", Eq\n", + "fh = 1000.;\n", + "fs = 5*fh;\n", + "print \"minimum sampling rate (Hz) = \", fs\n", + "a = 1./16384;\n", + "ta = 1./(2*math.pi*fh)*a;\n", + "print \"Aperature time (s) = \", ta\n", + "Dr = 6*n;\n", + "print \"dynamic range (db) = \", Dr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of bits = 14.0\n", + "Value of LSB (V) = 0.0006103515625\n", + "Quantization error (V) = 2.88675134595\n", + "minimum sampling rate (Hz) = 5000.0\n", + "Aperature time (s) = 9.71404681957e-09\n", + "dynamic range (db) = 84.0\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ER = 10.;\n", + "n = 6.;\n", + "\n", + "# Calculations and Results\n", + "Imax = 10*10**-3;\n", + "R = ER*((2**n)-1)/((2**(n-2))*Imax);\n", + "print \"resistance (ohm) = \", R\n", + "LSB = ER/((2**(n-1))*R);\n", + "print \"smallest output current (A)\", LSB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance (ohm) = 3937.5\n", + "smallest output current (A) 7.93650793651e-05\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 6.;\n", + "R = 10000.;\n", + "Io = (10./10*10**3)*(1*1+1*0.5+1*0.25+0*0.125+1*0.0625)*10**-6;\n", + "Rf = 5000;\n", + "\n", + "# Calculations\n", + "Eo = -Io*Rf;\n", + "\n", + "# Results\n", + "print \"Output voltage (V) = \", Eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage (V) = -9.0625\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33 Page No : 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations and Results\n", + "print \"Set d3 = 1\"\n", + "Output = 5./2**1;\n", + "print \"since 3.217>2.5 so d3 = 1\"\n", + "print \"Set d2 = 1\"\n", + "Output = (5./2**1)+(5./2**2);\n", + "print \"since 3.217< 3.75 so d2 = 0\"\n", + "print \"Set d1 = 1\",\n", + "Output = (5./2**1)+(5./2**3);\n", + "print \"since 3.217>3.125 so d1 = 1\",\n", + "print \"Set d0 = 1\",\n", + "Output = (5./2**1)+(5./2**3)+(5./2**4);\n", + "print \"since 3.217<3.4375 so d0 = 0\",\n", + "print \"Output of successive approximation A/D = 1010\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Set d3 = 1\n", + "since 3.217>2.5 so d3 = 1\n", + "Set d2 = 1\n", + "since 3.217< 3.75 so d2 = 0\n", + "Set d1 = 1 since 3.217>3.125 so d1 = 1 Set d0 = 1 since 3.217<3.4375 so d0 = 0 Output of successive approximation A/D = 1010\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t = 400.;\n", + "T = t/4;\n", + "C = 1.*10**-6;\n", + "v = 20;\n", + "i = C*100*v/(T);\n", + "R = 1*10**3;\n", + "\n", + "# Calculations\n", + "e_o = i*R;\n", + "\n", + "# Results\n", + "print \"output voltage(V)\", e_o\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage(V) 0.02\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb new file mode 100755 index 00000000..b7ea5d39 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb @@ -0,0 +1,443 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f0558a3d67a6c58d34e0e0a67cd439be2d1883ea7cc3c2cdd41f8e1ab303c0ee" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Display Devices and recorders" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 4.;\n", + "\n", + "# Calculations and Results\n", + "R = 1./10**N;\n", + "print \"Resolution of the meter = \", R\n", + "VR = 1;\n", + "R1 = VR*R;\n", + "print \"Resolution of the meter for voltage range 1V = \", R1\n", + "VR1 = 10;\n", + "R2 = VR1*R;\n", + "print \"Resolution of the meter for voltage range 10V = \", R2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution of the meter = 0.0001\n", + "Resolution of the meter for voltage range 1V = 0.0001\n", + "Resolution of the meter for voltage range 10V = 0.001\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 3.;\n", + "\n", + "# Calculations and Results\n", + "R = 1./10**N;\n", + "print \"Resolution of the meter = \", R\n", + "print \"12.98 will be layed as 12.980 on 10V scale\"\n", + "VR = 1.;\n", + "R1 = VR*R;\n", + "print \"Resolution of the meter for voltage range 1V = \", R1\n", + "print \"0.6973 will be layed as 0.6973 on 1V scale\"\n", + "VR1 = 10;\n", + "R2 = VR1*R;\n", + "print \"Resolution of the meter for voltage range 10V = \", R2\n", + "print \"0.6973 will be layed as 00.697 on 10V scale\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution of the meter = 0.001\n", + "12.98 will be layed as 12.980 on 10V scale\n", + "Resolution of the meter for voltage range 1V = 0.001\n", + "0.6973 will be layed as 0.6973 on 1V scale\n", + "Resolution of the meter for voltage range 10V = 0.01\n", + "0.6973 will be layed as 00.697 on 10V scale\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 5.;\n", + "\n", + "# Calculations and Results\n", + "V = 0.005*R;\n", + "print \"0.5 percent of the reading\", V\n", + "TPE = V+0.01;\n", + "print \"Total possible error (V) = \", TPE\n", + "R1 = 0.10;\n", + "V1 = 0.005*R1;\n", + "TPE1 = V1+0.01;\n", + "print \"Total possible error (V) = \", TPE1\n", + "PE = (TPE1/0.1)*100;\n", + "print \"Percentage error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.5 percent of the reading 0.025\n", + "Total possible error (V) = 0.035\n", + "Total possible error (V) = 0.0105\n", + "Percentage error = 10.5\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 034;\n", + "t = 10.*10**-3;\n", + "\n", + "# Calculations\n", + "f = N/t;\n", + "\n", + "# Results\n", + "print \"frequency(Hz) = \", f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency(Hz) = 2800.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 5*10**6;\n", + "\n", + "# Calculations and Results\n", + "V = 0.00005*R;\n", + "print \"0.005 percent of the reading(micro sec) = \", V\n", + "LSD = 1;\n", + "ME = V+1;\n", + "print \"Maximum error (micro sec) = \", ME\n", + "R = 500;\n", + "V = 0.00005*R;\n", + "print \"0.005 percent of the reading(sec) = \", V\n", + "LSD = 1;\n", + "ME = V+1;\n", + "print \"Maximum error (sec) = \", ME\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.005 percent of the reading(micro sec) = 250.0\n", + "Maximum error (micro sec) = 251.0\n", + "0.005 percent of the reading(sec) = 0.025\n", + "Maximum error (sec) = 1.025\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "D = 8.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "A = D**2;\n", + "print \"A = \", A\n", + "J = 8*10**-3;\n", + "K = 16*10**-3;\n", + "B = 4*J*K;\n", + "print \"B = \", B\n", + "print \"since A Chapter No 1 : Semiconductor Materials and\n", - "Their Properties

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3, Page No 37 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Finding Density of silicon crystal\n", - "\n", - "#initialisation of variables\n", - "a=5.3 #in \u00c5\n", - "a=a*10**-10 #in m\n", - "N_A=6.023*10**23 \n", - "At_Si=28 #atomic weight of Si\n", - "n = 4\n", - "m=At_Si/N_A #in gm\n", - "m= m*10**-3 #in kg\n", - "V=a**3 #in m^3\n", - "\n", - "#CALCULATIONS\n", - "Rho=((m*n)/V)/1000 #in kg/m^3\n", - "\n", - "# Note: There is calculation error to find the value of density. So the answer in the book is wrong.#RESULTS\n", - "#RESULTS\n", - "print('Density of silicon crystal in kg/m^3 is = %.2f kg/m^3' %Rho)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Density of silicon crystal in kg/m^3 is = 1.25 kg/m^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4, Page No 37 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Finding Density of the crystal \n", - "\n", - "#initialisation of variables\n", - "n = 4\n", - "r = 1.278 #in \u00c5\n", - "\n", - "#CALCULATIONS\n", - "a = (4*r)/(math.sqrt(2)) #in\u00c5\n", - "a = a * 10**-10 #in m\n", - "V = (a)**3 #in m^3\n", - "At_W = 63.5 #atomic weight\n", - "N_A = 6.023*10**23\n", - "m = At_W /N_A #in gm\n", - "m = m*10**-3 #in kg\n", - "Rho = ((m*n)/V)/1000 #in kg/m^3\n", - "\n", - "#RESULTS\n", - "print('Density of the crystal in kg/m^3 is =%.2f kg/m^3' %Rho)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Density of the crystal in kg/m^3 is =8.93 kg/m^3\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5 Page No 43 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Finding Wavaelength of X ray\n", - "\n", - "import math\n", - "from numpy import *\n", - "#initialisation of variables\n", - "d=2.82 #in \u00c5\n", - "d=d*10**-10 #in m\n", - "n=1\n", - "theta1=10 #n degree\n", - "\n", - "#CALCULATIONS\n", - "lembda=2*d*math.sin(math.radians(theta1)) #in m\n", - "lembda=lembda*10**10 #in \u00c5\n", - "\n", - "#RESULTS\n", - "print('Wavaelength of X ray is =%.2f \u00c5 degrees' %lembda)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavaelength of X ray is =0.98 \u00c5 degrees\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.6, Page No 43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Finding The spacing of atomic layer\n", - "\n", - "import math\n", - "#initialisation of variables\n", - "lembda = 1.6 #in \u00c5\n", - "theta = 14.2 #in degree\n", - "n = 1\n", - "\n", - "#CALCULATIONS\n", - "d = (n*lembda)/(2*math.sin(math.radians(theta))) #in \u00c5\n", - "\n", - "#RESULTS\n", - "print('The spacing of atomic layer in crystal is =%.2f in \u00c5 degrees' %d)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing of atomic layer in crystal is =3.26 in \u00c5 degrees\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7 Page No 43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Finding The interplanner spacing\n", - "\n", - "import math\n", - "#initialisation of variables\n", - "n = 1\n", - "theta1 = 30 #in degree\n", - "lembda = 1.78 #in \u00c5\n", - "\n", - "#CALCULATIONS\n", - "d = (n*lembda)/(2*math.sin(math.radians(theta1))) #in \u00c5\n", - "\n", - "#RESULTS\n", - "print('The interplanner spacing is =%.2f in \u00c5 degrees' %d)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The interplanner spacing is =1.78 in \u00c5 degrees\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.8 Page No 43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Finding Interplaner spacing of the crystal\n", - "\n", - "import math\n", - "\n", - "#initialisation of variables\n", - "lembda = 0.58 #in \u00c5\n", - "n = 1;\n", - "theta1 = 6.45 # in degree\n", - "\n", - "#CALCULATIONS\n", - "d = (n*lembda)/(2*math.sin(math.radians(theta1))) #in \u00c5 \n", - "print('Part (i) : At angle of 6.45\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d)\n", - "theta2 = 9.15 #in degree\n", - "d1 = (n*lembda)/(2*math.sin(math.radians(theta2))) #in \u00c5 \n", - "print('Part (ii) : At angle of 9.15\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d1)\n", - "theta3 = 13 #in degree\n", - "n2 = 1\n", - "d2 = (n2*lembda)/(2*math.sin(math.radians(theta3))) #in \u00c5\n", - "print('Part (iii) : At angle of 13\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d2)\n", - "n=2\n", - "d2 = (n*lembda)/(2*math.sin(math.radians(theta3))) #in \u00c5 \n", - "\n", - "#RESULTS\n", - "print('Part (iv) : : The interplaner spacing is : =%.4f \u00c5' %d2)\n", - "print('The interplaner spacing for some other set of reflecting is : =%.2f \u00c5' %d1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part (i) : At angle of 6.45\u00b0, Interplaner spacing of the crystal is =2.58 \u00c5\n", - "Part (ii) : At angle of 9.15\u00b0, Interplaner spacing of the crystal is =1.82 \u00c5\n", - "Part (iii) : At angle of 13\u00b0, Interplaner spacing of the crystal is =1.29 \u00c5\n", - "Part (iv) : : The interplaner spacing is : =2.5783 \u00c5\n", - "The interplaner spacing for some other set of reflecting is : =1.82 \u00c5\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.9, Page No 44 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Finding The glancing angle for a cubic in degree\n", - "\n", - "import math\n", - "from sympy.mpmath import *\n", - "import cmath\n", - "\n", - "#initialisation of variables\n", - "a = 2.814 #in \u00c5\n", - "l = 0\n", - "h = l\n", - "k = 0\n", - "d=a #in \u00c5\n", - "n = 2\n", - "\n", - "#CALCULATIONS\n", - "lembda=0.710 #in \u00c5\n", - "theta = math.degrees(math.asin(n*lembda/(2*d)))\n", - "\n", - "#RESULTS\n", - "print('The glancing angle for a cubic in degree is : =%.2f \u00c5 degrees' %theta)\n", - "print('Anwser is in points i.e = 14 36\"40\"..')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The glancing angle for a cubic in degree is : =14.61 \u00c5 degrees\n", - "Anwser is in points i.e = 14 36\"40\"..\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.10 Page No 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Finding Wavelength of X ray\n", - "\n", - "import math \n", - "\n", - "#initialisation of variables\n", - "a = 3.65 #in \u00c5\n", - "a = 3.65*10**-10 #in m\n", - "h = 1\n", - "k = 0\n", - "l = 0\n", - "\n", - "#CALCULATIONS\n", - "d= a/(math.sqrt(h**2+k**2+l**2)) #in m\n", - "n = 1\n", - "theta=60 #in degree\n", - "lembda = 2*d*math.sin(math.radians(theta)) #in m\n", - "lembda = lembda * 10**10 #in \u00c5\n", - "\n", - "#RESULTS\n", - "print('Wavelength of X ray is : =%.2f \u00c5' %lembda)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of X ray is : =6.32 \u00c5\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.11 Page No 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Finding The glancing angle in degree\n", - "\n", - "import math\n", - "\n", - "#initialisation of variables\n", - "lembda = 1.54 #in \u00c5\n", - "density = 9.024 #in gm/cc\n", - "n = 1\n", - "MI = 100\n", - "At_W = 63.54 #atomic weight\n", - "N_A = 6.023*10**23 \n", - "m = At_W/N_A #in gm\n", - "a =(density*m)**(1.0/3) #in cm\n", - "h = 1\n", - "k = 0\n", - "l = 0\n", - "\n", - "#CALCULATIONS\n", - "d= a/(math.sqrt(h**2+k**2+l**2))\n", - "theta =math.degrees((lembda*10**-8)/(2*d)) #in degree\n", - "\n", - "\n", - "#RESULTS\n", - "print('The glancing angle is = %.2f degrees' %theta)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The glancing angle is = 4.48 degrees\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.12 Page No 45 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Finding To get the 2nd order spectrum the position of the detector in degree\n", - "\n", - "import math\n", - "\n", - "#initialisation of variables\n", - "a = 3.615 #in \u00c5\n", - "theta=22 #in degree\n", - "n=1\n", - "h=1\n", - "k=h\n", - "l=k\n", - "\n", - "#CALCULATIONS\n", - "d = a/(math.sqrt( ((h)**2) + ((k)**2) + ((l)**2) )) #in \u00c5\n", - "lembda = 2*d*math.sin(math.radians(theta)) #in \u00c5\n", - "print('The wavelength of X ray is = %.2f \u00c5 ' %lembda)\n", - "theta2 =math.degrees(math.asin(lembda/d)) #in degree\n", - " #in degree\n", - "\n", - "#RESULTS\n", - "print('To get the 2nd order spectrum the position of the detector is = %.2f degrees ' %theta2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength of X ray is = 1.56 \u00c5 \n", - "To get the 2nd order spectrum the position of the detector is = 48.52 degrees \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.13, Page No 45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "n = 1\n", - "lembda = 1.54 # in \u00c5\n", - "theta = 21.7 # in degree\n", - "\n", - "#CALCULATIONS\n", - "d = lembda/(2*math.sin(math.radians(theta))) # in \u00c5\n", - "h = 1\n", - "k = h\n", - "l = k\n", - "a = d*math.sqrt(h**2+k**2+l**2) # in \u00c5\n", - "\n", - "#RESULTS\n", - "print('Lattice constant is = %.2f in \u00c5 ' %a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lattice constant is = 3.61 in \u00c5 \n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.14, Page No 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "h = 2\n", - "k = 1\n", - "l = 1\n", - "a = 4.8 # in \u00c5\n", - "\n", - "#CALCULATIONS\n", - "d_211 = a/(math.sqrt(h**2+k**2+l**2)) #in \u00c5\n", - "\n", - "#RESULTS\n", - "print('The distance between planes is =%.2f \u00c5 ' %d_211)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The distance between planes is =1.96 \u00c5 \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.15, Page No 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "r = 1.28 # in \u00c5\n", - "n = 4\n", - "M = 63.5\n", - "\n", - "#CALCULATIONS\n", - "a = (4*r)/(math.sqrt(2)) #in \u00c5\n", - "a = a * 10**-8 # in cm\n", - "N_A = 6.023*10**23 \n", - "Rho = (n*M)/( N_A*((a)**3) ) # in gm/cc\n", - "\n", - "#RESULTS\n", - "print('Density is =%.2f gm/cc ' %Rho)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Density is =8.89 gm/cc \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.16, Page No 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "M = 55.85\n", - "a = 2.9 # in \u00c5\n", - "Rho = 7.87 #in gm/cc\n", - "\n", - "#CALCULATIONS\n", - "a = a * 10**-8 # in cm\n", - "N_A = 6.023*10**23\n", - "n = (Rho*N_A*((a)**3))/M # atom per unit\n", - "\n", - "#RESULTS\n", - "print('A lattice having =%.2f atom per unit cell is a BCC structure ' %n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "A lattice having =2.07 atom per unit cell is a BCC structure \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.17, Page No 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "M = 60.0 # in gm/mole\n", - "Rho = 6.23 # in gm/cc\n", - "n = 4\n", - "N_A = 6.023*10**23 \n", - "\n", - "#CALCULATIONS\n", - "a = ((n*M)/(N_A * Rho))**(1.0/3) # in cm\n", - "r = (a*math.sqrt(2))/n #radius of atom in cm\n", - "r = r * 10**8 # in \u00c5\n", - "\n", - "#RESULTS\n", - "print('Radius of atom is =%.2f \u00c5 ' %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of atom is =1.41 \u00c5 \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.18, Page No 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Rho = 5.96 # in gm/cc\n", - "M = 50.0\n", - "n = 2\n", - "N_A = 6.023*10**23 \n", - "\n", - "#CALCULATIONS\n", - "a =((n*M)/(Rho*N_A))**(1.0/3) # in cm\n", - "r = (a*math.sqrt(3))/4 # in cm\n", - "P_f = (2*(4.0/3)*math.pi*((r)**3))/((a)**3) # packing factor\n", - "\n", - "\n", - "#RESULTS\n", - "print('Packing factor is =%.2f ' %P_f)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Packing factor is =0.68 \n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.19, Page No 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "M = 120.0\n", - "n = 2.0\n", - "N_A = 6.023*10**23\n", - "\n", - "#CALCULATIONS\n", - "m1 = M/N_A #mass of 1 atom in gm\n", - "m2 = n*m1 #mass of unit cell in gm\n", - "\n", - "#RESULTS\n", - "print('Number of unit cell in 20 gms of element is : =%.2f X 10^22 unit cells ' %((20/m2)/(10**22)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of unit cell in 20 gms of element is : =5.02 X 10^22 unit cells \n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.20, Page No 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Rho = 2.48 # in gm/c.c\n", - "n = 4.0 \n", - "M = 58\n", - "N_A = 6.023*10**23\n", - "\n", - "#CALCULATIONS\n", - "a = ( (n*M)/(Rho*N_A) )**(1.0/3) # in cm\n", - "a = a * 10**8 # in \u00c5\n", - "r = (a*math.sqrt(2))/n # in \u00c5\n", - "r = 2*r # in \u00c5\n", - "\n", - "#RESULTS\n", - "print('The center to center distance between ions is =%.2f \u00c5' %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The center to center distance between ions is =3.80 \u00c5\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo2.ipynb b/Advance_Semiconductor_Devices/ChapterNo2.ipynb deleted file mode 100755 index 9bc8cffb..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo2.ipynb +++ /dev/null @@ -1,1248 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter No 2 : Semiconductor Materials and\n", - "Their Properties

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, Page No 65 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "lambda1 = 11000.0 #in \u00c5\n", - "lambda1 = lambda1 * 10**-10 \n", - "h = 6.625*10**-34 \n", - "c = 3*10**8\n", - "q = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "E_g = h*c/lambda1 #in J\n", - "E_g= E_g/q #in eV\n", - "\n", - "#RESULTS\n", - "print('The energy gap in Si is = %.2f eV' %E_g)\n", - "\n", - "#Note: The answer in the book is not correct \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy gap in Si is = 1.13 eV\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2, Page No 65 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "E_g = 0.75 #in eV\n", - "q=1.6*10**-19 #in C\n", - "E_g = E_g*q #in J\n", - "h = 6.63*10**-34 #in J\n", - "c = 3*10**8 #in m/s\n", - "\n", - "#CALCULATIONS\n", - "lembda = (h*c)/E_g #in m\n", - "lembda = lembda * 10**10 #in \u00c5\n", - "\n", - "#RESULTS\n", - "print('The wavelength is =%.f \u00c5 ' %lembda)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is =16575 \u00c5 \n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 Page No 81 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from numpy import *\n", - "\n", - "#initialisation of variables\n", - "del_E = 0.3 #value of E_C-E_F in eV\n", - "T1 = 330.0 #in K\n", - "T = 300 #in K\n", - "\n", - "#CALCULATIONS\n", - "del_E1 = del_E*(T1/T) #value of E_C-E_F in eV\n", - "\n", - "#RESULTS\n", - "print('The position of fermi level is =%.2f eV' %del_E1)\n", - "print('Hence the Fermi level will be %.2f eV below the conduction band' %del_E1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The position of fermi level is =0.33 eV\n", - "Hence the Fermi level will be 0.33 eV below the conduction band\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4, Page No 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "K = 8.63*10**-5\n", - "T = 300.0 #in K\n", - "N_C = 2.8*10**19 #in cm^-3\n", - "del_E = 0.25\n", - "\n", - "#CALCULATIONS\n", - "f_F = math.exp( (-del_E)/(K*T) )\n", - "n_o = N_C*math.exp( (-del_E)/(K*T) ) #in cm^-3\n", - "\n", - "#RESULTS\n", - "print('The probability is =%.6f ' %f_F)\n", - "print('The thermal equillibrium electron concentration is =%.2f X 10^15 cm^-3' %(n_o/(10**15)))\n", - "print('Approximation error ')\n", - "# The answer is same as in book only thy have rounded off to 1.8 * 10^15 which is same as above" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The probability is =0.000064 \n", - "The thermal equillibrium electron concentration is =1.79 X 10^15 cm^-3\n", - "Approximation error \n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5 Page No 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "N_V = 1.04*10**19 #in cm^-3\n", - "T1 = 400.0 #in K\n", - "T2 = 300.0 #in K\n", - "del_E = 0.27 #value of E_F-E_V in eV\n", - "K = 0.0259\n", - "\n", - "#CALCULATIONS\n", - "N_V= N_V*(T1/T2)**(3/2) #in cm^-3\n", - "KT = K*(T1/T2) #in eV\n", - "p_o = N_V*math.exp( (-del_E)/(KT) ) #in /cm^3\n", - "\n", - "#RESULTS\n", - "print('The hole concentration is =%.2f x 10^15 per cm^3' %(p_o/(10**15)))\n", - "print('Approximationa error ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The hole concentration is =5.58 x 10^15 per cm^3\n", - "Approximationa error \n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 Page No 86" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "N = 6.02*10**23\n", - "A = 63.5 #atomic weight\n", - "Rho = 1.7*10**-6 #in ohm cm\n", - "d = 8.96 # in gm/cc\n", - "\n", - "#CALCULATIONS\n", - "n = (N/A)*d #in /cc\n", - "e = 1.6*10**-19 #in C\n", - "Miu_e = 1/(Rho*n*e) #in cm^2/volt-sec\n", - "\n", - "#RESULTS\n", - "print('The mobility of electron is =%.2f cm^2/volt.sec' %Miu_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility of electron is =43.28 cm^2/volt.sec\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7, Page No 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from sympy.mpmath import *\n", - "import cmath\n", - "\n", - "\n", - "#initialisation of variables\n", - "d = 8.96 #in gm/cc\n", - "At = 63.5 #atomic weight\n", - "N_A = 6.02*10**23 #in /gm mole\n", - "l = 0.1 #in m\n", - "e = 1.6*10**-19 #in C\n", - "A = 1.7*10**-6 #in m^2\n", - "R = 0.1 #in ohm\n", - "\n", - "#CALCULATIONS\n", - "n = (N_A/At)*d #in /cc\n", - "n = n * 10**6 #in /m^3\n", - "Rho = (R*A)/l #in ohm.m\n", - "Sigma = 1/Rho #in mho/m\n", - "Miu_e = Sigma/(n*e) #in m^2/V-sec\n", - "\n", - "#RESULTS\n", - "print('The electron mobility is =%.3f X 10^-3 m^2/V-sec ' %(Miu_e*(10**3)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electron mobility is =0.043 X 10^-3 m^2/V-sec \n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8 Page No 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "N_A = 6.025*10**23 #in /gm mole\n", - "d = 10.5 #in gm/cc\n", - "At = 108.0 #atomic weight of \n", - "\n", - "#CALCULATIONS\n", - "n = (N_A/At)*d #in /cm^3\n", - "n = n * 10**6 #in /m^3\n", - "r = 10**-3 #in m\n", - "A = math.pi * ((r)**2) #in m^2\n", - "q = 1.6*10**-19 \n", - "I = 2 #in A\n", - "V = I/(n*q*A) #in m/s\n", - "\n", - "#RESULTS\n", - "print('The drift velocity of an electron is =%.f X 10^-4 m/s' %(V*(10**5)))\n", - "print('Approximationa error ')\n", - "# answer is same as in book only they have rounded of 0.000068 to 7 * 10^-4" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The drift velocity of an electron is =7 X 10^-4 m/s\n", - "Approximationa error \n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9 Page No 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "e= 1.6*10**-19 #in C\n", - "d= 1.03 #in mm\n", - "d= d*10**-3 #in m\n", - "R= 6.51 #in ohm\n", - "l= 300.0 #in m\n", - "n= 8.4*10**28 #per m^3\n", - "\n", - "#CALCULATIONS\n", - "r= d/2 #in m (radius)\n", - "A= math.pi*r**2 #in m^2\n", - "rho= R*A/l #in ohm meter\n", - "sigma= 1/rho #in mho/m\n", - "miu_e= sigma/(n*e) #m^2/V-sec\n", - "\n", - "#RESULTS\n", - "print('The coductivity of copper is =%.2f mho/m' %sigma)\n", - "print('The mobility of charge carriers is : =%.6f m^2/V-sec' %miu_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The coductivity of copper is =55306469.41 mho/m\n", - "The mobility of charge carriers is : =0.004115 m^2/V-sec\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9.ii Page No 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Miu_e = 1500.0 #in cm^2/volt.sec\n", - "Miu_h = 500.0 #in cm^2/volt.sec\n", - "n_i = 1.6*10**10 #in /cm^3\n", - "e = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "Sigma_i = n_i*(Miu_e+Miu_h)*e #in mho/cm\n", - "Sigma = Sigma_i #in mho/cm\n", - "\n", - "#RESULTS\n", - "print('The conductivity of pure silicon is =%.7f mho/cm' %Sigma)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of pure silicon is =0.0000051 mho/cm\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 2.10 Page No 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "Miu_e = 1500.0 #in cm^2/volt.sec\n", - "Miu_h = 500.0 #in cm^2/volt.sec\n", - "n_i = 1.6*10**10 #in /cm^3\n", - "e = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "Sigma_i = n_i*(Miu_e+Miu_h)*e #in mho/cm\n", - "Sigma = Sigma_i #in mho/cm\n", - "\n", - "#RESULTS\n", - "print('The conductivity of pure silicon is =%.2f X 10^-6 mho/cm' %(Sigma*(10**6)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of pure silicon is =5.12 X 10^-6 mho/cm\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 2.11 Page No 90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "Miu_d = 500.0 #in cm^2/V.S\n", - "Rho = 10 #in ohm cm \n", - "\n", - "#CALCULATIONS\n", - "e = 1.6*10**-19 #in C\n", - "n_d = 1/(Rho*e*Miu_d) #in /cm^3... correction\n", - "\n", - "#RESULTS\n", - "print('The number of donor is =%.2f X 10^15 atom per cm^3' %(n_d/(10**15)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The number of donor is =1.25 X 10^15 atom per cm^3\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 2.12 Page No 90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "d = 5.32 #in gm/cc\n", - "N_A = 6.02*10**23 #in atoms/gm.mole\n", - "At = 72.6 #atomic weight\n", - "Miu = 3800 #in cm^2/v.s\n", - "\n", - "#CALCULATIONS\n", - "n_d = (N_A/At) * d #in /cm^3\n", - "n_d = n_d * 10**-8 #in /cc\n", - "e = 1.6*10**-19 #in C\n", - "Sigma = n_d * Miu * e #in mho/cm\n", - "\n", - "#RESULTS\n", - "print('The conductivity of specimen is =%.2f mho/cm' %Sigma)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of specimen is =0.27 mho/cm\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 2.13 Page No 90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "Rho = 0.3623*10**-3 #in ohm m\n", - "d = 4.42*10**28 #Ge density in atoms/m^3\n", - "\n", - "#CALCULATIONS\n", - "Sigma = 1/Rho #in mho/m\n", - "n_d = d*10**-6 #in atoms/m^3\n", - "e = 1.6*10**-19 #in C\n", - "Miu = Sigma/(n_d*e) #in m^2/V.sec\n", - "\n", - "#RESULTS\n", - "print('The electron mobility is =%.2f m^2/V-sec' %Miu)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electron mobility is =0.39 m^2/V-sec\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 2.14 Page No 91" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "N_A = 6.025*10**26 #in /kg.Mole\n", - "At = 72.59 #atomic weight\n", - "d = 5.36*10**3 #in kg/m^3\n", - "R = 0.42 #in ohm m\n", - "B_i = 10**-6 #rate of boron impurity in %\n", - "e = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "n = (N_A/At)*d #number of Ge atoms\n", - "h = n/10**8 #holes per unit volume\n", - "Miu_h = 1/(R*h*e) #in m^2/V.sec\n", - "\n", - "#RESULTS\n", - "print('The Mobility of holes is =%.2f m^2/V-sec' %Miu_h)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Mobility of holes is =0.03 m^2/V-sec\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.15 Page No 90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "n_i = 2*10**19 #in /m^3\n", - "Miu_e = 0.36 #in m^2/v.s\n", - "Miu_h = 0.17 #in m^2/v.s\n", - "\n", - "#CALCULATIONS\n", - "A = 1*10**-4 #in m^2\n", - "V = 2 #in Volts\n", - "l = 0.3 #in mm\n", - "l = l * 10**-3 #in m\n", - "e = 1.6*10**-19 #in C\n", - "Sigma_i = n_i * e * (Miu_e+Miu_h) #in mho/m\n", - "I = (Sigma_i * V*A)/l #in amp \n", - "\n", - "#RESULTS\n", - "print('The current in amp is =%.2f ' %I)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current in amp is =1.13 \n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.16 Page No 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "d = 4.2*10**28 #in atoms/m^3\n", - "n_d = d/10**6 #in atoms/m^3\n", - "e = 1.6*10**-19 #in C\n", - "Miu_e = 0.36 #in m^2/V-sec\n", - "\n", - "#CALCULATIONS\n", - "Sigma_n = n_d *e *Miu_e #in mho/m\n", - "Rho_n = 1/Sigma_n #ohm m\n", - "\n", - "#RESULTS\n", - "print('The resistivity in \u03a9m is =%.2f X 10^-3' %(Rho_n*(10**3)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistivity in \u03a9m is =0.41 X 10^-3\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.17 Page No 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "n_i = 1*10**19 #in /m^3\n", - "Miu_e = 0.36 #in m^2/volt.sec\n", - "Miu_h = 0.17 #in m^2/volt.sec\n", - "A = 2 #in cm^2\n", - "A = A * 10**-4 #in m^2\n", - "t = 0.1 #in mm\n", - "t = t*10**-3 #in m\n", - "V = 4 #in volts\n", - "e = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "Sigma_i = n_i * e * (Miu_e + Miu_h) #mho/m\n", - "J = Sigma_i * (V/t) #in Amp/m^2\n", - "I = J*A #in Amp\n", - "\n", - "#RESULTS\n", - "print('The current in Amp is =%.2f ' %I)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current in Amp is =6.78 \n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 2.18 Page No 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "Miu_h = 500.0 #in cm^2/V.s\n", - "Miu_e = 1500.0 #in cm^2/V.s\n", - "n_i = 1.6*10**10 #in /cm^3\n", - "e = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "Sigma_i = n_i * e * (Miu_e+Miu_h) #in mho/cm\n", - "\n", - "#RESULTS\n", - "print('The conductivity of pure silicon in mho/cm is =%.2f X 10^-6 ' %(Sigma_i*(10**6)))\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of pure silicon in mho/cm is =5.12 X 10^-6 \n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.19 Page No 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "Si_density = 10.5 #in gm/cc\n", - "N_A = 6.025*10**23 \n", - "At = 108.0 #atomic weight\n", - "B = 0.8 #in Tesla\n", - "w = 0.50 #in cm\n", - "w = w * 10**-2 #in m\n", - "t = 0.10 #in mm\n", - "t = t * 10**-3 #in m\n", - "A = w*t #in m^2\n", - "q = 1.6*10**-19 #in C\n", - "I = 2 #in ampere\n", - "\n", - "#CALCULATIONS\n", - "n = (N_A/At) * Si_density #in /cc\n", - "n = n * 10**6 #in /m^3\n", - "V_H = (B*I*t)/(n*q*A) #in volts\n", - "\n", - "#RESULTS\n", - "print('The hall voltage produced is =%.3f X 10^-7 volts' %(V_H*(10**7)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The hall voltage produced is =0.341 X 10^-7 volts\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.20 Page No 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "Sigma = 5.8*10**7 #in mho/m\n", - "l = 1 #in m\n", - "d = 1 #in cm\n", - "d = d * 10**-2 #in m\n", - "W = 1 #in mm \n", - "W = W*10**-3 #in m\n", - "I = 1 #in Amp\n", - "B = 1 #in Tesla\n", - "V_H = 0.074*10**-6 #in Volts\n", - "A = 10**-2 * 10**-3 #in m^2\n", - "\n", - "#CALCULATIONS\n", - "R_H = (V_H*A)/(B*I*d) #in m^3/c\n", - "Miu = Sigma * R_H #in m^2/volt.sec\n", - "\n", - "#RESULTS\n", - "print('Hall coefficient is =%.1f X 10^-11 m^3/c' %(R_H*(10**11)))\n", - "print('The mobility of electron is = %.2f X 10^-3 m^2/volt.sec ' %(Miu*(10**3)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hall coefficient is =7.4 X 10^-11 m^3/c\n", - "The mobility of electron is = 4.29 X 10^-3 m^2/volt.sec \n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.21 Page No 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "n_i = 1.4*10**18 #in /m^3\n", - "n_D = 1.4*10**24 #in /m^3\n", - "n = n_D #in /m^3\n", - "\n", - "#CALCULATIONS\n", - "p = n_i**2/n #in /m^3\n", - "R_e = n/p #Ratio of electron\n", - "\n", - "#RESULTS\n", - "print('Concentration of is =%.2f X 10^12 holes per m^3 ' %(p/(10**12)))\n", - "print('Ratio of electron to hole concentration is =%.f 10^12 ' %(R_e/(10**12)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Concentration of is =1.40 X 10^12 holes per m^3 \n", - "Ratio of electron to hole concentration is =1 10^12 \n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.22 Page No 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "B = 0.48 #in Wb/m^2\n", - "R_H = 3.6 * 10**-4 #in m^3/c\n", - "R = 9*10**-3 #in ohm-m\n", - "\n", - "#CALCULATIONS\n", - "Sigma = 1/R #in (ohm-m)^-1\n", - "Rho = 1/R_H #in coulomb/m^3\n", - "e = 1.6*10**-19 #in C\n", - "n = Rho/e #in /m^3\n", - "Miu = Sigma * R_H #in m^2/volt-s\n", - "\n", - "#RESULTS\n", - "print('The mobility of electron is =%.2f m^2/volt-s' %Miu)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility of electron is =0.04 m^2/volt-s\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.23 Page No 104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "e = 1.6*10**-19 #in C\n", - "R_H = 0.0145 #in m^3/coulomb\n", - "Miu_e = 0.36 #m^2/v-s\n", - "E = 100 #V/m\n", - "\n", - "#CALCULATIONS\n", - "n = 1/(e*R_H) #in /m^3\n", - "J= n*e*Miu_e*E #in A/m^2\n", - "\n", - "#RESULTS\n", - "print('The current density is =%.2f A/m^2 ' %J)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current density is =2482.76 A/m^2 \n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.24 Page No 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "e = 1.6*10**-19 #in C\n", - "Miu_e = 7.04*10**-3 #in m^2/volt-sec\n", - "n = 5.8*10**28 #number of electron/m^3\n", - "m = 9.1*10**-31\n", - "E_F = 5.5 # in eV\n", - "\n", - "#CALCULATIONS\n", - "Torque = (Miu_e/e)*m # in sec \n", - "Rho = 1/(n*e*Miu_e) #in ohm cm\n", - "V_F = math.sqrt( (2*E_F*e)/m ) #in m/s\n", - "\n", - "#RESULTS\n", - "print('Relaxtion time is =%.2f X 10^-15 sec ' %(Torque*(10**15)))\n", - "print('Resistivity of conductor is =%.2f X 10^-18 in \u03a9m' %(Rho*(10**8)))\n", - "print('Velocity of electron with the fermi energy is =%.2f X 10^-6 in m/s' %(V_F/(10**6)))\n", - "\n", - "# Note: The calculation of Part (ii) is wrong also the unit of resistivity of conductor is wrong\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Relaxtion time is =40.04 X 10^-15 sec \n", - "Resistivity of conductor is =1.53 X 10^-18 in \u03a9m\n", - "Velocity of electron with the fermi energy is =1.39 X 10^-6 in m/s\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.25 Page No 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "E= 5.95 #in eV\n", - "EF= 6.25 #in eV\n", - "delE= 0.01\n", - "\n", - "#CALCULATIONS\n", - " #delE= 1-1/(1+exp((E-EF)/KT))\n", - "K=1.38*10**-23 #Boltzman Constant in J/K\n", - "T = ((E-EF)/math.log(1/(1-delE) -1)*1.6*10**-19)/K #in K\n", - "\n", - "#RESULTS\n", - "print('The temperature is =%.2f K' %T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The temperature is =756.95 K\n" - ] - } - ], - "prompt_number": 52 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.26 Page No 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "T1 = 400.0 #in K\n", - "T2 = 300.0 #in K\n", - "N_V = 1.04*10**19 #in cm^-3\n", - "\n", - "#CALCULATIONS\n", - "N1 = N_V*((T1/T2)**(3/2)) #in cm^-3\n", - "KT = 0.0259*(T1/T2) #in eV\n", - "FermiLevel= 0.27 #in eV\n", - "P_O = N1*math.exp( (-FermiLevel)/KT ) #in cm^-3\n", - "\n", - "#RESULTS\n", - "print('The thermal equillibrium hole concentration is =%.2f X 10^15 cm^-3' %(P_O/(10**15)))\n", - "print('Approximationa error ')\n", - "# Answer in the book is wrong" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The thermal equillibrium hole concentration is =5.58 X 10^15 cm^-3\n", - "Approximationa error \n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.27 Page No 107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T1 = 550.0 #in K\n", - "T2 = 300.0 #in K\n", - "N1 = 1.04*10**19 \n", - "\n", - "#CALCULATIONS\n", - "N_V = N1*((T1/T2)**(3)) \n", - "N_C = 2.8*10**19\n", - "E_g = -1.12\n", - "KT = 0.0259*(T1/T2)\n", - "n_i = math.sqrt(N_C*N_V*math.exp(E_g/KT)) #in cm^-3\n", - "Nd= math.sqrt(n_i**2/((1.05-1/2.0)**2-(1/2.0)**2))\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of n_i is =%.2f X 10^14 cm^-3' %(n_i/(10**14)))\n", - "print('The value of N_d is =%.2f X 10^15 cm^-3' %(Nd/(10**15)))\n", - "#Formula n_o= Nd/2+sqrt((Nd/2)^2+n_i^2) and n_o = 1.05*N_d;\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of n_i is =3.20 X 10^14 cm^-3\n", - "The value of N_d is =1.40 X 10^15 cm^-3\n" - ] - } - ], - "prompt_number": 54 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 2.28 Page No 106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "n_o = 10**15 #in cm^-3\n", - "n_i = 10**10 #in cm^-3\n", - "p_o = 10**5 #in cm^-3\n", - "del_p = 10**13 #in cm^-3\n", - "\n", - "#CALCULATIONS\n", - "del_n = del_p #in cm^-3\n", - "KT= 0.0259 #in eV\n", - "Fermi_level1= KT*math.log(n_o/n_i) #in eV\n", - "Fermi_level2= KT*math.log((n_o+del_n)/n_i) #in eV\n", - "Fermi_level3= KT*math.log((p_o+del_p)/n_i) #in eV\n", - "\n", - "\n", - "#RESULTS\n", - "print('Fermi level for thermal equillibrium is : =%.2f eV ' %Fermi_level1)\n", - "print('Quasi-Fermi level for electrons in non equillibrium is : =%.2f eV' %Fermi_level2)\n", - "print('Quasi-Fermi level for holes in non equillibrium is: =%.2f eV' %Fermi_level3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fermi level for thermal equillibrium is : =0.30 eV \n", - "Quasi-Fermi level for electrons in non equillibrium is : =0.30 eV\n", - "Quasi-Fermi level for holes in non equillibrium is: =0.18 eV\n" - ] - } - ], - "prompt_number": 55 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo3.ipynb b/Advance_Semiconductor_Devices/ChapterNo3.ipynb deleted file mode 100755 index bc717890..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo3.ipynb +++ /dev/null @@ -1,992 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter No 3 : Excess Carriers In Semiconductors

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1, Page No 145 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "n_o = 10**17 #in/cm^3\n", - "n_i = 1.5*10**10 #in /cm^3\n", - "\n", - "#CALCULATIONS\n", - "p_o = ((n_i)**(2))/n_o #in holes/cm^3\n", - "\n", - "#RESULTS\n", - "print('The hole concentration is =%.f in holes/cm^3' %p_o)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The hole concentration is =2250 in holes/cm^3\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3, Page No 146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "n_i = 1.5 * 10**10 #in /cm^3 for silicon\n", - "N_d = 10**17 #in atoms/cm^3\n", - "n_o = 10**17 #electrons/cm^3\n", - "KT = 0.0259\n", - "\n", - "#CALCULATIONS\n", - "# E_r - E_i = KT * log(n_o/n_i)\n", - "del_E = KT * math.log(n_o/n_i) #in eV\n", - "\n", - "#RESULTS\n", - "print('The energy band for this type material is Ei =%.2f eV' %del_E)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy band for this type material is Ei =0.41 eV\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4 Page No 147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "K = 1.38*10**-23 #in J/K\n", - "T = 27 #in degree C\n", - "T = T + 273 #in K\n", - "e = 1.6*10**-19 \n", - "Miu = 0.17 #in m^2/v-s\n", - "Miu1 = 0.025 #in m^2/v-s\n", - "\n", - "#CALCULATIONS\n", - "D_n = ((K*T)/e)*Miu #in m^2/s\n", - "D_p = ((K*T)/e)*Miu1 #in m^2/s\n", - "\n", - "\n", - "#RESULTS\n", - "print('The diffusion coefficient of electrons is =%.2f X 10^-4 in m^2/s ' %(D_n*(10**4)))\n", - "print('The diffusion coefficient of holes is =%.2f X 10^-4 in m^2/s ' %(D_p*(10**4)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The diffusion coefficient of electrons is =43.99 X 10^-4 in m^2/s \n", - "The diffusion coefficient of holes is =6.47 X 10^-4 in m^2/s \n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5, Page No 147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Miu_n = 0.15 #in m^2/v-s\n", - "K = 1.38*10**-23 \n", - "T = 300 #in K\n", - "e = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "D_n = Miu_n*((K*T)/e) #in m^2/s\n", - "Torque_n = 10**-7 #in s\n", - "L_n = math.sqrt(D_n*Torque_n) #in m\n", - "del_n = 10**20 #electrons/m^3\n", - "J_n = (e*D_n*del_n)/L_n #in A/m^2\n", - "\n", - "#RESULTS\n", - "print('The diffusion length is =%.2f X 10^-4 in m' %(L_n*(10**5)))\n", - "print('The diffusion current density is =%.2f X 10^3 in A/m^2 ' %(J_n/(10**3)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The diffusion length is =1.97 X 10^-4 in m\n", - "The diffusion current density is =3.15 X 10^3 in A/m^2 \n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6 Page No 147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Sigma_n = 0.1 #in (ohm-cm)^-1\n", - "Miu_n = 1300\n", - "q = 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "n_n = Sigma_n/(Miu_n*q) #in electrons/cm^3 \n", - "n_i = 1.5*10**10\n", - "p_n = ((n_i)**2)/n_n #in holes/cm^3\n", - "p_n = p_n * 10**6 #in holes/m^3\n", - "n_n=n_n*10**6\n", - "\n", - "#RESULTS\n", - "print('Concentration of electrons is =%.2f X 10^20 per m^3 ' %(n_n/(10**20)))\n", - "print('Concentration of holes is =%.2f X 10^11 per m^3 ' %(p_n/(10**11)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Concentration of electrons is =4.81 X 10^20 per m^3 \n", - "Concentration of holes is =4.68 X 10^11 per m^3 \n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7 Page No 147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "L = 100*10**-6 #in m\n", - "Miu_e = 0.13 #in m^2/V-s\n", - "Torque_h = 10**-6 #in s\n", - "Miu_h = 0.05 #in m^2/v-s\n", - "V = 12 #in V\n", - "\n", - "#CALCULATIONS\n", - "Torque_n = ((L)**2)/(Miu_e*V) #in s\n", - "P = (Torque_h/Torque_n)*(1+(Miu_h/Miu_e))\n", - "\n", - "#RESULTS\n", - "print('Electron transit time is =%.2f X 10^-9 in sec' %(Torque_n*(10**9)))\n", - "print('Photoconductor gain is =%.2f ' %P)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Electron transit time is =6.41 X 10^-9 in sec\n", - "Photoconductor gain is =216.00 \n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page No 147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "q = 1.6*10**-19 #in C\n", - "n_i = 2.5*10**13\n", - "Miu_n = 3800 #in cm^2/V-s\n", - "Miu_p = 1800 #in cm^2/V-s\n", - "\n", - "#CALCULATIONS\n", - "Sigma = n_i*(Miu_n + Miu_p)*q #in (ohm-cm)^-1\n", - "Rho = 1/Sigma #in ohm-cm\n", - "N_D =4.4*10**22/10**8 #in atoms/cm^3\n", - "Sigma_n = N_D * Miu_n*q #in (ohm-cm)^-1 \n", - "Rho1 = 1/Sigma_n #in ohm cm\n", - "\n", - "#RESULTS\n", - "print('The resistivity is =%.2f in ohm-cm ' %Rho)\n", - "print('The resistivity drops is =%.2f in ohm cm ' %Rho1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistivity is =44.64 in ohm-cm \n", - "The resistivity drops is =3.74 in ohm cm \n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9 Page No 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "n_i = 10**16 #in /m^3\n", - "N_D = 10**22 #in /m^3\n", - "\n", - "#CALCULATIONS\n", - "n = N_D #in /m^3\n", - "p = ((n_i)**2)/n #in /m^3\n", - "\n", - "\n", - "#RESULTS\n", - "print('The concentration of is =%.2f X 10^21 electrons per m^3' %(n/(10**21)))\n", - "print('The concentration of is =%.2f X 10^9 holes per m^3 ' %(p/(10**9)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The concentration of is =10.00 X 10^21 electrons per m^3\n", - "The concentration of is =10.00 X 10^9 holes per m^3 \n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10 Page No 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Rho = 9.6*10**-2 #ohm-m\n", - "Sigma_n = 1/Rho #in (ohm-m)^-1\n", - "Miu_n = 1300 #in cm^2/V-s\n", - "\n", - "#CALCULATIONS\n", - "Miu_n = Miu_n * 10**-4 #in m^2/V-s\n", - "q = 1.6*10**-19 #in C\n", - "N_D = Sigma_n/(Miu_n*q) #in atoms/m^3\n", - "d = 5*10**22 #in atoms/cm^3\n", - "d = d * 10**6 #// in atoms/m^3\n", - "R_d = N_D/d #Ratio \n", - "\n", - "#RESULTS\n", - "print('Ratio of donor atom to silicon atoms per unit volume is =%.2f X 10^-8 ' %(R_d*(10**8)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ratio of donor atom to silicon atoms per unit volume is =1.00 X 10^-8 \n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11 Page No 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "n_i = 1.5*10**10 #in /cm^3\n", - "n_n = 2.25*10**15 #in /cm^3\n", - "\n", - "#CALCULATIONS\n", - "p_n = ((n_i)**2)/n_n #in /cm^3\n", - "\n", - "#RESULTS\n", - "print('The concentration of is =%.2f X 10^5 holes per cm^3 ' %(p_n/(10**5)))\n", - "print('Donor impurity per cm^3 is =%.2f X 10^15 ' %(n_n/(10**15)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The concentration of is =1.00 X 10^5 holes per cm^3 \n", - "Donor impurity per cm^3 is =2.25 X 10^15 \n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.12 Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "N_A = 2*10**16 #in /cm^3\n", - "N_D = 10**16 #in /cm^3\n", - "\n", - "#CALCULATIONS\n", - "C = N_A-N_D #in /cm^3\n", - "\n", - "#RESULTS\n", - "print('Carrier concentration in holes/cm^3 is =%.2f X 10^16 ' %(C/(10**16)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Carrier concentration in holes/cm^3 is =1.00 X 10^16 \n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.13 Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "del_n = 10**15 #in /cm^3\n", - "Torque_p = 10*10**-6 #in sec\n", - "\n", - "#CALCULATIONS\n", - "R_G = del_n/Torque_p #in electron hole pairs/sec/cm^3\n", - "\n", - "#RESULTS\n", - "print('The rate of generation of minority carrier is : =%.2f X 10^20 electron hole pairs/sec/cm^3 ' %(R_G/(10**20)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The rate of generation of minority carrier is : =1.00 X 10^20 electron hole pairs/sec/cm^3 \n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.14 Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V = 1/20.0 #in cm/\u00b5sec\n", - "V=V*10**6 #in cm/sec\n", - "\n", - "#CALCULATIONS\n", - "E = 10 #in V/cm\n", - "Miu = V/E #in cm^2/V-sec\n", - "\n", - "#RESULTS\n", - "print('The mobility of minority charge carrier is =%.f cm^2/V-sec' %Miu)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility of minority charge carrier is =5000 cm^2/V-sec\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.15 Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "q = 1.6 * 10**-19 #in C\n", - "N_D = 4.5 * 10**15 #in /cm^3\n", - "del_p = 10**21 \n", - "e=10 #in cm\n", - "A = 1 #in mm^2\n", - "A = A * 10**-14 #cm^2\n", - "l = 10 #in cm\n", - "Torque_p = 1 #in microsec\n", - "\n", - "\n", - "#CALCULATIONS\n", - "Torque_p = Torque_p * 10**-6 #in sec\n", - "Torque_n = 1 #in microsec\n", - "Torque_n = Torque_n * 10**-6 #in sec\n", - "n_i = 1.5 * 10**10 #in /cm^3\n", - "D_n = 30 #cm^2/sec\n", - "D_p = 12 #in cm^2/sec\n", - "n_o = N_D #in /cm^3\n", - "p_o = ((n_i)**2)/n_o #in /cm^3\n", - "l_n = math.sqrt(D_n * Torque_n) #in cm\n", - "l_p = math.sqrt(D_p * Torque_p) #in cm\n", - "x=34.6*10*8-4 #in cm\n", - "e1 = 1.88 * 10**1 #in cm\n", - "dnBYdx = del_p * e1 #in cm^4\n", - "dpBYdx = del_p *e #in cm^4\n", - "\n", - "J_P = -(q) * D_p * dpBYdx #in A/cm^2\n", - "J_n = q * D_n * dnBYdx #in A/cm^2\n", - "\n", - "\n", - "#RESULTS\n", - "print('Hole concentration at thermal equilibrium per cm^3 is =%.1f X 10^5 ' %(p_o/(10**5)))\n", - "print('Diffusion length of holes in cm is =%.1f X 10^-3 ' %(l_p*(10**3)))\n", - "print('Concentration gradient of holes at distance in cm^4 is =%.f X 10^22 ' %(dpBYdx/(10**22)))\n", - "print('Concentration gradient of electrons in per cm^4 is =%.1f X 10^22 ' %(dnBYdx/(10**22)))\n", - "print('Current density of holes due to diffusion in A/cm^2 is =%.2f X 10^4 ' %(J_P/(10**4)))\n", - "print('Current density of electrons due to diffusion in A/cm^2 is =%.2f X 10^4 ' %(J_n/(10**4)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hole concentration at thermal equilibrium per cm^3 is =0.5 X 10^5 \n", - "Diffusion length of holes in cm is =3.5 X 10^-3 \n", - "Concentration gradient of holes at distance in cm^4 is =1 X 10^22 \n", - "Concentration gradient of electrons in per cm^4 is =1.9 X 10^22 \n", - "Current density of holes due to diffusion in A/cm^2 is =-1.92 X 10^4 \n", - "Current density of electrons due to diffusion in A/cm^2 is =9.02 X 10^4 \n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.16 Page No 151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "h = 6.626 * 10**-34 #in J-s\n", - "q= 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "h= h/q #in eV\n", - "c = 3*10**8\n", - "lembda = 5490*10**-10 #in m\n", - "E = h*c/lembda #in eV\n", - "\n", - "#RESULTS\n", - "print('The energy band gap is =%.2f eV ' %E)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy band gap is =2.26 eV \n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.17 Page No 151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "D_n = 35 #in cm^2/sec\n", - "q = 1.6*10**-19 #in C\n", - "y2 = 6*10**16 #in /cm^3\n", - "y1 = 10**17 #in /cm^3\n", - "x2 = 2*10**-4\n", - "x1 = 0\n", - "\n", - "#CALCULATIONS\n", - "dnBYdx = (y2-y1)/(x2-x1)\n", - "J_n = q*D_n*dnBYdx #in A/cm^2\n", - "\n", - "#RESULTS\n", - "print('The current density is =%.f in A/cm^2' %J_n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current density is =-1120 in A/cm^2\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.18 Page No 151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "q = 1.6*10**-19 #in C\n", - "n_n = 5*10**20 #in /m^3\n", - "n_n = n_n * 10**-6 #in /cm^3\n", - "Miu_n = 0.13 #in m^2/V-sec\n", - "\n", - "\n", - "#CALCULATIONS\n", - "Miu_n = Miu_n * 10**4 #in cm^2/V-sec\n", - "Sigma_n = q*n_n*Miu_n #in ohm-cm^-1\n", - "Rho = 1/Sigma_n\n", - "A = 100 # in \u00b5m^2\n", - "A = A * 10**-8 #in cm^2\n", - "l = 0.1 #in cm\n", - "R = Rho * (l/A) #in ohm\n", - "R=R*10**-6\n", - "#RESULTS\n", - "print('The resistance of the bar is =%.2f in M ohm' %R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistance of the bar is =0.96 in M ohm\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.19 Page No 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "w = 3.0 #in \u00b5m\n", - "\n", - "#CALCULATIONS\n", - "D = w/9 #in \u00b5m\n", - "\n", - "#RESULTS\n", - "print('Depletion width on P side is =%.2f in \u00b5m ' %D)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Depletion width on P side is =0.33 in \u00b5m \n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.20 Page No 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "n_i = 1.5*10**16 #in /m^3\n", - "n_n = 5*10**20 #in /m^3\n", - "\n", - "#CALCULATIONS\n", - "p_n = ((n_i)**2)/n_n #in /m^3\n", - "\n", - "#RESULTS\n", - "print('The minority carrier density per m^3 is =%.2f X 10^11' %(p_n/(10**11)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minority carrier density per m^3 is =4.50 X 10^11\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.21 Page No 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "y2 = 10**14 #in /cm^3\n", - "y1 = 0\n", - "x1=-0.5 #in \u00b5m\n", - "\n", - "#CALCULATIONS\n", - "x1= x1*10**-4 #in cm\n", - "x2=0\n", - "dnBYdx = (y2-y1)/(x2-x1) #in /cm^4\n", - "q = 1.6*10**-19 #in C\n", - "D_n = 25 #in cm^2/sec\n", - "J_n = q*D_n*dnBYdx #in A/cm^2\n", - "\n", - "\n", - "#RESULTS\n", - "print('The collector current density is =%.f in A/cm^2' %J_n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The collector current density is =8 in A/cm^2\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.22 Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "h = 6.64*10**-34 ##in J-s\n", - "q=1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "h= h/q #in eV\n", - "c = 3*10**8 #in m/s\n", - "lembda = 0.87*10**-6 #in m\n", - "E_g = (h*c)/lembda #in eV\n", - "\n", - "#RESULTS\n", - "print('The band gap in eV is =%.2f ' %E_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The band gap in eV is =1.43 \n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.23 Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "alpha = 5*10**4 #in cm^-1\n", - "l = 0.46*10**-4 #in cm\n", - "hv = 2 #in eV\n", - "I_o = 10**-2 #in W\n", - "\n", - "#CALCULATIONS\n", - "I_t = I_o*math.exp(-alpha*l) #in W\n", - "A_p = I_o-I_t #absorbed power in W or J/s\n", - "c = 1.43\n", - "A_E = (hv-c)/hv*A_p # in J/s\n", - "e = 1.6*10**-19 #in C\n", - "P = A_p/(e*hv) #Perfect quantum efficiency in photon/s\n", - "\n", - "#RESULTS\n", - "print('Total energy absorbed is =%.f X 10^-3 in J/s' %(A_p*(10**3)))\n", - "print('Rate of excess thermal energy is =%.2f X 10^-3 in J/s' %(A_E*(10**3)))\n", - "print('Perfect quantum efficiency is =%.2f X 10^16 in photon/s' %(P/(10**16)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total energy absorbed is =9 X 10^-3 in J/s\n", - "Rate of excess thermal energy is =2.56 X 10^-3 in J/s\n", - "Perfect quantum efficiency is =2.81 X 10^16 in photon/s\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 3.24 Page No 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Mu_p = 500 #in cm^2/v-s\n", - "kT = 0.0259\n", - "Toh_p = 10**-10 #in sec\n", - "p_o = 10**17 #in cm^-3\n", - "q= 1.6*10**-19 # in C\n", - "A=0.5 #in square meter\n", - "del_p = 5 * 10**16 #in cm^-3\n", - "n_i= 1.5*10**10 #in cm^-3 \n", - "\n", - "\n", - "#CALCULATIONS\n", - "D_p = kT * Mu_p #in cm/s\n", - "L_p = math.sqrt(D_p * Toh_p) # in cm\n", - "x = 10**-5 #in cm\n", - "p = p_o+del_p*e**(x/L_p) #in cm^-3\n", - "Eip= math.log(p/n_i)*kT #in eV\n", - "Ecp= 1.1/2-Eip #value of E_c-E_p in eV\n", - "Ip= q*A*D_p/L_p*del_p*e**(x/L_p) #in A\n", - "Qp= q*A*del_p*L_p #in C\n", - "\n", - "#RESULTS\n", - "print('The hole current is : =%.2f X 10^3 in A ' %(Ip*(10**3)))\n", - "print('Approximation error')\n", - "print('The value of Qp is :=%.2f X 10^-7 in C' %(Qp*(10**7)))\n", - "\n", - "#Note: There is a calculation error to evalaute the value of hole current hence the value of hole current in the book is wrong\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The hole current is : =8.61 X 10^3 in A \n", - "Approximation error\n", - "The value of Qp is :=1.44 X 10^-7 in C\n" - ] - } - ], - "prompt_number": 42 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo4.ipynb b/Advance_Semiconductor_Devices/ChapterNo4.ipynb deleted file mode 100755 index e76421ad..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo4.ipynb +++ /dev/null @@ -1,928 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter No 4 : Junctions and Interfaces

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2 Page No 184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "N_D = 10**17 * 10**6 #in atoms/m^3\n", - "N_A = 0.5*10**16*10**6 #in atoms/m^3\n", - "Epsilon_r = 10\n", - "\n", - "#CALCULATIONS\n", - "Epsilon_o = 8.85*10**-12\n", - "Epsilon = Epsilon_r*Epsilon_o #in F/m\n", - "e = 1.602*10**-19 #in C\n", - "V = 0\n", - "V_B = 0.7 #in V\n", - "W1 = math.sqrt( ((2*Epsilon*V_B)/e)*(1/N_A+1/N_D) ) #in m\n", - "V_o = V_B #in V\n", - "V1 = -10 #in V\n", - "V_B1 = V_o-V1 #in V\n", - "W = math.sqrt( ((2*Epsilon*V_B1)/e)*(1/N_A+1/N_D) ) #in m\n", - "\n", - "\n", - "#RESULTS\n", - "print('The junction width in meter when no external voltage is applied is =%.2f X 10^-6' %(W1*(10**6)))\n", - "print('Junction width in meter with an external voltage of -10V is =%.2f X 10^-6 m' %(W*(10**6)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The junction width in meter when no external voltage is applied is =0.39 X 10^-6\n", - "Junction width in meter with an external voltage of -10V is =1.54 X 10^-6 m\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4 Page No 208" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V = 5 #in V\n", - "V_Gamma = 0.6 #in V\n", - "r_F = 12 #in ohm\n", - "R = 1 #in k ohm\n", - "\n", - "#CALCULATIONS\n", - "R = R * 10**3 #in ohm\n", - "I_F = (V-V_Gamma)/(R+r_F) #in A\n", - "V_F = V_Gamma + (I_F*r_F) #in V\n", - "I_F=I_F*10**3 \n", - "#RESULTS\n", - "print('The forward diode current is =%.2f mA ' %I_F)\n", - "print('The diode voltage is =%.2f V ' %V_F)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The forward diode current is =4.35 mA \n", - "The diode voltage is =0.65 V \n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5 Page No 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "n = 4.4*10**22 #total number of Ge atoms/cm^3\n", - "n_a = 1*10**8 #number of impurity atoms\n", - "\n", - "#CALCULATIONS\n", - "N_A = n/n_a #in atoms/cm^3\n", - "N_A = N_A * 10**6 #in atoms/m^3\n", - "n_i = 2.5*10**13 #in atoms/cm^3\n", - "n_i = n_i * 10**6 #in atoms/m^3\n", - "N_D = 10**3 * N_A #in atoms/m^3\n", - "V_T = 26*10**-3 #in A\n", - "V_J = V_T*math.log( (N_A*N_D)/((n_i)**2) ) #in V\n", - "print('The contact difference of potential is =%.2f V For a silicon P-N junction ' %V_J)\n", - "n = 5*10**22\n", - "N_A = n/n_a #in atoms/cm^3\n", - "N_A = N_A * 10**6 #in atoms/m^3\n", - "N_D = 10**3 * N_A #in atoms/m^3\n", - "n_i = 1.5*10**10 #in /cm^3\n", - "V_J = V_T*math.log(N_A*N_D/n_i**2) #in V\n", - "\n", - "\n", - "#RESULTS\n", - "\n", - "print('The contact difference of potential is =%.2f V' %V_J)\n", - "\n", - "#Note: There is a calculation error to find the value of V_J in the book, so the answer in the book is wrong.\n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The contact difference of potential is =0.33 V For a silicon P-N junction \n", - "The contact difference of potential is =1.44 V\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6 Page No 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Rho_p = 2 #in ohm-cm\n", - "Rho_n = 1 #in ohm cm\n", - "q = 1.6*10**-19 #in C\n", - "n_i = 2.5*10**13 #atoms per cm^3\n", - "Miu_p = 1800\n", - "Miu_n = 3800\n", - "\n", - "#CALCULATIONS\n", - "N_A = 1/(Rho_p*q*Miu_p) #in /cm^3\n", - "N_D = 1/(Rho_n*q*Miu_n) #in /cm^3\n", - "V_T = 26 #in mV\n", - "V_T= V_T*10**-3 #in V\n", - "V_J = V_T*math.log((N_A*N_D)/((n_i)**2)) #in V\n", - "print('The height of the potential energy barrier is =%.2f in V ' %V_J)\n", - "Miu_p = 500\n", - "N_A = 1/(Rho_p*q*Miu_p) #in /cm^3\n", - "Miu_n = 1300\n", - "N_D = 1/(Rho_n*q*Miu_n) #in /cm^3\n", - "n_i = 1.5*10**10;\n", - "V_J = V_T*math.log((N_A*N_D)/((n_i)**2)) #in V\n", - "\n", - "#RESULTS\n", - "print('For silicon P-N juction The height of the potential energy barrier is =%.2f V' %V_J)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The height of the potential energy barrier is =0.22 in V \n", - "For silicon P-N juction The height of the potential energy barrier is =0.67 V\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7 page No 215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Eta = 1\n", - "V_T = 26 #in mV\n", - "V_T= V_T*10**-3 #in V\n", - "\n", - "#CALCULATIONS\n", - "V= math.log(1-0.9)*V_T #in V\n", - "print(\"The voltage in volts is : %.2f \" %V)\n", - "V1=0.05 #in V\n", - "V2= -0.05 #in V\n", - "ratio= (math.e**(V1/(Eta*V_T))-1)/(math.e**(V2/(Eta*V_T))-1)\n", - "print(\"The ratio of the current for a forward bias to reverse bias is : %.2f \" %ratio)\n", - "\n", - "# Part (iii)\n", - "Io= 10 #in \u00b5A\n", - "Io=Io*10**-3 #in mA\n", - "#For \n", - "V=0.1 #in V\n", - "I = Io * (math.e**(V/(Eta*V_T)) - 1) #in mA\n", - "print(\"For v=0.1 V , the value of I is : %.2f mA \" %I)\n", - "\n", - "#For \n", - "V=0.2 #in V\n", - "I = Io * (math.e**(V/(Eta*V_T)) - 1) #in mA\n", - "print(\"For v=0.2 V , the value of I is : %.2f mA \" %I)\n", - "\n", - "#For \n", - "V=0.3 #in V\n", - "I = Io * (math.e**(V/(Eta*V_T)) - 1) #in mA\n", - "\n", - "#RESULTS\n", - "\n", - "I=I*10**-3\n", - "print(\"For v=0.3 V , the value of I is : %.2f mA\" %I)\n", - "print(\"From three value of I, for small rise in forward voltage, the diode current increase rapidly \")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The voltage in volts is : -0.06 \n", - "The ratio of the current for a forward bias to reverse bias is : -6.84 \n", - "For v=0.1 V , the value of I is : 0.46 mA \n", - "For v=0.2 V , the value of I is : 21.90 mA \n", - "For v=0.3 V , the value of I is : 1.03 mA\n", - "From three value of I, for small rise in forward voltage, the diode current increase rapidly \n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.8 Page No 216" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "# Part (i)\n", - "T1= 25 #in \u00b0C\n", - "T2= 80.0 #in \u00b0C\n", - "\n", - "#CALCULATIONS\n", - "# Formula Io2= Io1*2**((T2-T1)/10)\n", - "AntiFactor= 2**((T2-T1)/10)\n", - "print('Anticipated factor for Ge is : =%.f ' %AntiFactor)\n", - "\n", - "# Part (ii)\n", - "T1= 25.0 #in \u00b0C\n", - "T2= 150.0 #in \u00b0C\n", - "AntiFactor= 2**((T2-T1)/10)\n", - "\n", - "#RESULTS\n", - "print('Anticipated factor for Ge is : =%.f ' %AntiFactor)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Anticipated factor for Ge is : =45 \n", - "Anticipated factor for Ge is : =5793 \n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9 Page No 216" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I=5.0 #in \u00b5A\n", - "V=10.0 #in V\n", - "T1= 0.11 #in \u00b0C^-1\n", - "T2= 0.07 #in \u00b0C^-1\n", - "\n", - "#CALCULATIONS\n", - "Io= T2*I/T1 #in \u00b5A\n", - "I_R= I-Io #in \u00b5A\n", - "R= V/I_R #in M\u03a9\n", - "\n", - "#RESULTS\n", - "print('The leakage resistance is : =%.1f M\u03a9 ' %R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The leakage resistance is : =5.5 M\u03a9 \n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10 Page No 216" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "Eta = 1.0\n", - "T = 125.0 #in \u00b0C\n", - "T = T + 273 #in K\n", - "V_T = 8.62 * 10**-5 * 398 #in V\n", - "I_o = 30 #in \u00b5A\n", - "\n", - "#CALCULATIONS\n", - "I_o= I_o*10**-6 #in A\n", - "v = 0.2 #in V\n", - "r_f = (Eta * V_T)/(I_o * math.e**(v/(Eta* V_T))) #in ohm\n", - "print('The dynamic resistance in the forward direction is =%.2f \u03a9 ' %r_f)\n", - "\n", - "r_r = (Eta * V_T)/(I_o * math.e**(-v/(Eta* V_T))) #in ohm\n", - "r_r=r_r*10**-3\n", - "print('The dynamic resistance in the forward direction is =%.2f K\u03a9 ' %r_r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dynamic resistance in the forward direction is =3.36 \u03a9 \n", - "The dynamic resistance in the forward direction is =389.08 K\u03a9 \n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.11 Page No 217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "epsilon = 16/(36 * math.pi * 10**11) #in F/cm\n", - "A = 1 * 10**-2\n", - "W = 2 * 10**-4\n", - "\n", - "#CALCULATIONS\n", - "C_T = (epsilon * A)/W #in F\n", - "C_T=C_T*10**12\n", - "\n", - "#RESULTS\n", - "print('The barrier capacitance is =%.2f pF ' %C_T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The barrier capacitance is =70.74 pF \n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12 Page No 217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "A = 1.0 #in mm^2\n", - "A = A * 10**-6 #in m^2\n", - "N_A = 3 * 10**20 #in atoms/m^3\n", - "q = 1.6 *10**-19 #in C\n", - "V_o = 0.2 #in V\n", - "epsilon_r=16\n", - "epsilon_o= 8.854*10**-12 #in F/m\n", - "\n", - "\n", - "#CALCULATIONS\n", - "epsilon=epsilon_r*epsilon_o\n", - "# Part (a)\n", - "V=-10 #in V\n", - "W = math.sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) #m\n", - "C_T1 = (epsilon * A)/W #in F\n", - "W=W*10**6\n", - "print('The width of the depletion layer for an applied reverse voltage of 10V is =%.2f \u00b5m ' %W)\n", - "\n", - "# Part (b)\n", - "V=-0.1 #in V\n", - "W = math.sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) #m\n", - "C_T2 = (epsilon * A)/W #in F\n", - "W=W*10**6\n", - "print('The width of the depletion layer for an applied reverse voltage of 0.1V is =%.2f \u00b5m ' %W)\n", - "\n", - "# Part (c)\n", - "V=0.1 #in V\n", - "W = math.sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) # m\n", - "W=W*10**6\n", - "print('The width of the depletion layer for an applied reverse voltage of 0.1V is =%.2f \u00b5m ' %W)\n", - "\n", - "#Part (d)\n", - "C_T1=C_T1*10**12\n", - "C_T2=C_T2*10**12\n", - "\n", - "#RESULTS\n", - "print('The space charge capacitance for an applied reverse voltage of 10V is =%.2f pF ' %C_T1)\n", - "print('The space charge capacitance for an applied reverse voltage of 0.1V is =%.2f pF' %C_T2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The width of the depletion layer for an applied reverse voltage of 10V is =7.76 \u00b5m \n", - "The width of the depletion layer for an applied reverse voltage of 0.1V is =1.33 \u00b5m \n", - "The width of the depletion layer for an applied reverse voltage of 0.1V is =0.77 \u00b5m \n", - "The space charge capacitance for an applied reverse voltage of 10V is =18.26 pF \n", - "The space charge capacitance for an applied reverse voltage of 0.1V is =106.46 pF\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 4.13 Page No 218" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_o = 1.8 * 10**-9 #A\n", - "v = 0.6 #in V\n", - "Eta = 2\n", - "V_T = 26 #in mV\n", - "\n", - "#CALCULATIONS\n", - "V_T=V_T*10**-3 #in V\n", - "I = I_o *(math.e**(v/(Eta * V_T))) #in A\n", - "I=I*10**3\n", - "\n", - "#RESULTS\n", - "print('The current in the junction is =%.2f mA ' %I)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current in the junction is =0.18 mA \n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 4.14 Page No 218" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_o = 2.4 * 10**-14\n", - "I = 1.5 #in mA\n", - "I=I*10**-3 #in A\n", - "Eta = 1\n", - "V_T = 26 #in mV\n", - "\n", - "#CALCULATIONS\n", - "V_T= V_T*10**-3 #in V\n", - "v =math.log((I + I_o)/I_o) * V_T #in V\n", - "\n", - "#RESULTS\n", - "print('The forward biasing voltage across the junction is =%.2f V' %v)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The forward biasing voltage across the junction is =0.65 V\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 4.15 Page No 218" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "I_o = 10 #in nA\n", - "\n", - "#CALCULATIONS\n", - "I = I_o * (-1) #in nA\n", - "\n", - "#RESULTS\n", - "print('The Diode current is = %.f nA ' %I)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Diode current is = -10 nA \n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 4.16 Page No 218" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "R = 4.5 #in ohm\n", - "I = 44.4 #in mA\n", - "\n", - "#CALCULATIONS\n", - "I=I*10**-3 #in A\n", - "V = R * I #in V\n", - "Eta = 1\n", - "V_T = 26 #in mV\n", - "V_T=V_T*10**-3 #in V\n", - "I_o = I/((math.e**(V/(Eta * V_T))) -1) #in A\n", - "V = 0.1 #in V\n", - "r_f = (Eta * V_T)/(I_o * ((math.e**(V/(Eta * V_T)))-1)) #in ohm\n", - "\n", - "#RESULTS\n", - "print('The diode dynamic resistance is =%.2f \u03a9' %r_f)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The diode dynamic resistance is =27.78 \u03a9\n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 4.18 Page No 219" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V = 0.25 #in V\n", - "I_o = 1.2 #in \u00b5A\n", - "\n", - "#CALCULATIONS\n", - "I_o = I_o * 10**-6 #in A\n", - "V_T = 26 #in mV\n", - "V_T = V_T * 10**-3 #in V\n", - "Eta = 1\n", - "r = (Eta * V_T)/(I_o * (math.e**(V/(Eta * V_T)))) #in ohm\n", - "\n", - "#RESULTS\n", - "print('The ac resistance of the diode is =%.2f \u03a9' %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ac resistance of the diode is =1.45 \u03a9\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 4.19 Page No 219" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "q = 1.6 * 10**-19 #in C\n", - "N_A = 3 * 10**20 #in /m^3\n", - "A = 1 #in \u00b5m^2\n", - "\n", - "#CALCULATIONS\n", - "A = A * 10**-6 #in m^2\n", - "V = -10 #in V\n", - "V_J = 0.25 #in V\n", - "V_B = V_J - V #in V\n", - "epsilon_o = 8.854 #in pF/m\n", - "epsilon_o = epsilon_o * 10**-12 #in F/m\n", - "epsilon_r = 16\n", - "epsilon = epsilon_o * epsilon_r\n", - "W = math.sqrt((V_B * 2 * epsilon)/(q * N_A)) #in m \n", - "\n", - "#RESULTS\n", - "C_T = (epsilon * A)/W #in pF\n", - "W=W*10**6\n", - "C_T=C_T*10**12\n", - "print('The width of depletion layer is =%.2f \u00b5m ' %W)\n", - "print('The space charge capacitance is =%.2f pF ' %C_T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The width of depletion layer is =7.78 \u00b5m \n", - "The space charge capacitance is =18.21 pF \n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 4.20 Page No 220" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "C_T = 100.0 #in pF\n", - "C_T=C_T*10**-12 #in F\n", - "epsilon_r = 12\n", - "epsilon_o = 8.854 * 10**-12 #in F/m\n", - "\n", - "#CALCULATIONS\n", - "epsilon = epsilon_r * epsilon_o\n", - "Rho_p = 5 #in ohm-cm\n", - "Rho_p = Rho_p * 10**-2 #in ohm-m\n", - "V_j = 0.5 #in V\n", - "V = -4.5 #in V\n", - "Mu_p = 500 #in cm^2\n", - "Mu_p = Mu_p * 10**-4 #in m^2\n", - "Sigma_p = 1/Rho_p #in per ohm-m\n", - "qN_A = Sigma_p/ Mu_p\n", - "V_B = V_j - V\n", - "W = math.sqrt((V_B * 2 * epsilon)/qN_A)\n", - "A = (C_T * W)/ epsilon #in m\n", - "D = math.sqrt(A * (4/math.pi)) #in m\n", - "D = D * 10**3 #in mm\n", - "\n", - "#RESULTS\n", - "print('The diameter is =%.2f mm ' %D)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The diameter is =1.40 mm \n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 4.21 Page No 221" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "q = 1.6 * 10**-19 #in C\n", - "Mu_p = 500 #in cm^2/V-sec\n", - "Rho_p = 3.5 #in ohm-cm\n", - "Mu_n = 1500 #in cm^2/V-sec\n", - "Rho_n = 10 #in ohm-cm\n", - "\n", - "#CALCULATIONS\n", - "N_A = 1/(Rho_p * Mu_p * q) # in /cm^3\n", - "N_D = 1/(Rho_n * Mu_n * q) # in /cm^3\n", - "V_J = 0.56 # in V\n", - "n_i = 1.5 * 10**10 #in /cm^3\n", - "V_T = V_J/math.log((N_A * N_D)/(n_i)**2) #in V\n", - "T = V_T * 11600 #in K\n", - "T = T - 273 #in \u00b0C\n", - "\n", - "#RESULTS\n", - "print('The Temperature of junction is =%.2f \u00b0C ' %T)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Temperature of junction is =14.28 \u00b0C \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example No 4.22 Page No 221" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "R = 5 #in ohm\n", - "I = 50 #in mA\n", - "I=I*10**-3 #in A\n", - "V = R * I #in V\n", - "Eta = 1\n", - "V_T = 26 #in mV\n", - "\n", - "#CALCULATIONS\n", - "V_T=V_T*10**-3 #in V\n", - "I_o = I/((math.e**(V/(Eta * V_T))) - 1) #in A\n", - "v1 = 0.2 #in V\n", - "r = (Eta * V_T)/(I_o * (math.e**(v1/(Eta * V_T)))) #in ohm\n", - "\n", - "#RESULTS\n", - "I_o=I_o*10**6\n", - "print('Reverse saturation current is =%.2f \u00b5A ' %I_o)\n", - "print('Dynamic resistance of the diode is =%.2f \u03a9 ' %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reverse saturation current is =3.33 \u00b5A \n", - "Dynamic resistance of the diode is =3.56 \u03a9 \n" - ] - } - ], - "prompt_number": 52 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo6.ipynb b/Advance_Semiconductor_Devices/ChapterNo6.ipynb deleted file mode 100755 index 44239148..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo6.ipynb +++ /dev/null @@ -1,76 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 6: Microwave Diodes

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1, Page No 254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "C1_min= 5.0 #in pF\n", - "C1_max= 50.0 #in pF\n", - "C2_min= 5.0 #in pF\n", - "C2_max= 50.0 #in pF\n", - "\n", - "#CALCULATIONS\n", - "C1_min=C1_min*10**-12 #in F\n", - "C2_min=C2_min*10**-12 #in F\n", - "C1_max=C1_max*10**-12 #in F\n", - "C2_max=C2_max*10**-12 #in F\n", - "L = 10.0 #in mH\n", - "L = L * 10**-3 #in H\n", - "C_T_min = (C1_min*C2_min)/(C2_min+C2_min) #in F\n", - "f_o_max = 1/( 2*math.pi*(math.sqrt(L*C_T_min)) ) #in Hz \n", - "f_o_max = f_o_max * 10**-6 #in MHz\n", - "C_T_max = (C1_max*C2_max)/(C2_max+C2_max) #in F\n", - "f_o_min = 1/( 2*math.pi*(math.sqrt(L*C_T_max)) ) #in Hz \n", - "f_o_min = f_o_min * 10**-3 #in kHz\n", - "\n", - "#RESULTS\n", - "print('The tuning range for circuit will be =%.2f kHz' %f_o_min)\n", - "print(' To %.3f MHz' %f_o_max)\n", - "\n", - "\n", - "#print(\"The tuning range for circuit will be : \"+string(round(f_o_min))+\" kHz to \"+string(round(f_o_max))+\" MHz\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The tuning range for circuit will be =318.31 kHz\n", - " To 1.007 MHz\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo7.ipynb b/Advance_Semiconductor_Devices/ChapterNo7.ipynb deleted file mode 100755 index 431c4340..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo7.ipynb +++ /dev/null @@ -1,154 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 7: Optoelectonic Devices

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1, Page No 283" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "Vout = 5.0 #in V\n", - "V = 1.5 #ON state voltage drop across LED in V\n", - "I = 5.0 #in mA\n", - "\n", - "#CALCULATIONS\n", - "I = I*10**-3 #in A\n", - "R = (Vout-V)/I #in ohm\n", - "\n", - "#RESULTS\n", - "print('Resistance is =%.f \u03a9' %R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance is =700 \u03a9\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2, Page No 306" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "N_A = 7.5*10**24 #in atoms/m^3\n", - "N_D = 1.5*10**22 #in atoms/m^3\n", - "D_e = 25*10**-4 #in m^2/s\n", - "D_n = 1*10**-3 #in m^2/s\n", - "V_T = 26*10**-3 #in V\n", - "\n", - "#CALCULATIONS\n", - "Torque_eo = 500*10**-9 #in sec\n", - "Torque_ho = 100*10**-9 #in sec\n", - "e = 1.6*10**-19 #in C\n", - "n_i = 1.5*10**16 #in /m^3\n", - "I_lambda = 12.5 #in mA/cm^2\n", - "I_lambda= I_lambda*10**-3 #in A/cm^2\n", - "L_e = math.sqrt(D_e*Torque_eo) #in m\n", - "L_n = math.sqrt(D_n*Torque_ho) #in m\n", - "J_s = e*((n_i)**2)*( ((D_e)/(L_e*N_A)) + ((D_n)/(L_n*N_D)) ) #in A/m^2\n", - "J_s= J_s*10**-4 #in A/cm^2\n", - "V_OC = V_T*(math.log(1+(I_lambda/J_s))) #in V\n", - "\n", - "#RESULTS\n", - "print('Open circuit voltage is =%.2f volts ' %V_OC)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Open circuit voltage is =0.52 volts \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3, Page No 307" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Phi_o = 1.0*10**21 #in m^-2s^-1\n", - "alpha =1.0*10**5 #in m^-1\n", - "e= 1.6*10**-19 #in C\n", - "\n", - "#CALCULATIONS\n", - "G_L1 = alpha*Phi_o #in m^-3s^-1\n", - "W = 26.0 #in \u00b5m\n", - "W = W * 10**-6 #in m\n", - "G_L2 = alpha*Phi_o*(math.e)**((-alpha)*W) #in m^-3s^-1\n", - "#temp=(1-math.e)**(-(alpha)*W)\n", - "J_L = e*Phi_o*(1-math.e**(-(alpha)*W)) #in A/m^2\n", - "J_L = J_L * 10**3*10**-4 #in mA/cm^2\n", - "\n", - "#RESULTS\n", - "print('Photo current density is =%.1f mA/cm^2' %J_L)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Photo current density is =14.8 mA/cm^2\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo8.ipynb b/Advance_Semiconductor_Devices/ChapterNo8.ipynb deleted file mode 100755 index 47137bb2..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo8.ipynb +++ /dev/null @@ -1,576 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter No 8 : Metal Semiconductor Field Effect Transistor

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1, Page No 323" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "I_DSS = 15.0 #in mA\n", - "V_GS_off = -5.0 #in V\n", - "V_GS = 0 #in V\n", - "\n", - "#CALCULATIONS\n", - "I_D = I_DSS*((1-(V_GS/V_GS_off))**2) #in mA\n", - "V_GS = -1 #in V\n", - "I_D1 = I_DSS*((1.0-(V_GS/V_GS_off))**2) #in mA\n", - "V_GS = -4 #in V\n", - "I_D2 = I_DSS*((1-(V_GS/V_GS_off))**2) #in mA\n", - "\n", - "#RESULTS\n", - "print('When V_GS=0, the drain current is =%.f mA ' %I_D)\n", - "print('When V_GS=-1V, the drain current is =%.2f mA ' %I_D1)\n", - "print('The interplanner spacing is =%.2f \u00c5' %I_D2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "When V_GS=0, the drain current is =15 mA \n", - "When V_GS=-1V, the drain current is =9.60 mA \n", - "The interplanner spacing is =0.60 \u00c5\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4, Page No 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_DSS = 20.0 #in mA\n", - "V_P = -8 #in V\n", - "g_mo = 5000.0 #in \u00b5s\n", - "V_GS = -4.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "\n", - "I_D = I_DSS*((1-(V_GS/V_P))**2) #in mA\n", - "g_m = g_mo*(1-(V_GS/V_P)) #in \u00b5s\n", - "\n", - "#RESULTS\n", - "print('The value of drain current is =%.f mA ' %I_D)\n", - "print('The transconductance is =%.f \u00b5s' %g_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of drain current is =5 mA \n", - "The transconductance is =2500 \u00b5s\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5 Page No 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "\n", - "\n", - "#initialisation of variables\n", - "I_D1 = 10.0 #in mA\n", - "V_GS = -12.0 #in V\n", - "V_GSth = -3.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "K = I_D1/( (V_GS-V_GSth)**2 ) #in mA/V\n", - "V_GS= -6 #in V\n", - "I_D = K*((V_GS-V_GSth)**2) #in mA\n", - "\n", - "#RESULTS\n", - "print('The value of I_D is =%.2f mA ' %I_D)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is =1.11 mA \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7, Page No 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_GS = -2.0 #in V\n", - "V_P = -5.0 #in V\n", - "V_DS = V_GS-V_P #in V\n", - "I_DSS = 8.0 #in mA\n", - "\n", - "#CALCULATIONS\n", - "I_D = I_DSS*((1-(V_GS/V_P))**2) #in mA\n", - "\n", - "#RESULTS\n", - "print('The minimum value of V_DS is =%.f V ' %V_DS)\n", - "print('The drain current is =%.2f mA' %I_D)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum value of V_DS is =3 V \n", - "The drain current is =2.88 mA\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.8 Page No 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_P = -2 #in V\n", - "I_DSS = 1.65 #in mA\n", - "I_D = 0.8 #in mA\n", - "V_DD = 24.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "V_GS = V_P*(1- math.sqrt(I_D/I_DSS) ) #in V\n", - "g_mo = -(2*I_DSS)/V_P #in mS\n", - "g_m = g_mo*(1-(V_GS/V_P)) #in mS\n", - "\n", - "#RESULTS\n", - "print('The value of V_GS is =%.2f V ' %V_GS)\n", - "print('The value of g_m is =%.2f mS' %g_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_GS is =-0.61 V \n", - "The value of g_m is =1.15 mS\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9 Page No 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_P = 5.0 #in V\n", - "I_DSS = -40.0 #in mA\n", - "I_D = -15.0 #in mA\n", - "\n", - "#CALCULATIONS\n", - "V_GS = V_P*(math.sqrt(I_D/I_DSS)-1 ) #in V\n", - "\n", - "#RESULTS\n", - "print('The gate source voltage is =%.2f V' %(V_GS*-1))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The gate source voltage is =1.94 V\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.10, Page No 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_D1 = 1.9 #in mA\n", - "I_D2 = 1.0 #in mA\n", - "\n", - "#CALCULATIONS\n", - "del_I_D = I_D1-I_D2 #in mA\n", - "V_GS2 = -3.3 #in V\n", - "V_GS1 = -3.0 #in V\n", - "del_V_GS = V_GS1-V_GS2 #in V\n", - "g_m = del_I_D/del_V_GS #in mA/V\n", - "g_m = g_m * 10**3 #in \u00b5 mhos\n", - "\n", - "#RESULTS\n", - "print('The value of transconductance is =%.f \u00b5 mhos ' %g_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of transconductance is =3000 \u00b5 mhos \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.11 Page No 329" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "V_DS1 = 14.0 #in V\n", - "V_DS2 = 5.0 #in V\n", - "del_V_DS = V_DS1-V_DS2 # in V\n", - "I_D1 = 3.3 #in mA\n", - "I_D2 = 3 # in mA\n", - "\n", - "#CALCULATIONS\n", - "del_I_D = I_D1-I_D2 #in mA\n", - "r_d = del_V_DS/del_I_D #in k ohms\n", - "print('The drain resistance is =%.f k ohms' %r_d)\n", - "V_GS1 = 0.4 #in V\n", - "V_GS2 = 0.1 #in V\n", - "del_V_GS = V_GS1-V_GS2 #in V\n", - "I_D1 = 3.3 #in mA\n", - "I_D2 = 0.71 #in mA\n", - "del_I_D = I_D1-I_D2 # in mA\n", - "g_m = del_I_D/del_V_GS # in mA/V\n", - "g_m = g_m * 10**3 # in \u00b5mhos\n", - "\n", - "\n", - "#RESULTS\n", - "print('The transconductance is =%.f \u00b5mhos ' %g_m)\n", - "Miu =r_d*10**3*g_m*10**-6\n", - "print('Amplification factor is =%.f ' %Miu)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The drain resistance is =30 k ohms\n", - "The transconductance is =8633 \u00b5mhos \n", - "Amplification factor is =259 \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.12 Page No 334" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "q = 1.6*10**-19 #in C\n", - "N_D = 10**15*10**6 #electrons/m^3\n", - "a = 3*10**-4 #in cm\n", - "a=a*10**-2 #in m\n", - "\n", - "#CALCULATIONS\n", - "Epsilon_o = (36 * math.pi * 10**9)**-1\n", - "Epsilon = 12*Epsilon_o\n", - "V_P = (q*N_D*((a)**2))/(2*Epsilon) #in V\n", - "print('Pinch off voltage is =%.2f V ' %V_P)\n", - "V_GS = 1.0 #in V\n", - "V_P = 2.0 #in V\n", - "b = a*( 1-math.sqrt(V_GS/V_P) ) #in m\n", - "b = b * 10**6 #in \u00b5m\n", - "\n", - "#RESULTS\n", - "print('The channel half width is =%.2f \u00b5m' %b)\n", - "# Note: In the book, the unit of channel half width is wrong." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pinch off voltage is =6.79 V \n", - "The channel half width is =0.88 \u00b5m\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.13 Page No 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_DSS = 8.0 #in mA\n", - "V_P = -4.0 #in V\n", - "a = 3*10**-4 #in cm\n", - "N_D = 10**15 #in electrons/cm^3\n", - "I_D = 3.0 #in mA\n", - "\n", - "#CALCULATIONS\n", - "V_GS = V_P*( 1-math.sqrt(I_D/I_DSS) ) #in V\n", - "V_DS_sat = V_GS-V_P #in V\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of V_GS is =%.2f V' %V_GS)\n", - "print('The value of V_DS_sat is =%.2f V ' %V_DS_sat)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_GS is =-1.55 V\n", - "The value of V_DS_sat is =2.45 V \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 8.14 Page No 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_P = -4 #in V\n", - "I_DSS = 9.0 #in mA\n", - "V_GS = -2.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "I_D = I_DSS*(( 1-(V_GS/V_P) )**2) #in mA\n", - "\n", - "#RESULTS\n", - "print('The drain current is =%.2f mA ' %I_D)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The drain current is =2.25 mA \n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 8.15 Page No 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "I_DSS = 12.0 #in mA\n", - "V_P = -6.0 #in V\n", - "V_GS = -1.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "g_mo = (-2*I_DSS)/V_P #in mA/V\n", - "g_m = g_mo*(1-(V_GS/V_P)) #in mS\n", - "\n", - "#RESULTS\n", - "print('The value of transconductance is =%.2f mS' %g_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of transconductance is =3.33 mS\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 8.16 Page No 336" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "I_DSS = 10.0 #in mA\n", - "V_P = -5.0 #in V\n", - "V_GS = -2.5 #in V\n", - "\n", - "#CALCULATIONS\n", - "g_m = ((-2*I_DSS)/V_P)*(1-(V_GS/V_P)) #in mS .... correction\n", - "I_D = I_DSS * ((1-(V_GS/V_P))**2) #in mA\n", - "\n", - "\n", - "#RESULTS\n", - "print('The transconductance is =%.f mS ' %g_m)\n", - "print('The drain current is =%.2f mA ' %I_D)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transconductance is =2 mS \n", - "The drain current is =2.50 mA \n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo9.ipynb b/Advance_Semiconductor_Devices/ChapterNo9.ipynb deleted file mode 100755 index d2b16e2d..00000000 --- a/Advance_Semiconductor_Devices/ChapterNo9.ipynb +++ /dev/null @@ -1,1684 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter No 9 : MOS Transistors

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1, Page No 361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_TN = 0.7 #in V\n", - "W = 45*10**-4 #in cm\n", - "L = 4.0 #in \u00b5m\n", - "L = L * 10**-4 #in cm\n", - "t_ox = 450 #in \u00c5\n", - "\n", - "#CALCULATIONS\n", - "t_ox = t_ox*10**-8 #in cm\n", - "V_GS = 1.4 #in V\n", - "Miu_n = 700 #in cm^2/V-s\n", - "Epsilon_ox = (8.85*10**-14)*(3.9) #in F/cm\n", - "k_n = (W*Miu_n*Epsilon_ox)/(2*L*t_ox) #A/V^2\n", - "I_D = k_n*((V_GS-V_TN)**2) #in A\n", - "k_n=k_n*10**3\n", - "I_D=I_D*10**3\n", - "\n", - "#RESULTS\n", - "print('The value of k_n is : =%.2f mA/V^2' %k_n)\n", - "print('The current is =%.2f mA' %I_D)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of k_n is : =0.30 mA/V^2\n", - "The current is =0.15 mA\n", - "Approximation error\n" - ] - } - ], - "prompt_number": 87 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2, Page No 376" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "I_Don = 6.0 #in mA\n", - "I_Don= I_Don*10**-3 #in A\n", - "V_GSon = 8 #in V\n", - "V_GSth = 3 #in V\n", - "V_DD = 12.0 #in V\n", - "R_D= 2*10**3 #in \u03a9\n", - "\n", - "#CALCULATIONS\n", - "k= I_Don/(V_GSon-V_GSth)**2 #in A/V^2\n", - "A= R_D**2 #assumed\n", - "B= 2*R_D*V_GSth-2*R_D*V_DD-1/k #assumed\n", - "C= (V_DD-V_GSth)**2 #assumed\n", - "\n", - "I_DQ= 0.0027940 #in A\n", - "V_DSQ= V_DD-I_DQ*R_D #in V\n", - "I_DQ=I_DQ*10**3\n", - "\n", - "#RESULTS\n", - "print('The value of I_DQ is : =%.2f mA' %I_DQ)\n", - "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is : =2.79 mA\n", - "The value of V_DSQ is : =6.41 volts \n" - ] - } - ], - "prompt_number": 88 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3 Page No 378" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_GS = 6.0 #in V\n", - "I_D = 4.0 #in mA\n", - "V_GSth = 2.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "V_DS = V_GS #in V\n", - "V_DD = 2*V_DS #in V\n", - "R_D = (V_DD-V_DS)/I_D #in k ohm\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of V_DD is =%.2f V ' %V_DD)\n", - "print('The value of R_D is =%.2f k ohm' %R_D)\n", - "print('The very high value for the gate to drain resistance is : 10 M\u03a9 ' )\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_DD is =12.00 V \n", - "The value of R_D is =1.50 k ohm\n", - "The very high value for the gate to drain resistance is : 10 M\u03a9 \n" - ] - } - ], - "prompt_number": 89 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4, Page No 379" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_Don = 3*10**-3 \n", - "V_GSon = 10.0 #in V\n", - "V_GSth= 5.0 #in V\n", - "R2= 18*10**6 #in \u03a9\n", - "R1= 22*10**6 #in \u03a9\n", - "R_S=820 #in \u03a9\n", - "R_D=3*10**3 #in \u03a9\n", - "V_DD= 40.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "V_G= V_DD*R2/(R1+R2) #in V\n", - "k= I_Don/(V_GSon-V_GSth)**2 #in A/V**2\n", - "A= R_S**2 #assumed\n", - "B= 2*R_S*V_GSth-2*R_S*V_G-1/k #assumed\n", - "C= (V_G-V_GSth)**2 #assumed\n", - "I_D= 0.0067246 #in A\n", - "I_DQ= I_D #in A\n", - "V_GSQ= V_G-I_D*R_S #in V\n", - "V_DSQ= V_DD-I_DQ*(R_D+R_S) #in V\n", - "I_DQ=I_DQ*10**3\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of I_DQ is =%.2f mA' %I_DQ)\n", - "print('The value of V_GSQ is =%.2f volts ' %V_GSQ)\n", - "print('The value of V_DSQ is =%.2f volts ' %V_DSQ)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is =6.72 mA\n", - "The value of V_GSQ is =12.49 volts \n", - "The value of V_DSQ is =14.31 volts \n" - ] - } - ], - "prompt_number": 90 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5 Page No 380" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_D= '0.3*(V_GS-V_P)^2' #given expression\n", - "V_DD= 30.0 #in V\n", - "V_P= 4 #in V\n", - "R_GS = 1.2*10**6 #in \u03a9\n", - "R_G = 1.2*10**6 #in \u03a9\n", - "I_D= 1.2 #in mA\n", - "\n", - "#CALCULATIONS\n", - "Req= R_GS/(R_GS+R_G) #in \u03a9\n", - "R_D= 15.0 #in \u03a9\n", - "A= (R_D*Req)**2 #assumed\n", - "B= -(2*R_D*Req*(V_DD*Req-V_P)+1/0.3) #assumed\n", - "C= (V_DD*Req-V_P)**2 #assumed\n", - "I_DSQ= I_D #in mA\n", - "V_GS= (V_DD-I_D*R_D) #in V\n", - "V_DS= Req*V_GS #in V\n", - "\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of I_DSQ is : =%.2f mA' %I_DSQ)\n", - "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", - "print('The value of V_DS is : =%.2f volts ' %V_DS)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DSQ is : =1.20 mA\n", - "The value of V_GS is : =12.00 volts \n", - "The value of V_DS is : =6.00 volts \n" - ] - } - ], - "prompt_number": 91 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6 Page No 380" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "k = 0.1 #in mA/V^2\n", - "V_T = 1.0 # in V\n", - "R1 = 33.0 #in k ohm\n", - "R2 = 21.0 #in k ohm\n", - "V_DD = 6.0 #in V\n", - "R_D = 18 #in k ohm\n", - "\n", - "#CALCULATIONS\n", - "V_G = (R2/(R2+R1))*V_DD #in V\n", - "V_S = 0 #in V\n", - "V_GS = V_G-V_S #in V\n", - "I_D = k*((V_GS-V_T)**2) #in mA\n", - "V_DS = V_DD - (I_D*R_D) #in V\n", - "V_DSsat = V_GS-V_T #in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_D is =%.2f mA ' %I_D)\n", - "print('The value of V_DS(sat) is =%.2f V ' %V_DS)\n", - "print('The value of V_DS(sat) is =%.2f V ' %V_DSsat)\n", - "\n", - "if V_DS > V_DSsat :\n", - " print('MOSFET is in saturation region ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is =0.18 mA \n", - "The value of V_DS(sat) is =2.80 V \n", - "The value of V_DS(sat) is =1.33 V \n", - "MOSFET is in saturation region \n" - ] - } - ], - "prompt_number": 92 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8, Page No 382" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "R2 = 18.0 #in k ohm\n", - "R1 = 33.0 #in k ohm\n", - "V_DD = 6.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "V_G = (R2/(R1+R2))*V_DD #in V\n", - "V_S = V_DD # in V\n", - "V_SG = V_S-V_G #in V\n", - "k = 0.1\n", - "V_T = -1 #in V\n", - "I_D = k*((V_SG+V_T)**2) #in mA\n", - "R_D = 3.0 # in k ohm\n", - "V_SD = V_DD - (I_D*R_D) #in V\n", - "V_SDsat = V_SG+V_T #in V\n", - "\n", - "#RESULTS\n", - "print('The value of V_SG is =%.2f V ' %V_SG)\n", - "print('The value of I_D is =%.2f mA ' %I_D)\n", - "print('The value of V_SD is =%.2f V ' %V_SD)\n", - "print('The value of V_SD(sat) is =%.2f V ' %V_SDsat)\n", - "\n", - "if V_SD > V_SDsat :\n", - " print('The p MOSFET is indeed biased in the saturation region')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_SG is =3.88 V \n", - "The value of I_D is =0.83 mA \n", - "The value of V_SD is =3.51 V \n", - "The value of V_SD(sat) is =2.88 V \n", - "The p MOSFET is indeed biased in the saturation region\n" - ] - } - ], - "prompt_number": 93 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.9 Page No 384" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "V_G= 1.5 # in V\n", - "V_P= -3.0 # in V\n", - "R_S= 750.0 # in \u03a9\n", - "R_D= 1800 #in \u03a9\n", - "I_DSS= 6*10**-3 # in A\n", - "V_DD= 18 #in V\n", - "\n", - "#CALCULATIONS\n", - "A= R_S**2\n", - "B=(2*R_S*(V_P-V_G)-V_P**2/I_DSS)\n", - "C=(V_P-V_G)**2\n", - "I_D= 0.0031170 #in A\n", - "I_DQ= I_D #in A\n", - "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", - "V_DSQ= V_DS # in V\n", - "I_DQ=I_DQ*10**3\n", - "\n", - "#RESULTS\n", - "print('The value of I_DQ is : =%.2f mA ' %I_DQ)\n", - "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is : =3.12 mA \n", - "The value of V_DSQ is : =10.05 volts \n" - ] - } - ], - "prompt_number": 94 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.10 Page No 384" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_GS = 4.0 #in V\n", - "V_P = 2.0 #in V\n", - "R2 = 10.0 #in k ohm\n", - "R1 = 30.0 #in k ohm\n", - "R_D= 2.5 #in kohm\n", - "I_D= 15 #in mA\n", - "\n", - "#CALCULATIONS\n", - "I_D= I_D*10**-3 #in A\n", - "V_DD = 25 #in V\n", - "V_G = (V_DD/R_D)*V_DD/(R1+R2) #in V\n", - "R_S = (V_G-V_GS)/I_D # in ohm\n", - "\n", - "#RESULTS\n", - "print('The value of R_S is =%.f ohm ' %R_S)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of R_S is =150 ohm \n" - ] - } - ], - "prompt_number": 95 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.11 Page No 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "k= 0.1 #in mA/V^2\n", - "V_T= 1 # in V\n", - "R2= 87*10**3 #in \u03a9\n", - "R1= 110*10**3 # in \u03a9\n", - "R_S=2 #in k\u03a9\n", - "R_D=2 #in k\u03a9\n", - "V_DD= 6 #in V\n", - "V_SS= 6 #in V\n", - "\n", - "#CALCULATIONS\n", - "V_G= (V_DD+V_SS)*R2/(R1+R2) # in V\n", - "A= R_S**2 # assumed\n", - "B= -(2*R_S*(V_G+V_SS-V_T)+1/k) # assumed\n", - "C= (V_G+V_SS-V_T)**2 #assumed\n", - "I_D= 2.6001587 # in mA\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of I_D is : =%.2f mA' %I_D)\n", - "V_DS=V_DD+V_SS-I_D*R_D-I_D*R_S #in V\n", - "print('The value of V_DS is : =%.2f volts' %V_DS)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is : =2.60 mA\n", - "The value of V_DS is : =1.60 volts\n" - ] - } - ], - "prompt_number": 96 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.12 Page No 386" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "k = 0.16 #in mA/V^2\n", - "V_T = 2.0 #in V\n", - "I_D = 0.5 #in mA\n", - "V_DD = 6.0 #in V\n", - "V_SS = -6 #in V\n", - "R_D = 10.0 #in k ohm\n", - "\n", - "#CALCULATIONS\n", - "V_GS = V_T + (math.sqrt(I_D/k)) #in V\n", - "R_S = 2 #in k ohm\n", - "V_S = (I_D*R_S) - V_DD # in V\n", - "V_G = V_GS+V_S # in V\n", - "I = 0.1*I_D #in mA\n", - "R2 = (V_G+V_DD)/I #in k ohm\n", - "print('The value of R2 is =%.2f k ohm' %R2)\n", - "R1 = (V_DD - V_G)/I #in k ohm\n", - "print('The value of R1 is =%.2f k ohm' %R1)\n", - "V_DS = (V_DD-V_SS) - (I_D*(R_S+R_D)) #in V\n", - "print('The value of V_DS is =%.2f V' %V_DS)\n", - "V_DSsat = V_GS-V_T # in V\n", - "\n", - "#RESULTS\n", - "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", - "if V_DS > V_DSsat :\n", - " print('The MOSFET is in saturation region')\n", - "\n", - " # Note: The value of R1 is in k ohm but in the book it is wrong." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of R2 is =95.36 k ohm\n", - "The value of R1 is =144.64 k ohm\n", - "The value of V_DS is =6.00 V\n", - "The value of V_DS(sat) is =1.77 V\n", - "The MOSFET is in saturation region\n" - ] - } - ], - "prompt_number": 97 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.13 Page No 387" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_DD = 6.0 #in V\n", - "V_D = 3.0 #in V\n", - "R_D = 10.0 #in k ohm\n", - "\n", - "#CALCULATIONS\n", - "I_DQ = (V_DD-V_D)/R_D #in mA\n", - "print('The value of I_DQ is =%.2f mA ' %I_DQ)\n", - "V_T = 0.8 #in V\n", - "k = 0.12 #in mA/V^2\n", - "V_GS = math.sqrt(I_DQ/k) + V_T #in V\n", - "V_S = -V_GS #in V\n", - "V_DS = V_D-V_S #in V\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of V_DS is =%.2f V' %V_DS)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is =0.30 mA \n", - "The value of V_DS is =5.38 V\n" - ] - } - ], - "prompt_number": 98 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.14 Page No 388" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_D = 0.3 # in mA\n", - "k = 0.12 #in mA/V^2\n", - "V_T = 1.0 #in V\n", - "\n", - "#CALCULATIONS\n", - "V_GS = V_T + (math.sqrt(I_D/k)) #in V\n", - "V_S = -V_GS #in V\n", - "V_DD = 6.0 #in V\n", - "V_D = 3.0 # in V\n", - "I_DQ = 0.3 #in mA\n", - "R_D = (V_DD-V_D)/I_DQ #in k ohm\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of R_D is =%.2f k ohm' %R_D)\n", - "V_DS = V_D - V_S #in V\n", - "print('The value of V_DS is =%.2f V' %V_DS)\n", - "V_DSsat = V_GS - V_T #in V\n", - "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", - "if V_DS > V_DSsat :\n", - " print('The MOSFET is in saturation region')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of R_D is =10.00 k ohm\n", - "The value of V_DS is =5.58 V\n", - "The value of V_DS(sat) is =1.58 V\n", - "The MOSFET is in saturation region\n" - ] - } - ], - "prompt_number": 99 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.15 Page No 389" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "k= 0.05 #in mA/V^2\n", - "V_T= 1 #in V\n", - "V_DD= 6 # in V\n", - "R_S= 9.1 #in k\u03a9\n", - "I_D= 0.3631765 # in mA\n", - "\n", - "#CALCULATIONS\n", - "A= R_S**2 # assumed\n", - "B=-(2*V_DD*R_S+1/k) # assumed\n", - "C= V_DD**2 #assumed\n", - "V_GS= V_DD-I_D*R_S #in V\n", - "V_DS= V_GS # in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_D is : =%.2f mA' %I_D)\n", - "print('The value of V_GS is : =%.2f volts' %V_GS)\n", - "print('The value of V_DS is : =%.2f volts' %V_DS)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is : =0.36 mA\n", - "The value of V_GS is : =2.70 volts\n", - "The value of V_DS is : =2.70 volts\n" - ] - } - ], - "prompt_number": 100 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.16 Page No 390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "k1= 0.01 #in mA/V^2\n", - "k2= 0.05 #in mA/V^2\n", - "V_DD= 5 # in V\n", - "V_T1=1 # in V\n", - "V_T2=1 # in V\n", - "Vi= 5 #in V\n", - "Vo= 0.3485163 # in V\n", - "\n", - "#CALCULATIONS\n", - "A=(k1+k2)\n", - "B=-(2*k1*(V_DD-V_T1)+2*k2*(Vi-V_T2))\n", - "C=k1*(V_DD-V_T1)**2\n", - "V_GS2= Vi # in V\n", - "V_DS2= Vo # in V\n", - "V_GS1= V_DD-Vo # in V\n", - "I_D1= k1*(V_GS1-V_T1)**2 #in mA\n", - "I_D2= I_D1 # in mA\n", - "print('Part (i) For Vi = 5 V')\n", - "print('The output voltage is : =%.2f volts' %Vo)\n", - "print('The value of I_D1 is : =%.2f mA' %I_D1)\n", - "print('The value of I_D2 is : =%.2f mA' %I_D2)\n", - "# Analysis for Vi= 1.5V\n", - "Vi= 1.5 #in V\n", - "Vo= V_DD-V_T1-math.sqrt(k2/k1)*(Vi-V_T2) # in V\n", - "I_D2= k2*(Vi-V_T2)**2 #in mA\n", - "I_D1= I_D2 #in mA\n", - "\n", - "\n", - "#RESULTS\n", - "print('Part (ii) For Vi = 1.5 V')\n", - "print('The output voltage is : =%.2f volts' %Vo)\n", - "print('The value of I_D1 is : =%.2f mA' %I_D1)\n", - "print('The value of I_D2 is : =%.2f mA' %I_D2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part (i) For Vi = 5 V\n", - "The output voltage is : =0.35 volts\n", - "The value of I_D1 is : =0.13 mA\n", - "The value of I_D2 is : =0.13 mA\n", - "Part (ii) For Vi = 1.5 V\n", - "The output voltage is : =2.88 volts\n", - "The value of I_D1 is : =0.01 mA\n", - "The value of I_D2 is : =0.01 mA\n" - ] - } - ], - "prompt_number": 101 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.17 Page No 392" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "k = 0.12 #in mA/V^2\n", - "V_T = -2.5 #in V\n", - "V_GS = 0\n", - "\n", - "#CALCULATIONS\n", - "I_D = k*((V_GS-V_T)**2) #in mA\n", - "print('The value of I_D is =%.2f mA' %I_D)\n", - "V_DD = 6 #in V\n", - "R_S = 4.7 #in k ohm \n", - "V_DS = V_DD -(I_D*R_S) #in V\n", - "print('The value of V_DS is =%.2f V' %V_DS)\n", - "V_S = 0 # in V \n", - "V_DSsat = V_S - V_T # in V\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", - "if V_DS < V_DSsat :\n", - " print('The device is in the non saturation region')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is =0.75 mA\n", - "The value of V_DS is =2.47 V\n", - "The value of V_DS(sat) is =2.50 V\n", - "The device is in the non saturation region\n" - ] - } - ], - "prompt_number": 102 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.18 Page No 394" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "k4 = 0.125 #in mA/V^2\n", - "k3 = k4 #in mA/V^2\n", - "k2 = k4 #in mA/V^2\n", - "k1 = 0.25 #in mA/V^2\n", - "V_T1 = 0.8 # in V\n", - "V_T2 = V_T1 # in V\n", - "V_T3 = V_T1 #in V\n", - "V_T4 = V_T1 #in V\n", - "V_SS = -5 #in V\n", - "V_DD = 5 #in V\n", - "R_D = 10 #in k ohm\n", - "\n", - "#CALCULATIONS\n", - "V_GS3 = ((math.sqrt(k4/k3) * (-V_SS - V_T4))+V_T3)/(1+math.sqrt(k4/k3)) #in V\n", - "I_Q = k2*((V_GS3-V_T2)**2) #in mA\n", - "I_D1 = I_Q #in mA\n", - "V_GS1 = V_T1 + (math.sqrt(I_D1/k1)) #in V\n", - "\n", - "#RESULTS\n", - "print('The value of V_GS1 is =%.2f V ' %V_GS1)\n", - "V_DS2 = (-V_SS-V_GS1) #in V\n", - "print('The value of V_DS2 is =%.2f V ' %V_DS2)\n", - "V_DS1 = V_DD - (I_Q*R_D) - (V_SS + V_DS2) #in V\n", - "print('The value of V_DS1 is =%.2f V' %V_DS1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_GS1 is =2.00 V \n", - "The value of V_DS2 is =3.00 V \n", - "The value of V_DS1 is =3.39 V\n" - ] - } - ], - "prompt_number": 103 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.19 Page No 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "R2 = 20.0 # in k ohm\n", - "R1 = 30.0 #in k ohm\n", - "R_D = 20 # in k ohm\n", - "\n", - "#CALCULATIONS\n", - "R_D=R_D*10**3 #in ohm\n", - "V_DD = 5 #in V\n", - "V_G = (R2/(R1+R2))*V_DD #in V\n", - "V_S = 0 #in V\n", - "V_GS = V_G #in V\n", - "k = 100*10**-6 #in A/V^2\n", - "V_T = 1 #in V\n", - "I_DQ = k*((V_GS-V_T)**2) #in A\n", - "\n", - "\n", - "#RESULTS\n", - "V_DSQ = V_DD - (I_DQ*R_D) #in V \n", - "print('The value of V_DSQ is =%.f V ' %V_DSQ)\n", - "I_DQ=I_DQ*10**6\n", - "print('The value of I_DQ is =%.f \u00b5A' %I_DQ)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_DSQ is =3 V \n", - "The value of I_DQ is =100 \u00b5A\n" - ] - } - ], - "prompt_number": 104 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.20 Page No 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_P= -8 # in V\n", - "R_S= 2.4 #in k\u03a9\n", - "I_DSS= 8 #in mA\n", - "V_DD= 20 #in V\n", - "R_D= 6.2 #in k\u03a9\n", - "I_D= 1.7668305 #in mA\n", - "\n", - "#CALCULATIONS\n", - "A= R_S**2\n", - "B=(2*R_S*(V_P)-V_P**2/I_DSS)\n", - "C=(V_P)**2\n", - "I_DQ= I_D #in mA\n", - "V_GSQ= -I_D*R_S;\n", - "V_D= V_DD-I_D*R_D #in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_DQ is : =%.2f mA' %I_DQ)\n", - "print('The value of V_GSQ : =%.2f volts' %V_GSQ)\n", - "print('The value of V_D is : =%.2f volts' %V_D)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is : =1.77 mA\n", - "The value of V_GSQ : =-4.24 volts\n", - "The value of V_D is : =9.05 volts\n" - ] - } - ], - "prompt_number": 105 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.21 Page No 396" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "k= 75*10**-3 #in mA/V^2\n", - "Vth= -0.8 #in V\n", - "R2 = 100 #in k ohm\n", - "R1 = 100 #in k ohm\n", - "R_S= 6 # in k\u03a9\n", - "R_D= 3 # in k\u03a9\n", - "V_SS = 10 # in V\n", - "V_S = 2.0602803\n", - "\n", - "#CALCULATIONS\n", - "V_G = (R2/(R1+R2))*V_SS #in V\n", - "V_GS= V_G-V_S #in V\n", - "I_D= k*(V_GS-Vth)**2 # in V\n", - "V_DS= -V_SS+I_D*(R_D+R_S) # in V\n", - "V_D= I_D*R_D #in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_D is : =%.2f mA ' %I_D)\n", - "print('The value of V_DS is =%.2f volts ' %V_DS)\n", - "print('The value of V_D is : =%.2f volts' %V_D)\n", - "print('The value of V_S is : =%.2f volts' %V_S)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is : =0.12 mA \n", - "The value of V_DS is =-8.93 volts \n", - "The value of V_D is : =0.36 volts\n", - "The value of V_S is : =2.06 volts\n" - ] - } - ], - "prompt_number": 106 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.22 Page No 396" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_T = 1.0 # in V\n", - "k = 160*10**-6 # in A/V^2\n", - "I_DQ = 160*10**-6 # in A\n", - "\n", - "#CALCULATIONS\n", - "V_GS = V_T + math.sqrt(I_DQ/k) #in V\n", - "V_DD = 5 # in V\n", - "V_DSQ = 3 # in V\n", - "R_D = (V_DD - V_DSQ)/(I_DQ) # in ohm\n", - "R_D = R_D * 10**-3 # in k ohm\n", - "\n", - "#RESULTS\n", - "print('The value of R_D is =%.2f k ohm' %R_D)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of R_D is =12.50 k ohm\n" - ] - } - ], - "prompt_number": 107 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.23 Page No 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_DD= 12 # in V\n", - "V_T= 2 # in V\n", - "kn= 0.5 # in mA/V^2\n", - "R1 = 2.2 # in M ohm\n", - "R2 = 1.8 # in M ohm\n", - "R_S= 1.5 # in k\u03a9\n", - "R_D= 3.9 # in k\u03a9\n", - "I_D= 1.2237155 # in mA\n", - "\n", - "#CALCULATIONS\n", - "V_G = (R2/(R1+R2))*V_DD # in V\n", - "V_GS= V_G-I_D*R_S # V\n", - "I_D= I_D-kn*(V_GS-V_T)**2 # in mA\n", - "I_DQ= I_D #in mA\n", - "V_DSQ= V_DD-I_D*(R_D+R_S) # in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_DQ is : =%.2f mA ' %I_DQ)\n", - "print('The value of V_DSQ is : =%.2f volts' %V_DSQ)\n", - "V_GS= V_G-I_D*R_S # V\n", - "V_DSsat= V_GS-V_T # in V\n", - "print('The value of V_DS %.2f is greater than the value of ' %V_DSQ)\n", - "print('V_DSsat %.2f So the MOSFET is in saturation region ' %V_DSsat)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is : =-0.00 mA \n", - "The value of V_DSQ is : =12.00 volts\n", - "The value of V_DS 12.00 is greater than the value of \n", - "V_DSsat 3.40 So the MOSFET is in saturation region \n" - ] - } - ], - "prompt_number": 108 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.24 Page No 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "kn= 0.5 # in mA/V^2\n", - "V_T= 1 # in V\n", - "R2 = 40 # in k ohm\n", - "R1 = 60 # in k ohm\n", - "R_S= 1 # in k ohm\n", - "R_D= 2 # in k ohm\n", - "V_DD = 5 # in V\n", - "V_SS = -5 # in V\n", - "\n", - "#CALCULATIONS\n", - "V_R2 = (R2/(R2+R1))*(V_DD-V_SS) # in V\n", - "V_G = V_R2 - V_DD # in V\n", - "V_S= I_D*R_S+V_SS # in V\n", - "V_GS= V_G-V_S # in V\n", - "I_D= 1.3542487 # in mA\n", - "I_DQ= I_D #in mA\n", - "V_S= I_D*R_S+V_SS # in V\n", - "V_GS= V_G-V_S # in V\n", - "V_DSQ= V_DD-V_SS-I_D*(R_D+R_S) # in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_DQ is :=%.2f mA ' %I_DQ)\n", - "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", - "print('The value of V_DSQ is : =%.2f volts' %V_DSQ)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_DQ is :=1.35 mA \n", - "The value of V_GS is : =-1.35 volts \n", - "The value of V_DSQ is : =5.94 volts\n" - ] - } - ], - "prompt_number": 109 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.25 Page No 398" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "R_S1 = 100*10**-3 # in k ohm\n", - "R_S2 = 100*10**-3 # k ohm\n", - "R_S = R_S1+R_S2 #in k ohm\n", - "R_D= 1.8 # in k ohm\n", - "I_DSS= 12 # in mA\n", - "Vp= -3.5 # in V\n", - "V_DD= 22 # in V\n", - "rd= 25 # in k ohm\n", - "R_L= 47 # in k ohm\n", - "I_D= 5.573521 # in mA\n", - "\n", - "#CALCULATIONS\n", - "V_GS= -I_D*R_S # in V\n", - "I_D= I_D-I_DSS*(1-V_GS/Vp)**2 # in mA\n", - "print('The value of I_D is : =%.2f mA' %I_D)\n", - "V_GS= -I_D*R_S # in V\n", - "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", - "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", - "print('The value of V_DS is : =%.2f volts ' %V_DS)\n", - "gmo= -2*I_DSS/Vp # in mS\n", - "gm= gmo*(1-V_GS/Vp) # in mS\n", - "miu= gm*rd\n", - "Av= -miu*R_D*R_L/(R_D+R_L)/(rd+R_D*R_L/(R_D+R_L)+(1+miu)*R_S1)\n", - "print('The value of Av is : =%.2f ' %Av)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is : =-0.000000 mA\n", - "The value of V_GS is : =0.00 volts \n", - "The value of V_DS is : =22.00 volts \n", - "The value of Av is : =-6.76 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.26 Page No 399" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_T = 1 # in V\n", - "k = 0.5 # in mA/V^2\n", - "R2 = 40 # in k ohm\n", - "R1 = 60 # in k ohm\n", - "R_S= 1 # in k ohm\n", - "R_D= 2 # in k ohm\n", - "V_DD = 5 # in V\n", - "V_G = (R2/(R2+R1))*V_DD # in V\n", - "V_GS= V_G-I_D*R_S # in V\n", - "I_D= 0.2679492 # in mA\n", - "V_GS= V_G-I_D*R_S # in V\n", - "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", - "\n", - "#RESULTS\n", - "print('The value of I_D in mA is : =%.2f ' %I_D)\n", - "print('The value of V_GS in volts is :=%.2f ' %V_GS)\n", - "print('The value of V_DS in volts is : =%.2f ' %V_DS)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D in mA is : =0.27 \n", - "The value of V_GS in volts is :=-0.27 \n", - "The value of V_DS in volts is : =4.20 \n" - ] - } - ], - "prompt_number": 111 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.27 Page No 400" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "R_D = 7.5 # in k ohm\n", - "V_T = -0.8 # in V\n", - "k = 0.2 # in mA/V^2\n", - "R2 = 50 # in ohm\n", - "R1 = 50 # in ohm\n", - "V_DD = 5 # in V\n", - "V_S = 5 # in V\n", - "\n", - "#CALCULATIONS\n", - "V_G = (R2/(R2+R1))*V_DD # in V\n", - "V_GS = V_G - V_S # in V\n", - "I_D = k*((V_GS-V_T)**2) # in mA\n", - "\n", - "#RESULTS\n", - "print('Drain current in is =%.2f mA' %I_D)\n", - "V_SD = V_DD - (I_D*R_D) # in V\n", - "print('Source to drain voltage is =%.2f V' %V_SD)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Drain current in is =3.53 mA\n", - "Source to drain voltage is =-21.46 V\n" - ] - } - ], - "prompt_number": 112 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.28 Page No 400" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "I_Don = 5*10**-3 # in A\n", - "V_GSon = 6 # in V\n", - "V_GSth = 3 # in V\n", - "k = I_Don/(V_GSon-V_GSth)**2 # in A/V^2 \n", - "R2 = 6.8 #in M ohm\n", - "R1 = 10 #in M ohm\n", - "R_S= 750 # in ohm\n", - "R_D= 2.2*10**3 # in ohm\n", - "V_DD = 24 # in V\n", - "R_S = 750 # in ohm\n", - "V_G= R2*V_DD/(R1+R2) # in V\n", - "V_GS= V_G-I_D*R_S # in V\n", - "I_D= I_D-k*(V_GS-V_GSth)**2\n", - "I_D= 0.0049660 # in A\n", - "I_DQ= I_D # in A\n", - "V_GS= V_G-I_D*R_S # in V\n", - "V_GSQ= V_GS # in V\n", - "V_DSQ= V_DD-I_DQ*(R_D+R_S) # in V\n", - "I_D=I_D*10**3\n", - "\n", - "#RESULTS\n", - "print('The value of I_D is : =%.2f mA ' %I_D)\n", - "print('The value of V_GSQ is : =%.2f volts ' %V_GSQ)\n", - "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I_D is : =4.97 mA \n", - "The value of V_GSQ is : =5.99 volts \n", - "The value of V_DSQ is : =9.35 volts \n" - ] - } - ], - "prompt_number": 113 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.29 Page No 401" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "I_Don = 4*10**-3 # in A\n", - "V_GSon = 6 # in V\n", - "V_GSth = 3 # in V\n", - "V_DS= 6 # in V\n", - "I_D= I_Don # in A\n", - "k = I_Don/((V_GSon-V_GSth)**2) # in A/V^2\n", - "V_GS= I_D-k*(V_GS-V_GSth)**2\n", - "V_GS= 6 # in V\n", - "V_DD= 2*V_DS # in V\n", - "R_D= (V_DD-V_GS)/I_D # in ohm\n", - "\n", - "\n", - "#RESULTS\n", - "print('The value of V_GS is : =%.f volts ' %V_GS)\n", - "print('The value of V_DD is : =%.f volts ' %V_DD)\n", - "print('The value of R_D is : =%.f k\u03a9' %R_D)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_GS is : =6 volts \n", - "The value of V_DD is : =12 volts \n", - "The value of R_D is : =1500 k\u03a9\n" - ] - } - ], - "prompt_number": 114 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.31 Page No 402" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_DD = 5 # in V\n", - "V_T= 1 # in V\n", - "k= 1 # in mA/V^2\n", - "R1 = 1 # in M ohm\n", - "R2 = 1 # in M ohm\n", - "R_S= 2 # in k ohm\n", - "R_D= 2 # in k ohm\n", - "I1 = V_DD/(R1+R2) # in A\n", - "print('The value of I1 is : =%.2f \u00b5A' %I1)\n", - "V_A = (R2/(R2+R1))*V_DD # in V\n", - "print('The value of V_A and V_G is : =%.2f volts ' %V_A)\n", - "I_D= 0.4243061\n", - "V_C= I_D*R_S # in V\n", - "V_GS= V_A-V_C # in V\n", - "print('The value of I_D is : =%.2f mA' %I_D)\n", - "V_B= V_DD-I_D*R_D # in V\n", - "V_C= I_D*R_S # in V\n", - "V_DS= V_B-V_C # in V\n", - "\n", - "#RESULTS\n", - "print('The value of V_B is : =%.2f volts ' %V_B)\n", - "print('The value of V_C is : =%.2f volts ' %V_C)\n", - "print('The value of V_DS is : =%.2f volts' %V_DS)\n", - "# Note: In the book, the calculated values are wrong, this is why the answer in the book is wrong.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of I1 is : =2.00 \u00b5A\n", - "The value of V_A and V_G is : =0.00 volts \n", - "The value of I_D is : =0.42 mA\n", - "The value of V_B is : =4.15 volts \n", - "The value of V_C is : =0.85 volts \n", - "The value of V_DS is : =3.30 volts\n" - ] - } - ], - "prompt_number": 115 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.32 Page No 403" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_DSS = 12 # in mA\n", - "I_DSS= I_DSS*10**-3 # in A\n", - "V_P = -3 # in V\n", - "r_d = 45 # in k ohm\n", - "\n", - "#CALCULATIONS\n", - "r_d= r_d*10**3 # in ohm\n", - "g_m = I_DSS/abs(V_P) # in S\n", - "#Part (i)\n", - "R1 = 91 # in M ohm\n", - "R1=R1*10**6 #in ohm\n", - "R2 = 10 # in M ohm\n", - "R2= R2*10**6 # in ohm\n", - "Ri= R1*R2/(R1+R2) # in ohm\n", - "Ri=Ri*10**6\n", - "\n", - "#RESULTS\n", - "print('The value of Ri is : =%.f Mohm' %(Ri/(10**12)))\n", - "#Part (ii)\n", - "R_S = 1.1 #in k ohm\n", - "R_S = R_S * 10**3 # in ohm\n", - "R_o= (R_S*1/g_m)/(R_S+1/g_m) # in ohm\n", - "print('The value of R_C is : =%.2f ohm' %R_o)\n", - "\n", - "# Part (iii)\n", - "R_desh_o= R_o*r_d/(R_o+r_d) # in ohm\n", - "print('The value of R_desh_o is : =%.2f ohm ' %R_desh_o)\n", - "# Part (iv)\n", - "Av= g_m*(R_S*r_d/(R_S+r_d))/(1+g_m*(R_S*r_d/(R_S+r_d)))\n", - "print('The value of Av is : =%.2f ' %Av)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of Ri is : =9 Mohm\n", - "The value of R_C is : =203.70 ohm\n", - "The value of R_desh_o is : =202.79 ohm \n", - "The value of Av is : =0.81 \n" - ] - } - ], - "prompt_number": 116 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.34 Page No 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_S2 = -2 # in V\n", - "V_GS2 = -V_S2 # in V\n", - "\n", - "#CALCULATIONS\n", - "I_DS2 = (V_GS2-1)**2 # in mA\n", - "I = 2 # in mA\n", - "I_DS1 = I-I_DS2 # in mA\n", - "\n", - "#RESULTS\n", - "print('The current flow through M1 MOSFET is =%.f mA' %I_DS1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current flow through M1 MOSFET is =1 mA\n" - ] - } - ], - "prompt_number": 117 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.35 Page No 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_DD= 10 # in V\n", - "I_D= 0.4*10**3 # in A\n", - "W= 100 # in \u00b5m\n", - "L= 10 # in \u00b5m\n", - "uACox= 20 # in A/V**2\n", - "Vt= 2 # in V\n", - "R= 0.015\n", - "V_GS= V_DD-I_D*R # in V\n", - "\n", - "#RESULTS\n", - "print('The value of R is : =%.f k\u03a9 ' %(R*10**3))\n", - "V_D= V_DD-I_D*R # in V\n", - "print('The value of V_D is : =%.f volts ' %V_D)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of R is : =15 k\u03a9 \n", - "The value of V_D is : =4 volts \n" - ] - } - ], - "prompt_number": 118 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example No 9.36 Page No 405" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variables\n", - "V_GSth= 2 # in V\n", - "k= 2*10**-4 # in A/V^2\n", - "V_DD= 12 # in V\n", - "R_D= 5*10**3 # in ohm\n", - "I_D= 0.0014597\n", - "\n", - "#CALCULATIONS\n", - "V_DS= V_DD-I_D*R_D # in V\n", - "\n", - "#RESULTS\n", - "print('The value of V_DS is : =%.1f volts ' %V_DS)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of V_DS is : =4.7 volts \n" - ] - } - ], - "prompt_number": 119 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/README.txt b/Advance_Semiconductor_Devices/README.txt deleted file mode 100755 index eec99ae9..00000000 --- a/Advance_Semiconductor_Devices/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Santosh Pawar -Course: mca -College/Institute/Organization: ASM institute of computer studies -Department/Designation: MCA -Book Title: Advance Semiconductor Devices -Author: S. Sharma -Publisher: S. K. Kataria & Sons, New Delhi -Year of publication: 2012 -Isbn: 9789350142158 -Edition: 1 \ No newline at end of file diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter1.png b/Advance_Semiconductor_Devices/screenshots/Chapter1.png deleted file mode 100755 index 510483a4..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter1.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter3.png b/Advance_Semiconductor_Devices/screenshots/Chapter3.png deleted file mode 100755 index 2409666c..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter3.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter7.png b/Advance_Semiconductor_Devices/screenshots/Chapter7.png deleted file mode 100755 index 1f5c8c08..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter7.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_1.png b/Advance_Semiconductor_Devices/screenshots/Chapter_1.png deleted file mode 100755 index 63da4ae4..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_1.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_1_1.png b/Advance_Semiconductor_Devices/screenshots/Chapter_1_1.png deleted file mode 100755 index 61672f6e..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_1_1.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_1_2.png b/Advance_Semiconductor_Devices/screenshots/Chapter_1_2.png deleted file mode 100755 index 61672f6e..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_1_2.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_2.png b/Advance_Semiconductor_Devices/screenshots/Chapter_2.png deleted file mode 100755 index 882e620f..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_2.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_2_1.png b/Advance_Semiconductor_Devices/screenshots/Chapter_2_1.png deleted file mode 100755 index 61ce28c6..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_2_1.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_2_2.png b/Advance_Semiconductor_Devices/screenshots/Chapter_2_2.png deleted file mode 100755 index 61ce28c6..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_2_2.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_3.png b/Advance_Semiconductor_Devices/screenshots/Chapter_3.png deleted file mode 100755 index c132e867..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_3.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_3_1.png b/Advance_Semiconductor_Devices/screenshots/Chapter_3_1.png deleted file mode 100755 index 93ff3b44..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_3_1.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_3_2.png b/Advance_Semiconductor_Devices/screenshots/Chapter_3_2.png deleted file mode 100755 index 93ff3b44..00000000 Binary files a/Advance_Semiconductor_Devices/screenshots/Chapter_3_2.png and /dev/null differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb new file mode 100755 index 00000000..4d1dc38d --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb @@ -0,0 +1,800 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter No 1 : Semiconductor Materials and\n", + "Their Properties

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3, Page No 37 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Finding Density of silicon crystal\n", + "\n", + "#initialisation of variables\n", + "a=5.3 #in \u00c5\n", + "a=a*10**-10 #in m\n", + "N_A=6.023*10**23 \n", + "At_Si=28 #atomic weight of Si\n", + "n = 4\n", + "m=At_Si/N_A #in gm\n", + "m= m*10**-3 #in kg\n", + "V=a**3 #in m^3\n", + "\n", + "#CALCULATIONS\n", + "Rho=((m*n)/V)/1000 #in kg/m^3\n", + "\n", + "# Note: There is calculation error to find the value of density. So the answer in the book is wrong.#RESULTS\n", + "#RESULTS\n", + "print('Density of silicon crystal in kg/m^3 is = %.2f kg/m^3' %Rho)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of silicon crystal in kg/m^3 is = 1.25 kg/m^3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Page No 37 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Finding Density of the crystal \n", + "\n", + "#initialisation of variables\n", + "n = 4\n", + "r = 1.278 #in \u00c5\n", + "\n", + "#CALCULATIONS\n", + "a = (4*r)/(math.sqrt(2)) #in\u00c5\n", + "a = a * 10**-10 #in m\n", + "V = (a)**3 #in m^3\n", + "At_W = 63.5 #atomic weight\n", + "N_A = 6.023*10**23\n", + "m = At_W /N_A #in gm\n", + "m = m*10**-3 #in kg\n", + "Rho = ((m*n)/V)/1000 #in kg/m^3\n", + "\n", + "#RESULTS\n", + "print('Density of the crystal in kg/m^3 is =%.2f kg/m^3' %Rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of the crystal in kg/m^3 is =8.93 kg/m^3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No 43 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Finding Wavaelength of X ray\n", + "\n", + "import math\n", + "from numpy import *\n", + "#initialisation of variables\n", + "d=2.82 #in \u00c5\n", + "d=d*10**-10 #in m\n", + "n=1\n", + "theta1=10 #n degree\n", + "\n", + "#CALCULATIONS\n", + "lembda=2*d*math.sin(math.radians(theta1)) #in m\n", + "lembda=lembda*10**10 #in \u00c5\n", + "\n", + "#RESULTS\n", + "print('Wavaelength of X ray is =%.2f \u00c5 degrees' %lembda)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavaelength of X ray is =0.98 \u00c5 degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6, Page No 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Finding The spacing of atomic layer\n", + "\n", + "import math\n", + "#initialisation of variables\n", + "lembda = 1.6 #in \u00c5\n", + "theta = 14.2 #in degree\n", + "n = 1\n", + "\n", + "#CALCULATIONS\n", + "d = (n*lembda)/(2*math.sin(math.radians(theta))) #in \u00c5\n", + "\n", + "#RESULTS\n", + "print('The spacing of atomic layer in crystal is =%.2f in \u00c5 degrees' %d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spacing of atomic layer in crystal is =3.26 in \u00c5 degrees\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding The interplanner spacing\n", + "\n", + "import math\n", + "#initialisation of variables\n", + "n = 1\n", + "theta1 = 30 #in degree\n", + "lembda = 1.78 #in \u00c5\n", + "\n", + "#CALCULATIONS\n", + "d = (n*lembda)/(2*math.sin(math.radians(theta1))) #in \u00c5\n", + "\n", + "#RESULTS\n", + "print('The interplanner spacing is =%.2f in \u00c5 degrees' %d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The interplanner spacing is =1.78 in \u00c5 degrees\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding Interplaner spacing of the crystal\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "lembda = 0.58 #in \u00c5\n", + "n = 1;\n", + "theta1 = 6.45 # in degree\n", + "\n", + "#CALCULATIONS\n", + "d = (n*lembda)/(2*math.sin(math.radians(theta1))) #in \u00c5 \n", + "print('Part (i) : At angle of 6.45\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d)\n", + "theta2 = 9.15 #in degree\n", + "d1 = (n*lembda)/(2*math.sin(math.radians(theta2))) #in \u00c5 \n", + "print('Part (ii) : At angle of 9.15\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d1)\n", + "theta3 = 13 #in degree\n", + "n2 = 1\n", + "d2 = (n2*lembda)/(2*math.sin(math.radians(theta3))) #in \u00c5\n", + "print('Part (iii) : At angle of 13\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d2)\n", + "n=2\n", + "d2 = (n*lembda)/(2*math.sin(math.radians(theta3))) #in \u00c5 \n", + "\n", + "#RESULTS\n", + "print('Part (iv) : : The interplaner spacing is : =%.4f \u00c5' %d2)\n", + "print('The interplaner spacing for some other set of reflecting is : =%.2f \u00c5' %d1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : At angle of 6.45\u00b0, Interplaner spacing of the crystal is =2.58 \u00c5\n", + "Part (ii) : At angle of 9.15\u00b0, Interplaner spacing of the crystal is =1.82 \u00c5\n", + "Part (iii) : At angle of 13\u00b0, Interplaner spacing of the crystal is =1.29 \u00c5\n", + "Part (iv) : : The interplaner spacing is : =2.5783 \u00c5\n", + "The interplaner spacing for some other set of reflecting is : =1.82 \u00c5\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9, Page No 44 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding The glancing angle for a cubic in degree\n", + "\n", + "import math\n", + "from sympy.mpmath import *\n", + "import cmath\n", + "\n", + "#initialisation of variables\n", + "a = 2.814 #in \u00c5\n", + "l = 0\n", + "h = l\n", + "k = 0\n", + "d=a #in \u00c5\n", + "n = 2\n", + "\n", + "#CALCULATIONS\n", + "lembda=0.710 #in \u00c5\n", + "theta = math.degrees(math.asin(n*lembda/(2*d)))\n", + "\n", + "#RESULTS\n", + "print('The glancing angle for a cubic in degree is : =%.2f \u00c5 degrees' %theta)\n", + "print('Anwser is in points i.e = 14 36\"40\"..')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The glancing angle for a cubic in degree is : =14.61 \u00c5 degrees\n", + "Anwser is in points i.e = 14 36\"40\"..\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding Wavelength of X ray\n", + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "a = 3.65 #in \u00c5\n", + "a = 3.65*10**-10 #in m\n", + "h = 1\n", + "k = 0\n", + "l = 0\n", + "\n", + "#CALCULATIONS\n", + "d= a/(math.sqrt(h**2+k**2+l**2)) #in m\n", + "n = 1\n", + "theta=60 #in degree\n", + "lembda = 2*d*math.sin(math.radians(theta)) #in m\n", + "lembda = lembda * 10**10 #in \u00c5\n", + "\n", + "#RESULTS\n", + "print('Wavelength of X ray is : =%.2f \u00c5' %lembda)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of X ray is : =6.32 \u00c5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding The glancing angle in degree\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "lembda = 1.54 #in \u00c5\n", + "density = 9.024 #in gm/cc\n", + "n = 1\n", + "MI = 100\n", + "At_W = 63.54 #atomic weight\n", + "N_A = 6.023*10**23 \n", + "m = At_W/N_A #in gm\n", + "a =(density*m)**(1.0/3) #in cm\n", + "h = 1\n", + "k = 0\n", + "l = 0\n", + "\n", + "#CALCULATIONS\n", + "d= a/(math.sqrt(h**2+k**2+l**2))\n", + "theta =math.degrees((lembda*10**-8)/(2*d)) #in degree\n", + "\n", + "\n", + "#RESULTS\n", + "print('The glancing angle is = %.2f degrees' %theta)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The glancing angle is = 4.48 degrees\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No 45 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding To get the 2nd order spectrum the position of the detector in degree\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "a = 3.615 #in \u00c5\n", + "theta=22 #in degree\n", + "n=1\n", + "h=1\n", + "k=h\n", + "l=k\n", + "\n", + "#CALCULATIONS\n", + "d = a/(math.sqrt( ((h)**2) + ((k)**2) + ((l)**2) )) #in \u00c5\n", + "lembda = 2*d*math.sin(math.radians(theta)) #in \u00c5\n", + "print('The wavelength of X ray is = %.2f \u00c5 ' %lembda)\n", + "theta2 =math.degrees(math.asin(lembda/d)) #in degree\n", + " #in degree\n", + "\n", + "#RESULTS\n", + "print('To get the 2nd order spectrum the position of the detector is = %.2f degrees ' %theta2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of X ray is = 1.56 \u00c5 \n", + "To get the 2nd order spectrum the position of the detector is = 48.52 degrees \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13, Page No 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "n = 1\n", + "lembda = 1.54 # in \u00c5\n", + "theta = 21.7 # in degree\n", + "\n", + "#CALCULATIONS\n", + "d = lembda/(2*math.sin(math.radians(theta))) # in \u00c5\n", + "h = 1\n", + "k = h\n", + "l = k\n", + "a = d*math.sqrt(h**2+k**2+l**2) # in \u00c5\n", + "\n", + "#RESULTS\n", + "print('Lattice constant is = %.2f in \u00c5 ' %a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant is = 3.61 in \u00c5 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14, Page No 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "h = 2\n", + "k = 1\n", + "l = 1\n", + "a = 4.8 # in \u00c5\n", + "\n", + "#CALCULATIONS\n", + "d_211 = a/(math.sqrt(h**2+k**2+l**2)) #in \u00c5\n", + "\n", + "#RESULTS\n", + "print('The distance between planes is =%.2f \u00c5 ' %d_211)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between planes is =1.96 \u00c5 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15, Page No 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "r = 1.28 # in \u00c5\n", + "n = 4\n", + "M = 63.5\n", + "\n", + "#CALCULATIONS\n", + "a = (4*r)/(math.sqrt(2)) #in \u00c5\n", + "a = a * 10**-8 # in cm\n", + "N_A = 6.023*10**23 \n", + "Rho = (n*M)/( N_A*((a)**3) ) # in gm/cc\n", + "\n", + "#RESULTS\n", + "print('Density is =%.2f gm/cc ' %Rho)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density is =8.89 gm/cc \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16, Page No 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "M = 55.85\n", + "a = 2.9 # in \u00c5\n", + "Rho = 7.87 #in gm/cc\n", + "\n", + "#CALCULATIONS\n", + "a = a * 10**-8 # in cm\n", + "N_A = 6.023*10**23\n", + "n = (Rho*N_A*((a)**3))/M # atom per unit\n", + "\n", + "#RESULTS\n", + "print('A lattice having =%.2f atom per unit cell is a BCC structure ' %n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A lattice having =2.07 atom per unit cell is a BCC structure \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17, Page No 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "M = 60.0 # in gm/mole\n", + "Rho = 6.23 # in gm/cc\n", + "n = 4\n", + "N_A = 6.023*10**23 \n", + "\n", + "#CALCULATIONS\n", + "a = ((n*M)/(N_A * Rho))**(1.0/3) # in cm\n", + "r = (a*math.sqrt(2))/n #radius of atom in cm\n", + "r = r * 10**8 # in \u00c5\n", + "\n", + "#RESULTS\n", + "print('Radius of atom is =%.2f \u00c5 ' %r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of atom is =1.41 \u00c5 \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18, Page No 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Rho = 5.96 # in gm/cc\n", + "M = 50.0\n", + "n = 2\n", + "N_A = 6.023*10**23 \n", + "\n", + "#CALCULATIONS\n", + "a =((n*M)/(Rho*N_A))**(1.0/3) # in cm\n", + "r = (a*math.sqrt(3))/4 # in cm\n", + "P_f = (2*(4.0/3)*math.pi*((r)**3))/((a)**3) # packing factor\n", + "\n", + "\n", + "#RESULTS\n", + "print('Packing factor is =%.2f ' %P_f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Packing factor is =0.68 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19, Page No 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "M = 120.0\n", + "n = 2.0\n", + "N_A = 6.023*10**23\n", + "\n", + "#CALCULATIONS\n", + "m1 = M/N_A #mass of 1 atom in gm\n", + "m2 = n*m1 #mass of unit cell in gm\n", + "\n", + "#RESULTS\n", + "print('Number of unit cell in 20 gms of element is : =%.2f X 10^22 unit cells ' %((20/m2)/(10**22)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of unit cell in 20 gms of element is : =5.02 X 10^22 unit cells \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20, Page No 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Rho = 2.48 # in gm/c.c\n", + "n = 4.0 \n", + "M = 58\n", + "N_A = 6.023*10**23\n", + "\n", + "#CALCULATIONS\n", + "a = ( (n*M)/(Rho*N_A) )**(1.0/3) # in cm\n", + "a = a * 10**8 # in \u00c5\n", + "r = (a*math.sqrt(2))/n # in \u00c5\n", + "r = 2*r # in \u00c5\n", + "\n", + "#RESULTS\n", + "print('The center to center distance between ions is =%.2f \u00c5' %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The center to center distance between ions is =3.80 \u00c5\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo2.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo2.ipynb new file mode 100755 index 00000000..9bc8cffb --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo2.ipynb @@ -0,0 +1,1248 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter No 2 : Semiconductor Materials and\n", + "Their Properties

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page No 65 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "lambda1 = 11000.0 #in \u00c5\n", + "lambda1 = lambda1 * 10**-10 \n", + "h = 6.625*10**-34 \n", + "c = 3*10**8\n", + "q = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "E_g = h*c/lambda1 #in J\n", + "E_g= E_g/q #in eV\n", + "\n", + "#RESULTS\n", + "print('The energy gap in Si is = %.2f eV' %E_g)\n", + "\n", + "#Note: The answer in the book is not correct \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy gap in Si is = 1.13 eV\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page No 65 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "E_g = 0.75 #in eV\n", + "q=1.6*10**-19 #in C\n", + "E_g = E_g*q #in J\n", + "h = 6.63*10**-34 #in J\n", + "c = 3*10**8 #in m/s\n", + "\n", + "#CALCULATIONS\n", + "lembda = (h*c)/E_g #in m\n", + "lembda = lembda * 10**10 #in \u00c5\n", + "\n", + "#RESULTS\n", + "print('The wavelength is =%.f \u00c5 ' %lembda)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is =16575 \u00c5 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No 81 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import *\n", + "\n", + "#initialisation of variables\n", + "del_E = 0.3 #value of E_C-E_F in eV\n", + "T1 = 330.0 #in K\n", + "T = 300 #in K\n", + "\n", + "#CALCULATIONS\n", + "del_E1 = del_E*(T1/T) #value of E_C-E_F in eV\n", + "\n", + "#RESULTS\n", + "print('The position of fermi level is =%.2f eV' %del_E1)\n", + "print('Hence the Fermi level will be %.2f eV below the conduction band' %del_E1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The position of fermi level is =0.33 eV\n", + "Hence the Fermi level will be 0.33 eV below the conduction band\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, Page No 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "K = 8.63*10**-5\n", + "T = 300.0 #in K\n", + "N_C = 2.8*10**19 #in cm^-3\n", + "del_E = 0.25\n", + "\n", + "#CALCULATIONS\n", + "f_F = math.exp( (-del_E)/(K*T) )\n", + "n_o = N_C*math.exp( (-del_E)/(K*T) ) #in cm^-3\n", + "\n", + "#RESULTS\n", + "print('The probability is =%.6f ' %f_F)\n", + "print('The thermal equillibrium electron concentration is =%.2f X 10^15 cm^-3' %(n_o/(10**15)))\n", + "print('Approximation error ')\n", + "# The answer is same as in book only thy have rounded off to 1.8 * 10^15 which is same as above" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability is =0.000064 \n", + "The thermal equillibrium electron concentration is =1.79 X 10^15 cm^-3\n", + "Approximation error \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "N_V = 1.04*10**19 #in cm^-3\n", + "T1 = 400.0 #in K\n", + "T2 = 300.0 #in K\n", + "del_E = 0.27 #value of E_F-E_V in eV\n", + "K = 0.0259\n", + "\n", + "#CALCULATIONS\n", + "N_V= N_V*(T1/T2)**(3/2) #in cm^-3\n", + "KT = K*(T1/T2) #in eV\n", + "p_o = N_V*math.exp( (-del_E)/(KT) ) #in /cm^3\n", + "\n", + "#RESULTS\n", + "print('The hole concentration is =%.2f x 10^15 per cm^3' %(p_o/(10**15)))\n", + "print('Approximationa error ')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hole concentration is =5.58 x 10^15 per cm^3\n", + "Approximationa error \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "N = 6.02*10**23\n", + "A = 63.5 #atomic weight\n", + "Rho = 1.7*10**-6 #in ohm cm\n", + "d = 8.96 # in gm/cc\n", + "\n", + "#CALCULATIONS\n", + "n = (N/A)*d #in /cc\n", + "e = 1.6*10**-19 #in C\n", + "Miu_e = 1/(Rho*n*e) #in cm^2/volt-sec\n", + "\n", + "#RESULTS\n", + "print('The mobility of electron is =%.2f cm^2/volt.sec' %Miu_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility of electron is =43.28 cm^2/volt.sec\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7, Page No 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from sympy.mpmath import *\n", + "import cmath\n", + "\n", + "\n", + "#initialisation of variables\n", + "d = 8.96 #in gm/cc\n", + "At = 63.5 #atomic weight\n", + "N_A = 6.02*10**23 #in /gm mole\n", + "l = 0.1 #in m\n", + "e = 1.6*10**-19 #in C\n", + "A = 1.7*10**-6 #in m^2\n", + "R = 0.1 #in ohm\n", + "\n", + "#CALCULATIONS\n", + "n = (N_A/At)*d #in /cc\n", + "n = n * 10**6 #in /m^3\n", + "Rho = (R*A)/l #in ohm.m\n", + "Sigma = 1/Rho #in mho/m\n", + "Miu_e = Sigma/(n*e) #in m^2/V-sec\n", + "\n", + "#RESULTS\n", + "print('The electron mobility is =%.3f X 10^-3 m^2/V-sec ' %(Miu_e*(10**3)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron mobility is =0.043 X 10^-3 m^2/V-sec \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "N_A = 6.025*10**23 #in /gm mole\n", + "d = 10.5 #in gm/cc\n", + "At = 108.0 #atomic weight of \n", + "\n", + "#CALCULATIONS\n", + "n = (N_A/At)*d #in /cm^3\n", + "n = n * 10**6 #in /m^3\n", + "r = 10**-3 #in m\n", + "A = math.pi * ((r)**2) #in m^2\n", + "q = 1.6*10**-19 \n", + "I = 2 #in A\n", + "V = I/(n*q*A) #in m/s\n", + "\n", + "#RESULTS\n", + "print('The drift velocity of an electron is =%.f X 10^-4 m/s' %(V*(10**5)))\n", + "print('Approximationa error ')\n", + "# answer is same as in book only they have rounded of 0.000068 to 7 * 10^-4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The drift velocity of an electron is =7 X 10^-4 m/s\n", + "Approximationa error \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "e= 1.6*10**-19 #in C\n", + "d= 1.03 #in mm\n", + "d= d*10**-3 #in m\n", + "R= 6.51 #in ohm\n", + "l= 300.0 #in m\n", + "n= 8.4*10**28 #per m^3\n", + "\n", + "#CALCULATIONS\n", + "r= d/2 #in m (radius)\n", + "A= math.pi*r**2 #in m^2\n", + "rho= R*A/l #in ohm meter\n", + "sigma= 1/rho #in mho/m\n", + "miu_e= sigma/(n*e) #m^2/V-sec\n", + "\n", + "#RESULTS\n", + "print('The coductivity of copper is =%.2f mho/m' %sigma)\n", + "print('The mobility of charge carriers is : =%.6f m^2/V-sec' %miu_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coductivity of copper is =55306469.41 mho/m\n", + "The mobility of charge carriers is : =0.004115 m^2/V-sec\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9.ii Page No 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Miu_e = 1500.0 #in cm^2/volt.sec\n", + "Miu_h = 500.0 #in cm^2/volt.sec\n", + "n_i = 1.6*10**10 #in /cm^3\n", + "e = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "Sigma_i = n_i*(Miu_e+Miu_h)*e #in mho/cm\n", + "Sigma = Sigma_i #in mho/cm\n", + "\n", + "#RESULTS\n", + "print('The conductivity of pure silicon is =%.7f mho/cm' %Sigma)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of pure silicon is =0.0000051 mho/cm\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 2.10 Page No 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "Miu_e = 1500.0 #in cm^2/volt.sec\n", + "Miu_h = 500.0 #in cm^2/volt.sec\n", + "n_i = 1.6*10**10 #in /cm^3\n", + "e = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "Sigma_i = n_i*(Miu_e+Miu_h)*e #in mho/cm\n", + "Sigma = Sigma_i #in mho/cm\n", + "\n", + "#RESULTS\n", + "print('The conductivity of pure silicon is =%.2f X 10^-6 mho/cm' %(Sigma*(10**6)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of pure silicon is =5.12 X 10^-6 mho/cm\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 2.11 Page No 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "Miu_d = 500.0 #in cm^2/V.S\n", + "Rho = 10 #in ohm cm \n", + "\n", + "#CALCULATIONS\n", + "e = 1.6*10**-19 #in C\n", + "n_d = 1/(Rho*e*Miu_d) #in /cm^3... correction\n", + "\n", + "#RESULTS\n", + "print('The number of donor is =%.2f X 10^15 atom per cm^3' %(n_d/(10**15)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of donor is =1.25 X 10^15 atom per cm^3\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 2.12 Page No 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "d = 5.32 #in gm/cc\n", + "N_A = 6.02*10**23 #in atoms/gm.mole\n", + "At = 72.6 #atomic weight\n", + "Miu = 3800 #in cm^2/v.s\n", + "\n", + "#CALCULATIONS\n", + "n_d = (N_A/At) * d #in /cm^3\n", + "n_d = n_d * 10**-8 #in /cc\n", + "e = 1.6*10**-19 #in C\n", + "Sigma = n_d * Miu * e #in mho/cm\n", + "\n", + "#RESULTS\n", + "print('The conductivity of specimen is =%.2f mho/cm' %Sigma)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of specimen is =0.27 mho/cm\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 2.13 Page No 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "Rho = 0.3623*10**-3 #in ohm m\n", + "d = 4.42*10**28 #Ge density in atoms/m^3\n", + "\n", + "#CALCULATIONS\n", + "Sigma = 1/Rho #in mho/m\n", + "n_d = d*10**-6 #in atoms/m^3\n", + "e = 1.6*10**-19 #in C\n", + "Miu = Sigma/(n_d*e) #in m^2/V.sec\n", + "\n", + "#RESULTS\n", + "print('The electron mobility is =%.2f m^2/V-sec' %Miu)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron mobility is =0.39 m^2/V-sec\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 2.14 Page No 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "N_A = 6.025*10**26 #in /kg.Mole\n", + "At = 72.59 #atomic weight\n", + "d = 5.36*10**3 #in kg/m^3\n", + "R = 0.42 #in ohm m\n", + "B_i = 10**-6 #rate of boron impurity in %\n", + "e = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "n = (N_A/At)*d #number of Ge atoms\n", + "h = n/10**8 #holes per unit volume\n", + "Miu_h = 1/(R*h*e) #in m^2/V.sec\n", + "\n", + "#RESULTS\n", + "print('The Mobility of holes is =%.2f m^2/V-sec' %Miu_h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Mobility of holes is =0.03 m^2/V-sec\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.15 Page No 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "n_i = 2*10**19 #in /m^3\n", + "Miu_e = 0.36 #in m^2/v.s\n", + "Miu_h = 0.17 #in m^2/v.s\n", + "\n", + "#CALCULATIONS\n", + "A = 1*10**-4 #in m^2\n", + "V = 2 #in Volts\n", + "l = 0.3 #in mm\n", + "l = l * 10**-3 #in m\n", + "e = 1.6*10**-19 #in C\n", + "Sigma_i = n_i * e * (Miu_e+Miu_h) #in mho/m\n", + "I = (Sigma_i * V*A)/l #in amp \n", + "\n", + "#RESULTS\n", + "print('The current in amp is =%.2f ' %I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current in amp is =1.13 \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.16 Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "d = 4.2*10**28 #in atoms/m^3\n", + "n_d = d/10**6 #in atoms/m^3\n", + "e = 1.6*10**-19 #in C\n", + "Miu_e = 0.36 #in m^2/V-sec\n", + "\n", + "#CALCULATIONS\n", + "Sigma_n = n_d *e *Miu_e #in mho/m\n", + "Rho_n = 1/Sigma_n #ohm m\n", + "\n", + "#RESULTS\n", + "print('The resistivity in \u03a9m is =%.2f X 10^-3' %(Rho_n*(10**3)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistivity in \u03a9m is =0.41 X 10^-3\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.17 Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "n_i = 1*10**19 #in /m^3\n", + "Miu_e = 0.36 #in m^2/volt.sec\n", + "Miu_h = 0.17 #in m^2/volt.sec\n", + "A = 2 #in cm^2\n", + "A = A * 10**-4 #in m^2\n", + "t = 0.1 #in mm\n", + "t = t*10**-3 #in m\n", + "V = 4 #in volts\n", + "e = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "Sigma_i = n_i * e * (Miu_e + Miu_h) #mho/m\n", + "J = Sigma_i * (V/t) #in Amp/m^2\n", + "I = J*A #in Amp\n", + "\n", + "#RESULTS\n", + "print('The current in Amp is =%.2f ' %I)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current in Amp is =6.78 \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 2.18 Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "Miu_h = 500.0 #in cm^2/V.s\n", + "Miu_e = 1500.0 #in cm^2/V.s\n", + "n_i = 1.6*10**10 #in /cm^3\n", + "e = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "Sigma_i = n_i * e * (Miu_e+Miu_h) #in mho/cm\n", + "\n", + "#RESULTS\n", + "print('The conductivity of pure silicon in mho/cm is =%.2f X 10^-6 ' %(Sigma_i*(10**6)))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of pure silicon in mho/cm is =5.12 X 10^-6 \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.19 Page No 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "Si_density = 10.5 #in gm/cc\n", + "N_A = 6.025*10**23 \n", + "At = 108.0 #atomic weight\n", + "B = 0.8 #in Tesla\n", + "w = 0.50 #in cm\n", + "w = w * 10**-2 #in m\n", + "t = 0.10 #in mm\n", + "t = t * 10**-3 #in m\n", + "A = w*t #in m^2\n", + "q = 1.6*10**-19 #in C\n", + "I = 2 #in ampere\n", + "\n", + "#CALCULATIONS\n", + "n = (N_A/At) * Si_density #in /cc\n", + "n = n * 10**6 #in /m^3\n", + "V_H = (B*I*t)/(n*q*A) #in volts\n", + "\n", + "#RESULTS\n", + "print('The hall voltage produced is =%.3f X 10^-7 volts' %(V_H*(10**7)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hall voltage produced is =0.341 X 10^-7 volts\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.20 Page No 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "Sigma = 5.8*10**7 #in mho/m\n", + "l = 1 #in m\n", + "d = 1 #in cm\n", + "d = d * 10**-2 #in m\n", + "W = 1 #in mm \n", + "W = W*10**-3 #in m\n", + "I = 1 #in Amp\n", + "B = 1 #in Tesla\n", + "V_H = 0.074*10**-6 #in Volts\n", + "A = 10**-2 * 10**-3 #in m^2\n", + "\n", + "#CALCULATIONS\n", + "R_H = (V_H*A)/(B*I*d) #in m^3/c\n", + "Miu = Sigma * R_H #in m^2/volt.sec\n", + "\n", + "#RESULTS\n", + "print('Hall coefficient is =%.1f X 10^-11 m^3/c' %(R_H*(10**11)))\n", + "print('The mobility of electron is = %.2f X 10^-3 m^2/volt.sec ' %(Miu*(10**3)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall coefficient is =7.4 X 10^-11 m^3/c\n", + "The mobility of electron is = 4.29 X 10^-3 m^2/volt.sec \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.21 Page No 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "n_i = 1.4*10**18 #in /m^3\n", + "n_D = 1.4*10**24 #in /m^3\n", + "n = n_D #in /m^3\n", + "\n", + "#CALCULATIONS\n", + "p = n_i**2/n #in /m^3\n", + "R_e = n/p #Ratio of electron\n", + "\n", + "#RESULTS\n", + "print('Concentration of is =%.2f X 10^12 holes per m^3 ' %(p/(10**12)))\n", + "print('Ratio of electron to hole concentration is =%.f 10^12 ' %(R_e/(10**12)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Concentration of is =1.40 X 10^12 holes per m^3 \n", + "Ratio of electron to hole concentration is =1 10^12 \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.22 Page No 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "B = 0.48 #in Wb/m^2\n", + "R_H = 3.6 * 10**-4 #in m^3/c\n", + "R = 9*10**-3 #in ohm-m\n", + "\n", + "#CALCULATIONS\n", + "Sigma = 1/R #in (ohm-m)^-1\n", + "Rho = 1/R_H #in coulomb/m^3\n", + "e = 1.6*10**-19 #in C\n", + "n = Rho/e #in /m^3\n", + "Miu = Sigma * R_H #in m^2/volt-s\n", + "\n", + "#RESULTS\n", + "print('The mobility of electron is =%.2f m^2/volt-s' %Miu)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility of electron is =0.04 m^2/volt-s\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.23 Page No 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "e = 1.6*10**-19 #in C\n", + "R_H = 0.0145 #in m^3/coulomb\n", + "Miu_e = 0.36 #m^2/v-s\n", + "E = 100 #V/m\n", + "\n", + "#CALCULATIONS\n", + "n = 1/(e*R_H) #in /m^3\n", + "J= n*e*Miu_e*E #in A/m^2\n", + "\n", + "#RESULTS\n", + "print('The current density is =%.2f A/m^2 ' %J)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current density is =2482.76 A/m^2 \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.24 Page No 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "e = 1.6*10**-19 #in C\n", + "Miu_e = 7.04*10**-3 #in m^2/volt-sec\n", + "n = 5.8*10**28 #number of electron/m^3\n", + "m = 9.1*10**-31\n", + "E_F = 5.5 # in eV\n", + "\n", + "#CALCULATIONS\n", + "Torque = (Miu_e/e)*m # in sec \n", + "Rho = 1/(n*e*Miu_e) #in ohm cm\n", + "V_F = math.sqrt( (2*E_F*e)/m ) #in m/s\n", + "\n", + "#RESULTS\n", + "print('Relaxtion time is =%.2f X 10^-15 sec ' %(Torque*(10**15)))\n", + "print('Resistivity of conductor is =%.2f X 10^-18 in \u03a9m' %(Rho*(10**8)))\n", + "print('Velocity of electron with the fermi energy is =%.2f X 10^-6 in m/s' %(V_F/(10**6)))\n", + "\n", + "# Note: The calculation of Part (ii) is wrong also the unit of resistivity of conductor is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxtion time is =40.04 X 10^-15 sec \n", + "Resistivity of conductor is =1.53 X 10^-18 in \u03a9m\n", + "Velocity of electron with the fermi energy is =1.39 X 10^-6 in m/s\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.25 Page No 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "E= 5.95 #in eV\n", + "EF= 6.25 #in eV\n", + "delE= 0.01\n", + "\n", + "#CALCULATIONS\n", + " #delE= 1-1/(1+exp((E-EF)/KT))\n", + "K=1.38*10**-23 #Boltzman Constant in J/K\n", + "T = ((E-EF)/math.log(1/(1-delE) -1)*1.6*10**-19)/K #in K\n", + "\n", + "#RESULTS\n", + "print('The temperature is =%.2f K' %T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature is =756.95 K\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.26 Page No 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "T1 = 400.0 #in K\n", + "T2 = 300.0 #in K\n", + "N_V = 1.04*10**19 #in cm^-3\n", + "\n", + "#CALCULATIONS\n", + "N1 = N_V*((T1/T2)**(3/2)) #in cm^-3\n", + "KT = 0.0259*(T1/T2) #in eV\n", + "FermiLevel= 0.27 #in eV\n", + "P_O = N1*math.exp( (-FermiLevel)/KT ) #in cm^-3\n", + "\n", + "#RESULTS\n", + "print('The thermal equillibrium hole concentration is =%.2f X 10^15 cm^-3' %(P_O/(10**15)))\n", + "print('Approximationa error ')\n", + "# Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermal equillibrium hole concentration is =5.58 X 10^15 cm^-3\n", + "Approximationa error \n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.27 Page No 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T1 = 550.0 #in K\n", + "T2 = 300.0 #in K\n", + "N1 = 1.04*10**19 \n", + "\n", + "#CALCULATIONS\n", + "N_V = N1*((T1/T2)**(3)) \n", + "N_C = 2.8*10**19\n", + "E_g = -1.12\n", + "KT = 0.0259*(T1/T2)\n", + "n_i = math.sqrt(N_C*N_V*math.exp(E_g/KT)) #in cm^-3\n", + "Nd= math.sqrt(n_i**2/((1.05-1/2.0)**2-(1/2.0)**2))\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of n_i is =%.2f X 10^14 cm^-3' %(n_i/(10**14)))\n", + "print('The value of N_d is =%.2f X 10^15 cm^-3' %(Nd/(10**15)))\n", + "#Formula n_o= Nd/2+sqrt((Nd/2)^2+n_i^2) and n_o = 1.05*N_d;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of n_i is =3.20 X 10^14 cm^-3\n", + "The value of N_d is =1.40 X 10^15 cm^-3\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 2.28 Page No 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "n_o = 10**15 #in cm^-3\n", + "n_i = 10**10 #in cm^-3\n", + "p_o = 10**5 #in cm^-3\n", + "del_p = 10**13 #in cm^-3\n", + "\n", + "#CALCULATIONS\n", + "del_n = del_p #in cm^-3\n", + "KT= 0.0259 #in eV\n", + "Fermi_level1= KT*math.log(n_o/n_i) #in eV\n", + "Fermi_level2= KT*math.log((n_o+del_n)/n_i) #in eV\n", + "Fermi_level3= KT*math.log((p_o+del_p)/n_i) #in eV\n", + "\n", + "\n", + "#RESULTS\n", + "print('Fermi level for thermal equillibrium is : =%.2f eV ' %Fermi_level1)\n", + "print('Quasi-Fermi level for electrons in non equillibrium is : =%.2f eV' %Fermi_level2)\n", + "print('Quasi-Fermi level for holes in non equillibrium is: =%.2f eV' %Fermi_level3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fermi level for thermal equillibrium is : =0.30 eV \n", + "Quasi-Fermi level for electrons in non equillibrium is : =0.30 eV\n", + "Quasi-Fermi level for holes in non equillibrium is: =0.18 eV\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo3.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo3.ipynb new file mode 100755 index 00000000..bc717890 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo3.ipynb @@ -0,0 +1,992 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter No 3 : Excess Carriers In Semiconductors

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page No 145 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "n_o = 10**17 #in/cm^3\n", + "n_i = 1.5*10**10 #in /cm^3\n", + "\n", + "#CALCULATIONS\n", + "p_o = ((n_i)**(2))/n_o #in holes/cm^3\n", + "\n", + "#RESULTS\n", + "print('The hole concentration is =%.f in holes/cm^3' %p_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hole concentration is =2250 in holes/cm^3\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page No 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "n_i = 1.5 * 10**10 #in /cm^3 for silicon\n", + "N_d = 10**17 #in atoms/cm^3\n", + "n_o = 10**17 #electrons/cm^3\n", + "KT = 0.0259\n", + "\n", + "#CALCULATIONS\n", + "# E_r - E_i = KT * log(n_o/n_i)\n", + "del_E = KT * math.log(n_o/n_i) #in eV\n", + "\n", + "#RESULTS\n", + "print('The energy band for this type material is Ei =%.2f eV' %del_E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy band for this type material is Ei =0.41 eV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "K = 1.38*10**-23 #in J/K\n", + "T = 27 #in degree C\n", + "T = T + 273 #in K\n", + "e = 1.6*10**-19 \n", + "Miu = 0.17 #in m^2/v-s\n", + "Miu1 = 0.025 #in m^2/v-s\n", + "\n", + "#CALCULATIONS\n", + "D_n = ((K*T)/e)*Miu #in m^2/s\n", + "D_p = ((K*T)/e)*Miu1 #in m^2/s\n", + "\n", + "\n", + "#RESULTS\n", + "print('The diffusion coefficient of electrons is =%.2f X 10^-4 in m^2/s ' %(D_n*(10**4)))\n", + "print('The diffusion coefficient of holes is =%.2f X 10^-4 in m^2/s ' %(D_p*(10**4)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient of electrons is =43.99 X 10^-4 in m^2/s \n", + "The diffusion coefficient of holes is =6.47 X 10^-4 in m^2/s \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page No 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Miu_n = 0.15 #in m^2/v-s\n", + "K = 1.38*10**-23 \n", + "T = 300 #in K\n", + "e = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "D_n = Miu_n*((K*T)/e) #in m^2/s\n", + "Torque_n = 10**-7 #in s\n", + "L_n = math.sqrt(D_n*Torque_n) #in m\n", + "del_n = 10**20 #electrons/m^3\n", + "J_n = (e*D_n*del_n)/L_n #in A/m^2\n", + "\n", + "#RESULTS\n", + "print('The diffusion length is =%.2f X 10^-4 in m' %(L_n*(10**5)))\n", + "print('The diffusion current density is =%.2f X 10^3 in A/m^2 ' %(J_n/(10**3)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion length is =1.97 X 10^-4 in m\n", + "The diffusion current density is =3.15 X 10^3 in A/m^2 \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Sigma_n = 0.1 #in (ohm-cm)^-1\n", + "Miu_n = 1300\n", + "q = 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "n_n = Sigma_n/(Miu_n*q) #in electrons/cm^3 \n", + "n_i = 1.5*10**10\n", + "p_n = ((n_i)**2)/n_n #in holes/cm^3\n", + "p_n = p_n * 10**6 #in holes/m^3\n", + "n_n=n_n*10**6\n", + "\n", + "#RESULTS\n", + "print('Concentration of electrons is =%.2f X 10^20 per m^3 ' %(n_n/(10**20)))\n", + "print('Concentration of holes is =%.2f X 10^11 per m^3 ' %(p_n/(10**11)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Concentration of electrons is =4.81 X 10^20 per m^3 \n", + "Concentration of holes is =4.68 X 10^11 per m^3 \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "L = 100*10**-6 #in m\n", + "Miu_e = 0.13 #in m^2/V-s\n", + "Torque_h = 10**-6 #in s\n", + "Miu_h = 0.05 #in m^2/v-s\n", + "V = 12 #in V\n", + "\n", + "#CALCULATIONS\n", + "Torque_n = ((L)**2)/(Miu_e*V) #in s\n", + "P = (Torque_h/Torque_n)*(1+(Miu_h/Miu_e))\n", + "\n", + "#RESULTS\n", + "print('Electron transit time is =%.2f X 10^-9 in sec' %(Torque_n*(10**9)))\n", + "print('Photoconductor gain is =%.2f ' %P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron transit time is =6.41 X 10^-9 in sec\n", + "Photoconductor gain is =216.00 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page No 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "q = 1.6*10**-19 #in C\n", + "n_i = 2.5*10**13\n", + "Miu_n = 3800 #in cm^2/V-s\n", + "Miu_p = 1800 #in cm^2/V-s\n", + "\n", + "#CALCULATIONS\n", + "Sigma = n_i*(Miu_n + Miu_p)*q #in (ohm-cm)^-1\n", + "Rho = 1/Sigma #in ohm-cm\n", + "N_D =4.4*10**22/10**8 #in atoms/cm^3\n", + "Sigma_n = N_D * Miu_n*q #in (ohm-cm)^-1 \n", + "Rho1 = 1/Sigma_n #in ohm cm\n", + "\n", + "#RESULTS\n", + "print('The resistivity is =%.2f in ohm-cm ' %Rho)\n", + "print('The resistivity drops is =%.2f in ohm cm ' %Rho1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistivity is =44.64 in ohm-cm \n", + "The resistivity drops is =3.74 in ohm cm \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "n_i = 10**16 #in /m^3\n", + "N_D = 10**22 #in /m^3\n", + "\n", + "#CALCULATIONS\n", + "n = N_D #in /m^3\n", + "p = ((n_i)**2)/n #in /m^3\n", + "\n", + "\n", + "#RESULTS\n", + "print('The concentration of is =%.2f X 10^21 electrons per m^3' %(n/(10**21)))\n", + "print('The concentration of is =%.2f X 10^9 holes per m^3 ' %(p/(10**9)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The concentration of is =10.00 X 10^21 electrons per m^3\n", + "The concentration of is =10.00 X 10^9 holes per m^3 \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Rho = 9.6*10**-2 #ohm-m\n", + "Sigma_n = 1/Rho #in (ohm-m)^-1\n", + "Miu_n = 1300 #in cm^2/V-s\n", + "\n", + "#CALCULATIONS\n", + "Miu_n = Miu_n * 10**-4 #in m^2/V-s\n", + "q = 1.6*10**-19 #in C\n", + "N_D = Sigma_n/(Miu_n*q) #in atoms/m^3\n", + "d = 5*10**22 #in atoms/cm^3\n", + "d = d * 10**6 #// in atoms/m^3\n", + "R_d = N_D/d #Ratio \n", + "\n", + "#RESULTS\n", + "print('Ratio of donor atom to silicon atoms per unit volume is =%.2f X 10^-8 ' %(R_d*(10**8)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of donor atom to silicon atoms per unit volume is =1.00 X 10^-8 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "n_i = 1.5*10**10 #in /cm^3\n", + "n_n = 2.25*10**15 #in /cm^3\n", + "\n", + "#CALCULATIONS\n", + "p_n = ((n_i)**2)/n_n #in /cm^3\n", + "\n", + "#RESULTS\n", + "print('The concentration of is =%.2f X 10^5 holes per cm^3 ' %(p_n/(10**5)))\n", + "print('Donor impurity per cm^3 is =%.2f X 10^15 ' %(n_n/(10**15)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The concentration of is =1.00 X 10^5 holes per cm^3 \n", + "Donor impurity per cm^3 is =2.25 X 10^15 \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.12 Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "N_A = 2*10**16 #in /cm^3\n", + "N_D = 10**16 #in /cm^3\n", + "\n", + "#CALCULATIONS\n", + "C = N_A-N_D #in /cm^3\n", + "\n", + "#RESULTS\n", + "print('Carrier concentration in holes/cm^3 is =%.2f X 10^16 ' %(C/(10**16)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Carrier concentration in holes/cm^3 is =1.00 X 10^16 \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.13 Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "del_n = 10**15 #in /cm^3\n", + "Torque_p = 10*10**-6 #in sec\n", + "\n", + "#CALCULATIONS\n", + "R_G = del_n/Torque_p #in electron hole pairs/sec/cm^3\n", + "\n", + "#RESULTS\n", + "print('The rate of generation of minority carrier is : =%.2f X 10^20 electron hole pairs/sec/cm^3 ' %(R_G/(10**20)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of generation of minority carrier is : =1.00 X 10^20 electron hole pairs/sec/cm^3 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.14 Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V = 1/20.0 #in cm/\u00b5sec\n", + "V=V*10**6 #in cm/sec\n", + "\n", + "#CALCULATIONS\n", + "E = 10 #in V/cm\n", + "Miu = V/E #in cm^2/V-sec\n", + "\n", + "#RESULTS\n", + "print('The mobility of minority charge carrier is =%.f cm^2/V-sec' %Miu)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility of minority charge carrier is =5000 cm^2/V-sec\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.15 Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "q = 1.6 * 10**-19 #in C\n", + "N_D = 4.5 * 10**15 #in /cm^3\n", + "del_p = 10**21 \n", + "e=10 #in cm\n", + "A = 1 #in mm^2\n", + "A = A * 10**-14 #cm^2\n", + "l = 10 #in cm\n", + "Torque_p = 1 #in microsec\n", + "\n", + "\n", + "#CALCULATIONS\n", + "Torque_p = Torque_p * 10**-6 #in sec\n", + "Torque_n = 1 #in microsec\n", + "Torque_n = Torque_n * 10**-6 #in sec\n", + "n_i = 1.5 * 10**10 #in /cm^3\n", + "D_n = 30 #cm^2/sec\n", + "D_p = 12 #in cm^2/sec\n", + "n_o = N_D #in /cm^3\n", + "p_o = ((n_i)**2)/n_o #in /cm^3\n", + "l_n = math.sqrt(D_n * Torque_n) #in cm\n", + "l_p = math.sqrt(D_p * Torque_p) #in cm\n", + "x=34.6*10*8-4 #in cm\n", + "e1 = 1.88 * 10**1 #in cm\n", + "dnBYdx = del_p * e1 #in cm^4\n", + "dpBYdx = del_p *e #in cm^4\n", + "\n", + "J_P = -(q) * D_p * dpBYdx #in A/cm^2\n", + "J_n = q * D_n * dnBYdx #in A/cm^2\n", + "\n", + "\n", + "#RESULTS\n", + "print('Hole concentration at thermal equilibrium per cm^3 is =%.1f X 10^5 ' %(p_o/(10**5)))\n", + "print('Diffusion length of holes in cm is =%.1f X 10^-3 ' %(l_p*(10**3)))\n", + "print('Concentration gradient of holes at distance in cm^4 is =%.f X 10^22 ' %(dpBYdx/(10**22)))\n", + "print('Concentration gradient of electrons in per cm^4 is =%.1f X 10^22 ' %(dnBYdx/(10**22)))\n", + "print('Current density of holes due to diffusion in A/cm^2 is =%.2f X 10^4 ' %(J_P/(10**4)))\n", + "print('Current density of electrons due to diffusion in A/cm^2 is =%.2f X 10^4 ' %(J_n/(10**4)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hole concentration at thermal equilibrium per cm^3 is =0.5 X 10^5 \n", + "Diffusion length of holes in cm is =3.5 X 10^-3 \n", + "Concentration gradient of holes at distance in cm^4 is =1 X 10^22 \n", + "Concentration gradient of electrons in per cm^4 is =1.9 X 10^22 \n", + "Current density of holes due to diffusion in A/cm^2 is =-1.92 X 10^4 \n", + "Current density of electrons due to diffusion in A/cm^2 is =9.02 X 10^4 \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.16 Page No 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "h = 6.626 * 10**-34 #in J-s\n", + "q= 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "h= h/q #in eV\n", + "c = 3*10**8\n", + "lembda = 5490*10**-10 #in m\n", + "E = h*c/lembda #in eV\n", + "\n", + "#RESULTS\n", + "print('The energy band gap is =%.2f eV ' %E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy band gap is =2.26 eV \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.17 Page No 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "D_n = 35 #in cm^2/sec\n", + "q = 1.6*10**-19 #in C\n", + "y2 = 6*10**16 #in /cm^3\n", + "y1 = 10**17 #in /cm^3\n", + "x2 = 2*10**-4\n", + "x1 = 0\n", + "\n", + "#CALCULATIONS\n", + "dnBYdx = (y2-y1)/(x2-x1)\n", + "J_n = q*D_n*dnBYdx #in A/cm^2\n", + "\n", + "#RESULTS\n", + "print('The current density is =%.f in A/cm^2' %J_n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current density is =-1120 in A/cm^2\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.18 Page No 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "q = 1.6*10**-19 #in C\n", + "n_n = 5*10**20 #in /m^3\n", + "n_n = n_n * 10**-6 #in /cm^3\n", + "Miu_n = 0.13 #in m^2/V-sec\n", + "\n", + "\n", + "#CALCULATIONS\n", + "Miu_n = Miu_n * 10**4 #in cm^2/V-sec\n", + "Sigma_n = q*n_n*Miu_n #in ohm-cm^-1\n", + "Rho = 1/Sigma_n\n", + "A = 100 # in \u00b5m^2\n", + "A = A * 10**-8 #in cm^2\n", + "l = 0.1 #in cm\n", + "R = Rho * (l/A) #in ohm\n", + "R=R*10**-6\n", + "#RESULTS\n", + "print('The resistance of the bar is =%.2f in M ohm' %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of the bar is =0.96 in M ohm\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.19 Page No 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "w = 3.0 #in \u00b5m\n", + "\n", + "#CALCULATIONS\n", + "D = w/9 #in \u00b5m\n", + "\n", + "#RESULTS\n", + "print('Depletion width on P side is =%.2f in \u00b5m ' %D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depletion width on P side is =0.33 in \u00b5m \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.20 Page No 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "n_i = 1.5*10**16 #in /m^3\n", + "n_n = 5*10**20 #in /m^3\n", + "\n", + "#CALCULATIONS\n", + "p_n = ((n_i)**2)/n_n #in /m^3\n", + "\n", + "#RESULTS\n", + "print('The minority carrier density per m^3 is =%.2f X 10^11' %(p_n/(10**11)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minority carrier density per m^3 is =4.50 X 10^11\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.21 Page No 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "y2 = 10**14 #in /cm^3\n", + "y1 = 0\n", + "x1=-0.5 #in \u00b5m\n", + "\n", + "#CALCULATIONS\n", + "x1= x1*10**-4 #in cm\n", + "x2=0\n", + "dnBYdx = (y2-y1)/(x2-x1) #in /cm^4\n", + "q = 1.6*10**-19 #in C\n", + "D_n = 25 #in cm^2/sec\n", + "J_n = q*D_n*dnBYdx #in A/cm^2\n", + "\n", + "\n", + "#RESULTS\n", + "print('The collector current density is =%.f in A/cm^2' %J_n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The collector current density is =8 in A/cm^2\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.22 Page No 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "h = 6.64*10**-34 ##in J-s\n", + "q=1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "h= h/q #in eV\n", + "c = 3*10**8 #in m/s\n", + "lembda = 0.87*10**-6 #in m\n", + "E_g = (h*c)/lembda #in eV\n", + "\n", + "#RESULTS\n", + "print('The band gap in eV is =%.2f ' %E_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The band gap in eV is =1.43 \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.23 Page No 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "alpha = 5*10**4 #in cm^-1\n", + "l = 0.46*10**-4 #in cm\n", + "hv = 2 #in eV\n", + "I_o = 10**-2 #in W\n", + "\n", + "#CALCULATIONS\n", + "I_t = I_o*math.exp(-alpha*l) #in W\n", + "A_p = I_o-I_t #absorbed power in W or J/s\n", + "c = 1.43\n", + "A_E = (hv-c)/hv*A_p # in J/s\n", + "e = 1.6*10**-19 #in C\n", + "P = A_p/(e*hv) #Perfect quantum efficiency in photon/s\n", + "\n", + "#RESULTS\n", + "print('Total energy absorbed is =%.f X 10^-3 in J/s' %(A_p*(10**3)))\n", + "print('Rate of excess thermal energy is =%.2f X 10^-3 in J/s' %(A_E*(10**3)))\n", + "print('Perfect quantum efficiency is =%.2f X 10^16 in photon/s' %(P/(10**16)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total energy absorbed is =9 X 10^-3 in J/s\n", + "Rate of excess thermal energy is =2.56 X 10^-3 in J/s\n", + "Perfect quantum efficiency is =2.81 X 10^16 in photon/s\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 3.24 Page No 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Mu_p = 500 #in cm^2/v-s\n", + "kT = 0.0259\n", + "Toh_p = 10**-10 #in sec\n", + "p_o = 10**17 #in cm^-3\n", + "q= 1.6*10**-19 # in C\n", + "A=0.5 #in square meter\n", + "del_p = 5 * 10**16 #in cm^-3\n", + "n_i= 1.5*10**10 #in cm^-3 \n", + "\n", + "\n", + "#CALCULATIONS\n", + "D_p = kT * Mu_p #in cm/s\n", + "L_p = math.sqrt(D_p * Toh_p) # in cm\n", + "x = 10**-5 #in cm\n", + "p = p_o+del_p*e**(x/L_p) #in cm^-3\n", + "Eip= math.log(p/n_i)*kT #in eV\n", + "Ecp= 1.1/2-Eip #value of E_c-E_p in eV\n", + "Ip= q*A*D_p/L_p*del_p*e**(x/L_p) #in A\n", + "Qp= q*A*del_p*L_p #in C\n", + "\n", + "#RESULTS\n", + "print('The hole current is : =%.2f X 10^3 in A ' %(Ip*(10**3)))\n", + "print('Approximation error')\n", + "print('The value of Qp is :=%.2f X 10^-7 in C' %(Qp*(10**7)))\n", + "\n", + "#Note: There is a calculation error to evalaute the value of hole current hence the value of hole current in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hole current is : =8.61 X 10^3 in A \n", + "Approximation error\n", + "The value of Qp is :=1.44 X 10^-7 in C\n" + ] + } + ], + "prompt_number": 42 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo4.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo4.ipynb new file mode 100755 index 00000000..e76421ad --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo4.ipynb @@ -0,0 +1,928 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter No 4 : Junctions and Interfaces

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "N_D = 10**17 * 10**6 #in atoms/m^3\n", + "N_A = 0.5*10**16*10**6 #in atoms/m^3\n", + "Epsilon_r = 10\n", + "\n", + "#CALCULATIONS\n", + "Epsilon_o = 8.85*10**-12\n", + "Epsilon = Epsilon_r*Epsilon_o #in F/m\n", + "e = 1.602*10**-19 #in C\n", + "V = 0\n", + "V_B = 0.7 #in V\n", + "W1 = math.sqrt( ((2*Epsilon*V_B)/e)*(1/N_A+1/N_D) ) #in m\n", + "V_o = V_B #in V\n", + "V1 = -10 #in V\n", + "V_B1 = V_o-V1 #in V\n", + "W = math.sqrt( ((2*Epsilon*V_B1)/e)*(1/N_A+1/N_D) ) #in m\n", + "\n", + "\n", + "#RESULTS\n", + "print('The junction width in meter when no external voltage is applied is =%.2f X 10^-6' %(W1*(10**6)))\n", + "print('Junction width in meter with an external voltage of -10V is =%.2f X 10^-6 m' %(W*(10**6)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The junction width in meter when no external voltage is applied is =0.39 X 10^-6\n", + "Junction width in meter with an external voltage of -10V is =1.54 X 10^-6 m\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V = 5 #in V\n", + "V_Gamma = 0.6 #in V\n", + "r_F = 12 #in ohm\n", + "R = 1 #in k ohm\n", + "\n", + "#CALCULATIONS\n", + "R = R * 10**3 #in ohm\n", + "I_F = (V-V_Gamma)/(R+r_F) #in A\n", + "V_F = V_Gamma + (I_F*r_F) #in V\n", + "I_F=I_F*10**3 \n", + "#RESULTS\n", + "print('The forward diode current is =%.2f mA ' %I_F)\n", + "print('The diode voltage is =%.2f V ' %V_F)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forward diode current is =4.35 mA \n", + "The diode voltage is =0.65 V \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "n = 4.4*10**22 #total number of Ge atoms/cm^3\n", + "n_a = 1*10**8 #number of impurity atoms\n", + "\n", + "#CALCULATIONS\n", + "N_A = n/n_a #in atoms/cm^3\n", + "N_A = N_A * 10**6 #in atoms/m^3\n", + "n_i = 2.5*10**13 #in atoms/cm^3\n", + "n_i = n_i * 10**6 #in atoms/m^3\n", + "N_D = 10**3 * N_A #in atoms/m^3\n", + "V_T = 26*10**-3 #in A\n", + "V_J = V_T*math.log( (N_A*N_D)/((n_i)**2) ) #in V\n", + "print('The contact difference of potential is =%.2f V For a silicon P-N junction ' %V_J)\n", + "n = 5*10**22\n", + "N_A = n/n_a #in atoms/cm^3\n", + "N_A = N_A * 10**6 #in atoms/m^3\n", + "N_D = 10**3 * N_A #in atoms/m^3\n", + "n_i = 1.5*10**10 #in /cm^3\n", + "V_J = V_T*math.log(N_A*N_D/n_i**2) #in V\n", + "\n", + "\n", + "#RESULTS\n", + "\n", + "print('The contact difference of potential is =%.2f V' %V_J)\n", + "\n", + "#Note: There is a calculation error to find the value of V_J in the book, so the answer in the book is wrong.\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The contact difference of potential is =0.33 V For a silicon P-N junction \n", + "The contact difference of potential is =1.44 V\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Rho_p = 2 #in ohm-cm\n", + "Rho_n = 1 #in ohm cm\n", + "q = 1.6*10**-19 #in C\n", + "n_i = 2.5*10**13 #atoms per cm^3\n", + "Miu_p = 1800\n", + "Miu_n = 3800\n", + "\n", + "#CALCULATIONS\n", + "N_A = 1/(Rho_p*q*Miu_p) #in /cm^3\n", + "N_D = 1/(Rho_n*q*Miu_n) #in /cm^3\n", + "V_T = 26 #in mV\n", + "V_T= V_T*10**-3 #in V\n", + "V_J = V_T*math.log((N_A*N_D)/((n_i)**2)) #in V\n", + "print('The height of the potential energy barrier is =%.2f in V ' %V_J)\n", + "Miu_p = 500\n", + "N_A = 1/(Rho_p*q*Miu_p) #in /cm^3\n", + "Miu_n = 1300\n", + "N_D = 1/(Rho_n*q*Miu_n) #in /cm^3\n", + "n_i = 1.5*10**10;\n", + "V_J = V_T*math.log((N_A*N_D)/((n_i)**2)) #in V\n", + "\n", + "#RESULTS\n", + "print('For silicon P-N juction The height of the potential energy barrier is =%.2f V' %V_J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height of the potential energy barrier is =0.22 in V \n", + "For silicon P-N juction The height of the potential energy barrier is =0.67 V\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page No 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Eta = 1\n", + "V_T = 26 #in mV\n", + "V_T= V_T*10**-3 #in V\n", + "\n", + "#CALCULATIONS\n", + "V= math.log(1-0.9)*V_T #in V\n", + "print(\"The voltage in volts is : %.2f \" %V)\n", + "V1=0.05 #in V\n", + "V2= -0.05 #in V\n", + "ratio= (math.e**(V1/(Eta*V_T))-1)/(math.e**(V2/(Eta*V_T))-1)\n", + "print(\"The ratio of the current for a forward bias to reverse bias is : %.2f \" %ratio)\n", + "\n", + "# Part (iii)\n", + "Io= 10 #in \u00b5A\n", + "Io=Io*10**-3 #in mA\n", + "#For \n", + "V=0.1 #in V\n", + "I = Io * (math.e**(V/(Eta*V_T)) - 1) #in mA\n", + "print(\"For v=0.1 V , the value of I is : %.2f mA \" %I)\n", + "\n", + "#For \n", + "V=0.2 #in V\n", + "I = Io * (math.e**(V/(Eta*V_T)) - 1) #in mA\n", + "print(\"For v=0.2 V , the value of I is : %.2f mA \" %I)\n", + "\n", + "#For \n", + "V=0.3 #in V\n", + "I = Io * (math.e**(V/(Eta*V_T)) - 1) #in mA\n", + "\n", + "#RESULTS\n", + "\n", + "I=I*10**-3\n", + "print(\"For v=0.3 V , the value of I is : %.2f mA\" %I)\n", + "print(\"From three value of I, for small rise in forward voltage, the diode current increase rapidly \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage in volts is : -0.06 \n", + "The ratio of the current for a forward bias to reverse bias is : -6.84 \n", + "For v=0.1 V , the value of I is : 0.46 mA \n", + "For v=0.2 V , the value of I is : 21.90 mA \n", + "For v=0.3 V , the value of I is : 1.03 mA\n", + "From three value of I, for small rise in forward voltage, the diode current increase rapidly \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "# Part (i)\n", + "T1= 25 #in \u00b0C\n", + "T2= 80.0 #in \u00b0C\n", + "\n", + "#CALCULATIONS\n", + "# Formula Io2= Io1*2**((T2-T1)/10)\n", + "AntiFactor= 2**((T2-T1)/10)\n", + "print('Anticipated factor for Ge is : =%.f ' %AntiFactor)\n", + "\n", + "# Part (ii)\n", + "T1= 25.0 #in \u00b0C\n", + "T2= 150.0 #in \u00b0C\n", + "AntiFactor= 2**((T2-T1)/10)\n", + "\n", + "#RESULTS\n", + "print('Anticipated factor for Ge is : =%.f ' %AntiFactor)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Anticipated factor for Ge is : =45 \n", + "Anticipated factor for Ge is : =5793 \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I=5.0 #in \u00b5A\n", + "V=10.0 #in V\n", + "T1= 0.11 #in \u00b0C^-1\n", + "T2= 0.07 #in \u00b0C^-1\n", + "\n", + "#CALCULATIONS\n", + "Io= T2*I/T1 #in \u00b5A\n", + "I_R= I-Io #in \u00b5A\n", + "R= V/I_R #in M\u03a9\n", + "\n", + "#RESULTS\n", + "print('The leakage resistance is : =%.1f M\u03a9 ' %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The leakage resistance is : =5.5 M\u03a9 \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "Eta = 1.0\n", + "T = 125.0 #in \u00b0C\n", + "T = T + 273 #in K\n", + "V_T = 8.62 * 10**-5 * 398 #in V\n", + "I_o = 30 #in \u00b5A\n", + "\n", + "#CALCULATIONS\n", + "I_o= I_o*10**-6 #in A\n", + "v = 0.2 #in V\n", + "r_f = (Eta * V_T)/(I_o * math.e**(v/(Eta* V_T))) #in ohm\n", + "print('The dynamic resistance in the forward direction is =%.2f \u03a9 ' %r_f)\n", + "\n", + "r_r = (Eta * V_T)/(I_o * math.e**(-v/(Eta* V_T))) #in ohm\n", + "r_r=r_r*10**-3\n", + "print('The dynamic resistance in the forward direction is =%.2f K\u03a9 ' %r_r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dynamic resistance in the forward direction is =3.36 \u03a9 \n", + "The dynamic resistance in the forward direction is =389.08 K\u03a9 \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "epsilon = 16/(36 * math.pi * 10**11) #in F/cm\n", + "A = 1 * 10**-2\n", + "W = 2 * 10**-4\n", + "\n", + "#CALCULATIONS\n", + "C_T = (epsilon * A)/W #in F\n", + "C_T=C_T*10**12\n", + "\n", + "#RESULTS\n", + "print('The barrier capacitance is =%.2f pF ' %C_T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The barrier capacitance is =70.74 pF \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "A = 1.0 #in mm^2\n", + "A = A * 10**-6 #in m^2\n", + "N_A = 3 * 10**20 #in atoms/m^3\n", + "q = 1.6 *10**-19 #in C\n", + "V_o = 0.2 #in V\n", + "epsilon_r=16\n", + "epsilon_o= 8.854*10**-12 #in F/m\n", + "\n", + "\n", + "#CALCULATIONS\n", + "epsilon=epsilon_r*epsilon_o\n", + "# Part (a)\n", + "V=-10 #in V\n", + "W = math.sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) #m\n", + "C_T1 = (epsilon * A)/W #in F\n", + "W=W*10**6\n", + "print('The width of the depletion layer for an applied reverse voltage of 10V is =%.2f \u00b5m ' %W)\n", + "\n", + "# Part (b)\n", + "V=-0.1 #in V\n", + "W = math.sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) #m\n", + "C_T2 = (epsilon * A)/W #in F\n", + "W=W*10**6\n", + "print('The width of the depletion layer for an applied reverse voltage of 0.1V is =%.2f \u00b5m ' %W)\n", + "\n", + "# Part (c)\n", + "V=0.1 #in V\n", + "W = math.sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) # m\n", + "W=W*10**6\n", + "print('The width of the depletion layer for an applied reverse voltage of 0.1V is =%.2f \u00b5m ' %W)\n", + "\n", + "#Part (d)\n", + "C_T1=C_T1*10**12\n", + "C_T2=C_T2*10**12\n", + "\n", + "#RESULTS\n", + "print('The space charge capacitance for an applied reverse voltage of 10V is =%.2f pF ' %C_T1)\n", + "print('The space charge capacitance for an applied reverse voltage of 0.1V is =%.2f pF' %C_T2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The width of the depletion layer for an applied reverse voltage of 10V is =7.76 \u00b5m \n", + "The width of the depletion layer for an applied reverse voltage of 0.1V is =1.33 \u00b5m \n", + "The width of the depletion layer for an applied reverse voltage of 0.1V is =0.77 \u00b5m \n", + "The space charge capacitance for an applied reverse voltage of 10V is =18.26 pF \n", + "The space charge capacitance for an applied reverse voltage of 0.1V is =106.46 pF\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 4.13 Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_o = 1.8 * 10**-9 #A\n", + "v = 0.6 #in V\n", + "Eta = 2\n", + "V_T = 26 #in mV\n", + "\n", + "#CALCULATIONS\n", + "V_T=V_T*10**-3 #in V\n", + "I = I_o *(math.e**(v/(Eta * V_T))) #in A\n", + "I=I*10**3\n", + "\n", + "#RESULTS\n", + "print('The current in the junction is =%.2f mA ' %I)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current in the junction is =0.18 mA \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 4.14 Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_o = 2.4 * 10**-14\n", + "I = 1.5 #in mA\n", + "I=I*10**-3 #in A\n", + "Eta = 1\n", + "V_T = 26 #in mV\n", + "\n", + "#CALCULATIONS\n", + "V_T= V_T*10**-3 #in V\n", + "v =math.log((I + I_o)/I_o) * V_T #in V\n", + "\n", + "#RESULTS\n", + "print('The forward biasing voltage across the junction is =%.2f V' %v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forward biasing voltage across the junction is =0.65 V\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 4.15 Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "I_o = 10 #in nA\n", + "\n", + "#CALCULATIONS\n", + "I = I_o * (-1) #in nA\n", + "\n", + "#RESULTS\n", + "print('The Diode current is = %.f nA ' %I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Diode current is = -10 nA \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 4.16 Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "R = 4.5 #in ohm\n", + "I = 44.4 #in mA\n", + "\n", + "#CALCULATIONS\n", + "I=I*10**-3 #in A\n", + "V = R * I #in V\n", + "Eta = 1\n", + "V_T = 26 #in mV\n", + "V_T=V_T*10**-3 #in V\n", + "I_o = I/((math.e**(V/(Eta * V_T))) -1) #in A\n", + "V = 0.1 #in V\n", + "r_f = (Eta * V_T)/(I_o * ((math.e**(V/(Eta * V_T)))-1)) #in ohm\n", + "\n", + "#RESULTS\n", + "print('The diode dynamic resistance is =%.2f \u03a9' %r_f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diode dynamic resistance is =27.78 \u03a9\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 4.18 Page No 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V = 0.25 #in V\n", + "I_o = 1.2 #in \u00b5A\n", + "\n", + "#CALCULATIONS\n", + "I_o = I_o * 10**-6 #in A\n", + "V_T = 26 #in mV\n", + "V_T = V_T * 10**-3 #in V\n", + "Eta = 1\n", + "r = (Eta * V_T)/(I_o * (math.e**(V/(Eta * V_T)))) #in ohm\n", + "\n", + "#RESULTS\n", + "print('The ac resistance of the diode is =%.2f \u03a9' %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ac resistance of the diode is =1.45 \u03a9\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 4.19 Page No 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "q = 1.6 * 10**-19 #in C\n", + "N_A = 3 * 10**20 #in /m^3\n", + "A = 1 #in \u00b5m^2\n", + "\n", + "#CALCULATIONS\n", + "A = A * 10**-6 #in m^2\n", + "V = -10 #in V\n", + "V_J = 0.25 #in V\n", + "V_B = V_J - V #in V\n", + "epsilon_o = 8.854 #in pF/m\n", + "epsilon_o = epsilon_o * 10**-12 #in F/m\n", + "epsilon_r = 16\n", + "epsilon = epsilon_o * epsilon_r\n", + "W = math.sqrt((V_B * 2 * epsilon)/(q * N_A)) #in m \n", + "\n", + "#RESULTS\n", + "C_T = (epsilon * A)/W #in pF\n", + "W=W*10**6\n", + "C_T=C_T*10**12\n", + "print('The width of depletion layer is =%.2f \u00b5m ' %W)\n", + "print('The space charge capacitance is =%.2f pF ' %C_T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The width of depletion layer is =7.78 \u00b5m \n", + "The space charge capacitance is =18.21 pF \n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 4.20 Page No 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "C_T = 100.0 #in pF\n", + "C_T=C_T*10**-12 #in F\n", + "epsilon_r = 12\n", + "epsilon_o = 8.854 * 10**-12 #in F/m\n", + "\n", + "#CALCULATIONS\n", + "epsilon = epsilon_r * epsilon_o\n", + "Rho_p = 5 #in ohm-cm\n", + "Rho_p = Rho_p * 10**-2 #in ohm-m\n", + "V_j = 0.5 #in V\n", + "V = -4.5 #in V\n", + "Mu_p = 500 #in cm^2\n", + "Mu_p = Mu_p * 10**-4 #in m^2\n", + "Sigma_p = 1/Rho_p #in per ohm-m\n", + "qN_A = Sigma_p/ Mu_p\n", + "V_B = V_j - V\n", + "W = math.sqrt((V_B * 2 * epsilon)/qN_A)\n", + "A = (C_T * W)/ epsilon #in m\n", + "D = math.sqrt(A * (4/math.pi)) #in m\n", + "D = D * 10**3 #in mm\n", + "\n", + "#RESULTS\n", + "print('The diameter is =%.2f mm ' %D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diameter is =1.40 mm \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 4.21 Page No 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "q = 1.6 * 10**-19 #in C\n", + "Mu_p = 500 #in cm^2/V-sec\n", + "Rho_p = 3.5 #in ohm-cm\n", + "Mu_n = 1500 #in cm^2/V-sec\n", + "Rho_n = 10 #in ohm-cm\n", + "\n", + "#CALCULATIONS\n", + "N_A = 1/(Rho_p * Mu_p * q) # in /cm^3\n", + "N_D = 1/(Rho_n * Mu_n * q) # in /cm^3\n", + "V_J = 0.56 # in V\n", + "n_i = 1.5 * 10**10 #in /cm^3\n", + "V_T = V_J/math.log((N_A * N_D)/(n_i)**2) #in V\n", + "T = V_T * 11600 #in K\n", + "T = T - 273 #in \u00b0C\n", + "\n", + "#RESULTS\n", + "print('The Temperature of junction is =%.2f \u00b0C ' %T)\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Temperature of junction is =14.28 \u00b0C \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example No 4.22 Page No 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "R = 5 #in ohm\n", + "I = 50 #in mA\n", + "I=I*10**-3 #in A\n", + "V = R * I #in V\n", + "Eta = 1\n", + "V_T = 26 #in mV\n", + "\n", + "#CALCULATIONS\n", + "V_T=V_T*10**-3 #in V\n", + "I_o = I/((math.e**(V/(Eta * V_T))) - 1) #in A\n", + "v1 = 0.2 #in V\n", + "r = (Eta * V_T)/(I_o * (math.e**(v1/(Eta * V_T)))) #in ohm\n", + "\n", + "#RESULTS\n", + "I_o=I_o*10**6\n", + "print('Reverse saturation current is =%.2f \u00b5A ' %I_o)\n", + "print('Dynamic resistance of the diode is =%.2f \u03a9 ' %r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse saturation current is =3.33 \u00b5A \n", + "Dynamic resistance of the diode is =3.56 \u03a9 \n" + ] + } + ], + "prompt_number": 52 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo6.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo6.ipynb new file mode 100755 index 00000000..44239148 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo6.ipynb @@ -0,0 +1,76 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater No 6: Microwave Diodes

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page No 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "C1_min= 5.0 #in pF\n", + "C1_max= 50.0 #in pF\n", + "C2_min= 5.0 #in pF\n", + "C2_max= 50.0 #in pF\n", + "\n", + "#CALCULATIONS\n", + "C1_min=C1_min*10**-12 #in F\n", + "C2_min=C2_min*10**-12 #in F\n", + "C1_max=C1_max*10**-12 #in F\n", + "C2_max=C2_max*10**-12 #in F\n", + "L = 10.0 #in mH\n", + "L = L * 10**-3 #in H\n", + "C_T_min = (C1_min*C2_min)/(C2_min+C2_min) #in F\n", + "f_o_max = 1/( 2*math.pi*(math.sqrt(L*C_T_min)) ) #in Hz \n", + "f_o_max = f_o_max * 10**-6 #in MHz\n", + "C_T_max = (C1_max*C2_max)/(C2_max+C2_max) #in F\n", + "f_o_min = 1/( 2*math.pi*(math.sqrt(L*C_T_max)) ) #in Hz \n", + "f_o_min = f_o_min * 10**-3 #in kHz\n", + "\n", + "#RESULTS\n", + "print('The tuning range for circuit will be =%.2f kHz' %f_o_min)\n", + "print(' To %.3f MHz' %f_o_max)\n", + "\n", + "\n", + "#print(\"The tuning range for circuit will be : \"+string(round(f_o_min))+\" kHz to \"+string(round(f_o_max))+\" MHz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tuning range for circuit will be =318.31 kHz\n", + " To 1.007 MHz\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo7.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo7.ipynb new file mode 100755 index 00000000..431c4340 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo7.ipynb @@ -0,0 +1,154 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater No 7: Optoelectonic Devices

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "Vout = 5.0 #in V\n", + "V = 1.5 #ON state voltage drop across LED in V\n", + "I = 5.0 #in mA\n", + "\n", + "#CALCULATIONS\n", + "I = I*10**-3 #in A\n", + "R = (Vout-V)/I #in ohm\n", + "\n", + "#RESULTS\n", + "print('Resistance is =%.f \u03a9' %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance is =700 \u03a9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page No 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "N_A = 7.5*10**24 #in atoms/m^3\n", + "N_D = 1.5*10**22 #in atoms/m^3\n", + "D_e = 25*10**-4 #in m^2/s\n", + "D_n = 1*10**-3 #in m^2/s\n", + "V_T = 26*10**-3 #in V\n", + "\n", + "#CALCULATIONS\n", + "Torque_eo = 500*10**-9 #in sec\n", + "Torque_ho = 100*10**-9 #in sec\n", + "e = 1.6*10**-19 #in C\n", + "n_i = 1.5*10**16 #in /m^3\n", + "I_lambda = 12.5 #in mA/cm^2\n", + "I_lambda= I_lambda*10**-3 #in A/cm^2\n", + "L_e = math.sqrt(D_e*Torque_eo) #in m\n", + "L_n = math.sqrt(D_n*Torque_ho) #in m\n", + "J_s = e*((n_i)**2)*( ((D_e)/(L_e*N_A)) + ((D_n)/(L_n*N_D)) ) #in A/m^2\n", + "J_s= J_s*10**-4 #in A/cm^2\n", + "V_OC = V_T*(math.log(1+(I_lambda/J_s))) #in V\n", + "\n", + "#RESULTS\n", + "print('Open circuit voltage is =%.2f volts ' %V_OC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open circuit voltage is =0.52 volts \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page No 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Phi_o = 1.0*10**21 #in m^-2s^-1\n", + "alpha =1.0*10**5 #in m^-1\n", + "e= 1.6*10**-19 #in C\n", + "\n", + "#CALCULATIONS\n", + "G_L1 = alpha*Phi_o #in m^-3s^-1\n", + "W = 26.0 #in \u00b5m\n", + "W = W * 10**-6 #in m\n", + "G_L2 = alpha*Phi_o*(math.e)**((-alpha)*W) #in m^-3s^-1\n", + "#temp=(1-math.e)**(-(alpha)*W)\n", + "J_L = e*Phi_o*(1-math.e**(-(alpha)*W)) #in A/m^2\n", + "J_L = J_L * 10**3*10**-4 #in mA/cm^2\n", + "\n", + "#RESULTS\n", + "print('Photo current density is =%.1f mA/cm^2' %J_L)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Photo current density is =14.8 mA/cm^2\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo8.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo8.ipynb new file mode 100755 index 00000000..47137bb2 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo8.ipynb @@ -0,0 +1,576 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter No 8 : Metal Semiconductor Field Effect Transistor

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page No 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "I_DSS = 15.0 #in mA\n", + "V_GS_off = -5.0 #in V\n", + "V_GS = 0 #in V\n", + "\n", + "#CALCULATIONS\n", + "I_D = I_DSS*((1-(V_GS/V_GS_off))**2) #in mA\n", + "V_GS = -1 #in V\n", + "I_D1 = I_DSS*((1.0-(V_GS/V_GS_off))**2) #in mA\n", + "V_GS = -4 #in V\n", + "I_D2 = I_DSS*((1-(V_GS/V_GS_off))**2) #in mA\n", + "\n", + "#RESULTS\n", + "print('When V_GS=0, the drain current is =%.f mA ' %I_D)\n", + "print('When V_GS=-1V, the drain current is =%.2f mA ' %I_D1)\n", + "print('The interplanner spacing is =%.2f \u00c5' %I_D2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When V_GS=0, the drain current is =15 mA \n", + "When V_GS=-1V, the drain current is =9.60 mA \n", + "The interplanner spacing is =0.60 \u00c5\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page No 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_DSS = 20.0 #in mA\n", + "V_P = -8 #in V\n", + "g_mo = 5000.0 #in \u00b5s\n", + "V_GS = -4.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "\n", + "I_D = I_DSS*((1-(V_GS/V_P))**2) #in mA\n", + "g_m = g_mo*(1-(V_GS/V_P)) #in \u00b5s\n", + "\n", + "#RESULTS\n", + "print('The value of drain current is =%.f mA ' %I_D)\n", + "print('The transconductance is =%.f \u00b5s' %g_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of drain current is =5 mA \n", + "The transconductance is =2500 \u00b5s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "\n", + "#initialisation of variables\n", + "I_D1 = 10.0 #in mA\n", + "V_GS = -12.0 #in V\n", + "V_GSth = -3.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "K = I_D1/( (V_GS-V_GSth)**2 ) #in mA/V\n", + "V_GS= -6 #in V\n", + "I_D = K*((V_GS-V_GSth)**2) #in mA\n", + "\n", + "#RESULTS\n", + "print('The value of I_D is =%.2f mA ' %I_D)\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is =1.11 mA \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7, Page No 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_GS = -2.0 #in V\n", + "V_P = -5.0 #in V\n", + "V_DS = V_GS-V_P #in V\n", + "I_DSS = 8.0 #in mA\n", + "\n", + "#CALCULATIONS\n", + "I_D = I_DSS*((1-(V_GS/V_P))**2) #in mA\n", + "\n", + "#RESULTS\n", + "print('The minimum value of V_DS is =%.f V ' %V_DS)\n", + "print('The drain current is =%.2f mA' %I_D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum value of V_DS is =3 V \n", + "The drain current is =2.88 mA\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_P = -2 #in V\n", + "I_DSS = 1.65 #in mA\n", + "I_D = 0.8 #in mA\n", + "V_DD = 24.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "V_GS = V_P*(1- math.sqrt(I_D/I_DSS) ) #in V\n", + "g_mo = -(2*I_DSS)/V_P #in mS\n", + "g_m = g_mo*(1-(V_GS/V_P)) #in mS\n", + "\n", + "#RESULTS\n", + "print('The value of V_GS is =%.2f V ' %V_GS)\n", + "print('The value of g_m is =%.2f mS' %g_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS is =-0.61 V \n", + "The value of g_m is =1.15 mS\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_P = 5.0 #in V\n", + "I_DSS = -40.0 #in mA\n", + "I_D = -15.0 #in mA\n", + "\n", + "#CALCULATIONS\n", + "V_GS = V_P*(math.sqrt(I_D/I_DSS)-1 ) #in V\n", + "\n", + "#RESULTS\n", + "print('The gate source voltage is =%.2f V' %(V_GS*-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gate source voltage is =1.94 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10, Page No 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_D1 = 1.9 #in mA\n", + "I_D2 = 1.0 #in mA\n", + "\n", + "#CALCULATIONS\n", + "del_I_D = I_D1-I_D2 #in mA\n", + "V_GS2 = -3.3 #in V\n", + "V_GS1 = -3.0 #in V\n", + "del_V_GS = V_GS1-V_GS2 #in V\n", + "g_m = del_I_D/del_V_GS #in mA/V\n", + "g_m = g_m * 10**3 #in \u00b5 mhos\n", + "\n", + "#RESULTS\n", + "print('The value of transconductance is =%.f \u00b5 mhos ' %g_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of transconductance is =3000 \u00b5 mhos \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 Page No 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V_DS1 = 14.0 #in V\n", + "V_DS2 = 5.0 #in V\n", + "del_V_DS = V_DS1-V_DS2 # in V\n", + "I_D1 = 3.3 #in mA\n", + "I_D2 = 3 # in mA\n", + "\n", + "#CALCULATIONS\n", + "del_I_D = I_D1-I_D2 #in mA\n", + "r_d = del_V_DS/del_I_D #in k ohms\n", + "print('The drain resistance is =%.f k ohms' %r_d)\n", + "V_GS1 = 0.4 #in V\n", + "V_GS2 = 0.1 #in V\n", + "del_V_GS = V_GS1-V_GS2 #in V\n", + "I_D1 = 3.3 #in mA\n", + "I_D2 = 0.71 #in mA\n", + "del_I_D = I_D1-I_D2 # in mA\n", + "g_m = del_I_D/del_V_GS # in mA/V\n", + "g_m = g_m * 10**3 # in \u00b5mhos\n", + "\n", + "\n", + "#RESULTS\n", + "print('The transconductance is =%.f \u00b5mhos ' %g_m)\n", + "Miu =r_d*10**3*g_m*10**-6\n", + "print('Amplification factor is =%.f ' %Miu)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The drain resistance is =30 k ohms\n", + "The transconductance is =8633 \u00b5mhos \n", + "Amplification factor is =259 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "q = 1.6*10**-19 #in C\n", + "N_D = 10**15*10**6 #electrons/m^3\n", + "a = 3*10**-4 #in cm\n", + "a=a*10**-2 #in m\n", + "\n", + "#CALCULATIONS\n", + "Epsilon_o = (36 * math.pi * 10**9)**-1\n", + "Epsilon = 12*Epsilon_o\n", + "V_P = (q*N_D*((a)**2))/(2*Epsilon) #in V\n", + "print('Pinch off voltage is =%.2f V ' %V_P)\n", + "V_GS = 1.0 #in V\n", + "V_P = 2.0 #in V\n", + "b = a*( 1-math.sqrt(V_GS/V_P) ) #in m\n", + "b = b * 10**6 #in \u00b5m\n", + "\n", + "#RESULTS\n", + "print('The channel half width is =%.2f \u00b5m' %b)\n", + "# Note: In the book, the unit of channel half width is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pinch off voltage is =6.79 V \n", + "The channel half width is =0.88 \u00b5m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 Page No 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_DSS = 8.0 #in mA\n", + "V_P = -4.0 #in V\n", + "a = 3*10**-4 #in cm\n", + "N_D = 10**15 #in electrons/cm^3\n", + "I_D = 3.0 #in mA\n", + "\n", + "#CALCULATIONS\n", + "V_GS = V_P*( 1-math.sqrt(I_D/I_DSS) ) #in V\n", + "V_DS_sat = V_GS-V_P #in V\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of V_GS is =%.2f V' %V_GS)\n", + "print('The value of V_DS_sat is =%.2f V ' %V_DS_sat)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS is =-1.55 V\n", + "The value of V_DS_sat is =2.45 V \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 8.14 Page No 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_P = -4 #in V\n", + "I_DSS = 9.0 #in mA\n", + "V_GS = -2.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "I_D = I_DSS*(( 1-(V_GS/V_P) )**2) #in mA\n", + "\n", + "#RESULTS\n", + "print('The drain current is =%.2f mA ' %I_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The drain current is =2.25 mA \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 8.15 Page No 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "I_DSS = 12.0 #in mA\n", + "V_P = -6.0 #in V\n", + "V_GS = -1.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "g_mo = (-2*I_DSS)/V_P #in mA/V\n", + "g_m = g_mo*(1-(V_GS/V_P)) #in mS\n", + "\n", + "#RESULTS\n", + "print('The value of transconductance is =%.2f mS' %g_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of transconductance is =3.33 mS\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 8.16 Page No 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "I_DSS = 10.0 #in mA\n", + "V_P = -5.0 #in V\n", + "V_GS = -2.5 #in V\n", + "\n", + "#CALCULATIONS\n", + "g_m = ((-2*I_DSS)/V_P)*(1-(V_GS/V_P)) #in mS .... correction\n", + "I_D = I_DSS * ((1-(V_GS/V_P))**2) #in mA\n", + "\n", + "\n", + "#RESULTS\n", + "print('The transconductance is =%.f mS ' %g_m)\n", + "print('The drain current is =%.2f mA ' %I_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transconductance is =2 mS \n", + "The drain current is =2.50 mA \n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo9.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo9.ipynb new file mode 100755 index 00000000..d2b16e2d --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo9.ipynb @@ -0,0 +1,1684 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter No 9 : MOS Transistors

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page No 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_TN = 0.7 #in V\n", + "W = 45*10**-4 #in cm\n", + "L = 4.0 #in \u00b5m\n", + "L = L * 10**-4 #in cm\n", + "t_ox = 450 #in \u00c5\n", + "\n", + "#CALCULATIONS\n", + "t_ox = t_ox*10**-8 #in cm\n", + "V_GS = 1.4 #in V\n", + "Miu_n = 700 #in cm^2/V-s\n", + "Epsilon_ox = (8.85*10**-14)*(3.9) #in F/cm\n", + "k_n = (W*Miu_n*Epsilon_ox)/(2*L*t_ox) #A/V^2\n", + "I_D = k_n*((V_GS-V_TN)**2) #in A\n", + "k_n=k_n*10**3\n", + "I_D=I_D*10**3\n", + "\n", + "#RESULTS\n", + "print('The value of k_n is : =%.2f mA/V^2' %k_n)\n", + "print('The current is =%.2f mA' %I_D)\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of k_n is : =0.30 mA/V^2\n", + "The current is =0.15 mA\n", + "Approximation error\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page No 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "I_Don = 6.0 #in mA\n", + "I_Don= I_Don*10**-3 #in A\n", + "V_GSon = 8 #in V\n", + "V_GSth = 3 #in V\n", + "V_DD = 12.0 #in V\n", + "R_D= 2*10**3 #in \u03a9\n", + "\n", + "#CALCULATIONS\n", + "k= I_Don/(V_GSon-V_GSth)**2 #in A/V^2\n", + "A= R_D**2 #assumed\n", + "B= 2*R_D*V_GSth-2*R_D*V_DD-1/k #assumed\n", + "C= (V_DD-V_GSth)**2 #assumed\n", + "\n", + "I_DQ= 0.0027940 #in A\n", + "V_DSQ= V_DD-I_DQ*R_D #in V\n", + "I_DQ=I_DQ*10**3\n", + "\n", + "#RESULTS\n", + "print('The value of I_DQ is : =%.2f mA' %I_DQ)\n", + "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is : =2.79 mA\n", + "The value of V_DSQ is : =6.41 volts \n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_GS = 6.0 #in V\n", + "I_D = 4.0 #in mA\n", + "V_GSth = 2.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "V_DS = V_GS #in V\n", + "V_DD = 2*V_DS #in V\n", + "R_D = (V_DD-V_DS)/I_D #in k ohm\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of V_DD is =%.2f V ' %V_DD)\n", + "print('The value of R_D is =%.2f k ohm' %R_D)\n", + "print('The very high value for the gate to drain resistance is : 10 M\u03a9 ' )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_DD is =12.00 V \n", + "The value of R_D is =1.50 k ohm\n", + "The very high value for the gate to drain resistance is : 10 M\u03a9 \n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page No 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_Don = 3*10**-3 \n", + "V_GSon = 10.0 #in V\n", + "V_GSth= 5.0 #in V\n", + "R2= 18*10**6 #in \u03a9\n", + "R1= 22*10**6 #in \u03a9\n", + "R_S=820 #in \u03a9\n", + "R_D=3*10**3 #in \u03a9\n", + "V_DD= 40.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "V_G= V_DD*R2/(R1+R2) #in V\n", + "k= I_Don/(V_GSon-V_GSth)**2 #in A/V**2\n", + "A= R_S**2 #assumed\n", + "B= 2*R_S*V_GSth-2*R_S*V_G-1/k #assumed\n", + "C= (V_G-V_GSth)**2 #assumed\n", + "I_D= 0.0067246 #in A\n", + "I_DQ= I_D #in A\n", + "V_GSQ= V_G-I_D*R_S #in V\n", + "V_DSQ= V_DD-I_DQ*(R_D+R_S) #in V\n", + "I_DQ=I_DQ*10**3\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of I_DQ is =%.2f mA' %I_DQ)\n", + "print('The value of V_GSQ is =%.2f volts ' %V_GSQ)\n", + "print('The value of V_DSQ is =%.2f volts ' %V_DSQ)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is =6.72 mA\n", + "The value of V_GSQ is =12.49 volts \n", + "The value of V_DSQ is =14.31 volts \n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_D= '0.3*(V_GS-V_P)^2' #given expression\n", + "V_DD= 30.0 #in V\n", + "V_P= 4 #in V\n", + "R_GS = 1.2*10**6 #in \u03a9\n", + "R_G = 1.2*10**6 #in \u03a9\n", + "I_D= 1.2 #in mA\n", + "\n", + "#CALCULATIONS\n", + "Req= R_GS/(R_GS+R_G) #in \u03a9\n", + "R_D= 15.0 #in \u03a9\n", + "A= (R_D*Req)**2 #assumed\n", + "B= -(2*R_D*Req*(V_DD*Req-V_P)+1/0.3) #assumed\n", + "C= (V_DD*Req-V_P)**2 #assumed\n", + "I_DSQ= I_D #in mA\n", + "V_GS= (V_DD-I_D*R_D) #in V\n", + "V_DS= Req*V_GS #in V\n", + "\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of I_DSQ is : =%.2f mA' %I_DSQ)\n", + "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", + "print('The value of V_DS is : =%.2f volts ' %V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DSQ is : =1.20 mA\n", + "The value of V_GS is : =12.00 volts \n", + "The value of V_DS is : =6.00 volts \n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "k = 0.1 #in mA/V^2\n", + "V_T = 1.0 # in V\n", + "R1 = 33.0 #in k ohm\n", + "R2 = 21.0 #in k ohm\n", + "V_DD = 6.0 #in V\n", + "R_D = 18 #in k ohm\n", + "\n", + "#CALCULATIONS\n", + "V_G = (R2/(R2+R1))*V_DD #in V\n", + "V_S = 0 #in V\n", + "V_GS = V_G-V_S #in V\n", + "I_D = k*((V_GS-V_T)**2) #in mA\n", + "V_DS = V_DD - (I_D*R_D) #in V\n", + "V_DSsat = V_GS-V_T #in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_D is =%.2f mA ' %I_D)\n", + "print('The value of V_DS(sat) is =%.2f V ' %V_DS)\n", + "print('The value of V_DS(sat) is =%.2f V ' %V_DSsat)\n", + "\n", + "if V_DS > V_DSsat :\n", + " print('MOSFET is in saturation region ')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is =0.18 mA \n", + "The value of V_DS(sat) is =2.80 V \n", + "The value of V_DS(sat) is =1.33 V \n", + "MOSFET is in saturation region \n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page No 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "R2 = 18.0 #in k ohm\n", + "R1 = 33.0 #in k ohm\n", + "V_DD = 6.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "V_G = (R2/(R1+R2))*V_DD #in V\n", + "V_S = V_DD # in V\n", + "V_SG = V_S-V_G #in V\n", + "k = 0.1\n", + "V_T = -1 #in V\n", + "I_D = k*((V_SG+V_T)**2) #in mA\n", + "R_D = 3.0 # in k ohm\n", + "V_SD = V_DD - (I_D*R_D) #in V\n", + "V_SDsat = V_SG+V_T #in V\n", + "\n", + "#RESULTS\n", + "print('The value of V_SG is =%.2f V ' %V_SG)\n", + "print('The value of I_D is =%.2f mA ' %I_D)\n", + "print('The value of V_SD is =%.2f V ' %V_SD)\n", + "print('The value of V_SD(sat) is =%.2f V ' %V_SDsat)\n", + "\n", + "if V_SD > V_SDsat :\n", + " print('The p MOSFET is indeed biased in the saturation region')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_SG is =3.88 V \n", + "The value of I_D is =0.83 mA \n", + "The value of V_SD is =3.51 V \n", + "The value of V_SD(sat) is =2.88 V \n", + "The p MOSFET is indeed biased in the saturation region\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V_G= 1.5 # in V\n", + "V_P= -3.0 # in V\n", + "R_S= 750.0 # in \u03a9\n", + "R_D= 1800 #in \u03a9\n", + "I_DSS= 6*10**-3 # in A\n", + "V_DD= 18 #in V\n", + "\n", + "#CALCULATIONS\n", + "A= R_S**2\n", + "B=(2*R_S*(V_P-V_G)-V_P**2/I_DSS)\n", + "C=(V_P-V_G)**2\n", + "I_D= 0.0031170 #in A\n", + "I_DQ= I_D #in A\n", + "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", + "V_DSQ= V_DS # in V\n", + "I_DQ=I_DQ*10**3\n", + "\n", + "#RESULTS\n", + "print('The value of I_DQ is : =%.2f mA ' %I_DQ)\n", + "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is : =3.12 mA \n", + "The value of V_DSQ is : =10.05 volts \n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_GS = 4.0 #in V\n", + "V_P = 2.0 #in V\n", + "R2 = 10.0 #in k ohm\n", + "R1 = 30.0 #in k ohm\n", + "R_D= 2.5 #in kohm\n", + "I_D= 15 #in mA\n", + "\n", + "#CALCULATIONS\n", + "I_D= I_D*10**-3 #in A\n", + "V_DD = 25 #in V\n", + "V_G = (V_DD/R_D)*V_DD/(R1+R2) #in V\n", + "R_S = (V_G-V_GS)/I_D # in ohm\n", + "\n", + "#RESULTS\n", + "print('The value of R_S is =%.f ohm ' %R_S)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_S is =150 ohm \n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "k= 0.1 #in mA/V^2\n", + "V_T= 1 # in V\n", + "R2= 87*10**3 #in \u03a9\n", + "R1= 110*10**3 # in \u03a9\n", + "R_S=2 #in k\u03a9\n", + "R_D=2 #in k\u03a9\n", + "V_DD= 6 #in V\n", + "V_SS= 6 #in V\n", + "\n", + "#CALCULATIONS\n", + "V_G= (V_DD+V_SS)*R2/(R1+R2) # in V\n", + "A= R_S**2 # assumed\n", + "B= -(2*R_S*(V_G+V_SS-V_T)+1/k) # assumed\n", + "C= (V_G+V_SS-V_T)**2 #assumed\n", + "I_D= 2.6001587 # in mA\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of I_D is : =%.2f mA' %I_D)\n", + "V_DS=V_DD+V_SS-I_D*R_D-I_D*R_S #in V\n", + "print('The value of V_DS is : =%.2f volts' %V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is : =2.60 mA\n", + "The value of V_DS is : =1.60 volts\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.12 Page No 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "k = 0.16 #in mA/V^2\n", + "V_T = 2.0 #in V\n", + "I_D = 0.5 #in mA\n", + "V_DD = 6.0 #in V\n", + "V_SS = -6 #in V\n", + "R_D = 10.0 #in k ohm\n", + "\n", + "#CALCULATIONS\n", + "V_GS = V_T + (math.sqrt(I_D/k)) #in V\n", + "R_S = 2 #in k ohm\n", + "V_S = (I_D*R_S) - V_DD # in V\n", + "V_G = V_GS+V_S # in V\n", + "I = 0.1*I_D #in mA\n", + "R2 = (V_G+V_DD)/I #in k ohm\n", + "print('The value of R2 is =%.2f k ohm' %R2)\n", + "R1 = (V_DD - V_G)/I #in k ohm\n", + "print('The value of R1 is =%.2f k ohm' %R1)\n", + "V_DS = (V_DD-V_SS) - (I_D*(R_S+R_D)) #in V\n", + "print('The value of V_DS is =%.2f V' %V_DS)\n", + "V_DSsat = V_GS-V_T # in V\n", + "\n", + "#RESULTS\n", + "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", + "if V_DS > V_DSsat :\n", + " print('The MOSFET is in saturation region')\n", + "\n", + " # Note: The value of R1 is in k ohm but in the book it is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R2 is =95.36 k ohm\n", + "The value of R1 is =144.64 k ohm\n", + "The value of V_DS is =6.00 V\n", + "The value of V_DS(sat) is =1.77 V\n", + "The MOSFET is in saturation region\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.13 Page No 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_DD = 6.0 #in V\n", + "V_D = 3.0 #in V\n", + "R_D = 10.0 #in k ohm\n", + "\n", + "#CALCULATIONS\n", + "I_DQ = (V_DD-V_D)/R_D #in mA\n", + "print('The value of I_DQ is =%.2f mA ' %I_DQ)\n", + "V_T = 0.8 #in V\n", + "k = 0.12 #in mA/V^2\n", + "V_GS = math.sqrt(I_DQ/k) + V_T #in V\n", + "V_S = -V_GS #in V\n", + "V_DS = V_D-V_S #in V\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of V_DS is =%.2f V' %V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is =0.30 mA \n", + "The value of V_DS is =5.38 V\n" + ] + } + ], + "prompt_number": 98 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.14 Page No 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_D = 0.3 # in mA\n", + "k = 0.12 #in mA/V^2\n", + "V_T = 1.0 #in V\n", + "\n", + "#CALCULATIONS\n", + "V_GS = V_T + (math.sqrt(I_D/k)) #in V\n", + "V_S = -V_GS #in V\n", + "V_DD = 6.0 #in V\n", + "V_D = 3.0 # in V\n", + "I_DQ = 0.3 #in mA\n", + "R_D = (V_DD-V_D)/I_DQ #in k ohm\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of R_D is =%.2f k ohm' %R_D)\n", + "V_DS = V_D - V_S #in V\n", + "print('The value of V_DS is =%.2f V' %V_DS)\n", + "V_DSsat = V_GS - V_T #in V\n", + "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", + "if V_DS > V_DSsat :\n", + " print('The MOSFET is in saturation region')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D is =10.00 k ohm\n", + "The value of V_DS is =5.58 V\n", + "The value of V_DS(sat) is =1.58 V\n", + "The MOSFET is in saturation region\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.15 Page No 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "k= 0.05 #in mA/V^2\n", + "V_T= 1 #in V\n", + "V_DD= 6 # in V\n", + "R_S= 9.1 #in k\u03a9\n", + "I_D= 0.3631765 # in mA\n", + "\n", + "#CALCULATIONS\n", + "A= R_S**2 # assumed\n", + "B=-(2*V_DD*R_S+1/k) # assumed\n", + "C= V_DD**2 #assumed\n", + "V_GS= V_DD-I_D*R_S #in V\n", + "V_DS= V_GS # in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_D is : =%.2f mA' %I_D)\n", + "print('The value of V_GS is : =%.2f volts' %V_GS)\n", + "print('The value of V_DS is : =%.2f volts' %V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is : =0.36 mA\n", + "The value of V_GS is : =2.70 volts\n", + "The value of V_DS is : =2.70 volts\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.16 Page No 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "k1= 0.01 #in mA/V^2\n", + "k2= 0.05 #in mA/V^2\n", + "V_DD= 5 # in V\n", + "V_T1=1 # in V\n", + "V_T2=1 # in V\n", + "Vi= 5 #in V\n", + "Vo= 0.3485163 # in V\n", + "\n", + "#CALCULATIONS\n", + "A=(k1+k2)\n", + "B=-(2*k1*(V_DD-V_T1)+2*k2*(Vi-V_T2))\n", + "C=k1*(V_DD-V_T1)**2\n", + "V_GS2= Vi # in V\n", + "V_DS2= Vo # in V\n", + "V_GS1= V_DD-Vo # in V\n", + "I_D1= k1*(V_GS1-V_T1)**2 #in mA\n", + "I_D2= I_D1 # in mA\n", + "print('Part (i) For Vi = 5 V')\n", + "print('The output voltage is : =%.2f volts' %Vo)\n", + "print('The value of I_D1 is : =%.2f mA' %I_D1)\n", + "print('The value of I_D2 is : =%.2f mA' %I_D2)\n", + "# Analysis for Vi= 1.5V\n", + "Vi= 1.5 #in V\n", + "Vo= V_DD-V_T1-math.sqrt(k2/k1)*(Vi-V_T2) # in V\n", + "I_D2= k2*(Vi-V_T2)**2 #in mA\n", + "I_D1= I_D2 #in mA\n", + "\n", + "\n", + "#RESULTS\n", + "print('Part (ii) For Vi = 1.5 V')\n", + "print('The output voltage is : =%.2f volts' %Vo)\n", + "print('The value of I_D1 is : =%.2f mA' %I_D1)\n", + "print('The value of I_D2 is : =%.2f mA' %I_D2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) For Vi = 5 V\n", + "The output voltage is : =0.35 volts\n", + "The value of I_D1 is : =0.13 mA\n", + "The value of I_D2 is : =0.13 mA\n", + "Part (ii) For Vi = 1.5 V\n", + "The output voltage is : =2.88 volts\n", + "The value of I_D1 is : =0.01 mA\n", + "The value of I_D2 is : =0.01 mA\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.17 Page No 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "k = 0.12 #in mA/V^2\n", + "V_T = -2.5 #in V\n", + "V_GS = 0\n", + "\n", + "#CALCULATIONS\n", + "I_D = k*((V_GS-V_T)**2) #in mA\n", + "print('The value of I_D is =%.2f mA' %I_D)\n", + "V_DD = 6 #in V\n", + "R_S = 4.7 #in k ohm \n", + "V_DS = V_DD -(I_D*R_S) #in V\n", + "print('The value of V_DS is =%.2f V' %V_DS)\n", + "V_S = 0 # in V \n", + "V_DSsat = V_S - V_T # in V\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", + "if V_DS < V_DSsat :\n", + " print('The device is in the non saturation region')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is =0.75 mA\n", + "The value of V_DS is =2.47 V\n", + "The value of V_DS(sat) is =2.50 V\n", + "The device is in the non saturation region\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.18 Page No 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "k4 = 0.125 #in mA/V^2\n", + "k3 = k4 #in mA/V^2\n", + "k2 = k4 #in mA/V^2\n", + "k1 = 0.25 #in mA/V^2\n", + "V_T1 = 0.8 # in V\n", + "V_T2 = V_T1 # in V\n", + "V_T3 = V_T1 #in V\n", + "V_T4 = V_T1 #in V\n", + "V_SS = -5 #in V\n", + "V_DD = 5 #in V\n", + "R_D = 10 #in k ohm\n", + "\n", + "#CALCULATIONS\n", + "V_GS3 = ((math.sqrt(k4/k3) * (-V_SS - V_T4))+V_T3)/(1+math.sqrt(k4/k3)) #in V\n", + "I_Q = k2*((V_GS3-V_T2)**2) #in mA\n", + "I_D1 = I_Q #in mA\n", + "V_GS1 = V_T1 + (math.sqrt(I_D1/k1)) #in V\n", + "\n", + "#RESULTS\n", + "print('The value of V_GS1 is =%.2f V ' %V_GS1)\n", + "V_DS2 = (-V_SS-V_GS1) #in V\n", + "print('The value of V_DS2 is =%.2f V ' %V_DS2)\n", + "V_DS1 = V_DD - (I_Q*R_D) - (V_SS + V_DS2) #in V\n", + "print('The value of V_DS1 is =%.2f V' %V_DS1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS1 is =2.00 V \n", + "The value of V_DS2 is =3.00 V \n", + "The value of V_DS1 is =3.39 V\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.19 Page No 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "R2 = 20.0 # in k ohm\n", + "R1 = 30.0 #in k ohm\n", + "R_D = 20 # in k ohm\n", + "\n", + "#CALCULATIONS\n", + "R_D=R_D*10**3 #in ohm\n", + "V_DD = 5 #in V\n", + "V_G = (R2/(R1+R2))*V_DD #in V\n", + "V_S = 0 #in V\n", + "V_GS = V_G #in V\n", + "k = 100*10**-6 #in A/V^2\n", + "V_T = 1 #in V\n", + "I_DQ = k*((V_GS-V_T)**2) #in A\n", + "\n", + "\n", + "#RESULTS\n", + "V_DSQ = V_DD - (I_DQ*R_D) #in V \n", + "print('The value of V_DSQ is =%.f V ' %V_DSQ)\n", + "I_DQ=I_DQ*10**6\n", + "print('The value of I_DQ is =%.f \u00b5A' %I_DQ)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_DSQ is =3 V \n", + "The value of I_DQ is =100 \u00b5A\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.20 Page No 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_P= -8 # in V\n", + "R_S= 2.4 #in k\u03a9\n", + "I_DSS= 8 #in mA\n", + "V_DD= 20 #in V\n", + "R_D= 6.2 #in k\u03a9\n", + "I_D= 1.7668305 #in mA\n", + "\n", + "#CALCULATIONS\n", + "A= R_S**2\n", + "B=(2*R_S*(V_P)-V_P**2/I_DSS)\n", + "C=(V_P)**2\n", + "I_DQ= I_D #in mA\n", + "V_GSQ= -I_D*R_S;\n", + "V_D= V_DD-I_D*R_D #in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_DQ is : =%.2f mA' %I_DQ)\n", + "print('The value of V_GSQ : =%.2f volts' %V_GSQ)\n", + "print('The value of V_D is : =%.2f volts' %V_D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is : =1.77 mA\n", + "The value of V_GSQ : =-4.24 volts\n", + "The value of V_D is : =9.05 volts\n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.21 Page No 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "k= 75*10**-3 #in mA/V^2\n", + "Vth= -0.8 #in V\n", + "R2 = 100 #in k ohm\n", + "R1 = 100 #in k ohm\n", + "R_S= 6 # in k\u03a9\n", + "R_D= 3 # in k\u03a9\n", + "V_SS = 10 # in V\n", + "V_S = 2.0602803\n", + "\n", + "#CALCULATIONS\n", + "V_G = (R2/(R1+R2))*V_SS #in V\n", + "V_GS= V_G-V_S #in V\n", + "I_D= k*(V_GS-Vth)**2 # in V\n", + "V_DS= -V_SS+I_D*(R_D+R_S) # in V\n", + "V_D= I_D*R_D #in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_D is : =%.2f mA ' %I_D)\n", + "print('The value of V_DS is =%.2f volts ' %V_DS)\n", + "print('The value of V_D is : =%.2f volts' %V_D)\n", + "print('The value of V_S is : =%.2f volts' %V_S)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is : =0.12 mA \n", + "The value of V_DS is =-8.93 volts \n", + "The value of V_D is : =0.36 volts\n", + "The value of V_S is : =2.06 volts\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.22 Page No 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_T = 1.0 # in V\n", + "k = 160*10**-6 # in A/V^2\n", + "I_DQ = 160*10**-6 # in A\n", + "\n", + "#CALCULATIONS\n", + "V_GS = V_T + math.sqrt(I_DQ/k) #in V\n", + "V_DD = 5 # in V\n", + "V_DSQ = 3 # in V\n", + "R_D = (V_DD - V_DSQ)/(I_DQ) # in ohm\n", + "R_D = R_D * 10**-3 # in k ohm\n", + "\n", + "#RESULTS\n", + "print('The value of R_D is =%.2f k ohm' %R_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D is =12.50 k ohm\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.23 Page No 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_DD= 12 # in V\n", + "V_T= 2 # in V\n", + "kn= 0.5 # in mA/V^2\n", + "R1 = 2.2 # in M ohm\n", + "R2 = 1.8 # in M ohm\n", + "R_S= 1.5 # in k\u03a9\n", + "R_D= 3.9 # in k\u03a9\n", + "I_D= 1.2237155 # in mA\n", + "\n", + "#CALCULATIONS\n", + "V_G = (R2/(R1+R2))*V_DD # in V\n", + "V_GS= V_G-I_D*R_S # V\n", + "I_D= I_D-kn*(V_GS-V_T)**2 # in mA\n", + "I_DQ= I_D #in mA\n", + "V_DSQ= V_DD-I_D*(R_D+R_S) # in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_DQ is : =%.2f mA ' %I_DQ)\n", + "print('The value of V_DSQ is : =%.2f volts' %V_DSQ)\n", + "V_GS= V_G-I_D*R_S # V\n", + "V_DSsat= V_GS-V_T # in V\n", + "print('The value of V_DS %.2f is greater than the value of ' %V_DSQ)\n", + "print('V_DSsat %.2f So the MOSFET is in saturation region ' %V_DSsat)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is : =-0.00 mA \n", + "The value of V_DSQ is : =12.00 volts\n", + "The value of V_DS 12.00 is greater than the value of \n", + "V_DSsat 3.40 So the MOSFET is in saturation region \n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.24 Page No 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "kn= 0.5 # in mA/V^2\n", + "V_T= 1 # in V\n", + "R2 = 40 # in k ohm\n", + "R1 = 60 # in k ohm\n", + "R_S= 1 # in k ohm\n", + "R_D= 2 # in k ohm\n", + "V_DD = 5 # in V\n", + "V_SS = -5 # in V\n", + "\n", + "#CALCULATIONS\n", + "V_R2 = (R2/(R2+R1))*(V_DD-V_SS) # in V\n", + "V_G = V_R2 - V_DD # in V\n", + "V_S= I_D*R_S+V_SS # in V\n", + "V_GS= V_G-V_S # in V\n", + "I_D= 1.3542487 # in mA\n", + "I_DQ= I_D #in mA\n", + "V_S= I_D*R_S+V_SS # in V\n", + "V_GS= V_G-V_S # in V\n", + "V_DSQ= V_DD-V_SS-I_D*(R_D+R_S) # in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_DQ is :=%.2f mA ' %I_DQ)\n", + "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", + "print('The value of V_DSQ is : =%.2f volts' %V_DSQ)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_DQ is :=1.35 mA \n", + "The value of V_GS is : =-1.35 volts \n", + "The value of V_DSQ is : =5.94 volts\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.25 Page No 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "R_S1 = 100*10**-3 # in k ohm\n", + "R_S2 = 100*10**-3 # k ohm\n", + "R_S = R_S1+R_S2 #in k ohm\n", + "R_D= 1.8 # in k ohm\n", + "I_DSS= 12 # in mA\n", + "Vp= -3.5 # in V\n", + "V_DD= 22 # in V\n", + "rd= 25 # in k ohm\n", + "R_L= 47 # in k ohm\n", + "I_D= 5.573521 # in mA\n", + "\n", + "#CALCULATIONS\n", + "V_GS= -I_D*R_S # in V\n", + "I_D= I_D-I_DSS*(1-V_GS/Vp)**2 # in mA\n", + "print('The value of I_D is : =%.2f mA' %I_D)\n", + "V_GS= -I_D*R_S # in V\n", + "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", + "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", + "print('The value of V_DS is : =%.2f volts ' %V_DS)\n", + "gmo= -2*I_DSS/Vp # in mS\n", + "gm= gmo*(1-V_GS/Vp) # in mS\n", + "miu= gm*rd\n", + "Av= -miu*R_D*R_L/(R_D+R_L)/(rd+R_D*R_L/(R_D+R_L)+(1+miu)*R_S1)\n", + "print('The value of Av is : =%.2f ' %Av)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is : =-0.000000 mA\n", + "The value of V_GS is : =0.00 volts \n", + "The value of V_DS is : =22.00 volts \n", + "The value of Av is : =-6.76 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.26 Page No 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_T = 1 # in V\n", + "k = 0.5 # in mA/V^2\n", + "R2 = 40 # in k ohm\n", + "R1 = 60 # in k ohm\n", + "R_S= 1 # in k ohm\n", + "R_D= 2 # in k ohm\n", + "V_DD = 5 # in V\n", + "V_G = (R2/(R2+R1))*V_DD # in V\n", + "V_GS= V_G-I_D*R_S # in V\n", + "I_D= 0.2679492 # in mA\n", + "V_GS= V_G-I_D*R_S # in V\n", + "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", + "\n", + "#RESULTS\n", + "print('The value of I_D in mA is : =%.2f ' %I_D)\n", + "print('The value of V_GS in volts is :=%.2f ' %V_GS)\n", + "print('The value of V_DS in volts is : =%.2f ' %V_DS)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D in mA is : =0.27 \n", + "The value of V_GS in volts is :=-0.27 \n", + "The value of V_DS in volts is : =4.20 \n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.27 Page No 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "R_D = 7.5 # in k ohm\n", + "V_T = -0.8 # in V\n", + "k = 0.2 # in mA/V^2\n", + "R2 = 50 # in ohm\n", + "R1 = 50 # in ohm\n", + "V_DD = 5 # in V\n", + "V_S = 5 # in V\n", + "\n", + "#CALCULATIONS\n", + "V_G = (R2/(R2+R1))*V_DD # in V\n", + "V_GS = V_G - V_S # in V\n", + "I_D = k*((V_GS-V_T)**2) # in mA\n", + "\n", + "#RESULTS\n", + "print('Drain current in is =%.2f mA' %I_D)\n", + "V_SD = V_DD - (I_D*R_D) # in V\n", + "print('Source to drain voltage is =%.2f V' %V_SD)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drain current in is =3.53 mA\n", + "Source to drain voltage is =-21.46 V\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.28 Page No 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "I_Don = 5*10**-3 # in A\n", + "V_GSon = 6 # in V\n", + "V_GSth = 3 # in V\n", + "k = I_Don/(V_GSon-V_GSth)**2 # in A/V^2 \n", + "R2 = 6.8 #in M ohm\n", + "R1 = 10 #in M ohm\n", + "R_S= 750 # in ohm\n", + "R_D= 2.2*10**3 # in ohm\n", + "V_DD = 24 # in V\n", + "R_S = 750 # in ohm\n", + "V_G= R2*V_DD/(R1+R2) # in V\n", + "V_GS= V_G-I_D*R_S # in V\n", + "I_D= I_D-k*(V_GS-V_GSth)**2\n", + "I_D= 0.0049660 # in A\n", + "I_DQ= I_D # in A\n", + "V_GS= V_G-I_D*R_S # in V\n", + "V_GSQ= V_GS # in V\n", + "V_DSQ= V_DD-I_DQ*(R_D+R_S) # in V\n", + "I_D=I_D*10**3\n", + "\n", + "#RESULTS\n", + "print('The value of I_D is : =%.2f mA ' %I_D)\n", + "print('The value of V_GSQ is : =%.2f volts ' %V_GSQ)\n", + "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D is : =4.97 mA \n", + "The value of V_GSQ is : =5.99 volts \n", + "The value of V_DSQ is : =9.35 volts \n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.29 Page No 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "I_Don = 4*10**-3 # in A\n", + "V_GSon = 6 # in V\n", + "V_GSth = 3 # in V\n", + "V_DS= 6 # in V\n", + "I_D= I_Don # in A\n", + "k = I_Don/((V_GSon-V_GSth)**2) # in A/V^2\n", + "V_GS= I_D-k*(V_GS-V_GSth)**2\n", + "V_GS= 6 # in V\n", + "V_DD= 2*V_DS # in V\n", + "R_D= (V_DD-V_GS)/I_D # in ohm\n", + "\n", + "\n", + "#RESULTS\n", + "print('The value of V_GS is : =%.f volts ' %V_GS)\n", + "print('The value of V_DD is : =%.f volts ' %V_DD)\n", + "print('The value of R_D is : =%.f k\u03a9' %R_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS is : =6 volts \n", + "The value of V_DD is : =12 volts \n", + "The value of R_D is : =1500 k\u03a9\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.31 Page No 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_DD = 5 # in V\n", + "V_T= 1 # in V\n", + "k= 1 # in mA/V^2\n", + "R1 = 1 # in M ohm\n", + "R2 = 1 # in M ohm\n", + "R_S= 2 # in k ohm\n", + "R_D= 2 # in k ohm\n", + "I1 = V_DD/(R1+R2) # in A\n", + "print('The value of I1 is : =%.2f \u00b5A' %I1)\n", + "V_A = (R2/(R2+R1))*V_DD # in V\n", + "print('The value of V_A and V_G is : =%.2f volts ' %V_A)\n", + "I_D= 0.4243061\n", + "V_C= I_D*R_S # in V\n", + "V_GS= V_A-V_C # in V\n", + "print('The value of I_D is : =%.2f mA' %I_D)\n", + "V_B= V_DD-I_D*R_D # in V\n", + "V_C= I_D*R_S # in V\n", + "V_DS= V_B-V_C # in V\n", + "\n", + "#RESULTS\n", + "print('The value of V_B is : =%.2f volts ' %V_B)\n", + "print('The value of V_C is : =%.2f volts ' %V_C)\n", + "print('The value of V_DS is : =%.2f volts' %V_DS)\n", + "# Note: In the book, the calculated values are wrong, this is why the answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I1 is : =2.00 \u00b5A\n", + "The value of V_A and V_G is : =0.00 volts \n", + "The value of I_D is : =0.42 mA\n", + "The value of V_B is : =4.15 volts \n", + "The value of V_C is : =0.85 volts \n", + "The value of V_DS is : =3.30 volts\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.32 Page No 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_DSS = 12 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P = -3 # in V\n", + "r_d = 45 # in k ohm\n", + "\n", + "#CALCULATIONS\n", + "r_d= r_d*10**3 # in ohm\n", + "g_m = I_DSS/abs(V_P) # in S\n", + "#Part (i)\n", + "R1 = 91 # in M ohm\n", + "R1=R1*10**6 #in ohm\n", + "R2 = 10 # in M ohm\n", + "R2= R2*10**6 # in ohm\n", + "Ri= R1*R2/(R1+R2) # in ohm\n", + "Ri=Ri*10**6\n", + "\n", + "#RESULTS\n", + "print('The value of Ri is : =%.f Mohm' %(Ri/(10**12)))\n", + "#Part (ii)\n", + "R_S = 1.1 #in k ohm\n", + "R_S = R_S * 10**3 # in ohm\n", + "R_o= (R_S*1/g_m)/(R_S+1/g_m) # in ohm\n", + "print('The value of R_C is : =%.2f ohm' %R_o)\n", + "\n", + "# Part (iii)\n", + "R_desh_o= R_o*r_d/(R_o+r_d) # in ohm\n", + "print('The value of R_desh_o is : =%.2f ohm ' %R_desh_o)\n", + "# Part (iv)\n", + "Av= g_m*(R_S*r_d/(R_S+r_d))/(1+g_m*(R_S*r_d/(R_S+r_d)))\n", + "print('The value of Av is : =%.2f ' %Av)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ri is : =9 Mohm\n", + "The value of R_C is : =203.70 ohm\n", + "The value of R_desh_o is : =202.79 ohm \n", + "The value of Av is : =0.81 \n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.34 Page No 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_S2 = -2 # in V\n", + "V_GS2 = -V_S2 # in V\n", + "\n", + "#CALCULATIONS\n", + "I_DS2 = (V_GS2-1)**2 # in mA\n", + "I = 2 # in mA\n", + "I_DS1 = I-I_DS2 # in mA\n", + "\n", + "#RESULTS\n", + "print('The current flow through M1 MOSFET is =%.f mA' %I_DS1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current flow through M1 MOSFET is =1 mA\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.35 Page No 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_DD= 10 # in V\n", + "I_D= 0.4*10**3 # in A\n", + "W= 100 # in \u00b5m\n", + "L= 10 # in \u00b5m\n", + "uACox= 20 # in A/V**2\n", + "Vt= 2 # in V\n", + "R= 0.015\n", + "V_GS= V_DD-I_D*R # in V\n", + "\n", + "#RESULTS\n", + "print('The value of R is : =%.f k\u03a9 ' %(R*10**3))\n", + "V_D= V_DD-I_D*R # in V\n", + "print('The value of V_D is : =%.f volts ' %V_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R is : =15 k\u03a9 \n", + "The value of V_D is : =4 volts \n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 9.36 Page No 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "V_GSth= 2 # in V\n", + "k= 2*10**-4 # in A/V^2\n", + "V_DD= 12 # in V\n", + "R_D= 5*10**3 # in ohm\n", + "I_D= 0.0014597\n", + "\n", + "#CALCULATIONS\n", + "V_DS= V_DD-I_D*R_D # in V\n", + "\n", + "#RESULTS\n", + "print('The value of V_DS is : =%.1f volts ' %V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_DS is : =4.7 volts \n" + ] + } + ], + "prompt_number": 119 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/README.txt b/Advance_Semiconductor_Devices_by_S._Sharma/README.txt new file mode 100755 index 00000000..eec99ae9 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/README.txt @@ -0,0 +1,10 @@ +Contributed By: Santosh Pawar +Course: mca +College/Institute/Organization: ASM institute of computer studies +Department/Designation: MCA +Book Title: Advance Semiconductor Devices +Author: S. Sharma +Publisher: S. K. Kataria & Sons, New Delhi +Year of publication: 2012 +Isbn: 9789350142158 +Edition: 1 \ No newline at end of file diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter1.png new file mode 100755 index 00000000..510483a4 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter1.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter3.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter3.png new file mode 100755 index 00000000..2409666c Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter3.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter7.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter7.png new file mode 100755 index 00000000..1f5c8c08 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter7.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1.png new file mode 100755 index 00000000..63da4ae4 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_1.png new file mode 100755 index 00000000..61672f6e Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_1.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_2.png new file mode 100755 index 00000000..61672f6e Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_2.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2.png new file mode 100755 index 00000000..882e620f Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_1.png new file mode 100755 index 00000000..61ce28c6 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_1.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_2.png new file mode 100755 index 00000000..61ce28c6 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_2.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3.png new file mode 100755 index 00000000..c132e867 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_1.png new file mode 100755 index 00000000..93ff3b44 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_1.png differ diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_2.png new file mode 100755 index 00000000..93ff3b44 Binary files /dev/null and b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_2.png differ diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter01.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter01.ipynb deleted file mode 100755 index 7760d8e3..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter01.ipynb +++ /dev/null @@ -1,499 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0f8515032ad257111ffef42eb71b2510ec7d92768034e754ca14b473e010b968" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1. Basic Elasticity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.1, Pg. No.13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# variable declaration\n", - "p = 1.5; #pressure inside vessel (N/mm^2)\n", - "d = 2*10**3; #diameter of vessel (mm)\n", - "t = 20; #thickness of plate (mm)\n", - "theta = 60; #plane's inclination to axis of vessel (degree)\n", - "load = 2500*10**3; #axial tensile load (N)\n", - "\n", - "# Longitudinal stress\n", - "sigma_x=p*d/4/t;\n", - "print \"\\nLongitudinal stress due to internal pressure = %5.2f N/mm^2\" %(sigma_x)\n", - "\n", - "#circumferential stress\n", - "sigma_y=p*d/2/t;\n", - "print \"\\nCircumferential stress due to internal pressure = %5.2f N/mm^2\" %(sigma_y)\n", - "\n", - "#axial load\n", - "sigma_x_axial=load/(math.pi*d*t);\n", - "print \"\\ndirect stress due to axial load = %5.2f N/mm^2\"%(sigma_x_axial)\n", - "\n", - "sigma_x=sigma_x+sigma_x_axial; #total longitudinal stress\n", - "\n", - "#direct stress and shear stress on inclined plane AB\n", - "#reference Fig 1.9 pg no14, equation 1.8,1.9 pg no 13\n", - "\n", - "sigma_n=sigma_x*math.pow(math.cos(math.radians(90-theta)),2)+sigma_y*math.pow(math.sin(math.radians(90-theta)),2)\n", - "print \"\\ndirect stress on inclined plane AB = %5.2f N/mm^2\"%(sigma_n)\n", - "\n", - "tau=(sigma_x-sigma_y)/2*math.sin(math.radians(2*(90-theta)))\n", - "print \"\\nshear stress on plane AB = %5.2f N/mm^2\"%(tau)\n", - "\n", - "#maximumm shear stress (theta=45 degree)\n", - "theta=45\n", - "tau=(sigma_x-sigma_y)/2*math.sin(math.radians(2*(90-theta)))\n", - "print \"\\nmaximum shear stress on plane AB = %5.2f N/mm^2\"%(tau)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Longitudinal stress due to internal pressure = 37.50 N/mm^2\n", - "\n", - "Circumferential stress due to internal pressure = 75.00 N/mm^2\n", - "\n", - "direct stress due to axial load = 19.89 N/mm^2\n", - "\n", - "direct stress on inclined plane AB = 61.80 N/mm^2\n", - "\n", - "shear stress on plane AB = -7.62 N/mm^2\n", - "\n", - "maximum shear stress on plane AB = -8.80 N/mm^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2, Pg. No.14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#variable declaration\n", - "load=50*10**3 #axial load (N)\n", - "d=60 #diameter (mm)\n", - "t=1.5 #offset distance from center (mm)\n", - "T=1200*10**3 #torque applied on a point (N.mm)\n", - "theta=60 #angle made by plane wrt axis of cylinder(degree)\n", - "\n", - "#compressive stress due to axial load\n", - "area=math.pi*math.pow(d/2,2) #cross section area\n", - "sigma_x_a=load/area\n", - "print \"\\ncompressive stress due to axial load = %5.1f N/mm^2\"%sigma_x_a\n", - "\n", - "#compressive stress due to bending moment\n", - "#area moment of inertia\n", - "M=load*t\n", - "I=math.pi*d**4/64\n", - "\n", - "sigma_x_b=M*d/2*(1/I)\n", - "print \"\\ncompressive stress due to bending moment = %5.1f N/mm^2\" %sigma_x_b\n", - "\n", - "#total compressive stress\n", - "sigma_x=sigma_x_a+sigma_x_b\n", - "\n", - "#shear stress due to torque Ref example 3.1 equation (iv) pg no 73\n", - "# tau=Tr/J\n", - "J=math.pi*d**4/32 #torsion constant\n", - "tau_xy=T*d/2/J\n", - "print \"\\nshear stress due to torque = %5.1f N/mm^2\" %tau_xy\n", - "\n", - "#direct and shear on inclined plane, ref eq 1.8,1.9\n", - "sigma_y=0\n", - "sigma_n=-sigma_x*math.pow(math.cos(math.radians(90-theta)),2)-tau_xy*math.sin(math.radians(2*(90-theta)))\n", - "print \"\\ndirect stress on inclined plane = %3.1f N/mm^2\"%sigma_n\n", - "\n", - "tau=-sigma_x/2*math.sin(math.radians(2*(90-theta)))+tau_xy*math.cos(math.radians(2*(90-theta)))\n", - "print \"\\nshear stress on inclined plane = %3.1f N/mm^2\"%tau\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "compressive stress due to axial load = 17.7 N/mm^2\n", - "\n", - "compressive stress due to bending moment = 3.5 N/mm^2\n", - "\n", - "shear stress due to torque = 28.3 N/mm^2\n", - "\n", - "direct stress on inclined plane = -40.4 N/mm^2\n", - "\n", - "shear stress on inclined plane = 5.0 N/mm^2\n" - ] - } - ], - "prompt_number": 95 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3, Pg. No.20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#import numpy\n", - "import math\n", - "#import matplotlib\n", - "%pylab inline\n", - "#from pylab import * #change comment to above line to see undocked graph, all values will be visible as mouse-pointer moves\n", - "#variable declaration\n", - "sigma_x=160 #stress in x direction (N/mm^2)\n", - "sigma_y=-120 #stress in y direction (N/mm^2)\n", - "sigma=200 #stress on inclined plane (N/mm^2)\n", - "\n", - "tau_xy=((sigma-sigma_x)*(sigma-sigma_y))**0.5\n", - "print \"\\nallowable shear stress, tau_xy = %4.1f N/mm^2 \"%tau_xy\n", - "\n", - "coeff=[1,-(sigma_x+sigma_y),sigma_x*sigma_y-tau_xy**2]\n", - "sigma=numpy.roots(coeff)\n", - "print \"\\nprincipal stresses, sigma_I = %3.0f N/mm^2 sigma_II = %3.0f N/mm^2\"%(sigma[0],sigma[1])\n", - "\n", - "tau_max=(abs(sigma[0])+abs(sigma[1]))/2\n", - "print \"\\nmaximum shear stress, tau_max = %3.0f N/mm^2\"%tau_max\n", - "\n", - "#plotting Mohr circle\n", - "x_cent=(sigma_x+sigma_y)/2\n", - "y_cent=0\n", - "\n", - "X1=(sigma_x,tau_xy)\n", - "X2=(sigma_y,-tau_xy)\n", - "\n", - "radius=(math.hypot(X2[0]-X1[0], X2[1] - X1[1]))/2\n", - "\n", - "cir=linspace(0,2*pi,100)\n", - "plot(radius*cos(cir)+x_cent,radius*sin(cir)+y_cent,'r')\n", - "plot(sigma_x,tau_xy,'ro',sigma_y,-tau_xy,'ro',x_cent,y_cent,'b+',sigma[0],0,'bo',sigma[1],0,'bo',20,tau_max,'go')\n", - "text(sigma_x+10,tau_xy,'Q1')\n", - "text(sigma_y+10,-tau_xy,'Q2')\n", - "text(20,tau_max+10,r'$\\tau_{max}$')\n", - "text(-150,0,r'$\\sigma_2$')\n", - "text(200,10,r'$\\sigma_1$')\n", - "text(-20,+10,'O')\n", - "text(30,-20,'C')\n", - "#plot([sigma_y,tau_xy],[sigma_x,-tau_xy],'r-')\n", - "xlabel(r'$\\sigma$')\n", - "ylabel(r'$\\tau$')\n", - "title('Mohr Cirle')\n", - "axis('equal')\n", - "grid(True)\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "\n", - "allowable shear stress, tau_xy = 113.1 N/mm^2 \n", - "\n", - "principal stresses, sigma_I = 200 N/mm^2 sigma_II = -160 N/mm^2\n", - "\n", - "maximum shear stress, tau_max = 180 N/mm^2\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEZCAYAAAC99aPhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVNX6+PEPKF7y7jFBQUK5hBQCqZgWRqkgmmZalpxU\nUrtYv9TqeEnrpH1TtJupHeucUlE7qXVK0VRCM7yUoqmkqSkSKCLiJVLIC7f9+2PpKAoKzAx7Zs/z\nfr3mpXvPMPM8bGae2WvttZaTpmkaQgghRBU56x2AEEII+yaFRAghhFmkkAghhDCLFBIhhBBmkUIi\nhBDCLFJIhBBCmEUKiRBVFBcXR1hYmFVfIzY2lmeeeabc+zMyMnB2dqakpMSqcQhxM1JIhEPy8vKi\ndu3anDlzptT+kJAQnJ2dOXr0aLXF8sUXX9ChQwcaNGhAy5Yt6dWrFz/++CMAr732Gp9++mm1xSJE\nVUghEQ7JycmJNm3asGTJEtO+vXv3cuHCBZycnCz+epqmUdbY3w8++ICXX36Z119/nZMnT5KZmcmL\nL77IypUrb/mcRUVFFo9TiKqQQiIc1lNPPcWiRYtM2wsXLmTIkCGlPvDPnj3LkCFDaN68OV5eXkyd\nOvWGgjB27FiaNm1KmzZtSEhIMO0PDw/n9ddf57777qNevXqkp6eX+rmzZ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KFRAghhFmkkAhhZd9++y19+vTBzc2NBx98kI8//ljvkISwKJue\n/VcIe3f06FFWrVrFqlWrWLFiBZqm8eijj+odlhAWJWckQljRokWLTOvLnzlzhkaNGukckRCWJ4VE\nCCvKzc3F09MTgK1btxIWFqZzREJYnsz+K4QVHThwgB9//BFN07j33nsJDAzUOyQhLE4KiRBCCLNI\n05YQQgizSCERQghhFikkQgghzCKFRAghhFmkkAghhDCLFBIhhBBmkUIihBDCLFJIhBBCmOX/A2IJ\nxZVZr61+AAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 141 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4, Pg. No.33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#variable declaration\n", - "sigma_x=83 # stress in x direction (N/mm^2)\n", - "sigma_y=65 # stress in y direction (N/mm^2)\n", - "E=200000 # Young's Modulus (N/mm^2)\n", - "v=0.3 # poisson's ratio\n", - "\n", - "# strains in x,y and z directions\n", - "epsln_x=1.0/E*(sigma_x-v*sigma_y)\n", - "epsln_y=1.0/E*(sigma_y-v*sigma_x)\n", - "epsln_z=-v/E*(sigma_x+sigma_y)\n", - "print \"\\nstrain in x direction, epsln_x = %5.3e\"%epsln_x\n", - "print \"\\nstrain in y direction, epsln_y = %5.3e\"%epsln_y\n", - "print \"\\nstrain in z direction, epsln_z = %5.3e\"%epsln_z\n", - "\n", - "tau_max=(sigma_x-sigma_y)/2\n", - "print \"\\nmaximum shear stress, tau_max = %2.2f N/mm^2\"%tau_max\n", - "\n", - "gama_max=2*(1+v)*tau_max/E\n", - "print \"\\nmaximum shear strain, y_max = %2.2e \" %gama_max" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "strain in x direction, epsln_x = 3.175e-04\n", - "\n", - "strain in y direction, epsln_y = 2.005e-04\n", - "\n", - "strain in z direction, epsln_z = -2.220e-04\n", - "\n", - "maximum shear stress, tau_max = 9.00 N/mm^2\n", - "\n", - "maximum shear strain, y_max = 1.17e-04 \n" - ] - } - ], - "prompt_number": 111 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5, Pg. No.33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#import matplotlib.pyplot as plt\n", - "%pylab inline\n", - "#variable declaration\n", - "sigma_x=60 #stress in x direction (N/mm^2)\n", - "sigma_y=-40 #stress in y direction (N/mm^2)\n", - "tau_xy=50 #shear stress (N/mm^2)\n", - "E=2*10**5 #Young's Modulus (N/mm^2)\n", - "v=0.3 #poisson's ratio\n", - "\n", - "#strains in x and y direction\n", - "epsln_x=1.0/E*(sigma_x-v*sigma_y)\n", - "epsln_y=1.0/E*(sigma_y-v*sigma_x)\n", - "print \"\\nstrains in x and y directions, epsi_x =%4.1e epsi_y =%4.1e \"%(epsln_x,epsln_y) \n", - "\n", - "G=E/2/(1+v)\n", - "print \"\\nshear modulus, G = %6.1f\"%G\n", - "\n", - "gama_xy=tau_xy/G\n", - "print \"\\nshear strain, gama_xy = %4.1e\"%gama_xy\n", - "\n", - "#principal strains\n", - "epsln_I=(epsln_x+epsln_y)/2+1.0/2*((epsln_x-epsln_y)**2+gama_xy**2)**0.5\n", - "epsln_II=(epsln_x+epsln_y)/2-1.0/2*((epsln_x-epsln_y)**2+gama_xy**2)**0.5\n", - "print \"\\nprincipal strains, epsln_I = %4.2e epsln_II = %4.2e\"%(epsln_I,epsln_II)\n", - "\n", - "#inclination\n", - "theta=1.0/2*math.atan(gama_xy/(epsln_x-epsln_y))\n", - "print \"\\ninclination to the plane on which sigma_x acts, theta = %4.1f or %4.1f\"%(theta*180/math.pi,theta*180/math.pi+90)\n", - "\n", - "#plotting Mohr circle\n", - "x_cent=(epsln_x+epsln_y)/2\n", - "y_cent=0\n", - "\n", - "X1=(epsln_x,gama_xy/2)\n", - "X2=(epsln_y,-gama_xy/2)\n", - "\n", - "radius=(math.hypot(X2[0]-X1[0], X2[1] - X1[1]))/2\n", - "print radius\n", - "cir=linspace(0,2*pi,100)\n", - "plot(radius*cos(cir)+x_cent,radius*sin(cir),'r')\n", - "plot(epsln_x,gama_xy/2,'ro',epsln_y,-gama_xy/2,'ro',x_cent,y_cent,'b+',epsln_II,0,'go',epsln_I,0,'go')\n", - "text(epsln_x,gama_xy/2,'Q1')\n", - "text(epsln_y,-gama_xy/2,'Q2')\n", - "text(-0.00050,0,r'$\\epsilon_2$')\n", - "text(.00050,0,r'$\\epsilon_1$')\n", - "text(-.000060,0.00002,'O')\n", - "text(0,0,'C')\n", - "xlabel(r'$\\epsilon$')\n", - "ylabel(r'$\\gamma$')\n", - "title('Mohr Cirle')\n", - "axis('equal')\n", - "grid(True)\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "\n", - "strains in x and y directions, epsi_x =3.6e-04 epsi_y =-2.9e-04 \n", - "\n", - "shear modulus, G = 76923.1\n", - "\n", - "shear strain, gama_xy = 6.5e-04\n", - "\n", - "principal strains, epsln_I = 4.95e-04 epsln_II = -4.25e-04\n", - "\n", - "inclination to the plane on which sigma_x acts, theta = 22.5 or 112.5\n", - "0.000459619407771\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEZCAYAAACuIuMVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVWX+wPEPKBoqjZkJKSpy2dwAl2TMVJKQ1BkzW1x+\nGViTNWpmmWllr2xKgZaxsmlsM5dpzGlKIBfCSdGpREotU3BcAmU3BVTSZHt+fxy9iVz2e++5y/f9\net2XncM5937PNzjfe57nOc9xUUophBBCCAtx1TsAIYQQjk0KjRBCCIuSQiOEEMKipNAIIYSwKCk0\nQgghLEoKjRBCCIuSQi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dOnaKqqgqAn376iSNHjuDr62utw7VNeo5EELbD2jfQlpWVqUGDBqng\n4GDVt29fNXfuXONoNEdmKn8rVqxQK1asMG4za9YsZTAYVHBwcI1Reea8ednZWDPvn376qerbt68K\nDQ1VAwcOVBs3brTSUdouuWFTCCGERUnTmRBCCIuSQiOEEMKipNAIIYSwKCk0QgghLEoKjRBCCIuS\nQiOEEMKipNAIIYSwKCk0QgghLEoKjRBCCIuSSTWFsBMbNmwgMzOT0NBQxo4dq3c4QjSaTEEjhB04\nfPgwjzzyCNu2bdM7FCGaTJrOhLADycnJ3HjjjaxevZrjx4/rHY4QTSJNZ0LYgY4dOzJp0qRa09sL\nYQ+k6UwIO3Dx4kXeeOMNAgMD6dWrF8HBwXqHJESjSaERQghhUdJHI4QQwqKk0AghhLAoKTRCCCEs\nSgqNEEIIi5JCI4QQwqKk0AghhLAoKTRCCCEsSgqNEEIIi/p/6nl+EewyCdMAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 185 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7, Pg. No.40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#variable declaration\n", - "epsln_a=1000*10**(-6) #readings of strain gauges \n", - "epsln_b=-200*10**(-6) #straing gauges 'a' and 'c' are\n", - "epsln_c=-300*10**(-6) #in line and perpendicular to axis of bar\n", - "d=50 #diameter of bar (mm)\n", - "E=70000 #Young's modulus (N/mm^2)\n", - "v=0.3 #poisson's ratio\n", - "\n", - "#principal strains\n", - "epsln_I=1.0/2*(epsln_a+epsln_c)+(1.0/2**0.5)*((epsln_a-epsln_b)**2+(epsln_c-epsln_b)**2)**0.5\n", - "epsln_II=1.0/2*(epsln_a+epsln_c)-(1.0/2**0.5)*((epsln_a-epsln_b)**2+(epsln_c-epsln_b)**2)**0.5\n", - "print \"\\nfirst principal strain, epsln_I = %4.3e\"%epsln_I\n", - "print \"\\nsecond principal strain, epsln_II = %4.3e\"%epsln_II\n", - "\n", - "#principal stresses\n", - "sigma_I=E/(1-v**2)*(epsln_I+v*epsln_II)\n", - "sigma_II=E/(1-v**2)*(v*epsln_I+epsln_II)\n", - "print \"\\nfirst principal stress, sigma_I= %4.1f N/mm^2\"%sigma_I #mistake in book\n", - "print \"\\nsecond principal stress, sigma_II= %4.1f N/mm^2\"%sigma_II\n", - "\n", - "sigma_x=sigma_I+sigma_II\n", - "print \"\\nstress in x direction,sigma_x = %4.1f N/mm^2\"%sigma_x\n", - "\n", - "#axial tensile load calculation\n", - "A=math.pi*d**2/4\n", - "P=sigma_x*A\n", - "print \"\\naxial load, P = %4.1f kN\"%(P/1000)\n", - "\n", - "tau_xy=1.0/2*((sigma_x/2-sigma_II)**2*4-sigma_x**2)**0.5\n", - "print \"\\nshear stress, tau_xy = %4.1f N/mm^2\"%tau_xy\n", - "\n", - "#torque calculation\n", - "J=math.pi*d**4/32\n", - "T=tau_xy*J/d*2\n", - "print \"\\ntorque applied on circular bar, T = %4.1f kNm\"%(T/10**6)\n", - "\n", - "sigma_x=E*epsln_a\n", - "print \"\\naxial stress from classical stress strain relationship, sigma_x =%4.0f N/mm^2\"%sigma_x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "first principal strain, epsln_I = 1.201e-03\n", - "\n", - "second principal strain, epsln_II = -5.015e-04\n", - "\n", - "first principal stress, sigma_I= 80.8 N/mm^2\n", - "\n", - "second principal stress, sigma_II= -10.8 N/mm^2\n", - "\n", - "stress in x direction,sigma_x = 70.0 N/mm^2\n", - "\n", - "axial load, P = 137.4 kN\n", - "\n", - "shear stress, tau_xy = 29.6 N/mm^2\n", - "\n", - "torque applied on circular bar, T = 0.7 kNm\n", - "\n", - "axial stress from classical stress strain relationship, sigma_x = 70 N/mm^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter04.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter04.ipynb deleted file mode 100755 index 365fa5fb..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter04.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6a67de7af4fe617483b9aefeefdb01f122e2016e5ab212db494104a83b9deeda" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6 Pg.No.106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "sum_FAFlBL=1263.6*10**6 # (N.mm)\n", - "sum_FAFlDL=880*10**6 # (N.mm)\n", - "E=200000 # young's modulus (N/mm^2)\n", - "A=1800 # area of each member (mm^2)\n", - "\n", - "#eqn 4.23 We=Wi\n", - "del_B=sum_FAFlBL/A/E\n", - "print \"\\ndeflection at point B =%2.2f mm\\n\"%(del_B)\n", - "\n", - "del_D=sum_FAFlDL/A/E\n", - "print \"deflection at point D =%2.2f mm\\n\"%(del_D)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "deflection at point B =3.51 mm\n", - "\n", - "deflection at point D =2.44 mm\n", - "\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "ext_load=30 #external load(kN)\n", - "\n", - "#eqn 30*4*del_vB/3=F_BA*del_vB\n", - "F_BA=ext_load*4/3\n", - "print \"\\nforce in the struss AB is = %3.2f kN\\n\"%(F_BA)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "force in the struss AB is = 40.00 kN\n", - "\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter05.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter05.ipynb deleted file mode 100755 index 80ef0fbb..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter05.ipynb +++ /dev/null @@ -1,188 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:63d249c5c7d8f61cc0f4f00c6cd8c5c2324721f135176069c7c632118f5681cc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 05: Energy methods" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1 Pg.No.116" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "A=1800 # cross sectional area (mm^2)\n", - "E=200000 #youngs modulus (N/mm^2)\n", - "sum_FLdFdP_B=1268*10**6 #(N.mm^2)\n", - "sum_FLdFdP_D=880*10**6 #(N.mm^2)\n", - "\n", - "del_Bv=sum_FLdFdP_B/A/E\n", - "del_Dh=sum_FLdFdP_D/A/E\n", - "\n", - "print \"\\ndeflection at point B =%2.2f mm\\n\"%(del_Bv)\n", - "print \"deflection at point D =%2.2f mm\\n\"%(del_Dh)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "deflection at point B =3.52 mm\n", - "\n", - "deflection at point D =2.44 mm\n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9 Pg.No.142" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "\n", - "a=np.array([[4.32,2.7],[2.7,11.62]])\n", - "b=np.array([27.1,48.11])\n", - "x=np.linalg.solve(a,b)\n", - "print \"\\nX1 = %1.2f kN & R2 = %1.2f kN\\n\"%(x[0],x[1]) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "X1 = 4.31 kN & R2 = 3.14 kN\n", - "\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10 Pg.No.144" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "E=200000 #youngs modulus (N/mm^2)\n", - "A=200 #cross sectional area of each member (mm^2)\n", - "a=7*10**-6 #linear coefficient of heating (/C)\n", - "L=3*10**3 #length of BC (mm)\n", - "T=30 #temperature of truss (C)\n", - "sum_f2L=48000\n", - "\n", - "expansion=L*T*a\n", - "a11=sum_f2L/A/E\n", - "X1=-0.63/a11 #compatibility condition\n", - "print \"\\nX1 = %5.0f N\\n\"%(X1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "X1 = -525 N\n", - "\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12 Pg.No.151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "def_C=-1.05-.6 #deflection at C (mm)\n", - "L=300 #length of cantilever (mm)\n", - "\n", - "theta_B=math.atan(def_C/L)\n", - "print \"\\ndeflection at C = %2.3f degree\\n\"%(theta_B*180/math.pi) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "deflection at C = -0.315 degree\n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter06.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter06.ipynb deleted file mode 100755 index 5195a30b..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter06.ipynb +++ /dev/null @@ -1,112 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:902d8cc266f9fb597a0d00273b10ab788d226cbd969bb1e960b465c84a750eef" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 06: Matrix methods" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4 Pg.No.205" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "from sympy import solve, symbols, pprint\n", - "from sympy import diff\n", - "x,y=symbols('x,y')\n", - "\n", - "E=200000 #youngs modulus (N/mm^2)\n", - "nu=0.3 #poissons ratio\n", - "u1=0.001\n", - "u2=0.003\n", - "u3=-0.003 #displacements of corners (m)\n", - "u4=0\n", - "v1=-0.004\n", - "v2=-0.002\n", - "v3=0.001\n", - "v4=0.001\n", - "\n", - "\n", - "a=np.array([[1,-2,-1,2],[1,2,-1,-2],[1,2,1,2],[1,-2,1,-2]])\n", - "b=np.array([u1,u2,u3,u4])\n", - "alpha=np.linalg.solve(a,b)\n", - "alpha1=alpha[0]\n", - "alpha2=alpha[1]\n", - "alpha3=alpha[2]\n", - "alpha4=alpha[3]\n", - "\n", - "a=np.array([[1,-2,-1,2],[1,2,-1,-2],[1,2,1,2],[1,-2,1,-2]])\n", - "b=np.array([v1,v2,v3,v4])\n", - "alpha=np.linalg.solve(a,b)\n", - "alpha5=alpha[0]\n", - "alpha6=alpha[1]\n", - "alpha7=alpha[2]\n", - "alpha8=alpha[3]\n", - "\n", - "u=alpha1+alpha2*x+alpha3*y+alpha4*x*y\n", - "v=alpha5+alpha6*x+alpha7*y+alpha8*x*y\n", - "\n", - "ex=diff(u,x)\n", - "ey=diff(v,y)\n", - "Yxy=diff(u,y)+diff(v,x)\n", - "\n", - "ex=-0.000125\n", - "ey=.002\n", - "Yxy=-0.0015\n", - "\n", - "sigma_x=E/(1-nu**2)*(ex+nu*ey)\n", - "sigma_y=E/(1-nu**2)*(ey+nu*ex)\n", - "print \"longitudinal stress in x direction = %3.1f N/mm^2\"%(sigma_x)\n", - "print \"longitudinal stress in y direction = %3.1f N/mm^2\"%(sigma_y)\n", - "\n", - "T_xy=E/2/(1+nu)*Yxy\n", - "print \"shear stress at the center of plate = %3.1f N/mm^2\"%(T_xy)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "longitudinal stress in x direction = 104.4 N/mm^2\n", - "longitudinal stress in y direction = 431.3 N/mm^2\n", - "shear stress at the center of plate = -115.4 N/mm^2\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter08.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter08.ipynb deleted file mode 100755 index 65ccbf76..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter08.ipynb +++ /dev/null @@ -1,154 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d4ab160ecba8745ef027bb167a7abbd97977707c483b1d0a639c7f068e2016a8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 08: Columns" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3 Pg.No.280" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "E=75000 #youngs modulus(N/mm^2)\n", - "G=21000 #shear modulus (N/mm^2)\n", - "L=2 #length of column (m)\n", - "l1=75 #flange length (mm)\n", - "l2=37.5 #total length(mm)\n", - "t=2.5 #thickness(mm)\n", - "\n", - "A=t*(2*l2+l1) #observed from Fig 8.17\n", - "\n", - "#chapter 16 Ixx=bd^3/12+Ab^2\n", - "Ixx=2*l2*t*l2**2+t*l1**3/12\n", - "Iyy=2*t*l2**3/12\n", - "\n", - "I0=Ixx+Iyy\n", - "\n", - "#eqn 18.11 J=SUM((s*t^3)/3)\n", - "J=2*l2*t**3/3+l1*t**3/3\n", - "\n", - "Gama=t*l2**3*l1**2/24\n", - "Iyy=0.22*10**5\n", - "L=2*10**3\n", - "P_CRxx=math.pi**2*E*Ixx/L**2\n", - "P_CRyy=math.pi**2*E*Iyy/L**2\n", - "P_CRo=A/I0*(G*J+math.pi**2*E*Gama/L**2)\n", - "\n", - "print \"P_CRxx = %3.2e N\\n\"%(P_CRxx)\n", - "print \"P_CRyy = %0.1e N\\n\"%(P_CRyy)\n", - "print \"P_CRO = %0.2e N\\n\"%(P_CRo)\n", - "\n", - "print \"therefore buckling in the column due to axial load=%0.1e N\\n\"%(P_CRyy)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "P_CRxx = 6.51e+04 N\n", - "\n", - "P_CRyy = 4.1e+03 N\n", - "\n", - "P_CRO = 2.22e+04 N\n", - "\n", - "therefore buckling in the column due to axial load=4.1e+03 N\n", - "\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4 Pg.No.282" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "from sympy import solve, symbols, pprint\n", - "from sympy import diff\n", - "P=symbols('P')\n", - "\n", - "E=70000 #youngs modulus (N/mm^2)\n", - "G=30000 #shear modulus (N/mm^2)\n", - "x_S=-76.2 #position of shear center(mm)\n", - "l1=l2=100 #lengths (mm)\n", - "t=2 #thickness(mm)\n", - "\n", - "x_bar=2*t*l1*50/(3*l1)/2\n", - "\n", - "A=600 #area (mm^2)\n", - "Ixx=1.17*10**6 #second moment of area (mm^4)\n", - "Iyy=0.67*10**6 #second moment of area (mm^4)\n", - "I0=5.32*10**6 # total second moment of area (mm^4)\n", - "J=800 #torsion constant (mm^4)\n", - "Gama=2488*10**6 #(mm^6)\n", - "L=10**3 #(mm)\n", - "\n", - "P_CRxx=math.pi**2*E*Ixx/L**2\n", - "P_CRyy=math.pi**2*E*Iyy/L**2\n", - "P_CRo=A/I0*(G*J+math.pi**2*E*Gama/L**2)\n", - "\n", - "fun=P**2*(1-A*x_S**2/I0)-P*(P_CRxx+P_CRo)+P_CRxx*P_CRo\n", - "solution = solve(fun, P)\n", - "print \"lowest value of critical load = %1.2e N\\n\"%(min(solution))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lowest value of critical load = 1.68e+05 N\n", - "\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter09.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter09.ipynb deleted file mode 100755 index 119bd5b2..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter09.ipynb +++ /dev/null @@ -1,97 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:47a0669d4632eab71f162a005cd6d69531f951e47ad9f34d928b679209ff2467" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 09: Thin plates" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1 Pg.No.310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "h=400 #height of structure (mm)\n", - "l1=300 #length of small section (mm)\n", - "L=1200 #length of whole structure (mm)\n", - "E=70000 #youngs modulus (N/mm^2)\n", - "A_f=350 #area of flange (mm^2)\n", - "A_s=300 # area of stiffeners (mm^2)\n", - "t=2 #thickness (mm)\n", - "I=2000 #second moment of area (mm^4)\n", - "w=5\n", - "#eqn 9.29 tan(a)^4=(1+td/2A_F)/(1+td/2A_S)\n", - "alpha=math.atan(((1+t*h/2/A_f)/(1+t*l1/A_s))**0.25)\n", - "\n", - "#eqn 9.19\n", - "F_T=w*L/h+w/2/math.tan((alpha))\n", - "\n", - "#eqn 9.25 M_max=w*b^2*tan(a)/12/d\n", - "M_max=w*10**3*l1**2*math.tan(alpha)/12/h\n", - "print \"maximum value of bending moment = %1.1e N.mm \\n\"%(M_max)\n", - "\n", - "#eqn 9.23 P=w*b*tan(a)/d\n", - "P=w*l1*math.tan(alpha)/h\n", - "print \"compressive load in stiffener = %1.1f kN \\n\"%(P)\n", - "\n", - "#eqn 9.24 le=d/(4-2b/d)^0.5\n", - "le=h/(4-2*l1/h)**0.5\n", - "print \"equivalent length of stiffener = %3.1f mm\\n\"%(le)\n", - "\n", - "#eqn 8.7 Pcr=pi^2*E*I/le^2\n", - "P_CR=math.pi**2*E*I/le**2\n", - "print \"buckling load of a stiffener = %2.1f kN \\n\"%(P_CR) #approx. value in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum value of bending moment = 8.6e+04 N.mm \n", - "\n", - "compressive load in stiffener = 3.4 kN \n", - "\n", - "equivalent length of stiffener = 253.0 mm\n", - "\n", - "buckling load of a stiffener = 21589.8 kN \n", - "\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter12.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter12.ipynb deleted file mode 100755 index 63daef6d..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter12.ipynb +++ /dev/null @@ -1,111 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:217c546250d736c4a5ad9b469b73a9b7209b5ff1e5db79ce32388be8ee290870" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12: Structural components of aircraft" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1 Pg.No. 390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "D=4 #diameter of rivet(mm)\n", - "t_skin=2.5 #thickness of fuselage skin(mm)\n", - "t_strap=1.2 #thickness of straps (mm)\n", - "T=120 #shear stress (N/mm^2)\n", - "A=math.pi*D**2/4 #rivet area\n", - "Pfb=2*A*T\n", - "\n", - "b=Pfb/t_skin/12.5/10+4\n", - "print \"allowable rivet spacing = %2.1f mm \\n\"%(b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "allowable rivet spacing = 13.7 mm \n", - "\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2 Pg.No.392" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "l1=20 #distace between A&D (mm)\n", - "l2=25 #distace between C&D (mm)\n", - "l3=75 #distace between C&force location (mm)\n", - "P=5 #external load(kN)\n", - "r=(l1**2+l2**2)**0.5\n", - "sum_r2=2*l1**2+4*r**2\n", - "\n", - "#eqn 12.6 S=Pe*r/Sum(r2)\n", - "Pe=P*l3\n", - "S=Pe/sum_r2*r\n", - "print \"Resultant shear force in the A and B = %2.2f kN\\n\"%(S)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resultant shear force in the A and B = 2.45 kN\n", - "\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter14.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter14.ipynb deleted file mode 100755 index f9eb3f9d..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter14.ipynb +++ /dev/null @@ -1,226 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b89c31a3eb13c71dc64b90ec9c5fad56707d91451229ae687a102dc5e6c2ee23" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14: Airframe loads" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.1 Pg.No.407" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "W=45 #weight of aircraft (kN)\n", - "m=45/9.8 #mass of aircraft(k-kg)\n", - "a=3*9.8 #deceleration due to cable (ms^-2)\n", - "m1=4.5/9.8 #weight of aircraft after AA in Diagram (k-kg)\n", - "v0=25 #touch down speed (m/s)\n", - "alpha=10 #center line angle with ground (degree)\n", - "\n", - "T=m*a/math.cos(math.radians(alpha))\n", - "print \"tension in cable = %3.1f kN\\n\"%(T)\n", - "\n", - "R=W+T*math.sin(math.radians(alpha))\n", - "print \"load on each undercarriage strut = %2.1f kN\\n\"%(R/2/math.cos(math.radians(20)))\n", - "\n", - "N=T+m1*9.8*math.sin(math.radians(alpha))-m1*a*math.cos(math.radians(alpha))\n", - "S=m1*a*math.sin(math.radians(alpha))+m1*9.8*math.cos(math.radians(alpha))\n", - "print \"N and S forces are shown in Fig 14.4 N=%2.2f kN S=%2.2f kN\\n\"%(N,S)\n", - "\n", - "s=v0**2/2/a\n", - "print \"length of deck covered = %2.2f m\\n\"%(s)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "tension in cable = 137.1 kN\n", - "\n", - "load on each undercarriage strut = 36.6 kN\n", - "\n", - "N and S forces are shown in Fig 14.4 N=124.57 kN S=6.78 kN\n", - "\n", - "length of deck covered = 10.63 m\n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.2 Pg.No.409" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "g=9.8\n", - "W=250 #weight of aircraft(kN)\n", - "m=250/g #mass of aircraft (K-kg)\n", - "I_CG=5.65*10**8 #inertia about center of mass(N.s^2.mm)\n", - "v0=3.7 #vertical velocity of undercarriage(m/s)\n", - "R_h=400 #horizontal reaction (kN)\n", - "R_v=1200 #vertical reaction (kN)\n", - "l=1 # nose wheel distance from ground (m)\n", - "d=2.5 # distance of CG from ground (m)\n", - "\n", - "#horizontal equilibrium\n", - "ax=R_h/m\n", - "\n", - "#vertical equilibrium\n", - "ay=(R_v-W)/m\n", - "\n", - "\n", - "alpha=(R_v*l+R_h*d)*10**6/I_CG\n", - "print \"angular acceleration of aircraft = %2.1f rad/s^2 \\n\"%(alpha)\n", - "\n", - "#v=v0+ay*t\n", - "t=v0/ay\n", - "print \"time taken for vertical velocity to become zero = %1.3f s\\n\"%(t)\n", - "\n", - "#w=w0+a*t\n", - "w=a*t\n", - "print \"angular velocity of aircraft = %1.2f rad/s \\n\"%(w)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "angular acceleration of aircraft = 3.9 rad/s^2 \n", - "\n", - "time taken for vertical velocity to become zero = 0.099 s\n", - "\n", - "angular velocity of aircraft = 0.39 rad/s \n", - "\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.3 Pg.No.414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "W=8000 #weight of aircraft (N)\n", - "n=4.5 # wing loading\n", - "S=14.5 #wing area (m^2)\n", - "V=60 #speed (m/s)\n", - "rho=1.223 #density (kg/m^3)\n", - "alpha=13.75 #from Fig 14.8 (a)\n", - "C_Mcg=0.075 #from Fig 14.8 (a)\n", - "c=1.35 #mean chord (m)\n", - "\n", - "\n", - "L=n*W\n", - "C_L=L/(0.5*rho*V**2*S)\n", - "print \"lift coefficient of aircraft = %1.3f \\n\"%(C_L)\n", - "\n", - "#from Fig 14.8 (b)\n", - "l=4.18*math.cos(math.radians(alpha-2))+0.31*math.sin(math.radians(alpha-2))\n", - "print \"length of tail arm = %1.3f m \\n\"%(l)\n", - "\n", - "\n", - "C_L=C_L-c/l*C_Mcg\n", - "print \"lift coefficient =%1.3f \\n\"%(C_L)\n", - "\n", - "alpha=13.3\n", - "l=4.18*math.cos(math.radians(alpha-2))+0.31*math.sin(math.radians(alpha-2))\n", - "print \"Now tail arm length = %2.3f m\\n\"%(l)\n", - "\n", - "L=0.5*rho*V**2*S*C_L\n", - "print \"Lift = %5.1f N\\n\"%(L)\n", - "\n", - "P=n*W-35000\n", - "print \"Tail Load = %5.1f N\\n\"%(P)\n", - "\n", - "D=0.5*rho*V**2*S*0.0875\n", - "print \"Drag = %5.1f N\\n\"%(D)\n", - "print \"Forward inertia force = %5.1f N\\n\"%(D) #eqn 14.13" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lift coefficient of aircraft = 1.128 \n", - "\n", - "length of tail arm = 4.156 m \n", - "\n", - "lift coefficient =1.103 \n", - "\n", - "Now tail arm length = 4.160 m\n", - "\n", - "Lift = 35222.3 N\n", - "\n", - "Tail Load = 1000.0 N\n", - "\n", - "Drag = 2793.0 N\n", - "\n", - "Forward inertia force = 2793.0 N\n", - "\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter15.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter15.ipynb deleted file mode 100755 index a849c8c6..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter15.ipynb +++ /dev/null @@ -1,76 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1bd6512f5b9ca8155cc1e9c3b04ad8207681499e095afaf4830a217017e989ea" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 15: Fatigue" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 15.1 Pg.No.445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from scipy import integrate\n", - "from sympy import symbols\n", - "import math\n", - "\n", - "#eqn 15.30 K=S(pi*a)^1/2*alpha\n", - "S=175 #stress range (N/mm^2)\n", - "K=1708 #fracture toughness (n/mm^3/2)\n", - "alpha=1 #constant\n", - "n=4 #constant\n", - "C=40*10**-15 #rate of crack growth (mm/cycle)\n", - "ai=0.1 #initial crack length\n", - "\n", - "alpha_f=K**2/S**2/math.pi\n", - "\n", - "\n", - "Nf=2/C/(n-2)/(S*math.pi**0.5)**n*(1/ai**((n-2)/2)-1/alpha_f**((n-2)/2))\n", - "print \"Number of cycles to failure = %5.0f cycles\\n\"%(Nf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of cycles to failure = 26919 cycles\n", - "\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter16.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter16.ipynb deleted file mode 100755 index 72ff7ec3..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter16.ipynb +++ /dev/null @@ -1,280 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c3ab3016805321c8a28748b1937c77b2125357dfc661b20013df0624feaa950e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 16: Bending of open and closed thin-walled beams \n" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.1 Pg. No.456" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Fig 16.6 Dimensions\n", - "from __future__ import division\n", - "import math\n", - "\n", - "#variable declaration\n", - "l=300 #length of I section (mm)\n", - "b=200 #width of I section beam (mm)\n", - "w1=25 #width of center section of I beam (mm)\n", - "w2=20 #width of upper and lower section of I beam (mm)\n", - "M=100*10**6 #moment applied in vertical plane (N*mm)\n", - "\n", - "#second moment of area Ixx\n", - "# Ixx=b*l^3/12\n", - "Ixx=b*l**3/12-(b-w1)*(l-w2-w2)**3/12\n", - "print \"\\nSecond moment of area of I section beam = %5.3e mm^4\"%(Ixx)\n", - "\n", - "#sigma_z=My/I reference 16.9\n", - "# @ \n", - "y=150\n", - "sigma_z=M*y/Ixx\n", - "print \"\\ndirect stress at the top of the I section (y=150) = %3.2f N/mm^2 (compression)\"%(sigma_z)\n", - "\n", - "# @\n", - "y=-150\n", - "sigma_z=M*y/Ixx\n", - "print \"\\ndirect stress at the bottom of the I section (y=-150) = %3.2f N/mm^2 (tension)\"%(sigma_z)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Second moment of area of I section beam = 1.937e+08 mm^4\n", - "\n", - "direct stress at the top of the I section (y=150) = 77.45 N/mm^2 (compression)\n", - "\n", - "direct stress at the bottom of the I section (y=-150) = -77.45 N/mm^2 (tension)\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.2 Pg. No.457" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Fig 16.6 reference\n", - "from __future__ import division\n", - "import math\n", - "\n", - "#variable declaration\n", - "l=300 #length of I section (mm)\n", - "b=200 #width of I section beam (mm)\n", - "w1=25 #width of center section of I beam (mm)\n", - "w2=20 #width of upper and lower section of I beam (mm)\n", - "M=100*10**6 #moment applied in vertical plane (N*mm)\n", - "\n", - "# second moment of area\n", - "# Iyy=wb^3/12\n", - "Iyy=2*20*200**3/12+260*25**3/12\n", - "print \"\\nSecond moment of area of I section beam = %5.3e mm^4\"%(Iyy)\n", - "\n", - "#sigma_z=Mx/I \n", - "# @ \n", - "x=100\n", - "sigma_z=M*x/Iyy\n", - "print \"\\ndirect stress at the top of the I section (y=150) = %3.2f N/mm^2 (compression)\"%(sigma_z)\n", - "\n", - "# @\n", - "x=-100\n", - "sigma_z=M*x/Iyy\n", - "print \"\\ndirect stress at the bottom of the I section (y=-150) = %3.2f N/mm^2 (tension)\"%(sigma_z)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Second moment of area of I section beam = 2.701e+07 mm^4\n", - "\n", - "direct stress at the top of the I section (y=150) = 370.30 N/mm^2 (compression)\n", - "\n", - "direct stress at the bottom of the I section (y=-150) = -370.30 N/mm^2 (tension)\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.3 Pg.No.458 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#variable declaration\n", - "l=300 #length of I section (mm)\n", - "b=200 #width of I section beam (mm)\n", - "w1=25 #width of center section of I beam (mm)\n", - "w2=20 #width of upper and lower section of I beam (mm)\n", - "M=100*10**6 #moment applied in vertical plane (N*mm)\n", - "theta=30 #angle at which bending moment is applied(degree)\n", - "\n", - "Mx=M*math.cos(math.radians(30))\n", - "My=M*math.sin(math.radians(30))\n", - "\n", - "# sigma_z=Mx/Ixx*y+My/Iyy*x\n", - "# @top left hand corner\n", - "y=150\n", - "x=-100\n", - "sigma_z=Mx/Ixx*y-My/Iyy*x \n", - "print \"\\ndirect stress at the top left hand corner = %3.1f N/mm^2 (tension)\"%(sigma_z)\n", - "\n", - "# @ top right hand corner\n", - "x=100\n", - "y=150\n", - "sigma_z=Mx/Ixx*y-My/Iyy*x \n", - "print \"\\ndirect stress at the top right hand corner = %3.1f N/mm^2 (compression)\"%(sigma_z)\n", - "\n", - "alpha=math.atan(My*Ixx/Mx/Iyy)\n", - "print \"\\ninclination = %3.1f degree\\n\"%(alpha*180/math.pi)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "direct stress at the top left hand corner = 252.2 N/mm^2 (tension)\n", - "\n", - "direct stress at the top right hand corner = -118.1 N/mm^2 (compression)\n", - "\n", - "inclination = 76.4 degree\n", - "\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.4 Pg.No.466" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# reference Fig 16.13\n", - "import math\n", - "from __future__ import division\n", - "#variable declaration\n", - "l=80 #length of one section (mm)\n", - "w=8 #thickness of each section (mm)\n", - "b1=40 #width of one section (mm)\n", - "b2=80 #width of other section (mm)\n", - "Mx=1500*10*3 #bending moment (N.mm)\n", - "My=0\n", - "\n", - "#centroid\n", - "# in this example C is taken at top surface x axis aligned to AB and y axis is \n", - "# aligned to E surface \n", - "y_bar=((b1+b2)*w*w/2+l*w*(w+l/2))/(l*w+(b1+b2)*w)\n", - "print \"\\ny coordinate of centroid = %3.1f mm\"%(y_bar)\n", - "\n", - "x_bar=((b1+b2)*w*((b1+b2)/2-b1+w/2)+l*w*(w/2))/(l*w+(b1+b2)*w)\n", - "print \"\\nx coordinate of centroid = %3.1f mm\"%(x_bar)\n", - "\n", - "#second area of moment\n", - "#IB=IC+Ab^2 IB=moment about any point,IC=moment about centroid, b=distace between both points\n", - "Ixx=(b1+b2)*w**3/12+(b1+b2)*w*(y_bar-w/2)**2+w*l**3/12+l*w*(w+l/2-y_bar)**2\n", - "print \"\\nsecond moment of area about x axis = %3.2e mm^4\"%(Ixx)\n", - "\n", - "Iyy=w*(b1+b2)**3/12+(b1+b2)*w*((b1+b2)/2-b1+w/2-x_bar)**2+l*w**3/12+l*w*(x_bar-w/2)**2\n", - "print \"\\nsecond moment of area about y axis = %3.2e mm^4\"%(Iyy)\n", - "\n", - "Ixy=(b1+b2)*w*(y_bar-w/2)*((b1+b2)/2-b1+w/2-x_bar)+l*w*(w+l/2-y_bar)*(x_bar-w/2)\n", - "print \"\\nsecond moment of area about x and y axis = %3.2e mm^4\"%(Ixy)\n", - "\n", - "Mx=15*10**5\n", - "def f(x,y):\n", - " return Mx*(Iyy*y-Ixy*x)/(Ixx*Iyy-Ixy**2)\n", - "sigma_z_max= f(-8,-66.4)\n", - "print \"\\nmaximum direct shear stress = %3.0f N/mm^2 (compressive)\\n\"%(sigma_z_max)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "y coordinate of centroid = 21.6 mm\n", - "\n", - "x coordinate of centroid = 16.0 mm\n", - "\n", - "second moment of area about x axis = 1.09e+06 mm^4\n", - "\n", - "second moment of area about y axis = 1.31e+06 mm^4\n", - "\n", - "second moment of area about x and y axis = 3.38e+05 mm^4\n", - "\n", - "maximum direct shear stress = -96 N/mm^2 (compressive)\n", - "\n" - ] - } - ], - "prompt_number": 62 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter18.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter18.ipynb deleted file mode 100755 index b0550214..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter18.ipynb +++ /dev/null @@ -1,155 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a16e0822e0e7167e54e1f4ffc425aa7247562532992f7dee46fc87221365735a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 18: Torsion of Beams" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 18.1 Pg.No.527" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#variable declaration\n", - "r=100 #radius of cylinder (mm)\n", - "l=2*10**3 #length of cylinder (mm)\n", - "torque=30*10**6 #torque at mid point (N.mm)\n", - "Tmax=15*10**6 \n", - "Tau_max=200 #max shear stress (N/mm^2)\n", - "G=25000 #shear modulus (N/mm^2)\n", - "theta =2 # rotation at mid point (degree)\n", - "\n", - "#ref equation 18.1 T=2Aq\n", - "tmin1=Tmax/(2*math.pi*r**2*Tau_max)\n", - "print \"\\nminimum thickness of beam due to stress limited to 200N/mm^2 = %3.1f mm\"%(tmin1)\n", - "\n", - "z=1*10**3 # twist at mid point (mm)\n", - "#equation 18.4 after integration\n", - "tmin2=Tmax*200*math.pi*z/(4*(math.pi*r**2)**2*G*theta*math.pi/180)\n", - "print \"\\nminimum thickness due to constraint on maximum angle twist = %3.1f mm\"%(tmin2)\n", - "t=max(tmin1,tmin2)\n", - "print \"\\nthickness which satisfies both conditions = %3.1f mm\"%(t)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "minimum thickness of beam due to stress limited to 200N/mm^2 = 1.2 mm\n", - "\n", - "minimum thickness due to constraint on maximum angle twist = 2.7 mm\n", - "\n", - "thickness which satisfies both conditions = 2.7 mm\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 18.3 Pg.No 540" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#reference Fig 18.12\n", - "from __future__ import division\n", - "import math\n", - "from sympy import symbols\n", - "from sympy import integrate\n", - "\n", - "S1,S2,S3=symbols('S1,S2,S3')\n", - "\n", - "#variable declaration\n", - "s1=50 #length of channel (mm)\n", - "s2=25 #width of channel (mm)\n", - "t1=2.5 #thickness of web(mm)\n", - "t2=1.5 #thickness of flange(mm)\n", - "T=10*10**3 #torque applied (N.mm)\n", - "zeta_s=8.04 \n", - "G=25000 #shear modulus (N/mm^2)\n", - "\n", - "#J=Sum(st^3/3)\n", - "J=1/3*(s1*t1**3+2*s2*t2**3)\n", - "tau_max=t1*T/J\n", - "print \"maximum shear stress = %3.1f N/mm^2\"%(tau_max)\n", - "\n", - "#in region O2\n", - "s1=25\n", - "ARf=1/2*zeta_s*s1\n", - "ws=-2*ARf*T/(G*J)\n", - "print \"warping in O2 region is linear = %3.2f mm\"%(ws)\n", - "\n", - "#in the wall 21\n", - "AR=1/2*zeta_s*s2-0.5*25*s2\n", - "w21=-0.03*(zeta_s-s2)\n", - "s1=50\n", - "tds=2*s2*t2+s1*t1\n", - "\n", - "A12=25/2*S1\n", - "A23=312.5-4.02*S2\n", - "A34=111.5+25/2*S3\n", - "AR1=1/2*(integrate(A12,(S1,0,25))+integrate(5*(A23),(S2,0,50))+integrate(3*A34,(S3,0,25)))/200\n", - "\n", - "#equation 18.20\n", - "ws=-2*ARf*T/G/J\n", - "print \"warping distribution in flange 34 = %1.2f \\n\"%(ws)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum shear stress = 78.9 N/mm^2\n", - "warping in O2 region is linear = -0.25 mm\n", - "warping distribution in flange 34 = -0.25 \n", - "\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter19.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter19.ipynb deleted file mode 100755 index c6a6c12b..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter19.ipynb +++ /dev/null @@ -1,160 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8abe3316b17e7378affc20eb461733ec12ced2dbb39d65e4c948dd2ef8dc33e9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 19: Combined open and closed section beams" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 19.1 Pg.No. 552" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from scipy import integrate\n", - "from sympy import *\n", - "import math\n", - "\n", - "l1=100 #lengths shown in Fig(mm)\n", - "l2=200\n", - "F=100*10**3 #force applied (N)\n", - "\n", - "y_bar=(2*l1*2*50+2*l2*2*l1+l2*2*l2)/(4*l1*2+4*l2*2)\n", - "Ixx=2*(2*l1**3/12+2*l1*25**2)+400*2*75**2+l2*2*125**2+2*(2*l2**3/12+2*l2*25**2)\n", - "\n", - "s1=Symbol('s1')\n", - "q12=-round(10**4*F/Ixx)/10**4*(integrate(-50+2*s1,s1))\n", - "print \"\\nq12 = %s\"%(q12)\n", - "\n", - "s2=Symbol('s2')\n", - "q23=-round(10**4*F/Ixx)/10**4*(integrate(2*75,s2))-34.5\n", - "print \"\\nq23 = %s\"%(q23)\n", - "\n", - "s3=Symbol('s3')\n", - "q03=-round(10**4*F/Ixx)/10**4*(integrate(2*75,s3))\n", - "print \"\\nq03 = %s\"%(q03)\n", - "\n", - "s4=Symbol('s4')\n", - "q34=-round(10**4*F/Ixx)/10**4*(integrate(2*(75-s4),s4))-242.5\n", - "print \"\\nq34 = %s\"%(q34)\n", - "\n", - "s5=Symbol('s5')\n", - "q94=-round(10**4*F/Ixx)/10**4*(integrate(-2*125,s5))\n", - "print \"\\nq94 = %s\\n\"%(q94)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "q12 = -0.0069*s1**2 + 0.345*s1\n", - "\n", - "q23 = -1.035*s2 - 34.5\n", - "\n", - "q03 = -1.035*s3\n", - "\n", - "q34 = 0.0069*s4**2 - 1.035*s4 - 242.5\n", - "\n", - "q94 = 1.725*s5\n", - "\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 19.2 Pg.No.555" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from scipy import integrate\n", - "from sympy import symbols\n", - "import math\n", - "\n", - "A=20000 #nose cell area (mm^2)\n", - "L_w=900 #outer wall (mm)\n", - "L=300 #width of wall (mm)\n", - "length=600 #length of open section (mm)\n", - "G=25000 #shear modulus (N/mm^2)\n", - "T=10*10**6 #torque applied (kN.m)\n", - "t1=1.5 #thickness of closed section\n", - "t2=2 #thickness of open section\n", - "\n", - "GJ_cl=4*A**2*G/(L_w+L)*t1\n", - "\n", - "print \"torsoinal rigidity of closed section = %2.2e N.mm^2 \\n\"%(GJ_cl)\n", - "\n", - "GJ_op=G*(length+L)*t2**3/3\n", - "print \"torsional rigidity of open section = %2.1e N.mm^2 \\n\"%(GJ_op)\n", - "\n", - "GJ=GJ_cl+GJ_op\n", - "print \"total torsional rigidity = %5.3e N.mm^2\\n\"%(GJ)\n", - "\n", - "dO_by_dz=T/GJ\n", - "print \"angle of twist per unit length = %1.4f rad/mm\\n\"%(dO_by_dz)\n", - "\n", - "q_cl=GJ_cl/2/A*dO_by_dz\n", - "print \"maximum shear stress in the closed section = %3.1f N/mm^2\\n\"%(q_cl/1.5)\n", - "\n", - "#eqn 18.10 T_max=GtdO/dz\n", - "T_max=G*t2*dO_by_dz\n", - "print \"maximum shear stress in the open section = %2.0f N/mm^2\\n\"%(T_max)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "torsoinal rigidity of closed section = 5.00e+10 N.mm^2 \n", - "\n", - "torsional rigidity of open section = 6.0e+07 N.mm^2 \n", - "\n", - "total torsional rigidity = 5.006e+10 N.mm^2\n", - "\n", - "angle of twist per unit length = 0.0002 rad/mm\n", - "\n", - "maximum shear stress in the closed section = 166.5 N/mm^2\n", - "\n", - "maximum shear stress in the open section = 10 N/mm^2\n", - "\n" - ] - } - ], - "prompt_number": 31 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter20.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter20.ipynb deleted file mode 100755 index 4595d055..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter20.ipynb +++ /dev/null @@ -1,286 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:bb71ed7156eb25f3e97cd3ba07ae31557b447cbcd71b351505ee32010461a02e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 20: Structural idealization" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.1 Pg.No.560" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "sigma6=200\n", - "sigma1=200\n", - "sigma2=sigma5=150 #these are not real shear stress but taken \n", - "sigma3=sigma4=100 #proportional to length because we need just ratio\n", - "l16=400 \n", - "t16=3\n", - "l12=l21=600\n", - "t12=t21=2 #thickness and lengths as shown in Fig 20.4\n", - "l23=600\n", - "t23=1.5\n", - "l25=300\n", - "t25=2.5\n", - "l34=200\n", - "t34=2\n", - "#eqn 20.1 B1=t_D*b/6*(2+sigma_2/sigma_1)\n", - "#eqn 20.2 B2=t_D*b/6*(2+sigma_1/sigma_2)\n", - "B1=B6=300+l16*t16/6*(2-sigma6/sigma1)+l12*t12/6*(2+sigma2/sigma1)\n", - "print \"B1=B6=%5.2f mm^2\\n\"%(B1)\n", - "\n", - "B2=B5=2*300+l12*t12/6*(2+sigma1/sigma2)+t25*l25/6*(2-sigma5/sigma2)+l23*t23/6*(2+sigma3/sigma2)\n", - "print \"B2=B5=%5.2f mm^2\\n\"%(B2)\n", - "\n", - "B3=300+l23*t23/6*(2+sigma2/sigma3)+l34*t34/6*(2-sigma4/sigma3)\n", - "print \"B3=B4=%5.2f mm^2\\n\"%(B3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "B1=B6=1050.00 mm^2\n", - "\n", - "B2=B5=1791.67 mm^2\n", - "\n", - "B3=B4=891.67 mm^2\n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.2 Pg.No.562" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "Mx=100*10**6 #bending moment(N.mm)\n", - "y=[660,600,420,228,25,-204,-396,-502,-540]\n", - "B=[640,600,600,600,620,640,640,850,640]\n", - "\n", - "print \"direct stress in each boom in last column\"\n", - "print \"Boom\\t y(mm)\\t B(mm^2)\\t delIxx=By^2\\t sigma_z\"\n", - "for i in range (0,9):\n", - " print \"%1.0f \\t %3.0f \\t %3.0f \\t \\t%2.1e \\t %2.1f\"%(i+1,y[i],B[i],B[i]*y[i]**2,Mx*y[i]/(1854*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "direct stress in each boom in last column\n", - "Boom\t y(mm)\t B(mm^2)\t delIxx=By^2\t sigma_z\n", - "1 \t 660 \t 640 \t \t2.8e+08 \t 35.6\n", - "2 \t 600 \t 600 \t \t2.2e+08 \t 32.4\n", - "3 \t 420 \t 600 \t \t1.1e+08 \t 22.7\n", - "4 \t 228 \t 600 \t \t3.1e+07 \t 12.3\n", - "5 \t 25 \t 620 \t \t3.9e+05 \t 1.3\n", - "6 \t -204 \t 640 \t \t2.7e+07 \t -11.0\n", - "7 \t -396 \t 640 \t \t1.0e+08 \t -21.4\n", - "8 \t -502 \t 850 \t \t2.1e+08 \t -27.1\n", - "9 \t -540 \t 640 \t \t1.9e+08 \t -29.1\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.3 Pg.No.566" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "Ixx=48*10**6\n", - "Sy=4.8*10**3\n", - "B=300\n", - "\n", - "q12=-Sy/Ixx*B*200 #until point 2 \n", - "q23=q12-Sy/Ixx*B*200\n", - "q34=q23-Sy/Ixx*B*(-200)\n", - "print \"shear flow in flange 12 = %2.0f N/mm\\n\"%(q12)\n", - "print \"shear flow in web 23 = %2.0f N/mm\\n\"%(q23)\n", - "print \"shear flow in flange 34 = %2.0f N/mm\\n\"%(q34)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flow in flange 12 = -6 N/mm\n", - "\n", - "shear flow in web 23 = -12 N/mm\n", - "\n", - "shear flow in flange 34 = -6 N/mm\n", - "\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.4 Pg.No.569" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "B=[200,250,400,100,100,400,250,200]\n", - "Ixx=13.86*10**6\n", - "Sy=10*10**3\n", - "qb23=0\n", - "qb34=qb23-Sy/Ixx*B[2]*100\n", - "qb45=qb34-Sy/Ixx*B[3]*50\n", - "qb56=qb34\n", - "qb67=qb23\n", - "qb21=qb67-Sy/Ixx*(B[1]*100)\n", - "qb18=qb21-Sy/Ixx*B[7]*30\n", - "qb87=qb21\n", - "qs0=-5.4\n", - "print \"Distribution of shear flow :\"\n", - "print \"q23 = %2.1f N/mm\"%(qb23+qs0)\n", - "print \"q21 = %2.1f N/mm\"%(qb21-qs0)\n", - "print \"q34 = %2.1f N/mm\"%(qb34-qs0)\n", - "print \"q45 = %2.1f N/mm\"%(qb45-qs0)\n", - "print \"q56 = %2.1f N/mm\"%(qb56-qs0)\n", - "print \"q67 = %2.1f N/mm\"%(qb67+qs0)\n", - "print \"q18 = %2.1f N/mm\"%(qb18-qs0)\n", - "print \"q87 = %2.1f N/mm\\n\"%(qb87-qs0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Distribution of shear flow :\n", - "q23 = -5.4 N/mm\n", - "q21 = -12.6 N/mm\n", - "q34 = -23.5 N/mm\n", - "q45 = -27.1 N/mm\n", - "q56 = -23.5 N/mm\n", - "q67 = -5.4 N/mm\n", - "q18 = -17.0 N/mm\n", - "q87 = -12.6 N/mm\n", - "\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.5 Pg.No.575" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import symbols, integrate\n", - "z=symbols('z')\n", - "\n", - "E=70000 #youngs modulus (N/mm^2)\n", - "G=30000 #shear modulus (N/mm^2)\n", - "P=4.8*10**3 #applied force (N)\n", - "L=2000 #cantilever length(mm)\n", - "Sy=P\n", - "Ixx=48*10**6 #second moment of area \n", - "t=1 #actual thickness (mm)\n", - "\n", - "Mx0=-Sy*(L-z)\n", - "Mx1=-(L-z)\n", - "\n", - "del_M=integrate(Mx0*Mx1/E/Ixx,(z,0,L))\n", - "del_S=integrate((1/G/t/Sy*(6**2*200+12**2*400+6**2*200)),(z,0,L))\n", - "print \"total deflection in vertical direction = %1.2f mm\\n\"%(del_M+del_S)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "total deflection in vertical direction = 4.81 mm\n", - "\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 35 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter21.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter21.ipynb deleted file mode 100755 index 1195a6a9..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter21.ipynb +++ /dev/null @@ -1,256 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b8ffe836d5b15b63c70d69d0a02ef23ccdf3f03c0f15c98f0fa5e62d24f5d894" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 21: Wing spars and box beams" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 21.1 Pg.No.585" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from scipy import integrate\n", - "import math\n", - "\n", - "Mx=20*10**6 #internal bending moment (N.mm)\n", - "Sy=-20*10**3 #force applied(N)\n", - "l1=400\n", - "l2=300 #lengths of webs respectively from left to right in Fig 21.2\n", - "l3=200\n", - "\n", - "#Ixx=I_C+Ab^2\n", - "Ixx=2*l1*150**2+2*l2**3/12\n", - "y=150\n", - "sigma_z1=Mx*y/Ixx\n", - "sigma_z2=-Mx*y/Ixx\n", - "\n", - "Pz1=sigma_z1*l1\n", - "Pz2=sigma_z2*l1\n", - "\n", - "#from fig 21.1 and 21.2\n", - "del_y1_by_del_z=-0.05\n", - "del_y2_by_del_z=0.05\n", - "Syw=Sy-Pz1*del_y1_by_del_z-Pz2*del_y2_by_del_z\n", - "\n", - "# equ 21.6 qs=-Syw/Ixx*integrate(t_D*y*ds+B1*Y1) from 0 to s\n", - "fn=lambda s:300-2*s\n", - "\n", - "def shear(s):\n", - " return -Syw/Ixx*(integrate.quad(fn, 0, s)[0]+400*150)\n", - "print \"maximum value of shear flow @s=150mm =%2.1f N/mm\\n\"%(shear(150.0))\n", - "print \"value of shear @s=0mm = %2.1f N/mm\\n\"%(shear(0))\n", - "print \"value of shear @s=300 mm = %2.1f N/mm\\n\"%(shear(300))\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum value of shear flow @s=150mm =53.8 N/mm\n", - "\n", - "value of shear @s=0mm = 39.1 N/mm\n", - "\n", - "value of shear @s=300 mm = 39.1 N/mm\n", - "\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 21.2 Pg.No.589" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import symbols\n", - "import math\n", - "\n", - "Sy=100*10**6 #load applied in y direction (N)\n", - "Sx=0 #load in x direction (N)\n", - "y=[0.3,0.3,0.3,-0.3,-0.3,-0.3]\n", - "B=[900,1200,900,900,1200,900] #boom area\n", - "dx_dz=[0.1,0,-0.1,-0.1,0,0.1]\n", - "dy_dz=[-0.05,-0.05,-0.05,0.05,0.05,0.05]\n", - "Er=[0.6,0,0.6,0.6,0,0.6] \n", - "nr=[0.3,0.3,0.3,0.3,0.3,0.3]\n", - "Mx=-Sy*2\n", - "My=-Sx*2\n", - "Ixy=0\n", - "Ixx=4*900*300**2+2*1200*300**2\n", - "Pzr=[0]*6\n", - "Pxr=[0]*6 #array initialization\n", - "Pyr=[0]*6\n", - "Pr=[0]*6\n", - "print \"Boom \\t Pzr(kN) \\t dx_dz \\t dy_dz \\t Pxr(kN) \\t Pyr(kN) \\t Pr(kN)\"\n", - "for i in range (0,6):\n", - " Pzr[i]=Mx*y[i]/Ixx*B[i]\n", - " Pxr[i]=Pzr[i]*dx_dz[i] #Pr is not correct in (7) column in book\n", - " Pyr[i]=Pzr[i]*dy_dz[i]\n", - " Pr[i]=(Pzr[i]**2+Pxr[i]**2+Pyr[i]**2)**0.5\n", - " if Pzr[i]>0 :\n", - " print \"%1.0f \\t %3.0f \\t\\t %1.1f \\t %1.2f \\t %2.0f \\t\\t %1.1f \\t\\t %3.1f\"%(i+1,Pzr[i],dx_dz[i],dy_dz[i],Pxr[i],Pyr[i],Pr[i])\n", - " else:\n", - " print \"%1.0f \\t %3.0f \\t\\t %1.1f \\t %1.2f \\t %2.0f \\t\\t %1.1f \\t\\t %3.1f\"%(i+1,Pzr[i],dx_dz[i],dy_dz[i],Pxr[i],Pyr[i],-Pr[i])\n", - " \n", - "Sxw=0\n", - "Syw=66.6*10**3\n", - "qb16=0 #open section here\n", - "qb12=qb16-Syw/Ixx*B[0]*300\n", - "qb23=qb12-Syw/Ixx*B[1]*300\n", - "qb34=qb23-Syw/Ixx*B[2]*300\n", - "qb45=qb23\n", - "qb56=qb12\n", - "qs0=-97\n", - "\n", - "\n", - "print \"\\n\\nqb16 = %3.1f N/mm\"%(qb16)\n", - "print \"qb12 = %3.1f N/mm\"%(qb12)\n", - "print \"qb23 = %3.1f N/mm\"%(qb23)\n", - "print \"qb34 = %3.1f N/mm\"%(qb34)\n", - "print \"qb45 = %3.1f N/mm\"%(qb45)\n", - "print \"qb56 = %3.1f N/mm\"%(qb56)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Boom \t Pzr(kN) \t dx_dz \t dy_dz \t Pxr(kN) \t Pyr(kN) \t Pr(kN)\n", - "1 \t -100 \t\t 0.1 \t -0.05 \t -10 \t\t 5.0 \t\t -100.6\n", - "2 \t -133 \t\t 0.0 \t -0.05 \t -0 \t\t 6.7 \t\t -133.5\n", - "3 \t -100 \t\t -0.1 \t -0.05 \t 10 \t\t 5.0 \t\t -100.6\n", - "4 \t 100 \t\t -0.1 \t 0.05 \t -10 \t\t 5.0 \t\t 100.6\n", - "5 \t 133 \t\t 0.0 \t 0.05 \t 0 \t\t 6.7 \t\t 133.5\n", - "6 \t 100 \t\t 0.1 \t 0.05 \t 10 \t\t 5.0 \t\t 100.6\n", - "\n", - "\n", - "qb16 = 0.0 N/mm\n", - "qb12 = -33.3 N/mm\n", - "qb23 = -77.7 N/mm\n", - "qb34 = -111.0 N/mm\n", - "qb45 = -77.7 N/mm\n", - "qb56 = -33.3 N/mm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 21.3 Pg.No.593\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import symbols\n", - "import numpy as np\n", - "import math\n", - "yr=symbols('yr')\n", - "\n", - "Mx=-100*1.9*10**6 #bending moment(N.mm)\n", - "Ixx=4*900*295**2+2*1200*295**2 #second moment of area (mm^4)\n", - "sigma_zr=Mx/Ixx*yr\n", - "P1_1=P3_1=-0.364*295*900\n", - "P4_1=P6_1=0.364*295*900\n", - "P2_1=-0.364*295*1200\n", - "P5_1=0.364*295*1200\n", - "\n", - "Mx=-100*2.1\n", - "Ixx=4*900*305**2+2*1200*305**2\n", - "sigma_zr=Mx/Ixx*yr\n", - "P1_2=P3_2=-0.376*305*900\n", - "P4_2=P6_2=0.376*305*900\n", - "P2_2=-0.376*305*1200\n", - "P5_2=0.376*305*1200\n", - "\n", - "deltaP1=deltaP3=(P1_1-P1_2)/200\n", - "deltaP4=deltaP6=-(P4_1-P4_2)/200\n", - "deltaP2=(P2_1-P2_2)/200\n", - "deltaP5=(P5_1-P5_2)/200\n", - "\n", - "a=np.array([[1,-1,0,0,0,0],[0,1,-1,0,0,0],[0,0,1,-1,0,0],[0,0,0,1,-1,0],[0,0,0,0,1,-1],[600*300*2,2*600*300,600*600,0,0,600*600]])\n", - "\n", - "b=np.array([43.8,32.85,-32.85,-43.8,-32.85,600*10**5])\n", - "q=np.linalg.solve(a,b)\n", - "print \"shear flow distribution :\"\n", - "print \"q12 = %2.1f N/mm\"%(q[0])\n", - "print \"q23 = %2.1f N/mm\"%(q[1])\n", - "print \"q34 = %2.1f N/mm\"%(q[2])\n", - "print \"q45 = %2.1f N/mm\"%(q[3])\n", - "print \"q56 = %2.1f N/mm\"%(q[4])\n", - "print \"q61 = %2.1f N/mm\\n\"%(q[5])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flow distribution :\n", - "q12 = 63.6 N/mm\n", - "q23 = 19.8 N/mm\n", - "q34 = -13.1 N/mm\n", - "q45 = 19.8 N/mm\n", - "q56 = 63.6 N/mm\n", - "q61 = 96.4 N/mm\n", - "\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 41 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter22.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter22.ipynb deleted file mode 100755 index 15f86e3c..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter22.ipynb +++ /dev/null @@ -1,88 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7afcc7b44b13ea906e3e2317703c261e07426e5f23f7958a6b7966ba0274524d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 22: Fuselages" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 22.1 Pg.No.598" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "#B1=t_D*b/6(2+sigma_2/sigma_1)\n", - "Mx=200*10**6 # (N*mm)\n", - "y=[381,352,269.5,145.8,0,-145.8,-269.5,-352,-381,-352,-269.5,-145.8,0,145.8,269.5,352]\n", - "sigma_2=sigma_16=352\n", - "sigma_1=381\n", - "A=100\n", - "B1=A+0.8*149.6/6*(2+sigma_2/sigma_1)*2\n", - "Ixx=2.52*10**8\n", - "def sigma_z(y):\n", - " return Mx/Ixx*y\n", - "print \"Stringer/Boom \\t y(mm) \\t \\tsigma_z(N/mm^2)\"\n", - "for i in range (0,16):\n", - " print \"%2.0f \\t\\t %3.1f\\t\\t\\t%3.1f \"%(i+1,y[i],sigma_z(y[i]))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Stringer/Boom \t y(mm) \t \tsigma_z(N/mm^2)\n", - " 1 \t\t 381.0\t\t\t302.4 \n", - " 2 \t\t 352.0\t\t\t279.4 \n", - " 3 \t\t 269.5\t\t\t213.9 \n", - " 4 \t\t 145.8\t\t\t115.7 \n", - " 5 \t\t 0.0\t\t\t0.0 \n", - " 6 \t\t -145.8\t\t\t-115.7 \n", - " 7 \t\t -269.5\t\t\t-213.9 \n", - " 8 \t\t -352.0\t\t\t-279.4 \n", - " 9 \t\t -381.0\t\t\t-302.4 \n", - "10 \t\t -352.0\t\t\t-279.4 \n", - "11 \t\t -269.5\t\t\t-213.9 \n", - "12 \t\t -145.8\t\t\t-115.7 \n", - "13 \t\t 0.0\t\t\t0.0 \n", - "14 \t\t 145.8\t\t\t115.7 \n", - "15 \t\t 269.5\t\t\t213.9 \n", - "16 \t\t 352.0\t\t\t279.4 \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter23.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter23.ipynb deleted file mode 100755 index a5e90903..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter23.ipynb +++ /dev/null @@ -1,390 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:38d29ad436c9255138372fb573a0261c5aeb8d664f2491fbf03a71e42b1c4783" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 23: Wings" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.1 Pg.No.609" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import solve, symbols, pprint\n", - "import math\n", - "y=symbols('y')\n", - "\n", - "B1=B6=2580\n", - "B2=B5=3880 #Boom areas (mm^2)\n", - "B3=B4=3230\n", - "\n", - "l1=200\n", - "l2=230 #dimensions shown in Fig 23.3 (mm)\n", - "l3=165\n", - "\n", - "Mx=300*10**6 #bending moment (N.mm)\n", - "My=0\n", - "\n", - "Ixx=2*(B1*l3**2+B2*l2**2+B3*l1**2)\n", - "sigma_z=Mx/Ixx*y\n", - "\n", - "print \"direct stress in booms sigma_z = %s\" %(sigma_z)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "direct stress in booms sigma_z = 0.370651791174781*y\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.2 Pg.No.612" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import solve, symbols, pprint\n", - "import math\n", - "import numpy as np\n", - "\n", - "T=11.3*10**6 # torque applied (N.mm)\n", - "G_REF=27600 #(N/mm^2)\n", - "A1=258000\n", - "A2=355000 #areas in table\n", - "A3=161000\n", - "\n", - "#t*12=G/G_REF*t\n", - "t12=24200/G_REF*1.22\n", - "t12i=27600/G_REF*2.03\n", - "t13=t24=24200/G_REF*1.22 #G and thickness taken from table ex23.2 Pg.No.612\n", - "t35=t46=t56=20700/G_REF*0.92\n", - "t34=27600/G_REF*1.63\n", - "\n", - "# del12=ds/t*12\n", - "del12=1650/t12\n", - "del12i=508/t12i\n", - "del13=del24=775/t13\n", - "del34=380/t34 #lengths taken from table\n", - "del35=del46=508/t35\n", - "del56=254/t56\n", - "\n", - "\n", - "a=np.array([[del12+del12i,-del12i,0,-2*A1*G_REF],[-del12i,del12i+del13+del24+del34,-del34,-2*A2*G_REF],[0,-del34,del35+del46+del34+del56,-2*A3*G_REF],[A1,A2,A3,0]])\n", - "b=np.array([0,0,0,5.65*10**6])\n", - "x=np.linalg.solve(a,b)\n", - "print \"shear stress distribution is as follows\"\n", - "print \"q1=%1.1f N/mm\"%(x[0])\n", - "print \"q2=%1.1f N/mm\"%(x[1])\n", - "print \"q3=%1.1f N/mm\\n\"%(x[2])\n", - "print \"dO_dz=%1.2e \"%(x[3])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear stress distribution is as follows\n", - "q1=7.1 N/mm\n", - "q2=8.9 N/mm\n", - "q3=4.2 N/mm\n", - "\n", - "dO_dz=7.36e-07 \n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.3 Pg.No.616" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import solve, symbols, pprint\n", - "import math\n", - "import numpy as np\n", - "\n", - "A1=265000\n", - "A2=213000\n", - "A3=413000\n", - "\n", - "G_REF=27600\n", - "Sy=86.8*10**3\n", - "t78=3*27600/27600*1.22\n", - "del78=1270/t78\n", - "t12=t56=1.22\n", - "del12=del56=1023/t12\n", - "t23=1.63\n", - "del23=1274/t23\n", - "t34=2.03\n", - "del34=2200/t34\n", - "del38=57\n", - "del84=95\n", - "del87=347\n", - "del27=68\n", - "del75=106\n", - "del16=330/1.63\n", - "Ixx=809*10**6 #From example 23.1\n", - "\n", - "qb27=-99.4;qb16=-45.5;qb65=0;qb57=95.5;qb38=-69.8;qb48=69\n", - "\n", - "\n", - "a=np.array([ [del34+del84+del38,-del38,0,-2*A1*G_REF], [-del38,del23+del38+del87+del27,-del27,-2*A2*G_REF], [0,-del27,del56+del27+del75+del12+del16,-2*A3*G_REF], [2*A1,2*A2,2*A3,0] ])\n", - "b=np.array([-10488,-2561,7426,19736700])\n", - "x=np.linalg.solve(a,b)\n", - "\n", - "qs01=5.5\n", - "qs02=10.2\n", - "qs03=16.5\n", - "\n", - "q34=qs01\n", - "q23=qs02\n", - "q12=qs03\n", - "q61=-qb16+qs03\n", - "q57=qb57-qs03\n", - "q72=-qb27-qs02\n", - "q48=qb48+qs01\n", - "q83=-qb38-qs01\n", - "\n", - "print \"shear flows distribution is as follows :\"\n", - "print \"q34=%1.2f N/mm\"%(q34)\n", - "print \"q23=q87=%1.2f N/mm\"%(q23)\n", - "print \"q12=q56=%1.2f N/mm\"%(q12)\n", - "print \"q61=%1.2f N/mm\"%(q61) \n", - "print \"q57=%1.2f N/mm\"%(q57)\n", - "print \"q72=%1.2f N/mm\"%(q72)\n", - "print \"q48=%1.2f N/mm\"%(q48)\n", - "print \"q83=%1.2f N/mm\\n\"%(q83)\n", - "\n", - "print \"rate of twist = %1.1e rad/mm\"%(x[3])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flows distribution is as follows :\n", - "q34=5.50 N/mm\n", - "q23=q87=10.20 N/mm\n", - "q12=q56=16.50 N/mm\n", - "q61=62.00 N/mm\n", - "q57=79.00 N/mm\n", - "q72=89.20 N/mm\n", - "q48=74.50 N/mm\n", - "q83=64.30 N/mm\n", - "\n", - "rate of twist = 1.1e-06 rad/mm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.4 Pg.No.618 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import solve, symbols, pprint\n", - "import math\n", - "import numpy as np\n", - "\n", - "#Boom areas\n", - "B=[600,900,600,600,900,600]\n", - "Pz=[0,0,0,0,0,0]\n", - "y=[54.56,54.56,54.56,-54.56,-54.56,-54.56]\n", - "Ixx=4*600*90**2+2*900*90**2\n", - "Ixy=0\n", - "Mx=1.65*10**6\n", - "My=0\n", - "\n", - "a=np.array([[1700,-1520],[72000,144000]])\n", - "b=np.array([3942,690726])\n", - "x=np.linalg.solve(a,b)\n", - "print \"\\nqs0I = %2.1f N/mm\\n\"%(x[0])\n", - "print \"\\nqs0II = %2.1f N/mm\\n\"%(x[1])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "qs0I = 4.6 N/mm\n", - "\n", - "\n", - "qs0II = 2.5 N/mm\n", - "\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.5 Pg.No.622" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import solve, symbols, pprint\n", - "import math\n", - "import numpy as np\n", - "from sympy import integrate\n", - "z=symbols('z')\n", - "\n", - "E=69000 #youngs modulus (N/mm^2)\n", - "G=25900 #shear modulus (N/mm^2)\n", - "t=2 #thickness (mm)\n", - "B=[650,1300,650,650,1300,650] #boom area\n", - "q0=[9.6,-5.8,50.3,-5.8,9.6,54.1,73.6]\n", - "Sy0=44.5*10**3\n", - "Sy1=1\n", - "Mx0=-44.5*10**3*(2000-z)\n", - "Mx1=-(2000-z)\n", - "Ixx=81.3*10**6\n", - "int_q0q1_Gt=1/G/t/Sy0*(q0[0]**2*250*t+q0[1]**2*500*t+q0[2]**2*250+q0[5]**2*250+q0[6]**2*250)\n", - "\n", - "delta=integrate(Mx0*Mx1/E/Ixx,(z,0,2000))+integrate(int_q0q1_Gt,(z,0,2000))\n", - "print \"deflection at free end of the two cell = %2.2f mm\"%(delta)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "deflection at free end of the two cell = 23.58 mm\n" - ] - } - ], - "prompt_number": 70 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.6 Pg.No.624" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import solve, symbols, pprint\n", - "import math\n", - "import numpy as np\n", - "from sympy import integrate\n", - "\n", - "T=10*10**6 #torque subjected (N.mm)\n", - "l1=800 \n", - "l2=200 #lengths shown in Fig23.17 (mm)\n", - "l3=1500\n", - "A=l2*l1\n", - "\n", - "\n", - "q=T/2/A\n", - "S=T/l1\n", - "q1=S/l2\n", - "P=S*l3/2/l2\n", - "\n", - "a=np.array([[1,-1],[1,1]])\n", - "b=np.array([31.3,62.5])\n", - "q=np.linalg.solve(a,b)\n", - "\n", - "print \"shear flow :\"\n", - "print \"q1=%2.2f N/mm\"%(q1)\n", - "print \"q2=%2.2f N/mm\"%(q[0])\n", - "print \"q3=%2.2f N/mm\\n\"%(q[1])\n", - "\n", - "print \"flange loads :\"\n", - "print \"P(st.4500) = 0\"\n", - "print \"P(st.3000) = %2.2f N (compression)\"%(l3*q[0]-l3*q[1])\n", - "print \"P(st.2250) = %2.1f\"%(46875-l3/2*q1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flow :\n", - "q1=62.50 N/mm\n", - "q2=46.90 N/mm\n", - "q3=15.60 N/mm\n", - "\n", - "flange loads :\n", - "P(st.4500) = 0\n", - "P(st.3000) = 46950.00 N (compression)\n", - "P(st.2250) = 0.0\n" - ] - } - ], - "prompt_number": 84 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter24.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter24.ipynb deleted file mode 100755 index b305a12a..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter24.ipynb +++ /dev/null @@ -1,198 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:217b3507f45091d99aa496d838ab43e552e1e20629747bd44a2cad35220ffe6a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 24: Fuselage frames and wing ribs" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 24.1 Pg.No.638" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import numpy\n", - "import math\n", - "#reference Fig 42.2\n", - "l1=250 #length of each section(mm)\n", - "l2=200 #length of DK(mm)\n", - "l3=100 #length of KH(mm)\n", - "F1=4000\n", - "F2=5000 #forces as shown in Fig 24.1\n", - "theta=60 #force angle from DH (degree)\n", - "\n", - "#solve (i) and (ii) equation\n", - "a=numpy.array([[1,-1],[200,100]])\n", - "b=numpy.array([13.8564,2000])\n", - "q=numpy.linalg.solve(a,b)\n", - "q1=q[0]\n", - "q2=q[1]\n", - "q3=F1*math.cos(math.radians(theta))/(l2+l3)\n", - "q4=F1*math.cos(math.radians(theta))/(l2+l3)+F2/(l2+l3)\n", - "P_A=l1*q1+l1*q3+l1*q4\n", - "P_E=-l1*q2-l1*q3-l1*q4\n", - "P=3464.1\n", - "M_AE=F2*l1+F1/2*3*l1-P*50\n", - "\n", - "P_A=M_AE/(l2+l3)+P/2\n", - "P_E=-M_AE/(l2+l3)+P/2\n", - "\n", - "print \"shear flow as shown in Fig 24.1\\n\"\n", - "print \"q1=%2.2f N/mm\\n\"%(q1)\n", - "print \"q2=%2.2f N/mm\\n\"%(q2)\n", - "print \"q3=%2.2f N/mm\\n\"%(q3)\n", - "print \"q4=%2.2f N/mm\\n\"%(q4)\n", - "\n", - "print \"Stiffener load at point A = %2.2f N/mm(tension)\\n\"%(P_A)\n", - "print \"Stiffener load at point E = %2.2f N/mm(compression)\\n\"%(P_E) #in book another method is also explained" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flow as shown in Fig 24.1\n", - "\n", - "q1=11.29 N/mm\n", - "\n", - "q2=-2.57 N/mm\n", - "\n", - "q3=6.67 N/mm\n", - "\n", - "q4=23.33 N/mm\n", - "\n", - "Stiffener load at point A = 10321.37 N/mm(tension)\n", - "\n", - "Stiffener load at point E = -6857.27 N/mm(compression)\n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 24.2 Pg.No.645" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import numpy as np\n", - "import math\n", - "\n", - "A1=50000\n", - "A2=95000 #area shown in Fig 24.13(mm^2)\n", - "A3=95000\n", - "\n", - "A4=46000\n", - "A5=49000 #area shown in Fig 24.11 (mm^2)\n", - "\n", - "F1=12000\n", - "F2=15000 #forces shown in Fig 24.9 (N)\n", - "\n", - "l1=l3=300\n", - "l2=320 #lengths and angle shown in Fig 24.9\n", - "alpha=15\n", - "\n", - "#solve equation (i)&(iii)\n", - "a=np.array([[600,-600],[190000,290000]])\n", - "b=np.array([12000,440000])\n", - "q=np.linalg.solve(a,b)\n", - "q12=q[0]\n", - "q23=q[1]\n", - "q31=(F2+l1*q23)/l1\n", - "print \"shear flows are shown in Fig 24.9 (flanges)\"\n", - "print \"q12=%2.2f N/mm\"%(q12)\n", - "print \"q23=%2.2f N/mm\"%(q23)\n", - "print \"q31=%2.2f N/mm\\n\"%(q31)\n", - "\n", - "Sy_1=7*l3\n", - "Px4=Px2=2*A1*7/l1\n", - "Py2=Py4=Px4*math.tan(math.radians(alpha))\n", - "q1=(2100-2*625.2)/l1\n", - "P2=P4=(Px4**2+Py4**2)**0.5\n", - "P5=P6=2*((A1+A4)*7-A5*13)/l2\n", - "q2=(7*l1+7*10-13*10)/l2\n", - "q3=(6.4*l2+F2)/l2\n", - "\n", - "M3=2*((A1+A2)*7-A2*13)+F2*l1\n", - "Px1=Px3=M3/l1\n", - "Py1=Py3=3626.2\n", - "P1=P3=(Px1**2+Py1**2)**.5\n", - "q3=(17100-2*Py1)/l1\n", - "\n", - "print \"Loads in webs \"\n", - "print \"P4=P2=%2.2f N\"%(P2)\n", - "print \"P6=P5=%2.2f N\"%(P6)\n", - "print \"P3=P1=%2.2f N\\n\"%(P1)\n", - "\n", - "print \"shear flow in webs\"\n", - "print \"q1=%2.2f N/mm\"%(q1)\n", - "print \"q2=%2.2f N/mm\"%(q2)\n", - "print \"q3=%2.2f N/mm (this value is given at the end of example)\"%(q3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flows are shown in Fig 24.9 (flanges)\n", - "q12=13.00 N/mm\n", - "q23=-7.00 N/mm\n", - "q31=43.00 N/mm\n", - "\n", - "Loads in webs \n", - "P4=P2=2415.64 N\n", - "P6=P5=218.75 N\n", - "P3=P1=14010.73 N\n", - "\n", - "shear flow in webs\n", - "q1=2.83 N/mm\n", - "q2=6.38 N/mm\n", - "q3=32.83 N/mm (this value is given at the end of example)\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter25.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter25.ipynb deleted file mode 100755 index 369a648f..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter25.ipynb +++ /dev/null @@ -1,490 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:806c344ebbd66dd7398f87b7be85af8355708b04b28f0bd902647a641248feff" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 25: Laminated Composite Structures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.1 Pg.No.653" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#variable declaration\n", - "Ee=5000 #youngs modulus of epoxy (N/mm^2)\n", - "Ec=200000 #youngs modulus of carbon (N/mm^2)\n", - "\n", - "# E1=Ef*Af/A+Em+Am/A equation 25.4\n", - "A=50*80 #total area (mm^2)\n", - "Ae=40*80 #area of epoxy (mm^2)\n", - "Ac=10*80 #area of carbon(mm^2)\n", - "L=500 #length of bar(mm)\n", - "vc=0.3 #poisson ratio\n", - "ve=0.2\n", - "\n", - "#effective youngs modulus\n", - "E1=(Ee*Ae+Ec*Ac)/A\n", - "\n", - "load=100*10**3\n", - "sigma1=load/A\n", - "epsilon1=sigma1/E1\n", - "\n", - "delta1=epsilon1*L\n", - "v1t=(ve*Ae+vc*Ac)/A\n", - "epsilon_t=-v1t*epsilon1\n", - "\n", - "thickness=L\n", - "delta_t=-epsilon_t*(thickness)\n", - "\n", - "\n", - "sigma_m=Ee*epsilon1\n", - "sigma_f=Ec*epsilon1\n", - "print \"stresses in epoxy = %2.2f N/mm^2\\n\"%(sigma_m)\n", - "print \"stresses in carbon = %2.2f N/mm^2\\n\"%(sigma_f)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "stresses in epoxy = 2.84 N/mm^2\n", - "\n", - "stresses in carbon = 113.64 N/mm^2\n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.2 Pg.No.657" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "tau=40 #shear stress(N/mm^2)\n", - "G=5000 #shear modulus(N/mm^2)\n", - "v1t=0.3 #poisson ratio \n", - "Et=80000 #youngs modulus in transverse direction(N/mm^2)\n", - "E1=120000 #youngs modulus in longitudinal direction(N/mm^2)\n", - "sigma_x=50 #direction stress in x direciton\n", - "sigma_y=25 #in y direction\n", - "\n", - "\n", - "vt1=v1t*Et/E1 #minor poisson ratio\n", - "\n", - "epsilon1=sigma_x/E1-vt1*sigma_y/Et\n", - "epsilont=sigma_y/Et-v1t*sigma_x/E1\n", - "print \"direct strain in x direction = %2.2e \\n\"%(epsilon1)\n", - "print \"direct strain in y direction = %2.2e \\n\"%(epsilont)\n", - "\n", - "gama1t=tau/G\n", - "print \"shear strain in the ply = %2.2e \\n\"%(gama1t)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "direct strain in x direction = 3.54e-04 \n", - "\n", - "direct strain in y direction = 1.88e-04 \n", - "\n", - "shear strain in the ply = 8.00e-03 \n", - "\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.3 Pg.No.661" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "\n", - "El=150000 #youngs modulus(N/mm^2)\n", - "Et=90000 #youngs modulus(N/mm^2)\n", - "Glt=5000 #shear modulus(N/mm^2)\n", - "vlt=0.3 #poisson ratio\n", - "theta=45 #longitudinal plane inclination\n", - "\n", - "s11=1/El\n", - "s22=1/Et\n", - "s12=-vlt/El\n", - "s33=1/Glt\n", - "\n", - "a=np.array([[53.45,-46.55,1],[-46.55,53.45,0],[-2.2,-2.2,0]])\n", - "b=np.array([60,40,0])\n", - "x=np.dot(a,b)\n", - "print \"strain in the x direction = %4.4e\\n\"%(x[0]*10**-6)\n", - "print \"strain in the y direction = %4.4e\\n\"%(x[1]*10**-6)\n", - "print \"shear strain in the xy plane = %4.4e\\n\"%(x[2]*10**-6)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "strain in the x direction = 1.3450e-03\n", - "\n", - "strain in the y direction = -6.5500e-04\n", - "\n", - "shear strain in the xy plane = -2.2000e-04\n", - "\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.4 Pg.No.664" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "\n", - "l1=150\n", - "t1=1\n", - "l2=100 #dimensions shown in Fig 25.10 (mm)\n", - "t2=2\n", - "Ef=60000 #youngs modulus of flanges(N/mm^2)\n", - "Ew=20000 #youngs modulus of web(N/mm^2)\n", - "P=40*10**3 #axial load(N)\n", - "\n", - "#sum of b*t*E \n", - "sum_btE=2*l2*t2*Ef+l1*t1*Ew\n", - "\n", - "epsilon_z=P/sum_btE #equ 25.37\n", - "P_flange=epsilon_z*l2*t2*Ef\n", - "P_web=epsilon_z*l1*t1*Ew\n", - "print \"axial load in flange = %2.2f kN\\n\"%(P_flange/1000)\n", - "print \"axial load in web = %2.2f kN\\n\"%(P_web/1000)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "axial load in flange = 17.78 kN\n", - "\n", - "axial load in web = 4.44 kN\n", - "\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.5 Pg.No.666" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "\n", - "l1=100\n", - "l2=50\n", - "t1=1 #dimension shown in Fig 25.11 (mm)\n", - "t2=2\n", - "Ef=50000 #youngs modulus of flange(N/mm^2)\n", - "Ew=15000 #youngs modulus of web(N/mm^2)\n", - "Mx=10**6 #bending moment (N.mm)\n", - "My=0\n", - "\n", - "Ixx=2*Ef*l2*t2*l2**2+Ew*t1*l1**3/12\n", - "Iyy=Ef*t2*l1**3/12\n", - "Ixy=Ef*l2*t2*(50)*(50)+Ef*l2*t2*(-50)*(-50)\n", - "\n", - "x=50\n", - "y=50 #point 1\n", - "Ez=50000\n", - "\n", - "sigma_z=Ez*((My*Ixx-Mx*Ixy)/(Ixx*Iyy-Ixy**2)*x + (Mx*Iyy-My*Ixy)/(Ixx*Iyy-Ixy**2)*y)\n", - "print \"direct stress at point 1 = %3.1f N/mm^2\\n\"%(sigma_z)\n", - "x=0\n", - "y=50\n", - "sigma_z=Ez*((My*Ixx-Mx*Ixy)/(Ixx*Iyy-Ixy**2)*x + (Mx*Iyy-My*Ixy)/(Ixx*Iyy-Ixy**2)*y)\n", - "print \"direct stress at point 2 = %3.1f N/mm^2\\n\"%(sigma_z)\n", - "\n", - "x=0\n", - "y=50\n", - "Ez=15000\n", - "sigma_z=Ez*((My*Ixx-Mx*Ixy)/(Ixx*Iyy-Ixy**2)*x + (Mx*Iyy-My*Ixy)/(Ixx*Iyy-Ixy**2)*y)\n", - "print \"direct stress at point 2 in the web = %3.1f N/mm^2\\n\"%(sigma_z)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "direct stress at point 1 = 102.6 N/mm^2\n", - "\n", - "direct stress at point 2 = -51.3 N/mm^2\n", - "\n", - "direct stress at point 2 in the web = -15.4 N/mm^2\n", - "\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.6 Pg.No.668" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "from sympy import symbols, integrate\n", - "\n", - "s=symbols('s')\n", - "\n", - "l12=250\n", - "l23=300\n", - "t31=t12=2 #dimensions shown in Fig 25.12 (mm)\n", - "t23=1.5\n", - "\n", - "P=2*10**3 #shear load(N)\n", - "E12=E31=45000 #youngs modulus of sides given in name(N/mm^2)\n", - "E23=20000\n", - "\n", - "Ixx=2*E12*t12*l12**3*(l23/2/l12)**2/12+E23*t23*l23**3/12\n", - "alpha=math.asin(l23/2/l12)\n", - "\n", - "Sx=0\n", - "Sy=2*10**3\n", - "q12=-E12*Sy/Ixx*integrate(-2*s,(s,0,250))*math.sin(alpha)\n", - "print \"shear flow at point 2 in the flange 12 = %2.2f N/mm\\n\"%(q12)\n", - "\n", - "q23=-E23*Sy/Ixx*integrate(-225+1.5*s,(s,0,300))+22.2\n", - "print \"shear flow at point 3 in the flange 23 = %2.2f N/mm\\n\"%(q23)\n", - "q0=14.2\n", - "\n", - "q12=-E12*Sy/Ixx*integrate(-2*s,s)*math.sin(alpha)-q0\n", - "print \"shear flow in the flange 12 and 31 \"\n", - "print q12\n", - "\n", - "q23=-E23*Sy/Ixx*integrate(-225+1.5*s,s,)+22.2-q0\n", - "print \"\\nshear flow in the web 23\"\n", - "print q23" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear flow at point 2 in the flange 12 = 22.22 N/mm\n", - "\n", - "shear flow at point 3 in the flange 23 = 22.20 N/mm\n", - "\n", - "shear flow in the flange 12 and 31 \n", - "0.000355555555555556*s**2 - 14.2\n", - "\n", - "shear flow in the web 23\n", - "-0.000197530864197531*s**2 + 0.0592592592592593*s + 8.0\n" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.7 Pg.No.671" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "from sympy import symbols, integrate\n", - "\n", - "\n", - "l1=200\n", - "t1=2\n", - "l2=100 #dimensions shown in Fig 25.13 (mm)\n", - "t2=1\n", - "T=10*10**6 #torque applied (N.mm)\n", - "Gl=20000 #laminate shear modulus(N/mm^2)\n", - "Gw=35000 #web shear modulus(N/mm^2)\n", - "A=l1*l2\n", - "\n", - "q=T/2/A\n", - "\n", - "#from eqn 25.47\n", - "int_ds_by_Gt=2*l1/Gl/t1+2*l2/Gw/t2\n", - "\n", - "#Let's say we want to calculate warping at point 1\n", - "#warping at mid of web is zero (W0=0) integrate eqn 25.47 from\n", - "#mid of web to point 1\n", - "W0=0\n", - "A0s=50*100\n", - "W1=W0+q*(l2/2/Gw/t2-int_ds_by_Gt/A*A0s)\n", - "print \"warping at point 1 is = %2.2f mm\\n\"%(W1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "warping at point 1 is = -0.63 mm\n", - "\n" - ] - } - ], - "prompt_number": 66 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.8 Pg.No.673" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import numpy as np\n", - "from sympy import symbols, integrate\n", - "\n", - "l1=50\n", - "t1=2.5\n", - "l2=25 #dimension shown in Fig 18.12(mm)\n", - "t2=1.5\n", - "\n", - "Gl=20000\n", - "Gw=15000 #shear modulus (N/mm^2)\n", - "T=10*10**3 #torque applied (N.mm)\n", - "AR=25*25/2\n", - "GJ=2*Gl*l2*t2**3/3+Gw*l1*t1**3/3\n", - "#eqn 25.49\n", - "dO_dz=T/GJ\n", - "\n", - "t_max12=2*Gl*(t2/2)*dO_dz\n", - "t_max23=2*Gw*(t1/2)*dO_dz\n", - "print \"maximum shear stress in the web = %2.2f N/mm^2\\n\"%(t_max12)\n", - "print \"maximum shear stress in the laminate = %2.2f N/mm^2\\n\"%(t_max23)\n", - "\n", - "W1=-2*AR*dO_dz\n", - "print \"warping at point 1 = %2.2f mm\\n\"%(W1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum shear stress in the web = 59.63 N/mm^2\n", - "\n", - "maximum shear stress in the laminate = 74.53 N/mm^2\n", - "\n", - "warping at point 1 = -1.24 mm\n", - "\n" - ] - } - ], - "prompt_number": 74 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter26.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter26.ipynb deleted file mode 100755 index 994182d0..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter26.ipynb +++ /dev/null @@ -1,82 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:eb3a8ca85b2b3516ec190a12a8401ddf32d140498cd023be9bda6228b1754025" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 26: Closed Section Beams" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 26.3 Pg.No.693" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import solve, symbols\n", - "import math\n", - "\n", - "\n", - "G=20000 #shear modulus (N/mm^2)\n", - "E=G/0.36 #young's modulus\n", - "tau=20 #torque (Nm/mm)\n", - "t=1\n", - "b=200\n", - "a=500\n", - "L=2500\n", - "A=800\n", - "\n", - "#torque at each support \n", - "T=20*5000/2\n", - "\n", - "mu=math.sqrt(8*G*t/(A*E*(b+a)))\n", - "\n", - "z=2500\n", - "F=-1.95/mu*math.cosh(mu*z)+1.75*z**2\n", - "\n", - "z=0 # at mid-span z=0\n", - "theta=10**(-8)*(1.95/mu*math.cosh(mu*z)-1.75*z**2+F)\n", - "print \"twist at mid-span = %1.3f rad = %1.2f degree\"%(theta,theta*180/math.pi)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "twist at mid-span = 0.108 rad = 6.20 degree\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter27.ipynb b/Aircraft_Structures_for_Engineering_Students/Chapter27.ipynb deleted file mode 100755 index bf9485c9..00000000 --- a/Aircraft_Structures_for_Engineering_Students/Chapter27.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:bc596ba82da68e58c73271eb1045592b064349244b750ab69aa9f03ab4de2fbd" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 27: Open Section Beams\n" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 27.2 Pg.No. 735" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#reference Fig 27.20\n", - "\n", - "from __future__ import division\n", - "import math\n", - "from sympy import integrate\n", - "from sympy import solve, symbols\n", - "\n", - "# variable declaration\n", - "P=100 #vertical load (kN)\n", - "A_R=1.25*10**3 #from previous question\n", - "E=200000 #young's modulus (N/mm^2)\n", - "Gama_R=2.08*10**10 #torsion bending constant (mm^6)\n", - "mu=0.54*10**-3 #from previous question\n", - "A=400*5 #area of beam\n", - "\n", - "#moment couple\n", - "M_Tau=-P*2*A_R\n", - "print \"\\nValue of moment couple at the top of column = %2.2e kN.mm^2\"%(M_Tau) #calculation mistake in book\n", - "\n", - "d2tdz2 = M_Tau*10**3/E/Gama_R\n", - "# @z=3000 mm \n", - "D=0.04*10**-3\n", - "z=symbols('z')\n", - "F= -0.08*math.cosh(0)\n", - "\n", - "def theta(z):\n", - " return 0.08*(math.cosh(0.54*10**(-3)*z))\n", - "\n", - "print \"\\ntwist at the top of the column = %2.2f rad\\n\"%(theta(3000))\n", - "\n", - "M_Tau=-E*Gama_R*0.02*10**-6\n", - "print \"value of moment couple at bottom of column=%2.2e N.mm^2\\n\"%(M_Tau)\n", - "\n", - "P=-100*10**3 # stress(N)\n", - "def sigma_z(A_R2):\n", - " return P/A+M_Tau*A_R2/Gama_R\n", - "print \"sigma_z1=sigma_z4=%2.1f N/mm^2\\n\"%(sigma_z(-7.5*10**3))\n", - "print \"sigma_z2=sigma_z3=%2.1f N/mm^2\\n\"%(sigma_z(2.5*10**3))\n", - "\n", - "#please put the value of 2AR from Fig 27.21 in the equation of sigma_z\n", - "#these values in book need correction" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value of moment couple at the top of column = -2.50e+05 kN.mm^2\n", - "\n", - "twist at the top of the column = 0.21 rad\n", - "\n", - "value of moment couple at bottom of column=-8.32e+07 N.mm^2\n", - "\n", - "sigma_z1=sigma_z4=-20.0 N/mm^2\n", - "\n", - "sigma_z2=sigma_z3=-60.0 N/mm^2\n", - "\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 48 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/README.txt b/Aircraft_Structures_for_Engineering_Students/README.txt deleted file mode 100755 index 230418be..00000000 --- a/Aircraft_Structures_for_Engineering_Students/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Prahlad Das -Course: others -College/Institute/Organization: Indian Institute of Technology Bombay -Department/Designation: Aerospace -Book Title: Aircraft Structures for Engineering Students -Author: T. H. G. Megson -Publisher: Linacre House, Jordan Hill, Oxford OX2 8DP, UK -Year of publication: 2012 -Isbn: 978-0-75066-7395 -Edition: fourth edition \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/1.png deleted file mode 100755 index 5a7eb163..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/1.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/2.png b/Aircraft_Structures_for_Engineering_Students/screenshots/2.png deleted file mode 100755 index 39f6cc69..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/2.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/3.png b/Aircraft_Structures_for_Engineering_Students/screenshots/3.png deleted file mode 100755 index ea04181a..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/3.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/a.png b/Aircraft_Structures_for_Engineering_Students/screenshots/a.png deleted file mode 100755 index 7aa51791..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/a.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png deleted file mode 100755 index 7aa51791..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/b.png b/Aircraft_Structures_for_Engineering_Students/screenshots/b.png deleted file mode 100755 index 0f230abf..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/b.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png deleted file mode 100755 index 0f230abf..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/c.png b/Aircraft_Structures_for_Engineering_Students/screenshots/c.png deleted file mode 100755 index ae3f4f00..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/c.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png deleted file mode 100755 index ae3f4f00..00000000 Binary files a/Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png and /dev/null differ diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter01.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter01.ipynb new file mode 100755 index 00000000..7760d8e3 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter01.ipynb @@ -0,0 +1,499 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0f8515032ad257111ffef42eb71b2510ec7d92768034e754ca14b473e010b968" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1. Basic Elasticity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Pg. No.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# variable declaration\n", + "p = 1.5; #pressure inside vessel (N/mm^2)\n", + "d = 2*10**3; #diameter of vessel (mm)\n", + "t = 20; #thickness of plate (mm)\n", + "theta = 60; #plane's inclination to axis of vessel (degree)\n", + "load = 2500*10**3; #axial tensile load (N)\n", + "\n", + "# Longitudinal stress\n", + "sigma_x=p*d/4/t;\n", + "print \"\\nLongitudinal stress due to internal pressure = %5.2f N/mm^2\" %(sigma_x)\n", + "\n", + "#circumferential stress\n", + "sigma_y=p*d/2/t;\n", + "print \"\\nCircumferential stress due to internal pressure = %5.2f N/mm^2\" %(sigma_y)\n", + "\n", + "#axial load\n", + "sigma_x_axial=load/(math.pi*d*t);\n", + "print \"\\ndirect stress due to axial load = %5.2f N/mm^2\"%(sigma_x_axial)\n", + "\n", + "sigma_x=sigma_x+sigma_x_axial; #total longitudinal stress\n", + "\n", + "#direct stress and shear stress on inclined plane AB\n", + "#reference Fig 1.9 pg no14, equation 1.8,1.9 pg no 13\n", + "\n", + "sigma_n=sigma_x*math.pow(math.cos(math.radians(90-theta)),2)+sigma_y*math.pow(math.sin(math.radians(90-theta)),2)\n", + "print \"\\ndirect stress on inclined plane AB = %5.2f N/mm^2\"%(sigma_n)\n", + "\n", + "tau=(sigma_x-sigma_y)/2*math.sin(math.radians(2*(90-theta)))\n", + "print \"\\nshear stress on plane AB = %5.2f N/mm^2\"%(tau)\n", + "\n", + "#maximumm shear stress (theta=45 degree)\n", + "theta=45\n", + "tau=(sigma_x-sigma_y)/2*math.sin(math.radians(2*(90-theta)))\n", + "print \"\\nmaximum shear stress on plane AB = %5.2f N/mm^2\"%(tau)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Longitudinal stress due to internal pressure = 37.50 N/mm^2\n", + "\n", + "Circumferential stress due to internal pressure = 75.00 N/mm^2\n", + "\n", + "direct stress due to axial load = 19.89 N/mm^2\n", + "\n", + "direct stress on inclined plane AB = 61.80 N/mm^2\n", + "\n", + "shear stress on plane AB = -7.62 N/mm^2\n", + "\n", + "maximum shear stress on plane AB = -8.80 N/mm^2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Pg. No.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "load=50*10**3 #axial load (N)\n", + "d=60 #diameter (mm)\n", + "t=1.5 #offset distance from center (mm)\n", + "T=1200*10**3 #torque applied on a point (N.mm)\n", + "theta=60 #angle made by plane wrt axis of cylinder(degree)\n", + "\n", + "#compressive stress due to axial load\n", + "area=math.pi*math.pow(d/2,2) #cross section area\n", + "sigma_x_a=load/area\n", + "print \"\\ncompressive stress due to axial load = %5.1f N/mm^2\"%sigma_x_a\n", + "\n", + "#compressive stress due to bending moment\n", + "#area moment of inertia\n", + "M=load*t\n", + "I=math.pi*d**4/64\n", + "\n", + "sigma_x_b=M*d/2*(1/I)\n", + "print \"\\ncompressive stress due to bending moment = %5.1f N/mm^2\" %sigma_x_b\n", + "\n", + "#total compressive stress\n", + "sigma_x=sigma_x_a+sigma_x_b\n", + "\n", + "#shear stress due to torque Ref example 3.1 equation (iv) pg no 73\n", + "# tau=Tr/J\n", + "J=math.pi*d**4/32 #torsion constant\n", + "tau_xy=T*d/2/J\n", + "print \"\\nshear stress due to torque = %5.1f N/mm^2\" %tau_xy\n", + "\n", + "#direct and shear on inclined plane, ref eq 1.8,1.9\n", + "sigma_y=0\n", + "sigma_n=-sigma_x*math.pow(math.cos(math.radians(90-theta)),2)-tau_xy*math.sin(math.radians(2*(90-theta)))\n", + "print \"\\ndirect stress on inclined plane = %3.1f N/mm^2\"%sigma_n\n", + "\n", + "tau=-sigma_x/2*math.sin(math.radians(2*(90-theta)))+tau_xy*math.cos(math.radians(2*(90-theta)))\n", + "print \"\\nshear stress on inclined plane = %3.1f N/mm^2\"%tau\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "compressive stress due to axial load = 17.7 N/mm^2\n", + "\n", + "compressive stress due to bending moment = 3.5 N/mm^2\n", + "\n", + "shear stress due to torque = 28.3 N/mm^2\n", + "\n", + "direct stress on inclined plane = -40.4 N/mm^2\n", + "\n", + "shear stress on inclined plane = 5.0 N/mm^2\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3, Pg. No.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import numpy\n", + "import math\n", + "#import matplotlib\n", + "%pylab inline\n", + "#from pylab import * #change comment to above line to see undocked graph, all values will be visible as mouse-pointer moves\n", + "#variable declaration\n", + "sigma_x=160 #stress in x direction (N/mm^2)\n", + "sigma_y=-120 #stress in y direction (N/mm^2)\n", + "sigma=200 #stress on inclined plane (N/mm^2)\n", + "\n", + "tau_xy=((sigma-sigma_x)*(sigma-sigma_y))**0.5\n", + "print \"\\nallowable shear stress, tau_xy = %4.1f N/mm^2 \"%tau_xy\n", + "\n", + "coeff=[1,-(sigma_x+sigma_y),sigma_x*sigma_y-tau_xy**2]\n", + "sigma=numpy.roots(coeff)\n", + "print \"\\nprincipal stresses, sigma_I = %3.0f N/mm^2 sigma_II = %3.0f N/mm^2\"%(sigma[0],sigma[1])\n", + "\n", + "tau_max=(abs(sigma[0])+abs(sigma[1]))/2\n", + "print \"\\nmaximum shear stress, tau_max = %3.0f N/mm^2\"%tau_max\n", + "\n", + "#plotting Mohr circle\n", + "x_cent=(sigma_x+sigma_y)/2\n", + "y_cent=0\n", + "\n", + "X1=(sigma_x,tau_xy)\n", + "X2=(sigma_y,-tau_xy)\n", + "\n", + "radius=(math.hypot(X2[0]-X1[0], X2[1] - X1[1]))/2\n", + "\n", + "cir=linspace(0,2*pi,100)\n", + "plot(radius*cos(cir)+x_cent,radius*sin(cir)+y_cent,'r')\n", + "plot(sigma_x,tau_xy,'ro',sigma_y,-tau_xy,'ro',x_cent,y_cent,'b+',sigma[0],0,'bo',sigma[1],0,'bo',20,tau_max,'go')\n", + "text(sigma_x+10,tau_xy,'Q1')\n", + "text(sigma_y+10,-tau_xy,'Q2')\n", + "text(20,tau_max+10,r'$\\tau_{max}$')\n", + "text(-150,0,r'$\\sigma_2$')\n", + "text(200,10,r'$\\sigma_1$')\n", + "text(-20,+10,'O')\n", + "text(30,-20,'C')\n", + "#plot([sigma_y,tau_xy],[sigma_x,-tau_xy],'r-')\n", + "xlabel(r'$\\sigma$')\n", + "ylabel(r'$\\tau$')\n", + "title('Mohr Cirle')\n", + "axis('equal')\n", + "grid(True)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "\n", + "allowable shear stress, tau_xy = 113.1 N/mm^2 \n", + "\n", + "principal stresses, sigma_I = 200 N/mm^2 sigma_II = -160 N/mm^2\n", + "\n", + "maximum shear stress, tau_max = 180 N/mm^2\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEZCAYAAAC99aPhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVNX6+PEPKF7y7jFBQUK5hBQCqZgWRqkgmmZalpxU\nUrtYv9TqeEnrpH1TtJupHeucUlE7qXVK0VRCM7yUoqmkqSkSKCLiJVLIC7f9+2PpKAoKzAx7Zs/z\nfr3mpXvPMPM8bGae2WvttZaTpmkaQgghRBU56x2AEEII+yaFRAghhFmkkAghhDCLFBIhhBBmkUIi\nhBDCLFJIhBBCmEUKiRBVFBcXR1hYmFVfIzY2lmeeeabc+zMyMnB2dqakpMSqcQhxM1JIhEPy8vKi\ndu3anDlzptT+kJAQnJ2dOXr0aLXF8sUXX9ChQwcaNGhAy5Yt6dWrFz/++CMAr732Gp9++mm1xSJE\nVUghEQ7JycmJNm3asGTJEtO+vXv3cuHCBZycnCz+epqmUdbY3w8++ICXX36Z119/nZMnT5KZmcmL\nL77IypUrb/mcRUVFFo9TiKqQQiIc1lNPPcWiRYtM2wsXLmTIkCGlPvDPnj3LkCFDaN68OV5eXkyd\nOvWGgjB27FiaNm1KmzZtSEhIMO0PDw/n9ddf57777qNevXqkp6eX+rmzZ8/y5ptvMnfuXPr160fd\nunWpUaMGvXv3ZsaMGQBMnjyZwYMHA1ebsebPn88dd9xB9+7dbyh6Z8+eZfjw4bRs2RIPDw/eeOMN\nafYSVieFRDise++9l3PnzvHbb79RXFzMsmXLeOq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1btxIWFqZzREJYnsz+K4QVHThwgB9//BFN07j33nsJDAzUOyQhLE4KiRBCCLNI\n05YQQgizSCERQghhFikkQgghzCKFRAghhFmkkAghhDCLFBIhhBBmkUIihBDCLFJIhBBCmOX/A2IJ\nxZVZr61+AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 141 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Pg. No.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#variable declaration\n", + "sigma_x=83 # stress in x direction (N/mm^2)\n", + "sigma_y=65 # stress in y direction (N/mm^2)\n", + "E=200000 # Young's Modulus (N/mm^2)\n", + "v=0.3 # poisson's ratio\n", + "\n", + "# strains in x,y and z directions\n", + "epsln_x=1.0/E*(sigma_x-v*sigma_y)\n", + "epsln_y=1.0/E*(sigma_y-v*sigma_x)\n", + "epsln_z=-v/E*(sigma_x+sigma_y)\n", + "print \"\\nstrain in x direction, epsln_x = %5.3e\"%epsln_x\n", + "print \"\\nstrain in y direction, epsln_y = %5.3e\"%epsln_y\n", + "print \"\\nstrain in z direction, epsln_z = %5.3e\"%epsln_z\n", + "\n", + "tau_max=(sigma_x-sigma_y)/2\n", + "print \"\\nmaximum shear stress, tau_max = %2.2f N/mm^2\"%tau_max\n", + "\n", + "gama_max=2*(1+v)*tau_max/E\n", + "print \"\\nmaximum shear strain, y_max = %2.2e \" %gama_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "strain in x direction, epsln_x = 3.175e-04\n", + "\n", + "strain in y direction, epsln_y = 2.005e-04\n", + "\n", + "strain in z direction, epsln_z = -2.220e-04\n", + "\n", + "maximum shear stress, tau_max = 9.00 N/mm^2\n", + "\n", + "maximum shear strain, y_max = 1.17e-04 \n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5, Pg. No.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#import matplotlib.pyplot as plt\n", + "%pylab inline\n", + "#variable declaration\n", + "sigma_x=60 #stress in x direction (N/mm^2)\n", + "sigma_y=-40 #stress in y direction (N/mm^2)\n", + "tau_xy=50 #shear stress (N/mm^2)\n", + "E=2*10**5 #Young's Modulus (N/mm^2)\n", + "v=0.3 #poisson's ratio\n", + "\n", + "#strains in x and y direction\n", + "epsln_x=1.0/E*(sigma_x-v*sigma_y)\n", + "epsln_y=1.0/E*(sigma_y-v*sigma_x)\n", + "print \"\\nstrains in x and y directions, epsi_x =%4.1e epsi_y =%4.1e \"%(epsln_x,epsln_y) \n", + "\n", + "G=E/2/(1+v)\n", + "print \"\\nshear modulus, G = %6.1f\"%G\n", + "\n", + "gama_xy=tau_xy/G\n", + "print \"\\nshear strain, gama_xy = %4.1e\"%gama_xy\n", + "\n", + "#principal strains\n", + "epsln_I=(epsln_x+epsln_y)/2+1.0/2*((epsln_x-epsln_y)**2+gama_xy**2)**0.5\n", + "epsln_II=(epsln_x+epsln_y)/2-1.0/2*((epsln_x-epsln_y)**2+gama_xy**2)**0.5\n", + "print \"\\nprincipal strains, epsln_I = %4.2e epsln_II = %4.2e\"%(epsln_I,epsln_II)\n", + "\n", + "#inclination\n", + "theta=1.0/2*math.atan(gama_xy/(epsln_x-epsln_y))\n", + "print \"\\ninclination to the plane on which sigma_x acts, theta = %4.1f or %4.1f\"%(theta*180/math.pi,theta*180/math.pi+90)\n", + "\n", + "#plotting Mohr circle\n", + "x_cent=(epsln_x+epsln_y)/2\n", + "y_cent=0\n", + "\n", + "X1=(epsln_x,gama_xy/2)\n", + "X2=(epsln_y,-gama_xy/2)\n", + "\n", + "radius=(math.hypot(X2[0]-X1[0], X2[1] - X1[1]))/2\n", + "print radius\n", + "cir=linspace(0,2*pi,100)\n", + "plot(radius*cos(cir)+x_cent,radius*sin(cir),'r')\n", + "plot(epsln_x,gama_xy/2,'ro',epsln_y,-gama_xy/2,'ro',x_cent,y_cent,'b+',epsln_II,0,'go',epsln_I,0,'go')\n", + "text(epsln_x,gama_xy/2,'Q1')\n", + "text(epsln_y,-gama_xy/2,'Q2')\n", + "text(-0.00050,0,r'$\\epsilon_2$')\n", + "text(.00050,0,r'$\\epsilon_1$')\n", + "text(-.000060,0.00002,'O')\n", + "text(0,0,'C')\n", + "xlabel(r'$\\epsilon$')\n", + "ylabel(r'$\\gamma$')\n", + "title('Mohr Cirle')\n", + "axis('equal')\n", + "grid(True)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "\n", + "strains in x and y directions, epsi_x =3.6e-04 epsi_y =-2.9e-04 \n", + "\n", + "shear modulus, G = 76923.1\n", + "\n", + "shear strain, gama_xy = 6.5e-04\n", + "\n", + "principal strains, epsln_I = 4.95e-04 epsln_II = -4.25e-04\n", + "\n", + "inclination to the plane on which sigma_x acts, theta = 22.5 or 112.5\n", + "0.000459619407771\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEZCAYAAACuIuMVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVWX+wPEPKBoqjZkJKSpy2dwAl2TMVJKQ1BkzW1x+\nGViTNWpmmWllr2xKgZaxsmlsM5dpzGlKIBfCSdGpREotU3BcAmU3BVTSZHt+fxy9iVz2e++5y/f9\net2XncM5937PNzjfe57nOc9xUUophBBCCAtx1TsAIYQQjk0KjRBCCIuSQiOEEMKipNAIIYSwKCk0\nQgghLEoKjRBCCIuSQiOEjlatWsXw4cMt+hmxsbE89NBDdf48OzsbV1dXqqurLRqHcF5SaIRoJh8f\nH9q2bcvp06drrB8wYACurq6cOHHCarH885//ZPDgwXh4eNC1a1fGjh3L119/DcDTTz/Ne++9Z7VY\nhLi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s3brTSUdouuWFTCCGERUnTmRBCCIuSQiOEEMKipNAIIYSwKCk0QgghLEoKjRBCCIuS\nQiOEEMKipNAIIYSwKCk0QgghLEoKjRBCCIuSSTWFsBMbNmwgMzOT0NBQxo4dq3c4QjSaTEEjhB04\nfPgwjzzyCNu2bdM7FCGaTJrOhLADycnJ3HjjjaxevZrjx4/rHY4QTSJNZ0LYgY4dOzJp0qRa09sL\nYQ+k6UwIO3Dx4kXeeOMNAgMD6dWrF8HBwXqHJESjSaERQghhUdJHI4QQwqKk0AghhLAoKTRCCCEs\nSgqNEEIIi5JCI4QQwqKk0AghhLAoKTRCCCEsSgqNEEIIi/p/6nl+EewyCdMAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 185 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, Pg. No.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#variable declaration\n", + "epsln_a=1000*10**(-6) #readings of strain gauges \n", + "epsln_b=-200*10**(-6) #straing gauges 'a' and 'c' are\n", + "epsln_c=-300*10**(-6) #in line and perpendicular to axis of bar\n", + "d=50 #diameter of bar (mm)\n", + "E=70000 #Young's modulus (N/mm^2)\n", + "v=0.3 #poisson's ratio\n", + "\n", + "#principal strains\n", + "epsln_I=1.0/2*(epsln_a+epsln_c)+(1.0/2**0.5)*((epsln_a-epsln_b)**2+(epsln_c-epsln_b)**2)**0.5\n", + "epsln_II=1.0/2*(epsln_a+epsln_c)-(1.0/2**0.5)*((epsln_a-epsln_b)**2+(epsln_c-epsln_b)**2)**0.5\n", + "print \"\\nfirst principal strain, epsln_I = %4.3e\"%epsln_I\n", + "print \"\\nsecond principal strain, epsln_II = %4.3e\"%epsln_II\n", + "\n", + "#principal stresses\n", + "sigma_I=E/(1-v**2)*(epsln_I+v*epsln_II)\n", + "sigma_II=E/(1-v**2)*(v*epsln_I+epsln_II)\n", + "print \"\\nfirst principal stress, sigma_I= %4.1f N/mm^2\"%sigma_I #mistake in book\n", + "print \"\\nsecond principal stress, sigma_II= %4.1f N/mm^2\"%sigma_II\n", + "\n", + "sigma_x=sigma_I+sigma_II\n", + "print \"\\nstress in x direction,sigma_x = %4.1f N/mm^2\"%sigma_x\n", + "\n", + "#axial tensile load calculation\n", + "A=math.pi*d**2/4\n", + "P=sigma_x*A\n", + "print \"\\naxial load, P = %4.1f kN\"%(P/1000)\n", + "\n", + "tau_xy=1.0/2*((sigma_x/2-sigma_II)**2*4-sigma_x**2)**0.5\n", + "print \"\\nshear stress, tau_xy = %4.1f N/mm^2\"%tau_xy\n", + "\n", + "#torque calculation\n", + "J=math.pi*d**4/32\n", + "T=tau_xy*J/d*2\n", + "print \"\\ntorque applied on circular bar, T = %4.1f kNm\"%(T/10**6)\n", + "\n", + "sigma_x=E*epsln_a\n", + "print \"\\naxial stress from classical stress strain relationship, sigma_x =%4.0f N/mm^2\"%sigma_x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "first principal strain, epsln_I = 1.201e-03\n", + "\n", + "second principal strain, epsln_II = -5.015e-04\n", + "\n", + "first principal stress, sigma_I= 80.8 N/mm^2\n", + "\n", + "second principal stress, sigma_II= -10.8 N/mm^2\n", + "\n", + "stress in x direction,sigma_x = 70.0 N/mm^2\n", + "\n", + "axial load, P = 137.4 kN\n", + "\n", + "shear stress, tau_xy = 29.6 N/mm^2\n", + "\n", + "torque applied on circular bar, T = 0.7 kNm\n", + "\n", + "axial stress from classical stress strain relationship, sigma_x = 70 N/mm^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter04.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter04.ipynb new file mode 100755 index 00000000..365fa5fb --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter04.ipynb @@ -0,0 +1,95 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6a67de7af4fe617483b9aefeefdb01f122e2016e5ab212db494104a83b9deeda" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Pg.No.106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "sum_FAFlBL=1263.6*10**6 # (N.mm)\n", + "sum_FAFlDL=880*10**6 # (N.mm)\n", + "E=200000 # young's modulus (N/mm^2)\n", + "A=1800 # area of each member (mm^2)\n", + "\n", + "#eqn 4.23 We=Wi\n", + "del_B=sum_FAFlBL/A/E\n", + "print \"\\ndeflection at point B =%2.2f mm\\n\"%(del_B)\n", + "\n", + "del_D=sum_FAFlDL/A/E\n", + "print \"deflection at point D =%2.2f mm\\n\"%(del_D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "deflection at point B =3.51 mm\n", + "\n", + "deflection at point D =2.44 mm\n", + "\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "ext_load=30 #external load(kN)\n", + "\n", + "#eqn 30*4*del_vB/3=F_BA*del_vB\n", + "F_BA=ext_load*4/3\n", + "print \"\\nforce in the struss AB is = %3.2f kN\\n\"%(F_BA)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "force in the struss AB is = 40.00 kN\n", + "\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter05.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter05.ipynb new file mode 100755 index 00000000..80ef0fbb --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter05.ipynb @@ -0,0 +1,188 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:63d249c5c7d8f61cc0f4f00c6cd8c5c2324721f135176069c7c632118f5681cc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 05: Energy methods" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Pg.No.116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "A=1800 # cross sectional area (mm^2)\n", + "E=200000 #youngs modulus (N/mm^2)\n", + "sum_FLdFdP_B=1268*10**6 #(N.mm^2)\n", + "sum_FLdFdP_D=880*10**6 #(N.mm^2)\n", + "\n", + "del_Bv=sum_FLdFdP_B/A/E\n", + "del_Dh=sum_FLdFdP_D/A/E\n", + "\n", + "print \"\\ndeflection at point B =%2.2f mm\\n\"%(del_Bv)\n", + "print \"deflection at point D =%2.2f mm\\n\"%(del_Dh)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "deflection at point B =3.52 mm\n", + "\n", + "deflection at point D =2.44 mm\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Pg.No.142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "\n", + "a=np.array([[4.32,2.7],[2.7,11.62]])\n", + "b=np.array([27.1,48.11])\n", + "x=np.linalg.solve(a,b)\n", + "print \"\\nX1 = %1.2f kN & R2 = %1.2f kN\\n\"%(x[0],x[1]) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "X1 = 4.31 kN & R2 = 3.14 kN\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Pg.No.144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "E=200000 #youngs modulus (N/mm^2)\n", + "A=200 #cross sectional area of each member (mm^2)\n", + "a=7*10**-6 #linear coefficient of heating (/C)\n", + "L=3*10**3 #length of BC (mm)\n", + "T=30 #temperature of truss (C)\n", + "sum_f2L=48000\n", + "\n", + "expansion=L*T*a\n", + "a11=sum_f2L/A/E\n", + "X1=-0.63/a11 #compatibility condition\n", + "print \"\\nX1 = %5.0f N\\n\"%(X1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "X1 = -525 N\n", + "\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Pg.No.151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "def_C=-1.05-.6 #deflection at C (mm)\n", + "L=300 #length of cantilever (mm)\n", + "\n", + "theta_B=math.atan(def_C/L)\n", + "print \"\\ndeflection at C = %2.3f degree\\n\"%(theta_B*180/math.pi) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "deflection at C = -0.315 degree\n", + "\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter06.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter06.ipynb new file mode 100755 index 00000000..5195a30b --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter06.ipynb @@ -0,0 +1,112 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:902d8cc266f9fb597a0d00273b10ab788d226cbd969bb1e960b465c84a750eef" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 06: Matrix methods" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Pg.No.205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "from sympy import solve, symbols, pprint\n", + "from sympy import diff\n", + "x,y=symbols('x,y')\n", + "\n", + "E=200000 #youngs modulus (N/mm^2)\n", + "nu=0.3 #poissons ratio\n", + "u1=0.001\n", + "u2=0.003\n", + "u3=-0.003 #displacements of corners (m)\n", + "u4=0\n", + "v1=-0.004\n", + "v2=-0.002\n", + "v3=0.001\n", + "v4=0.001\n", + "\n", + "\n", + "a=np.array([[1,-2,-1,2],[1,2,-1,-2],[1,2,1,2],[1,-2,1,-2]])\n", + "b=np.array([u1,u2,u3,u4])\n", + "alpha=np.linalg.solve(a,b)\n", + "alpha1=alpha[0]\n", + "alpha2=alpha[1]\n", + "alpha3=alpha[2]\n", + "alpha4=alpha[3]\n", + "\n", + "a=np.array([[1,-2,-1,2],[1,2,-1,-2],[1,2,1,2],[1,-2,1,-2]])\n", + "b=np.array([v1,v2,v3,v4])\n", + "alpha=np.linalg.solve(a,b)\n", + "alpha5=alpha[0]\n", + "alpha6=alpha[1]\n", + "alpha7=alpha[2]\n", + "alpha8=alpha[3]\n", + "\n", + "u=alpha1+alpha2*x+alpha3*y+alpha4*x*y\n", + "v=alpha5+alpha6*x+alpha7*y+alpha8*x*y\n", + "\n", + "ex=diff(u,x)\n", + "ey=diff(v,y)\n", + "Yxy=diff(u,y)+diff(v,x)\n", + "\n", + "ex=-0.000125\n", + "ey=.002\n", + "Yxy=-0.0015\n", + "\n", + "sigma_x=E/(1-nu**2)*(ex+nu*ey)\n", + "sigma_y=E/(1-nu**2)*(ey+nu*ex)\n", + "print \"longitudinal stress in x direction = %3.1f N/mm^2\"%(sigma_x)\n", + "print \"longitudinal stress in y direction = %3.1f N/mm^2\"%(sigma_y)\n", + "\n", + "T_xy=E/2/(1+nu)*Yxy\n", + "print \"shear stress at the center of plate = %3.1f N/mm^2\"%(T_xy)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "longitudinal stress in x direction = 104.4 N/mm^2\n", + "longitudinal stress in y direction = 431.3 N/mm^2\n", + "shear stress at the center of plate = -115.4 N/mm^2\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter08.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter08.ipynb new file mode 100755 index 00000000..65ccbf76 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter08.ipynb @@ -0,0 +1,154 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d4ab160ecba8745ef027bb167a7abbd97977707c483b1d0a639c7f068e2016a8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 08: Columns" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Pg.No.280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "E=75000 #youngs modulus(N/mm^2)\n", + "G=21000 #shear modulus (N/mm^2)\n", + "L=2 #length of column (m)\n", + "l1=75 #flange length (mm)\n", + "l2=37.5 #total length(mm)\n", + "t=2.5 #thickness(mm)\n", + "\n", + "A=t*(2*l2+l1) #observed from Fig 8.17\n", + "\n", + "#chapter 16 Ixx=bd^3/12+Ab^2\n", + "Ixx=2*l2*t*l2**2+t*l1**3/12\n", + "Iyy=2*t*l2**3/12\n", + "\n", + "I0=Ixx+Iyy\n", + "\n", + "#eqn 18.11 J=SUM((s*t^3)/3)\n", + "J=2*l2*t**3/3+l1*t**3/3\n", + "\n", + "Gama=t*l2**3*l1**2/24\n", + "Iyy=0.22*10**5\n", + "L=2*10**3\n", + "P_CRxx=math.pi**2*E*Ixx/L**2\n", + "P_CRyy=math.pi**2*E*Iyy/L**2\n", + "P_CRo=A/I0*(G*J+math.pi**2*E*Gama/L**2)\n", + "\n", + "print \"P_CRxx = %3.2e N\\n\"%(P_CRxx)\n", + "print \"P_CRyy = %0.1e N\\n\"%(P_CRyy)\n", + "print \"P_CRO = %0.2e N\\n\"%(P_CRo)\n", + "\n", + "print \"therefore buckling in the column due to axial load=%0.1e N\\n\"%(P_CRyy)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P_CRxx = 6.51e+04 N\n", + "\n", + "P_CRyy = 4.1e+03 N\n", + "\n", + "P_CRO = 2.22e+04 N\n", + "\n", + "therefore buckling in the column due to axial load=4.1e+03 N\n", + "\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Pg.No.282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "from sympy import solve, symbols, pprint\n", + "from sympy import diff\n", + "P=symbols('P')\n", + "\n", + "E=70000 #youngs modulus (N/mm^2)\n", + "G=30000 #shear modulus (N/mm^2)\n", + "x_S=-76.2 #position of shear center(mm)\n", + "l1=l2=100 #lengths (mm)\n", + "t=2 #thickness(mm)\n", + "\n", + "x_bar=2*t*l1*50/(3*l1)/2\n", + "\n", + "A=600 #area (mm^2)\n", + "Ixx=1.17*10**6 #second moment of area (mm^4)\n", + "Iyy=0.67*10**6 #second moment of area (mm^4)\n", + "I0=5.32*10**6 # total second moment of area (mm^4)\n", + "J=800 #torsion constant (mm^4)\n", + "Gama=2488*10**6 #(mm^6)\n", + "L=10**3 #(mm)\n", + "\n", + "P_CRxx=math.pi**2*E*Ixx/L**2\n", + "P_CRyy=math.pi**2*E*Iyy/L**2\n", + "P_CRo=A/I0*(G*J+math.pi**2*E*Gama/L**2)\n", + "\n", + "fun=P**2*(1-A*x_S**2/I0)-P*(P_CRxx+P_CRo)+P_CRxx*P_CRo\n", + "solution = solve(fun, P)\n", + "print \"lowest value of critical load = %1.2e N\\n\"%(min(solution))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lowest value of critical load = 1.68e+05 N\n", + "\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter09.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter09.ipynb new file mode 100755 index 00000000..119bd5b2 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter09.ipynb @@ -0,0 +1,97 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:47a0669d4632eab71f162a005cd6d69531f951e47ad9f34d928b679209ff2467" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 09: Thin plates" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Pg.No.310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "h=400 #height of structure (mm)\n", + "l1=300 #length of small section (mm)\n", + "L=1200 #length of whole structure (mm)\n", + "E=70000 #youngs modulus (N/mm^2)\n", + "A_f=350 #area of flange (mm^2)\n", + "A_s=300 # area of stiffeners (mm^2)\n", + "t=2 #thickness (mm)\n", + "I=2000 #second moment of area (mm^4)\n", + "w=5\n", + "#eqn 9.29 tan(a)^4=(1+td/2A_F)/(1+td/2A_S)\n", + "alpha=math.atan(((1+t*h/2/A_f)/(1+t*l1/A_s))**0.25)\n", + "\n", + "#eqn 9.19\n", + "F_T=w*L/h+w/2/math.tan((alpha))\n", + "\n", + "#eqn 9.25 M_max=w*b^2*tan(a)/12/d\n", + "M_max=w*10**3*l1**2*math.tan(alpha)/12/h\n", + "print \"maximum value of bending moment = %1.1e N.mm \\n\"%(M_max)\n", + "\n", + "#eqn 9.23 P=w*b*tan(a)/d\n", + "P=w*l1*math.tan(alpha)/h\n", + "print \"compressive load in stiffener = %1.1f kN \\n\"%(P)\n", + "\n", + "#eqn 9.24 le=d/(4-2b/d)^0.5\n", + "le=h/(4-2*l1/h)**0.5\n", + "print \"equivalent length of stiffener = %3.1f mm\\n\"%(le)\n", + "\n", + "#eqn 8.7 Pcr=pi^2*E*I/le^2\n", + "P_CR=math.pi**2*E*I/le**2\n", + "print \"buckling load of a stiffener = %2.1f kN \\n\"%(P_CR) #approx. value in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of bending moment = 8.6e+04 N.mm \n", + "\n", + "compressive load in stiffener = 3.4 kN \n", + "\n", + "equivalent length of stiffener = 253.0 mm\n", + "\n", + "buckling load of a stiffener = 21589.8 kN \n", + "\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter12.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter12.ipynb new file mode 100755 index 00000000..63daef6d --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter12.ipynb @@ -0,0 +1,111 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:217c546250d736c4a5ad9b469b73a9b7209b5ff1e5db79ce32388be8ee290870" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Structural components of aircraft" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Pg.No. 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "D=4 #diameter of rivet(mm)\n", + "t_skin=2.5 #thickness of fuselage skin(mm)\n", + "t_strap=1.2 #thickness of straps (mm)\n", + "T=120 #shear stress (N/mm^2)\n", + "A=math.pi*D**2/4 #rivet area\n", + "Pfb=2*A*T\n", + "\n", + "b=Pfb/t_skin/12.5/10+4\n", + "print \"allowable rivet spacing = %2.1f mm \\n\"%(b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "allowable rivet spacing = 13.7 mm \n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Pg.No.392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "l1=20 #distace between A&D (mm)\n", + "l2=25 #distace between C&D (mm)\n", + "l3=75 #distace between C&force location (mm)\n", + "P=5 #external load(kN)\n", + "r=(l1**2+l2**2)**0.5\n", + "sum_r2=2*l1**2+4*r**2\n", + "\n", + "#eqn 12.6 S=Pe*r/Sum(r2)\n", + "Pe=P*l3\n", + "S=Pe/sum_r2*r\n", + "print \"Resultant shear force in the A and B = %2.2f kN\\n\"%(S)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant shear force in the A and B = 2.45 kN\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter14.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter14.ipynb new file mode 100755 index 00000000..f9eb3f9d --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter14.ipynb @@ -0,0 +1,226 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b89c31a3eb13c71dc64b90ec9c5fad56707d91451229ae687a102dc5e6c2ee23" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Airframe loads" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Pg.No.407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "W=45 #weight of aircraft (kN)\n", + "m=45/9.8 #mass of aircraft(k-kg)\n", + "a=3*9.8 #deceleration due to cable (ms^-2)\n", + "m1=4.5/9.8 #weight of aircraft after AA in Diagram (k-kg)\n", + "v0=25 #touch down speed (m/s)\n", + "alpha=10 #center line angle with ground (degree)\n", + "\n", + "T=m*a/math.cos(math.radians(alpha))\n", + "print \"tension in cable = %3.1f kN\\n\"%(T)\n", + "\n", + "R=W+T*math.sin(math.radians(alpha))\n", + "print \"load on each undercarriage strut = %2.1f kN\\n\"%(R/2/math.cos(math.radians(20)))\n", + "\n", + "N=T+m1*9.8*math.sin(math.radians(alpha))-m1*a*math.cos(math.radians(alpha))\n", + "S=m1*a*math.sin(math.radians(alpha))+m1*9.8*math.cos(math.radians(alpha))\n", + "print \"N and S forces are shown in Fig 14.4 N=%2.2f kN S=%2.2f kN\\n\"%(N,S)\n", + "\n", + "s=v0**2/2/a\n", + "print \"length of deck covered = %2.2f m\\n\"%(s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "tension in cable = 137.1 kN\n", + "\n", + "load on each undercarriage strut = 36.6 kN\n", + "\n", + "N and S forces are shown in Fig 14.4 N=124.57 kN S=6.78 kN\n", + "\n", + "length of deck covered = 10.63 m\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Pg.No.409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "g=9.8\n", + "W=250 #weight of aircraft(kN)\n", + "m=250/g #mass of aircraft (K-kg)\n", + "I_CG=5.65*10**8 #inertia about center of mass(N.s^2.mm)\n", + "v0=3.7 #vertical velocity of undercarriage(m/s)\n", + "R_h=400 #horizontal reaction (kN)\n", + "R_v=1200 #vertical reaction (kN)\n", + "l=1 # nose wheel distance from ground (m)\n", + "d=2.5 # distance of CG from ground (m)\n", + "\n", + "#horizontal equilibrium\n", + "ax=R_h/m\n", + "\n", + "#vertical equilibrium\n", + "ay=(R_v-W)/m\n", + "\n", + "\n", + "alpha=(R_v*l+R_h*d)*10**6/I_CG\n", + "print \"angular acceleration of aircraft = %2.1f rad/s^2 \\n\"%(alpha)\n", + "\n", + "#v=v0+ay*t\n", + "t=v0/ay\n", + "print \"time taken for vertical velocity to become zero = %1.3f s\\n\"%(t)\n", + "\n", + "#w=w0+a*t\n", + "w=a*t\n", + "print \"angular velocity of aircraft = %1.2f rad/s \\n\"%(w)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angular acceleration of aircraft = 3.9 rad/s^2 \n", + "\n", + "time taken for vertical velocity to become zero = 0.099 s\n", + "\n", + "angular velocity of aircraft = 0.39 rad/s \n", + "\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Pg.No.414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "W=8000 #weight of aircraft (N)\n", + "n=4.5 # wing loading\n", + "S=14.5 #wing area (m^2)\n", + "V=60 #speed (m/s)\n", + "rho=1.223 #density (kg/m^3)\n", + "alpha=13.75 #from Fig 14.8 (a)\n", + "C_Mcg=0.075 #from Fig 14.8 (a)\n", + "c=1.35 #mean chord (m)\n", + "\n", + "\n", + "L=n*W\n", + "C_L=L/(0.5*rho*V**2*S)\n", + "print \"lift coefficient of aircraft = %1.3f \\n\"%(C_L)\n", + "\n", + "#from Fig 14.8 (b)\n", + "l=4.18*math.cos(math.radians(alpha-2))+0.31*math.sin(math.radians(alpha-2))\n", + "print \"length of tail arm = %1.3f m \\n\"%(l)\n", + "\n", + "\n", + "C_L=C_L-c/l*C_Mcg\n", + "print \"lift coefficient =%1.3f \\n\"%(C_L)\n", + "\n", + "alpha=13.3\n", + "l=4.18*math.cos(math.radians(alpha-2))+0.31*math.sin(math.radians(alpha-2))\n", + "print \"Now tail arm length = %2.3f m\\n\"%(l)\n", + "\n", + "L=0.5*rho*V**2*S*C_L\n", + "print \"Lift = %5.1f N\\n\"%(L)\n", + "\n", + "P=n*W-35000\n", + "print \"Tail Load = %5.1f N\\n\"%(P)\n", + "\n", + "D=0.5*rho*V**2*S*0.0875\n", + "print \"Drag = %5.1f N\\n\"%(D)\n", + "print \"Forward inertia force = %5.1f N\\n\"%(D) #eqn 14.13" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lift coefficient of aircraft = 1.128 \n", + "\n", + "length of tail arm = 4.156 m \n", + "\n", + "lift coefficient =1.103 \n", + "\n", + "Now tail arm length = 4.160 m\n", + "\n", + "Lift = 35222.3 N\n", + "\n", + "Tail Load = 1000.0 N\n", + "\n", + "Drag = 2793.0 N\n", + "\n", + "Forward inertia force = 2793.0 N\n", + "\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter15.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter15.ipynb new file mode 100755 index 00000000..a849c8c6 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter15.ipynb @@ -0,0 +1,76 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1bd6512f5b9ca8155cc1e9c3b04ad8207681499e095afaf4830a217017e989ea" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Fatigue" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Pg.No.445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from scipy import integrate\n", + "from sympy import symbols\n", + "import math\n", + "\n", + "#eqn 15.30 K=S(pi*a)^1/2*alpha\n", + "S=175 #stress range (N/mm^2)\n", + "K=1708 #fracture toughness (n/mm^3/2)\n", + "alpha=1 #constant\n", + "n=4 #constant\n", + "C=40*10**-15 #rate of crack growth (mm/cycle)\n", + "ai=0.1 #initial crack length\n", + "\n", + "alpha_f=K**2/S**2/math.pi\n", + "\n", + "\n", + "Nf=2/C/(n-2)/(S*math.pi**0.5)**n*(1/ai**((n-2)/2)-1/alpha_f**((n-2)/2))\n", + "print \"Number of cycles to failure = %5.0f cycles\\n\"%(Nf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of cycles to failure = 26919 cycles\n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter16.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter16.ipynb new file mode 100755 index 00000000..72ff7ec3 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter16.ipynb @@ -0,0 +1,280 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c3ab3016805321c8a28748b1937c77b2125357dfc661b20013df0624feaa950e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Bending of open and closed thin-walled beams \n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 Pg. No.456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Fig 16.6 Dimensions\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#variable declaration\n", + "l=300 #length of I section (mm)\n", + "b=200 #width of I section beam (mm)\n", + "w1=25 #width of center section of I beam (mm)\n", + "w2=20 #width of upper and lower section of I beam (mm)\n", + "M=100*10**6 #moment applied in vertical plane (N*mm)\n", + "\n", + "#second moment of area Ixx\n", + "# Ixx=b*l^3/12\n", + "Ixx=b*l**3/12-(b-w1)*(l-w2-w2)**3/12\n", + "print \"\\nSecond moment of area of I section beam = %5.3e mm^4\"%(Ixx)\n", + "\n", + "#sigma_z=My/I reference 16.9\n", + "# @ \n", + "y=150\n", + "sigma_z=M*y/Ixx\n", + "print \"\\ndirect stress at the top of the I section (y=150) = %3.2f N/mm^2 (compression)\"%(sigma_z)\n", + "\n", + "# @\n", + "y=-150\n", + "sigma_z=M*y/Ixx\n", + "print \"\\ndirect stress at the bottom of the I section (y=-150) = %3.2f N/mm^2 (tension)\"%(sigma_z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Second moment of area of I section beam = 1.937e+08 mm^4\n", + "\n", + "direct stress at the top of the I section (y=150) = 77.45 N/mm^2 (compression)\n", + "\n", + "direct stress at the bottom of the I section (y=-150) = -77.45 N/mm^2 (tension)\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Pg. No.457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Fig 16.6 reference\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#variable declaration\n", + "l=300 #length of I section (mm)\n", + "b=200 #width of I section beam (mm)\n", + "w1=25 #width of center section of I beam (mm)\n", + "w2=20 #width of upper and lower section of I beam (mm)\n", + "M=100*10**6 #moment applied in vertical plane (N*mm)\n", + "\n", + "# second moment of area\n", + "# Iyy=wb^3/12\n", + "Iyy=2*20*200**3/12+260*25**3/12\n", + "print \"\\nSecond moment of area of I section beam = %5.3e mm^4\"%(Iyy)\n", + "\n", + "#sigma_z=Mx/I \n", + "# @ \n", + "x=100\n", + "sigma_z=M*x/Iyy\n", + "print \"\\ndirect stress at the top of the I section (y=150) = %3.2f N/mm^2 (compression)\"%(sigma_z)\n", + "\n", + "# @\n", + "x=-100\n", + "sigma_z=M*x/Iyy\n", + "print \"\\ndirect stress at the bottom of the I section (y=-150) = %3.2f N/mm^2 (tension)\"%(sigma_z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Second moment of area of I section beam = 2.701e+07 mm^4\n", + "\n", + "direct stress at the top of the I section (y=150) = 370.30 N/mm^2 (compression)\n", + "\n", + "direct stress at the bottom of the I section (y=-150) = -370.30 N/mm^2 (tension)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 Pg.No.458 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#variable declaration\n", + "l=300 #length of I section (mm)\n", + "b=200 #width of I section beam (mm)\n", + "w1=25 #width of center section of I beam (mm)\n", + "w2=20 #width of upper and lower section of I beam (mm)\n", + "M=100*10**6 #moment applied in vertical plane (N*mm)\n", + "theta=30 #angle at which bending moment is applied(degree)\n", + "\n", + "Mx=M*math.cos(math.radians(30))\n", + "My=M*math.sin(math.radians(30))\n", + "\n", + "# sigma_z=Mx/Ixx*y+My/Iyy*x\n", + "# @top left hand corner\n", + "y=150\n", + "x=-100\n", + "sigma_z=Mx/Ixx*y-My/Iyy*x \n", + "print \"\\ndirect stress at the top left hand corner = %3.1f N/mm^2 (tension)\"%(sigma_z)\n", + "\n", + "# @ top right hand corner\n", + "x=100\n", + "y=150\n", + "sigma_z=Mx/Ixx*y-My/Iyy*x \n", + "print \"\\ndirect stress at the top right hand corner = %3.1f N/mm^2 (compression)\"%(sigma_z)\n", + "\n", + "alpha=math.atan(My*Ixx/Mx/Iyy)\n", + "print \"\\ninclination = %3.1f degree\\n\"%(alpha*180/math.pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "direct stress at the top left hand corner = 252.2 N/mm^2 (tension)\n", + "\n", + "direct stress at the top right hand corner = -118.1 N/mm^2 (compression)\n", + "\n", + "inclination = 76.4 degree\n", + "\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 Pg.No.466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# reference Fig 16.13\n", + "import math\n", + "from __future__ import division\n", + "#variable declaration\n", + "l=80 #length of one section (mm)\n", + "w=8 #thickness of each section (mm)\n", + "b1=40 #width of one section (mm)\n", + "b2=80 #width of other section (mm)\n", + "Mx=1500*10*3 #bending moment (N.mm)\n", + "My=0\n", + "\n", + "#centroid\n", + "# in this example C is taken at top surface x axis aligned to AB and y axis is \n", + "# aligned to E surface \n", + "y_bar=((b1+b2)*w*w/2+l*w*(w+l/2))/(l*w+(b1+b2)*w)\n", + "print \"\\ny coordinate of centroid = %3.1f mm\"%(y_bar)\n", + "\n", + "x_bar=((b1+b2)*w*((b1+b2)/2-b1+w/2)+l*w*(w/2))/(l*w+(b1+b2)*w)\n", + "print \"\\nx coordinate of centroid = %3.1f mm\"%(x_bar)\n", + "\n", + "#second area of moment\n", + "#IB=IC+Ab^2 IB=moment about any point,IC=moment about centroid, b=distace between both points\n", + "Ixx=(b1+b2)*w**3/12+(b1+b2)*w*(y_bar-w/2)**2+w*l**3/12+l*w*(w+l/2-y_bar)**2\n", + "print \"\\nsecond moment of area about x axis = %3.2e mm^4\"%(Ixx)\n", + "\n", + "Iyy=w*(b1+b2)**3/12+(b1+b2)*w*((b1+b2)/2-b1+w/2-x_bar)**2+l*w**3/12+l*w*(x_bar-w/2)**2\n", + "print \"\\nsecond moment of area about y axis = %3.2e mm^4\"%(Iyy)\n", + "\n", + "Ixy=(b1+b2)*w*(y_bar-w/2)*((b1+b2)/2-b1+w/2-x_bar)+l*w*(w+l/2-y_bar)*(x_bar-w/2)\n", + "print \"\\nsecond moment of area about x and y axis = %3.2e mm^4\"%(Ixy)\n", + "\n", + "Mx=15*10**5\n", + "def f(x,y):\n", + " return Mx*(Iyy*y-Ixy*x)/(Ixx*Iyy-Ixy**2)\n", + "sigma_z_max= f(-8,-66.4)\n", + "print \"\\nmaximum direct shear stress = %3.0f N/mm^2 (compressive)\\n\"%(sigma_z_max)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "y coordinate of centroid = 21.6 mm\n", + "\n", + "x coordinate of centroid = 16.0 mm\n", + "\n", + "second moment of area about x axis = 1.09e+06 mm^4\n", + "\n", + "second moment of area about y axis = 1.31e+06 mm^4\n", + "\n", + "second moment of area about x and y axis = 3.38e+05 mm^4\n", + "\n", + "maximum direct shear stress = -96 N/mm^2 (compressive)\n", + "\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter18.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter18.ipynb new file mode 100755 index 00000000..b0550214 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter18.ipynb @@ -0,0 +1,155 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a16e0822e0e7167e54e1f4ffc425aa7247562532992f7dee46fc87221365735a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Torsion of Beams" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1 Pg.No.527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#variable declaration\n", + "r=100 #radius of cylinder (mm)\n", + "l=2*10**3 #length of cylinder (mm)\n", + "torque=30*10**6 #torque at mid point (N.mm)\n", + "Tmax=15*10**6 \n", + "Tau_max=200 #max shear stress (N/mm^2)\n", + "G=25000 #shear modulus (N/mm^2)\n", + "theta =2 # rotation at mid point (degree)\n", + "\n", + "#ref equation 18.1 T=2Aq\n", + "tmin1=Tmax/(2*math.pi*r**2*Tau_max)\n", + "print \"\\nminimum thickness of beam due to stress limited to 200N/mm^2 = %3.1f mm\"%(tmin1)\n", + "\n", + "z=1*10**3 # twist at mid point (mm)\n", + "#equation 18.4 after integration\n", + "tmin2=Tmax*200*math.pi*z/(4*(math.pi*r**2)**2*G*theta*math.pi/180)\n", + "print \"\\nminimum thickness due to constraint on maximum angle twist = %3.1f mm\"%(tmin2)\n", + "t=max(tmin1,tmin2)\n", + "print \"\\nthickness which satisfies both conditions = %3.1f mm\"%(t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "minimum thickness of beam due to stress limited to 200N/mm^2 = 1.2 mm\n", + "\n", + "minimum thickness due to constraint on maximum angle twist = 2.7 mm\n", + "\n", + "thickness which satisfies both conditions = 2.7 mm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3 Pg.No 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#reference Fig 18.12\n", + "from __future__ import division\n", + "import math\n", + "from sympy import symbols\n", + "from sympy import integrate\n", + "\n", + "S1,S2,S3=symbols('S1,S2,S3')\n", + "\n", + "#variable declaration\n", + "s1=50 #length of channel (mm)\n", + "s2=25 #width of channel (mm)\n", + "t1=2.5 #thickness of web(mm)\n", + "t2=1.5 #thickness of flange(mm)\n", + "T=10*10**3 #torque applied (N.mm)\n", + "zeta_s=8.04 \n", + "G=25000 #shear modulus (N/mm^2)\n", + "\n", + "#J=Sum(st^3/3)\n", + "J=1/3*(s1*t1**3+2*s2*t2**3)\n", + "tau_max=t1*T/J\n", + "print \"maximum shear stress = %3.1f N/mm^2\"%(tau_max)\n", + "\n", + "#in region O2\n", + "s1=25\n", + "ARf=1/2*zeta_s*s1\n", + "ws=-2*ARf*T/(G*J)\n", + "print \"warping in O2 region is linear = %3.2f mm\"%(ws)\n", + "\n", + "#in the wall 21\n", + "AR=1/2*zeta_s*s2-0.5*25*s2\n", + "w21=-0.03*(zeta_s-s2)\n", + "s1=50\n", + "tds=2*s2*t2+s1*t1\n", + "\n", + "A12=25/2*S1\n", + "A23=312.5-4.02*S2\n", + "A34=111.5+25/2*S3\n", + "AR1=1/2*(integrate(A12,(S1,0,25))+integrate(5*(A23),(S2,0,50))+integrate(3*A34,(S3,0,25)))/200\n", + "\n", + "#equation 18.20\n", + "ws=-2*ARf*T/G/J\n", + "print \"warping distribution in flange 34 = %1.2f \\n\"%(ws)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum shear stress = 78.9 N/mm^2\n", + "warping in O2 region is linear = -0.25 mm\n", + "warping distribution in flange 34 = -0.25 \n", + "\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter19.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter19.ipynb new file mode 100755 index 00000000..c6a6c12b --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter19.ipynb @@ -0,0 +1,160 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8abe3316b17e7378affc20eb461733ec12ced2dbb39d65e4c948dd2ef8dc33e9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Combined open and closed section beams" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1 Pg.No. 552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from scipy import integrate\n", + "from sympy import *\n", + "import math\n", + "\n", + "l1=100 #lengths shown in Fig(mm)\n", + "l2=200\n", + "F=100*10**3 #force applied (N)\n", + "\n", + "y_bar=(2*l1*2*50+2*l2*2*l1+l2*2*l2)/(4*l1*2+4*l2*2)\n", + "Ixx=2*(2*l1**3/12+2*l1*25**2)+400*2*75**2+l2*2*125**2+2*(2*l2**3/12+2*l2*25**2)\n", + "\n", + "s1=Symbol('s1')\n", + "q12=-round(10**4*F/Ixx)/10**4*(integrate(-50+2*s1,s1))\n", + "print \"\\nq12 = %s\"%(q12)\n", + "\n", + "s2=Symbol('s2')\n", + "q23=-round(10**4*F/Ixx)/10**4*(integrate(2*75,s2))-34.5\n", + "print \"\\nq23 = %s\"%(q23)\n", + "\n", + "s3=Symbol('s3')\n", + "q03=-round(10**4*F/Ixx)/10**4*(integrate(2*75,s3))\n", + "print \"\\nq03 = %s\"%(q03)\n", + "\n", + "s4=Symbol('s4')\n", + "q34=-round(10**4*F/Ixx)/10**4*(integrate(2*(75-s4),s4))-242.5\n", + "print \"\\nq34 = %s\"%(q34)\n", + "\n", + "s5=Symbol('s5')\n", + "q94=-round(10**4*F/Ixx)/10**4*(integrate(-2*125,s5))\n", + "print \"\\nq94 = %s\\n\"%(q94)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "q12 = -0.0069*s1**2 + 0.345*s1\n", + "\n", + "q23 = -1.035*s2 - 34.5\n", + "\n", + "q03 = -1.035*s3\n", + "\n", + "q34 = 0.0069*s4**2 - 1.035*s4 - 242.5\n", + "\n", + "q94 = 1.725*s5\n", + "\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 Pg.No.555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from scipy import integrate\n", + "from sympy import symbols\n", + "import math\n", + "\n", + "A=20000 #nose cell area (mm^2)\n", + "L_w=900 #outer wall (mm)\n", + "L=300 #width of wall (mm)\n", + "length=600 #length of open section (mm)\n", + "G=25000 #shear modulus (N/mm^2)\n", + "T=10*10**6 #torque applied (kN.m)\n", + "t1=1.5 #thickness of closed section\n", + "t2=2 #thickness of open section\n", + "\n", + "GJ_cl=4*A**2*G/(L_w+L)*t1\n", + "\n", + "print \"torsoinal rigidity of closed section = %2.2e N.mm^2 \\n\"%(GJ_cl)\n", + "\n", + "GJ_op=G*(length+L)*t2**3/3\n", + "print \"torsional rigidity of open section = %2.1e N.mm^2 \\n\"%(GJ_op)\n", + "\n", + "GJ=GJ_cl+GJ_op\n", + "print \"total torsional rigidity = %5.3e N.mm^2\\n\"%(GJ)\n", + "\n", + "dO_by_dz=T/GJ\n", + "print \"angle of twist per unit length = %1.4f rad/mm\\n\"%(dO_by_dz)\n", + "\n", + "q_cl=GJ_cl/2/A*dO_by_dz\n", + "print \"maximum shear stress in the closed section = %3.1f N/mm^2\\n\"%(q_cl/1.5)\n", + "\n", + "#eqn 18.10 T_max=GtdO/dz\n", + "T_max=G*t2*dO_by_dz\n", + "print \"maximum shear stress in the open section = %2.0f N/mm^2\\n\"%(T_max)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "torsoinal rigidity of closed section = 5.00e+10 N.mm^2 \n", + "\n", + "torsional rigidity of open section = 6.0e+07 N.mm^2 \n", + "\n", + "total torsional rigidity = 5.006e+10 N.mm^2\n", + "\n", + "angle of twist per unit length = 0.0002 rad/mm\n", + "\n", + "maximum shear stress in the closed section = 166.5 N/mm^2\n", + "\n", + "maximum shear stress in the open section = 10 N/mm^2\n", + "\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter20.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter20.ipynb new file mode 100755 index 00000000..4595d055 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter20.ipynb @@ -0,0 +1,286 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bb71ed7156eb25f3e97cd3ba07ae31557b447cbcd71b351505ee32010461a02e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Structural idealization" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.1 Pg.No.560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "sigma6=200\n", + "sigma1=200\n", + "sigma2=sigma5=150 #these are not real shear stress but taken \n", + "sigma3=sigma4=100 #proportional to length because we need just ratio\n", + "l16=400 \n", + "t16=3\n", + "l12=l21=600\n", + "t12=t21=2 #thickness and lengths as shown in Fig 20.4\n", + "l23=600\n", + "t23=1.5\n", + "l25=300\n", + "t25=2.5\n", + "l34=200\n", + "t34=2\n", + "#eqn 20.1 B1=t_D*b/6*(2+sigma_2/sigma_1)\n", + "#eqn 20.2 B2=t_D*b/6*(2+sigma_1/sigma_2)\n", + "B1=B6=300+l16*t16/6*(2-sigma6/sigma1)+l12*t12/6*(2+sigma2/sigma1)\n", + "print \"B1=B6=%5.2f mm^2\\n\"%(B1)\n", + "\n", + "B2=B5=2*300+l12*t12/6*(2+sigma1/sigma2)+t25*l25/6*(2-sigma5/sigma2)+l23*t23/6*(2+sigma3/sigma2)\n", + "print \"B2=B5=%5.2f mm^2\\n\"%(B2)\n", + "\n", + "B3=300+l23*t23/6*(2+sigma2/sigma3)+l34*t34/6*(2-sigma4/sigma3)\n", + "print \"B3=B4=%5.2f mm^2\\n\"%(B3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B1=B6=1050.00 mm^2\n", + "\n", + "B2=B5=1791.67 mm^2\n", + "\n", + "B3=B4=891.67 mm^2\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.2 Pg.No.562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "Mx=100*10**6 #bending moment(N.mm)\n", + "y=[660,600,420,228,25,-204,-396,-502,-540]\n", + "B=[640,600,600,600,620,640,640,850,640]\n", + "\n", + "print \"direct stress in each boom in last column\"\n", + "print \"Boom\\t y(mm)\\t B(mm^2)\\t delIxx=By^2\\t sigma_z\"\n", + "for i in range (0,9):\n", + " print \"%1.0f \\t %3.0f \\t %3.0f \\t \\t%2.1e \\t %2.1f\"%(i+1,y[i],B[i],B[i]*y[i]**2,Mx*y[i]/(1854*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "direct stress in each boom in last column\n", + "Boom\t y(mm)\t B(mm^2)\t delIxx=By^2\t sigma_z\n", + "1 \t 660 \t 640 \t \t2.8e+08 \t 35.6\n", + "2 \t 600 \t 600 \t \t2.2e+08 \t 32.4\n", + "3 \t 420 \t 600 \t \t1.1e+08 \t 22.7\n", + "4 \t 228 \t 600 \t \t3.1e+07 \t 12.3\n", + "5 \t 25 \t 620 \t \t3.9e+05 \t 1.3\n", + "6 \t -204 \t 640 \t \t2.7e+07 \t -11.0\n", + "7 \t -396 \t 640 \t \t1.0e+08 \t -21.4\n", + "8 \t -502 \t 850 \t \t2.1e+08 \t -27.1\n", + "9 \t -540 \t 640 \t \t1.9e+08 \t -29.1\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3 Pg.No.566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "Ixx=48*10**6\n", + "Sy=4.8*10**3\n", + "B=300\n", + "\n", + "q12=-Sy/Ixx*B*200 #until point 2 \n", + "q23=q12-Sy/Ixx*B*200\n", + "q34=q23-Sy/Ixx*B*(-200)\n", + "print \"shear flow in flange 12 = %2.0f N/mm\\n\"%(q12)\n", + "print \"shear flow in web 23 = %2.0f N/mm\\n\"%(q23)\n", + "print \"shear flow in flange 34 = %2.0f N/mm\\n\"%(q34)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flow in flange 12 = -6 N/mm\n", + "\n", + "shear flow in web 23 = -12 N/mm\n", + "\n", + "shear flow in flange 34 = -6 N/mm\n", + "\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.4 Pg.No.569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "B=[200,250,400,100,100,400,250,200]\n", + "Ixx=13.86*10**6\n", + "Sy=10*10**3\n", + "qb23=0\n", + "qb34=qb23-Sy/Ixx*B[2]*100\n", + "qb45=qb34-Sy/Ixx*B[3]*50\n", + "qb56=qb34\n", + "qb67=qb23\n", + "qb21=qb67-Sy/Ixx*(B[1]*100)\n", + "qb18=qb21-Sy/Ixx*B[7]*30\n", + "qb87=qb21\n", + "qs0=-5.4\n", + "print \"Distribution of shear flow :\"\n", + "print \"q23 = %2.1f N/mm\"%(qb23+qs0)\n", + "print \"q21 = %2.1f N/mm\"%(qb21-qs0)\n", + "print \"q34 = %2.1f N/mm\"%(qb34-qs0)\n", + "print \"q45 = %2.1f N/mm\"%(qb45-qs0)\n", + "print \"q56 = %2.1f N/mm\"%(qb56-qs0)\n", + "print \"q67 = %2.1f N/mm\"%(qb67+qs0)\n", + "print \"q18 = %2.1f N/mm\"%(qb18-qs0)\n", + "print \"q87 = %2.1f N/mm\\n\"%(qb87-qs0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distribution of shear flow :\n", + "q23 = -5.4 N/mm\n", + "q21 = -12.6 N/mm\n", + "q34 = -23.5 N/mm\n", + "q45 = -27.1 N/mm\n", + "q56 = -23.5 N/mm\n", + "q67 = -5.4 N/mm\n", + "q18 = -17.0 N/mm\n", + "q87 = -12.6 N/mm\n", + "\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.5 Pg.No.575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import symbols, integrate\n", + "z=symbols('z')\n", + "\n", + "E=70000 #youngs modulus (N/mm^2)\n", + "G=30000 #shear modulus (N/mm^2)\n", + "P=4.8*10**3 #applied force (N)\n", + "L=2000 #cantilever length(mm)\n", + "Sy=P\n", + "Ixx=48*10**6 #second moment of area \n", + "t=1 #actual thickness (mm)\n", + "\n", + "Mx0=-Sy*(L-z)\n", + "Mx1=-(L-z)\n", + "\n", + "del_M=integrate(Mx0*Mx1/E/Ixx,(z,0,L))\n", + "del_S=integrate((1/G/t/Sy*(6**2*200+12**2*400+6**2*200)),(z,0,L))\n", + "print \"total deflection in vertical direction = %1.2f mm\\n\"%(del_M+del_S)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total deflection in vertical direction = 4.81 mm\n", + "\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter21.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter21.ipynb new file mode 100755 index 00000000..1195a6a9 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter21.ipynb @@ -0,0 +1,256 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b8ffe836d5b15b63c70d69d0a02ef23ccdf3f03c0f15c98f0fa5e62d24f5d894" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Wing spars and box beams" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.1 Pg.No.585" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from scipy import integrate\n", + "import math\n", + "\n", + "Mx=20*10**6 #internal bending moment (N.mm)\n", + "Sy=-20*10**3 #force applied(N)\n", + "l1=400\n", + "l2=300 #lengths of webs respectively from left to right in Fig 21.2\n", + "l3=200\n", + "\n", + "#Ixx=I_C+Ab^2\n", + "Ixx=2*l1*150**2+2*l2**3/12\n", + "y=150\n", + "sigma_z1=Mx*y/Ixx\n", + "sigma_z2=-Mx*y/Ixx\n", + "\n", + "Pz1=sigma_z1*l1\n", + "Pz2=sigma_z2*l1\n", + "\n", + "#from fig 21.1 and 21.2\n", + "del_y1_by_del_z=-0.05\n", + "del_y2_by_del_z=0.05\n", + "Syw=Sy-Pz1*del_y1_by_del_z-Pz2*del_y2_by_del_z\n", + "\n", + "# equ 21.6 qs=-Syw/Ixx*integrate(t_D*y*ds+B1*Y1) from 0 to s\n", + "fn=lambda s:300-2*s\n", + "\n", + "def shear(s):\n", + " return -Syw/Ixx*(integrate.quad(fn, 0, s)[0]+400*150)\n", + "print \"maximum value of shear flow @s=150mm =%2.1f N/mm\\n\"%(shear(150.0))\n", + "print \"value of shear @s=0mm = %2.1f N/mm\\n\"%(shear(0))\n", + "print \"value of shear @s=300 mm = %2.1f N/mm\\n\"%(shear(300))\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of shear flow @s=150mm =53.8 N/mm\n", + "\n", + "value of shear @s=0mm = 39.1 N/mm\n", + "\n", + "value of shear @s=300 mm = 39.1 N/mm\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.2 Pg.No.589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols\n", + "import math\n", + "\n", + "Sy=100*10**6 #load applied in y direction (N)\n", + "Sx=0 #load in x direction (N)\n", + "y=[0.3,0.3,0.3,-0.3,-0.3,-0.3]\n", + "B=[900,1200,900,900,1200,900] #boom area\n", + "dx_dz=[0.1,0,-0.1,-0.1,0,0.1]\n", + "dy_dz=[-0.05,-0.05,-0.05,0.05,0.05,0.05]\n", + "Er=[0.6,0,0.6,0.6,0,0.6] \n", + "nr=[0.3,0.3,0.3,0.3,0.3,0.3]\n", + "Mx=-Sy*2\n", + "My=-Sx*2\n", + "Ixy=0\n", + "Ixx=4*900*300**2+2*1200*300**2\n", + "Pzr=[0]*6\n", + "Pxr=[0]*6 #array initialization\n", + "Pyr=[0]*6\n", + "Pr=[0]*6\n", + "print \"Boom \\t Pzr(kN) \\t dx_dz \\t dy_dz \\t Pxr(kN) \\t Pyr(kN) \\t Pr(kN)\"\n", + "for i in range (0,6):\n", + " Pzr[i]=Mx*y[i]/Ixx*B[i]\n", + " Pxr[i]=Pzr[i]*dx_dz[i] #Pr is not correct in (7) column in book\n", + " Pyr[i]=Pzr[i]*dy_dz[i]\n", + " Pr[i]=(Pzr[i]**2+Pxr[i]**2+Pyr[i]**2)**0.5\n", + " if Pzr[i]>0 :\n", + " print \"%1.0f \\t %3.0f \\t\\t %1.1f \\t %1.2f \\t %2.0f \\t\\t %1.1f \\t\\t %3.1f\"%(i+1,Pzr[i],dx_dz[i],dy_dz[i],Pxr[i],Pyr[i],Pr[i])\n", + " else:\n", + " print \"%1.0f \\t %3.0f \\t\\t %1.1f \\t %1.2f \\t %2.0f \\t\\t %1.1f \\t\\t %3.1f\"%(i+1,Pzr[i],dx_dz[i],dy_dz[i],Pxr[i],Pyr[i],-Pr[i])\n", + " \n", + "Sxw=0\n", + "Syw=66.6*10**3\n", + "qb16=0 #open section here\n", + "qb12=qb16-Syw/Ixx*B[0]*300\n", + "qb23=qb12-Syw/Ixx*B[1]*300\n", + "qb34=qb23-Syw/Ixx*B[2]*300\n", + "qb45=qb23\n", + "qb56=qb12\n", + "qs0=-97\n", + "\n", + "\n", + "print \"\\n\\nqb16 = %3.1f N/mm\"%(qb16)\n", + "print \"qb12 = %3.1f N/mm\"%(qb12)\n", + "print \"qb23 = %3.1f N/mm\"%(qb23)\n", + "print \"qb34 = %3.1f N/mm\"%(qb34)\n", + "print \"qb45 = %3.1f N/mm\"%(qb45)\n", + "print \"qb56 = %3.1f N/mm\"%(qb56)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boom \t Pzr(kN) \t dx_dz \t dy_dz \t Pxr(kN) \t Pyr(kN) \t Pr(kN)\n", + "1 \t -100 \t\t 0.1 \t -0.05 \t -10 \t\t 5.0 \t\t -100.6\n", + "2 \t -133 \t\t 0.0 \t -0.05 \t -0 \t\t 6.7 \t\t -133.5\n", + "3 \t -100 \t\t -0.1 \t -0.05 \t 10 \t\t 5.0 \t\t -100.6\n", + "4 \t 100 \t\t -0.1 \t 0.05 \t -10 \t\t 5.0 \t\t 100.6\n", + "5 \t 133 \t\t 0.0 \t 0.05 \t 0 \t\t 6.7 \t\t 133.5\n", + "6 \t 100 \t\t 0.1 \t 0.05 \t 10 \t\t 5.0 \t\t 100.6\n", + "\n", + "\n", + "qb16 = 0.0 N/mm\n", + "qb12 = -33.3 N/mm\n", + "qb23 = -77.7 N/mm\n", + "qb34 = -111.0 N/mm\n", + "qb45 = -77.7 N/mm\n", + "qb56 = -33.3 N/mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3 Pg.No.593\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols\n", + "import numpy as np\n", + "import math\n", + "yr=symbols('yr')\n", + "\n", + "Mx=-100*1.9*10**6 #bending moment(N.mm)\n", + "Ixx=4*900*295**2+2*1200*295**2 #second moment of area (mm^4)\n", + "sigma_zr=Mx/Ixx*yr\n", + "P1_1=P3_1=-0.364*295*900\n", + "P4_1=P6_1=0.364*295*900\n", + "P2_1=-0.364*295*1200\n", + "P5_1=0.364*295*1200\n", + "\n", + "Mx=-100*2.1\n", + "Ixx=4*900*305**2+2*1200*305**2\n", + "sigma_zr=Mx/Ixx*yr\n", + "P1_2=P3_2=-0.376*305*900\n", + "P4_2=P6_2=0.376*305*900\n", + "P2_2=-0.376*305*1200\n", + "P5_2=0.376*305*1200\n", + "\n", + "deltaP1=deltaP3=(P1_1-P1_2)/200\n", + "deltaP4=deltaP6=-(P4_1-P4_2)/200\n", + "deltaP2=(P2_1-P2_2)/200\n", + "deltaP5=(P5_1-P5_2)/200\n", + "\n", + "a=np.array([[1,-1,0,0,0,0],[0,1,-1,0,0,0],[0,0,1,-1,0,0],[0,0,0,1,-1,0],[0,0,0,0,1,-1],[600*300*2,2*600*300,600*600,0,0,600*600]])\n", + "\n", + "b=np.array([43.8,32.85,-32.85,-43.8,-32.85,600*10**5])\n", + "q=np.linalg.solve(a,b)\n", + "print \"shear flow distribution :\"\n", + "print \"q12 = %2.1f N/mm\"%(q[0])\n", + "print \"q23 = %2.1f N/mm\"%(q[1])\n", + "print \"q34 = %2.1f N/mm\"%(q[2])\n", + "print \"q45 = %2.1f N/mm\"%(q[3])\n", + "print \"q56 = %2.1f N/mm\"%(q[4])\n", + "print \"q61 = %2.1f N/mm\\n\"%(q[5])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flow distribution :\n", + "q12 = 63.6 N/mm\n", + "q23 = 19.8 N/mm\n", + "q34 = -13.1 N/mm\n", + "q45 = 19.8 N/mm\n", + "q56 = 63.6 N/mm\n", + "q61 = 96.4 N/mm\n", + "\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter22.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter22.ipynb new file mode 100755 index 00000000..15f86e3c --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter22.ipynb @@ -0,0 +1,88 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7afcc7b44b13ea906e3e2317703c261e07426e5f23f7958a6b7966ba0274524d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Fuselages" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.1 Pg.No.598" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "#B1=t_D*b/6(2+sigma_2/sigma_1)\n", + "Mx=200*10**6 # (N*mm)\n", + "y=[381,352,269.5,145.8,0,-145.8,-269.5,-352,-381,-352,-269.5,-145.8,0,145.8,269.5,352]\n", + "sigma_2=sigma_16=352\n", + "sigma_1=381\n", + "A=100\n", + "B1=A+0.8*149.6/6*(2+sigma_2/sigma_1)*2\n", + "Ixx=2.52*10**8\n", + "def sigma_z(y):\n", + " return Mx/Ixx*y\n", + "print \"Stringer/Boom \\t y(mm) \\t \\tsigma_z(N/mm^2)\"\n", + "for i in range (0,16):\n", + " print \"%2.0f \\t\\t %3.1f\\t\\t\\t%3.1f \"%(i+1,y[i],sigma_z(y[i]))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stringer/Boom \t y(mm) \t \tsigma_z(N/mm^2)\n", + " 1 \t\t 381.0\t\t\t302.4 \n", + " 2 \t\t 352.0\t\t\t279.4 \n", + " 3 \t\t 269.5\t\t\t213.9 \n", + " 4 \t\t 145.8\t\t\t115.7 \n", + " 5 \t\t 0.0\t\t\t0.0 \n", + " 6 \t\t -145.8\t\t\t-115.7 \n", + " 7 \t\t -269.5\t\t\t-213.9 \n", + " 8 \t\t -352.0\t\t\t-279.4 \n", + " 9 \t\t -381.0\t\t\t-302.4 \n", + "10 \t\t -352.0\t\t\t-279.4 \n", + "11 \t\t -269.5\t\t\t-213.9 \n", + "12 \t\t -145.8\t\t\t-115.7 \n", + "13 \t\t 0.0\t\t\t0.0 \n", + "14 \t\t 145.8\t\t\t115.7 \n", + "15 \t\t 269.5\t\t\t213.9 \n", + "16 \t\t 352.0\t\t\t279.4 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter23.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter23.ipynb new file mode 100755 index 00000000..a5e90903 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter23.ipynb @@ -0,0 +1,390 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38d29ad436c9255138372fb573a0261c5aeb8d664f2491fbf03a71e42b1c4783" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Wings" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.1 Pg.No.609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import solve, symbols, pprint\n", + "import math\n", + "y=symbols('y')\n", + "\n", + "B1=B6=2580\n", + "B2=B5=3880 #Boom areas (mm^2)\n", + "B3=B4=3230\n", + "\n", + "l1=200\n", + "l2=230 #dimensions shown in Fig 23.3 (mm)\n", + "l3=165\n", + "\n", + "Mx=300*10**6 #bending moment (N.mm)\n", + "My=0\n", + "\n", + "Ixx=2*(B1*l3**2+B2*l2**2+B3*l1**2)\n", + "sigma_z=Mx/Ixx*y\n", + "\n", + "print \"direct stress in booms sigma_z = %s\" %(sigma_z)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "direct stress in booms sigma_z = 0.370651791174781*y\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.2 Pg.No.612" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import solve, symbols, pprint\n", + "import math\n", + "import numpy as np\n", + "\n", + "T=11.3*10**6 # torque applied (N.mm)\n", + "G_REF=27600 #(N/mm^2)\n", + "A1=258000\n", + "A2=355000 #areas in table\n", + "A3=161000\n", + "\n", + "#t*12=G/G_REF*t\n", + "t12=24200/G_REF*1.22\n", + "t12i=27600/G_REF*2.03\n", + "t13=t24=24200/G_REF*1.22 #G and thickness taken from table ex23.2 Pg.No.612\n", + "t35=t46=t56=20700/G_REF*0.92\n", + "t34=27600/G_REF*1.63\n", + "\n", + "# del12=ds/t*12\n", + "del12=1650/t12\n", + "del12i=508/t12i\n", + "del13=del24=775/t13\n", + "del34=380/t34 #lengths taken from table\n", + "del35=del46=508/t35\n", + "del56=254/t56\n", + "\n", + "\n", + "a=np.array([[del12+del12i,-del12i,0,-2*A1*G_REF],[-del12i,del12i+del13+del24+del34,-del34,-2*A2*G_REF],[0,-del34,del35+del46+del34+del56,-2*A3*G_REF],[A1,A2,A3,0]])\n", + "b=np.array([0,0,0,5.65*10**6])\n", + "x=np.linalg.solve(a,b)\n", + "print \"shear stress distribution is as follows\"\n", + "print \"q1=%1.1f N/mm\"%(x[0])\n", + "print \"q2=%1.1f N/mm\"%(x[1])\n", + "print \"q3=%1.1f N/mm\\n\"%(x[2])\n", + "print \"dO_dz=%1.2e \"%(x[3])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear stress distribution is as follows\n", + "q1=7.1 N/mm\n", + "q2=8.9 N/mm\n", + "q3=4.2 N/mm\n", + "\n", + "dO_dz=7.36e-07 \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.3 Pg.No.616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import solve, symbols, pprint\n", + "import math\n", + "import numpy as np\n", + "\n", + "A1=265000\n", + "A2=213000\n", + "A3=413000\n", + "\n", + "G_REF=27600\n", + "Sy=86.8*10**3\n", + "t78=3*27600/27600*1.22\n", + "del78=1270/t78\n", + "t12=t56=1.22\n", + "del12=del56=1023/t12\n", + "t23=1.63\n", + "del23=1274/t23\n", + "t34=2.03\n", + "del34=2200/t34\n", + "del38=57\n", + "del84=95\n", + "del87=347\n", + "del27=68\n", + "del75=106\n", + "del16=330/1.63\n", + "Ixx=809*10**6 #From example 23.1\n", + "\n", + "qb27=-99.4;qb16=-45.5;qb65=0;qb57=95.5;qb38=-69.8;qb48=69\n", + "\n", + "\n", + "a=np.array([ [del34+del84+del38,-del38,0,-2*A1*G_REF], [-del38,del23+del38+del87+del27,-del27,-2*A2*G_REF], [0,-del27,del56+del27+del75+del12+del16,-2*A3*G_REF], [2*A1,2*A2,2*A3,0] ])\n", + "b=np.array([-10488,-2561,7426,19736700])\n", + "x=np.linalg.solve(a,b)\n", + "\n", + "qs01=5.5\n", + "qs02=10.2\n", + "qs03=16.5\n", + "\n", + "q34=qs01\n", + "q23=qs02\n", + "q12=qs03\n", + "q61=-qb16+qs03\n", + "q57=qb57-qs03\n", + "q72=-qb27-qs02\n", + "q48=qb48+qs01\n", + "q83=-qb38-qs01\n", + "\n", + "print \"shear flows distribution is as follows :\"\n", + "print \"q34=%1.2f N/mm\"%(q34)\n", + "print \"q23=q87=%1.2f N/mm\"%(q23)\n", + "print \"q12=q56=%1.2f N/mm\"%(q12)\n", + "print \"q61=%1.2f N/mm\"%(q61) \n", + "print \"q57=%1.2f N/mm\"%(q57)\n", + "print \"q72=%1.2f N/mm\"%(q72)\n", + "print \"q48=%1.2f N/mm\"%(q48)\n", + "print \"q83=%1.2f N/mm\\n\"%(q83)\n", + "\n", + "print \"rate of twist = %1.1e rad/mm\"%(x[3])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flows distribution is as follows :\n", + "q34=5.50 N/mm\n", + "q23=q87=10.20 N/mm\n", + "q12=q56=16.50 N/mm\n", + "q61=62.00 N/mm\n", + "q57=79.00 N/mm\n", + "q72=89.20 N/mm\n", + "q48=74.50 N/mm\n", + "q83=64.30 N/mm\n", + "\n", + "rate of twist = 1.1e-06 rad/mm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.4 Pg.No.618 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import solve, symbols, pprint\n", + "import math\n", + "import numpy as np\n", + "\n", + "#Boom areas\n", + "B=[600,900,600,600,900,600]\n", + "Pz=[0,0,0,0,0,0]\n", + "y=[54.56,54.56,54.56,-54.56,-54.56,-54.56]\n", + "Ixx=4*600*90**2+2*900*90**2\n", + "Ixy=0\n", + "Mx=1.65*10**6\n", + "My=0\n", + "\n", + "a=np.array([[1700,-1520],[72000,144000]])\n", + "b=np.array([3942,690726])\n", + "x=np.linalg.solve(a,b)\n", + "print \"\\nqs0I = %2.1f N/mm\\n\"%(x[0])\n", + "print \"\\nqs0II = %2.1f N/mm\\n\"%(x[1])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "qs0I = 4.6 N/mm\n", + "\n", + "\n", + "qs0II = 2.5 N/mm\n", + "\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.5 Pg.No.622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import solve, symbols, pprint\n", + "import math\n", + "import numpy as np\n", + "from sympy import integrate\n", + "z=symbols('z')\n", + "\n", + "E=69000 #youngs modulus (N/mm^2)\n", + "G=25900 #shear modulus (N/mm^2)\n", + "t=2 #thickness (mm)\n", + "B=[650,1300,650,650,1300,650] #boom area\n", + "q0=[9.6,-5.8,50.3,-5.8,9.6,54.1,73.6]\n", + "Sy0=44.5*10**3\n", + "Sy1=1\n", + "Mx0=-44.5*10**3*(2000-z)\n", + "Mx1=-(2000-z)\n", + "Ixx=81.3*10**6\n", + "int_q0q1_Gt=1/G/t/Sy0*(q0[0]**2*250*t+q0[1]**2*500*t+q0[2]**2*250+q0[5]**2*250+q0[6]**2*250)\n", + "\n", + "delta=integrate(Mx0*Mx1/E/Ixx,(z,0,2000))+integrate(int_q0q1_Gt,(z,0,2000))\n", + "print \"deflection at free end of the two cell = %2.2f mm\"%(delta)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "deflection at free end of the two cell = 23.58 mm\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.6 Pg.No.624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import solve, symbols, pprint\n", + "import math\n", + "import numpy as np\n", + "from sympy import integrate\n", + "\n", + "T=10*10**6 #torque subjected (N.mm)\n", + "l1=800 \n", + "l2=200 #lengths shown in Fig23.17 (mm)\n", + "l3=1500\n", + "A=l2*l1\n", + "\n", + "\n", + "q=T/2/A\n", + "S=T/l1\n", + "q1=S/l2\n", + "P=S*l3/2/l2\n", + "\n", + "a=np.array([[1,-1],[1,1]])\n", + "b=np.array([31.3,62.5])\n", + "q=np.linalg.solve(a,b)\n", + "\n", + "print \"shear flow :\"\n", + "print \"q1=%2.2f N/mm\"%(q1)\n", + "print \"q2=%2.2f N/mm\"%(q[0])\n", + "print \"q3=%2.2f N/mm\\n\"%(q[1])\n", + "\n", + "print \"flange loads :\"\n", + "print \"P(st.4500) = 0\"\n", + "print \"P(st.3000) = %2.2f N (compression)\"%(l3*q[0]-l3*q[1])\n", + "print \"P(st.2250) = %2.1f\"%(46875-l3/2*q1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flow :\n", + "q1=62.50 N/mm\n", + "q2=46.90 N/mm\n", + "q3=15.60 N/mm\n", + "\n", + "flange loads :\n", + "P(st.4500) = 0\n", + "P(st.3000) = 46950.00 N (compression)\n", + "P(st.2250) = 0.0\n" + ] + } + ], + "prompt_number": 84 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter24.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter24.ipynb new file mode 100755 index 00000000..b305a12a --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter24.ipynb @@ -0,0 +1,198 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:217b3507f45091d99aa496d838ab43e552e1e20629747bd44a2cad35220ffe6a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Fuselage frames and wing ribs" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.1 Pg.No.638" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import numpy\n", + "import math\n", + "#reference Fig 42.2\n", + "l1=250 #length of each section(mm)\n", + "l2=200 #length of DK(mm)\n", + "l3=100 #length of KH(mm)\n", + "F1=4000\n", + "F2=5000 #forces as shown in Fig 24.1\n", + "theta=60 #force angle from DH (degree)\n", + "\n", + "#solve (i) and (ii) equation\n", + "a=numpy.array([[1,-1],[200,100]])\n", + "b=numpy.array([13.8564,2000])\n", + "q=numpy.linalg.solve(a,b)\n", + "q1=q[0]\n", + "q2=q[1]\n", + "q3=F1*math.cos(math.radians(theta))/(l2+l3)\n", + "q4=F1*math.cos(math.radians(theta))/(l2+l3)+F2/(l2+l3)\n", + "P_A=l1*q1+l1*q3+l1*q4\n", + "P_E=-l1*q2-l1*q3-l1*q4\n", + "P=3464.1\n", + "M_AE=F2*l1+F1/2*3*l1-P*50\n", + "\n", + "P_A=M_AE/(l2+l3)+P/2\n", + "P_E=-M_AE/(l2+l3)+P/2\n", + "\n", + "print \"shear flow as shown in Fig 24.1\\n\"\n", + "print \"q1=%2.2f N/mm\\n\"%(q1)\n", + "print \"q2=%2.2f N/mm\\n\"%(q2)\n", + "print \"q3=%2.2f N/mm\\n\"%(q3)\n", + "print \"q4=%2.2f N/mm\\n\"%(q4)\n", + "\n", + "print \"Stiffener load at point A = %2.2f N/mm(tension)\\n\"%(P_A)\n", + "print \"Stiffener load at point E = %2.2f N/mm(compression)\\n\"%(P_E) #in book another method is also explained" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flow as shown in Fig 24.1\n", + "\n", + "q1=11.29 N/mm\n", + "\n", + "q2=-2.57 N/mm\n", + "\n", + "q3=6.67 N/mm\n", + "\n", + "q4=23.33 N/mm\n", + "\n", + "Stiffener load at point A = 10321.37 N/mm(tension)\n", + "\n", + "Stiffener load at point E = -6857.27 N/mm(compression)\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.2 Pg.No.645" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import numpy as np\n", + "import math\n", + "\n", + "A1=50000\n", + "A2=95000 #area shown in Fig 24.13(mm^2)\n", + "A3=95000\n", + "\n", + "A4=46000\n", + "A5=49000 #area shown in Fig 24.11 (mm^2)\n", + "\n", + "F1=12000\n", + "F2=15000 #forces shown in Fig 24.9 (N)\n", + "\n", + "l1=l3=300\n", + "l2=320 #lengths and angle shown in Fig 24.9\n", + "alpha=15\n", + "\n", + "#solve equation (i)&(iii)\n", + "a=np.array([[600,-600],[190000,290000]])\n", + "b=np.array([12000,440000])\n", + "q=np.linalg.solve(a,b)\n", + "q12=q[0]\n", + "q23=q[1]\n", + "q31=(F2+l1*q23)/l1\n", + "print \"shear flows are shown in Fig 24.9 (flanges)\"\n", + "print \"q12=%2.2f N/mm\"%(q12)\n", + "print \"q23=%2.2f N/mm\"%(q23)\n", + "print \"q31=%2.2f N/mm\\n\"%(q31)\n", + "\n", + "Sy_1=7*l3\n", + "Px4=Px2=2*A1*7/l1\n", + "Py2=Py4=Px4*math.tan(math.radians(alpha))\n", + "q1=(2100-2*625.2)/l1\n", + "P2=P4=(Px4**2+Py4**2)**0.5\n", + "P5=P6=2*((A1+A4)*7-A5*13)/l2\n", + "q2=(7*l1+7*10-13*10)/l2\n", + "q3=(6.4*l2+F2)/l2\n", + "\n", + "M3=2*((A1+A2)*7-A2*13)+F2*l1\n", + "Px1=Px3=M3/l1\n", + "Py1=Py3=3626.2\n", + "P1=P3=(Px1**2+Py1**2)**.5\n", + "q3=(17100-2*Py1)/l1\n", + "\n", + "print \"Loads in webs \"\n", + "print \"P4=P2=%2.2f N\"%(P2)\n", + "print \"P6=P5=%2.2f N\"%(P6)\n", + "print \"P3=P1=%2.2f N\\n\"%(P1)\n", + "\n", + "print \"shear flow in webs\"\n", + "print \"q1=%2.2f N/mm\"%(q1)\n", + "print \"q2=%2.2f N/mm\"%(q2)\n", + "print \"q3=%2.2f N/mm (this value is given at the end of example)\"%(q3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flows are shown in Fig 24.9 (flanges)\n", + "q12=13.00 N/mm\n", + "q23=-7.00 N/mm\n", + "q31=43.00 N/mm\n", + "\n", + "Loads in webs \n", + "P4=P2=2415.64 N\n", + "P6=P5=218.75 N\n", + "P3=P1=14010.73 N\n", + "\n", + "shear flow in webs\n", + "q1=2.83 N/mm\n", + "q2=6.38 N/mm\n", + "q3=32.83 N/mm (this value is given at the end of example)\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter25.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter25.ipynb new file mode 100755 index 00000000..369a648f --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter25.ipynb @@ -0,0 +1,490 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:806c344ebbd66dd7398f87b7be85af8355708b04b28f0bd902647a641248feff" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25: Laminated Composite Structures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.1 Pg.No.653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#variable declaration\n", + "Ee=5000 #youngs modulus of epoxy (N/mm^2)\n", + "Ec=200000 #youngs modulus of carbon (N/mm^2)\n", + "\n", + "# E1=Ef*Af/A+Em+Am/A equation 25.4\n", + "A=50*80 #total area (mm^2)\n", + "Ae=40*80 #area of epoxy (mm^2)\n", + "Ac=10*80 #area of carbon(mm^2)\n", + "L=500 #length of bar(mm)\n", + "vc=0.3 #poisson ratio\n", + "ve=0.2\n", + "\n", + "#effective youngs modulus\n", + "E1=(Ee*Ae+Ec*Ac)/A\n", + "\n", + "load=100*10**3\n", + "sigma1=load/A\n", + "epsilon1=sigma1/E1\n", + "\n", + "delta1=epsilon1*L\n", + "v1t=(ve*Ae+vc*Ac)/A\n", + "epsilon_t=-v1t*epsilon1\n", + "\n", + "thickness=L\n", + "delta_t=-epsilon_t*(thickness)\n", + "\n", + "\n", + "sigma_m=Ee*epsilon1\n", + "sigma_f=Ec*epsilon1\n", + "print \"stresses in epoxy = %2.2f N/mm^2\\n\"%(sigma_m)\n", + "print \"stresses in carbon = %2.2f N/mm^2\\n\"%(sigma_f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stresses in epoxy = 2.84 N/mm^2\n", + "\n", + "stresses in carbon = 113.64 N/mm^2\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.2 Pg.No.657" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "tau=40 #shear stress(N/mm^2)\n", + "G=5000 #shear modulus(N/mm^2)\n", + "v1t=0.3 #poisson ratio \n", + "Et=80000 #youngs modulus in transverse direction(N/mm^2)\n", + "E1=120000 #youngs modulus in longitudinal direction(N/mm^2)\n", + "sigma_x=50 #direction stress in x direciton\n", + "sigma_y=25 #in y direction\n", + "\n", + "\n", + "vt1=v1t*Et/E1 #minor poisson ratio\n", + "\n", + "epsilon1=sigma_x/E1-vt1*sigma_y/Et\n", + "epsilont=sigma_y/Et-v1t*sigma_x/E1\n", + "print \"direct strain in x direction = %2.2e \\n\"%(epsilon1)\n", + "print \"direct strain in y direction = %2.2e \\n\"%(epsilont)\n", + "\n", + "gama1t=tau/G\n", + "print \"shear strain in the ply = %2.2e \\n\"%(gama1t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "direct strain in x direction = 3.54e-04 \n", + "\n", + "direct strain in y direction = 1.88e-04 \n", + "\n", + "shear strain in the ply = 8.00e-03 \n", + "\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.3 Pg.No.661" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "\n", + "El=150000 #youngs modulus(N/mm^2)\n", + "Et=90000 #youngs modulus(N/mm^2)\n", + "Glt=5000 #shear modulus(N/mm^2)\n", + "vlt=0.3 #poisson ratio\n", + "theta=45 #longitudinal plane inclination\n", + "\n", + "s11=1/El\n", + "s22=1/Et\n", + "s12=-vlt/El\n", + "s33=1/Glt\n", + "\n", + "a=np.array([[53.45,-46.55,1],[-46.55,53.45,0],[-2.2,-2.2,0]])\n", + "b=np.array([60,40,0])\n", + "x=np.dot(a,b)\n", + "print \"strain in the x direction = %4.4e\\n\"%(x[0]*10**-6)\n", + "print \"strain in the y direction = %4.4e\\n\"%(x[1]*10**-6)\n", + "print \"shear strain in the xy plane = %4.4e\\n\"%(x[2]*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strain in the x direction = 1.3450e-03\n", + "\n", + "strain in the y direction = -6.5500e-04\n", + "\n", + "shear strain in the xy plane = -2.2000e-04\n", + "\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.4 Pg.No.664" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "\n", + "l1=150\n", + "t1=1\n", + "l2=100 #dimensions shown in Fig 25.10 (mm)\n", + "t2=2\n", + "Ef=60000 #youngs modulus of flanges(N/mm^2)\n", + "Ew=20000 #youngs modulus of web(N/mm^2)\n", + "P=40*10**3 #axial load(N)\n", + "\n", + "#sum of b*t*E \n", + "sum_btE=2*l2*t2*Ef+l1*t1*Ew\n", + "\n", + "epsilon_z=P/sum_btE #equ 25.37\n", + "P_flange=epsilon_z*l2*t2*Ef\n", + "P_web=epsilon_z*l1*t1*Ew\n", + "print \"axial load in flange = %2.2f kN\\n\"%(P_flange/1000)\n", + "print \"axial load in web = %2.2f kN\\n\"%(P_web/1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "axial load in flange = 17.78 kN\n", + "\n", + "axial load in web = 4.44 kN\n", + "\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.5 Pg.No.666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "\n", + "l1=100\n", + "l2=50\n", + "t1=1 #dimension shown in Fig 25.11 (mm)\n", + "t2=2\n", + "Ef=50000 #youngs modulus of flange(N/mm^2)\n", + "Ew=15000 #youngs modulus of web(N/mm^2)\n", + "Mx=10**6 #bending moment (N.mm)\n", + "My=0\n", + "\n", + "Ixx=2*Ef*l2*t2*l2**2+Ew*t1*l1**3/12\n", + "Iyy=Ef*t2*l1**3/12\n", + "Ixy=Ef*l2*t2*(50)*(50)+Ef*l2*t2*(-50)*(-50)\n", + "\n", + "x=50\n", + "y=50 #point 1\n", + "Ez=50000\n", + "\n", + "sigma_z=Ez*((My*Ixx-Mx*Ixy)/(Ixx*Iyy-Ixy**2)*x + (Mx*Iyy-My*Ixy)/(Ixx*Iyy-Ixy**2)*y)\n", + "print \"direct stress at point 1 = %3.1f N/mm^2\\n\"%(sigma_z)\n", + "x=0\n", + "y=50\n", + "sigma_z=Ez*((My*Ixx-Mx*Ixy)/(Ixx*Iyy-Ixy**2)*x + (Mx*Iyy-My*Ixy)/(Ixx*Iyy-Ixy**2)*y)\n", + "print \"direct stress at point 2 = %3.1f N/mm^2\\n\"%(sigma_z)\n", + "\n", + "x=0\n", + "y=50\n", + "Ez=15000\n", + "sigma_z=Ez*((My*Ixx-Mx*Ixy)/(Ixx*Iyy-Ixy**2)*x + (Mx*Iyy-My*Ixy)/(Ixx*Iyy-Ixy**2)*y)\n", + "print \"direct stress at point 2 in the web = %3.1f N/mm^2\\n\"%(sigma_z)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "direct stress at point 1 = 102.6 N/mm^2\n", + "\n", + "direct stress at point 2 = -51.3 N/mm^2\n", + "\n", + "direct stress at point 2 in the web = -15.4 N/mm^2\n", + "\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.6 Pg.No.668" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "s=symbols('s')\n", + "\n", + "l12=250\n", + "l23=300\n", + "t31=t12=2 #dimensions shown in Fig 25.12 (mm)\n", + "t23=1.5\n", + "\n", + "P=2*10**3 #shear load(N)\n", + "E12=E31=45000 #youngs modulus of sides given in name(N/mm^2)\n", + "E23=20000\n", + "\n", + "Ixx=2*E12*t12*l12**3*(l23/2/l12)**2/12+E23*t23*l23**3/12\n", + "alpha=math.asin(l23/2/l12)\n", + "\n", + "Sx=0\n", + "Sy=2*10**3\n", + "q12=-E12*Sy/Ixx*integrate(-2*s,(s,0,250))*math.sin(alpha)\n", + "print \"shear flow at point 2 in the flange 12 = %2.2f N/mm\\n\"%(q12)\n", + "\n", + "q23=-E23*Sy/Ixx*integrate(-225+1.5*s,(s,0,300))+22.2\n", + "print \"shear flow at point 3 in the flange 23 = %2.2f N/mm\\n\"%(q23)\n", + "q0=14.2\n", + "\n", + "q12=-E12*Sy/Ixx*integrate(-2*s,s)*math.sin(alpha)-q0\n", + "print \"shear flow in the flange 12 and 31 \"\n", + "print q12\n", + "\n", + "q23=-E23*Sy/Ixx*integrate(-225+1.5*s,s,)+22.2-q0\n", + "print \"\\nshear flow in the web 23\"\n", + "print q23" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear flow at point 2 in the flange 12 = 22.22 N/mm\n", + "\n", + "shear flow at point 3 in the flange 23 = 22.20 N/mm\n", + "\n", + "shear flow in the flange 12 and 31 \n", + "0.000355555555555556*s**2 - 14.2\n", + "\n", + "shear flow in the web 23\n", + "-0.000197530864197531*s**2 + 0.0592592592592593*s + 8.0\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.7 Pg.No.671" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "\n", + "l1=200\n", + "t1=2\n", + "l2=100 #dimensions shown in Fig 25.13 (mm)\n", + "t2=1\n", + "T=10*10**6 #torque applied (N.mm)\n", + "Gl=20000 #laminate shear modulus(N/mm^2)\n", + "Gw=35000 #web shear modulus(N/mm^2)\n", + "A=l1*l2\n", + "\n", + "q=T/2/A\n", + "\n", + "#from eqn 25.47\n", + "int_ds_by_Gt=2*l1/Gl/t1+2*l2/Gw/t2\n", + "\n", + "#Let's say we want to calculate warping at point 1\n", + "#warping at mid of web is zero (W0=0) integrate eqn 25.47 from\n", + "#mid of web to point 1\n", + "W0=0\n", + "A0s=50*100\n", + "W1=W0+q*(l2/2/Gw/t2-int_ds_by_Gt/A*A0s)\n", + "print \"warping at point 1 is = %2.2f mm\\n\"%(W1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "warping at point 1 is = -0.63 mm\n", + "\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.8 Pg.No.673" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "l1=50\n", + "t1=2.5\n", + "l2=25 #dimension shown in Fig 18.12(mm)\n", + "t2=1.5\n", + "\n", + "Gl=20000\n", + "Gw=15000 #shear modulus (N/mm^2)\n", + "T=10*10**3 #torque applied (N.mm)\n", + "AR=25*25/2\n", + "GJ=2*Gl*l2*t2**3/3+Gw*l1*t1**3/3\n", + "#eqn 25.49\n", + "dO_dz=T/GJ\n", + "\n", + "t_max12=2*Gl*(t2/2)*dO_dz\n", + "t_max23=2*Gw*(t1/2)*dO_dz\n", + "print \"maximum shear stress in the web = %2.2f N/mm^2\\n\"%(t_max12)\n", + "print \"maximum shear stress in the laminate = %2.2f N/mm^2\\n\"%(t_max23)\n", + "\n", + "W1=-2*AR*dO_dz\n", + "print \"warping at point 1 = %2.2f mm\\n\"%(W1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum shear stress in the web = 59.63 N/mm^2\n", + "\n", + "maximum shear stress in the laminate = 74.53 N/mm^2\n", + "\n", + "warping at point 1 = -1.24 mm\n", + "\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter26.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter26.ipynb new file mode 100755 index 00000000..994182d0 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter26.ipynb @@ -0,0 +1,82 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:eb3a8ca85b2b3516ec190a12a8401ddf32d140498cd023be9bda6228b1754025" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 26: Closed Section Beams" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.3 Pg.No.693" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import solve, symbols\n", + "import math\n", + "\n", + "\n", + "G=20000 #shear modulus (N/mm^2)\n", + "E=G/0.36 #young's modulus\n", + "tau=20 #torque (Nm/mm)\n", + "t=1\n", + "b=200\n", + "a=500\n", + "L=2500\n", + "A=800\n", + "\n", + "#torque at each support \n", + "T=20*5000/2\n", + "\n", + "mu=math.sqrt(8*G*t/(A*E*(b+a)))\n", + "\n", + "z=2500\n", + "F=-1.95/mu*math.cosh(mu*z)+1.75*z**2\n", + "\n", + "z=0 # at mid-span z=0\n", + "theta=10**(-8)*(1.95/mu*math.cosh(mu*z)-1.75*z**2+F)\n", + "print \"twist at mid-span = %1.3f rad = %1.2f degree\"%(theta,theta*180/math.pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "twist at mid-span = 0.108 rad = 6.20 degree\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter27.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter27.ipynb new file mode 100755 index 00000000..bf9485c9 --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter27.ipynb @@ -0,0 +1,109 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bc596ba82da68e58c73271eb1045592b064349244b750ab69aa9f03ab4de2fbd" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 27: Open Section Beams\n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.2 Pg.No. 735" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#reference Fig 27.20\n", + "\n", + "from __future__ import division\n", + "import math\n", + "from sympy import integrate\n", + "from sympy import solve, symbols\n", + "\n", + "# variable declaration\n", + "P=100 #vertical load (kN)\n", + "A_R=1.25*10**3 #from previous question\n", + "E=200000 #young's modulus (N/mm^2)\n", + "Gama_R=2.08*10**10 #torsion bending constant (mm^6)\n", + "mu=0.54*10**-3 #from previous question\n", + "A=400*5 #area of beam\n", + "\n", + "#moment couple\n", + "M_Tau=-P*2*A_R\n", + "print \"\\nValue of moment couple at the top of column = %2.2e kN.mm^2\"%(M_Tau) #calculation mistake in book\n", + "\n", + "d2tdz2 = M_Tau*10**3/E/Gama_R\n", + "# @z=3000 mm \n", + "D=0.04*10**-3\n", + "z=symbols('z')\n", + "F= -0.08*math.cosh(0)\n", + "\n", + "def theta(z):\n", + " return 0.08*(math.cosh(0.54*10**(-3)*z))\n", + "\n", + "print \"\\ntwist at the top of the column = %2.2f rad\\n\"%(theta(3000))\n", + "\n", + "M_Tau=-E*Gama_R*0.02*10**-6\n", + "print \"value of moment couple at bottom of column=%2.2e N.mm^2\\n\"%(M_Tau)\n", + "\n", + "P=-100*10**3 # stress(N)\n", + "def sigma_z(A_R2):\n", + " return P/A+M_Tau*A_R2/Gama_R\n", + "print \"sigma_z1=sigma_z4=%2.1f N/mm^2\\n\"%(sigma_z(-7.5*10**3))\n", + "print \"sigma_z2=sigma_z3=%2.1f N/mm^2\\n\"%(sigma_z(2.5*10**3))\n", + "\n", + "#please put the value of 2AR from Fig 27.21 in the equation of sigma_z\n", + "#these values in book need correction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Value of moment couple at the top of column = -2.50e+05 kN.mm^2\n", + "\n", + "twist at the top of the column = 0.21 rad\n", + "\n", + "value of moment couple at bottom of column=-8.32e+07 N.mm^2\n", + "\n", + "sigma_z1=sigma_z4=-20.0 N/mm^2\n", + "\n", + "sigma_z2=sigma_z3=-60.0 N/mm^2\n", + "\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/README.txt b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/README.txt new file mode 100755 index 00000000..230418be --- /dev/null +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/README.txt @@ -0,0 +1,10 @@ +Contributed By: Prahlad Das +Course: others +College/Institute/Organization: Indian Institute of Technology Bombay +Department/Designation: Aerospace +Book Title: Aircraft Structures for Engineering Students +Author: T. H. G. Megson +Publisher: Linacre House, Jordan Hill, Oxford OX2 8DP, UK +Year of publication: 2012 +Isbn: 978-0-75066-7395 +Edition: fourth edition \ No newline at end of file diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/a.png b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/a.png new file mode 100755 index 00000000..7aa51791 Binary files /dev/null and b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/a.png differ diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/b.png b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/b.png new file mode 100755 index 00000000..0f230abf Binary files /dev/null and b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/b.png differ diff --git a/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/c.png b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/c.png new file mode 100755 index 00000000..ae3f4f00 Binary files /dev/null and b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/c.png differ diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png old mode 100644 new mode 100755 diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png old mode 100644 new mode 100755 diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png old mode 100644 new mode 100755 diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt b/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt old mode 100644 new mode 100755 diff --git a/Applied_Physics-II/chapter1.ipynb b/Applied_Physics-II/chapter1.ipynb deleted file mode 100755 index c4b1a860..00000000 --- a/Applied_Physics-II/chapter1.ipynb +++ /dev/null @@ -1,1353 +0,0 @@ -{ - "metadata": { - "celltoolbar": "Raw Cell Format", - "name": "", - "signature": "sha256:fad8e22fb99cc3e157ab8315172e2ff6ddae35bb6f49be764a49d2d1d3f70fcc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1: Interference" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.1, Page number 1-16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "i=45*math.pi/180 #angle of incidence\n", - "u=1.33 #Refractive index of a soap film\n", - "lamda=5.896*10**-7 #wavelength of required yellow light\n", - "\n", - "#Calculations:\n", - "#u=sin i/sin r #Snell's law .So,\n", - "r=math.asin(math.sin(i)/u) #angle of reflection\n", - "\n", - "#Now, condition for bright fringe is\n", - "#2ut*cos r=(2n-1)lamda/2\n", - "#Here n=1\n", - "t=lamda/(2*2*u*math.cos(r)) #minimum thickness of film at which light will appear bright yellow\n", - "print\"Minimum thickness of film at which light will appear bright yellow of required wavelength is =\",t,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum thickness of film at which light will appear bright yellow of required wavelength is = 1.30853030399e-07 m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2, Page number 1-16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "theta=40./3600*math.pi/180 #angle of wedge in radians\n", - "B=0.12*10**-2 #fringe spacing\n", - "\n", - "#Calculations:\n", - "#We know, B=lam/(2*u*theta). Here u=1\n", - "lamda=2*B*theta #wavelength of light used\n", - "print\"Wavelength of light used is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of light used is = 4.65421133865e-07 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3, Page number 1-17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "i=30*math.pi/180 #angle of incidence\n", - "u=1.46 #Refractive index of a oil\n", - "lamda=5.890*10**-7 #wavelength of required yellow light\n", - "n=8 #eighth dark band\n", - "\n", - "#Calculations:\n", - "#u=sin i/sin r #Snell's law .So,\n", - "r=math.asin(math.sin(i)/u) #angle of reflection\n", - "\n", - "#Now, condition for dark fringe is\n", - "#2ut*cos r=n*lamda\n", - "t=n*lamda/(2*u*math.cos(r)) #thickness of film\n", - "print\"Thickness of the film is =\",t,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of the film is = 1.71755887917e-06 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4, Page number 1-17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "\n", - "B=0.1*10**-2 #fringe spacing\n", - "lamda=5.893*10**-7 #Wavelength of light\n", - "u=1.52 #Refractive index of wedge\n", - "\n", - "#Calculations:\n", - "#We know, B=lamda/(2*u*theta). Here u=1\n", - "theta1=lamda/(2*u*B) #angle of wedge in radians\n", - "theta=theta1*3600*180/math.pi #angle of wedge in seconds\n", - "print\"Angle of wedge is =\",theta,\"seconds of an arc\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angle of wedge is = 39.9841612899 seconds of an arc\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5, Page number 1-18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "t=0.2/(100)**2*10**-2 #thickness of film in meter\n", - "lamda=5.5*10**-7 #wavelength of light in meter\n", - "r=0 #normal incidence\n", - "n=1 #first band\n", - "\n", - "#Calculations:\n", - "\n", - "#Condition for dark fringe is\n", - "#2ut*cos r =n*lamda\n", - "u=n*lamda/(2*t*math.cos(r)) #Refractive index of a oil\n", - "print\"Refractive index of a oil is =\",u\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of a oil is = 1.375\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.6, Page number 1-18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=5.893*10**-7 #Wavelength of light\n", - "u=1.42 #Refractive index of a soap film\n", - "r=0 #normal incidence\n", - "n=1 #first band\n", - "\n", - "#Calculations:\n", - "\n", - "#(i)\n", - "#Condition for dark fringe is\n", - "#2ut*cos r=n*lamda\n", - "t1=n*lamda/(2*u*cos(r)) #thickness of film for dark black fringe\n", - "print\"Thickness of the film for dark black fringe is =\",t1,\"m\"\n", - "\n", - "#(ii)\n", - "#Now, condition for bright fringe is\n", - "#2ut*cos r=(2n-1)lamda/2\n", - "t2=lamda/(2*2*u*math.cos(r)) #Thickness of film for bright fringe\n", - "print\"Thickness of film for bright fringe is =\",t2,\"m\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of the film for dark black fringe is = 2.075e-07 m\n", - "Thickness of film for bright fringe is = 1.0375e-07 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7, Page number 1-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#Given Data:\n", - "i=30*math.pi/180 #angle of incidence\n", - "u=1.43 #Refractive index of a soap film\n", - "lamda=6*10**-7 #wavelength of light\n", - "n=1 #For minimum thickness\n", - "\n", - "#Calculations:\n", - "#u=sin i/sin r #Snell's law .So,\n", - "r=(math.asin(math.sin(i)/u)) #angle of reflection\n", - "\n", - "#Now, condition of minima in transmitted system is\n", - "#2ut*cos(r)=(2n-1)lamda/2\n", - "t=lamda/(2*2*u*math.cos(r)) #minimum thickness of film\n", - "print\"Minimum thickness of film is \",t,\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum thickness of film is 1.11962124395e-07 m\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.8, Page number 1-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "\n", - "lamda = 5893*10**-10 #Wavelength of light\n", - "theta = 1 #assuming value of theta\n", - "\n", - "#We know, B=lamda/(2*u*theta). Here u=1\n", - "B = lamda/(2*theta) #fringe spacing\n", - "n=20 #interference fringes\n", - "\n", - "#Calculations:\n", - "#t=n*B*tan(theta)\n", - "t = 20*B*theta #Thickness of wire\n", - "print\"Thickness of wire is =\",t,\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of wire is = 5.893e-06 m\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.9, Page number 1-20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.3 #Refractive index of oil\n", - "u2=1.5 #Refractive index of glass\n", - "lamda1=7*10**-7 #Wavelength of light\n", - "lamda2=5*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "\n", - "#for finding value of n, solve:\n", - "#(2n+1)*lamda1/2=(2(n+1)+1)*lamda2/2\n", - "#We get,n=2\n", - "n=2\n", - "\n", - "toil=(2*n+1)*lamda1/(2*u1*2) #thickness of oil layer\n", - "print\"Thickness of oil layer is =\",toil,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of oil layer is = 6.73076923077e-07 m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "Example 1.10, Page number 1-21" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.2 #Refractive index of drop of oil\n", - "u2=1.33 #Refractive index of water\n", - "lamda=4.8*10**-7 #wavelength of light\n", - "n=3 #order\n", - "r=0 #normal incidence,so r=0\n", - "\n", - "#Calculations:\n", - "t=n*lamda/(2*u1) #Thickness of oil drop\n", - "print\"Thickness of oil drop is =\",t,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of oil drop is = 6e-07 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.11, Page number 1-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "i=math.asin(4/5) #angle of incidence\n", - "u=4/3 #Refractive index of a soap film\n", - "lamda1=6.1*10**-7 #wavelength of light\n", - "lamda2=6*10**-7 #wavelength of light\n", - "\n", - "#Calculations:\n", - "#u=sin i/sin r #Snell's law .So,\n", - "r=math.asin(math.sin(i)/u) #angle of reflection\n", - "\n", - "#Now, condition for dark band is\n", - "#2ut*cos r=n*lamda\n", - "#for consecutive bands, n=lamda2/(lamda1-lamda2). hence\n", - "\n", - "t=lamda2*lamda1/((lamda1-lamda2)*2*u*math.sqrt(1-(math.sin(i)/u)**2)) #thickness of film\n", - "print\"Thickness of the film is =\",t,\"m\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of the film is = 1.83e-05 m\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.12, Page number 1-40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=10 #10th dark ring\n", - "Dn=0.5*10**-2 #Diameter of ring\n", - "lamda=6*10**-7 #wavelength of light\n", - "\n", - "#Calculations:\n", - "#As Dn^2=4*n*R*lamda\n", - "R=Dn**2/(4*n*lamda) #Radius of curvature of the lens\n", - "print\"Radius of curvature of the lens is =\",R,\"m\"\n", - "\n", - "t=Dn**2/(8*R) #thickness of air film\n", - "print\"Thickness of air film is =\",t,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of curvature of the lens is = 1.04166666667 m\n", - "Thickness of air film is = 3e-06 m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.13, Page number 1-41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "\n", - "B=0.25*10**-2 #fringe spacing\n", - "lamda=5.5*10**-7 #Wavelength of light\n", - "u=1.4 #Refractive index of wedge\n", - "\n", - "#Calculations:\n", - "#We know, B=lamda/(2*u*theta).\n", - "theta1=lamda/(2*u*B) #angle of wedge in radians\n", - "theta=theta1*3600*180/math.pi #angle of wedge in seconds\n", - "print\"Angle of wedge is =\",theta,\"seconds\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angle of wedge is = 16.2065204908 seconds\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.14, Page number 1-41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=4 #4th dark ring\n", - "m=12 #m=n+p\n", - "D4=0.4*10**-2 #Diameter of 4th ring\n", - "D12=0.7*10**-2 #Diameter of 12th ring\n", - "\n", - "#Calculations:\n", - "\n", - "#(Dn+p)^2-Dn^2=4*p*lamda*R\n", - "#Solving, (D12^2-D4^2)/(D20^2-D4^2)\n", - "#We get above value =1/2. Hence\n", - "D20=math.sqrt(2*D12**2-D4**2) #Diameter of 20th ring\n", - "print\"Diameter of 20th ring is =\",D20,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter of 20th ring is = 0.00905538513814 m\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.15, Page number 1-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=6 #6th bright ring\n", - "D6=0.31*10**-2 #Diameter of 6th ring\n", - "lamda=6*10**-7 #wavelength of light\n", - "R=1 #Radius of curvature\n", - "\n", - "#Calculations:\n", - "\n", - "#Diameter of nth bright ring is \n", - "#Dn^2=2(2n-1)*lamda*R/u. Hence\n", - "u=2*(2*n-1)*lamda*R/(D6)**2 #Refractive index of liquid\n", - "print\"Refractive index of liquid is =\",u\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of liquid is = 1.37356919875\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.16, Page number 1-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=6*10**-7 #wavelength of light\n", - "k=0.125*10**-4 #k=D(n+1)^2-Dn^2.\n", - "u=1 #Refractive index of medium between lens and plate\n", - "#Calculations:\n", - "\n", - "#(i)\n", - "lamda1=4.5*10**-7 #new wavelength of light\n", - "#Difference between squres of diameters of successive rings is directly proportional to wavelength.So,\n", - "k1=lamda1/lamda*k #new Difference between squres of diameters of successive rings after changing wavelength\n", - "print\"New Difference between squres of diameters of successive rings after changing wavelength is =\",k1,\"m^2\"\n", - "\n", - "#(ii)\n", - "u2=1.33 #Refractive index of liquid introduced between lens and plate\n", - "#Difference between squres of diameters of successive rings is inversely proportional to Refractive index.so,\n", - "k2=u/u2*k #new Difference between squres of diameters of successive rings after changing refractive index\n", - "print\"New Difference between squres of diameters of successive rings after changing refrective index is =\",k2,\"m^2\"\n", - "\n", - "#(iii)\n", - "#Difference between squres of diameters of successive rings is directly proportional to Radius of curvature.So,\n", - "#after doubling radius of curvature,\n", - "k3=2*k #new Difference between squres of diameters of successive rings after doubling radius of curvature\n", - "print\"New Difference between squres of diameters of successive rings after doubling radius of curvature is =\",k3,\"m^2\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New Difference between squres of diameters of successive rings after changing wavelength is = 9.375e-06 m^2\n", - "New Difference between squres of diameters of successive rings after changing refrective index is = 9.3984962406e-06 m^2\n", - "New Difference between squres of diameters of successive rings after doubling radius of curvature is = 2.5e-05 m^2\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.17, Page number 1-43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "Dn=0.225*10**-2 #Diameter of nth ring\n", - "Dm=0.45*10**-2 #Diameter of (n+9)th ring\n", - "lamda=6*10**-7 #wavelength of light\n", - "R=0.9 #Radius of curvature\n", - "p=9\n", - "\n", - "#Calculations:\n", - "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n", - "u=4*p*lamda*R/((Dm)**2-Dn**2) #Refractive index of liquid\n", - "print\"Refractive index of liquid is =\",u\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of liquid is = 1.28\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.18, Page number 1-44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "D10=0.5*10**-2 #Diameter of 10th ring\n", - "lamda=5.5*10**-7 #wavelength of light\n", - "u=1.25 #Refractive index of liquid\n", - "\n", - "\n", - "#Calculations:\n", - "#As Dn^2=4*n*R*lamda/u\n", - "#Dn^2 is inversely proportional to refractive index.\n", - "D10n=D10/math.sqrt(u) #new diameter of 10th ring after changing medium between lens and plate\n", - "print\"new diameter of 10th ring after changing medium between lens and plate is =\",D10n,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "new diameter of 10th ring after changing medium between lens and plate is = 0.004472135955 m\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.19, Page number 1-45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "D5=0.336*10**-2 #Diameter of 5th ring\n", - "D15=0.59*10**-2 #Diameter of 15th ring\n", - "lamda=5.89*10**-7 #wavelength of light\n", - "p=10 #n=5,n+p=15\n", - "\n", - "#Calculations:\n", - "#(Dn+p)^2-Dn^2=4*p*lamdaR/u\n", - "R=((D15)**2-D5**2)/(4*p*lamda) #Radius of curvature of the lens\n", - "print\"Radius of curvature of the lens is =\",R,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of curvature of the lens is = 0.998319185059 m\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.20, Page number 1-45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=10 #10th dark ring\n", - "D10=0.6*10**-2 #Diameter of ring\n", - "lamda=6*10**-7 #wavelength of light\n", - "u=4./3 #Refractive index of water\n", - "\n", - "\n", - "#Calculations:\n", - "#As Dn^2=4*n*R*lamda/u\n", - "R=(D10**2)*u/(4*n*lamda) #Radius of curvature of the lens\n", - "print\"Radius of curvature of the lens is =\",R,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of curvature of the lens is = 2.0 m\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.20.1, Page number 1-52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "i=45*math.pi/180 #angle of incidence\n", - "u=1.2 #Refractive index of a film\n", - "t=4*10**-7 #thickness of film\n", - "\n", - "#Calculations:\n", - "#u=sin i/sin r #Snell's law .So,\n", - "r=math.asin(math.sin(i)/u) #angle of reflection\n", - "\n", - "#Now, condition for dark fringe is\n", - "#2ut*cos r=n*lamda\n", - "lamda1=2*u*t*math.cos(r)/1 #n=1\n", - "print\"For n=1 wavelength is =\",lamda1,\"m\"\n", - "print\"This is in the visible spectrum and it will remain absent.\" \n", - "\n", - "lamda2=2*u*t*math.cos(r)/2 #n=2\n", - "print\"For n=2 wavelength is =\",lamda2,\"m\"\n", - "print\"This is not in the visible spectrum\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For n=1 wavelength is = 7.75628777187e-07 m\n", - "This is in the visible spectrum and it will remain absent.\n", - "For n=2 wavelength is = 3.87814388593e-07 m\n", - "This is not in the visible spectrum\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.20.2, Page number 1-53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "r=45*math.pi/180 #angle of refraction\n", - "u=1.45 #Refractive index of a medium\n", - "lamda=5.5*10**-7 #wavelength of required yellow light\n", - "n=1\n", - "\n", - "#Calculations:\n", - "\n", - "#Now, condition for dark fringe is\n", - "#2ut*cos r=n*lamda\n", - "t=n*lamda/(2*u*math.cos(r)) #thickness of thin medium\n", - "print\"Thickness of the thin medium is =\",t,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of the thin medium is = 2.68212917002e-07 m\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.21, Page number 1-45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u=1.33 #Refractive index of a soap film\n", - "r=0 #normal incidence\n", - "t=5*10**-7 #thickness of film\n", - "\n", - "#Calculations:\n", - "\n", - "#Now, condition for maxima is\n", - "#2ut*cos r=(2n-1)lamda/2\n", - "lamda1=4*u*t*math.cos(r)/(2*1-1) #n=1\n", - "print\"For n=1 wavelength is =\",lamda1,\"m\"\n", - "lamda2=4*u*t*math.cos(r)/(2*2-1) #n=2\n", - "print\"For n=2 wavelength is =\",lamda2,\"m\"\n", - "lamda3=4*u*t*math.cos(r)/(2*3-1) #n=3\n", - "print\"For n=3 wavelength is =\",lamda3,\"m\"\n", - "lamda4=4*u*t*math.cos(r)/(2*4-1) #n=4\n", - "print\"For n=4 wavelength is =\",lamda4,\"m\"\n", - "\n", - "print\"Out of these wavelengths wavelength for n=3 lies in the visible spectrum.\"\n", - "print\"Hence, wavelength for n=3 is the most reflected wavelength.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For n=1 wavelength is = 2.66e-06 m\n", - "For n=2 wavelength is = 8.86666666667e-07 m\n", - "For n=3 wavelength is = 5.32e-07 m\n", - "For n=4 wavelength is = 3.8e-07 m\n", - "Out of these wavelengths wavelength for n=3 lies in the visible spectrum.\n", - "Hence, wavelength for n=3 is the most reflected wavelength.\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.22, Page number 1-46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u=1.5 #Refractive index of a oil\n", - "lamda=5.88*10**-7 #wavelength of required yellow light\n", - "n=1 #for smallest thickness\n", - "r=60*math.pi/180 #angle of reflection\n", - "\n", - "#Calculations:\n", - "\n", - "#Now, condition for dark fringe is\n", - "#2ut*cos r=n*lamda\n", - "t=n*lamda/(2*u*math.cos(r)) #thickness of film\n", - "print\"Thickness of the film is =\",t,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of the film is = 3.92e-07 m\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.23, Page number 1-46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "theta=20./3600*math.pi/180 #angle of wedge in radians\n", - "B=0.25*10**-2 #fringe spacing\n", - "u=1.4 #Refractive index of film\n", - "\n", - "#Calculations:\n", - "#We know, B=lamda/(2*u*theta).\n", - "lamda=2*B*theta*u #wavelength of light\n", - "print\"Wavelength of light is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of light is = 6.78739153553e-07 m\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.24, Page number 1-47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "#Dn=2*D40\n", - "\n", - "#Calculations:\n", - "#As Dn^2 = 4*n*R*lamda/u and Dn^2 = 4*D40^2\n", - "#i.e. 4*n*R*lamda/u = 4*4*40*R*lamda/u .hence,\n", - "n=4*40 #order of the required ring\n", - "print\"Order of the dark ring which will have double the diameter of that of 40th ring is =\",n\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Order of the dark ring which will have double the diameter of that of 40th ring is = 160\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.25, Page number 1-47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda1=6*10**-7 #wavelength of light\n", - "lamda2=4.5*10**-7 #wavelength of light\n", - "R=0.9 #Radius of curvature\n", - "\n", - "#Calculations:\n", - "#As Dn^2=4*n*R*lamda.\n", - "#Dn^2=D(n+1)^2 for different wavelengths.we get,\n", - "n=lamda2/(lamda1-lamda2) #nth dark ring due to lam1 which coincides with (n+1)th dark ring due lamda2\n", - "D3=math.sqrt(4*n*R*lamda1) #diameter of 3rd dark ring for lamda1\n", - "print\"Diameter of 3rd dark ring for lam1 is =\",D3,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter of 3rd dark ring for lam1 is = 0.00254558441227 m\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.26, Page number 1-48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "i=45*math.pi/180 #angle of incidence\n", - "u=4./3 #Refractive index of soap film\n", - "lamda=5*10**-7 #wavelength of light\n", - "t=1.5*10**-6 #thickness of film\n", - "\n", - "#Calculations:\n", - "#u=sin i/sin r #Snell's law .So,\n", - "r=math.asin(math.sin(i)/u) #angle of reflection\n", - "\n", - "#Now, condition for dark band is\n", - "#2ut*cos r=n*lamda\n", - "n=2*u*t*math.cos(r)/lamda #order of band\n", - "print\"order of dark band is =\",n\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "order of dark band is = 6.78232998313\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.27, Page number 1-49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "D5=0.336*10**-2 #Diameter of 5th ring\n", - "D15=0.59*10**-2 #Diameter of 15th ring\n", - "lamda=5.89*10**-7 #wavelength of light\n", - "p=10 #n=5,n+p=15\n", - "\n", - "#Calculations:\n", - "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n", - "R=((D15)**2-D5**2)/(4*p*lamda) #Radius of curvature of the lens\n", - "print\"Radius of curvature of the lens is =\",R,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of curvature of the lens is = 0.998319185059 m\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.29, Page number 1-50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#As Dn^2=4*n*R*lamda.\n", - "#thus, Dn is directly proportional to sqaure root of n\n", - "D5=math.sqrt(5) #D5 is directly proportional to sqaure root of 5\n", - "D4=math.sqrt(4) #D4 is directly proportional to sqaure root of 4\n", - "k1=D5-D4\n", - "print\"Separation between D5 and D4 is directly proportional to =\",k1\n", - "\n", - "D80=math.sqrt(80) #D80 is directly proportional to sqaure root of 80\n", - "D79=math.sqrt(79) #D79 is directly proportional to sqaure root of 79\n", - "k2=D80-D79\n", - "print\"Separation between D80 and D79 is directly proportional to =\",k2\n", - "\n", - "print\"Thus, (D80-D79) < (D5-D4). Hence proved.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Separation between D5 and D4 is directly proportional to = 0.2360679775\n", - "Separation between D80 and D79 is directly proportional to = 0.0560774926836\n", - "Thus, (D80-D79) < (D5-D4). Hence proved.\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.30, Page number 1-51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "D5=0.336*10**-2 #Diameter of 5th ring\n", - "D15=0.59*10**-2 #Diameter of 15th ring\n", - "p=10 #n=5,n+p=15\n", - "R=1 #Radius of curvature\n", - "\n", - "#Calculations:\n", - "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n", - "lamda=((D15)**2-D5**2)/(4*p*R) #Wavelength of light\n", - "print\"Wavelength of light is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of light is = 5.8801e-07 m\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.31, Page number 1-51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "\n", - "#Condition for bright band is\n", - "#2ut*cos r = (2n-1)*lamda1\n", - "\n", - "#for consecutive bands, 2n=(lamda1+lamda2)/(lamda1-lamda).\n", - "#thus, 2ut*cos r = lamda2*lamda1/(lamda1-lamda2)\n", - "\n", - "#And, thicknessof film \n", - "#t= lamda2*lamda1/((2*u*cosr)(lamda1-lamda2))\n", - "print\"Hence expression for thickness of film is obtained.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hence expression for thickness of film is obtained.\n" - ] - } - ], - "prompt_number": 56 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics-II/chapter2.ipynb b/Applied_Physics-II/chapter2.ipynb deleted file mode 100755 index 6af9170f..00000000 --- a/Applied_Physics-II/chapter2.ipynb +++ /dev/null @@ -1,1480 +0,0 @@ -{ - "metadata": { - "celltoolbar": "Raw Cell Format", - "name": "", - "signature": "sha256:1b2e4fb9c2f216cbf762800ac72003e90570cd62834a70860272dd5120eea60f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2: Diffraction of light" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1,Page number 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=4 #order\n", - "N=1./5000*10**-2 #N=(a+b) grating element(cm)\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "#for longest wavelength, sin(theta)=1\n", - "lamda=(N/m) #longest wavelength\n", - "print\"The longest wavelength is =\" ,lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The longest wavelength is = 5e-07 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2,Page number 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda=6.5*10**-7 #Wavelength of red light\n", - "theta=30*3.142/180 #angle of diffraction\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, a*sin(theta)=m*lamda\n", - "a=m*lamda/math.sin(theta) #width of slit\n", - "print\"width of slit is = \",a,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "width of slit is = 1.29984715296e-06 m\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3,Page number 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda=4*10**-7 #Wavelength of light\n", - "a=10**-6 #width of slit\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, a*sin(theta)=m*lamda\n", - "theta=math.asin(m*lamda/a)*180/3.142 #angular position in first minima\n", - "print\"angular position in first minima is =\",theta,\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "angular position in first minima is = 23.5751216716 degrees\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4,Page number 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda1=4*10**-7 #Wavelength of light\n", - "lamda2=7*10**-7 #Wavelength of light\n", - "n=1./6000*10**-2 #n=(a+b) grating element\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "theta1=math.asin(m*lamda1/n)*(180/3.142) #angle of diffraction\n", - "theta2=math.asin(m*lamda2/n)*(180/3.142) #angle of diffraction\n", - "d=theta2-theta1 #angular breadth of first order visible spectrum\n", - "print\"angular breadth of first order visible spectrum is = \",d,\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "angular breadth of first order visible spectrum is = 10.9466277612 degrees\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5,Page number 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda=6.56*10**-7 #Wavelength of red light\n", - "theta=18.25*math.pi/180 #angle of diffraction\n", - "W=2*10**-2 #width of grating\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "N=math.sin(theta)/(m*lamda) #N-number of lines per m, N=1/(a+b)\n", - "Tn=N*W #Total number of lines on grating\n", - "print\"Total number of lines on grating is =\",Tn\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total number of lines on grating is = 9547.67702694\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7,Page number 2-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "GE=2.54/15000*10**-2 #GE=(a+b) grating element\n", - "lamda1=4*10**-7 #Wavelength of light\n", - "lamda2=7*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "theta11=math.asin(1*lamda1/GE)*180/math.pi #angular position of first minima for lamda1\n", - "theta12=math.asin(2*lamda1/GE)*180/math.pi #angular position of second minima for lamda1\n", - "theta13=math.asin(3*lamda1/GE)*180/math.pi #angular position of third minima for lamda1\n", - "\n", - "theta21=math.asin(1*lamda2/GE)*180/math.pi #angular position of first minima for lamda2\n", - "theta22=math.asin(2*lamda2/GE)*180/math.pi #angular position of second minima for lamda2\n", - "theta23=math.asin(1)*180/math.pi #angular position of third minima for lamda2\n", - "\n", - "print\"Thus the angular position for lamda1 and lamda2 are as follows:\"\n", - "print\"First order:\",theta11,\"degrees\"\n", - "print\"\",theta21,\"degrees --Isolated\"\n", - "\n", - "print\"Second order:\",theta12,\"degrees\"\n", - "print\"\",theta22,\"degrees --Overlap\"\n", - "\n", - "print\"Third order: \",theta13,\"degrees\"\n", - "print\"\",theta23,\" degrees --Overlap \"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thus the angular position for lamda1 and lamda2 are as follows:\n", - "First order: 13.6635763633 degrees\n", - " 24.4177053663 degrees --Isolated\n", - "Second order: 28.1928605617 degrees\n", - " 55.7685229906 degrees --Overlap\n", - "Third order: 45.1261086702 degrees\n", - " 90.0 degrees --Overlap \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8,Page number 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=5.893*10**-7 #Wavelength of light\n", - "d=0.01*10**-2 #width of slit (a=d)\n", - "f=1 #distance between screen and slit\n", - "\n", - "#Calculations:\n", - "x=f*lamda/d #separation between central maxima and first minima\n", - "print\"Separation between central maxima and first minima is = \",x,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Separation between central maxima and first minima is = 0.005893 m\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9,Page number 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda=6*10**-7 #Wavelength of light\n", - "a=12*10**-7 #width of slit\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, a*sin(theta)=m*lamda\n", - "theta=math.asin(m*lamda/a)*180/math.pi #angular position in first minima\n", - "print\"Half angular width of first maxima is =\",theta,\"Degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Half angular width of first maxima is = 30.0 Degrees\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.10,Page number 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=6*10**-7 #Wavelength of light\n", - "a=0.02*10**-2 #width of slit (a=d)\n", - "f=2 #distance between screen and slit\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, a*sin(theta)=m*lamda, here m=1\n", - "theta=math.asin(lamda/a)*180*60/math.pi #angular position in first minima (1 degree=60 minutes)\n", - "print\"Total angular width is =\",2*theta,\"minutes\"\n", - "\n", - "x=f*lamda/a #separation between central maxima and first minima\n", - "print\"Linear width is = \",2*x,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total angular width is = 20.6265115646 minutes\n", - "Linear width is = 0.012 m\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.11,Page number 2-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "a=0.14*10**-3 #width of slit\n", - "n=2 #order\n", - "y=1.6*10**-2 #separation between second dark band and central bright band\n", - "D=2 #distance between screen and slit\n", - "\n", - "#Calculations:\n", - "\n", - "theta=y/D #from diagram \n", - "\n", - "#We know, a*sin(theta)=n*lamda\n", - "#here sin(theta)=theta\n", - "lamda=a*theta/n #wavelength of light\n", - "print\"wavelength of light is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "wavelength of light is = 5.6e-07 m\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.13,Page number 2-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=6.328*10**-7 #Wavelength of light\n", - "N=1./6000*10**-2 #N=(a+b) grating element\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, N*sin(theta)=m*lamda\n", - "theta1=math.asin(1*lamda/N)*180/math.pi #angular position in first order maxima,m=1\n", - "print\"Angular position in first order maxima is =\",theta1,\"Degrees\"\n", - "\n", - "theta2=math.asin(2*lamda/N)*180/math.pi #angular position in second order maxima,m=2\n", - "print\"Angular position in second order maxima is = \",theta2,\"Degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angular position in first order maxima is = 22.3138625335 Degrees\n", - "Angular position in second order maxima is = 49.4078093436 Degrees\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.14,Page number 2-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda1=6*10**-7 #wavelength of yellow light\n", - "lamda2=4.8*10**-7 #wavelength of blue light\n", - "theta=(math.asin(3/4)) #angle of diffraction\n", - "\n", - "#Calculations:\n", - "\n", - "#for consecutive bands, n*lamda1=(n+1)*lamda2. thus,\n", - "n=lamda2/(lamda1-lamda2) #order\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "N=n*lamda1/(3./4) #N=(a+b) grating element\n", - "print\"Grating element (a+b) is =\",N,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Grating element (a+b) is = 3.2e-06 m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.15.1,Page number 2-54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "a=0.2*10**-3 #width of slit\n", - "n=1 #order\n", - "y=0.5*10**-2 #separation between first minima and central bright band\n", - "D=2 #distance between screen and slit\n", - "\n", - "#Calculations:\n", - "\n", - "theta=y/D #from diagram \n", - "\n", - "#We know, a*sin(theta)=n*lamda\n", - "#here sin(theta)=theta\n", - "lamda=a*theta/n #wavelength of light\n", - "print\"wavelength of light is = \",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "wavelength of light is = 5e-07 m\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.15.2,Page number 2-55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda1=5.4*10**-7 #Wavelength of light\n", - "lamda2=4.05*10**-7 #Wavelength of light\n", - "theta=30*math.pi/180 #angle of diffraction\n", - "\n", - "#Calculations:\n", - "#We know, (a+b)*sin(theta)=n*lamda\n", - "#n*lamda1=(n+1)*lamda2, we get \n", - "n=3\n", - "N=math.sin(theta)/(n*lamda1)*10**-2 #Number of lines per m= 1/(a+b)*10^-2\n", - "print\"Number of lines per cm is = \",N\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of lines per cm is = 3086.41975309\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.15.4,Page number 2-56" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "GE=1./6000*10**-2 #GE=(a+b) grating element\n", - "lamda1=5.893*10**-7 #Wavelength of light\n", - "lamda2=5.896*10**-7 #Wavelength of light\n", - "m=2 #order\n", - "\n", - "#Calculations:\n", - "theta1=math.asin(m*lamda1/GE)*180/math.pi #angular position in first minima\n", - "theta2=math.asin(m*lamda2/GE)*180/math.pi #angular position in second minima\n", - "\n", - "a_s=(theta2-theta1) #Angular separation in minutes\n", - "print\"Angular separation is =\",a_s,\"Degrees\"\n", - "\n", - "dlamda=lamda2-lamda1 #difference in wavelength\n", - "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", - "\n", - "#We know that R.P.=lamda/dlamda=m*N\n", - "N=lamda/dlamda/m #Number of lines on grating for first order\n", - "print\"Number of lines on grating for first order is =\",N\n", - "print\"But, number of lines per cm on grating is 6000. \\n Which is greater than number of lines per cm needed for resolution.\"\n", - "print\"Hence, both lines will be well resolved in 2nd order.\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angular separation is = 0.0291798772234 Degrees\n", - "Number of lines on grating for first order is = 982.416666667\n", - "But, number of lines per cm on grating is 6000. \n", - " Which is greater than number of lines per cm needed for resolution.\n", - "Hence, both lines will be well resolved in 2nd order.\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.17,Page number 2-39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "d=0.04*10**-2 #Separation between slits\n", - "D=1.7 #distance between screen and slit\n", - "B=0.25*10**-2 #Fringe spacing\n", - "\n", - "#Calculations:\n", - "#We know,B=D*lamda/d\n", - "lamda=B*d/D #Wavelength of light\n", - "print\"Wavelength of light is = \",lamda,\"m\"\n", - "\n", - "#The condition for missing order is,\n", - "#(a+b)/a = m/n\n", - "b=0.04*10**-2 #Separation in slits\n", - "a=0.08*10**-3 #Slit width\n", - "n=(a+b)/a #missing orders for m=1,2,3\n", - "\n", - "n1=1*n\n", - "n2=2*n\n", - "n3=3*n\n", - "print\"Missing orders are =\",n1,\",\",n2,\",\",n3\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of light is = 5.88235294118e-07 m\n", - "Missing orders are = 6.0 , 12.0 , 18.0\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.18,Page number 2-39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "N=2.54/2620*10**-2 #N=(a+b) grating element\n", - "lamda=5*10**-7 #Wavelength of red light\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=n*lamda\n", - "#maximum value of sin(theta)=1\n", - "n=N/lamda #Maximum number of orders visible\n", - "print\"Maximum number of orders visible is =\",n\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum number of orders visible is = 19.3893129771\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.19,Page number 2-40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "N=1./4000*10**-2 #N=(a+b) grating element\n", - "lamda1=5*10**-7 #Wavelength of light\n", - "lamda2=7.5*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=n*lamda\n", - "#maximum value of sin(theta)=1\n", - "n1=N/lamda1 #Maximum number of orders visible\n", - "n2=N/lamda2 #Maximum number of orders visible\n", - "print\"The observed number of orders range between =\",n2,\"to\",n1\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The observed number of orders range between = 3.33333333333 to 5.0\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.20,Page number 2-40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=5 #order\n", - "lamda=6*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "#We know, a*sin(theta)=n*lamda\n", - "#n*lamda=n1*lamda1\n", - "lamda1=n*lamda/4 #for n1=4\n", - "print\"For n1=4 wavelength is =\",lamda1,\"m\"\n", - "\n", - "lamda2=n*lamda/5 #for n1=5\n", - "print\"For n1=5 wavelength is =\",lamda2,\"m\"\n", - "\n", - "lamda3=n*lamda/6 #for n1=6\n", - "print\"For n1=5 wavelength is =\",lamda3,\"m\"\n", - "\n", - "lamda4=n*lamda/7 #for n1=7\n", - "print\"For n1=5 wavelength is =\",lamda4,\"m\"\n", - "\n", - "lamda5=n*lamda/8 #for n1=8\n", - "print\"For n1=5 wavelength is =\",lamda5,\"m\"\n", - "\n", - "\n", - "print\"So,in the grating spectrum spectrum lines with wavelengths n1=6 and n1=7 will coincide with fifth order line of 6*10^-7 m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For n1=4 wavelength is = 7.5e-07 m\n", - "For n1=5 wavelength is = 6e-07 m\n", - "For n1=5 wavelength is = 5e-07 m\n", - "For n1=5 wavelength is = 4.28571428571e-07 m\n", - "For n1=5 wavelength is = 3.75e-07 m\n", - "So,in the grating spectrum spectrum lines with wavelengths n1=6 and n1=7 will coincide with fifth order line of 6*10^-7 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.21,Page number 2-41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "GE=18000*10**-10 #GE=(a+b) grating element\n", - "lamda=5*10**-7 #Wavelength of red light\n", - "\n", - "#Calculations:\n", - "DP1=1./sqrt(GE**2-lamda**2)*10**-10 #Dispersive power\n", - "print\"Dispersive power for first order is =\",DP1,\"rad/Angstrom\"\n", - "\n", - "m=3\n", - "DP2=1/sqrt((GE/m)**2-lamda**2)*10**-10 #Dispersive power\n", - "print\"Dispersive power for second order is =\",DP2,\"rad/Angstrom\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Dispersive power for first order is = 5.78314931966e-05 rad/Angstrom\n", - "Dispersive power for second order is = 0.000301511344578 rad/Angstrom\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.22,Page number 2-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "N=2.54/15000*10**-2 #N=(a+b) grating element\n", - "lamda=5.9*10**-7 #Wavelength of light\n", - "m=2 #order\n", - "f=25*10**-2 #focal length of lens\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "theta=math.asin(m*lamda/N) #angular position in first minima\n", - "\n", - "Ad=m/N/cos(theta) #angular dispersion\n", - "\n", - "ld=f*Ad*10**-8 #linear dispersion (dx/dl) in cm/angstrom\n", - "print\"Linear dispersion in spectrograph is =\",ld,\"cm/angstrom\"\n", - "\n", - "dlamda=(5896-5890) #difference in wavelength\n", - "dx=ld*dlamda*10**-2 #separation between spectral lines in meter\n", - "print\"Separation between spectral lines is =\",dx,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Linear dispersion in spectrograph is = 0.00411696586101 cm/angstrom\n", - "Separation between spectral lines is = 0.00024701795166 m\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.23,Page number 2-47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda1=5.89*10**-7 #Wavelength of light\n", - "lamda2=5.896*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "dlamda=lamda2-lamda1 #difference in wavelength\n", - "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", - "\n", - "#We know that R.P.=m*N=lamda/dlamda\n", - "N=lamda/dlamda/m #minimum number of lines which will just resolve\n", - "print\"Minimum number of lines which will just resolve is =\",N\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum number of lines which will just resolve is = 982.166666667\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.24,Page number 2-47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "N=5*5000 #N=W/(a+b) Number of lines on grating\n", - "m=2 #order\n", - "lamda=6*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "#(i)\n", - "RP=m*N #Resolving power\n", - "print\"(i)Resolving power is =\",RP\n", - "\n", - "#(ii)\n", - "#We know that R.P.=lamda/dlamda\n", - "dlamda=lamda/RP #Smallest wavelength which can be resolved\n", - "print\"(ii)Smallest wavelength which can be resolved is =\",dlamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)Resolving power is = 50000\n", - "(ii)Smallest wavelength which can be resolved is = 1.2e-11 m\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.25,Page number 2-48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "GE=1./4000*10**-2 #GE=(a+b) grating element\n", - "lamda=5*10**-7 #Wavelength of red light\n", - "m=3 #order\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "theta=math.asin(m*lamda/GE) #ngular position in first minima\n", - "\n", - "DP=m/(GE*math.cos(theta))*10**-2 #Dispersive power\n", - "print\"Dispersive power is =\",DP\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Dispersive power is = 15000.0\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.26,Page number 2-48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=2 #order\n", - "lamda=6*10**-7 #Wavelength of light\n", - "dlamda=6*10**-10 #difference in wavelength\n", - "W=2*10**-2 #Width of surface\n", - "\n", - "#Calculations:\n", - "\n", - "#We know that R.P.=lamda/dlamda=m*N\n", - "N=lamda/dlamda/m #Number of lines on grating\n", - "GE=W/N #Grating element=(a+b)\n", - "print\"Grating element is =\",GE,\"cm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Grating element is = 4e-05 cm\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.27,Page number 2-49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=2 #order\n", - "lamda1=5.77*10**-7 #Wavelength of light\n", - "lamda2=5.791*10**-7 #Wavelength of light\n", - "GE=1./6000*10**-2 #GE=(a+b) grating element\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "theta1=math.asin(m*lamda1/GE)*180/math.pi #angular position in first minima\n", - "theta2=math.asin(m*lamda2/GE)*180/math.pi #angular position in second minima\n", - "\n", - "a_s=(theta2-theta1)*60 #Angular separation in minutes\n", - "print\"Angular separation is = \",a_s,\"minutes\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angular separation is = 12.0270825521 minutes\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.28,Page number 2-49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=1 #order\n", - "lam=5.89*10**-7 #Wavelength of light\n", - "a=0.3*10**-3 #width of slit\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, a*sin(theta)=n*lamda\n", - "theta1=math.asin(n*lamda/a)*180/math.pi*60 #angular position in first dark band in minutes\n", - "print\"Angular position in first dark band is = \",theta1,\"mimutes\"\n", - "\n", - "#We know,for bright band a*sin(theta)=(2n+1)*lamda/2\n", - "theta2=math.asin(1.5*lamda/a)*180/math.pi*60 #angular position in first bright band in minutes\n", - "print\"Angular position in first bright band is =\",theta2,\"minutes\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angular position in first dark band is = 6.87549812524 mimutes\n", - "Angular position in first bright band is = 10.3132557823 minutes\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.29,Page number 2-50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "GE=2.54/16000*10**-2 #GE=(a+b) grating element\n", - "lamda=6*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "#maximum value of sin(theta)=1\n", - "m=GE/lamda #Maximum order of spectra\n", - "print\"Maximum order of spectra is =\",m\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum order of spectra is = 2.64583333333\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.30,Page number 2-50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "GE=1./5000*10**-2 #GE=(a+b) grating element\n", - "lamda=5.89*10**-7 #Wavelength of light\n", - "N=3*5000 #N=W/(a+b) Number of lines on grating\n", - " \n", - "#Calculations:\n", - "\n", - "#We know, (a+b)*sin(theta)=m*lamda\n", - "#maximum value of sin(theta)=1\n", - "m=GE/lamda #Maximum order of spectra\n", - "print\"Maximum order of spectra is =\",m\n", - "\n", - "RP=3*N #Resolving power (round of m to 3)\n", - "print\"Resolving power is =\",RP\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum order of spectra is = 3.39558573854\n", - "Resolving power is = 45000\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.32,Page number 2-52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda1=5.89*10**-7 #Wavelength of light\n", - "lamda2=5.896*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "dlamda=lamda2-lamda1 #difference in wavelength\n", - "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", - "\n", - "#(i)\n", - "m1=1 #first order\n", - "#We know that R.P.=lamda/dlamda=m*N\n", - "N1=lamda/dlamda/m1 #Number of lines on grating\n", - "print\"(i)Number of lines on grating for first order is =\",N1\n", - "\n", - "#(ii)\n", - "m2=2 #second order\n", - "#We know that R.P.=lamda/dlamda=m*N\n", - "N2=lamda/dlamda/m2 #Number of lines on grating\n", - "print\"(ii)Number of lines on grating for second order is =\",N2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)Number of lines on grating for first order is = 982.166666667\n", - "(ii)Number of lines on grating for second order is = 491.083333333\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.33,Page number 2-52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #order\n", - "lamda=6.553*10**-7 #Wavelength of light\n", - "dlamda=1.8*10**-10 #difference in wavelength\n", - "\n", - "\n", - "#Calculations:\n", - "\n", - "#We know that R.P.=lam/dlam=m*N\n", - "N=lamda/dlamda/m #Number of lines on grating\n", - "print\"Number of lines on grating is =\",N\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of lines on grating is = 3640.55555556\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.34,Page number 2-53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda1=5.14034*10**-7 #Wavelength of light\n", - "lamda2=5.14085*10**-7 #Wavelength of light\n", - "\n", - "#Calculations:\n", - "dlamda=lamda2-lamda1 #difference in wavelength\n", - "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", - "\n", - "#We know that R.P.=lamda/dlamda=m*N\n", - "N=lamda/dlamda/1 #Number of lines on grating\n", - "print\"Number of lines on grating for first order is =\",N\n", - "\n", - "#Hence R.P. for second order should be\n", - "RP1=2*N\n", - "print\"Resolving power in second order should be is= \",RP1\n", - "\n", - "#But here,\n", - "\n", - "lamda3=8.03720*10**-7 #Wavelength of light\n", - "lamda4=8.03750*10**-7 #Wavelength of light\n", - "dlamda2=lamda4-lamda3 #difference in wavelength\n", - "lamda2=(lamda4+lamda3)/2 #Mean wavelength\n", - "\n", - "RP2=lamda2/dlamda2\n", - "print\"Resolving power in second order is= \",RP2\n", - "\n", - "print\"So, the grating will not be able to resolve 8.0372*10^-7 and 8.03750*10^-7 in second order.\"\n", - "print\"Because Resolving power is greter than actual Resolving power.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of lines on grating for first order is = 10079.5980392\n", - "Resolving power in second order should be is= 20159.1960784\n", - "Resolving power in second order is= 26791.1666667\n", - "So, the grating will not be able to resolve 8.0372*10^-7 and 8.03750*10^-7 in second order.\n", - "Because Resolving power is greter than actual Resolving power.\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.35,Page number 2-53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#For grating , Condition of maxima is (a+b)sin(theta)=n*lamda\n", - "#Given (a+b) < 2*lamda\n", - "#For maximum order, sin(90)=1\n", - "#So, n must be less than 2\n", - "#i.e. only first order possible if width of grating element is less than twice the wavelength\n", - "print\"Hence, Only first order possible if width of grating element is less than twice the wavelength.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hence, Only first order possible if width of grating element is less than twice the wavelength.\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.36,Page number 2-54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n=1 #order\n", - "lamda=5.89*10**-7 #Wavelength of light\n", - "a=0.3*10**-3 #width of slit\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, a*sin(theta)=n*lamda\n", - "theta1=math.asin(n*lam/a)*180/math.pi #angular position in first dark band\n", - "print\"Angular position in first dark band is =\",theta1,\"Degrees\"\n", - "\n", - "#We know,for bright band a*sin(theta)=(2n+1)*lamda/2\n", - "theta2=math.asin(1.5*lamda/a)*180/math.pi #angular position in first bright band\n", - "print\"Angular position in first bright band is =\",theta2,\"Degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angular position in first dark band is = 0.112490786047 Degrees\n", - "Angular position in first bright band is = 0.168736314576 Degrees\n" - ] - } - ], - "prompt_number": 35 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics-II/chapter3.ipynb b/Applied_Physics-II/chapter3.ipynb deleted file mode 100755 index 714dfad3..00000000 --- a/Applied_Physics-II/chapter3.ipynb +++ /dev/null @@ -1,836 +0,0 @@ -{ - "metadata": { - "celltoolbar": "Raw Cell Format", - "name": "", - "signature": "sha256:5f637d4fa0aa8bb3bc54a28134ac85a937c06f0d3a591f536de2719824a41f5c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Optical Fibre" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1,Page number 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n1=1.61 #Core index\n", - "n2=1.55 #Cladding index\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(n1**2-n2**2) #Formula\n", - "\n", - "print\"Numerical Aperture of Fibre is = \",NA\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.435430821142\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2,Page number 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n1=1.65 #Core index\n", - "n2=1.53 #Cladding index\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(n1**2-n2**2) #Formula\n", - "\n", - "print\"Numerical Aperture of Fibre is =\",NA\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.617737808459\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3,Page number 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n1=1.48 #R.I. of Core\n", - "n2=1.39 #R.I. of Cladding\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(n1**2-n2**2) #Formula to find NA\n", - "phi=math.asin(NA)*180/(3.1472) #Acceptance angle\n", - "\n", - "print\"Numerical Aperture of Fibre is =\",NA\n", - "print\"Acceptance angle of Fibre is =\",phi,\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.508232230383\n", - "Acceptance angle of Fibre is = 30.491727191 degrees\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4,Page number 3-20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#given data:\n", - "u1=3.6 #Refractive Index of the Substance at 850 nm\n", - "u2=3.4 #Refractive Index of the Substance at 1300 nm\n", - "Vv=3*10**8 #Velocity of light in free space\n", - "\n", - "#Calculations:\n", - "# i)Finding wavelength at 850 nm\n", - "Vs1=Vv/u1 #Velocity of light in substance at 850 nm\n", - "print\"Velocity of light in substance at 850 nm =\" ,Vs1,\"m/sec\"\n", - "\n", - "lam1=850*10**-9/u1 #Wavelength of light in substance at 850nm\n", - "print\" Wavelength of light in substance at 850nm =\",lam1,\"m\"\n", - "\n", - "\n", - "#ii)Finding wavelength at 1300 nm\n", - "Vs2=Vv/u2 #Velocity of light in substance at 1300 nm\n", - "print\"Velocity of light in substance at 1300 nm =\",Vs2,\" m/sec\"\n", - "\n", - "lam2=1300*10**-9/u2 #Wavelength of light in substance at 1300nm\n", - "print\"Wavelength of light in substance at 1300nm =\" ,lam2,\"m \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity of light in substance at 850 nm = 83333333.3333 m/sec\n", - " Wavelength of light in substance at 850nm = 2.36111111111e-07 m\n", - "Velocity of light in substance at 1300 nm = 88235294.1176 m/sec\n", - "Wavelength of light in substance at 1300nm = 3.82352941176e-07 m \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5,Page number 3-20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.5 #R.I. of Core\n", - "u2=1.45 #R.I.of Cladding\n", - "delta= (u1-u2)/u1 #Fractional Refractive index\n", - "\n", - "#Calculations:\n", - "NA=u1*sqrt(2*delta) #Formula to find NA\n", - "theta0=math.asin(NA)*180/(3.1472) #Acceptance angle\n", - "thetac=math.asin(u2/u1)*180/(3.1472) #Critical angle\n", - "\n", - "print\"Numerical Aperture of Fibre is =\",NA\n", - "print\"Acceptance angle of Fibre is =\",theta0,\"degrees\" \n", - "print\" Critical angle of Fibre is =\",thetac,\"degrees\" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.387298334621\n", - "Acceptance angle of Fibre is = 22.7458994397 degrees\n", - " Critical angle of Fibre is = 75.0309676099 degrees\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6,Page number 3-20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "NA=0.22 # Numerical Aperture of Fibre\n", - "delta=0.012 #Fractional index\n", - "\n", - "#Calculations:\n", - "#Delta=(u1-u2)/u1\n", - "u1=NA/math.sqrt(2*delta) #Formula\n", - "u2=u1-(u1*delta) #Formula\n", - "\n", - "print\"Refractive Index of core of fibre is =\",u1\n", - "print\"Refractive Index of cladding of fibre is =\",u2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive Index of core of fibre is = 1.42009389361\n", - "Refractive Index of cladding of fibre is = 1.40305276689\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7,Page number 3-21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.466 #R.I. of Core\n", - "u2=1.46 #R.I.of Cladding\n", - "V=2.4 #Cut off parameter\n", - "lamda=0.8*10**-6 #wavelength in meter\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", - "print\"Numerical Aperture of Fibre is =\",NA\n", - "#(printing mistake in book)printed answer is 1.13 but correct answer is 0.13\n", - "print\"(printing mistake in book)\"\n", - "\n", - "# V = 2*3.142*a*NA / lamda\n", - "a=V*lamda/(2*3.142*NA) #core radius\n", - "print\"Core radius of Fibre is (a) =\",a,\"m\"\n", - "\n", - "#w/a= 1.1\n", - "w=1.1*a #Spot size\n", - "print\"Spot size of Fibre is =\",w,\"m\"\n", - "\n", - "theta=2*lamda*180/3.142/(3.142*w) #Divergence angle\n", - "print\"Divergence angle of Fibre is =\",theta,\"degrees\"\n", - "\n", - "w10=lamda*10/(3.142*w) #Spot size at 10 m\n", - "print\"Spot size at 10 m of Fibre is =\",w10,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.1324990566\n", - "(printing mistake in book)\n", - "Core radius of Fibre is (a) = 2.30596263706e-06 m\n", - "Spot size of Fibre is = 2.53655890076e-06 m\n", - "Divergence angle of Fibre is = 11.5009886523 degrees\n", - "Spot size at 10 m of Fibre is = 1.00378073182 m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8,Page number 3-21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "w=98 #Spot size in meter\n", - "d=50*10**-6 #Core diameter in meter\n", - "a=d/2 #core radius\n", - "u1=1.47 #R.I. of Core\n", - "u2=1.45 #R.I.of Cladding\n", - "lamda=0.85*10**-6 #Wavlength in meter\n", - "NA=math.sqrt(u1**2-u2**2) #Formula to find NA\n", - "\n", - "#Calculations:\n", - "V=2*3.142*a*NA/lamda #cut off parameter\n", - "N=(V**2)/2 #Number of modes\n", - "\n", - "print\"Cut off parameter of Fibre is =\",V\n", - "print\"Number of modes of Fibre is =\",N\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cut off parameter of Fibre is = 44.6646240577\n", - "Number of modes of Fibre is = 997.464321107\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9,Page number 3-21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.47 #R.I. of Core\n", - "u2=1.46 #R.I.of Cladding\n", - "lamda=1.3*10**-6 #wavelength in meter\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", - "\n", - "#The condition for single mode is V<2.405\n", - "#2*3.142*a*NA/lamda < 2.405\n", - "\n", - "a=2.405*lamda/(2*3.142*NA) #Maximum radius of fibre\n", - "\n", - "print\"Maximum radius of Fibre is =\",a,\"meter\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum radius of Fibre is = 2.90662126448e-06 meter\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10,Page number 3-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.465 #R.I. of Core\n", - "u2=1.46 #R.I.of Cladding\n", - "lamda=1.25*10**-6 #operating wavelength\n", - "\n", - "#Calculations:\n", - "delta=(u1-u2)/u1 #Fractional Refractive index\n", - "print\"Fractional Refractive index of Fibre is =\",delta\n", - "\n", - "#For single mode propagation codition is \n", - "# a/lamda < 1.4/(3.142*sqrt(u1(u1-u2)))\n", - "\n", - "a=lamda*1.4/(3.142*u1*math.sqrt(delta)) #core radius\n", - "\n", - "u=u1-(math.sqrt(2*delta)/(2*3.142*(a/lamda))) #effective refractive index\n", - "print\"Effective Refractive index for lowest mode propagation is =\",u\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fractional Refractive index of Fibre is = 0.00341296928328\n", - "Effective Refractive index for lowest mode propagation is = 1.46247461864\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11,Page number 3-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.54 #R.I. of Core\n", - "u2=1.5 #R.I.of Cladding\n", - "lamda=1.3*10**-6 #wavelength in meter\n", - "a=25*10**-6 #core radius in meter\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", - "\n", - "V=2*3.142*a*NA/lamda #cut off parameter\n", - "print\"Cut off parameter of Fibre is =\",V\n", - "\n", - "N=(V**2)/2 #Number of modes\n", - "print\" Number of modes of Fibre is =\",N\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cut off parameter of Fibre is = 42.1404937865\n", - " Number of modes of Fibre is = 887.910608284\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11.1,Page number 3-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.52 #R.I. of Core\n", - "u2=1.5189 #R.I.of Cladding\n", - "lamda=1.3*10**-6 #wavelength in meter\n", - "d=29*10**-6 #core diameter in meter\n", - "a=d/2\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", - "V=2*3.142*a*NA/lamda #Normalised frequency\n", - "Nm=(V**2)/2 #Number of modes\n", - "\n", - "print\"Normalised frequency of Fibre is (V)=\",V\n", - "print\"The Maximum Number of modes the Fibre will support is (Nm) =\",Nm\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Normalised frequency of Fibre is (V)= 4.05242861605\n", - "The Maximum Number of modes the Fibre will support is (Nm) = 8.2110888441\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.12,Page number 3-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u1=1.5 #R.I. of Core\n", - "d=10*10**-6 #diameter of core\n", - "a=d/2 #core radius\n", - "lamda=1.3*10**-6 #wavelength\n", - "V=2.405 #cut off parameter for single mode\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, V=2*3.142*a*NA/lamda\n", - "NA=V*lamda/(2*3.142*a) #Numerical Aperture\n", - "\n", - "theta=math.asin(NA)*180/3.142 #Acceptance angle\n", - "print\"Acceptance angle of Fibre is =\",theta,\"Degrees\"\n", - "\n", - "#Also, NA=u1*sqrt(2*delta)\n", - "delta=(NA/u1)**2/2 #Fractional index\n", - "print\"Maximum Fractional Refractive index of Fibre is =\",delta\n", - "\n", - "#delta=(u1-u2)/u1\n", - "u2=u1*(1-delta) #R.I.of cladding\n", - "print\"Refractive index of cladding of Fibre is =\",u2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Acceptance angle of Fibre is = 5.71002346964 Degrees\n", - "Maximum Fractional Refractive index of Fibre is = 0.00220035113094\n", - "Refractive index of cladding of Fibre is = 1.4966994733\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.13,Page number 3-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n1=1.5 #R.I. of core\n", - "delta=0.0005 #Fractional index difference\n", - "\n", - "#Calculations:\n", - "#(a):\n", - "#Delta=(u1-u2)/u1\n", - "n2=n1-(n1*delta) #R.I. of cladding\n", - "print\"(a)Refractive Index of cladding of fibre is =\",n2\n", - "\n", - "#(b):\n", - "phi=math.asin(n2/n1)*180/3.142 #Critical internal reflection angle\n", - "print\"(b)Critical internal reflection angle of Fibre is =\",phi,\"degrees\"\n", - "\n", - "#(c):\n", - "theta0=math.asin(math.sqrt(n1**2-n2**2))*180/3.142 #External critical Acceptance angle\n", - "print\"(c)External critical Acceptance angle of Fibre is =\",theta0,\"degrees\"\n", - "\n", - "#(d):\n", - "NA=n1*math.sqrt(2*delta) #Formula to find Numerical Aperture\n", - "print\"(d)Numerical Aperture of Fibre is =\",NA\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a)Refractive Index of cladding of fibre is = 1.49925\n", - "(b)Critical internal reflection angle of Fibre is = 88.1766396681 degrees\n", - "(c)External critical Acceptance angle of Fibre is = 2.71810509125 degrees\n", - "(d)Numerical Aperture of Fibre is = 0.0474341649025\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.14,Page number 3-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "NA1=0.20 #Numerical Aperture of Fibre\n", - "n2=1.59 #R.I. of cladding\n", - "\n", - "#Calculations:\n", - "#NA=sqrt(n1**2-n2**2)\n", - "#In air, n0=1\n", - "n1=math.sqrt(NA1**2+n2**2) #R.I.of core\n", - "\n", - "#Now, in water \n", - "n0=1.33\n", - "NA2=math.sqrt(n1**2-n2**2)/n0 #Numerical Aperture in water\n", - "theta0=math.asin(NA2)*180/3.142 #Acceptance angle of fibre in water\n", - "print\"Acceptance angle of Fibre in water is =\",theta0,\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Acceptance angle of Fibre in water is = 8.6475921767 degrees\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15,Page number 3-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n1=1.45 #R.I.of core\n", - "n2=1.40 #R.I. of cladding\n", - "\n", - "#Calculations:\n", - "NA=math.sqrt(n1**2-n2**2) #Numerical Aperture\n", - "print\"Numerical Aperture of Fibre is =\",NA\n", - "\n", - "theta0=math.asin(NA)*180/3.142 #Acceptance angle of fibre\n", - "print\"Acceptance angle of Fibre is =\",theta0,\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.377491721764\n", - "Acceptance angle of Fibre is = 22.1755250876 degrees\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.16,Page number 3-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "NA=0.16 #Numerical Aperture of Fibre\n", - "n1=1.45 #R.I. of core\n", - "d=90*10**-6 #Core diameter\n", - "\n", - "#Calculations:\n", - "#NA=sqrt(n1**2-n2**2)\n", - "n2=math.sqrt(n1**2-NA**2) #R.I.of cladding\n", - "print\"(a)Refractive Index of cladding of fibre is =\",n2\n", - "\n", - "theta0=math.asin(NA)*180/3.142 #Acceptance angle of fibre\n", - "print\"(b)Acceptance angle of Fibre is =\",theta0,\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a)Refractive Index of cladding of fibre is = 1.44114537782\n", - "(b)Acceptance angle of Fibre is = 9.20570258795 degrees\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.17,Page number 3-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "n1=1.48 #R.I. of core\n", - "delta=0.055 #Realtive R.I.\n", - "lamda=1*10**-6 #Wavelength of light\n", - "a=50*10**-6 #core radius\n", - "\n", - "#Calculations:\n", - "#Delta=(u1-u2)/u1\n", - "n2=n1-(n1*delta) #R.I. of cladding\n", - "NA=n1*math.sqrt(2*delta) #Formula to find Numerical Aperture\n", - "print\"Numerical Aperture of Fibre is =\",NA\n", - "\n", - "\n", - "theta0=math.asin(NA)*180/3.142 #Acceptance angle of fibre\n", - "print\"Acceptance angle of Fibre is =\",theta0,\"degrees\"\n", - "\n", - "V=2*3.142*a*NA/lamda #V number\n", - "N=(V**2)/2 #Number of guided modes\n", - "\n", - "#In book,instead of NA , value of delta is taken into calculation.\n", - "#Thus there is calculation mistake in values of V and N.\n", - "\n", - "print\"V number of Fibre is =\",V\n", - "print\"Number of guided mode of Fibre is =\",N\n", - "print\"(Calculation mistake in book)\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture of Fibre is = 0.490860468973\n", - "Acceptance angle of Fibre is = 29.3933421943 degrees\n", - "V number of Fibre is = 154.228359351\n", - "Number of guided mode of Fibre is = 11893.1934141\n", - "(Calculation mistake in book)\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics-II/chapter4.ipynb b/Applied_Physics-II/chapter4.ipynb deleted file mode 100755 index 11b66b2f..00000000 --- a/Applied_Physics-II/chapter4.ipynb +++ /dev/null @@ -1,163 +0,0 @@ -{ - "metadata": { - "celltoolbar": "Raw Cell Format", - "name": "", - "signature": "sha256:e413b3bea25c7729b7ae1f595bf0f843336be8c682782f6b92de1c93aa46ed9d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4: Laser" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1,Page number 4-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=694.3*10**-9 #Wavelength in meter\n", - "T=300 #Temperature in Kelvin\n", - "\n", - "h=6.63*10**-34 #Planck's Constant\n", - "c=3*10**8 #Velocity of light\n", - "K=1.38*10**-21 #Boltzmann Constant\n", - "\n", - "#Calculations:\n", - "delE= h*c/lamda #Energy difference between two energy states N and N0\n", - "\n", - "#N=N0*e^-delE/(K*T)\n", - "R=math.e**(-delE/(K*T)) #R=Ratio of N and N0 i.e.(R=N/N0)\n", - "\n", - "#(Printing mistake in textbook)\n", - "#instead of e^-.692, it has taken e^-69.2\n", - "\n", - "print\"The ratio of population of two energy states is = \",R\n", - "print\" (calculation mistake in book)\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ratio of population of two energy states is = 0.500588928485\n", - " (calculation mistake in book)\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2,Page number 4-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Given Data:\n", - "lamda=6328*10**-10 #Wavelength in meter\n", - "P=4.5*10**-3 #Power in watts\n", - "h=6.63*10**-34 #Planck's Constant\n", - "c=3*10**8 #Velocity of light\n", - "\n", - "#Calculations:\n", - "delE= h*c/lamda #Energy difference\n", - "#N*delE=P\n", - "N=P/delE #number of photons emitted per second\n", - "\n", - "print\"Number of photons emitted per second is =\",N\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of photons emitted per second is = 1.43167420814e+16\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3,Page number 4-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "lamda=780*10**-9 #Wavelength of photon in meter\n", - "P=20*10**-3 #Power of each pulse in watts\n", - "t=10*10**-9 #Duration of each pulse\n", - "h=6.63*10**-34 #Planck's Constant\n", - "c=3*10**8 #Velocity of light\n", - "\n", - "#Calculations:\n", - "delE= h*c/lamda #Energy of each photon\n", - "E=P*t #Energy of each pulse\n", - "\n", - "N=E/delE #Number of photons in each pulse\n", - "print\"Number of photons in each pulse is =\",N\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of photons in each pulse is = 784313725.49\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics-II/chapter5.ipynb b/Applied_Physics-II/chapter5.ipynb deleted file mode 100755 index e9d81103..00000000 --- a/Applied_Physics-II/chapter5.ipynb +++ /dev/null @@ -1,1166 +0,0 @@ -{ - "metadata": { - "celltoolbar": "Raw Cell Format", - "name": "", - "signature": "sha256:fec7a7bbab2881090f60069cf3d4c856415ca45a1545225541a225f28ce72b8e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5: Foundations of Quantum Mechanics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1,Page number 5-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=6.68*10**-27 #mass of alpha particle\n", - "V=30*10**3 #potential difference\n", - "e=1.6*10**-19 #charge of an electron\n", - "q=2*e #Charge of alpha particle\n", - "h=6.63*10**-34 #Planck's constant\n", - "\n", - "#Calculations:\n", - "lamda=h/math.sqrt(2*m*q*V) #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with alpha particle is =\" ,lamda,\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Broglie wavelength associated with alpha particle is = 5.85429607723e-14 m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2,Page number 5-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1 #mass of given particle in kg\n", - "h=6.63*10**-34 #Planck's constant\n", - "v=1*10**3 #velocity of particle\n", - "\n", - "#Calculations:\n", - "lamda=h/(m*v) #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with particle is =\",lamda,\"m\"\n", - "print\"This wavelength is too small for any practical significance.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Broglie wavelength associated with particle is = 6.63e-37 m\n", - "This wavelength is too small for any practical significance.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3,Page number 5-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m1=40*10**-3 #mass of bullet in kg\n", - "m2=9.1*10**-31 #mass of electron in kg\n", - "h=6.63*10**-34 #Planck's constant\n", - "v=1100 #velocity of bullet and electron\n", - "\n", - "#Calculations:\n", - "lamda1=h/(m1*v) #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with bullet is =\",lamda1,\"m\"\n", - "\n", - "lamda2=h/(m2*v) #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with electron is =\",lamda2,\"m\"\n", - "\n", - "print\"Wavelength of bullet is too small.Hence it can not be measured with help of diffraction effect.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " de Broglie wavelength associated with bullet is = 1.50681818182e-35 m\n", - "de Broglie wavelength associated with electron is = 6.62337662338e-07 m\n", - "Wavelength of bullet is too small.Hence it can not be measured with help of diffraction effect.\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4,Page number 5-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "V=100 #potential difference\n", - "d=2.15*10**-10 #lattice spacing\n", - "\n", - "#Calculations:\n", - "lamda=12.26*10**-10/(math.sqrt(V)) #wavelength associated with electron in meter\n", - "\n", - "#using bragg's law for first order lamda=2d sin(theta)\n", - "theta=math.degrees(math.asin(lamda/(2*d))) #glancing angle in degrees\n", - "print\"Glancing angle at which first reflection occurs is =\",theta,\"Degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Glancing angle at which first reflection occurs is = 16.5657992687 Degrees\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5,Page number 5-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "mn=1.674*10**-27 #mass of neutron\n", - "h=6.63*10**-34 #Planck's constant\n", - "lamda=1*10**-10 #wavelength of neutron\n", - "\n", - "#Calculations:\n", - "\n", - "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "E1=h**2/(2*mn*lamda**2) #Energy of neutron in joules\n", - "E=E1/(1.6*10**-19) #Energy of neutron in electron-Volts\n", - "\n", - "print\"Energy of neutron is =\",E,\"eV\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of neutron is = 0.0820581317204 eV\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6,Page number 5-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "mn=1.67*10**-27 #mass of neutron\n", - "h=6.6*10**-34 #Planck's constant\n", - "lamda=3*10**-10 #wavelength of neutron\n", - "d=3.036*10**-10 #lattice spacing\n", - "\n", - "#Calculations:\n", - "\n", - "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "E1=h**2/(2*mn*lamda**2) #Energy of neutron in joules\n", - "E=E1/(1.6*10**-19) # Energy of neutron in electron-Volts\n", - "print\"Energy of neutron is =\",E,\"eV\"\n", - "\n", - "#using bragg's law for first order lamda=2d sin(theta)\n", - "theta=math.degrees(math.asin(lamda/(2*d))) #glancing angle in degrees\n", - "print\" Glancing angle at which first orde reflection occurs is =\",theta,\"Degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of neutron is = 0.00905688622754 eV\n", - " Glancing angle at which first orde reflection occurs is = 29.6085193042 Degrees\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7,Page number 5-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=9.108*10**-31 #mass of electron\n", - "h=6.625*10**-34 #Planck's constant\n", - "lamda=5*10**-7 #wavelength of electron\n", - "\n", - "#Calculations:\n", - "\n", - "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "E1=h**2/(2*m*lamda**2) #Energy of electron in joules\n", - "E=E1/(1.6*10**-19) #Energy of electron in electron-Volts\n", - "print\"Energy of electron is =\",E,\"eV\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of electron is = 6.02363650088e-06 eV\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8,Page number 5-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "mn=1.676*10**-27 #mass of neutron\n", - "me=9.1*10**-31 #mass of electron\n", - "h=6.625*10**-34 #Planck's constant\n", - "\n", - "#Calculations:\n", - "#Part 1:\n", - "En1=0.025 #Energy in eV of neutron\n", - "En=En1*(1.6*10**-19) #Energy in joules\n", - "\n", - "lamda1=h/math.sqrt(2*mn*En) #wavelength of a beam of neutron\n", - "print\"wavelength of a beam of neutron is =\",lamda1,\"m\"\n", - "\n", - "#Part 2:\n", - "lamda2=2*10**-10 #wavelength of electron and photon\n", - "\n", - "#//we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "Ee1=h**2/(2*me*lamda2**2) #Energy of electron in joules\n", - "Ee=Ee1/(1.6*10**-19) #Energy of electron in electron-Volts\n", - "print\"Energy of electron is =\",Ee,\"eV\"\n", - "\n", - "p1=h/lamda2 #momentum of electron\n", - "print\" Momentum of electron is =\",p1,\"kg.m/s\"\n", - "\n", - "C=3*10**8 #Velocity of light\n", - "Ep=h*C/lamda2 #Energy of photon in joules\n", - "print\"Energy of photon is =\",Ep,\"Joules\"\n", - "\n", - "p2=h/lamda2 #momentum of photon\n", - "print\"Momentum of photon is =\",p2,\"kg.m/s\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "wavelength of a beam of neutron is = 1.80927208246e-10 m\n", - "Energy of electron is = 37.6808250343 eV\n", - " Momentum of electron is = 3.3125e-24 kg.m/s\n", - "Energy of photon is = 9.9375e-16 Joules\n", - "Momentum of photon is = 3.3125e-24 kg.m/s\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9,Page number 5-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given data:\n", - "#We have alpha particle,neutron,proton and electron.\n", - "\n", - "#To find: shortest wavelength\n", - "\n", - "print\"We know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\"\n", - "\n", - "#Wavelength is inversely proportional to mass of particle for constant energy\n", - "print\"i.e., Wavelength is inversely proportional to mass of particle for constant energy. \"\n", - "\n", - "print\"We have alpha particle,neutron,proton and electron.\"\n", - "\n", - "#AS,alpha particle has highest mass.Thus it will have shortest wavelength.\n", - "print\"Out of above, alpha particle has highest mass.\"\n", - "\n", - "print\"Hence it will have shortest wavelength.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "We know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "i.e., Wavelength is inversely proportional to mass of particle for constant energy. \n", - "We have alpha particle,neutron,proton and electron.\n", - "Out of above, alpha particle has highest mass.\n", - "Hence it will have shortest wavelength.\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10,Page number 5-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "me=9.108*10**-31 # mass of electron\n", - "mp=1.66*10**-27 # bmass of proton\n", - "h=6.625*10**-34 # Planck's constant\n", - "lamda=1*10**-10 # wavelength of electron and proton\n", - "\n", - "#Calculations:\n", - "\n", - "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "Ee1=h**2/(2*me*lamda**2) #Energy of electron in joules\n", - "Ee=Ee1/(1.6*10**-19) #Energy of electron in electron-Volts\n", - "print\"Energy of electron is =\",Ee,\"eV\"\n", - "\n", - "Ep1=h**2/(2*mp*lamda**2) #Energy of photon in joules\n", - "Ep=Ep1/(1.6*10**-19) #Energy of photon in electron-Volts\n", - "print\"Energy of photon is =\",Ep,\"eV\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of electron is = 150.590912522 eV\n", - "Energy of photon is = 0.0826254235693 eV\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.11,Page number 5-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m1=50*10**-9 #mass of particle in kg\n", - "m2=9.1*10**-31 #mass of electron in kg\n", - "h=6.625*10**-34 #Planck's constant\n", - "v1=1 #velocity of particle\n", - "v2=3*10**6 #velocity of electron\n", - "\n", - "#Calculations:\n", - "lamda1=h/(m1*v1)*10**10 #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with particle is =\",lamda1,\"Angstrom\"\n", - "\n", - "lamda2=h/(m2*v2)*10**10 #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with electron is =\",lamda2,\"Angstrom\"\n", - "\n", - "print\"Wavelength of electron is measurable.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Broglie wavelength associated with particle is = 1.325e-16 Angstrom\n", - "de Broglie wavelength associated with electron is = 2.42673992674 Angstrom\n", - "Wavelength of electron is measurable.\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12,Page number 5-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "me=9.1*10**-31 #mass of electron in kg\n", - "h=6.63*10**-34 #Planck's constant\n", - "\n", - "#Calculations:\n", - "\n", - "E1=2*10**3 #Energy in eV of electron\n", - "E=E1*(1.6*10**-19) #Energy in joules\n", - " \n", - "lamda=h/math.sqrt(2*me*E) #wavelength of electron\n", - "print\"Wavelength of electron is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of electron is = 2.7472794985e-11 m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13,Page number 5-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "me=9.1*10**-31 #mass of electron\n", - "h=6.63*10**-34 #Planck's constant\n", - "lamda=2*10**-10 #wavelength of electron and photon\n", - "\n", - "#Calculations:\n", - "p1=h/lamda #momentum of electron\n", - "print\"Momentum of electron is =\",p1,\"kg.m/s\"\n", - "\n", - "Ee=p1**2/(2*me) #Energy of electron in joules\n", - "print\"Energy of electron is =\",Ee,\"Joules\"\n", - "\n", - "p2=h/lamda #momentum of photon\n", - "print\"Momentum of photon is =\",p2,\"kg.m/s\"\n", - "\n", - "c=3*10**8 #Velocity of light\n", - "Ep=h*c/lamda #Energy of photon in joules\n", - "print\"Energy of photon is =\",Ep,\"Joules\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Momentum of electron is = 3.315e-24 kg.m/s\n", - "Energy of electron is = 6.03803571429e-18 Joules\n", - "Momentum of photon is = 3.315e-24 kg.m/s\n", - "Energy of photon is = 9.945e-16 Joules\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14,Page number 5-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1.676*10**-27 #mass of neutron\n", - "h=6.625*10**-34 #Planck's constant\n", - "lamda=1*10**-10 #wavelength of neutron\n", - "\n", - "#Calculations:\n", - "C=3*10**8 #Velocity of light\n", - "Ep1=h*C/lamda #Energy of photon in joules\n", - "E1=Ep1/(1.6*10**-19) #Energy of photon in electron-Volts\n", - "print\"Energy of photon is =\",E1,\"eV\"\n", - "\n", - "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", - "En1=h**2/(2*m*lamda**2) #Energy of neutron in joules\n", - "E2=En1/(1.6*10**-19) #Energy of neutron in electron-Volts\n", - "print\"Energy of neutron is =\",E2,\"eV\"\n", - "\n", - "R=E1/E2 #Ratio of energies of proton to neutron\n", - "print\"Ratio of energies of proton to neutron is =\",R\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of photon is = 12421.875 eV\n", - "Energy of neutron is = 0.0818366367094 eV\n", - "Ratio of energies of proton to neutron is = 151788.679245\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Example 5.14.1,Page number 5-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "v=900 #velocity of electron in m/s\n", - "delv=v*0.001/100 #uncertainity in velocity\n", - "h=6.63*10**-34 #Planck's constant\n", - "m=9.1*10**-31 #mass of an electron\n", - "\n", - "#Calculations:\n", - "delp=m*delv #uncertainity in the measured values of momentum\n", - "\n", - "#using heisenberg's uncertainity formula\n", - "delx=h/(2*3.142*delp) #uncertainity in its position\n", - "print\"Uncertainity with which position of electron can be located is >=\",delx,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Uncertainity with which position of electron can be located is >= 0.0128823012337 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14.2,Page number 5-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1.6*10**-27 #mass of proton in kg\n", - "h=6.63*10**-34 #Planck's constant\n", - "v=3./20*10**8 #velocity of particle\n", - "\n", - "#Calculations:\n", - "lamda=h/(m*v) #de Broglie wavelength\n", - "print\"de Broglie wavelength associated with proton is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Broglie wavelength associated with proton is = 2.7625e-14 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14.3,Page number 5-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1.676*10**-27 #mass of neutron\n", - "h=6.634*10**-34 #Planck's constant\n", - "\n", - "#Calculations:\n", - "E1=0.025 #Energy in eV of neutron\n", - "E=E1*(1.6*10**-19) #Energy in joules\n", - "#As E=m*v**2/2\n", - "v=math.sqrt(2*E/m) #Velocity of neutron beam\n", - "\n", - "lamda=h/(m*v) #wavelength of a beam of neutron\n", - "print\"wavelength of a beam of neutron is =\",lamda,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "wavelength of a beam of neutron is = 1.81172996152e-10 m\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14.4,Page number 5-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "delx=10*10**-9 #uncertainity in position of electron\n", - "h=6.63*10**-34 #Planck's constant\n", - "m=9.1*10**-31 #mass of an electron\n", - "E=10**3*1.6*10**-19 #Energy of electron in joules\n", - "\n", - "#Calculations:\n", - "p=math.sqrt(2*m*E) #momentum of electron\n", - "#using heisenberg's uncertainity formula\n", - "delp=h/(2*math.pi*delx) #uncertainity in the momentum\n", - "\n", - "P=delp/p*100 #percentage of uncertainity in momentum\n", - "print\"Percentage of uncertainity in momentum of electron is =\",P,\"percent\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage of uncertainity in momentum of electron is = 0.0618355139385 percent\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15,Page number 5-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1.676*10**-27 #mass of neutron\n", - "h=6.63*10**-34 #Planck's constant\n", - "lamda=2*10**-12 #wavelength of neutron\n", - "c=3*10**8 #Velocity of light\n", - "\n", - "#Calculations:\n", - "p=h/lamda #momentum of neutron\n", - "KE=p**2/(2*m) #Kinetic Energy of neutron in joules\n", - "print\"Kinetic Energy of electron is =\",KE,\"Joules\"\n", - "\n", - "#velocity of particle is same as group velocity. Thus,\n", - "vg=p/m #group velocity\n", - "print\"group velocity of neutron is =\",vg,\"m/s\"\n", - "\n", - "#using, vg*vp=c**2\n", - "vp=c**2/vg #phase velocity\n", - "print\" phase velocity of neutron is =\",vp,\"m/s\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Kinetic Energy of electron is = 3.27840841289e-17 Joules\n", - "group velocity of neutron is = 197792.362768 m/s\n", - " phase velocity of neutron is = 4.55022624434e+11 m/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.16,Page number 5-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "m=1.157*10**-30 #mass of particle in kg\n", - "h=6.63*10**-34 #Planck's constant\n", - "c=3*10**8 #Velocity of light\n", - "\n", - "#Calculations:\n", - "E1=80 #Energy in eV of particle\n", - "E=E1*(1.6*10**-19) #Energy in joules\n", - " \n", - "lamda=h/math.sqrt(2*m*E) #wavelength of particle\n", - "print\"Wavelength of particle is =\",lamda,\"m\"\n", - "\n", - "#Now,\n", - "vg=h/(lamda*m) #group velocity\n", - "print\"Group velocity of particle is =\",vg,\"m/s\"\n", - "\n", - "#using, vg*vp=c**2\n", - "vp=c**2/vg #phase velocity\n", - "print\"Phase velocity of particle is =\",vp,\"m/s\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of particle is = 1.21822320075e-10 m\n", - "Group velocity of particle is = 4703848.2563 m/s\n", - "Phase velocity of particle is = 19133270270.7 m/s\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.17,Page number 5-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "v=400 #velocity of electron in m/s\n", - "delv=0.01/100 #uncertainity in velocity\n", - "h=6.63*10**-34 #Planck's constant\n", - "m=9.11*10**-31 #mass of an electron\n", - "\n", - "#Calculations:\n", - "p=m*v #momentum of an electron\n", - "delp=p*delv #uncertainity in the measured values of momentum\n", - "\n", - "#using heisenberg's uncertainity formula\n", - "delx=h/(2*math.pi*delp) #accuracy in its position\n", - "print\"Accuracy in its position is >=\",delx,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accuracy in its position is >= 0.00289571150576 m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.18,Page number 5-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Given Data:\n", - "delx=10**-8 #maximum uncertainity in position of electron\n", - "h=6.63*10**-34 #Planck's constant\n", - "m=9.1*10**-31 #mass of an electron\n", - "\n", - "#Calculations:\n", - "#using heisenberg's uncertainity formula\n", - "delp=h/(2*math.pi*delx) #minimum uncertainity in the measured values of momentum\n", - "\n", - "delv=delp/m #minimum uncertainity in the velocity of an electron\n", - "print\"Minimum uncertainity in the velocity of an electron is =\",delv,\"m/s\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum uncertainity in the velocity of an electron is = 11595.5744253 m/s\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.19,Page number 5-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "delv=2*10**4 #uncertainity in velocity\n", - "h=6.63*10**-34 #Planck's constant\n", - "m=9.1*10**-31 #mass of an electron\n", - "\n", - "#Calculations:\n", - "delp=m*delv #uncertainity in the measured values of momentum\n", - "\n", - "#using heisenberg's uncertainity formula\n", - "delx=h/(2*math.pi*delp) #accuracy in its position\n", - "print\"Minimum space required by electron to be confined in an atom is >=\",delx,\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum space required by electron to be confined in an atom is >= 5.79778721263e-09 m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.20,Page number 5-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "delt=1.4*10**-10 #uncertainity in time spent by nucleus in excited state\n", - "h=6.63*10**-34 #Planck's constant\n", - "\n", - "#Calculations:\n", - "\n", - "#using, delE*delt>= h/(2*math.pi)\n", - "delE1= h/(2*math.pi*delt) #uncertaininty in its energy in excited state in joules\n", - "delE=delE1/(1.6*10**-19) #uncertaininty in its energy in excited state in eV\n", - "print\"Uncertaininty in its energy in excited state is >=\",delE,\"eV\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Uncertaininty in its energy in excited state is >= 4.71070211026e-06 eV\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.21,Page number 5-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "a=2*10**-10 #width of potential well in m\n", - "h=6.63*10**-34 #Planck's constant\n", - "m=9.1*10**-31 #mass of an electron\n", - "\n", - "#Calculations:\n", - "#we know equation for energy of an electron\n", - "n0=1\n", - "E01=n0**2*h**2/(8*m*a**2) #Energy in ground state\n", - "E0=E01/(1.6*10**-19) #Energy in eV\n", - "print\"Energy of an electron in ground state is=\",E0,\"eV\"\n", - "\n", - "n1=2\n", - "E11=n1**2*h**2/(8*m*a**2) #Energy in first excited state\n", - "E1=E11/(1.6*10**-19) #Energy in eV\n", - "print\" Energy of an electron in first excited state is=\",E1,\"eV\"\n", - "\n", - "\n", - "n2=3\n", - "E21=n2**2*h**2/(8*m*a**2) #Energy in second excited state\n", - "E2=E21/(1.6*10**-19) #Energy in eV\n", - "print\"Energy of an electron in second excited state is=\",E2,\"eV\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of an electron in ground state is= 9.43443080357 eV\n", - " Energy of an electron in first excited state is= 37.7377232143 eV\n", - "Energy of an electron in second excited state is= 84.9098772321 eV\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.22,Page number 5-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "a=25*10**-10 #width of well\n", - "delx=5*10**-10 #uncertainity in position of particle\n", - "n=1 #ground state\n", - "\n", - "#calculation:\n", - "x1=a/2\n", - "psi1=math.sqrt(2/a)*math.sin(n*math.pi/a*x1)\n", - "P1=(psi1**2)*delx #Probability of finding particle at distance of x1\n", - "print\"Probability of finding particle at a distance of x1 is =\",P1\n", - "\n", - "x2=a/3\n", - "psi2=math.sqrt(2/a)*math.sin(n*math.pi/a*x2)\n", - "P2=(psi2**2)*delx #Probability of finding particle at distance of x2\n", - "print\"Probability of finding particle at a distance of x2 is =\",P2\n", - "print\"(There is print mistake in book).\"\n", - "\n", - "x3=a\n", - "psi3=math.sqrt(2/a)*math.sin(n*math.pi/a*x3)\n", - "P3=(psi3**2)*delx #Probability of finding particle at distance of x3\n", - "print\"Probability of finding particle at a distance of x3 is =\",P3\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probability of finding particle at a distance of x1 is = 0.4\n", - "Probability of finding particle at a distance of x2 is = 0.3\n", - "(There is print mistake in book).\n", - "Probability of finding particle at a distance of x3 is = 5.99903913065e-33\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics-II/chapter6.ipynb b/Applied_Physics-II/chapter6.ipynb deleted file mode 100755 index dec8353e..00000000 --- a/Applied_Physics-II/chapter6.ipynb +++ /dev/null @@ -1,1183 +0,0 @@ -{ - "metadata": { - "celltoolbar": "Raw Cell Format", - "name": "", - "signature": "sha256:bc506d3130781232c57938d478c5c5179ee56efb068c1be93d57258ec96fcd79" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6: Magnetic Materials and Circuits" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1,Page number 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "H=198 #Magnetizing Force in Ampere per meter\n", - "M=2300 #Magnetization in Ampere per meter\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "\n", - "#Calculations:\n", - "#H=(B/u0)-M\n", - "B=u0*(H+M) #Flux Density\n", - "ur=B/(u0*H) #Relative Permeability\n", - "\n", - "print\"Corresponding Flux Density is =\",B,\"Wb/m^2\"\n", - "print\"Relative Permeability is =\",ur\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Corresponding Flux Density is = 0.00313907937947 Wb/m^2\n", - "Relative Permeability is = 12.6161616162\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.2,Page number 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "x=3.7*10**-3 #Susceptibility at T=300 K\n", - "T=300 #Temperature in kelvin\n", - "T1=250 #Temperature in kelvin\n", - "T2=600 #Temperature in kelvin\n", - "\n", - "#Calculations:\n", - "C=x*T #Curie's law\n", - "ur1=C/T1 #Relative permeability at 250 K\n", - "ur2=C/T2 #Relative permeability at 600 K\n", - "\n", - "print\"Relative Permeability at 250 K is =\",ur1\n", - "print\"Relative Permeability at 600 K is =\",ur2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Relative Permeability at 250 K is = 0.00444\n", - "Relative Permeability at 600 K is = 0.00185\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3,Page number 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u=0.8*10**-23 #Magnetic dipole moment of an atom in paramagnetic gas in J/T\n", - "B=0.8 #Magnetic field in tesla\n", - "K=1.38*10**-23 #Boltzmann constant\n", - "\n", - "#To find Temperature at which Average thermal energy is equal to Magnetic energy \n", - "#i.e. uB=3KT/2\n", - "T=2*u*B/(3*K) #Required temperature\n", - "\n", - "print\"Required temperature is =\",T,\"Kelvin\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required temperature is = 0.309178743961 Kelvin\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4,Page number 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "T=27+273 #Temperature in kelvin\n", - "B=0.5 #Magnetic field in tesla\n", - "C=2*10**-3 #Curie's Constant\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "\n", - "# C=u0*M*T/B (Curie's law)\n", - "M=C*B/(u0*T) #Magnetization of material at 300 K\n", - "\n", - "print\"Magnetization of material at 300 K is =\",M,\"A/m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnetization of material at 300 K is = 2.65258238486 A/m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5,Page number 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "B=10.9*10**-5 #Horizontal component of B in wb/m^2\n", - "u0=4*math.pi*10**-7 #Permeability in free space\n", - "\n", - "H=B/u0 #Horizontal component of magnetic field\n", - "print\"Horizontal component of magnetic field is =\",H,\"Ampere/meter\"\n", - "print\"(Print mistake in unit in book)\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horizontal component of magnetic field is = 86.7394439851 Ampere/meter\n", - "(Print mistake in unit in book)\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6,Page number 2-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=900 #Relative permeability of medium\n", - "l=2 #length in meter\n", - "A=60*10**-4 #Crosss sectional area of ring in m^2\n", - "phi=5.9*10**-3 #flux in weber\n", - "n=700 #Number of turns\n", - "\n", - "#Calculations:\n", - "#We know, phi=B*A\n", - "B=phi/A #Flux density\n", - "#But, B=u*H\n", - "H=B/(u0*ur) #Magnetic field strength\n", - "\n", - "I=H*l/n #Required current\n", - "print\"Current required to produce given flux is =\",I,\"Ampere\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current required to produce given flux is = 2.48416445567 Ampere\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7,Page number 2-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=900 #Relative permeability of medium\n", - "r=25*10**-2 #radius of ring\n", - "A=25*10**-4 #Crosss sectional area of ring in m^2\n", - "Ag=1*10**-3 #Air gap\n", - "phi=2.7*10**-3 #flux in weber\n", - "N=400 #Number of turns\n", - "\n", - "#Calculations:\n", - "#We know, phi=B*A\n", - "B=phi/A #Flux density\n", - "#But, B=u*H\n", - "H=B/(u0*ur) #Magnetic field strength\n", - "L=H*2*math.pi*r+(B*Ag/u0) #Total amp turns required (iron+air)\n", - "I=L/N #Required current\n", - "\n", - "print\"Current required to produce given flux is =\",I,\"Ampere\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current required to produce given flux is = 5.89859173174 Ampere\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8,Page number 2-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "A=0.2*10**-4 #Crosss sectional area of iron bar in m^2\n", - "H=1600 #magnetising field in A/m\n", - "phi=2.4*10**-5 #Magnetic flux in weber\n", - "\n", - "\n", - "#Calculations:\n", - "#We know, phi=B*A\n", - "B=phi/A #Flux density\n", - "u=B/H #magnetic permeability\n", - "ur=u/u0 #relative permeability\n", - "xm=ur-1 #susceptibility of the iron bar\n", - "\n", - "print\"magnetic permeability of iron bar is =\",u,\"N/(A^2)\"\n", - "print\"susceptibility of the iron bar is =\",xm\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "magnetic permeability of iron bar is = 0.00075 N/(A^2)\n", - "susceptibility of the iron bar is = 595.831036595\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9,Page number 2-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "xm=948*10**-11 #susceptibility of the iron bar\n", - "\n", - "#Calculations:\n", - "ur=1+xm #relative permeability\n", - "u=u0*ur #permeability of medium\n", - "\n", - "print\"Relative Permeability of medium is =\",ur\n", - "print\"Permeability of medium is =\",u,\"H/m\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Relative Permeability of medium is = 1.00000000948\n", - "Permeability of medium is = 1.25663707335e-06 H/m\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10,Page number 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "B=2.5 #Magnetic field in tesla\n", - "u0=4*math.pi*10**-7 #Permeability in free space\n", - "i0=0.7 #current in the core\n", - "ri=11*10**-2 #inner radii of core\n", - "ro=12*10**-2 #outer radii of core\n", - "\n", - "#Calculations:\n", - "r=(ri+ro)/2 #Average radii of core\n", - "n=3000/(2*math.pi*r) #Number of turns\n", - "\n", - "#We know, B=u0*ur*n*i0 .Thus,\n", - "ur=B/(u0*n*i0)\n", - "\n", - "print\"Relative Permeability of medium is =\",ur\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Relative Permeability of medium is = 684.523809524\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.11,Page number 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "B=1.0 #Flux density in tesla\n", - "u0=4*math.pi*10**-7 #Permeability in free space\n", - "i=2.0 #current in the core\n", - "n=10*100 #n=N/l i.e. turns per meter\n", - "\n", - "#Calculations:\n", - "H=n*i #Magnetising force produced in wire\n", - "print\"Magnetising force produced in wire is =\",H,\"Amp-turn/meter\"\n", - "\n", - "#We know that, B=u0(H+I).Thus,\n", - "I=B/u0-H #Magnetisation of material\n", - "print\"Magnetisation of material is =\",I,\"Amp-turn/meter\"\n", - "\n", - "#u=B/H, i.e. ur*u0=B/H.\n", - "ur=B/(u0*H) #Relative permeability of core\n", - "print\" Relative Permeability of core is =\",ur\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnetising force produced in wire is = 2000.0 Amp-turn/meter\n", - "Magnetisation of material is = 793774.715459 Amp-turn/meter\n", - " Relative Permeability of core is = 397.88735773\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12,Page number 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "M=40 #Mass of an iron core\n", - "D=7.5*10**3 #Density of iron\n", - "f=100 #Frequency\n", - "A=3800*10**-1 #Loss due to Area of hysterisis loop in J/m^3\n", - "\n", - "#Calculations:\n", - "V=M/D #Volume of iron core\n", - "L1=A*V #Loss of energy in core per cycle\n", - "print\"Loss of energy in core per cycles is =\",L1,\"joules\"\n", - "\n", - "N=f*60 #Number of cycles per minute\n", - "L=L1*N #Loss of energy per minute\n", - "\n", - "print\"Loss of energy per minute is =\",L,\"joules\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loss of energy in core per cycles is = 2.02666666667 joules\n", - "Loss of energy per minute is = 12160.0 joules\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.13,Page number 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "l=30*10**-2 #length in meter\n", - "A=1*10**-4 #Crosss sectional area of ring in m^2\n", - "phi=2*10**-6 #flux in weber\n", - "N=300 #Number of turns\n", - "I=0.032 #Current in winding\n", - "\n", - "#Calculations:\n", - "#(i):\n", - "B=phi/A #Flux density\n", - "print\"(i)Flux Density in the ring is =\",B,\"Wb/m^2\"\n", - "\n", - "#(ii):\n", - "H=N*I/l #Magnetic intensity\n", - "print\"(ii)Magnetic intensity is =\",H,\"Amp-turn/meter\"\n", - "\n", - "#(iii):\n", - "u=B/H #Permeability of ring\n", - "print\"(iii)Permeability of ring is =\",u,\" Wb/A-m\"\n", - "ur=u/u0 #Relative permeability of ring\n", - "print\"Relative Permeability of ring is =\",ur\n", - "\n", - "#(iv):\n", - "xm=ur-1 #susceptibility of the ring\n", - "print\"(iv)Magnetic susceptibility of the ring is =\",xm\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)Flux Density in the ring is = 0.02 Wb/m^2\n", - "(ii)Magnetic intensity is = 32.0 Amp-turn/meter\n", - "(iii)Permeability of ring is = 0.000625 Wb/A-m\n", - "Relative Permeability of ring is = 497.359197162\n", - "(iv)Magnetic susceptibility of the ring is = 496.359197162\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.14,Page number 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Dta:\n", - "M=12*10**3 #Mass of an iron core in grams\n", - "D=7.5 #Density of iron in gm/cc\n", - "f=50 #Frequency\n", - "A=3000 #loss due to Area of hysterisis loop in ergs/cm^3\n", - "\n", - "#Calculations:\n", - "V=M/D #Volume of iron core\n", - "L1=A*V #Loss of energy in core per cycle\n", - "\n", - "L=L1*f*3600 #Loss of energy per hour\n", - "\n", - "print\"Loss of energy per hour is =\",L,\"Erg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loss of energy per hour is = 8.64e+11 Erg\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.15,Page number 2-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "A=0.5*10**3 #Area of B-H loop in Joules per m^3\n", - "V=10**-3 #Volume of specimen in m^3\n", - "n=50 #Frequency of a.c.\n", - "\n", - "#Calculations:\n", - "H=n*V*A #Hysteresis power loss\n", - "\n", - "print\"Hysteresis power loss is =\",H,\"Watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hysteresis power loss is = 25.0 Watt\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.16,Page number 2-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=1000 #Relative permeability of medium\n", - "V=10**-4 #Volume of iron rod in m^3\n", - "n=500 #Number of turns per meter\n", - "i=0.5 #Current in windings of solenoid in Amperes\n", - "\n", - "#Calculations:\n", - "#We know I=(ur-1)H\n", - "#and H=ni , hence\n", - "I=(ur-1)*n*i #Intensity of magnetisation\n", - "M=I*V #Magnetic moment\n", - "\n", - "print\"Magnetic moment of the rod is =\",M,\"A-m^2\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnetic moment of the rod is = 24.975 A-m^2\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17,Page number 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=600 #Relative permeability of iron\n", - "d=12*10**-2 #mean diameter of ring in m\n", - "N=500 #Number of turns\n", - "i=0.3 #Current in windings of solenoid in Amperes\n", - "\n", - "#Calculations:\n", - "r=d/2 #Radius of ring\n", - "\n", - "B=u0*ur*N*i/(2*math.pi*r) #Flux densityin the core\n", - "print\"Flux densityin the core is =\",B,\"Wb/m^2\"\n", - "\n", - "H=B/(u0*ur) #Magnetic intensity\n", - "print\"Magnetic intensity is =\",H,\"Amp-turns/m\"\n", - "\n", - "#We know that, B=u0(H+I)\n", - "I1=(B-u0*H)/u0 #magnetisation\n", - "I2=u0*I1 #Electronic current loop\n", - "\n", - "I=I2/B*100 #Percentage flux density due to electroniuc loop currents\n", - "print\"Percentage flux density due to electroniuc loop currents is =\",I,\"percent\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flux densityin the core is = 0.3 Wb/m^2\n", - "Magnetic intensity is = 397.88735773 Amp-turns/m\n", - "Percentage flux density due to electroniuc loop currents is = 99.8333333333 percent\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.18,Page number 2-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=900 #Relative permeability of iron ring\n", - "d=40*10**-2 #diameter of ring\n", - "l=5*10**-3 #air gap in the ring\n", - "A=5.8*10**-4 #Crosss sectional area of ring in m^2\n", - "phi=1.5*10**-4 #flux in weber\n", - "N=600 #Number of turns\n", - "\n", - "#Calculations:\n", - "r=d/2 #Radius of ring\n", - "\n", - "#We know, phi=B*A\n", - "B=phi/A #Flux density\n", - "\n", - "#But, B=u*H\n", - "H=B/(u0*ur) #Magnetic field strength\n", - "\n", - "m1=H*ur*l #amp-turns in air gap\n", - "m2=H*2*math.pi*r #amp-turns by ring\n", - "m=m1+m2 #total mmf(amp-turns) required\n", - "\n", - "I=m/N #Required current\n", - "print\"Current required to produce given flux is =\",I,\"Amperes\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current required to produce given flux is = 2.19395891742 Amperes\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.18.1,Page number 2-38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "X=-0.5*10**-5 #Magnetic susceptibility of silicon\n", - "H=9.9*10**4 #Magnetic field intensity\n", - "\n", - "#Calculations:\n", - "\n", - "#As, X=I/H. thus,\n", - "I=X*H #intensity of magnetisation\n", - "print\"Intensity of magnetisation is =\",I\n", - "\n", - "B=u0*(H+I) #Magnetic flux density\n", - "print\"Magnetic flux density is =\",B,\"Wb/ m^2\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Intensity of magnetisation is = -0.495\n", - "Magnetic flux density is = 0.124406447047 Wb/ m^2\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.18.2,Page number 2-38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=380 #Relative permeability\n", - "d=20*10**-2 #diameter of solenoid in m\n", - "r=d/2 #radius of ring in m\n", - "A=5*10**-4 #Crosss sectional area of ring in m^2\n", - "phi=2*10**-3 #flux in weber\n", - "N=200 #Number of turns\n", - "\n", - "#Calculations:\n", - "l=math.pi*d #air gap in the ring\n", - "S=(l/(u0*ur*A)) #Reluctance of iron ring\n", - "print\"Reluctance of iron ring is =\",S,\"Amp-turn/ Wb \"\n", - "\n", - "#ohm's law for magnetic circuit is phi=N*I/S. thus,\n", - "I=S*phi/N #required current\n", - "print\"Current required to obtain given magnetic flux is =\",I,\"Amperes\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reluctance of iron ring is = 2631578.94737 Amp-turn/ Wb \n", - "Current required to obtain given magnetic flux is = 26.3157894737 Amperes\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.18.3,Page number 2-39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Values:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=1 #Relative permeability of air\n", - "r=15*10**-2 #radius of ring in m\n", - "A=6*10**-4 #Crosss sectional area of ring in m^2\n", - "I=4 #Coil current in amp\n", - "N=500 #Number of turns\n", - "\n", - "#Calculations:\n", - "m=N*I #MMF of coil\n", - "print\"MMF of coil is =\",m,\"Ampere-turn\"\n", - "\n", - "l=2*math.pi*r #air gap\n", - "R=(l/(u0*ur*A)) #Reluctance of iron ring\n", - "print\"Reluctance of iron ring is =\",R,\"Ampere-turn/Wb\"\n", - "\n", - "phi=m/R #Magnetic flux\n", - "print\"Magnetic flux is =\",phi,\"Weber\"\n", - "\n", - "B=phi/A #Magnetic Flux density\n", - "print\"Magnetic flux density is =\",B,\"Weber/m^2\"\n", - "\n", - "H=B/(u0*ur) #Magnetic field intensity\n", - "print\"Magnetic field intensity is =\",H,\"Amperes/m\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "MMF of coil is = 2000 Ampere-turn\n", - "Reluctance of iron ring is = 1250000000.0 Ampere-turn/Wb\n", - "Magnetic flux is = 1.6e-06 Weber\n", - "Magnetic flux density is = 0.00266666666667 Weber/m^2\n", - "Magnetic field intensity is = 2122.06590789 Amperes/m\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.19,Page number 2-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "u0=4*math.pi*10**-7 #Permeability in vacuum\n", - "ur=6*10**-3 #Relative permeability of iron\n", - "r=0.5 #radius of ring in m\n", - "l=1*10**-2 #air gap in the ring\n", - "A=5*10**-4 #Crosss sectional area of ring in m^2\n", - "i=5 #current in ampere\n", - "N=900 #Number of turns\n", - "\n", - "#Calculations:\n", - "S=(l/(u0*A))+((2*math.pi*r-l)/ur*A) #Reluctance of iron\n", - "print\"Reluctance of iron is =\",S,\"Ampere-turn/Wb\"\n", - "\n", - "m=N*i #mmf produced\n", - "print\"mmf produced is =\",m,\"Ampere-turn\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reluctance of iron is = 15915494.5702 Ampere-turn/Wb\n", - "mmf produced is = 4500 Ampere-turn\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.20,Page number 2-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "H=5*10**3 #coercivity of bar magnet in amp/m\n", - "l=10*10**-2 #length of solenoid in m\n", - "N=50 #No of turns\n", - "\n", - "#Calculations:\n", - "\n", - "#We know that, H=NI/l ,hence\n", - "I=l*H/N #current through solenoid\n", - "\n", - "print\"Current through solenoid is =\",I,\"Amperes\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current through solenoid is = 10.0 Amperes\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.21,Page number 2-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "ur=1200 #Relative permeability of medium\n", - "V=10**-3 #volume of iron rod\n", - "N=5*10**2 #no of turns per m\n", - "i=0.5 #current through solenoid in amp\n", - "\n", - "#Calculations:\n", - "x=ur-1 #susceptibility of the ring\n", - "H=N*i #Magnetisisng field\n", - "\n", - "#We know, x=I/H\n", - "I=x*H #magnetisation\n", - "\n", - "#Also, I=M/V , thus\n", - "M=I*V #magnetic moment\n", - "print\"Magnetic moment is =\",M,\"Ampere-turn-m^2\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnetic moment is = 299.75 Ampere-turn-m^2\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.22,Page number 2-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Dta:\n", - "ur=100 #Relative permeability of medium\n", - "l=0.2 #length of iron rod\n", - "d=10*10**-3 #diameter of solenoid in m\n", - "N=300 #no of turns per m\n", - "i=0.5 #current through solenoid in amp\n", - "r=d/2 #radius of solenoid\n", - "\n", - "#Calculations:\n", - "x=ur-1 #susceptibility of the ring\n", - "H=N*i #Magnetisisng field\n", - "\n", - "#We know, x=I/H\n", - "I=x*H #magnetisation\n", - "\n", - "V=math.pi*(r**2)*l #volume of iron rod\n", - "\n", - "#Also, I=M/V , thus\n", - "M=I*V #magnetic moment\n", - "print\"Magnetic moment is =\",M,\"Ampere-turn-m^2\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnetic moment is = 0.233263254529 Ampere-turn-m^2\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.23,Page number 2-38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Given Data:\n", - "l=1.2 #length of circuit in meter\n", - "u=7.3*10**-3 #permeability of silicon sheet\n", - "A=100 #cross sectional area in cm^2\n", - "N=150 #No of turns\n", - "B=0.3 #magmetic field in Wb/m^2\n", - "\n", - "#Calculations:\n", - "\n", - "#We know, B=u*H\n", - "H=B/u #Magnetic field strength\n", - "\n", - "m=H*l #amp-turns in air gap\n", - "\n", - "I1=m/N #Required current\n", - "print\"Current required to obtain given magnetic field is =\",I1,\"Amperes\"\n", - "\n", - "I=I1/A #Required current per unit area\n", - "print\"Current required per unit area to obtain given magnetic field is =\",I,\"Amperes\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current required to obtain given magnetic field is = 0.328767123288 Amperes\n", - "Current required per unit area to obtain given magnetic field is = 0.00328767123288 Amperes\n" - ] - } - ], - "prompt_number": 34 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics-II/screenshots/Ex2_2.png b/Applied_Physics-II/screenshots/Ex2_2.png deleted file mode 100755 index 1d450952..00000000 Binary files a/Applied_Physics-II/screenshots/Ex2_2.png and /dev/null differ diff --git a/Applied_Physics-II/screenshots/Ex2_2_1.png b/Applied_Physics-II/screenshots/Ex2_2_1.png deleted file mode 100755 index 1d450952..00000000 Binary files a/Applied_Physics-II/screenshots/Ex2_2_1.png and /dev/null differ diff --git a/Applied_Physics-II/screenshots/Ex2_2_2.png b/Applied_Physics-II/screenshots/Ex2_2_2.png deleted file mode 100755 index 1d450952..00000000 Binary files a/Applied_Physics-II/screenshots/Ex2_2_2.png and /dev/null differ diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb new file mode 100755 index 00000000..c4b1a860 --- /dev/null +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb @@ -0,0 +1,1353 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:fad8e22fb99cc3e157ab8315172e2ff6ddae35bb6f49be764a49d2d1d3f70fcc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Interference" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "i=45*math.pi/180 #angle of incidence\n", + "u=1.33 #Refractive index of a soap film\n", + "lamda=5.896*10**-7 #wavelength of required yellow light\n", + "\n", + "#Calculations:\n", + "#u=sin i/sin r #Snell's law .So,\n", + "r=math.asin(math.sin(i)/u) #angle of reflection\n", + "\n", + "#Now, condition for bright fringe is\n", + "#2ut*cos r=(2n-1)lamda/2\n", + "#Here n=1\n", + "t=lamda/(2*2*u*math.cos(r)) #minimum thickness of film at which light will appear bright yellow\n", + "print\"Minimum thickness of film at which light will appear bright yellow of required wavelength is =\",t,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum thickness of film at which light will appear bright yellow of required wavelength is = 1.30853030399e-07 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "theta=40./3600*math.pi/180 #angle of wedge in radians\n", + "B=0.12*10**-2 #fringe spacing\n", + "\n", + "#Calculations:\n", + "#We know, B=lam/(2*u*theta). Here u=1\n", + "lamda=2*B*theta #wavelength of light used\n", + "print\"Wavelength of light used is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light used is = 4.65421133865e-07 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3, Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "i=30*math.pi/180 #angle of incidence\n", + "u=1.46 #Refractive index of a oil\n", + "lamda=5.890*10**-7 #wavelength of required yellow light\n", + "n=8 #eighth dark band\n", + "\n", + "#Calculations:\n", + "#u=sin i/sin r #Snell's law .So,\n", + "r=math.asin(math.sin(i)/u) #angle of reflection\n", + "\n", + "#Now, condition for dark fringe is\n", + "#2ut*cos r=n*lamda\n", + "t=n*lamda/(2*u*math.cos(r)) #thickness of film\n", + "print\"Thickness of the film is =\",t,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of the film is = 1.71755887917e-06 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "\n", + "B=0.1*10**-2 #fringe spacing\n", + "lamda=5.893*10**-7 #Wavelength of light\n", + "u=1.52 #Refractive index of wedge\n", + "\n", + "#Calculations:\n", + "#We know, B=lamda/(2*u*theta). Here u=1\n", + "theta1=lamda/(2*u*B) #angle of wedge in radians\n", + "theta=theta1*3600*180/math.pi #angle of wedge in seconds\n", + "print\"Angle of wedge is =\",theta,\"seconds of an arc\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of wedge is = 39.9841612899 seconds of an arc\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5, Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "t=0.2/(100)**2*10**-2 #thickness of film in meter\n", + "lamda=5.5*10**-7 #wavelength of light in meter\n", + "r=0 #normal incidence\n", + "n=1 #first band\n", + "\n", + "#Calculations:\n", + "\n", + "#Condition for dark fringe is\n", + "#2ut*cos r =n*lamda\n", + "u=n*lamda/(2*t*math.cos(r)) #Refractive index of a oil\n", + "print\"Refractive index of a oil is =\",u\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of a oil is = 1.375\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6, Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=5.893*10**-7 #Wavelength of light\n", + "u=1.42 #Refractive index of a soap film\n", + "r=0 #normal incidence\n", + "n=1 #first band\n", + "\n", + "#Calculations:\n", + "\n", + "#(i)\n", + "#Condition for dark fringe is\n", + "#2ut*cos r=n*lamda\n", + "t1=n*lamda/(2*u*cos(r)) #thickness of film for dark black fringe\n", + "print\"Thickness of the film for dark black fringe is =\",t1,\"m\"\n", + "\n", + "#(ii)\n", + "#Now, condition for bright fringe is\n", + "#2ut*cos r=(2n-1)lamda/2\n", + "t2=lamda/(2*2*u*math.cos(r)) #Thickness of film for bright fringe\n", + "print\"Thickness of film for bright fringe is =\",t2,\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of the film for dark black fringe is = 2.075e-07 m\n", + "Thickness of film for bright fringe is = 1.0375e-07 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, Page number 1-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Given Data:\n", + "i=30*math.pi/180 #angle of incidence\n", + "u=1.43 #Refractive index of a soap film\n", + "lamda=6*10**-7 #wavelength of light\n", + "n=1 #For minimum thickness\n", + "\n", + "#Calculations:\n", + "#u=sin i/sin r #Snell's law .So,\n", + "r=(math.asin(math.sin(i)/u)) #angle of reflection\n", + "\n", + "#Now, condition of minima in transmitted system is\n", + "#2ut*cos(r)=(2n-1)lamda/2\n", + "t=lamda/(2*2*u*math.cos(r)) #minimum thickness of film\n", + "print\"Minimum thickness of film is \",t,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum thickness of film is 1.11962124395e-07 m\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, Page number 1-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "\n", + "lamda = 5893*10**-10 #Wavelength of light\n", + "theta = 1 #assuming value of theta\n", + "\n", + "#We know, B=lamda/(2*u*theta). Here u=1\n", + "B = lamda/(2*theta) #fringe spacing\n", + "n=20 #interference fringes\n", + "\n", + "#Calculations:\n", + "#t=n*B*tan(theta)\n", + "t = 20*B*theta #Thickness of wire\n", + "print\"Thickness of wire is =\",t,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of wire is = 5.893e-06 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9, Page number 1-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.3 #Refractive index of oil\n", + "u2=1.5 #Refractive index of glass\n", + "lamda1=7*10**-7 #Wavelength of light\n", + "lamda2=5*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "\n", + "#for finding value of n, solve:\n", + "#(2n+1)*lamda1/2=(2(n+1)+1)*lamda2/2\n", + "#We get,n=2\n", + "n=2\n", + "\n", + "toil=(2*n+1)*lamda1/(2*u1*2) #thickness of oil layer\n", + "print\"Thickness of oil layer is =\",toil,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of oil layer is = 6.73076923077e-07 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Example 1.10, Page number 1-21" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.2 #Refractive index of drop of oil\n", + "u2=1.33 #Refractive index of water\n", + "lamda=4.8*10**-7 #wavelength of light\n", + "n=3 #order\n", + "r=0 #normal incidence,so r=0\n", + "\n", + "#Calculations:\n", + "t=n*lamda/(2*u1) #Thickness of oil drop\n", + "print\"Thickness of oil drop is =\",t,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of oil drop is = 6e-07 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11, Page number 1-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "i=math.asin(4/5) #angle of incidence\n", + "u=4/3 #Refractive index of a soap film\n", + "lamda1=6.1*10**-7 #wavelength of light\n", + "lamda2=6*10**-7 #wavelength of light\n", + "\n", + "#Calculations:\n", + "#u=sin i/sin r #Snell's law .So,\n", + "r=math.asin(math.sin(i)/u) #angle of reflection\n", + "\n", + "#Now, condition for dark band is\n", + "#2ut*cos r=n*lamda\n", + "#for consecutive bands, n=lamda2/(lamda1-lamda2). hence\n", + "\n", + "t=lamda2*lamda1/((lamda1-lamda2)*2*u*math.sqrt(1-(math.sin(i)/u)**2)) #thickness of film\n", + "print\"Thickness of the film is =\",t,\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of the film is = 1.83e-05 m\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12, Page number 1-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=10 #10th dark ring\n", + "Dn=0.5*10**-2 #Diameter of ring\n", + "lamda=6*10**-7 #wavelength of light\n", + "\n", + "#Calculations:\n", + "#As Dn^2=4*n*R*lamda\n", + "R=Dn**2/(4*n*lamda) #Radius of curvature of the lens\n", + "print\"Radius of curvature of the lens is =\",R,\"m\"\n", + "\n", + "t=Dn**2/(8*R) #thickness of air film\n", + "print\"Thickness of air film is =\",t,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature of the lens is = 1.04166666667 m\n", + "Thickness of air film is = 3e-06 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13, Page number 1-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "\n", + "B=0.25*10**-2 #fringe spacing\n", + "lamda=5.5*10**-7 #Wavelength of light\n", + "u=1.4 #Refractive index of wedge\n", + "\n", + "#Calculations:\n", + "#We know, B=lamda/(2*u*theta).\n", + "theta1=lamda/(2*u*B) #angle of wedge in radians\n", + "theta=theta1*3600*180/math.pi #angle of wedge in seconds\n", + "print\"Angle of wedge is =\",theta,\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of wedge is = 16.2065204908 seconds\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14, Page number 1-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=4 #4th dark ring\n", + "m=12 #m=n+p\n", + "D4=0.4*10**-2 #Diameter of 4th ring\n", + "D12=0.7*10**-2 #Diameter of 12th ring\n", + "\n", + "#Calculations:\n", + "\n", + "#(Dn+p)^2-Dn^2=4*p*lamda*R\n", + "#Solving, (D12^2-D4^2)/(D20^2-D4^2)\n", + "#We get above value =1/2. Hence\n", + "D20=math.sqrt(2*D12**2-D4**2) #Diameter of 20th ring\n", + "print\"Diameter of 20th ring is =\",D20,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of 20th ring is = 0.00905538513814 m\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15, Page number 1-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=6 #6th bright ring\n", + "D6=0.31*10**-2 #Diameter of 6th ring\n", + "lamda=6*10**-7 #wavelength of light\n", + "R=1 #Radius of curvature\n", + "\n", + "#Calculations:\n", + "\n", + "#Diameter of nth bright ring is \n", + "#Dn^2=2(2n-1)*lamda*R/u. Hence\n", + "u=2*(2*n-1)*lamda*R/(D6)**2 #Refractive index of liquid\n", + "print\"Refractive index of liquid is =\",u\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of liquid is = 1.37356919875\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16, Page number 1-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=6*10**-7 #wavelength of light\n", + "k=0.125*10**-4 #k=D(n+1)^2-Dn^2.\n", + "u=1 #Refractive index of medium between lens and plate\n", + "#Calculations:\n", + "\n", + "#(i)\n", + "lamda1=4.5*10**-7 #new wavelength of light\n", + "#Difference between squres of diameters of successive rings is directly proportional to wavelength.So,\n", + "k1=lamda1/lamda*k #new Difference between squres of diameters of successive rings after changing wavelength\n", + "print\"New Difference between squres of diameters of successive rings after changing wavelength is =\",k1,\"m^2\"\n", + "\n", + "#(ii)\n", + "u2=1.33 #Refractive index of liquid introduced between lens and plate\n", + "#Difference between squres of diameters of successive rings is inversely proportional to Refractive index.so,\n", + "k2=u/u2*k #new Difference between squres of diameters of successive rings after changing refractive index\n", + "print\"New Difference between squres of diameters of successive rings after changing refrective index is =\",k2,\"m^2\"\n", + "\n", + "#(iii)\n", + "#Difference between squres of diameters of successive rings is directly proportional to Radius of curvature.So,\n", + "#after doubling radius of curvature,\n", + "k3=2*k #new Difference between squres of diameters of successive rings after doubling radius of curvature\n", + "print\"New Difference between squres of diameters of successive rings after doubling radius of curvature is =\",k3,\"m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New Difference between squres of diameters of successive rings after changing wavelength is = 9.375e-06 m^2\n", + "New Difference between squres of diameters of successive rings after changing refrective index is = 9.3984962406e-06 m^2\n", + "New Difference between squres of diameters of successive rings after doubling radius of curvature is = 2.5e-05 m^2\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17, Page number 1-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "Dn=0.225*10**-2 #Diameter of nth ring\n", + "Dm=0.45*10**-2 #Diameter of (n+9)th ring\n", + "lamda=6*10**-7 #wavelength of light\n", + "R=0.9 #Radius of curvature\n", + "p=9\n", + "\n", + "#Calculations:\n", + "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n", + "u=4*p*lamda*R/((Dm)**2-Dn**2) #Refractive index of liquid\n", + "print\"Refractive index of liquid is =\",u\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of liquid is = 1.28\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18, Page number 1-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "D10=0.5*10**-2 #Diameter of 10th ring\n", + "lamda=5.5*10**-7 #wavelength of light\n", + "u=1.25 #Refractive index of liquid\n", + "\n", + "\n", + "#Calculations:\n", + "#As Dn^2=4*n*R*lamda/u\n", + "#Dn^2 is inversely proportional to refractive index.\n", + "D10n=D10/math.sqrt(u) #new diameter of 10th ring after changing medium between lens and plate\n", + "print\"new diameter of 10th ring after changing medium between lens and plate is =\",D10n,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "new diameter of 10th ring after changing medium between lens and plate is = 0.004472135955 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19, Page number 1-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "D5=0.336*10**-2 #Diameter of 5th ring\n", + "D15=0.59*10**-2 #Diameter of 15th ring\n", + "lamda=5.89*10**-7 #wavelength of light\n", + "p=10 #n=5,n+p=15\n", + "\n", + "#Calculations:\n", + "#(Dn+p)^2-Dn^2=4*p*lamdaR/u\n", + "R=((D15)**2-D5**2)/(4*p*lamda) #Radius of curvature of the lens\n", + "print\"Radius of curvature of the lens is =\",R,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature of the lens is = 0.998319185059 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20, Page number 1-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=10 #10th dark ring\n", + "D10=0.6*10**-2 #Diameter of ring\n", + "lamda=6*10**-7 #wavelength of light\n", + "u=4./3 #Refractive index of water\n", + "\n", + "\n", + "#Calculations:\n", + "#As Dn^2=4*n*R*lamda/u\n", + "R=(D10**2)*u/(4*n*lamda) #Radius of curvature of the lens\n", + "print\"Radius of curvature of the lens is =\",R,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature of the lens is = 2.0 m\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20.1, Page number 1-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "i=45*math.pi/180 #angle of incidence\n", + "u=1.2 #Refractive index of a film\n", + "t=4*10**-7 #thickness of film\n", + "\n", + "#Calculations:\n", + "#u=sin i/sin r #Snell's law .So,\n", + "r=math.asin(math.sin(i)/u) #angle of reflection\n", + "\n", + "#Now, condition for dark fringe is\n", + "#2ut*cos r=n*lamda\n", + "lamda1=2*u*t*math.cos(r)/1 #n=1\n", + "print\"For n=1 wavelength is =\",lamda1,\"m\"\n", + "print\"This is in the visible spectrum and it will remain absent.\" \n", + "\n", + "lamda2=2*u*t*math.cos(r)/2 #n=2\n", + "print\"For n=2 wavelength is =\",lamda2,\"m\"\n", + "print\"This is not in the visible spectrum\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n=1 wavelength is = 7.75628777187e-07 m\n", + "This is in the visible spectrum and it will remain absent.\n", + "For n=2 wavelength is = 3.87814388593e-07 m\n", + "This is not in the visible spectrum\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20.2, Page number 1-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "r=45*math.pi/180 #angle of refraction\n", + "u=1.45 #Refractive index of a medium\n", + "lamda=5.5*10**-7 #wavelength of required yellow light\n", + "n=1\n", + "\n", + "#Calculations:\n", + "\n", + "#Now, condition for dark fringe is\n", + "#2ut*cos r=n*lamda\n", + "t=n*lamda/(2*u*math.cos(r)) #thickness of thin medium\n", + "print\"Thickness of the thin medium is =\",t,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of the thin medium is = 2.68212917002e-07 m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.21, Page number 1-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u=1.33 #Refractive index of a soap film\n", + "r=0 #normal incidence\n", + "t=5*10**-7 #thickness of film\n", + "\n", + "#Calculations:\n", + "\n", + "#Now, condition for maxima is\n", + "#2ut*cos r=(2n-1)lamda/2\n", + "lamda1=4*u*t*math.cos(r)/(2*1-1) #n=1\n", + "print\"For n=1 wavelength is =\",lamda1,\"m\"\n", + "lamda2=4*u*t*math.cos(r)/(2*2-1) #n=2\n", + "print\"For n=2 wavelength is =\",lamda2,\"m\"\n", + "lamda3=4*u*t*math.cos(r)/(2*3-1) #n=3\n", + "print\"For n=3 wavelength is =\",lamda3,\"m\"\n", + "lamda4=4*u*t*math.cos(r)/(2*4-1) #n=4\n", + "print\"For n=4 wavelength is =\",lamda4,\"m\"\n", + "\n", + "print\"Out of these wavelengths wavelength for n=3 lies in the visible spectrum.\"\n", + "print\"Hence, wavelength for n=3 is the most reflected wavelength.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n=1 wavelength is = 2.66e-06 m\n", + "For n=2 wavelength is = 8.86666666667e-07 m\n", + "For n=3 wavelength is = 5.32e-07 m\n", + "For n=4 wavelength is = 3.8e-07 m\n", + "Out of these wavelengths wavelength for n=3 lies in the visible spectrum.\n", + "Hence, wavelength for n=3 is the most reflected wavelength.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.22, Page number 1-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u=1.5 #Refractive index of a oil\n", + "lamda=5.88*10**-7 #wavelength of required yellow light\n", + "n=1 #for smallest thickness\n", + "r=60*math.pi/180 #angle of reflection\n", + "\n", + "#Calculations:\n", + "\n", + "#Now, condition for dark fringe is\n", + "#2ut*cos r=n*lamda\n", + "t=n*lamda/(2*u*math.cos(r)) #thickness of film\n", + "print\"Thickness of the film is =\",t,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of the film is = 3.92e-07 m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.23, Page number 1-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "theta=20./3600*math.pi/180 #angle of wedge in radians\n", + "B=0.25*10**-2 #fringe spacing\n", + "u=1.4 #Refractive index of film\n", + "\n", + "#Calculations:\n", + "#We know, B=lamda/(2*u*theta).\n", + "lamda=2*B*theta*u #wavelength of light\n", + "print\"Wavelength of light is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light is = 6.78739153553e-07 m\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.24, Page number 1-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "#Dn=2*D40\n", + "\n", + "#Calculations:\n", + "#As Dn^2 = 4*n*R*lamda/u and Dn^2 = 4*D40^2\n", + "#i.e. 4*n*R*lamda/u = 4*4*40*R*lamda/u .hence,\n", + "n=4*40 #order of the required ring\n", + "print\"Order of the dark ring which will have double the diameter of that of 40th ring is =\",n\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Order of the dark ring which will have double the diameter of that of 40th ring is = 160\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.25, Page number 1-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda1=6*10**-7 #wavelength of light\n", + "lamda2=4.5*10**-7 #wavelength of light\n", + "R=0.9 #Radius of curvature\n", + "\n", + "#Calculations:\n", + "#As Dn^2=4*n*R*lamda.\n", + "#Dn^2=D(n+1)^2 for different wavelengths.we get,\n", + "n=lamda2/(lamda1-lamda2) #nth dark ring due to lam1 which coincides with (n+1)th dark ring due lamda2\n", + "D3=math.sqrt(4*n*R*lamda1) #diameter of 3rd dark ring for lamda1\n", + "print\"Diameter of 3rd dark ring for lam1 is =\",D3,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of 3rd dark ring for lam1 is = 0.00254558441227 m\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.26, Page number 1-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "i=45*math.pi/180 #angle of incidence\n", + "u=4./3 #Refractive index of soap film\n", + "lamda=5*10**-7 #wavelength of light\n", + "t=1.5*10**-6 #thickness of film\n", + "\n", + "#Calculations:\n", + "#u=sin i/sin r #Snell's law .So,\n", + "r=math.asin(math.sin(i)/u) #angle of reflection\n", + "\n", + "#Now, condition for dark band is\n", + "#2ut*cos r=n*lamda\n", + "n=2*u*t*math.cos(r)/lamda #order of band\n", + "print\"order of dark band is =\",n\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "order of dark band is = 6.78232998313\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.27, Page number 1-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "D5=0.336*10**-2 #Diameter of 5th ring\n", + "D15=0.59*10**-2 #Diameter of 15th ring\n", + "lamda=5.89*10**-7 #wavelength of light\n", + "p=10 #n=5,n+p=15\n", + "\n", + "#Calculations:\n", + "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n", + "R=((D15)**2-D5**2)/(4*p*lamda) #Radius of curvature of the lens\n", + "print\"Radius of curvature of the lens is =\",R,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature of the lens is = 0.998319185059 m\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.29, Page number 1-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#As Dn^2=4*n*R*lamda.\n", + "#thus, Dn is directly proportional to sqaure root of n\n", + "D5=math.sqrt(5) #D5 is directly proportional to sqaure root of 5\n", + "D4=math.sqrt(4) #D4 is directly proportional to sqaure root of 4\n", + "k1=D5-D4\n", + "print\"Separation between D5 and D4 is directly proportional to =\",k1\n", + "\n", + "D80=math.sqrt(80) #D80 is directly proportional to sqaure root of 80\n", + "D79=math.sqrt(79) #D79 is directly proportional to sqaure root of 79\n", + "k2=D80-D79\n", + "print\"Separation between D80 and D79 is directly proportional to =\",k2\n", + "\n", + "print\"Thus, (D80-D79) < (D5-D4). Hence proved.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Separation between D5 and D4 is directly proportional to = 0.2360679775\n", + "Separation between D80 and D79 is directly proportional to = 0.0560774926836\n", + "Thus, (D80-D79) < (D5-D4). Hence proved.\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.30, Page number 1-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "D5=0.336*10**-2 #Diameter of 5th ring\n", + "D15=0.59*10**-2 #Diameter of 15th ring\n", + "p=10 #n=5,n+p=15\n", + "R=1 #Radius of curvature\n", + "\n", + "#Calculations:\n", + "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n", + "lamda=((D15)**2-D5**2)/(4*p*R) #Wavelength of light\n", + "print\"Wavelength of light is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light is = 5.8801e-07 m\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.31, Page number 1-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "#Condition for bright band is\n", + "#2ut*cos r = (2n-1)*lamda1\n", + "\n", + "#for consecutive bands, 2n=(lamda1+lamda2)/(lamda1-lamda).\n", + "#thus, 2ut*cos r = lamda2*lamda1/(lamda1-lamda2)\n", + "\n", + "#And, thicknessof film \n", + "#t= lamda2*lamda1/((2*u*cosr)(lamda1-lamda2))\n", + "print\"Hence expression for thickness of film is obtained.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence expression for thickness of film is obtained.\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb new file mode 100755 index 00000000..6af9170f --- /dev/null +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb @@ -0,0 +1,1480 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:1b2e4fb9c2f216cbf762800ac72003e90570cd62834a70860272dd5120eea60f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Diffraction of light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1,Page number 2-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=4 #order\n", + "N=1./5000*10**-2 #N=(a+b) grating element(cm)\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "#for longest wavelength, sin(theta)=1\n", + "lamda=(N/m) #longest wavelength\n", + "print\"The longest wavelength is =\" ,lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The longest wavelength is = 5e-07 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2,Page number 2-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda=6.5*10**-7 #Wavelength of red light\n", + "theta=30*3.142/180 #angle of diffraction\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, a*sin(theta)=m*lamda\n", + "a=m*lamda/math.sin(theta) #width of slit\n", + "print\"width of slit is = \",a,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "width of slit is = 1.29984715296e-06 m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3,Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda=4*10**-7 #Wavelength of light\n", + "a=10**-6 #width of slit\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, a*sin(theta)=m*lamda\n", + "theta=math.asin(m*lamda/a)*180/3.142 #angular position in first minima\n", + "print\"angular position in first minima is =\",theta,\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angular position in first minima is = 23.5751216716 degrees\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4,Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda1=4*10**-7 #Wavelength of light\n", + "lamda2=7*10**-7 #Wavelength of light\n", + "n=1./6000*10**-2 #n=(a+b) grating element\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "theta1=math.asin(m*lamda1/n)*(180/3.142) #angle of diffraction\n", + "theta2=math.asin(m*lamda2/n)*(180/3.142) #angle of diffraction\n", + "d=theta2-theta1 #angular breadth of first order visible spectrum\n", + "print\"angular breadth of first order visible spectrum is = \",d,\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angular breadth of first order visible spectrum is = 10.9466277612 degrees\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5,Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda=6.56*10**-7 #Wavelength of red light\n", + "theta=18.25*math.pi/180 #angle of diffraction\n", + "W=2*10**-2 #width of grating\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "N=math.sin(theta)/(m*lamda) #N-number of lines per m, N=1/(a+b)\n", + "Tn=N*W #Total number of lines on grating\n", + "print\"Total number of lines on grating is =\",Tn\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total number of lines on grating is = 9547.67702694\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7,Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "GE=2.54/15000*10**-2 #GE=(a+b) grating element\n", + "lamda1=4*10**-7 #Wavelength of light\n", + "lamda2=7*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "theta11=math.asin(1*lamda1/GE)*180/math.pi #angular position of first minima for lamda1\n", + "theta12=math.asin(2*lamda1/GE)*180/math.pi #angular position of second minima for lamda1\n", + "theta13=math.asin(3*lamda1/GE)*180/math.pi #angular position of third minima for lamda1\n", + "\n", + "theta21=math.asin(1*lamda2/GE)*180/math.pi #angular position of first minima for lamda2\n", + "theta22=math.asin(2*lamda2/GE)*180/math.pi #angular position of second minima for lamda2\n", + "theta23=math.asin(1)*180/math.pi #angular position of third minima for lamda2\n", + "\n", + "print\"Thus the angular position for lamda1 and lamda2 are as follows:\"\n", + "print\"First order:\",theta11,\"degrees\"\n", + "print\"\",theta21,\"degrees --Isolated\"\n", + "\n", + "print\"Second order:\",theta12,\"degrees\"\n", + "print\"\",theta22,\"degrees --Overlap\"\n", + "\n", + "print\"Third order: \",theta13,\"degrees\"\n", + "print\"\",theta23,\" degrees --Overlap \"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the angular position for lamda1 and lamda2 are as follows:\n", + "First order: 13.6635763633 degrees\n", + " 24.4177053663 degrees --Isolated\n", + "Second order: 28.1928605617 degrees\n", + " 55.7685229906 degrees --Overlap\n", + "Third order: 45.1261086702 degrees\n", + " 90.0 degrees --Overlap \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8,Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=5.893*10**-7 #Wavelength of light\n", + "d=0.01*10**-2 #width of slit (a=d)\n", + "f=1 #distance between screen and slit\n", + "\n", + "#Calculations:\n", + "x=f*lamda/d #separation between central maxima and first minima\n", + "print\"Separation between central maxima and first minima is = \",x,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Separation between central maxima and first minima is = 0.005893 m\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9,Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda=6*10**-7 #Wavelength of light\n", + "a=12*10**-7 #width of slit\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, a*sin(theta)=m*lamda\n", + "theta=math.asin(m*lamda/a)*180/math.pi #angular position in first minima\n", + "print\"Half angular width of first maxima is =\",theta,\"Degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half angular width of first maxima is = 30.0 Degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10,Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=6*10**-7 #Wavelength of light\n", + "a=0.02*10**-2 #width of slit (a=d)\n", + "f=2 #distance between screen and slit\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, a*sin(theta)=m*lamda, here m=1\n", + "theta=math.asin(lamda/a)*180*60/math.pi #angular position in first minima (1 degree=60 minutes)\n", + "print\"Total angular width is =\",2*theta,\"minutes\"\n", + "\n", + "x=f*lamda/a #separation between central maxima and first minima\n", + "print\"Linear width is = \",2*x,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total angular width is = 20.6265115646 minutes\n", + "Linear width is = 0.012 m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11,Page number 2-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "a=0.14*10**-3 #width of slit\n", + "n=2 #order\n", + "y=1.6*10**-2 #separation between second dark band and central bright band\n", + "D=2 #distance between screen and slit\n", + "\n", + "#Calculations:\n", + "\n", + "theta=y/D #from diagram \n", + "\n", + "#We know, a*sin(theta)=n*lamda\n", + "#here sin(theta)=theta\n", + "lamda=a*theta/n #wavelength of light\n", + "print\"wavelength of light is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of light is = 5.6e-07 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13,Page number 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=6.328*10**-7 #Wavelength of light\n", + "N=1./6000*10**-2 #N=(a+b) grating element\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, N*sin(theta)=m*lamda\n", + "theta1=math.asin(1*lamda/N)*180/math.pi #angular position in first order maxima,m=1\n", + "print\"Angular position in first order maxima is =\",theta1,\"Degrees\"\n", + "\n", + "theta2=math.asin(2*lamda/N)*180/math.pi #angular position in second order maxima,m=2\n", + "print\"Angular position in second order maxima is = \",theta2,\"Degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular position in first order maxima is = 22.3138625335 Degrees\n", + "Angular position in second order maxima is = 49.4078093436 Degrees\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14,Page number 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda1=6*10**-7 #wavelength of yellow light\n", + "lamda2=4.8*10**-7 #wavelength of blue light\n", + "theta=(math.asin(3/4)) #angle of diffraction\n", + "\n", + "#Calculations:\n", + "\n", + "#for consecutive bands, n*lamda1=(n+1)*lamda2. thus,\n", + "n=lamda2/(lamda1-lamda2) #order\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "N=n*lamda1/(3./4) #N=(a+b) grating element\n", + "print\"Grating element (a+b) is =\",N,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Grating element (a+b) is = 3.2e-06 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15.1,Page number 2-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "a=0.2*10**-3 #width of slit\n", + "n=1 #order\n", + "y=0.5*10**-2 #separation between first minima and central bright band\n", + "D=2 #distance between screen and slit\n", + "\n", + "#Calculations:\n", + "\n", + "theta=y/D #from diagram \n", + "\n", + "#We know, a*sin(theta)=n*lamda\n", + "#here sin(theta)=theta\n", + "lamda=a*theta/n #wavelength of light\n", + "print\"wavelength of light is = \",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of light is = 5e-07 m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15.2,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda1=5.4*10**-7 #Wavelength of light\n", + "lamda2=4.05*10**-7 #Wavelength of light\n", + "theta=30*math.pi/180 #angle of diffraction\n", + "\n", + "#Calculations:\n", + "#We know, (a+b)*sin(theta)=n*lamda\n", + "#n*lamda1=(n+1)*lamda2, we get \n", + "n=3\n", + "N=math.sin(theta)/(n*lamda1)*10**-2 #Number of lines per m= 1/(a+b)*10^-2\n", + "print\"Number of lines per cm is = \",N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of lines per cm is = 3086.41975309\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15.4,Page number 2-56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "GE=1./6000*10**-2 #GE=(a+b) grating element\n", + "lamda1=5.893*10**-7 #Wavelength of light\n", + "lamda2=5.896*10**-7 #Wavelength of light\n", + "m=2 #order\n", + "\n", + "#Calculations:\n", + "theta1=math.asin(m*lamda1/GE)*180/math.pi #angular position in first minima\n", + "theta2=math.asin(m*lamda2/GE)*180/math.pi #angular position in second minima\n", + "\n", + "a_s=(theta2-theta1) #Angular separation in minutes\n", + "print\"Angular separation is =\",a_s,\"Degrees\"\n", + "\n", + "dlamda=lamda2-lamda1 #difference in wavelength\n", + "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", + "\n", + "#We know that R.P.=lamda/dlamda=m*N\n", + "N=lamda/dlamda/m #Number of lines on grating for first order\n", + "print\"Number of lines on grating for first order is =\",N\n", + "print\"But, number of lines per cm on grating is 6000. \\n Which is greater than number of lines per cm needed for resolution.\"\n", + "print\"Hence, both lines will be well resolved in 2nd order.\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular separation is = 0.0291798772234 Degrees\n", + "Number of lines on grating for first order is = 982.416666667\n", + "But, number of lines per cm on grating is 6000. \n", + " Which is greater than number of lines per cm needed for resolution.\n", + "Hence, both lines will be well resolved in 2nd order.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17,Page number 2-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "d=0.04*10**-2 #Separation between slits\n", + "D=1.7 #distance between screen and slit\n", + "B=0.25*10**-2 #Fringe spacing\n", + "\n", + "#Calculations:\n", + "#We know,B=D*lamda/d\n", + "lamda=B*d/D #Wavelength of light\n", + "print\"Wavelength of light is = \",lamda,\"m\"\n", + "\n", + "#The condition for missing order is,\n", + "#(a+b)/a = m/n\n", + "b=0.04*10**-2 #Separation in slits\n", + "a=0.08*10**-3 #Slit width\n", + "n=(a+b)/a #missing orders for m=1,2,3\n", + "\n", + "n1=1*n\n", + "n2=2*n\n", + "n3=3*n\n", + "print\"Missing orders are =\",n1,\",\",n2,\",\",n3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light is = 5.88235294118e-07 m\n", + "Missing orders are = 6.0 , 12.0 , 18.0\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18,Page number 2-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "N=2.54/2620*10**-2 #N=(a+b) grating element\n", + "lamda=5*10**-7 #Wavelength of red light\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=n*lamda\n", + "#maximum value of sin(theta)=1\n", + "n=N/lamda #Maximum number of orders visible\n", + "print\"Maximum number of orders visible is =\",n\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum number of orders visible is = 19.3893129771\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19,Page number 2-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "N=1./4000*10**-2 #N=(a+b) grating element\n", + "lamda1=5*10**-7 #Wavelength of light\n", + "lamda2=7.5*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=n*lamda\n", + "#maximum value of sin(theta)=1\n", + "n1=N/lamda1 #Maximum number of orders visible\n", + "n2=N/lamda2 #Maximum number of orders visible\n", + "print\"The observed number of orders range between =\",n2,\"to\",n1\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The observed number of orders range between = 3.33333333333 to 5.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20,Page number 2-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=5 #order\n", + "lamda=6*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "#We know, a*sin(theta)=n*lamda\n", + "#n*lamda=n1*lamda1\n", + "lamda1=n*lamda/4 #for n1=4\n", + "print\"For n1=4 wavelength is =\",lamda1,\"m\"\n", + "\n", + "lamda2=n*lamda/5 #for n1=5\n", + "print\"For n1=5 wavelength is =\",lamda2,\"m\"\n", + "\n", + "lamda3=n*lamda/6 #for n1=6\n", + "print\"For n1=5 wavelength is =\",lamda3,\"m\"\n", + "\n", + "lamda4=n*lamda/7 #for n1=7\n", + "print\"For n1=5 wavelength is =\",lamda4,\"m\"\n", + "\n", + "lamda5=n*lamda/8 #for n1=8\n", + "print\"For n1=5 wavelength is =\",lamda5,\"m\"\n", + "\n", + "\n", + "print\"So,in the grating spectrum spectrum lines with wavelengths n1=6 and n1=7 will coincide with fifth order line of 6*10^-7 m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n1=4 wavelength is = 7.5e-07 m\n", + "For n1=5 wavelength is = 6e-07 m\n", + "For n1=5 wavelength is = 5e-07 m\n", + "For n1=5 wavelength is = 4.28571428571e-07 m\n", + "For n1=5 wavelength is = 3.75e-07 m\n", + "So,in the grating spectrum spectrum lines with wavelengths n1=6 and n1=7 will coincide with fifth order line of 6*10^-7 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21,Page number 2-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "GE=18000*10**-10 #GE=(a+b) grating element\n", + "lamda=5*10**-7 #Wavelength of red light\n", + "\n", + "#Calculations:\n", + "DP1=1./sqrt(GE**2-lamda**2)*10**-10 #Dispersive power\n", + "print\"Dispersive power for first order is =\",DP1,\"rad/Angstrom\"\n", + "\n", + "m=3\n", + "DP2=1/sqrt((GE/m)**2-lamda**2)*10**-10 #Dispersive power\n", + "print\"Dispersive power for second order is =\",DP2,\"rad/Angstrom\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dispersive power for first order is = 5.78314931966e-05 rad/Angstrom\n", + "Dispersive power for second order is = 0.000301511344578 rad/Angstrom\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22,Page number 2-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "N=2.54/15000*10**-2 #N=(a+b) grating element\n", + "lamda=5.9*10**-7 #Wavelength of light\n", + "m=2 #order\n", + "f=25*10**-2 #focal length of lens\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "theta=math.asin(m*lamda/N) #angular position in first minima\n", + "\n", + "Ad=m/N/cos(theta) #angular dispersion\n", + "\n", + "ld=f*Ad*10**-8 #linear dispersion (dx/dl) in cm/angstrom\n", + "print\"Linear dispersion in spectrograph is =\",ld,\"cm/angstrom\"\n", + "\n", + "dlamda=(5896-5890) #difference in wavelength\n", + "dx=ld*dlamda*10**-2 #separation between spectral lines in meter\n", + "print\"Separation between spectral lines is =\",dx,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Linear dispersion in spectrograph is = 0.00411696586101 cm/angstrom\n", + "Separation between spectral lines is = 0.00024701795166 m\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda1=5.89*10**-7 #Wavelength of light\n", + "lamda2=5.896*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "dlamda=lamda2-lamda1 #difference in wavelength\n", + "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", + "\n", + "#We know that R.P.=m*N=lamda/dlamda\n", + "N=lamda/dlamda/m #minimum number of lines which will just resolve\n", + "print\"Minimum number of lines which will just resolve is =\",N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum number of lines which will just resolve is = 982.166666667\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "N=5*5000 #N=W/(a+b) Number of lines on grating\n", + "m=2 #order\n", + "lamda=6*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "#(i)\n", + "RP=m*N #Resolving power\n", + "print\"(i)Resolving power is =\",RP\n", + "\n", + "#(ii)\n", + "#We know that R.P.=lamda/dlamda\n", + "dlamda=lamda/RP #Smallest wavelength which can be resolved\n", + "print\"(ii)Smallest wavelength which can be resolved is =\",dlamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Resolving power is = 50000\n", + "(ii)Smallest wavelength which can be resolved is = 1.2e-11 m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25,Page number 2-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "GE=1./4000*10**-2 #GE=(a+b) grating element\n", + "lamda=5*10**-7 #Wavelength of red light\n", + "m=3 #order\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "theta=math.asin(m*lamda/GE) #ngular position in first minima\n", + "\n", + "DP=m/(GE*math.cos(theta))*10**-2 #Dispersive power\n", + "print\"Dispersive power is =\",DP\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dispersive power is = 15000.0\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26,Page number 2-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=2 #order\n", + "lamda=6*10**-7 #Wavelength of light\n", + "dlamda=6*10**-10 #difference in wavelength\n", + "W=2*10**-2 #Width of surface\n", + "\n", + "#Calculations:\n", + "\n", + "#We know that R.P.=lamda/dlamda=m*N\n", + "N=lamda/dlamda/m #Number of lines on grating\n", + "GE=W/N #Grating element=(a+b)\n", + "print\"Grating element is =\",GE,\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Grating element is = 4e-05 cm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=2 #order\n", + "lamda1=5.77*10**-7 #Wavelength of light\n", + "lamda2=5.791*10**-7 #Wavelength of light\n", + "GE=1./6000*10**-2 #GE=(a+b) grating element\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "theta1=math.asin(m*lamda1/GE)*180/math.pi #angular position in first minima\n", + "theta2=math.asin(m*lamda2/GE)*180/math.pi #angular position in second minima\n", + "\n", + "a_s=(theta2-theta1)*60 #Angular separation in minutes\n", + "print\"Angular separation is = \",a_s,\"minutes\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular separation is = 12.0270825521 minutes\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=1 #order\n", + "lam=5.89*10**-7 #Wavelength of light\n", + "a=0.3*10**-3 #width of slit\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, a*sin(theta)=n*lamda\n", + "theta1=math.asin(n*lamda/a)*180/math.pi*60 #angular position in first dark band in minutes\n", + "print\"Angular position in first dark band is = \",theta1,\"mimutes\"\n", + "\n", + "#We know,for bright band a*sin(theta)=(2n+1)*lamda/2\n", + "theta2=math.asin(1.5*lamda/a)*180/math.pi*60 #angular position in first bright band in minutes\n", + "print\"Angular position in first bright band is =\",theta2,\"minutes\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular position in first dark band is = 6.87549812524 mimutes\n", + "Angular position in first bright band is = 10.3132557823 minutes\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "GE=2.54/16000*10**-2 #GE=(a+b) grating element\n", + "lamda=6*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "#maximum value of sin(theta)=1\n", + "m=GE/lamda #Maximum order of spectra\n", + "print\"Maximum order of spectra is =\",m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum order of spectra is = 2.64583333333\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "GE=1./5000*10**-2 #GE=(a+b) grating element\n", + "lamda=5.89*10**-7 #Wavelength of light\n", + "N=3*5000 #N=W/(a+b) Number of lines on grating\n", + " \n", + "#Calculations:\n", + "\n", + "#We know, (a+b)*sin(theta)=m*lamda\n", + "#maximum value of sin(theta)=1\n", + "m=GE/lamda #Maximum order of spectra\n", + "print\"Maximum order of spectra is =\",m\n", + "\n", + "RP=3*N #Resolving power (round of m to 3)\n", + "print\"Resolving power is =\",RP\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum order of spectra is = 3.39558573854\n", + "Resolving power is = 45000\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.32,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda1=5.89*10**-7 #Wavelength of light\n", + "lamda2=5.896*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "dlamda=lamda2-lamda1 #difference in wavelength\n", + "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", + "\n", + "#(i)\n", + "m1=1 #first order\n", + "#We know that R.P.=lamda/dlamda=m*N\n", + "N1=lamda/dlamda/m1 #Number of lines on grating\n", + "print\"(i)Number of lines on grating for first order is =\",N1\n", + "\n", + "#(ii)\n", + "m2=2 #second order\n", + "#We know that R.P.=lamda/dlamda=m*N\n", + "N2=lamda/dlamda/m2 #Number of lines on grating\n", + "print\"(ii)Number of lines on grating for second order is =\",N2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Number of lines on grating for first order is = 982.166666667\n", + "(ii)Number of lines on grating for second order is = 491.083333333\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.33,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #order\n", + "lamda=6.553*10**-7 #Wavelength of light\n", + "dlamda=1.8*10**-10 #difference in wavelength\n", + "\n", + "\n", + "#Calculations:\n", + "\n", + "#We know that R.P.=lam/dlam=m*N\n", + "N=lamda/dlamda/m #Number of lines on grating\n", + "print\"Number of lines on grating is =\",N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of lines on grating is = 3640.55555556\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.34,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda1=5.14034*10**-7 #Wavelength of light\n", + "lamda2=5.14085*10**-7 #Wavelength of light\n", + "\n", + "#Calculations:\n", + "dlamda=lamda2-lamda1 #difference in wavelength\n", + "lamda=(lamda2+lamda1)/2 #Mean wavelength\n", + "\n", + "#We know that R.P.=lamda/dlamda=m*N\n", + "N=lamda/dlamda/1 #Number of lines on grating\n", + "print\"Number of lines on grating for first order is =\",N\n", + "\n", + "#Hence R.P. for second order should be\n", + "RP1=2*N\n", + "print\"Resolving power in second order should be is= \",RP1\n", + "\n", + "#But here,\n", + "\n", + "lamda3=8.03720*10**-7 #Wavelength of light\n", + "lamda4=8.03750*10**-7 #Wavelength of light\n", + "dlamda2=lamda4-lamda3 #difference in wavelength\n", + "lamda2=(lamda4+lamda3)/2 #Mean wavelength\n", + "\n", + "RP2=lamda2/dlamda2\n", + "print\"Resolving power in second order is= \",RP2\n", + "\n", + "print\"So, the grating will not be able to resolve 8.0372*10^-7 and 8.03750*10^-7 in second order.\"\n", + "print\"Because Resolving power is greter than actual Resolving power.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of lines on grating for first order is = 10079.5980392\n", + "Resolving power in second order should be is= 20159.1960784\n", + "Resolving power in second order is= 26791.1666667\n", + "So, the grating will not be able to resolve 8.0372*10^-7 and 8.03750*10^-7 in second order.\n", + "Because Resolving power is greter than actual Resolving power.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.35,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#For grating , Condition of maxima is (a+b)sin(theta)=n*lamda\n", + "#Given (a+b) < 2*lamda\n", + "#For maximum order, sin(90)=1\n", + "#So, n must be less than 2\n", + "#i.e. only first order possible if width of grating element is less than twice the wavelength\n", + "print\"Hence, Only first order possible if width of grating element is less than twice the wavelength.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence, Only first order possible if width of grating element is less than twice the wavelength.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.36,Page number 2-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n=1 #order\n", + "lamda=5.89*10**-7 #Wavelength of light\n", + "a=0.3*10**-3 #width of slit\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, a*sin(theta)=n*lamda\n", + "theta1=math.asin(n*lam/a)*180/math.pi #angular position in first dark band\n", + "print\"Angular position in first dark band is =\",theta1,\"Degrees\"\n", + "\n", + "#We know,for bright band a*sin(theta)=(2n+1)*lamda/2\n", + "theta2=math.asin(1.5*lamda/a)*180/math.pi #angular position in first bright band\n", + "print\"Angular position in first bright band is =\",theta2,\"Degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular position in first dark band is = 0.112490786047 Degrees\n", + "Angular position in first bright band is = 0.168736314576 Degrees\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb new file mode 100755 index 00000000..714dfad3 --- /dev/null +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb @@ -0,0 +1,836 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:5f637d4fa0aa8bb3bc54a28134ac85a937c06f0d3a591f536de2719824a41f5c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Optical Fibre" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1,Page number 3-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n1=1.61 #Core index\n", + "n2=1.55 #Cladding index\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(n1**2-n2**2) #Formula\n", + "\n", + "print\"Numerical Aperture of Fibre is = \",NA\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.435430821142\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2,Page number 3-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n1=1.65 #Core index\n", + "n2=1.53 #Cladding index\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(n1**2-n2**2) #Formula\n", + "\n", + "print\"Numerical Aperture of Fibre is =\",NA\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.617737808459\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3,Page number 3-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n1=1.48 #R.I. of Core\n", + "n2=1.39 #R.I. of Cladding\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(n1**2-n2**2) #Formula to find NA\n", + "phi=math.asin(NA)*180/(3.1472) #Acceptance angle\n", + "\n", + "print\"Numerical Aperture of Fibre is =\",NA\n", + "print\"Acceptance angle of Fibre is =\",phi,\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.508232230383\n", + "Acceptance angle of Fibre is = 30.491727191 degrees\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4,Page number 3-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data:\n", + "u1=3.6 #Refractive Index of the Substance at 850 nm\n", + "u2=3.4 #Refractive Index of the Substance at 1300 nm\n", + "Vv=3*10**8 #Velocity of light in free space\n", + "\n", + "#Calculations:\n", + "# i)Finding wavelength at 850 nm\n", + "Vs1=Vv/u1 #Velocity of light in substance at 850 nm\n", + "print\"Velocity of light in substance at 850 nm =\" ,Vs1,\"m/sec\"\n", + "\n", + "lam1=850*10**-9/u1 #Wavelength of light in substance at 850nm\n", + "print\" Wavelength of light in substance at 850nm =\",lam1,\"m\"\n", + "\n", + "\n", + "#ii)Finding wavelength at 1300 nm\n", + "Vs2=Vv/u2 #Velocity of light in substance at 1300 nm\n", + "print\"Velocity of light in substance at 1300 nm =\",Vs2,\" m/sec\"\n", + "\n", + "lam2=1300*10**-9/u2 #Wavelength of light in substance at 1300nm\n", + "print\"Wavelength of light in substance at 1300nm =\" ,lam2,\"m \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of light in substance at 850 nm = 83333333.3333 m/sec\n", + " Wavelength of light in substance at 850nm = 2.36111111111e-07 m\n", + "Velocity of light in substance at 1300 nm = 88235294.1176 m/sec\n", + "Wavelength of light in substance at 1300nm = 3.82352941176e-07 m \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5,Page number 3-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.5 #R.I. of Core\n", + "u2=1.45 #R.I.of Cladding\n", + "delta= (u1-u2)/u1 #Fractional Refractive index\n", + "\n", + "#Calculations:\n", + "NA=u1*sqrt(2*delta) #Formula to find NA\n", + "theta0=math.asin(NA)*180/(3.1472) #Acceptance angle\n", + "thetac=math.asin(u2/u1)*180/(3.1472) #Critical angle\n", + "\n", + "print\"Numerical Aperture of Fibre is =\",NA\n", + "print\"Acceptance angle of Fibre is =\",theta0,\"degrees\" \n", + "print\" Critical angle of Fibre is =\",thetac,\"degrees\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.387298334621\n", + "Acceptance angle of Fibre is = 22.7458994397 degrees\n", + " Critical angle of Fibre is = 75.0309676099 degrees\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6,Page number 3-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "NA=0.22 # Numerical Aperture of Fibre\n", + "delta=0.012 #Fractional index\n", + "\n", + "#Calculations:\n", + "#Delta=(u1-u2)/u1\n", + "u1=NA/math.sqrt(2*delta) #Formula\n", + "u2=u1-(u1*delta) #Formula\n", + "\n", + "print\"Refractive Index of core of fibre is =\",u1\n", + "print\"Refractive Index of cladding of fibre is =\",u2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive Index of core of fibre is = 1.42009389361\n", + "Refractive Index of cladding of fibre is = 1.40305276689\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7,Page number 3-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.466 #R.I. of Core\n", + "u2=1.46 #R.I.of Cladding\n", + "V=2.4 #Cut off parameter\n", + "lamda=0.8*10**-6 #wavelength in meter\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", + "print\"Numerical Aperture of Fibre is =\",NA\n", + "#(printing mistake in book)printed answer is 1.13 but correct answer is 0.13\n", + "print\"(printing mistake in book)\"\n", + "\n", + "# V = 2*3.142*a*NA / lamda\n", + "a=V*lamda/(2*3.142*NA) #core radius\n", + "print\"Core radius of Fibre is (a) =\",a,\"m\"\n", + "\n", + "#w/a= 1.1\n", + "w=1.1*a #Spot size\n", + "print\"Spot size of Fibre is =\",w,\"m\"\n", + "\n", + "theta=2*lamda*180/3.142/(3.142*w) #Divergence angle\n", + "print\"Divergence angle of Fibre is =\",theta,\"degrees\"\n", + "\n", + "w10=lamda*10/(3.142*w) #Spot size at 10 m\n", + "print\"Spot size at 10 m of Fibre is =\",w10,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.1324990566\n", + "(printing mistake in book)\n", + "Core radius of Fibre is (a) = 2.30596263706e-06 m\n", + "Spot size of Fibre is = 2.53655890076e-06 m\n", + "Divergence angle of Fibre is = 11.5009886523 degrees\n", + "Spot size at 10 m of Fibre is = 1.00378073182 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8,Page number 3-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "w=98 #Spot size in meter\n", + "d=50*10**-6 #Core diameter in meter\n", + "a=d/2 #core radius\n", + "u1=1.47 #R.I. of Core\n", + "u2=1.45 #R.I.of Cladding\n", + "lamda=0.85*10**-6 #Wavlength in meter\n", + "NA=math.sqrt(u1**2-u2**2) #Formula to find NA\n", + "\n", + "#Calculations:\n", + "V=2*3.142*a*NA/lamda #cut off parameter\n", + "N=(V**2)/2 #Number of modes\n", + "\n", + "print\"Cut off parameter of Fibre is =\",V\n", + "print\"Number of modes of Fibre is =\",N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off parameter of Fibre is = 44.6646240577\n", + "Number of modes of Fibre is = 997.464321107\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9,Page number 3-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.47 #R.I. of Core\n", + "u2=1.46 #R.I.of Cladding\n", + "lamda=1.3*10**-6 #wavelength in meter\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", + "\n", + "#The condition for single mode is V<2.405\n", + "#2*3.142*a*NA/lamda < 2.405\n", + "\n", + "a=2.405*lamda/(2*3.142*NA) #Maximum radius of fibre\n", + "\n", + "print\"Maximum radius of Fibre is =\",a,\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum radius of Fibre is = 2.90662126448e-06 meter\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10,Page number 3-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.465 #R.I. of Core\n", + "u2=1.46 #R.I.of Cladding\n", + "lamda=1.25*10**-6 #operating wavelength\n", + "\n", + "#Calculations:\n", + "delta=(u1-u2)/u1 #Fractional Refractive index\n", + "print\"Fractional Refractive index of Fibre is =\",delta\n", + "\n", + "#For single mode propagation codition is \n", + "# a/lamda < 1.4/(3.142*sqrt(u1(u1-u2)))\n", + "\n", + "a=lamda*1.4/(3.142*u1*math.sqrt(delta)) #core radius\n", + "\n", + "u=u1-(math.sqrt(2*delta)/(2*3.142*(a/lamda))) #effective refractive index\n", + "print\"Effective Refractive index for lowest mode propagation is =\",u\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fractional Refractive index of Fibre is = 0.00341296928328\n", + "Effective Refractive index for lowest mode propagation is = 1.46247461864\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11,Page number 3-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.54 #R.I. of Core\n", + "u2=1.5 #R.I.of Cladding\n", + "lamda=1.3*10**-6 #wavelength in meter\n", + "a=25*10**-6 #core radius in meter\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", + "\n", + "V=2*3.142*a*NA/lamda #cut off parameter\n", + "print\"Cut off parameter of Fibre is =\",V\n", + "\n", + "N=(V**2)/2 #Number of modes\n", + "print\" Number of modes of Fibre is =\",N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off parameter of Fibre is = 42.1404937865\n", + " Number of modes of Fibre is = 887.910608284\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11.1,Page number 3-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.52 #R.I. of Core\n", + "u2=1.5189 #R.I.of Cladding\n", + "lamda=1.3*10**-6 #wavelength in meter\n", + "d=29*10**-6 #core diameter in meter\n", + "a=d/2\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(u1**2-u2**2) #Formula to find Numerical Aperture\n", + "V=2*3.142*a*NA/lamda #Normalised frequency\n", + "Nm=(V**2)/2 #Number of modes\n", + "\n", + "print\"Normalised frequency of Fibre is (V)=\",V\n", + "print\"The Maximum Number of modes the Fibre will support is (Nm) =\",Nm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency of Fibre is (V)= 4.05242861605\n", + "The Maximum Number of modes the Fibre will support is (Nm) = 8.2110888441\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12,Page number 3-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u1=1.5 #R.I. of Core\n", + "d=10*10**-6 #diameter of core\n", + "a=d/2 #core radius\n", + "lamda=1.3*10**-6 #wavelength\n", + "V=2.405 #cut off parameter for single mode\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, V=2*3.142*a*NA/lamda\n", + "NA=V*lamda/(2*3.142*a) #Numerical Aperture\n", + "\n", + "theta=math.asin(NA)*180/3.142 #Acceptance angle\n", + "print\"Acceptance angle of Fibre is =\",theta,\"Degrees\"\n", + "\n", + "#Also, NA=u1*sqrt(2*delta)\n", + "delta=(NA/u1)**2/2 #Fractional index\n", + "print\"Maximum Fractional Refractive index of Fibre is =\",delta\n", + "\n", + "#delta=(u1-u2)/u1\n", + "u2=u1*(1-delta) #R.I.of cladding\n", + "print\"Refractive index of cladding of Fibre is =\",u2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle of Fibre is = 5.71002346964 Degrees\n", + "Maximum Fractional Refractive index of Fibre is = 0.00220035113094\n", + "Refractive index of cladding of Fibre is = 1.4966994733\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13,Page number 3-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n1=1.5 #R.I. of core\n", + "delta=0.0005 #Fractional index difference\n", + "\n", + "#Calculations:\n", + "#(a):\n", + "#Delta=(u1-u2)/u1\n", + "n2=n1-(n1*delta) #R.I. of cladding\n", + "print\"(a)Refractive Index of cladding of fibre is =\",n2\n", + "\n", + "#(b):\n", + "phi=math.asin(n2/n1)*180/3.142 #Critical internal reflection angle\n", + "print\"(b)Critical internal reflection angle of Fibre is =\",phi,\"degrees\"\n", + "\n", + "#(c):\n", + "theta0=math.asin(math.sqrt(n1**2-n2**2))*180/3.142 #External critical Acceptance angle\n", + "print\"(c)External critical Acceptance angle of Fibre is =\",theta0,\"degrees\"\n", + "\n", + "#(d):\n", + "NA=n1*math.sqrt(2*delta) #Formula to find Numerical Aperture\n", + "print\"(d)Numerical Aperture of Fibre is =\",NA\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Refractive Index of cladding of fibre is = 1.49925\n", + "(b)Critical internal reflection angle of Fibre is = 88.1766396681 degrees\n", + "(c)External critical Acceptance angle of Fibre is = 2.71810509125 degrees\n", + "(d)Numerical Aperture of Fibre is = 0.0474341649025\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14,Page number 3-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "NA1=0.20 #Numerical Aperture of Fibre\n", + "n2=1.59 #R.I. of cladding\n", + "\n", + "#Calculations:\n", + "#NA=sqrt(n1**2-n2**2)\n", + "#In air, n0=1\n", + "n1=math.sqrt(NA1**2+n2**2) #R.I.of core\n", + "\n", + "#Now, in water \n", + "n0=1.33\n", + "NA2=math.sqrt(n1**2-n2**2)/n0 #Numerical Aperture in water\n", + "theta0=math.asin(NA2)*180/3.142 #Acceptance angle of fibre in water\n", + "print\"Acceptance angle of Fibre in water is =\",theta0,\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle of Fibre in water is = 8.6475921767 degrees\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15,Page number 3-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n1=1.45 #R.I.of core\n", + "n2=1.40 #R.I. of cladding\n", + "\n", + "#Calculations:\n", + "NA=math.sqrt(n1**2-n2**2) #Numerical Aperture\n", + "print\"Numerical Aperture of Fibre is =\",NA\n", + "\n", + "theta0=math.asin(NA)*180/3.142 #Acceptance angle of fibre\n", + "print\"Acceptance angle of Fibre is =\",theta0,\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.377491721764\n", + "Acceptance angle of Fibre is = 22.1755250876 degrees\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16,Page number 3-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "NA=0.16 #Numerical Aperture of Fibre\n", + "n1=1.45 #R.I. of core\n", + "d=90*10**-6 #Core diameter\n", + "\n", + "#Calculations:\n", + "#NA=sqrt(n1**2-n2**2)\n", + "n2=math.sqrt(n1**2-NA**2) #R.I.of cladding\n", + "print\"(a)Refractive Index of cladding of fibre is =\",n2\n", + "\n", + "theta0=math.asin(NA)*180/3.142 #Acceptance angle of fibre\n", + "print\"(b)Acceptance angle of Fibre is =\",theta0,\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Refractive Index of cladding of fibre is = 1.44114537782\n", + "(b)Acceptance angle of Fibre is = 9.20570258795 degrees\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17,Page number 3-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "n1=1.48 #R.I. of core\n", + "delta=0.055 #Realtive R.I.\n", + "lamda=1*10**-6 #Wavelength of light\n", + "a=50*10**-6 #core radius\n", + "\n", + "#Calculations:\n", + "#Delta=(u1-u2)/u1\n", + "n2=n1-(n1*delta) #R.I. of cladding\n", + "NA=n1*math.sqrt(2*delta) #Formula to find Numerical Aperture\n", + "print\"Numerical Aperture of Fibre is =\",NA\n", + "\n", + "\n", + "theta0=math.asin(NA)*180/3.142 #Acceptance angle of fibre\n", + "print\"Acceptance angle of Fibre is =\",theta0,\"degrees\"\n", + "\n", + "V=2*3.142*a*NA/lamda #V number\n", + "N=(V**2)/2 #Number of guided modes\n", + "\n", + "#In book,instead of NA , value of delta is taken into calculation.\n", + "#Thus there is calculation mistake in values of V and N.\n", + "\n", + "print\"V number of Fibre is =\",V\n", + "print\"Number of guided mode of Fibre is =\",N\n", + "print\"(Calculation mistake in book)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture of Fibre is = 0.490860468973\n", + "Acceptance angle of Fibre is = 29.3933421943 degrees\n", + "V number of Fibre is = 154.228359351\n", + "Number of guided mode of Fibre is = 11893.1934141\n", + "(Calculation mistake in book)\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb new file mode 100755 index 00000000..11b66b2f --- /dev/null +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb @@ -0,0 +1,163 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:e413b3bea25c7729b7ae1f595bf0f843336be8c682782f6b92de1c93aa46ed9d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Laser" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=694.3*10**-9 #Wavelength in meter\n", + "T=300 #Temperature in Kelvin\n", + "\n", + "h=6.63*10**-34 #Planck's Constant\n", + "c=3*10**8 #Velocity of light\n", + "K=1.38*10**-21 #Boltzmann Constant\n", + "\n", + "#Calculations:\n", + "delE= h*c/lamda #Energy difference between two energy states N and N0\n", + "\n", + "#N=N0*e^-delE/(K*T)\n", + "R=math.e**(-delE/(K*T)) #R=Ratio of N and N0 i.e.(R=N/N0)\n", + "\n", + "#(Printing mistake in textbook)\n", + "#instead of e^-.692, it has taken e^-69.2\n", + "\n", + "print\"The ratio of population of two energy states is = \",R\n", + "print\" (calculation mistake in book)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of population of two energy states is = 0.500588928485\n", + " (calculation mistake in book)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2,Page number 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Given Data:\n", + "lamda=6328*10**-10 #Wavelength in meter\n", + "P=4.5*10**-3 #Power in watts\n", + "h=6.63*10**-34 #Planck's Constant\n", + "c=3*10**8 #Velocity of light\n", + "\n", + "#Calculations:\n", + "delE= h*c/lamda #Energy difference\n", + "#N*delE=P\n", + "N=P/delE #number of photons emitted per second\n", + "\n", + "print\"Number of photons emitted per second is =\",N\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of photons emitted per second is = 1.43167420814e+16\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3,Page number 4-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "lamda=780*10**-9 #Wavelength of photon in meter\n", + "P=20*10**-3 #Power of each pulse in watts\n", + "t=10*10**-9 #Duration of each pulse\n", + "h=6.63*10**-34 #Planck's Constant\n", + "c=3*10**8 #Velocity of light\n", + "\n", + "#Calculations:\n", + "delE= h*c/lamda #Energy of each photon\n", + "E=P*t #Energy of each pulse\n", + "\n", + "N=E/delE #Number of photons in each pulse\n", + "print\"Number of photons in each pulse is =\",N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of photons in each pulse is = 784313725.49\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb new file mode 100755 index 00000000..e9d81103 --- /dev/null +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb @@ -0,0 +1,1166 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:fec7a7bbab2881090f60069cf3d4c856415ca45a1545225541a225f28ce72b8e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Foundations of Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1,Page number 5-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=6.68*10**-27 #mass of alpha particle\n", + "V=30*10**3 #potential difference\n", + "e=1.6*10**-19 #charge of an electron\n", + "q=2*e #Charge of alpha particle\n", + "h=6.63*10**-34 #Planck's constant\n", + "\n", + "#Calculations:\n", + "lamda=h/math.sqrt(2*m*q*V) #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with alpha particle is =\" ,lamda,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength associated with alpha particle is = 5.85429607723e-14 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2,Page number 5-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1 #mass of given particle in kg\n", + "h=6.63*10**-34 #Planck's constant\n", + "v=1*10**3 #velocity of particle\n", + "\n", + "#Calculations:\n", + "lamda=h/(m*v) #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with particle is =\",lamda,\"m\"\n", + "print\"This wavelength is too small for any practical significance.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength associated with particle is = 6.63e-37 m\n", + "This wavelength is too small for any practical significance.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3,Page number 5-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m1=40*10**-3 #mass of bullet in kg\n", + "m2=9.1*10**-31 #mass of electron in kg\n", + "h=6.63*10**-34 #Planck's constant\n", + "v=1100 #velocity of bullet and electron\n", + "\n", + "#Calculations:\n", + "lamda1=h/(m1*v) #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with bullet is =\",lamda1,\"m\"\n", + "\n", + "lamda2=h/(m2*v) #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with electron is =\",lamda2,\"m\"\n", + "\n", + "print\"Wavelength of bullet is too small.Hence it can not be measured with help of diffraction effect.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " de Broglie wavelength associated with bullet is = 1.50681818182e-35 m\n", + "de Broglie wavelength associated with electron is = 6.62337662338e-07 m\n", + "Wavelength of bullet is too small.Hence it can not be measured with help of diffraction effect.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4,Page number 5-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "V=100 #potential difference\n", + "d=2.15*10**-10 #lattice spacing\n", + "\n", + "#Calculations:\n", + "lamda=12.26*10**-10/(math.sqrt(V)) #wavelength associated with electron in meter\n", + "\n", + "#using bragg's law for first order lamda=2d sin(theta)\n", + "theta=math.degrees(math.asin(lamda/(2*d))) #glancing angle in degrees\n", + "print\"Glancing angle at which first reflection occurs is =\",theta,\"Degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Glancing angle at which first reflection occurs is = 16.5657992687 Degrees\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5,Page number 5-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "mn=1.674*10**-27 #mass of neutron\n", + "h=6.63*10**-34 #Planck's constant\n", + "lamda=1*10**-10 #wavelength of neutron\n", + "\n", + "#Calculations:\n", + "\n", + "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "E1=h**2/(2*mn*lamda**2) #Energy of neutron in joules\n", + "E=E1/(1.6*10**-19) #Energy of neutron in electron-Volts\n", + "\n", + "print\"Energy of neutron is =\",E,\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of neutron is = 0.0820581317204 eV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6,Page number 5-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "mn=1.67*10**-27 #mass of neutron\n", + "h=6.6*10**-34 #Planck's constant\n", + "lamda=3*10**-10 #wavelength of neutron\n", + "d=3.036*10**-10 #lattice spacing\n", + "\n", + "#Calculations:\n", + "\n", + "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "E1=h**2/(2*mn*lamda**2) #Energy of neutron in joules\n", + "E=E1/(1.6*10**-19) # Energy of neutron in electron-Volts\n", + "print\"Energy of neutron is =\",E,\"eV\"\n", + "\n", + "#using bragg's law for first order lamda=2d sin(theta)\n", + "theta=math.degrees(math.asin(lamda/(2*d))) #glancing angle in degrees\n", + "print\" Glancing angle at which first orde reflection occurs is =\",theta,\"Degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of neutron is = 0.00905688622754 eV\n", + " Glancing angle at which first orde reflection occurs is = 29.6085193042 Degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7,Page number 5-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=9.108*10**-31 #mass of electron\n", + "h=6.625*10**-34 #Planck's constant\n", + "lamda=5*10**-7 #wavelength of electron\n", + "\n", + "#Calculations:\n", + "\n", + "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "E1=h**2/(2*m*lamda**2) #Energy of electron in joules\n", + "E=E1/(1.6*10**-19) #Energy of electron in electron-Volts\n", + "print\"Energy of electron is =\",E,\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of electron is = 6.02363650088e-06 eV\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8,Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "mn=1.676*10**-27 #mass of neutron\n", + "me=9.1*10**-31 #mass of electron\n", + "h=6.625*10**-34 #Planck's constant\n", + "\n", + "#Calculations:\n", + "#Part 1:\n", + "En1=0.025 #Energy in eV of neutron\n", + "En=En1*(1.6*10**-19) #Energy in joules\n", + "\n", + "lamda1=h/math.sqrt(2*mn*En) #wavelength of a beam of neutron\n", + "print\"wavelength of a beam of neutron is =\",lamda1,\"m\"\n", + "\n", + "#Part 2:\n", + "lamda2=2*10**-10 #wavelength of electron and photon\n", + "\n", + "#//we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "Ee1=h**2/(2*me*lamda2**2) #Energy of electron in joules\n", + "Ee=Ee1/(1.6*10**-19) #Energy of electron in electron-Volts\n", + "print\"Energy of electron is =\",Ee,\"eV\"\n", + "\n", + "p1=h/lamda2 #momentum of electron\n", + "print\" Momentum of electron is =\",p1,\"kg.m/s\"\n", + "\n", + "C=3*10**8 #Velocity of light\n", + "Ep=h*C/lamda2 #Energy of photon in joules\n", + "print\"Energy of photon is =\",Ep,\"Joules\"\n", + "\n", + "p2=h/lamda2 #momentum of photon\n", + "print\"Momentum of photon is =\",p2,\"kg.m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of a beam of neutron is = 1.80927208246e-10 m\n", + "Energy of electron is = 37.6808250343 eV\n", + " Momentum of electron is = 3.3125e-24 kg.m/s\n", + "Energy of photon is = 9.9375e-16 Joules\n", + "Momentum of photon is = 3.3125e-24 kg.m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9,Page number 5-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data:\n", + "#We have alpha particle,neutron,proton and electron.\n", + "\n", + "#To find: shortest wavelength\n", + "\n", + "print\"We know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\"\n", + "\n", + "#Wavelength is inversely proportional to mass of particle for constant energy\n", + "print\"i.e., Wavelength is inversely proportional to mass of particle for constant energy. \"\n", + "\n", + "print\"We have alpha particle,neutron,proton and electron.\"\n", + "\n", + "#AS,alpha particle has highest mass.Thus it will have shortest wavelength.\n", + "print\"Out of above, alpha particle has highest mass.\"\n", + "\n", + "print\"Hence it will have shortest wavelength.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "i.e., Wavelength is inversely proportional to mass of particle for constant energy. \n", + "We have alpha particle,neutron,proton and electron.\n", + "Out of above, alpha particle has highest mass.\n", + "Hence it will have shortest wavelength.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10,Page number 5-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "me=9.108*10**-31 # mass of electron\n", + "mp=1.66*10**-27 # bmass of proton\n", + "h=6.625*10**-34 # Planck's constant\n", + "lamda=1*10**-10 # wavelength of electron and proton\n", + "\n", + "#Calculations:\n", + "\n", + "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "Ee1=h**2/(2*me*lamda**2) #Energy of electron in joules\n", + "Ee=Ee1/(1.6*10**-19) #Energy of electron in electron-Volts\n", + "print\"Energy of electron is =\",Ee,\"eV\"\n", + "\n", + "Ep1=h**2/(2*mp*lamda**2) #Energy of photon in joules\n", + "Ep=Ep1/(1.6*10**-19) #Energy of photon in electron-Volts\n", + "print\"Energy of photon is =\",Ep,\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of electron is = 150.590912522 eV\n", + "Energy of photon is = 0.0826254235693 eV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11,Page number 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m1=50*10**-9 #mass of particle in kg\n", + "m2=9.1*10**-31 #mass of electron in kg\n", + "h=6.625*10**-34 #Planck's constant\n", + "v1=1 #velocity of particle\n", + "v2=3*10**6 #velocity of electron\n", + "\n", + "#Calculations:\n", + "lamda1=h/(m1*v1)*10**10 #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with particle is =\",lamda1,\"Angstrom\"\n", + "\n", + "lamda2=h/(m2*v2)*10**10 #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with electron is =\",lamda2,\"Angstrom\"\n", + "\n", + "print\"Wavelength of electron is measurable.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength associated with particle is = 1.325e-16 Angstrom\n", + "de Broglie wavelength associated with electron is = 2.42673992674 Angstrom\n", + "Wavelength of electron is measurable.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12,Page number 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "me=9.1*10**-31 #mass of electron in kg\n", + "h=6.63*10**-34 #Planck's constant\n", + "\n", + "#Calculations:\n", + "\n", + "E1=2*10**3 #Energy in eV of electron\n", + "E=E1*(1.6*10**-19) #Energy in joules\n", + " \n", + "lamda=h/math.sqrt(2*me*E) #wavelength of electron\n", + "print\"Wavelength of electron is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of electron is = 2.7472794985e-11 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13,Page number 5-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "me=9.1*10**-31 #mass of electron\n", + "h=6.63*10**-34 #Planck's constant\n", + "lamda=2*10**-10 #wavelength of electron and photon\n", + "\n", + "#Calculations:\n", + "p1=h/lamda #momentum of electron\n", + "print\"Momentum of electron is =\",p1,\"kg.m/s\"\n", + "\n", + "Ee=p1**2/(2*me) #Energy of electron in joules\n", + "print\"Energy of electron is =\",Ee,\"Joules\"\n", + "\n", + "p2=h/lamda #momentum of photon\n", + "print\"Momentum of photon is =\",p2,\"kg.m/s\"\n", + "\n", + "c=3*10**8 #Velocity of light\n", + "Ep=h*c/lamda #Energy of photon in joules\n", + "print\"Energy of photon is =\",Ep,\"Joules\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Momentum of electron is = 3.315e-24 kg.m/s\n", + "Energy of electron is = 6.03803571429e-18 Joules\n", + "Momentum of photon is = 3.315e-24 kg.m/s\n", + "Energy of photon is = 9.945e-16 Joules\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14,Page number 5-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1.676*10**-27 #mass of neutron\n", + "h=6.625*10**-34 #Planck's constant\n", + "lamda=1*10**-10 #wavelength of neutron\n", + "\n", + "#Calculations:\n", + "C=3*10**8 #Velocity of light\n", + "Ep1=h*C/lamda #Energy of photon in joules\n", + "E1=Ep1/(1.6*10**-19) #Energy of photon in electron-Volts\n", + "print\"Energy of photon is =\",E1,\"eV\"\n", + "\n", + "#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength\n", + "En1=h**2/(2*m*lamda**2) #Energy of neutron in joules\n", + "E2=En1/(1.6*10**-19) #Energy of neutron in electron-Volts\n", + "print\"Energy of neutron is =\",E2,\"eV\"\n", + "\n", + "R=E1/E2 #Ratio of energies of proton to neutron\n", + "print\"Ratio of energies of proton to neutron is =\",R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of photon is = 12421.875 eV\n", + "Energy of neutron is = 0.0818366367094 eV\n", + "Ratio of energies of proton to neutron is = 151788.679245\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 5.14.1,Page number 5-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "v=900 #velocity of electron in m/s\n", + "delv=v*0.001/100 #uncertainity in velocity\n", + "h=6.63*10**-34 #Planck's constant\n", + "m=9.1*10**-31 #mass of an electron\n", + "\n", + "#Calculations:\n", + "delp=m*delv #uncertainity in the measured values of momentum\n", + "\n", + "#using heisenberg's uncertainity formula\n", + "delx=h/(2*3.142*delp) #uncertainity in its position\n", + "print\"Uncertainity with which position of electron can be located is >=\",delx,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Uncertainity with which position of electron can be located is >= 0.0128823012337 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14.2,Page number 5-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1.6*10**-27 #mass of proton in kg\n", + "h=6.63*10**-34 #Planck's constant\n", + "v=3./20*10**8 #velocity of particle\n", + "\n", + "#Calculations:\n", + "lamda=h/(m*v) #de Broglie wavelength\n", + "print\"de Broglie wavelength associated with proton is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength associated with proton is = 2.7625e-14 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14.3,Page number 5-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1.676*10**-27 #mass of neutron\n", + "h=6.634*10**-34 #Planck's constant\n", + "\n", + "#Calculations:\n", + "E1=0.025 #Energy in eV of neutron\n", + "E=E1*(1.6*10**-19) #Energy in joules\n", + "#As E=m*v**2/2\n", + "v=math.sqrt(2*E/m) #Velocity of neutron beam\n", + "\n", + "lamda=h/(m*v) #wavelength of a beam of neutron\n", + "print\"wavelength of a beam of neutron is =\",lamda,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of a beam of neutron is = 1.81172996152e-10 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14.4,Page number 5-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "delx=10*10**-9 #uncertainity in position of electron\n", + "h=6.63*10**-34 #Planck's constant\n", + "m=9.1*10**-31 #mass of an electron\n", + "E=10**3*1.6*10**-19 #Energy of electron in joules\n", + "\n", + "#Calculations:\n", + "p=math.sqrt(2*m*E) #momentum of electron\n", + "#using heisenberg's uncertainity formula\n", + "delp=h/(2*math.pi*delx) #uncertainity in the momentum\n", + "\n", + "P=delp/p*100 #percentage of uncertainity in momentum\n", + "print\"Percentage of uncertainity in momentum of electron is =\",P,\"percent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of uncertainity in momentum of electron is = 0.0618355139385 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15,Page number 5-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1.676*10**-27 #mass of neutron\n", + "h=6.63*10**-34 #Planck's constant\n", + "lamda=2*10**-12 #wavelength of neutron\n", + "c=3*10**8 #Velocity of light\n", + "\n", + "#Calculations:\n", + "p=h/lamda #momentum of neutron\n", + "KE=p**2/(2*m) #Kinetic Energy of neutron in joules\n", + "print\"Kinetic Energy of electron is =\",KE,\"Joules\"\n", + "\n", + "#velocity of particle is same as group velocity. Thus,\n", + "vg=p/m #group velocity\n", + "print\"group velocity of neutron is =\",vg,\"m/s\"\n", + "\n", + "#using, vg*vp=c**2\n", + "vp=c**2/vg #phase velocity\n", + "print\" phase velocity of neutron is =\",vp,\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic Energy of electron is = 3.27840841289e-17 Joules\n", + "group velocity of neutron is = 197792.362768 m/s\n", + " phase velocity of neutron is = 4.55022624434e+11 m/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16,Page number 5-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "m=1.157*10**-30 #mass of particle in kg\n", + "h=6.63*10**-34 #Planck's constant\n", + "c=3*10**8 #Velocity of light\n", + "\n", + "#Calculations:\n", + "E1=80 #Energy in eV of particle\n", + "E=E1*(1.6*10**-19) #Energy in joules\n", + " \n", + "lamda=h/math.sqrt(2*m*E) #wavelength of particle\n", + "print\"Wavelength of particle is =\",lamda,\"m\"\n", + "\n", + "#Now,\n", + "vg=h/(lamda*m) #group velocity\n", + "print\"Group velocity of particle is =\",vg,\"m/s\"\n", + "\n", + "#using, vg*vp=c**2\n", + "vp=c**2/vg #phase velocity\n", + "print\"Phase velocity of particle is =\",vp,\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of particle is = 1.21822320075e-10 m\n", + "Group velocity of particle is = 4703848.2563 m/s\n", + "Phase velocity of particle is = 19133270270.7 m/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17,Page number 5-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "v=400 #velocity of electron in m/s\n", + "delv=0.01/100 #uncertainity in velocity\n", + "h=6.63*10**-34 #Planck's constant\n", + "m=9.11*10**-31 #mass of an electron\n", + "\n", + "#Calculations:\n", + "p=m*v #momentum of an electron\n", + "delp=p*delv #uncertainity in the measured values of momentum\n", + "\n", + "#using heisenberg's uncertainity formula\n", + "delx=h/(2*math.pi*delp) #accuracy in its position\n", + "print\"Accuracy in its position is >=\",delx,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accuracy in its position is >= 0.00289571150576 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18,Page number 5-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given Data:\n", + "delx=10**-8 #maximum uncertainity in position of electron\n", + "h=6.63*10**-34 #Planck's constant\n", + "m=9.1*10**-31 #mass of an electron\n", + "\n", + "#Calculations:\n", + "#using heisenberg's uncertainity formula\n", + "delp=h/(2*math.pi*delx) #minimum uncertainity in the measured values of momentum\n", + "\n", + "delv=delp/m #minimum uncertainity in the velocity of an electron\n", + "print\"Minimum uncertainity in the velocity of an electron is =\",delv,\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum uncertainity in the velocity of an electron is = 11595.5744253 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19,Page number 5-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "delv=2*10**4 #uncertainity in velocity\n", + "h=6.63*10**-34 #Planck's constant\n", + "m=9.1*10**-31 #mass of an electron\n", + "\n", + "#Calculations:\n", + "delp=m*delv #uncertainity in the measured values of momentum\n", + "\n", + "#using heisenberg's uncertainity formula\n", + "delx=h/(2*math.pi*delp) #accuracy in its position\n", + "print\"Minimum space required by electron to be confined in an atom is >=\",delx,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum space required by electron to be confined in an atom is >= 5.79778721263e-09 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20,Page number 5-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "delt=1.4*10**-10 #uncertainity in time spent by nucleus in excited state\n", + "h=6.63*10**-34 #Planck's constant\n", + "\n", + "#Calculations:\n", + "\n", + "#using, delE*delt>= h/(2*math.pi)\n", + "delE1= h/(2*math.pi*delt) #uncertaininty in its energy in excited state in joules\n", + "delE=delE1/(1.6*10**-19) #uncertaininty in its energy in excited state in eV\n", + "print\"Uncertaininty in its energy in excited state is >=\",delE,\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Uncertaininty in its energy in excited state is >= 4.71070211026e-06 eV\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21,Page number 5-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "a=2*10**-10 #width of potential well in m\n", + "h=6.63*10**-34 #Planck's constant\n", + "m=9.1*10**-31 #mass of an electron\n", + "\n", + "#Calculations:\n", + "#we know equation for energy of an electron\n", + "n0=1\n", + "E01=n0**2*h**2/(8*m*a**2) #Energy in ground state\n", + "E0=E01/(1.6*10**-19) #Energy in eV\n", + "print\"Energy of an electron in ground state is=\",E0,\"eV\"\n", + "\n", + "n1=2\n", + "E11=n1**2*h**2/(8*m*a**2) #Energy in first excited state\n", + "E1=E11/(1.6*10**-19) #Energy in eV\n", + "print\" Energy of an electron in first excited state is=\",E1,\"eV\"\n", + "\n", + "\n", + "n2=3\n", + "E21=n2**2*h**2/(8*m*a**2) #Energy in second excited state\n", + "E2=E21/(1.6*10**-19) #Energy in eV\n", + "print\"Energy of an electron in second excited state is=\",E2,\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of an electron in ground state is= 9.43443080357 eV\n", + " Energy of an electron in first excited state is= 37.7377232143 eV\n", + "Energy of an electron in second excited state is= 84.9098772321 eV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22,Page number 5-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "a=25*10**-10 #width of well\n", + "delx=5*10**-10 #uncertainity in position of particle\n", + "n=1 #ground state\n", + "\n", + "#calculation:\n", + "x1=a/2\n", + "psi1=math.sqrt(2/a)*math.sin(n*math.pi/a*x1)\n", + "P1=(psi1**2)*delx #Probability of finding particle at distance of x1\n", + "print\"Probability of finding particle at a distance of x1 is =\",P1\n", + "\n", + "x2=a/3\n", + "psi2=math.sqrt(2/a)*math.sin(n*math.pi/a*x2)\n", + "P2=(psi2**2)*delx #Probability of finding particle at distance of x2\n", + "print\"Probability of finding particle at a distance of x2 is =\",P2\n", + "print\"(There is print mistake in book).\"\n", + "\n", + "x3=a\n", + "psi3=math.sqrt(2/a)*math.sin(n*math.pi/a*x3)\n", + "P3=(psi3**2)*delx #Probability of finding particle at distance of x3\n", + "print\"Probability of finding particle at a distance of x3 is =\",P3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of finding particle at a distance of x1 is = 0.4\n", + "Probability of finding particle at a distance of x2 is = 0.3\n", + "(There is print mistake in book).\n", + "Probability of finding particle at a distance of x3 is = 5.99903913065e-33\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb new file mode 100755 index 00000000..dec8353e --- /dev/null +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb @@ -0,0 +1,1183 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:bc506d3130781232c57938d478c5c5179ee56efb068c1be93d57258ec96fcd79" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Magnetic Materials and Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1,Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "H=198 #Magnetizing Force in Ampere per meter\n", + "M=2300 #Magnetization in Ampere per meter\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "\n", + "#Calculations:\n", + "#H=(B/u0)-M\n", + "B=u0*(H+M) #Flux Density\n", + "ur=B/(u0*H) #Relative Permeability\n", + "\n", + "print\"Corresponding Flux Density is =\",B,\"Wb/m^2\"\n", + "print\"Relative Permeability is =\",ur\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Corresponding Flux Density is = 0.00313907937947 Wb/m^2\n", + "Relative Permeability is = 12.6161616162\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2,Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "x=3.7*10**-3 #Susceptibility at T=300 K\n", + "T=300 #Temperature in kelvin\n", + "T1=250 #Temperature in kelvin\n", + "T2=600 #Temperature in kelvin\n", + "\n", + "#Calculations:\n", + "C=x*T #Curie's law\n", + "ur1=C/T1 #Relative permeability at 250 K\n", + "ur2=C/T2 #Relative permeability at 600 K\n", + "\n", + "print\"Relative Permeability at 250 K is =\",ur1\n", + "print\"Relative Permeability at 600 K is =\",ur2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative Permeability at 250 K is = 0.00444\n", + "Relative Permeability at 600 K is = 0.00185\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3,Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u=0.8*10**-23 #Magnetic dipole moment of an atom in paramagnetic gas in J/T\n", + "B=0.8 #Magnetic field in tesla\n", + "K=1.38*10**-23 #Boltzmann constant\n", + "\n", + "#To find Temperature at which Average thermal energy is equal to Magnetic energy \n", + "#i.e. uB=3KT/2\n", + "T=2*u*B/(3*K) #Required temperature\n", + "\n", + "print\"Required temperature is =\",T,\"Kelvin\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required temperature is = 0.309178743961 Kelvin\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4,Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "T=27+273 #Temperature in kelvin\n", + "B=0.5 #Magnetic field in tesla\n", + "C=2*10**-3 #Curie's Constant\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "\n", + "# C=u0*M*T/B (Curie's law)\n", + "M=C*B/(u0*T) #Magnetization of material at 300 K\n", + "\n", + "print\"Magnetization of material at 300 K is =\",M,\"A/m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetization of material at 300 K is = 2.65258238486 A/m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5,Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "B=10.9*10**-5 #Horizontal component of B in wb/m^2\n", + "u0=4*math.pi*10**-7 #Permeability in free space\n", + "\n", + "H=B/u0 #Horizontal component of magnetic field\n", + "print\"Horizontal component of magnetic field is =\",H,\"Ampere/meter\"\n", + "print\"(Print mistake in unit in book)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of magnetic field is = 86.7394439851 Ampere/meter\n", + "(Print mistake in unit in book)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6,Page number 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=900 #Relative permeability of medium\n", + "l=2 #length in meter\n", + "A=60*10**-4 #Crosss sectional area of ring in m^2\n", + "phi=5.9*10**-3 #flux in weber\n", + "n=700 #Number of turns\n", + "\n", + "#Calculations:\n", + "#We know, phi=B*A\n", + "B=phi/A #Flux density\n", + "#But, B=u*H\n", + "H=B/(u0*ur) #Magnetic field strength\n", + "\n", + "I=H*l/n #Required current\n", + "print\"Current required to produce given flux is =\",I,\"Ampere\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to produce given flux is = 2.48416445567 Ampere\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7,Page number 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=900 #Relative permeability of medium\n", + "r=25*10**-2 #radius of ring\n", + "A=25*10**-4 #Crosss sectional area of ring in m^2\n", + "Ag=1*10**-3 #Air gap\n", + "phi=2.7*10**-3 #flux in weber\n", + "N=400 #Number of turns\n", + "\n", + "#Calculations:\n", + "#We know, phi=B*A\n", + "B=phi/A #Flux density\n", + "#But, B=u*H\n", + "H=B/(u0*ur) #Magnetic field strength\n", + "L=H*2*math.pi*r+(B*Ag/u0) #Total amp turns required (iron+air)\n", + "I=L/N #Required current\n", + "\n", + "print\"Current required to produce given flux is =\",I,\"Ampere\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to produce given flux is = 5.89859173174 Ampere\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8,Page number 2-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "A=0.2*10**-4 #Crosss sectional area of iron bar in m^2\n", + "H=1600 #magnetising field in A/m\n", + "phi=2.4*10**-5 #Magnetic flux in weber\n", + "\n", + "\n", + "#Calculations:\n", + "#We know, phi=B*A\n", + "B=phi/A #Flux density\n", + "u=B/H #magnetic permeability\n", + "ur=u/u0 #relative permeability\n", + "xm=ur-1 #susceptibility of the iron bar\n", + "\n", + "print\"magnetic permeability of iron bar is =\",u,\"N/(A^2)\"\n", + "print\"susceptibility of the iron bar is =\",xm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetic permeability of iron bar is = 0.00075 N/(A^2)\n", + "susceptibility of the iron bar is = 595.831036595\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9,Page number 2-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "xm=948*10**-11 #susceptibility of the iron bar\n", + "\n", + "#Calculations:\n", + "ur=1+xm #relative permeability\n", + "u=u0*ur #permeability of medium\n", + "\n", + "print\"Relative Permeability of medium is =\",ur\n", + "print\"Permeability of medium is =\",u,\"H/m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative Permeability of medium is = 1.00000000948\n", + "Permeability of medium is = 1.25663707335e-06 H/m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10,Page number 2-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "B=2.5 #Magnetic field in tesla\n", + "u0=4*math.pi*10**-7 #Permeability in free space\n", + "i0=0.7 #current in the core\n", + "ri=11*10**-2 #inner radii of core\n", + "ro=12*10**-2 #outer radii of core\n", + "\n", + "#Calculations:\n", + "r=(ri+ro)/2 #Average radii of core\n", + "n=3000/(2*math.pi*r) #Number of turns\n", + "\n", + "#We know, B=u0*ur*n*i0 .Thus,\n", + "ur=B/(u0*n*i0)\n", + "\n", + "print\"Relative Permeability of medium is =\",ur\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative Permeability of medium is = 684.523809524\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11,Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "B=1.0 #Flux density in tesla\n", + "u0=4*math.pi*10**-7 #Permeability in free space\n", + "i=2.0 #current in the core\n", + "n=10*100 #n=N/l i.e. turns per meter\n", + "\n", + "#Calculations:\n", + "H=n*i #Magnetising force produced in wire\n", + "print\"Magnetising force produced in wire is =\",H,\"Amp-turn/meter\"\n", + "\n", + "#We know that, B=u0(H+I).Thus,\n", + "I=B/u0-H #Magnetisation of material\n", + "print\"Magnetisation of material is =\",I,\"Amp-turn/meter\"\n", + "\n", + "#u=B/H, i.e. ur*u0=B/H.\n", + "ur=B/(u0*H) #Relative permeability of core\n", + "print\" Relative Permeability of core is =\",ur\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetising force produced in wire is = 2000.0 Amp-turn/meter\n", + "Magnetisation of material is = 793774.715459 Amp-turn/meter\n", + " Relative Permeability of core is = 397.88735773\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12,Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "M=40 #Mass of an iron core\n", + "D=7.5*10**3 #Density of iron\n", + "f=100 #Frequency\n", + "A=3800*10**-1 #Loss due to Area of hysterisis loop in J/m^3\n", + "\n", + "#Calculations:\n", + "V=M/D #Volume of iron core\n", + "L1=A*V #Loss of energy in core per cycle\n", + "print\"Loss of energy in core per cycles is =\",L1,\"joules\"\n", + "\n", + "N=f*60 #Number of cycles per minute\n", + "L=L1*N #Loss of energy per minute\n", + "\n", + "print\"Loss of energy per minute is =\",L,\"joules\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy in core per cycles is = 2.02666666667 joules\n", + "Loss of energy per minute is = 12160.0 joules\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13,Page number 2-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "l=30*10**-2 #length in meter\n", + "A=1*10**-4 #Crosss sectional area of ring in m^2\n", + "phi=2*10**-6 #flux in weber\n", + "N=300 #Number of turns\n", + "I=0.032 #Current in winding\n", + "\n", + "#Calculations:\n", + "#(i):\n", + "B=phi/A #Flux density\n", + "print\"(i)Flux Density in the ring is =\",B,\"Wb/m^2\"\n", + "\n", + "#(ii):\n", + "H=N*I/l #Magnetic intensity\n", + "print\"(ii)Magnetic intensity is =\",H,\"Amp-turn/meter\"\n", + "\n", + "#(iii):\n", + "u=B/H #Permeability of ring\n", + "print\"(iii)Permeability of ring is =\",u,\" Wb/A-m\"\n", + "ur=u/u0 #Relative permeability of ring\n", + "print\"Relative Permeability of ring is =\",ur\n", + "\n", + "#(iv):\n", + "xm=ur-1 #susceptibility of the ring\n", + "print\"(iv)Magnetic susceptibility of the ring is =\",xm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Flux Density in the ring is = 0.02 Wb/m^2\n", + "(ii)Magnetic intensity is = 32.0 Amp-turn/meter\n", + "(iii)Permeability of ring is = 0.000625 Wb/A-m\n", + "Relative Permeability of ring is = 497.359197162\n", + "(iv)Magnetic susceptibility of the ring is = 496.359197162\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14,Page number 2-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Dta:\n", + "M=12*10**3 #Mass of an iron core in grams\n", + "D=7.5 #Density of iron in gm/cc\n", + "f=50 #Frequency\n", + "A=3000 #loss due to Area of hysterisis loop in ergs/cm^3\n", + "\n", + "#Calculations:\n", + "V=M/D #Volume of iron core\n", + "L1=A*V #Loss of energy in core per cycle\n", + "\n", + "L=L1*f*3600 #Loss of energy per hour\n", + "\n", + "print\"Loss of energy per hour is =\",L,\"Erg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per hour is = 8.64e+11 Erg\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15,Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "A=0.5*10**3 #Area of B-H loop in Joules per m^3\n", + "V=10**-3 #Volume of specimen in m^3\n", + "n=50 #Frequency of a.c.\n", + "\n", + "#Calculations:\n", + "H=n*V*A #Hysteresis power loss\n", + "\n", + "print\"Hysteresis power loss is =\",H,\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hysteresis power loss is = 25.0 Watt\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16,Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=1000 #Relative permeability of medium\n", + "V=10**-4 #Volume of iron rod in m^3\n", + "n=500 #Number of turns per meter\n", + "i=0.5 #Current in windings of solenoid in Amperes\n", + "\n", + "#Calculations:\n", + "#We know I=(ur-1)H\n", + "#and H=ni , hence\n", + "I=(ur-1)*n*i #Intensity of magnetisation\n", + "M=I*V #Magnetic moment\n", + "\n", + "print\"Magnetic moment of the rod is =\",M,\"A-m^2\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic moment of the rod is = 24.975 A-m^2\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17,Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=600 #Relative permeability of iron\n", + "d=12*10**-2 #mean diameter of ring in m\n", + "N=500 #Number of turns\n", + "i=0.3 #Current in windings of solenoid in Amperes\n", + "\n", + "#Calculations:\n", + "r=d/2 #Radius of ring\n", + "\n", + "B=u0*ur*N*i/(2*math.pi*r) #Flux densityin the core\n", + "print\"Flux densityin the core is =\",B,\"Wb/m^2\"\n", + "\n", + "H=B/(u0*ur) #Magnetic intensity\n", + "print\"Magnetic intensity is =\",H,\"Amp-turns/m\"\n", + "\n", + "#We know that, B=u0(H+I)\n", + "I1=(B-u0*H)/u0 #magnetisation\n", + "I2=u0*I1 #Electronic current loop\n", + "\n", + "I=I2/B*100 #Percentage flux density due to electroniuc loop currents\n", + "print\"Percentage flux density due to electroniuc loop currents is =\",I,\"percent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux densityin the core is = 0.3 Wb/m^2\n", + "Magnetic intensity is = 397.88735773 Amp-turns/m\n", + "Percentage flux density due to electroniuc loop currents is = 99.8333333333 percent\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18,Page number 2-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=900 #Relative permeability of iron ring\n", + "d=40*10**-2 #diameter of ring\n", + "l=5*10**-3 #air gap in the ring\n", + "A=5.8*10**-4 #Crosss sectional area of ring in m^2\n", + "phi=1.5*10**-4 #flux in weber\n", + "N=600 #Number of turns\n", + "\n", + "#Calculations:\n", + "r=d/2 #Radius of ring\n", + "\n", + "#We know, phi=B*A\n", + "B=phi/A #Flux density\n", + "\n", + "#But, B=u*H\n", + "H=B/(u0*ur) #Magnetic field strength\n", + "\n", + "m1=H*ur*l #amp-turns in air gap\n", + "m2=H*2*math.pi*r #amp-turns by ring\n", + "m=m1+m2 #total mmf(amp-turns) required\n", + "\n", + "I=m/N #Required current\n", + "print\"Current required to produce given flux is =\",I,\"Amperes\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to produce given flux is = 2.19395891742 Amperes\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18.1,Page number 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "X=-0.5*10**-5 #Magnetic susceptibility of silicon\n", + "H=9.9*10**4 #Magnetic field intensity\n", + "\n", + "#Calculations:\n", + "\n", + "#As, X=I/H. thus,\n", + "I=X*H #intensity of magnetisation\n", + "print\"Intensity of magnetisation is =\",I\n", + "\n", + "B=u0*(H+I) #Magnetic flux density\n", + "print\"Magnetic flux density is =\",B,\"Wb/ m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity of magnetisation is = -0.495\n", + "Magnetic flux density is = 0.124406447047 Wb/ m^2\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18.2,Page number 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=380 #Relative permeability\n", + "d=20*10**-2 #diameter of solenoid in m\n", + "r=d/2 #radius of ring in m\n", + "A=5*10**-4 #Crosss sectional area of ring in m^2\n", + "phi=2*10**-3 #flux in weber\n", + "N=200 #Number of turns\n", + "\n", + "#Calculations:\n", + "l=math.pi*d #air gap in the ring\n", + "S=(l/(u0*ur*A)) #Reluctance of iron ring\n", + "print\"Reluctance of iron ring is =\",S,\"Amp-turn/ Wb \"\n", + "\n", + "#ohm's law for magnetic circuit is phi=N*I/S. thus,\n", + "I=S*phi/N #required current\n", + "print\"Current required to obtain given magnetic flux is =\",I,\"Amperes\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reluctance of iron ring is = 2631578.94737 Amp-turn/ Wb \n", + "Current required to obtain given magnetic flux is = 26.3157894737 Amperes\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18.3,Page number 2-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Values:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=1 #Relative permeability of air\n", + "r=15*10**-2 #radius of ring in m\n", + "A=6*10**-4 #Crosss sectional area of ring in m^2\n", + "I=4 #Coil current in amp\n", + "N=500 #Number of turns\n", + "\n", + "#Calculations:\n", + "m=N*I #MMF of coil\n", + "print\"MMF of coil is =\",m,\"Ampere-turn\"\n", + "\n", + "l=2*math.pi*r #air gap\n", + "R=(l/(u0*ur*A)) #Reluctance of iron ring\n", + "print\"Reluctance of iron ring is =\",R,\"Ampere-turn/Wb\"\n", + "\n", + "phi=m/R #Magnetic flux\n", + "print\"Magnetic flux is =\",phi,\"Weber\"\n", + "\n", + "B=phi/A #Magnetic Flux density\n", + "print\"Magnetic flux density is =\",B,\"Weber/m^2\"\n", + "\n", + "H=B/(u0*ur) #Magnetic field intensity\n", + "print\"Magnetic field intensity is =\",H,\"Amperes/m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MMF of coil is = 2000 Ampere-turn\n", + "Reluctance of iron ring is = 1250000000.0 Ampere-turn/Wb\n", + "Magnetic flux is = 1.6e-06 Weber\n", + "Magnetic flux density is = 0.00266666666667 Weber/m^2\n", + "Magnetic field intensity is = 2122.06590789 Amperes/m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19,Page number 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "u0=4*math.pi*10**-7 #Permeability in vacuum\n", + "ur=6*10**-3 #Relative permeability of iron\n", + "r=0.5 #radius of ring in m\n", + "l=1*10**-2 #air gap in the ring\n", + "A=5*10**-4 #Crosss sectional area of ring in m^2\n", + "i=5 #current in ampere\n", + "N=900 #Number of turns\n", + "\n", + "#Calculations:\n", + "S=(l/(u0*A))+((2*math.pi*r-l)/ur*A) #Reluctance of iron\n", + "print\"Reluctance of iron is =\",S,\"Ampere-turn/Wb\"\n", + "\n", + "m=N*i #mmf produced\n", + "print\"mmf produced is =\",m,\"Ampere-turn\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reluctance of iron is = 15915494.5702 Ampere-turn/Wb\n", + "mmf produced is = 4500 Ampere-turn\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20,Page number 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "H=5*10**3 #coercivity of bar magnet in amp/m\n", + "l=10*10**-2 #length of solenoid in m\n", + "N=50 #No of turns\n", + "\n", + "#Calculations:\n", + "\n", + "#We know that, H=NI/l ,hence\n", + "I=l*H/N #current through solenoid\n", + "\n", + "print\"Current through solenoid is =\",I,\"Amperes\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through solenoid is = 10.0 Amperes\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21,Page number 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "ur=1200 #Relative permeability of medium\n", + "V=10**-3 #volume of iron rod\n", + "N=5*10**2 #no of turns per m\n", + "i=0.5 #current through solenoid in amp\n", + "\n", + "#Calculations:\n", + "x=ur-1 #susceptibility of the ring\n", + "H=N*i #Magnetisisng field\n", + "\n", + "#We know, x=I/H\n", + "I=x*H #magnetisation\n", + "\n", + "#Also, I=M/V , thus\n", + "M=I*V #magnetic moment\n", + "print\"Magnetic moment is =\",M,\"Ampere-turn-m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic moment is = 299.75 Ampere-turn-m^2\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22,Page number 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Dta:\n", + "ur=100 #Relative permeability of medium\n", + "l=0.2 #length of iron rod\n", + "d=10*10**-3 #diameter of solenoid in m\n", + "N=300 #no of turns per m\n", + "i=0.5 #current through solenoid in amp\n", + "r=d/2 #radius of solenoid\n", + "\n", + "#Calculations:\n", + "x=ur-1 #susceptibility of the ring\n", + "H=N*i #Magnetisisng field\n", + "\n", + "#We know, x=I/H\n", + "I=x*H #magnetisation\n", + "\n", + "V=math.pi*(r**2)*l #volume of iron rod\n", + "\n", + "#Also, I=M/V , thus\n", + "M=I*V #magnetic moment\n", + "print\"Magnetic moment is =\",M,\"Ampere-turn-m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic moment is = 0.233263254529 Ampere-turn-m^2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23,Page number 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data:\n", + "l=1.2 #length of circuit in meter\n", + "u=7.3*10**-3 #permeability of silicon sheet\n", + "A=100 #cross sectional area in cm^2\n", + "N=150 #No of turns\n", + "B=0.3 #magmetic field in Wb/m^2\n", + "\n", + "#Calculations:\n", + "\n", + "#We know, B=u*H\n", + "H=B/u #Magnetic field strength\n", + "\n", + "m=H*l #amp-turns in air gap\n", + "\n", + "I1=m/N #Required current\n", + "print\"Current required to obtain given magnetic field is =\",I1,\"Amperes\"\n", + "\n", + "I=I1/A #Required current per unit area\n", + "print\"Current required per unit area to obtain given magnetic field is =\",I,\"Amperes\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to obtain given magnetic field is = 0.328767123288 Amperes\n", + "Current required per unit area to obtain given magnetic field is = 0.00328767123288 Amperes\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2.png b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2.png new file mode 100755 index 00000000..1d450952 Binary files /dev/null and b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2.png differ diff --git a/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_1.png b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_1.png new file mode 100755 index 00000000..1d450952 Binary files /dev/null and b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_1.png differ diff --git a/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_2.png b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_2.png new file mode 100755 index 00000000..1d450952 Binary files /dev/null and b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_2.png differ diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/README.txt b/Applied_Physics-I_by_I_A_Shaikh/README.txt old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png old mode 100644 new mode 100755 diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png old mode 100644 new mode 100755 diff --git a/Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb b/Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb deleted file mode 100755 index e7e0fc16..00000000 --- a/Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb +++ /dev/null @@ -1,248 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7b7dfd33b7ab2e69421d0f26bfbfaa20f35bc1084164b445bbbc400215113c08" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1:Bonding in Solids" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3 , Page no:15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r=2; #in angstrom(distance)\n", - "e=1.6E-19; # in C (charge of electron)\n", - "E_o= 8.85E-12;# absolute premittivity\n", - "\n", - "#calculate\n", - "r=2*1*10**-10; # since r is in angstrom\n", - "V=-e**2/(4*3.14*E_o*r); # calculate potential\n", - "V1=V/e; # changing to eV\n", - "\n", - "#result\n", - "print \"\\nThe potential energy is V = \",V,\"J\";\n", - "print \"In electron-Volt V = \",round(V1,3),\"eV\"; \n", - "print \"Note: the answer in the book is wrong due to calculation mistake\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The potential energy is V = -1.15153477995e-18 J\n", - "In electron-Volt V = -7.197 eV\n", - "Note: the answer in the book is wrong due to calculation mistake\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4 , Page no:15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "#given\n", - "r0=0.236; #in nanometer(interionic distance)\n", - "e=1.6E-19; # in C (charge of electron)\n", - "E_o= 8.85E-12;# absolute premittivity\n", - "N=8; # Born constant\n", - "IE=5.14;# in eV (ionisation energy of sodium)\n", - "EA=3.65;# in eV (electron affinity of Chlorine)\n", - "pi=3.14; # value of pi used in the solution\n", - "\n", - "#calculate\n", - "r0=r0*1E-9; # since r is in nanometer\n", - "PE=(e**2/(4*pi*E_o*r0))*(1-1/N); # calculate potential energy\n", - "PE=PE/e; #changing unit from J to eV\n", - "NE=IE-EA;# calculation of Net energy\n", - "BE=PE-NE;# calculation of Bond Energy\n", - "\n", - "#result\n", - "print\"The potential energy is PE= \",round(PE,2),\"eV\";\n", - "print\"The net energy is NE= \",round(NE,2),\"eV\";\n", - "print\"The bond energy is BE= \",round(BE,2),\"eV\";\n", - "# Note: (1)-In order to make the answer prcatically feasible and avoid the unusual answer, I have used r_0=0.236 nm instead of 236 nm. because using this value will give very much irrelevant answer.\n", - "# Note: (2) There is slight variation in the answer due to round off." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The potential energy is PE= 5.34 eV\n", - "The net energy is NE= 1.49 eV\n", - "The bond energy is BE= 3.85 eV\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5 , Page no:16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r_0=.41; #in mm(lattice constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "E_o= 8.85E-12; #absolute premittivity\n", - "n=0.5; #repulsive exponent value\n", - "alpha=1.76; #Madelung constant\n", - "pi=3.14; # value of pi used in the solution\n", - "\n", - "#calculate\n", - "r=.41*1E-3; #since r is in mm\n", - "Beta=72*pi*E_o*r**4/(alpha*e**2*(n-1)); #calculation compressibility\n", - "\n", - "#result\n", - "print\"The compressibility is\tBeta=\",round(Beta);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The compressibility is\tBeta= -2.50967916144e+15\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.6 , Page no:16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r_0=3.56; #in Angstrom\n", - "e=1.6E-19; #in C (charge of electron)\n", - "IE=3.89; #in eV (ionisation energy of Cs)\n", - "EA=-3.61; #in eV (electron affinity of Cl)\n", - "n=10.5; #Born constant\n", - "E_o= 8.85E-12; #absolute premittivity\n", - "alpha=1.763; #Madelung constant\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "r_0=r_0*1E-10; #since r is in nanometer\n", - "U=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n", - "U=U/e; #changing unit from J to eV\n", - "ACE=U+EA+IE; #calculation of atomic cohesive energy\n", - "\n", - "#result\n", - "print\"The ionic cohesive energy is \",round(U),\"eV\";\n", - "print\"The atomic cohesive energy is\",round(ACE),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ionic cohesive energy is -6.0 eV\n", - "The atomic cohesive energy is -6.0 eV\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7 , Page no:17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r_0=2.81; #in Angstrom\n", - "e=1.6E-19; #in C (charge of electron)\n", - "n=9; #Born constant\n", - "E_o= 8.85E-12; #absolute premittivity\n", - "alpha=1.748; #Madelung constant\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "r_0=r_0*1E-10; #since r is in nanometer\n", - "V=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n", - "V=V/e; #changing unit from J to eV\n", - "V_1=V/2; #Since only half of the energy contribute per ion to the cohecive energy therfore\n", - "\n", - "#result\n", - "print\"The potential energy is V=\",round(V,2),\"eV\";\n", - "print\"The energy contributing per ions to the cohesive energy is \",round(V_1,2),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The potential energy is V= -7.96 eV\n", - "The energy contributing per ions to the cohesive energy is -3.98 eV\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_01_Bonding_in_Solids__1.ipynb b/Applied_Physics/Chapter_01_Bonding_in_Solids__1.ipynb deleted file mode 100755 index db06e802..00000000 --- a/Applied_Physics/Chapter_01_Bonding_in_Solids__1.ipynb +++ /dev/null @@ -1,248 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2ef3d4592a57ed325da4c5f5624afbf334fc1ea3982d155f4e16e40570d72ab9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1:Bonding in Solids" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3 , Page no:15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r=2; #in angstrom(distance)\n", - "e=1.6E-19; # in C (charge of electron)\n", - "E_o= 8.85E-12;# absolute premittivity\n", - "\n", - "#calculate\n", - "r=2*1*10**-10; # since r is in angstrom\n", - "V=-e**2/(4*3.14*E_o*r); # calculate potential\n", - "V1=V/e; # changing to eV\n", - "\n", - "#result\n", - "print \"\\nThe potential energy is V = \",'%.4E'%V,\"J\";\n", - "print \"In electron-Volt V = \",round(V1,3),\"eV\"; \n", - "print \"Note: the answer in the book is wrong due to calculation mistake\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The potential energy is V = -1.1515E-18 J\n", - "In electron-Volt V = -7.197 eV\n", - "Note: the answer in the book is wrong due to calculation mistake\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4 , Page no:15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "#given\n", - "r0=0.236; #in nanometer(interionic distance)\n", - "e=1.6E-19; # in C (charge of electron)\n", - "E_o= 8.85E-12;# absolute premittivity\n", - "N=8; # Born constant\n", - "IE=5.14;# in eV (ionisation energy of sodium)\n", - "EA=3.65;# in eV (electron affinity of Chlorine)\n", - "pi=3.14; # value of pi used in the solution\n", - "\n", - "#calculate\n", - "r0=r0*1E-9; # since r is in nanometer\n", - "PE=(e**2/(4*pi*E_o*r0))*(1-1/N); # calculate potential energy\n", - "PE=PE/e; #changing unit from J to eV\n", - "NE=IE-EA;# calculation of Net energy\n", - "BE=PE-NE;# calculation of Bond Energy\n", - "\n", - "#result\n", - "print\"The potential energy is PE= \",round(PE,2),\"eV\";\n", - "print\"The net energy is NE= \",round(NE,2),\"eV\";\n", - "print\"The bond energy is BE= \",round(BE,2),\"eV\";\n", - "# Note: (1)-In order to make the answer prcatically feasible and avoid the unusual answer, I have used r_0=0.236 nm instead of 236 nm. because using this value will give very much irrelevant answer.\n", - "# Note: (2) There is slight variation in the answer due to round off." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The potential energy is PE= 5.34 eV\n", - "The net energy is NE= 1.49 eV\n", - "The bond energy is BE= 3.85 eV\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5 , Page no:16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r_0=.41; #in mm(lattice constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "E_o= 8.85E-12; #absolute premittivity\n", - "n=0.5; #repulsive exponent value\n", - "alpha=1.76; #Madelung constant\n", - "pi=3.14; # value of pi used in the solution\n", - "\n", - "#calculate\n", - "r=.41*1E-3; #since r is in mm\n", - "Beta=72*pi*E_o*r**4/(alpha*e**2*(n-1)); #calculation compressibility\n", - "\n", - "#result\n", - "print\"The compressibility is\tBeta=\",'%.4E'%Beta;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The compressibility is\tBeta= -2.5097E+15\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.6 , Page no:16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r_0=3.56; #in Angstrom\n", - "e=1.6E-19; #in C (charge of electron)\n", - "IE=3.89; #in eV (ionisation energy of Cs)\n", - "EA=-3.61; #in eV (electron affinity of Cl)\n", - "n=10.5; #Born constant\n", - "E_o= 8.85E-12; #absolute premittivity\n", - "alpha=1.763; #Madelung constant\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "r_0=r_0*1E-10; #since r is in nanometer\n", - "U=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n", - "U=U/e; #changing unit from J to eV\n", - "ACE=U+EA+IE; #calculation of atomic cohesive energy\n", - "\n", - "#result\n", - "print\"The ionic cohesive energy is \",round(U),\"eV\";\n", - "print\"The atomic cohesive energy is\",round(ACE),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ionic cohesive energy is -6.0 eV\n", - "The atomic cohesive energy is -6.0 eV\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7 , Page no:17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "r_0=2.81; #in Angstrom\n", - "e=1.6E-19; #in C (charge of electron)\n", - "n=9; #Born constant\n", - "E_o= 8.85E-12; #absolute premittivity\n", - "alpha=1.748; #Madelung constant\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "r_0=r_0*1E-10; #since r is in nanometer\n", - "V=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n", - "V=V/e; #changing unit from J to eV\n", - "V_1=V/2; #Since only half of the energy contribute per ion to the cohecive energy therfore\n", - "\n", - "#result\n", - "print\"The potential energy is V=\",round(V,2),\"eV\";\n", - "print\"The energy contributing per ions to the cohesive energy is \",round(V_1,2),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The potential energy is V= -7.96 eV\n", - "The energy contributing per ions to the cohesive energy is -3.98 eV\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_02_Crystal_Structure.ipynb b/Applied_Physics/Chapter_02_Crystal_Structure.ipynb deleted file mode 100755 index 2d0b7a14..00000000 --- a/Applied_Physics/Chapter_02_Crystal_Structure.ipynb +++ /dev/null @@ -1,291 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f14517ab3de72640bce8c38f7d46947caa54ae7067bb37477a81849b7b917982" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2:Crystal Structure" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 , Page no:40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "N=6.02*10**26; #in /Kg-molecule (Avogadro's number)\n", - "n=4; #number of molecules per unit cell ofr NaCl\n", - "M=58.5; #in Kg/Kg-molecule (molecular weight of NaCl)\n", - "p=2189; #in Kg/m^3 (density)\n", - "\n", - "#calculate\n", - "a=pow(((n*M)/(N*p)),0.3333333);\n", - "a1=a*10**10; #changing unit to Angstrom\n", - "\n", - "#result\n", - "print\"The lattice constant is a=\",a,\"m\";\n", - "print\"\\t\\t\\ta=\",a1,\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice constant is a= 5.62072226997e-10 m\n", - "\t\t\ta= 5.62072226997 Angstrom\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 , Page no:41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02*10**23; #in /gram-atom (Avogadro's number)\n", - "n=4; #number of atom per unit cell for fcc structure\n", - "M=63.5; #in gram/gram-atom (atomic weight of Cu)\n", - "p=8.96; #in g/cm^3 (density)\n", - "\n", - "#calculate\n", - "a=pow((n*M/(N*p)),0.3333333);\n", - "a=a*1E8; #changing unit from cm to Angstrom\n", - "d=a/math.sqrt(2); #distance infcc lattice\n", - "\n", - "#result\n", - "print\"lattice constant is a=\",a,\"E-08 cm\";\n", - "print\"\\t\\t a=\",round(a,4),\"Angstrom\";\n", - "print\"distance between two nearest Cu atoms is d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lattice constant is a= 3.61113576149 E-08 cm\n", - "\t\t a= 3.6111 Angstrom\n", - "distance between two nearest Cu atoms is d= 2.55 Angstrom\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 , Page no:41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02E26; #in /Kg-atom (Avogadro's number)\n", - "n=2; #number of molecules per unit cell for bcc lattice\n", - "M=55.85; #in Kg/Kg-atom (atomic weight of Iron)\n", - "p=7860; #in Kg/m^3 (density)\n", - "\n", - "#calculate\n", - "a=pow((n*M/(N*p)),0.33333);\n", - "a1=a*1E10; #changing unit to Angstrom\n", - "\n", - "#result\n", - "print\"The lattice constant is a=\",a,\"m\";\n", - "print\"\\t\\t\\ta=\",round(a1,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice constant is a= 2.86928355016e-10 m\n", - "\t\t\ta= 2.869 Angstrom\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4 , Page no:42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02*10**26; #in /Kg-atom (Avogadro's number)\n", - "n=2; #number of molecules per unit cell for bcc lattice\n", - "M=6.94; #in Kg/Kg-atom (atomic weight of Iron)\n", - "p=530; #in Kg/m^3 (density)\n", - "\n", - "#calculate\n", - "a=pow((n*M/(N*p)),0.33333);\n", - "a1=a*1E10; #changing unit to Angstrom\n", - "\n", - "#result\n", - "print\"The lattice constant is a=\",a,\"m\";\n", - "print\"\\t\\t\\ta=\",round(a1,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice constant is a= 3.51776567326e-10 m\n", - "\t\t\ta= 3.518 Angstrom\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5 , Page no:42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02*10**23; #in /gram-molecule (Avogadro's number)\n", - "M=58.5; #in gram/gram-molecule (atomic weight of NaCl)\n", - "p=2.17; #in g/cm^3 (density)\n", - "\n", - "#calculate\n", - "#since V=M/p\n", - "#(1/d)^-3=2N/V=2Np/M\n", - "#therefore d= (M/2Np)^-3\n", - "d=pow((M/(2*N*p)),0.33333333);\n", - "d1=d*1*10**8; #changing unit from cm to Angstrom\n", - "\n", - "#result\n", - "print\"The distance between two adjacent atoms of NaCl is d=\",d,\"m\";\n", - "print\"\\t\\t\\t\\t\\t\\t d=\",round(d1,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The distance between two adjacent atoms of NaCl is d= 2.81853408124e-08 m\n", - "\t\t\t\t\t\t d= 2.819 Angstrom\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 , Page no:43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r_Na=0.98; #in Angstrom (radius of sodium ion)\n", - "r_Cl=1.81; #in Angstrom (radius of chloride ion)\n", - "M_Na=22.99; #in amu (atomic mass of sodium)\n", - "M_Cl=35.45; #in amu (atomic mass of chlorine)\n", - "\n", - "#calculate\n", - "a=2*(r_Na+r_Cl); #lattice parameter\n", - "#PF=volume of ions present in the unit cell/volume of unit cell\n", - "PF=((4*(4/3)*3.14)*r_Na**3+(4*(4/3)*3.14)*r_Cl**3)/a**3;\n", - "#Density=mass of unit cell/volume of unit cell\n", - "p=4*(M_Na+M_Cl)*1.66E-27/(a*1E-10)**3;\n", - "p1=p*1E-3; #changing unit to gm/cm^-3\n", - "\n", - "#result\n", - "print\"Lattice constant is a=\",round(a,3),\"Angstrom\";\n", - "print\"Packing fraction is =\",round(PF,3); \n", - "print\"Density is p=\",round(p),\"Kg/m^3\";\n", - "print\"Density is p=\",round(p1,2),\"g/cm^3\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lattice constant is a= 5.58 Angstrom\n", - "Packing fraction is = 0.662\n", - "Density is p= 2233.0 Kg/m^3\n", - "Density is p= 2.23 g/cm^3\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_02_Crystal_Structure_1.ipynb b/Applied_Physics/Chapter_02_Crystal_Structure_1.ipynb deleted file mode 100755 index b6038072..00000000 --- a/Applied_Physics/Chapter_02_Crystal_Structure_1.ipynb +++ /dev/null @@ -1,291 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:693d1c12519596ec538fd8d806511b7a1fdb44b316b98121270f6b11b5d8d004" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2:Crystal Structure" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 , Page no:40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "N=6.02*10**26; #in /Kg-molecule (Avogadro's number)\n", - "n=4; #number of molecules per unit cell ofr NaCl\n", - "M=58.5; #in Kg/Kg-molecule (molecular weight of NaCl)\n", - "p=2189; #in Kg/m^3 (density)\n", - "\n", - "#calculate\n", - "a=pow(((n*M)/(N*p)),0.3333333);\n", - "a1=a*10**10; #changing unit to Angstrom\n", - "\n", - "#result\n", - "print\"The lattice constant is a=\",'%.2E'%a,\"m\";\n", - "print\"\\t\\t\\ta=\",round(a1,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice constant is a= 5.62E-10 m\n", - "\t\t\ta= 5.62 Angstrom\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 , Page no:41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02*10**23; #in /gram-atom (Avogadro's number)\n", - "n=4; #number of atom per unit cell for fcc structure\n", - "M=63.5; #in gram/gram-atom (atomic weight of Cu)\n", - "p=8.96; #in g/cm^3 (density)\n", - "\n", - "#calculate\n", - "a=pow((n*M/(N*p)),0.3333333);\n", - "a1=a*1E8; #changing unit from cm to Angstrom\n", - "d=a1/math.sqrt(2); #distance infcc lattice\n", - "\n", - "#result\n", - "print\"lattice constant is a=\",'%.2E'%a,\"cm\";\n", - "print\"\\t\\t a=\",round(a1,2),\"Angstrom\";\n", - "print\"distance between two nearest Cu atoms is d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lattice constant is a= 3.61E-08 cm\n", - "\t\t a= 3.61 Angstrom\n", - "distance between two nearest Cu atoms is d= 2.55 Angstrom\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 , Page no:41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02E26; #in /Kg-atom (Avogadro's number)\n", - "n=2; #number of molecules per unit cell for bcc lattice\n", - "M=55.85; #in Kg/Kg-atom (atomic weight of Iron)\n", - "p=7860; #in Kg/m^3 (density)\n", - "\n", - "#calculate\n", - "a=pow((n*M/(N*p)),0.33333);\n", - "a1=a*1E10; #changing unit to Angstrom\n", - "\n", - "#result\n", - "print\"The lattice constant is a=\",'%.2E'%a,\"m\";\n", - "print\"\\t\\t\\ta=\",round(a1,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice constant is a= 2.87E-10 m\n", - "\t\t\ta= 2.87 Angstrom\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4 , Page no:42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02*10**26; #in /Kg-atom (Avogadro's number)\n", - "n=2; #number of molecules per unit cell for bcc lattice\n", - "M=6.94; #in Kg/Kg-atom (atomic weight of Iron)\n", - "p=530; #in Kg/m^3 (density)\n", - "\n", - "#calculate\n", - "a=pow((n*M/(N*p)),0.33333);\n", - "a1=a*1E10; #changing unit to Angstrom\n", - "\n", - "#result\n", - "print\"The lattice constant is a=\",'%.2E'%a,\"m\";\n", - "print\"\\t\\t\\ta=\",round(a1,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice constant is a= 3.52E-10 m\n", - "\t\t\ta= 3.52 Angstrom\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5 , Page no:42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=6.02*10**23; #in /gram-molecule (Avogadro's number)\n", - "M=58.5; #in gram/gram-molecule (atomic weight of NaCl)\n", - "p=2.17; #in g/cm^3 (density)\n", - "\n", - "#calculate\n", - "#since V=M/p\n", - "#(1/d)^-3=2N/V=2Np/M\n", - "#therefore d= (M/2Np)^-3\n", - "d=pow((M/(2*N*p)),0.33333333);\n", - "d1=d*1*10**8; #changing unit from cm to Angstrom\n", - "\n", - "#result\n", - "print\"The distance between two adjacent atoms of NaCl is d=\",'%.2E'%d,\"m\";\n", - "print\"\\t\\t\\t\\t\\t\\t d=\",round(d1,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The distance between two adjacent atoms of NaCl is d= 2.82E-08 m\n", - "\t\t\t\t\t\t d= 2.82 Angstrom\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 , Page no:43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r_Na=0.98; #in Angstrom (radius of sodium ion)\n", - "r_Cl=1.81; #in Angstrom (radius of chloride ion)\n", - "M_Na=22.99; #in amu (atomic mass of sodium)\n", - "M_Cl=35.45; #in amu (atomic mass of chlorine)\n", - "\n", - "#calculate\n", - "a=2*(r_Na+r_Cl); #lattice parameter\n", - "#PF=volume of ions present in the unit cell/volume of unit cell\n", - "PF=((4*(4/3)*3.14)*r_Na**3+(4*(4/3)*3.14)*r_Cl**3)/a**3;\n", - "#Density=mass of unit cell/volume of unit cell\n", - "p=4*(M_Na+M_Cl)*1.66E-27/(a*1E-10)**3;\n", - "p1=p*1E-3; #changing unit to gm/cm^-3\n", - "\n", - "#result\n", - "print\"Lattice constant is a=\",round(a,3),\"Angstrom\";\n", - "print\"Packing fraction is =\",round(PF,3); \n", - "print\"Density is p=\",round(p),\"Kg/m^3\";\n", - "print\"Density is p=\",round(p1,2),\"g/cm^3\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lattice constant is a= 5.58 Angstrom\n", - "Packing fraction is = 0.662\n", - "Density is p= 2233.0 Kg/m^3\n", - "Density is p= 2.23 g/cm^3\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb b/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb deleted file mode 100755 index 763a53c2..00000000 --- a/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb +++ /dev/null @@ -1,144 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1ec2372be7a9974010a31557c9658c85707025e7a87f82e6ef26be63dbcfb0e7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3:Planes in Crystals" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11 , Page no:61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=3;\n", - "k=2;\n", - "l=1; #miller indices\n", - "a=4.2E-8; #in cm (lattice constant)\n", - "\n", - "#calculate\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", - "d=d*1E8; #changing unit from cm to Angstrom\n", - "\n", - "#result\n", - "print\"The interplanar spacing is d=\",round(d,2),\"cm\";\n", - "print\"\\t\\t\\t d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The interplanar spacing is d= 1.12 cm\n", - "\t\t\t d= 1.12 Angstrom\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.12 , Page no:61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=1;l=1; #miller indices\n", - "a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )\n", - "\n", - "#calculate\n", - "d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing\n", - "\n", - "#result\n", - "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice spacing is d= 1.26 Angstrom\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15 , Page no:63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=0;l=0; #miller indices\n", - "a=2.5; #in Angstrom (lattice constant)\n", - "\n", - "#calculate\n", - "a=a*1E-10; #hence a is in Angstrom\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", - "p=d/a**3;\n", - "\n", - "#result\n", - "print\"The density is p=\",round(p),\"lattice points/m^2\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density is p= 1.6e+19 lattice points/m^2\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_03_Planes_in_Crystals_1.ipynb b/Applied_Physics/Chapter_03_Planes_in_Crystals_1.ipynb deleted file mode 100755 index 92dba19b..00000000 --- a/Applied_Physics/Chapter_03_Planes_in_Crystals_1.ipynb +++ /dev/null @@ -1,144 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:05935aae8ee517fae6abe7a89dceb1ca0d0cc367834bce08b5f427ec49852dcb" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3:Planes in Crystals" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11 , Page no:61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=3;\n", - "k=2;\n", - "l=1; #miller indices\n", - "a=4.2E-8; #in cm (lattice constant)\n", - "\n", - "#calculate\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", - "d=d*1E8; #changing unit from cm to Angstrom\n", - "\n", - "#result\n", - "print\"The interplanar spacing is d=\",round(d,2),\"cm\";\n", - "print\"\\t\\t\\t d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The interplanar spacing is d= 1.12 cm\n", - "\t\t\t d= 1.12 Angstrom\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.12 , Page no:61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=1;l=1; #miller indices\n", - "a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )\n", - "\n", - "#calculate\n", - "d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing\n", - "\n", - "#result\n", - "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice spacing is d= 1.26 Angstrom\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15 , Page no:63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=0;l=0; #miller indices\n", - "a=2.5; #in Angstrom (lattice constant)\n", - "\n", - "#calculate\n", - "a=a*1E-10; #hence a is in Angstrom\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", - "p=d/a**3;\n", - "\n", - "#result\n", - "print\"The density is p=\",round(p),\"lattice points/m^2\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density is p= 1.6e+19 lattice points/m^2\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb b/Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb deleted file mode 100755 index 6c9c83eb..00000000 --- a/Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:177e44357417b2cfb0b476ada5b36a934225ade51d50763b09586ba8679f08fc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4:Crystal Diffraction" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1 , Page no:75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=2.6; #in Angstrom (wavelength)\n", - "theta=20; #in Degree (angle)\n", - "n=2;\n", - "\n", - "#calculate\n", - "lambda1=lambda1*1E-10; #since lambda is in Angstrom\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore d=n(lambda)/2sin(theta)\n", - "d=n*lambda1/(2*math.sin(math.radians(theta)));\n", - "\n", - "#result\n", - "print\"The spacing constant is d=\",d,\"m\";\n", - "print\"\\t\\t\\td=\",d*10**10,\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing constant is d= 7.60189144042e-10 m\n", - "\t\t\td= 7.60189144042 Angstrom\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2 , Page no:75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=1;l=0; #miller indices\n", - "a=0.26; #in nanometer (lattice constant)\n", - "lambda1=0.065; #in nanometer (wavelength)\n", - "n=2; #order\n", - "\n", - "#calculate\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation of interlattice spacing\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "theta=math.asin(n*lambda1/(2*d));\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The glancing angle is =\",round(theta1,2),\"degree\";\n", - "print \"Note: there is slight variation in the answer due to round off error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The glancing angle is = 20.72 degree\n", - "Note: there is slight variation in the answer due to round off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3 , Page no:75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "d=3.04E-10; #in mm (spacing constant)\n", - "lambda1=0.79; #in Angstrom (wavelength)\n", - "n=3; #order\n", - "\n", - "#calculate\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda2=lambda1*1E-10; #since lambda is in angstrom\n", - "theta=math.asin(n*lambda2/(2*d));\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The glancing angle is\",round(theta1,3),\"degree\";\n", - "print \"Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The glancing angle is 22.954 degree\n", - "Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4 , Page no:76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "d=0.282; #in nanometer (spacing constant)\n", - "n=1; #order\n", - "theta=8.35; #in degree (glancing angle)\n", - "\n", - "#calculate\n", - "d=d*1E-9; #since d is in nanometer\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda1=2*d*math.sin(math.radians(theta))/n; \n", - "lambda_1=lambda1*1E10; #changing unit from m to Angstrom\n", - "theta_1=90; #in degree (for maximum order theta=90)\n", - "n_max=2*d*math.sin(math.radians(theta_1))/lambda1; #calculation of maximum order. \n", - "\n", - "#result\n", - "print\"The wavelength =\",lambda1,\"m\";\n", - "print\"\\t\\t=\" ,round(lambda_1,3),\"Angstrom\";\n", - "print\"The maximum order possible is n=\",round(n_max);\n", - "print \"Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength = 8.19038939236e-11 m\n", - "\t\t= 0.819 Angstrom\n", - "The maximum order possible is n= 7.0\n", - "Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5 , Page no:76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "theta=6; #in degree (glancing angle)\n", - "p=2170; #in Kg/m^3 (density)\n", - "M=58.46; #Molecular weight of NaCl\n", - "N=6.02E26; #in Kg-molecule (Avogadro's number)\n", - "n=1; #order\n", - "XU=1E-12; #since 1X.U.= 1E-12m\n", - "\n", - "#calculate\n", - "d=(M/(2*N*p))**(1/3); #calclation of lattice constant\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation of wavelength\n", - "lambda2=lambda1/XU;\n", - "\n", - "#result\n", - "print\"The spacing constant is d=\",d,\"m\";\n", - "print\"The wavelength is =\",lambda1,\"m\";\n", - "print\"\\t\\t =\",lambda2,\"X.U\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing constant is d= 2.81789104396e-10 m\n", - "The wavelength is = 5.89099640962e-11 m\n", - "\t\t = 58.9099640962 X.U\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6 , Page no:77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=1;l=1; #miller indices\n", - "a=5.63; #in Angstrom (lattice constant)\n", - "theta=27.5; #in degree (Glancing angle)\n", - "n=1; #order\n", - "H=6.625E-34; #in J-s (Plank's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "e=1.6E-19; #charge of electron\n", - "\n", - "#calculate\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation for wavelength\n", - "E=H*c/(lambda1*1E-10); #calculation of Energy\n", - "E1=E/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";\n", - "print\"The wavelength is =\",round(lambda1),\"Angstrom\";\n", - "print\"The energy of X-rays is E=\",E,\"J\";\n", - "print\"\\t\\t\\tE=\",E1,\"eV\";\n", - "print \"Note: c=3E8 m/s but in solution c=3E10 m/s \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice spacing is d= 3.25 Angstrom\n", - "The wavelength is = 3.0 Angstrom\n", - "The energy of X-rays is E= 6.62100284311e-16 J\n", - "\t\t\tE= 4138.12677695 eV\n", - "Note: c=3E8 m/s but in solution c=3E10 m/s \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7 , Page no:77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=344; #in V (accelerating voltage)\n", - "theta=60; #in degree (glancing angle)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.625e-34; #in J-s (Plank's constant)\n", - "n=1; #order\n", - "e=1.6E-19; #charge on electron\n", - "\n", - "#calculate\n", - "#Since K=m*v^2/2=e*V\n", - "#therefore v=sqrt(2*e*V/m)\n", - "#since lambda=h/(m*v)\n", - "#therefore we have lambda=h/sqrt(2*m*e*V)\n", - "lambda1=h/math.sqrt(2*m*e*V); #calculation of lambda\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "d=n*lambda2/(2*math.sin(math.radians(theta)));\n", - "\n", - "#result\n", - "print\"The wavelength is =\",lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,2),\"Angstrom\";\n", - "print\"The interplanar spacing is d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 6.61928340764e-11 m\n", - "\t\t = 0.66 Angstrom\n", - "The interplanar spacing is d= 0.38 Angstrom\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.8 , Page no:78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=0.02; #in eV (kinetic energy)\n", - "d=2.0; #in Angstrom (Bragg's spacing)\n", - "m=1.00898; #in amu (mass of neutron)\n", - "amu=1.66E-27; #in Kg (1amu=1.66E-27 Kg)\n", - "h=6.625e-34; #in J-s (Plank's constant)\n", - "n=1; #order\n", - "e=1.6E-19; #charge on electron\n", - "\n", - "#calculate\n", - "#Since K=m*v^2/2\n", - "#therefore v=sqrt(2*K/m)\n", - "#since lambda=h/(m*v)\n", - "#therefore we have lambda=h/sqrt(2*m*K)\n", - "m=m*amu; #changing unit from amu to Kg\n", - "K=K*e; #changing unit to J from eV\n", - "lambda1=h/math.sqrt(2*m*K); #calculation of lambda\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "theta=math.asin(n*lambda2/(2*d)); #calculation of angle of first order diffraction maximum\n", - "theta1=theta*180/3.14;\n", - "#result\n", - "print\"The wavelength is =\",lambda1,\"m\";\n", - "print\"\\t \\t =\",round(lambda2),\"Angstrom\";\n", - "print\"The angle of first order diffraction maximum is \",round(theta1),\"Degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 2.02348771817e-10 m\n", - "\t \t = 2.0 Angstrom\n", - "The angle of first order diffraction maximum is 30.0 Degree\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9 , Page no:79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "lambda1=0.586; #in Angstrom (wavelength of X-rays)\n", - "n1=1; n2=2; n3=3; #orders of diffraction\n", - "theta1=5+(58/60); #in degree (Glancing angle for first order of diffraction)\n", - "theta2=12+(01/60); #in degree (Glancing angle for second order of diffraction)\n", - "theta3=18+(12/60); #in degree (Glancing angle for third order of diffraction)\n", - "\n", - "#calculate\n", - "K1=math.sin(math.radians(theta1));\n", - "K2=math.sin(math.radians(theta2));\n", - "K3=math.sin(math.radians(theta3));\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "d1=n1*lambda1/(2*K1);\n", - "d2=n2*lambda1/(2*K2);\n", - "d3=n3*lambda1/(2*K3);\n", - "d1=d1*1E-10; #changing unit from Angstrom to m\n", - "d2=d2*1E-10; #changing unit from Angstrom to m\n", - "d3=d3*1E-10; #changing unit from Angstrom to m\n", - "d=(d1+d2+d3)/3;\n", - "\n", - "#result\n", - "print\"The value of sine of different angle of diffraction is \\nK1=\",K1;\n", - "print\"K2=\",K2;\n", - "print\"K3=\",K3;\n", - "#Taking the ratios of K1:K2:K3\n", - "#We get K1:K2:K3=1:2:3\n", - "#Therefore we have\n", - "print\"Or we have K1:K2:K3=1:2:3\";\n", - "print\"Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\";\n", - "print\"The spacing constants are \\nd1=\",d1;\n", - "print\"d2=\",d2;\n", - "print\"d3=\",d3;\n", - "print\"The mean value of crystal spacing is d=\",d,\"m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of sine of different angle of diffraction is \n", - "K1= 0.103949856225\n", - "K2= 0.208196213621\n", - "K3= 0.312334918512\n", - "Or we have K1:K2:K3=1:2:3\n", - "Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\n", - "The spacing constants are \n", - "d1= 2.81866671719e-10\n", - "d2= 2.81465253286e-10\n", - "d3= 2.81428667722e-10\n", - "The mean value of crystal spacing is d= 2.81586864243e-10 m\n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_04_Crystal_Diffraction_1.ipynb b/Applied_Physics/Chapter_04_Crystal_Diffraction_1.ipynb deleted file mode 100755 index fef74a69..00000000 --- a/Applied_Physics/Chapter_04_Crystal_Diffraction_1.ipynb +++ /dev/null @@ -1,503 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:513926db1524f2764781365e8a81c6fa3119b7bc0f032a42233e49f5c3b6140a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4:Crystal Diffraction" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1 , Page no:75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=2.6; #in Angstrom (wavelength)\n", - "theta=20; #in Degree (angle)\n", - "n=2;\n", - "\n", - "#calculate\n", - "lambda1=lambda1*1E-10; #since lambda is in Angstrom\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore d=n(lambda)/2sin(theta)\n", - "d=n*lambda1/(2*math.sin(math.radians(theta)));\n", - "\n", - "#result\n", - "print\"The spacing constant is d=\",'%.2E'%d,\"m\";\n", - "print\"\\t\\t\\td=\",round(d*10**10,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing constant is d= 7.60E-10 m\n", - "\t\t\td= 7.602 Angstrom\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2 , Page no:75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=1;l=0; #miller indices\n", - "a=0.26; #in nanometer (lattice constant)\n", - "lambda1=0.065; #in nanometer (wavelength)\n", - "n=2; #order\n", - "\n", - "#calculate\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation of interlattice spacing\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "theta=math.asin(n*lambda1/(2*d));\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The glancing angle is =\",round(theta1,2),\"degree\";\n", - "print \"Note: there is slight variation in the answer due to round off error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The glancing angle is = 20.72 degree\n", - "Note: there is slight variation in the answer due to round off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3 , Page no:75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "d=3.04E-10; #in mm (spacing constant)\n", - "lambda1=0.79; #in Angstrom (wavelength)\n", - "n=3; #order\n", - "\n", - "#calculate\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda2=lambda1*1E-10; #since lambda is in angstrom\n", - "theta=math.asin(n*lambda2/(2*d));\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The glancing angle is\",round(theta1,3),\"degree\";\n", - "print \"Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The glancing angle is 22.954 degree\n", - "Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4 , Page no:76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "d=0.282; #in nanometer (spacing constant)\n", - "n=1; #order\n", - "theta=8.35; #in degree (glancing angle)\n", - "\n", - "#calculate\n", - "d=d*1E-9; #since d is in nanometer\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda1=2*d*math.sin(math.radians(theta))/n; \n", - "lambda_1=lambda1*1E10; #changing unit from m to Angstrom\n", - "theta_1=90; #in degree (for maximum order theta=90)\n", - "n_max=2*d*math.sin(math.radians(theta_1))/lambda1; #calculation of maximum order. \n", - "\n", - "#result\n", - "print\"The wavelength =\",'%.2E'%lambda1,\"m\";\n", - "print\"\\t\\t=\" ,round(lambda_1,3),\"Angstrom\";\n", - "print\"The maximum order possible is n=\",round(n_max);\n", - "print \"Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength = 8.19E-11 m\n", - "\t\t= 0.819 Angstrom\n", - "The maximum order possible is n= 7.0\n", - "Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5 , Page no:76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "theta=6; #in degree (glancing angle)\n", - "p=2170; #in Kg/m^3 (density)\n", - "M=58.46; #Molecular weight of NaCl\n", - "N=6.02E26; #in Kg-molecule (Avogadro's number)\n", - "n=1; #order\n", - "XU=1E-12; #since 1X.U.= 1E-12m\n", - "\n", - "#calculate\n", - "d=(M/(2*N*p))**(1/3); #calclation of lattice constant\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation of wavelength\n", - "lambda2=lambda1/XU;\n", - "\n", - "#result\n", - "print\"The spacing constant is d=\",'%.2E'%d,\"m\";\n", - "print\"The wavelength is =\",'%.2E'%lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,1),\"X.U\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing constant is d= 2.82E-10 m\n", - "The wavelength is = 5.89E-11 m\n", - "\t\t = 58.9 X.U\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6 , Page no:77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "h=1;k=1;l=1; #miller indices\n", - "a=5.63; #in Angstrom (lattice constant)\n", - "theta=27.5; #in degree (Glancing angle)\n", - "n=1; #order\n", - "H=6.625E-34; #in J-s (Plank's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "e=1.6E-19; #charge of electron\n", - "\n", - "#calculate\n", - "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation for wavelength\n", - "E=H*c/(lambda1*1E-10); #calculation of Energy\n", - "E1=E/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";\n", - "print\"The wavelength is =\",round(lambda1),\"Angstrom\";\n", - "print\"The energy of X-rays is E=\",'%.2E'%E,\"J\";\n", - "print\"\\t\\t\\tE=\",'%.3E'%E1,\"eV\";\n", - "print \"Note: c=3E8 m/s but in solution c=3E10 m/s \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lattice spacing is d= 3.25 Angstrom\n", - "The wavelength is = 3.0 Angstrom\n", - "The energy of X-rays is E= 6.62E-16 J\n", - "\t\t\tE= 4.138E+03 eV\n", - "Note: c=3E8 m/s but in solution c=3E10 m/s \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7 , Page no:77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=344; #in V (accelerating voltage)\n", - "theta=60; #in degree (glancing angle)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.625e-34; #in J-s (Plank's constant)\n", - "n=1; #order\n", - "e=1.6E-19; #charge on electron\n", - "\n", - "#calculate\n", - "#Since K=m*v^2/2=e*V\n", - "#therefore v=sqrt(2*e*V/m)\n", - "#since lambda=h/(m*v)\n", - "#therefore we have lambda=h/sqrt(2*m*e*V)\n", - "lambda1=h/math.sqrt(2*m*e*V); #calculation of lambda\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "d=n*lambda2/(2*math.sin(math.radians(theta)));\n", - "\n", - "#result\n", - "print\"The wavelength is =\",'%.2E'%lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,2),\"Angstrom\";\n", - "print\"The interplanar spacing is d=\",round(d,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 6.62E-11 m\n", - "\t\t = 0.66 Angstrom\n", - "The interplanar spacing is d= 0.38 Angstrom\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.8 , Page no:78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=0.02; #in eV (kinetic energy)\n", - "d=2.0; #in Angstrom (Bragg's spacing)\n", - "m=1.00898; #in amu (mass of neutron)\n", - "amu=1.66E-27; #in Kg (1amu=1.66E-27 Kg)\n", - "h=6.625e-34; #in J-s (Plank's constant)\n", - "n=1; #order\n", - "e=1.6E-19; #charge on electron\n", - "\n", - "#calculate\n", - "#Since K=m*v^2/2\n", - "#therefore v=sqrt(2*K/m)\n", - "#since lambda=h/(m*v)\n", - "#therefore we have lambda=h/sqrt(2*m*K)\n", - "m=m*amu; #changing unit from amu to Kg\n", - "K=K*e; #changing unit to J from eV\n", - "lambda1=h/math.sqrt(2*m*K); #calculation of lambda\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "theta=math.asin(n*lambda2/(2*d)); #calculation of angle of first order diffraction maximum\n", - "theta1=theta*180/3.14;\n", - "#result\n", - "print\"The wavelength is =\",'%.2E'%lambda1,\"m\";\n", - "print\"\\t \\t =\",round(lambda2),\"Angstrom\";\n", - "print\"The angle of first order diffraction maximum is \",round(theta1),\"Degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 2.02E-10 m\n", - "\t \t = 2.0 Angstrom\n", - "The angle of first order diffraction maximum is 30.0 Degree\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9 , Page no:79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "lambda1=0.586; #in Angstrom (wavelength of X-rays)\n", - "n1=1; n2=2; n3=3; #orders of diffraction\n", - "theta1=5+(58/60); #in degree (Glancing angle for first order of diffraction)\n", - "theta2=12+(01/60); #in degree (Glancing angle for second order of diffraction)\n", - "theta3=18+(12/60); #in degree (Glancing angle for third order of diffraction)\n", - "\n", - "#calculate\n", - "K1=math.sin(math.radians(theta1));\n", - "K2=math.sin(math.radians(theta2));\n", - "K3=math.sin(math.radians(theta3));\n", - "#Since 2dsin(theta)=n(lambda)\n", - "#therefore we have\n", - "d1=n1*lambda1/(2*K1);\n", - "d2=n2*lambda1/(2*K2);\n", - "d3=n3*lambda1/(2*K3);\n", - "d1=d1*1E-10; #changing unit from Angstrom to m\n", - "d2=d2*1E-10; #changing unit from Angstrom to m\n", - "d3=d3*1E-10; #changing unit from Angstrom to m\n", - "d=(d1+d2+d3)/3;\n", - "\n", - "#result\n", - "print\"The value of sine of different angle of diffraction is \\nK1=\",round(K1,4);\n", - "print\"K2=\",round(K2,4);\n", - "print\"K3=\",round(K3,4);\n", - "#Taking the ratios of K1:K2:K3\n", - "#We get K1:K2:K3=1:2:3\n", - "#Therefore we have\n", - "print\"Or we have K1:K2:K3=1:2:3\";\n", - "print\"Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\";\n", - "print\"The spacing constants are \\nd1=\",'%.2E'%d1;\n", - "print\"d2=\",'%.3E'%d2;\n", - "print\"d3=\",'%.3E'%d3;\n", - "print\"The mean value of crystal spacing is d=\",'%.3E'%d,\"m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of sine of different angle of diffraction is \n", - "K1= 0.1039\n", - "K2= 0.2082\n", - "K3= 0.3123\n", - "Or we have K1:K2:K3=1:2:3\n", - "Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\n", - "The spacing constants are \n", - "d1= 2.82E-10\n", - "d2= 2.815E-10\n", - "d3= 2.814E-10\n", - "The mean value of crystal spacing is d= 2.816E-10 m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb b/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb deleted file mode 100755 index cf16b683..00000000 --- a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb +++ /dev/null @@ -1,1258 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:17ded29a54411f524d1901cc530f956cb4706c517e993f5acba4014789eca0bd" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5:Principles of Quantum Mechanics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1 , Page no:102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=1; #in Angstrom (wavelength)\n", - "m=1.67E-27; #in Kg (mass of neutron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "lambda2=lambda1*1E-10; #since lambda is in Angstrom\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "v=h/(m*lambda2); #calculation of velocity\n", - "K=m*v**2/2; #calculation of kinetic energy\n", - "K1=K/e; #changing unit fro J to eV\n", - "\n", - "#result\n", - "print\"The velocity is v=\",v,\"m/s\";\n", - "print\"The kinetic energy is K=\",K,\"J\";\n", - "print\"\\t\\t =\",K1,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity is v= 3967.06586826 m/s\n", - "The kinetic energy is K= 1.31409056886e-20 J\n", - "\t\t = 0.0821306605539 eV\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2 , Page no:103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=50; #in eV (Kinetic energy)\n", - "m0=9.1E-31; #in Kg (mass of electron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "K=K*e; #changing unit from eV to J\n", - "#Since K=m*v^2/2\n", - "#Therefore v=sqrt(2*K/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "lambda1=h/math.sqrt(2*m0*K); #calculation of wavelength\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 1.73622176082e-10 m\n", - "\t\t = 1.736 Angstrom\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3 , Page no:104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E=2000; #in eV (Kinetic energy)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "E=E*e; #changing unit from eV to J\n", - "#Since E=m*v^2/2\n", - "#Therefore v=sqrt(2*E/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "lambda1=h/math.sqrt(2*m*E); #calculation of wavelength\n", - "lambda2=lambda1*1E9; #changing unit from m to nanometer\n", - "\n", - "#result\n", - "print\"The wavelength is =\",lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,4),\"nm\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 2.74520764367e-11 m\n", - "\t\t = 0.0275 nm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4 , Page no:104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_n=1.676E-27; #in Kg (mass of neutron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "\n", - "#calculate\n", - "E_e=m_e*c**2; #rest mass energy of electron\n", - "E_n=2*E_e; #given (kinetic energy of neutron)\n", - "#Since K=m*v^2/2\n", - "#Therefore v=sqrt(2*K/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "lambda1=h/math.sqrt(2*m_n*E_n); #calculation of wavelength\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",lambda1,\"m\";\n", - "print\"\\t\\t =\",lambda2,\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 2.82733278331e-14 m\n", - "\t\t = 0.000282733278331 Angstrom\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5 , Page no:104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=1600; #in V (Potential)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", - "print \"Note : The answer in the book is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 0.307 Angstrom\n", - "Note : The answer in the book is wrong \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6 , Page no:105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E=1000; #in eV (Kinetic energy of photon)\n", - "K=1000; #in eV (Kinetic energy of electron)\n", - "m0=9.1E-31; #in Kg (mass of electron)\n", - "h=6.6E-34; #in J-s (Planck's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "e=1.6E-19; #in C (charge on electron)\n", - "\n", - "#calculate\n", - "E=E*e; #changing unit from eV to J\n", - "lambda_p=h*c/E; #For photon E=hc/lambda\n", - "lambda_p1=lambda_p*1E10; #changing unit from m to Angstrom\n", - "#Since K=m*v^2/2\n", - "#Therefore v=sqrt(2*K/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "K=K*e; #changing unit from eV to J\n", - "lambda_e=h/math.sqrt(2*m0*K); #calculation of wavelength\n", - "lambda_e1=lambda_e*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"For photon,the wavelength is =\",lambda_p,\"m\";\n", - "print\"\\t\\t\\t =\",round(lambda_p1,1),\"Angstrom\";\n", - "print\"For electron,the wavelength is =\",lambda_e,\"m\";\n", - "print\"\\t\\t\\t =\",round(lambda_e1,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For photon,the wavelength is = 1.2375e-09 m\n", - "\t\t\t = 12.4 Angstrom\n", - "For electron,the wavelength is = 3.86765965524e-11 m\n", - "\t\t\t = 0.39 Angstrom\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7 , Page no:105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=1.66*10**-10; #in m (wavelength)\n", - "m=9.1*10**-31; #in Kg (mass of electron)\n", - "h=6.626*10**-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge on electron)\n", - "\n", - "#calculate\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "v=h/(m*lambda1); #calculation of velocity\n", - "K=m*v**2/2; #calculation of kinetic energy\n", - "K1=K/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The velocity of electron is v=\",v,\"m/s\";\n", - "print\"The kinetic energy is K=\",K,\"J\";\n", - "print\"\\t\\t =\",round(K1,3),\"eV\";\n", - "print \"Note: The answer in the book for kinetic energy is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity of electron is v= 4386336.55501 m/s\n", - "The kinetic energy is K= 8.75417651009e-18 J\n", - "\t\t = 54.714 eV\n", - "Note: The answer in the book for kinetic energy is wrong \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8 , Page no:106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=400; #in K (temperature)\n", - "m=6.7E-27; #in Kg (mass of He-atom)\n", - "h=6.6E-34; #in J-s (Planck's constant)\n", - "k=1.376E-23; #in J/degree (Boltzmann constant)\n", - "\n", - "#calculate\n", - "#Since lambda=h/(m*v)\n", - "#E=mv^2/2;\n", - "#Therefore lambda=h/sqrt(2*m*E)\n", - "#E=kT\n", - "#Therefore lambda=h/sqrt(2*m*k*T)\n", - "lambda1=h/math.sqrt(2*m*k*T)\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The de-Broglie wavelength of He-atom is =\",lambda1,\"m\";\n", - "print\"\\t\\t\\t\\t =\",round(lambda2,4),\"Angstrom\"; " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The de-Broglie wavelength of He-atom is = 7.6851495611e-11 m\n", - "\t\t\t\t = 0.7685 Angstrom\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9 , Page no:106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_p=1.6E-27; #in Kg (mass of proton)\n", - "h=6.626E-34; #in J-s (Planck's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "\n", - "#calculate\n", - "E=m_e*c**2; #in J (rest energy of electron)\n", - "#Since lambda=h/(m*v)\n", - "#E=mv^2/2;\n", - "#herefore lambda=h/sqrt(2*m*E)\n", - "#Also E=m_e*c^2;\n", - "#therefore lambda=h/sqrt(2*m_p*m_e*c^2)\n", - "lambda1=h/math.sqrt(2*m_p*m_e*c**2); #calculation of wavelength\n", - "lambda2=lambda1*1*10**10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The de-Broglie wavelength of proton is =\",lambda1,\"m\";\n", - "print\"\\t\\t\\t\\t =\",lambda2,\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The de-Broglie wavelength of proton is = 4.0929316435e-14 m\n", - "\t\t\t\t = 0.00040929316435 Angstrom\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10 , Page no:106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=10000; #in V (Potential)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 0.123 Angstrom\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.11 , Page no:107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=100; #in V (Potential)\n", - "n=1; #order of diffraction\n", - "d=2.15; #in Angstrom (lattice spacing)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "#Since 2*d*sind(theta)=n*lambda\n", - "#therefore we have\n", - "theta=math.asin(n*lambda1/(2*d)); #calculation of glancing angle\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", - "print\"The glancing angle is =\",round(theta1,1),\"degree\";\n", - "print \"Note: In question V=100 eV but the solution is using V=100V \"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 1.227 Angstrom\n", - "The glancing angle is = 16.6 degree\n", - "Note: In question V=100 eV but the solution is using V=100V \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12 , Page no:107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=344; #in V (Potential)\n", - "n=1; #order of diffraction\n", - "theta=60; #in degree (glancing angle)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "#Since 2*d*sind(theta)=n*lambda\n", - "#therefore we have\n", - "d=n*lambda1/(2*math.sin(math.radians(theta))); #calculation of spacing constant\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", - "print\"The spacing of the crystal is =\",round(d,4),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 0.662 Angstrom\n", - "The spacing of the crystal is = 0.3819 Angstrom\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13 , Page no:107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r=0.53*10**-10; #in m (radius of first Bohr orbit)\n", - "h=6.6*10**-34; #in J-s (Planck's constant)\n", - "m=9.1*10**-31; #in Kg (mass of electron)\n", - "n=1; #First Bohr orbit\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "#Since 2*pi*r=n*lambda and lambda=h/(m*v)\n", - "#Threfore we have v=h*n/(2*pi*r*m)\n", - "v=h*n/(2*pi*r*m); #calculation of velocity\n", - "\n", - "#result\n", - "print\"The velocity of electron is =\",v,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity of electron is = 2179049.16859 m/s\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14 , Page no:108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dx=0.2; #in Angstrom (uncertainty in the position)\n", - "h=6.6E-34; #in J-s (Planck's constant)\n", - "m0=9.1E-31; #in Kg (mass of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "dx=dx*1E-10; #since dx is in Angstrom\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", - "#since dp=m*dv\n", - "dv=dp/m0; #calculation of uncertainty in the velocity\n", - "\n", - "#result\n", - "print\"The uncertainty in the momentum is dp=\",dp,\"Kg-m/\";\n", - "print\"The uncertainty in the velocity is dv=\",dv,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the momentum is dp= 2.62738853503e-24 Kg-m/\n", - "The uncertainty in the velocity is dv= 2887240.14839 m/s\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15 , Page no:108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_p=1.67E-27; #in Kg (mass of proton)\n", - "dx_p=1; #in nanometer (uncertainty in position of electron)\n", - "dx_n=1; #in nanometer (uncertainty in position of proton)\n", - "\n", - "#calculate\n", - "#since dp=h/(4*pi*dx)\n", - "#since h/(4*pi) is constant and dx is same for electron and proton \n", - "#therefor both electron and proton have same uncertainty in the momentum\n", - "#since dv=dp/m and dp is same for both\n", - "#therefore dv_e/dv_p=m_p/m_e\n", - "#therefore\n", - "K=m_p/m_e; #ratio of uncertainty in the velocity of electron and proton\n", - "\n", - "#result\n", - "print\"The ratio of uncertainty in the velocity of electron to that of proton is =\",round(K);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ratio of uncertainty in the velocity of electron to that of proton is = 1835.0\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.16 , Page no:108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dx=5*10**-15; #in m (radius of nucleus or uncertainty in the position)\n", - "h=6.6*10**-34; #in J-s (Planck's constant)\n", - "m=1.67E-27; #in Kg (mass of proton)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", - "p=dp; #minimum value of momentum to calculate mimimum kinetic energy\n", - "K=(p**2)/(2*m); #calculation of minimum kinetic energy of proton\n", - "K1=K/e; #changing unit from J to eV\n", - "K2=K1/1E6; #changing unit from eV to MeV\n", - "\n", - "#result\n", - "print\"The minimum uncertainty in the momentum of proton is dp =\",dp,\"Kg-m/s\";\n", - "print\"The minimum kinetic energy of proton is K=\",K,\"J\";\n", - "print\"\\t\\t\\t\\t \\t =\",K1,\"eV\";\n", - "print\"\\t\\t\\t\\t\\t =\",K2,\"MeV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum uncertainty in the momentum of proton is dp = 1.05095541401e-20 Kg-m/s\n", - "The minimum kinetic energy of proton is K= 3.30690803067e-14 J\n", - "\t\t\t\t \t = 206681.751917 eV\n", - "\t\t\t\t\t = 0.206681751917 MeV\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.17 , Page no:109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=1; #in KeV (kinetic energy of electron)\n", - "dx=1; #in Angstrom (uncertainty in the position)\n", - "h=6.63E-34; #in J-s (Planck's constant)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "dx=dx*1E-10; #since dx is in Angstrom\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", - "K=K*1E3*1.6E-19; #changing unit from KeV to J\n", - "p=math.sqrt(2*m*K); #calculation of momentum \n", - "poc=(dp/p)*100; #calculation of percentage of uncertainty\n", - "\n", - "#result\n", - "print\"The uncertainty in the momentum of electron is dp=\",dp,\"Kg-m/s\";\n", - "print\"The momentum of electron is p=\",p,\"Kg-m/s\";\n", - "print\"The percentage of uncertainty in the momentum is =\",round(poc,1);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the momentum of electron is dp= 5.27866242038e-25 Kg-m/s\n", - "The momentum of electron is p= 1.70645832062e-23 Kg-m/s\n", - "The percentage of uncertainty in the momentum is = 3.1\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.18 , Page no:109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "v=6.6E4; #m/s (speed of electron)\n", - "poc=0.01; #percentage of uncertainty\n", - "h=6.63E-34; #in J-s (Planck's constant)\n", - "m=9E-31; #in Kg (mass of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "p=m*v; #calculation of momentum\n", - "dp=(poc/100)*p; #calculation of uncertainty in the momentum\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dx=h/(4*pi*dp); #calculation of uncertainty in the position\n", - "\n", - "#result\n", - "print\"The momentum of electron is p=\",p,\"Kg-m/s\";\n", - "print\"The uncertainty in the momentum of electron is dp=\",dp,\"Kg-m/s\";\n", - "print\"The uncertainty in the position of electron is dx=\",dx,\"Kg-m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The momentum of electron is p= 5.94e-26 Kg-m/s\n", - "The uncertainty in the momentum of electron is dp= 5.94e-30 Kg-m/s\n", - "The uncertainty in the position of electron is dx= 8.88663707135e-06 Kg-m/s\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.19 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=1; #in Angstrom (wavelength)\n", - "pi=3.14; #value of pi used in the solution\n", - "dlambda=1E-6; #uncertainty in wavelength\n", - "\n", - "#calculate\n", - "lambda2=lambda1*1E-10; #sinc lambda is in Angstrom\n", - "#By uncertainty principle, dx*dp>=h/(4*pi) --(1)\n", - "#since p=h/lambda -----(2)\n", - "#Or p*lambda=h \n", - "#diffrentiting this equation\n", - "#p*dlambda+lambda*dp=0\n", - "#dp=-p*dlambda/lambda ----(3)\n", - "#from (2) and (3) dp=-h*dlambda/lambda^2 ---(4)\n", - "#from (1) and(4) dx*dlambda>=lambda^2/4*pi\n", - "#Or dx=lambda^2/(4*pi*dlambda)\n", - "dx=lambda2**2/(4*pi*dlambda); #calculation of uncertainty in the position\n", - "\n", - "#result\n", - "print\"The uncertainty in the position of X-ray photon is dx=\",dx,\"m\";\n", - "print \"Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \"\n", - "print \" ANSWEER IS WRONG IN THE TEXTBOOK\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the position of X-ray photon is dx= 7.96178343949e-16 m\n", - "Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \n", - " ANSWEER IS WRONG IN THE TEXTBOOK\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.20 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dt=1*10**-8; #in sec (average life time)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", - "#and E=h*v v is the frequency\n", - "#therefore we have dv>=1/(4*pi*dt)\n", - "dv=1/(4*pi*dt); #calculation of minimum uncertainty in the frequency\n", - "\n", - "#result\n", - "print\"The minimum uncertainty in the frequency of the photon is dv=\",dv,\"sec^-1\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum uncertainty in the frequency of the photon is dv= 7961783.43949 sec^-1\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.21 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dt=1E-12; #in sec (average life time)\n", - "h=6.63E-34; #in J-s (Planck'c constant)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", - "dE=h/(4*pi*dt); #calculation of minimum uncertainty in the energy\n", - "dE1=dE/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The uncertainty in the energy of the photon is dE=\",dE,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",dE1,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the energy of the photon is dE= 5.27866242038e-23 J\n", - "\t\t\t\t\t = 0.000329916401274 eV\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.22 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dT=2.5E-14; #in sec (average life time)\n", - "h=6.63E-34; #in J-s (Planck'c constant)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", - "dE=h/(4*pi*dT); #calculation of minimum uncertainty in the energy\n", - "dE1=dE/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The uncertainty in the energy of the photon is dE=\",dE,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",dE1,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the energy of the photon is dE= 2.11146496815e-21 J\n", - "\t\t\t\t\t = 0.013196656051 eV\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.23 , Page no:112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "a=2; #in Angstrom (length of the box)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "n2=2; n4=4; #two quantum states\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "a=a*1E-10; #since a is in Angstrom \n", - "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", - "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd quantum state\n", - "E21=E2/e; #changing unit from J to eV\n", - "E4=n4**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 4nd quantum state\n", - "E41=E4/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The energy corresponding to the 2nd quantum state is E2=\",E2,\"J\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",E21,\"eV\";\n", - "print\"The energy corresponding to the 4nd quantum state is E4=\",E4,\"J\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",E41,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy corresponding to the 2nd quantum state is E2= 6.0307521978e-18 J\n", - "\t\t\t\t\t\t = 37.6922012363 eV\n", - "The energy corresponding to the 4nd quantum state is E4= 2.41230087912e-17 J\n", - "\t\t\t\t\t\t = 150.768804945 eV\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.24 , Page no:113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "a=1E-10; #in m (width of the well)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "n1=1; n2=2; n3=3; #ground and first two excited states\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", - "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the Ground state\n", - "E11=E1/e; #changing unit from J to eV\n", - "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 1st excited state\n", - "E21=E2/e; #changing unit from J to eV\n", - "E3=n3**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd excited state\n", - "E31=E3/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The energy corresponding to the ground state is E1=\",E1,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",E11,\"eV\";\n", - "print\"The energy corresponding to the 1st excited state is E2=\",E2,\"\";\n", - "print\"\\t\\t\\t\\t\\t =\",E21,\"eV\";\n", - "print\"The energy corresponding to the 2nd excited state is E3=\",E3,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",E31,\"eV\";\n", - "print \" There is slight variation in the answer due to round off error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy corresponding to the ground state is E1= 6.0307521978e-18 J\n", - "\t\t\t\t\t = 37.6922012363 eV\n", - "The energy corresponding to the 1st excited state is E2= 2.41230087912e-17 \n", - "\t\t\t\t\t = 150.768804945 eV\n", - "The energy corresponding to the 2nd excited state is E3= 5.42767697802e-17 J\n", - "\t\t\t\t\t = 339.229811126 eV\n", - " There is slight variation in the answer due to round off error\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.25 , Page no:113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dx=1E-8; #in m (length of box or uncertainty in the position)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "\n", - "#calculate\n", - "#From uncertainty principle dx*dp=h and dp=m*dv\n", - "#therefore we have\n", - "dv=h/(m*dx); #calculation of minimum uncertainty in the velocity\n", - "dv1=dv*1E-3; #changing unit from m/s to Km/s\n", - "\n", - "#result\n", - "print\"The minimum uncertainty in the velocity of electron i dv=\",dv,\"m/s\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",round(dv1,2),\"Km/s\";\n", - "print \"Note: There is slight variation in the answer due to round off error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum uncertainty in the velocity of electron i dv= 72813.1868132 m/s\n", - "\t\t\t\t\t\t = 72.81 Km/s\n", - "Note: There is slight variation in the answer due to round off error\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.26 , Page no:113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "a=4E-10; #in m (length of the box)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "n1=1; #ground state\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", - "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the ground state\n", - "E11=E1/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The minimum energy of electron is E1=\",E1,\"J (Note: The answer in the book is wrong due to printing error)\";\n", - "print\"\\t\\t\\t\\t =\",round(E11,3),\"eV\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum energy of electron is E1= 3.76922012363e-19 J (Note: The answer in the book is wrong due to printing error)\n", - "\t\t\t\t = 2.356 eV\n" - ] - } - ], - "prompt_number": 26 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb b/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb deleted file mode 100755 index 66041c45..00000000 --- a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb +++ /dev/null @@ -1,1258 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:43369901ed597bc7502d54a31a362249abbf2812c557cb432bc86adf72bf30d7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5:Principles of Quantum Mechanics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1 , Page no:102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=1; #in Angstrom (wavelength)\n", - "m=1.67E-27; #in Kg (mass of neutron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "lambda2=lambda1*1E-10; #since lambda is in Angstrom\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "v=h/(m*lambda2); #calculation of velocity\n", - "K=m*v**2/2; #calculation of kinetic energy\n", - "K1=K/e; #changing unit fro J to eV\n", - "\n", - "#result\n", - "print\"The velocity is v=\",round(v,3),\"m/s\";\n", - "print\"The kinetic energy is K=\",'%.3E'%K,\"J\";\n", - "print\"\\t\\t =\",'%.3E'%K1,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity is v= 3967.066 m/s\n", - "The kinetic energy is K= 1.314E-20 J\n", - "\t\t = 8.213E-02 eV\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2 , Page no:103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=50; #in eV (Kinetic energy)\n", - "m0=9.1E-31; #in Kg (mass of electron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "K=K*e; #changing unit from eV to J\n", - "#Since K=m*v^2/2\n", - "#Therefore v=sqrt(2*K/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "lambda1=h/math.sqrt(2*m0*K); #calculation of wavelength\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",'%.3E'%lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 1.736E-10 m\n", - "\t\t = 1.736 Angstrom\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3 , Page no:104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E=2000; #in eV (Kinetic energy)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "E=E*e; #changing unit from eV to J\n", - "#Since E=m*v^2/2\n", - "#Therefore v=sqrt(2*E/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "lambda1=h/math.sqrt(2*m*E); #calculation of wavelength\n", - "lambda2=lambda1*1E9; #changing unit from m to nanometer\n", - "\n", - "#result\n", - "print\"The wavelength is =\",'%.3E'%lambda1,\"m\";\n", - "print\"\\t\\t =\",round(lambda2,4),\"nm\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 2.745E-11 m\n", - "\t\t = 0.0275 nm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4 , Page no:104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_n=1.676E-27; #in Kg (mass of neutron)\n", - "h=6.625E-34; #in J-s (Planck's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "\n", - "#calculate\n", - "E_e=m_e*c**2; #rest mass energy of electron\n", - "E_n=2*E_e; #given (kinetic energy of neutron)\n", - "#Since K=m*v^2/2\n", - "#Therefore v=sqrt(2*K/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "lambda1=h/math.sqrt(2*m_n*E_n); #calculation of wavelength\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",'%.3E'%lambda1,\"m\";\n", - "print\"\\t\\t =\",'%.3E'%lambda2,\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 2.827E-14 m\n", - "\t\t = 2.827E-04 Angstrom\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5 , Page no:104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=1600; #in V (Potential)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", - "print \"Note : The answer in the book is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 0.307 Angstrom\n", - "Note : The answer in the book is wrong \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6 , Page no:105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E=1000; #in eV (Kinetic energy of photon)\n", - "K=1000; #in eV (Kinetic energy of electron)\n", - "m0=9.1E-31; #in Kg (mass of electron)\n", - "h=6.6E-34; #in J-s (Planck's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "e=1.6E-19; #in C (charge on electron)\n", - "\n", - "#calculate\n", - "E=E*e; #changing unit from eV to J\n", - "lambda_p=h*c/E; #For photon E=hc/lambda\n", - "lambda_p1=lambda_p*1E10; #changing unit from m to Angstrom\n", - "#Since K=m*v^2/2\n", - "#Therefore v=sqrt(2*K/m)\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "K=K*e; #changing unit from eV to J\n", - "lambda_e=h/math.sqrt(2*m0*K); #calculation of wavelength\n", - "lambda_e1=lambda_e*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"For photon,the wavelength is =\",'%.3E'%lambda_p,\"m\";\n", - "print\"\\t\\t\\t =\",round(lambda_p1,1),\"Angstrom\";\n", - "print\"For electron,the wavelength is =\",'%.3E'%lambda_e,\"m\";\n", - "print\"\\t\\t\\t =\",round(lambda_e1,2),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For photon,the wavelength is = 1.238E-09 m\n", - "\t\t\t = 12.4 Angstrom\n", - "For electron,the wavelength is = 3.868E-11 m\n", - "\t\t\t = 0.39 Angstrom\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7 , Page no:105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=1.66*10**-10; #in m (wavelength)\n", - "m=9.1*10**-31; #in Kg (mass of electron)\n", - "h=6.626*10**-34; #in J-s (Planck's constant)\n", - "e=1.6E-19; #in C (charge on electron)\n", - "\n", - "#calculate\n", - "#Since lambda=h/(m*v)\n", - "#Therefore we have\n", - "v=h/(m*lambda1); #calculation of velocity\n", - "K=m*v**2/2; #calculation of kinetic energy\n", - "K1=K/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The velocity of electron is v=\",'%.2E'%v,\"m/s\";\n", - "print\"The kinetic energy is K=\",'%.2E'%K,\"J\";\n", - "print\"\\t\\t =\",round(K1,3),\"eV\";\n", - "print \"Note: The answer in the book for kinetic energy is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity of electron is v= 4.39E+06 m/s\n", - "The kinetic energy is K= 8.75E-18 J\n", - "\t\t = 54.714 eV\n", - "Note: The answer in the book for kinetic energy is wrong \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8 , Page no:106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=400; #in K (temperature)\n", - "m=6.7E-27; #in Kg (mass of He-atom)\n", - "h=6.6E-34; #in J-s (Planck's constant)\n", - "k=1.376E-23; #in J/degree (Boltzmann constant)\n", - "\n", - "#calculate\n", - "#Since lambda=h/(m*v)\n", - "#E=mv^2/2;\n", - "#Therefore lambda=h/sqrt(2*m*E)\n", - "#E=kT\n", - "#Therefore lambda=h/sqrt(2*m*k*T)\n", - "lambda1=h/math.sqrt(2*m*k*T)\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The de-Broglie wavelength of He-atom is =\",'%.2E'%lambda1,\"m\";\n", - "print\"\\t\\t\\t\\t =\",round(lambda2,4),\"Angstrom\"; " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The de-Broglie wavelength of He-atom is = 7.69E-11 m\n", - "\t\t\t\t = 0.7685 Angstrom\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9 , Page no:106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_p=1.6E-27; #in Kg (mass of proton)\n", - "h=6.626E-34; #in J-s (Planck's constant)\n", - "c=3E8; #in m/s (velocity of light)\n", - "\n", - "#calculate\n", - "E=m_e*c**2; #in J (rest energy of electron)\n", - "#Since lambda=h/(m*v)\n", - "#E=mv^2/2;\n", - "#herefore lambda=h/sqrt(2*m*E)\n", - "#Also E=m_e*c^2;\n", - "#therefore lambda=h/sqrt(2*m_p*m_e*c^2)\n", - "lambda1=h/math.sqrt(2*m_p*m_e*c**2); #calculation of wavelength\n", - "lambda2=lambda1*1*10**10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The de-Broglie wavelength of proton is =\",'%.2E'%lambda1,\"m\";\n", - "print\"\\t\\t\\t\\t =\",'%.2E'%lambda2,\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The de-Broglie wavelength of proton is = 4.09E-14 m\n", - "\t\t\t\t = 4.09E-04 Angstrom\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10 , Page no:106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=10000; #in V (Potential)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 0.123 Angstrom\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.11 , Page no:107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=100; #in V (Potential)\n", - "n=1; #order of diffraction\n", - "d=2.15; #in Angstrom (lattice spacing)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "#Since 2*d*sind(theta)=n*lambda\n", - "#therefore we have\n", - "theta=math.asin(n*lambda1/(2*d)); #calculation of glancing angle\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", - "print\"The glancing angle is =\",round(theta1,1),\"degree\";\n", - "print \"Note: In question V=100 eV but the solution is using V=100V \"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 1.227 Angstrom\n", - "The glancing angle is = 16.6 degree\n", - "Note: In question V=100 eV but the solution is using V=100V \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12 , Page no:107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=344; #in V (Potential)\n", - "n=1; #order of diffraction\n", - "theta=60; #in degree (glancing angle)\n", - "\n", - "#calculate\n", - "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", - "#Since 2*d*sind(theta)=n*lambda\n", - "#therefore we have\n", - "d=n*lambda1/(2*math.sin(math.radians(theta))); #calculation of spacing constant\n", - "\n", - "#result\n", - "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", - "print\"The spacing of the crystal is =\",round(d,4),\"Angstrom\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The wavelength is = 0.662 Angstrom\n", - "The spacing of the crystal is = 0.3819 Angstrom\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13 , Page no:107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r=0.53*10**-10; #in m (radius of first Bohr orbit)\n", - "h=6.6*10**-34; #in J-s (Planck's constant)\n", - "m=9.1*10**-31; #in Kg (mass of electron)\n", - "n=1; #First Bohr orbit\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "#Since 2*pi*r=n*lambda and lambda=h/(m*v)\n", - "#Threfore we have v=h*n/(2*pi*r*m)\n", - "v=h*n/(2*pi*r*m); #calculation of velocity\n", - "\n", - "#result\n", - "print\"The velocity of electron is =\",'%.3E'%v,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity of electron is = 2.179E+06 m/s\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14 , Page no:108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dx=0.2; #in Angstrom (uncertainty in the position)\n", - "h=6.6E-34; #in J-s (Planck's constant)\n", - "m0=9.1E-31; #in Kg (mass of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "dx=dx*1E-10; #since dx is in Angstrom\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", - "#since dp=m*dv\n", - "dv=dp/m0; #calculation of uncertainty in the velocity\n", - "\n", - "#result\n", - "print\"The uncertainty in the momentum is dp=\",'%.3E'%dp,\"Kg-m/\";\n", - "print\"The uncertainty in the velocity is dv=\",'%.3E'%dv,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the momentum is dp= 2.627E-24 Kg-m/\n", - "The uncertainty in the velocity is dv= 2.887E+06 m/s\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15 , Page no:108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_p=1.67E-27; #in Kg (mass of proton)\n", - "dx_p=1; #in nanometer (uncertainty in position of electron)\n", - "dx_n=1; #in nanometer (uncertainty in position of proton)\n", - "\n", - "#calculate\n", - "#since dp=h/(4*pi*dx)\n", - "#since h/(4*pi) is constant and dx is same for electron and proton \n", - "#therefor both electron and proton have same uncertainty in the momentum\n", - "#since dv=dp/m and dp is same for both\n", - "#therefore dv_e/dv_p=m_p/m_e\n", - "#therefore\n", - "K=m_p/m_e; #ratio of uncertainty in the velocity of electron and proton\n", - "\n", - "#result\n", - "print\"The ratio of uncertainty in the velocity of electron to that of proton is =\",round(K);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ratio of uncertainty in the velocity of electron to that of proton is = 1835.0\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.16 , Page no:108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dx=5*10**-15; #in m (radius of nucleus or uncertainty in the position)\n", - "h=6.6*10**-34; #in J-s (Planck's constant)\n", - "m=1.67E-27; #in Kg (mass of proton)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", - "p=dp; #minimum value of momentum to calculate mimimum kinetic energy\n", - "K=(p**2)/(2*m); #calculation of minimum kinetic energy of proton\n", - "K1=K/e; #changing unit from J to eV\n", - "K2=K1/1E6; #changing unit from eV to MeV\n", - "\n", - "#result\n", - "print\"The minimum uncertainty in the momentum of proton is dp =\",'%.3E'%dp,\"Kg-m/s\";\n", - "print\"The minimum kinetic energy of proton is K=\",'%.3E'%K,\"J\";\n", - "print\"\\t\\t\\t\\t \\t =\",'%.3E'%K1,\"eV\";\n", - "print\"\\t\\t\\t\\t\\t =\",round(K2,1),\"MeV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum uncertainty in the momentum of proton is dp = 1.051E-20 Kg-m/s\n", - "The minimum kinetic energy of proton is K= 3.307E-14 J\n", - "\t\t\t\t \t = 2.067E+05 eV\n", - "\t\t\t\t\t = 0.2 MeV\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.17 , Page no:109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=1; #in KeV (kinetic energy of electron)\n", - "dx=1; #in Angstrom (uncertainty in the position)\n", - "h=6.63E-34; #in J-s (Planck's constant)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "dx=dx*1E-10; #since dx is in Angstrom\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", - "K=K*1E3*1.6E-19; #changing unit from KeV to J\n", - "p=math.sqrt(2*m*K); #calculation of momentum \n", - "poc=(dp/p)*100; #calculation of percentage of uncertainty\n", - "\n", - "#result\n", - "print\"The uncertainty in the momentum of electron is dp=\",'%.3E'%dp,\"Kg-m/s\";\n", - "print\"The momentum of electron is p=\",'%.3E'%p,\"Kg-m/s\";\n", - "print\"The percentage of uncertainty in the momentum is =\",round(poc,1);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the momentum of electron is dp= 5.279E-25 Kg-m/s\n", - "The momentum of electron is p= 1.706E-23 Kg-m/s\n", - "The percentage of uncertainty in the momentum is = 3.1\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.18 , Page no:109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "v=6.6E4; #m/s (speed of electron)\n", - "poc=0.01; #percentage of uncertainty\n", - "h=6.63E-34; #in J-s (Planck's constant)\n", - "m=9E-31; #in Kg (mass of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "p=m*v; #calculation of momentum\n", - "dp=(poc/100)*p; #calculation of uncertainty in the momentum\n", - "#Since dx*dp=h/4*pi (uncertainty relation)\n", - "dx=h/(4*pi*dp); #calculation of uncertainty in the position\n", - "\n", - "#result\n", - "print\"The momentum of electron is p=\",'%.3E'%p,\"Kg-m/s\";\n", - "print\"The uncertainty in the momentum of electron is dp=\",'%.3E'%dp,\"Kg-m/s\";\n", - "print\"The uncertainty in the position of electron is dx=\",'%.3E'%dx,\"Kg-m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The momentum of electron is p= 5.940E-26 Kg-m/s\n", - "The uncertainty in the momentum of electron is dp= 5.940E-30 Kg-m/s\n", - "The uncertainty in the position of electron is dx= 8.887E-06 Kg-m/s\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.19 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "lambda1=1; #in Angstrom (wavelength)\n", - "pi=3.14; #value of pi used in the solution\n", - "dlambda=1E-6; #uncertainty in wavelength\n", - "\n", - "#calculate\n", - "lambda2=lambda1*1E-10; #sinc lambda is in Angstrom\n", - "#By uncertainty principle, dx*dp>=h/(4*pi) --(1)\n", - "#since p=h/lambda -----(2)\n", - "#Or p*lambda=h \n", - "#diffrentiting this equation\n", - "#p*dlambda+lambda*dp=0\n", - "#dp=-p*dlambda/lambda ----(3)\n", - "#from (2) and (3) dp=-h*dlambda/lambda^2 ---(4)\n", - "#from (1) and(4) dx*dlambda>=lambda^2/4*pi\n", - "#Or dx=lambda^2/(4*pi*dlambda)\n", - "dx=lambda2**2/(4*pi*dlambda); #calculation of uncertainty in the position\n", - "\n", - "#result\n", - "print\"The uncertainty in the position of X-ray photon is dx=\",'%.3E'%dx,\"m\";\n", - "print \"Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \"\n", - "print \" ANSWEER IS WRONG IN THE TEXTBOOK\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the position of X-ray photon is dx= 7.962E-16 m\n", - "Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \n", - " ANSWEER IS WRONG IN THE TEXTBOOK\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.20 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dt=1*10**-8; #in sec (average life time)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", - "#and E=h*v v is the frequency\n", - "#therefore we have dv>=1/(4*pi*dt)\n", - "dv=1/(4*pi*dt); #calculation of minimum uncertainty in the frequency\n", - "\n", - "#result\n", - "print\"The minimum uncertainty in the frequency of the photon is dv=\",'%.3E'%dv,\"sec^-1\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum uncertainty in the frequency of the photon is dv= 7.962E+06 sec^-1\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.21 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dt=1E-12; #in sec (average life time)\n", - "h=6.63E-34; #in J-s (Planck'c constant)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", - "dE=h/(4*pi*dt); #calculation of minimum uncertainty in the energy\n", - "dE1=dE/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The uncertainty in the energy of the photon is dE=\",'%.3E'%dE,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",'%.3E'%dE1,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the energy of the photon is dE= 5.279E-23 J\n", - "\t\t\t\t\t = 3.299E-04 eV\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.22 , Page no:111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dT=2.5E-14; #in sec (average life time)\n", - "h=6.63E-34; #in J-s (Planck'c constant)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", - "dE=h/(4*pi*dT); #calculation of minimum uncertainty in the energy\n", - "dE1=dE/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The uncertainty in the energy of the photon is dE=\",'%.3E'%dE,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",'%.3E'%dE1,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uncertainty in the energy of the photon is dE= 2.111E-21 J\n", - "\t\t\t\t\t = 1.320E-02 eV\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.23 , Page no:112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "a=2; #in Angstrom (length of the box)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "n2=2; n4=4; #two quantum states\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "a=a*1E-10; #since a is in Angstrom \n", - "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", - "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd quantum state\n", - "E21=E2/e; #changing unit from J to eV\n", - "E4=n4**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 4nd quantum state\n", - "E41=E4/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The energy corresponding to the 2nd quantum state is E2=\",'%.3E'%E2,\"J\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",'%.3E'%E21,\"eV\";\n", - "print\"The energy corresponding to the 4nd quantum state is E4=\",'%.3E'%E4,\"J\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",'%.3E'%E41,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy corresponding to the 2nd quantum state is E2= 6.031E-18 J\n", - "\t\t\t\t\t\t = 3.769E+01 eV\n", - "The energy corresponding to the 4nd quantum state is E4= 2.412E-17 J\n", - "\t\t\t\t\t\t = 1.508E+02 eV\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.24 , Page no:113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "a=1E-10; #in m (width of the well)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "n1=1; n2=2; n3=3; #ground and first two excited states\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", - "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the Ground state\n", - "E11=E1/e; #changing unit from J to eV\n", - "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 1st excited state\n", - "E21=E2/e; #changing unit from J to eV\n", - "E3=n3**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd excited state\n", - "E31=E3/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The energy corresponding to the ground state is E1=\",'%.3E'%E1,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",'%.3E'%E11,\"eV\";\n", - "print\"The energy corresponding to the 1st excited state is E2=\",'%.3E'%E2,\"\";\n", - "print\"\\t\\t\\t\\t\\t =\",'%.3E'%E21,\"eV\";\n", - "print\"The energy corresponding to the 2nd excited state is E3=\",'%.3E'%E3,\"J\";\n", - "print\"\\t\\t\\t\\t\\t =\",'%.3E'%E31,\"eV\";\n", - "print \" There is slight variation in the answer due to round off error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy corresponding to the ground state is E1= 6.031E-18 J\n", - "\t\t\t\t\t = 3.769E+01 eV\n", - "The energy corresponding to the 1st excited state is E2= 2.412E-17 \n", - "\t\t\t\t\t = 1.508E+02 eV\n", - "The energy corresponding to the 2nd excited state is E3= 5.428E-17 J\n", - "\t\t\t\t\t = 3.392E+02 eV\n", - " There is slight variation in the answer due to round off error\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.25 , Page no:113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "dx=1E-8; #in m (length of box or uncertainty in the position)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "\n", - "#calculate\n", - "#From uncertainty principle dx*dp=h and dp=m*dv\n", - "#therefore we have\n", - "dv=h/(m*dx); #calculation of minimum uncertainty in the velocity\n", - "dv1=dv*1E-3; #changing unit from m/s to Km/s\n", - "\n", - "#result\n", - "print\"The minimum uncertainty in the velocity of electron i dv=\",'%.3E'%dv,\"m/s\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",round(dv1,2),\"Km/s\";\n", - "print \"Note: There is slight variation in the answer due to round off error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum uncertainty in the velocity of electron i dv= 7.281E+04 m/s\n", - "\t\t\t\t\t\t = 72.81 Km/s\n", - "Note: There is slight variation in the answer due to round off error\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.26 , Page no:113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "a=4E-10; #in m (length of the box)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "h=6.626E-34; #in J-s (Planck'c constant)\n", - "n1=1; #ground state\n", - "e=1.6*1E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", - "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the ground state\n", - "E11=E1/e; #changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The minimum energy of electron is E1=\",'%.3E'%E1,\"J (Note: The answer in the book is wrong due to printing error)\";\n", - "print\"\\t\\t\\t\\t =\",round(E11,3),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum energy of electron is E1= 3.769E-19 J (Note: The answer in the book is wrong due to printing error)\n", - "\t\t\t\t = 2.356 eV\n" - ] - } - ], - "prompt_number": 26 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb b/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb deleted file mode 100755 index ff063bb6..00000000 --- a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb +++ /dev/null @@ -1,561 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0c3d2d354976eaba7e5a0f2e0cf4b1fd72cd55b3826ca7e7cd6acde8afff2cdf" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6:Electron Theory and Band Theory of Metals" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1 , Page no:146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=8.5E28; #in 1/m^3 (density of electron)\n", - "m_e=9.11E-31; #in Kg (mass of electron)\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "T=300; #in K (temperature)\n", - "p=1.69E-8; #in ohm-m (resistivity)\n", - "\n", - "#calculate\n", - "lambda1=math.sqrt(3*k*m_e*T)/(n*e**2*p); #calculation of mean free path\n", - "lambda2=lambda1*1E9; #changing unit from m to nanometer\n", - "\n", - "#result\n", - "print\"The mean free path of electron is =\",lambda1,\"m\";\n", - "print\"\\t\\t\\t\\t =\",round(lambda2,2),\"nm\";\n", - "#Note: answer in the book is wrong due to printing mistake" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mean free path of electron is = 2.89250681437e-09 m\n", - "\t\t\t\t = 2.89 nm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.2 , Page no:146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "P_E=1; #in percentage (probability that a state with an energy 0.5 eV above Fermi energy will be occupied)\n", - "E=0.5; #in eV (energy above Fermi level)\n", - "\n", - "#calculate\n", - "P_E=1/100; #changing percentage into ratio\n", - "E=E*e; #changing unit from eV to J\n", - "#P_E=1/(1+exp((E-E_F)/k*T))\n", - "#Rearranging this equation, we get\n", - "#T=(E-E_F)/k*log((1/P_E)-1)\n", - "#Since E-E_F has been denoted by E therefore\n", - "T=E/(k*math.log((1/P_E)-1));\n", - "\n", - "#result\n", - "print\"The temperature is T=\",round(T),\"K\";\n", - "# Note: There is slight variation in the answer due to logarithm function" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The temperature is T= 1262.0 K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3 , Page no:147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=5.8E28; #in 1/m^3 (density of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "p=1.54E-8; #in ohm-m (resistivity)\n", - "\n", - "#calculate\n", - "t=m/(n*e**2*p); #calculation of relaxation time\n", - "\n", - "#result\n", - "print\"The relaxation time of conduction electrons is =\",t,\"sec\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relaxation time of conduction electrons is = 3.97972178683e-14 sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4 , Page no:147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=8.5E28; #in 1/m^3 (density of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "sigma=6E7; #in 1/ohm-m (conductivity)\n", - "E_F=7; #in E=eV (Fermi energy of Copper)\n", - "\n", - "#calculate\n", - "E_F=E_F*e; #changing unit from eV to J\n", - "v_F=math.sqrt(2*E_F/m); #calculation of velocity of electrons\n", - "#Since sigma=n*e^2*lambda/(2*m*v_F)\n", - "#Therefore we have\n", - "lambda1=2*m*v_F*sigma/(n*e**2); #calculation of mean free path\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The velocity of the electrons is v_F=\",v_F,\"m/s (roundoff error)\";\n", - "print\"The mean free path traveled by the electrons is=\",round(lambda2),\"Angstrom\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity of the electrons is v_F= 1568929.08111 m/s (roundoff error)\n", - "The mean free path traveled by the electrons is= 787.0 Angstrom\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5 , Page no:147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=6.5E28; #in 1/m^3 (density of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "p=1.43E-8; #in ohm-m (resistivity)\n", - "\n", - "#calculate\n", - "t=m/(n*e**2*p); #calculation of relaxation time\n", - "\n", - "#result\n", - "print\"The relaxation time of conduction electrons is =\",t,\"sec\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relaxation time of conduction electrons is = 3.8243006993e-14 sec\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6 , Page no:148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=30; #in Celcius (temperature)\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "m_p=1.67E-27; #in Kg (mass of proton)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "T=T+273; #changing temperature from Celcius to Kelvin\n", - "KE=(3/2)*k*T; #calculation of average kinetic energy\n", - "KE1=KE/e; #changing unit from J to eV\n", - "m=1.008*2*m_p; #calculating mass of hydrogen gas molecule\n", - "c=math.sqrt(3*k*T/m); #calculation of velocity\n", - "\n", - "#result\n", - "print\"The average kinetic energy of gas ,molecules is KE=\",KE,\"J\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",KE1,\"eV (Answer is wrong in textbook)\";\n", - "print\"The velocity of molecules is c=\",round(c,2),\"m/s\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average kinetic energy of gas ,molecules is KE= 6.2721e-21 J\n", - "\t\t\t\t\t\t = 0.039200625 eV (Answer is wrong in textbook)\n", - "The velocity of molecules is c= 1930.27 m/s\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7 , Page no:148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E=10; #in eV (kinetic energy for each electron and proton)\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_p=1.67E-27; #in Kg (mass of proton)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "E=E*e; #changing unit from eV to J\n", - "#since E=m*v^2/2\n", - "#therefore v=sqrt(2E/m)\n", - "v_e=math.sqrt(2*E/m_e); #calculation of kinetic energy of electron\n", - "v_p=math.sqrt(2*E/m_p); #calculation of kinetic energy of proton\n", - "\n", - "#result\n", - "print\"The kinetic energy of electron is v_e=\",v_e,\"m/s\";\n", - "print\"The kinetic energy of proton is v_p=\",v_p,\"m/s\";\n", - "print \"Note: Answer is wrong in textbook\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The kinetic energy of electron is v_e= 1875228.92375 m/s\n", - "The kinetic energy of proton is v_p= 43774.0524132 m/s\n", - "Note: Answer is wrong in textbook\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8 , Page no:149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "I=100; #in A (current in the wire)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "A=10; #in mm^2 (cross-sectional area)\n", - "n=8.5E28; #in 1/m^3 (density of electron)\n", - "\n", - "#calculate\n", - "A=A*1E-6; #changing unit from mm^2 to m^2\n", - "v_d=I/(n*A*e);\n", - "\n", - "#result\n", - "print\"The drift velocity of free electrons is v_d=\",v_d,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The drift velocity of free electrons is v_d= 0.000735294117647 m/s\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9 , Page no:149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "I=4;#in A (current in the conductor)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "A=1E-6; #in m^2 (cross-sectional area)\n", - "N_A=6.02E23; #in atoms/gram-atom (Avogadro's number)\n", - "p=8.9; #in g/cm^3 (density)\n", - "M=63.6; #atomic mass of copper\n", - "\n", - "#calculate\n", - "n=N_A*p/M; #Calculation of density of electrons in g/cm^3\n", - "n1=n*1E6; #changing unit from g/cm^3 to g/m^3\n", - "v_d=I/(n1*A*e);\n", - "\n", - "#result\n", - "print\"The density of copper atoms is n=\",n,\"atoms/m^3\";\n", - "print\"\\t\\t\\t =\",n1,\"atoms/m^3\";\n", - "print\"The average drift velocity of free electrons is v_d=\",v_d,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density of copper atoms is n= 8.42421383648e+22 atoms/m^3\n", - "\t\t\t = 8.42421383648e+28 atoms/m^3\n", - "The average drift velocity of free electrons is v_d= 0.000296763596999 m/s\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10 , Page no:149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=9E28; #in 1/m^3 (density of valence electrons)\n", - "sigma=6E7; #in mho/m (conductivity of copper)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since sigma=n*e*mu therefore\n", - "mu=sigma/(n*e); #calculation of mobility of electron\n", - "\n", - "#result\n", - "print\"The mobility of electrons is =\",mu,\"m^2/V-s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility of electrons is = 0.00416666666667 m^2/V-s\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.11 , Page no:150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E_F=5.51; #in eV (Fermi energy in Silver)\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#part-(a)\n", - "Eo=(3/5)*E_F; #calculation of average energy of free electron at 0K\n", - "#part-(b)\n", - "Eo1=Eo*e; #changing unit from eV to J\n", - "#Since for a classical particle E=(3/2)*k*T\n", - "#therefroe we have\n", - "T=(2/3)*Eo1/k; #calculation of temperature for a classical particle (an ideal gas)\n", - "\n", - "#result\n", - "print\"The average energy of free electron at 0K is Eo=\",Eo,\"eV\";\n", - "print\"The temperature at which a classical particle have this much energy is T=\",T,\"K\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average energy of free electron at 0K is Eo= 3.306 eV\n", - "The temperature at which a classical particle have this much energy is T= 25553.6231884 K\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12 , Page no:150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E_F_L=4.7; #in eV (Fermi energy in Lithium)\n", - "E_F_M=2.35; #in eV (Fermi energy in a metal)\n", - "n_L=4.6E28; #in 1/m^3 (density of electron in Lithium)\n", - "\n", - "#calculate\n", - "#Since n=((2*m/h)^3/2)*E_F^(3/2)*(8*pi/3) and all things except E_F are constant\n", - "# Therefore we have n=C*E_F^(3/2) where C is proportionality constant\n", - "#n1/n2=(E_F_1/E_F_2)^(3/2)\n", - "#Therefore we have\n", - "n_M=n_L*(E_F_M/E_F_L); #calculation of electron density for a metal\n", - "\n", - "#result\n", - "print\"The lectron density for a metal is =\",n_M,\"1/m^3\";\n", - "print \"Note: Answer in the book is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lectron density for a metal is = 2.3e+28 1/m^3\n", - "Note: Answer in the book is wrong \n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb b/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb deleted file mode 100755 index d52f3a45..00000000 --- a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb +++ /dev/null @@ -1,561 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3c7e08d83e902e2949e4fdcd2bc98d527fe589fabb9636cea78c35c42abb8038" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6:Electron Theory and Band Theory of Metals" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1 , Page no:146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=8.5E28; #in 1/m^3 (density of electron)\n", - "m_e=9.11E-31; #in Kg (mass of electron)\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "T=300; #in K (temperature)\n", - "p=1.69E-8; #in ohm-m (resistivity)\n", - "\n", - "#calculate\n", - "lambda1=math.sqrt(3*k*m_e*T)/(n*e**2*p); #calculation of mean free path\n", - "lambda2=lambda1*1E9; #changing unit from m to nanometer\n", - "\n", - "#result\n", - "print\"The mean free path of electron is =\",'%.3E'%lambda1,\"m\";\n", - "print\"\\t\\t\\t\\t =\",round(lambda2,2),\"nm\";\n", - "#Note: answer in the book is wrong due to printing mistake" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mean free path of electron is = 2.893E-09 m\n", - "\t\t\t\t = 2.89 nm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.2 , Page no:146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "P_E=1; #in percentage (probability that a state with an energy 0.5 eV above Fermi energy will be occupied)\n", - "E=0.5; #in eV (energy above Fermi level)\n", - "\n", - "#calculate\n", - "P_E=1/100; #changing percentage into ratio\n", - "E=E*e; #changing unit from eV to J\n", - "#P_E=1/(1+exp((E-E_F)/k*T))\n", - "#Rearranging this equation, we get\n", - "#T=(E-E_F)/k*log((1/P_E)-1)\n", - "#Since E-E_F has been denoted by E therefore\n", - "T=E/(k*math.log((1/P_E)-1));\n", - "\n", - "#result\n", - "print\"The temperature is T=\",round(T),\"K\";\n", - "# Note: There is slight variation in the answer due to logarithm function" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The temperature is T= 1262.0 K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3 , Page no:147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=5.8E28; #in 1/m^3 (density of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "p=1.54E-8; #in ohm-m (resistivity)\n", - "\n", - "#calculate\n", - "t=m/(n*e**2*p); #calculation of relaxation time\n", - "\n", - "#result\n", - "print\"The relaxation time of conduction electrons is =\",'%.3E'%t,\"sec\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relaxation time of conduction electrons is = 3.980E-14 sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4 , Page no:147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=8.5E28; #in 1/m^3 (density of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "sigma=6E7; #in 1/ohm-m (conductivity)\n", - "E_F=7; #in E=eV (Fermi energy of Copper)\n", - "\n", - "#calculate\n", - "E_F=E_F*e; #changing unit from eV to J\n", - "v_F=math.sqrt(2*E_F/m); #calculation of velocity of electrons\n", - "#Since sigma=n*e^2*lambda/(2*m*v_F)\n", - "#Therefore we have\n", - "lambda1=2*m*v_F*sigma/(n*e**2); #calculation of mean free path\n", - "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", - "\n", - "#result\n", - "print\"The velocity of the electrons is v_F=\",'%.3E'%v_F,\"m/s (roundoff error)\";\n", - "print\"The mean free path traveled by the electrons is=\",round(lambda2),\"Angstrom\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The velocity of the electrons is v_F= 1.569E+06 m/s (roundoff error)\n", - "The mean free path traveled by the electrons is= 787.0 Angstrom\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5 , Page no:147" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=6.5E28; #in 1/m^3 (density of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "p=1.43E-8; #in ohm-m (resistivity)\n", - "\n", - "#calculate\n", - "t=m/(n*e**2*p); #calculation of relaxation time\n", - "\n", - "#result\n", - "print\"The relaxation time of conduction electrons is =\",'%.3E'%t,\"sec\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relaxation time of conduction electrons is = 3.824E-14 sec\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6 , Page no:148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=30; #in Celcius (temperature)\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "m_p=1.67E-27; #in Kg (mass of proton)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "T=T+273; #changing temperature from Celcius to Kelvin\n", - "KE=(3/2)*k*T; #calculation of average kinetic energy\n", - "KE1=KE/e; #changing unit from J to eV\n", - "m=1.008*2*m_p; #calculating mass of hydrogen gas molecule\n", - "c=math.sqrt(3*k*T/m); #calculation of velocity\n", - "\n", - "#result\n", - "print\"The average kinetic energy of gas ,molecules is KE=\",'%.3E'%KE,\"J\";\n", - "print\"\\t\\t\\t\\t\\t\\t =\",round(KE1,4),\"eV (Answer is wrong in textbook)\";\n", - "print\"The velocity of molecules is c=\",round(c,2),\"m/s\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average kinetic energy of gas ,molecules is KE= 6.272E-21 J\n", - "\t\t\t\t\t\t = 0.0392 eV (Answer is wrong in textbook)\n", - "The velocity of molecules is c= 1930.27 m/s\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7 , Page no:148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E=10; #in eV (kinetic energy for each electron and proton)\n", - "m_e=9.1E-31; #in Kg (mass of electron)\n", - "m_p=1.67E-27; #in Kg (mass of proton)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "E=E*e; #changing unit from eV to J\n", - "#since E=m*v^2/2\n", - "#therefore v=sqrt(2E/m)\n", - "v_e=math.sqrt(2*E/m_e); #calculation of kinetic energy of electron\n", - "v_p=math.sqrt(2*E/m_p); #calculation of kinetic energy of proton\n", - "\n", - "#result\n", - "print\"The kinetic energy of electron is v_e=\",'%.3E'%v_e,\"m/s\";\n", - "print\"The kinetic energy of proton is v_p=\",'%.3E'%v_p,\"m/s\";\n", - "print \"Note: Answer is wrong in textbook\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The kinetic energy of electron is v_e= 1.875E+06 m/s\n", - "The kinetic energy of proton is v_p= 4.377E+04 m/s\n", - "Note: Answer is wrong in textbook\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8 , Page no:149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "I=100; #in A (current in the wire)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "A=10; #in mm^2 (cross-sectional area)\n", - "n=8.5E28; #in 1/m^3 (density of electron)\n", - "\n", - "#calculate\n", - "A=A*1E-6; #changing unit from mm^2 to m^2\n", - "v_d=I/(n*A*e);\n", - "\n", - "#result\n", - "print\"The drift velocity of free electrons is v_d=\",'%.3E'%v_d,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The drift velocity of free electrons is v_d= 7.353E-04 m/s\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9 , Page no:149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "I=4;#in A (current in the conductor)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "A=1E-6; #in m^2 (cross-sectional area)\n", - "N_A=6.02E23; #in atoms/gram-atom (Avogadro's number)\n", - "p=8.9; #in g/cm^3 (density)\n", - "M=63.6; #atomic mass of copper\n", - "\n", - "#calculate\n", - "n=N_A*p/M; #Calculation of density of electrons in g/cm^3\n", - "n1=n*1E6; #changing unit from g/cm^3 to g/m^3\n", - "v_d=I/(n1*A*e);\n", - "\n", - "#result\n", - "print\"The density of copper atoms is n=\",'%.3E'%n,\"atoms/m^3\";\n", - "print\"\\t\\t\\t =\",'%.3E'%n1,\"atoms/m^3\";\n", - "print\"The average drift velocity of free electrons is v_d=\",'%.3E'%v_d,\"m/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density of copper atoms is n= 8.424E+22 atoms/m^3\n", - "\t\t\t = 8.424E+28 atoms/m^3\n", - "The average drift velocity of free electrons is v_d= 2.968E-04 m/s\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10 , Page no:149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=9E28; #in 1/m^3 (density of valence electrons)\n", - "sigma=6E7; #in mho/m (conductivity of copper)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#Since sigma=n*e*mu therefore\n", - "mu=sigma/(n*e); #calculation of mobility of electron\n", - "\n", - "#result\n", - "print\"The mobility of electrons is =\",'%.3E'%mu,\"m^2/V-s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility of electrons is = 4.167E-03 m^2/V-s\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.11 , Page no:150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E_F=5.51; #in eV (Fermi energy in Silver)\n", - "k=1.38E-23; #in J/K (Boltzmann's constant)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#part-(a)\n", - "Eo=(3/5)*E_F; #calculation of average energy of free electron at 0K\n", - "#part-(b)\n", - "Eo1=Eo*e; #changing unit from eV to J\n", - "#Since for a classical particle E=(3/2)*k*T\n", - "#therefroe we have\n", - "T=(2/3)*Eo1/k; #calculation of temperature for a classical particle (an ideal gas)\n", - "\n", - "#result\n", - "print\"The average energy of free electron at 0K is Eo=\",Eo,\"eV\";\n", - "print\"The temperature at which a classical particle have this much energy is T=\",'%.3E'%T,\"K\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average energy of free electron at 0K is Eo= 3.306 eV\n", - "The temperature at which a classical particle have this much energy is T= 2.555E+04 K\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12 , Page no:150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "E_F_L=4.7; #in eV (Fermi energy in Lithium)\n", - "E_F_M=2.35; #in eV (Fermi energy in a metal)\n", - "n_L=4.6E28; #in 1/m^3 (density of electron in Lithium)\n", - "\n", - "#calculate\n", - "#Since n=((2*m/h)^3/2)*E_F^(3/2)*(8*pi/3) and all things except E_F are constant\n", - "# Therefore we have n=C*E_F^(3/2) where C is proportionality constant\n", - "#n1/n2=(E_F_1/E_F_2)^(3/2)\n", - "#Therefore we have\n", - "n_M=n_L*(E_F_M/E_F_L); #calculation of electron density for a metal\n", - "\n", - "#result\n", - "print\"The lectron density for a metal is =\",n_M,\"1/m^3\";\n", - "print \"Note: Answer in the book is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The lectron density for a metal is = 2.3e+28 1/m^3\n", - "Note: Answer in the book is wrong \n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_07_Dielectric_Properties.ipynb b/Applied_Physics/Chapter_07_Dielectric_Properties.ipynb deleted file mode 100755 index 7280033d..00000000 --- a/Applied_Physics/Chapter_07_Dielectric_Properties.ipynb +++ /dev/null @@ -1,488 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:5117f9d565431f3f25738652845b14f8a6fa036b5c0992b0b2e5d69631937306" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7:Dielectric Properties" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1 , Page no:187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "A=100; #in cm^2 (cross-sectional area)\n", - "d=1; #in cm (seperation between plates)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "V=100; #in V (potential difference)\n", - "\n", - "#calculate\n", - "A1=A*1E-4; #changing unit from cm^2 to m^2\n", - "d1=d*1E-2; #changing unit from cm to m\n", - "C=Eo*A1/d1; #calculation of capacitance\n", - "Q=C*V; #calculation of charge\n", - "C1=C*1E12; #changing unit of capacitance from F to pF\n", - "\n", - "#result\n", - "print\"The capacitance of capacitor is C=\",C,\"C\";\n", - "print\"\\t\\t\\t\\t =\",C1,\"C\";\n", - "print\"The charge on the plates is Q=\",Q,\"C\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The capacitance of capacitor is C= 8.85e-12 C\n", - "\t\t\t\t = 8.85 C\n", - "The charge on the plates is Q= 8.85e-10 C\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2 , Page no:187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "A=650; #in mm^2 (cross-sectional area)\n", - "d=4; #in mm (seperation between plates)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "Er=3.5; #di-electric constant of the material\n", - "Q=2E-10; #in C (charge on plates)\n", - "\n", - "#calculate\n", - "A1=A*1E-6; #changing unit from mm^2 to m^2\n", - "d1=d*1E-3; #changing unit from mm to m\n", - "C=Er*Eo*A1/d1; #calculation of capacitance\n", - "V=Q/C; #calculation of charge\n", - "C1=C*1E12; #changing unit of capacitance from F to pF\n", - "\n", - "#result\n", - "print\"The capacitance of capacitor is C=\",C,\"C\",\n", - "print\"\\n\\t\\t\\t =\",C1,\"pF\";\n", - "print\"The resultant voltage across the capacitor is V=\",round(V,3),\"V\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The capacitance of capacitor is C= 5.0334375e-12 C \n", - "\t\t\t = 5.0334375 pF\n", - "The resultant voltage across the capacitor is V= 39.734 V\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3 , Page no:188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=2.7E25; #in 1/m^3 (density of atoms)\n", - "E=1E6; #in V/m (electric field)\n", - "Z=2; #atomic number of Helium \n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "Er=1.0000684; #(dielectric constant of the material)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "#since alpha=Eo*(Er-1)/N=4*pi*Eo*r_0^3 \n", - "#Therefore we have r_0^3=(Er-1)/(4*pi*N)\n", - "r_0=((Er-1)/(4*pi*N))**(1/3); #calculation of radius of electron cloud\n", - "x=4*pi*Eo*E*r_0/(Z*e); #calculation of dispalcement\n", - "\n", - "#result\n", - "print\"The radius of electron cloud is r_0=\",r_0,\"m\";\n", - "print\"The displacement is x=\",x,\"m\";\n", - "print \"NOTE: The answer in the textbook is wrong\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The radius of electron cloud is r_0= 5.86454377988e-11 m\n", - "The displacement is x= 20371.2258874 m\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4 , Page no:188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=1.000134; #di-elecrtic constant of the neon gas at NTP\n", - "E=90000; #in V/m (electric field)\n", - "Eo=8.85E-12; #in C/N-m^2 (absolute premittivity)\n", - "N_A=6.023E26; #in atoms/Kg-mole (Avogadro's number)\n", - "V=22.4; #in m^3 (volume of gas at NTP\n", - "\n", - "#calculate\n", - "n=N_A/V; #calculaton of density of atoms\n", - "#Since P=n*p=(k-1)*Eo*E\n", - "#therefore we have\n", - "p=(K-1)*Eo*E/n; #calculation of dipole moment induced\n", - "alpha=p/E; #calculation of atomic polarisability\n", - "\n", - "#result\n", - "print\"The dipole moment induced in each atom is p=\",p,\"C-m\";\n", - "print\"The atomic polarisability of neon is =\",alpha,\"c-m^2/V\";\n", - "print \"NOTE: The answer in the textbook is wrong\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dipole moment induced in each atom is p= 3.96940793625e-36 C-m\n", - "The atomic polarisability of neon is = 4.4104532625e-41 c-m^2/V\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5 , Page no:189" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Er=3.75; #di-elecrtic constant of sulphur at 27 degree Celcius\n", - "gama=1/3; #internal field constant\n", - "p=2050; #in Kg/m^3 (density)\n", - "M_A=32; #in amu (atomic weight of sulphur)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "N=6.022E23; #Avogadro's number\n", - "\n", - "#calculate\n", - "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n", - "#therefore we have\n", - "alpha_e=((Er-1)/(Er+2))*(M_A/p)*(3*Eo/N); #calculation of electronic polarisability of sulphur\n", - "\n", - "#result\n", - "print\"The electronic polarisability of sulphur is =\",alpha_e,\"Fm^2 (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electronic polarisability of sulphur is = 3.29143088985e-37 Fm^2 (roundoff error)\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.6 , Page no:189" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Er=1.0000684; #di-elecrtic constant of Helium gas at NTP\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "N=2.7E25; #number of atomsper unit volume\n", - "\n", - "#calculate\n", - "#Since Er-1=(N/Eo)*alpha_e\n", - "#therefore we have\n", - "alpha_e=Eo*(Er-1)/N; #calculation of electronic polarisability of Helium\n", - "\n", - "#result\n", - "print\"The electronic polarisability of Helium gas is =\",alpha_e,\"Fm^2 (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electronic polarisability of Helium gas is = 2.242e-41 Fm^2 (roundoff error)\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.7 , Page no:190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=3E28; #in atoms/m^3 (density of atoms)\n", - "alpha_e=1E-40; #in F-m^2 (electronic polarisability)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "\n", - "#calculate\n", - "#Since (Er-1)/(Er+2)=N*alpha_e/(3*Eo)\n", - "#therefore we have\n", - "Er=(2*(N*alpha_e/(3*Eo))+1)/(1-(N*alpha_e/(3*Eo)));\n", - "#calculation of dielectric constant of the material\n", - "\n", - "#result\n", - "print\"The dielectric constant of the material is Er=\",Er,\"F/m\",\n", - "print \"NOTE: The answer in the book is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dielectric constant of the material is Er= 1.3821656051 F/m NOTE: The answer in the book is wrong \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.8 , Page no:190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Er=4; #relative permittivity of sulphur\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "NA=2.08E3; #in Kg/m^3 (density of atoms in sulphur)\n", - "\n", - "#calculate\n", - "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n", - "#therefore we have\n", - "alpha_e=((Er-1)/(Er+2))*(3*Eo/NA); #calculation of electronic polarisability of sulphur\n", - "\n", - "#result\n", - "print\"The electronic polarisability of sulphur is =\",alpha_e,\"Fm^2\";\n", - "print \"NOTE: The answer in the book is wrong and they used the wrong formula \" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electronic polarisability of sulphur is = 6.38221153846e-15 Fm^2\n", - "NOTE: The answer in the book is wrong and they used the wrong formula \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.9 , Page no:190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "alpha1=2.5E-39; #in C^2-m/N (dielectric constant at 300K)\n", - "alpha2=2.0E-39; #in C^2-m/N (dielectric constant at 400K)\n", - "T1=300; #in K(first temperature)\n", - "T2=400; #in K(second temperature)\n", - "\n", - "#calculate\n", - "#since alpha=alpha_d+alpha0 and alpha0=Beta/T\n", - "#therefore alpha=alpha_d+(Beta/T)\n", - "#since alpha1=alpha_d+(Beta/T1) and alpha2=alpha_d+(Beta/T2)\n", - "#therefore alpha1-apha2=Beta*((1/T1)-(1/T2))\n", - "#or Beta= (alpha1-apha2)/ ((1/T1)-(1/T2))\n", - "Beta= (alpha1-alpha2)/ ((1/T1)-(1/T2)); #calculation of Beta\n", - "alpha_d=alpha1-(Beta/T1); #calculation of polarisability due to defromation\n", - "alpha0_1=Beta/T1; #calculation of polarisability due to permanent dipole moment at 300K\n", - "alpha0_2=Beta/T2; #calculation of polarisability due to permanent dipole moment at 400K\n", - "\n", - "#result\n", - "print\"The polarisability due to permanent dipole moment at 300K is =\",alpha0_1,\"C^2-m/N\";\n", - "print\"The polarisability due to permanent dipole moment at 400K is =\",alpha0_2,\"C^2-m/N\";\n", - "print\"The polarisability due to deformation of the molecules is =\",alpha_d,\"C^2-m/N\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The polarisability due to permanent dipole moment at 300K is = 2e-39 C^2-m/N\n", - "The polarisability due to permanent dipole moment at 400K is = 1.5e-39 C^2-m/N\n", - "The polarisability due to deformation of the molecules is = 5e-40 C^2-m/N\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.10 , Page no:191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=1.5; #refractive index\n", - "Er=5.6; #dielectric constant\n", - "\n", - "#calculate\n", - "#since (Er-1)/(Er+2)=N*(alpha_e+alpha_i)/(3*E0) Clausius-Mossotti equation\n", - "#and (n^2-1)/(n^2+2)=N*alpha_e/(3*E0) \n", - "#from above two equations, we get ((n^2-1)/(n^2+2))*((Er+2)/(Er-1))=alpha_e/(alpha_e+alpha_i)\n", - "#or alpha_i/ (alpha_e+alpha_i)= 1-((n^2-1)/(n^2+2))*((Er+2)/(Er-1))= (say P)\n", - "#where P is fractional ionisational polarisability\n", - "P=1-((n**2-1)/(n**2+2))*((Er+2)/(Er-1)); #calculation of fractional ionisational polarisability\n", - "P1=P*100; #calculation of percentage of ionisational polarisability\n", - "\n", - "#result\n", - "print\"The percentage of ionisational polarisability is =\",P1,\"percent\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The percentage of ionisational polarisability is = 51.4066496164 percent\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_07_Dielectric_Properties_1.ipynb b/Applied_Physics/Chapter_07_Dielectric_Properties_1.ipynb deleted file mode 100755 index 85a277ef..00000000 --- a/Applied_Physics/Chapter_07_Dielectric_Properties_1.ipynb +++ /dev/null @@ -1,488 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d363aa85787801a09c4a4d5d3e8dc3b5551836ae64a0a0c025744f99f230a4b4" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7:Dielectric Properties" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1 , Page no:187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "A=100; #in cm^2 (cross-sectional area)\n", - "d=1; #in cm (seperation between plates)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "V=100; #in V (potential difference)\n", - "\n", - "#calculate\n", - "A1=A*1E-4; #changing unit from cm^2 to m^2\n", - "d1=d*1E-2; #changing unit from cm to m\n", - "C=Eo*A1/d1; #calculation of capacitance\n", - "Q=C*V; #calculation of charge\n", - "C1=C*1E12; #changing unit of capacitance from F to pF\n", - "\n", - "#result\n", - "print\"The capacitance of capacitor is C=\",C,\"C\";\n", - "print\"\\t\\t\\t\\t =\",C1,\"C\";\n", - "print\"The charge on the plates is Q=\",Q,\"C\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The capacitance of capacitor is C= 8.85e-12 C\n", - "\t\t\t\t = 8.85 C\n", - "The charge on the plates is Q= 8.85e-10 C\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2 , Page no:187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "A=650; #in mm^2 (cross-sectional area)\n", - "d=4; #in mm (seperation between plates)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "Er=3.5; #di-electric constant of the material\n", - "Q=2E-10; #in C (charge on plates)\n", - "\n", - "#calculate\n", - "A1=A*1E-6; #changing unit from mm^2 to m^2\n", - "d1=d*1E-3; #changing unit from mm to m\n", - "C=Er*Eo*A1/d1; #calculation of capacitance\n", - "V=Q/C; #calculation of charge\n", - "C1=C*1E12; #changing unit of capacitance from F to pF\n", - "\n", - "#result\n", - "print\"The capacitance of capacitor is C=\",'%.3E'%C,\"C\",\n", - "print\"\\n\\t\\t\\t =\",round(C1,2),\"pF\";\n", - "print\"The resultant voltage across the capacitor is V=\",round(V,2),\"V\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The capacitance of capacitor is C= 5.033E-12 C \n", - "\t\t\t = 5.03 pF\n", - "The resultant voltage across the capacitor is V= 39.73 V\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3 , Page no:188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=2.7E25; #in 1/m^3 (density of atoms)\n", - "E=1E6; #in V/m (electric field)\n", - "Z=2; #atomic number of Helium \n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "Er=1.0000684; #(dielectric constant of the material)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "#since alpha=Eo*(Er-1)/N=4*pi*Eo*r_0^3 \n", - "#Therefore we have r_0^3=(Er-1)/(4*pi*N)\n", - "r_0=((Er-1)/(4*pi*N))**(1/3); #calculation of radius of electron cloud\n", - "x=4*pi*Eo*E*r_0/(Z*e); #calculation of dispalcement\n", - "\n", - "#result\n", - "print\"The radius of electron cloud is r_0=\",'%.3E'%r_0,\"m\";\n", - "print\"The displacement is x=\",'%.3E'%x,\"m\";\n", - "print \"NOTE: The answer in the textbook is wrong\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The radius of electron cloud is r_0= 5.865E-11 m\n", - "The displacement is x= 2.037E+04 m\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4 , Page no:188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "K=1.000134; #di-elecrtic constant of the neon gas at NTP\n", - "E=90000; #in V/m (electric field)\n", - "Eo=8.85E-12; #in C/N-m^2 (absolute premittivity)\n", - "N_A=6.023E26; #in atoms/Kg-mole (Avogadro's number)\n", - "V=22.4; #in m^3 (volume of gas at NTP\n", - "\n", - "#calculate\n", - "n=N_A/V; #calculaton of density of atoms\n", - "#Since P=n*p=(k-1)*Eo*E\n", - "#therefore we have\n", - "p=(K-1)*Eo*E/n; #calculation of dipole moment induced\n", - "alpha=p/E; #calculation of atomic polarisability\n", - "\n", - "#result\n", - "print\"The dipole moment induced in each atom is p=\",'%.3E'%p,\"C-m\";\n", - "print\"The atomic polarisability of neon is =\",'%.3E'%alpha,\"c-m^2/V\";\n", - "print \"NOTE: The answer in the textbook is wrong\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dipole moment induced in each atom is p= 3.969E-36 C-m\n", - "The atomic polarisability of neon is = 4.410E-41 c-m^2/V\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5 , Page no:189" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Er=3.75; #di-elecrtic constant of sulphur at 27 degree Celcius\n", - "gama=1/3; #internal field constant\n", - "p=2050; #in Kg/m^3 (density)\n", - "M_A=32; #in amu (atomic weight of sulphur)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "N=6.022E23; #Avogadro's number\n", - "\n", - "#calculate\n", - "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n", - "#therefore we have\n", - "alpha_e=((Er-1)/(Er+2))*(M_A/p)*(3*Eo/N); #calculation of electronic polarisability of sulphur\n", - "\n", - "#result\n", - "print\"The electronic polarisability of sulphur is =\",'%.3E'%alpha_e,\"Fm^2 (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electronic polarisability of sulphur is = 3.291E-37 Fm^2 (roundoff error)\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.6 , Page no:189" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Er=1.0000684; #di-elecrtic constant of Helium gas at NTP\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "N=2.7E25; #number of atomsper unit volume\n", - "\n", - "#calculate\n", - "#Since Er-1=(N/Eo)*alpha_e\n", - "#therefore we have\n", - "alpha_e=Eo*(Er-1)/N; #calculation of electronic polarisability of Helium\n", - "\n", - "#result\n", - "print\"The electronic polarisability of Helium gas is =\",'%.3E'%alpha_e,\"Fm^2 (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electronic polarisability of Helium gas is = 2.242E-41 Fm^2 (roundoff error)\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.7 , Page no:190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "N=3E28; #in atoms/m^3 (density of atoms)\n", - "alpha_e=1E-40; #in F-m^2 (electronic polarisability)\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "\n", - "#calculate\n", - "#Since (Er-1)/(Er+2)=N*alpha_e/(3*Eo)\n", - "#therefore we have\n", - "Er=(2*(N*alpha_e/(3*Eo))+1)/(1-(N*alpha_e/(3*Eo)));\n", - "#calculation of dielectric constant of the material\n", - "\n", - "#result\n", - "print\"The dielectric constant of the material is Er=\",'%.3E'%Er,\"F/m\",\n", - "print \"NOTE: The answer in the book is wrong \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dielectric constant of the material is Er= 1.382E+00 F/m NOTE: The answer in the book is wrong \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.8 , Page no:190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Er=4; #relative permittivity of sulphur\n", - "Eo=8.85E-12; #in F/m (absolute permittivity)\n", - "NA=2.08E3; #in Kg/m^3 (density of atoms in sulphur)\n", - "\n", - "#calculate\n", - "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n", - "#therefore we have\n", - "alpha_e=((Er-1)/(Er+2))*(3*Eo/NA); #calculation of electronic polarisability of sulphur\n", - "\n", - "#result\n", - "print\"The electronic polarisability of sulphur is =\",'%.3E'%alpha_e,\"Fm^2\";\n", - "print \"NOTE: The answer in the book is wrong and they used the wrong formula \" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electronic polarisability of sulphur is = 6.382E-15 Fm^2\n", - "NOTE: The answer in the book is wrong and they used the wrong formula \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.9 , Page no:190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "alpha1=2.5E-39; #in C^2-m/N (dielectric constant at 300K)\n", - "alpha2=2.0E-39; #in C^2-m/N (dielectric constant at 400K)\n", - "T1=300; #in K(first temperature)\n", - "T2=400; #in K(second temperature)\n", - "\n", - "#calculate\n", - "#since alpha=alpha_d+alpha0 and alpha0=Beta/T\n", - "#therefore alpha=alpha_d+(Beta/T)\n", - "#since alpha1=alpha_d+(Beta/T1) and alpha2=alpha_d+(Beta/T2)\n", - "#therefore alpha1-apha2=Beta*((1/T1)-(1/T2))\n", - "#or Beta= (alpha1-apha2)/ ((1/T1)-(1/T2))\n", - "Beta= (alpha1-alpha2)/ ((1/T1)-(1/T2)); #calculation of Beta\n", - "alpha_d=alpha1-(Beta/T1); #calculation of polarisability due to defromation\n", - "alpha0_1=Beta/T1; #calculation of polarisability due to permanent dipole moment at 300K\n", - "alpha0_2=Beta/T2; #calculation of polarisability due to permanent dipole moment at 400K\n", - "\n", - "#result\n", - "print\"The polarisability due to permanent dipole moment at 300K is =\",'%.3E'%alpha0_1,\"C^2-m/N\";\n", - "print\"The polarisability due to permanent dipole moment at 400K is =\",'%.3E'%alpha0_2,\"C^2-m/N\";\n", - "print\"The polarisability due to deformation of the molecules is =\",'%.3E'%alpha_d,\"C^2-m/N\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The polarisability due to permanent dipole moment at 300K is = 2.000E-39 C^2-m/N\n", - "The polarisability due to permanent dipole moment at 400K is = 1.500E-39 C^2-m/N\n", - "The polarisability due to deformation of the molecules is = 5.000E-40 C^2-m/N\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.10 , Page no:191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "n=1.5; #refractive index\n", - "Er=5.6; #dielectric constant\n", - "\n", - "#calculate\n", - "#since (Er-1)/(Er+2)=N*(alpha_e+alpha_i)/(3*E0) Clausius-Mossotti equation\n", - "#and (n^2-1)/(n^2+2)=N*alpha_e/(3*E0) \n", - "#from above two equations, we get ((n^2-1)/(n^2+2))*((Er+2)/(Er-1))=alpha_e/(alpha_e+alpha_i)\n", - "#or alpha_i/ (alpha_e+alpha_i)= 1-((n^2-1)/(n^2+2))*((Er+2)/(Er-1))= (say P)\n", - "#where P is fractional ionisational polarisability\n", - "P=1-((n**2-1)/(n**2+2))*((Er+2)/(Er-1)); #calculation of fractional ionisational polarisability\n", - "P1=P*100; #calculation of percentage of ionisational polarisability\n", - "\n", - "#result\n", - "print\"The percentage of ionisational polarisability is =\",round(P1,1),\"percent\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The percentage of ionisational polarisability is = 51.4 percent\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_08_Magnetic_Properties.ipynb b/Applied_Physics/Chapter_08_Magnetic_Properties.ipynb deleted file mode 100755 index 353fc099..00000000 --- a/Applied_Physics/Chapter_08_Magnetic_Properties.ipynb +++ /dev/null @@ -1,323 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:aecad4e644a378cab0352aa29e9045a53c52646739e4f4bd6cdff80f1d0741e6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8:Magnetic Properties" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "X=-0.5E-5; #magnetic susceptibility of silicon\n", - "H=0.9E4; #in A/m (magnetic field intensity)\n", - "mu0=4*3.14*1E-7; #in H/m (absolute permeability)\n", - "\n", - "#calculate\n", - "I=X*H; #calculation of intensity of magnetism\n", - "B=mu0*H*(1+X); #calculation of magnetic flux density\n", - "\n", - "#result\n", - "print\"The intensity of magnetism is I=\",I,\"A/m\";\n", - "print\"The magnetic flux density is B=\",round(B,3),\"Wb/m^2\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intensity of magnetism is I= -0.045 A/m\n", - "The magnetic flux density is B= 0.011 Wb/m^2\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r=0.052; #in nm (radius of orbit)\n", - "B=1; #in Wb/m^2 (magnetic field of induction)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "\n", - "#calculate\n", - "r=0.052*1E-9; #changing unit from nm to m\n", - "d_mu=(e**2*r**2*B)/(4*m); #calculation of change in magnetic moment\n", - "\n", - "#result\n", - "print\"The change in magnetic moment is =\",d_mu,\"Am^2\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The change in magnetic moment is = 1.90171428571e-29 Am^2\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "H=220; #in A/m (magnetic field intensity)\n", - "I=3300; #in A/m (intensity of magnetisation)\n", - "\n", - "#calculate\n", - "mu_r=1+(I/H); #calculation of relative permeability\n", - "\n", - "#result\n", - "print\"The relative permeability of a ferromagentic material is =\",mu_r;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relative permeability of a ferromagentic material is = 16.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "I=3000; #in A/m (intensity of magnetisation)\n", - "B=0.005; #in Wb/m^2 (magnetic flus intensity)\n", - "pi=3.14; #value of pi used in the solution\n", - "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n", - "\n", - "#calculate\n", - "H=(B/mu0)-I; #calculation of magnetic force\n", - "mu_r=(I/H)+1; #calculation of relative permeability\n", - "\n", - "#result\n", - "print\"The magnetic force is H=\",H;\n", - "print\"The relative permeability is =\",mu_r;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnetic force is H= 980.891719745\n", - "The relative permeability is = 4.05844155844\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5 , Page no:237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "H=4E3; #in A/m (magnetic field intensity)\n", - "N=60; #number of turns\n", - "l=12; #in cm (length of solenoid)\n", - "\n", - "#calculate\n", - "n=N/(l*1E-2); #calculation of number of turns per unit metre\n", - "#Snice H=n*i;\n", - "i=H/n; #calculation of current through the solenoid\n", - "\n", - "#result\n", - "print\"The current through the solenoid is i=\",i,\"A\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current through the solenoid is i= 8.0 A\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6 , Page no:237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "l=30; #in cm (length of solenoid)\n", - "A=1; #in cm^2 (cross-sectional area)\n", - "N=300; #number of turns\n", - "i=0.032; #in A (current through the winding)\n", - "phi_B=2E-6; #in Wb (magnetic flux)\n", - "pi=3.14; #value of pi used in the solution\n", - "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n", - "\n", - "#calculate\n", - "l=l*1E-2; #changing unit from cm to m\n", - "A=A*1E-4; #changing unit from cm^2 to m^2\n", - "B=phi_B/A; #calculation of flux density\n", - "H=N*i/l; #calculation of magnetic intensity\n", - "mu=B/H; #calcluation of absolute permeability of iron\n", - "mu_r=mu/mu0; #calcluation of relative permeability of iron\n", - "\n", - "#result\n", - "print\"The flux density is B=\",B,\"Wb/m^2\";\n", - "print\"The magnetic intensity is H=\",H,\"A-turns/m\";\n", - "print\"The relative permeability of iron is =\",round(mu_r),\" (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The flux density is B= 0.02 Wb/m^2\n", - "The magnetic intensity is H= 32.0 A-turns/m\n", - "The relative permeability of iron is = 498.0 (roundoff error)\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7 , Page no:238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "A=100; #in m^2 (area of Hysteresis loop)\n", - "B=0.01; #in Wb/m^2 (unit space along vertical axis or magnetic flux density)\n", - "H=40; #in A/m (unit space along horizontal axis or magnetic fild ntensity)\n", - "\n", - "#calculate\n", - "H_L=A*B*H; #calculation of magnetic intensity\n", - "\n", - "#result\n", - "print\"The Hystersis loss per cycle is =\",round(H_L),\"J/m^2\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Hystersis loss per cycle is = 40.0 J/m^2\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_08_Magnetic_Properties_1.ipynb b/Applied_Physics/Chapter_08_Magnetic_Properties_1.ipynb deleted file mode 100755 index b2a8def3..00000000 --- a/Applied_Physics/Chapter_08_Magnetic_Properties_1.ipynb +++ /dev/null @@ -1,323 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:708d3f2a9798f4d28f6ce90536d50509c591ba2ba31051121346b4739b2aea82" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8:Magnetic Properties" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "X=-0.5E-5; #magnetic susceptibility of silicon\n", - "H=0.9E4; #in A/m (magnetic field intensity)\n", - "mu0=4*3.14*1E-7; #in H/m (absolute permeability)\n", - "\n", - "#calculate\n", - "I=X*H; #calculation of intensity of magnetism\n", - "B=mu0*H*(1+X); #calculation of magnetic flux density\n", - "\n", - "#result\n", - "print\"The intensity of magnetism is I=\",I,\"A/m\";\n", - "print\"The magnetic flux density is B=\",round(B,3),\"Wb/m^2\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intensity of magnetism is I= -0.045 A/m\n", - "The magnetic flux density is B= 0.011 Wb/m^2\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r=0.052; #in nm (radius of orbit)\n", - "B=1; #in Wb/m^2 (magnetic field of induction)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "\n", - "#calculate\n", - "r=0.052*1E-9; #changing unit from nm to m\n", - "d_mu=(e**2*r**2*B)/(4*m); #calculation of change in magnetic moment\n", - "\n", - "#result\n", - "print\"The change in magnetic moment is =\",'%.3E'%d_mu,\"Am^2\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The change in magnetic moment is = 1.902E-29 Am^2\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "H=220; #in A/m (magnetic field intensity)\n", - "I=3300; #in A/m (intensity of magnetisation)\n", - "\n", - "#calculate\n", - "mu_r=1+(I/H); #calculation of relative permeability\n", - "\n", - "#result\n", - "print\"The relative permeability of a ferromagentic material is =\",mu_r;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relative permeability of a ferromagentic material is = 16.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4 , Page no:236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "I=3000; #in A/m (intensity of magnetisation)\n", - "B=0.005; #in Wb/m^2 (magnetic flus intensity)\n", - "pi=3.14; #value of pi used in the solution\n", - "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n", - "\n", - "#calculate\n", - "H=(B/mu0)-I; #calculation of magnetic force\n", - "mu_r=(I/H)+1; #calculation of relative permeability\n", - "\n", - "#result\n", - "print\"The magnetic force is H=\",round(H,3);\n", - "print\"The relative permeability is =\",round(mu_r,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnetic force is H= 980.892\n", - "The relative permeability is = 4.058\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5 , Page no:237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "H=4E3; #in A/m (magnetic field intensity)\n", - "N=60; #number of turns\n", - "l=12; #in cm (length of solenoid)\n", - "\n", - "#calculate\n", - "n=N/(l*1E-2); #calculation of number of turns per unit metre\n", - "#Snice H=n*i;\n", - "i=H/n; #calculation of current through the solenoid\n", - "\n", - "#result\n", - "print\"The current through the solenoid is i=\",i,\"A\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current through the solenoid is i= 8.0 A\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6 , Page no:237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "l=30; #in cm (length of solenoid)\n", - "A=1; #in cm^2 (cross-sectional area)\n", - "N=300; #number of turns\n", - "i=0.032; #in A (current through the winding)\n", - "phi_B=2E-6; #in Wb (magnetic flux)\n", - "pi=3.14; #value of pi used in the solution\n", - "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n", - "\n", - "#calculate\n", - "l=l*1E-2; #changing unit from cm to m\n", - "A=A*1E-4; #changing unit from cm^2 to m^2\n", - "B=phi_B/A; #calculation of flux density\n", - "H=N*i/l; #calculation of magnetic intensity\n", - "mu=B/H; #calcluation of absolute permeability of iron\n", - "mu_r=mu/mu0; #calcluation of relative permeability of iron\n", - "\n", - "#result\n", - "print\"The flux density is B=\",B,\"Wb/m^2\";\n", - "print\"The magnetic intensity is H=\",H,\"A-turns/m\";\n", - "print\"The relative permeability of iron is =\",round(mu_r),\" (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The flux density is B= 0.02 Wb/m^2\n", - "The magnetic intensity is H= 32.0 A-turns/m\n", - "The relative permeability of iron is = 498.0 (roundoff error)\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7 , Page no:238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "A=100; #in m^2 (area of Hysteresis loop)\n", - "B=0.01; #in Wb/m^2 (unit space along vertical axis or magnetic flux density)\n", - "H=40; #in A/m (unit space along horizontal axis or magnetic fild ntensity)\n", - "\n", - "#calculate\n", - "H_L=A*B*H; #calculation of magnetic intensity\n", - "\n", - "#result\n", - "print\"The Hystersis loss per cycle is =\",round(H_L),\"J/m^2\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Hystersis loss per cycle is = 40.0 J/m^2\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_09_Semiconductors.ipynb b/Applied_Physics/Chapter_09_Semiconductors.ipynb deleted file mode 100755 index f3c26825..00000000 --- a/Applied_Physics/Chapter_09_Semiconductors.ipynb +++ /dev/null @@ -1,782 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:eb4f284d8d12c103b674cc454947abe9c7a1a76e2d11836f2841ba55d4adeef7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9:Semiconductors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2 , Page no:272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Eg=0.67; #in eV (Energy band gap)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=298; #in K (room temperature)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "K=10; #ratio of number of electrons at different temperature\n", - "\n", - "#calculate\n", - "Eg=Eg*e; #changing unit from eV to Joule\n", - "#since ne=Ke*exp(-Eg/(2*k*T))\n", - "#and ne/ne1=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1)) and ne/ne1=K=10\n", - "#therefore we have 10=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1))\n", - "#re-arranging the equation for T, we get T2=1/((1/T1)-((2*k*log(10))/Eg))\n", - "T=1/((1/T1)-((2*k*math.log(10))/Eg)); #calculation of the temperature\n", - "\n", - "#result\n", - "print\"The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T=\",round(T),\"K (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T= 362.0 K (roundoff error)\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3 , Page no:272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=2.5E13; #in /cm^3 (intrinsic carrier density)\n", - "ue=3900; #in cm^2/(V-s) (electron mobilities)\n", - "uh=1900; #in cm^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "l=1; #in cm (lenght of the box)\n", - "b=1;h=1; #in mm (dimensions of germanium rod )\n", - "\n", - "#calculate\n", - "ni=ni*1E6; #changing unit from 1/cm^3 to 1/m^3\n", - "ue=ue*1E-4; #changing unit from cm^2 to m^2\n", - "uh=uh*1E-4; #changing unit from cm^2 to m^2\n", - "sigma=ni*e*(ue+uh); #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "l=l*1E-2; #changing unit from mm to m for length\n", - "A=(b*1E-3)*(h*1E-3); #changing unit from mm to m for width and height and calculation of cross-sectional area\n", - "R=rho*l/A; #calculation of resistance\n", - "\n", - "#result\n", - "print\"The resistance of intrinsic germanium is R=\",R,\"ohm\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistance of intrinsic germanium is R= 4310.34482759 ohm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4 , Page no:273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ne=2.5E19; #in /m^3 (electron density)\n", - "nh=2.5E19; #in /m^3 (hole density)\n", - "ue=0.36; #in m^2/(V-s) (electron mobilities)\n", - "uh=0.17; #in m^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#since ne=nh=ni, therefore we have \n", - "ni=nh;\n", - "sigma=ni*e*(ue+uh); #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "\n", - "#result\n", - "print\"The conductivity of germanium is =\",round(sigma,2),\"/ohm-m\";\n", - "print\"The resistivity of germanium is =\",round(rho,2),\"ohm-m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of germanium is = 2.12 /ohm-m\n", - "The resistivity of germanium is = 0.47 ohm-m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5 , Page no:273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n", - "ue=0.135; #in m^2/(V-s) (electron mobilities)\n", - "uh=0.048; #in m^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "ND=1E23; #in atom/m^3 (doping concentration)\n", - "\n", - "#calculate\n", - "sigma_i=ni*e*(ue+uh); #calculation of intrinsic conductivity\n", - "sigma=ND*ue*e; #calculation of conductivity after doping\n", - "rho=ni**2/ND; #calculation of equilibrium hole concentration\n", - "\n", - "#result\n", - "print\"The intrinsic conductivity for silicon is =\",sigma_i,\"S\";\n", - "print\"The conductivity after doping with phosphorus atoms is =\",sigma,\"S\";\n", - "print\"The equilibrium hole concentration is =\",rho,\"/m^3\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intrinsic conductivity for silicon is = 0.0004392 S\n", - "The conductivity after doping with phosphorus atoms is = 2160.0 S\n", - "The equilibrium hole concentration is = 2250000000.0 /m^3\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6 , Page no:274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n", - "ue=0.13; #in m^2/(V-s) (electron mobilities)\n", - "uh=0.05; #in m^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "ne=5E20; #in /m^3 (concentration of donor type impurity)\n", - "nh=5E20; #in /m^3 (concentration of acceptor type impurity)\n", - "\n", - "#calculate\n", - "#part-i\n", - "sigma=ni*e*(ue+uh); #calculation of intrinsic conductivity\n", - "#part-ii\n", - "#since 1 donor atom is in 1E8 Si atoms, hence holes concentration can be neglected\n", - "sigma1=ne*e*ue; #calculation of conductivity after doping with donor type impurity\n", - "#part-iii\n", - "#since 1 acceptor atom is in 1E8 Si atoms, hence electron concentration can be neglected\n", - "sigma2=nh*e*uh; #calculation of conductivity after doping with acceptor type impurity\n", - "\n", - "#result\n", - "print\"The intrinsic conductivity for silicon is =\",sigma,\"(ohm-m)^-1\";\n", - "print\"The conductivity after doping with donor type impurity is =\",sigma1,\"(ohm-m)^-1\";\n", - "print\"The conductivity after doping with acceptor type impurity is =\",sigma2,\"(ohm-m)^-1\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intrinsic conductivity for silicon is = 0.000432 (ohm-m)^-1\n", - "The conductivity after doping with donor type impurity is = 10.4 (ohm-m)^-1\n", - "The conductivity after doping with acceptor type impurity is = 4.0 (ohm-m)^-1\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.7 , Page no:274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=1E20; #in /m^3 (intrinsic carrier density)\n", - "ND=1E21; #in /m^3 (donor impurity concentration)\n", - "\n", - "#calculate\n", - "nh=ni**2/ND; #calculation of density of hole carriers at room temperature\n", - "\n", - "#result\n", - "print\"The density of hole carriers at room temperature is nh=\",nh,\"/m^3\";\n", - "#Note: answer in the book is wrong due to printing mistake" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density of hole carriers at room temperature is nh= 1e+19 /m^3\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8 , Page no:275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "M=72.6; #atomic mass of germanium\n", - "P=5400; #in Kg/m^3 (density)\n", - "ue=0.4; #in m^2/V-s (mobility of electrons)\n", - "uh=0.2; #in m^2/V-s (mobility of holes)\n", - "Eg=0.7; #in eV (Band gap)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T=300; #in K (temperature)\n", - "h=6.63E-34; #in J/s (Planck\u2019s constant)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6E-19; #in C(charge of electron)\n", - "\n", - "#calculate\n", - "Eg=Eg*e; #changing unit from eV to J\n", - "ni=2*(2*pi*m*k*T/h**2)**(3/2)*math.exp(-Eg/(2*k*T));\n", - "sigma=ni*e*(ue+uh);\n", - "\n", - "#result\n", - "print\"The intrinsic carrier density for germanium at 300K is ni=\",ni,\"/m^3\";\n", - "print\"The conductivity of germanium is=\",round(sigma,3),\"(ohm-m)^-1\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intrinsic carrier density for germanium at 300K is ni= 3.33408559508e+19 /m^3\n", - "The conductivity of germanium is= 3.201 (ohm-m)^-1\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.9 , Page no:275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "rho1=4.5; #in ohm-m (resistivity at 20 degree Celcius)\n", - "rho2=2.0; #in ohm-m (resistivity at 32 degree Celcius)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=20; T2=32; #in degree Celcius (two temperatures)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "T1=T1+273; #changing unit from degree Celius to K\n", - "T2=T2+273; #changing unit from degree Celius to K\n", - "#since sigma=e*u*C*T^(3/2)*exp(-Eg/(2*k*T))\n", - "#therefore sigma1/sigma2=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n", - "#and sigma=1/rho \n", - "#therefore we have rho2/rho1=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n", - "#re-arranging above equation for Eg, we get Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*log(T1/T2)-log(rho2/rho1))\n", - "Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*math.log(T1/T2)-math.log(rho2/rho1));\n", - "Eg1=Eg/e;#changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The energy band gap is Eg=\",Eg,\"J\";\n", - "print\"\\t\\t\\t =\",round(Eg1,3),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy band gap is Eg= 1.54302914521e-19 J\n", - "\t\t\t = 0.964 eV\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.10 , Page no:276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "rho=2300; #in ohm-m (resistivity of pure silicon)\n", - "ue=0.135; #in m^2/V-s (mobility of electron)\n", - "uh=0.048; #in m^2/V-s (mobility of electron)\n", - "Nd=1E19; #in /m^3 (doping concentration)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#since sigma=ni*e*(ue+uh) and sigma=1/rho\n", - "#therefore ni=1/(rho*e*(ue+uh))\n", - "ni=1/(rho*e*(ue+uh)); #calculation of intrinsic concentration\n", - "ne=Nd; #calculation of electron concentration\n", - "nh=ni**2/Nd; #calculation of hole concentration\n", - "sigma=ne*ue*e+nh*uh*e; #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "\n", - "#result\n", - "print\"The electron concentration is ne=\",ne,\"/m^3\";\n", - "print\"The hole concentration is nh=\",nh,\"/m^3\";\n", - "print\"The resistivity of the specimen is =\",round(rho,3),\"ohm-m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electron concentration is ne= 1e+19 /m^3\n", - "The hole concentration is nh= 2.20496745228e+13 /m^3\n", - "The resistivity of the specimen is = 4.63 ohm-m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.11 , Page no:276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "uh=1900; #in cm^2/V-s (mobility of electron)\n", - "Na=2E17; #in /m^3 (acceptor doping concentration)\n", - "e=1.6E-19; #in C(charge of electron)\n", - "\n", - "#calculate\n", - "uh=uh*1E-4; #changing unit from cm^2/V-s to m^2/V-s\n", - "Na=Na*1E6; #changing unit from 1/cm^3 to 1/m^3\n", - "nh=Na; #hole concentration \n", - "#since sigma=ne*ue*e+nh*uh*e and nh>>ne\n", - "#therefore sigma=nh*uh*e\n", - "sigma=nh*uh*e; #calculation of conductivity\n", - "\n", - "#result\n", - "print\"The conductivity of p-type Ge crystal is =\",sigma,\"/ohm-m (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of p-type Ge crystal is = 6080.0 /ohm-m (roundoff error)\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.12 , Page no:277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ue=0.19; #in m^2/V-s (mobility of electron)\n", - "T=300; #in K (temperature)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "e=1.6E-19; #in C(charge of electron)\n", - "\n", - "#calculate\n", - "Dn=ue*k*T/e; #calculation of diffusion co-efficient\n", - "\n", - "#result\n", - "print\"The diffusion co-efficient of electron in silicon is Dn=\",Dn,\"m^2/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The diffusion co-efficient of electron in silicon is Dn= 0.00491625 m^2/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.13 , Page no:277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Eg=0.4; #in eV (Band gap of semiconductor)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=0; #in degree Celcius (first temperature)\n", - "T2=50; #in degree Celcius (second temperature)\n", - "T3=100; #in degree Celcius (third temperature)\n", - "e=1.602E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "T1=T1+273; #changing temperature form Celcius to Kelvin\n", - "T2=T2+273; #changing temperature form Celcius to Kelvin\n", - "T3=T3+273; #changing temperature form Celcius to Kelvin\n", - "Eg=Eg*e; #changing unit from eV to Joule\n", - "#Using F_E=1/(1+exp(Eg/2*k*T))\n", - "F_E1=1/(1+math.exp(Eg/(2*k*T1))); #calculation of probability of occupation of lowest level at 0 degree Celcius\n", - "F_E2=1/(1+math.exp(Eg/(2*k*T2))); #calculation of probability of occupation of lowest level at 50 degree Celcius\n", - "F_E3=1/(1+math.exp(Eg/(2*k*T3))); #calculation of probability of occupation of lowest level at 100 degree Celcius\n", - "\n", - "#result\n", - "print\"The probability of occupation of lowest level in conduction band is\";\n", - "print\"\\t at 0 degree Celcius, F_E=\",F_E1,\"eV\";\n", - "print\"\\t at 50 degree Celcius, F_E=\",F_E2,\"eV\";\n", - "print\"\\t at 100 degree Celcius, F_E=\",F_E3,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The probability of occupation of lowest level in conduction band is\n", - "\t at 0 degree Celcius, F_E= 0.000202505914236 eV\n", - "\t at 50 degree Celcius, F_E= 0.000754992968827 eV\n", - "\t at 100 degree Celcius, F_E= 0.00197639649915 eV\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14 , Page no:278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Eg=1.2; #in eV (Energy band gap)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=600; T2=300; #in K (two temperatures)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "Eg=Eg*e; #changing unit from eV to Joule\n", - "#since sigma is proportional to exp(-Eg/(2*k*T))\n", - "#therefore ratio=sigma1/sigma2=exp(-Eg/(2*k*((1/T1)-(1/T2))));\n", - "ratio= math.exp((-Eg/(2*k))*((1/T1)-(1/T2))); #calculation of ratio of conductivity at 600K and at 300K\n", - "\n", - "#result\n", - "print\"The ratio of conductivity at 600K and at 300K is =\",ratio;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ratio of conductivity at 600K and at 300K is = 108467.17792\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.15 , Page no:278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ue=0.39; #in m^2/V-s (mobility of electron)\n", - "n=5E13; #number of donor atoms\n", - "ni=2.4E19; #in atoms/m^3 (intrinsic carrier density)\n", - "l=10; #in mm (length of rod)\n", - "a=1; #in mm (side of square cross-section)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "l=l*1E-3; #changing unit from mm to m\n", - "a=a*1E-3; #changing unit from mm to m\n", - "A=a**2; #calculation of cross-section area\n", - "Nd=n/(l*A); #calculation of donor concentration\n", - "ne=Nd; #calculation of electron density\n", - "nh=ni**2/Nd; #calculation of hole density\n", - "#since sigma=ne*e*ue+nh*e*ue and since ne>>nh\n", - "#therefore sigma=ne*e*ue\n", - "sigma=ne*e*ue; #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "R=rho*l/A; #calculation of resistance \n", - "\n", - "#result\n", - "print\"The electron density is ne=\",ne,\"/m^3\";\n", - "print\"The hole density is nh=\",nh,\"/m^3\";\n", - "print\"The conductivity is =\",sigma,\"/ohm-m\";\n", - "print\"The resistance is R=\",round(R),\"ohm\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electron density is ne= 5e+21 /m^3\n", - "The hole density is nh= 1.152e+17 /m^3\n", - "The conductivity is = 312.0 /ohm-m\n", - "The resistance is R= 32.0 ohm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.16 , Page no:279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "RH=3.66E-4; #in m^3/C (Hall coefficient)\n", - "rho=8.93E-3; #in ohm-m (resistivity)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "u=RH/rho; #calculation of mobility\n", - "n=1/(RH*e); #calculation of density\n", - "\n", - "#result\n", - "print\"The mobility is u=\",u,\"m^2/(V-s)\";\n", - "print\"The density is n=\",n,\"/m^3\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility is u= 0.0409854423292 m^2/(V-s)\n", - "The density is n= 1.70765027322e+22 /m^3\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17 , Page no:279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "RH=3.66E-4; #in m^3/C (Hall coefficient)\n", - "rho=8.93E-3; #in ohm-m (resistivity)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "nh=1/(RH*e); #calculation of density of charge carrier\n", - "uh=1/(rho*nh*e); #calculation of mobility of charge carrier\n", - "\n", - "#result\n", - "print\"The density of charge carrier is nh=\",nh,\"/m^3\";\n", - "print\"The mobility of charge carrier is uh=\",uh,\"m^2/(V-s)\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density of charge carrier is nh= 1.70765027322e+22 /m^3\n", - "The mobility of charge carrier is uh= 0.0409854423292 m^2/(V-s)\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_09_Semiconductors_1.ipynb b/Applied_Physics/Chapter_09_Semiconductors_1.ipynb deleted file mode 100755 index 9ce2ea83..00000000 --- a/Applied_Physics/Chapter_09_Semiconductors_1.ipynb +++ /dev/null @@ -1,782 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c155cecc785c23bdccd0bf715c04d53d7788e1b590b4310d6af27c13ce7b97ac" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9:Semiconductors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2 , Page no:272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Eg=0.67; #in eV (Energy band gap)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=298; #in K (room temperature)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "K=10; #ratio of number of electrons at different temperature\n", - "\n", - "#calculate\n", - "Eg=Eg*e; #changing unit from eV to Joule\n", - "#since ne=Ke*exp(-Eg/(2*k*T))\n", - "#and ne/ne1=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1)) and ne/ne1=K=10\n", - "#therefore we have 10=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1))\n", - "#re-arranging the equation for T, we get T2=1/((1/T1)-((2*k*log(10))/Eg))\n", - "T=1/((1/T1)-((2*k*math.log(10))/Eg)); #calculation of the temperature\n", - "\n", - "#result\n", - "print\"The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T=\",round(T),\"K (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T= 362.0 K (roundoff error)\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3 , Page no:272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=2.5E13; #in /cm^3 (intrinsic carrier density)\n", - "ue=3900; #in cm^2/(V-s) (electron mobilities)\n", - "uh=1900; #in cm^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "l=1; #in cm (lenght of the box)\n", - "b=1;h=1; #in mm (dimensions of germanium rod )\n", - "\n", - "#calculate\n", - "ni=ni*1E6; #changing unit from 1/cm^3 to 1/m^3\n", - "ue=ue*1E-4; #changing unit from cm^2 to m^2\n", - "uh=uh*1E-4; #changing unit from cm^2 to m^2\n", - "sigma=ni*e*(ue+uh); #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "l=l*1E-2; #changing unit from mm to m for length\n", - "A=(b*1E-3)*(h*1E-3); #changing unit from mm to m for width and height and calculation of cross-sectional area\n", - "R=rho*l/A; #calculation of resistance\n", - "\n", - "#result\n", - "print\"The resistance of intrinsic germanium is R=\",'%.3E'%R,\"ohm\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistance of intrinsic germanium is R= 4.310E+03 ohm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4 , Page no:273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ne=2.5E19; #in /m^3 (electron density)\n", - "nh=2.5E19; #in /m^3 (hole density)\n", - "ue=0.36; #in m^2/(V-s) (electron mobilities)\n", - "uh=0.17; #in m^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#since ne=nh=ni, therefore we have \n", - "ni=nh;\n", - "sigma=ni*e*(ue+uh); #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "\n", - "#result\n", - "print\"The conductivity of germanium is =\",round(sigma,2),\"/ohm-m\";\n", - "print\"The resistivity of germanium is =\",round(rho,2),\"ohm-m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of germanium is = 2.12 /ohm-m\n", - "The resistivity of germanium is = 0.47 ohm-m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5 , Page no:273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n", - "ue=0.135; #in m^2/(V-s) (electron mobilities)\n", - "uh=0.048; #in m^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "ND=1E23; #in atom/m^3 (doping concentration)\n", - "\n", - "#calculate\n", - "sigma_i=ni*e*(ue+uh); #calculation of intrinsic conductivity\n", - "sigma=ND*ue*e; #calculation of conductivity after doping\n", - "rho=ni**2/ND; #calculation of equilibrium hole concentration\n", - "\n", - "#result\n", - "print\"The intrinsic conductivity for silicon is =\",'%.3E'%sigma_i,\"S\";\n", - "print\"The conductivity after doping with phosphorus atoms is =\",'%.3E'%sigma,\"S\";\n", - "print\"The equilibrium hole concentration is =\",'%.3E'%rho,\"/m^3\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intrinsic conductivity for silicon is = 4.392E-04 S\n", - "The conductivity after doping with phosphorus atoms is = 2.160E+03 S\n", - "The equilibrium hole concentration is = 2.250E+09 /m^3\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6 , Page no:274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n", - "ue=0.13; #in m^2/(V-s) (electron mobilities)\n", - "uh=0.05; #in m^2/(V-s) (hole mobilities)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "ne=5E20; #in /m^3 (concentration of donor type impurity)\n", - "nh=5E20; #in /m^3 (concentration of acceptor type impurity)\n", - "\n", - "#calculate\n", - "#part-i\n", - "sigma=ni*e*(ue+uh); #calculation of intrinsic conductivity\n", - "#part-ii\n", - "#since 1 donor atom is in 1E8 Si atoms, hence holes concentration can be neglected\n", - "sigma1=ne*e*ue; #calculation of conductivity after doping with donor type impurity\n", - "#part-iii\n", - "#since 1 acceptor atom is in 1E8 Si atoms, hence electron concentration can be neglected\n", - "sigma2=nh*e*uh; #calculation of conductivity after doping with acceptor type impurity\n", - "\n", - "#result\n", - "print\"The intrinsic conductivity for silicon is =\",'%.3E'%sigma,\"(ohm-m)^-1\";\n", - "print\"The conductivity after doping with donor type impurity is =\",sigma1,\"(ohm-m)^-1\";\n", - "print\"The conductivity after doping with acceptor type impurity is =\",sigma2,\"(ohm-m)^-1\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intrinsic conductivity for silicon is = 4.320E-04 (ohm-m)^-1\n", - "The conductivity after doping with donor type impurity is = 10.4 (ohm-m)^-1\n", - "The conductivity after doping with acceptor type impurity is = 4.0 (ohm-m)^-1\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.7 , Page no:274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ni=1E20; #in /m^3 (intrinsic carrier density)\n", - "ND=1E21; #in /m^3 (donor impurity concentration)\n", - "\n", - "#calculate\n", - "nh=ni**2/ND; #calculation of density of hole carriers at room temperature\n", - "\n", - "#result\n", - "print\"The density of hole carriers at room temperature is nh=\",nh,\"/m^3\";\n", - "#Note: answer in the book is wrong due to printing mistake" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density of hole carriers at room temperature is nh= 1e+19 /m^3\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8 , Page no:275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "M=72.6; #atomic mass of germanium\n", - "P=5400; #in Kg/m^3 (density)\n", - "ue=0.4; #in m^2/V-s (mobility of electrons)\n", - "uh=0.2; #in m^2/V-s (mobility of holes)\n", - "Eg=0.7; #in eV (Band gap)\n", - "m=9.1E-31; #in Kg (mass of electron)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T=300; #in K (temperature)\n", - "h=6.63E-34; #in J/s (Planck\u2019s constant)\n", - "pi=3.14; #value of pi used in the solution\n", - "e=1.6E-19; #in C(charge of electron)\n", - "\n", - "#calculate\n", - "Eg=Eg*e; #changing unit from eV to J\n", - "ni=2*(2*pi*m*k*T/h**2)**(3/2)*math.exp(-Eg/(2*k*T));\n", - "sigma=ni*e*(ue+uh);\n", - "\n", - "#result\n", - "print\"The intrinsic carrier density for germanium at 300K is ni=\",'%.3E'%ni,\"/m^3\";\n", - "print\"The conductivity of germanium is=\",round(sigma,3),\"(ohm-m)^-1\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The intrinsic carrier density for germanium at 300K is ni= 3.334E+19 /m^3\n", - "The conductivity of germanium is= 3.201 (ohm-m)^-1\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.9 , Page no:275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "rho1=4.5; #in ohm-m (resistivity at 20 degree Celcius)\n", - "rho2=2.0; #in ohm-m (resistivity at 32 degree Celcius)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=20; T2=32; #in degree Celcius (two temperatures)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "T1=T1+273; #changing unit from degree Celius to K\n", - "T2=T2+273; #changing unit from degree Celius to K\n", - "#since sigma=e*u*C*T^(3/2)*exp(-Eg/(2*k*T))\n", - "#therefore sigma1/sigma2=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n", - "#and sigma=1/rho \n", - "#therefore we have rho2/rho1=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n", - "#re-arranging above equation for Eg, we get Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*log(T1/T2)-log(rho2/rho1))\n", - "Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*math.log(T1/T2)-math.log(rho2/rho1));\n", - "Eg1=Eg/e;#changing unit from J to eV\n", - "\n", - "#result\n", - "print\"The energy band gap is Eg=\",'%.3E'%Eg,\"J\";\n", - "print\"\\t\\t\\t =\",round(Eg1,3),\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The energy band gap is Eg= 1.543E-19 J\n", - "\t\t\t = 0.964 eV\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.10 , Page no:276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "rho=2300; #in ohm-m (resistivity of pure silicon)\n", - "ue=0.135; #in m^2/V-s (mobility of electron)\n", - "uh=0.048; #in m^2/V-s (mobility of electron)\n", - "Nd=1E19; #in /m^3 (doping concentration)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "#since sigma=ni*e*(ue+uh) and sigma=1/rho\n", - "#therefore ni=1/(rho*e*(ue+uh))\n", - "ni=1/(rho*e*(ue+uh)); #calculation of intrinsic concentration\n", - "ne=Nd; #calculation of electron concentration\n", - "nh=ni**2/Nd; #calculation of hole concentration\n", - "sigma=ne*ue*e+nh*uh*e; #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "\n", - "#result\n", - "print\"The electron concentration is ne=\",ne,\"/m^3\";\n", - "print\"The hole concentration is nh=\",'%.3E'%nh,\"/m^3\";\n", - "print\"The resistivity of the specimen is =\",round(rho,3),\"ohm-m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electron concentration is ne= 1e+19 /m^3\n", - "The hole concentration is nh= 2.205E+13 /m^3\n", - "The resistivity of the specimen is = 4.63 ohm-m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.11 , Page no:276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "uh=1900; #in cm^2/V-s (mobility of electron)\n", - "Na=2E17; #in /m^3 (acceptor doping concentration)\n", - "e=1.6E-19; #in C(charge of electron)\n", - "\n", - "#calculate\n", - "uh=uh*1E-4; #changing unit from cm^2/V-s to m^2/V-s\n", - "Na=Na*1E6; #changing unit from 1/cm^3 to 1/m^3\n", - "nh=Na; #hole concentration \n", - "#since sigma=ne*ue*e+nh*uh*e and nh>>ne\n", - "#therefore sigma=nh*uh*e\n", - "sigma=nh*uh*e; #calculation of conductivity\n", - "\n", - "#result\n", - "print\"The conductivity of p-type Ge crystal is =\",sigma,\"/ohm-m (roundoff error)\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductivity of p-type Ge crystal is = 6080.0 /ohm-m (roundoff error)\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.12 , Page no:277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ue=0.19; #in m^2/V-s (mobility of electron)\n", - "T=300; #in K (temperature)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "e=1.6E-19; #in C(charge of electron)\n", - "\n", - "#calculate\n", - "Dn=ue*k*T/e; #calculation of diffusion co-efficient\n", - "\n", - "#result\n", - "print\"The diffusion co-efficient of electron in silicon is Dn=\",'%.3E'%Dn,\"m^2/s\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The diffusion co-efficient of electron in silicon is Dn= 4.916E-03 m^2/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.13 , Page no:277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Eg=0.4; #in eV (Band gap of semiconductor)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=0; #in degree Celcius (first temperature)\n", - "T2=50; #in degree Celcius (second temperature)\n", - "T3=100; #in degree Celcius (third temperature)\n", - "e=1.602E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "T1=T1+273; #changing temperature form Celcius to Kelvin\n", - "T2=T2+273; #changing temperature form Celcius to Kelvin\n", - "T3=T3+273; #changing temperature form Celcius to Kelvin\n", - "Eg=Eg*e; #changing unit from eV to Joule\n", - "#Using F_E=1/(1+exp(Eg/2*k*T))\n", - "F_E1=1/(1+math.exp(Eg/(2*k*T1))); #calculation of probability of occupation of lowest level at 0 degree Celcius\n", - "F_E2=1/(1+math.exp(Eg/(2*k*T2))); #calculation of probability of occupation of lowest level at 50 degree Celcius\n", - "F_E3=1/(1+math.exp(Eg/(2*k*T3))); #calculation of probability of occupation of lowest level at 100 degree Celcius\n", - "\n", - "#result\n", - "print\"The probability of occupation of lowest level in conduction band is\";\n", - "print\"\\t at 0 degree Celcius, F_E=\",'%.3E'%F_E1,\"eV\";\n", - "print\"\\t at 50 degree Celcius, F_E=\",'%.3E'%F_E2,\"eV\";\n", - "print\"\\t at 100 degree Celcius, F_E=\",'%.3E'%F_E3,\"eV\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The probability of occupation of lowest level in conduction band is\n", - "\t at 0 degree Celcius, F_E= 2.025E-04 eV\n", - "\t at 50 degree Celcius, F_E= 7.550E-04 eV\n", - "\t at 100 degree Celcius, F_E= 1.976E-03 eV\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14 , Page no:278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Eg=1.2; #in eV (Energy band gap)\n", - "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", - "T1=600; T2=300; #in K (two temperatures)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "Eg=Eg*e; #changing unit from eV to Joule\n", - "#since sigma is proportional to exp(-Eg/(2*k*T))\n", - "#therefore ratio=sigma1/sigma2=exp(-Eg/(2*k*((1/T1)-(1/T2))));\n", - "ratio= math.exp((-Eg/(2*k))*((1/T1)-(1/T2))); #calculation of ratio of conductivity at 600K and at 300K\n", - "\n", - "#result\n", - "print\"The ratio of conductivity at 600K and at 300K is =\",'%.3E'%ratio;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ratio of conductivity at 600K and at 300K is = 1.085E+05\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.15 , Page no:278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "ue=0.39; #in m^2/V-s (mobility of electron)\n", - "n=5E13; #number of donor atoms\n", - "ni=2.4E19; #in atoms/m^3 (intrinsic carrier density)\n", - "l=10; #in mm (length of rod)\n", - "a=1; #in mm (side of square cross-section)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "l=l*1E-3; #changing unit from mm to m\n", - "a=a*1E-3; #changing unit from mm to m\n", - "A=a**2; #calculation of cross-section area\n", - "Nd=n/(l*A); #calculation of donor concentration\n", - "ne=Nd; #calculation of electron density\n", - "nh=ni**2/Nd; #calculation of hole density\n", - "#since sigma=ne*e*ue+nh*e*ue and since ne>>nh\n", - "#therefore sigma=ne*e*ue\n", - "sigma=ne*e*ue; #calculation of conductivity\n", - "rho=1/sigma; #calculation of resistivity\n", - "R=rho*l/A; #calculation of resistance \n", - "\n", - "#result\n", - "print\"The electron density is ne=\",ne,\"/m^3\";\n", - "print\"The hole density is nh=\",nh,\"/m^3\";\n", - "print\"The conductivity is =\",sigma,\"/ohm-m\";\n", - "print\"The resistance is R=\",round(R),\"ohm\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The electron density is ne= 5e+21 /m^3\n", - "The hole density is nh= 1.152e+17 /m^3\n", - "The conductivity is = 312.0 /ohm-m\n", - "The resistance is R= 32.0 ohm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.16 , Page no:279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "RH=3.66E-4; #in m^3/C (Hall coefficient)\n", - "rho=8.93E-3; #in ohm-m (resistivity)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "u=RH/rho; #calculation of mobility\n", - "n=1/(RH*e); #calculation of density\n", - "\n", - "#result\n", - "print\"The mobility is u=\",round(u,4),\"m^2/(V-s)\";\n", - "print\"The density is n=\",'%.3E'%n,\"/m^3\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mobility is u= 0.041 m^2/(V-s)\n", - "The density is n= 1.708E+22 /m^3\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17 , Page no:279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "RH=3.66E-4; #in m^3/C (Hall coefficient)\n", - "rho=8.93E-3; #in ohm-m (resistivity)\n", - "e=1.6E-19; #in C (charge of electron)\n", - "\n", - "#calculate\n", - "nh=1/(RH*e); #calculation of density of charge carrier\n", - "uh=1/(rho*nh*e); #calculation of mobility of charge carrier\n", - "\n", - "#result\n", - "print\"The density of charge carrier is nh=\",'%.3E'%nh,\"/m^3\";\n", - "print\"The mobility of charge carrier is uh=\",round(uh,4),\"m^2/(V-s)\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The density of charge carrier is nh= 1.708E+22 /m^3\n", - "The mobility of charge carrier is uh= 0.041 m^2/(V-s)\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_10_Superconductivity.ipynb b/Applied_Physics/Chapter_10_Superconductivity.ipynb deleted file mode 100755 index 7b7470a8..00000000 --- a/Applied_Physics/Chapter_10_Superconductivity.ipynb +++ /dev/null @@ -1,316 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:03ee5374207ea96e9a4f31e16f771d187a11f07daf287d94fc54e352b5db8bff" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10:Superconductivity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1 , Page no:313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Tc=7.2; #in K (critical temperature)\n", - "T=5; #in K (given temperature)\n", - "H0=6.5E3; #in A/m (critical magnetic field at 0K)\n", - "\n", - "#calculate\n", - "Hc=H0*(1-(T/Tc)**2); #calculation of magnitude of critical magnetic field\n", - "\n", - "#result\n", - "print\"The magnitude of critical magnetic field is Hc=\",round(Hc,2),\"A/m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnitude of critical magnetic field is Hc= 3365.35 A/m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2 , Page no:313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r=0.02; #in m (radius of ring)\n", - "Hc=2E3; #in A/m (critical magnetic field at 5K)\n", - "pi=3.14; #value of pi used in the solutiion\n", - "\n", - "#calculate\n", - "Ic=2*pi*r*Hc; #calculation of critical current value\n", - "\n", - "#result\n", - "print\"The critical current value is Ic=\",Ic,\"A\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The critical current value is Ic= 251.2 A\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.3 , Page no:313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "M1=199.5; #in amu (isotropic mass at 5K)\n", - "T1=5; #in K (first critical temperature)\n", - "T2=5.1; #in K (second critical temperature)\n", - "#calculate\n", - "#since Tc=C*(1/sqrt(M)\n", - "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n", - "#therefore we have M2=(T1/T2)^2*M1\n", - "M2=(T1/T2)**2*M1; #calculation of isotropic mass at 5.1K\n", - "\n", - "#result\n", - "print\"The isotropic mass at 5.1K is M2=\",round(M2,3),\"a.m.u.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The isotropic mass at 5.1K is M2= 191.753 a.m.u.\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4 , Page no:314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=6; #in K (given temperature)\n", - "Hc=5E3; #in A/m (critical magnetic field at 5K)\n", - "H0=2E4; #in A/m (critical magnetic field at 0K)\n", - "\n", - "#calculate\n", - "#since Hc=H0*(1-(T/Tc)^2)\n", - "#therefor we have Tc=T/sqrt(1-(Hc/H)^2)\n", - "Tc=T/math.sqrt(1-(Hc/H0)); #calculation of transition temperature\n", - "\n", - "#result\n", - "print\"The transition temperature is Tc=\",round(Tc,3),\"K\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transition temperature is Tc= 6.928 K\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5 , Page no:314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=5; #in K (given temperature)\n", - "d=3; #in mm (diameter of the wire)\n", - "Tc=8; #in K (critical temperature for Pb)\n", - "H0=5E4; #in A/m (critical magnetic field at 0K)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "Hc=H0*(1-(T/Tc)**2); #calculation of critical magnetic field at 5K\n", - "r=(d*1E-3)/2; #calculation of radius in m\n", - "Ic=2*pi*r*Hc; #calculation of critical current at 5K\n", - "\n", - "#result\n", - "print\"The critical magnetic field at 5K is Hc=\",Hc,\"A/m\";\n", - "print\"The critical current at 5K is Ic=\",Ic,\"A\";\n", - "print \" (roundoff error)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The critical magnetic field at 5K is Hc= 30468.75 A/m\n", - "The critical current at 5K is Ic= 287.015625 A\n", - " (roundoff error)\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.6 , Page no:314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=8.50; #in micro V (voltage across Josephson junction )\n", - "e=1.6E-19; #in C (charge of electron)\n", - "h=6.626E-34; #in J/s (Planck\u2019s constant)\n", - "\n", - "#calculate\n", - "V=V*1E-6; #changing unit from V to microVolt\n", - "v1=2*e*V/h; #calculation of frequency of EM waves\n", - "\n", - "#result\n", - "print\"The frequency of EM waves is v=\",v1,\"Hz\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The frequency of EM waves is v= 4105040748.57 Hz\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.7 , Page no:315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "M1=200.59; #in amu (average atomic mass at 4.153K)\n", - "Tc1=4.153; #in K (first critical temperature)\n", - "M2=204; #in amu (average atomic mass of isotopes)\n", - "\n", - "#calculate\n", - "#since Tc=C*(1/sqrt(M)\n", - "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n", - "#therefore we have Tc2=Tc1*sqrt(M1/M2)\n", - "Tc2=Tc1*math.sqrt(M1/M2); #calculation of transition temperature of the isotopes\n", - "\n", - "#result\n", - "print\"The transition temperature of the isotopes is Tc2=\",round(Tc2,3),\"K\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transition temperature of the isotopes is Tc2= 4.118 K\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_10_Superconductivity_1.ipynb b/Applied_Physics/Chapter_10_Superconductivity_1.ipynb deleted file mode 100755 index 9b11ce44..00000000 --- a/Applied_Physics/Chapter_10_Superconductivity_1.ipynb +++ /dev/null @@ -1,316 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2419f2161da8f36d7fa10fabb5f5aa4b318a9912237faaa5f03ac922aa4b8ac9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10:Superconductivity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1 , Page no:313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "Tc=7.2; #in K (critical temperature)\n", - "T=5; #in K (given temperature)\n", - "H0=6.5E3; #in A/m (critical magnetic field at 0K)\n", - "\n", - "#calculate\n", - "Hc=H0*(1-(T/Tc)**2); #calculation of magnitude of critical magnetic field\n", - "\n", - "#result\n", - "print\"The magnitude of critical magnetic field is Hc=\",round(Hc,2),\"A/m\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnitude of critical magnetic field is Hc= 3365.35 A/m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2 , Page no:313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "r=0.02; #in m (radius of ring)\n", - "Hc=2E3; #in A/m (critical magnetic field at 5K)\n", - "pi=3.14; #value of pi used in the solutiion\n", - "\n", - "#calculate\n", - "Ic=2*pi*r*Hc; #calculation of critical current value\n", - "\n", - "#result\n", - "print\"The critical current value is Ic=\",Ic,\"A\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The critical current value is Ic= 251.2 A\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.3 , Page no:313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "M1=199.5; #in amu (isotropic mass at 5K)\n", - "T1=5; #in K (first critical temperature)\n", - "T2=5.1; #in K (second critical temperature)\n", - "#calculate\n", - "#since Tc=C*(1/sqrt(M)\n", - "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n", - "#therefore we have M2=(T1/T2)^2*M1\n", - "M2=(T1/T2)**2*M1; #calculation of isotropic mass at 5.1K\n", - "\n", - "#result\n", - "print\"The isotropic mass at 5.1K is M2=\",round(M2,3),\"a.m.u.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The isotropic mass at 5.1K is M2= 191.753 a.m.u.\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4 , Page no:314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=6; #in K (given temperature)\n", - "Hc=5E3; #in A/m (critical magnetic field at 5K)\n", - "H0=2E4; #in A/m (critical magnetic field at 0K)\n", - "\n", - "#calculate\n", - "#since Hc=H0*(1-(T/Tc)^2)\n", - "#therefor we have Tc=T/sqrt(1-(Hc/H)^2)\n", - "Tc=T/math.sqrt(1-(Hc/H0)); #calculation of transition temperature\n", - "\n", - "#result\n", - "print\"The transition temperature is Tc=\",round(Tc,3),\"K\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transition temperature is Tc= 6.928 K\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5 , Page no:314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "T=5; #in K (given temperature)\n", - "d=3; #in mm (diameter of the wire)\n", - "Tc=8; #in K (critical temperature for Pb)\n", - "H0=5E4; #in A/m (critical magnetic field at 0K)\n", - "pi=3.14; #value of pi used in the solution\n", - "\n", - "#calculate\n", - "Hc=H0*(1-(T/Tc)**2); #calculation of critical magnetic field at 5K\n", - "r=(d*1E-3)/2; #calculation of radius in m\n", - "Ic=2*pi*r*Hc; #calculation of critical current at 5K\n", - "\n", - "#result\n", - "print\"The critical magnetic field at 5K is Hc=\",'%.3E'%Hc,\"A/m\";\n", - "print\"The critical current at 5K is Ic=\",round(Ic,4),\"A\";\n", - "print \" (roundoff error)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The critical magnetic field at 5K is Hc= 3.047E+04 A/m\n", - "The critical current at 5K is Ic= 287.0156 A\n", - " (roundoff error)\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.6 , Page no:314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "V=8.50; #in micro V (voltage across Josephson junction )\n", - "e=1.6E-19; #in C (charge of electron)\n", - "h=6.626E-34; #in J/s (Planck\u2019s constant)\n", - "\n", - "#calculate\n", - "V=V*1E-6; #changing unit from V to microVolt\n", - "v1=2*e*V/h; #calculation of frequency of EM waves\n", - "\n", - "#result\n", - "print\"The frequency of EM waves is v=\",'%.3E'%v1,\"Hz\";\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The frequency of EM waves is v= 4.105E+09 Hz\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.7 , Page no:315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "M1=200.59; #in amu (average atomic mass at 4.153K)\n", - "Tc1=4.153; #in K (first critical temperature)\n", - "M2=204; #in amu (average atomic mass of isotopes)\n", - "\n", - "#calculate\n", - "#since Tc=C*(1/sqrt(M)\n", - "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n", - "#therefore we have Tc2=Tc1*sqrt(M1/M2)\n", - "Tc2=Tc1*math.sqrt(M1/M2); #calculation of transition temperature of the isotopes\n", - "\n", - "#result\n", - "print\"The transition temperature of the isotopes is Tc2=\",round(Tc2,3),\"K\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transition temperature of the isotopes is Tc2= 4.118 K\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_12Fibre_Optics.ipynb b/Applied_Physics/Chapter_12Fibre_Optics.ipynb deleted file mode 100755 index 95067254..00000000 --- a/Applied_Physics/Chapter_12Fibre_Optics.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:13927a6aa5f4b8929243c9ca2c470f4da4ee5b45564e616337e68523dd18d625" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12:Fibre Optics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.563; #refractive index of core\n", - "u2=1.498; #refractive index of cladding\n", - "\n", - "#calculate\n", - "d=(u1-u2)/u1; #calculation of fractional index change\n", - "\n", - "#result\n", - "print\"The fractional index change for a given optical fibre is =\",round(d,4);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fractional index change for a given optical fibre is = 0.0416\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.55; #refractive index of core\n", - "u2=1.50; #refractive index of cladding\n", - "\n", - "#calculate\n", - "d=(u1-u2)/u1; #calculation of fractional index change\n", - "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n", - "theta=math.asin(NA); #calculation of acceptance angle\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.394\n", - "The acceptance angle of the optical fibre is = 23.2 degree\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.3 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.563; #refractive index of core\n", - "u2=1.498; #refractive index of cladding\n", - "\n", - "#calculate\n", - "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", - "theta=math.asin(NA); #calculation of acceptance angle\n", - "theta1=theta*180/3.14;\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,4);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.4461\n", - "The acceptance angle of the optical fibre is = 26.5 degree\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.4 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "NA=0.39; #numerical aperture of the optical fibre\n", - "d=0.05; #difference in the refractive index of the material of the core and cladding\n", - "\n", - "#calculate\n", - "#since NA=u1*sqrt(2*d)\n", - "#we have u1=NA/sqrt(2*d)\n", - "u1= NA/math.sqrt(2*d); #calculation of refractive index of material of the core\n", - "\n", - "#result\n", - "print\"The refractive index of material of the core is u1=\",round(u1,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The refractive index of material of the core is u1= 1.233\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.50; #refractive index of core\n", - "u2=1.45; #refractive index of cladding\n", - "\n", - "#calculate\n", - "d=(u1-u2)/u1; #calculation of fractional index change\n", - "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n", - "theta_0=math.asin(NA); #calculation of acceptance angle\n", - "theta_01=theta_0*180/3.14;\n", - "theta_c=math.asin(u2/u1); #calculation of critical angle\n", - "theta_c1=theta_c*180/3.14;\n", - "\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta_01,2),\"degree\";\n", - "print\"The critical angle of the optical fibre is =\",round(theta_c1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.387\n", - "The acceptance angle of the optical fibre is = 22.8 degree\n", - "The critical angle of the optical fibre is = 75.2 degree\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.6 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "NA=0.33; #numerical aperture\n", - "d=0.02; #difference in the refractive index of the core and cladding of the material\n", - "\n", - "#calculate\n", - "#since NA=u1*sqrt(2*d)\n", - "#therefore we have\n", - "u1=NA/math.sqrt(2*d); #calculation of refractive index of the core\n", - "#since d=(u1-u2)/u2\n", - "#therefore we have\n", - "u2=(1-d)*u1; #calculation of refractive index of the cladding\n", - "\n", - "#result\n", - "print\"The refractive index of the core is u1=\",round(u1,2);\n", - "print\"The refractive index of the cladding is u2=\",round(u2,3);\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The refractive index of the core is u1= 1.65\n", - "The refractive index of the cladding is u2= 1.617\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.7 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=3.5; #refractive index of core\n", - "u2=3.45; #refractive index of cladding\n", - "u0=1; #refractive index of the air\n", - "\n", - "#calculate\n", - "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", - "NA1=NA/u0;\n", - "alpha=math.asin(NA); #calculation of acceptance angle\n", - "alpha1=alpha*180/3.14;\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA1,2);\n", - "print\"The acceptance angle of the optical fibre is =\",round(alpha1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.59\n", - "The acceptance angle of the optical fibre is = 36.14 degree\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.8 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.48; #refractive index of core\n", - "u2=1.45; #refractive index of cladding\n", - "\n", - "#calculate\n", - "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", - "theta=math.asin(NA); #calculation of acceptance angle\n", - "theta1=theta*180/3.14;\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";\n", - "print \" (roundoff error)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.296\n", - "The acceptance angle of the optical fibre is = 17.26 degree\n", - " (roundoff error)\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/Chapter_12_Fibre_Optics.ipynb b/Applied_Physics/Chapter_12_Fibre_Optics.ipynb deleted file mode 100755 index f573b0a2..00000000 --- a/Applied_Physics/Chapter_12_Fibre_Optics.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dac7a0b06f622e783ea6c469bf1c100c0c8157cc5e77bffea65e378f258808b2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12:Fibre Optics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.563; #refractive index of core\n", - "u2=1.498; #refractive index of cladding\n", - "\n", - "#calculate\n", - "d=(u1-u2)/u1; #calculation of fractional index change\n", - "\n", - "#result\n", - "print\"The fractional index change for a given optical fibre is =\",round(d,4);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fractional index change for a given optical fibre is = 0.0416\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.55; #refractive index of core\n", - "u2=1.50; #refractive index of cladding\n", - "\n", - "#calculate\n", - "d=(u1-u2)/u1; #calculation of fractional index change\n", - "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n", - "theta=math.asin(NA); #calculation of acceptance angle\n", - "theta1=theta*180/3.14;\n", - "\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.394\n", - "The acceptance angle of the optical fibre is = 23.2 degree\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.3 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.563; #refractive index of core\n", - "u2=1.498; #refractive index of cladding\n", - "\n", - "#calculate\n", - "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", - "theta=math.asin(NA); #calculation of acceptance angle\n", - "theta1=theta*180/3.14;\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,4);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.4461\n", - "The acceptance angle of the optical fibre is = 26.5 degree\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.4 , Page no:360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "NA=0.39; #numerical aperture of the optical fibre\n", - "d=0.05; #difference in the refractive index of the material of the core and cladding\n", - "\n", - "#calculate\n", - "#since NA=u1*sqrt(2*d)\n", - "#we have u1=NA/sqrt(2*d)\n", - "u1= NA/math.sqrt(2*d); #calculation of refractive index of material of the core\n", - "\n", - "#result\n", - "print\"The refractive index of material of the core is u1=\",round(u1,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The refractive index of material of the core is u1= 1.233\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.50; #refractive index of core\n", - "u2=1.45; #refractive index of cladding\n", - "\n", - "#calculate\n", - "d=(u1-u2)/u1; #calculation of fractional index change\n", - "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n", - "theta_0=math.asin(NA); #calculation of acceptance angle\n", - "theta_01=theta_0*180/3.14;\n", - "theta_c=math.asin(u2/u1); #calculation of critical angle\n", - "theta_c1=theta_c*180/3.14;\n", - "\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta_01,2),\"degree\";\n", - "print\"The critical angle of the optical fibre is =\",round(theta_c1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.387\n", - "The acceptance angle of the optical fibre is = 22.8 degree\n", - "The critical angle of the optical fibre is = 75.2 degree\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.6 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "NA=0.33; #numerical aperture\n", - "d=0.02; #difference in the refractive index of the core and cladding of the material\n", - "\n", - "#calculate\n", - "#since NA=u1*sqrt(2*d)\n", - "#therefore we have\n", - "u1=NA/math.sqrt(2*d); #calculation of refractive index of the core\n", - "#since d=(u1-u2)/u2\n", - "#therefore we have\n", - "u2=(1-d)*u1; #calculation of refractive index of the cladding\n", - "\n", - "#result\n", - "print\"The refractive index of the core is u1=\",round(u1,2);\n", - "print\"The refractive index of the cladding is u2=\",round(u2,3);\n", - "print \"NOTE: The answer in the textbook is wrong\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The refractive index of the core is u1= 1.65\n", - "The refractive index of the cladding is u2= 1.617\n", - "NOTE: The answer in the textbook is wrong\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.7 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=3.5; #refractive index of core\n", - "u2=3.45; #refractive index of cladding\n", - "u0=1; #refractive index of the air\n", - "\n", - "#calculate\n", - "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", - "NA1=NA/u0;\n", - "alpha=math.asin(NA); #calculation of acceptance angle\n", - "alpha1=alpha*180/3.14;\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA1,2);\n", - "print\"The acceptance angle of the optical fibre is =\",round(alpha1,2),\"degree\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.59\n", - "The acceptance angle of the optical fibre is = 36.14 degree\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.8 , Page no:361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#given\n", - "u1=1.48; #refractive index of core\n", - "u2=1.45; #refractive index of cladding\n", - "\n", - "#calculate\n", - "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", - "theta=math.asin(NA); #calculation of acceptance angle\n", - "theta1=theta*180/3.14;\n", - "#result\n", - "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", - "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";\n", - "print \" (roundoff error)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numerical aperture of the fibre is NA= 0.296\n", - "The acceptance angle of the optical fibre is = 17.26 degree\n", - " (roundoff error)\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics/screenshots/Calculation_of__mean_free_path_of_electron_1.png b/Applied_Physics/screenshots/Calculation_of__mean_free_path_of_electron_1.png deleted file mode 100755 index 37995b76..00000000 Binary files a/Applied_Physics/screenshots/Calculation_of__mean_free_path_of_electron_1.png and /dev/null differ diff --git a/Applied_Physics/screenshots/Calculation_of__potential_energy_1.png b/Applied_Physics/screenshots/Calculation_of__potential_energy_1.png deleted file mode 100755 index f6086db3..00000000 Binary files a/Applied_Physics/screenshots/Calculation_of__potential_energy_1.png and /dev/null differ diff --git a/Applied_Physics/screenshots/Calculation_of_lattice_constant_1.png b/Applied_Physics/screenshots/Calculation_of_lattice_constant_1.png deleted file mode 100755 index cf42154d..00000000 Binary files a/Applied_Physics/screenshots/Calculation_of_lattice_constant_1.png and /dev/null differ diff --git a/Applied_Physics_II/Chapter_1.ipynb b/Applied_Physics_II/Chapter_1.ipynb deleted file mode 100755 index c6e00369..00000000 --- a/Applied_Physics_II/Chapter_1.ipynb +++ /dev/null @@ -1,1108 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1: Interference of Light" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.1, Page number 1-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration\n", - "i = 45 #angle of incidence(degrees)\n", - "t = 4*10**-5 #thickness of film(cm)\n", - "u = 1.2\n", - "\n", - "#Calculations & Result\n", - "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", - "for n in range(1,4):\n", - " lamda = (2*u*t*math.cos(r*math.pi/180))/n\n", - " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-8)\n", - "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For n = 1, wavelength = 7756.29 A\n", - "For n = 2, wavelength = 3878.14 A\n", - "For n = 3, wavelength = 2585.43 A\n", - "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.2, Page number 1-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration\n", - "r = 90 #angle of refraction(degrees)\n", - "t = 5*10**-5 #thickness of film(cm)\n", - "u = 1.33\n", - "\n", - "#Calculations & Result\n", - "for n in range(1,4):\n", - " lamda = (4*u*t*int(math.cos(math.radians(90))))/((2*n)-1)\n", - " print \"For n = %d, wavelength = %.2f A\"%(n,lamda)\n", - "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\"\n", - "\n", - "print \"\\nPlease note: Since r=90, cos(r)=0\\nHence, the answers given in the textbook are incorrect\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For n = 1, wavelength = 0.00 A\n", - "For n = 2, wavelength = 0.00 A\n", - "For n = 3, wavelength = 0.00 A\n", - "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\n", - "\n", - "Please note: Since r=90, cos(r)=0\n", - "Hence, the answers given in the textbook are incorrect\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.3, Page number 1-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration\n", - "i = 45 #angle of incidence(degrees)\n", - "t = 1.5*10**-4 #thickness of film(cm)\n", - "lamda = 5*10**-5 #wavelength(cm)\n", - "u = 4./3. #refractive index\n", - "\n", - "#Calculations\n", - "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", - "n = (2*u*t*math.cos(r*math.pi/180))/lamda\n", - "\n", - "#Result\n", - "print \"The order of interfernce is %.2f, close to 7\"%n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The order of interfernce is 6.78, close to 7\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2.4, Pae number 1-13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration\n", - "i = 45 #angle of incidence(degrees)\n", - "lamda = 5896*10**-8 #wavelength(cm)\n", - "u = 1.33 #refractive index\n", - "n = 1\n", - "\n", - "#Calculations\n", - "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", - "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n", - "\n", - "#Result\n", - "print \"The required thickness is\",round((t/1E-5),2),\"*10^-5 cm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required thickness is 1.31 *10^-5 cm\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.5, Page number 1-14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "lamda1 = 7000 #wavelength(A)\n", - "lamda2 = 5000 #wavelength(A)\n", - "u = 1.3 #R.I. of oil\n", - "\n", - "#Calculations\n", - "'''\n", - "2utcosr = (2n-1)7000/2 ----(1)\n", - "2utcosr = (2n+1)5000/2 ----(2)\n", - "Divinding (1) by (2), we get the following expression\n", - "1 = (2n+1)5000\n", - " -----------\n", - " (2n-1)7000\n", - "Solving the above expression, we get,\n", - "'''\n", - "n = 12000/4000\n", - "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n", - "\n", - "#Result\n", - "print \"The required thickness is\",round((t/1E-5),4),\"*10^-5 cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required thickness is 6.6936 *10^-5 cm\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.6, Page number 1-15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "i = 30 #angle of incidence(degrees)\n", - "lamda = 5890*10**-8 #wavelength(cm)\n", - "u = 1.46 #refractive index\n", - "n = 8\n", - "\n", - "#Calculations\n", - "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", - "t = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", - "\n", - "#Result\n", - "print \"The required thickness is\",round((t/1E-4),3),\"*10^-4 cm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required thickness is 1.718 *10^-4 cm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.7, Page number 1-15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "r = 60 #angle of refraction(degrees)\n", - "lamda = 5890*10**-8 #wavelength(cm)\n", - "u = 1.5 #refractive index\n", - "n = 1 #for minimumm thickness\n", - "\n", - "#Calculations\n", - "#For r = 60\n", - "t1 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", - "\n", - "#For normal incidence \n", - "r = 0\n", - "t2 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", - "\n", - "#Result\n", - "print \"For r = 60, the required thickness is\",round((t1/1E-5),2),\"*10^-5 cm\"\n", - "print \"For r = 0, the required thickness is\",round((t2/1E-5),2),\"*10^-5 cm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For r = 60, the required thickness is 3.93 *10^-5 cm\n", - "For r = 0, the required thickness is 1.96 *10^-5 cm\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.8, Page number 1-16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "r = 0 #for normal incidence(degrees)\n", - "lamda = 5.5*10**-5 #wavelength(cm)\n", - "n = 1 #for minimumm thickness\n", - "A = 10**4 #area(cm^2)\n", - "V = 0.2 #volume(cc)\n", - "\n", - "#Calculations\n", - "t = V/A\n", - "#for nth dark band,\n", - "u = (n*lamda)/(2*t*math.cos(r*math.pi/180))\n", - "\n", - "#Result\n", - "print \"Refractive index =\",u" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index = 1.375\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2.9, Page number 1-17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "r = 60 #angle of incidence(degrees)\n", - "t = 2*10**-7 #thickness of film(cm)\n", - "u = 1.2\n", - "\n", - "#Calculations & Result\n", - "for n in range(1,4):\n", - " lamda = (4*u*t*math.cos(r*math.pi/180))/(2*n-1)\n", - " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-10)\n", - "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For n = 1, wavelength = 4800.00 A\n", - "For n = 2, wavelength = 1600.00 A\n", - "For n = 3, wavelength = 960.00 A\n", - "Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3.1, Page number 1-21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "a = 40. #angle(sec)\n", - "lamda = 1.2 #distance between fringes(cm)\n", - "alpha = 10 #no. of fringes\n", - "\n", - "#Calculations\n", - "Bair = lamda/alpha #cm\n", - "alpha = (a*math.pi)/(3600*180) #radians\n", - "lamda = 2*alpha*Bair\n", - "\n", - "#Result\n", - "print \"Wavelength of monochromatic light =\",round((lamda/1E-8),1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of monochromatic light = 4654.2 A\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3.2, Page number 1-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "lamda = 5893*10**-8 #wavelength(cm)\n", - "u = 1.52 #refractive index\n", - "B = 0.1 #fringe spacing(cm)\n", - "\n", - "#Calculations\n", - "alpha = (lamda/(2*u*B))*180*3600/math.pi #seconds\n", - "\n", - "#Result\n", - "print \"Angle of wedge =\",round(alpha,2),\"secs\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angle of wedge = 39.98 secs\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3.3, Page number 1-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "u = 1.4 #refractive index\n", - "B = 0.25 #fringe spacing(cm)\n", - "a = 20 #angle(secs)\n", - "\n", - "#Calculations\n", - "alpha = (a*math.pi)/(3600*180) #radians\n", - "lamda = 2*u*alpha*B\n", - "\n", - "#Result\n", - "print \"Wavelength of light =\",round((lamda/1E-8),2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of light = 6787.39 A\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3.4, Page number 1-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "u = 1.5 #refractive index\n", - "lamda = 5.82*10**-5 #wavelength(cm)\n", - "a = 20 #angle(secs)\n", - "\n", - "#Calculations\n", - "alpha = (a*math.pi)/(3600*180) #radians\n", - "B = lamda/(2*u*alpha)\n", - "N = 1/B\n", - "\n", - "#Result\n", - "print \"Number of interfernce fronges pr cm is\",round(N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of interfernce fronges pr cm is 5.0\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3.5, Page number 1-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "u = 1 #refractive index for air film\n", - "lamda = 6*10**-5 #wavelength(cm)\n", - "B = 1./10 #distance between fringes(cm)\n", - "\n", - "#Calculations\n", - "alpha = lamda/(2*u*B) #radians\n", - "d = alpha*10\n", - "\n", - "#Result\n", - "print \"Daimeter of wire =\",d,\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Daimeter of wire = 0.003 cm\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3.6, Page number 1-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "alpha = 0.01*10**-1/10 #angle(radians)\n", - "u = 1 #refractive index for air film\n", - "lamda = 5900*10**-10 #wavlength(m)\n", - "\n", - "#Calculation\n", - "B = lamda/(2*u*alpha)\n", - "\n", - "#Result\n", - "print \"Seperation between fringes is\",B/10**-3,\"mm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Seperation between fringes is 2.95 mm\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.1, Page number 1-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "n = 40\n", - "\n", - "#Calculation\n", - "#Equating the equation 4*R*n*lamda=4*4R*n*lamda, we get\n", - "\n", - "N = (4*4*n)/4\n", - "\n", - "#result\n", - "print \"Ring number =\",N" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ring number = 160\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.2, Page number 1-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "n = 10\n", - "Dn = 0.5 #diameter of dark ring(cm)\n", - "lamda = 5*10**-5 #waelength(cm)\n", - "\n", - "#Calculations\n", - "R = Dn**2/(4*n*lamda)\n", - "\n", - "#Result\n", - "print \"Radius of curvature =\",R,\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of curvature = 125.0 cm\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.3, Page number 1-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "n = 5\n", - "p = 10\n", - "D5 = 0.336 #diameter of 5th ring(cm)\n", - "lamda = 5890*10**-8 #waelength(cm)\n", - "D15 = 0.59 #diameter of 15th ringcm\n", - "\n", - "#Calculations\n", - "R = (D15**2-D5**2)/(4*p*lamda)\n", - "\n", - "#Result\n", - "print \"Radius of curvature =\",round(R,2),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius of curvature = 99.83 cm\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.4, Page number 1-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "Dn = 0.42 #diameter of dark ring(cm)\n", - "p = 8 \n", - "R = 200 #radius of curvature(cm)\n", - "Dn8 = 0.7 #diameter of (n+8)th ring(cm)\n", - "\n", - "#Calculations\n", - "lamda = (Dn8**2-Dn**2)/(4*R*p)\n", - "\n", - "#Result\n", - "print \"Wavelength =\",lamda/1E-8,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 4900.0 A\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.5, Page number 1-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "Dn = 0.218 #cm\n", - "Dn10 = 0.451 #cm\n", - "lamda = 5893*10**-8 #wavelength(cm)\n", - "R = 90 #radius of curvature(cm)\n", - "p = 10\n", - "\n", - "#Calculation\n", - "u = (4*p*lamda*R)/(Dn10**2-Dn**2)\n", - "\n", - "#Result\n", - "print \"Refractive index =\",round(u,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index = 1.361\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.6, Page number 1-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Varaible declaration\n", - "D5 = 0.42 #diameter of dark ring(cm)\n", - "\n", - "#Calculations\n", - "'''\n", - "For 5th dark ring,\n", - "D5^2 = 20*R*lamda -----1\n", - "\n", - "For 10th dark ring,\n", - "D10^2 = 40*R*lamda -----2\n", - "\n", - "Substituting 1 in 2,\n", - "'''\n", - "\n", - "D10 = math.sqrt((40*D5**2)/20)\n", - "\n", - "#Result\n", - "print \"Diameter of the 10th dark ring =\",round(D10,3),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter of the 10th dark ring = 0.594 cm\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.7, Page number 1-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "lamda_n = 6000 #wavelength of nth ring(A)\n", - "lamda_n1 = 5000 #wavelength for (n+1)th ring(cm)\n", - "\n", - "#Calculations\n", - "'''\n", - "Dn^2 = 4*R*n*lamda_n ---1\n", - "\n", - "Dn+1^2 = 4*R(n+1)*lamda_n1 ---2\n", - "\n", - "Equating 1 and 2, we get,\n", - "'''\n", - "\n", - "n = 5\n", - "R = 2\n", - "Dn = math.sqrt(4*R*n*lamda_n*10**-8)\n", - "\n", - "#Result\n", - "print \"Diameter =\",round(Dn,3),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter = 0.049 cm\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.8, Page number 1-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "Dair = 2.3 #diameter of ring in air(cm)\n", - "Dliq = 2 #diameter of ring in liquid(cm)\n", - "\n", - "#Calculations\n", - "u = Dair**2/Dliq**2\n", - "\n", - "#Result\n", - "print \"Refractive index =\",u" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index = 1.3225\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.11, Page number 1-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "D4 = 0.4 #diameter of 4th ring(cm)\n", - "D12 = 0.7 #diameter of 12th ring(cm)\n", - "\n", - "#Calculations\n", - "'''\n", - "For D4, \n", - "D4 = math.sqrt(4R*4*lamda)\n", - "'''\n", - "rt_Rl = 0.1\n", - "R = 80 \n", - "\n", - "#For D20,\n", - "D20 = math.sqrt(R)*rt_Rl\n", - "\n", - "#Result\n", - "print \"Diameter of 20th ring =\",round(D20,3),\"cm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter of 20th ring = 0.894 cm\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4.12, Page number 1-36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration \n", - "n = 5\n", - "p = 10\n", - "D5 = 0.336 #diameter of 5th ring(cm)\n", - "D15 = 0.590 #diameter of 15th ring(cm)\n", - "R = 100 #radius of curvature(cm)\n", - "\n", - "#Calculations\n", - "lamda = (D15**2-D5**2)/(4*R*p)\n", - "\n", - "#Result\n", - "print \"Wavlength =\",lamda/1E-8,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavlength = 5880.1 A\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7.1, Page number 1-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda = 560 #wavelength(nm)\n", - "u = 2 #refractive index\n", - "\n", - "#Calculations\n", - "lamda_dash = lamda/u\n", - "t = lamda_dash/4\n", - "\n", - "#Result\n", - "print \"Thickness of film =\",t,\"nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of film = 70 nm\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7.2, Page number 1-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda = 6000 #wavelength(E)\n", - "u = 1.2 #refractive index\n", - "\n", - "#Calculations\n", - "lamda_dash = lamda/u\n", - "t = lamda_dash/4\n", - "\n", - "#Result\n", - "print \"Thickness of film =\",t,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thickness of film = 1250.0 A\n" - ] - } - ], - "prompt_number": 56 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/Chapter_2.ipynb b/Applied_Physics_II/Chapter_2.ipynb deleted file mode 100755 index ae487344..00000000 --- a/Applied_Physics_II/Chapter_2.ipynb +++ /dev/null @@ -1,1000 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2: Diffraction of Light" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2.1, Page number 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "theta = 30 #angle(degrees)\n", - "n = 1 \n", - "lamda = 6500*10**-8 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "a = (n*lamda)/math.sin(theta*math.pi/180)\n", - "\n", - "#Result\n", - "print \"a =\",a/1e-4,\"*10^-4 cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a = 1.3 *10^-4 cm\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2.2, Page number 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "a = 6*10**-4 #width of slit(cm)\n", - "n = 1 #first order\n", - "lamda = 6000*10**-8 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "def deg_to_dms(deg):\n", - " d = int(deg)\n", - " md = abs(deg - d) * 60\n", - " m = int(md)\n", - " sd = (md - m) * 60\n", - " sd=round(sd,2)\n", - " return [d, m, sd]\n", - "\n", - "theta = (math.asin((n*lamda)/a))*180/math.pi\n", - "d = 2*theta #angular seperation\n", - "\n", - "#Result\n", - "print \"Angular seperation between the 1st order minima is\",deg_to_dms(d)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angular seperation between the 1st order minima is [11, 28, 42.03]\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2.3, Page number 2-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 2 #for second minimum\n", - "n2 = 3 #for third minimum\n", - "lamda = 4000 #wavelength(A)\n", - "\n", - "#Calculations\n", - "'''For 2nd order,\n", - "a sin0 = n1*lamda\n", - "\n", - "For 3rd order,\n", - "a sin0 = n2*lamda'''\n", - "\n", - "lamda = (n2*lamda)/n1\n", - "\n", - "#Result\n", - "print \"Wavelength =\",lamda,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 6000 A\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2.4, Page number 2-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "a = 0.16*10**-3 #width of slit(cm)\n", - "n = 1 #first order\n", - "lamda = 5600*10**-10 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "def deg_to_dms(deg):\n", - " d = int(deg)\n", - " md = abs(deg - d) * 60\n", - " m = int(md)\n", - " sd = (md - m) * 60\n", - " sd=round(sd,2)\n", - " return [d, m, sd]\n", - "\n", - "theta = (math.asin((n*lamda)/a))*180/math.pi\n", - "\n", - "\n", - "#Result\n", - "print \"Half angular width=\",deg_to_dms(theta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Half angular width= [0, 12, 1.93]\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2.5, Page number 2-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration\n", - "a = 12*10**-5 #width of slit(cm)\n", - "n = 1 #first order\n", - "lamda = 6000*10**-8 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "theta = (math.asin((n*lamda)/a))*180/math.pi\n", - "\n", - "\n", - "#Result\n", - "print \"Half angular width=\",(theta),\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Half angular width= 30.0 degrees\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2.6, Page number 2-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "a = 2*10**-6 #width of slit(cm)\n", - "n = 1 #first order\n", - "lamda = 6500*10**-10 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "theta = (math.asin((n*lamda)/a))*180/math.pi\n", - "\n", - "\n", - "#Result\n", - "print \"Angle theta =\",round(theta,2),\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Angle theta = 18.97 degrees\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.1, Page number 2-16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "a = 0.16 #width(mm)\n", - "b = 0.8 #distance(mm)\n", - "\n", - "#Calculations & Results\n", - "m = ((a+b)/a)\n", - "\n", - "for n in range(1,4):\n", - " print \"m =\",m*n\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m = 6.0\n", - "m = 12.0\n", - "m = 18.0\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.1, Page number 2-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda1 = 5*10**-5 #cm\n", - "lamda2 = 7*10**-5 #cm\n", - "a_plus_b = 1./4000 #cm\n", - "\n", - "#Calculations\n", - "m_max1 = a_plus_b/lamda1\n", - "m_max2 = round((a_plus_b/lamda2),1)\n", - "\n", - "#Results\n", - "print m_max2,\"orders are visible for 7000 A and\",m_max1,\"orders for 5000 A and either\",m_max2,\",4 or\",m_max1,\"for intermediate wavelengths\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "3.6 orders are visible for 7000 A and 5.0 orders for 5000 A and either 3.6 ,4 or 5.0 for intermediate wavelengths\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.2, Page number 2-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "theta = 30 #angle of diffraction(degrees)\n", - "lamda1 = 5400*10**-8 #cm\n", - "lamda2 = 4050*10**-8 #cm\n", - "\n", - "#Calculations\n", - "m = lamda2/(lamda1-lamda2)\n", - "a_plus_b = (m*lamda1)/math.sin(theta*math.pi/180)\n", - "N = 1/a_plus_b\n", - "\n", - "#Result\n", - "print \"Number of lines per cm =\",round(N,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of lines per cm = 3086.42\n" - ] - } - ], - "prompt_number": 60 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.3, Page number 2-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda = 4992 #A\n", - "m1 = 3 #for 3rd order\n", - "m2 = 4 #for 4th order\n", - "\n", - "#Calculations\n", - "'''For m = 3,\n", - "(a+b)sin0 = 3*lamda\n", - "\n", - "For m = 4,\n", - "(a+b)sin0 = 4*lamda'''\n", - "\n", - "l = (m2*lamda)/m1\n", - "\n", - "#Results\n", - "print \"Wavelength =\",l,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 6656 A\n" - ] - } - ], - "prompt_number": 62 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.4, Page number 2-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda = 6328*10**-8 #wavelength(cm)\n", - "m1 = 1\n", - "m2 = 2\n", - "a_plus_b = 1./6000 #cm\n", - "\n", - "#Calculations\n", - "theta1 = math.asin((m1*lamda)/a_plus_b)*180/math.pi\n", - "theta2 = math.asin((m2*lamda)/a_plus_b)*180/math.pi\n", - "\n", - "#Result\n", - "print \"01 =\",round(theta1,2),\"degrees\"\n", - "print \"02 =\",round(theta2,2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "01 = 22.31 degrees\n", - "02 = 49.41 degrees\n" - ] - } - ], - "prompt_number": 69 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.5, Page number 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 2 #2nd order\n", - "lamda = 5*10**-5 #wavelength(cm)\n", - "theta = 30\n", - "\n", - "#Calculations\n", - "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", - "N = 1/a_plus_b\n", - "\n", - "#Result\n", - "print \"The number of lines/cm of the grating surface is\",N" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The number of lines/cm of the grating surface is 5000.0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.6, Page number 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 3 #3rd order\n", - "a_plus_b = 1./7000 #no. of lines/cm\n", - "sin0 = 1\n", - "\n", - "#Calculation\n", - "lamda = (a_plus_b*sin0)/m\n", - "\n", - "#Result\n", - "print \"Wavelength =\",round(lamda/1e-8),\"A\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 4762.0 A\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.7, Page number 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 1 #1st order\n", - "lamda = 6560*10**-8 #wavelength(cm)\n", - "theta = 16+12./60\n", - "\n", - "#Calculations\n", - "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", - "N = 1/a_plus_b\n", - "w = 2*N\n", - "\n", - "#Result\n", - "print \"The total number of lines is\",round(w)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total number of lines is 8506.0\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.8, Page number 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 1 #1st order\n", - "lamda = 6.56*10**-5 #wavelength(cm)\n", - "theta = 18+14./60\n", - "\n", - "#Calculations\n", - "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", - "N = 1/a_plus_b\n", - "w = 2*N\n", - "\n", - "#Result\n", - "print \"The total number of lines is\",round(w,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total number of lines is 9539.3\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.9, Page number 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda = 6*10**-5 #wavelength(cm)\n", - "a_plus_b = 1./5000 #cm\n", - "\n", - "#Calculations\n", - "m_max = a_plus_b/lamda\n", - "\n", - "#Result\n", - "print \"Order =\",round(m_max)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Order = 3.0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.10, Page number 2-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "lamda = 6000*10**-8 #wavelength(cm)\n", - "a_plus_b = 1./5000 #cm\n", - "\n", - "#Calculations\n", - "m_max = a_plus_b/lamda\n", - "\n", - "#Result\n", - "print \"m_max =\",round(m_max)\n", - "\n", - "#The rest of the solution is theoretical" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m_max = 3.0\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4.11, Page number 2-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 1 #1st order\n", - "lamda = 5790*10**-8 #wavelength(cm)\n", - "theta = 19.994\n", - "\n", - "#Calculations\n", - "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", - "N = 1/a_plus_b\n", - "w = 2.54*N\n", - "\n", - "#Result\n", - "print \"The total number of lines is\",round(w)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total number of lines is 15000.0\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.1, Page number 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Varaible declaration\n", - "n = 3000./0.5 #no. of lines per cm\n", - "m = 2 #for 2nd order\n", - "lamda1 = 5893*10**-8 #wavelength(cm)\n", - "lamda2 = 5896*10**-8 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "a_plus_b = 1/n\n", - "theta1 = math.degrees(math.asin((2*lamda1)/(a_plus_b)))\n", - "theta2 = math.degrees(math.asin((2*lamda2)/(a_plus_b)))\n", - "d = theta2-theta1 #angular seperation\n", - "N = lamda1*10**8/(m*3)\n", - "\n", - "#Result\n", - "print \"Since N=\",round(N),\"which is smaller than 3000 lines, the two lines will be resolved in the second order\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Since N= 982.0 which is smaller than 3000 lines, the two lines will be resolved in the second order\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.2, Page number 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Varaible declaration\n", - "m = 3 #for 3rd order\n", - "lamda = 481 #wavelength(nm)\n", - "n = 620 #no. of ruling per mm\n", - "w = 5.05 #width(mm)\n", - "\n", - "#Calculations\n", - "N = n*w\n", - "dl = lamda/(m*N)\n", - "\n", - "#Result\n", - "print \"Smallest wavelength interval =\",round(dl,4),\"nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Smallest wavelength interval = 0.0512 nm\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.3, Page number 2-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Varaible declaration\n", - "m = 2 #for 2nd order\n", - "lamda = 5890 #wavelength(A)\n", - "dl = 6 #A\n", - "n = 500. #no. of lines per cm\n", - "\n", - "#Calculations\n", - "N = lamda/(dl*m)\n", - "W = N/n\n", - "\n", - "#Result\n", - "print \"Least width =\",W,\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Least width = 0.98 cm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.4, Page number 2-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "N = 3*5000 #no. of lines per cm\n", - "a_plus_b = 1./5000 #cm\n", - "lamda = 5890*10**-8 #wavelength(cm)\n", - "\n", - "#Calculations\n", - "m_max = round(a_plus_b/lamda)\n", - "RP = m_max*N\n", - "\n", - "#Result\n", - "print \"Maximum value of resolving power =\",RP" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum value of resolving power = 45000.0\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.5, Page number 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "m = 2 #for 2nd order\n", - "lamda = 5890 #wavelength(A)\n", - "dl = 6 #A\n", - "w = 3. #width of a line(cm)\n", - "\n", - "#Calculations\n", - "lamda2 = lamda+dl\n", - "N = lamda/(dl*m)\n", - "\n", - "a_plus_b = w/N\n", - "\n", - "#Results\n", - "print \"The minimum no. of lines a grating must have is\",N\n", - "print \"The grating element is\",round(a_plus_b/1e-3,2),\"*10^-3 cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum no. of lines a grating must have is 490\n", - "The grating element is 6.12 *10^-3 cm\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.6, Page number 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Varaible declaration\n", - "N = 40000 #no. of lines per cm\n", - "m = 2 #for 2nd order\n", - "\n", - "#Calculations\n", - "RP = m*N\n", - "\n", - "#Result\n", - "print \"Maximum value of resolving power =\",RP" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum value of resolving power = 80000\n" - ] - } - ], - "prompt_number": 29 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/Chapter_3.ipynb b/Applied_Physics_II/Chapter_3.ipynb deleted file mode 100755 index 61c99435..00000000 --- a/Applied_Physics_II/Chapter_3.ipynb +++ /dev/null @@ -1,779 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Fibre Optics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.1, Page number 3-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.54 #refractive index of core\n", - "NA = 0.5 #numerical aperture\n", - "\n", - "#Calculation\n", - "n2 = math.sqrt(n1**2-NA**2)\n", - "\n", - "#Result\n", - "print \"Refractive index of cladding is\",round(n2,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of cladding is 1.46\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.2, Page number 3-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n2 = 1.59 #refractive index of cladding\n", - "NA = 0.2 #numerical aperture\n", - "n0 = 1.33\n", - "\n", - "#Calculation\n", - "n1 = (math.sqrt(n2**2-NA**2))\n", - "theta_o = (math.asin((math.sqrt(n2**2-n1**2)/n0)))*180/math.pi\n", - "\n", - "#Result\n", - "print \"Refractive index of core is\",n2\n", - "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of core is 1.59\n", - "Acceptance angle = 8.65 degrees\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.3, Page number 3-6\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.49 #refractive index of core\n", - "n2 = 1.44 #refractive index of cladding\n", - "\n", - "#Calculation\n", - "NA = math.sqrt(n1**2-n2**2)\n", - "\n", - "theta_o = math.degrees(math.asin(NA))\n", - "\n", - "#Result\n", - "print \"Numerical Aperture =\",round(NA,5)\n", - "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical Aperture = 0.38275\n", - "Acceptance angle = 22.5 degrees\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.4, Page number 3-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.6 #refractive index of core\n", - "n2 = 1.3 #refractive index of cladding\n", - "\n", - "#Calculation\n", - "theta_c = math.degrees(math.asin(n2/n1))\n", - "\n", - "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n", - "AC = 2*theta_o\n", - "\n", - "#Result\n", - "print \"Critical angle =\",round(theta_c,2),\"degrees\"\n", - "print \"Value of angle of acceptance cone =\",round(AC,3),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Critical angle = 54.34 degrees\n", - "Value of angle of acceptance cone = 137.731 degrees\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.5, Page number 3-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.4 #refractive index of core\n", - "theta_o = 30 #acceptance angle(degrees)\n", - "\n", - "#Calculation\n", - "n2 = math.sqrt(n1**2-math.sin(math.radians(theta_o))**2)\n", - "\n", - "#Result\n", - "print \"Refractive index of cladding is\",round(n2,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of cladding is 1.3077\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.6, Page number 3-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "n1 = 1.563 #refractive index of core\n", - "n2 = 1.498 #refractive index of cladding\n", - "\n", - "#Calculation\n", - "delta = (n1-n2)/n1\n", - "\n", - "#Result\n", - "print \"Fractional index change =\",round(delta,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fractional index change = 0.0416\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.7, Page number 3-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "n1 = 1.50 #refractive index of cladding\n", - "theta_c = 90-5 #critical angle(degrees)\n", - "\n", - "#Calculation\n", - "n2 = math.sin(theta_c*math.pi/180)*n1\n", - "\n", - "#Result\n", - "print \"The maximum index of refraction allowed for cladding is\",round(n2,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum index of refraction allowed for cladding is 1.4943\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.8, Page number 3-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "n1 = 1.33 #refractive index \n", - "theta_o = 30 #acceptance angle in air\n", - "\n", - "#Calculations\n", - "theta_0 = math.degrees(math.asin(math.sin(theta_o*math.pi/180)/n1))\n", - "\n", - "#Result\n", - "print \"Acceptance angle =\",round(theta_0,2),\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Acceptance angle = 22.08 degrees\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.1, Page number 3-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.52 #refractive index of core\n", - "n2 = 1.5189 #refractive index of cladding\n", - "d = 29*10**-6 #core diameter(m)\n", - "lamda = 1.3*10**-6 #wavelength(m)\n", - "\n", - "#Calculation\n", - "V = (math.pi*d*math.sqrt(n1**2-n2**2))/lamda\n", - "\n", - "N = V**2/2\n", - "\n", - "#Results\n", - "print \"Normalized frequency =\",round(V,3)\n", - "print \"Number of modes =\",round(N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Normalized frequency = 4.052\n", - "Number of modes = 8.0\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.2, Page number 3-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.47 #refractive index of core\n", - "n2 = 1.46 #refractive index of cladding\n", - "lamda = 1300*10**-9 #wavelength(nm)\n", - "V = 2.405 #for single mode fibre\n", - "\n", - "#Calculation\n", - "d = (V*lamda)/(math.pi*math.sqrt(n1**2-n2**2))\n", - "r = d/2\n", - "\n", - "#Result\n", - "print \"Radius =\",round(r/1e-6,3),\"um\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius = 2.907 um\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.3, Page number 3-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.48 #refractive index of core\n", - "delta = 0.055 #relative RI\n", - "lamda = 1 #wavelength(um)\n", - "r = 50 #core radius(um)\n", - "\n", - "#Calculations\n", - "n2 = -((delta*n1)-n1)\n", - "\n", - "NA = math.sqrt(n1**2-n2**2)\n", - "\n", - "theta_o = math.degrees(math.asin(NA))\n", - "\n", - "V = (math.pi*2*r*NA)/lamda\n", - "\n", - "N = V**2/2\n", - "\n", - "#Results\n", - "print \"Refractive index of cladding =\",n2\n", - "print \"NA =\",round(NA,3)\n", - "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"\n", - "print \"Normalized frequency =\",round(V,3)\n", - "print \"Number of modes =\",round(N) #Answer differs due to rounding off in 'V'" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refractive index of cladding = 1.3986\n", - "NA = 0.484\n", - "Acceptance angle = 28.95 degrees\n", - "Normalized frequency = 152.073\n", - "Number of modes = 11563.0\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.4, Page number 3-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.45 #refractive index of core\n", - "n2 = 1.448 #refractive index of cladding\n", - "lamda = 1*10**-6 #wavelength(m)\n", - "d = 6*10**-6 #core diameter(m)\n", - "\n", - "#Calculations\n", - "#Case i\n", - "theta_c = math.degrees(math.asin(n2/n1))\n", - "\n", - "#Case ii\n", - "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n", - "\n", - "#Case iii\n", - "NA = math.sqrt(n1**2-n2**2)\n", - "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n", - "\n", - "#Results\n", - "print \"Critical angle =\",round(theta_c),\"degrees\"\n", - "print \"Acceptance angle =\",round(theta_o,3),\"degrees\"\n", - "print \"Number of modes =\",round(N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Critical angle = 87.0 degrees\n", - "Acceptance angle = 4.366 degrees\n", - "Number of modes = 1.0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.5, Page number 3-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.50 #refractive index of core\n", - "n2 = 1.48 #refractive index of cladding\n", - "lamda = 1*10**-6 #wavelength(m)\n", - "d = 2*50*10**-6 #core diameter(m)\n", - "\n", - "#Calculations\n", - "NA = math.sqrt(n1**2-n2**2)\n", - "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n", - "\n", - "#Result\n", - "print \"Number of modes =\",round(N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of modes = 2941.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.6, Page number 3-13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "n1 = 1.55 #refractive index of core\n", - "n2 = 1.50 #refractive index of cladding\n", - "lamda = 1400*10**-9 #wavelength(m)\n", - "d = 40*10**-6 #core diameter(m)\n", - "\n", - "#Calculations\n", - "NA = math.sqrt(n1**2-n2**2)\n", - "\n", - "delta = (n1-n2)/n1\n", - "\n", - "V = (math.pi*d*NA)/lamda\n", - "\n", - "#Results\n", - "print \"NA =\",round(NA,4)\n", - "print \"Fractional index change =\",round(delta,5)\n", - "print \"V-number =\",round(V,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "NA = 0.3905\n", - "Fractional index change = 0.03226\n", - "V-number = 35.05\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6.1, Page number 3-17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Pout = 0.3 #output power(mW)\n", - "Pin = 1 #input power(mW)\n", - "L = 0.1 #fibre length(km)\n", - "\n", - "#Calculation\n", - "a = (-10/L)*math.log10(Pout/Pin)\n", - "\n", - "#Result\n", - "print \"Attenuation =\",round(a,2),\"dB/km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Attenuation = 52.29 dB/km\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6.2, Page number 3-18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Pin = 9 #input power(mW)\n", - "L = 3 #fibre length(km)\n", - "a = 1.5 #loss(dB/km)\n", - "\n", - "#Calculation\n", - "Pl = a*L\n", - "Pout = Pin*10**(-Pl/10)\n", - "\n", - "#Result\n", - "print \"Output power =\",round(Pout,3),\"uW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output power = 3.193 uW\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6.3, Page number 3-18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "a = 2.2 #attenuation(dB/km)\n", - "l1 = 2 #km\n", - "l2 = 6 #km\n", - "from sympy import * \n", - "Pin = symbols('Pin')\n", - "\n", - "#Calculations\n", - "#For 2km,\n", - "Pl1 = a*l1\n", - "Po1 = Pin*round(10**(-Pl1/10),3)\n", - "\n", - "#For 6km,\n", - "Pl2 = a*l2\n", - "Po2 = Pin*round(10**(-Pl2/10),3)\n", - "\n", - "#Results\n", - "print \"After 2 km, Pout =\",Po1\n", - "print \"After 6 km, Pout =\",Po2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "After 2 km, Pout = 0.363*Pin\n", - "After 6 km, Pout = 0.048*Pin\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6.4, Page number 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "Pout = 7.5 #output power(mW)\n", - "Pin = 8.6 #input power(mW)\n", - "L = 0.5 #fibre length(km)\n", - "\n", - "#Calculation\n", - "Pl = -10*math.log10(Pout/Pin)\n", - "a = Pl/L\n", - "\n", - "#Result\n", - "print \"Loss specification =\",round(a,4),\"dB/km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loss specification = 1.1887 dB/km\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/Chapter_4.ipynb b/Applied_Physics_II/Chapter_4.ipynb deleted file mode 100755 index f94b4b09..00000000 --- a/Applied_Physics_II/Chapter_4.ipynb +++ /dev/null @@ -1,141 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4: Lasers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6.1, Page number 4-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "P = 3.147*10**-3 #output power(W)\n", - "t = 60 #time(sec)\n", - "lamda = 632.8*10**-9 #wavelength(m)\n", - "h = 6.63*10**-34 #Planc's constant(J-s)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "\n", - "#Calculations\n", - "N = (P*t*lamda)/(h*c)\n", - "\n", - "#Result\n", - "print \"No. of photons emittd each minute is\",round(N/1e+17),\"*10^17\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "No. of photons emittd each minute is 6.0 *10^17\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6.2, Page number 4-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "T = 300 #temperature(K)\n", - "lamda = 694.3*10**-9 #wavelength(m)\n", - "h = 6.63*10**-34 #Planc's constant(J-s)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "k = 1.38*10**-23 #Boltman's constant(J/K)\n", - "\n", - "#Calculations\n", - "N2_by_N1 = math.exp((-h*c)/(lamda*k*T))\n", - " \n", - "#Result\n", - "print \"Ratio of population =\",round(N2_by_N1/1e-31,3),\"*10^-31\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ratio of population = 8.874 *10^-31\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6.3, Page number 4-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "P = 100*10**3 #output power(W)\n", - "t = 20*10**-9 #time(sec)\n", - "N = 6.981*10**15 #no. of photons\n", - "h = 6.63*10**-34 #Planc's constant(J-s)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "\n", - "#Calculations\n", - "lamda = (N*h*c)/(P*t)\n", - "\n", - "#Result\n", - "print \"Wavelength =\",round(lamda/1e-10),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 6943.0 A\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/Chapter_5.ipynb b/Applied_Physics_II/Chapter_5.ipynb deleted file mode 100755 index 2ad76975..00000000 --- a/Applied_Physics_II/Chapter_5.ipynb +++ /dev/null @@ -1,1097 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5:Quantum Mechanics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.1, Page number 5-5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 10**-2 #mass of object(kg)\n", - "v = 1 #velocity(m/s)\n", - "l = 1*10**-10 #wavelength(m)\n", - "d = 10**-3 #distance travelled(m)\n", - "\n", - "#Calculations\n", - "lamda = h/(m*v)\n", - "\n", - "v = h/(m*l)\n", - "\n", - "t1 = d/v\n", - "t = t1/(365*24*60*60)\n", - "\n", - "#Results\n", - "print \"de Brogile wavelength =\",round(lamda/1e-32,2),\"*10^-32 m\"\n", - "print \"Velocity =\",round(v/1e-22,2),\"*10^-22 m/s(Calculation mistake in the textbook)\"\n", - "print \"Distance travelled =\",round(t/1e+10,2),\"*10^10 years(Calculation mistake in the textbook)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Brogile wavelength = 6.63 *10^-32 m\n", - "Velocity = 6.63 *10^-22 m/s(Calculation mistake in the textbook)\n", - "Distance travelled = 4.78 *10^10 years(Calculation mistake in the textbook)\n" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.2, Page number 5-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "lamda = 1*10**-10 #wavelength(m)\n", - "\n", - "#calculation\n", - "v = h/(m*lamda)\n", - "\n", - "#Result\n", - "print \"Velocity =\",round(v/1e+6,2),\"*10^6 m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity = 7.29 *10^6 m/s\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.3, Page number 5-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "lamda = 5000*10**-10 #wavelength(m)\n", - "\n", - "#calculation\n", - "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n", - "\n", - "#Result\n", - "print \"Kinetic energy =\",round(E/1e-6,5),\"*10^-6 eV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Kinetic energy = 6.03804 *10^-6 eV\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.4, Page number 5-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 1.676*10**-27 #mass of object(kg)\n", - "E = 0.025*1.6*10**-19 #energy(J)\n", - "\n", - "#Calculation\n", - "lamda = h/math.sqrt(2*m*E)\n", - "\n", - "#Result\n", - "print \"Wavelength =\",round(lamda/1e-10,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 1.81 A\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.5, Page number 5-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "E = 120*1.6*10**-19 #energy(J)\n", - "\n", - "#Calculation\n", - "lamda = h/math.sqrt(2*m*E)\n", - "\n", - "#Result\n", - "print \"Wavelength =\",round(lamda/1e-10,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 1.12 A\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.6, Page number 5-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 1.67*10**-27 #mass of neutron(kg)\n", - "lamda = 1*10**-10 #wavelength(m)\n", - "\n", - "#calculation\n", - "v = h/(m*lamda)\n", - "\n", - "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n", - "\n", - "#Result\n", - "print \"Velocity =\",round(v,2),\"m/s\"\n", - "print \"Kinetic energy =\",round(E/1e-2,3),\"*10^-2 eV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity = 3970.06 m/s\n", - "Kinetic energy = 8.225 *10^-2 eV\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.7, Page number 5-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 1 #mass of object(kg)\n", - "v = 1 #velocity(m/s)\n", - "V = 182 #potential differnce(V)\n", - "\n", - "#Calculation\n", - "#Case i\n", - "lamda = 12.27/math.sqrt(V)\n", - "\n", - "#Case ii\n", - "l = h/(m*v)\n", - "\n", - "#Results\n", - "print \"de Brogile wavelength for accelerated electron=\",round(lamda,2),\"A\"\n", - "print \"de Brogile wavelength for object=\",l,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Brogile wavelength for accelerated electron= 0.91 A\n", - "de Brogile wavelength for object= 6.63e-34 A\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.8, Page number 5-9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "lamda = 10**-14 #wavelength(m)\n", - "\n", - "#Calculations\n", - "p = h/lamda\n", - "\n", - "E = (p**2/(2*m))/(1.6*10**-13)\n", - "\n", - "#Results\n", - "print \"Momentum =\",p,\"kg-m/s\"\n", - "print \"Energy =\",round(E,2),\"MeV\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Momentum = 6.63e-20 kg-m/s\n", - "Energy = 15095.09 MeV\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.9, Page number 5-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "V = 3000 #potential differnce(V)\n", - "\n", - "#Calculation\n", - "#Case i\n", - "lamda = 12.27/math.sqrt(V)\n", - "\n", - "#Case ii\n", - "p = h/(lamda*10**-10)\n", - "\n", - "#Case iii\n", - "lamda_b = 1/(lamda*10**-10)\n", - "\n", - "#Case iv\n", - "d = 2.04*10**-10 #m\n", - "n = 1 #for first order\n", - "theta = math.degrees(math.asin((n*lamda*10**-10)/(2*d)))\n", - "\n", - "#Results\n", - "print \"Momentum =\",round(p/1e-23,2),\"*10^-23 kg-m/s\"\n", - "print \"de Brogile wavelength =\",round(lamda,3),\"A\"\n", - "print \"Wave number =\",round(lamda_b/1e+10,3),\"*10^10 /m\"\n", - "print \"Bragg angle =\",round(theta,3),\"degrees\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Momentum = 2.96 *10^-23 kg-m/s\n", - "de Brogile wavelength = 0.224 A\n", - "Wave number = 4.464 *10^10 /m\n", - "Bragg angle = 3.147 degrees\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.10, Page number 5-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "V = 10*10**3 #potential differnce(V)\n", - "\n", - "#Calculation\n", - "lamda = 12.27/math.sqrt(V)\n", - "\n", - "p = h/(lamda*10**-10)\n", - "\n", - "#result\n", - "print \"Wavelength =\",lamda,\"A\"\n", - "print \"Momentum =\",round(p/1e-23,3),\"*10^-23 kg-m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 0.1227 A\n", - "Momentum = 5.403 *10^-23 kg-m/s\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.12, Page number 5-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 6.68*10**-27 #mass of particle(kg)\n", - "E = 1.6*10**-16 #energy(J)\n", - "\n", - "#Calculations\n", - "lamda = h/math.sqrt(2*m*E)\n", - "\n", - "v = h/(m*lamda)\n", - "\n", - "#Results\n", - "print \"Wavelength =\",round(lamda/1e-13,3),\"*10^-13 A\"\n", - "print \"Velocity =\",round(v/1e+5,2),\"*10^5 m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength = 4.535 *10^-13 A\n", - "Velocity = 2.19 *10^5 m/s\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.13, Page number 5-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "E = 1.6*10**-19 #energy(J)\n", - "\n", - "#Calculations\n", - "lamda_ph = (h*c)/E #wavelength of photon\n", - " \n", - "lamda_e = h/math.sqrt(2*m*E) #wavelength of electron\n", - "\n", - "#Result\n", - "print \"Wavelength of proton =\",round(lamda_ph/1e-6,3),\"*10^-6 m\"\n", - "print \"Wavelength of electron =\",round(lamda_e/1e-10,3),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Wavelength of proton = 1.243 *10^-6 m\n", - "Wavelength of electron = 12.286 A\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3.14, Page number 5-13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "\n", - "#Calculations\n", - "E = m*c**2\n", - "lamda = h/math.sqrt(2*m*E)\n", - "\n", - "#Result\n", - "print \"de Brogile wavelength =\",round(lamda/1e-12,3),\"*10^-12 m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "de Brogile wavelength = 1.717 *10^-12 m\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.1, Page number 5-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "del_v = (0.01*400)/100\n", - "\n", - "#Calculation\n", - "del_x = h/(4*math.pi*m*del_v)\n", - "\n", - "#Result\n", - "print \"Accuracy =\",round(del_x/1e-3,2),\"mm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accuracy = 1.45 mm\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.2, Page number 5-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "del_x = 10*10**-9 #m\n", - "E = 1.6*10**-16 #energy(J)\n", - "\n", - "#Calculation\n", - "del_px = h/(4*math.pi*del_x)\n", - "p = math.sqrt(2*m*E)\n", - "per = (del_px/p)*100\n", - "\n", - "#Result\n", - "print \"Percentage of uncertainity =\",round(per,4),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage of uncertainity = 0.0309 %\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.3, Page number 5-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "del_v = (0.01*4*10**5)/100\n", - "\n", - "#Calculation\n", - "del_x = h/(4*math.pi*m*del_v)\n", - "\n", - "#Result\n", - "print \"Accuracy =\",round(del_x/1e-6,2),\"*10^-6 m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accuracy = 1.45 *10^-6 m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.4, Page number 5-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "del_v = (1.88*10**6)/100\n", - "\n", - "#Calculation\n", - "del_x = h/(4*math.pi*m*del_v)\n", - "\n", - "#Result\n", - "print \"Precision =\",round(del_x/1e-9,3),\"*10^-9 m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Precision = 3.084 *10^-9 m\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.5, Page number 5-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "lamda = 4*10**-7 #wavelength(m)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "del_l = 8*10**-15 #spectral width(m)\n", - "\n", - "#calculation\n", - "del_t = lamda**2/(4*math.pi*c*del_l)\n", - "\n", - "#Result\n", - "print \"Time spent by the elctrons =\",round(del_t/1e-9,3),\"*10^-9 s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time spent by the elctrons = 5.305 *10^-9 s\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.6, Page number 5-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "del_t = 1.4*10**-10 #time spent(s)\n", - "\n", - "#calculation\n", - "E = (h/(4*math.pi*del_t))/(1.6*10**-19)\n", - "\n", - "#Result\n", - "print \"Uncertainity =\",round(E/1e-6,2),\"*10^-6 eV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Uncertainity = 2.36 *10^-6 eV\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7.7, Page number 5-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "lamda = 546*10**-9 #wavelength(m)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "del_l = 10**-14 #spectral width(m)\n", - "\n", - "#calculation\n", - "del_t = lamda**2/(4*math.pi*c*del_l)\n", - "\n", - "#Result\n", - "print \"Time spent by the elctrons =\",round(del_t/1e-9,2),\"*10^-9 s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time spent by the elctrons = 7.91 *10^-9 s\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15.1, Page number 5-41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "L = 2*10**-10 #width(m)\n", - "\n", - "#Calculation\n", - "E1 = (h**2/(8*m*L**2))/(1.6*10**-19)\n", - "E2 = 4*E1\n", - "E3 = 9*E1\n", - "\n", - "#Result\n", - "print \"Energy of electron in ground state =\",round(E1,3),\"eV\"\n", - "print \"Energy of electron in first state =\",round(E2,3),\"eV\"\n", - "print \"Energy of electron in second state =\",round(E3,3),\"eV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy of electron in ground state = 9.434 eV\n", - "Energy of electron in first state = 37.738 eV\n", - "Energy of electron in second state = 84.91 eV\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15.2, Page number 5-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "L = 5.6*10**-3 #width(m)\n", - "\n", - "#Calculation\n", - "E = L/4\n", - "\n", - "#Result\n", - "print \"Ground state energy =\",E,\"eV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ground state energy = 0.0014 eV\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15.4, Page number 5-43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import scipy\n", - "from scipy import integrate\n", - "\n", - "#Variable declaration\n", - "#Intervals\n", - "x1 = 0\n", - "x2 = 1./2\n", - "\n", - "#Calculation\n", - "x = lambda x: 3*x**2\n", - "P = integrate.quad(x, x1, x2)\n", - "\n", - "#Result\n", - "print \"Probability =\",P[0]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Probability = 0.125\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15.5, Page number 5-44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m1 = 9.1*10**-31 #mass of electron(kg)\n", - "m2 = 10**-9 #mass of grain dust(kg)\n", - "L1 = 10**-9 #width(m)\n", - "L2 = 10**-4 #width(m)\n", - "\n", - "#Calculation\n", - "#For electron\n", - "print \"For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\"\n", - "for n in range(1,4):\n", - " En1 = ((n**2*h**2)/(8*m*L1**2))/(1.6*10**-19)\n", - " print round(En1,4),\"eV\"\n", - " \n", - "#For the grain of dust\n", - "print \"\\nFor a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\"\n", - "for n in range(1,4):\n", - " En2 = ((n**2*h**2)/(8*m2*L2**2))/(1.6*10**-19)\n", - " print round(En2/1e-32,3),\"eV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\n", - "0.3774 eV\n", - "1.5095 eV\n", - "3.3964 eV\n", - "\n", - "For a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\n", - "3.434 eV\n", - "13.737 eV\n", - "30.907 eV\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15.6, Page number 5-45\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "E1 = 38*1.6*10**-19 #energy(J)\n", - "\n", - "#Calculation\n", - "L = math.sqrt(h**2/(8*m*E1))\n", - " \n", - "#Result\n", - "print \"Width of well =\",round(L/1e-10,4),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Width of well = 0.9965 A\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15.7, Page number 5-45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "h = 6.63*10**-34 #Planck's constant(J-s)\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "L = 5*10**-10 #width(m)\n", - "n1 = 1\n", - "n2 = 2\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "\n", - "#Calculation\n", - "E = ((3*h**2)/(8*m*L**2)) #E2-E1\n", - "Ev = E/(1.6-10**-19) #J\n", - "lamda = (h*c)/E\n", - "\n", - "#Result\n", - "print \"Energy =\",round(Ev/1e-19,2),\"eV\"\n", - "print \"Wavelength =\",round(lamda/1e-7,3),\"*10^-7 m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy = 4.53 eV\n", - "Wavelength = 2.745 *10^-7 m\n" - ] - } - ], - "prompt_number": 55 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/Chapter_6.ipynb b/Applied_Physics_II/Chapter_6.ipynb deleted file mode 100755 index cc609a3f..00000000 --- a/Applied_Physics_II/Chapter_6.ipynb +++ /dev/null @@ -1,189 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6: Motion of charge particle in Electric & Magnetic fields" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1.1, Page number 6-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "v = 2.5*10**6 #velocity of electron(m/s)\n", - "theta = 30*math.pi/180 #angle(degrees)\n", - "B = 0.94*10**-4 #field strength(Wb/m^2)\n", - "e = 1.6*10**-19 #electron charge(C)\n", - "\n", - "#Calculations\n", - "r = (m*v*math.sin(theta))/(B*e)\n", - "\n", - "l = (5*v*math.cos(theta)*2*math.pi*m)/(B*e)\n", - "\n", - "#Results\n", - "print \"Radius =\",round(r/1e-3,2),\"mm\"\n", - "print \"Distance covered =\",round(l,3),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius = 75.63 mm\n", - "Distance covered = 4.115 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1.2, Page number 6-7 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "m = 9.1*10**-31 #mass of electron(kg)\n", - "v = 3*10**7 #velocity of electron(m/s)\n", - "theta = 45*math.pi/180 #angle(degrees)\n", - "B = 0.23*10**-4 #field strength(Wb/m^2)\n", - "e = 1.6*10**-19 #electron charge(C)\n", - "\n", - "#Calculations\n", - "r = (m*v*math.sin(theta))/(B*e)\n", - "\n", - "l = (v*math.cos(theta)*2*math.pi*m)/(B*e)\n", - "\n", - "#Results\n", - "print \"Radius =\",round(r,2),\"m\"\n", - "print \"Distance covered =\",round(l,3),\"m\"\n", - "#Calculation mistakes in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radius = 5.25 m\n", - "Distance covered = 32.959 m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1.3, Page number 6-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "y = 1.5 #displacement(cm)\n", - "d = 0.42 #distance(cm)\n", - "Va = 1.6*10**3 #anode voltage(V)\n", - "D = 28 #cm\n", - "l = 1.8 #length of plates(cm)\n", - "\n", - "#Calculation\n", - "V = (2*y*d*Va)/(D*l)\n", - "Vin = V/6\n", - "\n", - "#Result\n", - "print \"Input voltage =\",round(Vin,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Input voltage = 6.67 V\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5.1, Page number 6-16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "da = 0.8 #minor axis(cm)\n", - "db = 2 #major axis(cm)\n", - "\n", - "#Calculation\n", - "ps = math.degrees(math.asin(da/db))\n", - "\n", - "#Result\n", - "print \"Phase shift =\",round(ps,2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Phase shift = 23.58 degrees\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/Chapter_7.ipynb b/Applied_Physics_II/Chapter_7.ipynb deleted file mode 100755 index 3425e831..00000000 --- a/Applied_Physics_II/Chapter_7.ipynb +++ /dev/null @@ -1,178 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7: Superconductivity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3.1, Page number 7-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Ho = 2.*10**5 #A/m\n", - "Hc = 1.*10**5 #A/m\n", - "T = 8. #temperature(K)\n", - "\n", - "#Calculations\n", - "Tc = math.sqrt(T**2/(1-(Hc/Ho)))\n", - "\n", - "#Result\n", - "print \"Critical temperature =\",round(Tc,3),\"K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Critical temperature = 11.314 K\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3.2, Page number 7-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Bo = 0.0306 #Critical field at 0K(T)\n", - "Tc = 3.7 #critical temperature(K)\n", - "T = 2 #K\n", - "\n", - "#calculation\n", - "Bc = Bo*(1-((T/Tc)**2))\n", - "\n", - "#Result\n", - "print \"Critical field at 2K is\",round(Bc,5),\"T\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Critical field at 2K is 0.02166 T\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3.3, Page number 7-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Ho = 6.5*10**4 #Critical field at 0K(T)\n", - "Tc = 7.18 #critical temperature(K)\n", - "T = 4.2 #K\n", - "r = 0.5*10**-3 #radius(m)\n", - "\n", - "#calculation\n", - "Hc = Ho*(1-((T/Tc)**2))\n", - "Ic = 2*math.pi*r*Hc\n", - "\n", - "#Result\n", - "print \"Critical current =\",round(Ic,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Critical current = 134.33 A\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3.4, Page number 7-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "Tc1 = 4.185 #critical temperature(K)\n", - "M1 = 199.5 #isotopic mass\n", - "Tc2 = 4.133 #K\n", - "\n", - "#calculation\n", - "M2 = ((Tc1*M1**0.5)/Tc2)**2\n", - "\n", - "#Result\n", - "print \"Isotopic mass =\",round(M2,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Isotopic mass = 204.55\n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Applied_Physics_II/README.txt b/Applied_Physics_II/README.txt deleted file mode 100755 index 717d1591..00000000 --- a/Applied_Physics_II/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Muktesh Chaudhary -Course: be -College/Institute/Organization: Anglo Eastern ship management india Pvt. Ltd -Department/Designation: Electrical & Electronics Officer -Book Title: Applied Physics II -Author: H. J. Sawant -Publisher: Technical Publications -Year of publication: 2014 -Isbn: 978-93-5038-883-9 -Edition: 2nd \ No newline at end of file diff --git a/Applied_Physics_II/screenshots/halfangular.png b/Applied_Physics_II/screenshots/halfangular.png deleted file mode 100755 index 6c38e8b8..00000000 Binary files a/Applied_Physics_II/screenshots/halfangular.png and /dev/null differ diff --git a/Applied_Physics_II/screenshots/probability.png b/Applied_Physics_II/screenshots/probability.png deleted file mode 100755 index f8d2ba6f..00000000 Binary files a/Applied_Physics_II/screenshots/probability.png and /dev/null differ diff --git a/Applied_Physics_II/screenshots/visiblerange.png b/Applied_Physics_II/screenshots/visiblerange.png deleted file mode 100755 index c4d798f7..00000000 Binary files a/Applied_Physics_II/screenshots/visiblerange.png and /dev/null differ diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb new file mode 100755 index 00000000..c6e00369 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb @@ -0,0 +1,1108 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Interference of Light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.1, Page number 1-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "i = 45 #angle of incidence(degrees)\n", + "t = 4*10**-5 #thickness of film(cm)\n", + "u = 1.2\n", + "\n", + "#Calculations & Result\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "for n in range(1,4):\n", + " lamda = (2*u*t*math.cos(r*math.pi/180))/n\n", + " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-8)\n", + "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 1, wavelength = 7756.29 A\n", + "For n = 2, wavelength = 3878.14 A\n", + "For n = 3, wavelength = 2585.43 A\n", + "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.2, Page number 1-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "r = 90 #angle of refraction(degrees)\n", + "t = 5*10**-5 #thickness of film(cm)\n", + "u = 1.33\n", + "\n", + "#Calculations & Result\n", + "for n in range(1,4):\n", + " lamda = (4*u*t*int(math.cos(math.radians(90))))/((2*n)-1)\n", + " print \"For n = %d, wavelength = %.2f A\"%(n,lamda)\n", + "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\"\n", + "\n", + "print \"\\nPlease note: Since r=90, cos(r)=0\\nHence, the answers given in the textbook are incorrect\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 1, wavelength = 0.00 A\n", + "For n = 2, wavelength = 0.00 A\n", + "For n = 3, wavelength = 0.00 A\n", + "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\n", + "\n", + "Please note: Since r=90, cos(r)=0\n", + "Hence, the answers given in the textbook are incorrect\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.3, Page number 1-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "i = 45 #angle of incidence(degrees)\n", + "t = 1.5*10**-4 #thickness of film(cm)\n", + "lamda = 5*10**-5 #wavelength(cm)\n", + "u = 4./3. #refractive index\n", + "\n", + "#Calculations\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "n = (2*u*t*math.cos(r*math.pi/180))/lamda\n", + "\n", + "#Result\n", + "print \"The order of interfernce is %.2f, close to 7\"%n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The order of interfernce is 6.78, close to 7\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2.4, Pae number 1-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "i = 45 #angle of incidence(degrees)\n", + "lamda = 5896*10**-8 #wavelength(cm)\n", + "u = 1.33 #refractive index\n", + "n = 1\n", + "\n", + "#Calculations\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round((t/1E-5),2),\"*10^-5 cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 1.31 *10^-5 cm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.5, Page number 1-14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "lamda1 = 7000 #wavelength(A)\n", + "lamda2 = 5000 #wavelength(A)\n", + "u = 1.3 #R.I. of oil\n", + "\n", + "#Calculations\n", + "'''\n", + "2utcosr = (2n-1)7000/2 ----(1)\n", + "2utcosr = (2n+1)5000/2 ----(2)\n", + "Divinding (1) by (2), we get the following expression\n", + "1 = (2n+1)5000\n", + " -----------\n", + " (2n-1)7000\n", + "Solving the above expression, we get,\n", + "'''\n", + "n = 12000/4000\n", + "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round((t/1E-5),4),\"*10^-5 cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 6.6936 *10^-5 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.6, Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "i = 30 #angle of incidence(degrees)\n", + "lamda = 5890*10**-8 #wavelength(cm)\n", + "u = 1.46 #refractive index\n", + "n = 8\n", + "\n", + "#Calculations\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "t = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round((t/1E-4),3),\"*10^-4 cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 1.718 *10^-4 cm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.7, Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r = 60 #angle of refraction(degrees)\n", + "lamda = 5890*10**-8 #wavelength(cm)\n", + "u = 1.5 #refractive index\n", + "n = 1 #for minimumm thickness\n", + "\n", + "#Calculations\n", + "#For r = 60\n", + "t1 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", + "\n", + "#For normal incidence \n", + "r = 0\n", + "t2 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", + "\n", + "#Result\n", + "print \"For r = 60, the required thickness is\",round((t1/1E-5),2),\"*10^-5 cm\"\n", + "print \"For r = 0, the required thickness is\",round((t2/1E-5),2),\"*10^-5 cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For r = 60, the required thickness is 3.93 *10^-5 cm\n", + "For r = 0, the required thickness is 1.96 *10^-5 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.8, Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r = 0 #for normal incidence(degrees)\n", + "lamda = 5.5*10**-5 #wavelength(cm)\n", + "n = 1 #for minimumm thickness\n", + "A = 10**4 #area(cm^2)\n", + "V = 0.2 #volume(cc)\n", + "\n", + "#Calculations\n", + "t = V/A\n", + "#for nth dark band,\n", + "u = (n*lamda)/(2*t*math.cos(r*math.pi/180))\n", + "\n", + "#Result\n", + "print \"Refractive index =\",u" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.375\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.9, Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r = 60 #angle of incidence(degrees)\n", + "t = 2*10**-7 #thickness of film(cm)\n", + "u = 1.2\n", + "\n", + "#Calculations & Result\n", + "for n in range(1,4):\n", + " lamda = (4*u*t*math.cos(r*math.pi/180))/(2*n-1)\n", + " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-10)\n", + "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 1, wavelength = 4800.00 A\n", + "For n = 2, wavelength = 1600.00 A\n", + "For n = 3, wavelength = 960.00 A\n", + "Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.1, Page number 1-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "a = 40. #angle(sec)\n", + "lamda = 1.2 #distance between fringes(cm)\n", + "alpha = 10 #no. of fringes\n", + "\n", + "#Calculations\n", + "Bair = lamda/alpha #cm\n", + "alpha = (a*math.pi)/(3600*180) #radians\n", + "lamda = 2*alpha*Bair\n", + "\n", + "#Result\n", + "print \"Wavelength of monochromatic light =\",round((lamda/1E-8),1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of monochromatic light = 4654.2 A\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.2, Page number 1-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "lamda = 5893*10**-8 #wavelength(cm)\n", + "u = 1.52 #refractive index\n", + "B = 0.1 #fringe spacing(cm)\n", + "\n", + "#Calculations\n", + "alpha = (lamda/(2*u*B))*180*3600/math.pi #seconds\n", + "\n", + "#Result\n", + "print \"Angle of wedge =\",round(alpha,2),\"secs\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of wedge = 39.98 secs\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.3, Page number 1-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "u = 1.4 #refractive index\n", + "B = 0.25 #fringe spacing(cm)\n", + "a = 20 #angle(secs)\n", + "\n", + "#Calculations\n", + "alpha = (a*math.pi)/(3600*180) #radians\n", + "lamda = 2*u*alpha*B\n", + "\n", + "#Result\n", + "print \"Wavelength of light =\",round((lamda/1E-8),2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light = 6787.39 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.4, Page number 1-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "u = 1.5 #refractive index\n", + "lamda = 5.82*10**-5 #wavelength(cm)\n", + "a = 20 #angle(secs)\n", + "\n", + "#Calculations\n", + "alpha = (a*math.pi)/(3600*180) #radians\n", + "B = lamda/(2*u*alpha)\n", + "N = 1/B\n", + "\n", + "#Result\n", + "print \"Number of interfernce fronges pr cm is\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of interfernce fronges pr cm is 5.0\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.5, Page number 1-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "u = 1 #refractive index for air film\n", + "lamda = 6*10**-5 #wavelength(cm)\n", + "B = 1./10 #distance between fringes(cm)\n", + "\n", + "#Calculations\n", + "alpha = lamda/(2*u*B) #radians\n", + "d = alpha*10\n", + "\n", + "#Result\n", + "print \"Daimeter of wire =\",d,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Daimeter of wire = 0.003 cm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.6, Page number 1-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "alpha = 0.01*10**-1/10 #angle(radians)\n", + "u = 1 #refractive index for air film\n", + "lamda = 5900*10**-10 #wavlength(m)\n", + "\n", + "#Calculation\n", + "B = lamda/(2*u*alpha)\n", + "\n", + "#Result\n", + "print \"Seperation between fringes is\",B/10**-3,\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Seperation between fringes is 2.95 mm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.1, Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 40\n", + "\n", + "#Calculation\n", + "#Equating the equation 4*R*n*lamda=4*4R*n*lamda, we get\n", + "\n", + "N = (4*4*n)/4\n", + "\n", + "#result\n", + "print \"Ring number =\",N" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ring number = 160\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.2, Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 10\n", + "Dn = 0.5 #diameter of dark ring(cm)\n", + "lamda = 5*10**-5 #waelength(cm)\n", + "\n", + "#Calculations\n", + "R = Dn**2/(4*n*lamda)\n", + "\n", + "#Result\n", + "print \"Radius of curvature =\",R,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature = 125.0 cm\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.3, Page number 1-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 5\n", + "p = 10\n", + "D5 = 0.336 #diameter of 5th ring(cm)\n", + "lamda = 5890*10**-8 #waelength(cm)\n", + "D15 = 0.59 #diameter of 15th ringcm\n", + "\n", + "#Calculations\n", + "R = (D15**2-D5**2)/(4*p*lamda)\n", + "\n", + "#Result\n", + "print \"Radius of curvature =\",round(R,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature = 99.83 cm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.4, Page number 1-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "Dn = 0.42 #diameter of dark ring(cm)\n", + "p = 8 \n", + "R = 200 #radius of curvature(cm)\n", + "Dn8 = 0.7 #diameter of (n+8)th ring(cm)\n", + "\n", + "#Calculations\n", + "lamda = (Dn8**2-Dn**2)/(4*R*p)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",lamda/1E-8,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 4900.0 A\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.5, Page number 1-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "Dn = 0.218 #cm\n", + "Dn10 = 0.451 #cm\n", + "lamda = 5893*10**-8 #wavelength(cm)\n", + "R = 90 #radius of curvature(cm)\n", + "p = 10\n", + "\n", + "#Calculation\n", + "u = (4*p*lamda*R)/(Dn10**2-Dn**2)\n", + "\n", + "#Result\n", + "print \"Refractive index =\",round(u,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.361\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.6, Page number 1-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Varaible declaration\n", + "D5 = 0.42 #diameter of dark ring(cm)\n", + "\n", + "#Calculations\n", + "'''\n", + "For 5th dark ring,\n", + "D5^2 = 20*R*lamda -----1\n", + "\n", + "For 10th dark ring,\n", + "D10^2 = 40*R*lamda -----2\n", + "\n", + "Substituting 1 in 2,\n", + "'''\n", + "\n", + "D10 = math.sqrt((40*D5**2)/20)\n", + "\n", + "#Result\n", + "print \"Diameter of the 10th dark ring =\",round(D10,3),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of the 10th dark ring = 0.594 cm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.7, Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "lamda_n = 6000 #wavelength of nth ring(A)\n", + "lamda_n1 = 5000 #wavelength for (n+1)th ring(cm)\n", + "\n", + "#Calculations\n", + "'''\n", + "Dn^2 = 4*R*n*lamda_n ---1\n", + "\n", + "Dn+1^2 = 4*R(n+1)*lamda_n1 ---2\n", + "\n", + "Equating 1 and 2, we get,\n", + "'''\n", + "\n", + "n = 5\n", + "R = 2\n", + "Dn = math.sqrt(4*R*n*lamda_n*10**-8)\n", + "\n", + "#Result\n", + "print \"Diameter =\",round(Dn,3),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 0.049 cm\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.8, Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "Dair = 2.3 #diameter of ring in air(cm)\n", + "Dliq = 2 #diameter of ring in liquid(cm)\n", + "\n", + "#Calculations\n", + "u = Dair**2/Dliq**2\n", + "\n", + "#Result\n", + "print \"Refractive index =\",u" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.3225\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.11, Page number 1-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "D4 = 0.4 #diameter of 4th ring(cm)\n", + "D12 = 0.7 #diameter of 12th ring(cm)\n", + "\n", + "#Calculations\n", + "'''\n", + "For D4, \n", + "D4 = math.sqrt(4R*4*lamda)\n", + "'''\n", + "rt_Rl = 0.1\n", + "R = 80 \n", + "\n", + "#For D20,\n", + "D20 = math.sqrt(R)*rt_Rl\n", + "\n", + "#Result\n", + "print \"Diameter of 20th ring =\",round(D20,3),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of 20th ring = 0.894 cm\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.12, Page number 1-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 5\n", + "p = 10\n", + "D5 = 0.336 #diameter of 5th ring(cm)\n", + "D15 = 0.590 #diameter of 15th ring(cm)\n", + "R = 100 #radius of curvature(cm)\n", + "\n", + "#Calculations\n", + "lamda = (D15**2-D5**2)/(4*R*p)\n", + "\n", + "#Result\n", + "print \"Wavlength =\",lamda/1E-8,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavlength = 5880.1 A\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7.1, Page number 1-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 560 #wavelength(nm)\n", + "u = 2 #refractive index\n", + "\n", + "#Calculations\n", + "lamda_dash = lamda/u\n", + "t = lamda_dash/4\n", + "\n", + "#Result\n", + "print \"Thickness of film =\",t,\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of film = 70 nm\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7.2, Page number 1-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6000 #wavelength(E)\n", + "u = 1.2 #refractive index\n", + "\n", + "#Calculations\n", + "lamda_dash = lamda/u\n", + "t = lamda_dash/4\n", + "\n", + "#Result\n", + "print \"Thickness of film =\",t,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of film = 1250.0 A\n" + ] + } + ], + "prompt_number": 56 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb new file mode 100755 index 00000000..ae487344 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb @@ -0,0 +1,1000 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Diffraction of Light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.1, Page number 2-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "theta = 30 #angle(degrees)\n", + "n = 1 \n", + "lamda = 6500*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "a = (n*lamda)/math.sin(theta*math.pi/180)\n", + "\n", + "#Result\n", + "print \"a =\",a/1e-4,\"*10^-4 cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 1.3 *10^-4 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.2, Page number 2-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a = 6*10**-4 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 6000*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "def deg_to_dms(deg):\n", + " d = int(deg)\n", + " md = abs(deg - d) * 60\n", + " m = int(md)\n", + " sd = (md - m) * 60\n", + " sd=round(sd,2)\n", + " return [d, m, sd]\n", + "\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "d = 2*theta #angular seperation\n", + "\n", + "#Result\n", + "print \"Angular seperation between the 1st order minima is\",deg_to_dms(d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular seperation between the 1st order minima is [11, 28, 42.03]\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.3, Page number 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 2 #for second minimum\n", + "n2 = 3 #for third minimum\n", + "lamda = 4000 #wavelength(A)\n", + "\n", + "#Calculations\n", + "'''For 2nd order,\n", + "a sin0 = n1*lamda\n", + "\n", + "For 3rd order,\n", + "a sin0 = n2*lamda'''\n", + "\n", + "lamda = (n2*lamda)/n1\n", + "\n", + "#Result\n", + "print \"Wavelength =\",lamda,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6000 A\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.4, Page number 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a = 0.16*10**-3 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 5600*10**-10 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "def deg_to_dms(deg):\n", + " d = int(deg)\n", + " md = abs(deg - d) * 60\n", + " m = int(md)\n", + " sd = (md - m) * 60\n", + " sd=round(sd,2)\n", + " return [d, m, sd]\n", + "\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "\n", + "\n", + "#Result\n", + "print \"Half angular width=\",deg_to_dms(theta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half angular width= [0, 12, 1.93]\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.5, Page number 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a = 12*10**-5 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 6000*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "\n", + "\n", + "#Result\n", + "print \"Half angular width=\",(theta),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half angular width= 30.0 degrees\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.6, Page number 2-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a = 2*10**-6 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 6500*10**-10 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "\n", + "\n", + "#Result\n", + "print \"Angle theta =\",round(theta,2),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle theta = 18.97 degrees\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.1, Page number 2-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "a = 0.16 #width(mm)\n", + "b = 0.8 #distance(mm)\n", + "\n", + "#Calculations & Results\n", + "m = ((a+b)/a)\n", + "\n", + "for n in range(1,4):\n", + " print \"m =\",m*n\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m = 6.0\n", + "m = 12.0\n", + "m = 18.0\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.1, Page number 2-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda1 = 5*10**-5 #cm\n", + "lamda2 = 7*10**-5 #cm\n", + "a_plus_b = 1./4000 #cm\n", + "\n", + "#Calculations\n", + "m_max1 = a_plus_b/lamda1\n", + "m_max2 = round((a_plus_b/lamda2),1)\n", + "\n", + "#Results\n", + "print m_max2,\"orders are visible for 7000 A and\",m_max1,\"orders for 5000 A and either\",m_max2,\",4 or\",m_max1,\"for intermediate wavelengths\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.6 orders are visible for 7000 A and 5.0 orders for 5000 A and either 3.6 ,4 or 5.0 for intermediate wavelengths\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.2, Page number 2-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "theta = 30 #angle of diffraction(degrees)\n", + "lamda1 = 5400*10**-8 #cm\n", + "lamda2 = 4050*10**-8 #cm\n", + "\n", + "#Calculations\n", + "m = lamda2/(lamda1-lamda2)\n", + "a_plus_b = (m*lamda1)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "\n", + "#Result\n", + "print \"Number of lines per cm =\",round(N,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of lines per cm = 3086.42\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.3, Page number 2-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 4992 #A\n", + "m1 = 3 #for 3rd order\n", + "m2 = 4 #for 4th order\n", + "\n", + "#Calculations\n", + "'''For m = 3,\n", + "(a+b)sin0 = 3*lamda\n", + "\n", + "For m = 4,\n", + "(a+b)sin0 = 4*lamda'''\n", + "\n", + "l = (m2*lamda)/m1\n", + "\n", + "#Results\n", + "print \"Wavelength =\",l,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6656 A\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.4, Page number 2-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6328*10**-8 #wavelength(cm)\n", + "m1 = 1\n", + "m2 = 2\n", + "a_plus_b = 1./6000 #cm\n", + "\n", + "#Calculations\n", + "theta1 = math.asin((m1*lamda)/a_plus_b)*180/math.pi\n", + "theta2 = math.asin((m2*lamda)/a_plus_b)*180/math.pi\n", + "\n", + "#Result\n", + "print \"01 =\",round(theta1,2),\"degrees\"\n", + "print \"02 =\",round(theta2,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "01 = 22.31 degrees\n", + "02 = 49.41 degrees\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.5, Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 2 #2nd order\n", + "lamda = 5*10**-5 #wavelength(cm)\n", + "theta = 30\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "\n", + "#Result\n", + "print \"The number of lines/cm of the grating surface is\",N" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of lines/cm of the grating surface is 5000.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.6, Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 3 #3rd order\n", + "a_plus_b = 1./7000 #no. of lines/cm\n", + "sin0 = 1\n", + "\n", + "#Calculation\n", + "lamda = (a_plus_b*sin0)/m\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-8),\"A\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 4762.0 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.7, Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1 #1st order\n", + "lamda = 6560*10**-8 #wavelength(cm)\n", + "theta = 16+12./60\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "w = 2*N\n", + "\n", + "#Result\n", + "print \"The total number of lines is\",round(w)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of lines is 8506.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.8, Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1 #1st order\n", + "lamda = 6.56*10**-5 #wavelength(cm)\n", + "theta = 18+14./60\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "w = 2*N\n", + "\n", + "#Result\n", + "print \"The total number of lines is\",round(w,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of lines is 9539.3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.9, Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6*10**-5 #wavelength(cm)\n", + "a_plus_b = 1./5000 #cm\n", + "\n", + "#Calculations\n", + "m_max = a_plus_b/lamda\n", + "\n", + "#Result\n", + "print \"Order =\",round(m_max)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Order = 3.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.10, Page number 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6000*10**-8 #wavelength(cm)\n", + "a_plus_b = 1./5000 #cm\n", + "\n", + "#Calculations\n", + "m_max = a_plus_b/lamda\n", + "\n", + "#Result\n", + "print \"m_max =\",round(m_max)\n", + "\n", + "#The rest of the solution is theoretical" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m_max = 3.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.11, Page number 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1 #1st order\n", + "lamda = 5790*10**-8 #wavelength(cm)\n", + "theta = 19.994\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "w = 2.54*N\n", + "\n", + "#Result\n", + "print \"The total number of lines is\",round(w)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of lines is 15000.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.1, Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Varaible declaration\n", + "n = 3000./0.5 #no. of lines per cm\n", + "m = 2 #for 2nd order\n", + "lamda1 = 5893*10**-8 #wavelength(cm)\n", + "lamda2 = 5896*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "a_plus_b = 1/n\n", + "theta1 = math.degrees(math.asin((2*lamda1)/(a_plus_b)))\n", + "theta2 = math.degrees(math.asin((2*lamda2)/(a_plus_b)))\n", + "d = theta2-theta1 #angular seperation\n", + "N = lamda1*10**8/(m*3)\n", + "\n", + "#Result\n", + "print \"Since N=\",round(N),\"which is smaller than 3000 lines, the two lines will be resolved in the second order\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since N= 982.0 which is smaller than 3000 lines, the two lines will be resolved in the second order\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.2, Page number 2-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Varaible declaration\n", + "m = 3 #for 3rd order\n", + "lamda = 481 #wavelength(nm)\n", + "n = 620 #no. of ruling per mm\n", + "w = 5.05 #width(mm)\n", + "\n", + "#Calculations\n", + "N = n*w\n", + "dl = lamda/(m*N)\n", + "\n", + "#Result\n", + "print \"Smallest wavelength interval =\",round(dl,4),\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest wavelength interval = 0.0512 nm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.3, Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Varaible declaration\n", + "m = 2 #for 2nd order\n", + "lamda = 5890 #wavelength(A)\n", + "dl = 6 #A\n", + "n = 500. #no. of lines per cm\n", + "\n", + "#Calculations\n", + "N = lamda/(dl*m)\n", + "W = N/n\n", + "\n", + "#Result\n", + "print \"Least width =\",W,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Least width = 0.98 cm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.4, Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "N = 3*5000 #no. of lines per cm\n", + "a_plus_b = 1./5000 #cm\n", + "lamda = 5890*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "m_max = round(a_plus_b/lamda)\n", + "RP = m_max*N\n", + "\n", + "#Result\n", + "print \"Maximum value of resolving power =\",RP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of resolving power = 45000.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.5, Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "m = 2 #for 2nd order\n", + "lamda = 5890 #wavelength(A)\n", + "dl = 6 #A\n", + "w = 3. #width of a line(cm)\n", + "\n", + "#Calculations\n", + "lamda2 = lamda+dl\n", + "N = lamda/(dl*m)\n", + "\n", + "a_plus_b = w/N\n", + "\n", + "#Results\n", + "print \"The minimum no. of lines a grating must have is\",N\n", + "print \"The grating element is\",round(a_plus_b/1e-3,2),\"*10^-3 cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum no. of lines a grating must have is 490\n", + "The grating element is 6.12 *10^-3 cm\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.6, Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "N = 40000 #no. of lines per cm\n", + "m = 2 #for 2nd order\n", + "\n", + "#Calculations\n", + "RP = m*N\n", + "\n", + "#Result\n", + "print \"Maximum value of resolving power =\",RP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of resolving power = 80000\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb new file mode 100755 index 00000000..61c99435 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb @@ -0,0 +1,779 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Fibre Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.1, Page number 3-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.54 #refractive index of core\n", + "NA = 0.5 #numerical aperture\n", + "\n", + "#Calculation\n", + "n2 = math.sqrt(n1**2-NA**2)\n", + "\n", + "#Result\n", + "print \"Refractive index of cladding is\",round(n2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of cladding is 1.46\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.2, Page number 3-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n2 = 1.59 #refractive index of cladding\n", + "NA = 0.2 #numerical aperture\n", + "n0 = 1.33\n", + "\n", + "#Calculation\n", + "n1 = (math.sqrt(n2**2-NA**2))\n", + "theta_o = (math.asin((math.sqrt(n2**2-n1**2)/n0)))*180/math.pi\n", + "\n", + "#Result\n", + "print \"Refractive index of core is\",n2\n", + "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of core is 1.59\n", + "Acceptance angle = 8.65 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.3, Page number 3-6\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.49 #refractive index of core\n", + "n2 = 1.44 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_o = math.degrees(math.asin(NA))\n", + "\n", + "#Result\n", + "print \"Numerical Aperture =\",round(NA,5)\n", + "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture = 0.38275\n", + "Acceptance angle = 22.5 degrees\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.4, Page number 3-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.6 #refractive index of core\n", + "n2 = 1.3 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n", + "AC = 2*theta_o\n", + "\n", + "#Result\n", + "print \"Critical angle =\",round(theta_c,2),\"degrees\"\n", + "print \"Value of angle of acceptance cone =\",round(AC,3),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 54.34 degrees\n", + "Value of angle of acceptance cone = 137.731 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.5, Page number 3-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.4 #refractive index of core\n", + "theta_o = 30 #acceptance angle(degrees)\n", + "\n", + "#Calculation\n", + "n2 = math.sqrt(n1**2-math.sin(math.radians(theta_o))**2)\n", + "\n", + "#Result\n", + "print \"Refractive index of cladding is\",round(n2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of cladding is 1.3077\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.6, Page number 3-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "n1 = 1.563 #refractive index of core\n", + "n2 = 1.498 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "delta = (n1-n2)/n1\n", + "\n", + "#Result\n", + "print \"Fractional index change =\",round(delta,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fractional index change = 0.0416\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.7, Page number 3-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "n1 = 1.50 #refractive index of cladding\n", + "theta_c = 90-5 #critical angle(degrees)\n", + "\n", + "#Calculation\n", + "n2 = math.sin(theta_c*math.pi/180)*n1\n", + "\n", + "#Result\n", + "print \"The maximum index of refraction allowed for cladding is\",round(n2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum index of refraction allowed for cladding is 1.4943\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.8, Page number 3-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "n1 = 1.33 #refractive index \n", + "theta_o = 30 #acceptance angle in air\n", + "\n", + "#Calculations\n", + "theta_0 = math.degrees(math.asin(math.sin(theta_o*math.pi/180)/n1))\n", + "\n", + "#Result\n", + "print \"Acceptance angle =\",round(theta_0,2),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle = 22.08 degrees\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.1, Page number 3-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.52 #refractive index of core\n", + "n2 = 1.5189 #refractive index of cladding\n", + "d = 29*10**-6 #core diameter(m)\n", + "lamda = 1.3*10**-6 #wavelength(m)\n", + "\n", + "#Calculation\n", + "V = (math.pi*d*math.sqrt(n1**2-n2**2))/lamda\n", + "\n", + "N = V**2/2\n", + "\n", + "#Results\n", + "print \"Normalized frequency =\",round(V,3)\n", + "print \"Number of modes =\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized frequency = 4.052\n", + "Number of modes = 8.0\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.2, Page number 3-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.47 #refractive index of core\n", + "n2 = 1.46 #refractive index of cladding\n", + "lamda = 1300*10**-9 #wavelength(nm)\n", + "V = 2.405 #for single mode fibre\n", + "\n", + "#Calculation\n", + "d = (V*lamda)/(math.pi*math.sqrt(n1**2-n2**2))\n", + "r = d/2\n", + "\n", + "#Result\n", + "print \"Radius =\",round(r/1e-6,3),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius = 2.907 um\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.3, Page number 3-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.48 #refractive index of core\n", + "delta = 0.055 #relative RI\n", + "lamda = 1 #wavelength(um)\n", + "r = 50 #core radius(um)\n", + "\n", + "#Calculations\n", + "n2 = -((delta*n1)-n1)\n", + "\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_o = math.degrees(math.asin(NA))\n", + "\n", + "V = (math.pi*2*r*NA)/lamda\n", + "\n", + "N = V**2/2\n", + "\n", + "#Results\n", + "print \"Refractive index of cladding =\",n2\n", + "print \"NA =\",round(NA,3)\n", + "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"\n", + "print \"Normalized frequency =\",round(V,3)\n", + "print \"Number of modes =\",round(N) #Answer differs due to rounding off in 'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of cladding = 1.3986\n", + "NA = 0.484\n", + "Acceptance angle = 28.95 degrees\n", + "Normalized frequency = 152.073\n", + "Number of modes = 11563.0\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.4, Page number 3-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.45 #refractive index of core\n", + "n2 = 1.448 #refractive index of cladding\n", + "lamda = 1*10**-6 #wavelength(m)\n", + "d = 6*10**-6 #core diameter(m)\n", + "\n", + "#Calculations\n", + "#Case i\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "#Case ii\n", + "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n", + "\n", + "#Case iii\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n", + "\n", + "#Results\n", + "print \"Critical angle =\",round(theta_c),\"degrees\"\n", + "print \"Acceptance angle =\",round(theta_o,3),\"degrees\"\n", + "print \"Number of modes =\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 87.0 degrees\n", + "Acceptance angle = 4.366 degrees\n", + "Number of modes = 1.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.5, Page number 3-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.50 #refractive index of core\n", + "n2 = 1.48 #refractive index of cladding\n", + "lamda = 1*10**-6 #wavelength(m)\n", + "d = 2*50*10**-6 #core diameter(m)\n", + "\n", + "#Calculations\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n", + "\n", + "#Result\n", + "print \"Number of modes =\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of modes = 2941.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.6, Page number 3-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.55 #refractive index of core\n", + "n2 = 1.50 #refractive index of cladding\n", + "lamda = 1400*10**-9 #wavelength(m)\n", + "d = 40*10**-6 #core diameter(m)\n", + "\n", + "#Calculations\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "delta = (n1-n2)/n1\n", + "\n", + "V = (math.pi*d*NA)/lamda\n", + "\n", + "#Results\n", + "print \"NA =\",round(NA,4)\n", + "print \"Fractional index change =\",round(delta,5)\n", + "print \"V-number =\",round(V,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NA = 0.3905\n", + "Fractional index change = 0.03226\n", + "V-number = 35.05\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.1, Page number 3-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Pout = 0.3 #output power(mW)\n", + "Pin = 1 #input power(mW)\n", + "L = 0.1 #fibre length(km)\n", + "\n", + "#Calculation\n", + "a = (-10/L)*math.log10(Pout/Pin)\n", + "\n", + "#Result\n", + "print \"Attenuation =\",round(a,2),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation = 52.29 dB/km\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.2, Page number 3-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Pin = 9 #input power(mW)\n", + "L = 3 #fibre length(km)\n", + "a = 1.5 #loss(dB/km)\n", + "\n", + "#Calculation\n", + "Pl = a*L\n", + "Pout = Pin*10**(-Pl/10)\n", + "\n", + "#Result\n", + "print \"Output power =\",round(Pout,3),\"uW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power = 3.193 uW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.3, Page number 3-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "a = 2.2 #attenuation(dB/km)\n", + "l1 = 2 #km\n", + "l2 = 6 #km\n", + "from sympy import * \n", + "Pin = symbols('Pin')\n", + "\n", + "#Calculations\n", + "#For 2km,\n", + "Pl1 = a*l1\n", + "Po1 = Pin*round(10**(-Pl1/10),3)\n", + "\n", + "#For 6km,\n", + "Pl2 = a*l2\n", + "Po2 = Pin*round(10**(-Pl2/10),3)\n", + "\n", + "#Results\n", + "print \"After 2 km, Pout =\",Po1\n", + "print \"After 6 km, Pout =\",Po2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "After 2 km, Pout = 0.363*Pin\n", + "After 6 km, Pout = 0.048*Pin\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.4, Page number 3-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "Pout = 7.5 #output power(mW)\n", + "Pin = 8.6 #input power(mW)\n", + "L = 0.5 #fibre length(km)\n", + "\n", + "#Calculation\n", + "Pl = -10*math.log10(Pout/Pin)\n", + "a = Pl/L\n", + "\n", + "#Result\n", + "print \"Loss specification =\",round(a,4),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss specification = 1.1887 dB/km\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb new file mode 100755 index 00000000..f94b4b09 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Lasers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.1, Page number 4-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "P = 3.147*10**-3 #output power(W)\n", + "t = 60 #time(sec)\n", + "lamda = 632.8*10**-9 #wavelength(m)\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "N = (P*t*lamda)/(h*c)\n", + "\n", + "#Result\n", + "print \"No. of photons emittd each minute is\",round(N/1e+17),\"*10^17\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of photons emittd each minute is 6.0 *10^17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.2, Page number 4-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T = 300 #temperature(K)\n", + "lamda = 694.3*10**-9 #wavelength(m)\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "k = 1.38*10**-23 #Boltman's constant(J/K)\n", + "\n", + "#Calculations\n", + "N2_by_N1 = math.exp((-h*c)/(lamda*k*T))\n", + " \n", + "#Result\n", + "print \"Ratio of population =\",round(N2_by_N1/1e-31,3),\"*10^-31\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of population = 8.874 *10^-31\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.3, Page number 4-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "P = 100*10**3 #output power(W)\n", + "t = 20*10**-9 #time(sec)\n", + "N = 6.981*10**15 #no. of photons\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "lamda = (N*h*c)/(P*t)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6943.0 A\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb new file mode 100755 index 00000000..2ad76975 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb @@ -0,0 +1,1097 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5:Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.1, Page number 5-5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 10**-2 #mass of object(kg)\n", + "v = 1 #velocity(m/s)\n", + "l = 1*10**-10 #wavelength(m)\n", + "d = 10**-3 #distance travelled(m)\n", + "\n", + "#Calculations\n", + "lamda = h/(m*v)\n", + "\n", + "v = h/(m*l)\n", + "\n", + "t1 = d/v\n", + "t = t1/(365*24*60*60)\n", + "\n", + "#Results\n", + "print \"de Brogile wavelength =\",round(lamda/1e-32,2),\"*10^-32 m\"\n", + "print \"Velocity =\",round(v/1e-22,2),\"*10^-22 m/s(Calculation mistake in the textbook)\"\n", + "print \"Distance travelled =\",round(t/1e+10,2),\"*10^10 years(Calculation mistake in the textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Brogile wavelength = 6.63 *10^-32 m\n", + "Velocity = 6.63 *10^-22 m/s(Calculation mistake in the textbook)\n", + "Distance travelled = 4.78 *10^10 years(Calculation mistake in the textbook)\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.2, Page number 5-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "lamda = 1*10**-10 #wavelength(m)\n", + "\n", + "#calculation\n", + "v = h/(m*lamda)\n", + "\n", + "#Result\n", + "print \"Velocity =\",round(v/1e+6,2),\"*10^6 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 7.29 *10^6 m/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.3, Page number 5-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "lamda = 5000*10**-10 #wavelength(m)\n", + "\n", + "#calculation\n", + "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Kinetic energy =\",round(E/1e-6,5),\"*10^-6 eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy = 6.03804 *10^-6 eV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.4, Page number 5-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 1.676*10**-27 #mass of object(kg)\n", + "E = 0.025*1.6*10**-19 #energy(J)\n", + "\n", + "#Calculation\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 1.81 A\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.5, Page number 5-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "E = 120*1.6*10**-19 #energy(J)\n", + "\n", + "#Calculation\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 1.12 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.6, Page number 5-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 1.67*10**-27 #mass of neutron(kg)\n", + "lamda = 1*10**-10 #wavelength(m)\n", + "\n", + "#calculation\n", + "v = h/(m*lamda)\n", + "\n", + "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Velocity =\",round(v,2),\"m/s\"\n", + "print \"Kinetic energy =\",round(E/1e-2,3),\"*10^-2 eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 3970.06 m/s\n", + "Kinetic energy = 8.225 *10^-2 eV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.7, Page number 5-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 1 #mass of object(kg)\n", + "v = 1 #velocity(m/s)\n", + "V = 182 #potential differnce(V)\n", + "\n", + "#Calculation\n", + "#Case i\n", + "lamda = 12.27/math.sqrt(V)\n", + "\n", + "#Case ii\n", + "l = h/(m*v)\n", + "\n", + "#Results\n", + "print \"de Brogile wavelength for accelerated electron=\",round(lamda,2),\"A\"\n", + "print \"de Brogile wavelength for object=\",l,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Brogile wavelength for accelerated electron= 0.91 A\n", + "de Brogile wavelength for object= 6.63e-34 A\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.8, Page number 5-9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "lamda = 10**-14 #wavelength(m)\n", + "\n", + "#Calculations\n", + "p = h/lamda\n", + "\n", + "E = (p**2/(2*m))/(1.6*10**-13)\n", + "\n", + "#Results\n", + "print \"Momentum =\",p,\"kg-m/s\"\n", + "print \"Energy =\",round(E,2),\"MeV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Momentum = 6.63e-20 kg-m/s\n", + "Energy = 15095.09 MeV\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.9, Page number 5-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "V = 3000 #potential differnce(V)\n", + "\n", + "#Calculation\n", + "#Case i\n", + "lamda = 12.27/math.sqrt(V)\n", + "\n", + "#Case ii\n", + "p = h/(lamda*10**-10)\n", + "\n", + "#Case iii\n", + "lamda_b = 1/(lamda*10**-10)\n", + "\n", + "#Case iv\n", + "d = 2.04*10**-10 #m\n", + "n = 1 #for first order\n", + "theta = math.degrees(math.asin((n*lamda*10**-10)/(2*d)))\n", + "\n", + "#Results\n", + "print \"Momentum =\",round(p/1e-23,2),\"*10^-23 kg-m/s\"\n", + "print \"de Brogile wavelength =\",round(lamda,3),\"A\"\n", + "print \"Wave number =\",round(lamda_b/1e+10,3),\"*10^10 /m\"\n", + "print \"Bragg angle =\",round(theta,3),\"degrees\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Momentum = 2.96 *10^-23 kg-m/s\n", + "de Brogile wavelength = 0.224 A\n", + "Wave number = 4.464 *10^10 /m\n", + "Bragg angle = 3.147 degrees\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.10, Page number 5-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "V = 10*10**3 #potential differnce(V)\n", + "\n", + "#Calculation\n", + "lamda = 12.27/math.sqrt(V)\n", + "\n", + "p = h/(lamda*10**-10)\n", + "\n", + "#result\n", + "print \"Wavelength =\",lamda,\"A\"\n", + "print \"Momentum =\",round(p/1e-23,3),\"*10^-23 kg-m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 0.1227 A\n", + "Momentum = 5.403 *10^-23 kg-m/s\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.12, Page number 5-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 6.68*10**-27 #mass of particle(kg)\n", + "E = 1.6*10**-16 #energy(J)\n", + "\n", + "#Calculations\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "v = h/(m*lamda)\n", + "\n", + "#Results\n", + "print \"Wavelength =\",round(lamda/1e-13,3),\"*10^-13 A\"\n", + "print \"Velocity =\",round(v/1e+5,2),\"*10^5 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 4.535 *10^-13 A\n", + "Velocity = 2.19 *10^5 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.13, Page number 5-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "E = 1.6*10**-19 #energy(J)\n", + "\n", + "#Calculations\n", + "lamda_ph = (h*c)/E #wavelength of photon\n", + " \n", + "lamda_e = h/math.sqrt(2*m*E) #wavelength of electron\n", + "\n", + "#Result\n", + "print \"Wavelength of proton =\",round(lamda_ph/1e-6,3),\"*10^-6 m\"\n", + "print \"Wavelength of electron =\",round(lamda_e/1e-10,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of proton = 1.243 *10^-6 m\n", + "Wavelength of electron = 12.286 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.14, Page number 5-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "\n", + "#Calculations\n", + "E = m*c**2\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "#Result\n", + "print \"de Brogile wavelength =\",round(lamda/1e-12,3),\"*10^-12 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Brogile wavelength = 1.717 *10^-12 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.1, Page number 5-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_v = (0.01*400)/100\n", + "\n", + "#Calculation\n", + "del_x = h/(4*math.pi*m*del_v)\n", + "\n", + "#Result\n", + "print \"Accuracy =\",round(del_x/1e-3,2),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accuracy = 1.45 mm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.2, Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_x = 10*10**-9 #m\n", + "E = 1.6*10**-16 #energy(J)\n", + "\n", + "#Calculation\n", + "del_px = h/(4*math.pi*del_x)\n", + "p = math.sqrt(2*m*E)\n", + "per = (del_px/p)*100\n", + "\n", + "#Result\n", + "print \"Percentage of uncertainity =\",round(per,4),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of uncertainity = 0.0309 %\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.3, Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_v = (0.01*4*10**5)/100\n", + "\n", + "#Calculation\n", + "del_x = h/(4*math.pi*m*del_v)\n", + "\n", + "#Result\n", + "print \"Accuracy =\",round(del_x/1e-6,2),\"*10^-6 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accuracy = 1.45 *10^-6 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.4, Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_v = (1.88*10**6)/100\n", + "\n", + "#Calculation\n", + "del_x = h/(4*math.pi*m*del_v)\n", + "\n", + "#Result\n", + "print \"Precision =\",round(del_x/1e-9,3),\"*10^-9 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Precision = 3.084 *10^-9 m\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.5, Page number 5-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 4*10**-7 #wavelength(m)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "del_l = 8*10**-15 #spectral width(m)\n", + "\n", + "#calculation\n", + "del_t = lamda**2/(4*math.pi*c*del_l)\n", + "\n", + "#Result\n", + "print \"Time spent by the elctrons =\",round(del_t/1e-9,3),\"*10^-9 s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time spent by the elctrons = 5.305 *10^-9 s\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.6, Page number 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "del_t = 1.4*10**-10 #time spent(s)\n", + "\n", + "#calculation\n", + "E = (h/(4*math.pi*del_t))/(1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Uncertainity =\",round(E/1e-6,2),\"*10^-6 eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Uncertainity = 2.36 *10^-6 eV\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.7, Page number 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 546*10**-9 #wavelength(m)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "del_l = 10**-14 #spectral width(m)\n", + "\n", + "#calculation\n", + "del_t = lamda**2/(4*math.pi*c*del_l)\n", + "\n", + "#Result\n", + "print \"Time spent by the elctrons =\",round(del_t/1e-9,2),\"*10^-9 s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time spent by the elctrons = 7.91 *10^-9 s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.1, Page number 5-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 2*10**-10 #width(m)\n", + "\n", + "#Calculation\n", + "E1 = (h**2/(8*m*L**2))/(1.6*10**-19)\n", + "E2 = 4*E1\n", + "E3 = 9*E1\n", + "\n", + "#Result\n", + "print \"Energy of electron in ground state =\",round(E1,3),\"eV\"\n", + "print \"Energy of electron in first state =\",round(E2,3),\"eV\"\n", + "print \"Energy of electron in second state =\",round(E3,3),\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of electron in ground state = 9.434 eV\n", + "Energy of electron in first state = 37.738 eV\n", + "Energy of electron in second state = 84.91 eV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.2, Page number 5-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "L = 5.6*10**-3 #width(m)\n", + "\n", + "#Calculation\n", + "E = L/4\n", + "\n", + "#Result\n", + "print \"Ground state energy =\",E,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ground state energy = 0.0014 eV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.4, Page number 5-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "#Variable declaration\n", + "#Intervals\n", + "x1 = 0\n", + "x2 = 1./2\n", + "\n", + "#Calculation\n", + "x = lambda x: 3*x**2\n", + "P = integrate.quad(x, x1, x2)\n", + "\n", + "#Result\n", + "print \"Probability =\",P[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Probability = 0.125\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.5, Page number 5-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m1 = 9.1*10**-31 #mass of electron(kg)\n", + "m2 = 10**-9 #mass of grain dust(kg)\n", + "L1 = 10**-9 #width(m)\n", + "L2 = 10**-4 #width(m)\n", + "\n", + "#Calculation\n", + "#For electron\n", + "print \"For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\"\n", + "for n in range(1,4):\n", + " En1 = ((n**2*h**2)/(8*m*L1**2))/(1.6*10**-19)\n", + " print round(En1,4),\"eV\"\n", + " \n", + "#For the grain of dust\n", + "print \"\\nFor a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\"\n", + "for n in range(1,4):\n", + " En2 = ((n**2*h**2)/(8*m2*L2**2))/(1.6*10**-19)\n", + " print round(En2/1e-32,3),\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\n", + "0.3774 eV\n", + "1.5095 eV\n", + "3.3964 eV\n", + "\n", + "For a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\n", + "3.434 eV\n", + "13.737 eV\n", + "30.907 eV\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.6, Page number 5-45\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "E1 = 38*1.6*10**-19 #energy(J)\n", + "\n", + "#Calculation\n", + "L = math.sqrt(h**2/(8*m*E1))\n", + " \n", + "#Result\n", + "print \"Width of well =\",round(L/1e-10,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of well = 0.9965 A\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.7, Page number 5-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 5*10**-10 #width(m)\n", + "n1 = 1\n", + "n2 = 2\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "E = ((3*h**2)/(8*m*L**2)) #E2-E1\n", + "Ev = E/(1.6-10**-19) #J\n", + "lamda = (h*c)/E\n", + "\n", + "#Result\n", + "print \"Energy =\",round(Ev/1e-19,2),\"eV\"\n", + "print \"Wavelength =\",round(lamda/1e-7,3),\"*10^-7 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy = 4.53 eV\n", + "Wavelength = 2.745 *10^-7 m\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb new file mode 100755 index 00000000..cc609a3f --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Motion of charge particle in Electric & Magnetic fields" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.1, Page number 6-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "v = 2.5*10**6 #velocity of electron(m/s)\n", + "theta = 30*math.pi/180 #angle(degrees)\n", + "B = 0.94*10**-4 #field strength(Wb/m^2)\n", + "e = 1.6*10**-19 #electron charge(C)\n", + "\n", + "#Calculations\n", + "r = (m*v*math.sin(theta))/(B*e)\n", + "\n", + "l = (5*v*math.cos(theta)*2*math.pi*m)/(B*e)\n", + "\n", + "#Results\n", + "print \"Radius =\",round(r/1e-3,2),\"mm\"\n", + "print \"Distance covered =\",round(l,3),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius = 75.63 mm\n", + "Distance covered = 4.115 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.2, Page number 6-7 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "v = 3*10**7 #velocity of electron(m/s)\n", + "theta = 45*math.pi/180 #angle(degrees)\n", + "B = 0.23*10**-4 #field strength(Wb/m^2)\n", + "e = 1.6*10**-19 #electron charge(C)\n", + "\n", + "#Calculations\n", + "r = (m*v*math.sin(theta))/(B*e)\n", + "\n", + "l = (v*math.cos(theta)*2*math.pi*m)/(B*e)\n", + "\n", + "#Results\n", + "print \"Radius =\",round(r,2),\"m\"\n", + "print \"Distance covered =\",round(l,3),\"m\"\n", + "#Calculation mistakes in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius = 5.25 m\n", + "Distance covered = 32.959 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.3, Page number 6-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "y = 1.5 #displacement(cm)\n", + "d = 0.42 #distance(cm)\n", + "Va = 1.6*10**3 #anode voltage(V)\n", + "D = 28 #cm\n", + "l = 1.8 #length of plates(cm)\n", + "\n", + "#Calculation\n", + "V = (2*y*d*Va)/(D*l)\n", + "Vin = V/6\n", + "\n", + "#Result\n", + "print \"Input voltage =\",round(Vin,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input voltage = 6.67 V\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5.1, Page number 6-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "da = 0.8 #minor axis(cm)\n", + "db = 2 #major axis(cm)\n", + "\n", + "#Calculation\n", + "ps = math.degrees(math.asin(da/db))\n", + "\n", + "#Result\n", + "print \"Phase shift =\",round(ps,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase shift = 23.58 degrees\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb new file mode 100755 index 00000000..3425e831 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb @@ -0,0 +1,178 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Superconductivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.1, Page number 7-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ho = 2.*10**5 #A/m\n", + "Hc = 1.*10**5 #A/m\n", + "T = 8. #temperature(K)\n", + "\n", + "#Calculations\n", + "Tc = math.sqrt(T**2/(1-(Hc/Ho)))\n", + "\n", + "#Result\n", + "print \"Critical temperature =\",round(Tc,3),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical temperature = 11.314 K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.2, Page number 7-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 0.0306 #Critical field at 0K(T)\n", + "Tc = 3.7 #critical temperature(K)\n", + "T = 2 #K\n", + "\n", + "#calculation\n", + "Bc = Bo*(1-((T/Tc)**2))\n", + "\n", + "#Result\n", + "print \"Critical field at 2K is\",round(Bc,5),\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical field at 2K is 0.02166 T\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.3, Page number 7-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ho = 6.5*10**4 #Critical field at 0K(T)\n", + "Tc = 7.18 #critical temperature(K)\n", + "T = 4.2 #K\n", + "r = 0.5*10**-3 #radius(m)\n", + "\n", + "#calculation\n", + "Hc = Ho*(1-((T/Tc)**2))\n", + "Ic = 2*math.pi*r*Hc\n", + "\n", + "#Result\n", + "print \"Critical current =\",round(Ic,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical current = 134.33 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.4, Page number 7-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "Tc1 = 4.185 #critical temperature(K)\n", + "M1 = 199.5 #isotopic mass\n", + "Tc2 = 4.133 #K\n", + "\n", + "#calculation\n", + "M2 = ((Tc1*M1**0.5)/Tc2)**2\n", + "\n", + "#Result\n", + "print \"Isotopic mass =\",round(M2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Isotopic mass = 204.55\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/README.txt b/Applied_Physics_II_by_H_J_Sawant/README.txt new file mode 100755 index 00000000..717d1591 --- /dev/null +++ b/Applied_Physics_II_by_H_J_Sawant/README.txt @@ -0,0 +1,10 @@ +Contributed By: Muktesh Chaudhary +Course: be +College/Institute/Organization: Anglo Eastern ship management india Pvt. Ltd +Department/Designation: Electrical & Electronics Officer +Book Title: Applied Physics II +Author: H. J. Sawant +Publisher: Technical Publications +Year of publication: 2014 +Isbn: 978-93-5038-883-9 +Edition: 2nd \ No newline at end of file diff --git a/Applied_Physics_II_by_H_J_Sawant/screenshots/halfangular.png b/Applied_Physics_II_by_H_J_Sawant/screenshots/halfangular.png new file mode 100755 index 00000000..6c38e8b8 Binary files /dev/null and b/Applied_Physics_II_by_H_J_Sawant/screenshots/halfangular.png differ diff --git a/Applied_Physics_II_by_H_J_Sawant/screenshots/probability.png b/Applied_Physics_II_by_H_J_Sawant/screenshots/probability.png new file mode 100755 index 00000000..f8d2ba6f Binary files /dev/null and b/Applied_Physics_II_by_H_J_Sawant/screenshots/probability.png differ diff --git a/Applied_Physics_II_by_H_J_Sawant/screenshots/visiblerange.png b/Applied_Physics_II_by_H_J_Sawant/screenshots/visiblerange.png new file mode 100755 index 00000000..c4d798f7 Binary files /dev/null and b/Applied_Physics_II_by_H_J_Sawant/screenshots/visiblerange.png differ diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png old mode 100644 new mode 100755 diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb new file mode 100755 index 00000000..d0036604 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb @@ -0,0 +1,608 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#11: Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.1, Page number 11.55" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intensity of laser beam is 1.5 *10**4 watt/m**2\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=20*10**-3; #power(watt)\n", + "r=1.3/2; #radius(mm)\n", + "\n", + "#Calculation\n", + "r=r*10**-3; #radius(m)\n", + "I=P/(math.pi*r**2); #intensity of laser beam(watt/m**2)\n", + "\n", + "#Result\n", + "print \"intensity of laser beam is\",round(I/10**4,1),\"*10**4 watt/m**2\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.2, Page number 11.56" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mode seperation in frequency is 2.5 *10**8 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "L=0.6; #distance(m)\n", + "\n", + "#Calculation\n", + "delta_v=c/(2*L); #mode seperation in frequency(Hz)\n", + "\n", + "#Result\n", + "print \"mode seperation in frequency is\",delta_v/10**8,\"*10**8 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.3, Page number 11.56" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "coherence length is 1.5 *10**-2 m\n", + "band width is 2.0 *10**10 Hz\n", + "line width is 0.026 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "delta_t=0.05*10**-9; #time(s)\n", + "lamda=623.8*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "cl=c*delta_t; #coherence length(m)\n", + "delta_v=1/delta_t; #band width(Hz)\n", + "delta_lamda=lamda**2*delta_v/c; #line width(m)\n", + "\n", + "#Result\n", + "print \"coherence length is\",cl*10**2,\"*10**-2 m\"\n", + "print \"band width is\",delta_v/10**10,\"*10**10 Hz\"\n", + "print \"line width is\",round(delta_lamda*10**9,3),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.4, Page number 11.56" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy difference is 1.96 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "lamda=632.8*10**-9; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "E=c*h/(lamda*e); #energy difference(eV)\n", + "\n", + "#Result\n", + "print \"energy difference is\",round(E,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.5, Page number 11.57" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of population is 8.95 *10**-32\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "lamda=6928*10**-10; #wavelength(m)\n", + "Kb=1.38*10**-23; #boltzmann constant(J/K)\n", + "T=291; #temperature(K)\n", + "\n", + "#Calculation\n", + "delta_E=c*h/lamda;\n", + "N=math.exp(-delta_E/(Kb*T)); #ratio of population\n", + "\n", + "#Result\n", + "print \"ratio of population is\",round(N*10**32,2),\"*10**-32\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.6, Page number 11.57" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 632 *10**-9 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Kb=1.38*10**-23; #boltzmann constant(J/K)\n", + "T=330; #temperature(K)\n", + "delta_E=3.147*10**-19; #energy(J)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "\n", + "#Calculation\n", + "lamda=c*h/delta_E; #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",int(lamda*10**9),\"*10**-9 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.7, Page number 11.58" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "laser beam divergence is 0.5 *10**-3 radian\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=2*10**-3; #radius(m)\n", + "r2=3*10**-3; #radius(m)\n", + "d1=2; #distance(m)\n", + "d2=4; #distance(m)\n", + "\n", + "#Calculation\n", + "delta_theta=(r2-r1)/(d2-d1); #laser beam divergence(radian)\n", + "\n", + "#Result\n", + "print \"laser beam divergence is\",delta_theta*10**3,\"*10**-3 radian\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.8, Page number 11.58" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of population is 1.127 *10**30\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "lamda=6943*10**-10; #wavelength(m)\n", + "Kb=1.38*10**-23; #boltzmann constant(J/K)\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "new=c/lamda;\n", + "N=math.exp(h*new/(Kb*T)); #ratio of population\n", + "\n", + "#Result\n", + "print \"ratio of population is\",round(N*10**-30,3),\"*10**30\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.9, Page number 11.58" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 8632.8 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "Eg=1.44*1.6*10**-19; #band gap(J)\n", + "\n", + "#Calculation\n", + "lamda=c*h/Eg; #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,1),\"angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.10, Page number 11.59" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy gap is 0.8 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.55; #wavelength(micro m)\n", + "\n", + "#Calculation\n", + "Eg=1.24/lamda; #energy gap(eV)\n", + "\n", + "#Result\n", + "print \"energy gap is\",Eg,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.11, Page number 11.59" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "coherence length is 12 *10**3 m\n", + "spectral half width is 4.56 *10**-17 m\n", + "purity factor is 1.6 *10**10\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "tow=4*10**-5; #time(sec)\n", + "lamda=740*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "L=tow*c; #coherence length(m)\n", + "delta_lamda=lamda**2/L; #spectral half width(m)\n", + "Q=lamda/delta_lamda; #purity factor\n", + "\n", + "#Result\n", + "print \"coherence length is\",int(L/10**3),\"*10**3 m\"\n", + "print \"spectral half width is\",round(delta_lamda*10**17,2),\"*10**-17 m\"\n", + "print \"purity factor is\",round(Q/10**10,1),\"*10**10\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.12, Page number 11.59" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of emissions is 8.4 *10**4\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "new=5.9*10**14; #frequency(Hz)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "Kb=1.38*10**-23; #boltzmann constant(J/K)\n", + "T=2500; #temperature(K)\n", + "\n", + "#Calculation\n", + "R=math.exp(h*new/(Kb*T))-1; #ratio of emissions\n", + "\n", + "#Result\n", + "print \"ratio of emissions is\",round(R/10**4,1),\"*10**4\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.13, Page number 11.60" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "beam divergence is 1.02 *10**-4 radian\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.06*10**-6; #wavelength(m)\n", + "d=2.54*10**-2; #distance(m)\n", + "\n", + "#Calculation\n", + "theta=2.44*lamda/d; #beam divergence(radian)\n", + "\n", + "#Result\n", + "print \"beam divergence is\",round(theta*10**4,2),\"*10**-4 radian\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.14, Page number 11.60" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of photons/minute is 4.39 *10**17\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2.3*10**-3; #power(W)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "lamda=6328*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "n=P*lamda*60/(c*h); #number of photons/min\n", + "\n", + "#Result\n", + "print \"number of photons/minute is\",round(n/10**17,2),\"*10**17\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb new file mode 100755 index 00000000..09a71a18 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb @@ -0,0 +1,665 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#12: Fiber Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.1, Page number 12.24" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acceptance angle is 20.41 degrees\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.54; #Core refractive index\n", + "n2=1.50; #Cladding refractive index\n", + "\n", + "#Calculation\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "alpha_m=math.asin(NA); #acceptance angle(radian)\n", + "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"acceptance angle is\",round(alpha_m,2),\"degrees\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.2, Page number 12.24" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.387\n", + "acceptance angle is 22.8 degrees\n", + "critical angle is 75 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.5; #Core refractive index\n", + "n2=1.45; #Cladding refractive index\n", + "\n", + "#Calculation\n", + "delta=(n1-n2)/n1; #fractional index change\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "alpha_m=math.asin(NA); #acceptance angle(radian)\n", + "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n", + "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)\n", + "print \"acceptance angle is\",round(alpha_m,1),\"degrees\"\n", + "print \"critical angle is\",int(thetac),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.3, Page number 12.25" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle is 77.16 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.53; #Core refractive index\n", + "p=2.5; #percentage(%)\n", + "\n", + "#Calculation\n", + "n2=n1*(100-p)/100; #Cladding refractive index\n", + "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"critical angle is\",round(thetac,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.4, Page number 12.25" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.28\n", + "acceptance angle is 16.26 degrees\n", + "critical angle is 79.1 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta=0.018; #fractional difference\n", + "n1=1.50; #Core refractive index\n", + "\n", + "#Calculation\n", + "NA=round(n1*math.sqrt(2*delta),2); #numerical aperture\n", + "alpha_m=math.asin(NA); #acceptance angle(radian)\n", + "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n", + "n2=n1-(delta*n1); #Cladding refractive index\n", + "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",NA\n", + "print \"acceptance angle is\",round(alpha_m,2),\"degrees\"\n", + "print \"critical angle is\",round(thetac,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.5, Page number 12.26" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of guided modes is 490.0\n", + "number of modes of graded index fibre is 245.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=50*10**-6; #diameter(m)\n", + "lamda=1*10**-6; #wavelength(m)\n", + "NA=0.2; #numerical aperture\n", + "\n", + "#Calculation\n", + "NSI=4.9*(d*NA/lamda)**2; #total number of guided modes\n", + "NGI=NSI/2; #number of modes of graded index fibre\n", + "\n", + "#Result\n", + "print \"total number of guided modes is\",NSI\n", + "print \"number of modes of graded index fibre is\",NGI" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.6, Page number 12.26" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.47\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta=0.05; #fractional difference\n", + "n1=1.5; #Core refractive index\n", + "\n", + "#Calculation\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.7, Page number 12.27" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of modes that can be propagated is 1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=5*10**-6; #diameter(m)\n", + "lamda=1*10**-6; #wavelength(m)\n", + "NA=0.092; #numerical aperture\n", + "\n", + "#Calculation\n", + "N=4.9*(d*NA/lamda)**2; #number of modes that can be propagated\n", + "\n", + "#Result\n", + "print \"number of modes that can be propagated is\",int(N)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.8, Page number 12.27" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V number is 94.7\n", + "maximum number of modes is 4485.7\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.53; #Core refractive index\n", + "n2=1.50; #Cladding refractive index\n", + "a=50*10**-6; #radius(m)\n", + "lamda=1*10**-6; #wavelength(m)\n", + "\n", + "#Calculation\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "Vn=2*math.pi*a*NA/lamda; #V number\n", + "N=Vn**2/2; #maximum number of modes\n", + "\n", + "#Result\n", + "print \"V number is\",round(Vn,1)\n", + "print \"maximum number of modes is\",round(N,1)\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.9, Page number 12.27" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of propagating modes is 49177\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=100*10**-6; #radius(m)\n", + "lamda=0.85*10**-6; #wavelength(m)\n", + "NA=0.3; #numerical aperture\n", + "\n", + "#Calculation\n", + "N=4*math.pi**2*a**2*NA**2/lamda**2; #number of propagating modes\n", + "\n", + "#Result\n", + "print \"number of propagating modes is\",int(N)\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.10, Page number 12.28" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Core refractive index is 1.6025\n", + "acceptance angle is 8.638 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "NA=0.2; #numerical aperture\n", + "n2=1.59; #Cladding refractive index\n", + "n0=1.33; #refractive index\n", + "\n", + "#Calculation\n", + "n1=round(math.sqrt(NA**2+n2**2),4); #Core refractive index\n", + "NA1=math.sqrt(n1**2-n2**2)/n0; #numerical aperture\n", + "alpha_m=math.asin(NA1); #acceptance angle(radian)\n", + "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"Core refractive index is\",n1\n", + "print \"acceptance angle is\",round(alpha_m,3),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.11, Page number 12.29" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of photons is 13.675 *10**15\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "h=6.63*10**-34; #plank's constant(Js)\n", + "lamda=680*10**-9; #wavelength(m)\n", + "P=4*10**-3; #power(W)\n", + "\n", + "#Calculation\n", + "delta_E=c*h/lamda; #energy(J)\n", + "N=P/delta_E; #number of photons\n", + "\n", + "#Result\n", + "print \"number of photons is\",round(N/10**15,3),\"*10**15\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.12, Page number 12.29" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cladding refractive index is 1.49925\n", + "numerical aperture is 0.0474\n", + "critical angle is 88.2 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta=0.0005; #fractional difference\n", + "n1=1.5; #Core refractive index\n", + "\n", + "#Calculation\n", + "n2=n1-(delta*n1); #Cladding refractive index\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"Cladding refractive index is\",n2\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"critical angle is\",round(thetac,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.13, Page number 12.29" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fraction of initial intensity after 2km is 0.363\n", + "fraction of initial intensity after 5km is 0.048\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "alpha=2.2; #attenuation coefficient(dB/km)\n", + "L1=2; #distance(km)\n", + "L2=6; #distance(km)\n", + "\n", + "#Calculation\n", + "x1=-alpha*L1/10; \n", + "x2=-alpha*L2/10;\n", + "P1=10**x1; #fraction of initial intensity after 2km\n", + "P2=10**x2; #fraction of initial intensity after 5km\n", + "\n", + "#Result\n", + "print \"fraction of initial intensity after 2km is\",round(P1,3)\n", + "print \"fraction of initial intensity after 5km is\",round(P2,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.14, Page number 12.30" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "attenuation coefficient is 1.41 dB/km\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=0.5; #distance(km)\n", + "Pout=1; #output power(W)\n", + "Pin=85/100; #input power(W)\n", + "\n", + "#Calculation\n", + "alpha=10*math.log10(Pout/Pin)/L; #attenuation coefficient(dB/km)\n", + "\n", + "#Result\n", + "print \"attenuation coefficient is\",round(alpha,2),\"dB/km\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.15, Page number 12.30" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "attenuation coefficient is 1.7 dB/km\n", + "overall signal attenuation is 17 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=10; #distance(km)\n", + "Pout=2; #output power(W)\n", + "Pin=100; #input power(W)\n", + "\n", + "#Calculation\n", + "alpha=10*math.log10(Pin/Pout)/L; #attenuation coefficient(dB/km)\n", + "o_alpha=round(alpha,1)*L; #overall signal attenuation\n", + "\n", + "#Result\n", + "print \"attenuation coefficient is\",round(alpha,1),\"dB/km\"\n", + "print \"overall signal attenuation is\",int(o_alpha),\"dB\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb new file mode 100755 index 00000000..601cae27 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb @@ -0,0 +1,441 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#2: Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.1, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 4.0 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=60.2; #molecular weight\n", + "Na=6.023*10**26; #avagadro number(kg/mole)\n", + "n=4; \n", + "rho=6250; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.2, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density is 8.93 gm/cm**3\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=63.5; #molecular weight\n", + "Na=6.023*10**26; #avagadro number(kg/mole)\n", + "n=4; \n", + "r=1.278*10**-8; #atomic radius(cm)\n", + "\n", + "#Calculation\n", + "a=2*math.sqrt(2)*r; #lattice constant(m)\n", + "rho=n*M/(a**3*Na); #density(kg/cm**3)\n", + "\n", + "#Result\n", + "print \"density is\",round(rho*10**3,2),\"gm/cm**3\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.3, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of densities is 0.92\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "pf_BCC=math.pi*math.sqrt(3)/8; #packing factor for BCC\n", + "pf_FCC=math.pi/(3*math.sqrt(2)); #packing factor of FCC\n", + "\n", + "#Calculation\n", + "r=pf_BCC/pf_FCC; #ratio of densities\n", + "\n", + "#Result\n", + "print \"ratio of densities is\",round(r,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.4, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 2.8687 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=55.85; #molecular weight\n", + "Na=6.02*10**26; #avagadro number(kg/mole)\n", + "n=2; \n", + "rho=7860; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.5, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 5.6 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=58.5; #molecular weight\n", + "Na=6.02*10**26; #avagadro number(kg/mole)\n", + "n=4; \n", + "rho=2189; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.6, Page number 2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 3.517 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=6.94; #molecular weight\n", + "Na=6.02*10**26; #avagadro number(kg/mole)\n", + "n=2; \n", + "rho=530; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.7, Page number 2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percent volume change is 0.493 %\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=1.258*10**-10; #radius(m)\n", + "r2=1.292*10**-10; #radius(m)\n", + "\n", + "#Calculation\n", + "a_bcc=4*r1/math.sqrt(3);\n", + "v=a_bcc**3;\n", + "V1=v/2;\n", + "a_fcc=2*math.sqrt(2)*r2;\n", + "V2=a_fcc**3/4;\n", + "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n", + "\n", + "#Result\n", + "print \"percent volume change is\",round(V,3),\"%\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.8, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms/m**3 is 1.77 *10**29\n", + "density of diamond is 3534.47 kg/m**3\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.356*10**-9; #cube edge(m)\n", + "w=12; #atomic weight\n", + "Na=6.02*10**26; #avagadro number(kg/mole)\n", + "\n", + "#Calculation\n", + "n=8/(a**3); #number of atoms/m**3\n", + "m=w/Na; #mass(kg)\n", + "rho=m*n; #density of diamond(kg/m**3)\n", + "\n", + "#Result\n", + "print \"number of atoms/m**3 is\",round(n/10**29,2),\"*10**29\"\n", + "print \"density of diamond is\",round(rho,2),\"kg/m**3\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.9, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum radius of sphere is 0.414 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable declaration\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(2);\n", + "R=(4*r/(2*math.sqrt(2)))-r; #maximum radius of sphere\n", + "\n", + "#Result\n", + "print \"maximum radius of sphere is\",round(R/r,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.10, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of largest sphere is 0.155 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable declaration\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3);\n", + "R=(a/2)-r; #radius of largest sphere\n", + "\n", + "#Result\n", + "print \"radius of largest sphere is\",round(R/r,3),\"r\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb new file mode 100755 index 00000000..a0d72f81 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb @@ -0,0 +1,1601 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#3: Crystal Planes and X-ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.1, Page number 3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 1 2 2 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4;\n", + "b=2;\n", + "c=2; #intercepts\n", + "\n", + "#Calculation\n", + "h=int(a/a);\n", + "k=int(a/b);\n", + "l=int(a/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.2, Page number 3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 1 3 3 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=6;\n", + "b=2;\n", + "c=2; #intercepts\n", + "\n", + "#Calculation\n", + "h=int(a/a);\n", + "k=int(a/b);\n", + "l=int(a/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.3, Page number 3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 1 1 1 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3;\n", + "b=3;\n", + "c=3; #intercepts\n", + "\n", + "#Calculation\n", + "h=int(c/a);\n", + "k=int(c/b);\n", + "l=int(c/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.4, Page number 3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 3 2 1 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=2;\n", + "b=3;\n", + "c=6; #intercepts\n", + "\n", + "#Calculation\n", + "h=int(c/a);\n", + "k=int(c/b);\n", + "l=int(c/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.5, Page number 3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 2 1 2 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.212;\n", + "b=1;\n", + "c=0.183; #intercepts\n", + "ac=0.424;\n", + "bc=1;\n", + "cc=0.366; #axial units\n", + "\n", + "#Calculation\n", + "h=int(ac/a);\n", + "k=int(bc/b);\n", + "l=int(cc/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.6, Page number 3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intercepts along x,y,z directions are 1.2 angstrom 1.2 angstrom 4.0 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=2;\n", + "k=3;\n", + "l=1; #intercepts\n", + "a=1.2;\n", + "b=1.8;\n", + "c=2; #primitives(angstrom)\n", + "p=1.2; #intercept along X-direction\n", + "\n", + "#Calculation\n", + "q=b/k;\n", + "r=2*p/q;\n", + "\n", + "#Result\n", + "print \"intercepts along x,y,z directions are\",p,\"angstrom\",2*q,\"angstrom\",r,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.7, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar separation for 1st plane is 1.0*a\n", + "interplanar separation for 2nd plane is 0.707 *a\n", + "interplanar separation for 3rd plane is 0.577 *a\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a=Symbol('a');\n", + "h1=1;\n", + "k1=0;\n", + "l1=0; #intercepts of 1st plane\n", + "h2=1;\n", + "k2=1;\n", + "l2=0; #intercepts of 2nd plane\n", + "h3=1;\n", + "k3=1;\n", + "l3=1; #intercepts of 3rd plane\n", + "\n", + "#Calculation\n", + "d100=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar separation for 1st plane\n", + "d110=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar separation for 2nd plane\n", + "d111=a/math.sqrt(h3**2+k3**2+l3**2); #interplanar separation for 3rd plane\n", + "\n", + "#Result\n", + "print \"interplanar separation for 1st plane is\",d100\n", + "print \"interplanar separation for 2nd plane is\",round(d110/a,3),\"*a\"\n", + "print \"interplanar separation for 3rd plane is\",round(d111/a,3),\"*a\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.8, Page number 3.12" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar separation is 0.179 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=3;\n", + "k=4;\n", + "l=5; #miller indices\n", + "a=2;\n", + "b=2;\n", + "c=1; #parameters\n", + "\n", + "#Calculation\n", + "d=1/math.sqrt((h**2/a**2)+(k**2/b**2)+(l**2/c**2)); #interplanar separation(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar separation is\",round(d,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.9, Page number 3.12" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar distance is 3.464 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=6; #lattice parameter(angstrom)\n", + "h=1;\n", + "k=1;\n", + "l=1; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar distance is\",round(d,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.10, Page number 3.12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar distance is 2.1 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=6.3; #lattice parameter(angstrom)\n", + "h=2;\n", + "k=2;\n", + "l=1; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar distance is\",round(d,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.11, Page number 3.12" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar distance is 1 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=5; #lattice parameter(angstrom)\n", + "h=4;\n", + "k=3;\n", + "l=0; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar distance is\",int(d),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.12, Page number 3.13" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of intercepts on axes is 6 : 3 : 2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1;\n", + "k=2;\n", + "l=3; #miller indices\n", + "\n", + "#Calculation\n", + "p=int(k*l/h);\n", + "q=int(k*l/k);\n", + "r=int(k*l/l); #ratio of intercepts on axes\n", + "\n", + "#Result\n", + "print \"ratio of intercepts on axes is\",p,\":\",q,\":\",r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.13, Page number 3.13" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar distance is 1.12 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4.2*10**-10; #lattice parameter(m)\n", + "h=3;\n", + "k=2;\n", + "l=1; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(m)\n", + "\n", + "#Result\n", + "print \"interplanar distance is\",round(d*10**10,2),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.14, Page number 3.13" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar separation is 1.26 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1;\n", + "k=1;\n", + "l=1; #miller indices\n", + "a=2.5;\n", + "b=2.5;\n", + "c=1.8; #parameters\n", + "\n", + "#Calculation\n", + "d=1/math.sqrt((h**2/a**2)+(k**2/b**2)+(l**2/c**2)); #interplanar separation(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar separation is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.15, Page number 3.14" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar separation for 1st plane is 2.466 angstrom\n", + "interplanar separation for 2nd plane is 1.74 angstrom\n", + "interplanar separation for 3rd plane is 2.85 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1.744; #atomic radius(angstrom)\n", + "h1=2;\n", + "k1=0;\n", + "l1=0; #intercepts of 1st plane\n", + "h2=2;\n", + "k2=2;\n", + "l2=0; #intercepts of 2nd plane\n", + "h3=1;\n", + "k3=1;\n", + "l3=1; #intercepts of 3rd plane\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(2);\n", + "d200=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar separation for 1st plane(angstrom)\n", + "d220=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar separation for 2nd plane(angstrom)\n", + "d111=a/math.sqrt(h3**2+k3**2+l3**2); #interplanar separation for 3rd plane(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar separation for 1st plane is\",round(d200,3),\"angstrom\"\n", + "print \"interplanar separation for 2nd plane is\",round(d220,2),\"angstrom\"\n", + "print \"interplanar separation for 3rd plane is\",round(d111,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.16, Page number 3.14" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of densities is 1.414 : 1.732\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h1=1;\n", + "k1=1;\n", + "l1=1; #intercepts of 1st plane\n", + "h2=1;\n", + "k2=1;\n", + "l2=0; #intercepts of 2nd plane\n", + "a=1;\n", + "\n", + "#Calculation\n", + "d111=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar separation for 1st plane(angstrom)\n", + "d110=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar separation for 2nd plane(angstrom)\n", + "\n", + "#Result\n", + "print \"ratio of densities is\",round(1/d110,3),\":\",round(1/d111,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example number 3.17, Page number 3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 14.61 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=2.814; #lattice parameter(m)\n", + "h=1;\n", + "lamda=0.71; #wavelength(angstrom)\n", + "k=0;\n", + "l=0; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "theta=math.asin(lamda/d); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle is\",round(theta,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.18, Page number 3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 1.5 angstrom\n", + "glancing angle is 90.0 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4.5; #lattice parameter(m)\n", + "h=2;\n", + "k=2;\n", + "theta=30*math.pi/180; #angle(radian)\n", + "l=1; #miller indices\n", + "n=2;\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "lamda=2*d*math.sin(theta); #wavelength(angstrom)\n", + "theta=math.asin(lamda/d); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"wavelength is\",lamda,\"angstrom\"\n", + "print \"glancing angle is\",round(theta,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.19, Page number 3.22" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.842 *10**-10 m\n", + "glancing angle for second order is 17.37 degrees\n", + "glancing angle for third order is 26.6 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=(8+(35/60))*math.pi/180; #angle(radian)\n", + "n2=2;\n", + "n3=3;\n", + "d=2.82*10**-10; #lattice spacing(m)\n", + "\n", + "#Calculation\n", + "lamda=2*d*math.sin(theta); #wavelength(m)\n", + "theta2=math.asin(n2*lamda/(2*d)); #glancing angle(radian)\n", + "theta2=theta2*180/math.pi; #glancing angle(degrees)\n", + "theta3=math.asin(n3*lamda/(2*d)); #glancing angle(radian)\n", + "theta3=theta3*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,3),\"*10**-10 m\"\n", + "print \"glancing angle for second order is\",round(theta2,2),\"degrees\"\n", + "print \"glancing angle for third order is\",round(theta3,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.20, Page number 3.23" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle for 1st order is 14.48 degrees\n", + "glancing angle for 1st order is 30.0 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=5; #lattice parameter(angstrom)\n", + "h=3;\n", + "lamda=0.5; #wavelength(angstrom)\n", + "k=4;\n", + "n=2;\n", + "l=0; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "theta1=math.asin(lamda/(2*d)); #glancing angle(radian)\n", + "theta1=theta1*180/math.pi; #glancing angle(degrees)\n", + "theta2=math.asin(2*lamda/(2*d)); #glancing angle(radian)\n", + "theta2=theta2*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle for 1st order is\",round(theta1,2),\"degrees\"\n", + "print \"glancing angle for 1st order is\",theta2,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.21, Page number 3.23" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 2.45 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3; #lattice parameter(angstrom)\n", + "h=1;\n", + "k=1;\n", + "n=1;\n", + "l=1; #miller indices\n", + "theta=45*math.pi/180; #angle(radian)\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "lamda=2*d*math.sin(theta); #wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.22, Page number 3.24" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle for 1st order is 22.02 degrees\n", + "glancing angle for 2nd order is 48.59 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.5; #wavelength(angstrom)\n", + "d=2; #seperation(angstrom)\n", + "n=2;\n", + "\n", + "#Calculation\n", + "theta1=math.asin(lamda/(2*d)); #glancing angle(radian)\n", + "theta1=theta1*180/math.pi; #glancing angle(degrees)\n", + "theta2=math.asin(n*lamda/(2*d)); #glancing angle(radian)\n", + "theta2=theta2*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle for 1st order is\",round(theta1,2),\"degrees\"\n", + "print \"glancing angle for 2nd order is\",round(theta2,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.23, Page number 3.24" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar separation is 0.88 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.25; #wavelength(angstrom)\n", + "theta=45*math.pi/180; #angle(radian)\n", + "n=1;\n", + "\n", + "#Calculation\n", + "d=n*lamda/(2*math.sin(theta)); #interplanar separation(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar separation is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.24, Page number 3.25" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle for 1st order is 5.74 degrees\n", + "glancing angle for 2nd order is 11.54 degrees\n", + "glancing angle for 1st order is 17.46 degrees\n", + "glancing angle for 2nd order is 23.58 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1; #wavelength(angstrom)\n", + "d=5; #seperation(angstrom)\n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "n4=4; #order\n", + "\n", + "#Calculation\n", + "theta1=math.asin(n1*lamda/(2*d)); #glancing angle(radian)\n", + "theta1=theta1*180/math.pi; #glancing angle(degrees)\n", + "theta2=math.asin(n2*lamda/(2*d)); #glancing angle(radian)\n", + "theta2=theta2*180/math.pi; #glancing angle(degrees)\n", + "theta3=math.asin(n3*lamda/(2*d)); #glancing angle(radian)\n", + "theta3=theta3*180/math.pi; #glancing angle(degrees)\n", + "theta4=math.asin(n4*lamda/(2*d)); #glancing angle(radian)\n", + "theta4=theta4*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle for 1st order is\",round(theta1,2),\"degrees\"\n", + "print \"glancing angle for 2nd order is\",round(theta2,2),\"degrees\"\n", + "print \"glancing angle for 1st order is\",round(theta3,2),\"degrees\"\n", + "print \"glancing angle for 2nd order is\",round(theta4,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.25, Page number 3.26" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1st bragg reflection angle is 7.18 degrees\n", + "2nd bragg reflection angle is 14.48 degrees\n", + "3rd bragg reflection angle is 22.02 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=30*math.pi/180; #angle(radian)\n", + "#assume that sin(theta)=x\n", + "x1=1;\n", + "x2=2;\n", + "x3=3;\n", + "x4=4;\n", + "\n", + "#Calculation\n", + "theta1=math.asin(x1*math.sin(theta)/x4); #1st bragg reflection angle(radian)\n", + "theta1=theta1*180/math.pi; #1st bragg reflection angle(degrees)\n", + "theta2=math.asin(x2*math.sin(theta)/x4); #1st bragg reflection angle(radian)\n", + "theta2=theta2*180/math.pi; #1st bragg reflection angle(degrees)\n", + "theta3=math.asin(x3*math.sin(theta)/x4); #1st bragg reflection angle(radian)\n", + "theta3=theta3*180/math.pi; #1st bragg reflection angle(degrees)\n", + "\n", + "#Result\n", + "print \"1st bragg reflection angle is\",round(theta1,2),\"degrees\"\n", + "print \"2nd bragg reflection angle is\",round(theta2,2),\"degrees\"\n", + "print \"3rd bragg reflection angle is\",round(theta3,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.26, Page number 3.27" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum order of bragg reflection is 4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.25; #wavelength(angstrom)\n", + "d=2.5; #seperation(angstrom)\n", + "\n", + "#Calculation\n", + "n=2*d/lamda; #maximum order of bragg reflection\n", + "\n", + "#Result\n", + "print \"maximum order of bragg reflection is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.27, Page number 3.27" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum order of bragg reflection is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.5; #wavelength(angstrom)\n", + "d=2.8; #seperation(angstrom)\n", + "\n", + "#Calculation\n", + "n=2*d/lamda; #maximum order of bragg reflection\n", + "\n", + "#Result\n", + "print \"maximum order of bragg reflection is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.28, Page number 3.27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength for 1st angle is 1.45 angstrom\n", + "wavelength for 2nd angleis 1.544 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta1=15*math.pi/180; #angle(radian)\n", + "theta2=16*math.pi/180; #angle(radian)\n", + "d=2.8; #lattice spacing(angstrom)\n", + "\n", + "#Calculation\n", + "lamda1=2*d*math.sin(theta1); #wavelength for 1st angle(angstrom)\n", + "lamda2=2*d*math.sin(theta2); #wavelength for 2nd angle(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength for 1st angle is\",round(lamda1,2),\"angstrom\"\n", + "print \"wavelength for 2nd angleis\",round(lamda2,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.29, Page number 3.31" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 6 2 3 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=1;\n", + "y=3;\n", + "z=-2;\n", + "\n", + "#Calculation\n", + "h=-y*z/x;\n", + "k=-y*z/y;\n", + "l=y*z/z; #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",int(h),int(k),int(l),\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.30, Page number 3.32" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar separation is 1.26 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1;\n", + "k=1;\n", + "l=1; #miller indices\n", + "a=2.5;\n", + "b=2.5;\n", + "c=1.8; #parameters\n", + "\n", + "#Calculation\n", + "d=1/math.sqrt((h**2/a**2)+(k**2/b**2)+(l**2/c**2)); #interplanar separation(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar separation is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.31, Page number 3.32" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 16.1 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=2.814; #lattice parameter(m)\n", + "h=1;\n", + "lamda=0.78; #wavelength(angstrom)\n", + "k=0;\n", + "l=0; #miller indices\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n", + "theta=math.asin(lamda/d); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle is\",round(theta,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.32, Page number 3.32" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "longest wavelength in 1st order is 5.64 angstrom\n", + "longest wavelength in 2nd order is 2.82 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1;\n", + "n2=2;\n", + "d=2.82; #seperation(angstrom)\n", + "\n", + "#Calculation\n", + "lamda_max1=2*d/n1; #longest wavelength in 1st order(angstrom)\n", + "lamda_max2=2*d/n2; #longest wavelength in 2nd order(angstrom)\n", + "\n", + "#Result\n", + "print \"longest wavelength in 1st order is\",lamda_max1,\"angstrom\"\n", + "print \"longest wavelength in 2nd order is\",lamda_max2,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.33, Page number 3.33" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.842 angstrom\n", + "glancing angle for second order is 17 degrees 22 minutes\n", + "glancing angle for third order is 26 degrees 36.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=(8+(35/60))*math.pi/180; #angle(radian)\n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "d=2.82*10**-10; #lattice spacing(m)\n", + "\n", + "#Calculation\n", + "lamda=2*d*math.sin(theta)/n1; #wavelength(m)\n", + "theta2=math.asin(n2*lamda/(2*d)); #glancing angle(radian)\n", + "theta2=theta2*180/math.pi; #glancing angle(degrees)\n", + "theta2_m=60*(theta2-int(theta2));\n", + "theta3=math.asin(n3*lamda/(2*d)); #glancing angle(radian)\n", + "theta3=theta3*180/math.pi; #glancing angle(degrees)\n", + "theta3_m=60*(theta3-int(theta3));\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,3),\"angstrom\"\n", + "print \"glancing angle for second order is\",int(theta2),\"degrees\",int(theta2_m),\"minutes\"\n", + "print \"glancing angle for third order is\",int(theta3),\"degrees\",round(theta3_m),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.34, Page number 3.33" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 21 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=0.071*10**-9; #wavelength(angstrom)\n", + "d100=0.28*10**-9; #seperation(angstrom)\n", + "n=2;\n", + "\n", + "#Calculation\n", + "d110=d100/math.sqrt(2); \n", + "theta=math.asin(n*lamda/(2*d110))*180/math.pi; #glancing angle(degrees) \n", + "\n", + "#Result\n", + "print \"glancing angle is\",int(theta),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.35, Page number 3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.0842 nm\n", + "maximum order of diffraction is 6\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=(8+(35/60))*math.pi/180; #angle(radian)\n", + "n=1;\n", + "d=0.282; #lattice spacing(nm)\n", + "\n", + "#Calculation\n", + "lamda=2*d*math.sin(theta)/n; #wavelength(nm)\n", + "n_max=2*d/lamda; #maximum order of diffraction\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda,4),\"nm\"\n", + "print \"maximum order of diffraction is\",int(n_max)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.36, Page number 3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interatomic spacing is 2.67 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.5418*10**-10; #wavelength(m)\n", + "theta=30*math.pi/180; #angle(radian)\n", + "n=1;\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "\n", + "#Calculation\n", + "d=n*lamda/(2*math.sin(theta)); #interplanar separation(m)\n", + "a=d*math.sqrt(h**2+k**2+l**2); #interatomic spacing(m)\n", + "\n", + "#Result\n", + "print \"interatomic spacing is\",round(a*10**10,2),\"*10**-10 m\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png new file mode 100755 index 00000000..46e78e4e Binary files /dev/null and b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png differ diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png new file mode 100755 index 00000000..2b21df4b Binary files /dev/null and b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png differ diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png new file mode 100755 index 00000000..77af72a0 Binary files /dev/null and b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png differ diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_01_Bonding_in_Solids__1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_01_Bonding_in_Solids__1.ipynb new file mode 100755 index 00000000..db06e802 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_01_Bonding_in_Solids__1.ipynb @@ -0,0 +1,248 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ef3d4592a57ed325da4c5f5624afbf334fc1ea3982d155f4e16e40570d72ab9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1:Bonding in Solids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 , Page no:15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "r=2; #in angstrom(distance)\n", + "e=1.6E-19; # in C (charge of electron)\n", + "E_o= 8.85E-12;# absolute premittivity\n", + "\n", + "#calculate\n", + "r=2*1*10**-10; # since r is in angstrom\n", + "V=-e**2/(4*3.14*E_o*r); # calculate potential\n", + "V1=V/e; # changing to eV\n", + "\n", + "#result\n", + "print \"\\nThe potential energy is V = \",'%.4E'%V,\"J\";\n", + "print \"In electron-Volt V = \",round(V1,3),\"eV\"; \n", + "print \"Note: the answer in the book is wrong due to calculation mistake\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The potential energy is V = -1.1515E-18 J\n", + "In electron-Volt V = -7.197 eV\n", + "Note: the answer in the book is wrong due to calculation mistake\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 , Page no:15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "#given\n", + "r0=0.236; #in nanometer(interionic distance)\n", + "e=1.6E-19; # in C (charge of electron)\n", + "E_o= 8.85E-12;# absolute premittivity\n", + "N=8; # Born constant\n", + "IE=5.14;# in eV (ionisation energy of sodium)\n", + "EA=3.65;# in eV (electron affinity of Chlorine)\n", + "pi=3.14; # value of pi used in the solution\n", + "\n", + "#calculate\n", + "r0=r0*1E-9; # since r is in nanometer\n", + "PE=(e**2/(4*pi*E_o*r0))*(1-1/N); # calculate potential energy\n", + "PE=PE/e; #changing unit from J to eV\n", + "NE=IE-EA;# calculation of Net energy\n", + "BE=PE-NE;# calculation of Bond Energy\n", + "\n", + "#result\n", + "print\"The potential energy is PE= \",round(PE,2),\"eV\";\n", + "print\"The net energy is NE= \",round(NE,2),\"eV\";\n", + "print\"The bond energy is BE= \",round(BE,2),\"eV\";\n", + "# Note: (1)-In order to make the answer prcatically feasible and avoid the unusual answer, I have used r_0=0.236 nm instead of 236 nm. because using this value will give very much irrelevant answer.\n", + "# Note: (2) There is slight variation in the answer due to round off." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy is PE= 5.34 eV\n", + "The net energy is NE= 1.49 eV\n", + "The bond energy is BE= 3.85 eV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 , Page no:16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "r_0=.41; #in mm(lattice constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "E_o= 8.85E-12; #absolute premittivity\n", + "n=0.5; #repulsive exponent value\n", + "alpha=1.76; #Madelung constant\n", + "pi=3.14; # value of pi used in the solution\n", + "\n", + "#calculate\n", + "r=.41*1E-3; #since r is in mm\n", + "Beta=72*pi*E_o*r**4/(alpha*e**2*(n-1)); #calculation compressibility\n", + "\n", + "#result\n", + "print\"The compressibility is\tBeta=\",'%.4E'%Beta;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressibility is\tBeta= -2.5097E+15\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 , Page no:16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "r_0=3.56; #in Angstrom\n", + "e=1.6E-19; #in C (charge of electron)\n", + "IE=3.89; #in eV (ionisation energy of Cs)\n", + "EA=-3.61; #in eV (electron affinity of Cl)\n", + "n=10.5; #Born constant\n", + "E_o= 8.85E-12; #absolute premittivity\n", + "alpha=1.763; #Madelung constant\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "r_0=r_0*1E-10; #since r is in nanometer\n", + "U=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n", + "U=U/e; #changing unit from J to eV\n", + "ACE=U+EA+IE; #calculation of atomic cohesive energy\n", + "\n", + "#result\n", + "print\"The ionic cohesive energy is \",round(U),\"eV\";\n", + "print\"The atomic cohesive energy is\",round(ACE),\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionic cohesive energy is -6.0 eV\n", + "The atomic cohesive energy is -6.0 eV\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 , Page no:17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "r_0=2.81; #in Angstrom\n", + "e=1.6E-19; #in C (charge of electron)\n", + "n=9; #Born constant\n", + "E_o= 8.85E-12; #absolute premittivity\n", + "alpha=1.748; #Madelung constant\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "r_0=r_0*1E-10; #since r is in nanometer\n", + "V=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n", + "V=V/e; #changing unit from J to eV\n", + "V_1=V/2; #Since only half of the energy contribute per ion to the cohecive energy therfore\n", + "\n", + "#result\n", + "print\"The potential energy is V=\",round(V,2),\"eV\";\n", + "print\"The energy contributing per ions to the cohesive energy is \",round(V_1,2),\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy is V= -7.96 eV\n", + "The energy contributing per ions to the cohesive energy is -3.98 eV\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_02_Crystal_Structure_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_02_Crystal_Structure_1.ipynb new file mode 100755 index 00000000..b6038072 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_02_Crystal_Structure_1.ipynb @@ -0,0 +1,291 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:693d1c12519596ec538fd8d806511b7a1fdb44b316b98121270f6b11b5d8d004" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2:Crystal Structure" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 , Page no:40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "N=6.02*10**26; #in /Kg-molecule (Avogadro's number)\n", + "n=4; #number of molecules per unit cell ofr NaCl\n", + "M=58.5; #in Kg/Kg-molecule (molecular weight of NaCl)\n", + "p=2189; #in Kg/m^3 (density)\n", + "\n", + "#calculate\n", + "a=pow(((n*M)/(N*p)),0.3333333);\n", + "a1=a*10**10; #changing unit to Angstrom\n", + "\n", + "#result\n", + "print\"The lattice constant is a=\",'%.2E'%a,\"m\";\n", + "print\"\\t\\t\\ta=\",round(a1,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lattice constant is a= 5.62E-10 m\n", + "\t\t\ta= 5.62 Angstrom\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 , Page no:41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "N=6.02*10**23; #in /gram-atom (Avogadro's number)\n", + "n=4; #number of atom per unit cell for fcc structure\n", + "M=63.5; #in gram/gram-atom (atomic weight of Cu)\n", + "p=8.96; #in g/cm^3 (density)\n", + "\n", + "#calculate\n", + "a=pow((n*M/(N*p)),0.3333333);\n", + "a1=a*1E8; #changing unit from cm to Angstrom\n", + "d=a1/math.sqrt(2); #distance infcc lattice\n", + "\n", + "#result\n", + "print\"lattice constant is a=\",'%.2E'%a,\"cm\";\n", + "print\"\\t\\t a=\",round(a1,2),\"Angstrom\";\n", + "print\"distance between two nearest Cu atoms is d=\",round(d,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lattice constant is a= 3.61E-08 cm\n", + "\t\t a= 3.61 Angstrom\n", + "distance between two nearest Cu atoms is d= 2.55 Angstrom\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 , Page no:41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "N=6.02E26; #in /Kg-atom (Avogadro's number)\n", + "n=2; #number of molecules per unit cell for bcc lattice\n", + "M=55.85; #in Kg/Kg-atom (atomic weight of Iron)\n", + "p=7860; #in Kg/m^3 (density)\n", + "\n", + "#calculate\n", + "a=pow((n*M/(N*p)),0.33333);\n", + "a1=a*1E10; #changing unit to Angstrom\n", + "\n", + "#result\n", + "print\"The lattice constant is a=\",'%.2E'%a,\"m\";\n", + "print\"\\t\\t\\ta=\",round(a1,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lattice constant is a= 2.87E-10 m\n", + "\t\t\ta= 2.87 Angstrom\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 , Page no:42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "N=6.02*10**26; #in /Kg-atom (Avogadro's number)\n", + "n=2; #number of molecules per unit cell for bcc lattice\n", + "M=6.94; #in Kg/Kg-atom (atomic weight of Iron)\n", + "p=530; #in Kg/m^3 (density)\n", + "\n", + "#calculate\n", + "a=pow((n*M/(N*p)),0.33333);\n", + "a1=a*1E10; #changing unit to Angstrom\n", + "\n", + "#result\n", + "print\"The lattice constant is a=\",'%.2E'%a,\"m\";\n", + "print\"\\t\\t\\ta=\",round(a1,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lattice constant is a= 3.52E-10 m\n", + "\t\t\ta= 3.52 Angstrom\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 , Page no:42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "N=6.02*10**23; #in /gram-molecule (Avogadro's number)\n", + "M=58.5; #in gram/gram-molecule (atomic weight of NaCl)\n", + "p=2.17; #in g/cm^3 (density)\n", + "\n", + "#calculate\n", + "#since V=M/p\n", + "#(1/d)^-3=2N/V=2Np/M\n", + "#therefore d= (M/2Np)^-3\n", + "d=pow((M/(2*N*p)),0.33333333);\n", + "d1=d*1*10**8; #changing unit from cm to Angstrom\n", + "\n", + "#result\n", + "print\"The distance between two adjacent atoms of NaCl is d=\",'%.2E'%d,\"m\";\n", + "print\"\\t\\t\\t\\t\\t\\t d=\",round(d1,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between two adjacent atoms of NaCl is d= 2.82E-08 m\n", + "\t\t\t\t\t\t d= 2.82 Angstrom\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 , Page no:43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "r_Na=0.98; #in Angstrom (radius of sodium ion)\n", + "r_Cl=1.81; #in Angstrom (radius of chloride ion)\n", + "M_Na=22.99; #in amu (atomic mass of sodium)\n", + "M_Cl=35.45; #in amu (atomic mass of chlorine)\n", + "\n", + "#calculate\n", + "a=2*(r_Na+r_Cl); #lattice parameter\n", + "#PF=volume of ions present in the unit cell/volume of unit cell\n", + "PF=((4*(4/3)*3.14)*r_Na**3+(4*(4/3)*3.14)*r_Cl**3)/a**3;\n", + "#Density=mass of unit cell/volume of unit cell\n", + "p=4*(M_Na+M_Cl)*1.66E-27/(a*1E-10)**3;\n", + "p1=p*1E-3; #changing unit to gm/cm^-3\n", + "\n", + "#result\n", + "print\"Lattice constant is a=\",round(a,3),\"Angstrom\";\n", + "print\"Packing fraction is =\",round(PF,3); \n", + "print\"Density is p=\",round(p),\"Kg/m^3\";\n", + "print\"Density is p=\",round(p1,2),\"g/cm^3\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant is a= 5.58 Angstrom\n", + "Packing fraction is = 0.662\n", + "Density is p= 2233.0 Kg/m^3\n", + "Density is p= 2.23 g/cm^3\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_03_Planes_in_Crystals_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_03_Planes_in_Crystals_1.ipynb new file mode 100755 index 00000000..92dba19b --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_03_Planes_in_Crystals_1.ipynb @@ -0,0 +1,144 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:05935aae8ee517fae6abe7a89dceb1ca0d0cc367834bce08b5f427ec49852dcb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3:Planes in Crystals" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 , Page no:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "h=3;\n", + "k=2;\n", + "l=1; #miller indices\n", + "a=4.2E-8; #in cm (lattice constant)\n", + "\n", + "#calculate\n", + "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", + "d=d*1E8; #changing unit from cm to Angstrom\n", + "\n", + "#result\n", + "print\"The interplanar spacing is d=\",round(d,2),\"cm\";\n", + "print\"\\t\\t\\t d=\",round(d,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The interplanar spacing is d= 1.12 cm\n", + "\t\t\t d= 1.12 Angstrom\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 , Page no:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "h=1;k=1;l=1; #miller indices\n", + "a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )\n", + "\n", + "#calculate\n", + "d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing\n", + "\n", + "#result\n", + "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lattice spacing is d= 1.26 Angstrom\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 , Page no:63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "h=1;k=0;l=0; #miller indices\n", + "a=2.5; #in Angstrom (lattice constant)\n", + "\n", + "#calculate\n", + "a=a*1E-10; #hence a is in Angstrom\n", + "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", + "p=d/a**3;\n", + "\n", + "#result\n", + "print\"The density is p=\",round(p),\"lattice points/m^2\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density is p= 1.6e+19 lattice points/m^2\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_04_Crystal_Diffraction_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_04_Crystal_Diffraction_1.ipynb new file mode 100755 index 00000000..fef74a69 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_04_Crystal_Diffraction_1.ipynb @@ -0,0 +1,503 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:513926db1524f2764781365e8a81c6fa3119b7bc0f032a42233e49f5c3b6140a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4:Crystal Diffraction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 , Page no:75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "lambda1=2.6; #in Angstrom (wavelength)\n", + "theta=20; #in Degree (angle)\n", + "n=2;\n", + "\n", + "#calculate\n", + "lambda1=lambda1*1E-10; #since lambda is in Angstrom\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore d=n(lambda)/2sin(theta)\n", + "d=n*lambda1/(2*math.sin(math.radians(theta)));\n", + "\n", + "#result\n", + "print\"The spacing constant is d=\",'%.2E'%d,\"m\";\n", + "print\"\\t\\t\\td=\",round(d*10**10,3),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spacing constant is d= 7.60E-10 m\n", + "\t\t\td= 7.602 Angstrom\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 , Page no:75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "h=1;k=1;l=0; #miller indices\n", + "a=0.26; #in nanometer (lattice constant)\n", + "lambda1=0.065; #in nanometer (wavelength)\n", + "n=2; #order\n", + "\n", + "#calculate\n", + "d=a/math.sqrt(h**2+k**2+l**2); #calculation of interlattice spacing\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "theta=math.asin(n*lambda1/(2*d));\n", + "theta1=theta*180/3.14;\n", + "\n", + "#result\n", + "print\"The glancing angle is =\",round(theta1,2),\"degree\";\n", + "print \"Note: there is slight variation in the answer due to round off error\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The glancing angle is = 20.72 degree\n", + "Note: there is slight variation in the answer due to round off error\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 , Page no:75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "d=3.04E-10; #in mm (spacing constant)\n", + "lambda1=0.79; #in Angstrom (wavelength)\n", + "n=3; #order\n", + "\n", + "#calculate\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "lambda2=lambda1*1E-10; #since lambda is in angstrom\n", + "theta=math.asin(n*lambda2/(2*d));\n", + "theta1=theta*180/3.14;\n", + "\n", + "#result\n", + "print\"The glancing angle is\",round(theta1,3),\"degree\";\n", + "print \"Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The glancing angle is 22.954 degree\n", + "Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 , Page no:76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "d=0.282; #in nanometer (spacing constant)\n", + "n=1; #order\n", + "theta=8.35; #in degree (glancing angle)\n", + "\n", + "#calculate\n", + "d=d*1E-9; #since d is in nanometer\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "lambda1=2*d*math.sin(math.radians(theta))/n; \n", + "lambda_1=lambda1*1E10; #changing unit from m to Angstrom\n", + "theta_1=90; #in degree (for maximum order theta=90)\n", + "n_max=2*d*math.sin(math.radians(theta_1))/lambda1; #calculation of maximum order. \n", + "\n", + "#result\n", + "print\"The wavelength =\",'%.2E'%lambda1,\"m\";\n", + "print\"\\t\\t=\" ,round(lambda_1,3),\"Angstrom\";\n", + "print\"The maximum order possible is n=\",round(n_max);\n", + "print \"Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength = 8.19E-11 m\n", + "\t\t= 0.819 Angstrom\n", + "The maximum order possible is n= 7.0\n", + "Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 , Page no:76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "theta=6; #in degree (glancing angle)\n", + "p=2170; #in Kg/m^3 (density)\n", + "M=58.46; #Molecular weight of NaCl\n", + "N=6.02E26; #in Kg-molecule (Avogadro's number)\n", + "n=1; #order\n", + "XU=1E-12; #since 1X.U.= 1E-12m\n", + "\n", + "#calculate\n", + "d=(M/(2*N*p))**(1/3); #calclation of lattice constant\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation of wavelength\n", + "lambda2=lambda1/XU;\n", + "\n", + "#result\n", + "print\"The spacing constant is d=\",'%.2E'%d,\"m\";\n", + "print\"The wavelength is =\",'%.2E'%lambda1,\"m\";\n", + "print\"\\t\\t =\",round(lambda2,1),\"X.U\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spacing constant is d= 2.82E-10 m\n", + "The wavelength is = 5.89E-11 m\n", + "\t\t = 58.9 X.U\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 , Page no:77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "h=1;k=1;l=1; #miller indices\n", + "a=5.63; #in Angstrom (lattice constant)\n", + "theta=27.5; #in degree (Glancing angle)\n", + "n=1; #order\n", + "H=6.625E-34; #in J-s (Plank's constant)\n", + "c=3E8; #in m/s (velocity of light)\n", + "e=1.6E-19; #charge of electron\n", + "\n", + "#calculate\n", + "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation for wavelength\n", + "E=H*c/(lambda1*1E-10); #calculation of Energy\n", + "E1=E/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";\n", + "print\"The wavelength is =\",round(lambda1),\"Angstrom\";\n", + "print\"The energy of X-rays is E=\",'%.2E'%E,\"J\";\n", + "print\"\\t\\t\\tE=\",'%.3E'%E1,\"eV\";\n", + "print \"Note: c=3E8 m/s but in solution c=3E10 m/s \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lattice spacing is d= 3.25 Angstrom\n", + "The wavelength is = 3.0 Angstrom\n", + "The energy of X-rays is E= 6.62E-16 J\n", + "\t\t\tE= 4.138E+03 eV\n", + "Note: c=3E8 m/s but in solution c=3E10 m/s \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 , Page no:77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "V=344; #in V (accelerating voltage)\n", + "theta=60; #in degree (glancing angle)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "h=6.625e-34; #in J-s (Plank's constant)\n", + "n=1; #order\n", + "e=1.6E-19; #charge on electron\n", + "\n", + "#calculate\n", + "#Since K=m*v^2/2=e*V\n", + "#therefore v=sqrt(2*e*V/m)\n", + "#since lambda=h/(m*v)\n", + "#therefore we have lambda=h/sqrt(2*m*e*V)\n", + "lambda1=h/math.sqrt(2*m*e*V); #calculation of lambda\n", + "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "d=n*lambda2/(2*math.sin(math.radians(theta)));\n", + "\n", + "#result\n", + "print\"The wavelength is =\",'%.2E'%lambda1,\"m\";\n", + "print\"\\t\\t =\",round(lambda2,2),\"Angstrom\";\n", + "print\"The interplanar spacing is d=\",round(d,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 6.62E-11 m\n", + "\t\t = 0.66 Angstrom\n", + "The interplanar spacing is d= 0.38 Angstrom\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 , Page no:78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "K=0.02; #in eV (kinetic energy)\n", + "d=2.0; #in Angstrom (Bragg's spacing)\n", + "m=1.00898; #in amu (mass of neutron)\n", + "amu=1.66E-27; #in Kg (1amu=1.66E-27 Kg)\n", + "h=6.625e-34; #in J-s (Plank's constant)\n", + "n=1; #order\n", + "e=1.6E-19; #charge on electron\n", + "\n", + "#calculate\n", + "#Since K=m*v^2/2\n", + "#therefore v=sqrt(2*K/m)\n", + "#since lambda=h/(m*v)\n", + "#therefore we have lambda=h/sqrt(2*m*K)\n", + "m=m*amu; #changing unit from amu to Kg\n", + "K=K*e; #changing unit to J from eV\n", + "lambda1=h/math.sqrt(2*m*K); #calculation of lambda\n", + "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", + "theta=math.asin(n*lambda2/(2*d)); #calculation of angle of first order diffraction maximum\n", + "theta1=theta*180/3.14;\n", + "#result\n", + "print\"The wavelength is =\",'%.2E'%lambda1,\"m\";\n", + "print\"\\t \\t =\",round(lambda2),\"Angstrom\";\n", + "print\"The angle of first order diffraction maximum is \",round(theta1),\"Degree\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 2.02E-10 m\n", + "\t \t = 2.0 Angstrom\n", + "The angle of first order diffraction maximum is 30.0 Degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 , Page no:79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "lambda1=0.586; #in Angstrom (wavelength of X-rays)\n", + "n1=1; n2=2; n3=3; #orders of diffraction\n", + "theta1=5+(58/60); #in degree (Glancing angle for first order of diffraction)\n", + "theta2=12+(01/60); #in degree (Glancing angle for second order of diffraction)\n", + "theta3=18+(12/60); #in degree (Glancing angle for third order of diffraction)\n", + "\n", + "#calculate\n", + "K1=math.sin(math.radians(theta1));\n", + "K2=math.sin(math.radians(theta2));\n", + "K3=math.sin(math.radians(theta3));\n", + "#Since 2dsin(theta)=n(lambda)\n", + "#therefore we have\n", + "d1=n1*lambda1/(2*K1);\n", + "d2=n2*lambda1/(2*K2);\n", + "d3=n3*lambda1/(2*K3);\n", + "d1=d1*1E-10; #changing unit from Angstrom to m\n", + "d2=d2*1E-10; #changing unit from Angstrom to m\n", + "d3=d3*1E-10; #changing unit from Angstrom to m\n", + "d=(d1+d2+d3)/3;\n", + "\n", + "#result\n", + "print\"The value of sine of different angle of diffraction is \\nK1=\",round(K1,4);\n", + "print\"K2=\",round(K2,4);\n", + "print\"K3=\",round(K3,4);\n", + "#Taking the ratios of K1:K2:K3\n", + "#We get K1:K2:K3=1:2:3\n", + "#Therefore we have\n", + "print\"Or we have K1:K2:K3=1:2:3\";\n", + "print\"Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\";\n", + "print\"The spacing constants are \\nd1=\",'%.2E'%d1;\n", + "print\"d2=\",'%.3E'%d2;\n", + "print\"d3=\",'%.3E'%d3;\n", + "print\"The mean value of crystal spacing is d=\",'%.3E'%d,\"m\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of sine of different angle of diffraction is \n", + "K1= 0.1039\n", + "K2= 0.2082\n", + "K3= 0.3123\n", + "Or we have K1:K2:K3=1:2:3\n", + "Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\n", + "The spacing constants are \n", + "d1= 2.82E-10\n", + "d2= 2.815E-10\n", + "d3= 2.814E-10\n", + "The mean value of crystal spacing is d= 2.816E-10 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb new file mode 100755 index 00000000..66041c45 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb @@ -0,0 +1,1258 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:43369901ed597bc7502d54a31a362249abbf2812c557cb432bc86adf72bf30d7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5:Principles of Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 , Page no:102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "lambda1=1; #in Angstrom (wavelength)\n", + "m=1.67E-27; #in Kg (mass of neutron)\n", + "h=6.625E-34; #in J-s (Planck's constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "lambda2=lambda1*1E-10; #since lambda is in Angstrom\n", + "#Since lambda=h/(m*v)\n", + "#Therefore we have\n", + "v=h/(m*lambda2); #calculation of velocity\n", + "K=m*v**2/2; #calculation of kinetic energy\n", + "K1=K/e; #changing unit fro J to eV\n", + "\n", + "#result\n", + "print\"The velocity is v=\",round(v,3),\"m/s\";\n", + "print\"The kinetic energy is K=\",'%.3E'%K,\"J\";\n", + "print\"\\t\\t =\",'%.3E'%K1,\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity is v= 3967.066 m/s\n", + "The kinetic energy is K= 1.314E-20 J\n", + "\t\t = 8.213E-02 eV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 , Page no:103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "K=50; #in eV (Kinetic energy)\n", + "m0=9.1E-31; #in Kg (mass of electron)\n", + "h=6.625E-34; #in J-s (Planck's constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "K=K*e; #changing unit from eV to J\n", + "#Since K=m*v^2/2\n", + "#Therefore v=sqrt(2*K/m)\n", + "#Since lambda=h/(m*v)\n", + "#Therefore we have\n", + "lambda1=h/math.sqrt(2*m0*K); #calculation of wavelength\n", + "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", + "\n", + "#result\n", + "print\"The wavelength is =\",'%.3E'%lambda1,\"m\";\n", + "print\"\\t\\t =\",round(lambda2,3),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 1.736E-10 m\n", + "\t\t = 1.736 Angstrom\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 , Page no:104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "E=2000; #in eV (Kinetic energy)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "h=6.625E-34; #in J-s (Planck's constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "E=E*e; #changing unit from eV to J\n", + "#Since E=m*v^2/2\n", + "#Therefore v=sqrt(2*E/m)\n", + "#Since lambda=h/(m*v)\n", + "#Therefore we have\n", + "lambda1=h/math.sqrt(2*m*E); #calculation of wavelength\n", + "lambda2=lambda1*1E9; #changing unit from m to nanometer\n", + "\n", + "#result\n", + "print\"The wavelength is =\",'%.3E'%lambda1,\"m\";\n", + "print\"\\t\\t =\",round(lambda2,4),\"nm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 2.745E-11 m\n", + "\t\t = 0.0275 nm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 , Page no:104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "m_e=9.1E-31; #in Kg (mass of electron)\n", + "m_n=1.676E-27; #in Kg (mass of neutron)\n", + "h=6.625E-34; #in J-s (Planck's constant)\n", + "c=3E8; #in m/s (velocity of light)\n", + "\n", + "#calculate\n", + "E_e=m_e*c**2; #rest mass energy of electron\n", + "E_n=2*E_e; #given (kinetic energy of neutron)\n", + "#Since K=m*v^2/2\n", + "#Therefore v=sqrt(2*K/m)\n", + "#Since lambda=h/(m*v)\n", + "#Therefore we have\n", + "lambda1=h/math.sqrt(2*m_n*E_n); #calculation of wavelength\n", + "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", + "\n", + "#result\n", + "print\"The wavelength is =\",'%.3E'%lambda1,\"m\";\n", + "print\"\\t\\t =\",'%.3E'%lambda2,\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 2.827E-14 m\n", + "\t\t = 2.827E-04 Angstrom\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 , Page no:104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "V=1600; #in V (Potential)\n", + "\n", + "#calculate\n", + "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", + "\n", + "#result\n", + "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", + "print \"Note : The answer in the book is wrong \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 0.307 Angstrom\n", + "Note : The answer in the book is wrong \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 , Page no:105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "E=1000; #in eV (Kinetic energy of photon)\n", + "K=1000; #in eV (Kinetic energy of electron)\n", + "m0=9.1E-31; #in Kg (mass of electron)\n", + "h=6.6E-34; #in J-s (Planck's constant)\n", + "c=3E8; #in m/s (velocity of light)\n", + "e=1.6E-19; #in C (charge on electron)\n", + "\n", + "#calculate\n", + "E=E*e; #changing unit from eV to J\n", + "lambda_p=h*c/E; #For photon E=hc/lambda\n", + "lambda_p1=lambda_p*1E10; #changing unit from m to Angstrom\n", + "#Since K=m*v^2/2\n", + "#Therefore v=sqrt(2*K/m)\n", + "#Since lambda=h/(m*v)\n", + "#Therefore we have\n", + "K=K*e; #changing unit from eV to J\n", + "lambda_e=h/math.sqrt(2*m0*K); #calculation of wavelength\n", + "lambda_e1=lambda_e*1E10; #changing unit from m to Angstrom\n", + "\n", + "#result\n", + "print\"For photon,the wavelength is =\",'%.3E'%lambda_p,\"m\";\n", + "print\"\\t\\t\\t =\",round(lambda_p1,1),\"Angstrom\";\n", + "print\"For electron,the wavelength is =\",'%.3E'%lambda_e,\"m\";\n", + "print\"\\t\\t\\t =\",round(lambda_e1,2),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For photon,the wavelength is = 1.238E-09 m\n", + "\t\t\t = 12.4 Angstrom\n", + "For electron,the wavelength is = 3.868E-11 m\n", + "\t\t\t = 0.39 Angstrom\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 , Page no:105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "lambda1=1.66*10**-10; #in m (wavelength)\n", + "m=9.1*10**-31; #in Kg (mass of electron)\n", + "h=6.626*10**-34; #in J-s (Planck's constant)\n", + "e=1.6E-19; #in C (charge on electron)\n", + "\n", + "#calculate\n", + "#Since lambda=h/(m*v)\n", + "#Therefore we have\n", + "v=h/(m*lambda1); #calculation of velocity\n", + "K=m*v**2/2; #calculation of kinetic energy\n", + "K1=K/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The velocity of electron is v=\",'%.2E'%v,\"m/s\";\n", + "print\"The kinetic energy is K=\",'%.2E'%K,\"J\";\n", + "print\"\\t\\t =\",round(K1,3),\"eV\";\n", + "print \"Note: The answer in the book for kinetic energy is wrong \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of electron is v= 4.39E+06 m/s\n", + "The kinetic energy is K= 8.75E-18 J\n", + "\t\t = 54.714 eV\n", + "Note: The answer in the book for kinetic energy is wrong \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 , Page no:106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "T=400; #in K (temperature)\n", + "m=6.7E-27; #in Kg (mass of He-atom)\n", + "h=6.6E-34; #in J-s (Planck's constant)\n", + "k=1.376E-23; #in J/degree (Boltzmann constant)\n", + "\n", + "#calculate\n", + "#Since lambda=h/(m*v)\n", + "#E=mv^2/2;\n", + "#Therefore lambda=h/sqrt(2*m*E)\n", + "#E=kT\n", + "#Therefore lambda=h/sqrt(2*m*k*T)\n", + "lambda1=h/math.sqrt(2*m*k*T)\n", + "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", + "\n", + "#result\n", + "print\"The de-Broglie wavelength of He-atom is =\",'%.2E'%lambda1,\"m\";\n", + "print\"\\t\\t\\t\\t =\",round(lambda2,4),\"Angstrom\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de-Broglie wavelength of He-atom is = 7.69E-11 m\n", + "\t\t\t\t = 0.7685 Angstrom\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 , Page no:106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "m_e=9.1E-31; #in Kg (mass of electron)\n", + "m_p=1.6E-27; #in Kg (mass of proton)\n", + "h=6.626E-34; #in J-s (Planck's constant)\n", + "c=3E8; #in m/s (velocity of light)\n", + "\n", + "#calculate\n", + "E=m_e*c**2; #in J (rest energy of electron)\n", + "#Since lambda=h/(m*v)\n", + "#E=mv^2/2;\n", + "#herefore lambda=h/sqrt(2*m*E)\n", + "#Also E=m_e*c^2;\n", + "#therefore lambda=h/sqrt(2*m_p*m_e*c^2)\n", + "lambda1=h/math.sqrt(2*m_p*m_e*c**2); #calculation of wavelength\n", + "lambda2=lambda1*1*10**10; #changing unit from m to Angstrom\n", + "\n", + "#result\n", + "print\"The de-Broglie wavelength of proton is =\",'%.2E'%lambda1,\"m\";\n", + "print\"\\t\\t\\t\\t =\",'%.2E'%lambda2,\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de-Broglie wavelength of proton is = 4.09E-14 m\n", + "\t\t\t\t = 4.09E-04 Angstrom\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 , Page no:106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "V=10000; #in V (Potential)\n", + "\n", + "#calculate\n", + "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", + "\n", + "#result\n", + "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 0.123 Angstrom\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 , Page no:107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "V=100; #in V (Potential)\n", + "n=1; #order of diffraction\n", + "d=2.15; #in Angstrom (lattice spacing)\n", + "\n", + "#calculate\n", + "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", + "#Since 2*d*sind(theta)=n*lambda\n", + "#therefore we have\n", + "theta=math.asin(n*lambda1/(2*d)); #calculation of glancing angle\n", + "theta1=theta*180/3.14;\n", + "\n", + "#result\n", + "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", + "print\"The glancing angle is =\",round(theta1,1),\"degree\";\n", + "print \"Note: In question V=100 eV but the solution is using V=100V \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 1.227 Angstrom\n", + "The glancing angle is = 16.6 degree\n", + "Note: In question V=100 eV but the solution is using V=100V \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 , Page no:107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "V=344; #in V (Potential)\n", + "n=1; #order of diffraction\n", + "theta=60; #in degree (glancing angle)\n", + "\n", + "#calculate\n", + "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n", + "#Since 2*d*sind(theta)=n*lambda\n", + "#therefore we have\n", + "d=n*lambda1/(2*math.sin(math.radians(theta))); #calculation of spacing constant\n", + "\n", + "#result\n", + "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n", + "print\"The spacing of the crystal is =\",round(d,4),\"Angstrom\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is = 0.662 Angstrom\n", + "The spacing of the crystal is = 0.3819 Angstrom\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 , Page no:107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "r=0.53*10**-10; #in m (radius of first Bohr orbit)\n", + "h=6.6*10**-34; #in J-s (Planck's constant)\n", + "m=9.1*10**-31; #in Kg (mass of electron)\n", + "n=1; #First Bohr orbit\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "#Since 2*pi*r=n*lambda and lambda=h/(m*v)\n", + "#Threfore we have v=h*n/(2*pi*r*m)\n", + "v=h*n/(2*pi*r*m); #calculation of velocity\n", + "\n", + "#result\n", + "print\"The velocity of electron is =\",'%.3E'%v,\"m/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of electron is = 2.179E+06 m/s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 , Page no:108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "dx=0.2; #in Angstrom (uncertainty in the position)\n", + "h=6.6E-34; #in J-s (Planck's constant)\n", + "m0=9.1E-31; #in Kg (mass of electron)\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "dx=dx*1E-10; #since dx is in Angstrom\n", + "#Since dx*dp=h/4*pi (uncertainty relation)\n", + "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", + "#since dp=m*dv\n", + "dv=dp/m0; #calculation of uncertainty in the velocity\n", + "\n", + "#result\n", + "print\"The uncertainty in the momentum is dp=\",'%.3E'%dp,\"Kg-m/\";\n", + "print\"The uncertainty in the velocity is dv=\",'%.3E'%dv,\"m/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainty in the momentum is dp= 2.627E-24 Kg-m/\n", + "The uncertainty in the velocity is dv= 2.887E+06 m/s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 , Page no:108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "m_e=9.1E-31; #in Kg (mass of electron)\n", + "m_p=1.67E-27; #in Kg (mass of proton)\n", + "dx_p=1; #in nanometer (uncertainty in position of electron)\n", + "dx_n=1; #in nanometer (uncertainty in position of proton)\n", + "\n", + "#calculate\n", + "#since dp=h/(4*pi*dx)\n", + "#since h/(4*pi) is constant and dx is same for electron and proton \n", + "#therefor both electron and proton have same uncertainty in the momentum\n", + "#since dv=dp/m and dp is same for both\n", + "#therefore dv_e/dv_p=m_p/m_e\n", + "#therefore\n", + "K=m_p/m_e; #ratio of uncertainty in the velocity of electron and proton\n", + "\n", + "#result\n", + "print\"The ratio of uncertainty in the velocity of electron to that of proton is =\",round(K);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of uncertainty in the velocity of electron to that of proton is = 1835.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 , Page no:108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "dx=5*10**-15; #in m (radius of nucleus or uncertainty in the position)\n", + "h=6.6*10**-34; #in J-s (Planck's constant)\n", + "m=1.67E-27; #in Kg (mass of proton)\n", + "pi=3.14; #value of pi used in the solution\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#Since dx*dp=h/4*pi (uncertainty relation)\n", + "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", + "p=dp; #minimum value of momentum to calculate mimimum kinetic energy\n", + "K=(p**2)/(2*m); #calculation of minimum kinetic energy of proton\n", + "K1=K/e; #changing unit from J to eV\n", + "K2=K1/1E6; #changing unit from eV to MeV\n", + "\n", + "#result\n", + "print\"The minimum uncertainty in the momentum of proton is dp =\",'%.3E'%dp,\"Kg-m/s\";\n", + "print\"The minimum kinetic energy of proton is K=\",'%.3E'%K,\"J\";\n", + "print\"\\t\\t\\t\\t \\t =\",'%.3E'%K1,\"eV\";\n", + "print\"\\t\\t\\t\\t\\t =\",round(K2,1),\"MeV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainty in the momentum of proton is dp = 1.051E-20 Kg-m/s\n", + "The minimum kinetic energy of proton is K= 3.307E-14 J\n", + "\t\t\t\t \t = 2.067E+05 eV\n", + "\t\t\t\t\t = 0.2 MeV\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 , Page no:109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "K=1; #in KeV (kinetic energy of electron)\n", + "dx=1; #in Angstrom (uncertainty in the position)\n", + "h=6.63E-34; #in J-s (Planck's constant)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "pi=3.14; #value of pi used in the solution\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "dx=dx*1E-10; #since dx is in Angstrom\n", + "#Since dx*dp=h/4*pi (uncertainty relation)\n", + "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n", + "K=K*1E3*1.6E-19; #changing unit from KeV to J\n", + "p=math.sqrt(2*m*K); #calculation of momentum \n", + "poc=(dp/p)*100; #calculation of percentage of uncertainty\n", + "\n", + "#result\n", + "print\"The uncertainty in the momentum of electron is dp=\",'%.3E'%dp,\"Kg-m/s\";\n", + "print\"The momentum of electron is p=\",'%.3E'%p,\"Kg-m/s\";\n", + "print\"The percentage of uncertainty in the momentum is =\",round(poc,1);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainty in the momentum of electron is dp= 5.279E-25 Kg-m/s\n", + "The momentum of electron is p= 1.706E-23 Kg-m/s\n", + "The percentage of uncertainty in the momentum is = 3.1\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 , Page no:109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "v=6.6E4; #m/s (speed of electron)\n", + "poc=0.01; #percentage of uncertainty\n", + "h=6.63E-34; #in J-s (Planck's constant)\n", + "m=9E-31; #in Kg (mass of electron)\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "p=m*v; #calculation of momentum\n", + "dp=(poc/100)*p; #calculation of uncertainty in the momentum\n", + "#Since dx*dp=h/4*pi (uncertainty relation)\n", + "dx=h/(4*pi*dp); #calculation of uncertainty in the position\n", + "\n", + "#result\n", + "print\"The momentum of electron is p=\",'%.3E'%p,\"Kg-m/s\";\n", + "print\"The uncertainty in the momentum of electron is dp=\",'%.3E'%dp,\"Kg-m/s\";\n", + "print\"The uncertainty in the position of electron is dx=\",'%.3E'%dx,\"Kg-m/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of electron is p= 5.940E-26 Kg-m/s\n", + "The uncertainty in the momentum of electron is dp= 5.940E-30 Kg-m/s\n", + "The uncertainty in the position of electron is dx= 8.887E-06 Kg-m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 , Page no:111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "lambda1=1; #in Angstrom (wavelength)\n", + "pi=3.14; #value of pi used in the solution\n", + "dlambda=1E-6; #uncertainty in wavelength\n", + "\n", + "#calculate\n", + "lambda2=lambda1*1E-10; #sinc lambda is in Angstrom\n", + "#By uncertainty principle, dx*dp>=h/(4*pi) --(1)\n", + "#since p=h/lambda -----(2)\n", + "#Or p*lambda=h \n", + "#diffrentiting this equation\n", + "#p*dlambda+lambda*dp=0\n", + "#dp=-p*dlambda/lambda ----(3)\n", + "#from (2) and (3) dp=-h*dlambda/lambda^2 ---(4)\n", + "#from (1) and(4) dx*dlambda>=lambda^2/4*pi\n", + "#Or dx=lambda^2/(4*pi*dlambda)\n", + "dx=lambda2**2/(4*pi*dlambda); #calculation of uncertainty in the position\n", + "\n", + "#result\n", + "print\"The uncertainty in the position of X-ray photon is dx=\",'%.3E'%dx,\"m\";\n", + "print \"Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \"\n", + "print \" ANSWEER IS WRONG IN THE TEXTBOOK\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainty in the position of X-ray photon is dx= 7.962E-16 m\n", + "Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \n", + " ANSWEER IS WRONG IN THE TEXTBOOK\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 , Page no:111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "dt=1*10**-8; #in sec (average life time)\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", + "#and E=h*v v is the frequency\n", + "#therefore we have dv>=1/(4*pi*dt)\n", + "dv=1/(4*pi*dt); #calculation of minimum uncertainty in the frequency\n", + "\n", + "#result\n", + "print\"The minimum uncertainty in the frequency of the photon is dv=\",'%.3E'%dv,\"sec^-1\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainty in the frequency of the photon is dv= 7.962E+06 sec^-1\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 , Page no:111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "dt=1E-12; #in sec (average life time)\n", + "h=6.63E-34; #in J-s (Planck'c constant)\n", + "pi=3.14; #value of pi used in the solution\n", + "e=1.6*1E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", + "dE=h/(4*pi*dt); #calculation of minimum uncertainty in the energy\n", + "dE1=dE/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The uncertainty in the energy of the photon is dE=\",'%.3E'%dE,\"J\";\n", + "print\"\\t\\t\\t\\t\\t =\",'%.3E'%dE1,\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainty in the energy of the photon is dE= 5.279E-23 J\n", + "\t\t\t\t\t = 3.299E-04 eV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 , Page no:111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "dT=2.5E-14; #in sec (average life time)\n", + "h=6.63E-34; #in J-s (Planck'c constant)\n", + "pi=3.14; #value of pi used in the solution\n", + "e=1.6*1E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n", + "dE=h/(4*pi*dT); #calculation of minimum uncertainty in the energy\n", + "dE1=dE/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The uncertainty in the energy of the photon is dE=\",'%.3E'%dE,\"J\";\n", + "print\"\\t\\t\\t\\t\\t =\",'%.3E'%dE1,\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainty in the energy of the photon is dE= 2.111E-21 J\n", + "\t\t\t\t\t = 1.320E-02 eV\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 , Page no:112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "a=2; #in Angstrom (length of the box)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "h=6.626E-34; #in J-s (Planck'c constant)\n", + "n2=2; n4=4; #two quantum states\n", + "e=1.6*1E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "a=a*1E-10; #since a is in Angstrom \n", + "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", + "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd quantum state\n", + "E21=E2/e; #changing unit from J to eV\n", + "E4=n4**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 4nd quantum state\n", + "E41=E4/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The energy corresponding to the 2nd quantum state is E2=\",'%.3E'%E2,\"J\";\n", + "print\"\\t\\t\\t\\t\\t\\t =\",'%.3E'%E21,\"eV\";\n", + "print\"The energy corresponding to the 4nd quantum state is E4=\",'%.3E'%E4,\"J\";\n", + "print\"\\t\\t\\t\\t\\t\\t =\",'%.3E'%E41,\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy corresponding to the 2nd quantum state is E2= 6.031E-18 J\n", + "\t\t\t\t\t\t = 3.769E+01 eV\n", + "The energy corresponding to the 4nd quantum state is E4= 2.412E-17 J\n", + "\t\t\t\t\t\t = 1.508E+02 eV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 , Page no:113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "a=1E-10; #in m (width of the well)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "h=6.626E-34; #in J-s (Planck'c constant)\n", + "n1=1; n2=2; n3=3; #ground and first two excited states\n", + "e=1.6*1E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", + "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the Ground state\n", + "E11=E1/e; #changing unit from J to eV\n", + "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 1st excited state\n", + "E21=E2/e; #changing unit from J to eV\n", + "E3=n3**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd excited state\n", + "E31=E3/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The energy corresponding to the ground state is E1=\",'%.3E'%E1,\"J\";\n", + "print\"\\t\\t\\t\\t\\t =\",'%.3E'%E11,\"eV\";\n", + "print\"The energy corresponding to the 1st excited state is E2=\",'%.3E'%E2,\"\";\n", + "print\"\\t\\t\\t\\t\\t =\",'%.3E'%E21,\"eV\";\n", + "print\"The energy corresponding to the 2nd excited state is E3=\",'%.3E'%E3,\"J\";\n", + "print\"\\t\\t\\t\\t\\t =\",'%.3E'%E31,\"eV\";\n", + "print \" There is slight variation in the answer due to round off error\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy corresponding to the ground state is E1= 6.031E-18 J\n", + "\t\t\t\t\t = 3.769E+01 eV\n", + "The energy corresponding to the 1st excited state is E2= 2.412E-17 \n", + "\t\t\t\t\t = 1.508E+02 eV\n", + "The energy corresponding to the 2nd excited state is E3= 5.428E-17 J\n", + "\t\t\t\t\t = 3.392E+02 eV\n", + " There is slight variation in the answer due to round off error\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 , Page no:113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "dx=1E-8; #in m (length of box or uncertainty in the position)\n", + "h=6.626E-34; #in J-s (Planck'c constant)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "\n", + "#calculate\n", + "#From uncertainty principle dx*dp=h and dp=m*dv\n", + "#therefore we have\n", + "dv=h/(m*dx); #calculation of minimum uncertainty in the velocity\n", + "dv1=dv*1E-3; #changing unit from m/s to Km/s\n", + "\n", + "#result\n", + "print\"The minimum uncertainty in the velocity of electron i dv=\",'%.3E'%dv,\"m/s\";\n", + "print\"\\t\\t\\t\\t\\t\\t =\",round(dv1,2),\"Km/s\";\n", + "print \"Note: There is slight variation in the answer due to round off error\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainty in the velocity of electron i dv= 7.281E+04 m/s\n", + "\t\t\t\t\t\t = 72.81 Km/s\n", + "Note: There is slight variation in the answer due to round off error\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 , Page no:113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "a=4E-10; #in m (length of the box)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "h=6.626E-34; #in J-s (Planck'c constant)\n", + "n1=1; #ground state\n", + "e=1.6*1E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n", + "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the ground state\n", + "E11=E1/e; #changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The minimum energy of electron is E1=\",'%.3E'%E1,\"J (Note: The answer in the book is wrong due to printing error)\";\n", + "print\"\\t\\t\\t\\t =\",round(E11,3),\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum energy of electron is E1= 3.769E-19 J (Note: The answer in the book is wrong due to printing error)\n", + "\t\t\t\t = 2.356 eV\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb new file mode 100755 index 00000000..d52f3a45 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb @@ -0,0 +1,561 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c7e08d83e902e2949e4fdcd2bc98d527fe589fabb9636cea78c35c42abb8038" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6:Electron Theory and Band Theory of Metals" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 , Page no:146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "n=8.5E28; #in 1/m^3 (density of electron)\n", + "m_e=9.11E-31; #in Kg (mass of electron)\n", + "k=1.38E-23; #in J/K (Boltzmann's constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "T=300; #in K (temperature)\n", + "p=1.69E-8; #in ohm-m (resistivity)\n", + "\n", + "#calculate\n", + "lambda1=math.sqrt(3*k*m_e*T)/(n*e**2*p); #calculation of mean free path\n", + "lambda2=lambda1*1E9; #changing unit from m to nanometer\n", + "\n", + "#result\n", + "print\"The mean free path of electron is =\",'%.3E'%lambda1,\"m\";\n", + "print\"\\t\\t\\t\\t =\",round(lambda2,2),\"nm\";\n", + "#Note: answer in the book is wrong due to printing mistake" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean free path of electron is = 2.893E-09 m\n", + "\t\t\t\t = 2.89 nm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 , Page no:146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "k=1.38E-23; #in J/K (Boltzmann's constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "P_E=1; #in percentage (probability that a state with an energy 0.5 eV above Fermi energy will be occupied)\n", + "E=0.5; #in eV (energy above Fermi level)\n", + "\n", + "#calculate\n", + "P_E=1/100; #changing percentage into ratio\n", + "E=E*e; #changing unit from eV to J\n", + "#P_E=1/(1+exp((E-E_F)/k*T))\n", + "#Rearranging this equation, we get\n", + "#T=(E-E_F)/k*log((1/P_E)-1)\n", + "#Since E-E_F has been denoted by E therefore\n", + "T=E/(k*math.log((1/P_E)-1));\n", + "\n", + "#result\n", + "print\"The temperature is T=\",round(T),\"K\";\n", + "# Note: There is slight variation in the answer due to logarithm function" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature is T= 1262.0 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 , Page no:147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "n=5.8E28; #in 1/m^3 (density of electron)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "p=1.54E-8; #in ohm-m (resistivity)\n", + "\n", + "#calculate\n", + "t=m/(n*e**2*p); #calculation of relaxation time\n", + "\n", + "#result\n", + "print\"The relaxation time of conduction electrons is =\",'%.3E'%t,\"sec\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relaxation time of conduction electrons is = 3.980E-14 sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 , Page no:147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "n=8.5E28; #in 1/m^3 (density of electron)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "sigma=6E7; #in 1/ohm-m (conductivity)\n", + "E_F=7; #in E=eV (Fermi energy of Copper)\n", + "\n", + "#calculate\n", + "E_F=E_F*e; #changing unit from eV to J\n", + "v_F=math.sqrt(2*E_F/m); #calculation of velocity of electrons\n", + "#Since sigma=n*e^2*lambda/(2*m*v_F)\n", + "#Therefore we have\n", + "lambda1=2*m*v_F*sigma/(n*e**2); #calculation of mean free path\n", + "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n", + "\n", + "#result\n", + "print\"The velocity of the electrons is v_F=\",'%.3E'%v_F,\"m/s (roundoff error)\";\n", + "print\"The mean free path traveled by the electrons is=\",round(lambda2),\"Angstrom\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the electrons is v_F= 1.569E+06 m/s (roundoff error)\n", + "The mean free path traveled by the electrons is= 787.0 Angstrom\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 , Page no:147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "n=6.5E28; #in 1/m^3 (density of electron)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "p=1.43E-8; #in ohm-m (resistivity)\n", + "\n", + "#calculate\n", + "t=m/(n*e**2*p); #calculation of relaxation time\n", + "\n", + "#result\n", + "print\"The relaxation time of conduction electrons is =\",'%.3E'%t,\"sec\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relaxation time of conduction electrons is = 3.824E-14 sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 , Page no:148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "T=30; #in Celcius (temperature)\n", + "k=1.38E-23; #in J/K (Boltzmann's constant)\n", + "m_p=1.67E-27; #in Kg (mass of proton)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "T=T+273; #changing temperature from Celcius to Kelvin\n", + "KE=(3/2)*k*T; #calculation of average kinetic energy\n", + "KE1=KE/e; #changing unit from J to eV\n", + "m=1.008*2*m_p; #calculating mass of hydrogen gas molecule\n", + "c=math.sqrt(3*k*T/m); #calculation of velocity\n", + "\n", + "#result\n", + "print\"The average kinetic energy of gas ,molecules is KE=\",'%.3E'%KE,\"J\";\n", + "print\"\\t\\t\\t\\t\\t\\t =\",round(KE1,4),\"eV (Answer is wrong in textbook)\";\n", + "print\"The velocity of molecules is c=\",round(c,2),\"m/s\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average kinetic energy of gas ,molecules is KE= 6.272E-21 J\n", + "\t\t\t\t\t\t = 0.0392 eV (Answer is wrong in textbook)\n", + "The velocity of molecules is c= 1930.27 m/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 , Page no:148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "E=10; #in eV (kinetic energy for each electron and proton)\n", + "m_e=9.1E-31; #in Kg (mass of electron)\n", + "m_p=1.67E-27; #in Kg (mass of proton)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "E=E*e; #changing unit from eV to J\n", + "#since E=m*v^2/2\n", + "#therefore v=sqrt(2E/m)\n", + "v_e=math.sqrt(2*E/m_e); #calculation of kinetic energy of electron\n", + "v_p=math.sqrt(2*E/m_p); #calculation of kinetic energy of proton\n", + "\n", + "#result\n", + "print\"The kinetic energy of electron is v_e=\",'%.3E'%v_e,\"m/s\";\n", + "print\"The kinetic energy of proton is v_p=\",'%.3E'%v_p,\"m/s\";\n", + "print \"Note: Answer is wrong in textbook\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of electron is v_e= 1.875E+06 m/s\n", + "The kinetic energy of proton is v_p= 4.377E+04 m/s\n", + "Note: Answer is wrong in textbook\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 , Page no:149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "I=100; #in A (current in the wire)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "A=10; #in mm^2 (cross-sectional area)\n", + "n=8.5E28; #in 1/m^3 (density of electron)\n", + "\n", + "#calculate\n", + "A=A*1E-6; #changing unit from mm^2 to m^2\n", + "v_d=I/(n*A*e);\n", + "\n", + "#result\n", + "print\"The drift velocity of free electrons is v_d=\",'%.3E'%v_d,\"m/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The drift velocity of free electrons is v_d= 7.353E-04 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 , Page no:149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "I=4;#in A (current in the conductor)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "A=1E-6; #in m^2 (cross-sectional area)\n", + "N_A=6.02E23; #in atoms/gram-atom (Avogadro's number)\n", + "p=8.9; #in g/cm^3 (density)\n", + "M=63.6; #atomic mass of copper\n", + "\n", + "#calculate\n", + "n=N_A*p/M; #Calculation of density of electrons in g/cm^3\n", + "n1=n*1E6; #changing unit from g/cm^3 to g/m^3\n", + "v_d=I/(n1*A*e);\n", + "\n", + "#result\n", + "print\"The density of copper atoms is n=\",'%.3E'%n,\"atoms/m^3\";\n", + "print\"\\t\\t\\t =\",'%.3E'%n1,\"atoms/m^3\";\n", + "print\"The average drift velocity of free electrons is v_d=\",'%.3E'%v_d,\"m/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of copper atoms is n= 8.424E+22 atoms/m^3\n", + "\t\t\t = 8.424E+28 atoms/m^3\n", + "The average drift velocity of free electrons is v_d= 2.968E-04 m/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 , Page no:149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "n=9E28; #in 1/m^3 (density of valence electrons)\n", + "sigma=6E7; #in mho/m (conductivity of copper)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#Since sigma=n*e*mu therefore\n", + "mu=sigma/(n*e); #calculation of mobility of electron\n", + "\n", + "#result\n", + "print\"The mobility of electrons is =\",'%.3E'%mu,\"m^2/V-s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility of electrons is = 4.167E-03 m^2/V-s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 , Page no:150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "E_F=5.51; #in eV (Fermi energy in Silver)\n", + "k=1.38E-23; #in J/K (Boltzmann's constant)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#part-(a)\n", + "Eo=(3/5)*E_F; #calculation of average energy of free electron at 0K\n", + "#part-(b)\n", + "Eo1=Eo*e; #changing unit from eV to J\n", + "#Since for a classical particle E=(3/2)*k*T\n", + "#therefroe we have\n", + "T=(2/3)*Eo1/k; #calculation of temperature for a classical particle (an ideal gas)\n", + "\n", + "#result\n", + "print\"The average energy of free electron at 0K is Eo=\",Eo,\"eV\";\n", + "print\"The temperature at which a classical particle have this much energy is T=\",'%.3E'%T,\"K\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average energy of free electron at 0K is Eo= 3.306 eV\n", + "The temperature at which a classical particle have this much energy is T= 2.555E+04 K\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 , Page no:150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "E_F_L=4.7; #in eV (Fermi energy in Lithium)\n", + "E_F_M=2.35; #in eV (Fermi energy in a metal)\n", + "n_L=4.6E28; #in 1/m^3 (density of electron in Lithium)\n", + "\n", + "#calculate\n", + "#Since n=((2*m/h)^3/2)*E_F^(3/2)*(8*pi/3) and all things except E_F are constant\n", + "# Therefore we have n=C*E_F^(3/2) where C is proportionality constant\n", + "#n1/n2=(E_F_1/E_F_2)^(3/2)\n", + "#Therefore we have\n", + "n_M=n_L*(E_F_M/E_F_L); #calculation of electron density for a metal\n", + "\n", + "#result\n", + "print\"The lectron density for a metal is =\",n_M,\"1/m^3\";\n", + "print \"Note: Answer in the book is wrong \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lectron density for a metal is = 2.3e+28 1/m^3\n", + "Note: Answer in the book is wrong \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_07_Dielectric_Properties_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_07_Dielectric_Properties_1.ipynb new file mode 100755 index 00000000..85a277ef --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_07_Dielectric_Properties_1.ipynb @@ -0,0 +1,488 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d363aa85787801a09c4a4d5d3e8dc3b5551836ae64a0a0c025744f99f230a4b4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7:Dielectric Properties" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 , Page no:187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "A=100; #in cm^2 (cross-sectional area)\n", + "d=1; #in cm (seperation between plates)\n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "V=100; #in V (potential difference)\n", + "\n", + "#calculate\n", + "A1=A*1E-4; #changing unit from cm^2 to m^2\n", + "d1=d*1E-2; #changing unit from cm to m\n", + "C=Eo*A1/d1; #calculation of capacitance\n", + "Q=C*V; #calculation of charge\n", + "C1=C*1E12; #changing unit of capacitance from F to pF\n", + "\n", + "#result\n", + "print\"The capacitance of capacitor is C=\",C,\"C\";\n", + "print\"\\t\\t\\t\\t =\",C1,\"C\";\n", + "print\"The charge on the plates is Q=\",Q,\"C\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of capacitor is C= 8.85e-12 C\n", + "\t\t\t\t = 8.85 C\n", + "The charge on the plates is Q= 8.85e-10 C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 , Page no:187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "A=650; #in mm^2 (cross-sectional area)\n", + "d=4; #in mm (seperation between plates)\n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "Er=3.5; #di-electric constant of the material\n", + "Q=2E-10; #in C (charge on plates)\n", + "\n", + "#calculate\n", + "A1=A*1E-6; #changing unit from mm^2 to m^2\n", + "d1=d*1E-3; #changing unit from mm to m\n", + "C=Er*Eo*A1/d1; #calculation of capacitance\n", + "V=Q/C; #calculation of charge\n", + "C1=C*1E12; #changing unit of capacitance from F to pF\n", + "\n", + "#result\n", + "print\"The capacitance of capacitor is C=\",'%.3E'%C,\"C\",\n", + "print\"\\n\\t\\t\\t =\",round(C1,2),\"pF\";\n", + "print\"The resultant voltage across the capacitor is V=\",round(V,2),\"V\";\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of capacitor is C= 5.033E-12 C \n", + "\t\t\t = 5.03 pF\n", + "The resultant voltage across the capacitor is V= 39.73 V\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 , Page no:188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "N=2.7E25; #in 1/m^3 (density of atoms)\n", + "E=1E6; #in V/m (electric field)\n", + "Z=2; #atomic number of Helium \n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "Er=1.0000684; #(dielectric constant of the material)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "#since alpha=Eo*(Er-1)/N=4*pi*Eo*r_0^3 \n", + "#Therefore we have r_0^3=(Er-1)/(4*pi*N)\n", + "r_0=((Er-1)/(4*pi*N))**(1/3); #calculation of radius of electron cloud\n", + "x=4*pi*Eo*E*r_0/(Z*e); #calculation of dispalcement\n", + "\n", + "#result\n", + "print\"The radius of electron cloud is r_0=\",'%.3E'%r_0,\"m\";\n", + "print\"The displacement is x=\",'%.3E'%x,\"m\";\n", + "print \"NOTE: The answer in the textbook is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of electron cloud is r_0= 5.865E-11 m\n", + "The displacement is x= 2.037E+04 m\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 , Page no:188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "K=1.000134; #di-elecrtic constant of the neon gas at NTP\n", + "E=90000; #in V/m (electric field)\n", + "Eo=8.85E-12; #in C/N-m^2 (absolute premittivity)\n", + "N_A=6.023E26; #in atoms/Kg-mole (Avogadro's number)\n", + "V=22.4; #in m^3 (volume of gas at NTP\n", + "\n", + "#calculate\n", + "n=N_A/V; #calculaton of density of atoms\n", + "#Since P=n*p=(k-1)*Eo*E\n", + "#therefore we have\n", + "p=(K-1)*Eo*E/n; #calculation of dipole moment induced\n", + "alpha=p/E; #calculation of atomic polarisability\n", + "\n", + "#result\n", + "print\"The dipole moment induced in each atom is p=\",'%.3E'%p,\"C-m\";\n", + "print\"The atomic polarisability of neon is =\",'%.3E'%alpha,\"c-m^2/V\";\n", + "print \"NOTE: The answer in the textbook is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dipole moment induced in each atom is p= 3.969E-36 C-m\n", + "The atomic polarisability of neon is = 4.410E-41 c-m^2/V\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 , Page no:189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Er=3.75; #di-elecrtic constant of sulphur at 27 degree Celcius\n", + "gama=1/3; #internal field constant\n", + "p=2050; #in Kg/m^3 (density)\n", + "M_A=32; #in amu (atomic weight of sulphur)\n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "N=6.022E23; #Avogadro's number\n", + "\n", + "#calculate\n", + "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n", + "#therefore we have\n", + "alpha_e=((Er-1)/(Er+2))*(M_A/p)*(3*Eo/N); #calculation of electronic polarisability of sulphur\n", + "\n", + "#result\n", + "print\"The electronic polarisability of sulphur is =\",'%.3E'%alpha_e,\"Fm^2 (roundoff error)\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electronic polarisability of sulphur is = 3.291E-37 Fm^2 (roundoff error)\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 , Page no:189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Er=1.0000684; #di-elecrtic constant of Helium gas at NTP\n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "N=2.7E25; #number of atomsper unit volume\n", + "\n", + "#calculate\n", + "#Since Er-1=(N/Eo)*alpha_e\n", + "#therefore we have\n", + "alpha_e=Eo*(Er-1)/N; #calculation of electronic polarisability of Helium\n", + "\n", + "#result\n", + "print\"The electronic polarisability of Helium gas is =\",'%.3E'%alpha_e,\"Fm^2 (roundoff error)\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electronic polarisability of Helium gas is = 2.242E-41 Fm^2 (roundoff error)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 , Page no:190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "N=3E28; #in atoms/m^3 (density of atoms)\n", + "alpha_e=1E-40; #in F-m^2 (electronic polarisability)\n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "\n", + "#calculate\n", + "#Since (Er-1)/(Er+2)=N*alpha_e/(3*Eo)\n", + "#therefore we have\n", + "Er=(2*(N*alpha_e/(3*Eo))+1)/(1-(N*alpha_e/(3*Eo)));\n", + "#calculation of dielectric constant of the material\n", + "\n", + "#result\n", + "print\"The dielectric constant of the material is Er=\",'%.3E'%Er,\"F/m\",\n", + "print \"NOTE: The answer in the book is wrong \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dielectric constant of the material is Er= 1.382E+00 F/m NOTE: The answer in the book is wrong \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 , Page no:190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Er=4; #relative permittivity of sulphur\n", + "Eo=8.85E-12; #in F/m (absolute permittivity)\n", + "NA=2.08E3; #in Kg/m^3 (density of atoms in sulphur)\n", + "\n", + "#calculate\n", + "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n", + "#therefore we have\n", + "alpha_e=((Er-1)/(Er+2))*(3*Eo/NA); #calculation of electronic polarisability of sulphur\n", + "\n", + "#result\n", + "print\"The electronic polarisability of sulphur is =\",'%.3E'%alpha_e,\"Fm^2\";\n", + "print \"NOTE: The answer in the book is wrong and they used the wrong formula \" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electronic polarisability of sulphur is = 6.382E-15 Fm^2\n", + "NOTE: The answer in the book is wrong and they used the wrong formula \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 , Page no:190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "alpha1=2.5E-39; #in C^2-m/N (dielectric constant at 300K)\n", + "alpha2=2.0E-39; #in C^2-m/N (dielectric constant at 400K)\n", + "T1=300; #in K(first temperature)\n", + "T2=400; #in K(second temperature)\n", + "\n", + "#calculate\n", + "#since alpha=alpha_d+alpha0 and alpha0=Beta/T\n", + "#therefore alpha=alpha_d+(Beta/T)\n", + "#since alpha1=alpha_d+(Beta/T1) and alpha2=alpha_d+(Beta/T2)\n", + "#therefore alpha1-apha2=Beta*((1/T1)-(1/T2))\n", + "#or Beta= (alpha1-apha2)/ ((1/T1)-(1/T2))\n", + "Beta= (alpha1-alpha2)/ ((1/T1)-(1/T2)); #calculation of Beta\n", + "alpha_d=alpha1-(Beta/T1); #calculation of polarisability due to defromation\n", + "alpha0_1=Beta/T1; #calculation of polarisability due to permanent dipole moment at 300K\n", + "alpha0_2=Beta/T2; #calculation of polarisability due to permanent dipole moment at 400K\n", + "\n", + "#result\n", + "print\"The polarisability due to permanent dipole moment at 300K is =\",'%.3E'%alpha0_1,\"C^2-m/N\";\n", + "print\"The polarisability due to permanent dipole moment at 400K is =\",'%.3E'%alpha0_2,\"C^2-m/N\";\n", + "print\"The polarisability due to deformation of the molecules is =\",'%.3E'%alpha_d,\"C^2-m/N\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The polarisability due to permanent dipole moment at 300K is = 2.000E-39 C^2-m/N\n", + "The polarisability due to permanent dipole moment at 400K is = 1.500E-39 C^2-m/N\n", + "The polarisability due to deformation of the molecules is = 5.000E-40 C^2-m/N\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 , Page no:191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "n=1.5; #refractive index\n", + "Er=5.6; #dielectric constant\n", + "\n", + "#calculate\n", + "#since (Er-1)/(Er+2)=N*(alpha_e+alpha_i)/(3*E0) Clausius-Mossotti equation\n", + "#and (n^2-1)/(n^2+2)=N*alpha_e/(3*E0) \n", + "#from above two equations, we get ((n^2-1)/(n^2+2))*((Er+2)/(Er-1))=alpha_e/(alpha_e+alpha_i)\n", + "#or alpha_i/ (alpha_e+alpha_i)= 1-((n^2-1)/(n^2+2))*((Er+2)/(Er-1))= (say P)\n", + "#where P is fractional ionisational polarisability\n", + "P=1-((n**2-1)/(n**2+2))*((Er+2)/(Er-1)); #calculation of fractional ionisational polarisability\n", + "P1=P*100; #calculation of percentage of ionisational polarisability\n", + "\n", + "#result\n", + "print\"The percentage of ionisational polarisability is =\",round(P1,1),\"percent\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage of ionisational polarisability is = 51.4 percent\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_08_Magnetic_Properties_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_08_Magnetic_Properties_1.ipynb new file mode 100755 index 00000000..b2a8def3 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_08_Magnetic_Properties_1.ipynb @@ -0,0 +1,323 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:708d3f2a9798f4d28f6ce90536d50509c591ba2ba31051121346b4739b2aea82" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8:Magnetic Properties" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 , Page no:236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "X=-0.5E-5; #magnetic susceptibility of silicon\n", + "H=0.9E4; #in A/m (magnetic field intensity)\n", + "mu0=4*3.14*1E-7; #in H/m (absolute permeability)\n", + "\n", + "#calculate\n", + "I=X*H; #calculation of intensity of magnetism\n", + "B=mu0*H*(1+X); #calculation of magnetic flux density\n", + "\n", + "#result\n", + "print\"The intensity of magnetism is I=\",I,\"A/m\";\n", + "print\"The magnetic flux density is B=\",round(B,3),\"Wb/m^2\";\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intensity of magnetism is I= -0.045 A/m\n", + "The magnetic flux density is B= 0.011 Wb/m^2\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 , Page no:236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "r=0.052; #in nm (radius of orbit)\n", + "B=1; #in Wb/m^2 (magnetic field of induction)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "\n", + "#calculate\n", + "r=0.052*1E-9; #changing unit from nm to m\n", + "d_mu=(e**2*r**2*B)/(4*m); #calculation of change in magnetic moment\n", + "\n", + "#result\n", + "print\"The change in magnetic moment is =\",'%.3E'%d_mu,\"Am^2\";\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in magnetic moment is = 1.902E-29 Am^2\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 , Page no:236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "H=220; #in A/m (magnetic field intensity)\n", + "I=3300; #in A/m (intensity of magnetisation)\n", + "\n", + "#calculate\n", + "mu_r=1+(I/H); #calculation of relative permeability\n", + "\n", + "#result\n", + "print\"The relative permeability of a ferromagentic material is =\",mu_r;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative permeability of a ferromagentic material is = 16.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 , Page no:236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "I=3000; #in A/m (intensity of magnetisation)\n", + "B=0.005; #in Wb/m^2 (magnetic flus intensity)\n", + "pi=3.14; #value of pi used in the solution\n", + "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n", + "\n", + "#calculate\n", + "H=(B/mu0)-I; #calculation of magnetic force\n", + "mu_r=(I/H)+1; #calculation of relative permeability\n", + "\n", + "#result\n", + "print\"The magnetic force is H=\",round(H,3);\n", + "print\"The relative permeability is =\",round(mu_r,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnetic force is H= 980.892\n", + "The relative permeability is = 4.058\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 , Page no:237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "H=4E3; #in A/m (magnetic field intensity)\n", + "N=60; #number of turns\n", + "l=12; #in cm (length of solenoid)\n", + "\n", + "#calculate\n", + "n=N/(l*1E-2); #calculation of number of turns per unit metre\n", + "#Snice H=n*i;\n", + "i=H/n; #calculation of current through the solenoid\n", + "\n", + "#result\n", + "print\"The current through the solenoid is i=\",i,\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current through the solenoid is i= 8.0 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 , Page no:237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "l=30; #in cm (length of solenoid)\n", + "A=1; #in cm^2 (cross-sectional area)\n", + "N=300; #number of turns\n", + "i=0.032; #in A (current through the winding)\n", + "phi_B=2E-6; #in Wb (magnetic flux)\n", + "pi=3.14; #value of pi used in the solution\n", + "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n", + "\n", + "#calculate\n", + "l=l*1E-2; #changing unit from cm to m\n", + "A=A*1E-4; #changing unit from cm^2 to m^2\n", + "B=phi_B/A; #calculation of flux density\n", + "H=N*i/l; #calculation of magnetic intensity\n", + "mu=B/H; #calcluation of absolute permeability of iron\n", + "mu_r=mu/mu0; #calcluation of relative permeability of iron\n", + "\n", + "#result\n", + "print\"The flux density is B=\",B,\"Wb/m^2\";\n", + "print\"The magnetic intensity is H=\",H,\"A-turns/m\";\n", + "print\"The relative permeability of iron is =\",round(mu_r),\" (roundoff error)\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The flux density is B= 0.02 Wb/m^2\n", + "The magnetic intensity is H= 32.0 A-turns/m\n", + "The relative permeability of iron is = 498.0 (roundoff error)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 , Page no:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "A=100; #in m^2 (area of Hysteresis loop)\n", + "B=0.01; #in Wb/m^2 (unit space along vertical axis or magnetic flux density)\n", + "H=40; #in A/m (unit space along horizontal axis or magnetic fild ntensity)\n", + "\n", + "#calculate\n", + "H_L=A*B*H; #calculation of magnetic intensity\n", + "\n", + "#result\n", + "print\"The Hystersis loss per cycle is =\",round(H_L),\"J/m^2\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hystersis loss per cycle is = 40.0 J/m^2\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_09_Semiconductors_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_09_Semiconductors_1.ipynb new file mode 100755 index 00000000..9ce2ea83 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_09_Semiconductors_1.ipynb @@ -0,0 +1,782 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c155cecc785c23bdccd0bf715c04d53d7788e1b590b4310d6af27c13ce7b97ac" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9:Semiconductors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 , Page no:272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Eg=0.67; #in eV (Energy band gap)\n", + "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", + "T1=298; #in K (room temperature)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "K=10; #ratio of number of electrons at different temperature\n", + "\n", + "#calculate\n", + "Eg=Eg*e; #changing unit from eV to Joule\n", + "#since ne=Ke*exp(-Eg/(2*k*T))\n", + "#and ne/ne1=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1)) and ne/ne1=K=10\n", + "#therefore we have 10=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1))\n", + "#re-arranging the equation for T, we get T2=1/((1/T1)-((2*k*log(10))/Eg))\n", + "T=1/((1/T1)-((2*k*math.log(10))/Eg)); #calculation of the temperature\n", + "\n", + "#result\n", + "print\"The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T=\",round(T),\"K (roundoff error)\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T= 362.0 K (roundoff error)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 , Page no:272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ni=2.5E13; #in /cm^3 (intrinsic carrier density)\n", + "ue=3900; #in cm^2/(V-s) (electron mobilities)\n", + "uh=1900; #in cm^2/(V-s) (hole mobilities)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "l=1; #in cm (lenght of the box)\n", + "b=1;h=1; #in mm (dimensions of germanium rod )\n", + "\n", + "#calculate\n", + "ni=ni*1E6; #changing unit from 1/cm^3 to 1/m^3\n", + "ue=ue*1E-4; #changing unit from cm^2 to m^2\n", + "uh=uh*1E-4; #changing unit from cm^2 to m^2\n", + "sigma=ni*e*(ue+uh); #calculation of conductivity\n", + "rho=1/sigma; #calculation of resistivity\n", + "l=l*1E-2; #changing unit from mm to m for length\n", + "A=(b*1E-3)*(h*1E-3); #changing unit from mm to m for width and height and calculation of cross-sectional area\n", + "R=rho*l/A; #calculation of resistance\n", + "\n", + "#result\n", + "print\"The resistance of intrinsic germanium is R=\",'%.3E'%R,\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of intrinsic germanium is R= 4.310E+03 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 , Page no:273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ne=2.5E19; #in /m^3 (electron density)\n", + "nh=2.5E19; #in /m^3 (hole density)\n", + "ue=0.36; #in m^2/(V-s) (electron mobilities)\n", + "uh=0.17; #in m^2/(V-s) (hole mobilities)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#since ne=nh=ni, therefore we have \n", + "ni=nh;\n", + "sigma=ni*e*(ue+uh); #calculation of conductivity\n", + "rho=1/sigma; #calculation of resistivity\n", + "\n", + "#result\n", + "print\"The conductivity of germanium is =\",round(sigma,2),\"/ohm-m\";\n", + "print\"The resistivity of germanium is =\",round(rho,2),\"ohm-m\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of germanium is = 2.12 /ohm-m\n", + "The resistivity of germanium is = 0.47 ohm-m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 , Page no:273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n", + "ue=0.135; #in m^2/(V-s) (electron mobilities)\n", + "uh=0.048; #in m^2/(V-s) (hole mobilities)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "ND=1E23; #in atom/m^3 (doping concentration)\n", + "\n", + "#calculate\n", + "sigma_i=ni*e*(ue+uh); #calculation of intrinsic conductivity\n", + "sigma=ND*ue*e; #calculation of conductivity after doping\n", + "rho=ni**2/ND; #calculation of equilibrium hole concentration\n", + "\n", + "#result\n", + "print\"The intrinsic conductivity for silicon is =\",'%.3E'%sigma_i,\"S\";\n", + "print\"The conductivity after doping with phosphorus atoms is =\",'%.3E'%sigma,\"S\";\n", + "print\"The equilibrium hole concentration is =\",'%.3E'%rho,\"/m^3\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intrinsic conductivity for silicon is = 4.392E-04 S\n", + "The conductivity after doping with phosphorus atoms is = 2.160E+03 S\n", + "The equilibrium hole concentration is = 2.250E+09 /m^3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 , Page no:274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n", + "ue=0.13; #in m^2/(V-s) (electron mobilities)\n", + "uh=0.05; #in m^2/(V-s) (hole mobilities)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "ne=5E20; #in /m^3 (concentration of donor type impurity)\n", + "nh=5E20; #in /m^3 (concentration of acceptor type impurity)\n", + "\n", + "#calculate\n", + "#part-i\n", + "sigma=ni*e*(ue+uh); #calculation of intrinsic conductivity\n", + "#part-ii\n", + "#since 1 donor atom is in 1E8 Si atoms, hence holes concentration can be neglected\n", + "sigma1=ne*e*ue; #calculation of conductivity after doping with donor type impurity\n", + "#part-iii\n", + "#since 1 acceptor atom is in 1E8 Si atoms, hence electron concentration can be neglected\n", + "sigma2=nh*e*uh; #calculation of conductivity after doping with acceptor type impurity\n", + "\n", + "#result\n", + "print\"The intrinsic conductivity for silicon is =\",'%.3E'%sigma,\"(ohm-m)^-1\";\n", + "print\"The conductivity after doping with donor type impurity is =\",sigma1,\"(ohm-m)^-1\";\n", + "print\"The conductivity after doping with acceptor type impurity is =\",sigma2,\"(ohm-m)^-1\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intrinsic conductivity for silicon is = 4.320E-04 (ohm-m)^-1\n", + "The conductivity after doping with donor type impurity is = 10.4 (ohm-m)^-1\n", + "The conductivity after doping with acceptor type impurity is = 4.0 (ohm-m)^-1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 , Page no:274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ni=1E20; #in /m^3 (intrinsic carrier density)\n", + "ND=1E21; #in /m^3 (donor impurity concentration)\n", + "\n", + "#calculate\n", + "nh=ni**2/ND; #calculation of density of hole carriers at room temperature\n", + "\n", + "#result\n", + "print\"The density of hole carriers at room temperature is nh=\",nh,\"/m^3\";\n", + "#Note: answer in the book is wrong due to printing mistake" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of hole carriers at room temperature is nh= 1e+19 /m^3\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 , Page no:275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "M=72.6; #atomic mass of germanium\n", + "P=5400; #in Kg/m^3 (density)\n", + "ue=0.4; #in m^2/V-s (mobility of electrons)\n", + "uh=0.2; #in m^2/V-s (mobility of holes)\n", + "Eg=0.7; #in eV (Band gap)\n", + "m=9.1E-31; #in Kg (mass of electron)\n", + "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", + "T=300; #in K (temperature)\n", + "h=6.63E-34; #in J/s (Planck\u2019s constant)\n", + "pi=3.14; #value of pi used in the solution\n", + "e=1.6E-19; #in C(charge of electron)\n", + "\n", + "#calculate\n", + "Eg=Eg*e; #changing unit from eV to J\n", + "ni=2*(2*pi*m*k*T/h**2)**(3/2)*math.exp(-Eg/(2*k*T));\n", + "sigma=ni*e*(ue+uh);\n", + "\n", + "#result\n", + "print\"The intrinsic carrier density for germanium at 300K is ni=\",'%.3E'%ni,\"/m^3\";\n", + "print\"The conductivity of germanium is=\",round(sigma,3),\"(ohm-m)^-1\";\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intrinsic carrier density for germanium at 300K is ni= 3.334E+19 /m^3\n", + "The conductivity of germanium is= 3.201 (ohm-m)^-1\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 , Page no:275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "rho1=4.5; #in ohm-m (resistivity at 20 degree Celcius)\n", + "rho2=2.0; #in ohm-m (resistivity at 32 degree Celcius)\n", + "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", + "T1=20; T2=32; #in degree Celcius (two temperatures)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "T1=T1+273; #changing unit from degree Celius to K\n", + "T2=T2+273; #changing unit from degree Celius to K\n", + "#since sigma=e*u*C*T^(3/2)*exp(-Eg/(2*k*T))\n", + "#therefore sigma1/sigma2=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n", + "#and sigma=1/rho \n", + "#therefore we have rho2/rho1=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n", + "#re-arranging above equation for Eg, we get Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*log(T1/T2)-log(rho2/rho1))\n", + "Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*math.log(T1/T2)-math.log(rho2/rho1));\n", + "Eg1=Eg/e;#changing unit from J to eV\n", + "\n", + "#result\n", + "print\"The energy band gap is Eg=\",'%.3E'%Eg,\"J\";\n", + "print\"\\t\\t\\t =\",round(Eg1,3),\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy band gap is Eg= 1.543E-19 J\n", + "\t\t\t = 0.964 eV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 , Page no:276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "rho=2300; #in ohm-m (resistivity of pure silicon)\n", + "ue=0.135; #in m^2/V-s (mobility of electron)\n", + "uh=0.048; #in m^2/V-s (mobility of electron)\n", + "Nd=1E19; #in /m^3 (doping concentration)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "#since sigma=ni*e*(ue+uh) and sigma=1/rho\n", + "#therefore ni=1/(rho*e*(ue+uh))\n", + "ni=1/(rho*e*(ue+uh)); #calculation of intrinsic concentration\n", + "ne=Nd; #calculation of electron concentration\n", + "nh=ni**2/Nd; #calculation of hole concentration\n", + "sigma=ne*ue*e+nh*uh*e; #calculation of conductivity\n", + "rho=1/sigma; #calculation of resistivity\n", + "\n", + "#result\n", + "print\"The electron concentration is ne=\",ne,\"/m^3\";\n", + "print\"The hole concentration is nh=\",'%.3E'%nh,\"/m^3\";\n", + "print\"The resistivity of the specimen is =\",round(rho,3),\"ohm-m\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron concentration is ne= 1e+19 /m^3\n", + "The hole concentration is nh= 2.205E+13 /m^3\n", + "The resistivity of the specimen is = 4.63 ohm-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 , Page no:276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "uh=1900; #in cm^2/V-s (mobility of electron)\n", + "Na=2E17; #in /m^3 (acceptor doping concentration)\n", + "e=1.6E-19; #in C(charge of electron)\n", + "\n", + "#calculate\n", + "uh=uh*1E-4; #changing unit from cm^2/V-s to m^2/V-s\n", + "Na=Na*1E6; #changing unit from 1/cm^3 to 1/m^3\n", + "nh=Na; #hole concentration \n", + "#since sigma=ne*ue*e+nh*uh*e and nh>>ne\n", + "#therefore sigma=nh*uh*e\n", + "sigma=nh*uh*e; #calculation of conductivity\n", + "\n", + "#result\n", + "print\"The conductivity of p-type Ge crystal is =\",sigma,\"/ohm-m (roundoff error)\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of p-type Ge crystal is = 6080.0 /ohm-m (roundoff error)\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 , Page no:277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ue=0.19; #in m^2/V-s (mobility of electron)\n", + "T=300; #in K (temperature)\n", + "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", + "e=1.6E-19; #in C(charge of electron)\n", + "\n", + "#calculate\n", + "Dn=ue*k*T/e; #calculation of diffusion co-efficient\n", + "\n", + "#result\n", + "print\"The diffusion co-efficient of electron in silicon is Dn=\",'%.3E'%Dn,\"m^2/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion co-efficient of electron in silicon is Dn= 4.916E-03 m^2/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13 , Page no:277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Eg=0.4; #in eV (Band gap of semiconductor)\n", + "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", + "T1=0; #in degree Celcius (first temperature)\n", + "T2=50; #in degree Celcius (second temperature)\n", + "T3=100; #in degree Celcius (third temperature)\n", + "e=1.602E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "T1=T1+273; #changing temperature form Celcius to Kelvin\n", + "T2=T2+273; #changing temperature form Celcius to Kelvin\n", + "T3=T3+273; #changing temperature form Celcius to Kelvin\n", + "Eg=Eg*e; #changing unit from eV to Joule\n", + "#Using F_E=1/(1+exp(Eg/2*k*T))\n", + "F_E1=1/(1+math.exp(Eg/(2*k*T1))); #calculation of probability of occupation of lowest level at 0 degree Celcius\n", + "F_E2=1/(1+math.exp(Eg/(2*k*T2))); #calculation of probability of occupation of lowest level at 50 degree Celcius\n", + "F_E3=1/(1+math.exp(Eg/(2*k*T3))); #calculation of probability of occupation of lowest level at 100 degree Celcius\n", + "\n", + "#result\n", + "print\"The probability of occupation of lowest level in conduction band is\";\n", + "print\"\\t at 0 degree Celcius, F_E=\",'%.3E'%F_E1,\"eV\";\n", + "print\"\\t at 50 degree Celcius, F_E=\",'%.3E'%F_E2,\"eV\";\n", + "print\"\\t at 100 degree Celcius, F_E=\",'%.3E'%F_E3,\"eV\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability of occupation of lowest level in conduction band is\n", + "\t at 0 degree Celcius, F_E= 2.025E-04 eV\n", + "\t at 50 degree Celcius, F_E= 7.550E-04 eV\n", + "\t at 100 degree Celcius, F_E= 1.976E-03 eV\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 , Page no:278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Eg=1.2; #in eV (Energy band gap)\n", + "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n", + "T1=600; T2=300; #in K (two temperatures)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "Eg=Eg*e; #changing unit from eV to Joule\n", + "#since sigma is proportional to exp(-Eg/(2*k*T))\n", + "#therefore ratio=sigma1/sigma2=exp(-Eg/(2*k*((1/T1)-(1/T2))));\n", + "ratio= math.exp((-Eg/(2*k))*((1/T1)-(1/T2))); #calculation of ratio of conductivity at 600K and at 300K\n", + "\n", + "#result\n", + "print\"The ratio of conductivity at 600K and at 300K is =\",'%.3E'%ratio;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of conductivity at 600K and at 300K is = 1.085E+05\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.15 , Page no:278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "ue=0.39; #in m^2/V-s (mobility of electron)\n", + "n=5E13; #number of donor atoms\n", + "ni=2.4E19; #in atoms/m^3 (intrinsic carrier density)\n", + "l=10; #in mm (length of rod)\n", + "a=1; #in mm (side of square cross-section)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "l=l*1E-3; #changing unit from mm to m\n", + "a=a*1E-3; #changing unit from mm to m\n", + "A=a**2; #calculation of cross-section area\n", + "Nd=n/(l*A); #calculation of donor concentration\n", + "ne=Nd; #calculation of electron density\n", + "nh=ni**2/Nd; #calculation of hole density\n", + "#since sigma=ne*e*ue+nh*e*ue and since ne>>nh\n", + "#therefore sigma=ne*e*ue\n", + "sigma=ne*e*ue; #calculation of conductivity\n", + "rho=1/sigma; #calculation of resistivity\n", + "R=rho*l/A; #calculation of resistance \n", + "\n", + "#result\n", + "print\"The electron density is ne=\",ne,\"/m^3\";\n", + "print\"The hole density is nh=\",nh,\"/m^3\";\n", + "print\"The conductivity is =\",sigma,\"/ohm-m\";\n", + "print\"The resistance is R=\",round(R),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron density is ne= 5e+21 /m^3\n", + "The hole density is nh= 1.152e+17 /m^3\n", + "The conductivity is = 312.0 /ohm-m\n", + "The resistance is R= 32.0 ohm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.16 , Page no:279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "RH=3.66E-4; #in m^3/C (Hall coefficient)\n", + "rho=8.93E-3; #in ohm-m (resistivity)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "u=RH/rho; #calculation of mobility\n", + "n=1/(RH*e); #calculation of density\n", + "\n", + "#result\n", + "print\"The mobility is u=\",round(u,4),\"m^2/(V-s)\";\n", + "print\"The density is n=\",'%.3E'%n,\"/m^3\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility is u= 0.041 m^2/(V-s)\n", + "The density is n= 1.708E+22 /m^3\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.17 , Page no:279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "RH=3.66E-4; #in m^3/C (Hall coefficient)\n", + "rho=8.93E-3; #in ohm-m (resistivity)\n", + "e=1.6E-19; #in C (charge of electron)\n", + "\n", + "#calculate\n", + "nh=1/(RH*e); #calculation of density of charge carrier\n", + "uh=1/(rho*nh*e); #calculation of mobility of charge carrier\n", + "\n", + "#result\n", + "print\"The density of charge carrier is nh=\",'%.3E'%nh,\"/m^3\";\n", + "print\"The mobility of charge carrier is uh=\",round(uh,4),\"m^2/(V-s)\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of charge carrier is nh= 1.708E+22 /m^3\n", + "The mobility of charge carrier is uh= 0.041 m^2/(V-s)\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_10_Superconductivity_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_10_Superconductivity_1.ipynb new file mode 100755 index 00000000..9b11ce44 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_10_Superconductivity_1.ipynb @@ -0,0 +1,316 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2419f2161da8f36d7fa10fabb5f5aa4b318a9912237faaa5f03ac922aa4b8ac9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10:Superconductivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 , Page no:313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "Tc=7.2; #in K (critical temperature)\n", + "T=5; #in K (given temperature)\n", + "H0=6.5E3; #in A/m (critical magnetic field at 0K)\n", + "\n", + "#calculate\n", + "Hc=H0*(1-(T/Tc)**2); #calculation of magnitude of critical magnetic field\n", + "\n", + "#result\n", + "print\"The magnitude of critical magnetic field is Hc=\",round(Hc,2),\"A/m\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of critical magnetic field is Hc= 3365.35 A/m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 , Page no:313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "r=0.02; #in m (radius of ring)\n", + "Hc=2E3; #in A/m (critical magnetic field at 5K)\n", + "pi=3.14; #value of pi used in the solutiion\n", + "\n", + "#calculate\n", + "Ic=2*pi*r*Hc; #calculation of critical current value\n", + "\n", + "#result\n", + "print\"The critical current value is Ic=\",Ic,\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical current value is Ic= 251.2 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 , Page no:313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "M1=199.5; #in amu (isotropic mass at 5K)\n", + "T1=5; #in K (first critical temperature)\n", + "T2=5.1; #in K (second critical temperature)\n", + "#calculate\n", + "#since Tc=C*(1/sqrt(M)\n", + "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n", + "#therefore we have M2=(T1/T2)^2*M1\n", + "M2=(T1/T2)**2*M1; #calculation of isotropic mass at 5.1K\n", + "\n", + "#result\n", + "print\"The isotropic mass at 5.1K is M2=\",round(M2,3),\"a.m.u.\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The isotropic mass at 5.1K is M2= 191.753 a.m.u.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 , Page no:314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "T=6; #in K (given temperature)\n", + "Hc=5E3; #in A/m (critical magnetic field at 5K)\n", + "H0=2E4; #in A/m (critical magnetic field at 0K)\n", + "\n", + "#calculate\n", + "#since Hc=H0*(1-(T/Tc)^2)\n", + "#therefor we have Tc=T/sqrt(1-(Hc/H)^2)\n", + "Tc=T/math.sqrt(1-(Hc/H0)); #calculation of transition temperature\n", + "\n", + "#result\n", + "print\"The transition temperature is Tc=\",round(Tc,3),\"K\";\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transition temperature is Tc= 6.928 K\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 , Page no:314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "T=5; #in K (given temperature)\n", + "d=3; #in mm (diameter of the wire)\n", + "Tc=8; #in K (critical temperature for Pb)\n", + "H0=5E4; #in A/m (critical magnetic field at 0K)\n", + "pi=3.14; #value of pi used in the solution\n", + "\n", + "#calculate\n", + "Hc=H0*(1-(T/Tc)**2); #calculation of critical magnetic field at 5K\n", + "r=(d*1E-3)/2; #calculation of radius in m\n", + "Ic=2*pi*r*Hc; #calculation of critical current at 5K\n", + "\n", + "#result\n", + "print\"The critical magnetic field at 5K is Hc=\",'%.3E'%Hc,\"A/m\";\n", + "print\"The critical current at 5K is Ic=\",round(Ic,4),\"A\";\n", + "print \" (roundoff error)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical magnetic field at 5K is Hc= 3.047E+04 A/m\n", + "The critical current at 5K is Ic= 287.0156 A\n", + " (roundoff error)\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 , Page no:314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "V=8.50; #in micro V (voltage across Josephson junction )\n", + "e=1.6E-19; #in C (charge of electron)\n", + "h=6.626E-34; #in J/s (Planck\u2019s constant)\n", + "\n", + "#calculate\n", + "V=V*1E-6; #changing unit from V to microVolt\n", + "v1=2*e*V/h; #calculation of frequency of EM waves\n", + "\n", + "#result\n", + "print\"The frequency of EM waves is v=\",'%.3E'%v1,\"Hz\";\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of EM waves is v= 4.105E+09 Hz\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 , Page no:315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "M1=200.59; #in amu (average atomic mass at 4.153K)\n", + "Tc1=4.153; #in K (first critical temperature)\n", + "M2=204; #in amu (average atomic mass of isotopes)\n", + "\n", + "#calculate\n", + "#since Tc=C*(1/sqrt(M)\n", + "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n", + "#therefore we have Tc2=Tc1*sqrt(M1/M2)\n", + "Tc2=Tc1*math.sqrt(M1/M2); #calculation of transition temperature of the isotopes\n", + "\n", + "#result\n", + "print\"The transition temperature of the isotopes is Tc2=\",round(Tc2,3),\"K\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transition temperature of the isotopes is Tc2= 4.118 K\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/Chapter_12_Fibre_Optics.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_12_Fibre_Optics.ipynb new file mode 100755 index 00000000..f573b0a2 --- /dev/null +++ b/Applied_Physics_by_P_K_Mittal/Chapter_12_Fibre_Optics.ipynb @@ -0,0 +1,365 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dac7a0b06f622e783ea6c469bf1c100c0c8157cc5e77bffea65e378f258808b2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12:Fibre Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 , Page no:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "u1=1.563; #refractive index of core\n", + "u2=1.498; #refractive index of cladding\n", + "\n", + "#calculate\n", + "d=(u1-u2)/u1; #calculation of fractional index change\n", + "\n", + "#result\n", + "print\"The fractional index change for a given optical fibre is =\",round(d,4);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fractional index change for a given optical fibre is = 0.0416\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 , Page no:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "u1=1.55; #refractive index of core\n", + "u2=1.50; #refractive index of cladding\n", + "\n", + "#calculate\n", + "d=(u1-u2)/u1; #calculation of fractional index change\n", + "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n", + "theta=math.asin(NA); #calculation of acceptance angle\n", + "theta1=theta*180/3.14;\n", + "\n", + "#result\n", + "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", + "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperture of the fibre is NA= 0.394\n", + "The acceptance angle of the optical fibre is = 23.2 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 , Page no:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "u1=1.563; #refractive index of core\n", + "u2=1.498; #refractive index of cladding\n", + "\n", + "#calculate\n", + "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", + "theta=math.asin(NA); #calculation of acceptance angle\n", + "theta1=theta*180/3.14;\n", + "#result\n", + "print\"The numerical aperture of the fibre is NA=\",round(NA,4);\n", + "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperture of the fibre is NA= 0.4461\n", + "The acceptance angle of the optical fibre is = 26.5 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 , Page no:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "NA=0.39; #numerical aperture of the optical fibre\n", + "d=0.05; #difference in the refractive index of the material of the core and cladding\n", + "\n", + "#calculate\n", + "#since NA=u1*sqrt(2*d)\n", + "#we have u1=NA/sqrt(2*d)\n", + "u1= NA/math.sqrt(2*d); #calculation of refractive index of material of the core\n", + "\n", + "#result\n", + "print\"The refractive index of material of the core is u1=\",round(u1,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The refractive index of material of the core is u1= 1.233\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 , Page no:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "u1=1.50; #refractive index of core\n", + "u2=1.45; #refractive index of cladding\n", + "\n", + "#calculate\n", + "d=(u1-u2)/u1; #calculation of fractional index change\n", + "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n", + "theta_0=math.asin(NA); #calculation of acceptance angle\n", + "theta_01=theta_0*180/3.14;\n", + "theta_c=math.asin(u2/u1); #calculation of critical angle\n", + "theta_c1=theta_c*180/3.14;\n", + "\n", + "#result\n", + "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", + "print\"The acceptance angle of the optical fibre is =\",round(theta_01,2),\"degree\";\n", + "print\"The critical angle of the optical fibre is =\",round(theta_c1,2),\"degree\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperture of the fibre is NA= 0.387\n", + "The acceptance angle of the optical fibre is = 22.8 degree\n", + "The critical angle of the optical fibre is = 75.2 degree\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 , Page no:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "NA=0.33; #numerical aperture\n", + "d=0.02; #difference in the refractive index of the core and cladding of the material\n", + "\n", + "#calculate\n", + "#since NA=u1*sqrt(2*d)\n", + "#therefore we have\n", + "u1=NA/math.sqrt(2*d); #calculation of refractive index of the core\n", + "#since d=(u1-u2)/u2\n", + "#therefore we have\n", + "u2=(1-d)*u1; #calculation of refractive index of the cladding\n", + "\n", + "#result\n", + "print\"The refractive index of the core is u1=\",round(u1,2);\n", + "print\"The refractive index of the cladding is u2=\",round(u2,3);\n", + "print \"NOTE: The answer in the textbook is wrong\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The refractive index of the core is u1= 1.65\n", + "The refractive index of the cladding is u2= 1.617\n", + "NOTE: The answer in the textbook is wrong\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 , Page no:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "u1=3.5; #refractive index of core\n", + "u2=3.45; #refractive index of cladding\n", + "u0=1; #refractive index of the air\n", + "\n", + "#calculate\n", + "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", + "NA1=NA/u0;\n", + "alpha=math.asin(NA); #calculation of acceptance angle\n", + "alpha1=alpha*180/3.14;\n", + "#result\n", + "print\"The numerical aperture of the fibre is NA=\",round(NA1,2);\n", + "print\"The acceptance angle of the optical fibre is =\",round(alpha1,2),\"degree\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperture of the fibre is NA= 0.59\n", + "The acceptance angle of the optical fibre is = 36.14 degree\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 , Page no:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#given\n", + "u1=1.48; #refractive index of core\n", + "u2=1.45; #refractive index of cladding\n", + "\n", + "#calculate\n", + "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n", + "theta=math.asin(NA); #calculation of acceptance angle\n", + "theta1=theta*180/3.14;\n", + "#result\n", + "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n", + "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";\n", + "print \" (roundoff error)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperture of the fibre is NA= 0.296\n", + "The acceptance angle of the optical fibre is = 17.26 degree\n", + " (roundoff error)\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__mean_free_path_of_electron_1.png b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__mean_free_path_of_electron_1.png new file mode 100755 index 00000000..37995b76 Binary files /dev/null and b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__mean_free_path_of_electron_1.png differ diff --git a/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__potential_energy_1.png b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__potential_energy_1.png new file mode 100755 index 00000000..f6086db3 Binary files /dev/null and b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__potential_energy_1.png differ diff --git a/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of_lattice_constant_1.png b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of_lattice_constant_1.png new file mode 100755 index 00000000..cf42154d Binary files /dev/null and b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of_lattice_constant_1.png differ diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb new file mode 100755 index 00000000..4ad21f3b --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb @@ -0,0 +1,167 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:04df0fd624434d43d67fac6cabd770a44e2109835e3a6832f168a8a4e92f27c9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "10: Lasers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 10.1, Page number 10.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8 #speed of light(m/sec)\n", + "h = 6.6*10**-34 #planck's constant\n", + "e = 1.6*10**-19\n", + "T = 300 #temperature(K)\n", + "K = 8.61*10**-5\n", + "lamda = 6943 #wavelength, angstrom\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-10 #wavelength(m)\n", + "#let E2 - E1 be E\n", + "E = h*c/lamda #energy(J)\n", + "E = E/e #energy(eV)\n", + "#let population ratio N2/N1 be N\n", + "N = math.exp(-E/(K*T));\n", + "\n", + "#Result\n", + "print \"relative population of 2 states is\",round(N/1e-30,3),\"*10^-30\"\n", + "print \"answer given in the book is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative population of 2 states is 1.076 *10^-30\n", + "answer given in the book is wrong\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 10.2, Page number 10.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a2 = 6 #spot diameter(mm)\n", + "a1 = 4 #spot diameter(mm)\n", + "d2 = 2 #distance from laser(m)\n", + "d1 = 1 #distance from laser(m)\n", + "\n", + "#Calculation\n", + "a2 = a2*10**-3 #spot diameter(m)\n", + "a1 = a1*10**-3 #spot diameter(m)\n", + "theta = (a2-a1)/(2*(d2-d1)) #divergence(radian)\n", + "theta = theta*10**3 #divergence(milli radian)\n", + "\n", + "#Result\n", + "print \"divergence is\",theta,\"milli radian\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "divergence is 1.0 milli radian\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 10.3, Page number 10.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n = 1 #for air\n", + "lamda = 650 #wavelength(nm)\n", + "bs = 1 #beam size(mm)\n", + "fl = 1 #focal length of lens(mm)\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-9 #wavelength(m)\n", + "bs = bs*10**-3 #beam size(m)\n", + "fl = fl*10**-3 #focal length of lens(m)\n", + "tan_theta = fl/(2*bs) #value of tan_theta\n", + "theta = math.atan(tan_theta)\n", + "NA = n*math.sin(theta)\n", + "NA = math.ceil(NA*10**2)/10**2; #rounding off to 2 decimals\n", + "ss = 0.6*lamda/NA #spot size(m)\n", + "ss = ss*10**6; #spot size(micro metre)\n", + "ss = math.ceil(ss*10**3)/10**3; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"spot size is\",ss,\"micro metre\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "spot size is 0.867 micro metre\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb new file mode 100755 index 00000000..04367b22 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb @@ -0,0 +1,277 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:99fe784c923b9389b1b34d49f0a0fc6c7079e6fd55741e762bc73de0fe21384b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "11: Fibre Optics and Holography" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 11.1, Page number 11.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.55 #refractive index of core\n", + "n2 = 1.50 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2 - n2**2)\n", + "NA = math.ceil(NA*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",NA" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "numerical aperture is 0.391\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 11.2, Page number 11.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.563 #refractive index of core\n", + "n2 = 1.498; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2 - n2**2) #numerical aperture \n", + "NA = math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n", + "alpha_i = math.asin(NA) #angle of acceptance(radians)\n", + "alpha_i = alpha_i*180/math.pi #angle(degrees)\n", + "deg = int(alpha_i)\n", + "t = 60*(alpha_i-deg)\n", + "mint = int(t) #angle(minutes)\n", + "\n", + "#Result\n", + "print \"the angle of acceptance is\",deg,\"degrees and\",mint,\"minutes\"\n", + "print \"answer given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the angle of acceptance is 26 degrees and 29 minutes\n", + "answer given in the book differs due to rounding off errors\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 11.3, Page number 11.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta = 0.05 #difference in refractive indices of core and cladding\n", + "NA = 0.39 #numerical aperture\n", + "\n", + "#Calculation\n", + "n1 = NA/math.sqrt(2*delta) #refractive index of core\n", + "n1 = math.ceil(n1*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"refractive index of the core is\",n1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "refractive index of the core is 1.2333\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 11.4, Page number 11.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.563 #refractive index of core\n", + "n2 = 1.498 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "delta = (n1-n2)/n1 #fractional index change\n", + "delta = math.ceil(delta*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"fractional index change is\",delta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fractional index change is 0.0416\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 11.5, Page number 11.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.48 #refractive index of core\n", + "n2 = 1.45 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2 - n2**2) #numerical aperture \n", + "NA = math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n", + "alpha_i = math.asin(NA) #angle of acceptance(radian)\n", + "alpha_i = alpha_i*180/math.pi #angle(degrees)\n", + "deg = int(alpha_i)\n", + "t = 60*(alpha_i-deg)\n", + "mint = round(t) #angle(minutes)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",NA\n", + "print \"the angle of acceptance is\",deg,\"degrees and\",mint,\"minutes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "numerical aperture is 0.2965\n", + "the angle of acceptance is 17 degrees and 15.0 minutes\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 11.6, Page number 11.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Pin = 100 #power of signal(mW)\n", + "Pout = 40 #outcoming signal power(mW)\n", + "\n", + "#Calculation\n", + "l = -10*math.log10(Pout/Pin) #attenuation loss(dB)\n", + "l = math.ceil(l*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"the attenuation loss is\",l,\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the attenuation loss is 3.98 dB\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb new file mode 100755 index 00000000..49ab34ca --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb @@ -0,0 +1,214 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:358f4a01b294025154ed5b68aa4867e70b7293d6e35ba5318010f0ecabaea268" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "1: Bonding in Solids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 1.1, Page number 1.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "IE_1 = 502 #first ionisation energy(kJ/mol)\n", + "EA_B = -335 #electron affinity for B atom(kJ/mol)\n", + "e = 1.602*10**-19\n", + "r = 0.3 #inter ionic seperation(nm)\n", + "epsilon0 = 8.85*10**-12 #permittivity of free space(C/N-m)\n", + "\n", + "#Calculation\n", + "r = r*10**-9 #inter ionic seperation(m)\n", + "N = 6.022*10**23*10**-3\n", + "E = (-e**2*N)/(4*math.pi*epsilon0*r) #electrostatic attraction energy(kJ/mol)\n", + "dE = IE_1+EA_B+E; #net change in energy per mole\n", + "\n", + "#Result\n", + "print \"electrostatic attraction energy is\",int(E),\"kJ/mol\"\n", + "print \"net change in energy is\",int(dE),\"kJ/mol\"\n", + "print \"A+B- molecule will be stable\"\n", + "print \"answer for net change,dE given in the book is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electrostatic attraction energy is -463 kJ/mol\n", + "net change in energy is -296 kJ/mol\n", + "A+B- molecule will be stable\n", + "answer for net change,dE given in the book is wrong\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 1.2, Page number 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "IP_K = 4.1 #IP of K(eV)\n", + "EA_Cl = 3.6 #EA of Cl(eV)\n", + "e = 1.602*10**-19\n", + "epsilon0 = 8.85*10**-12 \n", + "\n", + "#Calculation\n", + "delta_E = IP_K - EA_Cl #energy required(eV)\n", + "#if their total energy is 0, delta_E = Ec\n", + "Ec = delta_E\n", + "R = e/(4*math.pi*epsilon0*Ec) #seperation between ion pair(m)\n", + "R = R*10**9 #seperation between ion pair(nm)\n", + "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"energy required to form K+Cl- ion pair is\",delta_E,\"eV\"\n", + "print \"seperation between ion pair is\",R,\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy required to form K+Cl- ion pair is 0.5 eV\n", + "seperation between ion pair is 2.881 nm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 1.3, Page number 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.602*10**-19\n", + "EA = 3.65 #electron affinity of Cl(eV)\n", + "IP = 5.14 #ionisation energy of Na(eV)\n", + "epsilon0 = 8.85*10**-12\n", + "r0 = 236 #equilibrium distance(pm)\n", + "\n", + "#Calculation\n", + "r0 = r0*10**-12 #equilibrium distance(m)\n", + "V = (-e**2)/(4*math.pi*epsilon0*r0) ##potential energy(J)\n", + "V = V/e #potential energy(eV)\n", + "Ue = V\n", + "BE = -Ue - IP + EA #bond energy(eV)\n", + "BE = math.ceil(BE*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"bond energy for NaCl molecule is\",BE,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "bond energy for NaCl molecule is 4.614 eV\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 1.4, Page number 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.602*(10**-19)\n", + "epsilon0 = 8.85*(10**-12)\n", + "r0 = 0.281 #equilibrium seperation(nm)\n", + "A = 1.748 #Madelung constant\n", + "n = 9 #born repulsive exponent\n", + "\n", + "#Calculation\n", + "r0 = r0*10**-9 #equilibrium seperation(m)\n", + "CE = (A*e**2)*(1-(1/n))/(4*math.pi*epsilon0*r0) #cohesive energy(J)\n", + "CE = CE/e #cohesive energy(eV)\n", + "CE = math.ceil(CE*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"cohesive energy of NaCl is\",CE,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cohesive energy of NaCl is 7.966 eV\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb new file mode 100755 index 00000000..85f9fd71 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb @@ -0,0 +1,1031 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dc7951185c6d2c2020409b6a4f6420009478010f311e90b1a30732a0039ca5cf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + " 2: Crystal Structures and X-ray Diffraction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.1, Page number 2.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r = 1; #assume value of r as 1\n", + " \n", + "#Calculation\n", + "#since 4*r = math.sqrt(3)*a\n", + "a = 4*r/math.sqrt(3); \n", + "R = (a-(2*r))/2; #since 2*r+2*R = a\n", + "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"radius of interstitial sphere is\",R,\"r\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radius of interstitial sphere is 0.155 r\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.2, Page number 2.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r_BCC = 1.258; #atomic radius(Angstrom)\n", + "r_FCC = 1.292; #atomic radius(Angstrom)\n", + "\n", + "#Calculation\n", + "a_BCC = (4*r_BCC)/math.sqrt(3); #In BCC(Angstrom)\n", + "a_BCCm = a_BCC*10**-10; #converting a from Angstrom to m\n", + "V_BCC = a_BCCm**3; #volume of unit cell(m^3)\n", + "n_BCC = ((1/8)*8)+1; #number of atoms per unit cell\n", + "V1_BCC = V_BCC/n_BCC; #volume occupied by 1 atom(m^3)\n", + "a_FCC = 2*math.sqrt(2)*r_FCC; #In FCC(Angstrom)\n", + "a_FCCm = a_FCC*10**-10; #converting a from Angstrom to m\n", + "V_FCC = a_FCCm**3; #volume of unit cell(m^3)\n", + "n_FCC = ((1/2)*6) + ((1/8)*8); #number of atoms per unit cell\n", + "V1_FCC = V_FCC/n_FCC; #volume occupied by 1 atom(m^3)\n", + "delta_V = (V1_BCC - V1_FCC)*100/V1_BCC; #change in volume in %\n", + "delta_V = math.ceil(delta_V*10)/10; #rounding off to 1 decimal\n", + "\n", + "#Result\n", + "print \"decrease of volume during conversion from BCC to FCC is\",delta_V,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "decrease of volume during conversion from BCC to FCC is 0.5 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.3, Page number 2.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a = 0.27; #nearest neighbour distance(nm)\n", + "c = 0.494; #height of unit cell(nm)\n", + "N = 6.023*10**26; #avagadro number(k/mol)\n", + "M = 65.37; #atomic weight(kg)\n", + "\n", + "#Calculation\n", + "a_m = a*10**-9; #nearest neighbour distance(m)\n", + "c_m = c*10**-9; #height of unit cell(m)\n", + "V = 3*math.sqrt(3)*(a_m**2)*c_m/2; #volume of unit cell(m^3)\n", + "#if rho is density then mass = V*rho\n", + "#V*rho = 6*M/N\n", + "rho = (6*M)/(N*V); #density(kg/m^3)\n", + "\n", + "#Result\n", + "print \"Volume of the unit cell is\",round(V/1e-29,2),\"*10^-29 m^3\"\n", + "print \"density of Zinc is\",round(rho),\"kg/m^3\"\n", + "print \"answer for density given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume of the unit cell is 9.36 *10^-29 m^3\n", + "density of Zinc is 6960.0 kg/m^3\n", + "answer for density given in the book differs due to rounding off errors\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.4, Page number 2.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r = 1; #assume value of r as 1\n", + "\n", + "#Calculation\n", + "a = 4*r/math.sqrt(2); #for FCC structure\n", + "R = (a/2)-r; #since 2*r+2*R = a\n", + "R = math.ceil(R*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"maximum radius of the sphere that can fit into the void is\",R,\"r\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum radius of the sphere that can fit into the void is 0.4143 r\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.5, Page number 2.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a = 0.356; #cube edge of diamond(nm)\n", + "aw = 12.01; #atomic weight of carbon(kg)\n", + "N = 6.023*10**26; #avagadro's number\n", + "\n", + "#Calculation\n", + "a_m = a*10**-9; #cube edge of diamond(m)\n", + "n = 8/(a_m**3); #number of atoms(per m^3)\n", + "n = n/10**29;\n", + "n = math.ceil(n*10**3)/10**3; #rounding off to 3 decimals\n", + "n = n*10**29;\n", + "M = aw/N; #mass of 1 carbon atom(kg)\n", + "rho = M*n;\n", + "\n", + "#Result\n", + "print \"number of atoms per m^3 is\",n\n", + "print \"density of diamond is\",int(rho),\"kg/m^3\"\n", + "print \"answer for density given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of atoms per m^3 is 1.774e+29\n", + "density of diamond is 3537 kg/m^3\n", + "answer for density given in the book differs due to rounding off errors\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.6, Page number 2.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "MW = 23+35.5; #molecular weight of NaCl(gm)\n", + "N = 6.023*10**23; #avagadro number(mol-1)\n", + "rho = 2.18; #density of NaCl(gm/cm^3)\n", + "V = 1; #volume of unit cube(cm^3)\n", + "\n", + "#Calculation\n", + "M = MW/N; #mass of NaCl molecule(gm)\n", + "n = rho/M; #number of molecules per unit volume\n", + "n = 2*n; #since NaCl is diatomic(atoms/cm^3)\n", + "#length of edge of unit cube is n*a\n", + "#volume V = n^3*a^3 = 1 cm^3 \n", + "a = (V/n)**(1/3); #distance between two adjacent atoms(cm)\n", + "a = a*10**8; #distance between two adjacent atoms(A)\n", + "a = math.ceil(a*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"distance between two adjacent atoms is\",a,\"Angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance between two adjacent atoms is 2.814 Angstrom\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.7, Page number 2.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "AW = 63.5; #atomic weight of Cu(gm/mol)\n", + "N = 6.023*10**23; #avagadro's number(mol-1)\n", + "r = 1.278; #atomic radius(A)\n", + "n = 4; #number of atoms in unit cell\n", + "\n", + "#Calculation\n", + "r = r*10**-8; #atomic radius(cm)\n", + "M = AW/N; #mass of each Copper atom(gm)\n", + "a = 4*r/math.sqrt(2); #lattice constant(cm)\n", + "m = n*M; #mass of unit cell(gm)\n", + "rho = m/a**3; #density of copper crystal(gm/cm^3)\n", + "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"density of Copper crystal is\",rho,\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "density of Copper crystal is 8.929 gm/cm^3\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.8, Page number 2.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r = 0.1249; #atomic radius(nm)\n", + "PF = 0.68; #packing factor for BCC\n", + "\n", + "#Calculation\n", + "a = 4*r/math.sqrt(3); #lattice constant(nm)\n", + "a_m = a*10**-9; #lattice constant(m)\n", + "V = a_m**3; #volume of unit cell(m^3)\n", + "FV = 1-PF; #free volume\n", + "FV1 = FV*V; #free volume per unit cell(m^3)\n", + "\n", + "#Result\n", + "print \"free volume per unit cell is\",round(FV1/1e-30,4),\"*10^-30 m^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "free volume per unit cell is 7.6795 *10^-30 m^3\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.11, Page number 2.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#in (100) plane the total number of atoms are n\n", + "n = (1/4)*4;\n", + "\n", + "#Calculation\n", + "#in (111) plane, area = (1/2)*base*height = (1/2)*a*sqrt(2)*a*sqrt(2)*cosd(30)\n", + "x = math.cos(30);\n", + "#area = (1/2)*a*sqrt(2)*a*sqrt(2)*x = 0.866*a^2 = 0.58/a^2\n", + "n1 = (1/360)*60*3;\n", + "\n", + "#Result\n", + "print \"number of atoms in (100) plane are\",n;\n", + "#A = a^2. number of atoms per mm^2 is n/a^2\n", + "print \"number of atoms per mm^2 is 1/a^2\";\n", + "print \"number of atoms in (110) plane is 1\";\n", + "#in (110) plane, area is sqrt(2)*a*a = sqrt(2)*a^2\n", + "print \"unit area contains 1/(sqrt(2)*a^2) = 0.707/a^2 atoms/mm^2\";\n", + "print \"total number of atoms in (111) plane is\",n1\n", + "#number of atoms per unit area is 0.5/(0.866*a^2)\n", + "print \"number of atoms per unit area is 0.58/a^2 atoms/mm^2\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of atoms in (100) plane are 1.0\n", + "number of atoms per mm^2 is 1/a^2\n", + "number of atoms in (110) plane is 1\n", + "unit area contains 1/(sqrt(2)*a^2) = 0.707/a^2 atoms/mm^2\n", + "total number of atoms in (111) plane is 0.5\n", + "number of atoms per unit area is 0.58/a^2 atoms/mm^2\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.12, Page number 2.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h1 = 1;\n", + "k1 = 1;\n", + "l1 = 0; #for (110) plane\n", + "h2 = 2;\n", + "k2 = 1;\n", + "l2 = 2; #for (212) plane\n", + "r = 0.1278; #atomic radius(nm)\n", + "\n", + "#Calculation\n", + "r = r*10**-9; #atomic radius(m) \n", + "x1 = math.sqrt(h1**2+k1**2+l1**2);\n", + "a = 4*r/x1; #nearest neighbouring distance(m)\n", + "a = a*10**9; #nearest neighbouring distance(nm)\n", + "d_110 = a/x1; #interplanar spacing for (110),(nm)\n", + "x2 = math.sqrt(h2**2+k2**2+l2**2);\n", + "d_212 = a/x2; #interplanar spacing for (212),(nm)\n", + "d_212 = math.ceil(d_212*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"interplanar spacing for (110) is\",d_110,\"nm\"\n", + "print \"interplanar spacing for (212) is\",d_212,\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "interplanar spacing for (110) is 0.2556 nm\n", + "interplanar spacing for (212) is 0.1205 nm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.13, Page number 2.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h1 = 1;\n", + "k1 = 0;\n", + "l1 = 0; #for (100) plane\n", + "h2 = 1;\n", + "k2 = 1;\n", + "l2 = 0; #for (110) plane \n", + "h3 = 1;\n", + "k3 = 1;\n", + "l3 = 1; #for (111) plane\n", + "\n", + "#Calculation\n", + "x1 = math.sqrt(1/(h1**2+k1**2+l1**2)); #for (100) plane\n", + "x2 = math.sqrt(1/(h2**2+k2**2+l2**2)); #for (110) plane \n", + "x3 = math.sqrt(1/(h3**2+k3**2+l3**2)); #for (111) plane\n", + "x2 = math.ceil(x2*10**2)/10**2; #rounding off to 2 decimals\n", + "x3 = math.ceil(x3*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"ratio of the seperation between successive lattice planes is %d:%.2f:%.2f\"%(x1,x2,x3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of the seperation between successive lattice planes is 1:0.71:0.58\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.14, Page number 2.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Calculation\n", + "#plane intercepts at a,b/2,3*c\n", + "#therefore intercepts are (1 1/2 3)\n", + "x = 1;\n", + "y = 1/2;\n", + "z = 3;\n", + "def lcm(x, y):\n", + " if y > z:\n", + " greater = y\n", + " else:\n", + " greater = z\n", + "\n", + " while(True):\n", + " if((greater % y == 0) and (greater % z == 0)):\n", + " lcm = greater\n", + " break\n", + " greater += 1\n", + "\n", + " return lcm\n", + "\n", + "lcm = lcm(y,z); \n", + "x_dash = (1/x)*lcm; #miller index of x plane\n", + "y_dash = (1/y)*lcm; #miller index of y plane \n", + "z_dash = (1/z)*lcm; #miller index of z plane\n", + "\n", + "#Result\n", + "print \"miller indices of the plane are (\",x_dash,y_dash,z_dash,\")\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miller indices of the plane are ( 3.0 6.0 1.0 )\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.15, Page number 2.37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d = 0.282; #lattice spacing(nm)\n", + "n = 1; #first order\n", + "theta = (8+(35/60))*(math.pi/180); #glancing angle(radian)\n", + "theeta = 90; #maximum value possible(degrees)\n", + "\n", + "#Calculation\n", + "theeta = theeta*math.pi/180; #maximum value possible(radian) \n", + "d = d*10**-9; #lattice spacing(m)\n", + "lamda = 2*d*math.sin(theta)/n; #wavelength of X-rays(m)\n", + "lamda_nm = lamda*10**9; #wavelength of X-rays(nm)\n", + "lamda_nm = math.ceil(lamda_nm*10**4)/10**4; #rounding off to 4 decimals\n", + "n1 = 2*d*math.sin(theeta)/lamda; #maximum order of diffraction possible\n", + "\n", + "#Result\n", + "print \"wavelength of X-rays is\",lamda_nm,\"nm\"\n", + "print \"maximum order of diffraction possible is\",int(n1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of X-rays is 0.0842 nm\n", + "maximum order of diffraction possible is 6\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.16, Page number 2.37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 1.5; #wavelength(A.U)\n", + "d = 1.6; #interplanar spacing(A.U)\n", + "theta = 90; #maximum glancing angle possible(degrees)\n", + "\n", + "#Calculation\n", + "theta = theta*math.pi/180; #maximum glancing angle possible(radian)\n", + "n = 2*d*math.sin(theta)/lamda; #maximum possible diffraction order\n", + "\n", + "#Result\n", + "print \"maximum possible diffraction order is\",int(n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum possible diffraction order is 2\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.17, Page number 2.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 1;\n", + "k = 1;\n", + "l = 1; #for (111) plane\n", + "theta = 30; #glancing angle(degrees)\n", + "n = 1; #first order\n", + "lamda = 1.5418; #wavelength of X-rays(A)\n", + "\n", + "#Calculation\n", + "theta = theta*math.pi/180; #glancing angle(radian)\n", + "x = math.sqrt(h**2+k**2+l**2);\n", + "lamda = lamda*10**-10; #wavelength of X-rays(m)\n", + "d = lamda/(2*math.sin(theta));\n", + "a = d*x; #interatomic spacing(m)\n", + "a = a*10**10; #interatomic spacing(A)\n", + "a = math.ceil(a*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"the interatomic spacing is\",a,\"Angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the interatomic spacing is 2.6705 Angstrom\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.18, Page number 2.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d100 = 0.28; #lattice constant(nm)\n", + "h = 1;\n", + "k = 1;\n", + "l = 0; #for (110) plane\n", + "n = 2; #second order\n", + "lamda = 0.071; #wavelength of X-rays(nm)\n", + "\n", + "#Calculation\n", + "lamda_m = lamda*10**-9; #wavelength of X-rays(m)\n", + "d110 = d100/math.sqrt(h**2+k**2+l**2); #interatomic spacing(nm)\n", + "d110 = d110*10**-9; #interatomic spacing(m)\n", + "theta = math.asin(n*lamda_m/(2*d110)); #glancing angle(radian)\n", + "theta = theta*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"the glancing angle is\",int(theta),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the glancing angle is 21 degrees\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.19, Page number 2.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a = 0.38; #lattice constant(nm)\n", + "h = 1;\n", + "k = 1;\n", + "l = 0; #for (110) plane\n", + "\n", + "#Calculation\n", + "d = a/math.sqrt(h**2+k**2+l**2);\n", + "d = math.ceil(d*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"the distance between (110) planes is\",d,\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the distance between (110) planes is 0.27 nm\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.20, Page number 2.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#area of (110) plane is a*sqrt(2)*a = sqrt(2)*a^2\n", + "theta = 30; #glancing angle(degrees)\n", + "\n", + "#Calculation\n", + "theta = theta*math.pi/180; #glancing angle(radian)\n", + "n = (1/4)*4; #number of atoms\n", + "x = math.cos(theta);\n", + "#area of (111) plane is (a/sqrt(2))*x*a*sqrt(2)\n", + "#hence area is (sqrt(3)/2)*a^2\n", + "n1 = 3*(1/6); #number of atoms\n", + "\n", + "#Result\n", + "print \"area of (110) plane contains\",n,\"atom\"\n", + "print \"density of lattice points is 1/(sqrt(2)*a^2)\"\n", + "print \"area of (111) plane contains\",n1,\"atom\"\n", + "#density of lattice points is (1/2)/(sqrt(3)*a^2/2)\n", + "print \"density of lattice points is 1/(sqrt(3)*a^2)\"\n", + "#density of lattice points (111) plane : (110) plane is 1/(sqrt(3)*a^2) : 1/(sqrt(2)*a^2) = sqrt(2):sqrt(3)\n", + "print \"density of lattice points (111) plane : (110) plane is sqrt(2):sqrt(3)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "area of (110) plane contains 1.0 atom\n", + "density of lattice points is 1/(sqrt(2)*a^2)\n", + "area of (111) plane contains 0.5 atom\n", + "density of lattice points is 1/(sqrt(3)*a^2)\n", + "density of lattice points (111) plane : (110) plane is sqrt(2):sqrt(3)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.21, Page number 2.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n = 2; #second order\n", + "h = 1;\n", + "k = 1;\n", + "l = 0; #plane (110)\n", + "lamda = 0.065; #wavelength of X-rays(nm)\n", + "a = 0.26; #axial length(nm)\n", + "\n", + "#Calculation\n", + "lamda_m = lamda*10**-9; #wavelength of X-rays(m)\n", + "a_m = a*10**-9; #axial length(m)\n", + "x = math.sqrt(h**2+k**2+l**2);\n", + "theta = math.asin(n*lamda_m*x/(2*a_m)); #glancing angle(radian)\n", + "theta = theta*180/math.pi; #glancing angle(degrees)\n", + "deg = int(theta); #glancing angle(degrees)\n", + "t = 60*(theta-deg);\n", + "mint = int(t); #glancing angle(minutes)\n", + "\n", + "#Result\n", + "print \"the glancing angle is\",deg,\"degrees\",mint,\"minutes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the glancing angle is 20 degrees 42 minutes\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.22, Page number 2.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n = 1; #first order\n", + "h = 1;\n", + "k = 1;\n", + "l = 1; #for (111) plane\n", + "lamda = 1.54; #wavelength(A.U)\n", + "theta = 19.2; #Bragg's angle(degrees)\n", + "\n", + "#Calculation\n", + "lamda_m = lamda*10**-10; #wavelength(m)\n", + "theta = theta*math.pi/180; #Bragg's angle(radian)\n", + "d = n*lamda_m/(2*math.sin(theta)); #interplanar spacing(m)\n", + "a = d*math.sqrt(h**2+k**2+l**2); #cube edge(m)\n", + "a_AU = a*10**10; #cube edge(A.U)\n", + "a_AU = math.ceil(a_AU*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"the cube edge is\",a_AU,\"A.U\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the cube edge is 4.0554 A.U\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 2.23, Page number 2.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n = 1; #first order\n", + "h = 1;\n", + "k = 1;\n", + "l = 1; #for (111) plane\n", + "lamda = 1.54; #wavelength(A.U)\n", + "theta = 19.2; #Bragg's angle(degrees)\n", + "\n", + "#Calculation\n", + "lamda_m = lamda*10**-10; #wavelength(m)\n", + "theta = theta*math.pi/180; #Bragg's angle(radian)\n", + "d = n*lamda_m/(2*math.sin(theta)); #interplanar spacing(m)\n", + "a = d*math.sqrt(h**2+k**2+l**2); #cube edge(m)\n", + "\n", + "#Result\n", + "print \"the cube edge is\",round(a/1e-10,3),\"*10^-10 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the cube edge is 4.055 *10^-10 m\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb new file mode 100755 index 00000000..afe7637e --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb @@ -0,0 +1,586 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:50d61ee8fa972cdf457beff8302930b51b8d1018696b3dbcc148db2d3f471c34" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "3: Principles of Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.1, Page number 3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8 #velocity of light(m/sec)\n", + "m = 1.67*10**-27 #mass of proton(kg)\n", + "h = 6.626*10**-34 #planck's constant\n", + "\n", + "#Calculation\n", + "v = (1/10)*c #velocity of proton(m/sec)\n", + "lamda = h/(m*v) #de Broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de Broglie wavelength of proton is\",round(lamda/1e-14,3),\"*10^-14 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength of proton is 1.323 *10^-14 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.2, Page number 3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 400 #potential(V)\n", + "\n", + "#Calculation\n", + "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength of electron is 0.613 angstrom\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.3, Page number 3.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m = 1.674*10**-27 #mass of neutron(kg)\n", + "h = 6.626*10**-34 #planck's constant\n", + "e = 1.6*10**-19\n", + "KE = 0.025 #kinetic energy(eV)\n", + "\n", + "#Calculation\n", + "E = KE*e #kinetic energy(J)\n", + "lamda = h/math.sqrt(2*m*E) #de Broglie wavelength(m)\n", + "lamda_nm = lamda*10**9 #de Broglie wavelength(nm)\n", + "lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"de Broglie wavelength is\",lamda_nm,\"nm\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength is 0.1811 nm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.4, Page number 3.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 1600 #potential(V)\n", + "\n", + "#Calculation\n", + "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Broglie wavelength of electron is 0.3065 angstrom\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.5, Page number 3.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_x = 0.2 #electron distance(angstrom)\n", + "h = 6.626*10**-34 #planck's constant\n", + "\n", + "#Calculation\n", + "delta_x = delta_x*10**-10 #electron distance(m)\n", + "delta_p = h/(2*math.pi*delta_x) #uncertainity in momentum(kg.m/s)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",round(delta_p/1e-24,3),\"*10^-24 kg m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " uncertainity in momentum is 5.273 *10^-24 kg m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.6, Page number 3.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1\n", + "n2 = 1\n", + "n3 = 1 #for lowest energy\n", + "e = 1.6*10**-19\n", + "h = 6.62*10**-34 #planck's constant\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 0.1 #side of box(nm)\n", + "\n", + "#Calculation\n", + "L = L*10**-9 #side of box(m)\n", + "E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n", + "E1 = E1/e #lowest energy(eV)\n", + "E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",E1,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lowest energy of electron is 112.9 eV\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.7, Page number 3.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1\n", + "n2 = 1\n", + "n3 = 2 #for level next to the lowest\n", + "e = 1.6*10**-19\n", + "h = 6.62*10**-34 #planck's constant\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 0.1 #side of box(nm)\n", + "\n", + "#Calculation\n", + "L = L*10**-9 #side of box(m)\n", + "E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n", + "E1 = E1/e #lowest energy(eV)\n", + "E1 = math.ceil(E1*10**2)/10**2 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"energy of electron is\",E1,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy of electron is 225.75 eV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.8, Page number 3.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "h = 6.626*10**-34 #planck's constant\n", + "e = 1.6*10**-19\n", + "E = 2000 #energy(eV)\n", + "\n", + "#Calculation\n", + "E = E*e #energy(J)\n", + "lamda = h/math.sqrt(2*m*E) #wavelength(m)\n", + "lamda_nm = lamda*10**9 #velength(nm)\n", + "lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"wavelength is\",lamda_nm,\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength is 0.0275 nm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.9, Page number 3.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n = 1 #for minimum energy\n", + "h = 6.626*10**-34 #planck's constant(J sec)\n", + "m = 9.91*10**-31 #mass of electron(kg)\n", + "L = 4*10**-10 #side of box(m)\n", + "\n", + "#Calculation\n", + "E1 = ((h**2)*(n**2))/(8*m*(L**2)) #lowest energy(J)\n", + "E1 = E1*10**18;\n", + "E1 = math.ceil(E1*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"energy of electron is\",E1,\"*10**-18 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy of electron is 0.3462 *10**-18 J\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.10, Page number 3.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1 #for ground state\n", + "n2 = 2 #for 1st excited state\n", + "n3 = 3 #for 2nd excited state\n", + "h = 6.626*10**-34 #planck's constant(J sec)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 1*10**-10 #width(m)\n", + "\n", + "#Calculation\n", + "E1 = h**2*n1**2/(8*m*L**2) #energy in ground state(J)\n", + "E2 = n2**2*E1 #energy in 1st excited state(J)\n", + "E3 = n3**2*E1 #energy in 2nd excited state(J)\n", + "\n", + "#Result\n", + "print \"energy in ground state is\",round(E1/1e-18,3),\"*10^-18 J\"\n", + "print \"energy in 1st excited state is\",round(E2/1e-17,3),\"*10^-17 J\"\n", + "print \"energy in 2nd excited state is\",round(E3/1e-17,3),\"*10^-17 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy in ground state is 6.031 *10^-18 J\n", + "energy in 1st excited state is 2.412 *10^-17 J\n", + "energy in 2nd excited state is 5.428 *10^-17 J\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.11, Page number 3.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 6.626*10**-34 #planck's constant(J sec)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "e = 1.6*10**-19\n", + "lamda = 1.66*10**-10 #wavelength(m)\n", + "\n", + "#Calculation\n", + "v = h/(m*lamda) #velocity of electron(m/sec)\n", + "v_km = v*10**-3 #velocity of electron(km/sec)\n", + "KE = (1/2)*m*v**2 #kinetic energy(J)\n", + "KE_eV = KE/e #kinetic energy(eV)\n", + "KE_eV = math.ceil(KE_eV*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"velocity of electron is\",int(v_km),\"km/sec\"\n", + "print \"kinetic energy of electron is\",KE_eV,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "velocity of electron is 4386 km/sec\n", + "kinetic energy of electron is 54.714 eV\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.12, Page number 3.31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 15 #potential(kV)\n", + "\n", + "#Calculation\n", + "V = V*10**3 #potential(V)\n", + "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n", + "lamda = math.ceil(lamda*100)/100 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"wavelength of electron waves is\",lamda,\"angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of electron waves is 0.11 angstrom\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 3.13, Page number 3.31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 344 #potential(V)\n", + "n = 1 #for 1st reflection maximum\n", + "theta = 60 #glancing angle(degrees)\n", + "\n", + "#Calculation\n", + "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n", + "lamda_m = lamda*10**-10 #de Broglie wavelength(m)\n", + "theta = theta*math.pi/180 ##glancing angle(radians)\n", + "d = n*lamda_m/(2*math.sin(theta)) #interatomic spacing(m)\n", + "d = d*10**10 #interatomic spacing(angstrom)\n", + "d = math.ceil(d*10**5)/10**5 #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print \"interatomic spacing of crystal is\",d,\"angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "interatomic spacing of crystal is 0.38164 angstrom\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb new file mode 100755 index 00000000..d55516d5 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb @@ -0,0 +1,390 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7ccac901d3d7a8c9dde630e169f5e7e52a039a9eb5d4b37586cb97d5a7fe1fca" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "4: Electron Theory of Metals" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.1, Page number 4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho_s = 10.5*10**3 #density of silver(kg/m^3)\n", + "NA = 6.02*10**26 #avagadro number(per k-mol)\n", + "MA = 107.9 #atomic weight of silver\n", + "sigma = 6.8*10**7; #conductivity of silver(ohm-1 m-1)\n", + "e = 1.6*10**-19\n", + "\n", + "#Calculation\n", + "n = rho_s*NA/MA #molar volume of silver\n", + "mew = sigma/(n*e) #mobility of electrons(m^2/Vs)\n", + "mew = mew*10**2\n", + "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"density of electrons in silver is\",round(n/1e28,2),\"*10^28\"\n", + "print \"mobility of electrons is\",mew,\"*10**-2 m**2/Vs\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "density of electrons in silver is 5.86 *10^28\n", + "mobility of electrons is 0.7255 *10**-2 m**2/Vs\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.2, Page number 4.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d = 8.92*10**3 #density(kg/m^3)\n", + "e = 1.6*10**-19\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "N = 6.02*10**26 #avagadro's number(per k-mol)\n", + "AW = 63.5 #atomic weight\n", + "rho = 1.73*10**-8 #resistivity of copper, ohm-m\n", + "\n", + "#Calculation\n", + "n = d*N/AW #number of cu atoms(per m^3)\n", + "mew = 1/(rho*n*e) #mobility of electrons(m/Vs)\n", + "mew = mew*10**2\n", + "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n", + "tow = m/(n*e**2*rho) #relaxation time(s)\n", + "\n", + "#Result\n", + "print \"mobility of electrons is\",round(mew,3),\"*10**-2 m/Vs\"\n", + "print \"relaxation time is\",round(tow/1e-14,3),\"*10^-14 sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mobility of electrons is 0.427 *10**-2 m/Vs\n", + "relaxation time is 2.43 *10^-14 sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.3, Page number 4.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho = 1.54*10**-8 #resistivity(ohm-m)\n", + "n = 5.8*10**28 #conduction electrons(per m^3)\n", + "m = 9.108*10**-31 #mass of electron(kg)\n", + "e = 1.602*10**-19\n", + "\n", + "#Calculation\n", + "tow = m/(n*(e**2)*rho) #relaxation time(sec)\n", + "\n", + "#Result\n", + "print \"relaxation time of conduction electrons is\",round(tow/1e-14,2),\"*10^-14 sec\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relaxation time of conduction electrons is 3.97 *10^-14 sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.4, Page number 4.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R = 0.06 #resistance(ohm)\n", + "D = 5 #length of Al wire(m)\n", + "e = 1.602*10**-19\n", + "rho = 2.7*10**-8 #resistivity of Al(ohm-m)\n", + "MA = 26.98 #atomic weight\n", + "NA = 6.025*10**26 #avagadro number(k/mol)\n", + "rho_s = 2.7*10**3 #density(kg/m^3)\n", + "I = 15 #current(A)\n", + "\n", + "#Calculation\n", + "n = 3*rho_s*NA/MA #free electron concentration(electrons/m^3)\n", + "mew = 1/(n*e*rho) #mobility(m/Vs)\n", + "E = I*R/D #electric field(V/m)\n", + "vd = mew*E #drift velocity(m/s)\n", + "vd = vd*10**3\n", + "mew = mew*10**3\n", + "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n", + "vd = math.ceil(vd*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"free electron concentration is\",round(n/1e29,4),\"*10^29 electrons/m^2\"\n", + "print \"mobility is\",round(mew,3),\"*10^-3 m/Vs\"\n", + "print \"drift velocity is\",round(vd,2),\"*10^-3 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "free electron concentration is 1.8088 *10^29 electrons/m^2\n", + "mobility is 1.278 *10^-3 m/Vs\n", + "drift velocity is 0.23 *10^-3 m/s\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.5, Page number 4.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1\n", + "n2 = 1\n", + "n3 = 1 #for lowest energy\n", + "h = 6.62*10**-34 #planck's constant(Js)\n", + "e = 1.6*10**-19\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 0.1 #side of box(nm)\n", + "\n", + "#Calculation\n", + "L = L*10**-9 #side of box(m)\n", + "E1 = (h**2)*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n", + "E1 = E1/e #lowest energy(eV)\n", + "E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",E1,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lowest energy of electron is 112.9 eV\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.6, Page number 4.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "\n", + "#Calculation\n", + "#Fermi function F(E) = 1/(1+exp((E-Ef)/(kT)))\n", + "#given E-Ef = kT. therefore F(E) = 1/(1+exp(1))\n", + "F_E = 1/(1+math.exp(1))\n", + "F_E = math.ceil(F_E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"fermi function is\",F_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fermi function is 0.269\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.7, Page number 4.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "F_E = 10 #probability in percent\n", + "k = 1.38*10**-23\n", + "EF = 5.5 #fermi energy(eV)\n", + "\n", + "#Calculation\n", + "E = EF+(EF/100) #energy(eV)\n", + "X = E-EF #E-EF(eV)\n", + "X = X*e #E-EF(J)\n", + "T = X/(k*math.log(F_E-1)) #temperature(K)\n", + "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature is 290.2 K\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.8, Page number 4.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "F_E = 0.01 #probability in percent\n", + "k = 1.38*10**-23\n", + "e = 1.6*10**-19\n", + "#let E-EF be X\n", + "X = 0.5 #E-EF(eV)\n", + "\n", + "#Calculation\n", + "kT = X/(2.303*math.log10((1-F_E)*100)) #value of kT(eV)\n", + "T = kT*e/k #temperature(K)\n", + "T = math.ceil(T*10)/10 #rounding off to 1 decimal\n", + "\n", + "#Result\n", + "print \"temperature is\",T,\"K\"\n", + "print \"answer given in the book is wrong by a decimal point\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature is 1261.4 K\n", + "answer given in the book is wrong by a decimal point\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb new file mode 100755 index 00000000..a6f7f46a --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb @@ -0,0 +1,429 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d8c62a33cdb998cb212b402408ceb0e19f54a33922b51cf1b80232d50d8d2341" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "6: Dielectric Properties" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.1, Page number 6.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C = 2 #capacitance(micro-farad)\n", + "V = 1000 #voltage applied(V)\n", + "epsilon_r = 100 #permitivity\n", + "\n", + "#Calculation\n", + "C = C*10**-6 #capacitance(farad)\n", + "W = (C*V**2)/2 #energy stored in capacitor(J)\n", + "C0 = C/epsilon_r #capacitance removing the dielectric\n", + "W0 = C0*(V**2)/2 #energy stored without dielectric(J)\n", + "E = 1-W0 #energy stored in dielectric(J)\n", + "\n", + "#Result\n", + "print \"energy stored in capacitor is\",W,\"J\"\n", + "print \"energy stored in the dielectric is\",E,\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy stored in capacitor is 1.0 J\n", + "energy stored in the dielectric is 0.99 J\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.2, Page number 6.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r = 4.94\n", + "n_2 = 2.69 #square of index of refraction\n", + "alpha_i = 0 #at optical frequencies\n", + "\n", + "#Calculation\n", + "#(epsilon_r-1)/(epsilon_r+2) = N*(alpha_e+alpha_i)/(3*epsilon0)\n", + "X = (epsilon_r-1)/(epsilon_r+2)\n", + "#epsilon_r = n**2. therefore (n**2-1)/(n**2+2) = N*alpha_e/(3*epsilon0)\n", + "Y = (n_2-1)/(n_2+2)\n", + "#N*(alpha_e+alpha_i)/N*alpha_e = X/Y\n", + "#let alpha = alpha_i/alpha_e\n", + "alphai_e = (X/Y)-1 #ratio between electronic ionic and electronic polarizability\n", + "alphai_e = math.ceil(alphai_e*10**4)/10**4 #rounding off to 4 decimals\n", + "alphae_i = 1/alphai_e #ratio between electronic and ionic polarizability\n", + "alphae_i = math.ceil(alphae_i*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"ratio between electronic ionic and electronic polarizability is\",alphai_e\n", + "print \"ratio between electronic and ionic polarizability is\",alphae_i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio between electronic ionic and electronic polarizability is 0.5756\n", + "ratio between electronic and ionic polarizability is 1.738\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.3, Page number 6.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r = 2.56\n", + "tan_delta = 0.7*10**-4\n", + "f = 1 #frequency(MHz)\n", + "A = 8 #area(cm**2)\n", + "d = 0.08 #diameter(mm)\n", + "epsilon0 = 8.85*10**-12\n", + "\n", + "#Calculation\n", + "A = A*10**-4 #area(m**2)\n", + "d = d*10**-3 #diameter(m)\n", + "epsilon_rdash = epsilon_r*tan_delta\n", + "omega = 2*math.pi*10**6\n", + "Rp = d/(omega*epsilon0*epsilon_rdash*A) #parallel loss resistance(ohm)\n", + "Rp = Rp*10**-6 #parallel loss resistance(Mega ohm)\n", + "Rp = math.ceil(Rp*10**3)/10**3 #rounding off to 3 decimals\n", + "Cp = A*epsilon0*epsilon_r/d #capacitance(farad)\n", + "\n", + "#Result\n", + "print \"parallel loss resistance is\",Rp,\"ohm\"\n", + "print \"capacitance in Farad is\",Cp,\"Farad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "parallel loss resistance is 10.036 ohm\n", + "capacitance in Farad is 2.2656e-10 Farad\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.4, Page number 6.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N = 3*10**28 #density(atoms/m**3)\n", + "alpha_e = 10**-40 #electronic polarizability(Farad-m**2)\n", + "epsilon0 = 8.854*10**-12\n", + "\n", + "#Calculation\n", + "epsilon_r = 1+(N*alpha_e/epsilon0) #dielectric constant of material\n", + "epsilon_r = math.ceil(epsilon_r*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"dielectric constant of material is\",epsilon_r " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dielectric constant of material is 1.339\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.5, Page number 6.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0 = 8.854*10**-12\n", + "epsilon_r = 1.0000684 #dielectric constant\n", + "N = 2.7*10**25 #density(atoms/m**3)\n", + "\n", + "#Calculation\n", + "alpha_e = epsilon0*(epsilon_r-1)/N #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alpha_e/1e-41,3),\"*10^-41 Fm**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electronic polarizability is 2.243 *10^-41 Fm**2\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.6, Page number 6.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0 = 8.85*10**-12\n", + "V = 100 #potential(V)\n", + "A = 100 #area(cm**2)\n", + "d = 1 #plate seperation(cm)\n", + "\n", + "#Calculation\n", + "A = A*10**-4 #area(m**2)\n", + "d = d*10**-2 #plate seperation(m)\n", + "C = epsilon0*A/d #capacitance(farad)\n", + "Q = C*V #charge on plates\n", + "\n", + "#Result\n", + "print \"capacitance of capacitor is\",C,\"F\"\n", + "print \"charge on plates in coulomb is\",Q,\"coulomb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance of capacitor is 8.85e-12 F\n", + "charge on plates in coulomb is 8.85e-10 coulomb\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.7, Page number 6.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N = 6.02*10**26 #avagadro number\n", + "d = 2050 #density(kg/m**3)\n", + "AW = 32 #atomic weight of sulphur\n", + "epsilon_r = 3.75 #relative dielectric constant\n", + "epsilon0 = 8.55*10**-12\n", + "\n", + "#Calculation\n", + "n = N*d/AW #number of atoms(per m**3)\n", + "alpha_e = ((epsilon_r-1)/(epsilon_r+2))*3*epsilon0/n #electronic polarizability(Fm**2) \n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alpha_e/1e-40,3),\"*10^-40 Fm**2\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electronic polarizability is 3.181 *10^-40 Fm**2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.8, Page number 6.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Q = 2*10**-10 #charge(coulomb)\n", + "d = 4 #plate seperation(mm)\n", + "epsilon_r = 3.5 #dielectric constant\n", + "A = 650 #area(mm**2)\n", + "epsilon0 = 8.85*10**-12\n", + "\n", + "#Calculation\n", + "d = d*10**-3 #plate seperation(m)\n", + "A = A*10**-6 #area(m**2)\n", + "V = Q*d/(epsilon0*epsilon_r*A) #voltage across capacitors(V)\n", + "V = math.ceil(V*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"resultant voltage across capacitors is\",V,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resultant voltage across capacitors is 39.735 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 6.9, Page number 6.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 10 #potential(V)\n", + "d = 2*10**-3 #plate seperation(m)\n", + "epsilon_r = 6\n", + "epsilon0 = 8.85*10**-12\n", + "\n", + "#Calculation\n", + "E = V/d #electric field(V/m)\n", + "D = epsilon0*epsilon_r*E #dielectric displacement(C/m**2)\n", + "\n", + "#Result\n", + "print \"dielectric displacement is\",D,\"Cm^-2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dielectric displacement is 2.655e-07 Cm^-2\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb new file mode 100755 index 00000000..e3eb080f --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb @@ -0,0 +1,465 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1ba9d8e44f464fdd4be85263413cd33050741f89efba47984e88555948ca8361" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "7: Magnetic Properties" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.1, Page number 7.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M = 1.4 #field(T)\n", + "H = 6.5*10**-4 #magnetic field(T)\n", + "\n", + "#Calculation\n", + "chi = M/H #susceptibility\n", + "mew_r = 1+chi #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability of iron is\",round(mew_r)\n", + "print \"answer given in the book is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permeability of iron is 2155.0\n", + "answer given in the book is wrong\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.2, Page number 7.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M = 3300 #magnetisation(amp/m)\n", + "H = 220 #field strength(amp/m)\n", + "\n", + "#Calculation\n", + "mew_r = (M/H)+1 #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability of material is\",mew_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permeability of material is 16.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.3, Page number 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H = 10**6 #magnetic field intensity(amp/m)\n", + "chi = 1.5*10**-3 #susceptibility\n", + "\n", + "#Calculation\n", + "mew0 = 4*math.pi*10**-7\n", + "M = chi*H #magnetisation(A/m)\n", + "B = mew0*(M+H) #flux density(T)\n", + "M = M*10**-3\n", + "B = math.ceil(B*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M,\"*10**3 A/m\"\n", + "print \"flux density is\",B,\"T\"\n", + "print \"answer for flux density B given in the book is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetisation of material is 1.5 *10**3 A/m\n", + "flux density is 1.259 T\n", + "answer for flux density B given in the book is wrong\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.4, Page number 7.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H = 10**4 #magnetic field intensity(amp/m)\n", + "chi = 3.7*10**-3 #susceptibility\n", + "\n", + "#Calculation\n", + "mew0 = 4*math.pi*10**-7\n", + "M = chi*H #magnetisation(A/m)\n", + "B = mew0*(M+H) #flux density(Wb/m**2)\n", + "B = math.ceil(B*10**5)/10**5 #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M,\"A/m\"\n", + "print \"flux density is\",B,\"Wb/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetisation of material is 37.0 A/m\n", + "flux density is 0.01262 Wb/m**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.5, Page number 7.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I = 500 #current(mA)\n", + "d = 10 #diameter(cm)\n", + "\n", + "#Calculation\n", + "I = I*10**-3 #current(A)\n", + "r = d/2 #radius(cm)\n", + "r = r*10**-2 #radius(m)\n", + "A = 2*math.pi*r**2 #area(m**2)\n", + "mew_m = I*A #magnetic moment(Am**2)\n", + "mew_m = mew_m*10**3\n", + "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"magnetic moment associated with the loop is\",mew_m,\"*10**-3 Am**2\"\n", + "print \"answer given in the book is wrong in the 3rd decimal\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetic moment associated with the loop is 7.854 *10**-3 Am**2\n", + "answer given in the book is wrong in the 3rd decimal\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.6, Page number 7.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r = 5.29*10**-11 #radius of orbit(m)\n", + "B = 2 #field applied(T)\n", + "e = 1.602*10**-19 #charge of electron(coulomb)\n", + "m = 9.108*10**-31 #mass of electron(kg)\n", + "\n", + "#Calculation\n", + "mew_ind = e**2*r**2*B/(4*m) #change in magnetic moment(Am^2)\n", + "\n", + "#Result\n", + "print \"change in magnetic moment is\",round(mew_ind/1e-29,3),\"*10^-29 Am**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in magnetic moment is 3.943 *10^-29 Am**2\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.7, Page number 7.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi_1 = 2.8*10**-4 #susceptibility\n", + "T1 = 350 #temperature(K)\n", + "T2 = 300 #temperature(K)\n", + "\n", + "#Calculation\n", + "#chi = C/T where C is curie constant\n", + "chi_2 = chi_1*T1/T2 #susceptibility at 300 K\n", + "chi_2 = chi_2*10**4\n", + "chi_2 = math.ceil(chi_2*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"susceptibility at 300 K is\",chi_2,\"*10**-4\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "susceptibility at 300 K is 3.267 *10**-4\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.8, Page number 7.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d = 8906 #density(kg/m**3)\n", + "n = 6.025*10**26 #avagadro number\n", + "AW = 58.7 #atomic weight\n", + "Bs = 0.65 #magnetic induction(Wb/m**2)\n", + "mewB = 9.27*10**-24 \n", + "\n", + "#Calculation\n", + "N = d*n/AW #number of atoms(per m**3)\n", + "mew0 = 4*math.pi*10**-7\n", + "mew_m = Bs/(N*mew0) #magnetic moment(Am**2)\n", + "mew_m = mew_m/mewB #magnetic moment(mewB)\n", + "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"the magnetic moment of Ni is\",mew_m,\"mewB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the magnetic moment of Ni is 0.611 mewB\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.9, Page number 7.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H = 2 #magnetic field(Wb/m**2)\n", + "mew = 9.4*10**-24\n", + "k = 1.38*10**-23\n", + "\n", + "#Calculation\n", + "#np = C*n0*math.exp(mew*H/(k*T))\n", + "#na = C*n0*math.exp(-mew*H/(k*T))\n", + "#np/na = exp(mew*H/(k*T))/exp(-mew*H/(k*T)) = exp(2*mew*H/(k*T))\n", + "#given np/na = 2. therefore exp(2*mew*H/(k*T)) = 2\n", + "T = 2*mew*H/(k*math.log(2)) #temperature(K)\n", + "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"temperature is\",T,\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature is 3.94 K\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 7.10, Page number 7.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "AW = 157.26 #atomic weight\n", + "d = 7.8*10**3 #density(kg/m**3)\n", + "A = 6.025*10**26 #avagadro number\n", + "mew0 = 4*math.pi*10**-7\n", + "N = d*A/AW #number of atoms 1 kg contains\n", + "g = N/10**3 #number of atoms 1 g contains\n", + "mew_B = 7.1 #bohr magneton\n", + "mew_m = 9.27*10**-24\n", + "mew_mg = g*mew_B*mew_m #magnetic moment per gram(Am**2)\n", + "mew_mg = math.ceil(mew_mg*10**3)/10**3 #rounding off to 3 decimals\n", + "print \"magnetic moment per gram is\",mew_mg,\"Am**2\"\n", + "Bs = N*mew0*mew_m #saturation magnetisation(Wb/m**2)\n", + "Bs = math.ceil(Bs*10**4)/10**4 #rounding off to 4 decimals\n", + "print \"saturation magnetisation is\",Bs,\"Wb/m**2\"\n", + "print \"answers given in the book are wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetic moment per gram is 1966.852 Am**2\n", + "saturation magnetisation is 0.3482 Wb/m**2\n", + "answers given in the book are wrong\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb new file mode 100755 index 00000000..403a2566 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb @@ -0,0 +1,931 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:56ac13dd16475ea277515219c6087df27ecfe535e7f6298ab44a9065695ca2d8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + " 8: Semiconductors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.1, Page number 8.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni = 2.37*10**19; #intrinsic carrier density(per m^3)\n", + "mew_e = 0.38; #electron mobility(m^2/Vs)\n", + "mew_h = 0.18; #hole mobility(m^2/Vs)\n", + "e = 1.6*10**-19;\n", + "\n", + "#Calculation\n", + "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "rho = 1/sigma_i; #resistivity(ohm m)\n", + "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"resistivity is\",rho,\"ohm m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistivity is 0.471 ohm m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.2, Page number 8.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "Eg = 1.12; #band gap(eV)\n", + "k = 1.38*10**-23;\n", + "T = 300; #temperature(K)\n", + "e = 1.6*10**-19;\n", + "m0 = 1; #for simplicity assume value of m0 to be unity\n", + "\n", + "#Calculation\n", + "mh = 0.28*m0;\n", + "me = 0.12*m0;\n", + "EF = (Eg/2)+(3*k*T*np.log(mh/me)/(4*e)); #position of Fermi level(eV)\n", + "EF = math.ceil(EF*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"position of Fermi level is\",EF,\"eV from the top of valence band\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "position of Fermi level is 0.5765 eV from the top of valence band\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.3, Page number 8.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T = 300; #temperature(K)\n", + "e = 1.6*10**-19;\n", + "m = 9.109*10**-31; #mass of electron(kg)\n", + "k = 1.38*10**-23; #boltzmann's constant\n", + "h = 6.626*10**-34; #planck's constant\n", + "Eg = 0.7; #band gap(eV)\n", + "\n", + "#Calculation\n", + "Eg = Eg*e; #band gap(J)\n", + "A = (2*math.pi*m*k*T/h**2)**(3/2);\n", + "B = math.exp(-Eg/(2*k*T));\n", + "ni = 2*A*B; #concentration of intrinsic charge carriers per m^3\n", + "\n", + "#Result\n", + "print \"concentration of intrinsic charge carriers is\",round(ni/1e+19,3),\"*10^19 per m^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "concentration of intrinsic charge carriers is 3.348 *10^19 per m^3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.4, Page number 8.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni = 2.4*10**19; #intrinsic carrier density(per m^3)\n", + "mew_e = 0.39; #electron mobility(m^2/Vs)\n", + "mew_h = 0.19; #hole mobility(m^2/Vs)\n", + "e = 1.6*10**-19;\n", + "\n", + "#Calculation\n", + "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "rho = 1/sigma_i; #resistivity(ohm m)\n", + "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"resistivity is\",rho,\"ohm m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistivity is 0.449 ohm m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.5, Page number 8.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni = 2.5*10**19; #intrinsic carrier density(per m^3)\n", + "mew_e = 0.39; #electron mobility(m^2/Vs)\n", + "mew_h = 0.19; #hole mobility(m^2/Vs)\n", + "e = 1.6*10**-19;\n", + "w = 1; #width(mm)\n", + "t = 1; #thickness(mm)\n", + "l = 1; #length(cm)\n", + "\n", + "#Calculation\n", + "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "w = w*10**-3; #width(m)\n", + "t = t*10**-3; #thickness(m)\n", + "A = w*t; #area(m^2)\n", + "l = l*10**-2; #length(m)\n", + "R = l/(sigma_i*A); #resistivity(ohm m)\n", + "R = R/10**3;\n", + "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"resistance of intrinsic Ge rod is\",R,\"*10^3 ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance of intrinsic Ge rod is 4.311 *10^3 ohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.6, Page number 8.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m = 9.109*10**-31; #mass of electron(kg)\n", + "k = 1.38*10**-23; #boltzmann constant\n", + "h = 6.626*10**-34; #planck's constant\n", + "T = 300; #temperature(K)\n", + "kT = 0.026;\n", + "e = 1.6*10**-19;\n", + "Eg = 1.1; #energy gap(eV)\n", + "mew_e = 0.48; #electron mobility(m^2/Vs)\n", + "mew_h = 0.013; #hole mobility(m^2/Vs)\n", + "\n", + "#Calculation\n", + "C = 2*(2*math.pi*m*k/h**2)**(3/2);\n", + "ni = C*(T**(3/2))*math.exp(-Eg/(2*kT)); #intrinsic carrier density per m^3\n", + "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "sigma_i = sigma_i*10**3;\n", + "sigma_i = math.ceil(sigma_i*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma_i,\"*10**-3 ohm-1 m-1\"\n", + "print \"answer given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity is 1.286 *10**-3 ohm-1 m-1\n", + "answer given in the book differs due to rounding off errors\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.7, Page number 8.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m = 9.109*10**-31; #mass of electron(kg)\n", + "k = 1.38*10**-23; #boltzmann constant\n", + "h = 6.626*10**-34; #planck's constant\n", + "T = 300; #temperature(K)\n", + "e = 1.6*10**-19;\n", + "Eg = 0.7; #energy gap(eV)\n", + "mew_e = 0.4; #electron mobility(m^2/Vs)\n", + "mew_h = 0.2; #hole mobility(m^2/Vs)\n", + "\n", + "#Calculation\n", + "ni = 2*(2*math.pi*m*k*T/h**2)**(3/2)*math.exp(-Eg*e/(2*k*T)); #intrinsic carrier density per m^3\n", + "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "sigma = math.ceil(sigma*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"intrinsic carrier density is\",round(ni/1e+19,2),\"*10^19 per m^3\"\n", + "print \"conductivity is\",sigma,\"ohm-1 m-1\"\n", + "print \"answer given in the book is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "intrinsic carrier density is 3.35 *10^19 per m^3\n", + "conductivity is 3.22 ohm-1 m-1\n", + "answer given in the book is wrong\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.8, Page number 8.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "rho = 2.12; #resistivity(ohm m)\n", + "e = 1.6*10**-19;\n", + "m = 9.109*10**-31; #mass of electron(kg)\n", + "k = 1.38*10**-23; #boltzmann constant\n", + "h = 6.626*10**-34; #planck's constant\n", + "mew_e = 0.36; #electron mobility(m^2/Vs)\n", + "mew_h = 0.17; #hole mobility(m^2/Vs)\n", + "T = 300; #temperature(K)\n", + "\n", + "#Calculation\n", + "sigma = 1/rho; #conductivity(ohm-1 m-1)\n", + "ni = sigma/(e*(mew_e+mew_h)); #intrinsic carrier density per m^3\n", + "C = 2*(2*math.pi*m*k/h**2)**(3/2);\n", + "#let exp(Eg/(2*k*T)) be a\n", + "a = (C*T**(3/2))/ni;\n", + "#Eg/(2*k*T) = log(a) and Eg = 2*k*T*log(a)\n", + "Eg = 2*k*T*np.log(a)/e; #forbidden energy gap(eV)\n", + "Eg = math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"forbidden energy gap is\",Eg,\"eV\"\n", + "print \"answer given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "forbidden energy gap is 0.793 eV\n", + "answer given in the book differs due to rounding off errors\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.9, Page number 8.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "rho_2 = 4.5; #resistivity at 20C\n", + "rho_1 = 2; #resistivity at 32C\n", + "T1 = 20; #temperature(C)\n", + "T2 = 32; #temperature(C)\n", + "k = 8.616*10**-5;\n", + "\n", + "#Calculation\n", + "T1 = T1+273; #temperature(K)\n", + "T2 = T2+273; #temperature(K)\n", + "dy = np.log10(rho_2)-np.log10(rho_1);\n", + "dx = (1/T1)-(1/T2);\n", + "Eg = 2*k*dy/dx; #energy band gap(eV)\n", + "Eg = math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"energy band gap is\",Eg,\"eV\"\n", + "print \"answer given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy band gap is 0.452 eV\n", + "answer given in the book differs due to rounding off errors\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.10, Page number 8.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "Eg = 1; #band gap(eV)\n", + "e = 1.602*10**-19;\n", + "me = 1; #for simplicity assume me to be unity\n", + "E_Ef = 10/100; #fermi level shift(eV)\n", + "k = 1.38*10**-23; #boltzmann constant\n", + "\n", + "#Calculation\n", + "Eg = Eg*e; #band gap(J)\n", + "mh = 4*me; #effective mass of holes is 4 times of electrons\n", + "E_Ef = E_Ef*e; #fermi level shift(J)\n", + "#E_Ef = 3*k*T*np.log(mh/me)/4\n", + "T = 4*E_Ef/(3*k*np.log(mh/me)); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",int(T),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature is 1116 K\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.11, Page number 8.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Na = 5*10**23; #atoms of boron\n", + "Nd = 3*10**23; #arsenic atoms\n", + "ni = 2*10**16; #intrinsic charge carriers per m^3\n", + "\n", + "#Calculation\n", + "p = 2*(Na-Nd)/2; #hole concentration per m^3\n", + "n = ni**2/p; #electron concentration per m^3\n", + "n = n/10**9;\n", + "\n", + "#Result\n", + "print \"electron concentration is\",int(n),\"*10**9 per m^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electron concentration is 2 *10**9 per m^3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.12, Page number 8.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni = 1.5*10**16; #intrinsic charge carriers per m^3\n", + "e = 1.6*10**-19;\n", + "mew_e = 0.13; #electron mobility(m^2/Vs)\n", + "mew_h = 0.05; #hole mobility(m^2/Vs)\n", + "AW = 28.1; #atomic weight of Si(kg)\n", + "d = 2.33*10**3; #density of Si(kg/m^3)\n", + "N = 6.02*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "sigma = sigma*10**3;\n", + "Nd = d*N/AW; #impurity atoms per m^3\n", + "Nd = Nd/10**8; #extent of 10^8 Si atoms\n", + "p = ni**2/Nd; #hole concentration per m^3\n", + "sigma_ex = Nd*e*mew_e; #conductivity(ohm-1 m-1)\n", + "sigma_ex = math.ceil(sigma_ex*10**3)/10**3; #rounding off to 3 decimals\n", + "Na = Nd;\n", + "n = ni**2/Na; #electron concentration per m^3\n", + "sigma_EX = Na*e*mew_h; #conductivity(ohm-1 m-1)\n", + "sigma_EX = math.ceil(sigma_EX*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma,\"*10^-3 ohm-1 m-1\"\n", + "print \"conductivity if donor type impurity is added is\",sigma_ex,\"ohm-1 m-1\"\n", + "print \"conductivity if acceptor type impurity is added is\",sigma_EX,\"ohm-1 m-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity is 0.432 *10^-3 ohm-1 m-1\n", + "conductivity if donor type impurity is added is 10.383 ohm-1 m-1\n", + "conductivity if acceptor type impurity is added is 3.994 ohm-1 m-1\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.13, Page number 8.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "ni = 1.5*10**16; #intrinsic charge carriers per m^3\n", + "e = 1.6*10**-19;\n", + "mew_e = 0.135; #electron mobility(m^2/Vs)\n", + "mew_h = 0.048; #hole mobility(m^2/Vs)\n", + "Nd = 10**23; #phosphorus atoms per m^3\n", + "k = 1.38*10**-23; #boltzmann constant\n", + "T = 300; #temperature(K)\n", + "\n", + "#Calculation\n", + "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "sigma = sigma*10**3;\n", + "p = (ni**2)/Nd; #hole concentration per m^3\n", + "p = p/10**9;\n", + "sigma_ex = Nd*e*mew_e; #conductivity(ohm-1 m-1)\n", + "#EF = (Eg/2)+(3*k*T*log(mew_e/mew_h)/4)\n", + "X = 3*k*T*np.log(mew_e/mew_h)/(4*e);\n", + "X = math.ceil(X*10**3)/10**3; #rounding off to 3 decimals\n", + "#EF = (Eg/2)+X\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma,\"*10^-3 ohm-1 m-1\"\n", + "print \"hole concentration is\",p,\"*10**9 per m^3\"\n", + "print \"answer for hole concentration given in the book is wrong\"\n", + "print \"EF = Eg/2 + \",X\n", + "print \"Fermi level will be positioned at \",X,\"eV above intrinsic level\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity is 0.4392 *10^-3 ohm-1 m-1\n", + "hole concentration is 2.25 *10**9 per m^3\n", + "answer for hole concentration given in the book is wrong\n", + "EF = Eg/2 + 0.021\n", + "Fermi level will be positioned at 0.021 eV above intrinsic level\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.14, Page number 8.36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew_e = 0.19; #electron mobility(m^2/Vs)\n", + "k = 1.38*10**-23; #boltzmann constant\n", + "T = 300; #temperature(K)\n", + "e = 1.6*10**-19;\n", + "\n", + "#Calculation\n", + "Dn = mew_e*k*T/e; #diffusion coefficient(m^2/s)\n", + "Dn = Dn*10**4;\n", + "Dn = math.ceil(Dn*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"diffusion coefficient of electrons is\",Dn,\"*10^-4 m^2/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diffusion coefficient of electrons is 49.17 *10^-4 m^2/s\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.15, Page number 8.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH = 3.66*10**-4; #Hall coefficient(m^3/coulomb)\n", + "I = 10**-2; #current(amp)\n", + "B = 0.5; #magnetic field(Wb/m^2)\n", + "t = 1; #thickness(mm)\n", + "\n", + "#Calculation\n", + "t = t*10**-3; #thickness(m)\n", + "VH = RH*I*B/t; #Hall voltage(V)\n", + "VH = VH*10**3; #Hall voltage(mV)\n", + "\n", + "#Result\n", + "print \"Hall voltage developed is\",VH,\"mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage developed is 1.83 mV\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.16, Page number 8.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vy = 37; #voltage(micro-V)\n", + "t = 1; #thickness(mm)\n", + "Bz = 0.5; #flux density(Wb/m^2)\n", + "Ix = 20; #current(mA)\n", + "\n", + "#Calculation\n", + "Vy = Vy*10**-6; #voltage(V)\n", + "t = t*10**-3; #thickness(m)\n", + "Ix = Ix*10**-3; #current(A)\n", + "RH = Vy*t/(Ix*Bz); #Hall coefficient(C-1 m^3)\n", + "\n", + "#Result\n", + "print \"Hall coefficient of semiconductor is\",RH,\"C-1 m^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall coefficient of semiconductor is 3.7e-06 C-1 m^3\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.17, Page number 8.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH = -7.35*10**-5; #Hall coefficient(m^3/C)\n", + "e = 1.6*10**-19;\n", + "sigma = 200; #conductivity(ohm-1 m-1)\n", + "\n", + "#Calculation\n", + "n = -1/(RH*e); #density(m^3)\n", + "mew = sigma/(n*e); #mobility(m^2/Vs)\n", + "mew = mew*10**3;\n", + "\n", + "#Result\n", + "print \"density of charge carriers is\",round(n/1e+22,3),\"*10^22 m^3\"\n", + "print \"mobility of charge carriers is\",mew,\"*10^-3 m^2/Vs\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "density of charge carriers is 8.503 *10^22 m^3\n", + "mobility of charge carriers is 14.7 *10^-3 m^2/Vs\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.18, Page number 8.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I = 50; #current(A)\n", + "B = 1.5; #magnetic field(T)\n", + "e = 1.6*10**-19;\n", + "n = 8.4*10**28; #free electron concentration(electron/m^3)\n", + "t = 0.5; #thickness(cm)\n", + "\n", + "#Calculation\n", + "t = t*10**-2; #thickness(m)\n", + "VH = I*B/(n*e*t); #hall voltage(V)\n", + "VH = VH*10**6; #hall voltage(micro-V)\n", + "VH = math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"magnitude of Hall voltage is\",VH,\"micro-V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnitude of Hall voltage is 1.1161 micro-V\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 8.19, Page number 8.49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH = 3.66*10**-4; #Hall coefficient(m^3/C)\n", + "e = 1.6*10**-19;\n", + "rho_n = 8.93*10**-3; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "n = 1/(RH*e);\n", + "mew_e = RH/rho_n;\n", + "mew_e = math.ceil(mew_e*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"value of n is\",round(n/1e+22,3),\"*10^22 per m^3\"\n", + "print \"value of mew_e is\",mew_e,\"m^2/Vs\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of n is 1.708 *10^22 per m^3\n", + "value of mew_e is 0.041 m^2/Vs\n" + ] + } + ], + "prompt_number": 72 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb new file mode 100755 index 00000000..390fe9c5 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb @@ -0,0 +1,194 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c4f4158f2a13ac09e07abe135472c68abbdd09915f4866e5eedc3ddf9b9f42f5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "9: Superconductivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 9.1, Page number 9.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc = 3.7 #critical temperature(K)\n", + "Hc_0 = 0.0306 #critical field(T)\n", + "T = 2 #temperature(K)\n", + "\n", + "#Calculation\n", + "Hc_2 = Hc_0*(1-(T/Tc)**2) #critical field(T)\n", + "Hc_2 = math.ceil(Hc_2*10**5)/10**5 #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print \"critical field at 2K is\",Hc_2,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical field at 2K is 0.02166 T\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 9.2, Page number 9.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T = 4.2 #temperature(K)\n", + "d = 1 #diameter(mm)\n", + "Tc = 7.18 #critical temperature(K)\n", + "H0 = 6.5*10**4 #critical field(A/m)\n", + "\n", + "#Calculation\n", + "d = d*10**-3 #diameter(m)\n", + "Hc = H0*(1-((T/Tc)**2)) #critical field at 2K(A/m)\n", + "ic = math.pi*d*round(Hc); #critical current(A)\n", + "ic = math.ceil(ic*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"critical current for lead is\",ic,\"A\"\n", + "print \"answer given in the book differs due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical current for lead is 134.34 A\n", + "answer given in the book is wrong\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 9.3, Page number 9.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda_T = 750 #penetration depth of mercury(Armstrong)\n", + "T = 3.5 #temperature(K)\n", + "Tc = 4.12 #critical temperarure(K)\n", + "\n", + "#Calculation\n", + "lamda_0 = lamda_T*((1-(T/Tc)**4))**(1/2) #penetration depth(Armstrong)\n", + "\n", + "#Result\n", + "print \"penetration depth at 0K is\",int(lamda_0),\"armstrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "penetration depth at 0K is 519 armstrong\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 9.4, Page number 9.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1 = 3 #temperature(K)\n", + "T2 = 7.1 #temperature(K)\n", + "lamda_T1 = 396 #penetration depth(armstrong)\n", + "lamda_T2 = 1730 #penetration depth(armstrong)\n", + "\n", + "#Calculation\n", + "A = (((lamda_T2/lamda_T1)**2)*T2**4) - T1**4\n", + "B = ((lamda_T2/lamda_T1)**2)-1\n", + "Tc = (A/B)**(1/4) #critical temperature(K)\n", + "Tc = math.ceil(Tc*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print \"critical temperature for lead is\",Tc,\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical temperature for lead is 7.1932 K\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png new file mode 100755 index 00000000..b6b640be Binary files /dev/null and b/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png differ diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png new file mode 100755 index 00000000..c7b40e60 Binary files /dev/null and b/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png differ diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png new file mode 100755 index 00000000..0dad4227 Binary files /dev/null and b/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png differ diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png new file mode 100755 index 00000000..4344b1fb Binary files /dev/null and b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png differ diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png new file mode 100755 index 00000000..fb45c423 Binary files /dev/null and b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png differ diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png new file mode 100755 index 00000000..e9c7ee3a Binary files /dev/null and b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png differ diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png old mode 100644 new mode 100755 diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png old mode 100644 new mode 100755 diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png old mode 100644 new mode 100755 diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt new file mode 100755 index 00000000..f81bf842 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt @@ -0,0 +1,10 @@ +Contributed By: Vaibhav Shah +Course: mca +College/Institute/Organization: IIT +Department/Designation: Developer +Book Title: Basics of Electrical, Electronics and Communication Engineering +Author: N. Storey, E. Hughes and W. Tomasi +Publisher: Pearson, India +Year of publication: 2010 +Isbn: 978-81-317-3201-4 +Edition: 1 \ No newline at end of file diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png old mode 100644 new mode 100755 diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png old mode 100644 new mode 100755 diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter1.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter1.ipynb deleted file mode 100755 index 5c25ef5d..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter1.ipynb +++ /dev/null @@ -1,117 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ed1073b28a905078eb23296522b8b59bf416e5275a011e43147248d1acd57f5a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1 GETTING STARTED WITH C PROGRAMMING" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.1, Page No. 6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"C you later\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "C you later\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2, Page No. 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"Chapter 1. Getting Started with C programming\"\n", - "print \"This is an example of format bug.\"\n", - "print \"The format issue can be corrected by using\"\n", - "print \"the \\n and \\\\ escape sequnece\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Chapter 1. Getting Started with C programming\n", - "This is an example of format bug.\n", - "The format issue can be corrected by using\n", - "the \n", - " and \\ escape sequnece\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exmaple 1.3, Page No. 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"Chapter 1. Getting Started with C programming\"\n", - "print \"This is an example of format bug.\"\n", - "print \"The format issue can be corrected by using\"\n", - "print \"the \\\\n and \\\\\\\\ escape sequnece\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Chapter 1. Getting Started with C programming\n", - "This is an example of format bug.\n", - "The format issue can be corrected by using\n", - "the \\n and \\\\ escape sequnece\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter10.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter10.ipynb deleted file mode 100755 index c2e52854..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter10.ipynb +++ /dev/null @@ -1,362 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:af2735a34ebb2cb3c8a379aacf70cb46d8ee4a8ed09afacd9b5d0d21e0a0dd5a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 : Dynamic Memory Allocation" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1, Page No 229" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "class employee:\n", - " def __init__(self,id1,name,salary):\n", - " self.id1 = id1\n", - " self.name = name\n", - " self.salary = salary\n", - "e = employee(10,\"abc\",12000.02)\n", - "x = 1\n", - "f = 1.1\n", - "d = 1111.11\n", - "c = 'C'\n", - "print \"Sizo of integer : \" + str(sys.getsizeof(x)) + \"bytes \\n\"\n", - "print \"Sizo of float : \" + str(sys.getsizeof(f)) + \"bytes \\n\"\n", - "print \"Sizo of double : \" + str(sys.getsizeof(d)) + \"bytes \\n\"\n", - "print \"Sizo of char : \" + str(sys.getsizeof(c)) + \"bytes \\n\"\n", - "print \"Sizo of employee structure : \" + str(sys.getsizeof(e)) + \"bytes \\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sizo of integer : 24bytes \n", - "\n", - "Sizo of float : 24bytes \n", - "\n", - "Sizo of double : 24bytes \n", - "\n", - "Sizo of char : 34bytes \n", - "\n", - "Sizo of employee structure : 64bytes \n", - "\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2, Page No 230" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "array = []\n", - "\n", - "print \"\\nSize of array: \" + str(sys.getsizeof(array)) + \"bytes\\n\"\n", - "print \"Number of elements in array \"\n", - "print str(sys.getsizeof(array) / sys.getsizeof(int)) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Size of array: 64bytes\n", - "\n", - "Number of elements in array \n", - "0\n", - "\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.3, Page No 231" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4, Page No 232" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5, Page No 232" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.6, Page No 233" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function\n", - "#if name is None:\n", - "# print \"\\nOut of memory!\\n\"\n", - "#else:\n", - "# print \"\\nMemory allocated.\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.7, Page No 234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function\n", - "#if name is not None:\n", - "# name = raw_input(\"Enter your name: \")\n", - "# print \"\\nHi \" + name + \"\\n\" " - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.8, Page No 235" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function\n", - "#if name is not None:\n", - "# name = raw_input(\"Enter your name: \")\n", - "# print \"\\nHi \" + name + \"\\n\"\n", - "# del name" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.9, Page No 236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function\n", - "#if numbers is None:\n", - "# return\n", - "#numbers[0] = 100\n", - "#numbers[1] = 200\n", - "#numbers[2] = 300\n", - "#numbers[3] = 400\n", - "#numbers[4] = 500\n", - "#print \"\\nIndividual memory segments initialized to:\\n\"\n", - "#for x in range(5):\n", - "# print \"numbers[\" +x+\"] = \\n\" + numbers[x]" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.10, Page No 237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no calloc function\n", - "#if numbers is None:\n", - "# return" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.11, Page No 239" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# there is no malloc function\n", - "#if numbers is None:\n", - "# print \"\\nOut of memory!\\n\"\n", - "# return\n", - "#else:\n", - "# number = newNumber\n", - "# for x in range(10):\n", - "# numbers[x] = x * 10\n", - "# print \"\\nExpanded memory:\\n\"\n", - "# for x in range(10):\n", - "# print \"numbers[\" +x+\"] = \\n\" + numbers[x]\n", - "# del number" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.12, Page No 241" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import random\n", - "# there is no calloc function\n", - "#time\n", - "#print \"\\nMath Quiz\\n\\n\"\n", - "#response = raw_input(\"Enter # of problems: \")\n", - "#if op1 is None || op2 is None || answer is None ||result is None:\n", - "# print \"\\nOut of Memory!\\n\"\n", - "# return\n", - "#for x in range(response):\n", - "# op1[x] = random.randint(1,200) % 100\n", - "# op2[x] = random.randint(1,200) % 100\n", - "# print \"\\n\" + op1[x] + \"+\" + op2[x]\"\n", - "# answer[x] = raw_input(\"\")\n", - "# if answer[x] == op1[x] + op2[x]:\n", - "# result[x] = 'c'\n", - "# else:\n", - "# result[x] = 'i'\n", - "#print \"\\nQuiz Results\\n\"\n", - "#print \"\\nQuestion\\tYour Answer\\tCorrect\\n\"\n", - "#for x in range(response):\n", - "# if result[x] == 'c':\n", - "# print op1[x] + \"+\" + op2[x] + \"\\t\\t\" + answer[x] + \"\\t\\tYes\\n\"\n", - "# else:\n", - "# print op1[x] + \"+\" + op2[x] + \"\\t\\t\" + answer[x] + \"\\t\\tNo\\n\"\n", - "#del op1\n", - "#del op2\n", - "#del answer\n", - "#del result " - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter11.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter11.ipynb deleted file mode 100755 index 239b6ca4..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter11.ipynb +++ /dev/null @@ -1,616 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:9d02541e3ea8d7af1efd977534b7150b993557acd6da8dc30b83dcacb798d681" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 : File Input and Output" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1, Page No 250" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "try:\n", - " pRead = open(\"file1.dat\",\"r\")\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - "\n", - "\"\"\"\n", - "Input file:- file1.dat\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2, Page No 252" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "try:\n", - " pRead = open(\"file1.dat\",\"r\")\n", - " if(not isinstance(pRead,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " print \"\\nFile opened for reading\\n\"\n", - " pRead.close()\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - "\n", - "\"\"\"\n", - "Input file:- file1.dat\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "File opened for reading\n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3, Page No 253" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "try:\n", - " pRead = open(\"names.dat\",\"r\")\n", - " if(not isinstance(pRead,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " print \"\\nContents of names.dat\\n\"\n", - " while(1):\n", - " t = pRead.readline() \n", - " if(t != \"\"):\n", - " print t\n", - " else:\n", - " break\n", - " pRead.close()\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - " \n", - "\"\"\" \n", - "Input File :- names.dat\n", - "\n", - "Michael\n", - "Sheila\n", - "Spencer\n", - "Olivia\n", - "\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents of names.dat\n", - "\n", - "Michael\n", - "\n", - "Sheila\n", - "\n", - "Spencer\n", - "\n", - "Olivia\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.4, Page No 255" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "try:\n", - " pRead = open(\"hobbies.dat\",\"r\")\n", - " if(not isinstance(pRead,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " print \"\\nName\\tHobby\\n\\n\"\n", - " while(1):\n", - " name = pRead.readline()\n", - " hobby = pRead.readline()\n", - " if(name != \"\"):\n", - " print name + \"\\t\"\n", - " print hobby\n", - " else:\n", - " break\n", - " pRead.close()\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - " \n", - "\"\"\"\n", - "Input file :- hobbies.dat\n", - "\n", - "Michael\tProgramming\n", - "Sheila\tShopping\n", - "Spencer\tFootball\n", - "Olivia\tDancing\n", - "Waytt\tEating\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name\tHobby\n", - "\n", - "\n", - "Michael\tProgramming\n", - "\t\n", - "Sheila\tShopping\n", - "\n", - "Spencer\tFootball\n", - "\t\n", - "Olivia\tDancing\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.5, Page No 256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "try:\n", - " pWrite = open(\"students.dat\",\"w\")\n", - " if(not isinstance(pWrite,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " fname = raw_input(\"Enter first name: \")\n", - " lname = raw_input(\"Enter last name: \")\n", - " id1 = raw_input(\"Enter id: \")\n", - " gpa = float(raw_input(\"Enter GPA: \"))\n", - " pWrite.writelines(fname + \" \" + lname + \"\\t\" + id1 + \"\\t\" + str(gpa))\n", - " pWrite.close()\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - "\n", - "\"\"\"\n", - "Output file:- students.dat\n", - "Patric Star\t888-66-9999\t2.0\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first name: Patric\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter last name: Star\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter id: 888-66-9999\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter GPA: 2.00\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.6, Page No 258" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "try:\n", - " pRead = open(\"students.dat\",\"r\")\n", - " if(not isinstance(pRead,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " print \"\\nName\\t\\tID\\t\\tGPA\\n\\n\"\n", - " while(1):\n", - " fname = pRead.read()\n", - " lname = pRead.read()\n", - " id1 = pRead.read()\n", - " gpa = pRead.read()\n", - " \n", - " if(fname != \"\"):\n", - " print fname + lname + \"\\t\\t\" + id1 + \"\\t\" + str(gpa)\n", - " else:\n", - " break\n", - " pRead.close()\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - "\n", - "\"\"\"\n", - "Input file:- students.dat\n", - "Patric Star\t888-66-9999\t2.0\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name\t\tID\t\tGPA\n", - "\n", - "\n", - "Patric Star\t888-66-9999\t2.0\t\t\t\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.7, Page No 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def readData():\n", - " try:\n", - " pRead = open(\"hobbies.dat\",\"r\")\n", - " if(not isinstance(pRead,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " print \"\\nName\\tHobby\\n\\n\"\n", - " while(1):\n", - " name = pRead.readline()\n", - " hobby = pRead.readline()\n", - " if(name != \"\"):\n", - " print name + \"\\t\"\n", - " print hobby\n", - " else:\n", - " break\n", - " pRead.close()\n", - " except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - "try:\n", - " print \"Current file contains\"\n", - " readData()\n", - " print \"\\n\"\n", - " name = raw_input(\"Enter a new name: \")\n", - " hobby = raw_input(\"Enter a new hobby: \")\n", - " pWrite = open(\"hobbies.dat\",\"a\")\n", - " if(not isinstance(pWrite,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " else:\n", - " pWrite.writelines(\"\\n\" + name + \"\\t\" + hobby)\n", - " pWrite.close()\n", - " readData()\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - " \n", - "\"\"\"\n", - "Input file and Output file:- hobbies.dat\n", - "Michael\tProgramming\n", - "Sheila\tShopping\n", - "Spencer\tFootball\n", - "Olivia\tDancing\n", - "Waytt\tEating\n", - "\"\"\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current file contains\n", - "\n", - "Name\tHobby\n", - "\n", - "\n", - "Michael\tProgramming\n", - "\t\n", - "Sheila\tShopping\n", - "\n", - "Spencer\tFootball\n", - "\t\n", - "Olivia\tDancing\n", - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a new name: Waytt\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a new hobby: Eating\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name\tHobby\n", - "\n", - "\n", - "Michael\tProgramming\n", - "\t\n", - "Sheila\tShopping\n", - "\n", - "Spencer\tFootball\n", - "\t\n", - "Olivia\tDancing\n", - "\n", - "Waytt\tEating\t\n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.8, Page No 263" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "try:\n", - " pRead = open(\"hobbies.dat\",\"r\")\n", - " if(not isinstance(pRead,file)):\n", - " print \"\\nFile can not be opened\\n\"\n", - " print \"The following error occurred\" #goto label\n", - " sys.exit(\"Some Error Occures\")\n", - " else:\n", - " print \"\\nName\\tHobby\\n\\n\"\n", - " while(1):\n", - " name = pRead.readline()\n", - " hobby = pRead.readline()\n", - " if(name != \"\"):\n", - " print name + \"\\t\"\n", - " print hobby\n", - " else:\n", - " break\n", - " pRead.close()\n", - " #sys.exit(\"Exit\")\n", - "except IOError:\n", - " print \"\\nFile can not be opened\\n\"\n", - "\n", - "\"\"\"\n", - "Input file:- hobbies.dat\n", - "Michael\tProgramming\n", - "Sheila\tShopping\n", - "Spencer\tFootball\n", - "Olivia\tDancing\n", - "Waytt\tEating\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name\tHobby\n", - "\n", - "\n", - "Michael\tProgramming\n", - "\t\n", - "Sheila\tShopping\n", - "\n", - "Spencer\tFootball\n", - "\t\n", - "Olivia\tDancing\n", - "\n", - "Waytt\tEating\t\n", - "\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.9, Page No 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"\\n\\tPhone Book\\n\"\n", - "print \"\\n 1 \\t Add phone book entry \\n\"\n", - "print \"2 \\t Print phone book \\n\\n\"\n", - "print \"Select an option: \"\n", - "response = int(raw_input(\"Select an option: \"))\n", - "print response\n", - "if(response == 1):\n", - " fname = raw_input(\"Enter first name: \")\n", - " lname = raw_input(\"Enter last name: \")\n", - " number = raw_input(\"Enter phone number: \")\n", - " pWrite = open(\"phone_book.dat\",\"a\")\n", - " if(isinstance(pWrite,file)):\n", - " pWrite.writelines(fname + \" \" + lname + \" \" + number + \"\\n\")\n", - " pWrite.close()\n", - " else:\n", - " print \"The error occured\" #go to\n", - "elif(response == 2):\n", - " pRead = open(\"phone_book.dat\",\"r\")\n", - " if(isinstance(pRead,file)):\n", - " while(1):\n", - " fname = pRead.read()\n", - " if(fname == \"\"):\n", - " break\n", - " lname = pRead.read()\n", - " number = pRead.read()\n", - " print fname\n", - " print lname\n", - " print number\n", - " print \"\\n\"\n", - " else:\n", - " print \"The error occured\" #go to\n", - "else:\n", - " print \"Invalid Selection\"\n", - "\n", - "\"\"\"\n", - "Input file and Output file:- phone_book.dat\n", - "John Smith 538.676.1234\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\tPhone Book\n", - "\n", - "\n", - " 1 \t Add phone book entry \n", - "\n", - "2 \t Print phone book \n", - "\n", - "\n", - "Select an option: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Select an option: 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n", - "John Smith 538.676.1234\n", - "\n", - "\n", - "\n", - "\n", - "\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter12.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter12.ipynb deleted file mode 100755 index 76d70f5c..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter12.ipynb +++ /dev/null @@ -1,445 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b5b5db464e530d21c4b695ff4bde6912d0e8c447d51f1ede515f161acac3856f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 : The C PreProcessor" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1, Page No 272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"\\nHaving fun with preprocessor directives\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Having fun with preprocessor directives\n", - "\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2, Page No 273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "NUMBER = 7\n", - "print \"\\nLucky Number \", NUMBER , \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Lucky Number 7 \n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.3, Page No 274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "NUMBER = 7\n", - "print \"\\nLucky Number \", NUMBER , \"\\n\"\n", - "NUMBER = 5" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Lucky Number 7 \n", - "\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.4, Page No 275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def area(l,w):\n", - " return l * w\n", - "length = 0\n", - "width = 0\n", - "length = int(raw_input(\"\\nEnter length: \"))\n", - "width = int(raw_input(\"\\nEnter width: \"))\n", - "print \"\\nArea of rectangle = \" , area(length,width) , \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter length: 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter width: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Area of rectangle = 84 \n", - "\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5, Page No 276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def RESULT(x,y):\n", - " print \"\\nResult is \\n\", x+y\n", - "num1 = 0\n", - "num2 = 0\n", - "num1 = int(raw_input(\"\\nEnter first number: \"))\n", - "num2 = int(raw_input(\"\\nEnter second number: \"))\n", - "RESULT(num1,num2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter first number: 27\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter second number: 44\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Result is \n", - "71\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.6, Page No 277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def RESULT(x,y):\n", - " print \"\\nResult is \\n\", x+y\n", - "operand1 = 0\n", - "operand2 = 0\n", - "operand1 = int(raw_input(\"\\nEnter first operand: \"))\n", - "operand2 = int(raw_input(\"\\nEnter second operand: \"))\n", - "RESULT(operand1,operand2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter first operand: 27\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter second operand: 44\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Result is \n", - "71\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.7, Page No 279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import profit\n", - "print \"\\nThe Profit Program\\n\"\n", - "price = float(raw_input(\"\\nEnter unit price: \"))\n", - "quantity = int(raw_input(\"Enter quantity sold: \"))\n", - "totalCost = float(raw_input(\"Enter total cost: \"))\n", - "profit1(price,quantity,totalCost)\n", - "\n", - "\"\"\"\n", - "Header file:- profit.py\n", - "def profit(p,q,tc):\n", - " print \"\\nYour profit is \",(p * q) - tc,\"\\n\"\n", - "\"\"\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The Profit Program\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter unit price: 12.99\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter quantity sold: 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter total cost: 56\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Your profit is 34.93 \n", - "\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.8, Page No 282" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import calculate\n", - "selection = 0\n", - "print \"\\n The Function Wizard \\n\"\n", - "print \"\\n1\\tDetermine perimeter of ractangle\\n\"\n", - "print \"\\n2\\tDetermine area of rectangle\\n\"\n", - "print \"\\n3\\tDetermine volume of rectangle\\n\"\n", - "selection = int(raw_input(\"\\nEnter selection : \"))\n", - "if selection == 1:\n", - " l = float(raw_input(\"Enter length: \"))\n", - " w = float(raw_input(\"Enter width: \"))\n", - " perimeter(l,w)\n", - "elif selection == 2:\n", - " l = float(raw_input(\"Enter length: \"))\n", - " w = float(raw_input(\"Enter width: \"))\n", - " area(l,w)\n", - "elif selection == 3:\n", - " l = float(raw_input(\"Enter length: \"))\n", - " w = float(raw_input(\"Enter width: \"))\n", - " h = float(raw_input(\"Enter height: \"))\n", - " volume(l,w,h)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " The Function Wizard \n", - "\n", - "\n", - "1\tDetermine perimeter of ractangle\n", - "\n", - "\n", - "2\tDetermine area of rectangle\n", - "\n", - "\n", - "3\tDetermine volume of rectangle\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter selection : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter length: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter width: 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter height: 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Perimeter is 6.0 \n", - "\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter2.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter2.ipynb deleted file mode 100755 index 2f3c44af..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter2.ipynb +++ /dev/null @@ -1,239 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:622f2c579033e8c66b476e16d61ce8bfa6745f6b87c5905b2064108fa5218b3c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 PRIMARY DATA TYPES" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, Page No. 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=-4443\n", - "y=554.21\n", - "c='M'\n", - "\n", - "print \"The value of integer variable x is\" , x\n", - "print \"The value of float variable y is \" , y\n", - "print \"The value of character variable c is \" , c" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of integer variable x is -4443\n", - "The value of float variable y is 554.21\n", - "The value of character variable c is M\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2, Page No. 36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x = 20\n", - "PI = 3.14\n", - "print \"Constant values are \",x ,\" and \", round(PI,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Constant values are 20 and 3.14\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3, Page No. 42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"\\t Adder Program, by Michael Vine\"\n", - "iOperand1=int(raw_input(\"Enter First Operand: \"))\n", - "iOperand2=int(raw_input(\"Enter Second Operand: \"))\n", - "print \"The final result is \", iOperand1+iOperand2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\t Adder Program, by Michael Vine\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter First Operand: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Second Operand: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The final result is 12\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4, Page No. 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"\\t Adder Program, by Michael Vine\"\n", - "iOperand1=int(raw_input(\"Enter First Operand: \"))\n", - "iOperand2=int(raw_input(\"Enter Second Operand: \"))\n", - "iResult=iOperand1+iOperand2\n", - "print \"The result is \", iResult" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\t Adder Program, by Michael Vine\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter First Operand: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Second Operand: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The result is 12\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5, Page No. 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "fRevenue=float(raw_input(\"Enter total revenue: \"))\n", - "fCost=float(raw_input(\"Enter total cost: \"))\n", - "print \"Your total profit is \", round(fRevenue-fCost,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter total revenue: 4000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter total cost: 750\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Your total profit is 3250.0\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter3.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter3.ipynb deleted file mode 100755 index a87e263b..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter3.ipynb +++ /dev/null @@ -1,499 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4698a1abef67d23e99c2eb6e9534a43d9d501d3ae6147f6ceb242f76f06f63a5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3 CONDITIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1, Page No. 58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"\\tAC Control Unit\"\n", - "print \"1\\tTurn the AC on\"\n", - "print \"2\\tTurn the AC off\"\n", - "iResponse=int(raw_input(\"Enter your selection::\"))\n", - "if iResponse==1:\n", - " print \"AC is now on\"\n", - "if iResponse==2:\n", - " print \"AC is now off\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\tAC Control Unit\n", - "1\tTurn the AC on\n", - "2\tTurn the AC off\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your selection::1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AC is now on\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2, Page No. 59" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"\\tAC Control Unit\"\n", - "print \"a\\tTurn the AC on\"\n", - "print \"b\\tTurn the AC off\"\n", - "cResponse=raw_input(\"Enter your selection::\")\n", - "if cResponse=='a':\n", - " print \"AC is now on\"\n", - "if cResponse=='b':\n", - " print \"AC is now off\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\tAC Control Unit\n", - "a\tTurn the AC on\n", - "b\tTurn the AC off\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your selection::b\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AC is now off\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3, Page No. 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "fBalance = 100.25\n", - "print \"\\tATM\"\n", - "print \"1\\tDeposit Funds\"\n", - "print \"2\\tWithdraw Funds\"\n", - "iSelection=int(raw_input(\"Enter Your Selection: \"))\n", - "if iSelection==1:\n", - " fTransAmount=int(raw_input(\"Enter fund amount to deposit: \"))\n", - " print \"Your new Balance is: \", fBalance+fTransAmount\n", - "if iSelection==2:\n", - " fTransAmount=int(raw_input(\"Enter fund amount to withdraw: \"))\n", - " if fTransAmout>fBalance:\n", - " print \"Insufficient Funds\"\n", - " else:\n", - " print \"Your new balance is \", fBalance-fTransAmount" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\tATM\n", - "1\tDeposit Funds\n", - "2\tWithdraw Funds\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Your Selection: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter fund amount to deposit: 200\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Your new Balance is: 300.25\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4, Page No. 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "cResponse=raw_input(\"Enter a letter A: \")\n", - "if cResponse=='A':\n", - " print \"Correct response\"\n", - "else:\n", - " print \"Incorrect response\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a letter A: a\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Incorrect response\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5, Page No.69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iResponse=int(raw_input(\"Enter a numeer from 1 to 10: \"))\n", - "if iResponse<1 or iResponse>10:\n", - " print \"Number not in Range\"\n", - "else:\n", - " print \"Thank You\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a numeer from 1 to 10: 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thank You\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, Page No. 70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "cResponse=raw_input(\"Please Enter a letter: \")\n", - "if not cResponse.isdigit():\n", - " print \"Thank You\"\n", - "else:\n", - " print \"You did not enter a letter\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please Enter a letter: 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You did not enter a letter\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7, Page No. 70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "cResponse=raw_input(\"Please Enter a letter: \")\n", - "if cResponse.isdigit():\n", - " print \"Thank You\"\n", - "else:\n", - " print \"You did not enter a digit\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please Enter a letter: a\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You did not enter a digit\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page No.72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print \"1\\tSports\"\n", - "print \"2\\tGeography\"\n", - "print \"3\\tMusic\"\n", - "print \"4\\tWorld Events\"\n", - "iResponse=int(raw_input(\"Please select a category (1-4): \"))\n", - "if iResponse==1:\n", - " print \"You selected sports questions\"\n", - "elif iResponse==2:\n", - " print \"You selected geography questions\"\n", - "elif iResponse==3:\n", - " print \"You selected Music questions\"\n", - "elif iResponse==4:\n", - " print \"You selected World event questions\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\tSports\n", - "2\tGeography\n", - "3\tMusic\n", - "4\tWorld Events\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please select a category (1-4): 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You selected World event questions\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9, Page No. 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import random\n", - "iRandomNum=(random.randint(0,100)%10)+1\n", - "iResponse=int(raw_input(\"Guess a number between 1 and 10: \"))\n", - "if iResponse==iRandomNum:\n", - " print \"You guessed right\"\n", - "else:\n", - " print \"Sorry, you guess wrong\"\n", - " print \"The correct guess was \",iRandomNum" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Guess a number between 1 and 10: 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorry, you guess wrong\n", - "The correct guess was 3\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10, Page No. 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import random\n", - "iRandomNum=(random.randint(0,100)%4)+1\n", - "print \"Fortune Cookie - Chapter 3\"\n", - "if iRandomNum==1:\n", - " print \"You will meet a new friend\"\n", - "elif iRandomNum==2:\n", - " print \"You will enjoy a long and happy life\"\n", - "elif iRandomNum==3:\n", - " print \"Opportunity knocks softly. Can you hear it?\"\n", - "elif iRandomNum==4:\n", - " print \"You'll be financially rewarded for your good deeds\"\n", - "\n", - "print \"Lucky lotto numbers\"\n", - "print (random.randint(0,100)%49+1)\n", - "print (random.randint(0,100)%49+1)\n", - "print (random.randint(0,100)%49+1)\n", - "print (random.randint(0,100)%49+1)\n", - "print (random.randint(0,100)%49+1)\n", - "print (random.randint(0,100)%49+1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fortune Cookie - Chapter 3\n", - "You will enjoy a long and happy life\n", - "Lucky lotto numbers\n", - "45\n", - "17\n", - "9\n", - "23\n", - "2\n", - "15\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter4.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter4.ipynb deleted file mode 100755 index 218595de..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter4.ipynb +++ /dev/null @@ -1,688 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d985967b3e8d0e583d78d0a3306851320f330cc48579a1f62da314746570750f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4 Looping Structures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1 , Page No.88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=0\n", - "print \"The value of x is \",x\n", - "x+=1\n", - "print \"The value of x is \",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is 0\n", - "The value of x is 1\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2, Page No.89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=0\n", - "y=0\n", - "print \"The value of y is \", y+1\n", - "print \"The value of x is \", x+1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of y is 1\n", - "The value of x is 1\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3, Page No.89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=0\n", - "y=1\n", - "x=(y)*2\n", - "print \"The Value of x \",x\n", - "x=0\n", - "y=1\n", - "x=(y+1)*2\n", - "print \"The Value of x \",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of x 2\n", - "The Value of x 4\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4, Page No.90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=0\n", - "y=0\n", - "x=(y)*4\n", - "print \"The Value of x\", x\n", - "y=0\n", - "x=(y+1)*4\n", - "print \"The Value of x\", x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of x 0\n", - "The Value of x 4\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5, Page No.92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=1\n", - "y=1\n", - "x=(y)*4\n", - "print \"The value of x is \",x\n", - "y=1\n", - "x=(y-1)*4\n", - "print \"The value of x is \",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is 4\n", - "The value of x is 0\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6, Page No. 93" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=1\n", - "y=2\n", - "x=y*x+1\n", - "print \"The value of x is: \",x\n", - "x=1\n", - "y=2\n", - "x+=y*x+1\n", - "print \"The value of x is: \",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is: 3\n", - "The value of x is: 4\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7, Page No.94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=1\n", - "y=2\n", - "x=y*x+1\n", - "print \"The value of x is: \",x\n", - "x=1\n", - "y=2\n", - "x-=y*x+1\n", - "print \"The value of x is: \",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is: 3\n", - "The value of x is: -2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.8, Page No.95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=0\n", - "while (x<10):\n", - " print \"The value of x is \",x\n", - " x=x+1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is 0\n", - "The value of x is 1\n", - "The value of x is 2\n", - "The value of x is 3\n", - "The value of x is 4\n", - "The value of x is 5\n", - "The value of x is 6\n", - "The value of x is 7\n", - "The value of x is 8\n", - "The value of x is 9\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9, Page No.97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iSelection=0\n", - "while (iSelection!=4):\n", - " print \"1\\tDeposit Funds\"\n", - " print \"2\\tWithdraw Funds\"\n", - " print \"3\\tPrint Balance\"\n", - " print \"4\\tQuit\"\n", - " iSelection=int(raw_input(\"Enter Your Selection(1-4): \"))\n", - "print \"Thank you\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\tDeposit Funds\n", - "2\tWithdraw Funds\n", - "3\tPrint Balance\n", - "4\tQuit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Your Selection(1-4): 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\tDeposit Funds\n", - "2\tWithdraw Funds\n", - "3\tPrint Balance\n", - "4\tQuit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Your Selection(1-4): 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thank you\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10, Page No.99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=9\n", - "while (x<10):\n", - " print \"This printf statement is executed at least once\"\n", - " x=x+1\n", - "while (x<10):\n", - " print \"This printf statement is never executed \"\n", - " x=x+1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This printf statement is executed at least once\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.11, Page No.100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "for x in range(10,5,-1):\n", - " print \"The value of x is \",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is 10\n", - "The value of x is 9\n", - "The value of x is 8\n", - "The value of x is 7\n", - "The value of x is 6\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12, Page No.101" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import random\n", - "iNumQuestions=int(raw_input(\"Enter the number of questions to ask: \"))\n", - "for x in range(iNumQuestions):\n", - " iRndNum1=(random.randint(0,100)%10)+1\n", - " iRndNum2=(random.randint(0,100)%10)+1\n", - " iResponse=int(raw_input(\"what is \"+ str(iRndNum1)+\" * \"+str(iRndNum2)+\" : \"))\n", - " if(iResponse==(iRndNum1*iRndNum2)):\n", - " print \"Correct\"\n", - " else:\n", - " print \"The Corrent answer was \", iRndNum1*iRndNum2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of questions to ask: 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "what is 6 * 9 : 54\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Correct\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "what is 8 * 5 : 32\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Corrent answer was 40\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.13, Page No.102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "for x in range(10,5,-1):\n", - " if x==7:\n", - " break\n", - "print x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14, Page No.103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "for x in range(10,5,-1):\n", - " if x==7:\n", - " continue\n", - " print x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n", - "9\n", - "8\n", - "6\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.15, Page No.104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "for x in range(25):\n", - " print \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.16, Page No. 106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import time\n", - "import random\n", - "import os\n", - "cYesNo=raw_input(\"Play a game of Concentration?(y or n)\")\n", - "if(cYesNo=='y' or cYesNo=='Y'):\n", - " i1=random.randint(0,100) % 100\n", - " i2=random.randint(0,100) % 100\n", - " i3=random.randint(0,100) % 100\n", - " print \"Concentrate on the next three numbers\\n\",i1,i2,i3\n", - " iCurrentTime=int(round(time.time()*1000))\n", - " iElapsedTime=int(round(time.time()*1000))\n", - " while((iCurrentTime-iElapsedTime)<3):\n", - " iElapsedTime=int(round(time.time()*1000))\n", - " os.system('cls')\n", - " iResp1=int(raw_input(\"Enter a number:\"))\n", - " iResp2=int(raw_input(\"Enter a number:\"))\n", - " iResp3=int(raw_input(\"Enter a number:\"))\n", - " \n", - " if(i1==iResp1 and i2==iResp2 and i3==iResp3):\n", - " print \"Congratulations!\"\n", - " else:\n", - " print \"Sorry, Correct numbers were \",i1,i2,i3" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Play a game of Concentration?(y or n)n\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter5.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter5.ipynb deleted file mode 100755 index ac86dba8..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter5.ipynb +++ /dev/null @@ -1,475 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:22dbf664bff583df60a7371a6f741be85c976f32fe9bef5f00f146ca5848d933" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5 : Structured Programming" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1, Page No 116" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def addTwoNumbers(operand1,operand2):\n", - " return operand1+operand2\n", - "\n", - "print \"Nothing happenning here\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Nothing happenning here\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2, Page No 118" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def addTwoNumbers(num1,num2):\n", - " return num1+num2\n", - "\n", - "def subtractTwoNumber(num1,num2):\n", - " return num1-num2\n", - "\n", - "print \"Nothing happenning here\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Nothing happenning here\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3, Page No 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def addTwoNumbers(operand1,operand2):\n", - " return operand1+operand2\n", - "\n", - "\n", - "iResult= addTwoNumbers(5,5)" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4, Page No 120" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def addTwoNumbers(operand1,operand2):\n", - " return operand1+operand2\n", - "\n", - "print \"The result is : \",addTwoNumbers(5,5)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The result is : 10\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5, Page No 120" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def addTwoNumbers(operand1,operand2):\n", - " return operand1+operand2\n", - "\n", - "num1=int(raw_input(\"Enter the first number: \"))\n", - "num2=int(raw_input(\"Enter the second number: \"))\n", - "print \"The result is: \",addTwoNumbers(num1,num2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the first number: 57\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the second number: 43\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The result is: 100\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6, Page No 121" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def printReportHeader():\n", - " print \"\\n Column1 \\t Column2 \\t Column3 \\t Column4 \\n\"\n", - " \n", - "printReportHeader()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Column1 \t Column2 \t Column3 \t Column4 \n", - "\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7, Page No 122" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "num1=int(raw_input(\"Enter a number: \"))\n", - "print \"You entered \",num1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You entered 10\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8, Page No 123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def getSecondNumber():\n", - " num1=int(raw_input(\"Enter Second number: \"))\n", - " return num1\n", - "\n", - "num1=int(raw_input(\"Enter a number: \"))\n", - "num2=getSecondNumber()\n", - "print \"you entered \"+str(num1)+\" and \",str(num2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 28\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Second number: 35\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "you entered 28 and 35\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9, Page No 124" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iLuckyNumber=int()\n", - "def printLuckyNumber():\n", - " print \"Your lucky number is: \",iLuckyNumber\n", - "\n", - "\n", - "iLuckyNumber=int(raw_input(\"Enter your lucky number: \"))\n", - "printLuckyNumber()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your lucky number: 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Your lucky number is: 10\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10, Page No 126" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import os\n", - "import time\n", - "def sportsQuestion():\n", - " print \"Sports Question\"\n", - " print \"What University did NFL star Deon Sanders attend?\"\n", - " print \"1 \\t University of Miami\"\n", - " print \"2 \\t California State University\"\n", - " print \"3 \\t Indiana University\"\n", - " print \"4 \\t Florida State University\"\n", - " iAnswer=int(raw_input(\"Enter your selection :\"))\n", - " return iAnswer\n", - "\n", - "def geographyQuestion():\n", - " print \"Geography Question\"\n", - " print \"What is the state capitol of Florida?\"\n", - " print \"1 \\t Pensecola\"\n", - " print \"2 \\t Tallahassee\"\n", - " print \"3 \\t Jacksonville\"\n", - " print \"4 \\t Miami\"\n", - " iAnswer=int(raw_input(\"Enter your selection :\"))\n", - " return iAnswer\n", - "def pause(inNum):\n", - " iCurrentTime=0\n", - " iElapsedTime=0\n", - " \n", - " iCurrentTime=int(round(time.time()*1000))\n", - " \n", - " while((iElapsedTime-iCurrentTime)4):\n", - " iIndex=int(raw_input(\"Enter a valid index (0-4): \"))\n", - " \n", - "print \"The value of index \"+str(iIndex)+\" is \"+str(iArray[iIndex])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a valid index (0-4): 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of index 4 is 9\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4, Page No 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "cArray = range(5)\n", - "cName=\"Olivia\"\n", - "\n", - "print \"\\nCharacter array not initialized:\\n\"\n", - "\n", - "for x in range(5):\n", - " print \"Element \"+str(x)+\"'s Contents are \",cArray[x]\n", - "\n", - "print \"\\nInitialized character array: \"\n", - "for x in range(6):\n", - " print cName[x]," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Character array not initialized:\n", - "\n", - "Element 0's Contents are 0\n", - "Element 1's Contents are 1\n", - "Element 2's Contents are 2\n", - "Element 3's Contents are 3\n", - "Element 4's Contents are 4\n", - "\n", - "Initialized character array: \n", - "O l i v i a\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5, Page No 138" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iFound = -1\n", - "iArray=range(5)\n", - "\n", - "for x in range(5):\n", - " iArray[x]=(x+x)\n", - " \n", - "iValue=int(raw_input(\"Enter value to search for: \"))\n", - "\n", - "for x in range(5):\n", - " if (iArray[x]==iValue):\n", - " iFound=x\n", - " break\n", - "\n", - "if(iFound > -1):\n", - " print \"I found your search value in element \",iFound\n", - "else:\n", - " print \"Sorry, your search value was not found\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value to search for: 8\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "I found your search value in element 4\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6, Page No 141" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iTwoD=[[0 for j in range(3)]for i in range(3)]\n", - "for x in range(3):\n", - " for y in range(3):\n", - " iTwoD[x][y]=(x+y)\n", - "for x in range(3):\n", - " for y in range(3):\n", - " print \"iTwoD[\"+str(x)+\"][\"+str(y)+\"]=\",iTwoD[x][y]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "iTwoD[0][0]= 0\n", - "iTwoD[0][1]= 1\n", - "iTwoD[0][2]= 2\n", - "iTwoD[1][0]= 1\n", - "iTwoD[1][1]= 2\n", - "iTwoD[1][2]= 3\n", - "iTwoD[2][0]= 2\n", - "iTwoD[2][1]= 3\n", - "iTwoD[2][2]= 4\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7, Page No 143" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iTwoD=[[1,2,3],[4,5,6],[7,8,9]]\n", - "iFoundAt=[0,0]\n", - "\n", - "iValue=0\n", - "iFound=0\n", - "\n", - "iValue=int(raw_input(\"Enter your search value: \"))\n", - "\n", - "for x in range(3):\n", - " for y in range(3):\n", - " if(iTwoD[x][y]==iValue):\n", - " iFound=1\n", - " iFoundAt[0]=x\n", - " iFoundAt[1]=y\n", - " break\n", - " \n", - "if (iFound==1):\n", - " print \"Found value in iTwoD [\"+str(iFoundAt[0])+\"][\"+str(iFoundAt[1])+\"]\"\n", - "else:\n", - " print \"Value not found\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your search value: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Found value in iTwoD [2][0]\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8, Page No 145" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "board=range(9)\n", - "cWhoWon=' '\n", - "iCurrentPlayer=0\n", - "\n", - "def displayBoard():\n", - " print \"\\n\\t|\\t|\\n\"\n", - " print \"\\t|\\t|\\n\"\n", - " print \"\"+str(board[0])+\"\\t|\"+str(board[1])+\"\\t|\"+str(board[2])+\"\\n\"\n", - " print \"--------|-------|--------\\n\"\n", - " print \"\"+str(board[3])+\"\\t|\"+str(board[4])+\"\\t|\"+str(board[5])+\"\\n\"\n", - " print \"--------|-------|--------\\n\"\n", - " print \"\\t|\\t|\\n\"\n", - " print \"\"+str(board[6])+\"\\t|\"+str(board[7])+\"\\t|\"+str(board[8])+\"\\n\"\n", - " print \"\\t|\\t|\\n\"\n", - "\n", - "def verifySelection(iSquare,iPlayer):\n", - " if(board[iSquare-1]==' ' and (iPlayer==1 or iPlayer==0)):\n", - " board[iSquare-1]='X'\n", - " return 0\n", - " elif(board[iSquare-1]==' ' and iPlayer==2):\n", - " board[iSquare-1]='0'\n", - " return 0\n", - " else:\n", - " return 1\n", - " \n", - "def checkForWin():\n", - " global cWhoWon\n", - " if(board[0]=='X' and board[1]=='X' and board[2]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[3]=='X' and board[4]=='X' and board[5]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[6]=='X' and board[7]=='X' and board[8]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[0]=='X' and board[3]=='X' and board[6]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[1]=='X' and board[4]=='X' and board[7]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[2]=='X' and board[5]=='X' and board[8]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[0]=='X' and board[5]=='X' and board[8]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[2]=='X' and board[5]=='X' and board[6]=='X'):\n", - " cWhoWon='X'\n", - " elif(board[0]=='0' and board[1]=='0' and board[2]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[3]=='0' and board[4]=='0' and board[5]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[6]=='0' and board[7]=='0' and board[8]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[0]=='0' and board[3]=='0' and board[6]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[1]=='0' and board[4]=='0' and board[7]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[2]=='0' and board[5]=='0' and board[8]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[0]=='0' and board[5]=='0' and board[8]=='0'):\n", - " cWhoWon='0'\n", - " elif(board[2]=='0' and board[5]=='0' and board[6]=='0'):\n", - " cWhoWon='0'\n", - " \n", - " if(cWhoWon!=' '):\n", - " if(cWhoWon=='X'):\n", - " print \"\\nX Wins!\\n\"\n", - " return\n", - " \n", - " if(cWhoWon=='0'):\n", - " print \"\\n0 Wins!\\n\"\n", - " return\n", - " else:\n", - " return\n", - " \n", - " for x in range(9):\n", - " if(board[x]!=' '):\n", - " catTotal=catTotal+1\n", - " \n", - " if(catTotal==9):\n", - " cWhoWon='C'\n", - " print \"\\nCAT Game!\\n\"\n", - " return\n", - "iSquareNum=0\n", - "\n", - "for x in range(8):\n", - " board[x]=' '\n", - " \n", - "displayBoard()\n", - "\n", - "while(cWhoWon==' '):\n", - " print \"\\n\"+cWhoWon+\"\\n\"\n", - " \n", - " if(iCurrentPlayer==1 or iCurrentPlayer==0):\n", - " print \"\\nPLAYER X\\n\"\n", - " iSquareNum=int(raw_input(\"Enter an available square number (1-9): \"))\n", - " \n", - " if(verifySelection(iSquareNum,iCurrentPlayer)==1):\n", - " iCurrentPlayer=1\n", - " else:\n", - " iCurrentPlayer=2\n", - " else:\n", - " print \"\\nPLAYER 0\\n\"\n", - " iSquareNum=int(raw_input(\"Enter an available square number (1-9): \"))\n", - " \n", - " if(verifySelection(iSquareNum,iCurrentPlayer)==1):\n", - " iCurrentPlayer=2\n", - " else:\n", - " iCurrentPlayer=1\n", - " displayBoard()\n", - " checkForWin()\n", - " \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\t|\t|\n", - "\n", - "\t|\t|\n", - "\n", - " \t| \t| \n", - "\n", - "--------|-------|--------\n", - "\n", - " \t| \t| \n", - "\n", - "--------|-------|--------\n", - "\n", - "\t|\t|\n", - "\n", - " \t| \t|8\n", - "\n", - "\t|\t|\n", - "\n", - "\n", - " \n", - "\n", - "\n", - "PLAYER X\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter an available square number (1-9): 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " \n", - "\n", - "\n", - "PLAYER 0\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter an available square number (1-9): 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\t|\t|\n", - "\n", - "\t|\t|\n", - "\n", - "X\t|0\t| \n", - "\n", - "--------|-------|--------\n", - "\n", - " \t| \t| \n", - "\n", - "--------|-------|--------\n", - "\n", - "\t|\t|\n", - "\n", - " \t| \t|8\n", - "\n", - "\t|\t|\n", - "\n", - "\n", - " \n", - "\n", - "\n", - "PLAYER X\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter an available square number (1-9): 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " \n", - "\n", - "\n", - "PLAYER 0\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter an available square number (1-9): 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\t|\t|\n", - "\n", - "\t|\t|\n", - "\n", - "X\t|0\t|0\n", - "\n", - "--------|-------|--------\n", - "\n", - "X\t| \t| \n", - "\n", - "--------|-------|--------\n", - "\n", - "\t|\t|\n", - "\n", - " \t| \t|8\n", - "\n", - "\t|\t|\n", - "\n", - "\n", - " \n", - "\n", - "\n", - "PLAYER X\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter an available square number (1-9): 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " \n", - "\n", - "\n", - "PLAYER 0\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter an available square number (1-9): 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\t|\t|\n", - "\n", - "\t|\t|\n", - "\n", - "X\t|0\t|0\n", - "\n", - "--------|-------|--------\n", - "\n", - "X\t|0\t| \n", - "\n", - "--------|-------|--------\n", - "\n", - "\t|\t|\n", - "\n", - "X\t| \t|8\n", - "\n", - "\t|\t|\n", - "\n", - "\n", - "X Wins!\n", - "\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter7.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter7.ipynb deleted file mode 100755 index c1085a33..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter7.ipynb +++ /dev/null @@ -1,582 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:be75d77e91d7005f064cd2c560347aec768e900f2e81ef47804d4b096bc083a6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7 : Pointers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1, Page No 157" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=5\n", - "iPtr=id(x)\n", - "iPtr=7" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2, Page No 157" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=1\n", - "iPtr=id(x)\n", - "\n", - "iPtr=5\n", - "\n", - "print \"\\n*iPtr = \"+str(iPtr)+\"\\n &x = \"+str(id(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "*iPtr = 5\n", - " &x = 20176608\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3, Page No 158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x=5\n", - "y=10\n", - "iPtr=None\n", - "\n", - "print \"Pointer points to: \",iPtr\n", - "iPtr=id(y)\n", - "print \"Ptr now points to: \",iPtr\n", - "x=iPtr\n", - "print \"The value of x is now\",x\n", - "iPtr=15\n", - "print \"The value of y is now\",iPtr" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pointer points to: None\n", - "Ptr now points to: 20373108\n", - "The value of x is now 20373108\n", - "The value of y is now 15\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def addTwoNumbers(x,y):\n", - " return x+y\n", - "\n", - "\n", - "x=0\n", - "y=0\n", - "\n", - "x=int(raw_input(\"Enter first number:\"))\n", - "y=int(raw_input(\"Enter second number:\"))\n", - "\n", - "print \"Result is: \",addTwoNumbers(x,y)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number:10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number:15\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Result is: 25\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5, Page No 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def demoPassByValue(x):\n", - " x+=5\n", - " print \"The value of x is:\",x\n", - "\n", - "x=0\n", - "x=int(raw_input(\"Enter a number:\"))\n", - "demoPassByValue(x)\n", - "print \"The original value of x did not change:\",x" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number:5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is: 10\n", - "The original value of x did not change: 5\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.6, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def demoPassByReference(x):\n", - " x+=5\n", - " print \"The value of x is now\",x\n", - "\n", - "x=0\n", - "x=int(raw_input(\"Enter a number:\"))\n", - "demoPassByReference(x)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number:10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of x is now 15\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.7, Page No 164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "iArray=[1,2,3,4,5]\n", - "iPtr=id(iArray)\n", - "print \"Address of pointer: \",iPtr\n", - "print \"First address of array: \",id(iArray[0])\n", - "print \"Pointer points to: \",iArray[0]\n", - "print \"First element of array contains\",iArray[0]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Address of pointer: 28621960\n", - "First address of array: 19652320\n", - "Pointer points to: 1\n", - "First element of array contains 1\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.8, Page No 165" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def nameLength(name):\n", - " x=0\n", - " while(name[x] != '\\0'):\n", - " x+=1;\n", - " return x\n", - "aName='\\0'\n", - "aName=raw_input(\"Enter your first name: \")\n", - "aName=aName+'\\0'\n", - "print \"Your first name contains\"\n", - "print str(nameLength(aName))+\" characters\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your first name: mehta\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Your first name contains\n", - "5 characters\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.9, Page No 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def squareNumber(num):\n", - " for x in range(3):\n", - " num[x]=num[x]*num[x]\n", - "\n", - "iNumbers=[2,4,6]\n", - "print \"The current array value are:\"\n", - "\n", - "for x in range(3):\n", - " print iNumbers[x]\n", - "\n", - "print \"\\n\"\n", - "\n", - "squareNumber(iNumbers)\n", - "\n", - "print \"The modified array values are :\"\n", - "\n", - "for x in range(3):\n", - " print iNumbers[x]\n", - "\n", - "print \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The current array value are:\n", - "2\n", - "4\n", - "6\n", - "\n", - "\n", - "The modified array values are :\n", - "4\n", - "16\n", - "36\n", - "\n", - "\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.10, Page No 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def printArgument(num):\n", - " print \"Read only argument is: \",num\n", - " \n", - "iNumber=5\n", - "printArgument(iNumber)\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Read only argument is: 5\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.11, Page No 169" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def printArray(num):\n", - " for x in range(3):\n", - " print num[x]\n", - "\n", - "iNumbers=[2,4,6]\n", - "printArray(iNumbers)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n", - "4\n", - "6\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.12, Page No 170" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def modifyArray(num):\n", - " for x in range(3):\n", - " num[x]=num[x]*num[x]\n", - " \n", - "iNumbers=[2,4,6]\n", - "modifyArray(iNumbers)" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.13, Page No 173" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import random\n", - "def encrypt(sMessage,random):\n", - " x=0\n", - " while(sMessage[x]):\n", - " sMessage+=str(random)\n", - " x+=1\n", - " x=0\n", - " print \"Encrypted message is: \"\n", - " \n", - " while(sMessage[x]):\n", - " print sMessage[x]\n", - " x+=1\n", - "\n", - "def decrypt(sMessage,random):\n", - " x=0\n", - " while(sMessage[x]):\n", - " sMessage[x]=sMessage[x]-str(random)\n", - " x+=1\n", - " x=0\n", - " while(sMessage[x]):\n", - " print sMessage[x]\n", - " x+=1\n", - " \n", - "myString=range(21)\n", - "iSelection=0\n", - "iRand= (random.randint(1,4)%4)+1\n", - "\n", - "while(iSelection != 4):\n", - " print \"\\n\\n1\\t Encrypt Clear Text\\n\"\n", - " print \"2\\tDecrypt Cipher Text\\n\"\n", - " print \"3\\tGenerate New Key\\n\"\n", - " print \"4\\tQuit\\n\"\n", - " iSelection=int(raw_input(\"\\nSelect a Cryptography Option: \"))\n", - " \n", - " if(iSelection ==1):\n", - " myString=raw_input(\"\\nEnter one word as clear text to encrypt: \")\n", - " encrypt(myString,iRand)\n", - " break\n", - " elif(iSelection==2):\n", - " myString=raw_input(\"\\nEnter cipher text to decrypt: \")\n", - " decrypt(myString,iRand)\n", - " break\n", - " elif(iSelection==3):\n", - " iRand= (random.randrange(1,4,1)%4)+1\n", - " print \"\\nNew Key Generated\\n\"\n", - " break\n", - " else:\n", - " exit(0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "1\t Encrypt Clear Text\n", - "\n", - "2\tDecrypt Cipher Text\n", - "\n", - "3\tGenerate New Key\n", - "\n", - "4\tQuit\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Select a Cryptography Option: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter one word as clear text to encrypt: bhavin\n" - ] - } - ] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter8.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter8.ipynb deleted file mode 100755 index bca914f3..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter8.ipynb +++ /dev/null @@ -1,703 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2192643aa60481aa37dedf877c77d457bede1bb6978dcdba9008684a80b17ad1" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8 Strings" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1, Page No. 181" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "myString=\"MIKE\"\n", - "print \"The pointer variable's value is: \", id(myString)\n", - "print \"The pointer variable points to: \",myString\n", - "print \"The memory locations for each character are::\"\n", - "for x in range(0,4):\n", - " print id(myString[x])," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The pointer variable's value is: 44562688\n", - "The pointer variable points to: MIKE\n", - "The memory locations for each character are::\n", - "19548160 20083536 20086752 20285008\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2, Page No.183" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "color=raw_input(\"Enter your favorite color: \")\n", - "print \"You entered: \",color" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your favorite color: Blue\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You entered: Blue\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3, Page No.183" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "color=raw_input(\"Enter your favorite color: \")\n", - "print \"You entered: \",color" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your favorite color: Black\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You entered: Black\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4, Page No. 185" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "names = []\n", - "names.append(\"Michael\")\n", - "names.append(\"Sheila\")\n", - "names.append(\"Spencer\")\n", - "names.append(\"Hunter\")\n", - "names.append(\"Kenya\")\n", - "print \"\\nNames in pointer array of type char:\\n\"\n", - "for i in range(5):\n", - " print names[i]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Names in pointer array of type char:\n", - "\n", - "Michael\n", - "Sheila\n", - "Spencer\n", - "Hunter\n", - "Kenya\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5, Page No.186" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "colors = []\n", - "print \"Enter 3 colors: \"\n", - "for i in range(3):\n", - " colors.append(raw_input())\n", - "print \"Your entered: \"\n", - "for i in range(3):\n", - " print colors[i]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter 3 colors: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "blue\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "black\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "white\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Your entered: \n", - "blue\n", - "black\n", - "white\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6, Page No.187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str1=\"123.79\"\n", - "str2=\"55\"\n", - "\n", - "print \"String1 is:\\\"\",str1,\"\\\"\"\n", - "print \"String2 is:\\\"\",str2,\"\\\"\"\n", - "\n", - "x=float(str1)\n", - "y=int(str2)\n", - "\n", - "print \"String 1 converted to a float is \",round(x,2)\n", - "print \"String 2 converted to an integer is \",y" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String1 is:\" 123.79 \"\n", - "String2 is:\" 55 \"\n", - "String 1 converted to a float is 123.79\n", - "String 2 converted to an integer is 55\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7, Page No.188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str1=\"37\"\n", - "str2=\"20\"\n", - "\n", - "print \"String1 + String2 is \", str1+str2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String1 + String2 is 3720\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.8, Page No. 189" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str1=\"37\"\n", - "str2=\"20\"\n", - "iResult=int(str1)+int(str2)\n", - "print \"String1 + String2 is \", iResult" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String1 + String2 is 57\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9, Page No. 190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str1=\"Michael\"\n", - "str2=\"Vine\"\n", - "print \"The length of string1 is \",len(str1)\n", - "print \"The length of string2 is \",len(str2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The length of string1 is 7\n", - "The length of string2 is 4\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.10, Page No.191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def convertL(char):\n", - " char=char.lower()\n", - " print \"The first name converted to lower case is: \",char\n", - "def convertU(char):\n", - " char=char.upper()\n", - " print \"The first name converted to Upper case is: \",char\n", - "name1=\"Michael\"\n", - "name2=\"Vine\"\n", - "\n", - "convertL(name1)\n", - "convertU(name2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The first name converted to lower case is: michael\n", - "The first name converted to Upper case is: VINE\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.11, Page No.193" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str2=\"C Language\"\n", - "str1=str2\n", - "print \"String 1 now contains \", str1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 1 now contains C Language\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.12, Page No.194" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str1=\"Computer Science \"\n", - "str2=\"is applied mathematics\"\n", - "print str1+str2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Computer Science is applied mathematics\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exmaple 8.13, Page No.195" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "str1=\"A\"\n", - "str2=\"A\"\n", - "str3=\"!\"\n", - "print str1\n", - "print str2\n", - "print str3\n", - "if str1==str2:\n", - " print \"Letter A is equal to letter A\"\n", - "if str1>str3:\n", - " print \"Letter A is greater than character !\"\n", - "if str3int(round(time.time()*1000))):\n", - " if displayed==0:\n", - " print \"find a word in:\"\n", - " print \"\",starGame[x]\n", - " displayed=1\n", - " os.system('cls')\n", - " answer=raw_input(\"Enter word found:\")\n", - " checkAnswer(starGame[x],answer)\n", - " displayed=0\n", - " startTime=int(round(time.time()*1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "word find\n", - "find a word in:\n", - " ADELANGUAGEFERVZOPIBMOU\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter word found:U\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorry no word found...\n", - "find a word in:\n", - " ZBPOINTERSKLMLOOPMNOCOT\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter word found:T\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorry no word found...\n", - "find a word in:\n", - " PODSTRINGGDIWHIEEICERLS\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter word found:S\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorry no word found...\n", - "find a word in:\n", - " YVCPROGRAMMERWQKNULTHMD\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter word found:YV\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorry no word found...\n", - "find a word in:\n", - " UKUNIXFIMWXIZEQZINPUTEX\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter word found:UKU\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorry no word found...\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter9.ipynb b/C_Programming_for_the_Absolute_Beginner/Chapter9.ipynb deleted file mode 100755 index 583e1e8f..00000000 --- a/C_Programming_for_the_Absolute_Beginner/Chapter9.ipynb +++ /dev/null @@ -1,549 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c7a7a5fed3d237b23773c146200cb1c66c8b51b03326b1d931d288bf060c18a1" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9 : Introduction to Data Structures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1, Page No 205" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class employee:\n", - " def __init__(self,fname,lname,id1,salary):\n", - " self.fname = fname\n", - " self.lname = lname\n", - " self.id1 = id1\n", - " self.salary = salary\n", - "if __name__ == '__main__':\n", - " emp1 = employee(\"Michael\",\"Vine\",123,50000.00)\n", - " print \"\\n First name: \" + emp1.fname + \"\\n\"\n", - " print \"Last name: \" + emp1.lname + \"\\n\"\n", - " print \"Employee ID: \" + str(emp1.id1) + \"\\n\"\n", - " print \"Salary: \" + str(emp1.salary) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " First name: Michael\n", - "\n", - "Last name: Vine\n", - "\n", - "Employee ID: 123\n", - "\n", - "Salary: 50000.0\n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2, Page No 206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class employee:\n", - " def __init__(self,fname,lname,id1,salary):\n", - " self.fname = fname\n", - " self.lname = lname\n", - " self.id1 = id1\n", - " self.salary = salary\n", - "if __name__ == '__main__':\n", - " emp1 = employee(\"Michael\",\"Vine\",123,50000.00)\n", - " print \"\\n First name: \" + emp1.fname + \"\\n\"\n", - " print \"Last name: \" + emp1.lname + \"\\n\"\n", - " print \"Employee ID: \" + str(emp1.id1) + \"\\n\"\n", - " print \"Salary: \" + str(emp1.salary) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " First name: Michael\n", - "\n", - "Last name: Vine\n", - "\n", - "Employee ID: 123\n", - "\n", - "Salary: 50000.0\n", - "\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3, Page No 209" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class scores:\n", - " def __init__(self,name,score):\n", - " self.name = name\n", - " self.score = score\n", - "if __name__ == '__main__':\n", - " highScores = []\n", - " highScores.append(scores(\"Hunter\",40768))\n", - " highScores.append(scores(\"Kenya\",38568))\n", - " highScores.append(scores(\"Apollo\",35985))\n", - " for x in range(3):\n", - " print \"\\n\" + highScores[x].name + \"\\t\" + str(highScores[x].score) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Hunter\t40768\n", - "\n", - "\n", - "Kenya\t38568\n", - "\n", - "\n", - "Apollo\t35985\n", - "\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4, Page No 211" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class employee:\n", - " def __init__(self,id1,name,salary):\n", - " self.id1 = id1\n", - " self.name = name\n", - " self.salary = salary\n", - "def processEmp(emp1):\n", - " emp1.id1 = 123\n", - " emp1.name = \"Sheila\"\n", - " emp1.salary = 65000.00\n", - "if __name__ == '__main__':\n", - " emp1 = employee(0,0,0)\n", - " processEmp(emp1)\n", - " print \"\\n Id : \" + str(emp1.id1) + \"\\n\"\n", - " print \"Name : \" + emp1.name + \"\\n\"\n", - " print \"Salary : \" + str(emp1.salary) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Id : 123\n", - "\n", - "Name : Sheila\n", - "\n", - "Salary : 65000.0\n", - "\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5, Page No 212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class player:\n", - " def __init__(self,name,score):\n", - " self.name = name\n", - " self.score = score\n", - "if __name__ == '__main__':\n", - " aPlayer = player(0,0)\n", - " ptrPlayer = id(aPlayer)\n", - " aPlayer.name = \"Pinball Wizard\"\n", - " aPlayer.score = 1000000.00\n", - " print \"\\nPlayer : \" + aPlayer.name + \"\\n\"\n", - " print \"Score : \" + str(aPlayer.score)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Player : Pinball Wizard\n", - "\n", - "Score : 1000000.0\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6, Page No 213" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class employee:\n", - " def __init__(self,id1,name,salary):\n", - " self.id1 = id1\n", - " self.name = name\n", - " self.salary = salary\n", - "def processEmp(emp1):\n", - " emp1.id1 = 123\n", - " emp1.name = \"Sheila\"\n", - " emp1.salary = 65000.00\n", - "if __name__ == '__main__':\n", - " emp1 = employee(0,0,0)\n", - " ptrEmp = id(emp1)\n", - " processEmp(emp1)\n", - " print \"\\nId : \" + str(emp1.id1) + \"\\n\"\n", - " print \"Name : \" + emp1.name + \"\\n\"\n", - " print \"Salary : \" + str(emp1.salary) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Id : 123\n", - "\n", - "Name : Sheila\n", - "\n", - "Salary : 65000.0\n", - "\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.7, Page No 215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class employee:\n", - " def __init__(self,id1,name,salary):\n", - " self.id1 = id1\n", - " self.name = name\n", - " self.salary = salary\n", - "def processEmp(emp1 = []):\n", - " emp1.append(employee(123,\"Sheila\",65000.00))\n", - " emp1.append(employee(234,\"Hunter\",28000.00))\n", - " emp1.append(employee(456,\"Kenya\",48000.00))\n", - " return emp1\n", - "if __name__ == '__main__':\n", - " emp1 = []\n", - " emp1 = employee(0,0,0)\n", - " emp1 = processEmp(emp1 = [])\n", - " for x in range(3):\n", - " print \"\\nId : \" + str(emp1[x].id1) + \"\\n\" \n", - " print \"Name : \" + emp1[x].name + \"\\n\"\n", - " print \"Salary : \" + str(emp1[x].salary)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Id : 123\n", - "\n", - "Name : Sheila\n", - "\n", - "Salary : 65000.0\n", - "\n", - "Id : 234\n", - "\n", - "Name : Hunter\n", - "\n", - "Salary : 28000.0\n", - "\n", - "Id : 456\n", - "\n", - "Name : Kenya\n", - "\n", - "Salary : 48000.0\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8, Page No 217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "class phonebook:\n", - " def __init__(self,name,number,address):\n", - " self.name = name\n", - " self.number = number\n", - " self.address = address\n", - "class magazine:\n", - " def __init__(self,name,author,isbn):\n", - " self.name = name\n", - " self.author = author\n", - " self.isbn = isbn\n", - "if __name__ == '__main__':\n", - " aBook = phonebook(\"John\",123,\"John Smith\")\n", - " aMagazine = magazine(\"C Programming\",\"Michael Vine\",1-59863-480-1)\n", - " print \"\\nUnion Details\\n\"\n", - " print \"Address for aBook.name: \" + str(id(aBook.name)) + \"\\n\"\n", - " print \"Address for aBook.number: \", str(id(aBook.number)) + \"\\n\"\n", - " print \"Address for aBook.address: \", str(id(aBook.address)) + \"\\n\"\n", - " print \"\\nStructure Details\\n\"\n", - " print \"Address for aMagazine.name: \", str(id(aMagazine.name)) + \"\\n\"\n", - " print \"Address for aMagazine.author: \", str(id(aMagazine.author)) + \"\\n\"\n", - " print \"Address for aMagazine.isbn: \", str(id(aMagazine.isbn)) + \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - "Union Details\n", - "\n", - "Address for aBook.name: 66178424\n", - "\n", - "Address for aBook.number: 30796656\n", - "\n", - "Address for aBook.address: 66151792\n", - "\n", - "\n", - "Structure Details\n", - "\n", - "Address for aMagazine.name: 66151744\n", - "\n", - "Address for aMagazine.author: 66150976\n", - "\n", - "Address for aMagazine.isbn: 64689272\n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.9, Page No 219" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "x = 12\n", - "y = 5\n", - "print \"\\nWithout Type-Casting\\n\"\n", - "print \"12 \\\\ 5 = \" + str(x/y) + \"\\n\"\n", - "print \"\\nWith Type-Casting\\n\"\n", - "print \"12 \\\\ 5 = \" + str(float(x)/float(y)) + \"\\n\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Without Type-Casting\n", - "\n", - "12 \\ 5 = 2\n", - "\n", - "\n", - "With Type-Casting\n", - "\n", - "12 \\ 5 = 2.4\n", - "\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.10, Page No 220" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "number = 86\n", - "letter = 'M'\n", - "print \"\\n86 type-casted to char is: \" + chr(number) + \"\\n\"\n", - "print \"\\n'M' type-casted to int is: \" + str(ord(letter)) + \"\\n \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "86 type-casted to char is: V\n", - "\n", - "\n", - "'M' type-casted to int is: 77\n", - " \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.11, Page No 222" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import random\n", - "class dec:\n", - " def __init__(self,type1,used,value):\n", - " self.type1 = type1\n", - " self.used = used\n", - " self.value = value\n", - "def shuffel(thisDeck):\n", - " found = 0\n", - " print \"\\nYour five cards are: \\n\\n\"\n", - " while found < 5:\n", - " #iRnd = random.randint(1, 100) % 51 when we use this it gives error out of range\n", - " if thisDeck[iRnd].used == 'n':\n", - " if thisDeck[iRnd].value == 12:\n", - " print \"Ace of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n", - " elif thisDeck[iRnd].value == 11:\n", - " print \"King of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n", - " elif thisDeck[iRnd].value == 10:\n", - " print \"Queen of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n", - " elif thisDeck[iRnd].value == 9:\n", - " print \"Jack of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n", - " else:\n", - " print str(thisDeck[iRnd].value + 2) + \"of\"\n", - " print str(thisDeck[iRnd].type1) + \"\\n\" \n", - "if __name__ == '__main__':\n", - " myDeck = []\n", - " for x in range(3):\n", - " for y in range(13):\n", - " if x==0:\n", - " myDeck.append(dec(\"dimonds\",\"y\",\"n\"))\n", - " elif x==1:\n", - " myDeck.append(dec(\"clubs\",\"y\",\"n\"))\n", - " elif x==2:\n", - " myDeck.append(dec(\"hearts\",\"y\",\"n\"))\n", - " elif x==3:\n", - " myDeck.append(dec(\"spades\",\"y\",\"n\"))\n", - " shuffel(myDeck)" - ], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/README.txt b/C_Programming_for_the_Absolute_Beginner/README.txt deleted file mode 100755 index 9bf2614f..00000000 --- a/C_Programming_for_the_Absolute_Beginner/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Bhavin Mehta -Course: mca -College/Institute/Organization: Shri Brahmanand Institute of Computer Science - Chaparda -Department/Designation: Assistant Professor -Book Title: C Programming for the Absolute Beginner -Author: Michael Vine -Publisher: Thomson Course Technology United States of America -Year of publication: 2008 -Isbn: 1-59863-480-1 -Edition: 2nd edition \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/1.png b/C_Programming_for_the_Absolute_Beginner/screenshots/1.png deleted file mode 100755 index 0fc6a70b..00000000 Binary files a/C_Programming_for_the_Absolute_Beginner/screenshots/1.png and /dev/null differ diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/1_1.png b/C_Programming_for_the_Absolute_Beginner/screenshots/1_1.png deleted file mode 100755 index 0fc6a70b..00000000 Binary files a/C_Programming_for_the_Absolute_Beginner/screenshots/1_1.png and /dev/null differ diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/2.png b/C_Programming_for_the_Absolute_Beginner/screenshots/2.png deleted file mode 100755 index 6ceba6dc..00000000 Binary files a/C_Programming_for_the_Absolute_Beginner/screenshots/2.png and /dev/null differ diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/2_1.png b/C_Programming_for_the_Absolute_Beginner/screenshots/2_1.png deleted file mode 100755 index 6ceba6dc..00000000 Binary files a/C_Programming_for_the_Absolute_Beginner/screenshots/2_1.png and /dev/null differ diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/3.png b/C_Programming_for_the_Absolute_Beginner/screenshots/3.png deleted file mode 100755 index 101cd93b..00000000 Binary files a/C_Programming_for_the_Absolute_Beginner/screenshots/3.png and /dev/null differ diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/3_1.png b/C_Programming_for_the_Absolute_Beginner/screenshots/3_1.png deleted file mode 100755 index 101cd93b..00000000 Binary files a/C_Programming_for_the_Absolute_Beginner/screenshots/3_1.png and /dev/null differ diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter10_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter10_1.ipynb new file mode 100755 index 00000000..c2e52854 --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter10_1.ipynb @@ -0,0 +1,362 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:af2735a34ebb2cb3c8a379aacf70cb46d8ee4a8ed09afacd9b5d0d21e0a0dd5a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Dynamic Memory Allocation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1, Page No 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "class employee:\n", + " def __init__(self,id1,name,salary):\n", + " self.id1 = id1\n", + " self.name = name\n", + " self.salary = salary\n", + "e = employee(10,\"abc\",12000.02)\n", + "x = 1\n", + "f = 1.1\n", + "d = 1111.11\n", + "c = 'C'\n", + "print \"Sizo of integer : \" + str(sys.getsizeof(x)) + \"bytes \\n\"\n", + "print \"Sizo of float : \" + str(sys.getsizeof(f)) + \"bytes \\n\"\n", + "print \"Sizo of double : \" + str(sys.getsizeof(d)) + \"bytes \\n\"\n", + "print \"Sizo of char : \" + str(sys.getsizeof(c)) + \"bytes \\n\"\n", + "print \"Sizo of employee structure : \" + str(sys.getsizeof(e)) + \"bytes \\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sizo of integer : 24bytes \n", + "\n", + "Sizo of float : 24bytes \n", + "\n", + "Sizo of double : 24bytes \n", + "\n", + "Sizo of char : 34bytes \n", + "\n", + "Sizo of employee structure : 64bytes \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page No 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "array = []\n", + "\n", + "print \"\\nSize of array: \" + str(sys.getsizeof(array)) + \"bytes\\n\"\n", + "print \"Number of elements in array \"\n", + "print str(sys.getsizeof(array) / sys.getsizeof(int)) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Size of array: 64bytes\n", + "\n", + "Number of elements in array \n", + "0\n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page No 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page No 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5, Page No 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6, Page No 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function\n", + "#if name is None:\n", + "# print \"\\nOut of memory!\\n\"\n", + "#else:\n", + "# print \"\\nMemory allocated.\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page No 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function\n", + "#if name is not None:\n", + "# name = raw_input(\"Enter your name: \")\n", + "# print \"\\nHi \" + name + \"\\n\" " + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8, Page No 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function\n", + "#if name is not None:\n", + "# name = raw_input(\"Enter your name: \")\n", + "# print \"\\nHi \" + name + \"\\n\"\n", + "# del name" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9, Page No 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function\n", + "#if numbers is None:\n", + "# return\n", + "#numbers[0] = 100\n", + "#numbers[1] = 200\n", + "#numbers[2] = 300\n", + "#numbers[3] = 400\n", + "#numbers[4] = 500\n", + "#print \"\\nIndividual memory segments initialized to:\\n\"\n", + "#for x in range(5):\n", + "# print \"numbers[\" +x+\"] = \\n\" + numbers[x]" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10, Page No 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no calloc function\n", + "#if numbers is None:\n", + "# return" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.11, Page No 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# there is no malloc function\n", + "#if numbers is None:\n", + "# print \"\\nOut of memory!\\n\"\n", + "# return\n", + "#else:\n", + "# number = newNumber\n", + "# for x in range(10):\n", + "# numbers[x] = x * 10\n", + "# print \"\\nExpanded memory:\\n\"\n", + "# for x in range(10):\n", + "# print \"numbers[\" +x+\"] = \\n\" + numbers[x]\n", + "# del number" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12, Page No 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "# there is no calloc function\n", + "#time\n", + "#print \"\\nMath Quiz\\n\\n\"\n", + "#response = raw_input(\"Enter # of problems: \")\n", + "#if op1 is None || op2 is None || answer is None ||result is None:\n", + "# print \"\\nOut of Memory!\\n\"\n", + "# return\n", + "#for x in range(response):\n", + "# op1[x] = random.randint(1,200) % 100\n", + "# op2[x] = random.randint(1,200) % 100\n", + "# print \"\\n\" + op1[x] + \"+\" + op2[x]\"\n", + "# answer[x] = raw_input(\"\")\n", + "# if answer[x] == op1[x] + op2[x]:\n", + "# result[x] = 'c'\n", + "# else:\n", + "# result[x] = 'i'\n", + "#print \"\\nQuiz Results\\n\"\n", + "#print \"\\nQuestion\\tYour Answer\\tCorrect\\n\"\n", + "#for x in range(response):\n", + "# if result[x] == 'c':\n", + "# print op1[x] + \"+\" + op2[x] + \"\\t\\t\" + answer[x] + \"\\t\\tYes\\n\"\n", + "# else:\n", + "# print op1[x] + \"+\" + op2[x] + \"\\t\\t\" + answer[x] + \"\\t\\tNo\\n\"\n", + "#del op1\n", + "#del op2\n", + "#del answer\n", + "#del result " + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter11_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter11_1.ipynb new file mode 100755 index 00000000..239b6ca4 --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter11_1.ipynb @@ -0,0 +1,616 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9d02541e3ea8d7af1efd977534b7150b993557acd6da8dc30b83dcacb798d681" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : File Input and Output" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page No 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " pRead = open(\"file1.dat\",\"r\")\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + "\n", + "\"\"\"\n", + "Input file:- file1.dat\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page No 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " pRead = open(\"file1.dat\",\"r\")\n", + " if(not isinstance(pRead,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " print \"\\nFile opened for reading\\n\"\n", + " pRead.close()\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + "\n", + "\"\"\"\n", + "Input file:- file1.dat\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "File opened for reading\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3, Page No 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " pRead = open(\"names.dat\",\"r\")\n", + " if(not isinstance(pRead,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " print \"\\nContents of names.dat\\n\"\n", + " while(1):\n", + " t = pRead.readline() \n", + " if(t != \"\"):\n", + " print t\n", + " else:\n", + " break\n", + " pRead.close()\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + " \n", + "\"\"\" \n", + "Input File :- names.dat\n", + "\n", + "Michael\n", + "Sheila\n", + "Spencer\n", + "Olivia\n", + "\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Contents of names.dat\n", + "\n", + "Michael\n", + "\n", + "Sheila\n", + "\n", + "Spencer\n", + "\n", + "Olivia\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, Page No 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " pRead = open(\"hobbies.dat\",\"r\")\n", + " if(not isinstance(pRead,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " print \"\\nName\\tHobby\\n\\n\"\n", + " while(1):\n", + " name = pRead.readline()\n", + " hobby = pRead.readline()\n", + " if(name != \"\"):\n", + " print name + \"\\t\"\n", + " print hobby\n", + " else:\n", + " break\n", + " pRead.close()\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + " \n", + "\"\"\"\n", + "Input file :- hobbies.dat\n", + "\n", + "Michael\tProgramming\n", + "Sheila\tShopping\n", + "Spencer\tFootball\n", + "Olivia\tDancing\n", + "Waytt\tEating\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Name\tHobby\n", + "\n", + "\n", + "Michael\tProgramming\n", + "\t\n", + "Sheila\tShopping\n", + "\n", + "Spencer\tFootball\n", + "\t\n", + "Olivia\tDancing\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5, Page No 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " pWrite = open(\"students.dat\",\"w\")\n", + " if(not isinstance(pWrite,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " fname = raw_input(\"Enter first name: \")\n", + " lname = raw_input(\"Enter last name: \")\n", + " id1 = raw_input(\"Enter id: \")\n", + " gpa = float(raw_input(\"Enter GPA: \"))\n", + " pWrite.writelines(fname + \" \" + lname + \"\\t\" + id1 + \"\\t\" + str(gpa))\n", + " pWrite.close()\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + "\n", + "\"\"\"\n", + "Output file:- students.dat\n", + "Patric Star\t888-66-9999\t2.0\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first name: Patric\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter last name: Star\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter id: 888-66-9999\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter GPA: 2.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6, Page No 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " pRead = open(\"students.dat\",\"r\")\n", + " if(not isinstance(pRead,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " print \"\\nName\\t\\tID\\t\\tGPA\\n\\n\"\n", + " while(1):\n", + " fname = pRead.read()\n", + " lname = pRead.read()\n", + " id1 = pRead.read()\n", + " gpa = pRead.read()\n", + " \n", + " if(fname != \"\"):\n", + " print fname + lname + \"\\t\\t\" + id1 + \"\\t\" + str(gpa)\n", + " else:\n", + " break\n", + " pRead.close()\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + "\n", + "\"\"\"\n", + "Input file:- students.dat\n", + "Patric Star\t888-66-9999\t2.0\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Name\t\tID\t\tGPA\n", + "\n", + "\n", + "Patric Star\t888-66-9999\t2.0\t\t\t\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7, Page No 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def readData():\n", + " try:\n", + " pRead = open(\"hobbies.dat\",\"r\")\n", + " if(not isinstance(pRead,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " print \"\\nName\\tHobby\\n\\n\"\n", + " while(1):\n", + " name = pRead.readline()\n", + " hobby = pRead.readline()\n", + " if(name != \"\"):\n", + " print name + \"\\t\"\n", + " print hobby\n", + " else:\n", + " break\n", + " pRead.close()\n", + " except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + "try:\n", + " print \"Current file contains\"\n", + " readData()\n", + " print \"\\n\"\n", + " name = raw_input(\"Enter a new name: \")\n", + " hobby = raw_input(\"Enter a new hobby: \")\n", + " pWrite = open(\"hobbies.dat\",\"a\")\n", + " if(not isinstance(pWrite,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " else:\n", + " pWrite.writelines(\"\\n\" + name + \"\\t\" + hobby)\n", + " pWrite.close()\n", + " readData()\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + " \n", + "\"\"\"\n", + "Input file and Output file:- hobbies.dat\n", + "Michael\tProgramming\n", + "Sheila\tShopping\n", + "Spencer\tFootball\n", + "Olivia\tDancing\n", + "Waytt\tEating\n", + "\"\"\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current file contains\n", + "\n", + "Name\tHobby\n", + "\n", + "\n", + "Michael\tProgramming\n", + "\t\n", + "Sheila\tShopping\n", + "\n", + "Spencer\tFootball\n", + "\t\n", + "Olivia\tDancing\n", + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a new name: Waytt\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a new hobby: Eating\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Name\tHobby\n", + "\n", + "\n", + "Michael\tProgramming\n", + "\t\n", + "Sheila\tShopping\n", + "\n", + "Spencer\tFootball\n", + "\t\n", + "Olivia\tDancing\n", + "\n", + "Waytt\tEating\t\n", + "\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8, Page No 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "try:\n", + " pRead = open(\"hobbies.dat\",\"r\")\n", + " if(not isinstance(pRead,file)):\n", + " print \"\\nFile can not be opened\\n\"\n", + " print \"The following error occurred\" #goto label\n", + " sys.exit(\"Some Error Occures\")\n", + " else:\n", + " print \"\\nName\\tHobby\\n\\n\"\n", + " while(1):\n", + " name = pRead.readline()\n", + " hobby = pRead.readline()\n", + " if(name != \"\"):\n", + " print name + \"\\t\"\n", + " print hobby\n", + " else:\n", + " break\n", + " pRead.close()\n", + " #sys.exit(\"Exit\")\n", + "except IOError:\n", + " print \"\\nFile can not be opened\\n\"\n", + "\n", + "\"\"\"\n", + "Input file:- hobbies.dat\n", + "Michael\tProgramming\n", + "Sheila\tShopping\n", + "Spencer\tFootball\n", + "Olivia\tDancing\n", + "Waytt\tEating\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Name\tHobby\n", + "\n", + "\n", + "Michael\tProgramming\n", + "\t\n", + "Sheila\tShopping\n", + "\n", + "Spencer\tFootball\n", + "\t\n", + "Olivia\tDancing\n", + "\n", + "Waytt\tEating\t\n", + "\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9, Page No 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"\\n\\tPhone Book\\n\"\n", + "print \"\\n 1 \\t Add phone book entry \\n\"\n", + "print \"2 \\t Print phone book \\n\\n\"\n", + "print \"Select an option: \"\n", + "response = int(raw_input(\"Select an option: \"))\n", + "print response\n", + "if(response == 1):\n", + " fname = raw_input(\"Enter first name: \")\n", + " lname = raw_input(\"Enter last name: \")\n", + " number = raw_input(\"Enter phone number: \")\n", + " pWrite = open(\"phone_book.dat\",\"a\")\n", + " if(isinstance(pWrite,file)):\n", + " pWrite.writelines(fname + \" \" + lname + \" \" + number + \"\\n\")\n", + " pWrite.close()\n", + " else:\n", + " print \"The error occured\" #go to\n", + "elif(response == 2):\n", + " pRead = open(\"phone_book.dat\",\"r\")\n", + " if(isinstance(pRead,file)):\n", + " while(1):\n", + " fname = pRead.read()\n", + " if(fname == \"\"):\n", + " break\n", + " lname = pRead.read()\n", + " number = pRead.read()\n", + " print fname\n", + " print lname\n", + " print number\n", + " print \"\\n\"\n", + " else:\n", + " print \"The error occured\" #go to\n", + "else:\n", + " print \"Invalid Selection\"\n", + "\n", + "\"\"\"\n", + "Input file and Output file:- phone_book.dat\n", + "John Smith 538.676.1234\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\tPhone Book\n", + "\n", + "\n", + " 1 \t Add phone book entry \n", + "\n", + "2 \t Print phone book \n", + "\n", + "\n", + "Select an option: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Select an option: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n", + "John Smith 538.676.1234\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter12_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter12_1.ipynb new file mode 100755 index 00000000..76d70f5c --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter12_1.ipynb @@ -0,0 +1,445 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b5b5db464e530d21c4b695ff4bde6912d0e8c447d51f1ede515f161acac3856f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : The C PreProcessor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page No 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"\\nHaving fun with preprocessor directives\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Having fun with preprocessor directives\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, Page No 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NUMBER = 7\n", + "print \"\\nLucky Number \", NUMBER , \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Lucky Number 7 \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3, Page No 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NUMBER = 7\n", + "print \"\\nLucky Number \", NUMBER , \"\\n\"\n", + "NUMBER = 5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Lucky Number 7 \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4, Page No 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def area(l,w):\n", + " return l * w\n", + "length = 0\n", + "width = 0\n", + "length = int(raw_input(\"\\nEnter length: \"))\n", + "width = int(raw_input(\"\\nEnter width: \"))\n", + "print \"\\nArea of rectangle = \" , area(length,width) , \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter length: 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter width: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Area of rectangle = 84 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5, Page No 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def RESULT(x,y):\n", + " print \"\\nResult is \\n\", x+y\n", + "num1 = 0\n", + "num2 = 0\n", + "num1 = int(raw_input(\"\\nEnter first number: \"))\n", + "num2 = int(raw_input(\"\\nEnter second number: \"))\n", + "RESULT(num1,num2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter first number: 27\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter second number: 44\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Result is \n", + "71\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6, Page No 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def RESULT(x,y):\n", + " print \"\\nResult is \\n\", x+y\n", + "operand1 = 0\n", + "operand2 = 0\n", + "operand1 = int(raw_input(\"\\nEnter first operand: \"))\n", + "operand2 = int(raw_input(\"\\nEnter second operand: \"))\n", + "RESULT(operand1,operand2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter first operand: 27\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter second operand: 44\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Result is \n", + "71\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7, Page No 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import profit\n", + "print \"\\nThe Profit Program\\n\"\n", + "price = float(raw_input(\"\\nEnter unit price: \"))\n", + "quantity = int(raw_input(\"Enter quantity sold: \"))\n", + "totalCost = float(raw_input(\"Enter total cost: \"))\n", + "profit1(price,quantity,totalCost)\n", + "\n", + "\"\"\"\n", + "Header file:- profit.py\n", + "def profit(p,q,tc):\n", + " print \"\\nYour profit is \",(p * q) - tc,\"\\n\"\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The Profit Program\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter unit price: 12.99\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter quantity sold: 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter total cost: 56\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Your profit is 34.93 \n", + "\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8, Page No 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import calculate\n", + "selection = 0\n", + "print \"\\n The Function Wizard \\n\"\n", + "print \"\\n1\\tDetermine perimeter of ractangle\\n\"\n", + "print \"\\n2\\tDetermine area of rectangle\\n\"\n", + "print \"\\n3\\tDetermine volume of rectangle\\n\"\n", + "selection = int(raw_input(\"\\nEnter selection : \"))\n", + "if selection == 1:\n", + " l = float(raw_input(\"Enter length: \"))\n", + " w = float(raw_input(\"Enter width: \"))\n", + " perimeter(l,w)\n", + "elif selection == 2:\n", + " l = float(raw_input(\"Enter length: \"))\n", + " w = float(raw_input(\"Enter width: \"))\n", + " area(l,w)\n", + "elif selection == 3:\n", + " l = float(raw_input(\"Enter length: \"))\n", + " w = float(raw_input(\"Enter width: \"))\n", + " h = float(raw_input(\"Enter height: \"))\n", + " volume(l,w,h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The Function Wizard \n", + "\n", + "\n", + "1\tDetermine perimeter of ractangle\n", + "\n", + "\n", + "2\tDetermine area of rectangle\n", + "\n", + "\n", + "3\tDetermine volume of rectangle\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter selection : 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter length: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter width: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter height: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Perimeter is 6.0 \n", + "\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter5_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter5_1.ipynb new file mode 100755 index 00000000..ac86dba8 --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter5_1.ipynb @@ -0,0 +1,475 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:22dbf664bff583df60a7371a6f741be85c976f32fe9bef5f00f146ca5848d933" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Structured Programming" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page No 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def addTwoNumbers(operand1,operand2):\n", + " return operand1+operand2\n", + "\n", + "print \"Nothing happenning here\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nothing happenning here\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page No 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def addTwoNumbers(num1,num2):\n", + " return num1+num2\n", + "\n", + "def subtractTwoNumber(num1,num2):\n", + " return num1-num2\n", + "\n", + "print \"Nothing happenning here\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nothing happenning here\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page No 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def addTwoNumbers(operand1,operand2):\n", + " return operand1+operand2\n", + "\n", + "\n", + "iResult= addTwoNumbers(5,5)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page No 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def addTwoNumbers(operand1,operand2):\n", + " return operand1+operand2\n", + "\n", + "print \"The result is : \",addTwoNumbers(5,5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The result is : 10\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page No 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def addTwoNumbers(operand1,operand2):\n", + " return operand1+operand2\n", + "\n", + "num1=int(raw_input(\"Enter the first number: \"))\n", + "num2=int(raw_input(\"Enter the second number: \"))\n", + "print \"The result is: \",addTwoNumbers(num1,num2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the first number: 57\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the second number: 43\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The result is: 100\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6, Page No 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def printReportHeader():\n", + " print \"\\n Column1 \\t Column2 \\t Column3 \\t Column4 \\n\"\n", + " \n", + "printReportHeader()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Column1 \t Column2 \t Column3 \t Column4 \n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page No 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num1=int(raw_input(\"Enter a number: \"))\n", + "print \"You entered \",num1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered 10\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8, Page No 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def getSecondNumber():\n", + " num1=int(raw_input(\"Enter Second number: \"))\n", + " return num1\n", + "\n", + "num1=int(raw_input(\"Enter a number: \"))\n", + "num2=getSecondNumber()\n", + "print \"you entered \"+str(num1)+\" and \",str(num2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 28\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Second number: 35\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "you entered 28 and 35\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9, Page No 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iLuckyNumber=int()\n", + "def printLuckyNumber():\n", + " print \"Your lucky number is: \",iLuckyNumber\n", + "\n", + "\n", + "iLuckyNumber=int(raw_input(\"Enter your lucky number: \"))\n", + "printLuckyNumber()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your lucky number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your lucky number is: 10\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10, Page No 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import os\n", + "import time\n", + "def sportsQuestion():\n", + " print \"Sports Question\"\n", + " print \"What University did NFL star Deon Sanders attend?\"\n", + " print \"1 \\t University of Miami\"\n", + " print \"2 \\t California State University\"\n", + " print \"3 \\t Indiana University\"\n", + " print \"4 \\t Florida State University\"\n", + " iAnswer=int(raw_input(\"Enter your selection :\"))\n", + " return iAnswer\n", + "\n", + "def geographyQuestion():\n", + " print \"Geography Question\"\n", + " print \"What is the state capitol of Florida?\"\n", + " print \"1 \\t Pensecola\"\n", + " print \"2 \\t Tallahassee\"\n", + " print \"3 \\t Jacksonville\"\n", + " print \"4 \\t Miami\"\n", + " iAnswer=int(raw_input(\"Enter your selection :\"))\n", + " return iAnswer\n", + "def pause(inNum):\n", + " iCurrentTime=0\n", + " iElapsedTime=0\n", + " \n", + " iCurrentTime=int(round(time.time()*1000))\n", + " \n", + " while((iElapsedTime-iCurrentTime)4):\n", + " iIndex=int(raw_input(\"Enter a valid index (0-4): \"))\n", + " \n", + "print \"The value of index \"+str(iIndex)+\" is \"+str(iArray[iIndex])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a valid index (0-4): 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of index 4 is 9\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page No 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "cArray = range(5)\n", + "cName=\"Olivia\"\n", + "\n", + "print \"\\nCharacter array not initialized:\\n\"\n", + "\n", + "for x in range(5):\n", + " print \"Element \"+str(x)+\"'s Contents are \",cArray[x]\n", + "\n", + "print \"\\nInitialized character array: \"\n", + "for x in range(6):\n", + " print cName[x]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Character array not initialized:\n", + "\n", + "Element 0's Contents are 0\n", + "Element 1's Contents are 1\n", + "Element 2's Contents are 2\n", + "Element 3's Contents are 3\n", + "Element 4's Contents are 4\n", + "\n", + "Initialized character array: \n", + "O l i v i a\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page No 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iFound = -1\n", + "iArray=range(5)\n", + "\n", + "for x in range(5):\n", + " iArray[x]=(x+x)\n", + " \n", + "iValue=int(raw_input(\"Enter value to search for: \"))\n", + "\n", + "for x in range(5):\n", + " if (iArray[x]==iValue):\n", + " iFound=x\n", + " break\n", + "\n", + "if(iFound > -1):\n", + " print \"I found your search value in element \",iFound\n", + "else:\n", + " print \"Sorry, your search value was not found\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value to search for: 8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I found your search value in element 4\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page No 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iTwoD=[[0 for j in range(3)]for i in range(3)]\n", + "for x in range(3):\n", + " for y in range(3):\n", + " iTwoD[x][y]=(x+y)\n", + "for x in range(3):\n", + " for y in range(3):\n", + " print \"iTwoD[\"+str(x)+\"][\"+str(y)+\"]=\",iTwoD[x][y]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "iTwoD[0][0]= 0\n", + "iTwoD[0][1]= 1\n", + "iTwoD[0][2]= 2\n", + "iTwoD[1][0]= 1\n", + "iTwoD[1][1]= 2\n", + "iTwoD[1][2]= 3\n", + "iTwoD[2][0]= 2\n", + "iTwoD[2][1]= 3\n", + "iTwoD[2][2]= 4\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page No 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iTwoD=[[1,2,3],[4,5,6],[7,8,9]]\n", + "iFoundAt=[0,0]\n", + "\n", + "iValue=0\n", + "iFound=0\n", + "\n", + "iValue=int(raw_input(\"Enter your search value: \"))\n", + "\n", + "for x in range(3):\n", + " for y in range(3):\n", + " if(iTwoD[x][y]==iValue):\n", + " iFound=1\n", + " iFoundAt[0]=x\n", + " iFoundAt[1]=y\n", + " break\n", + " \n", + "if (iFound==1):\n", + " print \"Found value in iTwoD [\"+str(iFoundAt[0])+\"][\"+str(iFoundAt[1])+\"]\"\n", + "else:\n", + " print \"Value not found\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your search value: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Found value in iTwoD [2][0]\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8, Page No 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "board=range(9)\n", + "cWhoWon=' '\n", + "iCurrentPlayer=0\n", + "\n", + "def displayBoard():\n", + " print \"\\n\\t|\\t|\\n\"\n", + " print \"\\t|\\t|\\n\"\n", + " print \"\"+str(board[0])+\"\\t|\"+str(board[1])+\"\\t|\"+str(board[2])+\"\\n\"\n", + " print \"--------|-------|--------\\n\"\n", + " print \"\"+str(board[3])+\"\\t|\"+str(board[4])+\"\\t|\"+str(board[5])+\"\\n\"\n", + " print \"--------|-------|--------\\n\"\n", + " print \"\\t|\\t|\\n\"\n", + " print \"\"+str(board[6])+\"\\t|\"+str(board[7])+\"\\t|\"+str(board[8])+\"\\n\"\n", + " print \"\\t|\\t|\\n\"\n", + "\n", + "def verifySelection(iSquare,iPlayer):\n", + " if(board[iSquare-1]==' ' and (iPlayer==1 or iPlayer==0)):\n", + " board[iSquare-1]='X'\n", + " return 0\n", + " elif(board[iSquare-1]==' ' and iPlayer==2):\n", + " board[iSquare-1]='0'\n", + " return 0\n", + " else:\n", + " return 1\n", + " \n", + "def checkForWin():\n", + " global cWhoWon\n", + " if(board[0]=='X' and board[1]=='X' and board[2]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[3]=='X' and board[4]=='X' and board[5]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[6]=='X' and board[7]=='X' and board[8]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[0]=='X' and board[3]=='X' and board[6]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[1]=='X' and board[4]=='X' and board[7]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[2]=='X' and board[5]=='X' and board[8]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[0]=='X' and board[5]=='X' and board[8]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[2]=='X' and board[5]=='X' and board[6]=='X'):\n", + " cWhoWon='X'\n", + " elif(board[0]=='0' and board[1]=='0' and board[2]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[3]=='0' and board[4]=='0' and board[5]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[6]=='0' and board[7]=='0' and board[8]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[0]=='0' and board[3]=='0' and board[6]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[1]=='0' and board[4]=='0' and board[7]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[2]=='0' and board[5]=='0' and board[8]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[0]=='0' and board[5]=='0' and board[8]=='0'):\n", + " cWhoWon='0'\n", + " elif(board[2]=='0' and board[5]=='0' and board[6]=='0'):\n", + " cWhoWon='0'\n", + " \n", + " if(cWhoWon!=' '):\n", + " if(cWhoWon=='X'):\n", + " print \"\\nX Wins!\\n\"\n", + " return\n", + " \n", + " if(cWhoWon=='0'):\n", + " print \"\\n0 Wins!\\n\"\n", + " return\n", + " else:\n", + " return\n", + " \n", + " for x in range(9):\n", + " if(board[x]!=' '):\n", + " catTotal=catTotal+1\n", + " \n", + " if(catTotal==9):\n", + " cWhoWon='C'\n", + " print \"\\nCAT Game!\\n\"\n", + " return\n", + "iSquareNum=0\n", + "\n", + "for x in range(8):\n", + " board[x]=' '\n", + " \n", + "displayBoard()\n", + "\n", + "while(cWhoWon==' '):\n", + " print \"\\n\"+cWhoWon+\"\\n\"\n", + " \n", + " if(iCurrentPlayer==1 or iCurrentPlayer==0):\n", + " print \"\\nPLAYER X\\n\"\n", + " iSquareNum=int(raw_input(\"Enter an available square number (1-9): \"))\n", + " \n", + " if(verifySelection(iSquareNum,iCurrentPlayer)==1):\n", + " iCurrentPlayer=1\n", + " else:\n", + " iCurrentPlayer=2\n", + " else:\n", + " print \"\\nPLAYER 0\\n\"\n", + " iSquareNum=int(raw_input(\"Enter an available square number (1-9): \"))\n", + " \n", + " if(verifySelection(iSquareNum,iCurrentPlayer)==1):\n", + " iCurrentPlayer=2\n", + " else:\n", + " iCurrentPlayer=1\n", + " displayBoard()\n", + " checkForWin()\n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\t|\t|\n", + "\n", + "\t|\t|\n", + "\n", + " \t| \t| \n", + "\n", + "--------|-------|--------\n", + "\n", + " \t| \t| \n", + "\n", + "--------|-------|--------\n", + "\n", + "\t|\t|\n", + "\n", + " \t| \t|8\n", + "\n", + "\t|\t|\n", + "\n", + "\n", + " \n", + "\n", + "\n", + "PLAYER X\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an available square number (1-9): 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " \n", + "\n", + "\n", + "PLAYER 0\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an available square number (1-9): 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\t|\t|\n", + "\n", + "\t|\t|\n", + "\n", + "X\t|0\t| \n", + "\n", + "--------|-------|--------\n", + "\n", + " \t| \t| \n", + "\n", + "--------|-------|--------\n", + "\n", + "\t|\t|\n", + "\n", + " \t| \t|8\n", + "\n", + "\t|\t|\n", + "\n", + "\n", + " \n", + "\n", + "\n", + "PLAYER X\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an available square number (1-9): 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " \n", + "\n", + "\n", + "PLAYER 0\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an available square number (1-9): 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\t|\t|\n", + "\n", + "\t|\t|\n", + "\n", + "X\t|0\t|0\n", + "\n", + "--------|-------|--------\n", + "\n", + "X\t| \t| \n", + "\n", + "--------|-------|--------\n", + "\n", + "\t|\t|\n", + "\n", + " \t| \t|8\n", + "\n", + "\t|\t|\n", + "\n", + "\n", + " \n", + "\n", + "\n", + "PLAYER X\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an available square number (1-9): 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " \n", + "\n", + "\n", + "PLAYER 0\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an available square number (1-9): 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\t|\t|\n", + "\n", + "\t|\t|\n", + "\n", + "X\t|0\t|0\n", + "\n", + "--------|-------|--------\n", + "\n", + "X\t|0\t| \n", + "\n", + "--------|-------|--------\n", + "\n", + "\t|\t|\n", + "\n", + "X\t| \t|8\n", + "\n", + "\t|\t|\n", + "\n", + "\n", + "X Wins!\n", + "\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter7_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter7_1.ipynb new file mode 100755 index 00000000..c1085a33 --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter7_1.ipynb @@ -0,0 +1,582 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be75d77e91d7005f064cd2c560347aec768e900f2e81ef47804d4b096bc083a6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page No 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=5\n", + "iPtr=id(x)\n", + "iPtr=7" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page No 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=1\n", + "iPtr=id(x)\n", + "\n", + "iPtr=5\n", + "\n", + "print \"\\n*iPtr = \"+str(iPtr)+\"\\n &x = \"+str(id(x))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "*iPtr = 5\n", + " &x = 20176608\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page No 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=5\n", + "y=10\n", + "iPtr=None\n", + "\n", + "print \"Pointer points to: \",iPtr\n", + "iPtr=id(y)\n", + "print \"Ptr now points to: \",iPtr\n", + "x=iPtr\n", + "print \"The value of x is now\",x\n", + "iPtr=15\n", + "print \"The value of y is now\",iPtr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pointer points to: None\n", + "Ptr now points to: 20373108\n", + "The value of x is now 20373108\n", + "The value of y is now 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4, Page No 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def addTwoNumbers(x,y):\n", + " return x+y\n", + "\n", + "\n", + "x=0\n", + "y=0\n", + "\n", + "x=int(raw_input(\"Enter first number:\"))\n", + "y=int(raw_input(\"Enter second number:\"))\n", + "\n", + "print \"Result is: \",addTwoNumbers(x,y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number:10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number:15\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Result is: 25\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page No 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def demoPassByValue(x):\n", + " x+=5\n", + " print \"The value of x is:\",x\n", + "\n", + "x=0\n", + "x=int(raw_input(\"Enter a number:\"))\n", + "demoPassByValue(x)\n", + "print \"The original value of x did not change:\",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number:5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is: 10\n", + "The original value of x did not change: 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6, Page No 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def demoPassByReference(x):\n", + " x+=5\n", + " print \"The value of x is now\",x\n", + "\n", + "x=0\n", + "x=int(raw_input(\"Enter a number:\"))\n", + "demoPassByReference(x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number:10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is now 15\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7, Page No 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iArray=[1,2,3,4,5]\n", + "iPtr=id(iArray)\n", + "print \"Address of pointer: \",iPtr\n", + "print \"First address of array: \",id(iArray[0])\n", + "print \"Pointer points to: \",iArray[0]\n", + "print \"First element of array contains\",iArray[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address of pointer: 28621960\n", + "First address of array: 19652320\n", + "Pointer points to: 1\n", + "First element of array contains 1\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8, Page No 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def nameLength(name):\n", + " x=0\n", + " while(name[x] != '\\0'):\n", + " x+=1;\n", + " return x\n", + "aName='\\0'\n", + "aName=raw_input(\"Enter your first name: \")\n", + "aName=aName+'\\0'\n", + "print \"Your first name contains\"\n", + "print str(nameLength(aName))+\" characters\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your first name: mehta\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your first name contains\n", + "5 characters\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9, Page No 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def squareNumber(num):\n", + " for x in range(3):\n", + " num[x]=num[x]*num[x]\n", + "\n", + "iNumbers=[2,4,6]\n", + "print \"The current array value are:\"\n", + "\n", + "for x in range(3):\n", + " print iNumbers[x]\n", + "\n", + "print \"\\n\"\n", + "\n", + "squareNumber(iNumbers)\n", + "\n", + "print \"The modified array values are :\"\n", + "\n", + "for x in range(3):\n", + " print iNumbers[x]\n", + "\n", + "print \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current array value are:\n", + "2\n", + "4\n", + "6\n", + "\n", + "\n", + "The modified array values are :\n", + "4\n", + "16\n", + "36\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10, Page No 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def printArgument(num):\n", + " print \"Read only argument is: \",num\n", + " \n", + "iNumber=5\n", + "printArgument(iNumber)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Read only argument is: 5\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11, Page No 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def printArray(num):\n", + " for x in range(3):\n", + " print num[x]\n", + "\n", + "iNumbers=[2,4,6]\n", + "printArray(iNumbers)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n", + "4\n", + "6\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12, Page No 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def modifyArray(num):\n", + " for x in range(3):\n", + " num[x]=num[x]*num[x]\n", + " \n", + "iNumbers=[2,4,6]\n", + "modifyArray(iNumbers)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13, Page No 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "def encrypt(sMessage,random):\n", + " x=0\n", + " while(sMessage[x]):\n", + " sMessage+=str(random)\n", + " x+=1\n", + " x=0\n", + " print \"Encrypted message is: \"\n", + " \n", + " while(sMessage[x]):\n", + " print sMessage[x]\n", + " x+=1\n", + "\n", + "def decrypt(sMessage,random):\n", + " x=0\n", + " while(sMessage[x]):\n", + " sMessage[x]=sMessage[x]-str(random)\n", + " x+=1\n", + " x=0\n", + " while(sMessage[x]):\n", + " print sMessage[x]\n", + " x+=1\n", + " \n", + "myString=range(21)\n", + "iSelection=0\n", + "iRand= (random.randint(1,4)%4)+1\n", + "\n", + "while(iSelection != 4):\n", + " print \"\\n\\n1\\t Encrypt Clear Text\\n\"\n", + " print \"2\\tDecrypt Cipher Text\\n\"\n", + " print \"3\\tGenerate New Key\\n\"\n", + " print \"4\\tQuit\\n\"\n", + " iSelection=int(raw_input(\"\\nSelect a Cryptography Option: \"))\n", + " \n", + " if(iSelection ==1):\n", + " myString=raw_input(\"\\nEnter one word as clear text to encrypt: \")\n", + " encrypt(myString,iRand)\n", + " break\n", + " elif(iSelection==2):\n", + " myString=raw_input(\"\\nEnter cipher text to decrypt: \")\n", + " decrypt(myString,iRand)\n", + " break\n", + " elif(iSelection==3):\n", + " iRand= (random.randrange(1,4,1)%4)+1\n", + " print \"\\nNew Key Generated\\n\"\n", + " break\n", + " else:\n", + " exit(0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "1\t Encrypt Clear Text\n", + "\n", + "2\tDecrypt Cipher Text\n", + "\n", + "3\tGenerate New Key\n", + "\n", + "4\tQuit\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Select a Cryptography Option: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter one word as clear text to encrypt: bhavin\n" + ] + } + ] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter8_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter8_1.ipynb new file mode 100755 index 00000000..bca914f3 --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter8_1.ipynb @@ -0,0 +1,703 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2192643aa60481aa37dedf877c77d457bede1bb6978dcdba9008684a80b17ad1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 Strings" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page No. 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "myString=\"MIKE\"\n", + "print \"The pointer variable's value is: \", id(myString)\n", + "print \"The pointer variable points to: \",myString\n", + "print \"The memory locations for each character are::\"\n", + "for x in range(0,4):\n", + " print id(myString[x])," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The pointer variable's value is: 44562688\n", + "The pointer variable points to: MIKE\n", + "The memory locations for each character are::\n", + "19548160 20083536 20086752 20285008\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page No.183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "color=raw_input(\"Enter your favorite color: \")\n", + "print \"You entered: \",color" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your favorite color: Blue\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered: Blue\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page No.183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "color=raw_input(\"Enter your favorite color: \")\n", + "print \"You entered: \",color" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your favorite color: Black\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered: Black\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page No. 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "names = []\n", + "names.append(\"Michael\")\n", + "names.append(\"Sheila\")\n", + "names.append(\"Spencer\")\n", + "names.append(\"Hunter\")\n", + "names.append(\"Kenya\")\n", + "print \"\\nNames in pointer array of type char:\\n\"\n", + "for i in range(5):\n", + " print names[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Names in pointer array of type char:\n", + "\n", + "Michael\n", + "Sheila\n", + "Spencer\n", + "Hunter\n", + "Kenya\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page No.186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "colors = []\n", + "print \"Enter 3 colors: \"\n", + "for i in range(3):\n", + " colors.append(raw_input())\n", + "print \"Your entered: \"\n", + "for i in range(3):\n", + " print colors[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter 3 colors: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "blue\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "black\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "white\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your entered: \n", + "blue\n", + "black\n", + "white\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6, Page No.187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str1=\"123.79\"\n", + "str2=\"55\"\n", + "\n", + "print \"String1 is:\\\"\",str1,\"\\\"\"\n", + "print \"String2 is:\\\"\",str2,\"\\\"\"\n", + "\n", + "x=float(str1)\n", + "y=int(str2)\n", + "\n", + "print \"String 1 converted to a float is \",round(x,2)\n", + "print \"String 2 converted to an integer is \",y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String1 is:\" 123.79 \"\n", + "String2 is:\" 55 \"\n", + "String 1 converted to a float is 123.79\n", + "String 2 converted to an integer is 55\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7, Page No.188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str1=\"37\"\n", + "str2=\"20\"\n", + "\n", + "print \"String1 + String2 is \", str1+str2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String1 + String2 is 3720\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page No. 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str1=\"37\"\n", + "str2=\"20\"\n", + "iResult=int(str1)+int(str2)\n", + "print \"String1 + String2 is \", iResult" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String1 + String2 is 57\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9, Page No. 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str1=\"Michael\"\n", + "str2=\"Vine\"\n", + "print \"The length of string1 is \",len(str1)\n", + "print \"The length of string2 is \",len(str2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of string1 is 7\n", + "The length of string2 is 4\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10, Page No.191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def convertL(char):\n", + " char=char.lower()\n", + " print \"The first name converted to lower case is: \",char\n", + "def convertU(char):\n", + " char=char.upper()\n", + " print \"The first name converted to Upper case is: \",char\n", + "name1=\"Michael\"\n", + "name2=\"Vine\"\n", + "\n", + "convertL(name1)\n", + "convertU(name2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first name converted to lower case is: michael\n", + "The first name converted to Upper case is: VINE\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11, Page No.193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str2=\"C Language\"\n", + "str1=str2\n", + "print \"String 1 now contains \", str1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 1 now contains C Language\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12, Page No.194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str1=\"Computer Science \"\n", + "str2=\"is applied mathematics\"\n", + "print str1+str2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Computer Science is applied mathematics\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exmaple 8.13, Page No.195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str1=\"A\"\n", + "str2=\"A\"\n", + "str3=\"!\"\n", + "print str1\n", + "print str2\n", + "print str3\n", + "if str1==str2:\n", + " print \"Letter A is equal to letter A\"\n", + "if str1>str3:\n", + " print \"Letter A is greater than character !\"\n", + "if str3int(round(time.time()*1000))):\n", + " if displayed==0:\n", + " print \"find a word in:\"\n", + " print \"\",starGame[x]\n", + " displayed=1\n", + " os.system('cls')\n", + " answer=raw_input(\"Enter word found:\")\n", + " checkAnswer(starGame[x],answer)\n", + " displayed=0\n", + " startTime=int(round(time.time()*1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "word find\n", + "find a word in:\n", + " ADELANGUAGEFERVZOPIBMOU\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter word found:U\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry no word found...\n", + "find a word in:\n", + " ZBPOINTERSKLMLOOPMNOCOT\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter word found:T\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry no word found...\n", + "find a word in:\n", + " PODSTRINGGDIWHIEEICERLS\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter word found:S\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry no word found...\n", + "find a word in:\n", + " YVCPROGRAMMERWQKNULTHMD\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter word found:YV\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry no word found...\n", + "find a word in:\n", + " UKUNIXFIMWXIZEQZINPUTEX\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter word found:UKU\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry no word found...\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter9_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter9_1.ipynb new file mode 100755 index 00000000..aab6433a --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter9_1.ipynb @@ -0,0 +1,515 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:695fc05932ca1d30f19b3867fb7e2671008edb93009669dc709e27b0465efea9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Introduction to Data Structures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page No 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " def __init__(self,fname,lname,id1,salary):\n", + " self.fname = fname\n", + " self.lname = lname\n", + " self.id1 = id1\n", + " self.salary = salary\n", + "if __name__ == '__main__':\n", + " emp1 = employee(\"Michael\",\"Vine\",123,50000.00)\n", + " print \"\\n First name: \" + emp1.fname + \"\\n\"\n", + " print \"Last name: \" + emp1.lname + \"\\n\"\n", + " print \"Employee ID: \" + str(emp1.id1) + \"\\n\"\n", + " print \"Salary: \" + str(emp1.salary) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " First name: Michael\n", + "\n", + "Last name: Vine\n", + "\n", + "Employee ID: 123\n", + "\n", + "Salary: 50000.0\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page No 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " def __init__(self,fname,lname,id1,salary):\n", + " self.fname = fname\n", + " self.lname = lname\n", + " self.id1 = id1\n", + " self.salary = salary\n", + "if __name__ == '__main__':\n", + " emp1 = employee(\"Michael\",\"Vine\",123,50000.00)\n", + " print \"\\n First name: \" + emp1.fname + \"\\n\"\n", + " print \"Last name: \" + emp1.lname + \"\\n\"\n", + " print \"Employee ID: \" + str(emp1.id1) + \"\\n\"\n", + " print \"Salary: \" + str(emp1.salary) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " First name: Michael\n", + "\n", + "Last name: Vine\n", + "\n", + "Employee ID: 123\n", + "\n", + "Salary: 50000.0\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page No 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class scores:\n", + " def __init__(self,name,score):\n", + " self.name = name\n", + " self.score = score\n", + "if __name__ == '__main__':\n", + " highScores = []\n", + " highScores.append(scores(\"Hunter\",40768))\n", + " highScores.append(scores(\"Kenya\",38568))\n", + " highScores.append(scores(\"Apollo\",35985))\n", + " for x in range(3):\n", + " print \"\\n\" + highScores[x].name + \"\\t\" + str(highScores[x].score) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Hunter\t40768\n", + "\n", + "\n", + "Kenya\t38568\n", + "\n", + "\n", + "Apollo\t35985\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page No 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " def __init__(self,id1,name,salary):\n", + " self.id1 = id1\n", + " self.name = name\n", + " self.salary = salary\n", + "def processEmp(emp1):\n", + " emp1.id1 = 123\n", + " emp1.name = \"Sheila\"\n", + " emp1.salary = 65000.00\n", + "if __name__ == '__main__':\n", + " emp1 = employee(0,0,0)\n", + " processEmp(emp1)\n", + " print \"\\n Id : \" + str(emp1.id1) + \"\\n\"\n", + " print \"Name : \" + emp1.name + \"\\n\"\n", + " print \"Salary : \" + str(emp1.salary) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Id : 123\n", + "\n", + "Name : Sheila\n", + "\n", + "Salary : 65000.0\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5, Page No 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class player:\n", + " def __init__(self,name,score):\n", + " self.name = name\n", + " self.score = score\n", + "if __name__ == '__main__':\n", + " aPlayer = player(0,0)\n", + " ptrPlayer = id(aPlayer)\n", + " aPlayer.name = \"Pinball Wizard\"\n", + " aPlayer.score = 1000000.00\n", + " print \"\\nPlayer : \" + aPlayer.name + \"\\n\"\n", + " print \"Score : \" + str(aPlayer.score)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Player : Pinball Wizard\n", + "\n", + "Score : 1000000.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6, Page No 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " def __init__(self,id1,name,salary):\n", + " self.id1 = id1\n", + " self.name = name\n", + " self.salary = salary\n", + "def processEmp(emp1):\n", + " emp1.id1 = 123\n", + " emp1.name = \"Sheila\"\n", + " emp1.salary = 65000.00\n", + "if __name__ == '__main__':\n", + " emp1 = employee(0,0,0)\n", + " ptrEmp = id(emp1)\n", + " processEmp(emp1)\n", + " print \"\\nId : \" + str(emp1.id1) + \"\\n\"\n", + " print \"Name : \" + emp1.name + \"\\n\"\n", + " print \"Salary : \" + str(emp1.salary) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Id : 123\n", + "\n", + "Name : Sheila\n", + "\n", + "Salary : 65000.0\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7, Page No 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " def __init__(self,id1,name,salary):\n", + " self.id1 = id1\n", + " self.name = name\n", + " self.salary = salary\n", + "def processEmp(emp1 = []):\n", + " emp1.append(employee(123,\"Sheila\",65000.00))\n", + " emp1.append(employee(234,\"Hunter\",28000.00))\n", + " emp1.append(employee(456,\"Kenya\",48000.00))\n", + " return emp1\n", + "if __name__ == '__main__':\n", + " emp1 = []\n", + " emp1 = employee(0,0,0)\n", + " emp1 = processEmp(emp1 = [])\n", + " for x in range(3):\n", + " print \"\\nId : \" + str(emp1[x].id1) + \"\\n\" \n", + " print \"Name : \" + emp1[x].name + \"\\n\"\n", + " print \"Salary : \" + str(emp1[x].salary)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Id : 123\n", + "\n", + "Name : Sheila\n", + "\n", + "Salary : 65000.0\n", + "\n", + "Id : 234\n", + "\n", + "Name : Hunter\n", + "\n", + "Salary : 28000.0\n", + "\n", + "Id : 456\n", + "\n", + "Name : Kenya\n", + "\n", + "Salary : 48000.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page No 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class phonebook:\n", + " def __init__(self,name,number,address):\n", + " self.name = name\n", + " self.number = number\n", + " self.address = address\n", + "class magazine:\n", + " def __init__(self,name,author,isbn):\n", + " self.name = name\n", + " self.author = author\n", + " self.isbn = isbn\n", + "if __name__ == '__main__':\n", + " aBook = phonebook(\"John\",123,\"John Smith\")\n", + " aMagazine = magazine(\"C Programming\",\"Michael Vine\",1-59863-480-1)\n", + " print \"\\nUnion Details\\n\"\n", + " print \"Address for aBook.name: \" + str(id(aBook.name)) + \"\\n\"\n", + " print \"Address for aBook.number: \", str(id(aBook.number)) + \"\\n\"\n", + " print \"Address for aBook.address: \", str(id(aBook.address)) + \"\\n\"\n", + " print \"\\nStructure Details\\n\"\n", + " print \"Address for aMagazine.name: \", str(id(aMagazine.name)) + \"\\n\"\n", + " print \"Address for aMagazine.author: \", str(id(aMagazine.author)) + \"\\n\"\n", + " print \"Address for aMagazine.isbn: \", str(id(aMagazine.isbn)) + \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "Union Details\n", + "\n", + "Address for aBook.name: 66178424\n", + "\n", + "Address for aBook.number: 30796656\n", + "\n", + "Address for aBook.address: 66151792\n", + "\n", + "\n", + "Structure Details\n", + "\n", + "Address for aMagazine.name: 66151744\n", + "\n", + "Address for aMagazine.author: 66150976\n", + "\n", + "Address for aMagazine.isbn: 64689272\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9, Page No 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x = 12\n", + "y = 5\n", + "print \"\\nWithout Type-Casting\\n\"\n", + "print \"12 \\\\ 5 = \" + str(x/y) + \"\\n\"\n", + "print \"\\nWith Type-Casting\\n\"\n", + "print \"12 \\\\ 5 = \" + str(float(x)/float(y)) + \"\\n\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Without Type-Casting\n", + "\n", + "12 \\ 5 = 2\n", + "\n", + "\n", + "With Type-Casting\n", + "\n", + "12 \\ 5 = 2.4\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10, Page No 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "number = 86\n", + "letter = 'M'\n", + "print \"\\n86 type-casted to char is: \" + chr(number) + \"\\n\"\n", + "print \"\\n'M' type-casted to int is: \" + str(ord(letter)) + \"\\n \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "86 type-casted to char is: V\n", + "\n", + "\n", + "'M' type-casted to int is: 77\n", + " \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11, Page No 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# This program is not possible in python." + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_1.ipynb new file mode 100755 index 00000000..5c25ef5d --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_1.ipynb @@ -0,0 +1,117 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ed1073b28a905078eb23296522b8b59bf416e5275a011e43147248d1acd57f5a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 GETTING STARTED WITH C PROGRAMMING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page No. 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"C you later\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C you later\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page No. 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Chapter 1. Getting Started with C programming\"\n", + "print \"This is an example of format bug.\"\n", + "print \"The format issue can be corrected by using\"\n", + "print \"the \\n and \\\\ escape sequnece\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chapter 1. Getting Started with C programming\n", + "This is an example of format bug.\n", + "The format issue can be corrected by using\n", + "the \n", + " and \\ escape sequnece\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exmaple 1.3, Page No. 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Chapter 1. Getting Started with C programming\"\n", + "print \"This is an example of format bug.\"\n", + "print \"The format issue can be corrected by using\"\n", + "print \"the \\\\n and \\\\\\\\ escape sequnece\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chapter 1. Getting Started with C programming\n", + "This is an example of format bug.\n", + "The format issue can be corrected by using\n", + "the \\n and \\\\ escape sequnece\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_2.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_2.ipynb new file mode 100755 index 00000000..2f3c44af --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_2.ipynb @@ -0,0 +1,239 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:622f2c579033e8c66b476e16d61ce8bfa6745f6b87c5905b2064108fa5218b3c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 PRIMARY DATA TYPES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page No. 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=-4443\n", + "y=554.21\n", + "c='M'\n", + "\n", + "print \"The value of integer variable x is\" , x\n", + "print \"The value of float variable y is \" , y\n", + "print \"The value of character variable c is \" , c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of integer variable x is -4443\n", + "The value of float variable y is 554.21\n", + "The value of character variable c is M\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page No. 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x = 20\n", + "PI = 3.14\n", + "print \"Constant values are \",x ,\" and \", round(PI,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constant values are 20 and 3.14\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, Page No. 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"\\t Adder Program, by Michael Vine\"\n", + "iOperand1=int(raw_input(\"Enter First Operand: \"))\n", + "iOperand2=int(raw_input(\"Enter Second Operand: \"))\n", + "print \"The final result is \", iOperand1+iOperand2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\t Adder Program, by Michael Vine\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter First Operand: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Second Operand: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final result is 12\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, Page No. 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"\\t Adder Program, by Michael Vine\"\n", + "iOperand1=int(raw_input(\"Enter First Operand: \"))\n", + "iOperand2=int(raw_input(\"Enter Second Operand: \"))\n", + "iResult=iOperand1+iOperand2\n", + "print \"The result is \", iResult" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\t Adder Program, by Michael Vine\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter First Operand: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Second Operand: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The result is 12\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5, Page No. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fRevenue=float(raw_input(\"Enter total revenue: \"))\n", + "fCost=float(raw_input(\"Enter total cost: \"))\n", + "print \"Your total profit is \", round(fRevenue-fCost,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter total revenue: 4000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter total cost: 750\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your total profit is 3250.0\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_3.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_3.ipynb new file mode 100755 index 00000000..a87e263b --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_3.ipynb @@ -0,0 +1,499 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4698a1abef67d23e99c2eb6e9534a43d9d501d3ae6147f6ceb242f76f06f63a5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 CONDITIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page No. 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"\\tAC Control Unit\"\n", + "print \"1\\tTurn the AC on\"\n", + "print \"2\\tTurn the AC off\"\n", + "iResponse=int(raw_input(\"Enter your selection::\"))\n", + "if iResponse==1:\n", + " print \"AC is now on\"\n", + "if iResponse==2:\n", + " print \"AC is now off\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tAC Control Unit\n", + "1\tTurn the AC on\n", + "2\tTurn the AC off\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your selection::1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AC is now on\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page No. 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"\\tAC Control Unit\"\n", + "print \"a\\tTurn the AC on\"\n", + "print \"b\\tTurn the AC off\"\n", + "cResponse=raw_input(\"Enter your selection::\")\n", + "if cResponse=='a':\n", + " print \"AC is now on\"\n", + "if cResponse=='b':\n", + " print \"AC is now off\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tAC Control Unit\n", + "a\tTurn the AC on\n", + "b\tTurn the AC off\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your selection::b\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AC is now off\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page No. 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fBalance = 100.25\n", + "print \"\\tATM\"\n", + "print \"1\\tDeposit Funds\"\n", + "print \"2\\tWithdraw Funds\"\n", + "iSelection=int(raw_input(\"Enter Your Selection: \"))\n", + "if iSelection==1:\n", + " fTransAmount=int(raw_input(\"Enter fund amount to deposit: \"))\n", + " print \"Your new Balance is: \", fBalance+fTransAmount\n", + "if iSelection==2:\n", + " fTransAmount=int(raw_input(\"Enter fund amount to withdraw: \"))\n", + " if fTransAmout>fBalance:\n", + " print \"Insufficient Funds\"\n", + " else:\n", + " print \"Your new balance is \", fBalance-fTransAmount" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tATM\n", + "1\tDeposit Funds\n", + "2\tWithdraw Funds\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Your Selection: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter fund amount to deposit: 200\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your new Balance is: 300.25\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page No. 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "cResponse=raw_input(\"Enter a letter A: \")\n", + "if cResponse=='A':\n", + " print \"Correct response\"\n", + "else:\n", + " print \"Incorrect response\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a letter A: a\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Incorrect response\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page No.69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iResponse=int(raw_input(\"Enter a numeer from 1 to 10: \"))\n", + "if iResponse<1 or iResponse>10:\n", + " print \"Number not in Range\"\n", + "else:\n", + " print \"Thank You\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a numeer from 1 to 10: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thank You\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page No. 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "cResponse=raw_input(\"Please Enter a letter: \")\n", + "if not cResponse.isdigit():\n", + " print \"Thank You\"\n", + "else:\n", + " print \"You did not enter a letter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please Enter a letter: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You did not enter a letter\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7, Page No. 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "cResponse=raw_input(\"Please Enter a letter: \")\n", + "if cResponse.isdigit():\n", + " print \"Thank You\"\n", + "else:\n", + " print \"You did not enter a digit\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please Enter a letter: a\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You did not enter a digit\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page No.72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"1\\tSports\"\n", + "print \"2\\tGeography\"\n", + "print \"3\\tMusic\"\n", + "print \"4\\tWorld Events\"\n", + "iResponse=int(raw_input(\"Please select a category (1-4): \"))\n", + "if iResponse==1:\n", + " print \"You selected sports questions\"\n", + "elif iResponse==2:\n", + " print \"You selected geography questions\"\n", + "elif iResponse==3:\n", + " print \"You selected Music questions\"\n", + "elif iResponse==4:\n", + " print \"You selected World event questions\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\tSports\n", + "2\tGeography\n", + "3\tMusic\n", + "4\tWorld Events\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please select a category (1-4): 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You selected World event questions\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9, Page No. 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "iRandomNum=(random.randint(0,100)%10)+1\n", + "iResponse=int(raw_input(\"Guess a number between 1 and 10: \"))\n", + "if iResponse==iRandomNum:\n", + " print \"You guessed right\"\n", + "else:\n", + " print \"Sorry, you guess wrong\"\n", + " print \"The correct guess was \",iRandomNum" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Guess a number between 1 and 10: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry, you guess wrong\n", + "The correct guess was 3\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10, Page No. 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "iRandomNum=(random.randint(0,100)%4)+1\n", + "print \"Fortune Cookie - Chapter 3\"\n", + "if iRandomNum==1:\n", + " print \"You will meet a new friend\"\n", + "elif iRandomNum==2:\n", + " print \"You will enjoy a long and happy life\"\n", + "elif iRandomNum==3:\n", + " print \"Opportunity knocks softly. Can you hear it?\"\n", + "elif iRandomNum==4:\n", + " print \"You'll be financially rewarded for your good deeds\"\n", + "\n", + "print \"Lucky lotto numbers\"\n", + "print (random.randint(0,100)%49+1)\n", + "print (random.randint(0,100)%49+1)\n", + "print (random.randint(0,100)%49+1)\n", + "print (random.randint(0,100)%49+1)\n", + "print (random.randint(0,100)%49+1)\n", + "print (random.randint(0,100)%49+1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fortune Cookie - Chapter 3\n", + "You will enjoy a long and happy life\n", + "Lucky lotto numbers\n", + "45\n", + "17\n", + "9\n", + "23\n", + "2\n", + "15\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_4.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_4.ipynb new file mode 100755 index 00000000..218595de --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_4.ipynb @@ -0,0 +1,688 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d985967b3e8d0e583d78d0a3306851320f330cc48579a1f62da314746570750f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 Looping Structures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 , Page No.88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=0\n", + "print \"The value of x is \",x\n", + "x+=1\n", + "print \"The value of x is \",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is 0\n", + "The value of x is 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2, Page No.89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=0\n", + "y=0\n", + "print \"The value of y is \", y+1\n", + "print \"The value of x is \", x+1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of y is 1\n", + "The value of x is 1\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page No.89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=0\n", + "y=1\n", + "x=(y)*2\n", + "print \"The Value of x \",x\n", + "x=0\n", + "y=1\n", + "x=(y+1)*2\n", + "print \"The Value of x \",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of x 2\n", + "The Value of x 4\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page No.90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=0\n", + "y=0\n", + "x=(y)*4\n", + "print \"The Value of x\", x\n", + "y=0\n", + "x=(y+1)*4\n", + "print \"The Value of x\", x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of x 0\n", + "The Value of x 4\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page No.92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=1\n", + "y=1\n", + "x=(y)*4\n", + "print \"The value of x is \",x\n", + "y=1\n", + "x=(y-1)*4\n", + "print \"The value of x is \",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is 4\n", + "The value of x is 0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page No. 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=1\n", + "y=2\n", + "x=y*x+1\n", + "print \"The value of x is: \",x\n", + "x=1\n", + "y=2\n", + "x+=y*x+1\n", + "print \"The value of x is: \",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is: 3\n", + "The value of x is: 4\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page No.94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=1\n", + "y=2\n", + "x=y*x+1\n", + "print \"The value of x is: \",x\n", + "x=1\n", + "y=2\n", + "x-=y*x+1\n", + "print \"The value of x is: \",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is: 3\n", + "The value of x is: -2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8, Page No.95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=0\n", + "while (x<10):\n", + " print \"The value of x is \",x\n", + " x=x+1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is 0\n", + "The value of x is 1\n", + "The value of x is 2\n", + "The value of x is 3\n", + "The value of x is 4\n", + "The value of x is 5\n", + "The value of x is 6\n", + "The value of x is 7\n", + "The value of x is 8\n", + "The value of x is 9\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page No.97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "iSelection=0\n", + "while (iSelection!=4):\n", + " print \"1\\tDeposit Funds\"\n", + " print \"2\\tWithdraw Funds\"\n", + " print \"3\\tPrint Balance\"\n", + " print \"4\\tQuit\"\n", + " iSelection=int(raw_input(\"Enter Your Selection(1-4): \"))\n", + "print \"Thank you\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\tDeposit Funds\n", + "2\tWithdraw Funds\n", + "3\tPrint Balance\n", + "4\tQuit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Your Selection(1-4): 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\tDeposit Funds\n", + "2\tWithdraw Funds\n", + "3\tPrint Balance\n", + "4\tQuit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Your Selection(1-4): 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thank you\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page No.99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=9\n", + "while (x<10):\n", + " print \"This printf statement is executed at least once\"\n", + " x=x+1\n", + "while (x<10):\n", + " print \"This printf statement is never executed \"\n", + " x=x+1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This printf statement is executed at least once\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11, Page No.100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for x in range(10,5,-1):\n", + " print \"The value of x is \",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of x is 10\n", + "The value of x is 9\n", + "The value of x is 8\n", + "The value of x is 7\n", + "The value of x is 6\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12, Page No.101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "iNumQuestions=int(raw_input(\"Enter the number of questions to ask: \"))\n", + "for x in range(iNumQuestions):\n", + " iRndNum1=(random.randint(0,100)%10)+1\n", + " iRndNum2=(random.randint(0,100)%10)+1\n", + " iResponse=int(raw_input(\"what is \"+ str(iRndNum1)+\" * \"+str(iRndNum2)+\" : \"))\n", + " if(iResponse==(iRndNum1*iRndNum2)):\n", + " print \"Correct\"\n", + " else:\n", + " print \"The Corrent answer was \", iRndNum1*iRndNum2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of questions to ask: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "what is 6 * 9 : 54\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Correct\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "what is 8 * 5 : 32\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Corrent answer was 40\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13, Page No.102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for x in range(10,5,-1):\n", + " if x==7:\n", + " break\n", + "print x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14, Page No.103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for x in range(10,5,-1):\n", + " if x==7:\n", + " continue\n", + " print x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n", + "9\n", + "8\n", + "6\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15, Page No.104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for x in range(25):\n", + " print \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16, Page No. 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import time\n", + "import random\n", + "import os\n", + "cYesNo=raw_input(\"Play a game of Concentration?(y or n)\")\n", + "if(cYesNo=='y' or cYesNo=='Y'):\n", + " i1=random.randint(0,100) % 100\n", + " i2=random.randint(0,100) % 100\n", + " i3=random.randint(0,100) % 100\n", + " print \"Concentrate on the next three numbers\\n\",i1,i2,i3\n", + " iCurrentTime=int(round(time.time()*1000))\n", + " iElapsedTime=int(round(time.time()*1000))\n", + " while((iCurrentTime-iElapsedTime)<3):\n", + " iElapsedTime=int(round(time.time()*1000))\n", + " os.system('cls')\n", + " iResp1=int(raw_input(\"Enter a number:\"))\n", + " iResp2=int(raw_input(\"Enter a number:\"))\n", + " iResp3=int(raw_input(\"Enter a number:\"))\n", + " \n", + " if(i1==iResp1 and i2==iResp2 and i3==iResp3):\n", + " print \"Congratulations!\"\n", + " else:\n", + " print \"Sorry, Correct numbers were \",i1,i2,i3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Play a game of Concentration?(y or n)n\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/README.txt b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/README.txt new file mode 100755 index 00000000..9bf2614f --- /dev/null +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/README.txt @@ -0,0 +1,10 @@ +Contributed By: Bhavin Mehta +Course: mca +College/Institute/Organization: Shri Brahmanand Institute of Computer Science - Chaparda +Department/Designation: Assistant Professor +Book Title: C Programming for the Absolute Beginner +Author: Michael Vine +Publisher: Thomson Course Technology United States of America +Year of publication: 2008 +Isbn: 1-59863-480-1 +Edition: 2nd edition \ No newline at end of file diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1.png new file mode 100755 index 00000000..0fc6a70b Binary files /dev/null and b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1.png differ diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1_1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1_1.png new file mode 100755 index 00000000..0fc6a70b Binary files /dev/null and b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1_1.png differ diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2.png new file mode 100755 index 00000000..6ceba6dc Binary files /dev/null and b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2.png differ diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2_1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2_1.png new file mode 100755 index 00000000..6ceba6dc Binary files /dev/null and b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2_1.png differ diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3.png new file mode 100755 index 00000000..101cd93b Binary files /dev/null and b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3.png differ diff --git a/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3_1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3_1.png new file mode 100755 index 00000000..101cd93b Binary files /dev/null and b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3_1.png differ diff --git a/Chemical_Engineering_Thermodynamics/README.txt b/Chemical_Engineering_Thermodynamics/README.txt deleted file mode 100755 index 98c63c7c..00000000 --- a/Chemical_Engineering_Thermodynamics/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Jai Mathur -Course: mca -College/Institute/Organization: IIT -Department/Designation: System Admin -Book Title: Chemical Engineering Thermodynamics -Author: Y. V. C. Rao -Publisher: Universities Press -Year of publication: 1997 -Isbn: 81-7371-048-1 -Edition: 1 \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch1.ipynb b/Chemical_Engineering_Thermodynamics/ch1.ipynb deleted file mode 100755 index c7a29075..00000000 --- a/Chemical_Engineering_Thermodynamics/ch1.ipynb +++ /dev/null @@ -1,145 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4f7d90cd7b10a2be32d6f9985c84b88b7895b54f53fda509a7ab6972ab90144a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1 : Introduction" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.1 Page No : 6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "# Variables\n", - "weight = 981. \t\t\t #weight of payload in N\n", - "gmoon = 1.62;\t\t\t #acceleration due to gravity on the moon in m/s**2\n", - "g = 9.81;\t\t\t #acceleration due to gravity on earth\n", - "\n", - "# Calculations\n", - "mass = weight/g; \t\t\t # Calculations of mass of the payload in kg (calculated as F = m*g)\n", - "weightmoon = mass*gmoon;\t\t\t # Calculations of weight of payload on the moon in N\n", - "\n", - "# Results\n", - "print ' The weight of payload on the moon = %d N'%(weightmoon);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The weight of payload on the moon = 162 N\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.2 Page No : 7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "# Variables\n", - "l = 15.;\t\t\t #length of the child's head in cm\n", - "b = 12.;\t\t\t #breadth of the child's head in cm\n", - "p = 101325.;\t\t\t #atmospheric pressure in Pa\n", - "\n", - "# Calculations\n", - "area = (l*b)/(10**4);\t\t\t # Calculations of area of the child's head in m**2\n", - "force = p*area;\t\t\t # Calculations of force exerted on the child's head due to atmospheric air in N\n", - "\n", - "# Results\n", - "print ' The force exerted on the childs head due to atmospheric air = %.2f N'%(force);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The force exerted on the childs head due to atmospheric air = 1823.85 N\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.3 Page No : 7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "\n", - "# Variables\n", - "rho_water = 1000.;\t\t\t #density of water flowing through the pipeline in kg/m**3\n", - "rho_manomtr = 1595.;\t\t #density of manometric fluid (carbon tetrachloride) in kg/m**3\n", - "l = 40.;\t \t\t #length between the selected sections in cm\n", - "theta = 45.\t\t\t #inclination of the manometer in degrees\n", - "g = 9.81;\t \t\t #acceleration due to gravity in m/s**2\n", - "\n", - "# Calculations\n", - "delp = (l/100.)*math.sin((theta*math.pi)/180.)*g*(rho_manomtr-rho_water); # Calculations of pressure drop between the required sections in Pa\n", - "\n", - "# Results\n", - "print ' The pressure drop between the required sections = %.2f Pa'%delp\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The pressure drop between the required sections = 1650.94 Pa\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch10.ipynb b/Chemical_Engineering_Thermodynamics/ch10.ipynb deleted file mode 100755 index 5d1a66e8..00000000 --- a/Chemical_Engineering_Thermodynamics/ch10.ipynb +++ /dev/null @@ -1,202 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 : Stability and phase transition in thermodynamic systems" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.2 Page No : 369" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P = 2;\t\t\t #number of phases (no unit)\n", - "C = 2;\t\t\t #number of components (no unit)\n", - "\n", - "# Calculations\n", - "F = C+2-P\n", - "\n", - "# Results\n", - "print \" The number of degrees of freedom = %d \"%(F);\n", - "print \"Two intensive properties are required to be specified to\\\n", - " describe the thermodynamic state of the system,and the fundamental relation in\\\n", - " the Gibbs free energy representation for this system is of the type, G = GT,P,N1,N2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The number of degrees of freedom = 2 \n", - "Two intensive properties are required to be specified to describe the thermodynamic state of the system,and the fundamental relation in the Gibbs free energy representation for this system is of the type, G = GT,P,N1,N2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.3 Page No : 370" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import cmath\n", - "import math\n", - "\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", - "w = 0.398;\t\t\t #acentric factor (no unit) \n", - "\n", - "# Calculations\n", - "Pguess = 0.215\n", - "\n", - "\n", - "Tr = T/Tc\n", - "Pr = (Pguess*10**6)/(Pc*10**5)\n", - "S = 0.37464+(1.54226*w)-(0.26992*w**2)\n", - "alpha1 = (1+(S*(1-math.sqrt(Tr))))**2;\n", - "a = (0.45724*R**2*Tc**2*alpha1)/(Pc*10**5)\n", - "b = (0.07780*R*Tc)/(Pc*10**5);\t\t\t \n", - "A = (a*Pguess*10**6)/(R*T)**2;\t\t\t \n", - "B = (b*Pguess*10**6)/(R*T);\t\t\t \n", - "alpha = -1+B\n", - "beeta = A-(2*B)-(3*B**2)\n", - "gaamma = -(A*B)+(B**2)+(B**3)\n", - "p = beeta-(alpha**2)/3;\t\t\n", - "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", - "D = (((q)**2)/4)+(((p)**3)/27);\t\t\t \n", - "\n", - "\n", - "if D>0:\n", - " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3);\n", - " Z_l = Z;\n", - " Z_v = Z;\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3);\t\t\t \n", - " Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " Z = [Z1 ,Z2, Z3];\n", - " Z_l = min(Z);\n", - " Z_v = max(Z);\n", - "else:\n", - " r = math.sqrt((-(p**3)/27));\t\t\t \n", - " theta = math.acos((-(q)/2)*(1./r));\t\t\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3)\n", - " Z = [Z1, Z2, Z3];\n", - " Z_l = min(Z)\n", - " Z_v = max(Z)\n", - "\n", - "\n", - "phi_l = math.exp(Z_l-1-math.log(Z_l-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_l+(B*(1+math.sqrt(2))))/(Z_l+(B*(1-math.sqrt(2)))))));\n", - "phi_v = math.exp(Z_v-1-math.log(Z_v-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_v+(B*(1+math.sqrt(2))))/(Z_v+(B*(1-math.sqrt(2)))))));\n", - "fl = Pguess*phi_l;\t\t\t # Calculations of the fugacity of the liquid in MPa\n", - "fv = Pguess*phi_v;\t\t\t # Calculations of the fugacity of the vapour in MPa\n", - "tolerance = 1e-3;\t\t\t #defining the tolerance to compare fl and fv\n", - "\n", - "if abs(fl-fv)tolerance:\n", - " Tr = T/Tc\n", - " Pr = (Prevised*10**6)/(Pc*10**5);\n", - " S = 0.37464+(1.54226*w)-(0.26992*w**2)\n", - " alpha1 = (1+(S*(1-math.sqrt(Tr))))**2;\n", - " a = (0.45724*R**2*Tc**2*alpha1)/(Pc*10**5)\n", - " b = (0.07780*R*Tc)/(Pc*10**5);\t\t\t \n", - " A = (a*Prevised*10**6)/(R*T)**2;\t\t\n", - " B = (b*Prevised*10**6)/(R*T);\t\t\t\n", - " alpha = -1+B;\t\t\t \n", - " beeta = A-(2*B)-(3*B**2);\n", - " gaamma = -(A*B)+(B**2)+(B**3)\n", - " p = beeta-(alpha**2)/3;\t\t\n", - " q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", - " D = (((q)**2)/4)+(((p)**3)/27);\t\n", - " \n", - " if D > 0:\n", - " Z=((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3); #One real root given by Eq.(3.32)\n", - " Z_l=Z;\n", - " Z_v=Z;\n", - " elif D==0:\n", - " Z1=((-2*(q/2))**(1./3))-(alpha/3); #Three real roots and two equal given by Eq.(3.33)\n", - " Z2=((q/2)**(1./3))-(alpha/3);\n", - " Z3=((q/2)**(1./3))-(alpha/3);\n", - " Z=[Z1, Z2, Z3];\n", - " Z_l=min(Z);\n", - " Z_v=max(Z);\n", - " else:\n", - " r = math.sqrt((-(p**3)/27));\t\t\t \n", - " theta = math.acos((-(q)/2)*(1./r));\t\t\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", - " Z = [Z1, Z2, Z3];\n", - " Z_l = Z[0];\n", - " Z_v = Z[1];\n", - "\n", - " phi_l = math.exp(Z_l-1-math.log(Z_l-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_l+(B*(1+math.sqrt(2))))/(Z_l+(B*(1-math.sqrt(2)))))));\n", - " phi_v = math.exp(Z_v-1-math.log(Z_v-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_v+(B*(1+math.sqrt(2))))/(Z_v+(B*(1-math.sqrt(2)))))));\n", - " fl = Prevised*phi_l;\t\n", - " fv = Prevised*phi_v;\t\n", - " Prevised = Prevised*fl/fv\n", - "\n", - "P = Prevised;\t\t\t\n", - "\n", - "# Results\n", - "print \" The vapour pressure of n-octane at 427.85K = %.5f\"%P,\" MPa\"\n", - "\n", - "# Note: answer is slightly differnt because of rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The vapour pressure of n-octane at 427.85K = 0.21196 MPa\n" - ] - } - ], - "prompt_number": 34 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch11.ipynb b/Chemical_Engineering_Thermodynamics/ch11.ipynb deleted file mode 100755 index 9c8a35bf..00000000 --- a/Chemical_Engineering_Thermodynamics/ch11.ipynb +++ /dev/null @@ -1,585 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 : Properties of solutions" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.1 Page No : 378" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "%matplotlib inline\n", - "import math \n", - "from numpy import *\n", - "from matplotlib.pyplot import *\n", - "\n", - "\n", - "# Variables\n", - "antoine_const_benzene = [6.87987,1196.760,219.161]\n", - "antoine_const_toluene = [6.95087,1342.310,219.187]\n", - "t = 95.\n", - "P = 101.325\n", - "\n", - "# Calculations\n", - "P1_s = 10**(antoine_const_benzene[0]-(antoine_const_benzene[1]/(t+antoine_const_benzene[2])))\t\t\t \n", - "P2_s = 10**(antoine_const_toluene[0]-(antoine_const_toluene[1]/(t+antoine_const_toluene[2])))\t\t\t\n", - "x1 = linspace(0,1,10)\n", - "i = 0;\t\t\t #iteration parameter\n", - "n = len(x1);\t\t\t #iteration parameter\n", - "P_tot = zeros(10)\n", - "y1 = zeros(10)\n", - "\n", - "while i" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.2 Page No : 384" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 95. \t\t \t #temperature of the equimolar vapour mixture of benzene and toluene in degree celsius\n", - "y1 = 0.5\t \t\t #mole fraction of benzene in vapour phase (no unit)\n", - "y2 = 0.5 \t\t\t #mole fraction of toluene in vapour phase (no unit)\n", - "P1_s = 1176.21\t\t\t #saturation pressure of benzene at T, taken from Example 11.1 in Torr\n", - "P2_s = 477.03\t\t\t #saturation pressure of toluene at T, taken from Example 11.1 in Torr\n", - "\n", - "# Calculations\n", - "P = 1./((y1/P1_s)+(y2/P2_s))\n", - "x1 = (y1*P)/P1_s;\t\t\t \n", - "x2 = 1-x1\n", - "\n", - "# Results\n", - "print 'The composition of the liquid which is in equilibrium with the equimolar vapour mixture of\\\n", - " benzene and toluene at 95 degree celsius is mole fraction of benzene\\\n", - " in liquid phase x1 = %f mole fraction of toluene in liquid phase x2 = %f '%(x1,x2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The composition of the liquid which is in equilibrium with the equimolar vapour mixture of benzene and toluene at 95 degree celsius is mole fraction of benzene in liquid phase x1 = 0.288542 mole fraction of toluene in liquid phase x2 = 0.711458 \n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.5 page no : 386" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variables\n", - "n_pentaneA = 6.87632 # Antoine constants\n", - "n_hexaneA = 6.91058\n", - "n_heptanA = 6.89386\n", - "n_pentaneB = 1075.780 \n", - "n_hexaneB = 1189.640\n", - "n_heptanB = 1264.370\n", - "n_pentaneC = 233.205\n", - "n_hexaneC = 226.205\n", - "n_heptanC = 216.640\n", - "pressure = 90 # pressure\n", - "\n", - "# Calculations\n", - "logP1 = n_pentaneA - (n_pentaneB/(90 + n_pentaneC))\n", - "P1 = round(10**logP1 *133.322 /1000,1)\n", - "logP2 = n_hexaneA - (n_hexaneB/(90 + n_hexaneC))\n", - "P2 = round(10**logP2 *133.322 /1000,2)\n", - "logP3 = n_heptanA - (n_heptanB/(90 + n_heptanC))\n", - "P3 = round(10**logP3 *133.322 /1000,2)\n", - "P = 200\n", - "K1 = round(P1/P,3)\n", - "K2 = round(P2/P,2)\n", - "K3 = P3/P\n", - "\n", - "# assume L/F = 0.4\n", - "L_F = 0.4\n", - "x1 = 0.3/(L_F + (1-L_F) * K1)\n", - "x2 = 0.3/(L_F + (1-L_F) * K2)\n", - "x3 = 0.4/(L_F + (1-L_F) * K3)\n", - "sum_x = x1+x2+x3\n", - "\n", - "# assume L/F = 0.752\n", - "L_F = 0.752\n", - "x1 = 0.3/(L_F + (1-L_F) * K1)\n", - "x2 = 0.3/(L_F + (1-L_F) * K2)\n", - "x3 = 0.4/(L_F + (1-L_F) * K3)\n", - "sum_x = round(x1+x2+x3,1) # which is equal to 1 \n", - "\n", - "# Hence, L/F = 0.752 is correct\n", - "y1 = K1*x1\n", - "y2 = K2*x2\n", - "y3 = K3*x3\n", - "\n", - "# Results\n", - "print \"Hence, fraction vaporized, V/F = 1-(L-F) = %.3f\"%(1-L_F)\n", - "print \"Compositions of liquid and vapor leaving the flash unit are :\"\n", - "print \"x1 = %.4f y1 = %.4f\"%(x1,y1)\n", - "print \"x2 = %.4f y2 = %.4f\"%(x2,y2)\n", - "print \"x3 = %.4f y3 = %.4f\"%(x3,y3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hence, fraction vaporized, V/F = 1-(L-F) = 0.248\n", - "Compositions of liquid and vapor leaving the flash unit are :\n", - "x1 = 0.2246 y1 = 0.5285\n", - "x2 = 0.3045 y2 = 0.2863\n", - "x3 = 0.4709 y3 = 0.1851\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.7 Page No : 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 45.\t \t\t #temperature of the mixture in degree celsius\n", - "A = 2.230\t\t\t #van laar constant for the system at T (no unit)\n", - "B = 1.959\t\t\t #van laar constant for the system at T (no unit)\n", - "n1 = 30. \t\t #mole percentage of nitromethane in the mixture ( in percentage)\n", - "\n", - "# Calculations\n", - "n2 = 100-n1\n", - "x1 = n1/100\n", - "x2 = 1-x1\n", - "gaamma1 = math.exp(A/(1+((A/B)*(x1/x2)))**2)\n", - "gaamma2 = math.exp(B/(1+((B/A)*(x2/x1)))**2)\n", - "\n", - "# Results\n", - "print 'The activity coefficients for the system using van laar equation is : gamma1 \\\n", - " = %f, gamma2 = %f \\t '%( gaamma1,gaamma2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The activity coefficients for the system using van laar equation is : gamma1 = 2.738343, gamma2 = 1.234443 \t \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.8 Page No : 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "n_azeo = 44.8;\t\t\t #azeotropic composition given as mole percentage\n", - "Tb = 68.24;\t\t\t #boiling point of mixture in degree celsius\n", - "P = 760.;\t\t\t #pressure in Torr\n", - "P1_s = 506.;\t\t\t #saturation pressure of ethanol at Tb in Torr\n", - "P2_s = 517.;\t\t\t #saturation pressure of benzene at Tb in Torr\n", - "n1 = 10.;\t\t\t #mole percentage of ethanol in the mixture (in percentage)\n", - "\n", - "# Calculations\n", - "x1 = n_azeo/100\n", - "x2 = 1-x1;\t\t\n", - "gaamma1 = P/P1_s\n", - "gaamma2 = P/P2_s\n", - "A = math.log(gaamma1)*(1+((x2*math.log(gaamma2))/(x1*math.log(gaamma1))))**2\n", - "B = math.log(gaamma2)*(1+((x1*math.log(gaamma1))/(x2*math.log(gaamma2))))**2\n", - "x1 = n1/100\n", - "x2 = 1-x1;\t\n", - "gaamma1 = math.exp(A/(1+((A/B)*(x1/x2)))**2)\n", - "gaamma2 = math.exp(B/(1+((B/A)*(x2/x1)))**2)\n", - "\n", - "# Results\n", - "print 'The van Laar constants for the system are : A = %f \\t B = %f '%(A,B)\n", - "print 'The activity coefficients for the system using van laar equation are\\\n", - " : gamma1 = %f \\t gamma2 = %f \\t '%( gaamma1,gaamma2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The van Laar constants for the system are : A = 1.910203 \t B = 1.328457 \n", - "The activity coefficients for the system using van laar equation are : gamma1 = 4.137783 \t gamma2 = 1.025531 \t \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.9 Page No : 399" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "\n", - "T = 45. \t\t\t #temperature of the system in degree celsius\n", - "A_12 = 0.1156;\t\t\t #Wilson's parameter for the system at T (no unit)\n", - "A_21 = 0.2879;\t\t\t #Wilson's parameter for the system at T (no unit)\n", - "x1 = 0.3;\t \t\t #mole fraction of nitromethane in the liquid mixture (no unit)\n", - "\n", - "# Calculations\n", - "x2 = 1-x1\n", - "ln_gaamma1 = -math.log(x1+(A_12*x2))+(x2*((A_12/(x1+(A_12*x2)))-(A_21/((A_21*x1)+x2))));\t\t\t\n", - "gaamma1 = math.exp(ln_gaamma1)\n", - "ln_gaamma2 = -math.log(x2+(A_21*x1))-(x1*((A_12/(x1+(A_12*x2)))-(A_21/((A_21*x1)+x2))));\t\t\t # Calculations of ln(activity coefficient) using Eq.(11.90) (no unit)\n", - "gaamma2 = math.exp(ln_gaamma2)\n", - "\n", - "# Results\n", - "print 'The activity coefficients for the system using Wilsons parameters are : gamma1 = %f \\\n", - " \\t gamma2 = %f \\t '%( gaamma1,gaamma2);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The activity coefficients for the system using Wilsons parameters are : gamma1 = 2.512605 \t gamma2 = 1.295788 \t \n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.10 Page No : 401" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 345.\t\t\t #temperature of the mixture in K\n", - "x1 = 0.8\t\t\t #mole fraction of ethanol in the liquid phase (no unit)\n", - "\n", - "nu_ki = [1,1,1,6]\t\t\t #number of groups of type: CH3, CH2, OH and ACH respectively (no unit)\n", - "R_k = [0.9011,0.6744,1.0000,0.5313];\t\t\t #Group volume parameter for CH3, CH2, OH and ACH respectively (no unit)\n", - "Q_k = [0.848,0.540,1.200,0.400];\t\t\t #Area parameter for CH3, CH2, OH and ACH respectively (no unit)\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "u12_u22 = -241.2287;\t\t#UNIQUAC parameter for the system in J/molK\n", - "u21_u11 = 2799.5827;\t\t#UNIQUAC parameter for the system in J/molK\n", - "z = 10. \t\t\t #co-ordination number usually taken as 10 (no unit)\n", - "\n", - "# Calculations\n", - "x2 = 1-x1\n", - "r1 = (nu_ki[0]*R_k[0])+(nu_ki[1]*R_k[1])+(nu_ki[2]*R_k[2]);\t\t\t \n", - "r2 = (nu_ki[3]*R_k[3])\n", - "phi1 = (x1*r1)/((x1*r1)+(x2*r2));\t\t\t \n", - "phi2 = (x2*r2)/((x2*r2)+(x1*r1));\t\t\t \n", - "q1 = (nu_ki[0]*Q_k[0])+(nu_ki[1]*Q_k[1])+(nu_ki[2]*Q_k[2])\t\t\t \n", - "q2 = (nu_ki[3]*Q_k[3])\t\t\t\n", - "theta1 = (x1*q1)/((x1*q1)+(x2*q2))\n", - "theta2 = (x2*q2)/((x1*q1)+(x2*q2))\n", - "l1 = ((z/2)*(r1-q1))-(r1-1);\t\t\n", - "l2 = ((z/2)*(r2-q2))-(r2-1);\t\t\n", - "tau_12 = math.exp(-(u12_u22)/(R*T));\t\t\n", - "tau_21 = math.exp(-(u21_u11)/(R*T));\t\t\n", - "tau_11 = 1.0;\t\t\t \n", - "tau_22 = 1.0;\t\t\t \n", - "\n", - "ln_gaamma1_c = math.log(phi1/x1)+((z/2)*q1*math.log(theta1/phi1))+l1-((phi1/x1)*((x1*l1)+(x2*l2)));\n", - "ln_gaamma2_c = math.log(phi2/x2)+((z/2)*q2*math.log(theta2/phi2))+l2-((phi2/x2)*((x1*l1)+(x2*l2)));\n", - "ln_gaamma1_r = q1*(1-math.log((theta1*tau_11)+(theta2*tau_21))-(((theta1*tau_11)/((theta1*tau_11)+(theta2*tau_21)))+((theta2*tau_12)/((theta1*tau_12)+(theta2*tau_22)))));\n", - "ln_gaamma2_r = q2*(1-math.log((theta1*tau_12)+(theta2*tau_22))-(((theta1*tau_21)/((theta1*tau_11)+(theta2*tau_21)))+((theta2*tau_22)/((theta1*tau_12)+(theta2*tau_22)))));\n", - "ln_gaamma1 = ln_gaamma1_c+ln_gaamma1_r\n", - "ln_gaamma2 = ln_gaamma2_c+ln_gaamma2_r\n", - "gaamma1 = math.exp(ln_gaamma1);\t\t\t \n", - "gaamma2 = math.exp(ln_gaamma2);\t\t\t \n", - "\n", - "# Results\n", - "print 'The activity coefficients for the system using the UNIQUAC equation are : gamma1 \\\n", - " = %f \\t gamma2 = %f \\t '%( gaamma1,gaamma2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The activity coefficients for the system using the UNIQUAC equation are : gamma1 = 1.060567 \t gamma2 = 3.679066 \t \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.11 Page No : 405" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 307.\t\t\t #temperature of the mixture in K\n", - "x1 = 0.3\t\t\t #mole fraction of acetone in the liquid phase (no unit)\n", - "\n", - "nu_ki = [1.,1.,2.,3.]\n", - "R_k = [0.9011,1.6724,0.6744]\n", - "Q_k = [0.848,1.488,0.540];\t\t\t \n", - "a_19 = 476.40;\t\t\t #group interaction parameter for the system in K\n", - "a_91 = 26.760;\t\t\t #group interaction parameter for the system in K\n", - "z = 10. \t\t\t #co-ordination number usually taken as 10 (no unit)\n", - "\n", - "# Calculations\n", - "x2 = 1-x1;\t\t\t # Calculations of mole fraction of benzene in liquid phase (no unit)\n", - "r1 = (nu_ki[0]*R_k[0])+(nu_ki[1]*R_k[1])\n", - "r2 = (nu_ki[2]*R_k[0])+(nu_ki[3]*R_k[2])\n", - "phi1 = (x1*r1)/((x1*r1)+(x2*r2))\n", - "phi2 = (x2*r2)/((x2*r2)+(x1*r1))\n", - "q1 = (nu_ki[0]*Q_k[0])+(nu_ki[1]*Q_k[1])\t\t\t\n", - "q2 = (nu_ki[2]*Q_k[0])+(nu_ki[3]*Q_k[2])\n", - "theta1 = (x1*q1)/((x1*q1)+(x2*q2));\n", - "theta2 = (x2*q2)/((x1*q1)+(x2*q2));\n", - "l1 = ((z/2)*(r1-q1))-(r1-1);\t\t\n", - "l2 = ((z/2)*(r2-q2))-(r2-1);\t\t\n", - "ln_gaamma1_c = math.log(phi1/x1)+((z/2)*q1*math.log(theta1/phi1))+l1-((phi1/x1)*((x1*l1)+(x2*l2)));\n", - "ln_gaamma2_c = math.log(phi2/x2)+((z/2)*q2*math.log(theta2/phi2))+l2-((phi2/x2)*((x1*l1)+(x2*l2)));\n", - "a_11 = 0.\n", - "a_99 = 0.\n", - "psi_19 = math.exp(-(a_19)/(T));\t\t\t\n", - "psi_91 = math.exp(-(a_91)/(T));\t\t\t\n", - "psi_11 = 1.;\t\t\t \n", - "psi_99 = 1.;\t\t\t \n", - "x1_1 = nu_ki[0]/(nu_ki[0]+nu_ki[1]);\t\t\t\n", - "x1_18 = nu_ki[1]/(nu_ki[0]+nu_ki[1]);\t\t\n", - "theta1_1 = (Q_k[0]*x1_1)/((Q_k[0]*x1_1)+(Q_k[1]*x1_18))\n", - "theta1_18 = (Q_k[1]*x1_18)/((Q_k[1]*x1_18)+(Q_k[0]*x1_1))\n", - "ln_tau1_1 = Q_k[0]*(1-math.log((theta1_1*psi_11)+(theta1_18*psi_91))-(((theta1_1*psi_11)/((theta1_1*psi_11)+(theta1_18*psi_91)))+((theta1_18*psi_19)/((theta1_1*psi_19)+(theta1_18*psi_11)))));\n", - "ln_tau1_18 = Q_k[1]*(1-math.log((theta1_1*psi_19)+(theta1_18*psi_99))-(((theta1_1*psi_91)/((theta1_1*psi_99)+(theta1_18*psi_91)))+((theta1_18*psi_99)/((theta1_1*psi_19)+(theta1_18*psi_99)))));\n", - "x2_1 = nu_ki[2]/(nu_ki[2]+nu_ki[3]);\t\t\t \n", - "x2_2 = nu_ki[3]/(nu_ki[2]+nu_ki[3]);\t\t\t \n", - "ln_tau2_1 = 0;\n", - "ln_tau2_2 = 0;\n", - "x_1 = ((x1*nu_ki[0])+(x2*nu_ki[2]))/((((x1*nu_ki[0])+(x1*nu_ki[1])))+((x2*nu_ki[2])+(x2*nu_ki[3])));\n", - "x_2 = ((x2*nu_ki[3]))/((((x1*nu_ki[0])+(x1*nu_ki[1])))+((x2*nu_ki[2])+(x2*nu_ki[3])));\n", - "x_18 = ((x1*nu_ki[1]))/((((x1*nu_ki[0])+(x1*nu_ki[1])))+((x2*nu_ki[2])+(x2*nu_ki[3])));\n", - "theta_1 = (Q_k[0]*x_1)/((Q_k[0]*x_1)+(Q_k[1]*x_18)+(Q_k[2]*x_2));\t\t\t\n", - "theta_2 = (Q_k[2]*x_2)/((Q_k[0]*x_1)+(Q_k[1]*x_18)+(Q_k[2]*x_2));\t\t\t\n", - "theta_18 = (Q_k[1]*x_18)/((Q_k[0]*x_1)+(Q_k[1]*x_18)+(Q_k[2]*x_2));\t\t\t\n", - "ln_tau_1 = Q_k[0]*(1-math.log((theta_1*psi_11)+(theta_2*psi_11)+(theta_18*psi_91))-((((theta_1*psi_11)+(theta_2*psi_11))/((((theta_1*psi_11)+(theta_2*psi_11))+(theta_18*psi_91)))+((theta_18*psi_19)/((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_11))))));\n", - "ln_tau_2 = Q_k[2]*(1-math.log((theta_1*psi_11)+(theta_2*psi_11)+(theta_18*psi_91))-((((theta_1*psi_11)+(theta_2*psi_11))/((((theta_1*psi_11)+(theta_2*psi_11))+(theta_18*psi_91)))+((theta_18*psi_19)/((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_11))))));\n", - "ln_tau_18 = Q_k[1]*(1-math.log((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_99))-(((((theta_1+theta_2)*psi_91)/((theta_1*psi_11)+(theta_2*psi_11)+(theta_18*psi_91)))+((theta_18*psi_99)/((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_11))))));\n", - "ln_gaamma1_r = (nu_ki[0]*(ln_tau_1-ln_tau1_1))+(nu_ki[1]*(ln_tau_18-ln_tau1_18));\n", - "ln_gaamma2_r = (nu_ki[2]*(ln_tau_1-ln_tau2_1))+(nu_ki[3]*(ln_tau_2-ln_tau2_2));\n", - "ln_gaamma1 = ln_gaamma1_c+ln_gaamma1_r\n", - "ln_gaamma2 = ln_gaamma2_c+ln_gaamma2_r\n", - "gaamma1 = math.exp(ln_gaamma1);\t\t\t\n", - "gaamma2 = math.exp(ln_gaamma2);\t\t\t\n", - "\n", - "# Results\n", - "print 'The activity coefficients for the system using the UNIFAC method are\\\n", - " : gamma1 = %f \\t gamma2 = %f \\t '%( gaamma1,gaamma2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The activity coefficients for the system using the UNIFAC method are : gamma1 = 2.149891 \t gamma2 = 1.191192 \t \n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch12.ipynb b/Chemical_Engineering_Thermodynamics/ch12.ipynb deleted file mode 100755 index fe626468..00000000 --- a/Chemical_Engineering_Thermodynamics/ch12.ipynb +++ /dev/null @@ -1,716 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 : Vapor liquid Equilibrium" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 12.1 Page No : 423" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "%matplotlib inline\n", - "import math \n", - "from numpy import *\n", - "from matplotlib.pyplot import *\n", - "\n", - "# Variables\n", - "T = 60.\t\t\t #temperature of the system in degree celsius\n", - "P = [237.60,265.20,317.50,333.00,368.70,387.20];\t\t\t #Pressure data in Torr (from Danneil et al.)\n", - "x1 = [0.0870,0.1800,0.4040,0.4790,0.7130,0.9070];\t\t\t #mole fraction of benzene in the liquid phase corresponding to the given pressure (no unit) (from Danneil et al.)\n", - "y1 = [0.1870,0.3400,0.5780,0.6420,0.7960,0.9220];\t\t\t #mole fraction of benzene in the vapour phase corresponding to the given pressure (no unit) (from Danneil et al.)\n", - "antoine_const_benzene = [6.87987,1196.760,219.161];\t\t\t #Antoine's constants for Benzene from Table A.7\n", - "antoine_const_heptane = [6.89386,1264.370,216.640];\t\t\t #Antoine's constants for heptane from Table A.7\n", - "\n", - "# Calculations\n", - "P1_s = 10**(antoine_const_benzene[0]-(antoine_const_benzene[1]/(T+antoine_const_benzene[2])));\n", - "P2_s = 10**(antoine_const_heptane[0]-(antoine_const_heptane[1]/(T+antoine_const_heptane[2])));\n", - "l = len(P);\t\t\t #iteration parameter\n", - "i = 0;\t\t\t #iteration parameter\n", - "gaamma1 = zeros(l)\n", - "gaamma2 = zeros(l)\n", - "ln_gaamma1_expt = zeros(l)\n", - "ln_gaamma2_expt = zeros(l)\n", - "gE_RTx1x2 = zeros(l)\n", - "while i" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 12.3 Page No : 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from numpy import *\n", - "# Variables\n", - "T = 25. \t\t\t #temperature of the system in degree celsius\n", - "A12 = 2.0522;\t\t\t #three suffix Margules parameters for the system (no unit)\n", - "A21 = 1.7201;\t\t\t #three suffix Margules parameters for the system (no unit)\n", - "P = [118.05,207.70,246.35,259.40,261.50,262.00,261.90,258.70,252.00];\t\t\t #Pressure data in Torr (from Tasic et al.)\n", - "x1 = [0.0115,0.1125,0.3090,0.5760,0.6920,0.7390,0.7575,0.8605,0.9250];\n", - "y1 = [0.1810,0.5670,0.6550,0.7050,0.7250,0.7390,0.7460,0.8030,0.8580];\n", - "antoine_const_acetone = [7.11714,1210.595,229.664];\t\t\t #Antoine's constants for acetone from Table A.7\n", - "antoine_const_chexane = [6.85146,1206.470,223.136];\t\t\t #Antoine's constants for cyclohexane from Table A.7\n", - "\n", - "# Calculations\n", - "P1_s = 10**(antoine_const_acetone[0]-(antoine_const_acetone[1]/(T+antoine_const_acetone[2])));\n", - "P2_s = 10**(antoine_const_chexane[0]-(antoine_const_chexane[1]/(T+antoine_const_chexane[2])));\n", - "\n", - "l = len(P)\n", - "ln_gaamma1 = zeros(l)\n", - "ln_gaamma2 = zeros(l)\n", - "gaamma1 = zeros(l)\n", - "gaamma2 = zeros(l)\n", - "P = zeros(l)\n", - "y1_calc = zeros(l)\n", - "j = 0;\t\n", - "\n", - "while j" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 12.9 Page No : 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from numpy import *\n", - "from matplotlib.pyplot import *\n", - "%matplotlib inline\n", - "# Variables\n", - "\n", - "P = 760.\t\t\t #pressure of the system in Torr\n", - "antoine_const_benzene = [6.87987,1196.760,219.161];\t\t\t #Antoine's constants for Benzene from Table A.7\n", - "t = linspace(60,100,9);\t\t\t #temperature range in degree celsius\n", - "\n", - "P2_s = [149.40,187.58,233.71,289.13,355.21,433.51,525.84,634.00,760.00];\n", - "x1 = linspace(0,1,6)\n", - "\n", - "# Calculations\n", - "l = len(t)\n", - "i = 0\n", - "P1_s = zeros(l)\n", - "P_tot = zeros(l)\n", - "\n", - "while i" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch13.ipynb b/Chemical_Engineering_Thermodynamics/ch13.ipynb deleted file mode 100755 index 8dc5f0be..00000000 --- a/Chemical_Engineering_Thermodynamics/ch13.ipynb +++ /dev/null @@ -1,235 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13 : Dilute solution laws" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.1 Page No : 478" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "weight = 10. \t\t\t #weight of NaCl in grams\n", - "volume = 1. \t \t\t #volume of water in litres\n", - "weight_water = 1000. \t\t\t # weight of water in grams (Weight = Volume*Density, density of water = 1g/cc = 1g/ml = 1000g/l)\n", - "molwt_NaCl = 58.5 \t\t\t #molecular weight of NaCl in grams\n", - "molwt_water = 18. \t\t\t #molecular weight of water in grams\n", - "hf = 6.002; \t\t\t #enthalpy change of fusion in kJ/mol at 0 degree celsius\n", - "P = 101.325; \t\t\t #pressure in kPa\n", - "T = 273.15; \t\t\t # freezing point temperature of water at the given pressure in K\n", - "R = 8.314; \t\t\t #universal gas constant in J/molK;\n", - "\n", - "# Calculations\n", - "x2 = (weight/molwt_NaCl)/((weight/molwt_NaCl)+(weight_water/molwt_water))\n", - "delt = (R*T**2*x2)/(hf*10**3)\n", - "\n", - "# Results\n", - "print ' The depression in freezing point of water when 10g of NaCl solute is added = %0.2f K'%(delt);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The depression in freezing point of water when 10g of NaCl solute is added = 0.32 K\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.2 Page No : 480" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "weight = 10.; \t\t \t #weight of NaCl in grams\n", - "volume = 1.; \t\t\t #volume of water in litres\n", - "weight_water = 1000.; \t\t\t # weight of water in grams (Weight = Volume*Density, density of water = 1g/cc = 1g/ml = 1000g/l)\n", - "molwt_NaCl = 58.5; \t\t\t #molecular weight of NaCl in grams\n", - "molwt_water = 18; \t\t\t #molecular weight of water in grams\n", - "lat_ht = 2256.94; \t\t\t #latent heat of vaporization in kJ/kg at 100 degree celsius (obtained from steam tables)\n", - "P = 101.325; \t\t\t #pressure in kPa\n", - "T = 373.15; \t\t\t #boiling point temperature of water at the given pressure in K\n", - "R = 8.314; \t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "x2 = 0.0031\n", - "hv = (lat_ht*molwt_water)/1000\n", - "delt = (R*T**2*x2)/(hv*10**3)\n", - "\n", - "# Results\n", - "print ' The elevation in boiling point of water when 10g of NaCl solute is added = %0.2f K'%(delt);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The elevation in boiling point of water when 10g of NaCl solute is added = 0.09 K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.3 Page No : 481" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "weight = 10.; \t\t\t #weight of NaCl in grams\n", - "weight_water = 1000.; \t\t\t # weight of water in grams\n", - "molwt_NaCl = 58.5; \t\t\t #molecular weight of NaCl in grams\n", - "molwt_water = 18.; \t\t\t #molecular weight of water in grams\n", - "T = 300.; \t\t\t #prevailing temperature of water in K\n", - "R = 8.314; \t\t\t #universal gas constant in (Pa m**3)/(mol K);\n", - "v = 18*10**-6;\t\t\t #molar volume in m**3/mol\n", - "\n", - "# Calculations\n", - "x2 = 0.0031\n", - "pi = ((R*T*x2)/v)*10**-3\n", - "\n", - "# Results\n", - "print ' The osmotic pressure of a solution conatining 10g of NaCl in 1000g of water at 300K = %0.2f kPa'%(pi);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The osmotic pressure of a solution conatining 10g of NaCl in 1000g of water at 300K = 429.56 kPa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.4 Page No : 483" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "\n", - "# Variables\n", - "temp = 20. \t\t\t # prevailing tempearture in degree celsius\n", - "melt_temp = 80.05; \t\t\t # melting point of naphthalene in degree celsius\n", - "hf = 18.574 \t\t\t # enthalpy of fusion in kJ/mol\n", - "R = 8.314 \t\t\t # universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "t = temp+273.15\n", - "melt_t = melt_temp+273.15\n", - "x2 = math.exp(((hf*10**3)/R)*((1./melt_t)-(1./t)))\n", - "\n", - "# Results\n", - "print ' The ideal solubility of naphthalene at 20 degree celsius = %0.4f'%(x2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The ideal solubility of naphthalene at 20 degree celsius = 0.2737\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.5 Page No : 483" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "t = 295.43; \t\t\t #prevailing temperature in K\n", - "sat_p = 6.05; \t\t\t #Sasturation pressure of carbon dioxide at the prevailing temperature in MPa\n", - "p = 0.1; \t\t\t #pressure at which solubility has to be determined in MPa\n", - "\n", - "# Calculations\n", - "x2 = p/sat_p\n", - "\n", - "# Results\n", - "print ' The solubility of carbon dioxide expressed in mole fraction of carbon dioxide in solution\\\n", - " at 0.1MPa = %0.4f'%(x2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The solubility of carbon dioxide expressed in mole fraction of carbon dioxide in solution at 0.1MPa = 0.0165\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch14.ipynb b/Chemical_Engineering_Thermodynamics/ch14.ipynb deleted file mode 100755 index e54d6be2..00000000 --- a/Chemical_Engineering_Thermodynamics/ch14.ipynb +++ /dev/null @@ -1,846 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14 : Chemical reaction equilibrium" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.1 Page No : 489" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "# Variables\n", - "T = 298.15;\t\t\t #temperature in K\n", - "del_Gf = [-137.327,-228.600,-394.815,0]; #the standard Gibbs free energy of formation of CO(g),H2O(g),CO2(g) and H2(g) in kJ\n", - "n = [1,1,-1,-1] \t\t\t #stoichiometric coefficients of CO(g),H2O(g),CO2(g) and H2(g) respectively (no unit)\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "del_G = (n[0]*del_Gf[0])+(n[1]*del_Gf[1])+(n[2]*del_Gf[2])+(n[3]*del_Gf[3]);\n", - "Ka = math.exp((-(del_G*10**3))/(R*T))\n", - "\n", - "# Results\n", - "print 'The standard Gibbs free energy of the water gas shift reaction at 298.15K = %0.3f kJ '%(del_G);\n", - "print 'The equilibrium constant of the water gas shift reaction at 298.15K = %0.3e '%(Ka);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The standard Gibbs free energy of the water gas shift reaction at 298.15K = 28.888 kJ \n", - "The equilibrium constant of the water gas shift reaction at 298.15K = 8.685e-06 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.2 Page No : 490" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 298.15;\t\t\t #temperature in K\n", - "P_s = 0.16716;\t\t\t #saturation pressure of CH3OH in bar at T\n", - "del_G1 = -166.215\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "f_v = 1\n", - "f_l = P_s\n", - "del_G2 = R*T*math.log(f_v/f_l)*10**-3;\t\t\t # Calculations of the value of del_G2 in kJ\n", - "del_G = del_G2+del_G1;\t\t\n", - "\n", - "# Results\n", - "print 'The standard Gibbs free energy of formation of CH3OHg = %0.3f kJ '%(del_G);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The standard Gibbs free energy of formation of CH3OHg = -161.781 kJ \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.3 Page No : 491" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "#The water gas shift reaction is given by: CO2(g)+H2(g)--->CO(g)+H2O(g)\n", - "T1 = 298.15 \t\t\t #initial temperature in K\n", - "Ka1 = 8.685*10**-6;\t\t\t #equilibrium constant for the water-gas shift reaction at T1 (no unit)\n", - "T2 = 1000.\t\t \t #temperature at which the equilibrium constant has to be determined in K\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "del_Hf = [-110.532,-241.997,-393.978,0];\t\t\t #the standard enthalpy of formation of CO(g),H2O(g),CO2(g) and H2(g) in kJ\n", - "n = [1,1,-1,-1];\t\t\t #stoichiometric coefficients of CO(g),H2O(g),CO2(g) and H2(g) respectively (no unit)\n", - "\n", - "# Calculations\n", - "#It is assumed that del_H is constant in the temperature range T1 and T2\n", - "del_H = (n[0]*del_Hf[0])+(n[1]*del_Hf[1])+(n[2]*del_Hf[2])+(n[3]*del_Hf[3])\n", - "Ka2 = Ka1*math.exp(((del_H*10**3)/R)*((1./T1)-(1./T2)));\t\t\t \n", - "\n", - "# Results\n", - "print 'The equilibrium constant for the water gas shift reaction at 1000K = %f '%(Ka2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The equilibrium constant for the water gas shift reaction at 1000K = 1.085357 \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.4 Page No : 492" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "P = 0.1 \t\t\t #pressure in MPa\n", - "T1 = 298.15;\t\t\t #initial temperature in K\n", - "Ka1 = 8.685*10**-6;\t\t\t #equilibrium constant for the water-gas shift reaction at T1 (no unit) (from Example 14.1)\n", - "T2 = 1000. \t\t\t #temperature at which the equilibrium constant is to be found, in K\n", - "del_H = 41.449;\t\t\t #smath.tan(math.radiansard enthalpy of the reaction at T1 in kJ (from Example 14.3)\n", - "a = [28.068,28.850,45.369,27.012];\n", - "b = [4.631*10**-3,12.055*10**-3,8.688*10**-3,3.509*10**-3]\n", - "c = [0,0,0,0];\n", - "d = [0,0,0,0];\n", - "e = [-0.258*10**5,1.006*10**5,-9.619*10**5,0.690*10**5]\n", - "n = [1,1,-1,-1]\n", - "R = 8.314;\t\t\n", - "Ka2_prev = 1.0855\n", - "\n", - "\n", - "# Calculations\n", - "del_a = (n[0]*a[0])+(n[1]*a[1])+(n[2]*a[2])+(n[3]*a[3]);\n", - "del_b = (n[0]*b[0])+(n[1]*b[1])+(n[2]*b[2])+(n[3]*b[3]);\n", - "del_c = (n[0]*c[0])+(n[1]*c[1])+(n[2]*c[2])+(n[3]*c[3]);\n", - "del_d = (n[0]*d[0])+(n[1]*d[1])+(n[2]*d[2])+(n[3]*d[3]);\n", - "del_e = (n[0]*e[0])+(n[1]*e[1])+(n[2]*e[2])+(n[3]*e[3]);\n", - "del_H0 = (del_H*10**3)-((del_a*T1)+((del_b/2)*T1**2)+((del_c/3)*T1**3)+((del_d/4)*T1**4)-(del_e/T1));\n", - "I = (math.log(Ka1))-((1./R)*((-del_H0/T1)+(del_a*math.log(T1))+((del_b/2)*T1)+((del_c/6)*T1**2)+((del_d/12)*T1**3)+((del_e/(2*T1**2)))));\n", - "Ka2 = math.exp(((1./R)*((-del_H0/T2)+(del_a*math.log(T2))+((del_b/2)*T2)+((del_c/6)*T2**2)+((del_d/12)*T2**3)+((del_e/(2*T2**2)))))+I);\n", - "\n", - "\t\t\t # Results\n", - "print 'The equilibrium constant for the water gas shift reaction at 1000K\\\n", - " by taking into account the variation of del_H with temperature = %f '%(Ka2);\n", - "print 'The equilibrium constant for the water gas shift reaction at 1000K without\\\n", - " considering the variation of del_H with temperature as given by Example14.3 = %0.4f '%(Ka2_prev);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The equilibrium constant for the water gas shift reaction at 1000K by taking into account the variation of del_H with temperature = 0.664976 \n", - "The equilibrium constant for the water gas shift reaction at 1000K without considering the variation of del_H with temperature as given by Example14.3 = 1.0855 \n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.5 page no : 494" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "import math\n", - "\n", - "# variables\n", - "deltaGf = -161.781 # kJ from exa. 14.2\n", - "deltaG298 = deltaGf - (-137.327)\n", - "deltaH298 = -200.660 - (-110.532)\n", - "deltaA = 18.382 - 28.068 - 2 * 27.012\n", - "deltaB = (101.564 - 4.631 - 2 * 3.509) * 10**-3\n", - "deltaC = -28.683 * 10**-6\n", - "deltaD = 0\n", - "deltaE = (0.258 - 2 * 0.690) * 10**5\n", - "T = 298.15\n", - "\n", - "# calculations\n", - "deltaHf298 = -238.648 + 37.988\n", - "deltaH0 = Symbol('deltaH0')\n", - "Eq = deltaH0 + deltaA*T + deltaB*T**2/2 + deltaC*T**3/3 - deltaE/T - deltaH298*1000\n", - "deltaH0 = solve(Eq,deltaH0)[0]/1000\n", - "I = Symbol('I')\n", - "\n", - "Eq1 = deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I + 24454\n", - "I = round(solve(Eq1,I)[0],3)\n", - "\n", - "T = 500\n", - "deltaG500 = (deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I)/1000\n", - "\n", - "Ka = math.exp(-22048/(8.314*T))\n", - "e = Symbol('e')\n", - "Eq3 = ( (e*(3-2*e)**2) / (1 - e)**3) / 0.4973 -1\n", - "e = round(solve(Eq3,e)[0],4)\n", - "yCH3OH = e/(3-2*e)\n", - "yco = (1-e)/(3-2*e)\n", - "yh2 = (2*(1-e) / (3-2*e))\n", - "\n", - "# Results\n", - "print \"E = %.4f\"%e\n", - "print \"YCH30H = %.4f\"%yCH3OH\n", - "print \"YCO = %.4f\"%yco\n", - "print \"YH2 = %.4f\"%yh2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "E = 0.0506\n", - "YCH30H = 0.0175\n", - "YCO = 0.3275\n", - "YH2 = 0.6550\n" - ] - } - ], - "prompt_number": 103 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.6, Page 496" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy.solvers import solve \n", - "from sympy import Symbol \n", - "\n", - "#Variables\n", - "e = Symbol('e')\n", - "\n", - "#Calculations\n", - "x = solve((((e/(3-2*e))/(((1-e)/(3-2*e))*(((2*(1-e))/(3-2*e))**2)))-49.73),e)\n", - "print \"e =\",round(x[0],3)\n", - "ych3oh = x[0]/(3-2*x[0])\n", - "yco = (1-x[0])/(3-2*x[0])\n", - "yh2 = ((2*(1-x[0]))/(3-2*x[0]))\n", - "print \"yCH3OH =\",round(ych3oh,4)\n", - "print \"yCO =\",round(yco,4)\n", - "print \"yH2 =\",round(yh2,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "e = 0.801\n", - "yCH3OH = 0.5731\n", - "yCO = 0.1423\n", - "yH2 = 0.2846\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.7 pageno : 497" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "\n", - "# variables\n", - "Ka = 4.973*10**-3 # from example 14.5\n", - "Ky = 25 * Ka # from example 14.5\n", - "\n", - "# calculations\n", - "e = Symbol('e')\n", - "Eq1 = ( (e*(4-e)**2)/(1-e)**3 ) / .1243 - 1\n", - "e = round(solve(Eq1,e)[0],5)\n", - "yCH3OH = e/(8-2*e)\n", - "yco = (1-e)/(8-2*e)\n", - "yh2 = (2*(1-e) / (8-2*e))\n", - "yA = 5/(8-2*e)\n", - "\n", - "# Results\n", - "print \"E = %.5f\"%e\n", - "print \"YCH30H = %.5f\"%yCH3OH\n", - "print \"YCO = %.5f\"%yco\n", - "print \"YH2 = %.5f\"%yh2\n", - "print \"YA = %.5f\"%yA" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "E = 0.00762\n", - "YCH30H = 0.00095\n", - "YCO = 0.12428\n", - "YH2 = 0.24857\n", - "YA = 0.62619\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.8 pageno : 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "\n", - "# variables\n", - "Ka = 4.973*10**-3 # example 14.5\n", - "Ky = 25 * Ka # example 14.5\n", - "\n", - "# calculations and results\n", - "e = Symbol('e')\n", - "Eq1= ((e*(1-e))/(1-2*e)**2)/.03108 - 1\n", - "e = solve(Eq1,e)\n", - "print \"part a\"\n", - "print \"e = %.5f and e = %.5f\"%(e[0],e[1])\n", - "print \"The admissible value is e = %.5f\"%e[0]\n", - "\n", - "print \"part b\"\n", - "print \"e = 0.0506 ( from example 14.5 )\"\n", - "\n", - "x = 4\n", - "e = Symbol('e')\n", - "Eq1= ((e/(1-e) ) * ( (5 - 2*e)/ (2-e) )**2)/ 0.4973 - 1\n", - "e = solve(Eq1,e)\n", - "print \"part c\"\n", - "print \"e = %.4f\" %(e[0])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part a\n", - "e = 0.02845 and e = 0.97155\n", - "The admissible value is e = 0.02845\n", - "part b\n", - "e = 0.0506 ( from example 14.5 )\n", - "part c" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "e = 0.0727\n" - ] - } - ], - "prompt_number": 134 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.9 pageno : 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "\n", - "# variables\n", - "Ka = 4.973*10**-3 # example 14.5\n", - "Ky = 25 * Ka # example 14.5\n", - "\n", - "# calculations\n", - "e = Symbol('e')\n", - "Eq1 = (0.02 + e)*(1.51-e)**2 / (1-e)**3 / Ky - 1\n", - "e = solve(Eq1,e)[0]\n", - "\n", - "# Results\n", - "print \"E = %.5f\"%e" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "E = 0.03165\n" - ] - } - ], - "prompt_number": 138 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.10 pageno : 500" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "%matplotlib inline\n", - "\n", - "from matplotlib.pyplot import *\n", - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "from scipy.integrate import quad\n", - "import math\n", - "\n", - "# variables\n", - "deltaA = round(28.850 - 27.012 - 0.5 * 30.255,2)\n", - "deltaB = (12.055 - 3.509 - 0.5 * 4.207) * 10**-3\n", - "deltaC = 0\n", - "deltaD = 0\n", - "deltaE = round((1.006 - 0.690 + 0.5 * 1.887),3) * 10**5\n", - "deltaH298 = -241.997\n", - "Ts = [2000,2500,3000,3500,3800]\n", - "deltaHt = []\n", - "deltaGt = []\n", - "Ka = []\n", - "Ea = []\n", - "Eb = []\n", - "\n", - "# Calculations\n", - "T = 298.15\n", - "deltaH0 = Symbol('deltaH0')\n", - "Eq = deltaH0 + deltaA*T + deltaB*T**2/2 + deltaC*T**3/3 + deltaD*T**4/4 - deltaE/T - deltaH298*1000\n", - "deltaH0 = round(solve(Eq,deltaH0)[0]/1000,3)\n", - "I = Symbol('I')\n", - "Eq1 = deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I + 228600\n", - "I = round(solve(Eq1,I)[0],3)\n", - "\n", - "def fun1(T1):\n", - " #return 42.1395*(T1 - 298.15) + 5.613*10**-3/2*(T1**2 - 298.15**2) + .2535 * 10**5 * (1./T1 - 1/298.15)\n", - " return 42.1395*T1 + 5.613*10**-3/2 * T1**2 + 0.2535*10**5/T1 - 12898.37\n", - "\n", - "for T in Ts:\n", - " Ht = deltaH0*1000 + deltaA*T + deltaB*T**2/2 + deltaC*T**3/3 + deltaD*T**4/4 - deltaE/T \n", - " Gt = deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I \n", - " ka = math.exp(-Gt/(8.314*T))\n", - " e = Symbol('e')\n", - " Eq2 = ( e * (3-e)**(1./2) ) / ( 1-e)**(3./2) / ka - 1\n", - " b = round(solve(Eq2)[0],4)\n", - " a = (quad(fun1,298.15,T)[0]/1000) / -Ht\n", - " deltaHt.append(Ht)\n", - " deltaGt.append(Gt)\n", - " Ka.append(ka)\n", - " Ea.append(a)\n", - " Eb.append(b)\n", - "\n", - "\n", - "# Results \n", - "plot(Ts,Ea,\"g\")\n", - "plot(Ts,Eb,\"b\")\n", - "xlabel(\"T(k)\")\n", - "ylabel(\"E\")\n", - "suptitle(\"Plot of e versus adiabatic reaction temperature\")\n", - "show()\n", - "print \"from plot, it can be seen that both lines are simultaneously satisfied at the point \\\n", - "\\nintersection where e = 0.68 and T = 3440 K\"\n", - "e = 0.68\n", - "T = 3440\n", - "yh2 = (1- e)/(1.5 - 0.5*e)\n", - "yo2 = 0.5*(1-e) / (1.5-0.5*e)\n", - "yh2o = e/(1.5- 0.5*e)\n", - "\n", - "print \"yH2 = %.4f\"%yh2\n", - "print \"yO2 = %.4f\"%yo2\n", - "print \"yH2O = %.4f\"%yh2o" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['solve', 'draw_if_interactive', 'e']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVGX/BvB7QBFMU3MhFRRDk8VhExEUFEvUXNMwNSUV\nLcLUfDNfWyzEyqXSst5SNHDLzD1NBfdRcUFAFLfMUGNRSRAVYp95fn+cHxMIM6HNcFjuz3VxOcuZ\nMzdnjvPleZ5znqMQQggQERHpYCJ3ACIiqt5YKIiISC8WC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m28iNjYWAHD69Gn06tVLtsxEhsBpxokew+rV\nq5Geno7Zs2frXEaj0cDNzQ1xcXGoV4+Nd6q52KIgegyvvPIKdu/erfc6zrt27YK/vz+LBNV4bFEQ\nEZFebFEQEZFeLBRERKQXCwUREenFQkFERHqxUBARkV4sFEREpNf/ARiuLhNA/r0uAAAAAElFTkSu\nQmCC\n", - "text": [ - "" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from plot, it can be seen that both lines are simultaneously satisfied at the point \n", - "intersection where e = 0.68 and T = 3440 K\n", - "yH2 = 0.2759\n", - "yO2 = 0.1379\n", - "yH2O = 0.5862\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.11 Page No : 506" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from numpy import *\n", - "\n", - "# Variables\n", - "stoichio_matrix = matrix([[-1,-1, 1, 3, 0, 0],[0, -1, -1, 1, 1 ,0],[-1, -2, 0 ,4, 1, 0], \\\n", - " [0,0, 1, 0, -1, 0.5],[-1, 2 ,0, 0, 1, -2],[-1, 1, 1, 1, 0, -1]])\t\t\t #Framing the stoichiometric coefficient matrix\n", - "\n", - "\n", - "# Calculations\n", - "\n", - "r = linalg.matrix_rank(stoichio_matrix)\n", - "\n", - "stoichio_matrix[0] = -stoichio_matrix[0];\n", - "stoichio_matrix[2] = stoichio_matrix[2]+stoichio_matrix[0];\n", - "stoichio_matrix[5:] = stoichio_matrix[5:]+stoichio_matrix[0];\n", - "stoichio_matrix[6:] = stoichio_matrix[6:]+stoichio_matrix[0];\n", - "stoichio_matrix[1] = -stoichio_matrix[1];\n", - "stoichio_matrix[2] = stoichio_matrix[2]+stoichio_matrix[1];\n", - "stoichio_matrix[5:] = stoichio_matrix[5:]-(3*stoichio_matrix[1]);\n", - "stoichio_matrix[6:] = stoichio_matrix[6:]-(2*stoichio_matrix[1]);\n", - "x = stoichio_matrix[:3]\n", - "y = stoichio_matrix[:4];\n", - "stoichio_matrix[:4] = y;\n", - "stoichio_matrix[:3] = x;\n", - "stoichio_matrix[5:] = stoichio_matrix[5:]+(4*stoichio_matrix[3]);\n", - "stoichio_matrix[6:] = stoichio_matrix[6:]+(2*stoichio_matrix[3]);\n", - "\n", - "\n", - "\n", - "# Results\n", - "print ' The stoichiometric coefficient matrix after performing the elementary row operations = ';\n", - "print (stoichio_matrix);\n", - "print ' The number of primary reactions = %d'%(r);\n", - "print ' The non zero rows are 1,2,4'\n", - "print ' The primary reactions are: CH4g)+H2Og)--->COg)+3H2g)%( COg)+H2Og)--->CO2g)+H2g),( CO2g)--->COg)+1./2)O2g)'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The stoichiometric coefficient matrix after performing the elementary row operations = \n", - "[[ 1. 1. -1. -3. -0. -0. ]\n", - " [-0. 1. 1. -1. -1. -0. ]\n", - " [ 0. 0. 0. 0. 0. 0. ]\n", - " [ 0. 0. 1. 0. -1. 0.5]\n", - " [-1. 2. 0. 0. 1. -2. ]\n", - " [ 0. -1. 1. 1. -1. 1. ]]\n", - " The number of primary reactions = 3\n", - " The non zero rows are 1,2,4\n", - " The primary reactions are: CH4g)+H2Og)--->COg)+3H2g)%( COg)+H2Og)--->CO2g)+H2g),( CO2g)--->COg)+1./2)O2g)\n" - ] - } - ], - "prompt_number": 169 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.13 pageno : 510" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "\n", - "# variables\n", - "Ka1 = 0.1429\n", - "Ka2 = 2\n", - "\n", - "# calculations and Results\n", - "\n", - "# assume e1 = .3\n", - "e2 = Symbol('e2')\n", - "Eq1 = ((0.3 - e2)*(0.3+e2) /((0.7 - e2) * 0.7)) / 0.1429 -1\n", - "e2 = solve(Eq1)\n", - "print \"E2 = %.1f and %.1f \"%(e2[0],e2[1])\n", - "\n", - "# since negative value is inadmissible. e2 = 0.2\n", - "e2 = round(e2[1],1)\n", - "e1 = Symbol('e1')\n", - "Eq2 = ((e1 + 0.2)*(0.2) /((0.8 - e1) *(e1 - 0.2) ) ) / 2 -1\n", - "e1 = solve(Eq2)\n", - "print \"E1 = %.1f and %.1f \"%(e1[0],e1[1])\n", - "e1 = round(e1[0],1)\n", - "print \"Satisfied results when e1 = %.1f and e2 = %.1f\"%(e1,e2)\n", - "\n", - "yA = (1-e1-e2)/2\n", - "yB = (1-e1)/2\n", - "yC = (e1-e2)/2\n", - "yD = (e1+e2)/2\n", - "yE = e2/2\n", - "\n", - "print \"yA = %.2f\"%yA\n", - "print \"yB = %.2f\"%yB\n", - "print \"yC = %.2f\"%yC\n", - "print \"yD = %.2f\"%yD\n", - "print \"yE = %.2f\"%yE\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "E2 = -0.1 and 0.2 \n", - "E1 = 0.3 and 0.6 \n", - "Satisfied results when e1 = 0.3 and e2 = 0.2\n", - "yA = 0.25\n", - "yB = 0.35\n", - "yC = 0.05\n", - "yD = 0.25\n", - "yE = 0.10\n" - ] - } - ], - "prompt_number": 214 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.14 page no : 515" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import Symbol\n", - "from sympy.solvers import solve\n", - "\n", - "# variables\n", - "Kc = 2.92\n", - "\n", - "# Calculations and results\n", - "e = Symbol('e')\n", - "Eq1 = (e*(10+e)/((5-e)*(10-e)))/Kc - 1\n", - "e = round(solve(Eq1)[0],4)\n", - "print \"E = %.4f\"%e\n", - "\n", - "cA = 5-e\n", - "cB = 10-e\n", - "cC = e\n", - "cD = 10+e\n", - "\n", - "print \"CA = %.4f kmol/m*3\"%cA\n", - "print \"CB = %.4f kmol/m*3\"%cB\n", - "print \"CC = %.4f kmol/m*3\"%cC\n", - "print \"CD = %.4f kmol/m*3\"%cD" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "E = 3.0446\n", - "CA = 1.9554 kmol/m*3\n", - "CB = 6.9554 kmol/m*3\n", - "CC = 3.0446 kmol/m*3\n", - "CD = 13.0446 kmol/m*3\n" - ] - } - ], - "prompt_number": 220 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.15, Page 517" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 1200. \t\t\t #temperature in K\n", - "T0 = 298.15 \t\t\t #reference temperature in K\n", - "a = [41.84,45.369,82.34];\n", - "b = [20.25*10**-3,8.688*10**-3,49.75*10**-3];\n", - "c = [0,0,0];\n", - "d = [0,0,0];\n", - "e = [-4.51*10**5,-9.619*10**5,-12.87*10**5];\n", - "del_Gf = [-604.574,-394.815,-1129.515]\n", - "del_Hf = [-635.975,-393.978,-1207.683]\n", - "n = [1,1,-1]\n", - "R = 8.314\n", - "\n", - "# Calculations\n", - "del_G = (n[0]*del_Gf[0])+(n[1]*del_Gf[1])+(n[2]*del_Gf[2]);\n", - "del_H = (n[0]*del_Hf[0])+(n[1]*del_Hf[1])+(n[2]*del_Hf[2]);\n", - "del_a = (n[0]*a[0])+(n[1]*a[1])+(n[2]*a[2]);\n", - "del_b = (n[0]*b[0])+(n[1]*b[1])+(n[2]*b[2]);\n", - "del_c = (n[0]*c[0])+(n[1]*c[1])+(n[2]*c[2]);\n", - "del_d = (n[0]*d[0])+(n[1]*d[1])+(n[2]*d[2]);\n", - "del_e = (n[0]*e[0])+(n[1]*e[1])+(n[2]*e[2]);\n", - "del_H0 = ((del_H*10**3)-((del_a*T0)+((del_b/2)*T0**2)+((del_c/3)*T0**3)+((del_d/4)*T0**4)-(del_e/T0)))*10**-3;\n", - "IR = (1./(T0))*((del_H0*10**3)-(del_a*T0*math.log(T0))-((del_b/2)*T0**2)-((del_c/6)*T0**3)-((del_d/12)*T0**4)-((del_e/2)*(1./T0))-(del_G*10**3));\n", - "del_G_T = ((del_H0*10**3)-(del_a*T*math.log(T))-((del_b/2)*T**2)-((del_c/6)*T**3)-((del_d/12)*T**4)-((del_e/2)*(1./T))-(IR*T))*10**-3;\n", - "Ka = math.exp((-del_G_T*10**3)/(R*T))\n", - "y = 1;\n", - "phi = 1;\n", - "f0 = 1;\n", - "P = (Ka*f0)/(phi*y)\n", - "\n", - "# Results\n", - "print ' The decomposition pressure,P = %f bar '%(P);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The decomposition pressure,P = 2.384295 bar \n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch2.ipynb b/Chemical_Engineering_Thermodynamics/ch2.ipynb deleted file mode 100755 index b7849ef3..00000000 --- a/Chemical_Engineering_Thermodynamics/ch2.ipynb +++ /dev/null @@ -1,117 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:76568d79b614fc85568c92855047632dbe19f5ec7540dbd287268967c3318f2b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 : Review of basic concepts" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.1 Page No : 29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "# Variables\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "t1 = 300.;\t\t\t #initial temperature of gas in K\n", - "p1 = 0.1;\t\t\t #initial pressure of the gas in MPa\n", - "p2 = 0.5;\t\t\t #pressure of gas after heating in MPa\n", - "p3 = 0.1;\t\t\t #pressure of gas after expansion in MPa\n", - "n = 1.; \t\t\t #number of moles of gas in mole\n", - "\n", - "# Calculations\n", - "w1 = 0*n; \t\t\t # Calculations of work done by the gas during heating in kJ (since dv = 0)\n", - "t2 = t1*(p2/p1);\t\t\t # Calculations of temperature of gas after heating in K\n", - "t3 = t2;\t\t \t # Calculations of temperature of gas after expansion in K (constant temperature expansion)\n", - "volume2 = p2/p3;\t\t\t # Calculations of ratio of volume of gas after expansion to the volume of gas after heating (no unit)\n", - "w2 = (R*t2*math.log(volume2)*n)/1000\n", - "volume3 = t3/t1;\t\t\n", - "w3 = (R*t1*(1-volume3)*n)/1000\n", - "work_net = w1+w2+w3;\t\t\t # Calculations of net work done by the gas for the process in kJ\n", - "\n", - "# Results\n", - "print ' Work done during heating process:Work from 1-2 = %d kJ '%(w1);\n", - "print ' Work done during constant temperature expansion: Work from 2-3 = %.3f kJ '%(w2);\n", - "print ' Work done during constant pressure compression: Work from 3-1 = %.3f kJ '%(w3);\n", - "print ' Net work done by the gas during the process = %.3f kJ '%(work_net);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Work done during heating process:Work from 1-2 = 0 kJ \n", - " Work done during constant temperature expansion: Work from 2-3 = 20.071 kJ \n", - " Work done during constant pressure compression: Work from 3-1 = -9.977 kJ \n", - " Net work done by the gas during the process = 10.095 kJ \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.2 Page No : 30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "v1 = 0.1;\t\t\t #volume of gas initially present in the cylinder in m**3\n", - "p1 = 0.1;\t\t\t #initial pressure of gas in MPa\n", - "p_atm = 0.1;\t\t #atmospheric pressure acting on the piston in MPa\n", - "v2 = 0.3;\t\t\t #volume of gas after heating in m**3\n", - "p2 = 0.6;\t\t\t #pressure of gas after heating in MPa\n", - "\n", - "# Calculations\n", - "work = ((p1+p2)*(v2-v1)*10**6)/(2*1000);\t\t\t # Calculations of work done by the gas in kJ \n", - "\n", - "# Results\n", - "print ' The work done by the gas = %d kJ'%(work);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The work done by the gas = 70 kJ\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch3.ipynb b/Chemical_Engineering_Thermodynamics/ch3.ipynb deleted file mode 100755 index 2b39d6e0..00000000 --- a/Chemical_Engineering_Thermodynamics/ch3.ipynb +++ /dev/null @@ -1,897 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8d10c3a8d696216084bffc2404a32e0b3c15831ac555c05fcb7016ab7d75d0e7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3 : PvT relations of fluids" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.1 Page No : 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "X = 0.8; \t\t\t #Quality of wet steam (no unit)\n", - "T = 150.;\t \t\t #Temperature of the wet steam in degree celsius\n", - "vf = 0.0010908;\t\t\t #molar volume of saturated liquid in m**3/kg\n", - "vg = 0.3924;\t\t\t #molar volume of saturated vapour in m**3/kg\n", - "uf = 631.63;\t\t\t #molar internal energy of the saturated liquid in kJ/kg\n", - "ug = 2558.6;\t\t\t #molar internal energy of the saturated vapour in kJ/kg\n", - "\n", - "# Calculations\n", - "V = (X*vg)+((1-X)*vf);\t\t\t # Calculations of specific volume in m**3/kg using Eq.(3.3)\n", - "U = (X*ug)+((1-X)*uf);\t\t\t # Calculations of specific internal energy in kJ/kg using Eq.(3.6)\n", - "\n", - "# Results\n", - "print 'The specific volume of wet steam = %0.4f m**3/kg '%(V);\n", - "print 'The specific internal energy of wet steam = %0.1f kJ/kg '%(U);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The specific volume of wet steam = 0.3141 m**3/kg \n", - "The specific internal energy of wet steam = 2173.2 kJ/kg \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.2 Page No : 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 1.42;\t\t\t #specific volume of wet steam in m**3/kg\n", - "T = 100.;\t\t\t #temperature of wet steam in degree celsius\n", - "vf = 0.0010437;\t\t #molar volume of saturated liquid in m**3/kg\n", - "vg = 1.673;\t\t\t #molar volume of saturated vapour in m**3/kg\n", - "\n", - "# Calculations\n", - "X = (V-vf)/(vg-vf);\t\t\t # Calculations of the quality of wet steam using Eq.(3.3) (no unit)\n", - "\n", - "# Results\n", - "print ' The quality of wet steam = %0.4f '%(X);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The quality of wet steam = 0.8487 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.3 Page No : 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 100.;\t\t\t #temperature inside the vessel in degree celsius\n", - "V = 0.00317;\t\t\t #specific volume of water at the critical point in m**3/kg\n", - "vf = 0.0010437;\t\t\t #molar volume of saturated liquid in m**3/kg\n", - "vg = 1.673;\t\t\t #molar volume of saturated vapour in m**3/kg\n", - "\n", - "# Calculations\n", - "X = (V-vf)/(vg-vf);\t\t\t # Calculations of the quality of wet steam using Eq.(3.3) (no unit)\n", - "ratio = (X*vg)/((1-X)*vf);\t\t\t # Calculations of volume ratio of saturated vapour to the saturated liquid (no unit)\n", - "\n", - "# Results\n", - "print ' The volume ratio of saturated vapour to the saturated liquid = %0.2f '%(ratio);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume ratio of saturated vapour to the saturated liquid = 2.04 \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.4 Page No : 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "U = 2000.\t\t\t #specific internal energy of liquid-vapour mixture in kJ/kg\n", - "uf = 850.6\t\t\t #specific internal energy of saturated liquid in kJ/kg\n", - "ug = 2593.2\t\t\t #specific internal energy of saturated vapour in kJ/kg\n", - "\n", - "# Calculations\n", - "mass_ratio = (U-uf)/(ug-U);\t\t\t # Calculations of the mass ratio of vapour to liquid using the lever rule (no unit)\n", - "\n", - "# Results\n", - "print ' The mass ratio of vapour to liquid = %0.4f '%(mass_ratio);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The mass ratio of vapour to liquid = 1.9376 \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.5 Page No : 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "n = 1.\t\t\t #number of moles of n-octane vapour in mol\n", - "T = 427.85;\t\t\t #tempearture of n-octane vapour in K\n", - "P = 0.215;\t\t\t #pressure n-octane vapour in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in (kPa m**3)/(kmol K)\n", - "\n", - "# Calculations\n", - "V = ((n*10**-3)*R*T)/(P*10**3);\t\t\t # Calculations of volume using ideal gas law-Eq.(3.9) in m**3\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane vapour = %f m**3 '%(V);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane vapour = 0.016545 m**3 \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.6 Page No : 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "n = 1.; \t\t\t #number of moles occupied by n-octane vapour in mol\n", - "T = 427.85;\t\t\t #temperature in K\n", - "P = 0.215;\t\t\t #saturation pressure in MPa\n", - "a = 3.789;\t\t\t #van der Waals constant in Pa(m**3/mol)**2\n", - "b = 2.37*10**-4;\t #van der Waals constant in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "Vguess = (n*R*T)/(P*10**6);\t\t\t \n", - "Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b\n", - "tolerance = 1e-6\n", - "\n", - "while abs(Vguess-Vnew)>tolerance:\n", - " Vguess = Vnew;\n", - " Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b;\t\t\t #the iteration process to solve the system of equation\n", - "\n", - "V = Vnew;\t\t\t #The volume calculated using the van der Waals equation in m**3/mol\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane vapour obtained by van der Waals equation = %f m**3/mol'%(V);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane vapour obtained by van der Waals equation = 0.015675 m**3/mol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.7 Page No : 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "n = 1.; \t\t\t #number of moles occupied by n-octane liquid in mol\n", - "T = 427.85;\t\t\t #temperature in K\n", - "P = 0.215;\t\t\t #saturation pressure in MPa\n", - "a = 3.789;\t\t\t #van der Waals constant in Pa(m**3/mol)**2\n", - "b = 2.37*10**-4;\t\t\t #van der Waals constant in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "Vguess = b\n", - "Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b\n", - "tolerance = 1e-6\n", - "while abs(Vguess-Vnew)>tolerance:\n", - " Vguess = Vnew;\n", - " Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b;\t\t\t #the iteration process to solve the system of equation\n", - "\n", - "V = Vnew;\t\t\t #The volume calculated using the van der Waals equation in m**3/mol\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane liquid obtained by van der Waals equation = %e m**3/mol'%(V);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane liquid obtained by van der Waals equation = 3.517652e-04 m**3/mol\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.8 Page No : 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "# Variables\n", - "T = 427.85; \t\t \t #temperature in K\n", - "P = 0.215;\t \t\t #saturation pressure in MPa\n", - "a = 3.789;\t\t \t #van der Waals constant in Pa(m**3/mol)**2\n", - "b = 2.37*10**-4;\t\t\t #van der Waals constant in m**3/mol\n", - "R = 8.314;\t\t \t #universal gas constant in (Pa m**3)/(mol K)\n", - "Pcvc = 3\n", - "RTc = 8.\n", - "# Calculations\n", - "#The Cardan's method simplifies the equation of state into a cubic equation which can be solved easily\n", - "#The general form of the cubic equation is (Z**3)+(alpha*Z**2)+(beeta*Z)+gaamma = 0, where alpha,beeta and gaamma are determined using established relations\n", - "\n", - "A = (a*P*10**6)/(R*T)**2;\t\t\t\n", - "B = (b*P*10**6)/(R*T);\t\t\t \n", - "alpha = -1-B;\t\t\t \n", - "beeta = A;\t\t\t \n", - "gaamma = -(A*B);\t\n", - "p = round(beeta-(alpha**2)/3,4)\n", - "q = round(((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma,4)\n", - "D = (q**2/4)+(p**3/27);\t\n", - "\n", - "\n", - "if D>0 :\n", - " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3);\n", - " vf = ((Z)*R*T)/(P*10**6);\t\t\n", - " vg = ((Z)*R*T)/(P*10**6);\t\t\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3);\t\n", - " Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " Z = [Z1 ,Z2, Z3];\n", - " vf = (min(Z)*R*T)/(P*10**6)\n", - " vg = (max(Z)*R*T)/(P*10**6)\n", - "else:\n", - " r = math.sqrt((-(p**3)/27));\t\t\t # Calculations of r using Eq.(3.38)\n", - " theta = math.cos((-(q)/2)*(1./r));\t\t\t # Calculations of theta in radians using Eq.(3.37)\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3);\t\t\t #Three unequal real roots given by Eqs.(3.34,3.35 and 3.36)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", - " Z = [Z1, Z2, Z3];\n", - " vf = (min(Z)*R*T)/(P*10**6)\n", - " vg = (max(Z)*R*T)/(P*10**6)\n", - "\n", - "crit = Pcvc/RTc \n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane saturated liquid obtained by Cardans method = %.3e m**3/mol'%(vf);\n", - "print ' The volume occupied by n-octane saturated vapour obtained by Cardans method = %.2e m**3/mol'%(vg);\n", - "print \" At the critical point, PcVc/RTc = %.3f\"%crit\n", - "\n", - "# Note: value of D is calculated wrongly in book. Please calculate manually." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane saturated liquid obtained by Cardans method = -9.345e-04 m**3/mol\n", - " The volume occupied by n-octane saturated vapour obtained by Cardans method = 1.55e-02 m**3/mol\n", - " At the critical point, PcVc/RTc = 0.375\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.9 Page No : 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from numpy import *\n", - "import math\n", - "\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature in K\n", - "P = 0.215;\t\t\t #saturation pressure in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "\n", - "# Calculations\n", - "a = (0.42748*R**2*Tc**2.5)/(Pc*100*10**3*math.sqrt(T));\t\t\t \n", - "b = (0.08664*R*Tc)/(Pc*100*10**3);\t\t\t\n", - "\n", - "\n", - "A = (a*P*10**6)/(R*T)**2;\t\t\t \n", - "B = (b*P*10**6)/(R*T);\n", - "alpha = -1.;\t\t\t\n", - "beeta = A-B-B**2.;\t\n", - "gaamma = -(A*B);\t\n", - "p = beeta-(alpha**2)/3.\n", - "q = ((2*alpha**3.)/27.)-((alpha*beeta)/3)+gaamma\n", - "D = (((q)**2)/4.)+(((p)**3)/27.);\t\t\t \n", - "#if D>0 then:\n", - " # Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", - " # vf = ((Z)*R*T)/(P*10**6)\n", - " # vg = ((Z)*R*T)/(P*10**6)\n", - "#elif D == 0:\n", - " # Z1 = ((-2*(q/2))**(1./3))-(alpha/3);\n", - " # Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " # Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " # Z = [Z1 ,Z2, Z3];\n", - " # vf = (min(Z)*R*T)/(P*10**6);\t\t\n", - " # vg = (max(Z)*R*T)/(P*10**6);\t\t\n", - "#else:\n", - "\n", - "r = math.sqrt((-(p**3)/27));\t\t\t\n", - "theta = (math.acos((-(q)/2)*(1./r)));\n", - "Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - "Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3);\t\n", - "Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", - "Z = [Z1, Z2, Z3];\n", - "vf = (min(Z)*R*T)/(P*10**6);\t\t\n", - "vg = (max(Z)*R*T)/(P*10**6);\t\t\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane saturated vapour) using Redlich-Kwong equation of state = %f m**3/mol'%(vg);\n", - "print ' The volume occupied by n-octane saturated liquid) using Redlich-Kwong equation of state = %f m**3/mol'%(vf);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane saturated vapour) using Redlich-Kwong equation of state = 0.015401 m**3/mol\n", - " The volume occupied by n-octane saturated liquid) using Redlich-Kwong equation of state = 0.000244 m**3/mol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.10 Page No : 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "# Variables\n", - "T = 180.;\t\t\t #temperature of water in degree celsius\n", - "P = 1.0027;\t\t\t #saturation pressure of water in MPa\n", - "Tc = 647.3;\t\t\t #critical temperature of water in K\n", - "Pc = 221.2;\t\t\t #critical pressure of water in bar\n", - "Tr = 0.7;\t\t\t #reduced temperature at which acentric factor was defined by Pitzer \n", - "\n", - "# Calculations\n", - "T1 = Tr*Tc; \t\t\t #calculating temperature in K using reduced temperature value\n", - "T1 = T1-273.15;\t\t\t #conversion to degree celsius\n", - "Pr = (P*10)/Pc;\t\t\t # Calculations of reduced pressure (no unit) using saturation pressure at t1. In this case t1 equals t, therefore the given saturation pressure is taken\n", - "w = -math.log10(Pr)-1.0;\t\t\t # Calculations of acentric factor using Eq.(3.62)\n", - "\n", - "# Results\n", - "print ' The acentric factor of water = %f '%(w);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The acentric factor of water = 0.343614 \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.11 Page No : 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 409.41;\t\t\t #temperature of n-octane in degree celsius\n", - "P = 4.98;\t\t\t #pressure in bar\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", - "w = 0.398;\t\t\t #acentric factor (no unit)\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "Tr = (T+273.15)/Tc;\t\n", - "Pr = P/Pc;\t\t\t\n", - "z0 = 0.96;\t\t\t\n", - "V1 = (z0*R*(T+273.15))/(P*10**5);\t\t\t \n", - "z1 = 0.01;\t\t\t \n", - "z = z0+(w*z1);\t\t\n", - "V2 = (z*R*(T+273.15))/(P*10**5)\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane obtained by the two parameter compressibilty \\\n", - " factor correlation = %f m**3/mol'%(V1);\n", - "print ' The volume occupied by n-octane obtained by the three parameter compressibility \\\n", - "factor correlation = %f m**3/mol'%(V2);\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane obtained by the two parameter compressibilty factor correlation = 0.010939 m**3/mol\n", - " The volume occupied by n-octane obtained by the three parameter compressibility factor correlation = 0.010985 m**3/mol\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.12 Page No : 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 1.;\t \t\t #volume of the tank in m**3\n", - "m = 180.;\t\t\t #mass of carbon dioxide in kg\n", - "T = 91.8;\t\t\t #temperature of the tank in degree celsius after it is placed in the vicinity of a furnace\n", - "Tc = 304.2;\t\t\t #critical temperature of carbon dioxide in K\n", - "Pc = 73.87;\t\t\t #critical pressure of carbon dioxide in bar\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "mwt = 44.*10**-3\t #molecular weight of carbon dioxide in kg/mol\n", - "n = m/mwt;\t\t\t # Calculations of number of moles of carbon dioxide in the tank in moles\n", - "MV = V/n;\t\t\t # Calculations of molar volume in m**3/mol\n", - "slope = (MV*Pc*10**5)/(R*(T+273.15));\t\t\t #slope of the straight line formed when z0 is plotted against Pr formed by using the relation z0 = (V*Pc*Pr)/(R*T)\n", - "Tr = (T+273.15)/Tc;\t\t\t # Calculations of reduced temperature (no unit)\n", - "\n", - "#At the given conditions, the state of CO2 must lie on the curve corresponding to the obtained value of Tr. To determine the state of CO2, a straight line passing through the origin, with the obtained value of slope is drawn on the z0 vs Pr plot of Fig.3.12 and the point of intersection of this straight line with the Tr curve is obtained to get the value of z0\n", - "z0 = 0.725;\t\t\t #value of compressibilty factor obtained by doing the above mentioned procedure\n", - "P = (z0*R*10**-6*(T+273.15))/(MV)\t\t\t # Calculations of pressure in MPa using Eq.(3.59)\n", - "\n", - "# Results\n", - "print ' The pressure developed by carbon dioxide = %.0f MPa'%(P);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The pressure developed by carbon dioxide = 9 MPa\n" - ] - } - ], - "prompt_number": 69 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.13 Page No : 73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "\n", - "# Variables\n", - "V = 1.;\t\t\t #volume of the tank in m**3\n", - "m = 180.;\t\t\t #mass of carbon dioxide in kg\n", - "T = 91.8;\t\t\t #temperature of the tank in degree celsius after it is placed in the vicinity of a furnace\n", - "Tc = 304.2;\t\t\t #critical temperature of carbon dioxide in K\n", - "Pc = 73.87;\t\t\t #critical pressure of carbon dioxide in bar\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "w = 0.239;\t\t\t #acentric factor (no unit)\n", - "\n", - "# Calculations\n", - "mwt = 44.*10**-3\n", - "n = m/mwt\n", - "MV = V/n;\t\t\t\n", - "Tr = (T+273.15)/Tc\n", - "z0 = 0.725\n", - "z_init = z0;\t\t\t \n", - "slope = (MV*Pc*10**5)/(R*(T+273.15));\t\t\t \n", - "Prguess = z_init/slope;\t\n", - "z1guess = 0.1;\t\t\t \n", - "tolerance = 1e-6;\t\t\t \n", - "\n", - "def solver_function(zi):\n", - " return zi-(z0+(w*z1guess))\n", - "\n", - "z = fsolve(solver_function,z1guess)\n", - "Pr = z/slope;\t\t\t \n", - "P = ((Pc*10**5)*Pr)*10**-6\n", - "\n", - "# Results\n", - "print ' The pressure developed by carbon dioxide = %f MPa'%(P);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The pressure developed by carbon dioxide = 9.295806 MPa\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.14 Page No : 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from scipy.optimize import fsolve\n", - "\n", - "\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", - "P = 0.215;\t\t\t #pressure of n-ocatne vapour in MPa\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "Pc = 2.497;\t\t\t #critical pressure of n-octane in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "Tr = T/Tc\n", - "Pr = P/Pc\n", - "z_init = 1\n", - "h = (0.08664*Pr)/(z_init*Tr)\n", - "tolerance = 1e-6;\t\t\t\n", - "\n", - "def solver_func(zi):\n", - " return zi-((1./(1-h))-((h/(1+h))*(4.93398/(Tr**(3./2)))))\n", - "\n", - "z = fsolve(solver_func,h)\n", - "V = (z*R*T)/(P*10**6);\t\t\t\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane vapour obtained by the generalized form of \\\n", - " \\n Redlich-Kwong equation of state = %.2e m**3/mol'%(V);\n", - "\n", - "\n", - "# Note : Answer may vary because of rouding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane vapour obtained by the generalized form of \n", - " Redlich-Kwong equation of state = 1.55e-02 m**3/mol\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.15 Page No : 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature in K\n", - "P = 0.215;\t\t\t #saturation pressure in MPa\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", - "w = 0.398;\t\t\t #acentric factor (no unit) \n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "#The Cardan's method simplifies the equation of state into a cubic equation which can be solved easily\n", - "#The general form of the cubic equation is (Z**3)+(alpha*Z**2)+(beeta*Z)+gaamma = 0, where alpha,beeta and gaamma are determined using established relations\n", - "\n", - "Tr = T/Tc\n", - "Pr = (P*10**6)/(Pc*10**5)\n", - "S = 0.48+(1.574*w)-(0.176*w**2)\n", - "alpha1 = (1+(S*(1-math.sqrt(Tr))))**2\n", - "a = (0.42748*R**2*Tc**2*alpha1)/(Pc*10**5)\n", - "b = (0.08664*R*Tc)/(Pc*10**5)\n", - "A = (a*P*10**6)/(R*T)**2\n", - "B = (b*P*10**6)/(R*T)\n", - "alpha = -1.\n", - "beeta = A-B-B**2\n", - "gaamma = -(A*B)\n", - "p = beeta-(alpha**2)/3\n", - "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", - "D = (((q)**2)/4.)+(((p)**3)/27.)\n", - "\n", - "if D>0:\n", - " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", - " vf = ((Z)*R*T)/(P*10**6)\n", - " vg = ((Z)*R*T)/(P*10**6)\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", - " Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " Z = [Z1, Z2, Z3];\n", - " vf = (min(Z)*R*T)/(P*10**6);\t\t\n", - " vg = (max(Z)*R*T)/(P*10**6);\t\t\n", - "else:\n", - " r = math.sqrt((-(p**3)/27));\t\t\n", - " theta = acos((-(q)/2)*(1./r));\t\t\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", - " Z = [Z1, Z2, Z3];\n", - " vf = (min(Z)*R*T)/(P*10**6)\n", - " vg = (max(Z)*R*T)/(P*10**6)\n", - "\n", - "# Results\n", - "print ' The volume occupied by n-octane saturated vapour obtained by Soave-Redlich-Kwong \\\n", - " equation of state = %f m**3/mol'%(vg);\n", - "print ' The volume occupied by n-octane saturated liquid obtained by Soave-Redlich-Kwong \\\n", - " equation of state = %f m**3/mol'%(vf);\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane saturated vapour obtained by Soave-Redlich-Kwong equation of state = 0.015207 m**3/mol\n", - " The volume occupied by n-octane saturated liquid obtained by Soave-Redlich-Kwong equation of state = 0.000227 m**3/mol\n" - ] - } - ], - "prompt_number": 74 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.16 Page No : 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature in K\n", - "P = 0.215;\t\t\t #saturation pressure in MPa\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", - "w = 0.398;\t\t\t #acentric factor (no unit) \n", - "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", - "\n", - "# Calculations\n", - "Tr = T/Tc;\t\t\t\n", - "Pr = (P*10**6)/(Pc*10**5)\n", - "S = 0.37464+(1.54226*w)-(0.26992*w**2)\n", - "alpha1 = (1+(S*(1-math.sqrt(Tr))))**2\n", - "a = (0.45724*R**2*Tc**2*alpha1)/(Pc*10**5)\n", - "b = (0.07780*R*Tc)/(Pc*10**5)\n", - "A = (a*P*10**6)/(R*T)**2\n", - "B = (b*P*10**6)/(R*T)\n", - "alpha = -1+B;\t\n", - "beeta = A-(2*B)-(3*B**2)\n", - "gaamma = -(A*B)+(B**2)+(B**3)\n", - "p = beeta-(alpha**2)/3;\t\t\n", - "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", - "D = (((q)**2)/4)+(((p)**3)/27)\n", - "\n", - "if D>0:\n", - " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", - " vf = ((Z)*R*t)/(P*10**6)\n", - " vg = ((Z)*R*t)/(P*10**6)\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", - " Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " Z = [Z1 ,Z2, Z3];\n", - " vf = (min(Z)*R*T)/(P*10**6)\n", - " vg = (max(Z)*R*T)/(P*10**6)\n", - "else:\n", - " r = math.sqrt((-(p**3)/27))\n", - " theta = .1533\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3);\t\t\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", - " Z = [Z1, Z2, Z3];\n", - " vf = (min(Z)*R*T)/(P*10**6)\n", - " vg = (max(Z)*R*T)/(P*10**6)\n", - " \n", - "# Results\n", - "print ' The volume occupied by n-octane saturated vapour, obtained by Peng\\\n", - "-Robinson equation of state = %.3e m**3/mol'%(vg);\n", - "print ' The volume occupied by n-octane saturated liquid, obtained by Peng-Robinson\\\n", - " equation of state = %.3e m**3/mol'%(vf);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume occupied by n-octane saturated vapour, obtained by Peng-Robinson equation of state = 1.514e-02 m**3/mol\n", - " The volume occupied by n-octane saturated liquid, obtained by Peng-Robinson equation of state = 2.003e-04 m**3/mol\n" - ] - } - ], - "prompt_number": 33 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch4.ipynb b/Chemical_Engineering_Thermodynamics/ch4.ipynb deleted file mode 100755 index 5433cf7c..00000000 --- a/Chemical_Engineering_Thermodynamics/ch4.ipynb +++ /dev/null @@ -1,1291 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4 : First law of thermodynamics and its applications" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.1 Page No : 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Q1 = 50.;\t\t\t #Energy added as heat in kJ when the system undergoes a process 1-2\n", - "W1 = 30.;\t\t\t #Work done by the system in kJ during the process 1-2\n", - "Q2 = -40.;\t\t\t #Energy rejected as heat in kJ during the process 2-3\n", - "W2 = -50.;\t\t\t #Work done on the system in kJ during the process 2-3\n", - "Q3 = 0.\t \t\t #System undergoes an adiabatic process to return to initial state\n", - "\n", - "# Calculations\n", - "U2_1 = Q1-W1\n", - "U3_2 = Q2-W2\n", - "U1_3 = (-U2_1)-(U3_2)\n", - "W3 = Q3-U1_3\n", - "net_work = W1+W2+W3\n", - "\n", - "# Results\n", - "print ' The net work done by the system = %d kJ'%(net_work);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The net work done by the system = 10 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.3 Page No : 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 1. \t\t\t #volume of tank in m**3;\n", - "N = 200.;\t\t\t #number of moles of carbon dioxide in tank in mol\n", - "T1 = 25.;\t\t\t #ambient temperature in degree celsius\n", - "I = 5.; \t\t\t #current in amperes passed through the resistor place in the tank\n", - "Voltage = 440.\t\t #voltage in volts existing across the resistor\n", - "t = 10.;\t\t\t #time in minutes for which the current is passed\n", - "a = 363.077*10**-3\t\t\t #van der waals constant in Pa (m**3/mol)**2\n", - "b = 0.043*10**-3\t\t\t #van der waals constant in m**3/mol\n", - "Cv = 32.34\t\t\t #molar heat capacity at constant volume in J/molK\n", - "R = 8.314\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "MV = V/N;\t\t\t # Calculations of molar volume in m**3/mol\n", - "Q = 0. \t\t\t #energy transfer as heat during the process\n", - "W_Pdv = 0.;\t\t\t #mechanical work done by the system\n", - "W_elec = -(Voltage*I*t*60)*(10**-6)\n", - "U2_1 = Q-(W_Pdv+W_elec);\t\t\t\n", - "T2 = ((U2_1*10**6)/(N*Cv))+(T1+273.15)\n", - "P = (((R*T2)/(MV-b))-(a/(MV**2)))*10**-3\n", - "\n", - "# Results\n", - "print ' The final pressure = %0.3f kPa '%(P);\n", - "print ' The final temperature = %0.2f K'%(T2);\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final pressure = 827.832 kPa \n", - " The final temperature = 502.23 K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.4 Page No : 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 0.1;\t\t\t #volume of tank in m**3\n", - "T1 = 200.;\t\t\t #initial temperature of saturated steam inside the tank in degree celsius\n", - "T2 = 150.;\t\t\t #temperature in degree celsius that the tank attains after some time due to poor insulation\n", - "P1 = 15.549;\t\t\t #pressure in bar obtained from steam tables corresponding to T1\n", - "vg1 = 0.1272;\t\t\t #specific volume of saturated vapour in m**3/kg obtained from steam tables corresponding to T1\n", - "hg1 = 2790.9;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables corresponding to T1\n", - "P2 = 4.76;\t\t\t #pressure in bar obtained from steam tables corresponding to T2\n", - "vf = 0.0010908;\t\t\t #specific volume of saturated liquid in m**3/kg obtained from steam tables corresponding to T2\n", - "vg2 = 0.3924;\t\t\t #specific volume of saturated vapour in m**3/kg obtained from steam tables corresponding to T2\n", - "hf = 632.15;\t\t\t #specific enthalpy of saturated liquid in kJ/kg obtained from steam tables corresponding to T1\n", - "hg2 = 2745.4;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables corresponding to T1\n", - "\n", - "# Calculations\n", - "ug1 = ((hg1*10**3)-(P1*10**5*vg1))*10**-3\n", - "uf = ((hf*10**3)-(P2*10**5*vf))*10**-3\n", - "ug2 = ((hg2*10**3)-(P2*10**5*vg2))*10**-3\n", - "v2 = vg1\n", - "X2 = (v2-vf)/(vg2-vf)\n", - "u2 = (X2*ug2)+((1-X2)*uf)\n", - "m = V/vg1\n", - "Q = m*(u2-ug1)\n", - "mf = m*(1-X2)\n", - "mg = m*X2\n", - "\n", - "# Results\n", - "print ' The energy transferred as heat = %f kJ'%(Q);\n", - "print ' The mass of liquid in the tank in the final state = %0.3f kg'%(mf)\n", - "print ' The mass of vapour in the tank in the final state = %0.3f kg'%(mg)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The energy transferred as heat = -1053.825572 kJ\n", - " The mass of liquid in the tank in the final state = 0.533 kg\n", - " The mass of vapour in the tank in the final state = 0.253 kg\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.5 Page No : 102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "W = 1.;\t \t\t #weight of steam in kg in the piston cylinder assembly\n", - "X = 0.8;\t\t\t #quality of steam (no unit)\n", - "T1 = 150.;\t\t\t #initial temperature of steam in degree celsius\n", - "T2 = 200.;\t\t\t #final temperature of steam in degree celsius\n", - "P1 = 476.;\t\t\t #pressure in kPa obatined from steam tables (corresponding to T1)\n", - "vf = 0.0010908;\t\t\t #specific volume of saturated liquid in m**3/kg obatined from steam tables (corresponding to T1)\n", - "vg = 0.3924;\t\t\t #specific volume of satuarted vapour in m**3/kg obatined from steam tables (corresponding to T1)\n", - "hf = 632.15;\t\t\t #specific enthalpy of saturated liquid in kJ/kg obtained from steam tables (corresponding to T1)\n", - "hg = 2745.4;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables (corresponding to T1)\n", - "\n", - "# Calculations\n", - "V1 = (X*vg)+((1-X)*vf)\n", - "h1 = (X*hg)+((1-X)*hf)\n", - "P2 = 0.476;\t\t\t \n", - "P_int1 = 0.4;\t\t\n", - "P_int2 = 0.5;\t\t\n", - "V_int1 = 0.5343;\t\n", - "V_int2 = 0.4250;\t\n", - "h_int1 = 2860.4;\t\n", - "h_int2 = 2855.1;\t\n", - "V2 = (((P2-P_int1)/(P_int2-P_int1))*(V_int2-V_int1))+V_int1\n", - "h2 = (((P2-P_int1)/(P_int2-P_int1))*(h_int2-h_int1))+h_int1\n", - "Q = (h2-h1)*W\n", - "W = P1*(V2-V1)*W\n", - "\n", - "# Results\n", - "print ' The work done by steam = %0.2f kJ '%(W);\n", - "print ' The net energy transferred as heat = %0.2f kJ'%(Q);\n", - "print ' The final state of superheated steam,Pressure = %0.3f MPa '%(P2);\n", - "print ' The final state of superheated steam,Temperature = %d degree celsius '%(T2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The work done by steam = 65.26 kJ \n", - " The net energy transferred as heat = 533.62 kJ\n", - " The final state of superheated steam,Pressure = 0.476 MPa \n", - " The final state of superheated steam,Temperature = 200 degree celsius \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.6 Page No : 103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "W = 1. \t\t\t #weight of steam in kg in the piston cylinder assembly\n", - "X = 0.8;\t\t\t #quality of steam (no unit)\n", - "T1 = 150.\t\t\t #initial temperature of steam in degree celsius\n", - "I = 5. \t\t\t #current passed in Amperes\n", - "V = 220.\t\t\t #voltage in volts across the resistor\n", - "t = 10. \t\t\t #time for which the current is passed in minutes\n", - "P1 = 476.\t\t\t #pressure in kPa obatined from steam tables (corresponding to T1)\n", - "vf = 0.0010908;\t\t\t #specific volume of saturated liquid in m**3/kg obatined from steam tables (corresponding to T1)\n", - "vg = 0.3924;\t\t\t #specific volume of satuarted vapour in m**3/kg obatined from steam tables (corresponding to T1)\n", - "hf = 632.15;\t\t\t #specific enthalpy of saturated liquid in kJ/kg obtained from steam tables (corresponding to T1)\n", - "hg = 2745.4;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables (corresponding to T1)\n", - "\n", - "# Calculations\n", - "V1 = (X*vg)+((1-X)*vf);\t\n", - "h1 = (X*hg)+((1-X)*hf);\t\n", - "Ws = -V*I*t*60*10**-3;\t\n", - "h2 = h1-Ws;\t\t\t \n", - "P2 = 0.476;\t\t\t \n", - "T_int1 = 200;\t\t\n", - "T_int2 = 300;\t\t\n", - "V_int1 = 0.4512;\t\n", - "V_int2 = 0.5544;\t\n", - "h_int1 = 2856.37;\t\n", - "h_int2 = 3065.38;\t\n", - "V2 = (((h2-h_int1)/(h_int2-h_int1))*(V_int2-V_int1))+V_int1;\n", - "T2 = (((h2-h_int1)/(h_int2-h_int1))*(T_int2-T_int1))+T_int1;\n", - "W = (P1*10**3*(V2-V1)*W)*10**-3\n", - "\n", - "# Results\n", - "print ' The work done by steam = %0.2f kJ '%(W);\n", - "print ' The final temperature = %0.2f degree celsius'%(T2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The work done by steam = 94.94 kJ \n", - " The final temperature = 260.47 degree celsius\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.7 Page No : 104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "N = 1.\t\t\t #number of moles of carbon dioxide in kmol\n", - "T1 = 298.\t\t\t #initial temperature in K\n", - "T2 = 600.\t\t\t #final raised temperature in K\n", - "a = 45.369\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "b = 8.688*10**-3\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "e = -9.619*10**5\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "\n", - "# Calculations\n", - "Q = N*10**3*((a*(T2-T1)+((b/2)*(T2**2-T1**2))-(e*((1./T2)-(1./T1)))))*10**-6\n", - "\n", - "# Results\n", - "print ' The amount of energy to be transferred as heat = %0.3f MJ'%(Q);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The amount of energy to be transferred as heat = 13.255 MJ\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.8 Page No : 104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T1 = 298. \t\t\t #initial temperature in K\n", - "T2 = 600.\t \t\t #final raised temperature in K\n", - "a = 45.369;\t\t \t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "b = 8.688*10**-3;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "e = -9.619*10**5;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "\n", - "# Calculations\n", - "Cpm = ((a*(T2-T1))+((b/2)*(T2**2-T1**2))-(e*((1./T2)-(1./T1))))/(T2-T1)\n", - "\n", - "# Results\n", - "print ' The isobaric molar heat capacity = %0.2f J/molK'%(Cpm);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The isobaric molar heat capacity = 43.89 J/molK\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.9 Page No : 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "N = 1.\t \t\t #number of moles of carbon dioxide in kmol\n", - "T1 = 298.\t\t\t #initial temperature in K\n", - "T2 = 600.\t\t\t #final raised temperature in K\n", - "a = 45.369;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "b = 8.688*10**-3;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "e = -9.619*10**5;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "\n", - "# Calculations\n", - "Cpm = ((a*(T2-T1))+((b/2)*(T2**2-T1**2))-(e*((1./T2)-(1./T1))))/(T2-T1)\n", - "Q = N*10**3*Cpm*(T2-T1)*10**-6\n", - "\n", - "# Results\n", - "print ' The amount of energy to be transferred as heat = %0.3f MJ '%(Q);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The amount of energy to be transferred as heat = 13.255 MJ \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.10 Page No : 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "N = 100.\t\t\t #number of moles of carbon dioxide in mol\n", - "T1 = 298.\t\t\t #initial temperature in K\n", - "Q = 1. \t\t\t #energy added as heat in MJ\n", - "a = 45.369;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "b = 8.688*10**-3;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "e = -9.619*10**5;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", - "\n", - "# Calculations\n", - "delh = Q*10**6/N\n", - "Tguess = 520.\t\n", - "Cpm_guess = a+(b*((T1+Tguess)/2))+(e/(T1*Tguess))\n", - "T2_guess = T1+(delh/Cpm_guess)\n", - "tolerance = 1e-6;\t\t\t\n", - "while abs(T2_guess-Tguess)>tolerance:\n", - " Tguess = T2_guess;\n", - " Cpm_guess = a+(b*((T1+Tguess)/2))+(e/(T1*Tguess));\n", - " T2_guess = T1+(delh/Cpm_guess)\n", - "\n", - "T2 = T2_guess\n", - "\n", - "# Results\n", - "print ' The final temperature = %0.1f K'%(T2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final temperature = 531.1 K\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.11 Page No : 107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "volume_ratio = 1./15\t #final volume to the initial volume of air at the end of compression stroke (no unit)\n", - "gaamma = 1.4\t\t\t #ratio of the molar heat capacities at constant pressure and constant volume for air (no unit)\n", - "T1 = 300.\t\t\t #initial temperature of air in K\n", - "P1 = 0.1;\t\t\t #initial pressure of air in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "T2 = T1*((1./volume_ratio)**(gaamma-1))\n", - "P2 = P1*((1./volume_ratio)**(gaamma))\n", - "W = (R*(T1-T2)*10**-3)/(gaamma-1)\n", - "\n", - "# Results\n", - "print ' The final temperature = %0.2f K'%(T2);\n", - "print ' The final pressure = %0.4f MPa'%(P2);\n", - "print ' Work done per mole of air = %0.3f kJ/mol'%(W);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final temperature = 886.25 K\n", - " The final pressure = 4.4313 MPa\n", - " Work done per mole of air = -12.185 kJ/mol\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.12 Page No : 110" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "volume_ratio = 1./15;\t\t\t #final volume to the initial volume of ideal gas at the end of compression (no unit)\n", - "T1 = 300. \t\t\t #initial temperature of ideal gas in K\n", - "P1 = 0.1;\t \t\t #initial pressure of ideal gas in MPa\n", - "R = 8.314;\t\t \t #universal gas constant in J/molK\n", - "n = 1.2;\t\t\t #index of expansion (no unit)\n", - "gaamma = 1.4;\t\t\t #ratio of the molar heat capacities at constant pressure and constant volume for ideal gas (no unit)\n", - "\n", - "# Calculations\n", - "P2 = P1*((1./volume_ratio)**n)\n", - "T2 = T1*(P2/P1)*(volume_ratio)\n", - "W = (R*(T1-T2)*10**-3)/(n-1)\n", - "del_u = (R*(T2-T1)*10**-3)/(gaamma-1)\n", - "q = del_u+W\n", - "\n", - "# Results\n", - "print ' The final pressure = %0.3f MPa'%(P2);\n", - "print ' The final temperature = %0.1f K'%(T2);\n", - "print ' Work done on the gas = %f kJ/mol'%(W);\n", - "print ' Heat interaction during the process = %f kJ/mol'%(q)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final pressure = 2.578 MPa\n", - " The final temperature = 515.6 K\n", - " Work done on the gas = -8.963805 kJ/mol\n", - " Heat interaction during the process = -4.481902 kJ/mol\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.13 Page No : 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 1.;\t \t\t #volume of tank in m**3\n", - "T0 = 300.\t\t\t #initial temperature of ideal gas in K\n", - "P0 = 0.1\t\t\t #initial pressure of ideal gas in MPa\n", - "T = 500.\t\t\t #temperature of ideal gas in the pipeline in K\n", - "P = 3.\t\t \t #pressure of ideal gas in the pipeline in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "gaamma = 1.4;\t\t\t #ratio of the molar heat capacities at constant pressure and constant volume for ideal gas (no unit)\n", - "\n", - "# Calculations\n", - "Pf = 3.\n", - "Tf = (Pf*10**6)/((((Pf*10**6)-(P0*10**6))/(gaamma*T))+((P0*10**6)/T0));\n", - "N = (V/R)*(((Pf*10**6)/Tf)-((P0*10**6)/T0));\n", - "\n", - "# Results\n", - "print ' The final temperature = %0.1f K'%(Tf);\n", - "print ' The amount of gas that has entered the tank = %0.2f mol'%(N);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final temperature = 670.2 K\n", - " The amount of gas that has entered the tank = 498.30 mol\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.14 Page No : 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from scipy.optimize import fsolve\n", - "\n", - "# Variables\n", - "V = 3. \t\t\t #volume of tank in m**3\n", - "T0 = 100.;\t\t\t #initial temperature of steam in degree celsius\n", - "T = 300.;\t\t\t #temperature of superheated steam in the pipeline in degree celsius\n", - "P = 3.;\t\t\t #pressure of superheated steam in the pipeline in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "Ps = 101.33\n", - "vg = 1.673\n", - "hg = 2676.0\n", - "h = 2995.1\n", - "u0 = ((hg*10**3)-(Ps*10**3*vg))*10**-3\n", - "m0 = V/vg;\t\t\t\n", - "\n", - "Tf = 418.\n", - "vf = 0.102329\n", - "uf = 2965.78\n", - "\n", - "mf_guess = V/vf\n", - "\n", - "def solver_func(ui):\n", - " return (mf_guess*ui)-(m0*u0)-((mf_guess-m0)*h);\n", - "\n", - "uf_solved = fsolve(solver_func,mf_guess)\n", - "mf = mf_guess\n", - "mass = mf-m0\n", - "\n", - "# Results\n", - "print \" The final state of steamsuperheated, Pressure = %d MPa\"%(P);\n", - "print \" The final state of steamsuperheated, Temperature = %d degree celsius\"%(Tf);\n", - "print \" The mass of steam that entered the tank = %0.3f kg\"%(mass);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final state of steamsuperheated, Pressure = 3 MPa\n", - " The final state of steamsuperheated, Temperature = 418 degree celsius\n", - " The mass of steam that entered the tank = 27.524 kg\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.15 Page No : 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 0.1;\t\t\t #volume of cylinder in m**3\n", - "T0 = 300.\t\t\t #initial temperature of nitrogen in K\n", - "P0 = 14.\t\t\t #initial pressure of nitrogen in MPa\n", - "P = 0.1;\t\t\t #ambient pressure in MPa\n", - "Pf = 2. \t\t\t #final pressure of nitrogen in MPa\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "gaamma = 1.4;\t\t #ratio of the molar heat capacities at constant pressure and constant volume for nitrogen (no unit)\n", - "\n", - "# Calculations\n", - "def solver_func(Ti):\n", - " return ((P0*10**6)-(Pf*10**6))-((gaamma/2)*(T0+Ti)*(((P0*10**6)/T0)-((Pf*10**6)/Ti)));\n", - "\n", - "Tguess = 300.\n", - "Tf = fsolve(solver_func,Tguess)\n", - "\n", - "N = (V/R)*(((P0*10**6)/T0)-((Pf*10**6)/Tf));\n", - "\n", - "# Results\n", - "print ' The final temperature = %0.1f K'%(Tf);\n", - "print ' The amount of gas that has escaped from the cylinder = %0.2f mol'%(N);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The final temperature = 181.2 K\n", - " The amount of gas that has escaped from the cylinder = 428.52 mol\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.16 Page No : 118" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T0 = 300.;\t\t\t #initial temperature of superheated steam in degree celsius\n", - "P0 = 3.;\t\t\t #initial pressure of superheated steam in MPa\n", - "Xe = 0.85;\t\t\t #quality of steam leaving the turbine (no unit)\n", - "Tf = 45.;\t\t\t #final temperature of steam leaving the turbine in degree celsius\n", - "Vi = 10.;\t\t\t #velocity of steam at the entrance in m/s\n", - "Ve = 40.;\t\t\t #exit velocity of steam in m/s\n", - "Zi = 10.;\t\t\t #elevation at the entrance in m\n", - "Ze = 4.;\t\t\t #elevation at the exit in m\n", - "m = 1.;\t\t\t #mass flow rate of steam through turbine in kg/s\n", - "g = 9.81;\t\t\t #accleration due to gravity in m/s**2\n", - "\n", - "# Calculations\n", - "hi = 2995.1\n", - "hf = 188.35\n", - "hg = 2583.3\n", - "he = ((1-Xe)*hf)+(Xe*hg)\n", - "Q = 0.\t\t\t \n", - "enthalpy_change = (he*10**3)-(hi*10**3)\n", - "KE_change = ((Ve**2)-(Vi**2))/2\n", - "PE_change = g*(Ze-Zi);\t\t\t\n", - "Ws = Q-(m*(enthalpy_change+KE_change+PE_change)*10**-3)\n", - "err_KE = ((KE_change)/(Ws*10**3))*100;\t\n", - "err_PE = ((abs (PE_change)/(Ws*10**3)))*100\n", - "err = err_KE+err_PE\n", - "\n", - "# Results\n", - "print ' The percentage error when Kinetic energy change is ignored = %0.3f '%(err_KE);\n", - "print ' The percentage error when Potential energy change is ignored = %0.4f '%(err_PE);\n", - "print ' The percentage error when both Kinetic and Potential energy changes are ignored = %f '%(err);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The percentage error when Kinetic energy change is ignored = 0.097 \n", - " The percentage error when Potential energy change is ignored = 0.0076 \n", - " The percentage error when both Kinetic and Potential energy changes are ignored = 0.104999 \n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.17 Page No : 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "# Variables\n", - "Pi = 5.;\t\t\t #pressure of dry saturated steam at the entrance in bar\n", - "Pe = 2.;\t\t\t #pressure of dry saturated steam at the exit in bar\n", - "Vi = 3.;\t\t\t #velocity of dry saturated steam at the entrance in m/s\n", - "m = 1.; \t\t\t #flow rate of steam through the nozzle in kg/s\n", - "g = 9.81;\t\t\t #acceleration due to gravity in m/s**2\n", - "\n", - "# Calculations\n", - "hi = 2747.5\n", - "he = 2706.3\n", - "ve = 0.8854\n", - "Zi = 0;\t\t\n", - "Ze = 0;\t\t\n", - "Q = 0;\t\t\n", - "Ws = 0;\t\t\n", - "Ve = math.sqrt (2*(((Q-Ws)/m)-(g*(Zi-Ze))-((he*10**3)-(hi*10**3)))+(Vi**2))\n", - "A = (m*ve)/Ve\n", - "\n", - "# Results\n", - "print ' The velocity of dry saturated steam at the exit = %0.2f m/s'%(Ve);\n", - "print ' The cross sectional area of the nozzle at the exit = %0.3e m**2'%(A);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The velocity of dry saturated steam at the exit = 287.07 m/s\n", - " The cross sectional area of the nozzle at the exit = 3.084e-03 m**2\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.18 Page No : 123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T1 = 270.\t\t\t #temperature of wet steam in degree celsius\n", - "T2 = 120.\t\t\t #final temperature of superheated steam in degree celsius\n", - "P = 0.1;\t\t\t #pressure of superheated steam in MPa\n", - "\n", - "# Calculations\n", - "hf = 1185.2 \t\t\t\n", - "hg = 2789.9\t \t\t\n", - "he = 2716.04\t\t\t\n", - "Xi = (he-hf)/(hg-hf);\t\n", - "\n", - "# Results\n", - "print ' The quality of wet steam = %0.3f '%(Xi);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The quality of wet steam = 0.954 \n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.20 Page No : 128" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "del_H = -90.135;\t\t\t #standard enthalpy change for the reaction CO(g)+2H2(g)--->CH3OH(g) at 298.15K in kJ\n", - "\n", - "# Calculations\n", - "del_H1 = 2*del_H\n", - "del_H2 = (1./2)*del_H\n", - "\n", - "# Results\n", - "print ' The standard enthalpy change for the reaction 2COg)+4H2g)---->2CH3OHg \\\n", - ") at 298.15K = %0.2f kJ'%(del_H1);\n", - "print ' The standard enthalpy change for the reaction 1./2)COg)+H2g)---->1./2\\\n", - ")CH3OHg) at 298.15K = %0.4f kJ'%(del_H2 );\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The standard enthalpy change for the reaction 2COg)+4H2g)---->2CH3OHg ) at 298.15K = -180.27 kJ\n", - " The standard enthalpy change for the reaction 1./2)COg)+H2g)---->1./2)CH3OHg) at 298.15K = -45.0675 kJ\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.22 Page No : 130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "del_Hf_C4H10 = -74.943;\t\t\t #smath.tan(math.radiansard enthalpy of formation of C4H10(g) at 298.15K in kJ\n", - "del_Hf_CO2 = -393.978;\t\t\t #smath.tan(math.radiansard enthalpy of formation of CO2(g) at 298.15K in kJ\n", - "del_Hf_H2O = -241.997;\t\t\t #smath.tan(math.radiansard enthalpy of formation of H2O(g) at 298.15K in kJ\n", - "\n", - "# Calculations\n", - "\n", - "del_Hr = (5*del_Hf_H2O)+(4*del_Hf_CO2)-(del_Hf_C4H10);\n", - "\n", - "# Results\n", - "print ' The standard enthalpy change for the reaction C4H10g)+13\\\n", - "/2)O2g)---->4CO2g)+5H2Og) at 298.15K = %0.3f kJ'%(del_Hr);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The standard enthalpy change for the reaction C4H10g)+13/2)O2g)---->4CO2g)+5H2Og) at 298.15K = -2710.954 kJ\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.23 Page No : 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "del_Hf_C4H10 = -74.943;\t\t\t #smath.tan(math.radiansard enthalpy of formation of C4H10(g) at 298.15K in kJ\n", - "del_Hf_CO2 = -393.978;\t\t\t #smath.tan(math.radiansard enthalpy of formation of CO2(g) at 298.15K in kJ\n", - "del_Hf_H2O = -241.997;\t\t\t #smath.tan(math.radiansard enthalpy of formation of H2O(g) at 298.15K in kJ\n", - "del_H_vap = 43.966;\t\t\t #enthalpy of vaporization of H2O at 298.15K in kJ/mol\n", - "\n", - "# Calculations\n", - "\n", - "del_H1 = 0.\n", - "del_H2 = 5*(-del_H_vap)\n", - "del_H3 = 0.\n", - "\n", - "del_H = (5*del_Hf_H2O)+(4*del_Hf_CO2)-(del_Hf_C4H10);\n", - "del_net_H = (del_H)+(del_H1)+(del_H2)+(del_H3)\n", - "\n", - "# Results\n", - "print ' The standard enthalpy change for the reaction C4H10g)+13/2)O2g)---->4CO2g\\\n", - ")+5H2Ol) at 298.15K = %0.3f kJ'%(del_net_H);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The standard enthalpy change for the reaction C4H10g)+13/2)O2g)---->4CO2g)+5H2Ol) at 298.15K = -2930.784 kJ\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.24 Page No : 132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "del_H_comb = 2880.44;\t\t\t #gross heating value of n-buatne gas at 298.15K in kJ/mol\n", - "del_Hf_CO2 = -393.978;\t\t\t #standard enthalpy of formation of CO2(g) at 298.15K in kJ\n", - "del_Hf_H2O = -285.958;\t\t\t #standard enthalpy of formation of H2O(l) at 298.15K in kJ\n", - "del_Hf_O2 = 0.;\t\t \t #standard enthalpy of formation of O2(g) at 298.15K in kJ\n", - "\t\t\t \n", - "# Calculations\n", - "n_CO2 = 4.\n", - "n_H2O = 5.\n", - "n_O2 = -13./2\n", - "n_C4H10 = -1.\n", - "\t\t\t \n", - "del_Hf_C4H10 = (n_CO2*del_Hf_CO2)+(n_H2O*del_Hf_H2O)+(n_O2*del_Hf_O2)-(-del_H_comb);\n", - "\n", - "\n", - "# Results\n", - "print ' The standard enthalpy of formation of n-butane gas at 298.15K = %0.3f kJ'%(del_Hf_C4H10);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The standard enthalpy of formation of n-butane gas at 298.15K = -125.262 kJ\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.25 Page No : 133" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "del_Hc_A = -890.94;\t\t\t #enthalpy change accompanying reaction A in kJ\n", - "del_Hc_B = -283.18;\t\t\t #enthalpy change accompanying reaction B in kJ\n", - "del_Hc_C = -286.03;\t\t\t #enthalpy change accompanying reaction C in kJ\n", - "del_H_vap = -43.966;\t\t\t #enthalpy change of vaporization of H2O at 298.15K in kJ/mol\n", - "\n", - "# Calculations\n", - "del_H0 = (del_Hc_A)-(del_Hc_B)-(3*del_Hc_C)+(del_H_vap)\n", - "\n", - "# Results\n", - "print ' The standard enthalpy change at 298.15K for the reaction \\\n", - "CH4g)+H2Og)--->COg)+3H2g) = %0.3f kJ'%(del_H0);\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The standard enthalpy change at 298.15K for the reaction CH4g)+H2Og)--->COg)+3H2g) = 206.364 kJ\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.26 Page No : 135" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "#The reaction is : C2H4(g)+H2O(g)--->C2H5OH(g)\n", - "del_H_vap = 43.82\n", - "\n", - "del_Hf = [52.335,-241.997,0,-277.819]\n", - "a = [4.196,28.850,20.691,0]\t\n", - "b = [154.565*10**-3,12.055*10**-3,205.346*10**-3,0]\n", - "c = [-81.076*10**-6,0,-99.793*10**-6,0]\n", - "d = [16.813*10**-9,0,18.825*10**-9,0]\t\n", - "e = [0,1.006*10**5,0,0];\t\t\n", - "\n", - "T1 = 298.15\t\t\n", - "T2 = 400.\t\t\t\n", - "n_C2H4 = -1.\n", - "n_H2O = -1.\n", - "n_C2H5OH = 1.\n", - "\n", - "# Calculations\n", - "\n", - "del_Hf_C2H5OH_g = del_Hf[3]+del_H_vap;\n", - "del_Hr = (n_C2H5OH*del_Hf_C2H5OH_g)+(n_C2H4*del_Hf[0])+(n_H2O*del_Hf[1])\n", - "del_a = (n_C2H4*a[0])+(n_H2O*a[1])+(n_C2H5OH*a[2])\t\t\t \n", - "del_b = (n_C2H4*b[0])+(n_H2O*b[1])+(n_C2H5OH*b[2])\t\t\t \n", - "del_c = (n_C2H4*c[0])+(n_H2O*c[1])+(n_C2H5OH*c[2])\t\t\t \n", - "del_d = (n_C2H4*d[0])+(n_H2O*d[1])+(n_C2H5OH*d[2])\t\t\t \n", - "del_e = (n_C2H4*e[0])+(n_H2O*e[1])+(n_C2H5OH*e[2])\t\t\t \n", - "del_H0 = (del_Hr*10**3)-((del_a*T1)+((del_b/2)*T1**2)+((del_c/3)*T1**3)+((del_d/4)*T1**4)-(del_e/T1))\n", - "del_Hr_T2 = (del_H0+((del_a*T2)+((del_b/2)*T2**2)+((del_c/3)*T2**3)+((del_d/4)*T2**4)-(del_e/T2)))*10**-3;\n", - "\n", - "# Results\n", - "print ' The standard enthalpy change at 400K for the reaction\\\n", - " C2H4g)+H2Og)--->C2H5OHg) = %f kJ'%(del_Hr_T2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The standard enthalpy change at 400K for the reaction C2H4g)+H2Og)--->C2H5OHg) = -44.529472 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.28 Page No : 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from scipy.optimize import fsolve \n", - "import math \n", - "\n", - "# Variables\n", - " \n", - "#The combustion reaction of methane is given by:\n", - "# CH4(g)+2O2(g)--->CO2(g)+2H2O(g)\n", - "\n", - "n_O2 = 2.\t\t\t # stoichiometric amount of oxygen required for combustion\n", - "n_CH4 = 1.\t\t\t #number of moles of CH4(g) in moles\n", - "n_CO2 = 1.\t\t\t #number of moles of CO2(g) formed in the combustion reaction in moles\n", - "n_H2O = 2.\t\t\t #number of moles of H2O(g) formed in the combustion reaction in moles\n", - "del_Hf = [-74.943,0,-393.978,-241.997];\t\t\t # standard enthalpies of formation of CH4(g),O2(g),CO2(g),H2O(g) at 298.15K in kJ\n", - "a = [45.369,28.850,30.255,27.270];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", - "b = [8.688*10**-3,12.055*10**-3,4.207*10**-3,4.930*10**-3];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", - "c = [0,0,0,0]; \t \t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", - "d = [0,0,0,0];\t \t \t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", - "e = [-9.619*10**5,1.006*10**5,-1.887*10**5,0.333*10**5];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", - "per_excess_air = 50. \t\t\t #percentage excess of air supplied to the adiabatic burner\n", - "T_amb = 298.15\t\t\t # temperature at which air and methane enter the burner in K\n", - "per_N2 = 79.\t\t\t #percentage of N2 in the air supplied\n", - "per_O2 = 21.\t\t\t #percentage of O2 in the air supplied\n", - "\n", - "# Calculations\n", - "n_O2_actual = (1+(per_excess_air/100))*n_O2\n", - "n_N2 = n_O2_actual*(per_N2/per_O2);\t\t\t\n", - "n_O2_residual = n_O2_actual-n_O2;\t\t\t\n", - "\n", - "del_Hr = (n_CO2*del_Hf[2])+(n_H2O*del_Hf[3])-(n_O2*del_Hf[1])-(n_CH4*del_Hf[0])\n", - "\n", - "del_a = (n_CO2*a[0])+(n_H2O*a[1])+(n_O2_residual*a[2])+(n_N2*a[3])\n", - "del_b = (n_CO2*b[0])+(n_H2O*b[1])+(n_O2_residual*b[2])+(n_N2*b[3])\n", - "del_c = (n_CO2*c[0])+(n_H2O*c[1])+(n_O2_residual*c[2])+(n_N2*c[3])\n", - "del_d = (n_CO2*d[0])+(n_H2O*d[1])+(n_O2_residual*d[2])+(n_N2*d[3])\n", - "del_e = (n_CO2*e[0])+(n_H2O*e[1])+(n_O2_residual*e[2])+(n_N2*e[3]);\t\n", - "tguess = 500.\n", - "\n", - "def solver_func(ti):\n", - " return (-(del_Hr*10**3))-((del_a*(ti-T_amb))+((del_b/2)*((ti**2)-(T_amb**2)))+((del_c/3)*((ti**3)-(T_amb**3)))+((del_d/4)*((ti**4)-(T_amb**4)))+(del_e*((1./T_amb)-(1./ti))));\n", - "\n", - "T = fsolve(solver_func,tguess)\n", - "\n", - "# Results\n", - "print ' The flame temperature when methane is burned with 50 percent excess air \\\n", - "in an adiabatic burner = %f K'%(T);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The flame temperature when methane is burned with 50 percent excess air in an adiabatic burner = 1793.784965 K\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.29 Page No : 139" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T_exit = 550.\t\t\t #temperature in K at which the combustion products leave the boiler\n", - "percent_molar_comp_prdct = [6.28,3.14,7.85,82.73];\t\t\t # percentage molar composition of the combustion products CO2(g),CO(g),O2(g),N2(g) on dry basis\n", - "T_ent = 298.15;\t\t\t #temperature in K at which Propane and air enter the combustion chamber\n", - "del_Hf = [-393.978,-110.532,-241.997,0,0,-103.833];\t\t\t #smath.tan(math.radiansard enthalpies of formation of CO2(g),CO(g),H2O(g),O2(g),N2(g),C3H8(g) at 298.15K in kJ\n", - "a = [45.369,28.068,30.255,27.270,28.850];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", - "\n", - "#coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", - "b = [8.688*10**-3,4.631*10**-3,4.207*10**-3,4.930*10**-3,12.055*10**-3];\n", - "c = [0,0,0,0,0];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", - "d = [0,0,0,0,0];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", - "e = [-9.619*10**5,-0.258*10**5,-1.887*10**5,0.333*10**5,1.006*10**5];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", - "per_N2 = 79.\t\t\t #percentage of nitrogen in air\n", - "per_O2 = 21.\t\t\t #percentage of oxygen in air\n", - "molar_mass_propane = 44.*10**-3;\t\t\t #molar mass of propane in kg/mole\n", - "\n", - "# Calculations\n", - "# TAKE BASIS AS 100 mol OF DRY COMBUSTION PRODUCTS\n", - "n_CO2 = percent_molar_comp_prdct[0]\t\t\t #number of moles of CO2(g) in the product stream\n", - "n_CO = percent_molar_comp_prdct[1]\t\t\t #number of moles of CO(g) in the product stream\n", - "n_O2 = percent_molar_comp_prdct[2]\t\t\t #number of moles of O2(g) in the product stream\n", - "n_N2 = percent_molar_comp_prdct[3]\t\t\t #number of moles of N2(g) in the product stream\n", - "\n", - "x = (n_CO2+n_CO)/3;\n", - "\n", - "y = (2*n_N2)/(2*(per_N2/per_O2));\n", - "\n", - "z = (2*y)-(2*n_CO2)-(n_CO)-(2*n_O2);\n", - "\n", - "n_H2O = z\n", - "n_C3H8 = x\n", - "\n", - "del_Hr = (n_CO2*del_Hf[0])+(n_CO*del_Hf[1])+(n_H2O*del_Hf[2])-(n_C3H8*del_Hf[5]);\n", - "\n", - "del_a = (n_CO2*a[0])+(n_CO*a[1])+(n_O2*a[2])+(n_N2*a[3])+(n_H2O*a[4])\t\n", - "del_b = (n_CO2*b[0])+(n_CO*b[1])+(n_O2*b[2])+(n_N2*b[3])+(n_H2O*b[4])\t\n", - "del_c = (n_CO2*c[0])+(n_CO*c[1])+(n_O2*c[2])+(n_N2*c[3])+(n_H2O*c[4])\t\n", - "del_d = (n_CO2*d[0])+(n_CO*d[1])+(n_O2*d[2])+(n_N2*d[3])+(n_H2O*d[4])\t\n", - "del_e = (n_CO2*e[0])+(n_CO*e[1])+(n_O2*e[2])+(n_N2*e[3])+(n_H2O*e[4])\t\n", - "\n", - "#calulation of del_Hp J\n", - "del_Hp = (del_a*(T_exit-T_ent))+((del_b/2)*((T_exit**2)-(T_ent**2)))+((del_c/3)*((T_exit**3)-(T_ent**3)))+((del_d/4)*((T_exit**4)-(T_ent**4)))-(del_e*((1./T_exit)-(1./T_ent)));\n", - "del_H = ((del_Hr*10**3)+(del_Hp))*10**-3;\t\t\t \n", - "mass_propane = n_C3H8*molar_mass_propane;\t\t\t \n", - "energy = (-(del_H*10**3)/mass_propane)*10**-6;\t\t\n", - " \n", - "# Results\n", - "print ' The energy transferred as heat per kg propane = %f MJ'%(energy); \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The energy transferred as heat per kg propane = 33.741510 MJ\n" - ] - } - ], - "prompt_number": 31 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch5.ipynb b/Chemical_Engineering_Thermodynamics/ch5.ipynb deleted file mode 100755 index 9cf5b1c8..00000000 --- a/Chemical_Engineering_Thermodynamics/ch5.ipynb +++ /dev/null @@ -1,974 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5 : Second law of thermodynamics and its applications" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.2 Page No : 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math \n", - "\n", - "# Variables\n", - "Q = 1000.;\t\t \t #amount of energy absorbed by the heat engine in kJ/s\n", - "W = 650.;\t\t\t #work delivered by the heat engine in kW\n", - "T_source = 500. \t\t #temperature of the source in degree celsius\n", - "T_sink = 25.\t\t\t #temperature of the sink in degree celsius\n", - "\n", - "# Calculations\n", - "n_claimed = W/Q\n", - "T1 = T_source+273.15\n", - "T2 = T_sink+273.15\n", - "n_carnot = 1-(T2/T1)\n", - "\n", - "# Results\n", - "print \" The efficiency of the Carnot engine = %0.3f \"%(n_carnot);\n", - "print \" The efficiency of the engine claimed by the inventor = %0.2f \"%(n_claimed);\n", - "if n_claimed0 or S_G == 0 :\n", - " print \" As the first and second law of thermodynamics are satisfied, the device is theoretically feasible \"\n", - "else:\n", - " print \" As both the first and second law or either the first or second law of thermodynamics \\\n", - " are not satisfied, the device is not feasible \"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The LHS of the equation applied to the flow device to check if the first law of thermodynamics is satisfied = 2745.4 kJ\n", - " The RHS of the equation applied to the flow device to check if the first law of thermodynamics is satisfied = 2745.5 kJ\n", - " The entropy generated by applying the second law of thermodynamics to the flow device = 0.3552 kJ/kgK\n", - " As the first and second law of thermodynamics are satisfied, the device is theoretically feasible \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.18 Page No : 185" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pi = 30.\t\t\t #pressure of superheated steam entering the turbine in bar\n", - "Ti = 300.\t\t\t #temperature of superheated steam entering the turbine in degree celsius\n", - "Pe = 0.1\t\t\t #pressure at which steam exits the turbine in bar\n", - "Xe = 0.9\t\t\t #quality of steam at the exit (no unit)(for the actual turbine)\n", - "\n", - "# Calculations\n", - "#For superheated steam at Pi and Ti\n", - "hi = 2995.1;\t\t\t #enthalpy of superheated steam at the entrance in kJ/kg\n", - "si = 6.5422;\t\t\t #entropy of superheated steam at the entrance in kJ/kgK\n", - "\n", - "#For steam at Pe\n", - "hf = 191.83;\t\t\t #enthalpy of saturated liquid in kJ/kg\n", - "hg = 2584.8;\t\t\t #enthalpy of saturated vapour in kJ/kg\n", - "sf = 0.6493;\t\t\t #entropy of saturated liquid in kJ/kgK\n", - "sg = 8.1511;\t\t\t #entropy of saturated vapour in kJ/kgK\n", - "\n", - "X2 = (si-sf)/(sg-sf)\n", - "h2 = (hf*(1-X2))+(X2*hg)\n", - "he = (hf*(1-Xe))+(Xe*hg)\n", - "n_T = (hi-he)/(hi-h2)\n", - "\n", - "# Results\n", - "print \" The isentropic efficiency of the turbine = %f \"%(n_T);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The isentropic efficiency of the turbine = 0.703395 \n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.19 Page No : 186" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Ti = 25.\t\t\t #temperature of air taken in by the adiabatic air compressor in degree celsius\n", - "Pi = 0.1\t\t\t #pressure of air taken in by the adiabatic air compressor in MPa\n", - "Pe = 1.\t \t\t #discharge pressure of air in MPa\n", - "n_c = 0.8\t\t\t #isentropic efficiency of the compressor (no unit)\n", - "gaamma = 1.4\t\t #ratio of molar specific heat capacities (no unit)\n", - "R = 8.314\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "Ti = Ti+273.15\n", - "Te = Ti*(((Pe*10**6)/(Pi*10**6))**((gaamma-1)/gaamma))\n", - "W_s = (((R*gaamma)/(gaamma-1))*(Te-Ti))*10**-3;\t\t\t\n", - "Ws = W_s/n_c\n", - "Te_actual = ((Ws*10**3*(gaamma-1))/(R*gaamma))+Ti\n", - "\n", - "# Results\n", - "print \" The exit temperature of air = %0.2f K\"%(Te_actual);\n", - "print \" The power consumed by the compressor = %f kW/mol\"%(Ws);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The exit temperature of air = 645.01 K\n", - " The power consumed by the compressor = 10.093262 kW/mol\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.20 Page No : 187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Ti = 30.\t\t\t #temperature of saturated liquid water in degree celsius\n", - "m = 500.\t\t\t #mass flow rate of water being pumped in kg/s\n", - "P2 = 3. \t\t\t #preesure maintained in the boiler in MPa\n", - "n_p = 0.75;\t\t\t #isentropic efficiency of the pump (no unit)\n", - "\n", - "# Calculations\n", - "#For saturated liquid water at Ti\n", - "vf = 0.0010043\n", - "P1 = 4.241;\t\t\n", - "\n", - "Ws_m = (vf*((P2*10**6)-(P1*10**3)))*10**-3\n", - "Ws_act_m = Ws_m/n_p;\t\t\t \n", - "P = ((Ws_act_m*10**3)*m)*10**-6;\n", - "\n", - "# Results\n", - "print \" The power consumed by the pump = %d MW\"%(P);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The power consumed by the pump = 2 MW\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.21 Page No : 188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pi = 3.\t\t\t #pressure of dry saturated steam entering the nozzle in bar\n", - "Xe = 0.98\t\t #quality of steam exiting the nozzle (no unit)\n", - "Pe = 2.\t\t\t #pressure of steam exiting the nozzle in bar\n", - "\n", - "# Calculations\n", - "#For steam at Pi\n", - "hi = 2724.7\n", - "he = 2652.8\n", - "V2_2_s = hi-he\n", - "\n", - "#For steam at Pe\n", - "hf = 504.70\n", - "hg = 2706.3\n", - "he_act = ((1-Xe)*hf)+(Xe*hg)\n", - "V2_2 = hi-he_act;\t\t\t\n", - "n_N = (V2_2)/(V2_2_s)\t\t\n", - "\n", - "# Results\n", - "print \" The isentropic efficiency of the nozzle = %0.3f \"%(n_N);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The isentropic efficiency of the nozzle = 0.868 \n" - ] - } - ], - "prompt_number": 25 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch6.ipynb b/Chemical_Engineering_Thermodynamics/ch6.ipynb deleted file mode 100755 index cf3f1f12..00000000 --- a/Chemical_Engineering_Thermodynamics/ch6.ipynb +++ /dev/null @@ -1,214 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6 : Thermodynamic potentials" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.6 Page No : 218" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "m = 0.1;\t\t\t #mass of superheated steam in the piston cylinder assembly in kg\n", - "P1 = 1.\t \t\t #initial pressure of superheated steam in MPa\n", - "T1 = 300.\t\t\t #initial temperature of superheated steam in degree celsius\n", - "P2 = 0.1\t\t\t #pressure of steam after expansion in MPa\n", - "T2 = 200.\t\t\t #temperature of steam after expansion in degree celsius\n", - "\n", - "# Calculations\n", - "#For steam at P1 and T1:\n", - "h1 = 3052.1\n", - "v1 = 0.2580\n", - "\n", - "#For steam at P2 and T2:\n", - "h2 = 2875.4\n", - "v2 = 2.1720\n", - "\n", - "del_u = (((h1*10**3)-(P1*10**6*v1))-((h2*10**3)-(P2*10**6*v2)))*10**-3\n", - "W = m*(del_u)\n", - "\n", - "# Results\n", - "print \" The work done by steam = %0.2f kJ\"%(W);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The work done by steam = 13.59 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.8 Page No : 220" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P = 3.\t \t\t #pressure of superheated steam in MPa\n", - "Ti = 300.\t\t\t #temperature at which the steam enters the turbine in degree celsius\n", - "m = 1.\t\t \t #mass flow rate of steam in kg/s\n", - "Te = 60.\t\t\t #temperature of dry saturated steam when it leaves the turbine in degree celsius\n", - "\n", - "# Calculations\n", - "#For steam at P and Ti:\n", - "h1 = 2995.1\t\t\t #specific entahlpy of steam in kJ/kg\n", - "\n", - "#For saturated steam at Te:\n", - "h2 = 2609.7\t\t\t #specific enthalpy of saturated vapour in kJ/kg\n", - "\n", - "Ws = m*(h1-h2)\t\t # Calculations of the power Results of the turbine using Eq.(6.83) in kW\n", - "\n", - "# Results\n", - "print \" The power Results of the turbine = %0.1f kW\"%(Ws);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The power Results of the turbine = 385.4 kW\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.10 Page No : 223" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "m = 0.1 \t\t\t #mass of superheated steam in the piston cylinder assembly in kg\n", - "P1 = 3.\t \t\t #initial pressure of superheated steam in MPa\n", - "T1 = 300.\t\t\t #initial temperature of superheated steam in degree celsius\n", - "T0 = 300.\t\t\t #temperature of the reservoir which is placed in thermal contact with the piston-cylinder assembly in degree celsius\n", - "P2 = 0.1\t\t\t #pressure of steam after expansion in MPa\n", - "\n", - "#For steam at P1 and T1:\n", - "h1 = 2995.1\n", - "v1 = 0.08116\n", - "s1 = 6.5422\n", - "\n", - "#For steam at P2 and T2:\n", - "h2 = 3074.5\n", - "v2 = 2.6390\n", - "s2 = 8.2166\n", - "\n", - "# Calculations\n", - "T0 = T0+273.15\n", - "\n", - "W = m*(h1-h2-(((P1*v1)-(P2*v2))*10**3)-(T0*(s1-s2)))\n", - "\n", - "# Results\n", - "print \" The maximum work obtained from steam = %0.2f kJ\"%(W);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The maximum work obtained from steam = 90.07 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.12 Page No : 226" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "# Variables\n", - "P1 = 0.1\t\t\t #pressure at which air enters the compressor in MPa\n", - "T1 = 300.\t\t\t #temperature at which air enters the compressor in K\n", - "P2 = 1. \t\t\t #pressure at which air leaves the compressor in MPa\n", - "T2 = 300.\t\t\t #temperature at which air leaves the compressor in K\n", - "T0 = 300.\t\t\t #ambient temperature in K\n", - "N = 1. \t\t\t #molar flow rate of air in mol/s\n", - "gaamma = 1.4\t\t #ratio of specific heat capacities (no unit)\n", - "R = 8.314\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "\n", - "Ws = (-N*T0*(-R*math.log (P2/P1)))*10**-3\n", - "\n", - "# Results\n", - "print \" The minimum power required to compress one mole per second of air = %0.3f kW\"%(Ws);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The minimum power required to compress one mole per second of air = 5.743 kW\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch7.ipynb b/Chemical_Engineering_Thermodynamics/ch7.ipynb deleted file mode 100755 index 879f7b43..00000000 --- a/Chemical_Engineering_Thermodynamics/ch7.ipynb +++ /dev/null @@ -1,255 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7 : Thermodynamic property relations" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.10 Page No : 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math \n", - "\n", - "# Variables\n", - "T2 = 150. \t\t\t #temperature at which water it is desired to boil water in degree celsius\n", - "P1 = 0.10133\t\t\t #ambient pressure in MPa\n", - "T1 = 100.\t \t\t #temperature at which water boils corresponding at pressure P1 in degree celsius\n", - "del_hv = 2256.94\t\t #enthalpy of vaporization in kJ/kg\n", - "R = 8.314;\t\t \t #universal gas constant in J/molK\n", - "M = 18*10**-3;\t\t\t #molar mass of water in kg/mol\n", - "\n", - "# Calculations\n", - "T1 = T1+273.15\n", - "T2 = T2+273.15\n", - "P2 = P1*(math.exp(((del_hv*10**3*M)*((1./T1)-(1./T2)))/(R)))\n", - "\n", - "# Results\n", - "print \" The approximate pressure at which the boiler is to be operated = %0.3f MPa\"%(P2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The approximate pressure at which the boiler is to be operated = 0.476 MPa\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.11 Page No : 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "m = 60. \t\t\t #mass of the person who wants to skate in kg\n", - "T = -2.\t\t\t #temperature of the ice in degree celsius\n", - "A = 15.\t\t\t #area of contact between the skate edges and ice in mm**2\n", - "vs = 1.091*10**-3;\t\t\t #specific volume of ice in m**3/kg (at Tref)\n", - "vf = 1.0*10**-3;\t\t\t #specific volume of water in m**3/kg (at Tref)\n", - "del_hf = 6.002;\t\t \t #enthalpy of melting of ice in kJ/mol\n", - "g = 9.81;\t\t\t #accleration due to gravity in m/s**2\n", - "Tref = 0. \t\t\t #reference temperature at which the specific enthalpy of ice and water are taken in degree celsius\n", - "\n", - "# Calculations\n", - "Tref = Tref+273.15\n", - "del_P = ((m*g)/(A*10**-6))*10**-6\n", - "del_v = (vf-vs)*(18*10**-3);\t\n", - "del_T = (del_P*10**6)/((del_hf*10**3)/(Tref*del_v));\t\t\t \n", - "\n", - "# Results\n", - "print \" The temperature of ice originally = %d degree celsius \"%(T);\n", - "print \" The reduction in melting point of ice due to the additional pressure,computed using the Clayperon equation = %0.2f degree celsius \"%(del_T);\n", - "if del_T0:\n", - " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", - " Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " Za = [Z1 ,Z2, Z3];\n", - " Z = max(Za);\n", - "else:\n", - " theta = math.cos((-(q)/2)*(math.sqrt((-27)/(((p)**3)))))\n", - " r = math.sqrt((-(p**3)/27));\t\t\t \n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3)\n", - " Za = [Z1, Z2, Z3];\n", - " Z = max(Za);\n", - "da_dT = (-a*S)/(cmath.sqrt(alpha*T_ref*Tc));\t\t\t \n", - "\n", - "dep_h = (R*T_ref*(Z-1))+(((((T_ref*da_dT)-a)/(2*math.sqrt(2)*b)))*(math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2)))))));\n", - "dep_s = (R*math.log (Z-B))+((1./(2*math.sqrt (2)*b))*(da_dT)*(math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2)))))));\n", - "del_hb = -dep_h\n", - "del_sb = -dep_s\n", - "\n", - "del_hc = ((Cp[0]*(T-T_ref))+(((Cp[1])/2)*((T**2)-(T_ref**2)))+(((Cp[2])/3)*((T**3)-(T_ref**3)))+(((Cp[3])/4)*((T**4)-(T_ref**4)))-((Cp[4])*((1./T)-(1./T_ref))))*10**-3;\n", - "del_sc = ((Cp[0])*math.log (T/T_ref))+((Cp[1])*(T-T_ref))+(((Cp[2])/2)*((T**2)-(T_ref**2)))+(((Cp[3])/3)*((T**3)-(T_ref**3)))-(((Cp[4])/2)*((1./(T**2))-(1./(T_ref**2))))-(R*math.log((P*10**6)/(P2*10**3)))\t\t\t \n", - "\n", - "Z = 0.9151\n", - "da_dT = (-a*S)/(cmath.sqrt (alpha*T*Tc));\t\t\t \n", - "\n", - "del_hd = (R*T*(Z-1))+((((T*da_dT)-a)/(2*math.sqrt(2)*b))*math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2))))));\n", - "\n", - "del_sd = (R*math.log (Z-B))+((1./(2*math.sqrt(2)*b))*(da_dT)*(math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2)))))));\n", - "\n", - "h = h0+del_ha+(del_hb*10**-3)+del_hc+(del_hd*10**-3)\n", - "s = s0+del_sa+del_sb+del_sc+del_sd;\t\t\t \n", - "\n", - "# Results\n", - "print \" The enthalpy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation\\\n", - " of state =\",h, \"kJ/mol\"\n", - "print \" The entropy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson\\\n", - " equation of state = \",s,\" J/mol K\"\n", - "print \" The volume of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson\\\n", - " equation of state =\",v,\" m**3/mol\"\n", - "\n", - "\n", - "#THE VOLUME OF n-OCTANE VAPOUR AS COMPUTED IN EXAMPLE 3.16 IS 15.14*10**-3 m**3/mol AND NOT \n", - "#15.41*10**-3 m**3/mol AS PRINTED IN THIS EXAMPLE IN THE TEXTBOOK.\n", - "# So ANSWER WOULD BE DIFFERENT\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The enthalpy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation of state = (76.8343786515+0.000518888144511j) kJ/mol\n", - " The entropy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation of state = (207.222784016-0.000740500199878j) J/mol K\n", - " The volume of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation of state = 0.01514 m**3/mol\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/ch9.ipynb b/Chemical_Engineering_Thermodynamics/ch9.ipynb deleted file mode 100755 index 9efdc810..00000000 --- a/Chemical_Engineering_Thermodynamics/ch9.ipynb +++ /dev/null @@ -1,1125 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9 : Multicomponent mixtures" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.1 Page No : 313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "per_ethanol = 60.\t\t\t #mole percent of ethanol in a ethanol-water system\n", - "per_water = 40. \t\t\t #mole percent of water in a ethanol-water system\n", - "v1 = 57.5*10**-6\t\t\t #partial molar volume of ethanol in the ethanol-water system in m**3\n", - "rho = 849.4;\t \t\t #density of the mixture in kg/m**3\n", - "M_ethanol = 46*10**-3\t\t\t #molar mass of ethanol in kg/mol\n", - "M_water = 18*10**-3 \t\t\t #molar mass of ethanol in kg/mol\n", - "\n", - "# Calculations\n", - "X1 = per_ethanol/100\n", - "X2 = per_water/100\n", - "M = (X1*M_ethanol)+(X2*M_water)\n", - "v = M/rho\n", - "v2 = (v-(X1*v1))/(X2);\t\t\t \n", - "\n", - "# Results\n", - "print \" The partial molar volume of water = %f m**3/mol\"%(v2);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The partial molar volume of water = 0.000016 m**3/mol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.2 Page No : 313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 3.\t\t\t #volume of mixture to be prepared in m**3\n", - "per_ethanol = 60.\t\t\t #mole percent of ethanol in a ethanol-water system\n", - "per_water = 40.\t\t\t #mole percent of water in a ethanol-water system\n", - "v1 = 57.5*10**-6;\t\t\t #partial molar volume of ethanol in the ethanol-water system in m**3/mol\n", - "v2 = 16*10**-6\t\t\t #partial molar volume of water in the ethanol-water system in m**3/mol\n", - "v1_pure = 57.9*10**-6\t\t\t #molar volume of pure ethanol in m**3/mol\n", - "v2_pure = 18*10**-6\t\t\t #molar volume of pure water in m**3/mol\n", - "\n", - "# Calculations\n", - "X1 = per_ethanol/100;\t\t\t # Calculations of the mole fraction of ethanol (no unit)\n", - "X2 = per_water/100;\t\t\t # Calculations of the mole fraction of water (no unit)\n", - "v = (X1*v1)+(X2*v2);\t\t\t # Calculations of the molar volume of the solution using Eq.(9.10) in m**3/mol\n", - "N = V/v\t \t\t # Calculations of the mole number of solution required in mol\n", - "N1 = N*X1\t\t\t # Calculations of the mole number of ethanol in solution in mol\n", - "N2 = N*X2;\t\t\t # Calculations of the mole number of water in solution in mol\n", - "V1 = N1*v1_pure;\t\t\t # Calculations of the volume of pure ethanol required in m**3\n", - "V2 = N2*v2_pure;\t\t\t # Calculations of the volume of pure water required in m**3\n", - "\n", - "# Results\n", - "print \" The volume of pure ethanol required = %0.3f m**3\"%(V1);\n", - "print \" The volume of pure water required = %0.3f m**3\"%(V2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The volume of pure ethanol required = 2.548 m**3\n", - " The volume of pure water required = 0.528 m**3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.3 Page No : 318" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", - "P = 0.215;\t\t\t #pressure of n-octane vapour in MPa\n", - "a = 3.789;\t\t\t #van der Waals constant in Pa(m**3/mol)**2\n", - "b = 2.37*10**-4;\t\t\t #van der Waals constant in m**3/mol\n", - "v = 15.675*10**-3;\t\t\t #molar volume of n-octane saturated vapour taken from Example 3.8 in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "Z = (P*10**6*v)/(R*T)\t\t\t # Calculations of the compressibility factor (no unit)\n", - "# Calculations of the fugacity coefficient (f/P) using the expression derived in Example 9.3 (no unit)\n", - "phi = math.exp(Z-1-math.log (((P*10**6)*(v-b))/(R*T))-a/(R*T*v));\n", - "f = (P*10**6*phi)*10**-6\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of n-octane vapour = %0.2f \"%(phi);\n", - "print \" The fugacity of n-octane vapour = %0.4f MPa\"%(f);\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of n-octane vapour = 0.95 \n", - " The fugacity of n-octane vapour = 0.2043 MPa\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.5 Page No : 322" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", - "P = 0.215;\t\t\t #pressure of n-octane vapour in MPa\n", - "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", - "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", - "w = 0.398;\t\t\t #acentric factor (no unit)\n", - "\n", - "# Calculations\n", - "Tr = T/Tc\n", - "Pr = (P*10**6)/(Pc*10**5)\n", - "log_phi0 = -0.032;\t\n", - "log_phi1 = -0.025;\n", - "phi = round(log_phi0 + 0.398*log_phi1,3)\n", - "phie = 1.1014\n", - "f = P*phie\n", - "\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of n-octane vapour = %.3f \"%(phi);\n", - "print \" The fugacity of n-octane vapour = %.4f MPa\"%(f);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of n-octane vapour = -0.042 \n", - " The fugacity of n-octane vapour = 0.2368 MPa\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.6 Page No : 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 339.7\t\t\t #temperature of ethylene in K\n", - "P = 1.\t \t\t #pressure of ethylene in bar\n", - "Tc = 283.1\t\t\t #critical temperature of ethylene in K\n", - "Pc = 51.17\t\t\t #critical pressure of ethylene in bar\n", - "w = 0.089\t\t\t #acentric factor (no unit)\n", - "\n", - "# Calculations\n", - "Tr = T/Tc\n", - "Pr = P/Pc\n", - "B0 = 0.083-(0.422/(Tr**1.6))\n", - "B1 = 0.139-(0.172/(Tr**4.2))\n", - "phi = math.exp((B0+(w*B1))*(Pr/Tr))\n", - "f = P*phi\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of ethylene = %0.4f \"%(phi);\n", - "print \" The fugacity of ethylene = %0.4f bar\"%(f);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of ethylene = 0.9963 \n", - " The fugacity of ethylene = 0.9963 bar\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.7 Page No : 330" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t \t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", - "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", - "vc = [255.0*10**-6,486.0*10**-6];\t\t\t #critical molar volume of n-butane and n-octane in m**3/mol\n", - "Zc = [0.274,0.256];\t \t\t #compressibility factor of n-butane and n-octane corresponding to Tc,Pc (no unit)\n", - "w = [0.199,0.398];\t\t\t #acentric factor of n-butane and n-octane (no unit)\n", - "R = 8.314 \t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "K_12 = 1-((8*((vc[0]*vc[1])**(1./2)))/((((vc[0])**(1./3))+((vc[1])**(1./3)))**3))\n", - "Tc_12 = (((Tc[0])*(Tc[1]))**(1./2))*(1-K_12);\t\t\t \n", - "w_12 = (w[0]+w[1])/2\n", - "Zc_12 = (Zc[0]+Zc[1])/2\n", - "vc_12 = ((((vc[0])**(1./3))+((vc[1])**(1./3)))/2)**3\n", - "Pc_12 = ((Zc_12*R*Tc_12)/vc_12)*10**-6;\t\t\t \n", - "Tr_12 = T/Tc_12\n", - "B_12_0 = 0.083-(0.422/(Tr_12**(1.6)));\t\t\t \n", - "B_12_1 = 0.139-(0.172/(Tr_12**(4.2)));\t\t\t \n", - "B_12 = ((R*Tc_12)/(Pc_12*10**6))*(B_12_0+(w_12*B_12_1))\n", - "Tr1 = T/Tc[0]\n", - "B_11_0 = 0.083-(0.422/(Tr1**(1.6)));\t\t\t \n", - "B_11_1 = 0.139-(0.172/(Tr1**(4.2)));\t\t\t \n", - "B_11 = ((R*Tc[0])/(Pc[0]*10**5))*(B_11_0+(w[0]*B_11_1))\n", - "Tr2 = T/Tc[1]\n", - "B_22_0 = 0.083-(0.422/(Tr2**(1.6)))\n", - "B_22_1 = 0.139-(0.172/(Tr2**(4.2)))\n", - "B_22 = ((R*Tc[1])/(Pc[1]*10**5))*(B_22_0+(w[1]*B_22_1))\n", - "Bm = ((y1**2)*B_11)+((2*y1*y2)*B_12)+((y2**2)*B_22);\t\t\n", - "\n", - "# Results\n", - "print \" The second virial coefficient for an equimolar mixture of n-butane and n-octane at\\\n", - " 600K = %.2e m**3/mol\"%(Bm);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The second virial coefficient for an equimolar mixture of n-butane and n-octane at 600K = -3.09e-04 m**3/mol\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.8 Page No : 331" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "a = [1.3874,3.7890];\t\t\t #van der Waals constant of n-butane and n-octane in Pa(m**3/mol)**2\n", - "b = [0.1163*10**-3,0.237*10**-3];\t\t\t #van der Waals constant of n-butane and n-octane in m**3/mol\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "a_m = ((y1**2)*a[0])+((2*y1*y2)*math.sqrt(a[0]*a[1]))+((y2**2)*a[1])\n", - "b_m = (y1*b[0])+(y2*b[1])\t\t\t\n", - "\n", - "# Results\n", - "print \" The van der Waals constant for an equimolar mixture of n-butane and n-octane,\\\n", - " a_m = %0.4f Pam**3/mol)**2\"%(a_m);\n", - "print \" The van der Waals constant for an equimolar mixture of n-butane and n-octane,\\\n", - " b_m = %f m**3/mol\"%(b_m);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The van der Waals constant for an equimolar mixture of n-butane and n-octane, a_m = 2.4405 Pam**3/mol)**2\n", - " The van der Waals constant for an equimolar mixture of n-butane and n-octane, b_m = 0.000177 m**3/mol\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.9 Page No : 333" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t \t \t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16.\t \t \t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", - "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "Tr1 = T/Tc[0]\n", - "Pr1 = P/Pc[0]\n", - "Z1_0 = 0.95\n", - "Tr2 = T/Tc[1]\n", - "Pr2 = P/Pc[1]\n", - "Z2_0 = 0.785\n", - "\n", - "Zm = (y1*Z1_0)+(y2*Z2_0)\n", - "vm = (Zm*R*T)/(P*10**5)\n", - "\n", - "P1 = y1*P\n", - "P2 = y2*P\n", - "Pr1 = P1/Pc[0]\n", - "Pr2 = P2/Pc[1]\n", - "Z1_0 = 0.97\n", - "Z2_0 = 0.91\n", - "Zm = (y1*Z1_0)+(y2*Z2_0)\n", - "vm_dalton = (Zm*R*T)/(P*10**5)\n", - "\n", - "P1 = ((Z1_0*y1*R*T)/(vm_dalton))*10**-2\n", - "P2 = ((Z2_0*y2*R*T)/(vm_dalton))*10**-2\n", - "Pr1 = P1/Pc[0]\n", - "Pr2 = P2/Pc[1]\n", - "Z1_0_new = 0.97\n", - "Z2_0_new = 0.91\n", - "if Z1_0_new == Z1_0 and Z2_0_new == Z2_0:\n", - " vm_new = vm_dalton;\t\t\t \n", - "else:\n", - " Zm = (y1*Z1_0_new)+(y2*Z2_0_new)\n", - " vm_new = (Zm*R*T)/(P*10**5);\t\n", - "\n", - "# Results\n", - "print \" The molar volume of an equimolar mixture of n-butane and n-octane found using the\\\n", - " Amagats law of additive volumes = %0.4e m**3/mol\"%(vm);\n", - "print \" The molar volume of an equimolar mixture of n-butane and\\\n", - " n-octane found using the Daltons law of additive pressures = %0.2e m**3/mol\"%(vm_new);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The molar volume of an equimolar mixture of n-butane and n-octane found using the Amagats law of additive volumes = 2.7046e-03 m**3/mol\n", - " The molar volume of an equimolar mixture of n-butane and n-octane found using the Daltons law of additive pressures = 2.93e-03 m**3/mol\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.10 Page No : 334" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16.\t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", - "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", - "R = 8.314;\t \t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "Tcm = (y1*Tc[0])+(y2*Tc[1]);\t\t\t \n", - "Pcm = (y1*Pc[0])+(y2*Pc[1])\n", - "Trm = T/Tcm;\t\t\t \n", - "Prm = P/Pcm;\t\t\t \n", - "Zm0 = 0.9;\t\t\t \n", - "vm = (Zm0*R*T)/(P*10.**5)\n", - "\n", - "# Results\n", - "print \" The molar volume of an equimolar mixture of n-butane and n-octane using the\\\n", - " pseudocritical properties estimated through Kays rule = %0.2e m**3/mol\"%(vm);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The molar volume of an equimolar mixture of n-butane and n-octane using the pseudocritical properties estimated through Kays rule = 2.81e-03 m**3/mol\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.11 Page No : 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", - "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", - "vc = [255.0*10**-6,486.0*10**-6];\t\t\t #critical molar volume of n-butane and n-octane in m**3/mol\n", - "Zc = [0.274,0.256];\t\t\t #compressibility factor of n-butane and n-octane corresponding to Tc,Pc (no unit)\n", - "R = 8.314;\t \t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "Tcm = (y1*Tc[0])+(y2*Tc[1]);\t\t\t \n", - "Pcm = ((R*((y1*Zc[0])+(y2*Zc[1]))*Tcm)/((y1*vc[0])+(y2*vc[1])))*10**-5\n", - "Trm = T/Tcm\n", - "Prm = P/Pcm\n", - "Zm0 = 0.89\n", - "vm = (Zm0*R*T)/(P*10**5)\n", - "\n", - "# Results\n", - "print \" The molar volume of an equimolar mixture of n-butane and n-octane at 600K\\\n", - " and 16bar estimated using the Prausnitz-Gunn rule = %0.2e m**3/mol\"%(vm);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar estimated using the Prausnitz-Gunn rule = 2.77e-03 m**3/mol\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.12 Page No : 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "a_m = 2.4405\t\t\t #van der Waals constant for the mixture as determined in Example 9.8 in Pa(m**3/mol)**2\n", - "b_m = 0.1767*10**-3\t\t #van der Waals constant for the mixture as determined in Example 9.8 in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "A = (a_m*P*10**5)/(R*T)**2\n", - "B = (b_m*P*10**5)/(R*T)\n", - "alpha = -1-B\n", - "beeta = A\n", - "gaamma = -(A*B)\n", - "p = beeta-((alpha**2)/3)\n", - "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", - "D = (((q)**2)/4)+(((p)**3)/27)\n", - "\n", - "if D>0 :\n", - " Z = (((-(q)/2)+(math.sqrt(D)))**(1./3))+(((-(q)/2)-(math.sqrt(D)))**(1./3))-(alpha/3);\t\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", - " Z2 = ((q/2)**(1./3))-(alpha/3)\n", - " Z3 = ((q/2)**(1./3))-(alpha/3)\n", - " Za = [Z1 ,Z2, Z3];\n", - " Z = max(Za);\n", - "else:\n", - " r = math.sqrt((-(p**3)/27));\t\t\t \n", - " theta = amath.cos((-(q)/2)*(1./r));\t\t\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3)\n", - " Za = [Z1, Z2, Z3];\n", - " Z = max(Za);\n", - "\n", - "vm = (Z*R*T)/(P*10**5)\n", - "\n", - "# Results\n", - "print \" The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar found \\\n", - " using the van der Waals equation of state = %e m**3/mol\"%(vm);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar found using the van der Waals equation of state = 2.780786e-03 m**3/mol\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.13 Page No : 336" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t\t \t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16.\t\t \t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Bm = -309.*10**-6;\t\t\t #second virial coefficient for the mixture taken from Example(9.7) in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "Zm = 1+((Bm*P*10**5)/(R*T))\n", - "vm = (Zm*R*T)/(P*10**5)\t\n", - "\n", - "# Results\n", - "print \" The molar volume of an equimolar mixture of n-butane and n-octane\\\n", - " found using the generalized virial coefficient correlation = %0.4e m**3/mol\"%(vm);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The molar volume of an equimolar mixture of n-butane and n-octane found using the generalized virial coefficient correlation = 2.8088e-03 m**3/mol\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.14 Page No : 337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "am = 2.4405\t\t\t #van der Waals constant for the mixture taken from Example 9.8 in Pa(m**3/mol)**2\n", - "bm = 0.1767*10**-3;\t\t\t #van der Waals constant for the mixture taken from Example 9.8 in m**3/mol\n", - "vm = 2.8933*10**-3;\t\t\t #molar volume of the mixture taken from Example 9.12 in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "dep_h = ((P*10**5*vm)-(R*T)-(am/vm))*10**-3\n", - "dep_s = R*(math.log ((P*10**5*(vm-bm))/(R*T)))\n", - "\n", - "# Results\n", - "print \" The enthalpy departure of an equimolar mixture of n-butane and n-octane = %0.3f kJ/mol\"%(dep_h);\n", - "print \" The entropy departure of an equimolar mixture of n-butane and n-octane = %0.3f J/mol K\"%(dep_s);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The enthalpy departure of an equimolar mixture of n-butane and n-octane = -1.203 kJ/mol\n", - " The entropy departure of an equimolar mixture of n-butane and n-octane = -1.145 J/mol K\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.15 Page No : 338" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600. \t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t \t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tcm = 497.3;\t\t\t #pseudocritical temperature of mixture taken from Example(9.10) in K\n", - "Pcm = 31.47;\t\t\t #pseudocritical pressure of mixture taken from Example(9.10) in bar\n", - "Trm = 1.21;\t\t \t #pseudoreduced temperature of the mixture taken from Example(9.10) (no unit)\n", - "Prm = 0.51;\t\t\t #pseudoreduced pressure of the mixture taken from Example(9.10) (no unit)\n", - "w_butane = 0.199;\t\t #acentric factor for n-butane (no unit)\n", - "w_octane = 0.398;\t\t #acentric factor for n-octane (no unit)\n", - "R = 8.314;\t\t \t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "wm = (y1*w_butane)+(y2*w_octane)\n", - "del_h0 = 0.380;\t\t\t \n", - "del_h1 = 0.188;\t\t\t \n", - "del_s0 = 0.22;\t\t\t \n", - "del_s1 = 0.18;\t\t\t \n", - "dep_h = ((R*Tcm)*(del_h0+(wm*del_h1)))*10**-3;\t\t\t \n", - "dep_s = (R)*(del_s0+(wm*del_s1));\t\t\t \n", - "\n", - "# Results\n", - "print \" The enthalpy departure of an equimolar mixture of n-butane and n-octane using\\\n", - " the generalized compressibility factor correlation = %0.3f kJ/mol\"%(dep_h);\n", - "print \" The entropy departure of an equimolar mixture of n-butane and n-octane using \\\n", - "the generalized compressibility factor correlation = %f J/mol K\"%(dep_s);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The enthalpy departure of an equimolar mixture of n-butane and n-octane using the generalized compressibility factor correlation = 1.803 kJ/mol\n", - " The entropy departure of an equimolar mixture of n-butane and n-octane using the generalized compressibility factor correlation = 2.275791 J/mol K\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.16 Page No : 339" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", - "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", - "w = [0.199,0.398];\t\t\t #acentric factor of n-butane and n-octane (no unit)\n", - "Tr1 = 1.411;\t\t\t #reduced temperature of n-butane (no unit) taken from Example (9.7)\n", - "Tr2 = 1.054;\t\t\t #reduced temperature of n-octane (no unit) taken from Example (9.7)\n", - "Tr_12 = 1.24;\t\t\t #reduced temperature for computing the mixture interaction virial coefficient (no unit) taken from Example(9.7)\n", - "Pc_12 = 2.978;\t\t\t #Pc_ij in MPa taken from Example(9.7)\n", - "Tc_12 = 483.9;\t\t\t #Tc_ij in K taken from Example(9.7)\n", - "w_12 = 0.2985;\t\t\t # w_ij (no unit) taken from Example(9.7)\n", - "Bm = -309*10**-6;\t\t\t #second virial coefficient in m**3/mol taken from Example (9.7)\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "dB0_dTr1 = 0.675/(Tr1**2.6);\t\t\t \n", - "dB0_dTr2 = 0.675/(Tr2**2.6);\t\t\t \n", - "dB1_dTr1 = 0.722/(Tr1**5.2);\t\t\t \n", - "dB1_dTr2 = 0.722/(Tr2**5.2);\t\t\t \n", - "dB0_dTr12 = 0.675/(Tr_12**2.6);\t\t\t \n", - "dB1_dTr12 = 0.722/(Tr_12**5.2);\t\t\t \n", - "dB1_dT = (R/(Pc[0]*10**5))*((dB0_dTr1)+(w[0]*(dB1_dTr1)));\t\t\t\n", - "dB2_dT = (R/(Pc[1]*10**5))*((dB0_dTr2)+(w[1]*(dB1_dTr2)));\t\t\t\n", - "dB12_dT = (R/(Pc_12*10**6))*((dB0_dTr12)+(w_12*(dB1_dTr12)));\t\t\t\n", - "dBm_dT = ((y1**2)*(dB1_dT))+((2*y1*y2)*(dB12_dT))+((y2**2)*(dB2_dT));\t\n", - "dep_h = ((Bm-(T*dBm_dT))*P*10**5)*10**-3\n", - "dep_s = -P*10**5*(dBm_dT);\t\t\t \n", - "\n", - "# Results\n", - "print \" The enthalpy departure of an equimolar mixture of n-butane and n-octane\\\n", - " using the virial coefficient correlation = %f kJ/mol\"%(dep_h);\n", - "print \" The entropy departure of an equimolar mixture of n-butane and n-octane\\\n", - " using the virial coefficient correlation = %0.3f J/mol K\"%(dep_s);\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The enthalpy departure of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = -1.908476 kJ/mol\n", - " The entropy departure of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = -2.357 J/mol K\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.17 Page No : 340" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "a_m = 2.4405\t\t\t #van der Waals constant (a_m) in Pa(m**3/mol)**2 taken from Example(9.8)\n", - "b_m = 0.1767*10**-3\t\t #van der Waals constant (b_m) in m**3/mol taken from Example(9.8)\n", - "Z = 0.928;\t\t\t #compressibility factor taken from Example(9.12)\n", - "vm = 2.8933*10**-3;\t\t #molar volume of the equimolar mixture in m**3/mol taken from Example(9.12)\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "phi = math.exp(Z-1-math.log ((P*10**5*(vm-b_m))/(R*T))-(a_m/(R*T*vm)));\t\t\t\n", - "f = phi*P;\t\t\n", - "\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of an equimolar mixture of n-butane and n-octane\\\n", - " using the van der Waals equation of state = %0.4f \"%(phi);\n", - "print \" The fugacity of an equimolar mixture of n-butane and n-octane using the van der Waals \\\n", - "equation of state = %0.2f bar\"%(f);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the van der Waals equation of state = 0.9018 \n", - " The fugacity of an equimolar mixture of n-butane and n-octane using the van der Waals equation of state = 14.43 bar\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.18 Page No : 341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16.\t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tcm = 497.3;\t\t\t #pseudocritical temperature of mixture in K taken from Example(9.10)\n", - "Pcm = 31.47;\t\t\t #pseudocritical pressure of mixture in bar taken from Example(9.10)\n", - "Trm = 1.21;\t\t\t #pseudoreduced temperature of the mixture (no unit) taken from Example(9.10)\n", - "Prm = 0.51;\t\t\t #pseudoreduced pressure of the mixture (no unit) taken from Example(9.10)\n", - "w = [0.199,0.398];\t\t\t #acentric factor of n-butane and n-octane (no unit)\n", - "\n", - "# Calculations\n", - "wm = (w[0]+w[1])/2\n", - "log_phi0 = -0.042\n", - "log_phi1 = 0.01\n", - "phi = 10**(log_phi0+(wm*log_phi1));\t\t\n", - "f = P*phi;\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of an equimolar mixture of n-butane and n-octane \\\n", - "using the pseudocritical constants method = %0.3f \"%(phi);\n", - "print \" The fugacity of an equimolar mixture of n-butane and n-octane using\\\n", - " the pseudocritical constants method = %f bar\"%(f);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the pseudocritical constants method = 0.914 \n", - " The fugacity of an equimolar mixture of n-butane and n-octane using the pseudocritical constants method = 14.625307 bar\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.19 Page No : 341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Bm = -309.*10**-6;\t\t\t #second virial coefficient in m**3/mol taken from Example (9.7)\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "phi = math.exp((Bm*P*10**5)/(R*T))\n", - "f = phi*P;\t\t\t \n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of an equimolar mixture of n-butane and n-octane using\\\n", - " the virial coefficient correlation = %.3f \"%(phi);\n", - "print \" The fugacity of an equimolar mixture of n-butane and n-octane using\\\n", - " the virial coefficient correlation = %f bar\"%(f);\n", - "\n", - "# Note : answers in book is wrong please check manually." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = 0.906 \n", - " The fugacity of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = 14.490290 bar\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.20 Page No : 344" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", - "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", - "R = 8.314;\t \t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "a1 = (0.42748*R**2*Tc[0]**2.5)/(Pc[0]*10**5*math.sqrt(T))\n", - "a2 = (0.42748*R**2*Tc[1]**2.5)/(Pc[1]*10**5*math.sqrt(T))\n", - "b1 = (0.08664*R*Tc[0])/(Pc[0]*10**5);\t\t\t \n", - "b2 = (0.08664*R*Tc[1])/(Pc[1]*10**5);\t\t\t \n", - "\n", - "a = ((y1**2)*a1)+(2*y1*y2*math.sqrt(a1*a2))+((y2**2)*a2)\n", - "b = (y1*b1)+(y2*b2)\n", - "\n", - "A = (a*P*10**5)/(R*T)**2\n", - "B = (b*P*10**5)/(R*T);\t\n", - "alpha = -1.\t\t\t \n", - "beeta = A-B-B**2\n", - "gaamma = -(A*B)\n", - "p = beeta-(alpha**2)/3\n", - "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", - "D = (((q)**2)/4)+(((p)**3)/27)\n", - "\n", - "if D>0:\n", - " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3);\t\t\t #One real root given by Eq.(3.32)\n", - "elif D == 0:\n", - " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", - " Z2 = ((q/2)**(1./3))-(alpha/3);\n", - " Z3 = ((q/2)**(1./3))-(alpha/3);\n", - " Za = [Z1, Z2, Z3];\n", - " Z = max(Za);\n", - "else:\n", - " r = math.sqrt((-(p**3)/27));\t\t\n", - " theta = amath.cos((-(q)/2)*(1./r));\t\n", - " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", - " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", - " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", - " Za = [Z1, Z2, Z3];\n", - " Z = max(Za);\n", - "\n", - "phi1 = math.exp(((b1/b)*(Z-1))-math.log(Z-B)+((a/(b*R*T))*((b1/b)-(2*math.sqrt(a1/a)))*math.log((Z+B)/Z)));\n", - "\n", - "phi2 = math.exp(((b2/b)*(Z-1))-math.log(Z-B)+((a/(b*R*T))*((b2/b)-(2*math.sqrt(a2/a)))*math.log((Z+B)/Z)));\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of n-butane in the equimolar mixture using the\\\n", - " Redlich-Kwong Equation of state = %0.4f \"%(phi1);\n", - "print \" The fugacity coefficient of n-octane in the equimolar mixture using the\\\n", - " Redlich-Kwong Equation of state = %0.4f \"%(phi2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of n-butane in the equimolar mixture using the Redlich-Kwong Equation of state = 0.9644 \n", - " The fugacity coefficient of n-octane in the equimolar mixture using the Redlich-Kwong Equation of state = 0.8326 \n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.21 Page No : 346" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", - "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", - "B_11 = -131*10**-6\t\t\t #pure component (n-butane) second virial coefficient in m**3/mol taken from Example(9.7)\n", - "B_22 = -577*10**-6\t\t\t #pure component (n-octane) second virial coefficient in m**3/mol taken from Example(9.7)\n", - "B_12 = -264*10**-6\t\t\t #mixture interaction virial coefficient in m**3/mol taken from Example(9.7)\n", - "Bm = -309*10**-6\t\t\t #second virial coefficient in m**3/mol taken from Example(9.7)\n", - "R = 8.314 \t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "y1 = 0.5\n", - "y2 = 0.5\n", - "Zm = (1./2)*(1+math.sqrt(1+((4*Bm*P*10**5)/(R*T))))\n", - "phi1 = math.exp((((2*P*10**5)/(Zm*R*T))*((y1*B_11)+(y2*B_12)))-math.log(Zm))\n", - "phi2 = math.exp((((2*P*10**5)/(Zm*R*T))*((y1*B_12)+(y2*B_22)))-math.log(Zm))\n", - "\n", - "# Results\n", - "print \" The fugacity coefficient of n-butane in the equimolar mixture using the\\\n", - " Virial Equation of state = %0.3f \"%(phi1);\n", - "print \" The fugacity coefficient of n-octane in the equimolar mixture using the Virial\\\n", - " Equation of state = %f \"%(phi2);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity coefficient of n-butane in the equimolar mixture using the Virial Equation of state = 0.976 \n", - " The fugacity coefficient of n-octane in the equimolar mixture using the Virial Equation of state = 0.830827 \n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.22 Page No : 349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Variables\n", - "T = 427.85 \t\t\t #temperature of n-octane vapour in K\n", - "Psat = 0.215;\t\t\t #saturation pressure of n-octane vapour at T in MPa\n", - "P = 1.\t\t \t #pressure at which the fugacity of liquid n-octane is to be determined in MPa\n", - "f_sat = 0.2368;\t\t\t #fugacity of n-octane vapour at T and Psat taken from Example(9.5) in MPa\n", - "vl = 0.2003*10**-3;\t\t\t #molar volume of n-octane liquid at T and Psat taken from Example(3.16) in m**3/mol\n", - "R = 8.314;\t\t\t #universal gas constant in J/molK\n", - "\n", - "# Calculations\n", - "f_l = (0.2368*math.exp((vl*(P-Psat)*10**6)/(R*T)));\t\t\t \n", - "\n", - "# Results\n", - "print \" The fugacity of liquid n-octane at 427.85K and 1MPa = %0.4f MPa\"%(f_l);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fugacity of liquid n-octane at 427.85K and 1MPa = 0.2475 MPa\n" - ] - } - ], - "prompt_number": 30 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf b/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf deleted file mode 100755 index a01e3318..00000000 Binary files a/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/1.png b/Chemical_Engineering_Thermodynamics/screenshots/1.png deleted file mode 100755 index 2ec2e814..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/1.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/2.png b/Chemical_Engineering_Thermodynamics/screenshots/2.png deleted file mode 100755 index 91cda60b..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/2.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/3.png b/Chemical_Engineering_Thermodynamics/screenshots/3.png deleted file mode 100755 index 61ce8534..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/3.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_gE-RTx1x2_vs_x1.png b/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_gE-RTx1x2_vs_x1.png deleted file mode 100755 index 90bbaf61..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_gE-RTx1x2_vs_x1.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png b/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png deleted file mode 100755 index b7a97cb1..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/T-x-y_diagram.png b/Chemical_Engineering_Thermodynamics/screenshots/T-x-y_diagram.png deleted file mode 100755 index f231eb76..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/T-x-y_diagram.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/ch1.png b/Chemical_Engineering_Thermodynamics/screenshots/ch1.png deleted file mode 100755 index ae25b279..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/ch1.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/ch8.png b/Chemical_Engineering_Thermodynamics/screenshots/ch8.png deleted file mode 100755 index 29959197..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/ch8.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic111.png b/Chemical_Engineering_Thermodynamics/screenshots/pic111.png deleted file mode 100755 index 0564964c..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/pic111.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic222.png b/Chemical_Engineering_Thermodynamics/screenshots/pic222.png deleted file mode 100755 index 2442734b..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/pic222.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic333.png b/Chemical_Engineering_Thermodynamics/screenshots/pic333.png deleted file mode 100755 index 2fcec895..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/pic333.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png b/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png deleted file mode 100755 index 9e02c340..00000000 Binary files a/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png and /dev/null differ diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt new file mode 100755 index 00000000..d33ed50c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt @@ -0,0 +1,10 @@ +Contributed By: pratik gandhi +Course: bca +College/Institute/Organization: Cybercom Creation +Department/Designation: Developer +Book Title: Chemical Engineering Thermodynamics +Author: P. Ahuja +Publisher: PHI Learning Private Limited, New Delhi +Year of publication: 2009 +Isbn: 9788120336377 +Edition: 1 \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb new file mode 100755 index 00000000..3336e17e --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb @@ -0,0 +1,2536 @@ +{ + "metadata": { + "name": "ch10_1", + "signature": "sha256:3b50ad151f89e9ea380ce80c8112ec5468586c82e236862a1e3d8e194fa15249" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Residual Properties by Equations of State" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.2 Page Number : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "T = 40 + 273.15;\t\t\t#[C] - Temperature\n", + "P_1 = 0;\t\t\t#[bar]\n", + "P_2 = 10;\t\t\t#[bar]\n", + "V_liq = 90.45;\t\t\t#[cm**(3)/mol]\n", + "V_liq = V_liq*10**(-6);\t\t\t#[m**(3)/mol]\n", + "P_sat = 4.287;\t\t\t#[bar] \n", + "\n", + "# For butadiene\n", + "T_c = 425.0;\t\t\t#[K] - Critical temperature\n", + "P_c = 43.3;\t\t\t#[bar] - Critical pressure\n", + "P_c = P_c*10**(5);\t\t\t#[N/m**(2)]\n", + "w = 0.195;\t\t\t# Acentric factor\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "# Let us calculate second virial coefficient at 40 C\n", + "Tr = T/T_c;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B = ((B_0 + (w*B_1))*(R*T_c))/P_c;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "\n", + "# math.log(f/P) = (B*P)/(R*T)\n", + "# f = P*exp((B*P)/(R*T))\n", + "\n", + "print \" The table is as follows\"\n", + "print \" Pbar \\t\\t fbar \\t\\t phi\";\n", + "from numpy import zeros\n", + "P = [1,2,3,4,4.287,5,6,8,10];\n", + "f = zeros(9);\n", + "phi = zeros(9);\n", + "for i in range(5):\n", + " f[i]=P[i]*(math.exp((B*P[i]*10**(5))/(R*T)));\t\t\t#[bar] # Pressure inside the exponential term has to be in N/m**(2)\n", + " phi[i]= (f[i]/P[i]);\n", + " print \" %f \\t %f \\t\\t\\t %f\"%(P[i],f[i],phi[i]) \n", + "\n", + "f_sat = f[4];\n", + "\n", + "# From pressure of 4.287 bar onwards the valid equation to compute fugacity of compressed liquid is given by\n", + "# f = f_sat*exp[V_liq*(P-P_sat)/(R*T)]\n", + "\n", + "for j in range(5,9):\n", + " f[j] = f_sat*math.exp((V_liq*(P[j]-P_sat)*10**(5))/(R*T));\t#[bar] # Pressure inside the exponential term has to be in N/m**(2)\n", + " phi[j] = f[j]/P[j]; \n", + " print \" %f \\t %f \\t\\t\\t %f\"%(P[j],f[j],phi[j]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The table is as follows\n", + " Pbar \t\t fbar \t\t phi\n", + " 1.000000 \t 0.978336 \t\t\t 0.978336\n", + " 2.000000 \t 1.914284 \t\t\t 0.957142\n", + " 3.000000 \t 2.809221 \t\t\t 0.936407\n", + " 4.000000 \t 3.664484 \t\t\t 0.916121\n", + " 4.287000 \t 3.902801 \t\t\t 0.910380\n", + " 5.000000 \t 3.912481 \t\t\t 0.782496\n", + " 6.000000 \t 3.926097 \t\t\t 0.654349\n", + " 8.000000 \t 3.953471 \t\t\t 0.494184\n", + " 10.000000 \t 3.981037 \t\t\t 0.398104\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.3 Page Number : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "n = 100.;\t\t\t#[mol] - No of moles\n", + "T_1 = 600.;\t\t\t#[K] - Initial temperature\n", + "T_2 = 300.;\t\t\t#[K] - Final temperature\n", + "P_1 = 10.;\t\t\t#[atm] - Initial pressure\n", + "P_1 = P_1*101325;\t\t\t#[Pa]\n", + "P_2 = 5.;\t\t\t#[atm] - Final presssure\n", + "P_2 = P_2*101325;\t\t\t#[Pa]\n", + "Tc = 369.8;\t\t\t#[K] - Critical temperature\n", + "Pc = 42.48;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.152;\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations\n", + "# At 600 K\n", + "Tr = T_1/Tc;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT)\n", + "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT)\n", + "dB_dT = ((R*Tc)/(Pc))*(dB0_dT + w*dB1_dT);\t\t\t# dB/dT\n", + "\n", + "# Now let us calculate B and dB/dT at 300 K\n", + "Tr_prime = T_2/Tc;\t\t\t# Reduced temperature\n", + "B_0_prime = 0.083-(0.422/(Tr_prime)**(1.6));\n", + "B_1_prime = 0.139-(0.172/(Tr_prime)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B_prime = ((B_0_prime + (w*B_1_prime))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "dB0_dT_prime = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT)\n", + "dB1_dT_prime = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT)\n", + "dB_dT_prime = ((R*Tc)/(Pc))*(dB0_dT_prime + w*dB1_dT_prime);\t\t\t# dB/dT\n", + "\n", + "# The change in enthalpy for ideal gas is given by\n", + "\n", + "def f16(T): \n", + " return -0.966+7.279*10**(-2)*T-3.755*10**(-5)*T**(2)+7.58*10**(-9)*T**(3)\n", + "\n", + "delta_H_ig = quad(f16,T_1,T_2)[0]\n", + "\n", + "delta_H_ig = delta_H_ig*4.184;\t\t\t#[J/mol]\n", + "\n", + "# We know that delta_H_ig = delta_U_ig + R*delta_T. Therefore change in internal energy is given by \n", + "delta_U_ig = delta_H_ig - R*(T_2 - T_1);\t\t\t#[J/mol]\n", + "\n", + "# The change in entropy of ideal gas is given by \n", + "\n", + "def f17(T): \n", + " return Cp_0/T\n", + "\n", + "#delta_S_ig = quad(f17,T_1,T_2) - R*math.log(P_2/P_1)[0]\n", + "\n", + "\n", + "def f18(T): \n", + " return (-0.966+7.279*10**(-2)*T-3.755*10**(-5)*T**(2)+7.58*10**(-9)*T**(3))/T\n", + "\n", + "delta_S_ig = quad(f18,T_1,T_2)[0]*4.184 - R*math.log(P_2/P_1)\n", + "\n", + "\n", + "# Now let us calculate the change in enthalpy of gas. We know that\n", + "# delta_H = delta_H_ig + delta_H_R\n", + "# delta_H_R = H_2_R - H_1_R\n", + "H_2_R = B_prime*P_2 - P_2*T_2*dB_dT_prime;\t\t\t# [J/mol]\n", + "H_1_R = B*P_1 - P_1*T_1*dB_dT;\t\t\t# [J/mol]\n", + "delta_H_R = H_2_R - H_1_R;\t\t\t# [J/mol]\n", + "delta_H = delta_H_ig + delta_H_R;\t\t\t# [J/mol]\n", + "\n", + "# Let us calculate the residual entropy of gas\n", + "S_2_R = -P_2*dB_dT_prime;\t\t\t#[J/mol-K]\n", + "S_1_R = -P_1*dB_dT;\t\t\t#[J/mol-K]\n", + "delta_S = delta_S_ig + (S_2_R - S_1_R);\t\t\t#[J/mol-K]\n", + "\n", + "# Let us calculate the residual internal energy of gas\n", + "U_2_R = -P_2*T_2*dB_dT_prime;\t\t\t#[J/mol-K]\n", + "U_1_R = -P_1*T_1*dB_dT;\t\t\t#[J/mol-K]\n", + "delta_U = delta_U_ig + (U_2_R - U_1_R);\t\t\t#[J/mol-K]\n", + "\n", + "# For 100 mol sample,\n", + "delta_H_ig = delta_H_ig*n*10**(-3);\t\t\t#[kJ/mol]\n", + "delta_H = delta_H*n*10**(-3);\t\t\t#[kJ/mol]\n", + "\n", + "delta_U_ig = delta_U_ig*n*10**(-3);\t\t\t#[kJ/mol]\n", + "delta_U = delta_U*n*10**(-3);\t\t\t#[kJ/mol]\n", + "\n", + "delta_S_ig = delta_S_ig*n*10**(-3);\t\t\t#[kJ/mol]\n", + "delta_S = delta_S*n*10**(-3);\t\t\t#[kJ/mol]\n", + "\n", + "# Results\n", + "print \" The value of delta_H = %f kJ/mol\"%(delta_H);\n", + "print \" The value of delta_H_ig ideal gas)= %f J/mol\"%(delta_H_ig);\n", + "print \" The value of delta_U = %f kJ/mol\"%(delta_U);\n", + "print \" The value of delta_U_ig ideal gas) = %f kJ/mol\"%(delta_U_ig);\n", + "print \" The value of delta_S = %f kJ/mol\"%(delta_S);\n", + "print \" The value of delta_S_ig ideal gas) = %f kJ/mol\"%(delta_S_ig);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of delta_H = -3130.406247 kJ/mol\n", + " The value of delta_H_ig ideal gas)= -3096.763542 J/mol\n", + " The value of delta_U = -2867.753839 kJ/mol\n", + " The value of delta_U_ig ideal gas) = -2847.343542 kJ/mol\n", + " The value of delta_S = -6.466831 kJ/mol\n", + " The value of delta_S_ig ideal gas) = -6.358994 kJ/mol\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.4 Page Number : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 35 + 273.15;\t\t\t#[K] - Temperature\n", + "P = 10;\t\t\t#[atm] - Pressure\n", + "P = P*101325;\t\t\t#[Pa]\n", + "# Methane obeys the equation of state\n", + "# Z = 1 + (P*B)/(R*T)\n", + "\n", + "# Calculations\n", + "# At 35 C,\n", + "B = -50;\t\t\t#[cm**(3)/mol]\n", + "dB_dT = 1.0;\t\t\t#[cm**(3)/mol-K] - dB/dT\n", + "dB_dT = dB_dT*10**(-6);\t\t\t#[m**(3)/mol-K]\n", + "d2B_dT2 = -0.01;\t\t\t#[cm**(3)/mol-K**(2)] - d**2(B)/d(T**2)\n", + "d2B_dT2 = d2B_dT2*10**(-6);\t\t\t#[m**(3)/mol-K**(2)]\n", + "\n", + "# Ideal gas molar heat capacity of methane is given by\n", + "# Cp_0 = 4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3)\n", + "\n", + "# The molar heat capacity is given by\n", + "# Cp = Cp_0 + Cp_R\n", + "# For virial gas equation of state \n", + "Cp_R = -P*T*d2B_dT2;\t\t\t#[J/mol-K]\n", + "\n", + "# thus heat capacity is given by \n", + "# Cp = a + b*T + c*T**(2) + d*T**(3) - P*T*d2B_dT2\n", + "# Putting the values, we get\n", + "Cp = (4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3))*4.184 - P*T*d2B_dT2;\t\t\t#[J/mol-K]\n", + "\n", + "# Results\n", + "print \" The molar heat capacity of methane is %f J/mol-K\"%(Cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar heat capacity of methane is 39.349753 J/mol-K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.5 Page Number : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "\n", + "# Variables\n", + "T_1 = 360;\t\t\t#[K] - Initial temperature\n", + "P_1 = 10;\t\t\t#[bar] - Initial pressure\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "Tc = 408.1;\t\t\t#[K] - Critical temperature\n", + "Pc = 36.48;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.181;\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Cv_0 = 106.0;\t\t\t#[J/mol-K]\n", + "\n", + "# Calculations\n", + "# At 360 K\n", + "Tr = T_1/Tc;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT)\n", + "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT)\n", + "dB_dT = ((R*Tc)/(Pc))*(dB0_dT + w*dB1_dT);\t\t\t# dB/dT\n", + "\n", + "# At state 1\n", + "V_1 = B + (R*T_1)/P_1;\t\t\t#[m**(3)/mol] - Molar volume\n", + "# At state 1\n", + "V_2 = 10*V_1;\t\t\t#[m**(3)/mol] - Molar volume\n", + "\n", + "T_2 = -(P_1*T_1*(dB_dT))/Cv_0 + T_1;\t\t\t#[K]\n", + "\n", + "T = 350;\n", + "\n", + "fault = 10;\n", + "def f(T): \n", + " return 106*(T-T_1)+972.72-((R*T**(2))/(V_2-B_prime))*dB_dT_prime\n", + "while(fault>0.007):\n", + " Tr_prime = T/Tc;\t\t\t# Reduced temperature\n", + " B_0_prime = 0.083-(0.422/(Tr_prime)**(1.6));\n", + " B_1_prime = 0.139-(0.172/(Tr_prime)**(4.2));\n", + " #We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + " B_prime = ((B_0_prime + (w*B_1_prime))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + " dB0_dT_prime = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT)\n", + " dB1_dT_prime = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT)\n", + " dB_dT_prime = ((R*Tc)/(Pc))*(dB0_dT_prime + w*dB1_dT_prime);\t\t\t# dB/dT\n", + " T_prime = fsolve(f,0.15)\n", + " fault=abs(T-T_prime);\n", + " T = T + 0.001;\n", + "\n", + "# Results\n", + "print \" The final temperature is %f K\"%(T);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final temperature is 351.910000 K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.6 Page Number : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 220 + 273.15;\t\t\t#[K] - Temperature\n", + "Tc = 562.2;\t\t\t#[K] - Critical temperature\n", + "Pc = 48.98;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.210;\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "P_sat = 1912.86;\t\t\t#[kPa] - Saturation pressure at 220 C\n", + "P_sat = P_sat*10**(3);\t\t\t#[Pa]\n", + "Mol_wt = 78.114;\t\t\t#[g/mol] - Molecular weight of benzene\n", + "\n", + "# Calculations and Results\n", + "#(1)\n", + "\n", + "# At 220 C\n", + "Tr = T/Tc;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "\n", + "# We know that math.log(f/P) = (B*P)/(R*T)\n", + "# Thus at saturated conditions\n", + "# math.log(f_sat/P_sat) = B*P_sat/(R*T)\n", + "f_sat = P_sat*(math.exp((B*P_sat)/(R*T)));\t\t\t#[Pa]\n", + "f_sat = f_sat*10**(-3);\t\t\t#[kPa]\n", + "\n", + "print \" 1).The fugacity of liquid benzene is %f kPa\"%(f_sat);\n", + "\n", + "#(2)\n", + "P = 2014.7;\t\t\t# [psia] - Total gauge pressure\n", + "P = 138.94;\t\t\t# [bar]\n", + "P = P*10**(5);\t\t\t# [Pa]\n", + "den = 0.63;\t\t\t# [g/cm**(3)] - density of benzene\n", + "den = den*10**(3);\t\t\t# [kg/m**(3)]\n", + "\n", + "# Therefore specific volume is \n", + "V = 1/den;\t\t\t#[m/**(3)/kg]\n", + "# Molar volume is given by\n", + "V = V*Mol_wt*10**(-3);\t\t\t#[m**(3)/mol]\n", + "\n", + "# Thus fugacity at 220 C and pressure P is given by \n", + "f = f_sat*(math.exp((V*(P-P_sat))/(R*T)));\n", + "\n", + "print \" 2).The fugacity of liquid benzene is %f kPa\"%(f);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The fugacity of liquid benzene is 1551.083216 kPa\n", + " 2).The fugacity of liquid benzene is 2228.386532 kPa\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.7 Page Number : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "# C = -0.067 + 30.7/T\n", + "# D = 0.0012 - 0.416/T\n", + "\n", + "T = 80 + 273.15;\t\t\t#[K]\n", + "P = 30;\t\t\t#[bar]\n", + "#P = P;\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\n", + "# Calculations\n", + "# We have the relation derived in the book\n", + "# d(G/(R*T)) = (V/(R*T))dP - (H/(R*T**(2)))dT\n", + "# Writing the same equation for ideal gas and subtracting it from the above equation we get\n", + "# d(G_R/(R*T)) = (V_R/(R*T))dP - (H_R/(R*T**(2)))dT\n", + "# Therefore, H_R/(R*T**(2)) = -[del((G_R)/(R*T))/del(T)]_P\n", + "\n", + "# Substituting the relation G_R/(R*T) = math.log(f/P), we get\n", + "# H_R/(R*T**(2)) = -[del(math.log(f/P))/del(T)]_P = -[del(-C*P - D*P**(2))/del(T)]_P\n", + "# H_R/R = - 30.7*P + 0.416*P**(2)\n", + "\n", + "# Substituting the given conditions we get\n", + "H_R = R*(-30.7*P + 0.416*P**(2));\t\t\t#[J/mol]\n", + "\n", + "# Results\n", + "print \" The molar enthalpy of the gas relative to that of the ideal gas at 80 C and 30 bar pressure is H_R = %f J/mol\"%(H_R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar enthalpy of the gas relative to that of the ideal gas at 80 C and 30 bar pressure is H_R = -4544.432400 J/mol\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.8 Page Number : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "# (1)\n", + "T = 311;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "# Pressure in 'bar' is given below\n", + "P = [0.690,1.380,2.760,5.520,8.280,11.034,13.800,16.550];\n", + "# Molar volume in 'm**(3)/mol' is given below\n", + "V = [0.0373,0.0186,0.00923,0.00455,0.00298,0.00220,0.00175,0.00144];\n", + "\n", + "# Z = 1 + (B/V) + (C/V**(2))\n", + "# (Z-1)*V = B + (C/V)\n", + "\n", + "from numpy import zeros\n", + "Z=zeros(8);\n", + "k=zeros(8);\n", + "t=zeros(8);\n", + "\n", + "# Calculations and Results\n", + "for i in range(8):\n", + " Z[i]=(P[i]*10**(5)*V[i])/(R*T);\n", + " k[i]=(Z[i]-1)*V[i];\n", + " t[i]=1./V[i];\n", + "\n", + "from scipy.stats import linregress\n", + "from numpy import array\n", + "t = array(t)\n", + "k = array(k)\n", + "C,B,c,d,e = linregress(t.T,k.T)\n", + "#[C,B,sig]=reglin(t',k');\n", + "\n", + "#From the regression, we get intercept = B and slope = C,and thus,\n", + "\n", + "print \" 1).The second virial coefficient of CO2 is given by B = %e m**3)/mol\"%(B);\n", + "print \" The thied virial coefficient of CO2 is given by C = %e m**6)/mol**2)\"%(C);\n", + "\n", + "# (2)\n", + "P_final = 13.8;\t\t\t#[bar]\n", + "\n", + "def f40(P): \n", + "\t return V-(R*T)/P\n", + "\n", + "# We know that R*T*math.log(f/P) = quad(f40,0,P)[0]\n", + "\n", + "# Therefore we have to plot V - (R*T)/P versus P and calculate the area beneath the curve from 0 to 13.8 bar\n", + "# For this we need the value of the term V - (R*T)/P at P = 0. At low pressure the virial equation becomes\n", + "# Z = 1 + (B/V)\n", + "#and V - (R*T)/P = (Z*R*T)/P - (R*T)/P = (1 + (B/V))*((R*T)/P) - (R*T)/P = (B*R*T)/(P*V) = (B/Z)\n", + "# Thus lim P tending to zero (V - (R*T)/P) = B ( as P tend to zero, Z tend to 1 ) \n", + "\n", + "P_prime = [0.000,0.690,1.380,2.760,5.520,8.280,11.034,13.800];\n", + "V_prime = [0.000,0.0373,0.0186,0.00923,0.00455,0.00298,0.00220,0.00175];\n", + "summation = 0;\n", + "x=zeros(8);\n", + "y=zeros(8);\n", + "z=zeros(8);\n", + "for j in range(2,8):\n", + " x[j]=V_prime[j]-(R*T)/(P_prime[j]*10**(5));\t\t\t#[m**(3)/mol]\n", + " y[j]=(x[j] + x[j-1])/2;\n", + " z[j]=y[j]*((P_prime[j]-P_prime[j-1]))*10**(5);\n", + " summation = summation + z[j] ;\t\t\t#[J/mol]\n", + "\n", + "summation = summation + 2*z[1] - z[1];\t\t\t# Because in the above calculation,in order to calculate the average a summation of z(2) is not included,only half of it gets added\n", + "\n", + "\n", + "def f41(P): \n", + "\t return V - (R*T)/P\n", + "\n", + "\t\t\t# Now we have, area = quad(f41,0,13.8*10**(5))[0]\n", + "\n", + "\t\t\t# R*T*math.log(f/P) = summation\n", + "f = P_final*(math.exp(summation/(R*T)));\t\t\t#[bar]\n", + "\n", + "\n", + "print \" 2).The fugacity of steam at 311 K and 13.8 bar pressure is %f bar\"%(f);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The second virial coefficient of CO2 is given by B = -1.515264e-04 m**3)/mol\n", + " The thied virial coefficient of CO2 is given by C = 5.618543e-08 m**6)/mol**2)\n", + " 2).The fugacity of steam at 311 K and 13.8 bar pressure is 12.892780 bar\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.9 Page Number : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 0 + 273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\t\t\t# Pressure in 'atm' is given below\n", + "P = [100,200,300,400,500,600,700,800,900,1000];\n", + "\t\t\t# The compressibility factor values are\n", + "Z = [1.069,1.138,1.209,1.283,1.356,1.431,1.504,1.577,1.649,1.720];\n", + "\n", + "# Z = 1 + (B/V) + (C/V**(2))\n", + "# (Z-1)*V = B + (C/V)\n", + "from numpy import zeros\n", + "\n", + "V = zeros(10);\n", + "k = zeros(10);\n", + "t = zeros(10);\n", + "\n", + "# Calculations and Results\n", + "for i in range(10):\n", + " V[i]=Z[i]*R*T/(P[i]*101325);\t\t\t#[m**(3)/mol]\n", + " k[i]=(Z[i]-1)*V[i];\n", + " t[i]=1/V[i];\n", + "\n", + "from scipy.stats import linregress\n", + "C,B,c,d,e = linregress(t,k)\n", + "\t\t\t#[C,B,sig]=reglin(t,k);\n", + "\n", + "\t\t\t#From the regression, we get intercept = B and slope = C,and thus,\n", + "\n", + "print \" 1).The second virial coefficient of H2 is given by B = %e m**3)/mol\"%(B);\n", + "print \" The thied virial coefficient of H2 is given by C = %e m**6)/mol**2)\"%(C);\n", + "\n", + "\t\t\t# (2)\n", + "\t\t\t# We know that, limit P tending to zero (V-(R*T)/P) = B, therfore P = 0, V-(R*T)/P = B\n", + "\n", + "def f42(P): \n", + "\t return V-(R*T)/P \t\t\t#and determine the integral integrate((V-(R*T)/P)\n", + "\n", + "\t\t\t# Now let us tabulate V-(R*T)/P and determine the integral quad(f42,0,1000)[0]\n", + "\n", + "\n", + "P_prime = [0,100,200,300,400,500,600,700,800,900,1000];\n", + "Z_prime = [0,1.069,1.138,1.209,1.283,1.356,1.431,1.504,1.577,1.649,1.720];\n", + "\n", + "summation = 0;\n", + "V_prime = zeros(11);\n", + "x = zeros(11);\n", + "y = zeros(11);\n", + "z = zeros(11);\n", + "for j in range(1,11):\n", + " V_prime[j]=Z_prime[j]*R*T/(P_prime[j]*101325);\t\t\t#[m**(3)/mol]\n", + " x[j]=V_prime[j]-(R*T)/(P_prime[j]*101325);\n", + " y[j]=(x[j] + x[j-1])/2;\n", + " z[j]=y[j]*((P_prime[j]-P_prime[j-1]))*101325;\n", + " summation = summation + z[j] ;\t\t\t#[J/mol]\n", + "\n", + "summation = summation + 2*z[1] - z[1];\t\n", + "\n", + "\t\t\t# Now we have\n", + "\t\t\t# R*T*math.log(f/P) = summation\n", + "P_dash = 1000;\t\t\t#[atm] - Pressure at which fugacity is to be calculated\n", + "T_dash = 273.15;\t\t\t#[K] - Temperature at which fugacity is to be calculated\n", + "f = P_dash*math.exp(summation/(R*T_dash));\t\t\t#[atm] \n", + "\n", + "print \" 2).The fugacity of H2 at 0 C and 1000 atm pressure is f = %f atm\"%(f);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The second virial coefficient of H2 is given by B = 1.345242e-05 m**3)/mol\n", + " The thied virial coefficient of H2 is given by C = 5.286525e-10 m**6)/mol**2)\n", + " 2).The fugacity of H2 at 0 C and 1000 atm pressure is f = 2030.305169 atm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.10 Page Number : 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math\n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "P_1 = 1*10.**(6.);\t\t\t#[Pa] - Initial pressure\n", + "T_1 = 200. + 273.15;\t\t#[K] - Initial temperature\n", + "P_2 = 8*10.**(6);\t\t\t#[Pa] - Final pressure\n", + "Tc = 647.1;\t\t\t #[K] - Critical temperature of water\n", + "Pc = 220.55; \t\t\t#[bar] - Critical pressure of water\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.345;\n", + "R = 8.314;\t\t \t#[J/mol*K] - Universal gas constant\n", + "\n", + "# For the virial gas the following are the relations for residual enthalpy and entropy\n", + "# H_R = B*P - P*T*(dB/dT) \n", + "# S_R = -P*(dB/dT)\n", + "# Where, (dB/dT) = ((R*Tc)/Pc)*((dB_0/dT) + w*(dB_1/dT))\n", + "# dB0_dT = 0.422*1.6*Tc**(1.6)*T**(-2.6);\t\t\t# (dB_0/dT)\n", + "# dB1_dT = 0.172*4.2*Tc**(4.2)*T**(-5.2);\t\t\t# (dB_1/dT)\n", + "\n", + "# (1)\n", + "Cp_0 = 29.114;\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n", + "# For the isentropic process entropy change is zero, thus\n", + "# delta_S = Cp_0*math.log(T_2/T_1) - P_2*(dB/dT)_2 + P_1*(dB/dT)_1 = 0\n", + "\n", + "# Calculations\n", + "# At state 1, \n", + "Tr_1 = T_1/Tc;\n", + "B0_1 = 0.083 - 0.422/(Tr_1**(1.6));\n", + "B1_1 = 0.139 - 0.172/(Tr_1**(4.2));\n", + "# (B*Pc)/(R*Tc) = B0 + w*B1\n", + "B_1 = ((B0_1 + w*B1_1)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 1\n", + "dB0_dT_1 = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT)\n", + "dB1_dT_1 = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT)\n", + "dB_dT_1 = ((R*Tc)/Pc)*((dB0_dT_1) + w*(dB1_dT_1));\t\t\t# (dB/dT)_1\n", + "\n", + "# Now let us assume the exit temperature to be 870 K, at this temperature\n", + "# T_2 = 870;\t\t\t#[K] - \n", + "# At this temperature\n", + "# delta_S = Cp_0*math.log(T_2/T_1) - P_2*(dB/dT)_2 + P_1*(dB/dT)_1 = \n", + "\n", + "\n", + "T_2 = 860.;\t\t\t#[K] - Exit temperature\n", + "# Therefore at state 2, we have\n", + "Tr_2 = T_2/Tc;\n", + "B0_2 = 0.083 - 0.422/(Tr_2**(1.6));\n", + "B1_2 = 0.139 - 0.172/(Tr_2**(4.2));\n", + "# (B*Pc)/(R*Tc) = B0 + w*B1\n", + "B_2 = ((B0_2 + w*B1_2)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n", + "dB0_dT_2 = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT)\n", + "dB1_dT_2 = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT)\n", + "dB_dT_2 = ((R*Tc)/Pc)*((dB0_dT_2) + w*(dB1_dT_2));\t\t\t# (dB/dT)_2\n", + "\n", + "delta_H_s = Cp_0*(T_2 - T_1) + B_2*P_2 -P_2*T_2*(dB_dT_2) - B_1*P_1 + P_1*T_1*(dB_dT_1);\t\t\t#[J/mol] - Enthalpy change\n", + "\n", + "# As no heat exchange is assumed to take place with the surroundings,work transfer is given by\n", + "W_1 = - delta_H_s;\t\t\t# [J/mol]\n", + "\n", + "# Results\n", + "print \" 1).The exit temperature is %f K\"%(T_2);\n", + "print \" The required amount of work is %f J/mol\"%(W_1);\n", + "\n", + "\n", + "# (2)\n", + "eff = 0.8;\t\t\t# Adiabatic efficiency\n", + "delta_H_a = delta_H_s/0.8;\t\t\t# Actual enthalpy change\n", + "\n", + "# Now for calculating the value of T_exit\n", + "# delta_H_a = Cp_0*(T_exit - T_1) + B*P_2 -P_2*T_exit*(dB_dT) - B_1*P_1 + P_1*T_1*(dB_dT_1)\n", + "# On simplification we get\n", + "# 29.114*(T_2 - T_1)*B_2*8*10**(6)-8*10**(6)*T_2*(dB/dT)_2 = 12643.77 \n", + "\n", + "# Let us assume a temperature of say\n", + "T = 900.;\t\t\t#[K]\n", + "fault=10.;\n", + "\n", + "def f(T_exit): \n", + "\t return delta_H_a - Cp_0*(T_exit - T_1) + B*P_2 -P_2*T_exit*(dB_dT) - B_1*P_1 + P_1*T_1*(dB_dT_1)\n", + "\t \n", + "while(fault>0.3):\n", + " Tr = T/Tc;\n", + " B0 = 0.083 - 0.422/(Tr**(1.6));\n", + " B1 = 0.139 - 0.172/(Tr**(4.2));\n", + " \t\t\t# (B*Pc)/(R*Tc) = B0 + w*B1\n", + " B = ((B0 + w*B1)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n", + " dB0_dT = 0.422*1.6*Tc**(1.6)*T**(-2.6);\t\t\t# (dB_0/dT)\n", + " dB1_dT = 0.172*4.2*Tc**(4.2)*T**(-5.2);\t\t\t# (dB_1/dT)\n", + " dB_dT = ((R*Tc)/Pc)*((dB0_dT) + w*(dB1_dT));\t\t\t# (dB/dT)_1\n", + "\n", + " T_exit = fsolve(f,900)\n", + " fault=abs(T-T_exit);\n", + " T = T + 0.2;\n", + "\n", + "Texit = T;\n", + "\n", + "\n", + "W_2 = - delta_H_a;\t\t\t# [J/mol]\n", + "\n", + "print \" 2).The exit temperature is %f K\"%(Texit);\n", + "print \" The required amount of work is %f J/mol\"%(W_2);\n", + "\n", + "\n", + "def f20(T): \n", + "\t return Cp_0/T\n", + "\n", + "T_prime = 700.;\t\t\t#[K]\n", + "fault1=10.;\n", + "\n", + "def f1(T_out): \n", + "\t return 32.2168*math.log(T_out) + 0.1922*10**(-2)*T_out + 0.5274*10**(-5) \\\n", + "\t *T_2**(2) - 1.1976*10**(-9)*T_out**(3)-8*10**(6)*dB_dT_prime -216.64\n", + "\n", + "while(fault1>0.5):\n", + " Tr_prime = T_prime/Tc;\n", + " B0_prime = 0.083 - 0.422/(Tr_prime**(1.6));\n", + " B1_prime = 0.139 - 0.172/(Tr_prime**(4.2));\n", + " B_prime = ((B0_prime + w*B1_prime)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n", + " dB0_dT_prime = 0.422*1.6*Tc**(1.6)*T_prime**(-2.6);\t\t\t# (dB_0/dT)\n", + " dB1_dT_prime = 0.172*4.2*Tc**(4.2)*T_prime**(-5.2);\t\t\t# (dB_1/dT)\n", + " dB_dT_prime = ((R*Tc)/Pc)*((dB0_dT_prime) + w*(dB1_dT_prime));\t\t\t# (dB/dT)_1\n", + " T_out = fsolve(f1,10)\n", + " fault1=abs(T_prime-T_out);\n", + " T_prime = T_prime + 0.5;\n", + "\n", + "T_out = T_prime;\n", + "\n", + "# Now we have to calculate enthalpy change as W = -delta_H\n", + "\n", + "def f21(T): \n", + "\t return (7.7 + 0.04594*10**(-2.)*T + 0.2521*10**(-5.)*T**(2.) - 0.8587*10.**(-9.)*T**(3.))*4.184\n", + "\n", + "delta_H_3 = quad(f21,T_1,T_out)[0] + B_prime*P_2 - P_2*T_out*dB_dT_prime - B_1*P_1 + P_1*T_1*dB_dT_1\n", + "print T_1,T_out\n", + "\n", + "\n", + "W_3 = - delta_H_3;\t\t\t# [J/mol]\n", + "\n", + "print \" 3).The exit temperature is %f K\"%(T_out);\n", + "print \" The required amount of work is %f J/mol\"%(W_3);\n", + "\n", + "#(4)\n", + "n = 0.8;\t\t\t# Adiabatic efficiency\n", + "delta_H_a_4 = delta_H_3/n;\t\t\t#[J/mol]\n", + "W_4 = -delta_H_a_4;\t\t\t#[J/mol]\n", + "\n", + "\n", + "T_prime1 = 700.;\t\t\t#[K]\n", + "fault2=10.;\n", + "\n", + "def f2(T_2): \n", + "\t return 7.7*4.184*(T_2-T_1) + ((0.04594*4.184*10**(-2))/2)* \\\n", + "\t (T_2**(2)-T_1**(2)) + ((0.2521*4.184*10**(-5))/3)*(T_2**(3)-T_1**(3)) - \\\n", + "\t ((0.8587*4.184*10**(-9))/4)*(T_2**(4)-T_1**(4)) + B_prime1*8*10**(6) \\\n", + "\t - 8*10**(6)*T_2*dB_dT_prime1 + 191.7 + 496.81 - delta_H_a_4\n", + "\n", + "while(fault2>0.5):\n", + " Tr_prime1 = T_prime1/Tc;\n", + " B0_prime1 = 0.083 - 0.422/(Tr_prime1**(1.6));\n", + " B1_prime1 = 0.139 - 0.172/(Tr_prime1**(4.2));\n", + " \t\t\t# (B*Pc)/(R*Tc) = B0 + w*B1\n", + " B_prime1 = ((B0_prime1 + w*B1_prime1)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n", + " dB0_dT_prime1 = 0.422*1.6*Tc**(1.6)*T_prime1**(-2.6);\t\t\t# (dB_0/dT)\n", + " dB1_dT_prime1 = 0.172*4.2*Tc**(4.2)*T_prime1**(-5.2);\t\t\t# (dB_1/dT)\n", + " dB_dT_prime1 = ((R*Tc)/Pc)*((dB0_dT_prime1) + w*(dB1_dT_prime1));\t\t\t# (dB/dT)_1\n", + " T_out1 = fsolve(f2,100)\n", + " fault2=abs(T_prime1-T_out1);\n", + " T_prime1 = T_prime1 + 0.5;\n", + "\n", + "T_out1 = T_prime1;\n", + "\n", + "print \" 4).The exit temperature is %f K\"%(T_out1);\n", + "print \" The required amount of work is %f J/mol\"%(W_4);\n", + "\n", + "\n", + "# answers are varies because of rounding error. please check it manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The exit temperature is 860.000000 K\n", + " The required amount of work is -10667.724150 J/mol\n", + " 2).The exit temperature is 916.600000 K\n", + " The required amount of work is -13334.655188 J/mol\n", + "473.15" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 755.5\n", + " 3).The exit temperature is 755.500000 K\n", + " The required amount of work is -9282.701079 J/mol\n", + " 4).The exit temperature is 809.500000 K" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The required amount of work is -11603.376349 J/mol\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.11 Page Number : 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "Vol = 0.15;\t\t\t #[m**(3)] - Volume of the cylinder\n", + "P_1 = 100.;\t\t\t #[bar] - Initial pressure\n", + "P_1 = P_1*10**(5);\t\t#[Pa]\n", + "T_1 = 170.;\t\t\t #[K] - Initial temperature\n", + "n_withdrawn = 500.;\t\t#[mol] - Withdrawn number of moles\n", + "R = 8.314;\t\t \t#[J/mol*K] - Universal gas constant\n", + "\n", + "\n", + "# Calculations and Results\n", + "#(1)\n", + "Y = 1.4;\t\t\t# Coefficient of adiabatic expansion\n", + "n_total = (P_1*Vol)/(R*T_1);\t\t\t#[mol] - Total number of moles\n", + "n_2 = n_total - n_withdrawn;\t\t\t#[mol] - Left number of moles\n", + "V_1 = Vol/n_total;\t\t\t#[m**(3)/mol] - Molar volume at initial state.\n", + "# At final state\n", + "V_2 = Vol/n_2;\t\t\t#[m**(3)/mol] - Molar volume at final state\n", + "\n", + "# During duscharging P_1*V_1**(Y) = P_2*V_2**(Y), therefore\n", + "P_2_1 = P_1*((V_1/V_2)**(Y));\t\t\t#[Pa] - Final pressure\n", + "P_2_1 = P_2_1*10**(-5);\t\t\t#[bar]\n", + "T_2_1 = ((P_2_1*10**(5))*V_2)/R;\t\t\t#[K] - Final temperature\n", + "\n", + "print \" 1).The final temperature %f K\"%(T_2_1);\n", + "print \" The final pressure %f bar\"%(P_2_1);\n", + "\n", + "\n", + "def f53(T): \n", + "\t return Cp_0/T\n", + "\n", + "T_prime = 150;\t\t\t#[K]\n", + "error = 10;\n", + "while(error>1):\n", + " f_T = 18.886*math.log(T_prime) + 4.2*10**(-3)*T_prime - 92.4;\n", + " f_T_dash = 18.886/T_prime + 4.2*10**(-3);\n", + " T_new = T_prime - (f_T/f_T_dash);\n", + " error=abs(T_prime - T_new);\n", + " T_prime = T_new;\n", + "\n", + "T_2_2 = T_prime;\t\t\t#[K] - Final temperature\n", + "P_2_2 = ((n_2*R*T_2_2)/Vol)*10**(-5);\t\t\t#[bar] - Final pressure\n", + "\n", + "print \" 2).The final temperature %f K\"%(T_2_2);\n", + "print \" The final pressure %f bar\"%(P_2_2);\n", + "\n", + "#(3)\n", + "Tc = 126.2;\t\t\t#[K] - Critical temperature of nitrogen\n", + "Pc = 34.0;\t\t\t#[bar] - Critical pressure of nitrogen\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.038;\t\t\t# Acentric factor\n", + "\n", + "\n", + "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT) at state 1\n", + "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT) at state 1\n", + "dB_dT = ((R*Tc)/Pc)*((dB0_dT) + w*(dB1_dT));\t\t\t# (dB/dT) at state 1\n", + "# The residual entropy at the initial state is given by \n", + "S_R_1 = -P_1*(dB_dT);\t\t\t#[J/mol-K]\n", + "\n", + "# Now let us calculate molar volume at initial state\n", + "Tr = T_1/Tc;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "\n", + "V_1_3 = B + (R*T_1)/P_1;\t\t\t#[m**(3)/mol]\n", + "# Therefore number of moles in the initial state is\n", + "n_1_3 = Vol/V_1_3;\t\t\t#[mol]\n", + "# Therefore final number of moles is\n", + "n_2_3 = n_1_3 - n_withdrawn;\n", + "\n", + "# Therefore molar volume at final state is\n", + "V_2_3 = Vol/n_2_3;\t\t\t#[m**(3)/mol]\n", + "\n", + "# Now let us determine the relation between pressure and temperature in the final state\n", + "# P_2_3 = (R*T_2_3)/(V_2_3 - B_2)\n", + "#delta_S = 0, thus delta_S_ig + delta_S_R = 0\n", + "delta_S_R = - S_R_1;\n", + "\n", + "def f54(T): \n", + "\t return Cp_0/T\n", + "\n", + "\n", + "T_2_prime = 135;\t\t\t#[K]\n", + "delta = 0.1;\n", + "error = 10;\n", + "while(error>0.01):\n", + " T_r = T_2_prime/Tc;\t\t\t# Reduced temperature\n", + " B_0_3 = 0.083-(0.422/(T_r)**(1.6));\n", + " B_1_3 = 0.139-(0.172/(T_r)**(4.2));\n", + " B_3 = ((B_0_3+(w*B_1_3))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + " dB0_dT_3 = 0.422*1.6*Tc**(1.6)*T_2_prime**(-2.6);\t\t\t# (dB_0/dT)\n", + " dB1_dT_3 = 0.172*4.2*Tc**(4.2)*T_2_prime**(-5.2);\t\t\t# (dB_1/dT)\n", + " dB_dT_3 = ((R*Tc)/Pc)*((dB0_dT_3) + w*(dB1_dT_3));\t\t\t# (dB/dT)\n", + " P_2_3 = (R*T_2_prime)/(V_2_3 - B_3);\n", + " delta_S = 27.2*(math.log(T_2_prime/T_1)) + 4.2*10**(-3)*(T_2_prime - T_1) - R*(math.log(P_2_3/P_1)) - P_2_3*(dB_dT_3) + delta_S_R;\n", + " T_new = T_2_prime + delta;\n", + " error=abs(delta_S);\n", + " T_2_prime = T_new;\n", + "\n", + "T_2_3 = T_2_prime;\t\t\t#[K] - Final temperature\n", + "\t\t\t# Therefore at T_2_3\n", + "P_2_3 = P_2_3*10**(-5);\t\t\t#[bar] - Final pressure\n", + "\n", + "print \" 3).The final temperature %f K\"%(T_2_3);\n", + "print \" The final pressure %f bar\"%(P_2_3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The final temperature 131.761821 K\n", + " The final pressure 40.991361 bar\n", + " 2).The final temperature 129.504151 K\n", + " The final pressure 40.288995 bar\n", + " 3).The final temperature 141.300000 K\n", + " The final pressure 57.079997 bar\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.12 Page Number : 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1 = 80.;\t\t\t #[bar] - Initial pressure\n", + "P_1 = P_1*10.**(5);\t\t\t#[Pa]\n", + "T_1 = 300. + 273.15;\t\t#[T] - Initial temperature\n", + "P_2 = 40.;\t\t\t #[bar] - Final pressure\n", + "P_2 = P_2*10**(5);\t\t\t#[Pa]\n", + "T_2 = 300. + 273.15;\t\t#[K] - Final temperature\n", + "T_0 = 25. + 273.15;\t\t\t#[K] - Surrounding temperature\n", + "P_0 = 1.;\t\t\t #[atm] - Surrounding pressure\n", + "P_0 = P_0*101325;\t\t\t#[Pa]\n", + "Tc = 647.1;\t\t\t #[K]\n", + "Pc = 220.55;\t\t\t #[bar]\n", + "Pc = Pc*10.**(5);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t #[J/mol*K] - Universal gas constant\n", + "\n", + "\n", + "# Calculations\n", + "# For van der Walls equation of state\n", + "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\n", + "\n", + "def f(V): \n", + "\t return V**(3)-(b+(R*T_1)/P_1)*V**(2)+(a/P_1)*V-(a*b)/P_1\n", + "V_1_1=fsolve(f,0.1)\n", + "V_1_2=fsolve(f,10)\n", + "V_1_2=fsolve(f,100)\n", + "# The largest root is considered because of vapour\n", + "V_1 = V_1_1;\n", + "\n", + "U_R_1 = -a/V_1;\t\t\t#[J/mol] - Internal energy\n", + "H_R_1 = P_1*V_1 - R*T_1 - a/V_1;\t\t\t#[J/mol] - Enthalpy\n", + "S_R_1 = R*math.log((P_1*(V_1-b))/(R*T_1));\n", + "\n", + "def f1(V): \n", + "\t return V**(3)-(b+(R*T_2)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n", + "V_2_1 = fsolve(f1,0.1)\n", + "V_2_2 = fsolve(f1,10)\n", + "V_2_3 = fsolve(f1,100)\n", + "V_2 = V_2_1;\n", + "\n", + "U_R_2 = -a/V_2;\t\t\t#[J/mol] - Internal energy\n", + "H_R_2 = P_2*V_2 - R*T_2 - a/V_2;\t\t\t#[J/mol] - Enthalpy\n", + "S_R_2 = R*math.log((P_2*(V_2-b))/(R*T_2));\n", + "\n", + "delta_U_R = U_R_2 - U_R_1;\t\t\t#\n", + "delta_H_R = H_R_2 - H_R_1;\t\t\t#\n", + "delta_S_R = S_R_2 - S_R_1;\t\t\t#\n", + "\n", + "delta_U_ig = 0;\t\t\t#[J/mol] - As temperature is constant\n", + "delta_H_ig = 0;\t\t\t#[J/mol] - As temperature is constant\n", + "delta_S_ig = - R*math.log(P_2/P_1);\t\t\t# [J/mol-K]\n", + "delta_U = delta_U_R + delta_U_ig;\t\t\t#[J/mol]\n", + "delta_H = delta_H_R + delta_H_ig;\t\t\t#[J/mol]\n", + "delta_S = delta_S_R + delta_S_ig;\t\t\t#[J/mol-K]\n", + "\n", + "\t\t\t# Change in exergy is given by\n", + "\t\t\t# delta_phi = phi_1 - phi_2 = U_1 - U_2 + P_0*(V_1 - _V_2) - T_0*(S_1 - S_2)\n", + "delta_phi = - delta_U + P_0*(V_1 - V_2) - T_0*(-delta_S);\t\t\t#[J/mol]\n", + "\n", + "# Results\n", + "print \" The change in internal energy is %f J/mol\"%(delta_U);\n", + "print \" The change in enthalpy is %f J/mol\"%(delta_H);\n", + "print \" The change in entropy is %f J/mol-K\"%(delta_S);\n", + "print \" The change in exergy is %f J/mol\"%(delta_phi);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The change in internal energy is 615.070900 J/mol\n", + " The change in enthalpy is 1053.220316 J/mol\n", + " The change in entropy is 6.930264 J/mol-K\n", + " The change in exergy is 1389.940735 J/mol\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.13 Page Number : 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T_1 = 500.;\t\t\t#[K] - Initial temperature\n", + "P_1 = 30.;\t\t\t#[atm] - Initial pressure\n", + "P_1 = P_1*101325;\t\t\t#[Pa]\n", + "P_2 = 1;\t\t\t#[atm] - Final pressure\n", + "P_2 = P_2*101325;\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\t\t\t# For chlorine\n", + "Tc = 417.2;\t\t\t#[K] - Critical temperature\n", + "Pc = 77.10;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "\n", + "#Redlich Kwong equation of state,\n", + "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t# [Pa*m**(6)*K**(1/2)/mol]\n", + "b = (0.08664*R*Tc)/Pc;\t\t\t# [m**(3)/mol]\n", + "\n", + "# Calculations\n", + "def f1(V): \n", + "\t return V**(3)-((R*T_1)/P_1)*V**(2)-((b**(2))+((b*R*T_1)/P_1)-(a/(T_1**(1./2)*P_1)))*V-(a*b)/(T_1**(1./2)*P_1)\n", + "V_1=fsolve(f1,1)\n", + "V_2=fsolve(f1,10)\n", + "V_3=fsolve(f1,100)\n", + "\n", + "V = V_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "\n", + "Z = (P_1*V_1)/(R*T_1);\t\t\t#compressibility factor\n", + "\n", + "# The residual enthalpy at state 1 is given by\n", + "H_R_1 = (Z-1)*R*T_1 + ((3*a)/(2*b*T_1**(1./2)))*(math.log(V/(V+b)));\t\t\t#[J/mol]\n", + " \n", + "\n", + "H_R_2 = 0;\t\t\t# Residual enthalpy at state 2\n", + "delta_H_R = H_R_2 - H_R_1;\t\t\t#[J/mol] - Residual enthalpy change\n", + "# and since isothermal conditions are maintained, therfore\n", + "delta_H_ig = 0;\t\t\t# Enthalpy change under ideal condition\n", + "delta_H = delta_H_R + delta_H_ig;\t\t\t#[J/mol]\n", + "\n", + "# Results\n", + "print \" The change in enthalpy is given by delta_H = %f J/mol\"%(delta_H);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The change in enthalpy is given by delta_H = 1053.558471 J/mol\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.14 Page Number : 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "Vol_1 = 0.1;\t\t\t#[m**(3)] - Initial volume of each compartment\n", + "n_1 = 400;\t\t\t#[mol] - Initial number of moles in compartment 1\n", + "V_1 = Vol_1/n_1;\t\t\t#[m**(3)/mol] - Molar volume at state 1\n", + "T_1 = 294;\t\t\t#[K]\n", + "Vol_2 = 0.2;\t\t\t#[m**(3)] - Final volume of the compartment after removing the partition.\n", + "n_2 = n_1;\t\t\t#[mol] - Number of moles remains the same\n", + "V_2 = Vol_2/n_2;\t\t\t#[m**(3)/mol] - Molar volume at state 2\n", + "\n", + "a = 0.1362;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = 3.215*10**(-5);\t\t\t#[m**(3)/mol]\n", + "Cv_0 = 12.56;\t\t\t#[J/mol-K] - Heat capacity in ideal gas state\n", + "\n", + "# Calculations\n", + "# For overall system q = 0, and no work is done, therefore delta_U = 0\n", + "# Therfore from the relation proved in part (1), we have\n", + "T_2 = T_1 + (a/Cv_0)*(1/V_2 - 1/V_1);\t\t\t#[K]\n", + "\n", + "# Results\n", + "print \" 2).The final temperatutre is %f K\"%(T_2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 2).The final temperatutre is 272.312102 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.17 Page Number : 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1 = 1*10**(6);\t\t\t#[Pa] - Initial pressure\n", + "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 8*10**(6);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Y = 1.4;\t\t\t# Index of expansion\n", + "Cp_0 = 29.114;\t\t\t#[J/mol-K]\n", + "\t\n", + "a = 0.55366;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = 3.049*10**(-5);\t\t\t#[m**(3)/mol]\n", + "\n", + "# Calculations\n", + "V_1 = 3.816*10**(-3);\t\t\t#[m**(3)/mol]\n", + "Z_1 = (P_1*V_1)/(R*T_1);\n", + "\n", + "T_2 = T_1*(P_2/P_1)**((Y-1)/Y);\t\t\t#[K]\n", + "\n", + "# At 8 MPa and T_2,\n", + "# The molar volume of steam following van der Walls equation of state (as reported in the book) is\n", + "V_2 = 8.41*10**(-4);\t\t\t#[m**(3)/mol]\n", + "# And the compressibility factor is \n", + "Z_2 = (P_2*V_2)/(R*T_2);\n", + "\n", + "# For van der Walls equation of state we know that\n", + "# delta_S_R/R = math.log(Z_2/Z_1) + math.log((V_2 - b)/V_2) - math.log((V_1 - b)/V_1)\n", + "delta_S_R = R*(math.log(Z_2/Z_1) + math.log((V_2 - b)/V_2) - math.log((V_1 - b)/V_1));\t\t\t#[J/mol]\n", + "\n", + "# delta_S_ig = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1)\n", + "# The entropy change is therefore\n", + "# delta_S = delta_S_ig + delta_S_R\n", + "\n", + "\n", + "# Let us assume a temperature, say T = 870 K\n", + "# At 870 K the molar volume of steam following van der Walls equation of state (as reported in the book) is\n", + "# V_3 = 8.57*10**(-4);\t\t\t# [m**(3)/mol]\n", + "# Therefore\n", + "# Z_3 = (P_2*V_3)/(R*T_2);\n", + "# At this temperature,\n", + "# delta_S = Cp_0*math.log(T/T_1) - R*math.log(P_2/P_1) + R*(math.log(Z/Z_1) + R*math.log((V - b)/V) - R*math.log((V_1 - b)/V_1))\n", + "\n", + "T = 800;\t\t\t#[K]\n", + "fault=10;\n", + "\n", + "def f1(V): \n", + "\t return V**(3)-(b+(R*T)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n", + "\t \n", + "def f2(T): \n", + "\t return Cp_0*math.log(T/T_1) - R*math.log(P_2/P_1) + R*(math.log(Z/Z_1) + R*(math.log((V - b)/V)) - R*(math.log((V_1 - b)/V_1)))\n", + "\n", + "\n", + "while(fault>0.3):\n", + " \t\t\t# At T and 8 MPa\n", + " V = fsolve(f1,1)\n", + " Z = (P_2*V)/(R*T);\n", + " \n", + " T_exit = fsolve(f2,0.1)\n", + " fault=abs(T-T_exit);\n", + " T = T + 0.5;\n", + "\n", + "Texit = T;\n", + "\n", + "\n", + "# W = - delta_H\n", + "\n", + "# For van der Walls gas the enthalpy change is given by\n", + "delta_H_s = Cp_0*(T_exit - T_1) + (Z - 1)*R*T_exit - a/V - (Z_1-1)*R*T_1 + a/V_1;\t\t\t#[J/mol]\n", + "W = - delta_H_s;\t\t\t#[J/mol]\n", + "\n", + "# Results\n", + "print \" 1).The exit temperature is %f K\"%(Texit);\n", + "print \" The work required is given by W = %f J/mol\"%(W);\n", + "\n", + "#(2)\n", + "eff = 0.8;\t\t\t# Adiabatic efficiency\n", + "delta_H_a = eff*delta_H_s;\t\t\t#[J/mol] - Actual enthalpy change\n", + "W_2 = - delta_H_a;\n", + "\n", + "\t\t\t# Let us assume a temperature, say\n", + "T_prime= 900;\t\t\t#[K]\n", + "fault1=10;\n", + "def f22(V): \n", + "\t return V**(3)-(b+(R*T_prime)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n", + "\n", + "def f3(T_prime): \n", + "\t return Cp_0*(T_prime - T_1) + (Z_prime - 1)*R*T_prime - a/V_prime - 13230.49\n", + "\t \n", + "while(fault1>0.3):\n", + " \t\t\t# At T_prime and 8 MPa\n", + " V_prime=fsolve(f22,1)\n", + " Z_prime = (P_2*V_prime)/(R*T_prime);\n", + " T_exit1 = fsolve(f3,100)\n", + " fault1=abs(T_prime-T_exit1);\n", + " T_prime = T_prime + 0.2;\n", + "\n", + "Texit1 = T_prime;\n", + "\n", + "print \" 2).The exit temperature is %f K\"%(Texit1);\n", + "print \" The work required is given by W = %f J/mol\"%(W_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The exit temperature is 916.500000 K\n", + " The work required is given by W = -12195.093996 J/mol\n", + " 2).The exit temperature is 958.400000 K" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The work required is given by W = -9756.075197 J/mol\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.19 Page Number : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 100 + 273.15;\t\t\t#[K] - Temperature\n", + "Tc = 647.1;\t\t\t#[K] - Critical temperature of water\n", + "Pc = 220.55;\t\t\t#[bar] - Critical pressure of water\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations\n", + "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\n", + "# The cubic form of van der Walls equation of state is given by,\n", + "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "\n", + "# For water vapour at 100 C under saturated conditions pressure is 1 atm, therefore\n", + "P = 1;\t\t\t#[atm]\n", + "P = P*101325;\t\t\t#[Pa]\n", + "\n", + "# At 100 C and 1 atm \n", + "def f(V): \n", + "\t return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n", + "V_1 = fsolve(f,0.1)\n", + "V_1 = fsolve(f,10)\n", + "V_1 = fsolve(f,100)\n", + "V = V_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "\n", + "f = P*(math.exp(math.log((R*T)/(P*(V-b))) + b/(V-b) - (2*a)/(R*T*V)));\t\t\t#[Pa]\n", + "f = f/101325;\t\t\t#[atm]\n", + "\n", + "# Results\n", + "print \" The molar volume is %f m**3)/mol\"%(V);\n", + "print \" The fugacity is %f atm\"%(f);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume is 0.030469 m**3)/mol\n", + " The fugacity is 0.995168 atm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.20 Page Number : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 6;\t\t\t#[bar] - Initial pressure\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "T_1 = 100 + 273.15;\t\t\t#[T] - Initial temperature\n", + "P_2 = 12;\t\t\t#[bar] - Final pressure\n", + "P_2 = P_2*10**(5);\t\t\t#[Pa]\n", + "T_2 = 500 + 273.15;\t\t\t#[K] - Final temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Y = 1.126;\t\t\t# Index of expansion\n", + "Cp_0 = (R*Y)/(Y-1);\t\t\t#[J/mol-K]\n", + "\n", + "# For propane\n", + "Tc = 369.8;\t\t\t#[K]\n", + "Pc = 42.48;\t\t\t#[bar]\n", + "Pc = Pc*10**(5);\n", + "w = 0.152;\n", + "\n", + "# Calculations and Results\n", + "#(1)\n", + "# For van der Walls equation of state\n", + "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\n", + "# The cubic form of van der Walls equation of state is given by,\n", + "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "\n", + "# At state 1 (100 C and 6 bar) \n", + "def f(V): \n", + "\t return V**(3)-(b+(R*T_1)/P_1)*V**(2)+(a/P_1)*V-(a*b)/P_1\n", + "V_1_1 = fsolve(f,1)\n", + "V_1_2 = fsolve(f,10)\n", + "V_1_3 = fsolve(f,100)\n", + "\n", + "V_1 = V_1_1;\t\t\t#[m**(3)/mol]\n", + "# Thus compressibility factor is\n", + "Z_1 = (P_1*V_1)/(R*T_1);\t\t\t#compressibility factor\n", + "\n", + "H_R_1 = (Z_1 - 1)*R*T_1 - (a/V_1);\t\t\t# [J/mol]\n", + "S_R_1 = R*math.log((P_1*(V_1-b))/(R*T_1));\t\t\t# [J/mol-K]\n", + "\n", + "# At state 2 (500 C and 12 bar) \n", + "def f1(V): \n", + " return V**(3)-(b+(R*T_2)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n", + "V_2_1 = fsolve(f1,1)\n", + "V_2_2 = fsolve(f1,10)\n", + "V_2_3 = fsolve(f1,100)\n", + "# The largest root is considered because of molar volume of vapour phase is to determined\n", + "V_2 = V_2_1;\t\t\t#[m**(3)/mol]\n", + "# Thus compressibility factor is\n", + "Z_2 = (P_2*V_2)/(R*T_2);\t\t\t#compressibility factor\n", + "\n", + "H_R_2 = (Z_2 - 1)*R*T_2 - (a/V_2);\t\t\t# [J/mol]\n", + "S_R_2 = R*math.log((P_2*(V_2-b))/(R*T_2));\t\t\t# [J/mol-K]\n", + "\n", + "# Ideal gas entropy change is given by\n", + "delta_S_ig = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n", + "# Entropy change is given by\n", + "delta_S = delta_S_ig + (S_R_2 - S_R_1);\t\t\t#[J/mol-k]\n", + "\n", + "# Ideal gas enthalpy change is given by\n", + "delta_H_ig = Cp_0*(T_2 - T_1);\t\t\t#[J/mol]\n", + "# Enthalpy change is given by\n", + "delta_H = delta_H_ig + (H_R_2 - H_R_1);\t\t\t#[J/mol]\n", + "\n", + "print \"1).The change in enthalpy is %f J/mol\"%(delta_H);\n", + "print \" The change in entropy is %f J/mol-K\"%(delta_S);\n", + "\n", + "#(2)\n", + "# Virial equation of state\n", + "\n", + "# At state 1 (372.15 K, 6 bar) let us calculate B and dB/dT\n", + "Tr = T_1/Tc;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT) at state 1\n", + "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT) at state 1\n", + "dB_dT = ((R*Tc)/Pc)*((dB0_dT) + w*(dB1_dT));\t\t\t# (dB/dT) at state 1\n", + "\n", + "H_R_1_2 = B*P_1 - P_1*T_1*dB_dT;\t\t\t#[J/mol] - Residual enthalpy at state 1\n", + "S_R_1_2 = -P_1*(dB_dT);\t\t\t#[J/mol-K] - Residual entropy at state 1\n", + "\n", + "# At state 2 (773.15 K, 12 bar)\n", + "Tr_2 = T_2/Tc;\t\t\t# Reduced temperature\n", + "B_0_2 = 0.083-(0.422/(Tr_2)**(1.6));\n", + "B_1_2 = 0.139-(0.172/(Tr_2)**(4.2));\n", + "\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B_2 = ((B_0_2+(w*B_1_2))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "dB0_dT_2 = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT) at state 1\n", + "dB1_dT_2 = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT) at state 1\n", + "dB_dT_2 = ((R*Tc)/Pc)*((dB0_dT_2) + w*(dB1_dT_2));\t\t\t# (dB/dT) at state 1\n", + "\n", + "H_R_2_2 = B_2*P_2 - P_2*T_2*dB_dT_2;\t\t\t#[J/mol] - Residual enthalpy at state 1\n", + "S_R_2_2 = -P_2*(dB_dT_2);\t\t\t#[J/mol-K] - Residual entropy at state 1\n", + "\n", + "delta_H_2 = delta_H_ig + (H_R_2_2 - H_R_1_2);\t\t\t#[J/mol]\n", + "delta_S_2 = delta_S_ig + (S_R_2_2 - S_R_1_2);\t\t\t#[J/mol]\n", + "\n", + "print \"2).The change in enthalpy is %f J/mol\"%(delta_H_2);\n", + "print \" The change in entropy is %f J/mol-K\"%(delta_S_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1).The change in enthalpy is 29798.211799 J/mol\n", + " The change in entropy is 48.649067 J/mol-K\n", + "2).The change in enthalpy is 29992.807365 J/mol\n", + " The change in entropy is 49.021724 J/mol-K\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.21 Page Number : 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P = 2.76*10**(6);\t\t\t#[N/m**(2)] - Pressure\n", + "T = 310.93;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# For n-butane\n", + "Tc = 425.18;\t\t\t#[K] - Critical temperature\n", + "Pc = 37.97;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.193;\n", + "den = 0.61;\t\t\t#[g/cm**(3)]\n", + "mol_wt = 58;\t\t\t#[g/mol] - Molecular weight of butane\n", + "\n", + "# Calculations and Results\n", + "# math.log(P_sat) = 15.7374 - 2151.63/(T-36.24)\n", + "P_sat = math.exp(15.7374 - 2151.63/(T-36.24));\t\t\t#[mm Hg]\n", + "P_sat = (P_sat/760)*101325;\t\t\t#[N/m**(2)]\n", + "\n", + "#(1)\n", + "# Let us determine the second virial coefficient at 310.93 K\n", + "Tr = T/Tc;\t\t\t# Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "\n", + "# Fugacity under saturated conditions is given by\n", + "# math.log(f_sat/P_sat) = (B*P_sat)/(R*T)\n", + "f_sat = P_sat*(math.exp((B*P_sat)/(R*T)));\t\t\t#[N/m**(2)]\n", + "\n", + "# The molar volume is given by\n", + "V_liq = (1/(den*1000))*(mol_wt/1000);\t\t\t#[m**(3)/mol]\n", + "\n", + "f = f_sat*math.exp(V_liq*(P-P_sat)/(R*T));\n", + "\n", + "print \" 1).The fugacity of n-butane is %e N/m**2)\"%(f);\n", + "\n", + "#(2)\n", + "# For van der Walls equation of state\n", + "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\n", + "# The cubic form of van der Walls equation of state is given by,\n", + "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "\n", + "# At 100 C and 1 atm \n", + "def f(V): \n", + " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n", + "V_1 = fsolve(f,0.1)\n", + "V_1 = fsolve(f,10)\n", + "V_1 = fsolve(f,100)\n", + "# The above equation has only 1 real root, other two roots are imaginary\n", + "V = V_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "# math.log(f/P) = math.log((R*T)/(P*(V-b))) + b/(V-b) -(2*a)/(R*T*V)\n", + "f_2 = P*(math.exp(math.log((R*T)/(P*(V-b))) + b/(V-b) -(2*a)/(R*T*V)));\n", + "\n", + "print \" 2).The fugacity of n-butane is %e N/m**2)\"%(f_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The fugacity of n-butane is 3.293476e+05 N/m**2)\n", + " 2).The fugacity of n-butane is 8.997352e+05 N/m**2)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.22 Page Number : 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 50+273.15;\t\t\t#[K] - Temperature\n", + "P = 25.*10**(3);\t\t\t#[Pa] - Pressure\n", + "y1 = 0.5;\t\t\t#[mol] - mole fraction of equimolar mixture\n", + "y2 = 0.5;\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "#For component 1 (methyl ethyl ketone)\n", + "Tc_1 = 535.5;\t\t\t#[K] - Critical temperature\n", + "Pc_1 = 41.5*10**(5);\t\t\t#[N/m**(2)] - Critical pressure\n", + "Vc_1 = 267.;\t\t\t#[cm**(3)/mol] - Critical volume\n", + "Zc_1 = 0.249;\t\t\t# Critical compressibility factor\n", + "w_1 = 0.323;\t\t\t# acentric factor\n", + "\n", + "#For component 2 (toluene)\n", + "Tc_2 = 591.8;\t\t\t#[K]\n", + "Pc_2 = 41.06*10**(5);\t\t\t#[N/m**(2)]\n", + "Vc_2 = 316.;\t\t\t#[cm**(3)/mol]\n", + "Zc_2 = 0.264;\n", + "w_2 = 0.262;\n", + "\n", + "# Calculations and Results\n", + "# For equation of state Z = 1 + B/V\n", + "#For component 1, let us calculate B and dB/dT\n", + "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n", + "#At reduced temperature\n", + "B1_0 = 0.083-(0.422/(Tr_1)**(1.6));\n", + "B1_1 = 0.139-(0.172/(Tr_1)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t# [m**(3)/mol-K] \n", + "dB0_dT_1 = 0.422*1.6*Tc_1**(1.6)*T**(-2.6);\t\t\t# [m**(3)/mol-K] - (dB_0/dT)\n", + "dB1_dT_1 = 0.172*4.2*Tc_1**(4.2)*T**(-5.2);\t\t\t# [m**(3)/mol-K] - (dB_1/dT)\n", + "dB_dT_1 = ((R*Tc_1)/Pc_1)*((dB0_dT_1) + w_1*(dB1_dT_1));\t\t\t#[m**(3)/mol-K] - (dB/dT)_\n", + "\n", + "#Similarly for component 2\n", + "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n", + "#At reduced temperature Tr_2,\n", + "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6));\n", + "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2));\n", + "B_22 = ((B2_0+(w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "dB0_dT_2 = 0.422*1.6*Tc_2**(1.6)*T**(-2.6);\t\t\t# [m**(3)/mol-K] - (dB_0/dT)\n", + "dB1_dT_2 = 0.172*4.2*Tc_2**(4.2)*T**(-5.2);\t\t\t# [m**(3)/mol-K] - (dB_1/dT)\n", + "dB_dT_2 = ((R*Tc_2)/Pc_2)*((dB0_dT_2) + w_2*(dB1_dT_2));\t\t\t#[m**(3)/mol-K] - (dB/dT)_\n", + "\n", + "#For cross coeffcient, let us calculate B and dB/dT\n", + "Tc_12 = (Tc_1*Tc_2)**(1./2);\t\t\t#[K]\n", + "w_12 = (w_1 + w_2)/2.;\n", + "Zc_12 = (Zc_1 + Zc_2)/2;\n", + "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2)**(3);\t\t\t#[cm**(3)/mol]\n", + "Vc_12 = Vc_12*10**(-6);\t\t\t#[m**(3)/mol]\n", + "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "\n", + "#Now we have,(B_12*Pc_12)/(R*Tc_12) = B_0+(w_12*B_1)\n", + "#where B_0 and B_1 are to be evaluated at Tr_12\n", + "Tr_12 = T/Tc_12;\n", + "#At reduced temperature Tr_12\n", + "B_0 = 0.083 - (0.422/(Tr_12)**(1.6));\n", + "B_1 = 0.139 - (0.172/(Tr_12)**(4.2));\n", + "B_12 = ((B_0 + (w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "dB0_dT_12 = 0.422*1.6*Tc_12**(1.6)*T**(-2.6);\t\t\t# [m**(3)/mol-K] - (dB_0/dT)\n", + "dB1_dT_12 = 0.172*4.2*Tc_12**(4.2)*T**(-5.2);\t\t\t# [m**(3)/mol-K] - (dB_1/dT)\n", + "dB_dT_12 = ((R*Tc_12)/Pc_12)*((dB0_dT_12) + w_12*(dB1_dT_12));\t\t\t#[m**(3)/mol-K] - (dB/dT)_12\n", + "\n", + "#For the mixture\n", + "B = y1**(2)*B_11 + 2*y1*y2*B_12 + y2**(2)*B_22;\t\t\t#[m**(3)/moL]\n", + "\n", + "# The equation of state can be written as\n", + "# V**(2) - ((R*T)/P) - (B*R*T)/P = 0\n", + "# V**(2) - 0.1075*V + 1.737*10**(-4) = 0\n", + "def f(V): \n", + " return V**(2) - 0.1075*V + 1.737*10**(-4)\n", + "V1 = fsolve(f,0.1)\n", + "V2 = fsolve(f,1)\n", + "# We will consider the root which is near to R*T/P\n", + "V = V1;\n", + "# dB/dT = y_1**(2)*dB_11/dT + y_2**(2)*dB_22/dT + 2*y_1*y_2*dB_12/dT\n", + "dB_dT = y1**(2)*dB_dT_1 + y2**(2)*dB_dT_2 + 2*y1*y2*dB_dT_12;\t\t\t#[m**(3)/mol-K]\n", + "\n", + "# For equation of state Z = 1 + B/V\n", + "H_R = (B*R*T)/V - ((R*T**(2))/V)*dB_dT;\t\t\t#[J/mol]\n", + "\n", + "print \" 1).The value of H_R for the mixture using virial equation of state is %f J/mol\"%(H_R);\n", + "\n", + "#(2)\n", + "# For van der Walls equation of state \n", + "a_11 = (27*R**(2)*Tc_1**(2))/(64*Pc_1);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "a_22 = (27*R**(2)*Tc_2**(2))/(64*Pc_2);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "a_12 = (a_11*a_22)**(1./2);\n", + "b_1 = (R*Tc_1)/(8*Pc_1);\t\t\t#[m**(3)/mol]\n", + "b_2 = (R*Tc_2)/(8*Pc_2);\t\t\t#[m**(3)/mol]\n", + "\n", + "# For the mixture\n", + "a = y1**(2)*a_11 + y2**(2)*a_22 + 2*y1*y2*a_12;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = y1*b_1 + y2*b_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "# From the cubic form of van der Walls equation of state\n", + "def f1(V): \n", + " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n", + "V2_1 = fsolve(f1,0.1)\n", + "V2_2 = fsolve(f1,10)\n", + "V2_3 = fsolve(f1,100)\n", + "# The largest root is considered\n", + "V_2 = V2_1;\n", + "\n", + "# The residual enthalpy is given by\n", + "H_R_2 = P*V_2 - R*T -a/V_2;\t\t\t#[J/mol]\n", + "\n", + "print \" 2).The value of H_R for the mixture using van der Walls equation of state is %f J/mol\"%(H_R_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The value of H_R for the mixture using virial equation of state is -151.289795 J/mol\n", + " 2).The value of H_R for the mixture using van der Walls equation of state is -38.476127 J/mol\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.23 Page Number : 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "\n", + "# Variables\n", + "T = 320 + 273.15;\t\t\t#[K]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# For water\n", + "Tc = 647.1;\t\t\t#[K]\n", + "Pc = 220.55;\t\t\t#[bar]\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "\n", + "# The cubic form of Redlich Kwong equation of state is given by,\n", + "# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n", + "\n", + "# At 320 C and 70 bar pressure\n", + "P_1 = 70;\t\t\t#[bar]\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "\n", + "# Calculations and Results\n", + "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "# Solving the cubic equation\n", + "def f1(V): \n", + " return V**(3)-((R*T)/P_1)*V**(2)-((b**(2))+((b*R*T)/P_1)-(a/(T**(1./2)*P_1)))*V-(a*b)/(T**(1./2)*P_1)\n", + "V1=fsolve(f1,1)\n", + "V2=fsolve(f1,10)\n", + "V3=fsolve(f1,100)\n", + "# The largest root is considered because at 320 C and 70 bar vapour phase exists.\n", + "V_1 = V1;\t\t\t#[m**(3)/mol]\n", + "# Thus compressibility factor is\n", + "Z_1 = (P_1*V_1)/(R*T);\n", + "\n", + "# For Redlich-Kwong equation of state\n", + "# math.log(f/P) = Z - 1 - math.log(V_1/(V_1-b)) + (a/(b*R*(T**(3/2))))*math.log(V/(V+b))\n", + "f_1 = P_1*(math.exp(Z_1-1-math.log(Z_1)+math.log(V_1/(V_1-b))+(a/(b*R*(T**(3./2))))*math.log(V_1/(V_1+b))));\t\t\t#[Pa]\n", + "f_1 = f_1*10**(-5);\t\t\t#[bar]\n", + "\n", + "print \" The fugacity of water vapour at 320 C and 70 bar pressure is %f bar\"%(f_1);\n", + "\n", + "# At 320 C and 170 bar pressure, we have\n", + "P_2 = 170;\t\t\t#[bar]\n", + "P_2 = P_2*10**(5);\t\t\t#[Pa]\n", + "\n", + "# Solving the cubic equation\n", + "def f2(V): \n", + " return V**(3)-((R*T)/P_2)*V**(2)-((b**(2))+((b*R*T)/P_2)-(a/(T**(1./2)*P_2)))*V-(a*b)/(T**(1./2)*P_2)\n", + "V4 = fsolve(f2,1)\n", + "V5 = fsolve(f2,10)\n", + "V6 = fsolve(f2,100)\n", + "# The above equation has only 1 real root,other two roots are imaginary. Therefore,\n", + "V_2 = V6;\t\t\t#[m**(3)/mol]\n", + "# Thus compressibility factor is\n", + "Z_2 = (P_2*V_2)/(R*T);\n", + "\n", + "# For Redlich-Kwong equation of state\n", + "# math.log(f/P) = Z - 1 - math.log(V_1/(V_1-b)) + (a/(b*R*(T**(3/2))))*math.log(V/(V+b))\n", + "f_2 = P_2*(math.exp(Z_2-1-math.log(Z_2)+math.log(V_2/(V_2-b))+(a/(b*R*(T**(3./2))))*math.log(V_2/(V_2+b))));\t\t\t#[Pa]\n", + "f_2 = f_2*10**(-5);\t\t\t#[bar]\n", + "\n", + "print \" The fugacity of water vapour at 320 C and 170 bar pressure is %f bar\"%(f_2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity of water vapour at 320 C and 70 bar pressure is 60.456239 bar\n", + " The fugacity of water vapour at 320 C and 170 bar pressure is 101.590989 bar\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "C:\\Anaconda\\lib\\site-packages\\scipy\\optimize\\minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n", + " improvement from the last ten iterations.\n", + " warnings.warn(msg, RuntimeWarning)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.24 Page Number : 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "Vol = 0.057;\t\t\t#[m**(3)] - Volume of car tyre\n", + "P_1 = 300.;\t\t\t#[kPa] - Initial pressure\n", + "P_1 = P_1*10**(3);\t\t\t#[Pa]\n", + "T_1 = 300.;\t\t\t#[K] - Initial temperature\n", + "P_2 = 330.;\t\t\t#[kPa] - Finnal pressure\n", + "P_2 = P_2*10**(3);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Cv_0 = 21.;\t\t\t#[J/mol-K] - Heat capacity for air \n", + "\n", + "# For oxygen\n", + "Tc_O2 = 154.6;\t\t\t#[K] - Critical temperature\n", + "Pc_O2 = 50.43;\t\t\t#[bar] - Critical pressure\n", + "Pc_O2 = Pc_O2*10**(5);\t\t\t#[Pa]\n", + "y1 = 0.21;\t\t\t# - Mole fraction of oxygen\n", + "# For nitrogen\n", + "Tc_N2 = 126.2;\t\t\t#[K] - Critical temperature\n", + "Pc_N2 = 34.00;\t\t\t#[bar] - Critical pressure\n", + "Pc_N2 = Pc_N2*10**(5);\t\t\t#[Pa]\n", + "y2 = 0.79;\t\t\t# - Mole fraction of nitrogen\n", + "\n", + "# Calculations and Results\n", + "# (1)\n", + "# Assuming ideal gas behaviour. The volume remains the same,therefore,we get\n", + "# P_1/T_1 = P_2/T_2\n", + "T_2 = P_2*(T_1/P_1);\t\t\t#[K]\n", + "\n", + "n = (P_1*Vol)/(R*T_1);\t\t\t#[mol] - Number of moles\n", + "delta_U = n*Cv_0*(T_2-T_1);\t\t\t#[J]\n", + "\n", + "print \" 1).The change in internal energy for ideal gas behaviour) is %f J\"%(delta_U);\n", + "\n", + "#(2)\n", + "# For van der Walls equation of state \n", + "a_O2 = (27*R**(2)*Tc_O2**(2))/(64*Pc_O2);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "a_N2 = (27*R**(2)*Tc_N2**(2))/(64*Pc_N2);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "a_12 = (a_O2*a_N2)**(1./2);\n", + "b_O2 = (R*Tc_O2)/(8*Pc_O2);\t\t\t#[m**(3)/mol]\n", + "b_N2 = (R*Tc_N2)/(8*Pc_N2);\t\t\t#[m**(3)/mol]\n", + "\n", + "# For the mixture\n", + "a = y1**(2)*a_O2 + y2**(2)*a_N2 + 2*y1*y2*a_12;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = y1*b_O2 + y2*b_N2;\t\t\t#[m**(3)/mol]\n", + "\n", + "# From the cubic form of van der Walls equation of state\n", + "# At 300 K and 300 kPa,\n", + "def f1(V): \n", + " return V**(3)-(b+(R*T_1)/P_1)*V**(2)+(a/P_1)*V-(a*b)/P_1\n", + "V_1 = fsolve(f1,0.1)\n", + "V_2 = fsolve(f1,10)\n", + "V_3 = fsolve(f1,100)\n", + "# The above equation has only 1 real root, other two roots are imaginary\n", + "V = V_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "# Now at P = 330 kPa and at molar volume V\n", + "# The van der Walls equation of state is\n", + "# (P + a/V**(2))*(V - b) = R*T\n", + "T_2_prime = ((P_2 + a/V**(2))*(V - b))/R;\t\t\t#[K]\n", + "n_prime = Vol/V;\t\t\t#[mol]\n", + "\n", + "# Total change in internal energy is given by\n", + "# delta_U_prime = n_prime*delta_U_ig + n_prime*(U_R_2 - U_R_1)\n", + "# delta_U_prime = n_prime*Cv_0*(T_2_prime - T_1) + n_prime*a(1/V_2 - 1/V_1);\n", + "# Since V_1 = V_2 = V, therefore\n", + "delta_U_prime = n_prime*Cv_0*(T_2_prime - T_1);\n", + "\n", + "print \" 2).The change in internal energy for van der Walls equation of state) is %f J\"%(delta_U_prime);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The change in internal energy for ideal gas behaviour) is 4319.220592 J\n", + " 2).The change in internal energy for van der Walls equation of state) is 4299.872282 J\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.25 Page Number : 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "T_1 = 150 + 273.15;\t\t\t#[K] - Initial emperature\n", + "T_2 = T_1;\t\t\t# Isothermal process\n", + "P_1 = 100.*10**(3);\t\t\t#[Pa] - Initial pressure\n", + "P_2 = 450.*10**(3);\t\t\t#[Pa] - Final pressure\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "# For water\n", + "Tc = 647.1;\t\t\t#[K] - Critical temperature\n", + "Pc = 220.55;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10.**(5);\n", + "w = 0.345;\n", + "Mol_wt = 18.015;\t\t\t#[g/mol] - Molecular weight of water\n", + "Cp_0 = 4.18;\t\t\t#[J/mol-K] - Smath.tan(math.radiansard heat capacity of water\n", + "\n", + "# Calculations\n", + "\n", + "# In Peng-Robinson equation of state\n", + "m = 0.37464 + 1.54226*w - 0.26992*w**(2);\n", + "# At T_1 and P_1, we have\n", + "Tr = T_1/Tc;\n", + "alpha = (1 + m*(1 - Tr**(1./2)))**(2);\n", + "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\n", + "# Cubuc form of Peng-Robinson equation of stste is given by\n", + "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n", + "# Solving the cubic equation\n", + "def f(V): \n", + " return V**(3)+(b-(R*T_1)/P_1)*V**(2)-((3*b**(2))+((2*R*T_1*b)/P_1)-(a/P_1))*V+b**(3)+((R*T_1*(b**(2)))/P_1)-((a*b)/P_1)\n", + "V1 = fsolve(f,-1)\n", + "V2 = fsolve(f,0)\n", + "V3 = fsolve(f,1)\n", + "#The largest root is for vapour phase,\n", + "#The largest root is only considered as the systemis gas\n", + "V_1 = V3;\t\t\t#[m**(3)/mol]\n", + "# Thus compressibility factor is\n", + "Z_1 = (P_1*V_1)/(R*T_1);\n", + "\n", + "# At T_2 and P_2, we have\n", + "# Cubuc form of Peng-Robinson equation of stste is given by\n", + "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n", + "# Solving the cubic equation\n", + "def f1(V): \n", + " return V**(3)+(b-(R*T_2)/P_2)*V**(2)-((3*b**(2))+((2*R*T_2*b)/P_2)-(a/P_2))*V+b**(3)+((R*T_2*(b**(2)))/P_2)-((a*b)/P_2)\n", + "V4 = fsolve(f1,-1)\n", + "V5 = fsolve(f1,0)\n", + "V6 = fsolve(f1,1)\n", + "\n", + "V_2 = V6;\t\t\t#[m**(3)/mol]\n", + "# Thus compressibility factor is\n", + "Z_2 = (P_2*V_2)/(R*T_2);\n", + "\n", + "# In the Peng-Robinson equation of stste\n", + "# da/dT = -(a*m)/((alpha*T*Tc)**(1/2))\n", + "# The residual enthalpy is given by\n", + "# H_R = R*T*(Z-1) + (((T*(da_dT))-a)/(2*2**(1/2)*b))*math.log((Z+(1+2**(1/2)*((P*b)/(R*T))))/(Z+(1-2**(1/2)*((P*b)/(R*T)))))\n", + "\n", + "# At state 1\n", + "da_dT_1 = -(a*m)/((alpha*T_1*Tc)**(1./2));\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "H_R_1 = R*T_1*(Z_1-1) + (((T_1*(da_dT_1))-a)/(2*(2**(1./2))*b))* \\\n", + "math.log((Z_1+(1+2**(1./2))*((P_1*b)/(R*T_1)))/(Z_1+(1-2**(1./2))*((P_1*b)/(R*T_1))));\n", + "\n", + "# At state 2\n", + "da_dT_2 = -(a*m)/((alpha*T_2*Tc)**(1/2.));\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "H_R_2 = R*T_2*(Z_2-1) + (((T_2*(da_dT_2))-a)/(2*2**(1./2)* \\\n", + "b))*math.log((Z_2+(1+2**(1./2))*((P_2*b)/(R*T_1)))/(Z_2+(1-2**(1./2))*((P_2*b)/(R*T_1))));\n", + "\n", + "\n", + "delta_H = H_R_2 - H_R_1;\t\t\t#[J/mol]\n", + "delta_H = delta_H/Mol_wt;\t\t\t#[kJ/kg]\n", + "\n", + "# The residual entropy relation for a substance following Peng - Robinson equation of state ia\n", + "# S_R = R*math.log(Z - (P*b)/(R*T)) + (da_dT/(2*2**(1/2)*b))*math.log((Z+(1+2**(1/2))*((P*b)/(R*T)))/(Z+(1-2**(1/2))*((P*b)/(R*T))))\n", + "\n", + "# The residual entropy at state 1 is\n", + "S_R_1 = R*math.log(Z_1 - (P_1*b)/(R*T_1)) + (da_dT_1/(2*2**(1./2)*b))* \\\n", + "math.log((Z_1+(1+2**(1./2))*((P_1*b)/(R*T_1)))/(Z_1+(1-2**(1./2))*((P_1*b)/(R*T_1))));\n", + "\n", + "# The residual entropy at state 2 is\n", + "S_R_2 = R*math.log(Z_2 - (P_2*b)/(R*T_2)) + (da_dT_2/(2*2**(1./2)*b)) \\\n", + "*math.log((Z_2+(1+2**(1./2))*((P_2*b)/(R*T_2)))/(Z_2+(1-2**(1./2))*((P_2*b)/(R*T_2))));\n", + "\n", + "delta_S_R = S_R_2 - S_R_1;\t\t\t#[J/mol-K]\n", + "\n", + "# The ideal gas change in entropy is\n", + "delta_S_ig = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n", + "\n", + "# Therefore\n", + "delta_S = delta_S_R + delta_S_ig;\t\t\t#[J/mol-K]\n", + "\n", + "# Results\n", + "print \" The enthalpy change is given by delta_H = %f kJ/mol\"%(delta_H);\n", + "print \" The entropy change is given by delta_S = %f J/mol-K\"%(delta_S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy change is given by delta_H = -11.747722 kJ/mol\n", + " The entropy change is given by delta_S = -12.826050 J/mol-K\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.26 Page Number : 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "Vol = 0.15;\t\t\t#[m**(3)]\n", + "T_1 = 170;\t\t\t#[K] - Initial emperature\n", + "P_1 = 100;\t\t\t#[bar] - Initial pressure\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "# For nitrogen\n", + "Tc = 126.2;\t\t\t#[K] - Critical tempeature\n", + "Pc = 34;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.038;\n", + "# Cp_0 = 27.2+4.2*10**(-3)*T\n", + "\n", + "# Calculations and Results\n", + "#(1)\n", + "# For van der Walls equation of state\n", + "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\n", + "# The cubic form of van der Walls equation of state is given by,\n", + "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "# On simplification the equation changes to\n", + "# V**(3) - 1.799*10**(4)*V**(2) + 1.366*10**(-8)*V - 5.269*10**(-13) = 0\n", + "\n", + "# Solving the cubic equation \n", + "def f(V): \n", + " return V**(3)-1.799*10**(-4)*V**(2) + 1.366*10**(-8)*V - 5.269*10**(-13)\n", + "V1 = fsolve(f,1)\n", + "V2 = fsolve(f,10)\n", + "V3 = fsolve(f,100)\n", + "# The above equation has only 1 real root, other two roots are imagimnary\n", + "V_1 = V1;\t\t\t#[m**(3)/mol]\n", + "# Thus total number of moles is given by\n", + "n_1 = Vol/V_1;\t\t\t#[mol]\n", + "\n", + "# After 500 mol are withdrawn, the final number of moles is given by\n", + "n_2 = n_1 - 500;\t\t\t#[mol]\n", + "# Thus molar volume at final state is \n", + "V_2 = Vol/n_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "# The ideal entropy change is guven by\n", + "\n", + "def f24(T): \n", + " return 27.2+4.2*10**(-3)*T\n", + "\n", + "# delta_S_ig = quad(f24,T_1,T_2) - R*math.log(P_2/P_1)[0]\n", + "\n", + "# The residual entropy change is given by\n", + "# delta_S_R = R*math.log((P_2*(V_2-b))/(R*T_2)) - R*math.log((P_1*(V_1-b))/(R*T_1)) \n", + "# delta_S = delta_S_ig = delta_S_R\n", + "\n", + "def f25(T): \n", + " return 27.2+4.2*10**(-3)*T\n", + "\n", + "# delta_S = quad(f25,T_1,T_2) + R*math.log((V_2-b)/(V_1-b))[0]\n", + "\n", + "# During discharging delta_S = 0, thus on simplification we get\n", + "# 18.886*math.log(T_2) + 4.2*10**(-3)*T_2 - 92.937 = 0\n", + "# Solving the above equation we get\n", + "def f1(T_2): \n", + " return 18.886*math.log(T_2) + 4.2*10**(-3)*T_2 - 92.937\n", + "T_2 = fsolve(f1,1)\n", + "\n", + "# Thus at T_2, \n", + "P_2 = (R*T_2)/(V_2-b) - a/V_2**(2);\t\t\t#[N/m**(2)]\n", + "P_2 = P_2*10**(-5);\t\t\t#[bar]\n", + "\n", + "print \" 1).The final temperature is %f K\"%(T_2);\n", + "print \" The final pressure is %f bar\"%(P_2);\n", + "\n", + "#(2)\n", + "# In Peng-Robinson equation of state\n", + "m = 0.37464 + 1.54226*w - 0.26992*w**(2);\n", + "# At T_1 and P_1, we have\n", + "Tr = T_1/Tc;\n", + "alpha = (1 + m*(1 - Tr**(1./2)))**(2);\n", + "a_2 = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b_2 = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\n", + "# Cubuc form of Peng-Robinson equation of stste is given by\n", + "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n", + "# Solving the cubic equation\n", + "def f2(V): \n", + " return V**(3)+(b_2-(R*T_1)/P_1)*V**(2)-((3*b_2**(2))+((2*R*T_1*b_2)/P_1)-(a_2/P_1))*V+b_2**(3)+((R*T_1*(b_2**(2)))/P_1)-((a_2*b_2)/P_1)\n", + "V4 = fsolve(f2,-1)\n", + "V5 = fsolve(f2,0)\n", + "V6 = fsolve(f2,0.006)\n", + "#The above equation has only 1 real root,the other two roots are imaginary\n", + "V_1_2 = V6;\t\t\t#[m**(3)/mol]\n", + "\n", + "# The number of moles in the initial state is given by\n", + "n_1_2 = Vol/V_1_2;\t\t\t#[mol]\n", + "# After 500 mol are withdrawn, the final number of moles is given by\n", + "n_2_2 = n_1_2 - 500;\t\t\t#[mol]\n", + "# Thus molar volume at final state is \n", + "V_2_2 = Vol/n_2_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "# At the final state the relation between pressure and temperature is\n", + "# P_2_2 = (R*T_2_2)/(V_2_2-b_2) - a_2/V_2_2**(2)\n", + "# P_2_2 = 7.23*10**(4)*T_2 - 3.93*10**(7)*a_2\n", + "\n", + "# Now let us calculate the residual entropy at initial state\n", + "Z_1 = (P_1*V_1_2)/(R*T_1);\n", + "da_dT_1 = -(a*m)/((alpha*T_1*Tc)**(1./2));\t\t\t#[Pa*m**(6)/mol**(2)] - da/dT\n", + "\n", + "# The residual entropy change for Peng-Robinson equatiob of state is given by\n", + "# S_R = R*math.log(Z-(P*b)/(R*T)) + (da_dT/(2*2**(1/2)*b))*math.log((V+(1+2**(1/2))*b))/((V+(1-2**(1/2)*b))));\n", + "S_R_1 = R*(math.log(Z_1-(P_1*b_2)/(R*T_1))) + (da_dT_1/(2*2**(1.2)*b_2))*(math.log((V_1_2+(1+2**(1./2))*b_2)/(V_1_2+(1-2**(1./2))*b_2)));\n", + "\n", + "# The total entropy change is given by\n", + "# delta_S = delta_S_ig + delta_S_R\n", + "\n", + "def f26(T): \n", + " return 27.2+4.2*10**(-3)*T\n", + "\n", + "# where, delta_S_ig = quad(f26,T_1,T_2_2) - R*math.log(P_2_2/P_1)[0]\n", + "\n", + "# and, P_2_2 = (R*T_2_2)/(V_2_2-b_2) - a_2/V_2_2**(2)\n", + "# On simplification we get\n", + "# delta_S = 27.2*math.log(T_2_2-T_1) + 4.2*10**(-3)*(T_2_2-T_1) - R*math.log(P_2_2/P_1) + R*math.log(Z_2-(P_2_2*b)/(R*T_2_2)) + 6226*(da_dT_2) + 9.22\n", + "\n", + "# Now we have the determine the value of T_2_2 such that delta_S = 0\n", + "# Starting with a temperature of 150 K\n", + "T_prime = 100.;\t\t\t#[K]\n", + "error = 10.;\n", + "while(error>0.1):\n", + " Tr_prime = T_prime/Tc;\n", + " alpha_prime = (1 + m*(1 - Tr_prime**(1./2)))**(2);\n", + " a_prime = ((0.45724*(R*Tc)**(2))/Pc)*alpha_prime;\n", + " P_prime = 7.23*10**(4)*T_prime - 3.93*10**(7)*a_prime;\n", + " Z_prime = (P_prime*V_2_2)/(R*T_prime);\n", + " da_dT_prime = -(a_prime*m)/((alpha_prime*T_prime*Tc)**(1./2));\n", + " delta_S = 27.2*math.log(T_prime/T_1) + 4.2*10**(-3)*(T_prime-T_1) - R*math.log(P_prime/P_1) + R*math.log(Z_prime-((P_prime*b_2)/(R*T_prime))) + 6226*(da_dT_prime) + 9.22;\n", + " error=abs(delta_S);\n", + " T_prime = T_prime + 0.3;\n", + "\n", + "T_2_2 = T_prime;\t\t\t#[K] - Final temperature\n", + "P_2_2 = P_prime*10**(-5);\t\t\t#[bar] - Final pressure\n", + "\n", + "print \" 2).The final temperature is %f K\"%(T_2_2);\n", + "print \" The final pressure is %f bar\"%(P_2_2);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The final temperature is 133.131844 K\n", + " The final pressure is 39.636659 bar\n", + " 2).The final temperature is 134.200000 K\n", + " The final pressure is 40.130674 bar\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.27 Page Number : 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "T = 373.15;\t\t\t#[K]\n", + "Tc = 562.16;\t\t\t#[K]\n", + "Pc = 48.98;\t\t\t#[bar]\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "\n", + "# The cubic form of Redlich Kwong equation of state is given by,\n", + "# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n", + "\n", + "# Calculations\n", + "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\n", + "# At 373.15 K, let us assume the pressure to be 2.5 bar and under these conditions \n", + "P_1 = 2.5;\t\t\t#[bar]\n", + "P_1 = P_1*10**(5);\t\t\t#[bar]\n", + "\n", + "# Putting the values in Redlich Kwong equation of state, the equation becomes\n", + "# V**(3) - 0.0124*V**(2) + 8.326*10**(-6)*V - 7.74*10**(-10) = 0\n", + "# Solving the cubic equation\n", + "\n", + "def f(V): \n", + " return V**(3) - 0.0124*V**(2) + 8.326*10**(-6)*V - 7.74*10**(-10)\n", + "V1=fsolve(f,-9)\n", + "V2=fsolve(f,10)\n", + "V3=fsolve(f,0.1)\n", + "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n", + "V_liq = V1;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n", + "V_vap = V3;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n", + "\n", + "# Let us calculate the fugacity of vapour phase\n", + "# math.log(f_vap/P) = b/(V-b) + math.log((R*T)/(P*(V-b))) - (a/(R*T**(1.5)))*(1/(V+b) - (1/b)*math.log(V/(V+b)))\n", + "f_vap = P_1*math.exp(b/(V_vap-b) + math.log((R*T)/(P_1*(V_vap-b))) - (a/(R*T**(1.5)))*(1/(V_vap+b) - (1/b)*math.log(V_vap/(V_vap+b))));\t\t\t#[Pa]\n", + "\n", + "# Let us calculate the fugacity of the liquid phase\n", + "f_liq = P_1*math.exp(b/(V_liq-b) + math.log((R*T)/(P_1*(V_liq-b))) - (a/(R*T**(1.5)))*(1/(V_liq+b) - (1/b)*math.log(V_liq/(V_liq+b))));\n", + "\n", + "\n", + "# The two fugacities are not same; therefore another pressure is to be assumed. The new pressure is\n", + "P_new = P_1*(f_liq/f_vap);\t\t\t#[Pa]\n", + "\n", + "# At P_new\n", + "def f1(V): \n", + " return V**(3) - ((R*T)/P_new)*V**(2) - (b**(2) + ((b*R*T)/P_new) - a/(T**(1/2)*P_new))*V - (a*b)/(T**(1/2)*P_new)\n", + "V4=fsolve(f1,-9)\n", + "V5=fsolve(f1,10)\n", + "V6=fsolve(f1,0.1)\n", + "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n", + "V_liq_2 = V4;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n", + "V_vap_2 = V6;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n", + "\n", + "f_vap_prime = P_new*math.exp(b/(V_vap_2-b) + math.log((R*T)/(P_new*(V_vap_2-b))) - (a/(R*T**(1.5)))*(1/(V_vap_2+b) - (1/b)*math.log(V_vap_2/(V_vap_2+b))));\t\t\t#[Pa]\n", + "f_liq_prime = P_new*math.exp(b/(V_liq_2-b) + math.log((R*T)/(P_new*(V_liq_2-b))) - (a/(R*T**(1.5)))*(1/(V_liq_2+b) - (1/b)*math.log(V_liq_2/(V_liq_2+b))));\n", + "\n", + "# Since the fugacities of liquid and vapour phasesare almost same the assumed pressure may be taken as vapour pressure at 373.15 K\n", + "P_new = P_new*10**(-5);\t\t\t#[bar]\n", + "\n", + "# Results\n", + "print \" The vapour pressure of benzene using Redlich Kwong equation of state is %f bar\"%(P_new);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The vapour pressure of benzene using Redlich Kwong equation of state is 2.666995 bar\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.28 Page Number : 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "T = 150 + 273.15;\t\t\t#[K]\n", + "Tc = 647.1;\t\t\t#[K]\n", + "Pc = 220.55;\t\t\t#[bar]\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "w = 0.345;\n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "\n", + "# Let us assume a pressure of 100 kPa.\n", + "P_1 = 100.*10**(3);\t\t\t#[Pa]\n", + "\n", + "# Calculations\n", + "# At 100 kPa and 423.15 K, from Peng-Robinson equation of stste \n", + "m = 0.37464 + 1.54226*w - 0.26992*w**(2);\n", + "Tr = T/Tc;\n", + "alpha = (1 + m*(1 - Tr**(1./2)))**(2);\n", + "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "# Cubic form of Peng-Robinson equation of stste is given by\n", + "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n", + "# Solving the cubic equation\n", + "def f(V): \n", + " return V**(3)+(b-(R*T)/P_1)*V**(2)-((3*b**(2))+((2*R*T*b)/P_1)-(a/P_1))*V+b**(3)+((R*T*(b**(2)))/P_1)-((a*b)/P_1)\n", + "V1 = fsolve(f,-1)\n", + "V2 = fsolve(f,0)\n", + "V3 = fsolve(f,1)\n", + "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n", + "V_liq = V1;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n", + "V_vap = V3;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n", + "\n", + "# The compressibility factor is given by\n", + "Z_vap = (P_1*V_vap)/(R*T);\t\t\t# For liquid phase\n", + "Z_liq = (P_1*V_liq)/(R*T);\t\t\t# For vapour phase\n", + "\n", + "# The math.expression for fugacity of Peng Robinson equation is\n", + "# math.log(f/P) = (Z-1) - math.log(Z-((P*b)/(R*T))) - (a/(2*2**(1/2)*b*R*T))*math.log((Z+(1+2**(1/2))*((P*b)/(R*T)))/((Z+(1-2**(1/2))*((P*b)/(R*T)))\n", + "# For vapour phase\n", + "f_P_vap = math.exp((Z_vap-1) - math.log(Z_vap-((P_1*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_vap+(1+2**(1./2))*((P_1*b)/(R*T)))/(Z_vap+(1-2**(1./2))*((P_1*b)/(R*T)))));\n", + "# For liquid phase\n", + "f_P_liq = math.exp((Z_liq-1) - math.log(Z_liq-((P_1*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_liq+(1+2**(1./2))*((P_1*b)/(R*T)))/(Z_liq+(1-2**(1./2))*((P_1*b)/(R*T)))));\n", + "\n", + "# Therefore f_liq/f_vap can be calculated as\n", + "fL_fV = (f_P_liq/f_P_vap);\n", + "\n", + "# The two values (f/P)_vap and (f/P)_vap are not same [ (f_P_liq/f_P_vap) >1 ]; therefore another pressure is to be assumed. The new pressure be\n", + "P_new = P_1*(f_P_liq/f_P_vap);\t\t\t#[Pa]\n", + "\n", + "# At P_new and 423.15 K, from Peng-Robinson equation of stste \n", + "\n", + "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n", + "# Solving the cubic equation\n", + "def f(V): \n", + " return V**(3)+(b-(R*T)/P_new)*V**(2)-((3*b**(2))+((2*R*T*b)/P_new)-(a/P_new))*V+b**(3)+((R*T*(b**(2)))/P_new)-((a*b)/P_new)\n", + "V4 = fsolve(f,-1)\n", + "V5 = fsolve(f,0)\n", + "V6 = fsolve(f,1)\n", + "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n", + "V_liq_2 = V4;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n", + "V_vap_2 = V6;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n", + "\n", + "# The compressibility factor is given by\n", + "Z_vap_2 = (P_new*V_vap_2)/(R*T);\t\t\t# For liquid phase\n", + "Z_liq_2 = (P_new*V_liq_2)/(R*T);\t\t\t# For vapour phase\n", + "\n", + "# For vapour phase\n", + "f_P_vap_2 = math.exp((Z_vap_2-1) - math.log(Z_vap_2-((P_new*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_vap_2+(1+2**(1./2))*((P_new*b)/(R*T)))/(Z_vap_2+(1-2**(1./2))*((P_new*b)/(R*T)))));\n", + "# For liquid phase\n", + "f_P_liq_2 = math.exp((Z_liq_2-1) - math.log(Z_liq_2-((P_new*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_liq_2+(1+2**(1./2))*((P_new*b)/(R*T)))/(Z_liq_2+(1-2**(1./2))*((P_new*b)/(R*T)))));\n", + "\n", + "# Therefore f_liq/f_vap can be calculated as\n", + "fL_fV_2 = (f_P_liq_2/f_P_vap_2);\n", + "\n", + "# And new pressure is given by\n", + "P_new_prime = P_new*(f_P_liq_2/f_P_vap_2);\t\t\t#[Pa]\n", + "P_new_prime = P_new_prime*10**(-5);\n", + "\n", + "# Since the change in pressure is small, so we can take this to be the vapour pressure at 150 C\n", + "\n", + "# Results\n", + "print \" The vapour pressure of water using Peng-Robinson equation of stste is %f bar\"%(P_new_prime);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The vapour pressure of water using Peng-Robinson equation of stste is 4.675976 bar\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb new file mode 100755 index 00000000..0d56d5ca --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb @@ -0,0 +1,320 @@ +{ + "metadata": { + "name": "ch11_1", + "signature": "sha256:ea5fa2ce45062851dc4892fcc5b621c33d72fa0443d476b1ef4133dade9e39b0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Properties of a Component in a Mixture" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.1 Page Number : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "Vol_total = 3;\t\t\t#[m**(3)] - Total volume of solution\n", + "x_ethanol = 0.6;\t\t\t#Mole fraction of ethanol\n", + "x_water = 0.4;\t\t\t#Mole fraction of water\n", + "\n", + "# Calculations\n", + "#The partial molar volumes of the components in the mixture are\n", + "V_ethanol_bar = 57.5*10**(-6);\t\t\t#[m**(3)/mol]\n", + "V_water_bar = 16*10**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "#The molar volumes of the pure components are\n", + "V_ethanol = 57.9*10**(-6);\t\t\t#[m**(3)/mol]\n", + "V_water = 18*10**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "#The molar volume of the solution is\n", + "V_sol = x_ethanol*V_ethanol_bar + x_water*V_water_bar;\t\t\t#[m**(3)/mol]\n", + "#Total number of moles can be calculated as \n", + "n_total = Vol_total/V_sol;\t\t\t#[mol]\n", + "\n", + "#Moles of the components are\n", + "n_ethanol = n_total*x_ethanol;\t\t\t#[mol]\n", + "n_water = n_total*x_water;\t\t\t#[mol]\n", + "\n", + "#Finally the volume of the pure components required can be calculated as\n", + "Vol_ethanol = V_ethanol*n_ethanol;\n", + "Vol_water = V_water*n_water;\n", + "\n", + "# Results\n", + "print \"Required volume of ethanol is %f cubic metre\"%(Vol_ethanol);\n", + "print \"Required volume of water is %f cubic metre\"%(Vol_water);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required volume of ethanol is 2.548166 cubic metre\n", + "Required volume of water is 0.528117 cubic metre\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.2 Page Number : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "T = 25+273.15;\t\t\t#[K] - Temperature\n", + "P = 1;\t\t\t#[atm]\n", + "#Component 1 = water\n", + "#component 2 = methanol\n", + "a = -3.2;\t\t\t#[cm**(3)/mol] - A constant\n", + "V2 = 40.7;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2 (methanol)\n", + "#V1_bar = 18.1 + a*x_2**(2)\n", + "\n", + "# Calculations and Results\n", + "#From Gibbs-Duhem equation at constant temperature and pressure we have\n", + "#x_1*dV1_bar + x_2*dV2_bar = 0\n", + "#dV2_bar = -(x_1/x_2)*dV1_bar = -(x_1/x_2)*a*2*x_2*dx_2 = -2*a*x_1*dx_2 = 2*a*x_1*dx_1\n", + "\n", + "#At x_1 = 0: x_2 = 1 and thus V2_bar = V2\n", + "#Integrating the above equation from x_1 = 0 to x_1 in the RHS, and from V2_bar = V2 to V2 in the LHS, we get\n", + "#V2_bar = V2 + a*x_1**(2) - Molar volume of component 2(methanol) in the mixture \n", + "\n", + "print \"The expression for the partial molar volume of methanol2 isV2_bar = V2 + a*x_1**2 [cm**3/mol]\";\n", + "\n", + "#At infinite dilution, x_2 approach 0 and thus x_1 approach 1, therefore\n", + "x_1 = 1;\t\t\t# Mole fraction of component 1(water) at infinite dilution\n", + "V2_bar_infinite = V2 + a*(x_1**(2));\t\t\t#[cm**(3)/mol]\n", + "\n", + "print \"The partial molar volume of methanol at infinite dilution is %f cm**3/mol\"%(V2_bar_infinite);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The expression for the partial molar volume of methanol2 isV2_bar = V2 + a*x_1**2 [cm**3/mol]\n", + "The partial molar volume of methanol at infinite dilution is 37.500000 cm**3/mol\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.4 Page Number : 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "#H = a*x_1 + b*x_2 +c*x_1*x_2\n", + "\n", + "#The values of the constants are\n", + "a = 15000;\t\t\t#[J/mol]\n", + "b = 20000;\t\t\t#[J/mol]\n", + "c = -2000;\t\t\t#[J/mol]\n", + "\n", + "# Calculations and Results\n", + "#(1)\n", + "#Enthalpy of pure component 1 = H1 is obtained at x_2 = 0, thus \n", + "x_2 = 0;\n", + "x_1 = 1;\n", + "H1 = a*x_1 + b*x_2 +c*x_1*x_2;\t\t\t#[J/mol]\n", + "print \"a).The enthalpy of pure component 1 is %f J/mol\"%(H1);\n", + "\n", + "#Similarly for component 2,\n", + "#Enthalpy of pure component 2 = H2 is obtained at x_1 = 0, thus \n", + "x_1_prime = 0;\n", + "x_2_prime = 1;\n", + "H2 = a*x_1_prime + b*x_2_prime +c*x_1_prime*x_2_prime;\t\t\t#[J/mol]\n", + "print \" The enthalpy of pure component 2 is %f J/mol\"%(H2);\n", + "\n", + "\n", + "#(c)\n", + "#From part (b), we have the relation\n", + "#H1_bar = a + c*(x_2**(2))\n", + "#H2_bar = b + c*(x_1**(2))\n", + "\n", + "#For enthalpy of component 1 at infinite dilution, x_1 approach 0 and thus x_2 approach 1, therefore\n", + "x_1_c = 0;\n", + "x_2_c = 1;\n", + "H1_infinite = a + c*(x_2_c**(2));\t\t\t#[cm**(3)/mol]\n", + "print \"C).The enthalpy of componenet 1 at infinite dilution at x_1 = 0) is %f J/mol\"%(H1_infinite);\n", + "\n", + "#At x_1 = 0.2\n", + "x_1_c1 = 0.2;\n", + "x_2_c1 = 0.8;\n", + "H1_bar_c1 = a + c*(x_2_c1**(2));\t\t\t#[J/mol]\n", + "print \" The enthalpy of componenet 1 at at x_1 = 0.2) is %f J/mol\"%(H1_bar_c1);\n", + "\n", + "#At x_1 = 0.8\n", + "x_1_c2 = 0.8;\n", + "x_2_c2 = 0.2;\n", + "H1_bar_c2 = a + c*(x_2_c2**(2));\t\t\t#[J/mol]\n", + "print \" The enthalpy of componenet 1 at at x_1 = 0.8) is %f J/mol\"%(H1_bar_c2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a).The enthalpy of pure component 1 is 15000.000000 J/mol\n", + " The enthalpy of pure component 2 is 20000.000000 J/mol\n", + "C).The enthalpy of componenet 1 at infinite dilution at x_1 = 0) is 13000.000000 J/mol\n", + " The enthalpy of componenet 1 at at x_1 = 0.2) is 13720.000000 J/mol\n", + " The enthalpy of componenet 1 at at x_1 = 0.8) is 14920.000000 J/mol\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.9 Page Number : 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "n = 1*10**(3);\t\t\t#[mol] - No of moles\n", + "P = 0.1;\t\t\t#[MPa] - Pressure of the surrounding\n", + "T = 300;\t\t\t#[K] - Temperature of the surrounding\n", + "x_1 = 0.79;\t\t\t#Mole fraction of N2 in the air\n", + "x_2 = 0.21;\t\t\t#Mole fraction of O2 in the air\n", + "R=8.314;\t\t\t#[J/mol*K]\n", + "\n", + "# Calculations\n", + "#Change in availability when x_1 moles of component 1 goes from pure state to that in the mixture is\n", + "#x_1*(si_1 - si_2) = x_1*[H1 - H1_bar - T_0*(S1 - S1_bar)]\n", + "#Similarly change in availability of x_2 moles of component 2 is\n", + "#x_2*(si_1 - si_2) = x_2*[H2 - H2_bar - T_0*(S2 - S2_bar)]\n", + "\n", + "#and thus total availability change when 1 mol of mixture is formed from x_1 mol of component 1 and x_2 mol of component 2 is equal to reversible work\n", + "#W_rev = x_1*[H1 - H1_bar - T_0*(S1 - S1_bar)] + x_2*[H2 - H2_bar - T_0*(S2 - S2_bar)]\n", + "#W_rev = -[delta_H_mix] +T_0*[delta_S_mix]\n", + "\n", + "#If T = T_0 that is,temperature of mixing is same as that of surroundings, W_rev = -delta_G_mix.\n", + "#W_rev = -delta_G_mix = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2))\n", + "W_rev = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2));\t\t\t#[J/mol]\n", + "\n", + "#Therefore total work transfer is given by\n", + "W_min = (n*W_rev)/1000;\t\t\t#[kJ]\n", + "\n", + "# Results\n", + "print \"The minimum work required is %f kJ\"%(W_min);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum work required is -1281.910728 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.10 Page Number : 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "x_A = 0.20;\t\t\t# Mole fraction of A\n", + "x_B = 0.35;\t\t\t# Mole fraction of B\n", + "x_C = 0.45;\t\t\t# Mole fraction of C\n", + "\n", + "phi_A = 0.7;\t\t\t# Fugacity coefficient of A\n", + "phi_B = 0.6;\t\t\t# Fugacity coefficient of B\n", + "phi_C = 0.9;\t\t\t# Fugacity coefficient of C\n", + "\n", + "P = 6.08;\t\t\t#[MPa] - Pressure\n", + "T = 384;\t\t\t#[K] - Temperature\n", + "\n", + "# Calculations\n", + "#We know that\n", + "#math.log(phi) = x_1*math.log(phi_) + x_2*math.log(phi_2) + x_3*math.log(phi_3)\n", + "math.log_phi = x_A*math.log(phi_A) + x_B*math.log(phi_B) + x_C*math.log(phi_C);\t\t\t# Fugacity coefficient\n", + "phi = math.exp(math.log_phi);\n", + "\n", + "#Thus fugacity is given by,\n", + "f_mixture = phi*P;\t\t\t#[MPa]\n", + "\n", + "# Results\n", + "print \"The fugacity of the mixture is %f MPa\"%(f_mixture);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fugacity of the mixture is 4.515286 MPa\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb new file mode 100755 index 00000000..2d5ee204 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb @@ -0,0 +1,503 @@ +{ + "metadata": { + "name": "ch12_1", + "signature": "sha256:acb0234cca7ef04cf2e231ae1d04809101d746587fbd14cf847d456347c563ea" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Partial Molar Volume and Enthalpy from Experimental Data " + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.1 Page Number : 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "import math \n", + "from numpy import *\n", + "\n", + "\n", + "# Variables\n", + "T = 0 + 273.15;\t\t\t#[K] - Temperature\n", + "P = 1;\t\t\t#[atm] - Pressure\n", + "x_methanol = 0.5;\t\t\t#Mole fraction of methanol at which molar volume is to be calculated\n", + "x_water = 0.5;\t\t\t#Mole fraction at which molar volume is to be calculated\n", + "\n", + "#V = V1 at x1 = 1 and V = V2 at x1 = 0, therefore\n", + "V1 = 40.7;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n", + "V2 = 18.1;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n", + "from numpy import zeros,linalg\n", + "x1=[0.114,0.197,0.249,0.495,0.692,0.785,0.892];\t\t\t# Values of mole fraction of component 1\n", + "V=[20.3,21.9,23.0,28.3,32.9,35.2,37.9];\t\t\t# Values of molar volume\n", + "x2=zeros(7);\t\t\t# Mole fraction of component 2\n", + "x_V=zeros(7);\t\t\t# x_V = x1*V_1 + x2*V_2\n", + "V_mix=zeros(7);\t\t\t# V_mix = V - x1*V_1 - x2*V_2\n", + "del_V=zeros(7);\t\t\t#del_V = V_mix/(x1*x2)\n", + "\n", + "# Calculations\n", + "for i in range(7):\n", + " x2[i]=1-x1[i];\n", + " x_V[i]=x1[i]*V1 + x2[i]*V2;\n", + " V_mix[i]=V[i]-x1[i]*V1- x2[i]*V2;\n", + " del_V[i]=V_mix[i]/(x1[i]*x2[i]);\n", + "\n", + "x1 = array(x1)\n", + "\t\t\t#From the matrix method to solve simultaneous linear equations, we have\n", + "a=array([[7, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2), sum(x1**3)],[sum(x1**2), sum(x1**3), sum(x1**4)]])\n", + "b=array([sum(del_V),sum(x1*del_V),sum((x1**2)*del_V)])\n", + "\n", + "soln=linalg.solve(a,b);\n", + "\n", + "a0=soln[0]\n", + "a1=soln[1]\n", + "a2=soln[2]\n", + "#del_V = V_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2)\n", + "#V_mix = (a0 + a1*x1 + a2*x1**(2))*(x1*(1 - x1))\n", + "# For x1 = 0.5\n", + "x1 = 0.5;\n", + "V_mix_prime = (a0+(a1*x1)+(a2*x1**2))*(x1*(1-x1));\t\t\t#[cm**(3)/mol]\n", + "\n", + "#Now differentiating the above equation with respect to x we get\n", + "#d/dx(V_mix) = (-4*a2*x1**3) + (3*(a2-a1)*x1**2) + (2*(a1-a0)*x1)+ a0\n", + "#Again for x1 = 0.5\n", + "x1_prime = 0.5;\n", + "del_V_mix_prime = (-4*a2*x1_prime**3)+(3*(a2-a1)*x1_prime**2)+(2*(a1-a0)*x1_prime)+a0;\n", + "\n", + "#Finally,calculating the partial molar volumes\n", + "V1_bar = V1 + V_mix_prime + x_water*del_V_mix_prime;\t\t\t#[cm**(3)/mol] \n", + "V2_bar = V2 + V_mix_prime - x_methanol*del_V_mix_prime;\t\t\t#[cm**(3)/mol]\n", + "\n", + "# Results\n", + "print \"The partial molar volume of methanol component 1) is %f cm**3)/mol\"%(V1_bar);\n", + "print \"The partial molar volume of water component 2) is %f cm**3)/mol\"%(V2_bar);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial molar volume of methanol component 1) is 39.721188 cm**3)/mol\n", + "The partial molar volume of water component 2) is 17.079639 cm**3)/mol\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.2 Page Number : 421" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "#component 1 = water\n", + "#component 2 = methanol\n", + "T = 25 + 273.15;\t\t\t#[K] - Temperature\n", + "\n", + "#delta_V_mix = x_1*x_2*(-3.377 - 2.945*x_1 + 3.31*x_1**(2))\n", + "V1 = 18.0684;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n", + "V2 = 40.7221;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n", + "Vol_1 = 1000;\t\t\t#[cm**(3)] - Volume of pure component 1\n", + "Vol_2 = 1000;\t\t\t#[cm**(3)] - Volume of pure component 2\n", + "\n", + "# Calculations\n", + "#Moles of the componenets can be calculated as \n", + "n_1 = round(Vol_1/V1,4);\t\t\t#[mol]\n", + "n_2 = round(Vol_2/V2,4);\t\t\t#[mol]\n", + "\n", + "#Mole fraction of the components \n", + "x_1 = round(n_1/(n_1 + n_2),4);\n", + "x_2 = round(n_2/(n_1 + n_2),4);\n", + "\n", + "delta_V_mix = round(x_1*x_2*(-3.377 - 2.945*x_1 + 3.31*x_1**(2)),4);\t\t\t#[cm**(3)/mol]\n", + "\n", + "#Differentiating the above equation, we get\n", + "#d/dx(delta_V_mix) = (1 - 2*x_1)*(-3.377 - 2.945*x_1 + 3.31*x_1**(2)) + (x_1 - x_1**(2))*(-2.945 + 6.62*x_1)\n", + "del_delta_V_mix = round((1 - 2*x_1)*(-3.377 - 2.945*x_1 + 3.31*x_1**(2)) + (x_1 - x_1**(2))*(-2.945 + 6.62*x_1),4);\t\t\t#[cm**(3)/mol]\n", + "\n", + "#Now calculating the partial molar volumes\n", + "V1_bar = V1 + delta_V_mix + x_2*del_delta_V_mix;\t\t\t#[cm**(3)/mol] \n", + "V2_bar = V2 + delta_V_mix - x_1*del_delta_V_mix;\t\t\t#[cm**(3)/mol]\n", + "\n", + "print del_delta_V_mix, V1_bar, V2_bar\n", + "#Finally molar volume of the solution is given by\n", + "V_sol = x_1*V1_bar + x_2*V2_bar;\t\t\t#[cm**(3)/mol]\n", + "\n", + "# Total volume of the solution is given by\n", + "V_total = (n_1 + n_2)*V_sol;\t\t\t#[cm**(3)]\n", + "\n", + "# Results\n", + "print \"The molar volume of the solution is %.4f cm**3)/mol\"%(V_sol);\n", + "print \"The total volume of the solution is %.2f cm**3)\"%(V_total);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.8248 17.81416104 38.64306104\n", + "The molar volume of the solution is 24.2149 cm**3)/mol\n", + "The total volume of the solution is 1934.82 cm**3)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.3 Page Number : 422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + " \n", + "\n", + "Vol = 20;\t\t\t#[cm**(3)] - Volume of the solution\n", + "T = 22 + 273.15;\t\t\t#[K] - Temperature\n", + "W_bottle = 11.5485;\t\t\t#[g] - Weight of density bottle\n", + "Mol_meth = 32.04;\t\t\t#Molecular weight of methanol\n", + "Mol_water = 18.015;\t\t\t# Molecular weight of water\n", + "\n", + "#Density of pure components can be found out at 0% and 100% of volume percent.\n", + "den_meth = 0.7929;\t\t\t#[cm**(3)/mol] - Density of pure methanol\n", + "den_water = 0.9937;\t\t\t#[cm**(3)/mol] - Density of pure water\n", + "\n", + "\n", + "Vol_perc=[5,10,20,30,40,50,60,70,80,90,95];\t\t\t# Volumes percent of component 1 (methanol)\n", + "W_total=[31.2706,31.1468,30.8907,30.6346,30.3396,30.0053,29.5865,29.1453,28.5978,28.0325,27.7320];\t\t\t# Weight of solution + weight of density bottle\n", + "\n", + "W_sol=zeros(11);\t\t\t# Weight of 20 cm**(3) of solution\n", + "den=zeros(11);\t\t\t# density of the solution\n", + "x1=zeros(11);\t\t\t# Mole fraction of methanol\n", + "x2=zeros(11);\t\t\t# Mole fraction of water\n", + "\n", + "# Calculations\n", + "for i in range(11):\n", + " W_sol[i]=W_total[i]-W_bottle;\n", + " den[i]=W_sol[i]/Vol;\n", + " x1[i]=((Vol_perc[i]*den_meth)/Mol_meth)/(((Vol_perc[i]*den_meth)/Mol_meth)+(((100-Vol_perc[i])*den_water)/Mol_water));\n", + " x2[i]=1-x1[i];\n", + "\n", + "\n", + "#Again we have,\n", + "V_kg=zeros(11);\t\t\t#[cm**(3)] - Volume of 1 kg of solution\n", + "n_mol=zeros(11);\t\t\t#[mol] - Number of moles in 1 kg of solution\n", + "V_mol=zeros(11);\t\t\t#[cm**(3)/mol] - Volume of 1 mol of solution\n", + "x_V=zeros(11);\t\t\t#[cm**(3)/mol] - x_V = x1*V_meth + x2*V_water\n", + "V_mix=zeros(11);\t\t\t#[cm**(3)/mol] - V_mix = V_mol - x1*V_meth - x2*V_water\n", + "del_V=zeros(11);\t\t\t# [cm**(3)/mol] - del_V = V_mix/(x1*x2)\n", + "\n", + "#V_mol = V_meth at x1 = 1 and V_mol = V_water at x1 = 0, therefore\n", + "V_meth = 40.4114;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1 (methanol)\n", + "V_water = 18.1286;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2 (water)\n", + "\n", + "for i in range(11):\n", + " V_kg[i]=1000/den[i];\n", + " n_mol[i]=1000/(x1[i]*Mol_meth+x2[i]*Mol_water);\n", + " V_mol[i]=V_kg[i]/n_mol[i];\n", + " x_V[i]=V_meth*x1[i]+V_water*x2[i];\n", + " V_mix[i]=V_mol[i]-x1[i]*V_meth-x2[i]*V_water;\n", + " del_V[i]=V_mix[i]/(x1[i]*x2[i]);\n", + "\n", + "#Now employing the concept of quadratic regression of the data ( x1 , del_V ) to solve the equation of the type\n", + "#y = a0 + a1*x + a2*x**(2) \n", + "#Here the above equation is in the form of\n", + "#del_V = V_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2) \n", + "\n", + "#From the matrix method to solve simultaneous linear equations, we have\n", + "a = array([[11, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2), sum(x1**3)],[sum(x1**2), sum(x1**3), sum(x1**4)]])\n", + "b = array([sum(del_V),sum(x1*del_V),sum((x1**2)*del_V)])\n", + "\n", + "soln=linalg.solve(a,b);\n", + "a0=soln[0]\n", + "a1=soln[1]\n", + "a2=soln[2]\n", + "\n", + "#del_V = V_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2)\n", + "#V_mix = (a0 + a1*x1 + a2*x1**(2))*(x1*(1 - x1))\n", + "#Solving the above equation for x1,\n", + "def f(x1): \n", + " return (a0+(a1*x1)+(a2*x1**2))*(x1*(1-x1))\n", + "\n", + "#Now differentiating the above equation with respect to x we get\n", + "#d/dx(V_mix) = (-4*a2*x1**3) + (3*(a2-a1)*x1**2) + (2*(a1-a0)*x1)+ a0\n", + "#Again solving it for x1\n", + "def f1(x1): \n", + " return (-4*a2*x1**3)+(3*(a2-a1)*x1**2)+(2*(a1-a0)*x1)+a0\n", + "\n", + "#Now \n", + "\n", + "x1_prime=[0,0.25,0.50,0.75,1.0];\n", + "V_mix_prime=zeros(5);\t\t\t#[cm**(3)/mol] - V_mix = V - x1*V_meth - x2*V_water\n", + "del_V_prime=zeros(5);\t\t\t#[cm**(3)/mol] - del_V = V_mix/(x1*x2)\n", + "V1_bar=zeros(5);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n", + "V2_bar=zeros(5);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n", + "\n", + "# Results\n", + "for j in range(5):\n", + " V_mix_prime[j]=f(x1_prime[j]);\n", + " del_V_prime[j]=f1(x1_prime[j]);\n", + " V1_bar[j]=V_meth+V_mix_prime[j]+(1-x1_prime[j])*del_V_prime[j];\n", + " V2_bar[j]=V_water+V_mix_prime[j]-x1_prime[j]*del_V_prime[j];\n", + " print \"For x1 = %f\"%(x1_prime[j]);\n", + " print \"The partial molar volume of methanol component 1) is %f cm**3)/mol\"%(V1_bar[j])\n", + " print \"The partial molar volume of water component 2) is %f cm**3)/mol\"%(V2_bar[j])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For x1 = 0.000000\n", + "The partial molar volume of methanol component 1) is 37.937941 cm**3)/mol\n", + "The partial molar volume of water component 2) is 18.128600 cm**3)/mol\n", + "For x1 = 0.250000\n", + "The partial molar volume of methanol component 1) is 38.124350 cm**3)/mol\n", + "The partial molar volume of water component 2) is 18.031910 cm**3)/mol\n", + "For x1 = 0.500000\n", + "The partial molar volume of methanol component 1) is 39.496329 cm**3)/mol\n", + "The partial molar volume of water component 2) is 17.177237 cm**3)/mol\n", + "For x1 = 0.750000\n", + "The partial molar volume of methanol component 1) is 40.332855 cm**3)/mol\n", + "The partial molar volume of water component 2) is 15.841550 cm**3)/mol\n", + "For x1 = 1.000000\n", + "The partial molar volume of methanol component 1) is 40.411400 cm**3)/mol\n", + "The partial molar volume of water component 2) is 15.800306 cm**3)/mol\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.4 Page Number : 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from numpy import *\n", + "\n", + "\n", + "# Variables\n", + "T = 20 + 273.15;\t\t\t#[K] - Temperature\n", + "Mol_form = 46.027;\t\t\t#Molecular weight of formic acid\n", + "Mol_water = 18.015;\t\t\t# Molecular weight of water\n", + "\n", + "Wt_perc=[10,18,30,50,72,78];\t\t\t#Weight percent of formic acid\n", + "den=[1.0246,1.0441,1.0729,1.1207,1.1702,1.1818];\t\t\t#[g/cm**(3)] - Density of solution\n", + "\n", + "V_g=zeros(6);\t\t\t#[cm**(3)/g] - Volume of 1 g of solution\n", + "x1=zeros(6);\t\t\t# Mole fraction of component 1\n", + "x2=zeros(6);\t\t\t# Mole fraction of component 2\n", + "n=zeros(6);\t\t\t# Number of moles in 1 g\n", + "V_mol=zeros(6);\t\t\t#[cm**(3)/mol] - Volume of 1 mol of solution\n", + "x_V=zeros(6);\t\t\t#[cm**(3)/mol] - x_V = x1*V_form + x2*V_water\n", + "V_mix=zeros(6);\t\t\t#[cm**(3)/mol] - V_mix = V - x1*V_form - x2*V_water\n", + "del_V=zeros(6);\t\t\t# [cm**(3)/mol] - del_V = V_mix/(x1*x2)\n", + "\n", + "#V_mol = V_form at x1 = 1 and V_mol = V_water at x1 = 0, therefore\n", + "V_form = 37.737;\t\t\t#[cm**(3)/mol] - Molar volume of pure formic acid (component 1)\n", + "V_water = 18.050;\t\t\t#[cm**(3)/mol] - Molar volume of pure water (component 2)\n", + "\n", + "# Calculations\n", + "for i in range(6):\n", + " V_g[i]=1/den[i];\n", + " x1[i]=(Wt_perc[i]/Mol_form)/((Wt_perc[i]/Mol_form)+((100-Wt_perc[i])/Mol_water));\n", + " x2[i]=1-x1[i];\n", + " n[i]=((Wt_perc[i]/100.)/Mol_form)+(((100-Wt_perc[i])/100.)/Mol_water);\n", + " V_mol[i]=V_g[i]/n[i];\n", + " x_V[i]=V_form*x1[i]+V_water*x2[i];\n", + " V_mix[i]=V_mol[i]-x1[i]*V_form-x2[i]*V_water;\n", + " del_V[i]=V_mix[i]/(x1[i]*x2[i]);\n", + "\n", + "\n", + "a = array([[11, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2) ,sum(x1**3)],[sum(x1**2), sum(x1**3) ,sum(x1**4)]])\n", + "b = array([sum(del_V),sum(x1*del_V),sum((x1**2)*del_V)])\n", + "\n", + "soln = linalg.solve(a,b)\n", + "\n", + "a0=soln[0]\n", + "a1=soln[1]\n", + "a2=soln[2]\n", + "\n", + "def f(x1): \n", + "\t return (a0+(a1*x1)+(a2*x1**2))*(x1*(1-x1))\n", + "\n", + "def f1(x1): \n", + "\t return (-4*a2*x1**3)+(3*(a2-a1)*x1**2)+(2*(a1-a0)*x1)+a0\n", + "\n", + "#At 15 Wt% of formic acid, x1 is given by\n", + "x1_prime_1 = round((15/Mol_form)/((15/Mol_form)+((100-15)/Mol_water)),3); \n", + "#Similarly at 75 Wt% of formic acid, x1 is given by\n", + "x1_prime_2 = round((75/Mol_form)/((75/Mol_form)+((100-75)/Mol_water)),4); \n", + "\n", + "Wt_perc_prime=[15,75];\n", + "x1_prime=[x1_prime_1,x1_prime_2];\n", + "V_mix_prime=zeros(2);\t\t\t#[cm**(3)/mol] - V_mix = V - x1*V_meth - x2*V_water\n", + "del_V_prime=zeros(2);\t\t\t#[cm**(3)/mol] - del_V = V_mix/(x1*x2)\n", + "V1_bar=zeros(2);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n", + "V2_bar=zeros(2);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n", + "\n", + "# Results\n", + "for j in range(2):\n", + " V_mix_prime[j]=f(x1_prime[j]);\n", + " del_V_prime[j]=f1(x1_prime[j]);\n", + " V1_bar[j]=V_form+V_mix_prime[j]+(1-x1_prime[j])*del_V_prime[j];\n", + " V2_bar[j]=V_water+V_mix_prime[j]-x1_prime[j]*del_V_prime[j];\n", + " print \"For weight percent of formic acid = %f percent\"%(Wt_perc_prime[j]);\n", + " print \"The partial molar volume of formic acid component 1) is %f cm**3)/mol\"%(V1_bar[j]);\n", + " print \"The partial molar volume of water component 2) is %f cm**3)/mol\"%(V2_bar[j]);\n", + "\n", + "# answers are vary because of rounding error. Please review it manually. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For weight percent of formic acid = 15.000000 percent\n", + "The partial molar volume of formic acid component 1) is 35.429311 cm**3)/mol\n", + "The partial molar volume of water component 2) is 18.102339 cm**3)/mol\n", + "For weight percent of formic acid = 75.000000 percent\n", + "The partial molar volume of formic acid component 1) is 38.853189 cm**3)/mol\n", + "The partial molar volume of water component 2) is 15.646974 cm**3)/mol\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.5 Page Number : 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "# Variables\n", + "T = 40 + 273.15;\t\t\t#[K] - Temperature\n", + "\n", + "x1=array([0.083,0.176,0.268,0.353,0.428,0.720,0.780,0.850,0.900]) \t\t\t# Mole fraction of component 1\n", + "delta_H_mix=array([0.250,0.488,0.670,0.790,0.863,0.775,0.669,0.510,0.362])\t\t\t#[kJ/mol] - Enthalpy of the solution\n", + "\n", + "x2=zeros(9);\t\t\t# Mole fraction of component 2\n", + "del_H=zeros(9);\t\t\t#[kJ/mol] - del_H = delta_H_mix/(x1*x2)\n", + "\n", + "for i in range(9):\n", + " x2[i]=1-x1[i];\n", + " del_H[i]=delta_H_mix[i]/(x1[i]*x2[i]);\n", + "\n", + "\n", + "# Calculations\n", + "#Now employing the concept of quadratic regression of the data ( x1 , del_H ) to solve the equation of the type\n", + "#y = a0 + a1*x + a2*x**(2) \n", + "#Here the above equation is in the form of\n", + "#del_H = delta_H_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2) \n", + "\n", + "#From the matrix method to solve simultaneous linear equations, we have\n", + "a = array([[9, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2), sum(x1**3)],[sum(x1**2), sum(x1**3), sum(x1**4)]])\n", + "b = array([sum(del_H),sum(x1*del_H),sum((x1**2)*del_H)])\n", + "soln= linalg.solve(a,b)\n", + "a0=soln[0]\n", + "a1=soln[1]\n", + "a2=soln[2]\n", + "\n", + "#del_H = delta_H_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2)\n", + "#delta_H_mix = (a0 + a1*x1 + a2*x1**(2))*(x1*(1 - x1))\n", + "#At x1 = 0.25,\n", + "x_1 = 0.25;\t\t\t#[mol]\n", + "delta_H_mix = (a0+(a1*x_1)+(a2*x_1**2))*(x_1*(1-x_1));\t\t\t#[kJ/mol]\n", + "\n", + "#Now differentiating the above equation with respect to x we get\n", + "#d/dx(delta_H_mix) = del_delta_H_mix = (-4*a2*x1**3) + (3*(a2-a1)*x1**2) + (2*(a1-a0)*x1)+ a0\n", + "#Again for x1 = 0.25\n", + "x_1_prime = 0.25;\t\t\t#[mol]\n", + "del_delta_H_mix = (-4*a2*x_1_prime**3)+(3*(a2-a1)*x_1_prime**2)+(2*(a1-a0)*x_1_prime)+a0;\t\t\t#[kJ/mol]\n", + "\n", + "#We have the relation\n", + "# H1_bar - H1 = delta_H_mix + x2*del_delta_H_mix, and\n", + "# H2_bar - H2 = delta_H_mix - x1*del_delta_H_mix\n", + "\n", + "#Let us suppose\n", + "#k_1 = H1_bar - H1 , and\n", + "#k_2 = H2_bar - H2\n", + "\n", + "k_1 = delta_H_mix + (1-x_1_prime)*del_delta_H_mix;\t\t\t#[kJ/mol]\n", + "k_2 = delta_H_mix - x_1_prime*del_delta_H_mix;\t\t\t#[kJ/mol]\n", + "\n", + "# Results\n", + "print \"The value of H1_bar - H1) at x1 = 0.25 is %f kJ/mol\"%(k_1);\n", + "print \"The value of H2_bar - H2) at x1 = 0.25 is %f kJ/mol\"%(k_2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of H1_bar - H1) at x1 = 0.25 is 2.010734 kJ/mol\n", + "The value of H2_bar - H2) at x1 = 0.25 is 0.179079 kJ/mol\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb new file mode 100755 index 00000000..d2334255 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb @@ -0,0 +1,304 @@ +{ + "metadata": { + "name": "ch13_1", + "signature": "sha256:894f18dec91baf4a10867e0d301a68220274d02a1e24c4e2bef1038061daa009" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "\n", + "Chapter 13 : Fugacity of a Component in a Mixture by Equations of State" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.2 Page Number : 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "\n", + "\n", + "# Variables\n", + "T = 310.93;\t\t\t#[K] - Temperature\n", + "P = 2.76*10**(6);\t\t\t#[Pa] - Pressure\n", + "y1 = 0.8942;\t\t\t#[mol] - mole fraction of component 1\n", + "y2 = 1 - y1;\t\t\t#[mol] - mole fraction of component 2\n", + "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "#For component 1 (methane)\n", + "Tc_1 = 190.6;\t\t\t#[K] - Critical temperature\n", + "Pc_1 = 45.99*10**(5);\t\t\t#[N/m**(2)] - Critical pressure\n", + "Vc_1 = 98.6;\t\t\t#[cm**(3)/mol] - Critical molar volume\n", + "Zc_1 = 0.286;\t\t\t# - Critical compressibility factor\n", + "w_1 = 0.012;\t\t\t# - Critical acentric factor\n", + "#Similarly for component 2 (n-Butane)\n", + "Tc_2 = 425.1;\t\t\t#[K]\n", + "Pc_2 = 37.96*10**(5);\t\t\t#[N/m**(2)]\n", + "Vc_2 = 255;\t\t\t#[cm**(3)/mol]\n", + "Zc_2=0.274;\n", + "w_2=0.2;\n", + "\n", + "# Calculations\n", + "#For component 1\n", + "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n", + "#At reduced temperature\n", + "B1_0 = 0.083-(0.422/(Tr_1)**(1.6));\n", + "B1_1 = 0.139-(0.172/(Tr_1)**(4.2));\n", + "#We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "#Similarly for component 2\n", + "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n", + "#At reduced temperature Tr_2,\n", + "B2_0 = 0.083-(0.422/(Tr_2)**(1.6));\n", + "B2_1 = 0.139-(0.172/(Tr_2)**(4.2));\n", + "B_22 = ((B2_0+(w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "#For cross coeffcient\n", + "Tc_12 = (Tc_1*Tc_2)**(1./2);\t\t\t#[K]\n", + "w_12 = (w_1+w_2)/2;\n", + "Zc_12 = (Zc_1+Zc_2)/2;\n", + "Vc_12 = (((Vc_1)**(1./3)+(Vc_2)**(1./3))/2)**(3);\t\t\t#[cm**(3)/mol]\n", + "Vc_12 = Vc_12*10**(-6);\t\t\t#[m**(3)/mol]\n", + "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "\n", + "# Variables, Z = 1 + (B*P)/(R*T)\n", + "#Now we have,(B_12*Pc_12)/(R*Tc_12) = B_0 + (w_12*B_1)\n", + "#where B_0 and B_1 are to be evaluated at Tr_12\n", + "Tr_12 = T/Tc_12;\n", + "#At reduced temperature Tr_12\n", + "B_0 = 0.083-(0.422/(Tr_12)**(1.6));\n", + "B_1 = 0.139-(0.172/(Tr_12)**(4.2));\n", + "B_12 = ((B_0+(w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "#For the mixture\n", + "B = y1**(2)*B_11+2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n", + "\n", + "#Now del_12 can be calculated as,\n", + "del_12 = 2*B_12 - B_11 - B_22;\t\t\t#[m**(3)/mol]\n", + "\n", + "#We have the relation, math.log(phi_1) = (P/(R*T))*(B_11 + y2**(2)*del_12), therefore\n", + "phi_1 = math.exp((P/(R*T))*(B_11 + y2**(2)*del_12));\n", + "#Similarly for component 2\n", + "phi_2 = math.exp((P/(R*T))*(B_22 + y1**(2)*del_12));\n", + "\n", + "# Results\n", + "print \" The value of fugacity coefficient of component 1 phi_1) is %f\"%(phi_1);\n", + "print \" The value of fugacity coefficient of component 2 phi_2) is %f\"%(phi_2);\n", + "\n", + "#Finally fugacity coefficient of the mixture is given by\n", + "#math.log(phi) = y1*math.log(phi_1) + y2*math.log(phi_2);\n", + "phi = math.exp(y1*math.log(phi_1) + y2*math.log(phi_2));\n", + "\n", + "print \" The value of fugacity coefficient of the mixture phi) is %f \"%(phi);\n", + "#The fugacity coefficient of the mixture can also be obtained using\n", + "#math.log(phi) = (B*P)/(R*T)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of fugacity coefficient of component 1 phi_1) is 0.965152\n", + " The value of fugacity coefficient of component 2 phi_2) is 0.675374\n", + " The value of fugacity coefficient of the mixture phi) is 0.929376 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.7 Page Number : 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "T = 460.;\t\t\t#[K] - Temperature\n", + "P = 40.*10**(5);\t\t\t#[Pa] - Pressure\n", + "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "# component 1 = nitrogen\n", + "# component 2 = n-Butane\n", + "y1 = 0.4974;\t\t\t# Mole percent of nitrogen\n", + "y2 = 0.5026;\t\t\t# Mole percent of n-Butane\n", + "Tc_nit = 126.2;\t\t\t#[K]\n", + "Pc_nit = 34.00*10**(5);\t\t\t#[Pa]\n", + "Tc_but = 425.1;\t\t\t#[K]\n", + "Pc_but = 37.96*10**(5);\t\t\t#[Pa]\n", + "\n", + "# (1). van der Walls equation of state\n", + "\n", + "# The fugacity coefficient of component 1 in a binary mixture following van der Walls equation of state is given by,\n", + "# math.log(phi_1) = b_1/(V-b) - math.log(Z-B) -2*(y1*a_11 + y2*a_12)/(R*T*V)\n", + "# and for component 2 is given by,\n", + "# math.log(phi_2) = b_2/(V-b) - math.log(Z-B) -2*(y1*a_12 + y2*a_22)/(R*T*V)\n", + "# Where B = (P*b)/(R*T)\n", + "\n", + "# Calculations\n", + "# For componenet 1 (nitrogen)\n", + "a_1 = (27*R**(2)*Tc_nit**(2))/(64*Pc_nit);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b_1 = (R*Tc_nit)/(8*Pc_nit);\t\t\t#[m**(3)/mol]\n", + "\n", + "# Similarly for componenet 2 (n-Butane)\n", + "a_2 = (27*R**(2)*Tc_but**(2))/(64*Pc_but);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b_2 = (R*Tc_but)/(8*Pc_but);\t\t\t#[m**(3)/mol]\n", + "\n", + "# Here\n", + "a_11 = a_1;\n", + "a_22 = a_2;\n", + "# For cross coefficient\n", + "a_12 = (a_1*a_2)**(1./2);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "\n", + "# For the mixture \n", + "a = y1**(2)*a_11 + y2**(2)*a_22 + 2*y1*y2*a_12;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = y1*b_1 + y2*b_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "# The cubic form of the van der Walls equation of state is given by,\n", + "# V**(3) - (b+(R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "# Substituting the value and solving for V, we get\n", + "# Solving the cubic equation\n", + "def f(V): \n", + " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n", + "V_1=fsolve(f,-1)\n", + "V_2=fsolve(f,0)\n", + "V_3=fsolve(f,1)\n", + "# The molar volume V = V_3, the other two roots are imaginary\n", + "V = V_3;\t\t\t#[m**(3)/mol]\n", + "\n", + "# The comprssibility factor of the mixture is \n", + "Z = (P*V)/(R*T);\n", + "# And B can also be calculated as\n", + "B = (P*b)/(R*T);\n", + "\n", + "# The fugacity coefficient of component 1 in the mixture is\n", + "phi_1 = math.exp(b_1/(V-b) - math.log(Z-B) -2*(y1*a_11 + y2*a_12)/(R*T*V));\n", + "# Similarly fugacity coefficient of component 2 in the mixture is \n", + "phi_2 = math.exp(b_2/(V-b) - math.log(Z-B) -2*(y1*a_12 + y2*a_22)/(R*T*V));\n", + "\n", + "# The fugacity coefficient of the mixture is given by,\n", + "# math.log(phi) = y1*math.log(phi_1) + y2*math.log(phi_2)\n", + "phi = math.exp(y1*math.log(phi_1) + y2*math.log(phi_2));\n", + "\n", + "# Also the fugacity coefficient of the mixture following van der Walls equation of state is given by,\n", + "# math.log(phi) = b/(V-b) - math.log(Z-B) -2*a/(R*T*V)\n", + "phi_dash = math.exp(b/(V-b) - math.log(Z-B) -2*a/(R*T*V));\n", + "# The result is same as obtained above\n", + "\n", + "# Results\n", + "print \" 1van der Walls equation of state\";\n", + "print \" The value of fugacity coefficient of component 1 nitrogen) is %f\"%(phi_1);\n", + "print \" The value of fugacity coefficient of component 2 n-butane) is %f\"%(phi_2);\n", + "print \" The value of fugacity coefficient of the mixture is %f\"%(phi);\n", + "print \" Also the fugacity coefficient of the mixture from van der Walls equation of state is %f which is same as above)\"%(phi_dash);\n", + "\n", + "# (2). Redlich-Kwong equation of state\n", + "\n", + "# For component 1,\n", + "a_1_prime = (0.42748*R**(2)*Tc_nit**(2.5))/Pc_nit;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b_1_prime = (0.08664*R*Tc_nit)/Pc_nit;\t\t\t#[m**(3)/mol]\n", + "\n", + "#similarly for component 2,\n", + "a_2_prime = (0.42748*R**(2)*Tc_but**(2.5))/Pc_but;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b_2_prime = (0.08664*R*Tc_but)/Pc_but;\t\t\t#[m**(3)/mol]\n", + "\n", + "# For cross coefficient\n", + "a_12_prime = (a_1_prime*a_2_prime)**(1./2);\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "# For the mixture\n", + "a_prime = y1**(2)*a_1_prime + y2**(2)*a_2_prime +2*y1*y2*a_12_prime;\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b_prime = y1*b_1_prime +y2*b_2_prime;\t\t\t#[m**(3)/mol]\n", + "\n", + "\n", + "#The cubic form of Redlich Kwong equation of state is given by,\n", + "# V**(3)-((R*T)/P)*V**(2)-((b**(2))+((b*R*T)/P)-(a/(T**(1/2)*P))*V-(a*b)/(T**(1/2)*P)=0\n", + "# Solving the cubic equation\n", + "def f1(V): \n", + " return V**(3)-((R*T)/P)*V**(2)-((b_prime**(2))+((b_prime*R*T)/P)-(a_prime/(T**(1./2)*P)))*V-(a_prime*b_prime)/(T**(1./2)*P)\n", + "V_4=fsolve(f1,1)\n", + "V_5=fsolve(f1,0)\n", + "V_6=fsolve(f1,-1)\n", + "# The molar volume V = V_4, the other two roots are imaginary\n", + "V_prime = V_4;\t\t\t#[m**(3)/mol]\n", + "\n", + "# The compressibility factor of the mixture is\n", + "Z_prime = (P*V_prime)/(R*T);\n", + "# And B can also be calculated as\n", + "B_prime = (P*b_prime)/(R*T);\n", + "\n", + "# The fugacity coefficient of component 1 in the binary mixture is given by\n", + "# math.log(phi_1) = b_1/(V-b) - math.log(Z-B) + ((a*b_1)/((b**(2)*R*T**(3/2))))*(math.log((V+b)/V)-(b/(V+b)))-(2*(y1*a_1+y2*a_12)/(R*T**(3/2)b))*(math.log(V+b)/b)\n", + "\n", + "phi_1_prime = math.exp((b_1_prime/(V_prime-b_prime))-math.log(Z_prime-B_prime)+((a_prime*b_1_prime)/((b_prime**(2))*R*(T**(3./2))))*(math.log((V_prime+b_prime)/V_prime)-(b_prime/(V_prime+b_prime)))-(2*(y1*a_1_prime+y2*a_12_prime)/(R*(T**(3./2))*b_prime))*(math.log((V_prime+b_prime)/V_prime)));\n", + "\n", + "\n", + "# Similarly fugacity coefficient of component 2 in the mixture is \n", + "phi_2_prime = math.exp((b_2_prime/(V_prime-b_prime))-math.log(Z_prime-B_prime)+((a_prime*b_2_prime)/((b_prime**(2))*R*(T**(3./2))))*(math.log((V_prime+b_prime)/V_prime)-(b_prime/(V_prime+b_prime)))-(2*(y1*a_12_prime+y2*a_2_prime)/(R*(T**(3./2))*b_prime))*(math.log((V_prime+b_prime)/V_prime)));\n", + "\n", + "# The fugacity coefficient of the mixture is given by,\n", + "# math.log(phi) = y1*math.log(phi_1) + y2*math.log(phi_2)\n", + "phi_prime = math.exp(y1*math.log(phi_1_prime) + y2*math.log(phi_2_prime));\n", + "\n", + "# Also the fugacity coefficient for the mixture following Redlich-kwong equation of state is also given by\n", + "# math.log(phi) = b/(V-b) - math.log(Z-B) - (a/(R*T**(3/2)))*(1/(V+b)+(1/b)*math.log((V+b)/V))\n", + "phi_prime_dash = math.exp(b_prime/(V_prime-b_prime) - math.log(Z_prime-B_prime) - (a_prime/(R*T**(3./2)))*(1/(V_prime+b_prime)+(1./b_prime)*math.log((V_prime+b_prime)/ V_prime)));\n", + "\n", + "print \" \\nRedlich-Kwong equation of state\";\n", + "print \" The value of fugacity coefficient of component 1 nitrogen) is %f\"%(phi_1_prime);\n", + "print \" The value of fugacity coefficient of component 2 n-butane) is %f\"%(phi_2_prime);\n", + "print \" The value of fugacity coefficient of the mixture is %f\"%(phi_prime);\n", + "print \" Also the fugacity coefficient for the mixture from Redlich-kwong equation of state is %f which is same as above)\"%(phi_prime_dash);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1van der Walls equation of state\n", + " The value of fugacity coefficient of component 1 nitrogen) is 1.057500\n", + " The value of fugacity coefficient of component 2 n-butane) is 0.801865\n", + " The value of fugacity coefficient of the mixture is 0.920192\n", + " Also the fugacity coefficient of the mixture from van der Walls equation of state is 0.920192 which is same as above)\n", + " \n", + "Redlich-Kwong equation of state\n", + " The value of fugacity coefficient of component 1 nitrogen) is 1.071129\n", + " The value of fugacity coefficient of component 2 n-butane) is 0.793063\n", + " The value of fugacity coefficient of the mixture is 0.920948\n", + " Also the fugacity coefficient for the mixture from Redlich-kwong equation of state is 0.920948 which is same as above)\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb new file mode 100755 index 00000000..6e9336a9 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb @@ -0,0 +1,715 @@ +{ + "metadata": { + "name": "ch14_1", + "signature": "sha256:98f2e1e0f1c561d3ee302fd629093b7572c8b263613f73036059e7020f90d8cc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Activity Coefficients Models for Liquid Mixtures" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.4 Page Number : 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables,\n", + "T = 300;\t\t\t#[K] - Temperature\n", + "b = 100;\t\t\t#[cal/mol]\n", + "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n", + "# R*T*math.log(Y_1) = b*x_2**(2)\n", + "# R*T*math.log(Y_2) = b*x_1**(2)\n", + "\n", + "#For equimolar mixture\n", + "x_1 = 0.5;\t\t\t#Mole fraction of component 1\n", + "x_2 = 0.5;\t\t\t#Mole fraction of component 2\n", + "\n", + "# Calculations and Results\n", + "#The excess Gibbs free energy is given by\n", + "# G_excess = R*T*(x_1*math.log(Y_1) + x_2*math.log(Y_2)) = b*x_1*x_2**(2) + b*x_2*x_1**(2) = b*x_1*(x_1 + x_2) = b*x_1*x_2\n", + "G_excess = b*x_1*x_2;\t\t\t#[cal/mol]\n", + "\n", + "#The ideal Gibbs free energy change of mixing is given by,\n", + "delta_G_id_mix = R*T*(x_1*math.log(x_1)+x_2*math.log(x_2));\t\t\t#[cal/mol]\n", + "\n", + "#The Gibbs free energy of mixing is given by\n", + "delta_G_mix = delta_G_id_mix + G_excess;\t\t\t#[cal/mol]\n", + "\n", + "\n", + "# delta_S_mix = delta_S_id_mix = - R*sum(x_i*math.log(x_i))\n", + "\n", + "#delta_G_mix = delta_H_mix - T*delta_S_mix = delta_H_mix + R*T*(x_1*math.log(x_1)+x_2*math.log(x_2))\n", + "delta_H_mix = b*x_1*x_2;\t\t\t#[cal/mol]\n", + "\n", + "print \"The value of Gibbs free energy change for equimolar mixture formation is %f cal/mol\"%(delta_G_mix);\n", + "print \"The value of enthalpy change for equimolar mixture formation is %f cal/mol\"%(delta_H_mix);\n", + "\n", + "#Work required for separation of mixture into pure components is\n", + "W = delta_G_mix;\n", + "print \"The least amount of work required for separation at 300 K is %f cal/mol\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Gibbs free energy change for equimolar mixture formation is -388.185034 cal/mol\n", + "The value of enthalpy change for equimolar mixture formation is 25.000000 cal/mol\n", + "The least amount of work required for separation at 300 K is -388.185034 cal/mol\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.10 Page Number : 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "from numpy import zeros\n", + "from scipy.stats import linregress\n", + "\n", + "# Variables,\n", + "T = 25 +173.15;\t\t\t#[K] - Temperature\n", + "x_1=[0.0115,0.0160,0.0250,0.0300,0.0575,0.1125,0.1775,0.2330,0.4235,0.5760,0.6605,0.7390,0.8605,0.9250,0.9625];\n", + "y_1=[8.0640,7.6260,7.2780,7.2370,5.9770,4.5434,3.4019,2.8023,1.7694,1.3780,1.2302,1.1372,1.0478,1.0145,1.0070];\n", + "y_2=[1.0037,1.0099,1.0102,1.0047,1.0203,1.0399,1.1051,1.1695,1.4462,1.8520,2.2334,2.6886,3.7489,4.8960,5.6040];\n", + "\n", + "x_2 = zeros(15);\t\t\t# x_2 = (1 - x_1)\n", + "G_RT = zeros(15);\t\t\t# G_RT = G_excess/(R*T)\n", + "x1x2_G_RT = zeros(15);\t\t\t# x1x2_G_RT = (x_1*x_2/(G_excess/(R*T)))\n", + "G_RTx1x2 = zeros(15);\t\t\t# G_RTx1x1 = G_excess/(R*T*x_1*x_2)\n", + "\n", + "# Calculations and Results\n", + "for i in range(15):\n", + " x_2[i]=(1-x_1[i]);\n", + " G_RT[i]=(x_1[i]*math.log(y_1[i]))+(x_2[i]*math.log(y_2[i]));\n", + " x1x2_G_RT[i]=(x_1[i]*x_2[i])/G_RT[i];\n", + " G_RTx1x2[i]=1/x1x2_G_RT[i];\n", + "\n", + "\n", + "slop,intr,sig,d,e=linregress(x_1,x1x2_G_RT);\n", + "\n", + "A = 1/intr;\n", + "B = 1/(slop+(1/A));\n", + "print \" The value of van Laar parameters are A = %f and B = %f\"%(A,B);\n", + "\n", + "# Now from Margules equation\n", + "# G_RTx1x2 = G_excess/(R*T*x_1*x_2) = B1*x_1 + A1*x_1 = A1 + (B1 - A1)*x_1\n", + "#slope = (B1 - A1) and intercept = A1\n", + "\n", + "# Again employing the concept of linear regression of the data ( x_1 , G_RTx1x2 ) to find the value of intercept and slope of the above equation\n", + "#Let slope = slop1 and intercept = intr1\n", + "\n", + "slop1,intr1,sig1,d,e=linregress(x_1,G_RTx1x2);\n", + "\n", + "A1 = intr1;\n", + "B1 = slop1 + A1;\n", + "print \" The value of Margules parameters are A = %f and B = %f\"%(A1,B1);\n", + "\n", + "print \" Because of the higher value of correlation factor for Van Laar model it fits the data better.\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of van Laar parameters are A = 2.271326 and B = 1.781420\n", + " The value of Margules parameters are A = 2.293274 and B = 1.746000\n", + " Because of the higher value of correlation factor for Van Laar model it fits the data better.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.11 Page Number : 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables,\n", + "T = 60 + 273.15;\t\t\t#[K] - Temperature\n", + "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n", + "#component 1 = acetone\n", + "#component 2 = water\n", + "x_1 = 0.3;\t\t\t# Mole fraction of component 1\n", + "x_2 = 1 - x_1;\t\t\t#Mole fraction of component 2\n", + "V_mol_1 = 74.05;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n", + "V_mol_2 = 18.07;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n", + "\n", + "#for Wilson equation\n", + "a_12 = 291.27;\t\t\t#[cal/mol]\n", + "a_21 = 1448.01;\t\t\t#[cal/mol]\n", + "\n", + "#For NRTL\n", + "b_12 = 631.05;\t\t\t#[cal/mol]\n", + "b_21 = 1197.41;\t\t\t#[cal/mol]\n", + "alpha = 0.5343;\n", + "\n", + "# Calculations and Results\n", + "#Froom wilson equation\n", + "A_12=(V_mol_2/V_mol_1)*(math.exp(-a_12/(R*T)));\n", + "A_21 = (V_mol_1/V_mol_2)*(math.exp(-a_21/(R*T)));\n", + "Beta = A_12/(x_1+x_2*A_12) - A_21/(x_2+x_1*A_21);\n", + "#math.log(Y1) = -math.log(x_1 + x_2*A_12) + x_2*Beta; \n", + "Y1 = math.exp(-math.log(x_1+x_2*A_12)+x_2*Beta);\n", + "#similarly for Y2\n", + "Y2 = math.exp(-math.log(x_2+x_1*A_21)-x_1*Beta);\n", + "print \"The value of activity coefficients for Wilson equation are Y1 = %f \\t and \\t Y2 = %f\"%(Y1,Y2);\n", + "\n", + "#From NRTL equation,\n", + "t_12 = b_12/(R*T);\n", + "t_21 = b_21/(R*T);\n", + "G_12 = math.exp(-alpha*t_12);\n", + "G_21 = math.exp(-alpha*t_21);\n", + "\n", + "#math.log(Y1) = x_1**(2)*[t_12*(G_12/(x_1+x_2*G_12))**(2) + (G_12*t_12)/((G_12/(x_1+x_2*G_12))**(2))]\n", + "Y1_prime = math.exp(x_2**(2)*(t_21*(G_21/(x_1+x_2*G_21))**(2)+(G_12*t_12)/(((x_2+x_1*G_12))**(2))));\n", + "#Similarly for Y2\n", + "Y2_prime = math.exp(x_1**(2)*(t_12*(G_12/(x_2+x_1*G_12))**(2)+(G_21*t_21)/(((x_1+x_2*G_21))**(2))));\n", + "\n", + "print \"The value of activity coefficients for NRTL equation are Y1 = %f \\t and \\t Y2 = %f\"%(Y1_prime,Y2_prime);\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of activity coefficients for Wilson equation are Y1 = 2.172258 \t and \t Y2 = 1.254121\n", + "The value of activity coefficients for NRTL equation are Y1 = 2.143030 \t and \t Y2 = 1.262506\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.12 Page Number : 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables \n", + "T = 307;\t\t\t#[K]\n", + "x_1 = 0.047;\n", + "x_2 = 1 - x_1;\n", + "\n", + "# The subgroups in the two components are\n", + "# Acetone (1) : 1 CH3, 1 CH3CO\n", + "# n-pentane (2) : 2 CH3, 3 CH2\n", + "\n", + "#Group volume (Rk) and surface area (Qk) parameters of the subgroup are\n", + "k_CH3 = 1;\n", + "k_CH2 = 2;\n", + "k_CH3CO = 19;\n", + "Rk_CH3 = 0.9011;\n", + "Rk_CH2 = 0.6744;\n", + "Rk_CH3CO = 1.6724;\n", + "Qk_CH3 = 0.848;\n", + "Qk_CH2 = 0.540;\n", + "Qk_CH3CO = 1.4880;\n", + "\n", + "# Interaction parameters of the subgroups in kelvin (K) are\n", + "a_1_1 = 0;\n", + "a_1_2 = 0;\n", + "a_1_19 = 476.40;\n", + "a_2_1 = 0;\n", + "a_2_2 = 0;\n", + "a_2_19 = 476.40;\n", + "a_19_1 = 26.76;\n", + "a_19_2 = 26.76;\n", + "a_19_19 = 0;\n", + "\n", + "# Calculations\n", + "r_1 = 1*Rk_CH3 + 1*Rk_CH3CO;\n", + "r_2 = 2*Rk_CH3 + 3*Rk_CH2;\n", + "q_1 = 1*Qk_CH3 + 1*Qk_CH3CO;\n", + "q_2 = 2*Qk_CH3 + 3*Qk_CH2;\n", + "\n", + "J_1 = r_1/(r_1*x_1+r_2*x_2);\n", + "J_2 = r_2/(r_1*x_1+r_2*x_2);\n", + "L_1 = q_1/(q_1*x_1+q_2*x_2);\n", + "L_2 = q_2/(q_1*x_1+q_2*x_2);\n", + "t_1_1 = math.exp(-a_1_1/T);\n", + "t_1_2 = math.exp(-a_1_2/T);\n", + "t_1_19 = math.exp(-a_1_19/T);\n", + "t_2_1 = math.exp(-a_2_1/T);\n", + "t_2_2 = math.exp(-a_2_2/T);\n", + "t_2_19 = math.exp(-a_2_19/T);\n", + "t_19_1 = math.exp(-a_19_1/T);\n", + "t_19_2 = math.exp(-a_19_2/T);\n", + "t_19_19 = math.exp(-a_19_19/T);\n", + "\n", + "e_1_1 = 1*Qk_CH3/q_1;\n", + "e_2_1 = 0;\n", + "e_19_1 = (1*Qk_CH3CO/q_1);\n", + "e_1_2 = 2*Qk_CH3/q_2;\n", + "e_2_2 = 3*Qk_CH2/q_2;\n", + "e_19_2 = 0;\n", + "\n", + "B_1_1 = e_1_1*t_1_1 + e_2_1*t_2_1 + e_19_1*t_19_1;\n", + "B_1_2 = e_1_1*t_1_2 + e_2_1*t_2_2 + e_19_1*t_19_2;\n", + "B_1_19 = e_1_1*t_1_19 + e_2_1*t_2_19 + e_19_1*t_19_19;\n", + "B_2_1 = e_1_2*t_1_1 + e_2_2*t_2_1 + e_19_2*t_19_1;\n", + "B_2_2 = e_1_2*t_1_2 + e_2_2*t_2_2 + e_19_2*t_19_2;\n", + "B_2_19 = e_1_2*t_1_19 + e_2_2*t_2_19 + e_19_2*t_19_19;\n", + "\n", + "theta_1 = (x_1*q_1*e_1_1 + x_2*q_2*e_1_2)/(x_1*q_1 + x_2*q_2);\n", + "theta_2 = (x_1*q_1*e_2_1 + x_2*q_2*e_2_2)/(x_1*q_1 + x_2*q_2);\n", + "theta_19 = (x_1*q_1*e_19_1 + x_2*q_2*e_19_2)/(x_1*q_1 + x_2*q_2);\n", + "\n", + "s_1 = theta_1*t_1_1 + theta_2*t_2_1 + theta_19*t_19_1;\n", + "s_2 = theta_1*t_1_2 + theta_2*t_2_2 + theta_19*t_19_2;\n", + "s_19 = theta_1*t_1_19 + theta_2*t_2_19 + theta_19*t_19_19;\n", + "\n", + "# math.log(Y1_C) = 1 - J_1 + math.log(J_1) - 5*q_1*(1- (J_1/L_1) + math.log(J_1/L_1))\n", + "# math.log(Y2_C) = 1 - J_2 + math.log(J_2) - 5*q_2*(1- (J_2/L_2) + math.log(J_2/L_2))\n", + "Y1_C = math.exp(1 - J_1 + math.log(J_1) - 5*q_1*(1- (J_1/L_1) + math.log(J_1/L_1)));\n", + "Y2_C = math.exp(1 - J_2 + math.log(J_2) - 5*q_2*(1- (J_2/L_2) + math.log(J_2/L_2)));\n", + "\n", + "# For species 1\n", + "summation_theta_k_1 = theta_1*(B_1_1/s_1) + theta_2*(B_1_2/s_2) + theta_19*(B_1_19/s_19);\n", + "summation_e_ki_1 = e_1_1*math.log(B_1_1/s_1) + e_2_1*math.log(B_1_2/s_2) + e_19_1*math.log(B_1_19/s_19);\n", + "\n", + "# For species 2\n", + "summation_theta_k_2 = theta_1*(B_2_1/s_1) + theta_2*(B_2_2/s_2) + theta_19*(B_2_19/s_19);\n", + "summation_e_ki_2 = e_1_2*math.log(B_2_1/s_1) + e_2_2*math.log(B_2_2/s_2) + e_19_2*math.log(B_2_19/s_19);\n", + "\n", + "# math.log(Y1_R) = q_1(1 - summation_theta_k_1 + summation_e_ki_1)\n", + "# math.log(Y2_R) = q_2(1 - summation_theta_k_2 + summation_e_ki_2)\n", + "Y1_R = math.exp(q_1*(1 - summation_theta_k_1 + summation_e_ki_1));\n", + "Y2_R = math.exp(q_2*(1 - summation_theta_k_2 + summation_e_ki_2));\n", + "\n", + "# math.log(Y1) = math.log(Y1_C) + math.log(Y1_R)\n", + "# math.log(Y2) = math.log(Y2_C) + math.log(Y2_R)\n", + "Y1 = math.exp(math.log(Y1_C) + math.log(Y1_R));\n", + "Y2 = math.exp(math.log(Y2_C) + math.log(Y2_R));\n", + "\n", + "# Results\n", + "print \" The activity coefficients are Y1 = %f and Y2 = %f\"%(Y1,Y2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The activity coefficients are Y1 = 4.992034 and Y2 = 1.005260\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.13 Page Number : 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables,\n", + "T = 25 + 273.15;\t\t\t#[K] - Temperature\n", + "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n", + "#component 1 = chloroform\n", + "#component 2 = carbon tetrachloride\n", + "x_1 = 0.5;\t\t\t#Mole fraction of component 1 \t\t\t#Equimolar mixture\n", + "x_2 = 0.5;\t\t\t#Mole fraction of component 2\n", + "V_mol_1 = 81;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n", + "V_mol_2 = 97;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n", + "del_1 = 9.2;\t\t\t#[(cal/cm**(3))**(1/2)] - Mole fraction of component 1\n", + "del_2 = 8.6;\t\t\t#[(cal/cm**(3))**(1/2)] - Mole fraction of component 2\n", + "\n", + "# Calculations\n", + "#Scatchard - Hilderbrand model\n", + "phi_1 = (x_1*V_mol_1)/(x_1*V_mol_1+x_2*V_mol_2);\n", + "phi_2 = (x_2*V_mol_2)/(x_1*V_mol_1+x_2*V_mol_2);\n", + "\n", + "#math.log(Y1) = (V_mol_1/(R*T))*phi_1**(2)*(del_1-del_2)**(2)\n", + "Y1 = math.exp((V_mol_1/(R*T))*(phi_1**(2))*((del_1-del_2)**(2)));\n", + "\n", + "#Similarly, for Y2\n", + "Y2 = math.exp((V_mol_2/(R*T))*(phi_2**(2))*((del_1-del_2)**(2)));\n", + "\n", + "# Results\n", + "print \"The value of activity coefficients for Scatchard-Hilderbrand model are Y1 = %f \\t and \\t Y2 = %f\"%(Y1,Y2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of activity coefficients for Scatchard-Hilderbrand model are Y1 = 1.010245 \t and \t Y2 = 1.017658\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.14 Page Number : 485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables,\n", + "T = 25 + 273.15;\t\t\t#[K] - Temperature\n", + "mol_HCl = 0.001;\t\t\t#[mol/kg] - Molality of HCl\n", + "A = 0.510;\t\t\t#[(kg/mol)**(1/2)]\n", + "Z_positive = 1;\t\t\t#Stoichiometric coefficient of 'H' ion\n", + "Z_negative = -1;\t\t\t#Stoichiometric coefficient of 'Cl' ion\n", + "m_H_positive = mol_HCl;\t\t\t#\n", + "m_Cl_negative = mol_HCl;\n", + "\n", + "# Calculations and Results\n", + "# I = 1/2*[((Z_positive)**(2))*m_H_positive + ((Z_negative)**(2))*m_Cl_negative]\n", + "I = 1./2*(((Z_positive)**(2))*m_H_positive + ((Z_negative)**(2))*m_Cl_negative);\n", + "\n", + "#Using Debye-Huckel limiting law wee get,\n", + "# math.log(Y1) = -A*(abs(Z_positive*Z_negative))*(I**(1/2)))\n", + "Y = 10**(-A*(abs(Z_positive*Z_negative))*(I**(1./2)));\n", + "print \"The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = %f\"%(Y);\n", + "\n", + "#Using Debye-Huckel extended model we get\n", + "#math.log(Y_prime) = (-A*(abs(Z_positive*Z_negative))*(I**(1/2)))/(1 + (I**(1/2)));\n", + "Y_prime = 10**((-A*(abs(Z_positive*Z_negative))*(I**(1./2)))/(1 + (I**(1./2))));\n", + "print \"The mean activity coefficient at 25 C using Debye-Huckel extended model is Y = %f\"%(Y_prime);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = 0.963546\n", + "The mean activity coefficient at 25 C using Debye-Huckel extended model is Y = 0.964643\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.15 Page Number : 485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables,\n", + "T = 25 + 273.15;\t\t\t#[K] - Temperature\n", + "mol_CaCl2 = 0.001;\t\t\t#[mol/kg] - Molality of HCl\n", + "A = 0.510;\t\t\t#[(kg/mol)**(1/2)]\n", + "Z_positive = 2;\t\t\t#Stoichiometric coefficient of 'Ca' ion\n", + "Z_negative = -1;\t\t\t#Stoichiometric coefficient of 'Cl' ion\n", + "m_Ca_positive = mol_CaCl2;\n", + "m_Cl_negative = 2*mol_CaCl2;\n", + "\n", + "# Calculations\n", + "# I = 1/2*[((Z_positive)**(2))*m_Ca_positive + ((Z_negative)**(2))*m_Cl_negative]\n", + "I = 1./2*(((Z_positive)**(2))*m_Ca_positive + ((Z_negative)**(2))*m_Cl_negative);\n", + "\n", + "#Using Debye-Huckel limiting law wee get,\n", + "# math.log(Y1) = -A*(abs(Z_positive*Z_negative))*(I**(1/2)))\n", + "Y = 10**(-A*(abs(Z_positive*Z_negative))*(I**(1./2)));\n", + "\n", + "# Results\n", + "print \"The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = %f\"%(Y);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = 0.879290\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.17 Page Number : 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables,\n", + "T = 50 + 273.15;\t\t\t#[K] - Temperature\n", + "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "x_1 = 0.3;\t\t\t# Mole fraction of component 1\n", + "x_2 = (1-x_1);\t\t\t# Mole fraction of component 2\n", + "#Increment of 1% means Y2 = 1.01*Y1\n", + "\n", + "# Calculations\n", + "#Excess volume of the mixture is given by,\n", + "V_excess = 4*x_1*x_2;\t\t\t#[cm**(3)/mol]\n", + "#Amd threfore\n", + "V_1_excess = 4*x_2*x_2*10**(-6);\t\t\t#[m**(3)/mol] - Exces volume of component 1\n", + "V_2_excess = 4*x_1*x_1*10**(-6);\t\t\t#[m**(3)/mol] - Exces volume of component 2\n", + "\n", + "#We have from equation 14.89 of the book,\n", + "#V_i_excess/(R*T) = (del_math.log(Y_i)/del_P)_T,x\n", + "\n", + "#Rearranging above equation\n", + "#d(math.log(Y1)) = (V1_excess/(R*T))dP\n", + "#Integrating the above equation at constant 'T' and 'x' in the limit from 'Y1' to '1.01*Y1' in the LHS and from 'P' to 'P+delta_P' in the RHS\n", + "#On simplification we get\n", + "#math.log(1.01*Y1/Y1) = (V_1_exces/(R*T))*delta_P\n", + "delta_P = math.log(1.01)/(V_1_excess/(R*T));\t\t\t#[N/m**(2)]\n", + "delta_P = delta_P*10**(-6);\t\t\t#[MPa]\n", + "\n", + "# Results\n", + "print \"The required pressure to increase the activity coefficient by 1%% is %f MPa\"%(delta_P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required pressure to increase the activity coefficient by 1% is 13.639411 MPa\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.21 Page Number : 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 293.15;\t\t\t#[K] - Temperature\n", + "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "A = 1280;\t\t\t#[J/mol]\n", + "\n", + "#(dA/dT)_P,x = del_A (say)\n", + "dA_dT = -7.0;\t\t\t#[J/mol-K]\n", + "\n", + "#For equilomar mixture,\n", + "x_1 = 0.5;\t\t\t# Mole fraction of component 1\n", + "x_2 = 0.5;\t\t\t# Mole fraction of component 2\n", + "\n", + "# Calculations\n", + "#math.log(Y1) = (A/(R*T))*x_2**(2)\n", + "#math.log(Y2) = (A/(R*T))*x_1**(2)\n", + "Y1 = math.exp((A/(R*T))*x_2**(2));\n", + "Y2 = math.exp((A/(R*T))*x_1**(2));\n", + "\n", + "#G_excess/(R*T*) = x_1*math.log(Y1) + x_2*math.log(Y2) = (A/(R*T))*x_1*x_2\n", + "G_excess = A*x_1*x_2;\t\t\t#[J/mol] - Excess Gibbs free energy\n", + "\n", + "#H_excess/(R*T**(2)) = -[d/dT(G_excess/(R*T))]_P,x\n", + "#H_excess/(R*T**(2)) = -((x_1*x_2)/R)*[d/dT(A/T)]_P,x\n", + "#On simplification and putting the values we get\n", + "H_excess = A*x_1*x_2 - T*dA_dT*x_1*x_2;\t\t\t#[J/mol] - Excess enthalpy\n", + "\n", + "#Now excess entropy is given by\n", + "S_excess = (H_excess - G_excess)/T;\t\t\t#[J/mol-K] - Excess entropy\n", + "\n", + "# Results\n", + "print \"For equimolar mixture\";\n", + "print \"Excess Gibbs free energy G_excess) is %f J/mol\"%(G_excess);\n", + "print \"Excess enthalpy H_excess) is %f J/mol\"%(H_excess);\n", + "print \"Excess entropy S_excess) is %f J/mol\"%(S_excess);\n", + "print \"The value of activity coefficient Y1 is %f\"%(Y1);\n", + "print \"The value of activity coefficient Y2 is %f\"%(Y2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For equimolar mixture\n", + "Excess Gibbs free energy G_excess) is 320.000000 J/mol\n", + "Excess enthalpy H_excess) is 833.012500 J/mol\n", + "Excess entropy S_excess) is 1.750000 J/mol\n", + "The value of activity coefficient Y1 is 1.140305\n", + "The value of activity coefficient Y2 is 1.140305\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.22 Page Number : 491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Given\n", + "T = 60 + 273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# math.log(Y1_inf) = math.log(Y2_inf) = 0.15 + 10/T\n", + "\n", + "\n", + "# From van L# Variablesr equation \n", + "# A = math.log(Y1_inf) and B = math.log(Y2_inf) and since it is given that math.log(Y1_inf) = math.log(Y2_inf), therefore A = B\n", + "#(x_1*x_2)/(G_excess/R*T) = x_1/B + x_2/A = X_1/A + x_2/A = 1/A\n", + "# G_excess/(R*T) = A*x_1*x_2\n", + "\n", + "# For equilomar mixture,\n", + "x_1 = 0.5;\t\t\t# Mole fraction of component 1\n", + "x_2 = 0.5;\t\t\t# Mole fraction of component 2\n", + "\n", + "# Calculations and Results\n", + "# Expression for A can be written as\n", + "# A = 0.15 + 10/T, where T is in C. Therefore\n", + "A = 0.15 + 10/(T - 273.15);\n", + "# Differentiating it with respect to temprature we get\n", + "dA_dT = - 10/((T-273.15)**(2));\n", + "\n", + "# The excess Gibbs free energy can be calculated as\n", + "G_excess = A*x_1*x_2*(R*T);\t\t\t#[J/mol]\n", + "\n", + "# The ideal Gibbs free energy change can be calculated as\n", + "delta_G_id_mix = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2));\t\t\t#[J/mol]\n", + "\n", + "# Finally we have,\n", + "delta_G_mix = G_excess + delta_G_id_mix;\t\t\t#[J/mol]\n", + "\n", + "print \"The Gibbs free energy change of mixing for equimolar mixture is %f J/mol\"%(delta_G_mix);\n", + "\n", + "\n", + "# Now let us determine the excess enthalpy. We know that\n", + "# H_excess/(R*T**(2)) = -[d/dT(G_excess/R*T)]_P,x = - x_1*x_2*[d/dT(A)]_P,x\n", + "# Therefore at 'T' = 60 C the excess enthalpy is given by\n", + "H_excess = -R*(T**(2))*x_1*x_2*dA_dT;\t\t\t#[J/mol]\n", + "\n", + "delta_H_id_mix = 0;\t\t\t#[J/mol] - Enthalpy change of mixing for ideal solution is zero.\n", + "\n", + "#Thus enthalpy change of mixing for an equimolar mixture at 333.15 K is given by\n", + "delta_H_mix = delta_H_id_mix + H_excess;\t\t\t#[J/mol]\n", + "\n", + "\n", + "print \"The enthalpy change of mixing for equimolar mixture is %f J/mol\"%(delta_H_mix);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Gibbs free energy change of mixing for equimolar mixture is -1700.608815 J/mol\n", + "The enthalpy change of mixing for equimolar mixture is 640.806876 J/mol\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb new file mode 100755 index 00000000..83aaf521 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb @@ -0,0 +1,2056 @@ +{ + "metadata": { + "name": "ch15_1", + "signature": "sha256:aa6f699613cdf9bcba2dda4617212630ca1760d21939d5cd99d17e7e03b7e885" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Vapour Liquid Equilibrium" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.1 Page Number : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 90+ 273.15;\t\t\t#[K] - Temperature\n", + "P = 1;\t\t\t#[atm] - Pressure\n", + "x_1 = 0.5748;\t\t\t# Equilibrium composition of liquid phase\n", + "y_1 = 0.7725;\t\t\t# Equilibrium composition of vapour phase\n", + "\n", + "\t\t\t# We start with 1 mol of mixture of composition z_1 = 0.6, from marterial balance we get\n", + "\t\t\t# (L + V)*z_1 = L*x_1 + V*y_1\n", + "\t\t\t# Since total number of moles is 1, we get\n", + "\t\t\t# z_1 = L*x_1 + (1-L)*y_1\n", + "\n", + "# Calculations and Results\n", + "z_1_1 = 0.6;\t\t\t# - Mole fraction of benzene\n", + "L_1 = (z_1_1 - y_1)/(x_1 - y_1);\n", + "V_1 = 1 - L_1;\n", + "\n", + "print \" For z_1 = 0.6\";\n", + "print \" The moles in the liquid phase is %f mol\"%(L_1);\n", + "print \" The moles in the vapour phase is %f mol\"%(V_1);\n", + "\n", + "z_1_2 = 0.7;\t\t\t# - Mole fraction of benzene\n", + "L_2 = (z_1_2 - y_1)/(x_1 - y_1);\n", + "V_2 = 1 - L_2;\n", + "\n", + "print \" For z_1 = 0.7\";\n", + "print \" The moles in the liquid phase is %f mol\"%(L_2);\n", + "print \" The moles in the vapour phase is %f mol\"%(V_2);\n", + "\n", + "\n", + "\t\t\t# For z = 0.8\n", + "\t\t\t# The feed remains vapour and the liquid is not formed at all as it is outside the two-phase region (x_1 = 0.5748 and y_1 = 0.7725).\n", + "print \" For z_1 = 0.8\";\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " For z_1 = 0.6\n", + " The moles in the liquid phase is 0.872534 mol\n", + " The moles in the vapour phase is 0.127466 mol\n", + " For z_1 = 0.7\n", + " The moles in the liquid phase is 0.366717 mol\n", + " The moles in the vapour phase is 0.633283 mol\n", + " For z_1 = 0.8\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.2 Page Number : 515" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "\t\t\t# math.log(P_1_sat) = 14.39155 - 2795.817/(t + 230.002)\n", + "\t\t\t# math.log(P_2_sat) = 16.26205 - 3799.887/(t + 226.346)\n", + "\n", + "\t\t\t#(a)\n", + "x_1_a =0.43;\t\t\t# Equilibrium composition of liquid phase\n", + "t_a = 76;\t\t\t#[C] - Temperature\n", + "x_2_a = 1 - x_1_a;\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Since liquid phase composition is given we use the relation \n", + "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat\n", + "\t\t\t# At t = 76 C\n", + "P_1_sat_a = math.exp(14.39155 - 2795.817/(t_a + 230.002));\n", + "P_2_sat_a = math.exp(16.26205 - 3799.887/(t_a + 226.346));\n", + "\t\t\t# Therefore total pressure is\n", + "P_a = x_1_a*P_1_sat_a + x_2_a*P_2_sat_a;\t\t\t#[kPa]\n", + "y_1_a = (x_1_a*P_1_sat_a)/(P_a);\n", + "y_2_a = (x_2_a*P_2_sat_a)/(P_a);\n", + "\n", + "print \"a).The system pressure is = %f kPa\"%(P_a);\n", + "print \" The vapour phase composition is y_1 = %f\"%(y_1_a);\n", + "\n", + "\t\t\t#(b)\n", + "y_1_b = 0.43;\t\t\t# Equilibrium composition of vapour phase\n", + "y_2_b = 1 - y_1_b;\n", + "t_b = 76;\t\t\t#[C] - Temperature\n", + "\n", + "P_1_sat_b = math.exp(14.39155 - 2795.817/(t_b + 230.002));\n", + "P_2_sat_b = math.exp(16.26205 - 3799.887/(t_b + 226.346));\n", + "\n", + "\t\t\t# Since vapour phase composition is given ,the system pressure is given by\n", + "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n", + "P_b = 1/(y_1_b/P_1_sat_b + y_2_b/P_2_sat_b);\n", + "\n", + "x_1_b = (y_1_b*P_b)/P_1_sat_b;\n", + "x_2_b = (y_2_b*P_b)/P_2_sat_b;\n", + "\n", + "print \"b).The system pressure is P = %f kPa\"%(P_b);\n", + "print \" The liquid phase composition is x_1 = %f\"%(x_1_b);\n", + "\n", + "\t\t\t#(c)\n", + "x_1_c = 0.32;\t\t\t# Equilibrium composition of liquid phase\n", + "x_2_c = 1 - x_1_c;\n", + "P_c = 101.33;\t\t\t#[kPa] - Pressure of the system\n", + "\n", + "\t\t\t# We have, P = x_1*P_1_sat + x_2*P_2_sat\n", + "t_1_sat = 2795.817/(14.39155 - math.log(P_c)) - 230.002;\n", + "t_2_sat = 3799.887/(16.26205 - math.log(P_c)) - 226.346;\n", + "t = x_1_c*t_1_sat + x_2_c*t_2_sat;\n", + "\n", + "error = 10;\n", + "while(error>0.1):\n", + " P_1_sat = math.exp(14.39155 - 2795.817/(t + 230.002));\n", + " P_2_sat = math.exp(16.26205 - 3799.887/(t + 226.346));\n", + " P = x_1_c*P_1_sat + x_2_c*P_2_sat;\n", + " error=abs(P - P_c);\n", + " t = t - 0.1;\n", + "\n", + "P_1_sat_c = math.exp(14.39155 - 2795.817/(t + 230.002));\n", + "P_2_sat_c = math.exp(16.26205 - 3799.887/(t + 226.346));\n", + "\n", + "y_1_c = (x_1_c*P_1_sat_c)/(P_c);\n", + "y_2_c = 1 - y_1_c;\n", + "\n", + "print \"c).The system temperature is t = %f C\"%(t);\n", + "print \" The vapour phase composition is y_1 = %f\"%(y_1_c);\n", + "\n", + "\t\t\t#(d)\n", + "y_1_d = 0.57;\t\t\t# Vapour phase composition\n", + "y_2_d = 1 - y_1_d;\n", + "P_d = 101.33;\t\t\t#[kPa] - Pressure of the system\n", + "\n", + "\t\t\t# Since vapour phase composition is given, we can use the relation\n", + "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n", + "t_1_sat_d = 2795.817/(14.39155 - math.log(P_d)) - 230.002;\n", + "t_2_sat_d = 3799.887/(16.26205 - math.log(P_d)) - 226.346;\n", + "t_d = y_1_d*t_1_sat_d + y_2_d*t_2_sat_d;\n", + "\n", + "fault = 10;\n", + "while(fault>0.1):\n", + " P_1_sat_prime = math.exp(14.39155 - 2795.817/(t_d + 230.002));\n", + " P_2_sat_prime = math.exp(16.26205 - 3799.887/(t_d + 226.346));\n", + " P_prime = 1/(y_1_d/P_1_sat_prime + y_2_d/P_2_sat_prime);\n", + " fault=abs(P_prime - P_d);\n", + " t_d = t_d + 0.01;\n", + "\n", + "P_1_sat_d = math.exp(14.39155 - 2795.817/(t_d + 230.002));\n", + "P_2_sat_d = math.exp(16.26205 - 3799.887/(t_d + 226.346));\n", + "\n", + "x_1_d = (y_1_d*P_d)/(P_1_sat_d);\n", + "x_2_d = 1 - x_1_d;\n", + "\n", + "print \"d).The system temperature is t = %f C\"%(t_d);\n", + "print \" The liquid phase composition is x_1 = %f\"%(x_1_d);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a).The system pressure is = 105.268363 kPa\n", + " The vapour phase composition is y_1 = 0.782290\n", + "b).The system pressure is P = 60.894254 kPa\n", + " The liquid phase composition is x_1 = 0.136725\n", + "c).The system temperature is t = 79.943314 C\n", + " The vapour phase composition is y_1 = 0.679347\n", + "d).The system temperature is t = 84.600005 C\n", + " The liquid phase composition is x_1 = 0.234934\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.3 Page Number : 516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "x_1_a = 0.25;\t\t\t# Equilibrium composition of liquid phase\n", + "x_2_a = 0.35;\n", + "x_3_a = 1 - x_1_a - x_2_a;\n", + "t_a = 80;\t\t\t#[C] - Temperature\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# At t = 80 C\n", + "P_1_sat_a = math.exp(14.3916 - 2795.82/(t_a + 230.00));\n", + "P_2_sat_a = math.exp(14.2724 - 2945.47/(t_a + 224.00));\n", + "P_3_sat_a = math.exp(14.2043 - 2972.64/(t_a + 209.00));\n", + "\n", + "\t\t\t# Since liquid phase composition is given we use the relation \n", + "P_a = x_1_a*P_1_sat_a + x_2_a*P_2_sat_a + x_3_a*P_3_sat_a;\t\t\t#[kPa]\n", + "\n", + "y_1_a = (x_1_a*P_1_sat_a)/(P_a);\n", + "y_2_a = (x_2_a*P_2_sat_a)/(P_a);\n", + "y_3_a = (x_3_a*P_3_sat_a)/(P_a);\n", + "\n", + "print \"a).The system pressure is P = %f kPa\"%(P_a);\n", + "print \" The vapour phase composition is given by y_1 = %f y_2 = %f and y_3 = %f \"%(y_1_a,y_2_a,y_3_a);\n", + "\n", + "\t\t\t#(2)\n", + "y_1_b = 0.50;\t\t\t# Equilibrium composition of liquid phase\n", + "y_2_b = 0.30;\n", + "y_3_b = 1 - y_1_a - y_2_a;\n", + "t_b = 85;\t\t\t#[C] - Temperature\n", + "\n", + "\t\t\t# At t = 80 C\n", + "P_1_sat_b = math.exp(14.3916 - 2795.82/(t_b + 230.00));\n", + "P_2_sat_b = math.exp(14.2724 - 2945.47/(t_b + 224.00));\n", + "P_3_sat_b = math.exp(14.2043 - 2972.64/(t_b + 209.00));\n", + "\n", + "\t\t\t# Since vapour phase composition is given we use the relation \n", + "P_b = 1/(y_1_b/P_1_sat_b + y_2_b/P_2_sat_b + y_3_b/P_3_sat_b);\t\t\t#[kPa]\n", + "\n", + "\t\t\t# Therefore we have\n", + "x_1_b = (y_1_b*P_b)/P_1_sat_b;\n", + "x_2_b = (y_2_b*P_b)/P_2_sat_b;\n", + "x_3_b = (y_3_b*P_b)/P_3_sat_b;\n", + "\n", + "print \"b).The system pressure is P = %f kPa\"%(P_b);\n", + "print \" The liquid phase composition is given by x_1 = %f x_2 = %f and x_3 = %f \"%(x_1_b,x_2_b,x_3_b);\n", + "\n", + "\t\t\t#(c)\n", + "x_1_c = 0.30;\t\t\t# Equilibrium composition of liquid phase\n", + "x_2_c = 0.45;\n", + "x_3_c = 1 - x_1_c - x_2_c;\n", + "P_c = 80;\t\t\t#[kPa] - Pressure of the system\n", + "\n", + "\t\t\t# We have, P = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat\n", + "t_1_sat = 2795.82/(14.3916 - math.log(P_c)) - 230.00;\t\t\t#[C]\n", + "t_2_sat = 2945.47/(14.2724 - math.log(P_c)) - 224.00;\t\t\t#[C]\n", + "t_3_sat = 2972.64/(14.2043 - math.log(P_c)) - 209.00;\t\t\t#[C]\n", + "t = x_1_c*t_1_sat + x_2_c*t_2_sat + x_3_c*t_3_sat;\n", + "\n", + "error = 10;\n", + "while(error>0.5):\n", + " P_1_sat = math.exp(14.3916 - 2795.82/(t + 230.00));\n", + " P_2_sat = math.exp(14.2724 - 2945.47/(t + 224.00));\n", + " P_3_sat = math.exp(14.2043 - 2972.64/(t + 209.00));\n", + " P = x_1_c*P_1_sat + x_2_c*P_2_sat + x_3_c*P_3_sat;\n", + " error=abs(P - P_c);\n", + " t = t - 0.2;\n", + "\n", + "P_1_sat_c = math.exp(14.3916 - 2795.82/(t + 230.00));\n", + "P_2_sat_c = math.exp(14.2724 - 2945.47/(t + 224.00));\n", + "P_3_sat_c = math.exp(14.2043 - 2972.64/(t + 209.00));\n", + "\n", + "y_1_c = (x_1_c*P_1_sat_c)/(P_c);\n", + "y_2_c = (x_2_c*P_2_sat_c)/(P_c);\n", + "y_3_c = 1 - y_1_c - y_2_c;\n", + "\n", + "print \"c).The system temperature is t = %f C\"%(t);\n", + "print \" The vapour phase composition is y_1 = %f y_2 %f and y_3 = %f\"%(y_1_c,y_2_c,y_3_c);\n", + "\n", + "\t\t\t#(d)\n", + "y_1_d = 0.6;\t\t\t# Vapour phase composition\n", + "y_2_d = 0.2;\n", + "y_3_d = 1 - y_1_d - y_2_d;\n", + "P_d = 90;\t\t\t#[kPa] - Pressure of the system\n", + "\n", + "\t\t\t# Since vapour phase composition is given, we can use the relation\n", + "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat\n", + "t_1_sat_d = 2795.82/(14.3916 - math.log(P_d)) - 230.00;\n", + "t_2_sat_d = 2945.47/(14.2724 - math.log(P_d)) - 224.00;\n", + "t_3_sat_d = 2972.64/(14.2043 - math.log(P_d)) - 209.00;\n", + "t_d = y_1_d*t_1_sat_d + y_2_d*t_2_sat_d + y_3_d*t_3_sat_d;\n", + "\n", + "fault = 10;\n", + "while(fault>0.5):\n", + " P_1_sat_prime = math.exp(14.3916 - 2795.82/(t_d + 230.00));\n", + " P_2_sat_prime = math.exp(14.2724 - 2945.47/(t_d + 224.00));\n", + " P_3_sat_prime = math.exp(14.2043 - 2972.64/(t_d + 209.00));\n", + " P_prime = 1/(y_1_d/P_1_sat_prime + y_2_d/P_2_sat_prime + y_3_d/P_3_sat_prime);\n", + " fault=abs(P_prime - P_d);\n", + " t_d = t_d + 0.2;\n", + "\n", + "P_1_sat_d = math.exp(14.3916 - 2795.82/(t_d + 230.00));\n", + "P_2_sat_d = math.exp(14.2724 - 2945.47/(t_d + 224.00));\n", + "P_3_sat_d = math.exp(14.2043 - 2972.64/(t_d + 209.00));\n", + "\n", + "x_1_d = (y_1_d*P_d)/(P_1_sat_d);\n", + "x_2_d = (y_2_d*P_d)/(P_2_sat_d);\n", + "x_3_d = 1 - x_1_d - x_2_d;\n", + "\n", + "print \"d).The system temperature is t = %f C\"%(t_d);\n", + "print \" The liquid phase composition is x_1 = %f x_2 = %f and x_3 = %f\"%(x_1_d,x_2_d,x_3_d);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a).The system pressure is P = 108.239332 kPa\n", + " The vapour phase composition is given by y_1 = 0.497672 y_2 = 0.316379 and y_3 = 0.185948 \n", + "b).The system pressure is P = 129.287998 kPa\n", + " The liquid phase composition is given by x_1 = 0.259997 x_2 = 0.338895 and x_3 = 0.401108 \n", + "c).The system temperature is t = 67.020387 C\n", + " The vapour phase composition is y_1 = 0.544826 y_2 0.357251 and y_3 = 0.097922\n", + "d).The system temperature is t = 73.127683 C\n", + " The liquid phase composition is x_1 = 0.307471 x_2 = 0.230183 and x_3 = 0.462346\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.4 Page Number : 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "T = 120;\t\t\t#[C] - Temperature\n", + "P_1 = 1;\t\t\t#[atm] - Initial pressure\n", + "P_1 = P_1*101.325;\t\t\t#[kPa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "y_1 = 0.3;\t\t\t# Mole fraction of propane\n", + "y_2 = 0.5;\t\t\t# Mole fraction of butane\n", + "y_3 = 0.2;\t\t\t# Mole fraction of hexane\n", + "\n", + "\t\t\t# math.log(P_1_sat) = 13.7713 - 1892.47/(t + 248.82)\n", + "\t\t\t# math.log(P_2_sat) = 13.7224 - 2151.63/(t + 236.91)\n", + "\t\t\t# math.log(P_3_sat) = 13.8216 - 2697.55/(t + 224.37)\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "P_1_sat = math.exp(13.7713 - 1892.47/(T + 248.82));\n", + "P_2_sat = math.exp(13.7224 - 2151.63/(T + 236.91));\n", + "P_3_sat = math.exp(13.8216 - 2697.55/(T + 224.37));\n", + "\n", + "\t\t\t# Since vapour phase composition is given we can use the relation,\n", + "P_2 = 1/(y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat);\t\t\t#[kPa]\n", + "\n", + "print \" a).The pressure of the mixture when first drop condenses is given by P = %f kPa\"%(P_2);\n", + "\n", + "\t\t\t#(b)\n", + "x_1 = (y_1*P_2)/P_1_sat;\n", + "x_2 = (y_2*P_2)/P_2_sat;\n", + "x_3 = (y_3*P_2)/P_3_sat;\n", + "\n", + "print \" b).The liquid phase composition is given by x_1 propane = %f x_2 butane = %f and x_3 hexane = %f \"%(x_1,x_2,x_3);\n", + "\n", + "\t\t\t# (c)\n", + "\t\t\t# Work transfer per mol is given by\n", + "\t\t\t# W = integral(P*dV) = integral((R*T/V)*dV) = R*T*math.log(V_2/V_1) = R*T*math.log(P_1/P_2)\n", + "w = R*(T+273.15)*math.log(P_1/P_2);\t\t\t#[J/mol]\n", + "\t\t\t# For 100 mol\n", + "W = w*100;\t\t\t#[J]\n", + "W = W*10**(-3);\t\t\t#[kJ]\n", + "print \" c).The work required for 100 mol of mixture handeled is %f kJ\"%(W);\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The pressure of the mixture when first drop condenses is given by P = 1278.060855 kPa\n", + " b).The liquid phase composition is given by x_1 propane = 0.067811 x_2 butane = 0.291139 and x_3 hexane = 0.641049 \n", + " c).The work required for 100 mol of mixture handeled is -828.526086 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.5 Page Number : 520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "# Variables\n", + "T = 27;\t\t\t#[C] - Temperature\n", + "\n", + "\t\t\t# math.log(P_1_sat) = 13.8216 - 2697.55/(t + 224.37)\n", + "\t\t\t# math.log(P_2_sat) = 13.8587 - 2911.32/(t + 216.64)\n", + "\n", + "\t\t\t#(a)\n", + "x_1_a = 0.2;\n", + "x_2_a = 1 - x_1_a;\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# At t = 27 C\n", + "P_1_sat = math.exp(13.8216 - 2697.55/(T + 224.37));\t\t\t#[kPa]\n", + "P_2_sat = math.exp(13.8587 - 2911.32/(T + 216.64));\t\t\t#[kPa]\n", + "P_a = x_1_a*P_1_sat + x_2_a*P_2_sat;\t\t\t#[kPa]\n", + "\n", + "y_1_a = x_1_a*P_1_sat/P_a;\n", + "y_2_a = x_2_a*P_2_sat/P_a;\n", + "\n", + "print \"a).The total pressure is P = %f kPa\"%(P_a);\n", + "print \" The vapour phase composition is given by y_1 = %f and y_2 = %f\"%(y_1_a,y_2_a);\n", + "\n", + "\t\t\t#(b)\n", + "y_1_b = 0.2;\n", + "y_2_b = 1 - y_1_b;\n", + "\t\t\t# Since vapour phase composition is given we can use the relation \n", + "P_b = 1/(y_1_b/P_1_sat + y_2_b/P_2_sat);\t\t\t#[kPa]\n", + "\n", + "\t\t\t# Therefore we have\n", + "x_1_b = (y_1_b*P_b)/P_1_sat;\n", + "x_2_b = (y_2_b*P_b)/P_2_sat;\n", + "\n", + "print \"b).The total pressure is, P = %f kPa\"%(P_b);\n", + "print \" The liquid phase composition is given by x_1 = %f and x_2 = %f\"%(x_1_b,x_2_b);\n", + "\n", + "\t\t\t#(c)\n", + "P_c = 30;\t\t\t#[kPa] - Total pressure\n", + "x_1_c = 0.2;\n", + "x_2_c = 1 - x_1_c;\n", + "\n", + "\t\t\t# We have, P = x_1*P_1_sat + x_2*P_2_sat\n", + "t_1_sat = 2697.55/(13.8216 - math.log(P_c)) - 224.37;\n", + "t_2_sat = 2911.32/(13.8587 - math.log(P_c)) - 216.64;\n", + "t = x_1_c*t_1_sat + x_2_c*t_2_sat;\n", + "\n", + "fault = 10;\n", + "while(fault>0.3):\n", + " P_1_sat = math.exp(13.8216 - 2697.55/(t + 224.37));\n", + " P_2_sat = math.exp(13.8587 - 2911.32/(t + 216.64));\n", + " P = x_1_c*P_1_sat + x_2_c*P_2_sat;\n", + " fault = abs(P - P_c);\n", + " t = t - 0.1;\n", + "\n", + "P_1_sat_c = math.exp(13.8216 - 2697.55/(t + 224.37));\n", + "P_2_sat_c = math.exp(13.8587 - 2911.32/(t + 216.64));\n", + "\n", + "y_1_c = (x_1_c*P_1_sat_c)/(P_c);\n", + "y_2_c = 1 - y_1_c;\n", + "\n", + "print \"c).The system temperature is t = %f C\"%(t);\n", + "print \" The vapour phase composition is y_1 = %f and y_2 = %f \"%(y_1_c,y_2_c);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a).The total pressure is P = 9.795726 kPa\n", + " The vapour phase composition is given by y_1 = 0.448801 and y_2 = 0.551199\n", + "b).The total pressure is, P = 7.835131 kPa\n", + " The liquid phase composition is given by x_1 = 0.071288 and x_2 = 0.928712\n", + "c).The system temperature is t = 53.904663 C\n", + " The vapour phase composition is y_1 = 0.413592 and y_2 = 0.586408 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.6 Page Number : 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P = 90;\t\t\t#[kPa] - Pressure\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t# math.log(P_sat) = A - B/(t + C)\n", + "\n", + "\t\t\t# For benzene\n", + "A_1 = 13.8594;\n", + "B_1 = 2773.78;\n", + "C_1 = 220.07;\n", + "\t\t\t# For ethyl benzene\n", + "A_2 = 14.0045;\n", + "B_2 = 3279.47;\n", + "C_2 = 213.20;\n", + "\n", + "x_1 = 0.5;\t\t\t# Equimolar mixture\n", + "x_2 = 0.5;\n", + "\n", + "\t\t\t# The bubble point temperature equation is\n", + "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat\n", + "\n", + "# Calculations and Results\n", + "t_1_sat = B_1/(A_1 - math.log(P)) - C_1;\n", + "t_2_sat = B_2/(A_2 - math.log(P)) - C_2;\n", + "t = x_1*t_1_sat + x_2*t_2_sat;\n", + "\n", + "fault = 10;\n", + "while(fault>0.3):\n", + " P_1_sat = math.exp(A_1 - B_1/(t + C_1));\n", + " P_2_sat = math.exp(A_2 - B_2/(t + C_2));\n", + " P_net = x_1*P_1_sat + x_2*P_2_sat;\n", + " fault=abs(P_net - P);\n", + " t = t - 0.1;\n", + "\n", + "print \" The bubble point temperature is %f C\"%(t);\n", + "\n", + "\t\t\t# Now let us determine dew point temperature for y_1 = 0.5, and P = 90 kPa\n", + "y_1 = 0.5;\t\t\t# Equimolar mixture\n", + "y_2 = 0.5;\n", + "\n", + "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n", + "\t\t\t# Let us statrt with t = 104.07\n", + "t_old = 104.07;\n", + "error = 10;\n", + "while(error>0.3):\n", + " P_1_sat_prime = math.exp(A_1 - B_1/(t_old + C_1));\n", + " P_2_sat_prime = math.exp(A_2 - B_2/(t_old + C_2));\n", + " P_net_prime = 1/(y_1/P_1_sat_prime + y_2/P_2_sat_prime);\n", + " error=abs(P_net_prime - P);\n", + " t_old = t_old + 0.1;\n", + "\n", + "print \" The dew point temperature is %f C\"%(t_old);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The bubble point temperature is 93.862003 C\n", + " The dew point temperature is 114.470000 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.7 Page Number : 522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P = 1;\t\t\t#[bar] - Pressure\n", + "P = P*10**(2);\t\t\t#[kPa]\n", + "\n", + "\t\t\t# math.log(P_1_sat) = 13.8594 - 2773.78/(t + 220.07)\n", + "\t\t\t# math.log(P_2_sat) = 14.0098 - 3103.01/(t + 219.79)\n", + "\n", + "\t\t\t# The bubble point equation is\n", + "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat;\n", + "\n", + "t_1_sat = 2773.78/(13.8594 - math.log(P)) - 220.07;\n", + "t_2_sat = 3103.01/(14.0098 - math.log(P)) - 219.79;\n", + "\n", + "\t\t\t# For x_1 = 0.1\n", + "\t\t\t# t = x_1_1*t_1_sat + x_2_1*t_2_sat;\n", + "x_1 = [0.1,0.5,0.9];\n", + "x_2 = [0,0,0]\n", + "\n", + "# Calculations and Results\n", + "for i in range(3):\n", + " x_2[i] = 1 - x_1[i];\n", + " t = x_1[i]*t_1_sat + x_2[i]*t_2_sat;\n", + " fault = 10;\n", + " while(fault>0.3):\n", + " P_1_sat = math.exp(13.8594 - 2773.78/(t + 220.07));\n", + " P_2_sat = math.exp(14.0098 - 3103.01/(t + 219.79));\n", + " P_net = x_1[i]*P_1_sat + x_2[i]*P_2_sat;\n", + " fault=abs(P_net - P);\n", + " t = t - 0.1;\n", + " print \" The bubble point temperature for x_1 = %f) is %f C\"%(x_1[i],t);\n", + "\n", + "\n", + "\n", + "\t\t\t# Now let us determine dew point temperature\n", + "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n", + "\n", + "y_1 = [0.1,0.5,0.9];\n", + "y_2 = [0,0,0]\n", + "for j in range(3):\n", + " y_2[j] = 1 - y_1[j];\n", + " t_prime = y_1[j]*t_1_sat + y_2[j]*t_2_sat;\n", + " error = 10;\n", + " while(error>0.3):\n", + " P_1_sat = math.exp(13.8594 - 2773.78/(t_prime + 220.07));\n", + " P_2_sat = math.exp(14.0098 - 3103.01/(t_prime + 219.79));\n", + " P_net = 1/(y_1[j]/P_1_sat + y_2[j]/P_2_sat);\n", + " error=abs(P_net - P);\n", + " t_prime = t_prime + 0.1;\n", + " \n", + " print \" The dew point temperature for y_1 = %f is %f C\"%(y_1[j],t_prime);\n", + "\n", + "\n", + "\t\t\t#Therefore\n", + "print \" The temperature range for z_1 = 0.1 which two phase exist is 105.61 C to 108.11 C\";\n", + "print \" The temperature range for z_1 = 0.5 which two phase exist is 91.61 C to 98.40 C\";\n", + "print \" The temperature range for z_1 = 0.9 which two phase exist is 81.71 C to 84.51 C\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The bubble point temperature for x_1 = 0.100000) is 105.605549 C\n", + " The bubble point temperature for x_1 = 0.500000) is 91.607993 C\n", + " The bubble point temperature for x_1 = 0.900000) is 81.710437 C\n", + " The dew point temperature for y_1 = 0.100000 is 108.105549 C\n", + " The dew point temperature for y_1 = 0.500000 is 98.407993 C\n", + " The dew point temperature for y_1 = 0.900000 is 84.510437 C\n", + " The temperature range for z_1 = 0.1 which two phase exist is 105.61 C to 108.11 C\n", + " The temperature range for z_1 = 0.5 which two phase exist is 91.61 C to 98.40 C\n", + " The temperature range for z_1 = 0.9 which two phase exist is 81.71 C to 84.51 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.8 Page Number : 524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "x_1 = 0.20;\n", + "x_2 = 0.45;\n", + "x_3 = 0.35;\n", + "P = 10;\t\t\t#[atm]\n", + "P = P*101325*10**(-3);\t\t\t#[kPa]\n", + "\n", + "\t\t\t# math.log(P_1_sat) = 13.7713 - 1892.47/(t + 248.82)\n", + "\t\t\t# math.log(P_2_sat) = 13.7224 - 2151.63/(t + 236.91)\n", + "\t\t\t# math.log(P_3_sat) = 13.8183 - 2477.07/(t + 233.21)\n", + "\n", + "\t\t\t#(a)\n", + "\t\t\t# The bubble point equation is\n", + "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat\n", + "\n", + "# Calculations and Results\n", + "t_1_sat = 1892.47/(13.7713 - math.log(P)) - 248.82;\n", + "t_2_sat = 2151.63/(13.7224 - math.log(P)) - 236.91;\n", + "t_3_sat = 2477.07/(13.8183 - math.log(P)) - 233.21;\n", + "t = x_1*t_1_sat + x_2*t_2_sat + x_3*t_3_sat;\n", + "\n", + "fault = 10;\n", + "while(fault>0.1):\n", + " P_1_sat = math.exp(13.7713 - 1892.47/(t + 248.82));\n", + " P_2_sat = math.exp(13.7224 - 2151.63/(t + 236.91));\n", + " P_3_sat = math.exp(13.8183 - 2477.07/(t + 233.21));\n", + " P_net = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat;\n", + " fault=abs(P_net - P);\n", + " t = t - 0.003;\n", + "\n", + "BPT = t;\n", + "print \" a).The bubble point temperature is %f C\"%(BPT);\n", + "\n", + "\t\t\t# (b)\n", + "\t\t\t# Now let us determine dew point temperature for y_1 = 0.5, and P = 90 kPa\n", + "y_1 = 0.20;\n", + "y_2 = 0.45;\n", + "y_3 = 0.35;\n", + "\n", + "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat\n", + "\n", + "t_old = 90;\t\t\t#[C]\n", + "error = 10;\n", + "while(error>0.1):\n", + " P_1_sat_prime = math.exp(13.7713 - 1892.47/(t_old + 248.82));\n", + " P_2_sat_prime = math.exp(13.7224 - 2151.63/(t_old + 236.91));\n", + " P_3_sat_prime = math.exp(13.8183 - 2477.07/(t_old + 233.21));\n", + " P_net_prime = 1/(y_1/P_1_sat_prime + y_2/P_2_sat_prime + y_3/P_3_sat_prime);\n", + " error=abs(P_net_prime - P);\n", + " t_old = t_old + 0.003;\n", + "\n", + "DPT = t_old;\n", + "print \" b).The dew point temperature is %f C\"%(DPT);\n", + "\n", + "\t\t\t# (c)\n", + "\t\t\t# Therefore at 82 C two phase exists\n", + "\t\t\t# At 82 C and P = 1013.25 kPa pressure\n", + "T_c = 82;\t\t\t#[C]\n", + "P_c = 1013.25;\t\t\t#[kPa]\n", + "z_1 = 0.20;\n", + "z_2 = 0.45;\n", + "z_3 = 0.35;\n", + "\n", + "P_1_sat_c = math.exp(13.7713 - 1892.47/(T_c + 248.82));\n", + "P_2_sat_c = math.exp(13.7224 - 2151.63/(T_c + 236.91));\n", + "P_3_sat_c = math.exp(13.8183 - 2477.07/(T_c + 233.21));\n", + "\n", + "K_1 = P_1_sat_c/P_c;\n", + "K_2 = P_2_sat_c/P_c;\n", + "K_3 = P_3_sat_c/P_c;\n", + "\n", + "\t\t\t# We have to find such a V that the following equation is satisfied.\n", + "\t\t\t# summation(y_i) = K_i*z_i/(1-V+V*K_i) = 1\n", + "\t\t\t# K_1*z_1/(1-V+V*K_1) + K_2*z_2/(1-V+V*K_2) + K_3*z_3/(1-V+V*K_3) = 1\n", + "\n", + "def f1(V): \n", + "\t return K_1*z_1/(1-V+V*K_1) + K_2*z_2/(1-V+V*K_2) + K_3*z_3/(1-V+V*K_3)-1\n", + "V = fsolve(f1,0.4)\n", + "\n", + "\t\t\t# Therefore now we have\n", + "y_1_c = K_1*z_1/(1-V+V*K_1);\n", + "y_2_c = K_2*z_2/(1-V+V*K_2);\n", + "y_3_c = K_3*z_3/(1-V+V*K_3);\n", + "x_1_c = y_1_c/K_1;\n", + "x_2_c = y_2_c/K_2;\n", + "x_3_c = y_3_c/K_3;\n", + "\n", + "print \" c).The proportion of vapour is given by V = %f\"%(V);\n", + "print \" The composition of vapour foemed is given by y_1 = %f y_2 = %f and y_3 = %f \"%(y_1_c,y_2_c,y_3_c);\n", + "print \" The composition of liquid formed is given by x_1 = %f x_2 = %f and x_3 = %f \"%(x_1_c,x_2_c,x_3_c);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The bubble point temperature is 71.833954 C\n", + " b).The dew point temperature is 97.254000 C\n", + " c).The proportion of vapour is given by V = 0.332143\n", + " The composition of vapour foemed is given by y_1 = 0.365018 y_2 = 0.466574 and y_3 = 0.168408 \n", + " The composition of liquid formed is given by x_1 = 0.117932 x_2 = 0.441757 and x_3 = 0.440311 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.9 Page Number : 526" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "T = 27;\t\t\t#[C] - Temperature\n", + "z_1 = 0.4;\n", + "z_2 = 0.3;\n", + "z_3 = 0.3;\n", + "\n", + "\t\t\t# math.log(P_sat) = A - B/(t + C)\n", + "\n", + "\t\t\t# For propane\n", + "A_1 = 13.7713;\n", + "B_1 = 1892.47;\n", + "C_1 = 248.82;\n", + "\t\t\t# For i-butane\n", + "A_2 = 13.4331;\n", + "B_2 = 1989.35;\n", + "C_2 = 236.84;\n", + "\t\t\t# For n-butane\n", + "A_3 = 13.7224;\n", + "B_3 = 2151.63;\n", + "C_3 = 236.91;\n", + "\n", + "\t\t\t#(a)\n", + "\t\t\t\n", + "y_1 = z_1;\n", + "y_2 = z_2;\n", + "y_3 = z_3;\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# At 27 C,\n", + "P_1_sat = math.exp(A_1 - B_1/(T + C_1));\n", + "P_2_sat = math.exp(A_2 - B_2/(T + C_2));\n", + "P_3_sat = math.exp(A_3 - B_3/(T + C_3));\n", + "\n", + "\t\t\t# The dew point pressure is given by\n", + "P_1 = 1/(y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat); \n", + "\n", + "\n", + "x_1 = z_1;\n", + "x_2 = z_2;\n", + "x_3 = z_3;\n", + "\n", + "\t\t\t# The bubble point pressure is given by\n", + "P_2 = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat;\n", + "\n", + "print \" a).The two phase region exists between %f and %f kPa\"%(P_1,P_2);\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t# The mean of the two-phase pressure range is given by\n", + "P_mean = (P_1 + P_2)/2;\n", + "\n", + "\t\t\t# Now let us calculate the K values of the components\n", + "K_1 = P_1_sat/P_mean;\n", + "K_2 = P_2_sat/P_mean;\n", + "K_3 = P_3_sat/P_mean;\n", + "\n", + "\t\t\t# summation of y_i = 1, gives\n", + "\t\t\t# (K_1*z_1)/(1-V-K_1*V) + (K_2*z_2)/(1-V-K_2*V) + (K_3*z_3)/(1-V-K_3*V) = 1\n", + "\t\t\t# Solving we get\n", + "def f(V): \n", + "\t return (K_1*z_1)/(1-V+K_1*V) + (K_2*z_2)/(1-V+K_2*V) + (K_3*z_3)/(1-V+K_3*V)-1\n", + "V = fsolve(f,0.1)\n", + "\n", + "y_1_prime = (z_1*K_1)/(1-V+K_1*V);\n", + "\n", + "print \" b).The mole fraction of propane in vapour phase is %f whereas in the feed is %f and fraction of vapour in the system is %f\"%(y_1_prime,z_1,V);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The two phase region exists between 421.886904 and 588.370027 kPa\n", + " b).The mole fraction of propane in vapour phase is 0.559489 whereas in the feed is 0.400000 and fraction of vapour in the system is 0.425313\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.10 Page Number : 527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 50;\t\t\t#[C] - Temperature\n", + "P = 64;\t\t\t#[kPa] - Pressure\n", + "z_1 = 0.7;\n", + "z_2 = 0.3;\n", + "\n", + "# math.log(P_sat) = A - B/(t + C)\n", + "\n", + "# For acetone\n", + "A_1 = 14.37824;\n", + "B_1 = 2787.498;\n", + "C_1 = 229.664;\n", + "# For acetonitrile\n", + "A_2 = 14.88567;\n", + "B_2 = 3413.099;\n", + "C_2 = 250.523;\n", + "\n", + "# Calculations\n", + "# At 50 C,\n", + "P_1_sat = math.exp(A_1 - B_1/(T + C_1));\t\t\t#[kPa]\n", + "P_2_sat = math.exp(A_2 - B_2/(T + C_2));\t\t\t#[kPa]\n", + "\n", + "# Now let us calculate the K values of the components\n", + "K_1 = P_1_sat/P;\n", + "K_2 = P_2_sat/P;\n", + "\n", + "# summation of y_i = 1, gives\n", + "# (K_1*z_1)/(1-V-K_1*V) + (K_2*z_2)/(1-V-K_2*V) = 1\n", + "# Solving we get\n", + "def f(V): \n", + " return (K_1*z_1)/(1-V+K_1*V) + (K_2*z_2)/(1-V+K_2*V) -1\n", + "V = fsolve(f,0.1)\n", + "L = 1 - V;\n", + "# Therefore\n", + "y_1 = (K_1*z_1)/(1-V+K_1*V);\n", + "y_2 = (K_2*z_2)/(1-V+K_2*V);\n", + "\n", + "x_1 = y_1/K_1;\n", + "x_2 = y_2/K_2;\n", + "\n", + "# Results\n", + "print \" The value of V = %f\"%(V);\n", + "print \" The value of L = %f\"%(L);\n", + "print \" The liquid phase composition is x_1 = %f and x_2 = %f\"%(x_1,x_2);\n", + "print \" The vapour phase composition is y_1 = %f and y_2 = %f\"%(y_1,y_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of V = 0.450368\n", + " The value of L = 0.549632\n", + " The liquid phase composition is x_1 = 0.619963 and x_2 = 0.380037\n", + " The vapour phase composition is y_1 = 0.797678 and y_2 = 0.202322\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.11 Page Number : 528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P = 12.25*101325*10**(-3);\t\t\t#[kPa]\n", + "z_1 = 0.8;\n", + "z_2 = 1 - z_1;\n", + "V = 0.4;\n", + "# math.log(P_1_sat) = 13.7713 - 2892.47/(T + 248.82)\n", + "# math.log(P_2_sat) = 13.7224 - 2151.63/(T + 236.91)\n", + "\n", + "# P_1_sat = math.exp(13.7713 - 21892.47/(T + 248.82));\n", + "# P_2_sat = math.exp(13.7224 - 2151.63/(T + 236.91));\n", + "\n", + "# Let the total mixture be 1 mol\n", + "# We have to assume a temperature such that,\n", + "# y_1 + y_2 = (K_1*z_1)/(1-V-K_1*V) + (K_2*z_2)/(1-V-K_2*V) = 1\n", + "\n", + "\n", + "\n", + "\n", + "x_1 = z_1;\n", + "x_2 = z_2;\n", + "\n", + "# The bubble point pressure is given by\n", + "# P = x_1*(math.exp(13.7713 - 21892.47/(T + 248.82))) + x_2*(math.exp(13.7224 - 2151.63/(T + 236.91)));\n", + "\n", + "# Calculations\n", + "def f(T): \n", + "\t return x_1*(math.exp(13.7713 - 1892.47/(T + 248.82))) + x_2*(math.exp(13.7224 - 2151.63/(T + 236.91))) - P\n", + "T_1 = fsolve(f,0.1)\n", + "BPT = T_1;\n", + "\n", + "\n", + "y_1 = z_1;\n", + "y_2 = z_2;\n", + "\n", + "# The dew point equation is given by\n", + "# 1/P = y_1/P_1_sat + y_2/P_2_sat\n", + "def f1(T): \n", + "\t return 1/(y_1/(math.exp(13.7713 - 1892.47/(T + 248.82))) + y_2/(math.exp(13.7224 - 2151.63/(T + 236.91)))) - P\n", + "T_2 = fsolve(f1,0.1)\n", + "DPT = T_2;\n", + "\n", + "T = 47;\t\t\t#[C]\n", + "error = 10;\n", + "while(error>0.001):\n", + " P_1_sat = math.exp(13.7713 - 1892.47/(T + 248.82));\n", + " P_2_sat = math.exp(13.7224 - 2151.63/(T + 236.91));\n", + " K_1 = P_1_sat/P;\n", + " K_2 = P_2_sat/P;\n", + " y1 = (K_1*z_1)/(1-V+K_1*V);\n", + " y2 = (K_2*z_2)/(1-V+K_2*V);\n", + " y = y1 + y2;\n", + " error=abs(y - 1);\n", + " T = T - 0.0001;\n", + "\n", + "# Results\n", + "print \" The temperature when 40 mol of mixture is in the vapour is %f C\"%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The temperature when 40 mol of mixture is in the vapour is 45.333000 C\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.12 Page Number : 529" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 105;\t\t\t#[C]\n", + "P = 1.5;\t\t\t#[atm]\n", + "P = P*101325*10**(-3);\t\t\t#[kPa]\n", + "z = [0.4,0.3667,0.2333];\t\t\t# Feed composition\n", + "x = [0.3,0.3,0.4];\t\t\t# Equilibrium liquid phase composition\n", + "y = [0.45,0.40,0.15];\t\t\t# Equilibrium vapour phase composition\n", + "\n", + "# From the material balance equation of component 1, we get\n", + "# (L + V)*z_1 = L*x_1 + V*y_1\n", + "\n", + "# Since total moles are one, therefore L + V = 1 and thus\n", + "# z_1 = L*x_1 + (1-L)*y_1\n", + "# Calculations and Results\n", + "for i in range(3):\n", + " L = (z[i] - y[i])/(x[i] - y[i]);\n", + " V = 1 - L;\n", + " print \" The number of moles in liquid phase z = %f is given by L = %f\"%(z[i],L);\n", + " print \" The number of moles in vapour phase z = %f is given by V = %f\"%(z[i],V);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The number of moles in liquid phase z = 0.400000 is given by L = 0.333333\n", + " The number of moles in vapour phase z = 0.400000 is given by V = 0.666667\n", + " The number of moles in liquid phase z = 0.366700 is given by L = 0.333000\n", + " The number of moles in vapour phase z = 0.366700 is given by V = 0.667000\n", + " The number of moles in liquid phase z = 0.233300 is given by L = 0.333200\n", + " The number of moles in vapour phase z = 0.233300 is given by V = 0.666800\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.13 Page Number : 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 90;\t\t\t#[C]\n", + "P = 1;\t\t\t#[atm]\n", + "P = P*101325*10**(-3);\t\t\t#[kPa]\n", + "z_1 = [0.1,0.5,0.8];\n", + "\n", + "# Calculations\n", + "# math.log(P_1_sat) = 13.8594 - 2773.78/(t + 220.07)\n", + "# math.log(P_2_sat) = 14.0098 - 3103.01/(t + 219.79)\n", + "\n", + "#At T = 90 C\n", + "P_1_sat = math.exp(13.8594 - 2773.78/(T + 220.07));\n", + "P_2_sat = math.exp(14.0098 - 3103.01/(T + 219.79));\n", + "K_1 = P_1_sat/P;\n", + "K_2 = P_2_sat/P;\n", + "\n", + "# For z_1 = 0.1\n", + "# y1 = (K_1*z_1(i))/(1-V+K_1*V);\n", + "# y2 = (K_2*z_2)/(1-V+K_2*V);\n", + "\n", + "x_1 = (P - P_2_sat)/(P_1_sat - P_2_sat);\n", + "y_1 = (x_1*P_1_sat)/(P);\n", + "\n", + "# For two phase region to exist at 90 C and 101.325 kPa,z_1 sholud lie between x_1 and y_1\n", + "\n", + "# Results\n", + "print \" For two phase region to exist at 90 C and 101.325 kPa, z_1 sholud lie between %f and %f\"%(x_1,y_1);\n", + "print \" For z_1 = 0.1 and z_1 = 0.5 only liquid phase exists V = 0.\"\n", + "print \" For z_1 = 0.8 only vapour exists V = 1.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " For two phase region to exist at 90 C and 101.325 kPa, z_1 sholud lie between 0.574884 and 0.772458\n", + " For z_1 = 0.1 and z_1 = 0.5 only liquid phase exists V = 0.\n", + " For z_1 = 0.8 only vapour exists V = 1.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.14 Page Number : 531" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from numpy import zeros\n", + "\n", + "# Variables\n", + "T = 90;\t\t\t#[C]\n", + "P = 1;\t\t\t#[atm]\n", + "P = P*101325*10**(-3);\t\t\t#[kPa]\n", + "z_1 = [0.1,0.5,0.8];\n", + "\n", + "# math.log(P_1_sat) = 13.8594 - 2773.78/(t + 220.07)\n", + "# math.log(P_2_sat) = 14.0098 - 3103.01/(t + 219.79)\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#At T = 90 C\n", + "P_1_sat = math.exp(13.8594 - 2773.78/(T + 220.07));\n", + "P_2_sat = math.exp(14.0098 - 3103.01/(T + 219.79));\n", + "K_1 = P_1_sat/P;\n", + "\n", + "x_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0];\n", + "P_prime = zeros(11);\n", + "x_2 = zeros(11);\n", + "y_1 = zeros(11);\n", + "\n", + "print \" a.\";\n", + "print \" x_1 \\t\\t P \\t\\t y_1 \";\n", + "\n", + "for i in range(11):\n", + " x_2[i] = 1 - x_1[i];\n", + " P_prime[i] = x_1[i]*P_1_sat + x_2[i]*P_2_sat;\n", + " y_1[i] = (x_1[i]*P_1_sat)/P_prime[i];\n", + " print \" %f \\t %f \\t %f \"%(x_1[i],P_prime[i],y_1[i]);\n", + "\n", + "\t\t\t#(b)\n", + "T_1_sat = 2773.78/(13.8594-math.log(P)) - 220.07;\t\t\t#[C]\n", + "T_2_sat = 3103.01/(14.0098-math.log(P)) - 219.79;\t\t\t#[C]\n", + "\n", + "T_prime = [110.62,107,104,101,98,95,92,89,86,83,80.09];\n", + "\n", + "P1_sat = zeros(11);\n", + "P2_sat = zeros(11);\n", + "x_1 = zeros(11);\n", + "y_1 = zeros(11);\n", + "\n", + "print \" b.\";\n", + "print \" TC \\t\\t P_1_sat kPa \\t\\t P_2_sat kPa \\t\\t x_1 \\t\\t y_1 \";\n", + "\n", + "for j in range(11):\n", + " P1_sat[j] = math.exp(13.8594 - 2773.78/(T_prime[j] + 220.07));\n", + " P2_sat[j] = math.exp(14.0098 - 3103.01/(T_prime[j] + 219.79));\n", + " x_1[j] = (P-P2_sat[j])/(P1_sat[j]-P2_sat[j]);\n", + " y_1[j] = (x_1[j]*P1_sat[j])/P;\n", + " print \" %f \\t %f \\t %f \\t %f \\t %f \"%(T_prime[j],P1_sat[j],P2_sat[j],x_1[j],y_1[j]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a.\n", + " x_1 \t\t P \t\t y_1 \n", + " 0.000000 \t 54.233834 \t 0.000000 \n", + " 0.100000 \t 62.425251 \t 0.218098 \n", + " 0.200000 \t 70.616668 \t 0.385597 \n", + " 0.300000 \t 78.808085 \t 0.518277 \n", + " 0.400000 \t 86.999502 \t 0.625971 \n", + " 0.500000 \t 95.190920 \t 0.715131 \n", + " 0.600000 \t 103.382337 \t 0.790162 \n", + " 0.700000 \t 111.573754 \t 0.854176 \n", + " 0.800000 \t 119.765171 \t 0.909433 \n", + " 0.900000 \t 127.956588 \t 0.957615 \n", + " 1.000000 \t 136.148005 \t 1.000000 \n", + " b.\n", + " TC \t\t P_1_sat kPa \t\t P_2_sat kPa \t\t x_1 \t\t y_1 \n", + " 110.620000 \t 237.827187 \t 101.332530 \t -0.000055 \t -0.000129 \n", + " 107.000000 \t 216.742019 \t 91.320455 \t 0.079767 \t 0.170629 \n", + " 104.000000 \t 200.376847 \t 83.629571 \t 0.151570 \t 0.299740 \n", + " 101.000000 \t 184.975751 \t 76.460482 \t 0.229134 \t 0.418300 \n", + " 98.000000 \t 170.500977 \t 69.787769 \t 0.313139 \t 0.526923 \n", + " 95.000000 \t 156.915208 \t 63.586616 \t 0.404360 \t 0.626206 \n", + " 92.000000 \t 144.181607 \t 57.832824 \t 0.503680 \t 0.716718 \n", + " 89.000000 \t 132.263848 \t 52.502830 \t 0.612106 \t 0.799008 \n", + " 86.000000 \t 121.126156 \t 47.573718 \t 0.730789 \t 0.873601 \n", + " 83.000000 \t 110.733338 \t 43.023234 \t 0.861050 \t 0.941001 \n", + " 80.090000 \t 101.331285 \t 38.950606 \t 0.999899 \t 0.999961 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.15 Page Number : 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1_sat = 79.80;\t\t\t#[kPa]\n", + "P_2_sat = 40.45;\t\t\t#[kPa]\n", + "\n", + "#(1)\n", + "T = 373.15;\t\t\t#[K]\n", + "x_1 = 0.05;\n", + "x_2 = 1 - x_1;\n", + "Y1 = math.exp(0.95*x_2**(2));\n", + "Y2 = math.exp(0.95*x_1**(2));\n", + "\n", + "# Calculations and Results\n", + "# The total pressure of the system is given by\n", + "P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[kPa]\n", + "y_1 = x_1*Y1*P_1_sat/P;\n", + "y_2 = x_2*Y2*P_2_sat/P;\n", + "\n", + "print \" 1).The first bubble is formed at %f kPa and the composition y_1 = %f\"%(P,y_1);\n", + "\n", + "#(2)\n", + "T = 373.15;\t\t\t#[K]\n", + "y_1_prime = 0.05;\n", + "y_2_prime = 1 - y_1_prime;\n", + "\n", + "# Let us assume a value of x_1,\n", + "x_1_prime = 0.0001;\n", + "\n", + "error = 10;\n", + "while(error>0.001):\n", + " x_2_prime = 1 - x_1_prime;\n", + " Y1_prime = math.exp(0.95*x_2_prime**(2));\n", + " Y2_prime = math.exp(0.95*x_1_prime**(2));\n", + " P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\n", + " x_1 = (y_1_prime*P_prime)/(Y1_prime*P_1_sat);\n", + " error=abs(x_1_prime - x_1);\n", + " x_1_prime = x_1_prime + 0.00001;\n", + "\n", + "P_2 = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\n", + "\n", + "print \" 2).The first drop is formed at %f kPa and has the composition x_1 = %f\"%(P_2,x_1_prime);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The first bubble is formed at 47.923166 kPa and the composition y_1 = 0.196237\n", + " 2).The first drop is formed at 41.974204 kPa and has the composition x_1 = 0.009370\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.16 Page Number : 534" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T = 78.15;\t\t\t#[C]\n", + "P_1_sat = 755;\t\t\t#[mm Hg]\n", + "P_2_sat = 329;\t\t\t#[mm Hg]\n", + "\n", + "z_1 = 0.3;\n", + "V = 0.5;\n", + "\n", + "# math.log(Y1) = 0.845/(1 + 0.845*(x_1/x_2))**(2)\n", + "# math.log(Y2) = 1/(1 + 1.183*(x_2/x_1))**(2)\n", + "\n", + "# A value of x_1 is to determined for which V = 0.5\n", + "# Let us assume a value of x_1, say x_1 = 0.150\n", + "x_1 = 0.150;\n", + "\n", + "# Calculations\n", + "error = 10;\n", + "while(error>0.001):\n", + " x_2 = 1 - x_1;\n", + " Y1 = math.exp(0.845/(1 + 0.845*(x_1/x_2))**(2));\n", + " Y2 = math.exp(1/(1 + 1.183*(x_2/x_1))**(2));\n", + " P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\n", + " y_1 = (x_1*Y1*P_1_sat)/P;\n", + " V_prime = (z_1 - x_1)/(y_1 - x_1);\n", + " error=abs(V_prime - V);\n", + " x_1 = x_1 + 0.00001;\n", + "\n", + "P_prime = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[mm hg]\n", + "\n", + "# At x_1 , V = 0.5, \n", + "# Therefore when the mixture is 50 % vaporized at 78.15 C the mole fraction of component 1 in the liquid phase is x_1 and the system pressure is P_prime\n", + "\n", + "# Results\n", + "print \" The required pressure is %f mm Hg\"%(P_prime);\n", + "print \" and the mole fraction of component 1 in the liquid phase for this pressure is x_1 = %f\"%(x_1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The required pressure is 505.838606 mm Hg\n", + " and the mole fraction of component 1 in the liquid phase for this pressure is x_1 = 0.157650\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.17 Page Number : 536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.stats import linregress\n", + "\n", + "# Variables\n", + "T = 25;\t\t\t#[C] - Temperature\n", + "P = [118.05,124.95,137.90,145.00,172.90,207.70,227.70,237.85,253.90,259.40,261.10,262.00,258.70,252.00,243.80];\t\t\t#[mm Hg]\n", + "x_1 = [0.0115,0.0160,0.0250,0.0300,0.0575,0.1125,0.1775,0.2330,0.4235,0.5760,0.6605,0.7390,0.8605,0.9250,0.9625];\n", + "y_1 = [0.1810,0.2250,0.3040,0.3450,0.4580,0.5670,0.6110,0.6325,0.6800,0.7050,0.7170,0.7390,0.8030,0.8580,0.9160];\n", + "\n", + "# Pressure value for which x_1 = y_1 = 0, corresponds to P_2_sat,therefore\n", + "P_2_sat = 97.45;\t\t\t#[mm Hg]\n", + "# Pressure value for which x_1 = y_1 = 1, corresponds to P_1_sat,therefore\n", + "P_1_sat = 230.40;\t\t\t#[mm Hg]\n", + "\n", + "x_2 = zeros(15);\n", + "y_2 = zeros(15);\n", + "Y1 = zeros(15);\n", + "Y2 = zeros(15);\n", + "GE_RT = zeros(15);\n", + "x1x2_GE_RT = zeros(15);\n", + "\n", + "# Calculations\n", + "for i in range(15):\n", + " x_2[i] = 1 - x_1[i];\n", + " y_2[i] = 1 - y_1[i];\n", + " Y1[i] = (y_1[i]*P[i])/(x_1[i]*P_1_sat);\n", + " Y2[i] = (y_2[i]*P[i])/(x_2[i]*P_2_sat);\n", + " GE_RT[i] = x_1[i]*math.log(Y1[i]) + x_2[i]*math.log(Y2[i]);\t\t\t# G_E/(R*T)\n", + " x1x2_GE_RT[i] = (x_1[i]*x_2[i])/GE_RT[i];\n", + "\n", + "\n", + "#[M,N,sig]=reglin(x_1,x1x2_GE_RT);\n", + "M,N,sig,d,e = linregress(x_1,x1x2_GE_RT);\n", + "\n", + "# Linear regression between x_1 and x_1*x_2/(G_E/R*T) gives intercept = N and slope = M\n", + "\n", + "# van Laar equation is x_1*x_2/(G_E/R*T) = 1/A + (1/B - 1/A)\n", + "# 1/A = N\n", + "A = 1/N;\n", + "B = 1/(M + 1/A);\n", + "\n", + "# Results\n", + "print \" The value of Van Laar coefficient A = %f\"%(A);\n", + "print \" The value of Van Laar coefficient B = %f\"%(B);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of Van Laar coefficient A = 2.270624\n", + " The value of Van Laar coefficient B = 1.781821\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.18 Page Number : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "T = 343.15;\t\t\t#[K] - Temperature\n", + "# At 343.15 K\n", + "# math.log(Y1) = 0.95*x_2**(2)\n", + "# math.log(Y2) = 0.95*x_1**(2)\n", + "P_1_sat = 79.80;\t\t\t#[kPa]\n", + "P_2_sat = 40.50;\t\t\t#[kPa]\n", + "\n", + "# Calculations\n", + "# At x_1 = 0,\n", + "Y1_infinity = math.exp(0.95);\n", + "alpha_12_x0 = (Y1_infinity*P_1_sat)/(P_2_sat);\n", + "# At x_1 = 1,\n", + "Y2_infinity = math.exp(0.95);\n", + "alpha_12_x1 = (P_1_sat)/(Y2_infinity*P_2_sat);\n", + "\n", + "\n", + "# At azeotrope, Y1*P1_sat = Y2*P2_sat\n", + "# Y2/Y1 = P_1_sat/P_2_sat\n", + "# Taking math.logarithm of both sides we get\n", + "# math.log(Y2) - math.log(Y1) = math.log(P_1_sat/P_2_sat)\n", + "# 0.95*x_1**(2) - 0.95*x_2**(2) = math.log(P_1_sat/P_2_sat)\n", + "# Solving the above equation\n", + "def f(x_1): \n", + "\t return 0.95*x_1**(2) - 0.95*(1-x_1)**(2) - math.log(P_1_sat/P_2_sat)\n", + "x_1 = fsolve(f,0.1)\n", + "\n", + "# At x_1\n", + "x_2 = 1 - x_1;\n", + "Y1 = math.exp(0.95*x_2**(2));\n", + "Y2 = math.exp(0.95*x_1**(2));\n", + "P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n", + "y_1 = (x_1*Y1*P_1_sat)/P;\n", + "\n", + "# Since x_1 = y_1, (almost equal) ,the above condition is of azeotrope formation\n", + "\n", + "\n", + "\n", + "# Results\n", + "print \" Since alpha_12_x=0 = %f and alpha_12_x=1 = %f \"%(alpha_12_x0,alpha_12_x1);\n", + "print \" and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1, shall come and at this composition the azeotrope shall get formed.\"\n", + "print \" The azeotrope composition is x_1 = y_1 = %f\"%(x_1);\n", + "print \" The azeotrope presssure is %f kPa\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Since alpha_12_x=0 = 5.094806 and alpha_12_x=1 = 0.762023 \n", + " and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1, shall come and at this composition the azeotrope shall get formed.\n", + " The azeotrope composition is x_1 = y_1 = 0.856959\n", + " The azeotrope presssure is 81.366308 kPa\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.19 Page Number : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 45;\t\t\t#[C] - Temperature\n", + "\n", + "x_1 = [0.0455,0.0940,0.1829,0.2909,0.3980,0.5069,0.5458,0.5946,0.7206,0.8145,0.8972,0.9573];\n", + "y_1 = [0.1056,0.1818,0.2783,0.3607,0.4274,0.4885,0.5098,0.5375,0.6157,0.6913,0.7869,0.8916];\n", + "P = [31.957,33.553,35.285,36.457,36.996,37.068,36.978,36.778,35.792,34.372,32.331,30.038];\n", + "\n", + "\t\t\t# Pressure value for which x_1 = y_1 = 0, corresponds to P_2_sat,therefore\n", + "P_2_sat = 29.819;\t\t\t#[kPa]\n", + "\t\t\t# Pressure value for which x_1 = y_1 = 1, corresponds to P_1_sat,therefore\n", + "P_1_sat = 27.778;\t\t\t#[kPa]\n", + "\n", + "x_2 = zeros(12);\n", + "y_2 = zeros(12);\n", + "Y1 = zeros(12);\n", + "Y2 = zeros(12);\n", + "alpha_12 = zeros(12);\n", + "GE_RT = zeros(12);\n", + "x1x2_GE_RT = zeros(12);\n", + "# Calculations and Results\n", + "print \" x_1 \\t\\t y_1 \\t P \\t\\t Y1 \\t\\tY2 \\t alpha_12 \\t G_E/RT \\t x1*x2/G_E/RT\";\n", + "\n", + "for i in range(12):\n", + " x_2[i] = 1 - x_1[i];\n", + " y_2[i] = 1 - y_1[i];\n", + " Y1[i] = (y_1[i]*P[i])/(x_1[i]*P_1_sat);\n", + " Y2[i] = (y_2[i]*P[i])/(x_2[i]*P_2_sat);\n", + " alpha_12[i] = (y_1[i]/x_1[i])/(y_2[i]/x_2[i]);\n", + " GE_RT[i] = x_1[i]*math.log(Y1[i]) + x_2[i]*math.log(Y2[i]);\t\t\t# G_E/(R*T)\n", + " x1x2_GE_RT[i] = (x_1[i]*x_2[i])/GE_RT[i];\n", + " print \" %f\\t %f\\t %f \\t %f \\t %f \\t %f\\t %f \\t%f\"%(x_1[i],y_1[i],P[i],Y1[i],Y2[i],alpha_12[i],GE_RT[i],x1x2_GE_RT[i]);\n", + "\n", + "\t\t\t#[M,N,sig]=reglin(x_1,x1x2_GE_RT);\n", + "M,N,sig,d,e=linregress(x_1,x1x2_GE_RT);\n", + "\n", + "\t\t\t# Linear regression between x_1 and x_1*x_2/(G_E/R*T) gives intercept = N and slope = M\n", + "\n", + "\t\t\t# Now let us assume the system to follow van Laar activity coefficient model. \n", + "\t\t\t# x_1*x_2/(G_E/(R*T)) = x_1/B + x_2/A = x_1/B + (1 - x_1)/A = 1/A + (1/B - 1/A)*x_1 = N + M*x_1\n", + "\n", + "\t\t\t# 1/A = N\n", + "A = 1/N;\n", + "\t\t\t# (1/B - 1/A) = M\n", + "B = 1/(M + 1/A);\n", + "\n", + "print \"\"\n", + "print \" The value of van Laar parameters are, A = %f and B = %f \"%(A,B);\n", + "\n", + "Y1_infinity = math.exp(A);\n", + "Y2_infinity = math.exp(B);\n", + "\n", + "\n", + "\t\t\t\n", + "\t\t\t# Now let us calculate the azeotrope composition.\n", + "\t\t\t# At azeotrope, Y1*P1_sat = Y2*P2_sat\n", + "\t\t\t# math.log(Y1/Y2) = math.log(P_2_sat/P_1_sat)\n", + "\t\t\t# From van Laar model we get\n", + "\t\t\t# math.log(P_2_sat/P_1_sat) = (A*B**(2)*2*x_2**(2))/(A*x_1 + B*x_2)**(2) + (B*A**(2)*2*x_1**(2))/(A*x_1 + B*x_2)**(2)\n", + "\t\t\t# Solving the above equation\n", + "def f(x_1): \n", + "\t return math.log(P_2_sat/P_1_sat) - (A*B**(2)*(1-x_1)**(2))/(A*x_1 + B*(1-x_1))**(2) + (B*A**(2)*x_1**(2))/(A*x_1 + B*(1-x_1))**(2)\n", + "x_1 = fsolve(f,0.1)\n", + "\n", + "print \" The azeotrope composition is given by x_1 = y_1 = %f\"%(x_1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " x_1 \t\t y_1 \t P \t\t Y1 \t\tY2 \t alpha_12 \t G_E/RT \t x1*x2/G_E/RT\n", + " 0.045500\t 0.105600\t 31.957000 \t 2.670039 \t 1.004220 \t 2.476833\t 0.048705 \t0.891698\n", + " 0.094000\t 0.181800\t 33.553000 \t 2.336127 \t 1.016177 \t 2.141582\t 0.094298 \t0.903137\n", + " 0.182900\t 0.278300\t 35.285000 \t 1.932808 \t 1.045150 \t 1.722733\t 0.156610 \t0.954268\n", + " 0.290900\t 0.360700\t 36.457000 \t 1.627355 \t 1.102263 \t 1.375325\t 0.210697 \t0.979023\n", + " 0.398000\t 0.427400\t 36.996000 \t 1.430228 \t 1.180094 \t 1.129007\t 0.242105 \t0.989635\n", + " 0.506900\t 0.488500\t 37.068000 \t 1.285998 \t 1.289486 \t 0.929034\t 0.252871 \t0.988458\n", + " 0.545800\t 0.509800\t 36.978000 \t 1.243394 \t 1.338371 \t 0.865446\t 0.251278 \t0.986567\n", + " 0.594600\t 0.537500\t 36.778000 \t 1.196853 \t 1.407094 \t 0.792366\t 0.245302 \t0.982671\n", + " 0.720600\t 0.615700\t 35.792000 \t 1.100930 \t 1.650961 \t 0.621199\t 0.209369 \t0.961630\n", + " 0.814500\t 0.691300\t 34.372000 \t 1.050218 \t 1.918247 \t 0.510015\t 0.160745 \t0.939933\n", + " 0.897200\t 0.786900\t 32.331000 \t 1.020818 \t 2.247586 \t 0.423097\t 0.101740 \t0.906550\n", + " 0.957300\t 0.891600\t 30.038000 \t 1.007145 \t 2.557286 \t 0.366877\t 0.046909 \t0.871410\n", + "\n", + " The value of van Laar parameters are, A = 1.049085 and B = 1.064514 \n", + " The azeotrope composition is given by x_1 = y_1 = 0.468254\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.20 Page Number : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 25;\t\t\t#[C] - Temperature\n", + "P_1_sat = 230.4;\t\t\t#[mm Hg]\n", + "P_2_sat = 97.45;\t\t\t#[mm Hg]\n", + "Y1_infinity = 8.6;\n", + "Y2_infinity = 6.6;\n", + "\n", + "\t\t\t# Assuming ideal vpour behaviour means that phi = 1 and since system pressure is low, therefore\n", + "\t\t\t# f_i = P_i_sat \n", + "\t\t\t# Assuming the activity coefficients to follow van Laar model we get\n", + "A = math.log(Y1_infinity);\n", + "B = math.log(Y2_infinity);\n", + "\n", + "\t\t\t#math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n", + "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n", + "\n", + "x_1 = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9];\n", + "\n", + "x_2 = zeros(9);\n", + "Y1 = zeros(9);\n", + "Y2 = zeros(9);\n", + "y1_P = zeros(9);\n", + "y2_P = zeros(9);\n", + "P = zeros(9);\n", + "y_1 = zeros(9);\n", + "\n", + "print \" a.\";\n", + "print \" x_1 \\t\\t Y1 \\t\\t Y2 \\t\\t y1*P \\t\\t y2*P \\t\\t P \\t\\t y_1 \";\n", + "# Calculations and Results\n", + "for i in range(9):\n", + " x_2[i] = 1 - x_1[i];\n", + " Y1[i] = math.exp(A/(1+ (A*x_1[i])/(B*x_2[i]))**(2));\n", + " Y2[i] = math.exp(B/(1+ (B*x_2[i])/(A*x_1[i]))**(2));\n", + " y1_P[i] = x_1[i]*Y1[i]*P_1_sat;\n", + " y2_P[i] = x_2[i]*Y2[i]*P_2_sat;\n", + " P[i] = x_1[i]*Y1[i]*P_1_sat + x_2[i]*Y2[i]*P_2_sat;\n", + " y_1[i] = (x_1[i]*Y1[i]*P_1_sat)/P[i];\n", + " print \" %f\\t\\t %f\\t\\t %f \\t\\t %f \\t\\t %f \\t\\t %f \\t %f\"%(x_1[i],Y1[i],Y2[i],y1_P[i],y2_P[i],P[i],y_1[i]);\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t# The total system pressure versus x_1 shows a maxima and thus azeotrope is formed by the VLE system\n", + "\t\t\t# The maxima occurs in the range of x_1 = 0.6 to 0.8, so an azeotrope is formed in this composition range\n", + "\n", + "\t\t\t# At the azeotrope point, Y1*P1_sat = Y2*P2_sat\n", + "\t\t\t# math.log(Y1) - math.log(Y2) = math.log(P_2_sat/P_1_sat)\n", + "\t\t\t# On putting the values and then solving the above equation we get\n", + "def f(x_1): \n", + "\t return A/(1+1.14*x_1/(1-x_1))**(2)- B/(1+0.877*(1-x_1)/x_1)**(2) - math.log(P_2_sat/P_1_sat)\n", + "x_1_prime = fsolve(f,0.1)\n", + "\n", + "\t\t\t# At x_1\n", + "x_2_prime = 1 - x_1_prime;\n", + "Y1_prime = math.exp(A/(1+ (A*x_1_prime)/(B*x_2_prime))**(2));\n", + "Y2_prime = math.exp(B/(1+ (B*x_2_prime)/(A*x_1_prime))**(2));\n", + "P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n", + "y_1_prime = (x_1_prime*Y1_prime*P_1_sat)/P_prime;\n", + "\n", + "\t\t\t# Since x_1 = y_1,azeotrope formation will take place\n", + "print \" b\";\n", + "print \" The total system pressure versus x_1 shows a maxima and thus azeotrope is formed by the VLE system\";\n", + "print \" The azeotrope composition is x_1 = y_1 = %f\"%(x_1_prime);\n", + "print \" The azeotrope presssure is %f mm Hg\"%(P_prime);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a.\n", + " x_1 \t\t Y1 \t\t Y2 \t\t y1*P \t\t y2*P \t\t P \t\t y_1 \n", + " 0.100000\t\t 5.446877\t\t 1.024149 \t\t 125.496041 \t\t 89.822961 \t\t 215.319002 \t 0.582838\n", + " 0.200000\t\t 3.680305\t\t 1.097308 \t\t 169.588473 \t\t 85.546152 \t\t 255.134625 \t 0.664702\n", + " 0.300000\t\t 2.640401\t\t 1.225500 \t\t 182.504521 \t\t 83.597451 \t\t 266.101972 \t 0.685844\n", + " 0.400000\t\t 2.002736\t\t 1.421865 \t\t 184.572186 \t\t 83.136461 \t\t 267.708646 \t 0.689452\n", + " 0.500000\t\t 1.599580\t\t 1.708524 \t\t 184.271623 \t\t 83.247849 \t\t 267.519472 \t 0.688816\n", + " 0.600000\t\t 1.340316\t\t 2.120132 \t\t 185.285311 \t\t 82.642744 \t\t 267.928055 \t 0.691549\n", + " 0.700000\t\t 1.174189\t\t 2.709824 \t\t 189.373156 \t\t 79.221704 \t\t 268.594861 \t 0.705051\n", + " 0.800000\t\t 1.072057\t\t 3.558780 \t\t 197.601501 \t\t 69.360613 \t\t 266.962114 \t 0.740186\n", + " 0.900000\t\t 1.017109\t\t 4.791470 \t\t 210.907696 \t\t 46.692876 \t\t 257.600573 \t 0.818739\n", + " b\n", + " The total system pressure versus x_1 shows a maxima and thus azeotrope is formed by the VLE system\n", + " The azeotrope composition is x_1 = y_1 = 0.706548\n", + " The azeotrope presssure is 268.599631 mm Hg\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.21 Page Number : 544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 50;\t\t\t#[C]\n", + "\t\t\t# At 50 C\n", + "P_1_sat = 0.67;\t\t\t#[atm]\n", + "P_2_sat = 0.18;\t\t\t#[atm]\n", + "Y1_infinity = 2.5;\n", + "Y2_infinity = 7.2;\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t# alpha_12 = (y_1/x_1)/(y_2/x_2) = (Y1*P_1_sat)/((Y2*P_2_sat))\n", + "\t\t\t# At x_1 tending to zero,\n", + "alpha_12_x0 = (Y1_infinity*P_1_sat)/(P_2_sat);\n", + "\t\t\t# At x_1 tending to 1,\n", + "alpha_12_x1 = (P_1_sat)/((Y2_infinity*P_2_sat));\n", + "\n", + "\n", + "print \" 1).Since alpha_12_x=0) = %f and alpha_12_x=1) = %f \"%(alpha_12_x0,alpha_12_x1);\n", + "print \" and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1 shall come and at this composition azeotrope shall get formed.\"\n", + "\n", + "\t\t\t\n", + "print \" 2).Since the activity coefficient values are greater than 1 therefore the deviations from Roults law is positive\"\n", + "print \" and the azeotrope is maximum pressure or minimum boiling\";\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t# Let us assume the system to follow van Laar activity coefficient model\n", + "A = math.log(Y1_infinity);\n", + "B = math.log(Y2_infinity);\n", + "\n", + "\t\t\t# math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n", + "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n", + "\n", + "\t\t\t# At the azeotrope point, Y1*P1_sat = Y2*P2_sat\n", + "\t\t\t# math.log(Y1) - math.log(Y2) = math.log(P_2_sat/P_2_sat)\n", + "\t\t\t# On putting the values and then solving the above equation\n", + "def f(x_1): \n", + "\t return A/(1+ (A*x_1)/(B*(1-x_1)))**(2)- B/(1+ (B*(1-x_1))/(A*x_1))**(2) - math.log(P_2_sat/P_1_sat)\n", + "x_1 = fsolve(f,0.1)\n", + "\n", + "\t\t\t# At x_1\n", + "x_2 = 1 - x_1;\n", + "Y1 = math.exp(A/(1+ (A*x_1)/(B*x_2))**(2));\n", + "Y2 = math.exp(B/(1+ (B*x_2)/(A*x_1))**(2));\n", + "P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n", + "y_1 = (x_1*Y1*P_1_sat)/P;\n", + "\n", + "\t\t\t# Since x_1 = y_1,the azeotrope formation will take place\n", + "\n", + "print \" 3).The azeotrope composition is x_1 = y_1 = %f\"%(x_1);\n", + "print \" The azeotrope presssure is %f atm\"%(P);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).Since alpha_12_x=0) = 9.305556 and alpha_12_x=1) = 0.516975 \n", + " and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1 shall come and at this composition azeotrope shall get formed.\n", + " 2).Since the activity coefficient values are greater than 1 therefore the deviations from Roults law is positive\n", + " and the azeotrope is maximum pressure or minimum boiling\n", + " 3).The azeotrope composition is x_1 = y_1 = 0.910173\n", + " The azeotrope presssure is 0.689143 atm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.22 Page Number : 545" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 25;\t\t\t#[C]\n", + "\t\t\t# At 50 C\n", + "P_1_sat = 7.866;\t\t\t#[kPa]\n", + "P_2_sat = 3.140;\t\t\t#[kPa]\n", + "\n", + "\t\t\t# G_E/(R*T) = 1.4938*x_1*x_2/(1.54*x_1 + 0.97*x_2)\n", + "\n", + "\t\t\t# The excess Gibbs free energy math.expression can be written as\n", + "\t\t\t# x_1*x_2/(G_E/(R*T)) = 1.54*x_1/1.4938 + 0.97*x_2/1.4938 = x_1/0.97 + x_2/1.54\n", + "\n", + "\t\t\t# Comparing with the van Laar math.expression\n", + "\t\t\t# x_1*x_2/(G_E/(R*T)) = x_1/B + x_2/A, we get\n", + "A = 1.54;\n", + "B = 0.97;\n", + "\n", + "\t\t\t# The activity coefficients are thus given by\n", + "\t\t\t# math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n", + "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n", + "\n", + "x_1 = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95];\n", + "\n", + "x_2 = zeros(10);\n", + "Y1 = zeros(10);\n", + "Y2 = zeros(10);\n", + "P = zeros(10);\n", + "y_1 = zeros(10);\n", + "\n", + "print \" x_1 \\t\\t Y1 \\t\\t Y2 \\t\\t P kPa \\t\\t y_1 \";\n", + "\n", + "# Calculations and Results\n", + "for i in range(10):\n", + " x_2[i] = 1 - x_1[i];\n", + " Y1[i] = math.exp(A/(1+ (A*x_1[i])/(B*x_2[i]))**(2));\n", + " Y2[i] = math.exp(B/(1+ (B*x_2[i])/(A*x_1[i]))**(2));\n", + " P[i] = x_1[i]*Y1[i]*P_1_sat + x_2[i]*Y2[i]*P_2_sat;\n", + " y_1[i] = (x_1[i]*Y1[i]*P_1_sat)/P[i];\n", + " print \" %f\\t\\t %f\\t\\t %f \\t\\t %f \\t\\t %f \"%(x_1[i],Y1[i],Y2[i],P[i],y_1[i]);\n", + "\n", + "\n", + "\t\t\t# The azeotrope is formed near x_1 = 0.95 as in this region a maxima in pressure is obtained.\n", + "\n", + "\t\t\t# At the azeotrope point, Y1*P1_sat = Y2*P2_sat\n", + "\t\t\t# math.log(Y1) - math.log(Y2) = math.log(P_2_sat/P_2_sat)\n", + "\t\t\t# On putting the values and then solving the above equation\n", + "def f(x_1): \n", + "\t return A/(1+ (A*x_1)/(B*(1-x_1)))**(2)- B/(1+ (B*(1-x_1))/(A*x_1))**(2) - math.log(P_2_sat/P_1_sat)\n", + "x_1_prime = fsolve(f,0.1)\n", + "\n", + "\t\t\t# At x_1\n", + "x_2_prime = 1 - x_1_prime;\n", + "Y1_prime = math.exp(A/(1+ (A*x_1_prime)/(B*x_2_prime))**(2));\n", + "Y2_prime = math.exp(B/(1+ (B*x_2_prime)/(A*x_1_prime))**(2));\n", + "P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n", + "y_1_prime = (x_1_prime*Y1_prime*P_1_sat)/P_prime;\n", + "\n", + "\t\t\t# Since x_1_prime = y_1_prime,the azeotrope formation will take place\n", + "\n", + "print \" Part II \";\n", + "print \" The azeotrope composition is x_1 = y_1 = %f\"%(x_1_prime);\n", + "print \" The azeotrope presssure is %f kPa \"%(P_prime);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " x_1 \t\t Y1 \t\t Y2 \t\t P kPa \t\t y_1 \n", + " 0.100000\t\t 3.042798\t\t 1.022050 \t\t 5.281779 \t\t 0.453155 \n", + " 0.200000\t\t 2.201629\t\t 1.081457 \t\t 6.180223 \t\t 0.560433 \n", + " 0.300000\t\t 1.725242\t\t 1.172375 \t\t 6.648107 \t\t 0.612389 \n", + " 0.400000\t\t 1.438293\t\t 1.292347 \t\t 6.960227 \t\t 0.650186 \n", + " 0.500000\t\t 1.258593\t\t 1.440723 \t\t 7.211980 \t\t 0.686364 \n", + " 0.600000\t\t 1.144175\t\t 1.617876 \t\t 7.432102 \t\t 0.726584 \n", + " 0.700000\t\t 1.072060\t\t 1.824770 \t\t 7.621913 \t\t 0.774475 \n", + " 0.800000\t\t 1.028913\t\t 2.062721 \t\t 7.770131 \t\t 0.833286 \n", + " 0.900000\t\t 1.006610\t\t 2.333241 \t\t 7.858834 \t\t 0.906775 \n", + " 0.950000\t\t 1.001587\t\t 2.481217 \t\t 7.874109 \t\t 0.950528 \n", + " Part II \n", + " The azeotrope composition is x_1 = y_1 = 0.958680\n", + " The azeotrope presssure is 7.874467 kPa \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 15.23 Page Number : 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 58.7;\t\t\t#[C]\n", + "P = 1;\t\t\t#[atm]\n", + "P = P*101325*10**(-3);\t\t\t#[kPa]\n", + "\n", + "\t\t\t# math.log(P_sat) = 16.6758 - 3674.49/(t + 226.45) - For ethyl alcohol\n", + "\t\t\t# math.log(P_sat) = 13.8216 - 2697.55/(t + 224.37) - For hexane\n", + "\n", + "\t\t\t# Let us take hexane as (1) and ethanol as (2)\n", + "\t\t\t# At 58.7 C\n", + "P_1_sat = math.exp(13.8216 - 2697.55/(T + 224.37));\t\t\t#[kPa]\n", + "P_2_sat = math.exp(16.6758 - 3674.49/(T + 226.45));\t\t\t#[kPa]\n", + "\n", + "# Calculations and Results\n", + "Y1 = P/P_1_sat;\n", + "Y2 = P/P_2_sat;\n", + "\n", + "x_2 = 0.332;\t\t\t# Mol % of ethanol (given)\n", + "x_1 = 1 - x_2;\t\t\t# Mol % of hehane\n", + "\n", + "\t\t\t# The van Laar parameters are given by\n", + "A = ((1 + (x_2*math.log(Y2))/(x_1*math.log(Y1)))**(2))*math.log(Y1);\n", + "B = ((1 + (x_1*math.log(Y1))/(x_2*math.log(Y2)))**(2))*math.log(Y2);\n", + "\n", + "print \" The value of van Laar parameters are A = %f and B = %f \"%(A,B);\n", + "\n", + "\t\t\t# Now let us calvulate the distribution coefficient K\n", + "x_1_prime = 0.5;\t\t\t#[given]\n", + "x_2_prime = 1 - x_1_prime;\n", + "\n", + "\t\t\t# The activity coefficients are thus given by\n", + "\t\t\t# math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n", + "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n", + "\n", + "Y1_prime = math.exp(A/(1+ (A*x_1_prime)/(B*x_2_prime))**(2));\n", + "Y2_prime = math.exp(B/(1+ (B*x_2_prime)/(A*x_1_prime))**(2));\n", + "P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\n", + "\n", + "\t\t\t# We have, K_1 = y_1/x_1 = Y1*P_1_sat/P\n", + "K_1 = Y1_prime*P_1_sat/P_prime;\n", + "\n", + "print \" The distribution coefficient is given by K_1 = %f\"%(K_1)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of van Laar parameters are A = 1.669879 and B = 2.662289 \n", + " The distribution coefficient is given by K_1 = 1.352866\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb new file mode 100755 index 00000000..1053ca6c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb @@ -0,0 +1,738 @@ +{ + "metadata": { + "name": "ch16_1", + "signature": "sha256:a00a89ec39a5812cdf143d7f00f601a0bb401404f1638737e2689f71d07acb65" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : Other Phase Equilibria" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.1 Page Number : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "\n", + "# Variables\t\t\t\n", + "T = 0 + 273.15;\t\t\t#[K] - Temperature\n", + "P = 20*10**(5);\t\t\t#[Pa] - Pressure\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t#componenet 1 : methane (1)\n", + "\t\t\t#componenet 2 : methanol (2)\n", + "\n", + "H_constant = 1022;\t\t\t#[bar] - Henry's law constant\n", + "H_constant = H_constant*10**(5);\t\t\t#[Pa]\n", + "\n", + "\t\t\t# The second virial coefficients are\n", + "B_11 = -53.9;\t\t\t#[cm**(3)/mol]\n", + "B_11 = B_11*10**(-6);\t\t\t#[m**(3)/mol]\n", + "B_12 = -166;\t\t\t#[cm**(3)/mol]\n", + "B_12 = B_12*10**(-6);\t\t\t#[m**(3)/mol]\n", + "B_22 = -4068;\t\t\t#[cm**(3)/mol]\n", + "B_22 = B_22*10**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "den_meth = 0.8102;\t\t\t#[g/cm**(3)] - Density of methanol at 0 C\n", + "Mol_wt_meth = 32.04;\t\t\t# Molecular weight of methanol\n", + "P_2_sat = 0.0401;\t\t\t#[bar] - Vapour pressure of methanol at 0 C\n", + "\n", + "# Calculations\n", + "\t\t\t#The molar volume of methanol can be calculated as\n", + "V_2_liq = (1/(den_meth/Mol_wt_meth))*10**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#The phase equilibrium equation of the components at high pressure\n", + "\t\t\t#y1*phi_1*P = x_1*H_1\n", + "\t\t\t#y2*phi_2*P = x_2*H_2\n", + "\n", + "\t\t\t#Since methane follows Henry's law therefore methanol follows the lewis-Rnadall rule\n", + "\t\t\t#f_2 is the fugacity of the compressed liquid which is calculated using\n", + "\t\t\t#f_2 = f_2_sat*math.exp[V_2_liq*(P - P_sat_2)/(R*T)]\n", + "\t\t\t#where f_2_sat can be calculated using virial equation \n", + "\t\t\t# math.log(phi_2_sat) = math.log(f_2_sat/P_2_sat) = (B_22*P_2_sat)/(R*T)\n", + "\n", + "f_2_sat = P_2_sat*math.exp((B_22*P_2_sat*10**(5))/(R*T));\t\t\t#[bar]\n", + "\n", + "\t\t\t#Putting the value of 'f_2_sat' in the math.expression of f_2 , we get\n", + "f_2 = f_2_sat*math.exp(V_2_liq*(P - P_2_sat*10**(5))/(R*T));\t\t\t#[bar]\n", + "\n", + "\t\t\t#Now let us calculate the fugacity coefficients of the species in the vapour mixture\n", + "del_12 = 2*B_12 - B_11 - B_22;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#math.log(phi_1) = (P/(R*T))*(B_11 + y2**(2)*del_12)\n", + "\t\t\t#math.log(phi_2) = (P/(R*T))*(B_22 + y1**(2)*del_12)\n", + "\n", + "\n", + "\t\t\t#The calculation procedure is to assume a value of y1, calculate 'phi_1' and 'phi_2' and calculate 'x_1' and 'x_2' from the phase equilibrium equations and see whether x_1 + x_2 = 1,if not then another value of y1 is assumed.\n", + "\n", + "y2 = 0.1;\n", + "error=10;\n", + "\n", + "while(error>0.001):\n", + " y1=1-y2;\n", + " phi_1 = math.exp((P/(R*T))*((B_11 + y2**(2)*del_12)));\n", + " phi_2 = math.exp((P/(R*T))*((B_22 + y1**(2)*del_12)));\n", + " x_1 = (y1*phi_1*P)/H_constant;\n", + " x_2 = (y2*phi_2*P)/(f_2*10**(5));\n", + " x = x_1 + x_2;\n", + " error=abs(1-x);\n", + " y2=y2 - 0.000001;\n", + "\n", + "# Results\n", + "print \" The solubility of methane in methanol is given by x1 = %f\"%(x_1);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The solubility of methane in methanol is given by x1 = 0.018614\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.2 Page Number : 566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "x_C2H6_1 = 0.33*10**(-4);\t\t\t# Solubility of ethane in water at 25 C and 1 bar\n", + "\n", + "\t\t\t#componenet 1 : ethane (1)\n", + "\t\t\t#componenet 2 : water (2)\n", + "\n", + "\t\t\t# Z = 1 - 7.63*10**(3)*P - 7.22*10**(-5)*P**(2)\n", + "\n", + "\t\t\t#The phase equilibrium equation of ethane is\n", + "\t\t\t#f_1_V = x_1*H_1\n", + "\t\t\t#since vapour is pure gas, f_1_V = x_1*H_1 or, phi_1*P = x_1*H_1, where 'phi_1' is fugacity coefficient of pure ethane\n", + "\t\t\t# math.log(phi) = integral('Z-1)/P) from limit '0' to 'P'\n", + "\n", + "P1 = 0;\n", + "P2 = 1;\n", + "P3 = 35;\n", + "\n", + "# Calculations\n", + "def f51(P): \n", + "\t return (1-7.63*10**(-3)*P-7.22*10**(-5)*P**(2)-1)/P\n", + "\n", + "intgral = quad(f51,P1,P2)[0]\n", + "\n", + "phi_1_1 = math.exp(intgral);\t\t\t# - Fugacity coefficient of ethane at 1 bar\n", + "f_1_1 = phi_1_1*P2;\t\t\t#[bar] - Fugacity of ethane at 1 bar\n", + "\n", + "\t\t\t#Similarly\n", + "\n", + "def f52(P): \n", + "\t return (1-7.63*10**(-3)*P-7.22*10**(-5)*P**(2)-1)/P\n", + "\n", + "intgral_1 = quad(f52,P1,P3)[0]\n", + "\n", + "phi_1_35 = math.exp(intgral_1);\t\t\t# Fugacity coefficient of ethane at 35 bar\n", + "f_1_35 = phi_1_35*P3;\t\t\t#[bar] - Fugacity of ethane at 35 bar\n", + "\n", + "\t\t\t# At ethane pressure of 1 bar , x_C2H6_1*H_1 = phi_1_1\n", + "H_1 = phi_1_1/x_C2H6_1;\t\t\t#[bar] - Henry's constant\n", + "\n", + "\t\t\t# At ethane pressure of 35 bar , x_C2H6_35*H_1 = phi_1_35\n", + "x_C2H6_35 = f_1_35/H_1;\t\t\t# Solubility of ethane at 35 bar pressure\n", + "\n", + "# Results\n", + "print \"The solubility of ethane at 35 bar is given by x_C2H6 = %e \"%(x_C2H6_35);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The solubility of ethane at 35 bar is given by x_C2H6 = 8.525648e-04 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.4 Page Number : 571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "T = 200;\t\t\t#[K]\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "\t\t\t# G_E = A*x_1*x_2\n", + "A = 4000;\t\t\t#[J/mol]\n", + "x_1 = 0.6;\t\t\t# Mle fraction of feed composition\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Since A is given to be independent of temperature\n", + "UCST = A/(2*R);\t\t\t#[K] - Upper critical solution temperature\n", + "print \" The UCST of the system is %f K\"%(UCST);\n", + "\n", + "\t\t\t# Since the given temperature is less than UCST therefore two phase can get formed at the given temperature.\n", + "\n", + "\t\t\t# x1_alpha = 1 - x1_beta\n", + "\t\t\t# We know that, x1_alpha*Y_1_alpha = x2_alpha*Y_2_alpha\n", + "\t\t\t# x1_alpha*math.exp[(A/(R*T))*(x2_alpha)**(2)] = (1 - x1_alpha)*math.exp[(A/(R*T))*(x1_alpha)**(2)]\n", + "\t\t\t# where use has beeen made of the fact that x1_alpha = 1 - x1_beta and x2_beta = 1 - x1_beta = x1_alpha .Taking math.logarithm of both side we get\n", + "\t\t\t# math.log(x1_alpha) + (A/(R*T))*(1 - x1_alpha)**(2) = math.log(1 - x1_alpha) + (A/(R*T))*x1_alpha**(2)\n", + "\t\t\t# math.log(x1_alpha/(1-x1_alpha)) = (A/(R*T))*(2*x1_alpha - 1)\n", + "\n", + "def f(x1_alpha): \n", + "\t return math.log(x1_alpha/(1-x1_alpha)) - (A/(R*T))*(2*x1_alpha - 1)\n", + "x1_alpha = fsolve(f,0.1)\n", + "x1_beta = fsolve(f,0.9)\n", + "\t\t\t# Because of symmetry 1 - x1_beta = x1_alpha\n", + "\n", + "\t\t\t# It can be seen that the equation, math.log(x1/(1-x1)) = (A/(R*T))*(2*x1 - 1) has two roots.\n", + "\t\t\t\n", + "print \" The composition of two liquid phases in equilibrium is given by x1_alpha = %f and x1_beta = %f\"%(x1_alpha,x1_beta);\n", + "\n", + "z1 = 0.6;\n", + "\t\t\t# z1 = x1_alpha*alpha + x1_beta*beta\n", + "\t\t\t# beta = 1 - alpha\n", + "alpha = (z1-x1_beta)/(x1_alpha-x1_beta);\t\t\t#[mol]\n", + "Beta = 1 - alpha;\t\t\t#[mol]\n", + "print \" The relative amount of phases is given by alpha = %f mol and beta = %f mol\"%(alpha,Beta);\n", + "\n", + "\t\t\t# the relative amounts of the phases changes with the feed composition \n", + "\n", + "\t\t\t#math.log(x1/(1-x1)) = (A/(R*T))*(2*x1 - 1)\n", + "\t\t\t\n", + "\n", + "print \" math.logx1/1-x1 = A/R*T*2*x1 - 1\";\n", + "print \" If the above equation has two real roots of x1 one for phase alpha and the other for phase beta then two liquid phases get formed\";\n", + "print \" and if it has no real roots then a homogeneous liquid mixture is obtained\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The UCST of the system is 240.558095 K\n", + " The composition of two liquid phases in equilibrium is given by x1_alpha = 0.169102 and x1_beta = 0.830898\n", + " The relative amount of phases is given by alpha = 0.348896 mol and beta = 0.651104 mol\n", + " math.logx1/1-x1 = A/R*T*2*x1 - 1\n", + " If the above equation has two real roots of x1 one for phase alpha and the other for phase beta then two liquid phases get formed\n", + " and if it has no real roots then a homogeneous liquid mixture is obtained\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.5 Page Number : 573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 300;\t\t\t#[K]\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "A = 7000;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# math.log(x_1/(1-x_1)) = (A/(R*T))*(2*x_1-1)\n", + "\n", + "# Calculations\n", + "def f(x_1): \n", + "\t return math.log(x_1/(1-x_1))-((A/(R*T))*(2*x_1-1))\n", + "\n", + "x1_alpha=fsolve(f,0.1)\n", + "\n", + "x1_beta=1-x1_alpha;\n", + "\n", + "# Results\n", + "print \"The equilibrium compositin of the two liquid phase system is given by x1_alpha \\t = %f x1_beta \\t = %f\"%(x1_alpha,x1_beta);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equilibrium compositin of the two liquid phase system is given by x1_alpha \t = 0.091897 x1_beta \t = 0.908103\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.7 Page Number : 579" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "M_wt_meth = 32;\t\t\t# Molecular weight of methanol \n", + "M_wt_water = 18;\t\t\t# Molecular weight of water \n", + "m_meth = 0.01;\t\t\t#[g] - Mass of methanol added per cm**(3) of solution\n", + "\n", + "\n", + "den_sol = 1;\t\t\t#[g/cm**(3)]\n", + "\n", + "# Calculations\n", + "\t\t\t#The mole fraction of solute is given by\n", + "\t\t\t#x_2 = (moles of solute in cm**(3) of solution)/(moles of solute + moles of water) in 1 cm**(3) of solution\n", + "x_2 = (m_meth/M_wt_meth)/((m_meth/M_wt_meth)+((1-m_meth)/M_wt_water));\n", + "\n", + "\t\t\t#We know that heat of fusion of water is\n", + "H_fus = -80;\t\t\t#[cal/g] - Enthalpy change of fusion at 0 C\n", + "H_fus = H_fus*4.186*M_wt_water;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t#Therefore freezing point depression is given by\n", + "\t\t\t# T - T_m = (R*(T**(2))*x_2)/H_fus\n", + "T_f = 273.15;\t\t\t#[K] - Freezing point of water\n", + "delta_T_f = (R*(T_f**(2))*x_2)/H_fus;\t\t\t#[K]\n", + "\n", + "# Results\n", + "print \"The depression in freezing point is given by delta_T = %f K\"%(delta_T_f);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The depression in freezing point is given by delta_T = -0.581403 K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.8 Page Number : 580" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "T_f = 273.15;\t\t\t#[K] - Freezing point of water\n", + "m_water = 100;\t\t\t#[g] - Mass of water\n", + "m_NaCl = 3.5;\t\t\t#[g] - Mass of NaCl\n", + "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n", + "M_wt_NaCl = 58.5;\t\t\t# Molecular weight of NaCl\n", + "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n", + "mol_NaCl = m_NaCl/M_wt_NaCl;\t\t\t#[mol] - Moles of NaCl\n", + "\n", + "H_fus = -80;\t\t\t#[cal/g] - Enthalpy change of fusion at 0 C\n", + "H_fus = H_fus*4.186*M_wt_water;\t\t\t#[J/mol]\n", + "\n", + "# Calculations\n", + "\t\t\t#Mole fraction of the solute (NaCl) is given by\n", + "x_2 = mol_NaCl/(mol_NaCl+mol_water);\n", + "\n", + "\n", + "x_2_act = 2*x_2;\t\t\t# Actual mole fraction\n", + "\n", + "\t\t\t#Now depression in freezing point is given by\n", + "\t\t\t# T - T_m = (R*(T**(2))*x_2_act)/H_fus\n", + "delta_T_f = (R*(T_f**(2))*x_2_act)/H_fus;\t\t\t#[C]\n", + "\n", + "\t\t\t#Thus freezing point of seawater = depression in freezing point\n", + "\n", + "# Results\n", + "print \"The freezing point of seawater is %f C\"%(delta_T_f);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The freezing point of seawater is -2.192853 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.10 Page Number : 583" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "T_b = 373.15;\t\t\t#[K] - Boiling point of water\n", + "m_water = 100.;\t\t\t#[g] - Mass of water\n", + "m_C12H22 = 5.;\t\t\t#[g] - Mass of glucise (C12H22)\n", + "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n", + "M_wt_C12H22 = 342.30;\t\t\t# Molecular weight of C12H22\n", + "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n", + "mol_C12H22 = m_C12H22/M_wt_C12H22;\t\t\t#[mol] - Moles of C12H22\n", + "\n", + "# Calculations\n", + "H_vap = 540.;\t\t\t#[cal/g] - Enthalpy change of vaporisation\n", + "H_vap = H_vap*4.186*M_wt_water;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t#Mole fraction of the solute (C12H22) is given by\n", + "x_2 = mol_C12H22/(mol_C12H22+mol_water);\n", + "\n", + "\t\t\t#The boiling point elevation is given by\n", + "\t\t\t# T - T_b = (R*T_b**(2)*x_2**(2))/H_vap**(2)\n", + "\n", + "delta_T_b = (R*T_b**(2)*x_2)/(H_vap);\n", + "\n", + "# Results\n", + "print \"The elevation in boiling point is given by delta_T = %f C\"%(delta_T_b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The elevation in boiling point is given by delta_T = 0.074611 C\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.11 Page Number : 584" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "T = 25 + 273.15;\t\t\t#[K] - Surrounding temperature \n", + "den_water = 1000.;\t\t\t#[kg/m**(3)] - Density of water\n", + "m_water = 100.;\t\t\t#[g] - Mass of water\n", + "m_C12H22 = 5.;\t\t\t#[g] - Mass of glucise (C12H22)\n", + "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n", + "M_wt_C12H22 = 342.30;\t\t\t# Molecular weight of C12H22\n", + "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n", + "mol_C12H22 = m_C12H22/M_wt_C12H22;\t\t\t#[mol] - Moles of C12H22\n", + "\n", + "# Calculations\n", + "\t\t\t#Mole fraction of the water is given by\n", + "x_1 = mol_water/(mol_C12H22+mol_water);\n", + "\n", + "\t\t\t#Molar volume of water can be calculated as\n", + "V_l_water = (1./den_water)*M_wt_water*10**(-3);\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#The osmotic pressure is given by\n", + "pi = -(R*T*math.log(x_1))/V_l_water;\t\t\t#[N/m**(2)]\n", + "pi = pi*10**(-5);\t\t\t#[bar]\n", + "\n", + "# Results\n", + "print \"The osmotic pressure of the mixture is %f bar\"%(pi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The osmotic pressure of the mixture is 3.616073 bar\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.12 Page Number : 585" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "T = 25 + 273.15;\t\t\t#[K] - Surrounding temperature\n", + "den_water = 1000.;\t\t\t#[kg/m**(3)] - Density of water\n", + "m_water = 100.;\t\t\t#[g] - Mass of water\n", + "m_NaCl = 3.5;\t\t\t#[g] - Mass of NaCl\n", + "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n", + "M_wt_NaCl = 58.5;\t\t\t# Molecular weight of NaCl\n", + "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n", + "mol_NaCl = m_NaCl/M_wt_NaCl;\t\t\t#[mol] - Moles of NaCl\n", + "\n", + "# Calculations\n", + "H_fus = -80.;\t\t\t#[cal/g] - Enthalpy change of fusion at 0 C\n", + "H_fus = H_fus*4.186*M_wt_water;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t#Mole fraction of the solute (NaCl) is given by\n", + "x_2 = mol_NaCl/(mol_NaCl+mol_water);\n", + "\n", + "\n", + "x_2_act = 2*x_2;\t\t\t# Actual mole fraction\n", + "\n", + "x_1 = 1 - x_2_act;\n", + "\n", + "\t\t\t#Molar volume of water can be calculated as\n", + "V_l_water = (1/den_water)*M_wt_water*10**(-3);\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#The osmotic pressure is given by\n", + "pi = -(R*T*math.log(x_1))/V_l_water;\t\t\t#[N/m**(2)]\n", + "pi = pi*10**(-5);\t\t\t#[bar]\n", + "\n", + "\n", + "# Results\n", + "print \"The minimum pressure to desalinate sea water is %f bar\"%(pi);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum pressure to desalinate sea water is 29.662232 bar\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.13 Page Number : 586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "T = 173.15;\t\t\t#[K] - Surrounding temperature\n", + "P = 60;\t\t\t#[bar]\n", + "P = P*10**(5);\t\t\t#[Pa] \n", + "\n", + "\t\t\t#componenet 1 : CO2 (1)\n", + "\t\t\t#componenet 2 : H2 (2)\n", + "P_1_sat = 0.1392;\t\t\t#[bar] - Vapour pressre of pure solid CO2\n", + "P_1_sat = P_1_sat*10**(5);\t\t\t#[bar]\n", + "V_s_1 = 27.6;\t\t\t#[cm**(3)/mol] - Molar volume of solid CO2\n", + "V_s_1 = V_s_1*10**(-6);\t\t\t#[m**(3)/mol]\n", + "n_1 = 0.01;\t\t\t#[mol] - Initial number of moles of CO2\n", + "n_2 = 0.99;\t\t\t#[mol] - Initial number of moles of H2\n", + "\n", + "\t\t\t#Let us determine the fugacity of solid CO2 (1) at 60 C and 173.15 K\n", + "\t\t\t# f_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T))\n", + "\n", + "# Calculations\n", + "\t\t\t#Since vapour pressure of pure solid CO2 is very small, therefore\n", + "f_1_sat = P_1_sat;\n", + "f_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T));\n", + "\n", + "\t\t\t#Since gas phase is ideal therefore\n", + "\t\t\t# y1*P = f_1\n", + "y1 = f_1/P;\n", + "\n", + "\t\t\n", + "\t\t\t#Number of moles of CO2 in vapour phase at equilibrium can be calculated as\n", + "\t\t\t#y1 = (n_1_eq/(n_1_eq + n_2)). Therefore\n", + "n_1_eq = n_2*y1/(1-y1);\n", + "\n", + "\t\t\t#Therefore moles of CO2 precipitated is\n", + "n_ppt = n_1 - n_1_eq;\t\t\t#[mol]\n", + "\n", + "# Results\n", + "print \"The moles of CO2 precipitated is %f mol\"%(n_ppt);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moles of CO2 precipitated is 0.007417 mol\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 16.14 Page Number : 586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n", + "T = 350.;\t\t\t#[K] - Surrounding temperature\n", + "\n", + "\t\t\t#componenet 1 : organic solid (1)\n", + "\t\t\t#componenet 2 : CO2 (2)\n", + "\n", + "P_1_sat = 133.3;\t\t\t#[N/m**(2)] - Vapour pressre of organic solid\n", + "V_s_1 = 200.;\t\t\t#[cm**(3)/mol] - Molar volume of organic solid\n", + "V_s_1 = V_s_1*10.**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#/At 350 K, the values of the coefficients \n", + "B_11 = -500.;\t\t\t#[cm**(3)/mol]\n", + "B_22 = -85.;\t\t\t#[cm****(3)/mol]\n", + "B_12 = -430.;\t\t\t#[cm**(3)/mol]\n", + "\n", + "# Calculations\n", + "\t\t\t#From phase equilibrium equation of component 1, we get\n", + "\t\t\t# y1*P*phi_1 = f_1\n", + "\t\t\t# f_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T))\n", + "\n", + "\t\t\t#Since vapour pressure of organic solid is very small, therefore\n", + "f_1_sat = P_1_sat;\n", + "\n", + "\t\t\t# Now let us determine the fugacity coefficient of organic solid in the vapour mixture.\n", + "\t\t\t# math.log(phi_1) = (P/(R*T))*(B_11 + y2**(2)*del_12) \n", + "del_12 = (2*B_12 - B_11 - B_22)*10**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#It is given that the partial pressure of component 1 in the vapour mixture is 1333 N?m**(2)\n", + "\t\t\t# y1*P = 1333 N/m**(2) or, y1 = 1333/P\n", + "\t\t\t# y2 = 1- 1333/P\n", + "\t\t\t# math.log(phi_1) = (P/(R*T))*(B_11 + (1- 1333/P)**(2)*del_12)\n", + "\n", + "\t\t\t#The phase equilibrium equation becomes\n", + "\t\t\t# y1*P*phi_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T))\n", + "\t\t\t#Taking math.log on both side we have\n", + "\t\t\t# math.log(y1*P) + math.log(phi_1) = math.log(f_1_sat) + (V_s_1*(P-P_1_sat)/(R*T))\n", + "\t\t\t# (V_s_1*(P-P_1_sat)/(R*T)) - math.log(phi_1) = math.log(1333/133.3) = math.log(10)\n", + "\n", + "\t\t\t#substituting for math.log(phi_1) from previous into the above equation we get\n", + "\t\t\t# (V_s_1*(P-P_1_sat)/(R*T)) - (P/(R*T))*(B_11 + (1- 1333/P)**(2)*del_12) - math.log(10) = 0\n", + "\t\t\t# On simplification we get,\n", + "\t\t\t# 975*P**(2) - 6.7*10**(9)*P + 4.89*10**(8) = 0\n", + "\t\t\t# Solving the above qyadratic equation using shreedharcharya rule\n", + "\n", + "P3 = (6.7*10**(9) + ((-6.7*10**(9))**(2)-4*975*4.98*10**(8))**(1./2))/(2*975);\t\t\t#[Pa]\n", + "P4 = (6.7*10**(9) - ((-6.7*10**(9))**(2)-4*975*4.98*10**(8))**(1./2))/(2*975);\t\t\t#[Pa]\n", + "\t\t\t# The second value is not possible, therefore pressure of the system is P3\n", + "P3 = P3*10**(-5);\t\t\t#[bar]\n", + "\n", + "# Results\n", + "print \" The total pressure of the system is %f bar\"%(P3);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total pressure of the system is 68.717948 bar\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb new file mode 100755 index 00000000..61fcd6b8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb @@ -0,0 +1,2044 @@ +{ + "metadata": { + "name": "ch17_1", + "signature": "sha256:e354b0525ce1aff27214eb76f8a2c9be56cfff2939a8a4b8688a7fe1cea4959c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : Chemical Reactions Equilibria" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.2 Page Number : 598" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "\n", + "# Variables\n", + "P = 1;\t\t\t#[atm] - Reactor pressure\n", + "T = 749;\t\t\t#[K] - Reactor temperature\n", + "K = 74;\t\t\t# Equlibrium constant\n", + "\n", + "\t\t\t# SO2 + (1/2)*O2 - SO3\n", + "\n", + "# Calculations and Results\n", + "Kp = P**(1);\n", + "Ky = K/Kp;\n", + "\n", + "\t\t\t#(1)\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_SO2_1_in = 12;\n", + "n_O2_1_in = 9;\n", + "n_SO3_1_in = 0;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_SO2_1_eq = 12 - X\n", + "\t\t\t# n_O2_1_eq = 9 - 0.5*X\n", + "\t\t\t# n_SO3_1_eq = X\n", + "\t\t\t# Total moles = 21 - 0.5*X\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "\t\t\t# y_SO3 = X/(21-0.5*X)\n", + "\t\t\t# y_SO2 = (12-X)/(21-0.5*X)\n", + "\t\t\t# y_O2 = (9-0.5*X)/(21-0.5*X)\n", + "\n", + "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n", + "\t\t\t# Ky = (X*(21-0.5*X)**(1/2))/((12-X)*(9-0.5*X)**(1/2))\n", + "def f(X): \n", + "\t return Ky-(X*(21-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n", + "X_1 = fsolve(f,11)\n", + "\n", + "y_SO3_1 = X_1/(21-0.5*X_1);\n", + "y_SO2_1 = (12-X_1)/(21-0.5*X_1);\n", + "y_O2_1 = (9-0.5*X_1)/(21-0.5*X_1);\n", + "\n", + "print \" 1).The moles of SO3 formed = %f mol\"%(X_1);\n", + "print \" The mole fractions at equilibrium are y_S03 = %f y_SO2 = %f and y_O2 = %f\"%(y_SO3_1,y_SO2_1,y_O2_1);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_SO2_2_in = 24;\n", + "n_O2_2_in = 18;\n", + "n_SO3_2_in = 0;\n", + "\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_SO2_1_eq = 24 - X\n", + "\t\t\t# n_O2_1_eq = 18 - 0.5*X\n", + "\t\t\t# n_SO3_1_eq = X\n", + "\t\t\t# Total moles = 42 - 0.5*X\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "\t\t\t# y_SO3 = X/(42-0.5*X)\n", + "\t\t\t# y_SO2 = (24-X)/(42-0.5*X)\n", + "\t\t\t# y_O2 = (18-0.5*X)/(42-0.5*X)\n", + "\n", + "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n", + "\t\t\t# Ky = (X*(42-0.5*X)**(1/2))/((24-X)*(18-0.5*X)**(1/2))\n", + "def f1(X): \n", + "\t return Ky-(X*(42-0.5*X)**(1./2))/((24-X)*(18-0.5*X)**(1./2))\n", + "X_2 = fsolve(f1,22)\n", + "\n", + "y_SO3_2 = X_2/(42-0.5*X_2);\n", + "y_SO2_2 = (24-X_2)/(42-0.5*X_2);\n", + "y_O2_2 = (18-0.5*X_2)/(42-0.5*X_2);\n", + "print \" 2).The moles of SO3 formed = %f mol\"%(X_2);\n", + "print \" The mole fractions at equilibrium are y_S03 = %f, y_SO2 = %f and y_O2 = %f\"%(y_SO3_2,y_SO2_2,y_O2_2);\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_SO2_3_in = 12;\n", + "n_O2_3_in = 9;\n", + "n_SO3_3_in = 0;\n", + "n_N2 = 79;\n", + "\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_SO2_1_eq = 12 - X\n", + "\t\t\t# n_O2_1_eq = 9 - 0.5*X\n", + "\t\t\t# n_SO3_1_eq = X\n", + "\t\t\t# Total moles = 100 - 0.5*X\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "\t\t\t# y_SO3 = X/(100-0.5*X)\n", + "\t\t\t# y_SO2 = (12-X)/(100-0.5*X)\n", + "\t\t\t# y_O2 = (9-0.5*X)/(100-0.5*X)\n", + "\n", + "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n", + "\t\t\t# Ky = (X*(100-0.5*X)**(1/2))/((12-X)*(9-0.5*X)**(1/2))\n", + "def f2(X): \n", + "\t return Ky-(X*(100-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n", + "X_3 = fsolve(f2,10)\n", + "\n", + "y_SO3_3 = X_3/(100-0.5*X_3);\n", + "y_SO2_3 = (12-X_3)/(100-0.5*X_3);\n", + "y_O2_3 = (9-0.5*X_3)/(100-0.5*X_3);\n", + "\n", + "print \" 3).The moles of SO3 formed = %f mol\"%(X_3);\n", + "print \" The mole fractions at equilibrium are y_S03 = %f y_SO2 = %f and y_O2 = %f\"%(y_SO3_3,y_SO2_3,y_O2_3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The moles of SO3 formed = 11.655537 mol\n", + " The mole fractions at equilibrium are y_S03 = 0.768215 y_SO2 = 0.022704 and y_O2 = 0.209081\n", + " 2).The moles of SO3 formed = 23.311074 mol\n", + " The mole fractions at equilibrium are y_S03 = 0.768215, y_SO2 = 0.022704 and y_O2 = 0.209081\n", + " 3).The moles of SO3 formed = 11.202213 mol\n", + " The mole fractions at equilibrium are y_S03 = 0.118669 y_SO2 = 0.008451 and y_O2 = 0.036006\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.3 Page Number : 599" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 600;\t\t\t#[K] - Reactor temperature\n", + "P = 300;\t\t\t#[atm] - Reactor pressure\n", + "K = 0.91*10**(-4);\t\t\t# Equilibrium constant\n", + "\n", + "\t\t\t# The fugacity coefficients of the components are\n", + "phi_CO = 1.0;\n", + "phi_H2 = 1.2;\n", + "phi_CH3OH = 0.47;\n", + "\n", + "\t\t\t# CO + 2*H2 - CH3OH \n", + "\n", + "\t\t\t# For gas phase reactions the standard state is pure ideal gas and thus fi_0 = 1 atm and thus\n", + "\t\t\t# ai_cap = fi_cap/fi_0 = yi*P*phi_i_cap/1\n", + "\t\t\t# Thus K = Ky*Kp*K_phi\n", + "# Calculations and Results \n", + "Kp = P**(1-3);\n", + "K_phi = phi_CH3OH/(phi_CO*phi_H2**(2));\n", + "Ky = K/(Kp*K_phi);\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium ,the moles of the components be \n", + "\t\t\t# n_CO = 1 - X\n", + "\t\t\t# n_H2 = 3 - 2*X\n", + "\t\t\t# n_CH3OH = X\n", + "\t\t\t# Total moles = 4 - 2*X\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "\t\t\t# y_CO = (1-X)/(4-2*X)\n", + "\t\t\t# y_H2 = (3-2*X)/(4-2*X)\n", + "\t\t\t# y_CH3OH = (X)/(4-2*X)\n", + "\n", + "\t\t\t# Ky = y_CH3OH/(y_CO*y_H2**(2)) = (X/(4-2*X))/(((1-X)/(4-2*X))*((3-2*X)/(4-2*X))**(2))\n", + "def f(X): \n", + "\t return Ky-(X/(4-2*X))/(((1-X)/(4-2*X))*((3-2*X)/(4-2*X))**(2))\n", + "X = fsolve(f,0.1)\n", + "\n", + "\t\t\t# Therefore at equilibrium \n", + "y_CO = (1-X)/(4-2*X);\n", + "y_H2 = (3-2*X)/(4-2*X);\n", + "y_CH3OH = (X)/(4-2*X);\n", + "\n", + "print \" The mole fractions at equilibrium are y_CO = %f y_H2 = %f and y_CH3OH = %f\"%(y_CO,y_H2,y_CH3OH);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mole fractions at equilibrium are y_CO = 0.051857 y_H2 = 0.551857 and y_CH3OH = 0.396286\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.4 Page Number : 600" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\t\t\n", + "T = 600;\t\t\t#[K] - Reactor temperature\n", + "P = 4;\t\t\t#[atm] - Reactor pressure\n", + "K = 1.175;\t\t\t# Equilibrium constant\n", + "\n", + "\t\t\t# (1/2)*N2 + (3/2)*H_2 - NH3\n", + "\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_N2 = 1;\n", + "n_H2 = 3;\n", + "n_HN3 = 0;\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X.\n", + "\t\t\t# At equilibrium ,the moles of the components be \n", + "\t\t\t# n_N2 = 1 - 0.5*X\n", + "\t\t\t# n_H2 = 3 - 1.5*X\n", + "\t\t\t# n_NH3 = X\n", + "\t\t\t# Total moles = 4 - X\n", + "\n", + "\t\t\t# We have, K = Ky*Kp\n", + "Kp = P**(1-2);\t\t\t#[atm**(-1)]\n", + "Ky = K/(Kp);\n", + "\n", + "\t\t\t# Ky = y_NH3/(y_N2**(1/2)*y_H2**(3/2)) = (X/(4-X))/(((1-0.5*X)/(4-X))**(1/2)*((3-1.5*X)/(4-X))**(3/2))\n", + "\t\t\t# Solving the above equation we get\n", + "def f(X): \n", + "\t return Ky - (X/(4-X))/(((1-0.5*X)/(4-X))**(1./2)*((3-1.5*X)/(4-X))**(3./2))\n", + "X = fsolve(f,0.1)\n", + "\n", + "y_NH3 = X/(4-X);\t\t\t# Mole fraction of NH3 at equilibrium\n", + "\n", + "print \" The value of Kp = %f and Ky = %f \"%(Kp,Ky);\n", + "print \" The mole fractions of NH3 at equilibrium is %f\"%(y_NH3);\n", + "\n", + "\t\t\t\n", + "\n", + "\t\t\t# We know that for ideal gas, P*V = n*R*T and thus P is directly proportional to n at constant V and T.\n", + "\t\t\t# Let P = k*n\n", + "\t\t\t# Initially P = 4 atm and n = 4 moles, thus K = 1 and we get p = n, where P is in atm. \n", + "\t\t\t# Thus at equilibrium P = 4 - X\n", + "\n", + "\t\t\t# Ky = K/Kp = 1.175*P = 1.175*(4 - X)\n", + "\t\t\t# (X/(4-X))/(((1-0.5*X)/(4-X))**(1/2)*((3-1.5*X)/(4-X))**(3/2)) = 1.175*(4 - X)\n", + "\t\t\t# Solving the above equation we get\n", + "def f1(X): \n", + "\t return (X/(4-X))/(((1-0.5*X)/(4-X))**(1./2)*((3-1.5*X)/(4-X))**(3./2))-1.175*(4-X)\n", + "X_prime = fsolve(f1,1)\n", + "\n", + "\t\t\t# Therefore at equilibrium \n", + "P_prime = 4 - X_prime;\n", + "y_NH3_prime = X_prime/(4-X_prime);\n", + "\n", + "print \" If reaction is carried out at constant temperature and volumethen\"\n", + "print \" The equilibrium pressure is %f atm\"%(P_prime);\n", + "print \" The equilibrium mole fractions of NH3 in the reactor is %f\"%(y_NH3_prime);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of Kp = 0.250000 and Ky = 4.700000 \n", + " The mole fractions of NH3 at equilibrium is 0.454388\n", + " If reaction is carried out at constant temperature and volumethen" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The equilibrium pressure is 2.863057 atm\n", + " The equilibrium mole fractions of NH3 in the reactor is 0.397108\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.5 Page Number : 601" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 400;\t\t\t#[K] - Reactor temperature\n", + "P = 1;\t\t\t#[atm] - Reactor pressure\n", + "K = 1.52;\t\t\t# Equilibrium constant\n", + "y_H2 = 0.4;\t\t\t# Equilibrium mole fraction of hydrogen\n", + "\n", + "# Calculations\n", + "\t\t\t# CO(g) + 2*H_2(g) - CH3OH(g)\n", + "\n", + "\t\t\t# K = y_CH3OH/(y_CO*y_H2**(2)*P**(2))\n", + "\t\t\t# Let total number of moles at equilibrium be 1\n", + "\t\t\t# y_CH3OH = 0.6 - y_CO;\n", + "\t\t\t# (0.6 - y_CO)/y_CO = K*P**(2)*y_H2**(2)\n", + "\n", + "y_CO = 0.6/(1 + K*P**(2)*y_H2**(2));\n", + "y_CH3OH = 0.6 - y_CO;\n", + "\n", + "\n", + "# Results\n", + "print \" The mole fractions are y_CO = %f and y_CH3OH = %f \"%(y_CO,y_CH3OH);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mole fractions are y_CO = 0.482625 and y_CH3OH = 0.117375 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.6 Page Number : 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 749.;\t\t\t#[K] - Reactor temperature\n", + "P = 1.;\t\t\t#[atm] - Reactor pressure\n", + "K = 74.;\n", + "\n", + "# Calculations and Results\n", + "Kp = P**(-1./2);\t\t\t#[atm**(-1/2)]\n", + "Ky = K/Kp;\n", + "\n", + "\t\t\t# SO2 + (1/2)*O2 - SO3\n", + "\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_SO2_1_in = 10;\n", + "n_O2_1_in = 8;\n", + "n_SO3_1_in = 0;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_SO2_1_eq = 10 - X\n", + "\t\t\t# n_O2_1_eq = 8 - 0.5*X\n", + "\t\t\t# SO3_1_eq = X\n", + "\t\t\t# Total moles = 18 - 0.5*X\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "\t\t\t# y_SO3 = X/(18-0.5*X)\n", + "\t\t\t# y_SO2 = (10-X)/(18-0.5*X)\n", + "\t\t\t# y_O2 = (8-0.5*X)/(18-0.5*X)\n", + "\n", + "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n", + "\t\t\t# Ky = (X*(18-0.5*X)**(1/2))/((10-X)*(8-0.5*X)**(1/2))\n", + "def f(X): \n", + "\t return Ky-(X*(18-0.5*X)**(1./2))/((10-X)*(8-0.5*X)**(1./2))\n", + "X_1 = fsolve(f,11)\n", + "\n", + "n_SO3 = X_1;\n", + "n_SO2 = 10 - X_1;\n", + "n_O2 = 8 - 0.5*X_1;\n", + "\n", + "print \" 1).The moles of the components at equilibrium are n_SO3 = %f mol n_SO2 = %f mol and n_O2 = %f mol\"%(n_SO3,n_SO2,n_O2);\n", + "\n", + "\t\t\t# Now for the reaction\n", + "\t\t\t# 2*SO2 + O2 - 2*SO3\n", + "\n", + "\t\t\t# The equilibrium constant for this reaction is KP**(2)\n", + "Ky_prime = Ky**(2);\n", + "\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_SO2_1_eq = 10 - 2*X\n", + "\t\t\t# n_O2_1_eq = 8 - X\n", + "\t\t\t# SO3_1_eq = 2*X\n", + "\t\t\t# Total moles = 18 - X\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "\t\t\t# y_SO3 = 2*X/(18-X)\n", + "\t\t\t# y_SO2 = (10-2*X)/(18-X)\n", + "\t\t\t# y_O2 = (8- X)/(18-X)\n", + "\n", + "\t\t\t# Ky_prime = y_SO3**(2)/(y_SO2**(2)*y_O2)\n", + "\t\t\t# Ky_prime = ((2*X)**(2)*(18-X))/((10-2*X)**(2)*(8-X))\n", + "def f1(X): \n", + "\t return Ky_prime-((2*X)**(2)*(18-X))/(((10-2*X)**(2))*(8-X))\n", + "X_2 = fsolve(f1,6)\n", + "\n", + "n_SO3_prime = 2*X_2;\n", + "n_SO2_prime = 10 - 2*X_2;\n", + "n_O2_prime = 8 - X_2;\n", + "\n", + "print \" 2).The moles of the components at equilibrium are n_SO3 = %f mol n_SO2 = %f mol and n_O2 = %f mol\"%(n_SO3_prime,n_SO2_prime,n_O2_prime);\n", + "print \" Thus the number of moles remains the same irrespective of the stoichoimetry of the reaction\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The moles of the components at equilibrium are n_SO3 = 9.730824 mol n_SO2 = 0.269176 mol and n_O2 = 3.134588 mol\n", + " 2).The moles of the components at equilibrium are n_SO3 = 9.730824 mol n_SO2 = 0.269176 mol and n_O2 = 3.134588 mol\n", + " Thus the number of moles remains the same irrespective of the stoichoimetry of the reaction\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.7 Page Number : 603" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 500;\t\t\t#[K]\n", + "\t\t\t# For the reaction, 0.5*A2 + 0.5*B2 - AB\n", + "delta_G = -4200;\t\t\t#[J/mol]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t#(1)\n", + "\t\t\t# A2 + B2 - 2*AB\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# We know delta_G_rkn_0 = -R*T*math.log(K) \n", + "delta_G_1 = 2*delta_G;\n", + "K_1 = math.exp(-delta_G_1/(R*T));\t\t\t# Equilibrium constant at 500 K for the above reaction\n", + "\t\t\t# As can be seen the reaction is not affected by pressure and therefore K = Ky as Kp = 1 \n", + "Ky = K_1;\n", + "\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_A2_1_in = 0.5;\n", + "n_B2_1_in = 0.5;\n", + "n_AB_1_in = 0;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_A2_1_eq = 0.5 - X\n", + "\t\t\t# n_B2_1_eq = 0.5- X\n", + "\t\t\t# n_AB_1_eq = 2*X\n", + "\t\t\t# Total moles = 1\n", + "\n", + "\t\t\t# Ky = (2*X)**(2)/(0.5-X)**(2)\n", + "def f(X): \n", + "\t return Ky-(2*X)**(2)/(0.5-X)**(2)\n", + "X_1 = fsolve(f,0.2)\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "y_A2_1 = 0.5 - X_1;\n", + "y_B2_1 = 0.5- X_1;\n", + "y_AB_1 = 2*X_1;\n", + "\n", + "print \" 1).The mole fractions at equilibrium are y_A2 = %f y_B2 = %f and y_AB = %f\"%(y_A2_1,y_B2_1,y_AB_1);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# 0.5*A2 + 0.5*B2 - AB\n", + "\n", + "\t\t\t# We know delta_G_rkn_0 = -R*T*math.log(K) \n", + "delta_G_2 = delta_G;\n", + "K_2 = math.exp(-delta_G_2/(R*T));\t\t\t# Equilibrium constant at 500 K for the above reaction\n", + "\n", + "\t\t\t# As can be seen the reaction is not affected by pressure and therefore K = Ky as Kp = 1 \n", + "Ky_2 = K_2;\n", + "\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_A2_2_in = 0.5;\n", + "n_B2_2_in = 0.5;\n", + "n_AB_2_in = 0;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_A2_2_eq = 0.5 - 0.5*X\n", + "\t\t\t# n_B2_2_eq = 0.5- 0.5*X\n", + "\t\t\t# n_AB_2_eq = X\n", + "\t\t\t# Total moles = 1\n", + "\n", + "\t\t\t# Ky = y_AB/(y_A2**(1/2)*y_B2**(1/2))\n", + "\t\t\t# Ky = X/(0.5 - 0.5*X)\n", + "X_2 = 0.5*Ky_2/(1+0.5*Ky_2);\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "y_A2_2 = 0.5 - 0.5*X_2;\n", + "y_B2_2 = 0.5- 0.5*X_2;\n", + "y_AB_2 = X_2;\n", + "\n", + "print \" 2).The mole fractions at equilibrium are y_A2 = %f y_B2 = %f and y_AB = %f\"%(y_A2_2,y_B2_2,y_AB_2);\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t# 2*AB - A2 + B2\n", + "\n", + "K_3 = 1/K_1;\t\t\t# Equilibrium constant at 500 K for the above reaction\n", + "\t\t\t# As can be seen the reaction is not affected by pressure and therefore K = Ky as Kp = 1 \n", + "Ky_3 = K_3;\n", + "\n", + "\t\t\t# Initial number of moles of the components are\n", + "n_AB_3_in = 1;\n", + "n_A2_3_in = 0;\n", + "n_B2_3_in = 0;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_AB_3_eq = 1 - X\n", + "\t\t\t# n_A2_3_eq = X/2\n", + "\t\t\t# n_B2_3_eq = X/2\n", + "\t\t\t# Total moles = 1\n", + "\n", + "\t\t\t# Ky = (X/2)**(2)/(1-X)**(2)\n", + "def f1(X): \n", + "\t return Ky_3-(X/2)**(2)/(1-X)**(2)\n", + "X_3 = fsolve(f1,0.4)\n", + "\n", + "\t\t\t# The mole fractions of the components at equilibrium are\n", + "y_A2_3 = X_3/2;\n", + "y_B2_3 = X_3/2;\n", + "y_AB_3 = 1-X_3;\n", + "\n", + "print \" 3).The mole fractions at equilibrium are y_A2 = %f y_B2 = %f and y_AB = %f\"%(y_A2_3,y_B2_3,y_AB_3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The mole fractions at equilibrium are y_A2 = 0.210680 y_B2 = 0.210680 and y_AB = 0.578641\n", + " 2).The mole fractions at equilibrium are y_A2 = 0.210680 y_B2 = 0.210680 and y_AB = 0.578641\n", + " 3).The mole fractions at equilibrium are y_A2 = 0.210680 y_B2 = 0.210680 and y_AB = 0.578641\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.9 Page Number : 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "from scipy.optimize import fsolve \n", + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\n", + "\n", + "# Variables\n", + "R = 1.987;\t\t\t#[cal/mol-K]\n", + "\n", + "delta_H_SO2_298 = -70.96;\t\t\t#[kcal/mol] - Enthalpy of formation of S02 at 298.15 K\n", + "delta_H_SO3_298 = -94.45;\t\t\t#[kcal/mol] - Enthalpy of formation of S03 at 298.15 K\n", + "delta_G_SO2_298 = -71.79;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n", + "delta_G_SO3_298 = -88.52;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K\n", + "\n", + "\t\t\t# Cp_0 = a + b*T + c*T**(2) + d*T**(3)\n", + "\n", + "a_SO2 = 6.157;\n", + "a_SO3 = 3.918;\n", + "a_O2 = 6.085;\n", + "b_SO2 = 1.384*10**(-2);\n", + "b_SO3 = 3.483*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "c_SO2 = -0.9103*10**(-5);\n", + "c_SO3 = -2.675*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "d_SO2 = 2.057*10**(-9);\n", + "d_SO3 = 7.744*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "\n", + "\t\t\t#(1)\n", + "T_1 = 298.15;\t\t\t#[K]\n", + "\n", + "# Calculations and Results\n", + "delta_H_rkn_298 = delta_H_SO3_298 - delta_H_SO2_298;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "delta_G_rkn_298 = delta_G_SO3_298 - delta_G_SO2_298;\t\t\t#[kcal]\n", + "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "delta_a = a_SO3 - a_SO2 - (a_O2/2);\n", + "delta_b = b_SO3 - b_SO2 - (b_O2/2);\n", + "delta_c = c_SO3 - c_SO2 - (c_O2/2);\n", + "delta_d = d_SO3 - d_SO2 - (d_O2/2);\n", + "\n", + "\n", + "def f60(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f60,T_1,T)[0]\n", + "\n", + "\t\t\t# On simplification we get\n", + "\t\t\t# delta_H_rkn_T = -22630.14 - 5.2815*T + 0.9587*10**(-2)*T**(2) - 0.5598*10**(-5)*T**(3) + 1.3826*10**(-9)*T**(4)\n", + "\n", + "print \" 1.The math.expression for delta_H_rkn_T as a function of T is given by\";\n", + "print \" delta_H_rkn_T = -22630.14 - 5.2815*T + 0.9587*10**-2*T**2 - 0.5598*10**-5*T**3 + 1.3826*10**-9*T**4\";\n", + "\n", + "\t\t\t#(2)\n", + "\n", + "\n", + "\t\t\t#def f61(T): \n", + "\t\t\t#\t return K_T/K_298) = integrate(delta_H_rkn_T/T**(2)\n", + "\n", + "\t\t\t# R*math.log(K_T/K_298) = quad(f61,T_1,T)[0]\n", + "\n", + "\t\t\t# First let us calculate K_298.\n", + "\t\t\t# delta_G_rkn_T = - R*T*math.log(K)\n", + "K_298 = math.exp(-delta_G_rkn_298/(R*T_1));\n", + "\n", + "\t\t\t# On substituting the values and simplifying we get the math.expression\n", + "\t\t\t# math.log(K) = 3.87 + 11380.10/T - 2.6580*math.log(T) + 0.4825*10**(-2)*T - 0.1409*10**(-5)*T**(2) + 0.2320*10**(-9)*T**(3)\n", + "\n", + "print \" 2.The math.expression for math.logK as a function of T is given by\";\n", + "print \" math.logK = 3.87 + 11380.10/T - 2.6580*math.logT + 0.4825*10**-2*T - 0.1409*10**-5*T**2 + 0.2320*10**-9*T**3\";\n", + "\n", + "\t\t\t#(3)\n", + "P = 1;\t\t\t#[atm]\n", + "T = 880;\t\t\t#[K]\n", + "K = math.exp(3.87 + 11380.10/T - 2.6580*math.log(T) + 0.4825*10**(-2)*T - 0.1409*10**(-5)*T**(2) + 0.2320*10**(-9)*T**(3));\n", + "Kp = P**(-1./2);\t\t\t#[atm**(-1/2)]\n", + "Ky = K/Kp;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_SO2_eq = 1 - X\n", + "\t\t\t# n_O2_eq = 0.5- 0.5*X\n", + "\t\t\t# n_SO3_1_eq = X\n", + "\t\t\t# Total moles = 1.5-0.5*X\n", + "\n", + "\t\t\t# Ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n", + "def f(X): \n", + "\t return Ky - (X*(1.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n", + "X = fsolve(f,0.8)\n", + "\n", + "\t\t\t# The mole fraction of SO3 at equilibrium is given by\n", + "y_SO3 = X/(1.5-0.5*X);\n", + "\n", + "print \" 3).The mole fraction of SO3 at equilibrium is given by y_SO3 = %f\"%(y_SO3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1.The math.expression for delta_H_rkn_T as a function of T is given by\n", + " delta_H_rkn_T = -22630.14 - 5.2815*T + 0.9587*10**-2*T**2 - 0.5598*10**-5*T**3 + 1.3826*10**-9*T**4\n", + " 2.The math.expression for math.logK as a function of T is given by\n", + " math.logK = 3.87 + 11380.10/T - 2.6580*math.logT + 0.4825*10**-2*T - 0.1409*10**-5*T**2 + 0.2320*10**-9*T**3\n", + " 3).The mole fraction of SO3 at equilibrium is given by y_SO3 = 0.649167\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.10 Page Number : 609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "from numpy import *\n", + "\n", + "# Variables\n", + "\t\t\t# (1/2)*N2 + (1/2)*O2 - NO\n", + "\n", + "R = 1.987;\t\t\t#[cal/mol-K]\n", + "\n", + "delta_H_NO_298 = 21.600;\t\t\t#[kcal/mol] - Enthalpy of formation of S02 at 298.15 K\n", + "delta_G_NO_298 = 20.719;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n", + "\n", + "\t\t\t# Cp_0 = a + b*T + c*T**(2) + d*T**(3)\n", + "\n", + "a_N2 = 6.157;\n", + "a_O2 = 6.085;\n", + "a_NO = 6.461;\n", + "b_N2 = -0.03753*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "b_NO = 0.2358*10**(-2);\n", + "c_N2 = 0.1930*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "c_NO = -0.07705*10**(-5);\n", + "d_N2 = -0.6861*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "d_NO = 0.08729*10**(-9);\n", + "\n", + "\t\t\t#(1)\n", + "T_1 = 298.15;\t\t\t#[K]\n", + "\n", + "# Calculations and Results\n", + "delta_H_rkn_298 = delta_H_NO_298;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "delta_G_rkn_298 = delta_G_NO_298;\t\t\t#[kcal]\n", + "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "delta_a = a_NO - (a_N2/2) - (a_O2/2);\n", + "delta_b = b_NO - (b_N2/2) - (b_O2/2);\n", + "delta_c = c_NO - (c_N2/2) - (c_O2/2);\n", + "delta_d = d_NO - (d_N2/2) - (d_O2/2);\n", + "\n", + "\n", + "def f49(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f49,T_1,T)[0]\n", + "\n", + "\t\t\t# On simplification we get\n", + "\t\t\t# delta_H_rkn_T = 21584.63 - 0.033*T + 0.0365*10**(-2)*T**(2) - 0.0293*10**(-5)*T**(3) + 0.0685*10**(-9)*T**(4)\n", + "\n", + "print \" The math.expression for delta_H_rkn_T as a function of T is given by\";\n", + "print \" delta_H_rkn_T = 21584.63 - 0.033*T + 0.0365*10**-2*T**2 - 0.0293*10**-5*T**3 + 0.0685*10**-9*T**4\";\n", + "\n", + "\t\t\t# Now let us calculate K_298 (at 298 K)\n", + "\t\t\t# We know delta_G_rkn_298 = -R*T*math.log(K_298) \n", + "K_298 = math.exp(-delta_G_rkn_298/(R*T_1));\t\t\t# Equilibrium constant at 298.15 K\n", + "\n", + "\n", + "\t\t\t#def f50(T): \n", + "\t\t\t#\t return K_2/K_1) = integrate(delta_H_rkn_298/(R*T**(2))\n", + "\n", + "\t\t\t# math.log(K_2/K_1) = quad(f50,T_1,T)[0]\n", + "\n", + "\t\t\t# On substituting the values and simplifying we get the math.expression\n", + "\t\t\t# math.log(K) = 1.5103 - 10862.92/T - 0.0166*math.log(T) + 1.84*10**(-4)*T - 7.35*10**(-8)*T**(2) + 1.15*10**(-11)*T**(3)\n", + "\n", + "print \" The math.expression for math.logK as a function of T is given by\";\n", + "print \" math.logK = 1.5103 - 10862.92/T - 0.0166*math.logT + 1.84*10**-4*T - 7.35*10**-8*T**2 + 1.15*10**-11*T**3\"\n", + "\n", + "T = [500,1000,1500,2000,2500];\n", + "K = zeros(5);\n", + "\n", + "print \" T K \\t\\t\\t K \";\n", + "\n", + "for i in range(5):\n", + " K[i] = math.exp(1.5103-10862.92/T[i] - 0.0166*math.log(T[i]) + 1.84*10**(-4)*T[i] - 7.35*10**(-8)*T[i]**(2) + 1.15*10**(-11)*T[i]**(3));\n", + " \n", + " print \" %f \\t\\t %e \"%(T[i],K[i]);\n", + "\n", + "\n", + "\t\t\t# It can be seen that for endothermic reactions equilibrium constant increases with temperature.\n", + "print \" It can be seen that for endothermic reactions equilibrium constant increases with temperature\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The math.expression for delta_H_rkn_T as a function of T is given by\n", + " delta_H_rkn_T = 21584.63 - 0.033*T + 0.0365*10**-2*T**2 - 0.0293*10**-5*T**3 + 0.0685*10**-9*T**4\n", + " The math.expression for math.logK as a function of T is given by\n", + " math.logK = 1.5103 - 10862.92/T - 0.0166*math.logT + 1.84*10**-4*T - 7.35*10**-8*T**2 + 1.15*10**-11*T**3\n", + " T K \t\t\t K \n", + " 500.000000 \t\t 1.615470e-09 \n", + " 1000.000000 \t\t 8.737610e-05 \n", + " 1500.000000 \t\t 3.333913e-03 \n", + " 2000.000000 \t\t 2.062328e-02 \n", + " 2500.000000 \t\t 6.176400e-02 \n", + " It can be seen that for endothermic reactions equilibrium constant increases with temperature\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.11 Page Number : 611" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "\t\t\t# SO2 + (1/2)*O2 - SO3\n", + "R = 8.314;\t\t\t#[J/mol-K]\n", + "\n", + "K_800 = 0.0319;\t\t\t# Equilibrium constant at 800 K\n", + "K_900 = 0.153;\t\t\t# Equilibrium constant at 900 K\n", + "T_1 = 800.;\t\t\t#[K]\n", + "T_2 = 900.;\t\t\t#[K]\n", + "\n", + "# Calculations\n", + "\t\t\t# We have the relation \n", + "\t\t\t# math.log(K_2/K_1) = -(delta_H_rkn/R)*(1/T_2 - 1/T_1)\n", + "\t\t\t# math.log(K_900/K_800) = -(delta_H_rkn_850/R)*(1/T_2 - 1/T_1)\n", + "delta_H_rkn_850 = -R*math.log(K_900/K_800)/(1/T_2 - 1/T_1);\t\t\t#[J]\n", + "delta_H_rkn_850 = delta_H_rkn_850*10**(-3);\t\t\t#[kJ]\n", + "\n", + "# Results\n", + "print \" The mean standard enthalpy change of reaction in the region 800 t0 900 is given by delta_H_rkn_850 = %f KJ\"%(delta_H_rkn_850);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mean standard enthalpy change of reaction in the region 800 t0 900 is given by delta_H_rkn_850 = 93.851672 KJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.13 Page Number : 611" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K]\n", + "T = 2600;\t\t\t#[K]\n", + "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas constant\n", + "\n", + "\t\t\t# Cp_0 = a + b*T + c*T**(2) + d*T**(3)\n", + "delta_H_CO_298 = -26.416;\t\t\t#[kcal/mol] - Enthalpy of formation of CO at 298.15 K\n", + "delta_G_CO_298 = -32.808;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n", + "delta_H_CO2_298 = -94.052;\t\t\t#[kcal/mol] - Enthalpy of formation of C02 at 298.15 K\n", + "delta_G_CO2_298 = -94.260;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n", + "\n", + "\t\t\t# CO + (1/2)*O2 - CO2\n", + "\n", + "a_CO = 6.726;\n", + "a_O2 = 6.0685;\n", + "a_CO2 = 5.316;\n", + "b_CO = 0.04001*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "b_CO2 = 1.4285*10**(-2);\n", + "c_CO = 0.1283*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "c_CO2 = -0.8362*10**(-5);\n", + "d_CO = -0.5307*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "d_CO2 = 1.784*10**(-9);\n", + "\n", + "# Calculations and Results\n", + "delta_H_rkn_298 = delta_H_CO2_298 - delta_H_CO_298;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "delta_G_rkn_298 = delta_G_CO2_298 - delta_G_CO_298;\t\t\t#[kcal]\n", + "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "delta_a = a_CO2 - (a_CO) - (a_O2/2);\n", + "delta_b = b_CO2 - (b_CO) - (b_O2/2);\n", + "delta_c = c_CO2 - (c_CO) - (c_O2/2);\n", + "delta_d = d_CO2 - (d_CO) - (d_O2/2);\n", + "\n", + "\n", + "def f47(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f47,T_1,T)[0]\n", + "\n", + "\t\t\t# On simplification we get\n", + "delta_H_rkn_T = -66773.56 - 4.45*T + 0.605*10**(-2)*T**(2) - 0.29*10**(-5)*T**(3) + 0.54*10**(-9)*T**(4);\n", + "\n", + "\n", + "\t\t\t#def f48(T): \n", + "\t\t\t#\t return K/K_298) = integrate(delta_H_rkn_T/(R*T**(2))\n", + "\n", + "\t\t\t# math.log(K/K_298) = quad(f48,T_1,T)[0]\n", + "\n", + "\n", + "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n", + "\t\t\t# At 298.15 K\n", + "K_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n", + "\n", + "\t\t\t# Therfore on simplification we get\n", + "\t\t\t#math.log(K) = 2.94 + 33605.2/T - 2.24*math.log(T) + 0.304*10(-2)*T - 0.073*10**(-5)*T**(2) + 0.09*10**(-9)*T**(3)\n", + "K = math.exp(2.94 + 33605.2/T - 2.24*math.log(T) + 0.304*10**(-2)*T - 0.073*10**(-5)*T**(2) + 0.09*10**(-9)*T**(3));\n", + "\n", + "print \" The value of equilibrium constant at 2600 K is given by K_298 = %f\"%(K);\n", + "\n", + "\n", + "\t\t\t#(a)\n", + "P_1 = 1;\t\t\t#[atm]\n", + "Kp_1 = P_1**(-1./2);\n", + "Ky_1 = K/Kp_1;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_CO_1_eq = 1 - X\n", + "\t\t\t# n_02_1_eq = 0.5- 0.5X\n", + "\t\t\t# n_CO2_1_eq = X\n", + "\t\t\t# Total moles = 1.5 - 0.5*X\n", + "\n", + "\t\t\t# Ky = y_CO2/(y_CO**(1/2)*y_CO)\n", + "\t\t\t#ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n", + "\n", + "def f(X): \n", + "\t return Ky_1-(X*(1.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n", + "X_1 = fsolve(f,0.9)\n", + "\n", + "y_CO2_1 = X_1/(1.5-0.5*X_1);\n", + "y_CO_1 = (1-X_1)/(1.5-0.5*X_1);\n", + "y_O2_1 = (0.5-0.5*X_1)/(1.5-0.5*X_1);\n", + "\n", + "print \" a).The equilibrium composition at 1 atm) is given by y_CO2 = %f y_CO = %f and y_O2 = %f\"%(y_CO2_1,y_CO_1,y_O2_1);\n", + "\n", + "\t\t\t#(b)\n", + "P_2 = 10;\t\t\t#[atm]\n", + "Kp_2 = P_2**(-1./2);\n", + "Ky_2 = K/Kp_2;\n", + "\n", + "\t\t\t# Ky = y_CO2/(y_CO**(1/2)*y_CO)\n", + "\t\t\t#ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n", + "\n", + "def f1(X): \n", + "\t return Ky_2-(X*(1.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n", + "X_2 = fsolve(f1,0.9)\n", + "\n", + "y_CO2_2 = X_2/(1.5-0.5*X_2);\n", + "y_CO_2 = (1-X_2)/(1.5-0.5*X_2);\n", + "y_O2_2 = (0.5-0.5*X_2)/(1.5-0.5*X_2);\n", + "\n", + "print \" b).The equilibrium composition at 10 atm) is given by y_CO2 = %f y_CO = %f and y_O2 = %f\"%(y_CO2_2,y_CO_2,y_O2_2);\n", + "\n", + "\t\t\t#(c)\n", + "P_3 = 1;\t\t\t#[atm]\n", + "Kp_3 = P_3**(-1./2);\n", + "Ky_3 = K/Kp_3;\n", + "\n", + "\t\t\t# Ky = y_CO2/(y_CO**(1/2)*y_CO)\n", + "\t\t\t#ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n", + "\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_CO_3_eq = 1 - X\n", + "\t\t\t# n_02_3_eq = 0.5- 0.5X\n", + "\t\t\t# n_CO2_3_eq = X\n", + "\t\t\t# n_N2_eq = 1;\n", + "\t\t\t# Total moles = 2.5 - 0.5*X\n", + "\n", + "def f2(X): \n", + "\t return Ky_3-(X*(2.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n", + "X_3 = fsolve(f2,0.9)\n", + "\n", + "y_CO2_3 = X_3/(2.5-0.5*X_3);\n", + "y_CO_3 = (1-X_3)/(2.5-0.5*X_3);\n", + "y_O2_3 = (0.5-0.5*X_3)/(2.5-0.5*X_3);\n", + "y_N2 = 1./(2.5-0.5*X_3);\n", + "\n", + "print \" c).The equilibrium composition at 1 atm and 1 mol N2) is given by y_CO2 = %f y_CO = %f y_O2 = %f and y_N2 = %f\"%(y_CO2_3,y_CO_3,y_O2_3,y_N2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of equilibrium constant at 2600 K is given by K_298 = 16.484152\n", + " a).The equilibrium composition at 1 atm) is given by y_CO2 = 0.757531 y_CO = 0.161646 and y_O2 = 0.080823\n", + " b).The equilibrium composition at 10 atm) is given by y_CO2 = 0.876008 y_CO = 0.082662 and y_O2 = 0.041331\n", + " c).The equilibrium composition at 1 atm and 1 mol N2) is given by y_CO2 = 0.373822 y_CO = 0.100943 y_O2 = 0.050471 and y_N2 = 0.474764\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.14 Page Number : 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 25 + 298.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol-K]\n", + "delta_G_298 = -1000;\t\t\t#[J] - Gibbs free energy change at 298 K\n", + "\n", + "\t\t\t# G_E/(R*T) = x_1*x_2\n", + "# Calculations and Results\n", + "\t\t\t# We know that delta_G_rkn = - R*T*math.log(K), therefore\n", + "K = math.exp(-delta_G_298/(R*T));\n", + "\n", + "\t\t\t#(1)\n", + "\t\t\t# Let x_1 is the mole fraction of A and x_2 be the mole fraction of B\n", + "\t\t\t# If A and B form an ideal mixture then,\n", + "Ky = 1;\n", + "\t\t\t# and K = Kx = x_2/x_1\n", + "\t\t\t# and at equilibrium x_2/x_1 = K\n", + "\t\t\t# (1-x_1)/x_1 = K\n", + "x_1 = 1/(1+K);\n", + "\n", + "print \" 1).The equilibrium composition for ideal behaviour) is given by x_1 = %f\"%(x_1);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# The activity coefficients are given by\n", + "\t\t\t# math.log(Y1) = [del(n*G_E/(R*T))/del(n_1)]_T,P,n_2 = x_2**(2)\n", + "\t\t\t# similarly, math.log(Y2) = x_1**(2)\n", + "\n", + "\t\t\t# The equilibrium constant for the liquid phase reaction is given by\n", + "\t\t\t# K = Kx*Ky = (x_2*Y2)/(x_1*Y1) = (x_2*math.exp(x_1**(2)))/(x_1*math.exp(x_2**(2)))\n", + "\t\t\t# Solving the above equation we get\n", + "\n", + "def f2(x_1): \n", + "\t return K -((1-x_1)*math.exp(x_1**(2)))/(x_1*math.exp((1-x_1)**(2)))\n", + "x_1_prime = fsolve(f2,0.9)\n", + "\n", + "print \" 2).The equilibrium composition for non-ideal behaviour) is given by x_1 = %f\"%(x_1_prime);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The equilibrium composition for ideal behaviour) is given by x_1 = 0.408008\n", + " 2).The equilibrium composition for non-ideal behaviour) is given by x_1 = 0.328409\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.15 Page Number : 615" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\t\t\t\n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n", + "T_2 = 373.;\t\t\t#[K] - Reaction temperature\n", + "P = 1.;\t\t\t#[atm]\n", + "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas constant\n", + "\n", + "\t\t\t# CH3COOH (l) + C2H5OH (l) - CH3COOC2H5 (l) + H2O (l)\n", + "\n", + "delta_H_CH3COOH_298 = -116.2*10**(3.);\t\t\t# [cal/mol]\n", + "delta_H_C2H5OH_298 = -66.35*10**(3.);\t\t\t# [cal/mol]\n", + "delta_H_CH3COOC2H5_298 = -110.72*10**(3.);\t\t\t# [cal/mol]\n", + "delta_H_H2O_298 = -68.3174*10**(3.);\t\t\t# [cal/mol]\n", + "\n", + "delta_G_CH3COOH_298 = -93.56*10**(3.);\t\t\t# [cal/mol]\n", + "delta_G_C2H5OH_298 = -41.76*10**(3.);\t\t\t# [cal/mol]\n", + "delta_G_CH3COOC2H5_298 = -76.11*10**(3.);\t\t\t# [cal/mol]\n", + "delta_G_H2O_298 = -56.6899*10**(3.);\t\t\t# [cal/mol]\n", + "\n", + "# Calculations and Results\n", + "delta_H_rkn_298 = delta_H_CH3COOC2H5_298 + delta_H_H2O_298 - delta_H_CH3COOH_298 - delta_H_C2H5OH_298;\t\t\t#[cal/mol]\n", + "delta_G_rkn_298 = delta_G_CH3COOC2H5_298 + delta_G_H2O_298 - delta_G_CH3COOH_298 - delta_G_C2H5OH_298;\t\t\t#[cal/mol]\n", + "\n", + "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n", + "\t\t\t# At 298.15 K\n", + "K_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n", + "\n", + "\t\t\t# We know that dmath.log(K)/dT = delta_H_rkn/(R*T**(2))\n", + "\t\t\t# If delta_H_rkn is assumed constant we get\n", + "\t\t\t# math.log(K_2/K_1) = (-delta_H_rkn/R)*(1/T_2 - 1/T_1)\n", + "\t\t\t# math.log(K_373/K_298) = (-delta_H_rkn_298/R)*(1/T_2 - 1/T_1)\n", + "\n", + "K_373 = math.exp(math.log(K_298) + (-delta_H_rkn_298/R)*(1./T_2 - 1./T_1));\n", + "\t\t\t# Note that the equilibrium constant value rises becauses the reaction is endothermic\n", + "\n", + "print \" The value of equilibrium constant at 373 K is K_373 = %f\"%(K_373);\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_CH3COOH = 1 - X\n", + "\t\t\t# n_C2H5OH = 1 - X\n", + "\t\t\t# n_CH3COOC2H5 = X\n", + "\t\t\t# n_H20 = X\n", + "\t\t\t# Total moles = 2\n", + "\n", + "\t\t\t# Kx = (x_CH3COOH*x_C2H5OH)/(x_CH3COOC2H5*x_H2O)\n", + "\t\t\t# Assuming the liquid mixture to be ideal,that is Ky = 1, therefore K_x = K\n", + "K_x = K_373;\n", + "\t\t\t# X**(2)/(1-X)**(2) = K_x\n", + "X = (K_x)**(1./2)/(1+(K_x)**(1./2));\n", + "\n", + "\t\t\t# The mole fraction of ethyl acetate is given by\n", + "x_CH3COOC2H5 = X/2;\n", + "\n", + "print \" The mole fraction of ethyl acetate in the equilibrium reaction mixture is given by x_CH3COOC2H5 = %f\"%(x_CH3COOC2H5);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of equilibrium constant at 373 K is K_373 = 0.046697\n", + " The mole fraction of ethyl acetate in the equilibrium reaction mixture is given by x_CH3COOC2H5 = 0.088848\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.16 Page Number : 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "\t\t\t# CaCO3 (s1) - CaO (s2) + CO2 (g)\n", + "T_1 = 898 + 273.15;\t\t\t#[K]\n", + "T_2 = 700 + 273.15;\t\t\t#[K]\n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "\n", + "P_CO2_T_1 = 1;\t\t\t#[atm] - Decomposition pressure of CO2 over CaCO3 at 898 C\n", + "P_CO2_T_2 = 0.0333;\t\t\t#[atm] - Decomposition pressure of CO2 over CaCO3 at 700 C\n", + "\n", + "\t\t\t# The equilibrium constant of the reaction is given by\n", + "\t\t\t# K = (a_CO2*a_CaO)/a_CaCO3\n", + "\n", + "\t\t\t# Since the pressure is small therefore carbon dioxide can be assumed to behave as ideal gas and thus\n", + "\t\t\t# a_CO2 = y_CO2*P/1 = P_CO2\n", + "\n", + "\t\t\t# The activity of CaO is (CaO is pure)\n", + "\t\t\t# a_CaO = f_CaO/f_0_CaO = exp[V_CaO*(P - P_0)/(R*T)] = 1 (since pressure is low)\n", + "\n", + "\t\t\t# The activity of CaCO3 is (CaCO3 is pure)\n", + "\t\t\t# a_CaCO3 = f_CaCO3/f_0_CaCO3 = exp[V_CaCO3*(P - P_0)/(R*T)] = 1 (since pressure is low)\n", + "\n", + "\t\t\t#Since pressures are around 1 atm,therefore Poynting factors are also near 1, and thus activity of CaO and CaCO3 is unity and equilibrium constant is given by\n", + "\t\t\t#K = P_CO2 , therefore\n", + "# Calculations \n", + "\t\t\t# At 898 C\n", + "K_T_1 = P_CO2_T_1;\n", + "delta_G_T_1 = -R*T_1*math.log(K_T_1);\n", + "\n", + "\t\t\t# At 700 C\n", + "K_T_2 = P_CO2_T_2;\n", + "delta_G_T_2 = -R*T_2*math.log(K_T_2);\n", + "\n", + "# Results\n", + "print \" The value of delta_G_rkn at 700 C is %f J\"%(delta_G_T_1);\n", + "print \" The value of delta_G_rkn at 898 C is %f J\"%(delta_G_T_2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of delta_G_rkn at 700 C is -0.000000 J\n", + " The value of delta_G_rkn at 898 C is 27526.397496 J\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.17 Page Number : 618" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 700 + 273.15;\t\t\t#[K]\n", + "K = 7.403;\t\t\t# Equilibrium constant for the reaction at 700 C\n", + "\n", + "\t\t\t# CH4 - C (s) + 2*H2 \n", + "\n", + "\t\t\t# The equilibrium constant of the reaction is given by\n", + "\t\t\t# K = (a_C*a_H2**(2))/a_CH4\n", + "\n", + "\t\t\t# Since carbon is pure therefore its activity is given by\n", + "\t\t\t# a_C = f/f_0 = 1 as pressure is 1 atm.\n", + "\t\t\t# Since the pressure is low,therefore the gas phase can be taken to be ideal,therefore\n", + "\t\t\t# K = (y_H2**(2)*P**(2))/(y_CH4*P) = y_H2**(2)/y_CH4 (as P = 1 atm)\n", + "Ky = K;\t\t\t# (Kp = 1 atm)\n", + "\n", + "\t\t\t# Initial moles of the species are\n", + "n_CH4 = 1;\n", + "n_H2 = 0;\n", + "n_C = 0;\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n", + "\t\t\t# Moles at equilibrium be\n", + "\t\t\t# n_CH4_eq = 1 -X\n", + "\t\t\t# n_H2_eq = 2*x\n", + "\t\t\t# n_C_eq = X\n", + "\n", + "\t\t\t# Moles present in gas phase\n", + "\t\t\t# n_CH4_gas = 1 -X\n", + "\t\t\t# n_H2_gas = 2*x\n", + "\t\t\t# Total moles = 1 + X\n", + "\n", + "\t\t\t# gas phase mole fraction \n", + "\t\t\t# y_CH4_gas = (1 -X)/(1+X)\n", + "\t\t\t# y_H2_gas = 2*x/(1+X)\n", + "\n", + "# Calculations and Results\n", + "# Ky = y_H2_gas**(2)/y_CH4_gaS\n", + "X = (K/(4+K))**(1./2);\n", + "\n", + "print \" The number of moles of carbon black formed from one mole of methane is %f mol\"%(X);\n", + "\n", + "\t\t\t# Therefore mole fraction of components in the gas phase at equilibrium is \n", + "y_CH4 = (1-X)/(1+X);\n", + "y_H2 = 2*X/(1+X);\n", + "\n", + "print \" The mole fraction of components in the gas phase at equilibrium is given by y_CH4 = %f and y_H2 = %f \"%(y_CH4,y_H2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The number of moles of carbon black formed from one mole of methane is 0.805739 mol\n", + " The mole fraction of components in the gas phase at equilibrium is given by y_CH4 = 0.107580 and y_H2 = 0.892420 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.18 Page Number : 619" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n", + "T_2 = 1042;\t\t\t#[K] - Reaction temperature\n", + "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas constant\n", + "\n", + "\t\t\t# CaCO3 (s1) - CaO (s2) + CO2 (g)\n", + "\n", + "delta_H_CaCO3_298 = -289.5;\t\t\t#[kcal/mol] - Enthalpy of formation of CaCO3 at 298.15 K\n", + "delta_H_CaO_298 = -151.7;\t\t\t#[kcal/mol] - Enthalpy of formation of CaO at 298.15 K\n", + "delta_H_CO2_298 = -94.052;\t\t\t#[kcal/mol] - Enthalpy of formation of CO2 at 298.15 K\n", + "delta_G_CaCO3_298 = -270.8;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K\n", + "delta_G_CaO_298 = -144.3;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CaO at 298.15 K\n", + "delta_G_CO2_298 = -94.260;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n", + "\n", + "\t\t\t# The standard heat capacity data as a function of temperature are given below\n", + "\t\t\t# Cp_CO2 = 5.316 + 1.4285*10**(2)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3)\n", + "\t\t\t# Cp_CaO = 12.129 + 0.88*10**(-3)*T - 2.08*10**(5)*T**(-2)\n", + "\t\t\t# Cp_CaCO3 = 24.98 + 5.240*10**(-3)*T - 6.199*10**(5)*T**(-2)\n", + "\t\t\t# Therefore Cp_0 is given by\n", + "\t\t\t# Cp_0 = Cp_CO2 + Cp_CaO - Cp_CaCO3\n", + "\t\t\t# Cp_0 = -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n", + "# Calculations and Results\n", + "\t\t\t# The smath.tan(math.radiansard enthalpy change of the reaction at 298.15 K is given by\n", + "delta_H_rkn_298 = delta_H_CO2_298 + delta_H_CaO_298 - delta_H_CaCO3_298;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "delta_G_rkn_298 = delta_G_CO2_298 + delta_G_CaO_298 - delta_G_CaCO3_298;\t\t\t#[kcal]\n", + "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "\t\t\t# The smath.tan(math.radiansard enthalpy change of the reaction at temperature T is given by\n", + "\n", + "def f7(T): \n", + "\t return -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n", + "\n", + "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f7,T_1,T)[0]\n", + "\n", + "\t\t\t# On simplification we get\n", + "\t\t\t# delta_H_rkn_T = 47005.3 - 7.535*T + 4.9625*10**(-3)*T**(2) - 0.2787*10**(-5)*T**(3) + 0.446*10**(-9)*T**(4) - 4.119*10**(5)*T**(-1)\n", + "\n", + "\n", + "\n", + "\t\t\t#def f8(T): \n", + "\t\t\t#\t return K_2/K_1) = integrate(delta_H_rkn_T/(R*T**(2))\n", + "\n", + "\t\t\t# math.log(K_2/K_1) = quad(f8,T_1,T)[0]\n", + "\n", + "\n", + "def f9(T): \n", + "\t return (47005.3-7.535*T+4.9625*10**(-3)*T**(2)-0.2787*10**(-5)*T**(3)+0.446*10**(-9)*T**(4) - 4.119*10**(5)*T**(-1))/T**(2)\n", + "\n", + "math.log_K2_K1 = quad(f9,T_1,T_2)[0];\t\t\t# math.log(K_2/K_1)[0]\n", + "\n", + "\n", + "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n", + "\t\t\t# At 298.15 K\n", + "K_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n", + "\n", + "\t\t\t# Putting the values in the above math.expression we get\n", + "\t\t\t# math.log(K_1042/K_298) = math.log_K2_K1/R\n", + "K_1042 = K_298*math.exp(math.log_K2_K1/R);\n", + "\n", + "print \" The value of equilibrium constant at 1042 K is K_1042 = %f\"%(K_1042);\n", + "\n", + "\t\t\t# Since for the given reaction K = P_CO2,where P is in atm, therefore,\n", + "P_CO2 = K_1042;\n", + "\t\t\t# and thus decomposition takes place till the partial pressure of CO2 reaches 0.095 atm\n", + "\t\t\t# After that the decomposition in the closed vessel stops as equilibrium is achieved.\n", + "\n", + "print \" The equilibrium pressure of CO2 is P_CO2 = %f atm \"%(P_CO2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of equilibrium constant at 1042 K is K_1042 = 0.095017\n", + " The equilibrium pressure of CO2 is P_CO2 = 0.095017 atm \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.19 Page Number : 620" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables \n", + "T_1 = 298.15;\t\t\t#[k] - Smath.tan(math.radiansard reaction temperature\n", + "T_2 = 1200;\t\t\t#[K] - Reaction temperature\n", + "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas consatnt\n", + "\n", + "\t\t\t# C (s) + CO2 (g) - 2*CO2 (g) \t\t\t# Reaction 1\n", + "\t\t\t# CO2 + H2 - CO + H2O \t\t\t# Reacction 2\n", + "\n", + "K_1 = 63;\t\t\t# Equilibrium constant for the first reaction\n", + "K_2 = 1.4;\t\t\t# Equilibrium constant for the secind reaction\n", + "\n", + "delta_G_H2O_298 = -54640;\t\t\t#[cal/mol] - Smath.tan(math.radiansard Gibbs free energy of formation of water vapour\n", + "delta_H_H2O_298 = -57800;\t\t\t#[cal/mol] - Smath.tan(math.radiansard enthalpy change of formation of water vapour\n", + "delta_G_rkn_298 = delta_G_H2O_298;\n", + "\n", + "\t\t\t# The smath.tan(math.radiansard heat capacity data of the components in cal/mol-K are given below\n", + "\t\t\t# Cp_H2 = 6.947 - 0.2*10**(-3)*T + 4.8*10**(-7)*T**(2)\n", + "\t\t\t# Cp_O2 = 6.148 + 3.1*10**(-3)*T - 9.2*10**(-7)*T**(2)\n", + "\t\t\t# Cp_H2O = 7.256 + 2.3*10**(-3)*T + 2.8*10**(-7)*T**(2)\n", + "\n", + "\t\t\t# Let us consider two more reactions\n", + "\t\t\t# C (s) + (1/2)*O2 - CO \t\t\t# Reaction 3\n", + "\t\t\t# H2 + (1/2)*O2 - H2O \t\t\t# Reaction 4\n", + "\n", + "\t\t\t# Considering the above 4 reactions, it can be shown that reaction (3) = reaction (1) + reaction (4) - reaction (2)\n", + "\t\t\t# Thus, delta_G_rkn_3 = delta_G_rkn_1 + delta_G_rkn_4 - delta_G_rkn_2\n", + "\t\t\t# or, -R*T*math.log(K_3) = -R*T*math.log(K_1) + -R*T*math.log(K_4) - -R*T*math.log(K_2)\n", + "\t\t\t# K_3 = (K_1*K_4/K_2)\n", + "\n", + "\t\t\t# Now we have to determine K_4 at 1200 K.\n", + "\t\t\t# The smath.tan(math.radiansard enthalpy change of reaction (4) as a fuction of temperature is given by\n", + "\t\t\t# delta_H_rkn_T = -57020 - 2.765*T + 0.475*10**(-3)*T**(2) + 8.67*10**(-8)*T**(3);\n", + "\n", + "\n", + "\t\t\t#def f2(T): \n", + "\t\t\t#\t return K_4_2/K_4_1) = integrate(delta_H_rkn_T/(R*T**(2))\n", + "\n", + "\t\t\t# math.log(K_4_2/K_4_1) = quad(f2,T_1,T)[0]\n", + "\n", + "# Calculations\n", + "def f3(T): \n", + "\t return (-57020-2.765*T+0.475*10**(-3)*T**(2)+8.67*10**(-8)*T**(3))/T**(2)\n", + "\n", + "math.log_K2_K1_4 = quad(f3,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n", + "\t\t\t# At 298.15 K\n", + "K_4_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n", + "\n", + "\t\t\t# Putting the values in the above math.expression we get\n", + "\t\t\t# math.log(K_4_1200/K_4_298) = math.log_K2_K1_R/R\n", + "K_4_1200 = K_4_298*math.exp(math.log_K2_K1_4/R);\n", + "K_4 = K_4_1200;\n", + "\n", + "\t\t\t# Therefore the equilibrium constant for reaction (3) at 1200 K is given by\n", + "K_3 = (K_1*K_4)/K_2;\n", + "\n", + "# Results\n", + "print \" The equilibrium constant at 1200 K for the given reaction is K = %e\"%(K_3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The equilibrium constant at 1200 K for the given reaction is K = 3.622432e+09\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.20 Page Number : 622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "delta_G_H2O_298 = -237.034;\t\t\t#[kJ/mol] - Smath.tan(math.radiansard Gibbs free energy of formation of H2O (l) at 298 K\n", + "F = 96485;\t\t\t#[C/mol] - Faraday constant\n", + "\n", + "\t\t\t#(1)\n", + "\t\t\t# For the reaction\n", + "\t\t\t# H2 (g) + (1/2)*O2 (g) - H2O (l)\n", + "n = 2;\t\t\t# Number of electrons transferred in the reaction\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The standard Gibbs free energy change of the reaction is given by\n", + "\t\t\t# delta_G_rkn = delta_G_for_H2O(l) - delta_G_for_H2(g) - (1/2/)*delta_G_for_O2(g)\n", + "\t\t\t# Since delta_G_for_H2 = 0 and delta_G_for_O2 = 0 (pure components)\n", + "delta_G_rkn = delta_G_H2O_298;\t\t\t#[kJ]\n", + "delta_G_rkn = delta_G_rkn*10**(3);\t\t\t#[J]\n", + "\n", + "\t\t\t# delta_G_rkn = -n*F*E_0\n", + "\t\t\t# Thus standard equilibrium cell voltage is given by\n", + "E_0 = - delta_G_rkn/(n*F);\t\t\t#/[V]\n", + "\n", + "print \" 1).The standard equilibrium cell voltage is %f V\"%(E_0);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# For the reaction\n", + "\t\t\t# 2*H2 (g) + O2 (g) - 2*H2O (l)\n", + "n_prime = 4;\t\t\t# Number of electrons transferred in the reaction\n", + "\n", + "\t\t\t# The standard Gibbs free energy change of the reaction is given by\n", + "\t\t\t# delta_G_rkn = 2*delta_G_for_H2O(l) - 2*delta_G_for_H2(g) - delta_G_for_O2(g)\n", + "\t\t\t# Since delta_G_for_H2 = 0 and delta_G_for_O2 = 0 (pure components)\n", + "delta_G_rkn_prime = 2*delta_G_H2O_298;\t\t\t#[kJ]\n", + "delta_G_rkn_prime = delta_G_rkn_prime*10**(3);\t\t\t#[J]\n", + "\n", + "\t\t\t# delta_G_rkn = -n*F*E_0\n", + "\t\t\t# Thus standard equilibrium cell voltage is given by\n", + "E_0_prime = - delta_G_rkn_prime/(n_prime*F);\t\t\t#/[V]\n", + "\n", + "print \" 2).The standard equilibrium cell voltage is %f V\"%(E_0_prime);\n", + "\n", + "\t\t\t# Thus the result obtained is same for both the reactions\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The standard equilibrium cell voltage is 1.228346 V\n", + " 2).The standard equilibrium cell voltage is 1.228346 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.21 Page Number : 624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\t\t\t\n", + "P = 2;\t\t\t# Number of phases\n", + "C = 5;\t\t\t# Number of components\n", + "\n", + "# Calculations\t\n", + "\t\t\t# C + 2*H2 = CH4 \t\t\t# (reaction 1) \n", + "\t\t\t# H2 + (1/2)*O2 = H20 \t\t\t# (reaction 2)\n", + "\t\t\t# C + (1/2)*O2 = CO \t\t\t# (reaction 3)\n", + "\t\t\t# C + O2 = CO2 \t\t\t# (reaction 4)\n", + "\n", + "\t\t\t# We do not have C in the equilibrium reaction mixture, therefore we have to eliminate it.\n", + "\t\t\t# Substituting for C from reaction (1) into reactions (3) and (4) we get the following set of reactions\n", + "\t\t\t# H2 + (1/2)*O2 = H20\n", + "\t\t\t# CH4 - 2*H2 + (1/2)*O2 = CO\n", + "\t\t\t# CH4 - 2*H2 + O2 = CO2\n", + "\n", + "\t\t\t# We do not have O2 in the equilibrium reaction mixture,therefore we have to eliminateit\n", + "\t\t\t# Substituting for O2 from the first reaction of the above set into seecond and third reactions of the above set we get the following set of reactions.\n", + "\t\t\t# CH4 + H2O - H2 = CO + 2*H2\n", + "\t\t\t# CH4 + 2*H20 - 2*H2 = CO2 + 2*H2 \n", + "\n", + "\t\t\t# Therefore one set of independent reactions is\n", + "\t\t\t# CH4 + H20 = CO + 3*H2\n", + "\t\t\t# CH4 + 2*H2O = CO2 + 4*H2\n", + "\n", + "\t\t\t# Another set of independent reactions can be obtained by substituting for CH4 from the first reaction into second and we get\n", + "\t\t\t# CH4 + H2O = CO + 3*H2\n", + "\t\t\t# CO + 3*H2 - H2O + 2*H2O = CO2 4*H2\n", + "\n", + "\t\t\t# Or, \n", + "\t\t\t# CH4 + H2O = CO + 3*H2\n", + "\t\t\t# CO + H2O = CO2 + H2\n", + "\t\t\t\n", + "r = 2;\n", + "\n", + "\t\t\t# and the number of degree of freedom becomes,\n", + "F = r - P + C;\n", + "\n", + "# Results\n", + "print \" The number of independent chemical reactions are %f \"%(r);\n", + "\n", + "print \" The first set of independent reactions are given below\";\n", + "print \" CH4 + H20 = CO + 3*H2\";\n", + "print \" CH4 + 2*H2O = CO2 + 4*H2\";\n", + "\n", + "print \" The second set of independent reactions are given below\";\n", + "print \" CH4 + H20 = CO + 3*H2\";\n", + "print \" CO + H2O = CO2 + H2\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The number of independent chemical reactions are 2.000000 \n", + " The first set of independent reactions are given below\n", + " CH4 + H20 = CO + 3*H2\n", + " CH4 + 2*H2O = CO2 + 4*H2\n", + " The second set of independent reactions are given below\n", + " CH4 + H20 = CO + 3*H2\n", + " CO + H2O = CO2 + H2\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.22 Page Number : 626" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.optimize import fsolve \n", + "# Variables\t\t\t\n", + "T = 400.;\t\t\t#[K] - Temperature\n", + "P = 1.;\t\t\t#[atm] - Pressure\n", + "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas consatnt\n", + "\n", + "delta_G_n_pentane_400 = 9600.;\t\t\t#[cal/mol] - standard Gibbs free energy of formation of n-pentane at 400 K\n", + "delta_G_iso_pentane_400 = 8200.;\t\t\t#[cal/mol] - standard Gibbs free energy of formation of iso-pentane at 400 K\n", + "delta_G_neo_pentane_400 = 9000.;\t\t\t#[cal/mol] - standard Gibbs free energy of formation of neo-pentane at 400 K\n", + "\n", + "\t\t\t# The three reactions for the formation of these isomers can be written as follows\n", + "\t\t\t# 5*C + 6*H2 = n-pentane\n", + "\t\t\t# 5*C + 6*H2 = iso-pentane\n", + "\t\t\t# 5*C + 6*H2 = neo-pentane\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Let us take the following set of independent reactions\n", + "\t\t\t# iso-pentane = n-pentane \t\t\t# (reaction 1)\n", + "delta_G_rkn_1 = delta_G_n_pentane_400 - delta_G_iso_pentane_400;\t\t\t#[cal]\n", + "K_1 = math.exp(-delta_G_rkn_1/(R*T));\n", + "\t\t\t# iso-pentane = neo-pentane \t\t\t# (reaction 2)\n", + "delta_G_rkn_2 = delta_G_neo_pentane_400 - delta_G_iso_pentane_400;\t\t\t#[cal]\n", + "K_2 = math.exp(-delta_G_rkn_2/(R*T));\n", + "\n", + "\t\t\t# Let the initial number of moles be\n", + "\t\t\t# n_iso_pentane = 1\n", + "\t\t\t# n_n_pentane = 0\n", + "\t\t\t# n_neo_pentane = 0\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the two reaction be X_1 and X_2 respectively\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_iso_pentane_eq = 1 - X_1 - X_2\n", + "\t\t\t# n_n_pentane_eq = X_1\n", + "\t\t\t# n_neo_pentane_eq = X_2\n", + "\t\t\t# Total moles = 1 \n", + "\n", + "\t\t\t# Pressure has no effect on these reactions ( P = 1 atm) and therefore\n", + "Ky_1 = K_1;\n", + "Ky_2 = K_2;\n", + "\n", + "\t\t\t# From reaction (1), we get\n", + "\t\t\t# Ky_1 = X_1/(1-X_1-X_2)\n", + "\n", + "\t\t\t# From reaction (2), we get\n", + "\t\t\t# Ky_2 = X_2/(1-X_1-X_2)\n", + "\n", + "\t\t\t# Putting the value of X_1 from first equation into the second we get\n", + "\t\t\t# X_1 = (Ky_1*(1-X_2))/(1+Ky_1)\n", + "\t\t\t# Now putting it into the second equation we grt\n", + "\t\t\t# Ky_2 = X_2/(1-((Ky_1*(1-X_2))/(1+Ky_1))-X_2)\n", + "\t\t\t# Now solving for X_2\n", + "def f(X_2): \n", + "\t return Ky_2 - X_2/(1-((Ky_1*(1-X_2))/(1+Ky_1))-X_2)\n", + "X_2 = fsolve(f,0.8)\n", + "\n", + "\t\t\t# Therefore X_1 can be calculated as\n", + "X_1 = (Ky_1*(1-X_2))/(1+Ky_1);\n", + "\n", + "\t\t\t# Finally the mole fractions of the components at equilibrium\n", + "y_n_pentane = X_1;\n", + "y_neo_pentane = X_2;\n", + "y_iso_pentane = 1 -X_1 - X_2;\n", + "\n", + "print \" The equilibrium composition is given by y_n_pentane = %f y_neo_pentane = %f and y_iso_pentane = %f\"%(y_n_pentane,y_neo_pentane,y_iso_pentane);\n", + "\n", + "\t\t\t# Let us consider another set of independent reactions\n", + "\n", + "\t\t\t# n-pentane = iso-pentane \t\t\t# (reaction 3)\n", + "delta_G_rkn_3 = delta_G_iso_pentane_400 - delta_G_n_pentane_400;\t\t\t#[cal]\n", + "K_3 = math.exp(-delta_G_rkn_3/(R*T));\n", + "\t\t\t# n-pentane = neo-pentane \t\t\t# (reaction 4)\n", + "delta_G_rkn_4 = delta_G_neo_pentane_400 - delta_G_n_pentane_400;\t\t\t#[cal]\n", + "K_4 = math.exp(-delta_G_rkn_4/(R*T));\n", + "\n", + "\t\t\t# Let the initial number of moles be\n", + "\t\t\t# n_n_pentane = 1\n", + "\t\t\t# n_iso_pentane = 0\n", + "\t\t\t# n_neo_pentane = 0\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the two reaction be X_3 and X_4 respectively\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_n_pentane_eq = 1 - X_3 - X_4\n", + "\t\t\t# n_iso_pentane_eq = X_4\n", + "\t\t\t# n_neo_pentane_eq = X_4\n", + "\t\t\t# Total moles = 1 \n", + "\n", + "\t\t\t# Pressure has no effect on these reactions (P = 1 atm) and therefore\n", + "Ky_3 = K_3;\n", + "Ky_4 = K_4;\n", + "\n", + "\t\t\t# From reaction (3), we get\n", + "\t\t\t# Ky_3 = X_3/(1-X_3-X_4)\n", + "\n", + "\t\t\t# From reaction (4), we get\n", + "\t\t\t# Ky_4 = X_4/(1-X_3-X_4)\n", + "\n", + "\t\t\t# Putting the value of X_3 from first equation into the second we get\n", + "\t\t\t# X_3 = (Ky_3*(1-X_4))/(1+Ky_3)\n", + "\t\t\t# Now putting it into the second equation we grt\n", + "\t\t\t# Ky_4 = X_4/(1-((Ky_1*(1-X_4))/(1+Ky_3))-X_4)\n", + "\t\t\t# Now solving for X_4\n", + "def f1(X_4): \n", + "\t return Ky_4 - X_4/(1-((Ky_3*(1-X_4))/(1+Ky_3))-X_4)\n", + "X_4 = fsolve(f1,0.8)\n", + "\n", + "\t\t\t# Therefore X_3 can be calculated as\n", + "X_3 = (Ky_3*(1-X_4))/(1+Ky_3);\n", + "\n", + "\t\t\t# Finally the mole fractions of the components at equilibrium\n", + "y_n_pentane1 = 1 - X_3 - X_4;\n", + "y_neo_pentane1 = X_4;\n", + "y_iso_pentane1 = X_3;\n", + "\n", + "\t\t\t# The final composition does not depend on the set of reactions considered. \n", + "\n", + "print \" For another set of independent reactions considered\";\n", + "print \" The equilibrium composition is given by y_n_pentane = %f y_neo_pentane = %f and y_iso_pentane = %f\"%(y_n_pentane1,y_neo_pentane1,y_iso_pentane1);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The equilibrium composition is given by y_n_pentane = 0.111753 y_neo_pentane = 0.237745 and y_iso_pentane = 0.650501\n", + " For another set of independent reactions considered\n", + " The equilibrium composition is given by y_n_pentane = 0.111753 y_neo_pentane = 0.237745 and y_iso_pentane = 0.650501\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.23 Page Number : 628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 600;\t\t\t#[K] - Temperature\n", + "P = 1;\t\t\t#[atm] - Pressure\n", + "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas consatnt\n", + "\n", + "\t\t\t# CH4 + H2O = CO + 3*H2 \t\t\t# (Reaction 1)\n", + "\t\t\t# CO + H2O = CO2 + H2 \t\t\t# (Reaction 2)\n", + "\n", + "K_1 = 0.574;\t\t\t# Equilibrium constant of first reaction\n", + "K_2 = 2.21;\t\t\t# Equilibrium constant of second reaction\n", + "\n", + "\t\t\t# Initial number of moles of the components are\n", + "\t\t\t# n_CH4 = 1\n", + "\t\t\t# n_H2O = 5\n", + "\t\t\t# n_CO = 0\n", + "\t\t\t# n_H2 = O\n", + "\t\t\t# n_CO2 = 0\n", + "\n", + "\t\t\t# Let the reaction coordinate at equilibrium for the two reaction be X_1 and X_2 respectively\n", + "\t\t\t# At equilibrium, the moles of the components be\n", + "\t\t\t# n_CH4_eq = 1 - X_1\n", + "\t\t\t# n_H20_eq = 5 - X_1 - X_2\n", + "\t\t\t# n_CO_eq = X_1 - X_2\n", + "\t\t\t# n_H2_eq = 3*X_1 + X_2\n", + "\t\t\t# n_CO2_eq = X_2\n", + "\t\t\t# Total moles = 6 + 2*X_1\n", + "\n", + "\t\t\t# Since the pressure is 1 atm, K = Kp, Ky = K\n", + "Ky_1 = K_1;\n", + "Ky_2 = K_2;\n", + "\n", + "\t\t\t# From reaction (1), we get\n", + "\t\t\t# Ky_1 = ((X_1-X_2)*(3*X_1+X_2)**(3))/((1-X_1)*(5-X_1-X_2)*(6+2*X_1)**(2))\n", + "\n", + "\t\t\t# From reaction (2), we get\n", + "\t\t\t# Ky_2 = (X_2*(3*X_1+X_2))/((X_1-X_2)*(5-X_1-X_2))\n", + "\n", + "# Calculations\n", + "\t\t\t# Let us assume a value of X_1\n", + "X_1 = 0.1;\n", + "def f(X_2): \n", + "\t return Ky_1-((X_1-X_2)*(3*X_1+X_2)**(3))/((1-X_1)*(5-X_1-X_2)*(6+2*X_1)**(2))\n", + "\n", + "def f1(X_1_prime): \n", + "\t return Ky_2-(X_2_prime*(3*X_1_prime+X_2_prime))/((X_1_prime-X_2_prime)*(5-X_1_prime-X_2_prime))\n", + "\n", + "fault = 10;\n", + "while(fault>0.05):\n", + " X_2 = fsolve(f,0.8)\n", + " X_2_prime = X_2;\n", + " X_1_prime = fsolve(f1,0.8)\n", + " fault=abs(X_1 - X_1_prime);\n", + " X_1 = X_1 + 0.001;\n", + "\n", + "n_CH4 = 1 - X_1;\n", + "n_H20 = 5 - X_1 - X_2;\n", + "n_CO = X_1 - X_2;\n", + "n_H2 = 3*X_1 + X_2;\n", + "n_CO2 = X_2;\n", + "Total_moles = 6 + 2*X_1;\n", + "\n", + "# Results\n", + "print \" The equilibrium composition of the resulting mixture is given by\";\n", + "print \" n_CH4 = % f mol n_H2O = %f mol n_CO = %f mol n_H2 = %f mol and n_CO2 = %f mol\"%(n_CH4,n_H20,n_CO,n_H2,n_CO2);\n", + "print \" The total number of moles is %f mol\"%(Total_moles);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The equilibrium composition of the resulting mixture is given by\n", + " n_CH4 = 0.089000 mol n_H2O = 3.471420 mol n_CO = 0.293420 mol n_H2 = 3.350580 mol and n_CO2 = 0.617580 mol\n", + " The total number of moles is 7.822000 mol\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/home/jovina/virtualenvs/scipy/local/lib/python2.7/site-packages/scipy/optimize/minpack.py:236: RuntimeWarning: The iteration is not making good progress, as measured by the \n", + " improvement from the last ten iterations.\n", + " warnings.warn(msg, RuntimeWarning)\n", + "/home/jovina/virtualenvs/scipy/local/lib/python2.7/site-packages/scipy/optimize/minpack.py:236: RuntimeWarning: The iteration is not making good progress, as measured by the \n", + " improvement from the last five Jacobian evaluations.\n", + " warnings.warn(msg, RuntimeWarning)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 17.24 Page Number : 631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 600 + 273.15;\t\t\t#[K] - Reaction temperature\n", + "P = 1;\t\t\t#[atm] - Reaction pressure\n", + "\n", + "\t\t\t# The Gibbs free energy of formation of various species at 873.15 K are\n", + "delta_G_CH4_RT = -2.82;\t\t\t# delta_G_CH4/(R*T)\n", + "delta_G_H2O_RT = -29.73;\t\t\t# delta_G_CH4/(R*T)\n", + "delta_G_CO_RT = -27.51;\t\t\t# delta_G_CH4/(R*T)\n", + "delta_G_H2_RT = -1.46;\t\t\t# delta_G_CH4/(R*T)\n", + "delta_G_CO2_RT = -56.68;\t\t\t# delta_G_CH4/(R*T)\n", + "\n", + "# Calculations\t\t\n", + " \t# Initial number of moles of the components are\n", + "\t\t\t# n_CH4 = 1\n", + "\t\t\t# n_H2O = 5\n", + "\t\t\t# n_CO = 0\n", + "\t\t\t# n_H2 = O\n", + "\t\t\t# n_CO2 = 0\n", + "\n", + "\t\t\t# The del(F)/del(n_i) = 0 equations for CH4 (1), H2O (2), CO (3), H2 (4) and CO2 (5) becomes\n", + "\t\t\t# delta_G_1_T + R*T*math.log((n_1*P)/n) + lambda_C + 4*lambda_H = 0\n", + "\t\t\t# delta_G_2_T + R*T*math.log((n_2*P)/n) + 2*lambda_C + lambda_O = 0\n", + "\t\t\t# delta_G_3_T + R*T*math.log((n_3*P)/n) + lambda_c + lambda_O = 0\n", + "\t\t\t# delta_G_4_T + R*T*math.log((n_4*P)/n) + 2*lambda_H = 0\n", + "\t\t\t# delta_G_5_T + R*T*math.log((n_5*P)/n) + lambda_C + 2*lambda_O = 0\n", + "\n", + "\t\t\t# Where n is the total number of moles in the equilibrium reaction mixture. Dividing the above equations by R*T we get\n", + " # delta_G_5_T/(R*T) + math.log((n_5*P)/n) + lambda_C/(R*T) + 2*lambda_O/(R*T) = 0\n", + "\n", + "\t\t\t# Substituting the values of delta_G_i_T/(R*T) in the above equations,the full set of equations (including elemental balance) becomes\n", + "\t\t\t# -56.68 + math.log(n_5/n) + lambda_C/(R*T) + 2*lambda_O/(R*T) = 0\n", + "\n", + "\t\t\t# The constraint equations are\n", + "\t\t\t# n_1 + n_3 + n_5 = 1 \t\t\t# (moles of C in the reaction mixture = 1)\n", + "\t\t\t# 4*n_1 + 2*n_2 + 2*n_4 = 14 \t\t\t# (moles of H in the reaction mixture = 14)\n", + "\t\t\t# n_2 + n_3 + 2*n_5 = 5 \t\t\t# (moles of O in the raection mixture = 5)\n", + "\n", + "\t\t\t# The total moles are given by\n", + "\t\t\t# n = n_1 + n_2 + n_3 + n_4 + n_5\n", + "\n", + "def solution(x):\n", + " f = [0,0,0,0,0,0,0,0,0]\n", + " f[0]= -2.82 + math.log(x[0]/x[5]) + x[6] + 4*x[7];\n", + " f[1] = -29.73 + math.log(x[1]/x[5]) + 2*x[7] + x[8];\n", + " f[2] = -27.51 + math.log(x[2]/x[5]) + x[6] + x[8];\n", + " f[3] = -1.46 + math.log(x[3]/x[5]) + 2*x[7];\n", + " f[4] = -56.68 + math.log(x[4]/x[5]) + x[6] + 2*x[8];\n", + " f[5] = x[0] + x[2] +x[4] - 1;\n", + " f[6] = 4*x[0] + 2*x[1] + 2*x[3] - 14;\n", + " f[7] = x[1] + x[2] +2*x[4] - 5;\n", + " f[8] = x[0]+ x[1] + x[2] + x[3] + x[4] - x[5]; \n", + " return f\n", + "\n", + "\n", + "x = [0.01,3.5,0.2,3.0,0.5,5.0,2.0,1.0,25.0];\n", + "y = fsolve(solution,x)\n", + "\n", + "# Results\n", + "print \" n_1 = %f mol\"%(y[0]);\n", + "print \" n_2 = %f mol\"%(y[1]);\n", + "print \" n_3 = %f mol\"%(y[2]);\n", + "print \" n_4 = %f mol\"%(y[3]);\n", + "print \" n_5 = %f mol\"%(y[4]);\n", + "print \" n = %f mol\"%(y[5]);\n", + "print \" lambda_C/RT = %f\"%(y[6]);\n", + "print \" lambda_H/RT = %f\"%(y[7]);\n", + "print \" lambda_O/RT = %f\"%(y[8]);\n", + "\n", + "print \" The Lagrange multiplier values do not have any physical significance\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " n_1 = 0.091556 mol\n", + " n_2 = 3.442034 mol\n", + " n_3 = 0.258922 mol\n", + " n_4 = 3.374855 mol\n", + " n_5 = 0.649522 mol\n", + " n = 7.816888 mol\n", + " lambda_C/RT = 2.667225\n", + " lambda_H/RT = 1.149967\n", + " lambda_O/RT = 28.250290\n", + " The Lagrange multiplier values do not have any physical significance\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb new file mode 100755 index 00000000..f07249a6 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb @@ -0,0 +1,587 @@ +{ + "metadata": { + "name": "ch18_1", + "signature": "sha256:32121f42f5b148741ef15da1993d191234c228c3ab7dcf05f69114fbe323a883" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 : Adiabatic Reaction Temperature" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.1 Page Number : 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - standard reaction temperature\n", + "T_2 = 500;\t\t\t#[K] - Reaction temperature\n", + "P = 1;\t\t\t#[atm] - Pressure \n", + "\n", + "a_CO2 = 5.316;\n", + "a_O2 = 6.085;\n", + "a_N2 = 6.903;\n", + "a_H2O = 7.700;\n", + "a_C3H8 = -0.966;\n", + "b_CO2 = 1.4285*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "b_N2 = -0.03753*10**(-2);\n", + "b_H2O = 0.04594*10**(-2);\n", + "b_C3H8 = 7.279*10**(-2);\n", + "c_CO2 = -0.8362*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "c_N2 = 0.1930*10**(-5);\n", + "c_H2O = 0.2521*10**(-5);\n", + "c_C3H8 = -3.755*10**(-5);\n", + "d_CO2 = 1.784*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "d_N2 = -0.6861*10**(-9);\n", + "d_H2O = -0.8587*10**(-9);\n", + "d_C3H8 = 7.580*10**(-9);\n", + "\n", + "\t\t\t# The smath.tan(math.radiansard enthalpy of formation at 298.15 K is given by\n", + "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n", + "delta_H_for_C3H8 = -24.820;\t\t\t#[kcal/mol]\n", + "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n", + "\n", + "\t\t\t# The reaction with stoichiometric amount of air is\n", + "\t\t\t# C3H8 + 5(O2 + 3.7N2) - 3CO2 + 4H2O + 18.8N2\n", + "\n", + "\t\t\t# The reaction with 100% excess air is\n", + "\t\t\t# C3H8 + 10(O2 + 3.7N2) - 3CO2 + 4H2O + 5O2 + 37.6N2\n", + "\n", + "# Calculations\n", + "\t\t\t# The smath.tan(math.radiansard enthalpy change of reaction at 298.15 K\n", + "delta_H_rkn_298 = 3*delta_H_for_CO2 + 4*delta_H_for_H2O - delta_H_for_C3H8;\n", + "\n", + "\t\t\t# For exit stream\n", + "sum_ai_ni = 3*a_CO2 + 4*a_H2O + 5*a_O2 + 37.6*a_N2;\n", + "sum_bi_ni = 3*b_CO2 + 4*b_H2O + 5*b_O2 + 37.6*b_N2;\n", + "sum_ci_ni = 3*c_CO2 + 4*c_H2O + 5*c_O2 + 37.6*c_N2;\n", + "sum_di_ni = 3*d_CO2 + 4*d_H2O + 5*d_O2 + 37.6*d_N2;\n", + "\n", + "\n", + "\t\t\t# To raise the exit species from 298.15 to 500 K the enthalpy change is\n", + "\n", + "def f1(T): \n", + "\t return sum_ai_ni+sum_bi_ni*T+sum_ci_ni*T**(2)+sum_di_ni*T**(3)\n", + "\n", + "delta_H_rkn = quad(f1,T_1,T_2)[0]\n", + "\n", + "delta_H_rkn = delta_H_rkn*10**(-3);\t\t\t#[kcal]\n", + "\n", + "\t\t\t# Therefore per mole of fuel the heat exchange is\n", + "\t\t\t# Q = Heat exchange in step 1 + Heat exchange in step 2\n", + "Q = delta_H_rkn_298 + delta_H_rkn;\n", + "\n", + "# Results\n", + "print \" The heat transfer from the combustion chamber per mole of fuel is %f kcal (per mol of C3H8)\"%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The heat transfer from the combustion chamber per mole of fuel is -415.328732 kcal (per mol of C3H8)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.2 Page Number : 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "from scipy.optimize import fsolve \n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n", + "\n", + "a_CO2 = 5.316;\n", + "a_H2O = 7.700;\n", + "a_O2 = 6.085;\n", + "a_C2H6 = 1.648;\n", + "b_CO2 = 1.4285*10**(-2);\n", + "b_H2O = 0.04595*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "b_C2H6 = 4.124*10**(-2);\n", + "c_CO2 = -0.8362*10**(-5);\n", + "c_H2O = 0.2521*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "c_C2H6 = -1.530*10**(-5);\n", + "d_CO2 = 1.784*10**(-9);\n", + "d_H2O = -0.8587*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "d_C2H6 = 1.740*10**(-9);\n", + "\n", + "\t\t\t# The stabdard enthalpy of formation at 298.15 K is given by\n", + "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n", + "delta_H_for_C2H6 = -20.236;\t\t\t#[kcal/mol]\n", + "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n", + "\n", + "# Calculations\t\t\n", + " \t# The reaction with stoichiometric amount of air is\n", + "\t\t\t# C2H6 + (7/2)O2 - 2CO2 + 3H2O\n", + "\n", + "\t\t\t# The reaction with 4 mol of O2 and 10 mol CO2 is\n", + "\t\t\t# C2H6 + 4O2 + 10CO2 - 12H2O + 3H2O + 0.5O2\n", + "\t\t\t# The product consists of 12 mol of CO2, 3 mol of water vapour and 0.5 mol of oxygen\n", + "delta_H_rkn_298 = 2*delta_H_for_CO2 + 3*delta_H_for_H2O - delta_H_for_C2H6;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "\t\t\t# For exit stream\n", + "sum_ai_ni = 12*a_CO2 + 3*a_H2O + 0.5*a_O2;\n", + "sum_bi_ni = 12*b_CO2 + 3*b_H2O + 0.5*b_O2;\n", + "sum_ci_ni = 12*c_CO2 + 3*c_H2O + 0.5*c_O2;\n", + "sum_di_ni = 12*d_CO2 + 3*d_H2O + 0.5*d_O2;\n", + "\n", + "\t\t\t# From energy balance equation we get\n", + "\t\t\t# delta_H_rkn_298 + sum_ai_ni*(T_2 - T_1) + (sum_bi_ni/2)*(T_2**(2) - T_1**(2)) + (sum_ci_ni/3)*(T_2**(3) - T_1**(3)) + (sum_di_ni/4)*(T_2**(4) - T_1**(4))\n", + "\t\t\t# Solving above equation for T_2\n", + "def f(T_2): \n", + "\t return delta_H_rkn_298 +sum_ai_ni*(T_2-T_1)+(sum_bi_ni/2)*(T_2**(2)-T_1**(2))+(sum_ci_ni/3)*(T_2**(3)-T_1**(3))+(sum_di_ni/4)*(T_2**(4)-T_1**(4))\n", + "T_2 = fsolve(f,-1)\n", + "\n", + "# Results\n", + "print \" The adiabatic flame temperature is %f K\"%(T_2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The adiabatic flame temperature is 2090.385277 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.3 Page Number : 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - Standard reaction temperature\n", + "\n", + "\t\t\t# The reaction with theoritical air is\n", + "\t\t\t# CH4 + 2(O2 + 3.76N2) - CO2 + 2H20 + 7.52N2\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "n_product = (1 + 2 + 7.52);\t\t\t# Total number of moles of product\n", + "\t\t\t# The mole fraction of water vapour is\n", + "y_H2O = 2/(n_product);\n", + "print \" 1).The mole fraction of water vapour is %f\"%(y_H2O);\n", + "\n", + "\t\t\t#(2)\n", + "delta_H_rkn_298 = -730*10**(3);\t\t\t#[J/mol]\n", + "C = 40;\t\t\t#[J/mol-K] - Average molar heat capacity\n", + "\n", + "\t\t\t# From energy balance we have\n", + "\t\t\t# delta_H_rkn_298 + n_product*C(T_2 - T_1) = 0\n", + "T_2 = - delta_H_rkn_298/(n_product*C) + T_1;\t\t\t#[K]\n", + "T_max = T_2 - T_1;\n", + "\n", + "print \" 2).The maximum temperature rise of the exhaust gases is %f K\"%(T_max);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The mole fraction of water vapour is 0.190114\n", + " 2).The maximum temperature rise of the exhaust gases is 1734.790875 K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.4 Page Number : 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "\n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - Standiansard reaction temperature\n", + "\n", + "\t\t\t# The standard enthalpy of formation at 298.15 K is given by\n", + "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n", + "delta_H_for_C8H18 = -59.780;\t\t\t#[kcal/mol]\n", + "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n", + "\n", + "a_CO2 = 5.316;\n", + "a_H2O = 7.700;\n", + "a_N2 = 6.903;\n", + "b_CO2 = 1.4285*10**(-2);\n", + "b_H2O = 0.04595*10**(-2);\n", + "b_N2 = -0.03753*10**(-2);\n", + "c_CO2 = -0.8362*10**(-5);\n", + "c_H2O = 0.2521*10**(-5);\n", + "c_N2 = 0.1930*10**(-5);\n", + "d_CO2 = 1.784*10**(-9);\n", + "d_H2O = -0.8587*10**(-9);\n", + "d_N2 = -0.6861*10**(-9);\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "\t\t\t# The reaction with stoichiometric amount of air is\n", + "\t\t\t# C3H18 + 12.5(O2 + 3.76N2) - 8CO2 + 9H2O + 47N2\n", + "\n", + "\t\t\t# The standard enthalpy change of reaction at 298.15 K is\n", + "delta_H_rkn_298 = 8*delta_H_for_CO2 + 9*delta_H_for_H2O - delta_H_for_C8H18;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "\t\t\t# For exit stream\n", + "sum_ai_ni = 8*a_CO2 + 9*a_H2O + 47*a_N2;\n", + "sum_bi_ni = 8*b_CO2 + 9*b_H2O + 47*b_N2;\n", + "sum_ci_ni = 8*c_CO2 + 9*c_H2O + 47*c_N2;\n", + "sum_di_ni = 8*d_CO2 + 9*d_H2O + 47*d_N2;\n", + "\n", + "\t\t\t# From energy balance equation we get\n", + "\t\t\t# delta_H_rkn_298 + sum_ai_ni*(T_2 - T_1) + (sum_bi_ni/2)*(T_2**(2) - T_1**(2)) + (sum_ci_ni/3)*(T_2**(3) - T_1**(3)) + (sum_di_ni/4)*(T_2**(4) - T_1**(4))\n", + "\t\t\t# Solving above equation for T_2\n", + "def f(T_2): \n", + "\t return delta_H_rkn_298 +sum_ai_ni*(T_2-T_1)+(sum_bi_ni/2)*(T_2**(2)-T_1**(2))+(sum_ci_ni/3)*(T_2**(3)-T_1**(3))+(sum_di_ni/4)*(T_2**(4)-T_1**(4))\n", + "T_2 = fsolve(f,-1)\n", + "\n", + "print \" 1).The adiabatic flame temperature is %f K\"%(T_2);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# The mean standard heat capacity of various components over the temperature range from 25 to 3000 C is \n", + "Cp_CO2 = 13.91;\t\t\t#[cal/mol-K]\n", + "Cp_H2O = 10.16;\t\t\t#[cal/mol-K]\n", + "Cp_O2 = 7.88;\t\t\t#[cal/mol-K]\n", + "Cp_N2 = 7.45;\t\t\t#[cal/mol-K]\n", + "\n", + "\t\t\t# From energy balance equation we get\n", + "\t\t\t# delta_H_rkn_298 + (8*Cp_CO2 + 9*Cp_H2O + 47*Cp_N2)*(T_2_prime)\n", + "T_2_prime = - delta_H_rkn_298/(8*Cp_CO2 + 9*Cp_H2O + 47*Cp_N2);\t\t\t#[K]\n", + "print \" 2).The adiabatic flame temperature is %f K\"%(T_2_prime);\n", + "\n", + "# The answer is correct. Please calculate it manually. Wrong answer is given in book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The adiabatic flame temperature is 2415.861178 K\n", + " 2).The adiabatic flame temperature is 2193.675005 K\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.5 Page Number : 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "\t\t\t# N2 + 3H2 - 2NH3\n", + "T_1 = 700;\t\t\t#[K] - Reaction temperature\n", + "Max_adia_rise = 100;\t\t\t#/[K] - Maximum adiabatic rise in temperature\n", + "T_2 = T_1 + Max_adia_rise;\t\t\t#[K] - \n", + "\n", + "delta_H_rkn_700 = -94.2;\t\t\t#[kJ] - Smath.tan(math.radiansard enthalpy of reaction at 700 K\n", + "delta_H_rkn_700 = delta_H_rkn_700*10**(3);\t\t\t#[J]\n", + "\n", + "\t\t\t# The mean standard heat capacity of various components over the temperature range from 700 to 800 K is \n", + "Cp_N2 = 30.0;\t\t\t#[cal/mol-K]\n", + "Cp_H2 = 28.9;\t\t\t#[cal/mol-K]\n", + "Cp_NH3 = 49.2;\t\t\t#[cal/mol-K]\n", + "\n", + "# Calculations\t\t\t\n", + " # The energy balance equation is\n", + "\n", + "def f46(T): \n", + "\t return (sum_ni_Cpi_exit)*dT\n", + "\n", + "\t\t\t# X*delta_H_rkn_700 + quad(f46,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t#At exit, let moles of NH3 = (1-X), moles of H2 = (3-3X), moles of NH3 = 2X . Therefore we have,\n", + "\t\t\t# delta_H_rkn_700*X + {(1-X)*Cp_N2 + (3-3X)*Cp_H2 + (2X)*Cp_NH3}*(T_2 - T_1)\n", + "\t\t\t# On simplification we get, 960.3*X = 116.7\n", + "X = 116.7/960.3;\n", + "\n", + "# Results\n", + "print \" The maximum allowable conversion fraction in the reactor is given by X = %f \"%(X);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum allowable conversion fraction in the reactor is given by X = 0.121525 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.6 Page Number : 653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - standard reaction temperature\n", + "V = 2.0*10**(-3);\t\t\t#[m**(3)] - Volume of calorimeter\n", + "m = 10.;\t\t\t#[g] - Mass of liquid octane\n", + "Mol_wt = 114.;\t\t\t#[g/mol] - Molecular weight of octane\n", + "n = m/Mol_wt;\t\t\t#[mol] - No of moles of octane\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t# The standard enthalpy of formation at 298.15 K is given by\n", + "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n", + "delta_H_for_C8H18 = -59.780;\t\t\t#[kcal/mol]\n", + "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n", + "\n", + "\t\t\t# The standard molar heat capacity of various components in high temperature range from is given by \n", + "\t\t\t# Cp_H2O = 6.970 + 0.3464*10**(-2)*T - 0.04833*10**(-5)*T**(2);\n", + "\t\t\t# Cp_O2 = 6.732 + 0.1505*10**(-2)*T - 0.01791*10**(-5)*T**(2);\n", + "\t\t\t# Cp_CO2 = 18.036 - 4.474*10**(-5)*T - 158.08/(T**(1/2));\n", + "\t\t\t# Therefore we have\n", + "\t\t\t# Sum_ni_Cpi_exit = 249.09 + 0.04*T - 0.547*10**(-5)*T**(2) - 1264.64/(T**(1/2))\n", + "\n", + "\t\t\t# The reaction with stoichiometric amount of oxygen is\n", + "\t\t\t# C8H18 + 12.5O2 - 8CO2 + 9H2O\n", + "\n", + "\t\t\t# The reaction with 50% excess oxygen is\n", + "\t\t\t# C8H18 + 18.75O2 - 8CO2 +9H2O + 6.25O2\n", + "\n", + "# Calculations\n", + "\t\t\t# The standard enthalpy change of reaction at 298.15 K is\n", + "delta_H_rkn_298 = 8*delta_H_for_CO2 + 9*delta_H_for_H2O - delta_H_for_C8H18;\t\t\t#[kcal]\n", + "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n", + "\n", + "\t\t\t# From the energy balance equation we get\n", + "\n", + "def f10(T): \n", + "\t return (sum_ni_Cpi_exit)*dT\n", + "\n", + "\t\t\t# delta_H_rkn_298 + quad(f10,T_1,T_2)[0]\n", + "\n", + "\t\t\t# delta_H_rkn_298 + 249.09*(T_2 - T_1) + (0.04/2)*(T_2**(2) - T_1**(2)) - ((0.547*10**(-5))/3)*(T_2**(3)-T_1**(3)) - (1264.64*2)*(T_2**(1/2)-T_1**(1/2))\n", + "\t\t\t# Solving above equation for T_2\n", + "def f(T_2): \n", + "\t return delta_H_rkn_298 + 249.09*(T_2 - T_1) + (0.04/2)*(T_2**(2)-T_1**(2)) - ((0.547*10**(-5))/3)*(T_2**(3)-T_1**(3)) - (1264.64*2)*(T_2**(1./2)-T_1**(1./2))\n", + "T_2 = fsolve(f,1000)\n", + "\n", + "\t\t\t# When 1 mol of octane reacts the final number of moles in the calorimeter is 23.25\n", + "\t\t\t# When n mol of octane reacts the final number of moles in the calorimeter is\n", + "n_total = n*23.25;\t\t\t#[mol]\n", + "\n", + "\t\t\n", + "\t\t\t# Thus maximum explosion pressure is given by\n", + "P = (n_total*R*T_2)/V;\t\t\t#[N/m**(2)]\n", + "P = P*10**(-5);\t\t\t#[bar]\n", + "\n", + "# Results\n", + "print \" The maximum explosion pressure inside the bomb calorimeter is %f bar\"%(P);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum explosion pressure inside the bomb calorimeter is 397.138166 bar\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 18.7 Page Number : 656" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve\n", + "import math\n", + " \n", + "\n", + "# Variables\n", + "T_1 = 400 + 273.15;\t\t\t#[K]\n", + "\t\t\t# SO2(g) + 1./2*(O2) (g) - SO3 (g)\n", + "\n", + "a_SO2 = 6.157;\n", + "a_SO3 = 3.918;\n", + "a_O2 = 6.085;\n", + "a_N2 = 6.903;\n", + "b_SO2 = 1.384*10**(-2);\n", + "b_SO3 = 3.483*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "b_N2 = -0.03753*10**(-2);\n", + "c_SO2 = -0.9103*10**(-5);\n", + "c_SO3 = -2.675*10**(-5);\n", + "c_O2 = -0.01709*10**(-5);\n", + "c_N2 = 0.1930;\n", + "d_SO2 = 2.057*10**(-9);\n", + "d_SO3 = 7.744*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "d_N2 = -0.6861*10**(-9);\n", + "\n", + "# Calculations\n", + "\t\t\t# At 400 C, from the given math.expressions\n", + "delta_H_rkn_T_1 = -22630.14 - 5.2815*T_1 + 0.9587*10**(-2)*T_1**(2) - 0.5598*10**(-5)*T_1**(3) + 1.3826*10**(-9)*T_1**(4);\t\t\t#[cal]\n", + "\n", + "\t\t\t# delta_H_rkn_T_X (for X moles of SO2 reacted) = delta_H_rkn_T_1*X\n", + "\n", + "\t\t\t# Let the number of moles at equilibrium be\n", + "\t\t\t# n_O2 = 9-0.5*X\n", + "\t\t\t# n_SO2 = 12-X\n", + "\t\t\t# n_SO3 = X\n", + "\t\t\t# n_N2 = 79\n", + "\t\t\t# Total moles at equilibrium = 100-0.5X\n", + "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(1./2))\n", + "\t\t\t# Ky = (X*(100-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n", + "\t\t\t# We know that K = Ky*Kp. Since P = 1 atm, therefore Ky = K\n", + "\n", + "\t\t\t# Now we have to account for the heat required to raise 9-0.5*X mol of O2, 12-X mol of SO2, X mol of SO3 and 79 mol of N2 from T to ART\n", + "\t\t\t# sum_ni_Cp_i = (12-X)*(a + b*T + c*T**(2) + d*T**(3)) + (9-0.5*X)*(a + b*T + c*T**(2) + d*T**(3)) + X*(a + b*T + c*T**(2) + d*T**(3)) + 79*(a + b*T + c*T** (2) + d*T**(3))\n", + "\n", + "\t\t\t# From energy balance equation we get\n", + "\n", + "def f19(T): \n", + "\t return sum_ni_Cp_i\n", + "\n", + "\t\t\t# delta_H_rkn_T_1 + quad(f19,T_1,T)[0]\n", + "\n", + "\t\t\t# The above equation on simplification becomes\n", + "\t\t\t# (673.99-5.2815*X)*(T-T_1) + (16.91+1.9175*X)*(10**(-2)/2)*(T**(2)-T_1**(2)) + (2.79-1.6793*X)*(10**(-5)/3)*(T**(3)-T_1**(3)) + (-26.70+5.5304*X)*(10**(-9) /4)*(T**(4)-T_1**(4)) = delta_H_rkn_T_1*X\n", + "\n", + "\t\t\t# Let us assume a temperature, say\n", + "T = 800;\t\t\t#[K]\n", + "fault = 10;\n", + "def f(X): \n", + "\t return K - (X*(100-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n", + "\n", + "def f1(X): \n", + "\t return (673.99-5.2815*X)*(T-T_1)+(16.91+1.9175*X)*(10**(-2)/2)*(T**(2)-T_1**(2))+(2.79-1.6793*X)*(10**(-5)/3)*(T**(3)-T_1**(3))+(-26.70+5.5304*X)*(10**(-9)/4)*(T**(4)-T_1**(4))+delta_H_rkn_T_1*X\n", + "\n", + "while(fault>0.01):\n", + " K = math.exp(3.87 + (11389.10/T) - 2.6580*math.log(T) + 0.4825*10**(-2)*T - 0.1409*10**(-5)*T**(2) + 0.2320*10**(-9)*T**(3));\n", + " X1 = fsolve(f,0.1)\n", + " X2 = fsolve(f1,1)\n", + " fault = abs(X1-X2);\n", + " T = T + 0.01;\n", + "\n", + "# Results\n", + "print \" The moles of SO2 reacted are %f mol\"%(X1);\n", + "print \" The adiabatic reaction temperature is %f K\"%(T);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The moles of SO2 reacted are 7.594592 mol\n", + " The adiabatic reaction temperature is 886.860000 K\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb new file mode 100755 index 00000000..13ddc7dd --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb @@ -0,0 +1,770 @@ +{ + "metadata": { + "name": "ch1_2", + "signature": "sha256:05ef5db2afef7232054abda0278780d1df8c92b807546fcd7648e8885fa4539f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.1 Page number - 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# \n", + "# Variables\n", + "#(a)\n", + " \n", + "m = 50.;\t\t\t#[kg] - Mass of piston\n", + "A = 0.05;\t\t\t#[m**(2)] - Area of piston\n", + "g = 9.81;\t\t\t#[m/s**(2)] - Acceleration due to gravity\n", + "Po = 101325;\t\t\t#[N/m**(2)] - Atmospheric pressure\n", + "\n", + "# Calculations and Results\n", + "P = (m*g/A)+Po;\t\t\t#[N/m**(2)]\n", + "P = P/100000.;\t\t\t#[bar]\n", + "print \" (a).Pressure = %f bar\"%P\n", + "\n", + "#(b)\n", + "print \" (b).Since the piston weight and surroundings pressure are the same, \\\n", + "the gas pressure in the piston-cylinder assembly remains %f bar\"%P\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a).Pressure = 1.111350 bar\n", + " (b).Since the piston weight and surroundings pressure are the same, the gas pressure in the piston-cylinder assembly remains 1.111350 bar\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.2 Page number - 8\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "P = 1.;\t\t\t#[atm] - Atmospheric pressure\n", + "P = 101325.;\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "T = 30.;\t\t\t#[C] - Temperature of air\n", + "T = 30.+273.15;\t\t\t#[K]\n", + "V = 5.*5*5;\t\t\t#[m**(3)] - Volume of the room\n", + "\n", + "# Calculations\n", + "#The number of moles of air is given by\n", + "n = (P*V)/(R*T)\t\t\t#[mol]\n", + "\n", + "#Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n", + "m = n*28.84;\t\t\t#[g]\n", + "m = m/1000.;\t\t\t#[kg]\n", + "\n", + "# Results\n", + "print \"The mass of air is, m = %f kg\"%m\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of air is, m = 144.928664 kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.3 Page number - 13\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "P1 = 3.;\t\t\t# [bar] - initial pressure\n", + "V1 = 0.5;\t\t\t# [m**(3)] - initial volume\n", + "V2 = 1.0;\t\t\t# [m**(3)] - final volume\n", + "import math\n", + "#(a)\n", + "n = 1.5;\n", + "\n", + "# Calculations and Results\n", + "#Let P*V**(n)=C \t\t\t# Variables relation\n", + "#W (work done per mole)= (integrate('P'%'V'%V1%V2))\n", + "#and thus W=((P2*V2)-(P1*V1))/(1-n)\n", + "#The above math.expression is valid for all values of n%except n=1.0\n", + "P2 = (P1*((V1/V2)**(n)))\t\t\t#[bar] \t\t\t#pressure at state 2\n", + "\n", + "#we have%(V1/V2)=(V1t/(V2t)%since the number of moles are constant.Thus\n", + "W = ((P2*V2)-(P1*V1))/(1-n)*10**(5)\t\t\t#[J]\n", + "W = W/1000.;\t\t\t#[kJ]\n", + "print \" (a).The work done (for n=1.5) is %f kJ\"%W\n", + "\n", + "#(b)\n", + "#For n=1.0%we have% PV=C.\n", + "# w(wok done per mol)= (integrate('P'%'V'%V1%V2)) = (integrate('C/V'%'V'%V1%V2)) = C*ln(V2/V1)=P1*V1*ln(V2/V1)\n", + "W1 = P1*V1*math.log(V2/V1)*10**(5)\t\t\t#[J]\n", + "W1 = W1/1000.;\t\t\t#[kJ]\n", + "print \" (b).The work done (for n=1.0) is %f kJ\"%W1\n", + "\n", + "#(c)\n", + "#For n=0%we get P=Constant and thus\n", + "P = P1;\t\t\t#[bar]\n", + "# w =(integrate('P'%'V'%V1%V2)) = P*(V2-V1)\n", + "W2 = P*(V2-V1)*10**(5)\t\t\t#[J]\n", + "W2 = W2/1000.;\t\t\t#[kJ]\n", + "print \" (c).The work done (for n=0) is %f kJ\"%W2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a).The work done (for n=1.5) is 87.867966 kJ\n", + " (b).The work done (for n=1.0) is 103.972077 kJ\n", + " (c).The work done (for n=0) is 150.000000 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.4 Page number - 17\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "#(a)\n", + "# Variables\n", + "V = 9.;\t\t\t# [m/s] - velocity\n", + "d = 1.;\t\t\t#[m] - diameter\n", + "A = 3.14*(d/2)**(2)\t\t\t#[m**(2)] - area\n", + "P = 1.;\t\t\t#[atm] - pressure\n", + "P = 101325.;\t\t\t# [N/m**(2)]\n", + "T = 300.;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "E = (V**(2))/2.;\t\t\t#[J/kg]\n", + "print \" (a).The wind energy per unit mass of air is %f J/kg\"%E\n", + "\n", + "#(b)\n", + "# Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n", + "M = 28.84*10**(-3)\t\t\t#[kg/mol]\n", + "r = (P*M)/(R*T)\t\t\t#[kg/m**(3)] - density\n", + "m = r*V*A;\t\t\t# [kg/s] - mass flow rate of air\n", + "pi = m*E;\t\t\t#[Watt] - power input\n", + "print \" (b).The wind power input to the turbine is %f Watt\"%pi\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a).The wind energy per unit mass of air is 40.500000 J/kg\n", + " (b).The wind power input to the turbine is 335.233787 Watt\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.5 Page number - 23\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Given\n", + "P = 1.;\t\t\t # [bar] - atospheric pressure\n", + "P1guz = 0.75;\t\t\t# [bar] - gauze pressure in 1st evaporator\n", + "P2Vguz = 0.25;\t\t\t# [bar] - vaccum gauze pressure in 2nd evaporator\n", + "\n", + "# Calculations\n", + "P1abs = P + P1guz;\t\t\t# [bar] - absolute pressure in 1st evaporator\n", + "P2abs = P - P2Vguz;\t\t\t# [bar] -absolute pressure in 2nd evaporator\n", + "\n", + "# Results\n", + "#From saturated steam table as reported in the book\n", + "print \" For P1abs (absolute pressure) = %f bar\"%P1abs\n", + "print \" The saturation temperature in first evaporator is 116.04 C\"\n", + "print \" For P2abs (absolute pressure) = %f bar\"%P2abs\n", + "print \" The saturation temperature in second evaporator is 91.76 C\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " For P1abs (absolute pressure) = 1.750000 bar\n", + " The saturation temperature in first evaporator is 116.04 C\n", + " For P2abs (absolute pressure) = 0.750000 bar\n", + " The saturation temperature in second evaporator is 91.76 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.6 Page number - 23\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "V = 1.;\t\t\t # [kg] - volume of tank\n", + "P = 10.;\t\t\t# [bar] - pressure\n", + "\n", + "#Here degree of freedom =1(C=1%P=2%threfore F=1)\n", + "#From steam table at 10 bar as reported in the book\n", + "V_liq = 0.001127;\t\t\t# [m**(3)/kg] - volume in liquid phase\n", + "V_vap = 0.19444;\t\t\t# [m**(3)/kg] - volume in vapour phase\n", + "\n", + "# Calculations\n", + "#x*Vv=(1-x)*Vl \t\t\t# since two volumes are equal\n", + "x = (V_liq/(V_liq+V_vap))\t\t\t# [kg]\n", + "y = (1-x)\t\t\t#[kg]\n", + "\n", + "# Results\n", + "print \" Mass of saturated vapour is %f kg\"%x\n", + "print \" Mass of saturated liquid is %f kg\"%y\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Mass of saturated vapour is 0.005763 kg\n", + " Mass of saturated liquid is 0.994237 kg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.7 Page number - 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "V = 1.;\t\t\t# [m**(3)] - volume of tank\n", + "M = 10.;\t\t\t# [m**(3)] - total mass\n", + "T = (90+273.15)\t\t\t#[K] - temperature\n", + "\n", + "#From steam table at 90 C as reported in the book\n", + "#vapour pressure(pressure of rigid tank) = 70.14[kPa] = 0.7014[bar]\n", + "print \" Pressure of tank = 0.7014 bar\"\n", + "\n", + "# Calculations and Results\n", + "V_liq_sat=0.001036;\t\t\t# [m**(3)/kg] - saturated liquid specific volume\n", + "V_vap_sat=2.36056;\t\t\t# [m**(3)/kg] - saturated vapour specific volume\n", + "\n", + "#1=(V_liq_sat*(10-x))+(V_vap_sat*x)\n", + "x = (1-(10*V_liq_sat))/(V_vap_sat-V_liq_sat)\t\t\t#[kg]\n", + "y = (10-x)\t\t\t#[kg]\n", + "\n", + "print \" The amount of saturated liquid is %f kg\"%y\n", + "print \" The amount of saturated vapour is %f kg \"%x\n", + "\n", + "z = y*V_liq_sat;\t\t\t#[m**(3)] - Volume of saturated liquid \n", + "w = x*V_vap_sat;\t\t\t#[m**(3)] - Volume of saturated vapour\n", + "\n", + "print \" Total volume of saturated liquid is %f m**(3)\"%z\n", + "print \" Total volume of saturated vapour is %f m**(3)\"%w\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Pressure of tank = 0.7014 bar\n", + " The amount of saturated liquid is 9.580576 kg\n", + " The amount of saturated vapour is 0.419424 kg \n", + " Total volume of saturated liquid is 0.009925 m**(3)\n", + " Total volume of saturated vapour is 0.990075 m**(3)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.8 Page number - 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "V = 10.;\t\t\t# [m**(3)] - volume of vessel\n", + "P_1 = 1.;\t\t\t# [bar] - initial pressure\n", + "V_liq_sat = 0.05;\t\t\t# [m**(3)] - saturated liquid volume\n", + "V_gas_sat = 9.95;\t\t\t# [m**(3)] - saturated vapour volume\n", + "\n", + "#At 1 bar pressure\n", + "V_liq_1 = 0.001043;\t\t\t# [m**(3/kg)] - specific saturated liquid volume\n", + "U_liq_1 = 417.33;\t\t\t# [kJ/kg] - specific internal energy\n", + "V_gas_1 = 1.69400;\t\t\t# [m**(3/kg)] - specific saturated vapour volume\n", + "U_gas_1 = 2506.06;\t\t\t# [kJ/kg]\n", + "\n", + "# Calculations\n", + "M_liq_1 = V_liq_sat/V_liq_1;\t\t\t# [kg] - mass of saturated liqid\n", + "M_gas_1 = V_gas_sat/V_gas_1;\t\t\t# [kg] - mass of saturated vapour\n", + "M = (M_liq_1+M_gas_1)\t\t\t# [kg] - total mass\n", + "U_1t = (M_liq_1*U_liq_1)+(M_gas_1*U_gas_1)\t\t\t# [kJ] - initial internal energy\n", + "V_gas_2 = (V/M)\t\t\t#[m**(3/kg)]\n", + "\n", + "#from steam table at 10 bar pressure as reported in the book\n", + "V_vap_2 = 0.19444;\t\t\t# [m**(3/kg)]\n", + "U_vap_2 = 2583.64;\t\t\t# [kJ/kg]\n", + "\n", + "#from steam table at 11 bar pressure as reported in the book\n", + "V_vap_3 = 0.17753;\t\t\t#[m**(3/kg)]\n", + "U_vap_3 = 2586.40;\t\t\t#[kJ/kg]\n", + "\n", + "#Now computing pressure when molar volume of saturated vapour=Vg_2\n", + "#By interpolation (P2-10)/(11-10)=(Vg_2-Vv_2)/(Vv_3-Vv_2)\n", + "P_2 = (((V_gas_2 - V_vap_2)/(V_vap_3 - V_vap_2)*1)+10)\t\t\t# [bar] - final pressure\n", + "\n", + "#By interpolation calculating internal energy at state 2\n", + "#(P2-10)/(11-10)=(U2-Uv_2)/(Uv_3-Uv_2)\n", + "U_2 = (((P_2-10)/(11-10))*(U_vap_3 - U_vap_2))+U_vap_2;\t\t\t#[kJ/kg]\n", + "U_2t = U_2*M;\t\t\t#[kJ]\n", + "H = U_2t - U_1t;\t\t\t#[kJ] - Heat supplied\n", + "H = H/1000;\t\t\t#[MJ]\n", + "\n", + "# Results\n", + "print \" Total heat supplied is %f MJ\"%H\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total heat supplied is 104.381244 MJ\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.9 Page number - 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "#Antoine equation for water ln(Psat)=16.262-(3799.89/(T_sat + 226.35))\n", + "P = 2.;\t\t\t#[atm] - Pressure\n", + "P = (2.*101325)/1000;\t\t\t#[kPa]\n", + "\n", + "# Calculations\n", + "P_sat = P;\t\t\t# Saturation pressure\n", + "T_sat = (3799.89/(16.262-math.log(P_sat)))-226.35;\t\t\t#[C] - Saturation temperature\n", + "#Thus boiling at 2 atm occurs at Tsat = 120.66 C.\n", + "\n", + "#From steam tables%at 2 bar%Tsat = 120.23 C and at 2.25 bar%Tsat = 124.0 C\n", + "#From interpolation for T_sat = 120.66 C%P = 2.0265 bar\n", + "#For P_= 2.0265 bar%T_sat% from steam table by interpolation is given by\n", + "#((2.0265-2)/(2.25-2))=((Tsat-120.23)/(124.0-120.23))\n", + "T_sat_0 = (((2.0265-2)/(2.25-2))*(124.0-120.23))+120.23;\t\t\t#[C]\n", + "\n", + "# Results\n", + "print \" Saturation temperature (Tsat) = %f C which is close \\\n", + "to %f C as determined from Antoine equation\"%(T_sat_0,T_sat)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Saturation temperature (Tsat) = 120.629620 C which is close to 120.655450 C as determined from Antoine equation\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.10 Page number - 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "# math.log(P)=-(1640/T)+10.56 (solid)\n", + "# math.log(P)=-(1159/T)+7.769 (liquid)%where T is in K\n", + "# F+P=C+2% at triple point F+3=1+2 or%F=0 i.e%vapour pressure of liquid and solid at triple point are same%we get\n", + "# -(1640/T)+10.56 = -(1159/T)+7.769\n", + "\n", + "# Calculations\n", + "T = (1640-1159)/(10.56-7.769)\t\t\t#[K]\n", + "P = 10**((-1640/T)+10.56)\t\t\t#[torr]\n", + "\n", + "# Results\n", + "print \" The temperature is %f K\"%T\n", + "print \" The pressure is %f torr (or mm Hg)\"%P\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The temperature is 172.339663 K\n", + " The pressure is 11.063907 torr (or mm Hg)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.11 Page number - 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "M_O2 = 31.999;\t\t\t#molecular weight of oxygen\n", + "M_N2 = 28.014;\t\t\t#molecular weight of nitrogen\n", + "Y = 1.4;\t\t\t#molar heat capacities ratio for air\n", + "\n", + "# Calculations and Results\n", + "#Molecular weight of air(21 vol% O2 and 79 vol% N2)is given by\n", + "M_air = (0.21*M_O2)+(0.79*M_N2)\t\t\t#(vol% = mol%)\n", + "\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "R = (R*1/M_air)\t\t\t#[kJ/kg*K]\n", + "\n", + "print \" The value of universal gas constant (R) = %f kJ/kg-K \"%R\n", + "\n", + "#Y=Cp0/Cv0 and Cp0-Cv0=R\n", + "Cv_0 = R/(Y-1)\t\t\t#[kJ/kg*K] \n", + "Cp_0 = Y*Cv_0;\t\t\t#[kJ/kg*K]\n", + "print \" The value of Cp_0 for air is %f kJ/kg-K\"%Cp_0\n", + "print \" The value of Cv_0 for air is %f kJ/kg-K\"%Cv_0\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of universal gas constant (R) = 0.288172 kJ/kg-K \n", + " The value of Cp_0 for air is 1.008601 kJ/kg-K\n", + " The value of Cv_0 for air is 0.720429 kJ/kg-K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.12 Page number - 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "Y = 1.4;\t\t\t#molar heat capacities ratio for air\n", + "R = 8.314;\t\t\t# [J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations\n", + "Cv_0 = R/(Y-1)\t\t\t# [J/mol*K]\n", + "Cp_0 = Y*Cv_0;\t\t\t# [J/mol*K]\n", + "\n", + "# Results\n", + "print \" The molar heat capacity at constant volume (Cv_0) is %f J/mol-K\"%Cv_0\n", + "print \" The molar heat capacity at constant pressure (Cp_0) is %f J/mol-K\"%Cp_0\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar heat capacity at constant volume (Cv_0) is 20.785000 J/mol-K\n", + " The molar heat capacity at constant pressure (Cp_0) is 29.099000 J/mol-K\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.13 Page number - 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.integrate import quad\n", + "\n", + "# Variables\n", + "# Cp0=7.7+(0.04594*10**(-2)*T)+(0.2521*10**(-5)*T**(2))-(0.8587*10**(-9)*T**(3))\n", + "T_1 = 400.;\t\t\t#[K]\n", + "T_2 = 500.;\t\t\t#[K]\n", + "\n", + "# Calculations\n", + "def f(T):\n", + " return 7.7+(0.04594*10**(-2)*T)+(0.2521*10**(-5)*T**(2))-(0.8587*10**(-9)*T**(3))\n", + "#(C)avg = q/(T_2 - T_1) = 1/(T_2 - T_1)*{(integrate('C'%'T'%T_1%T_2))}\n", + "#(Cp0)avg = 1/(T_2 - T_1)*{(integrate('Cp0'%'T'%T_1%T_2))}\n", + "Cp0_avg = (1/(T_2 - T_1))*quad(f,T_1,T_2)[0]\n", + "\n", + "# Results\n", + "print \" The mean heat capacity (Cp0_avg) for temerature range of 400 to 500 K is %f cal/mol-K\"%Cp0_avg\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mean heat capacity (Cp0_avg) for temerature range of 400 to 500 K is 8.340118 cal/mol-K\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 1.14 Page number - 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "#(a)\n", + "P_1 = 0.2;\t\t\t# [MPa] - pressure\n", + "x_1 = 0.59;\t\t\t# mole fraction\n", + "\n", + "# Calculations and Results\n", + "#From saturated steam tables at 0.2 MPa\n", + "H_liq_1 = 504.7;\t\t\t# [kJ/kg] - Enthalpy of saturated liquid\n", + "H_vap_1 = 2706.7;\t\t\t# [kJ/kg]- Enthalpy of saturated vapour\n", + "H_1 = (H_liq_1*(1-x_1))+(x_1*H_vap_1)\t\t\t# [kJ/kg]\n", + "print \" (a).Enthalpy of 1 kg of water in tank is %f kJ/kg\"%H_1\n", + "\n", + "#(b)\n", + "T_2 = 120.23;\t\t\t# [C] - temperature\n", + "V_2 = 0.6;\t\t\t# [m**(3)/kg] - specific volume\n", + "\n", + "#From saturated steam tables at 120.23 C% as reported in the book\n", + "V_liq_2=0.001061;\t\t\t# [m**(3)/kg]\n", + "V_vap_2=0.8857;\t\t\t# [m**(3)/kg]\n", + "#since V_2 < Vv_2%dryness factor will be given by% V = ((1-x)*V_liq)+(x*V_vap)\n", + "x_2 = (V_2- V_liq_2)/(V_vap_2 - V_liq_2)\n", + "\n", + "#From steam table%at 120.2 C%the vapour pressure of water is 0.2 MPa.So%enthalpy is given by\n", + "H_2 = (H_liq_1*(1-x_2))+(H_vap_1*x_2)\t\t\t#kJ/kg]\n", + "print \" (b).Enthalpy of saturated steam is %f kJ/kg\"%H_2\n", + "\n", + "#(c)\n", + "P_3 = 2.5;\t\t\t#[MPa]\n", + "T_3 = 350;\t\t\t#[C]\n", + "#From steam tables at 2.5 MPa%T_sat = 223.99 C%as reported in the book\n", + "#since%T_3 > Tsat% steam is superheated\n", + "print \" (c).As steam is superheated%from steam table%enthalpy (H) is 3126.3 kJ/kg\"\n", + "\n", + "#(d)\n", + "T_4 = 350;\t\t\t#[C]\n", + "V_4 = 0.13857;\t\t\t#[m**(3)/kg]\n", + "#From steam table%at 350 C% V_liq = 0.001740 m**(3)/kg and V_vap = 0.008813 m**(3)/kg.Since%V > V_vap%therefore it is superheated.\n", + "#From steam table at 350 C and 1.6 MPa% V = 0.17456 m**(3)/kg\n", + "#At 350 C and 2.0 MPa% V = 0.13857 m**(3)/kg. So%\n", + "print \" (d).The enthalpy of superheated steam (H) is 3137.0 kJ/kg\"\n", + "\n", + "#(e)\n", + "P_4 = 2.0;\t\t\t#[MPa]\n", + "U_4 = 2900;\t\t\t# [kJ/kg] - internal energy\n", + "#From saturated table at 2.0 MPa% U_liq = 906.44kJ and U_vap = 2600.3 kJ/kg\n", + "#scince%U_4 > Uv% it is saturated.\n", + "#From superheated steam table at 2.0 MPa and 350 C% as reported in the book\n", + "U_1 = 2859.8;\t\t\t#[kJ/kg]\n", + "H_1 = 3137.0;\t\t\t#[kJ/kg]\n", + "#At 2.0 MPa and 400 C%\n", + "U_2 = 2945.2;\t\t\t#[kJ/kg]\n", + "H_2 = 3247.6;\t\t\t#[kJ/kg]\n", + "T = (((U_4 - U_1)/(U_2 - U_1))*(400 - 350)) + 350;\t\t\t#[C] - By interpolation\n", + "H = (((T - 350)/(400 - 350))*(H_2 - H_1)) + H_1;\t\t\t#[kJ/kg]\n", + "print \" (e).The enthalpy value (of superheated steam) obtained after interpolation is %f kJ/kg\"%H\n", + "\n", + "#(f)\n", + "P_5 = 2.5;\t\t\t#[MPa]\n", + "T_5 = 100;\t\t\t#[C]\n", + "#At 100 C%P_sat=101350 N/m**(2). Since P_5 > P_sat%it is compressed liquid\n", + "P_sat = 0.101350;\t\t\t#[MPa]\n", + "H_liq = 419.04;\t\t\t#[kJ/kg] - At 100 C and 0.10135 MPa\n", + "V_liq = 0.001044;\t\t\t#[m**(3)/kg] - At 100 C and 0.10135 MPa\n", + "H_0 = H_liq + (V_liq*(P_5 - P_sat))*1000;\t\t\t#kJ/kg]\n", + "print \" (f).The enthalpy of compressed liquid is %f kJ/kg\"%H_0\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a).Enthalpy of 1 kg of water in tank is 1803.880000 kJ/kg\n", + " (b).Enthalpy of saturated steam is 1995.549576 kJ/kg\n", + " (c).As steam is superheated%from steam table%enthalpy (H) is 3126.3 kJ/kg\n", + " (d).The enthalpy of superheated steam (H) is 3137.0 kJ/kg\n", + " (e).The enthalpy value (of superheated steam) obtained after interpolation is 3189.062295 kJ/kg\n", + " (f).The enthalpy of compressed liquid is 421.544191 kJ/kg\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb new file mode 100755 index 00000000..c009ac76 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb @@ -0,0 +1,1276 @@ +{ + "metadata": { + "name": "ch2_2", + "signature": "sha256:6aa23fb1475338cf467e7afb5732b8b9e456bbb3ad63c14224d73232d920457e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "\n", + "Chapter 2 : Equations of state" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.2 Page number - 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "Tc = 647.1;\t\t\t#[K] - Critical temperature\n", + "Pc = 220.55;\t\t#[bar] - Critical pressure\n", + "Tr = 0.7;\t\t\t# Reduced temperature\n", + "\n", + "# Calculations\n", + "T = Tr*Tc;\t\t\t#[K]\n", + "\t\t\t#From steam table%vapour pressure of H2O at T is 10.02 [bar]% as reported in the book\n", + "P = 10.02;\t\t\t#[bar]\n", + "w = -1-math.log10((P/Pc))\n", + "\n", + "# Results\n", + "print \" The acentric factor (w) of water at given condition is %f \"%w\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The acentric factor (w) of water at given condition is 0.342639 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.3 Page number - 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "\t\t\t#math.log10(Psat)=8.1122-(1592.864/(t+226.184))\t\t\t# 'Psat' in [mm Hg] and 't' in [c]\n", + "Tc = 513.9;\t\t\t#[K] - Critical temperature\n", + "Pc = 61.48;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5)\t\t\t#[N/m**(2)]\n", + "Tr = 0.7;\t\t\t# Reduced temperature\n", + "\n", + "# Calculations\n", + "T = Tr*Tc;\t\t\t#[K] - Temperature\n", + "T = T - 273.15;\t\t\t#[C]\n", + "P_sat = 10**(8.1122 - (1592.864/(T + 226.184)))\t\t\t#[mm Hg]\n", + "P_sat = (P_sat/760)*101325;\t\t\t#[N/m**(2)]\n", + "Pr_sat = P_sat/Pc;\n", + "w = -1-math.log10(Pr_sat)\t\t\t# Acentric factor\n", + "\n", + "# Results\n", + "print \" The acentric factor (w) for ethanol at given condition is %f\"%w\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The acentric factor (w) for ethanol at given condition is 0.644493\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.4 Page number - 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 380;\t\t\t#[K] - Temperature\n", + "Tc = 562.1;\t\t\t#[K] - Critical temperature\n", + "P = 7;\t\t\t#[atm] - Pressure\n", + "P = P*101325;\t\t\t#[N/m**(2)]\n", + "Pc = 48.3;\t\t\t#[atm] - Critical pressure\n", + "Pc = Pc*101325;\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "w = 0.212;\t\t\t# acentric factor\n", + "Tr = T/Tc;\t\t\t# Reduced temperature\n", + "\n", + "# Calculations and Results\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6))\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2))\n", + "\n", + "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "print \" The second virial coefficient for benzene is %e m**(3)/mol\"%B\n", + "\n", + "\t\t\t#Compressibility factor is given by\n", + "Z = 1 + ((B*P)/(R*T))\n", + "print \" The compressibility factor at 380 K is %f\"%Z\n", + "\n", + "\t\t\t#We know thar Z=(P*V)/(R/*T)%therfore\n", + "V = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n", + "print \" The molar volume is %e m**(3)/mol\"%V\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The second virial coefficient for benzene is -8.267963e-04 m**(3)/mol\n", + " The compressibility factor at 380 K is 0.814382\n", + " The molar volume is 3.627499e-03 m**(3)/mol\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.5 Page number - 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "V_1 = 0.3;\t\t\t#[m**(3)]\t\t\t#volume of cylinder\n", + "T = 60+273.15;\t\t\t#[K] - Temperature\n", + "P = 130*10**(5)\t\t\t#[N/m**(2)] - Pressure\n", + "Tc = 305.3;\t\t\t#[K] - Critical temperature\n", + "Pc = 48.72*10**(5)\t\t\t#[N/m**(2)] - Critical pressure\n", + "w = 0.100;\t\t\t#acentric factor\n", + "M = 30.07;\t\t\t#molecular weight of ethane\n", + "Tr = T/Tc;\t\t\t# Reduced temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6))\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2))\n", + "\n", + "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "Z = 1 + ((B*P)/(R*T))\t\t\t#Compressibility factor\n", + "V = (Z*R*T)/P;\t\t\t#[m**(3)/mol] - Molar volume\n", + "\n", + "\t\t\t#No.of moles in 0.3 m**(3) cylinder is given by\n", + "n1 = V_1/V;\t\t\t#[mol]\n", + "\n", + "\t\t\t#Mass of gas in cylinder is given by \n", + "m1 = (n1*M)/1000.;\t\t\t#[kg]\n", + "print \" Under actual conditions, the mass of ethane is, %f kg\"%m1\n", + "\n", + "\t\t\t#Under ideal condition% taking Z = 1%\n", + "V_ideal = (R*T)/P;\t\t\t#[m**(3)/mol]\n", + "n2 = V_1/V_ideal;\t\t\t#[mol]\n", + "m2 = (n2*M)/1000;\t\t\t#[kg]\n", + "print \" Under ideal conditions,the mass of ethane is, %f kg\"%m2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Under actual conditions, the mass of ethane is, 136.395203 kg\n", + " Under ideal conditions,the mass of ethane is, 42.339741 kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.6 Page number - 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 373.15;\t\t\t#[K] - Temperature\n", + "P = 101325;\t\t\t#[N/m**(2)] - Pressure\n", + "Tc = 647.1;\t\t\t#[K] - Critical temperature\n", + "Pc = 220.55*10**(5)\t#[N/m**(2)] - Critical pressure\n", + "w = 0.345;\t\t\t#acentric factor\n", + "Tr = T/Tc;\t\t\t# Reduced temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - UNiversal gas constant\n", + "\n", + "# Calculations\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6))\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2))\n", + "\n", + "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n", + "\n", + "\t\t\t#We have% Z = 1+(B/V) and Z = (P*V)/(R*T). Substituting the value of Z%we get\n", + "\t\t\t# V**(2)-((R*T)/P)*V-((B*R*T)/P)=0 .Solving the quadratic equation by shreedharcharya rule\n", + "V1 = (((R*T)/P) + (((R*T)/P)**(2) + 4*1*((B*R*T)/P))**(1./2))/2*1;\n", + "\n", + "# Results\n", + "print \" The molar volume of water vapour is %f m**(3)/mol\"%V1\n", + "\n", + "\t\t\t#The roots are%V1 = 0.0003670 [m**(3)/mol] and V2 = 0.0302510 [m**(3)/mol].\n", + "\t\t\t#As 'V2' is near to ideal volume (0.030618 [m**(3)/mol])%it is taken as the molar volume\n", + "\t\t\t#The other root 'V1' hss no physical significance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of water vapour is 0.030251 m**(3)/mol\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.7 Page number - 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 50+273.15;\t\t\t#[K] - Temperature\n", + "P = 15*10**(5)\t\t\t#[N/m**(2)] - Pressure\n", + "Tc = 305.3;\t\t\t#[K] - Critical temperature\n", + "Pc = 48.72*10**(5)\t\t\t#[N/m**(2)] - Critical pressure\n", + "w = 0.100;\t\t\t# Acentric factor\n", + "B = -157.31;\t\t\t#[cm**(3)/mol] - second virial coefficient\n", + "B = B*10**(-6)\t\t\t#[m**(3)/mol]\n", + "C = 9650;\t\t\t#[cm**(6)/mol**(2)] - third virial coefficient\n", + "C = C*10**(-12)\t\t\t#[cm**(6)/mol**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (1)\n", + "V_1 = (R*T)/P;\t\t\t#[m**(3)/mol] - Molar volume\n", + "print \" (1).The molar volume for ideal equation of state is %e m**(3)/mol\"%V_1\n", + "\n", + "\t\t\t# (2)\n", + "Tr = T/Tc;\t\t\t# Reduced temperature\n", + "\t\t\t# At this temperature\n", + "B_0 = 0.083-(0.422/(Tr)**(1.6))\n", + "B_1 = 0.139-(0.172/(Tr)**(4.2))\n", + "\n", + "\t\t\t# We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_2 = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\t\t\t#second virial coefficient\n", + "print \" (2).The second virial coefficent using Pitzer correlation is \\\n", + "found to be %e m**(3)/mol which is same as given value\"%B_2\n", + "\n", + "\t\t\t# (3)\n", + "\t\t\t# Given (virial equation)%Z=1+(B/V)\n", + "V_3 = B + (R*T)/P;\t\t\t#[m**(3)/mol] - Molar volume\n", + "print \" (3).The molar volume using virial equation of state is %e m**(3)/mol\"%V_3\n", + "\n", + "\t\t\t# (4)\n", + "\t\t\t# Given (virial equation)%Z = 1 + ((B*P)/(R*T)) + ((C - B**(2))/(R*T)**(2))*P**(2)\n", + "V_4 = B + (R*T)/P + ((C - B**(2))/(R*T))*P;\t\t\t# [m**(3)/mol]\n", + "print \" (4).The molar volume using given virial equation of state is %e m**(3)/mol\"%V_4\n", + "\n", + "\t\t\t# (5)\n", + "\t\t\t# Given%Z = 1 + (B/V)\n", + "\t\t\t# Also%Z = (P*V)/(R*T). Substituting the value of Z%we get\n", + "\t\t\t# V**(2)-((R*T)/P)*V-((B*R*T)/P)=0.Solving the quadratic equation\n", + "from scipy.optimize import fsolve\n", + "def f(V):\n", + " global R,T,P,B\n", + " return V**(2)-((R*T)/P)*V-((B*R*T)/P)\n", + "V_5_1 = fsolve(f,0)\n", + "V_5_2 = fsolve(f,1)\n", + "\n", + "print \" (5).The molar volume using given virial equation of state is %e m**(3)/mol\"%V_5_2\n", + "\n", + "\t\t\t# The roots are%V_5_1=0.0001743 [m**(3)/mol] and V_5_2=0.0016168 [m**(3)/mol].\n", + "\t\t\t# As 'V_2' is near to ideal volume (0.0017911 [m**(3)/mol])%it is taken as the molar volume\n", + "\n", + "\t\t\t# (6)\n", + "\t\t\t# Given%Z = 1 + (B/V) + (C/V**(2))\n", + "\t\t\t# Also%Z = (P*V)/(R*T). Substituting the value of Z%we get\n", + "\t\t\t# V**(3)-((R*T)/P)*V**(2)-((B*R*T)/P)*V-((C*R*T)/P)=0. Solving the cubic equation\n", + "def f1(V):\n", + " global P,R,T,B,C\n", + " return V**(3)-((R*T)/P)*V**(2)-((B*R*T)/P)*V-((C*R*T)/P)\n", + " \n", + "V_6_3=fsolve(f1,-1)\n", + "V_6_4=fsolve(f1,0)\n", + "V_6_5=fsolve(f1,1)\n", + "\t\t\t#The above equation has 1 real and 2 imaginary roots. We consider only real root.\n", + "print \" (6).The molar volume using given virial equation of state is %e m**(3)/mol\"%V_6_5\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (1).The molar volume for ideal equation of state is 1.791113e-03 m**(3)/mol\n", + " (2).The second virial coefficent using Pitzer correlation is found to be -1.573258e-04 m**(3)/mol which is same as given value\n", + " (3).The molar volume using virial equation of state is 1.633803e-03 m**(3)/mol\n", + " (4).The molar volume using given virial equation of state is 1.625374e-03 m**(3)/mol\n", + " (5).The molar volume using given virial equation of state is 1.616848e-03 m**(3)/mol" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " (6).The molar volume using given virial equation of state is 1.624187e-03 m**(3)/mol\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/home/jovina/virtualenvs/scipy/local/lib/python2.7/site-packages/scipy/optimize/minpack.py:236: RuntimeWarning: The iteration is not making good progress, as measured by the \n", + " improvement from the last ten iterations.\n", + " warnings.warn(msg, RuntimeWarning)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.8 Page number - 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 0 + 273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "from numpy import linalg,array\n", + "from scipy.stats import linregress\n", + "\t\t\t#Virial equation of state% Z=1+(B/V)+(C/V**(2))\n", + "\t\t\t#From above equation we get (Z-1)*V=B+(C/V)\n", + "\n", + "P=[50,100,200,400,600,1000];\n", + "Z=[0.9846,1.0000,1.0365,1.2557,1.7559,2.0645];\n", + "V=[0,0,0,0,0,0]\n", + "k= []\n", + "t=array([0,0,0,0,0,0])\n", + "\n", + "# Calculations\n", + "for i in range(6):\n", + " V[i]=(Z[i]*R*T)/(P[i]*101325.)\t\t\t#[m**(3)/mol]\n", + " k.append((Z[i]-1.)*V[i])\n", + " t[i]=1./V[i]\n", + " \n", + "k = array(k)\n", + "\n", + "\t\t\t#w = linalg.lstsq(t.T,k.T)\n", + "\t\t\t#[C,B,sig]=reglin(t',k')\n", + "C,B,c,d,e = linregress(t.T,k.T)\n", + "\n", + "# Results\n", + "#From the regression% we get intercept=B and slope=C%and thus%\n", + "print \" The value of second virial coefficient (B) is %e m**(3)/mol\"%B\n", + "print \" The value of third virial coefficient (C) is %e m**(6)/mol**(2)\"%C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of second virial coefficient (B) is -1.563305e-05 m**(3)/mol\n", + " The value of third virial coefficient (C) is 3.133359e-09 m**(6)/mol**(2)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.9 Page number - 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 444.3;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "B_11 = -8.1;\t\t\t#[cm**(3)/mol]\n", + "B_11 = -8.1*10**(-6)\t\t\t#[m**(3)/mol]\n", + "B_22 = -293.4*10**(-6)\t\t\t#[m**(3)/mol]\n", + "y1 = 0.5;\t\t\t# mole fraction \t\t\t# equimolar mixture\n", + "y2 = 0.5;\n", + "\n", + "# For component 1 (methane)\n", + "Tc_1 = 190.6;\t\t\t#[K] - cricitical temperature\n", + "Vc_1 = 99.2;\t\t\t#[cm**(3)/mol] - cricitical molar volume\n", + "Zc_1 = 0.288;\t\t\t# critical compressibility factor\n", + "w_1 = 0.012;\t\t\t# acentric factor\n", + "\n", + "# For component 2 (n-butane)\n", + "Tc_2 = 425.2;\t\t\t#[K]\n", + "Vc_2 = 255.0;\t\t\t#[cm**(3)/mol]\n", + "Zc_2 = 0.274;\n", + "w_2 = 0.199;\n", + "\n", + "# Calculations\n", + "#Using virial mixing rule%we get\n", + "Tc_12 = (Tc_1*Tc_2)**(1./2)\t\t\t#[K]\n", + "w_12 = (w_1 + w_2)/2.;\n", + "Zc_12 = (Zc_1+Zc_2)/2.;\n", + "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2.)**(3)\t\t\t#[cm**(3)/mol]\n", + "Vc_12 = Vc_12*10**(-6)\t\t\t#[cm**(3)/mol]\n", + "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "Tr_12 = T/Tc_12;\t\t\t#Reduced temperature\n", + "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n", + "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n", + "\n", + "\t\t\t#We know%(B_12*Pc_12)/(R*Tc_12) = B_0 + (w_12*B_1)\n", + "B_12 = ((B_0+(w_12*B_1))*(R*Tc_12))/Pc_12;\t\t\t#[m**(3)/mol] - Cross coefficient\n", + "B = y1**(2)*B_11+2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol] - Second virial coefficient for mixture\n", + "B = B*10**(6)\t\t\t#[cm**(3)/mol]\n", + "\n", + "# Results\n", + "print \" The second virial coefficient,(B) for the mixture of gas is %f cm**(3)/mol\"%B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The second virial coefficient,(B) for the mixture of gas is -108.309380 cm**(3)/mol\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 2.10 Page number - 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 71+273.15;\t\t\t#[K] - Temperature\n", + "P = 69*10**(5)\t\t\t#[N/m**(2)] - Pressure\n", + "y1 = 0.5;\t\t\t#[mol] - mole fraction of equimolar mixture\n", + "y2 = 0.5;\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t#For component 1 (methane)\n", + "Tc_1 =190.6;\t\t\t#[K] - Critical temperature\n", + "Pc_1 = 45.99*10**(5)\t\t\t#[N/m**(2)] - Critical pressure\n", + "Vc_1 = 98.6;\t\t\t#[cm**(3)/mol] - Critical volume\n", + "Zc_1 = 0.286;\t\t\t# Critical compressibility factor\n", + "w_1 = 0.012;\t\t\t# acentric factor\n", + "\n", + "\t\t\t#For component 2 (hydrogen sulphide)\n", + "Tc_2 = 373.5;\t\t\t#[K]\n", + "Pc_2 = 89.63*10**(5)\t\t\t#[N/m**(2)]\n", + "Vc_2 = 98.5;\t\t\t#[cm**(3)/mol]\n", + "Zc_2 = 0.284;\n", + "w_2 = 0.094;\n", + "\n", + "# Calculations\n", + "\t\t\t#For component 1\n", + "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n", + "\t\t\t#At reduced temperature\n", + "B1_0 = 0.083-(0.422/(Tr_1)**(1.6))\n", + "B1_1 = 0.139-(0.172/(Tr_1)**(4.2))\n", + "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#Similarly for component 2\n", + "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n", + "\t\t\t#At reduced temperature Tr_2%\n", + "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6))\n", + "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2))\n", + "B_22 = ((B2_0+(w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For cross coeffcient\n", + "Tc_12 = (Tc_1*Tc_2)**(1./2)\t\t\t#[K]\n", + "w_12 = (w_1 + w_2)/2;\n", + "Zc_12 = (Zc_1 + Zc_2)/2;\n", + "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2)**(3)\t\t\t#[cm**(3)/mol]\n", + "Vc_12 = Vc_12*10**(-6)\t\t\t#[m**(3)/mol]\n", + "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "\n", + "\t\t\t#Now we have%(B_12*Pc_12)/(R*Tc_12) = B_0+(w_12*B_1)\n", + "\t\t\t#where B_0 and B_1 are to be evaluated at Tr_12\n", + "Tr_12 = T/Tc_12;\n", + "\t\t\t#At reduced temperature Tr_12\n", + "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n", + "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n", + "B_12=((B_0 + (w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For the mixture\n", + "B = y1**(2)*B_11+2*y1*y2*B_12 + y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#Now given virial equation is% Z=1+(B*P)/(R*T)\n", + "Z = 1 + (B*P)/(R*T)\n", + "\n", + "\t\t\t#Also Z = (P*V)/(R*T).Therefore%\n", + "V = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n", + "\n", + "# Results\n", + "print \" The molar volume of the mixture is %e m**(3)/mol\"%V\n", + "\t\t\t#The value obtained is near the math.experimental value of V_math.exp = 3.38*10**(-4) m**(3)/mol\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of the mixture is 3.390411e-04 m**(3)/mol\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.11 Page number - 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P = 6.*10**(6)\t\t\t# [Pa] - Pressure\n", + "P_max = 12.*10**(6)\t\t\t# [Pa] - Max pressure to which cylinder may be math.exposed\n", + "T = 280.;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1).Assuming ideal gas behaviour%\n", + "V_ideal = (R*T)/P;\t\t\t#[m**(3)/mol]\n", + "\t\t\t#Now when temperature and pressure are increased%the molar volume remains same%as total volume and number of moles are same.\n", + "\t\t\t#For max pressure of 12 MPa%temperature is\n", + "T_max_ideal = (P_max*V_ideal)/R;\n", + "print \" (1).The maximum temperature assuming ideal behaviour is %f K\"%T_max_ideal\n", + "\n", + "\t\t\t# (2).Assuming virial equation of state\n", + "\t\t\t# For component 1 (methane)%at 280 K\n", + "Tc_1 = 190.6;\t\t\t#[K]\n", + "Pc_1 = 45.99*10**(5)\t\t\t#[N/m**(2)]\n", + "Vc_1 = 98.6;\t\t\t#[cm**(3)/mol]\n", + "Zc_1 = 0.286;\n", + "w_1 = 0.012;\n", + "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n", + "B1_0 = 0.083 - (0.422/(Tr_1)**(1.6))\n", + "B1_1 = 0.139 - (0.172/(Tr_1)**(4.2))\n", + "\n", + "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_11 = ((B1_0 + (w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For component 2 (Propane)\n", + "Tc_2 = 369.8;\t\t\t#[K]\n", + "Pc_2 = 42.48*10**(5)\t\t\t#[N/m**(2)]\n", + "Vc_2 = 200;\t\t\t#[cm**(3)/mol]\n", + "Zc_2 = 0.276;\n", + "w_2 = 0.152;\n", + "Tr_2 = T/Tc_2;\t\t\t# Reduced temperature\n", + "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6))\n", + "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2))\n", + "B_22 = ((B2_0 + (w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For cross coeffcient\n", + "y1 = 0.8;\t\t\t#mole fraction of component 1\n", + "y2 = 0.2;\t\t\t#mole fraction of component 2\n", + "Tc_12 = (Tc_1*Tc_2)**(1/2.)\t\t\t#[K]\n", + "w_12 = (w_1 + w_2)/2;\n", + "Zc_12 = (Zc_1 + Zc_2)/2;\n", + "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2)**(3)\t\t\t#[cm**(3)/mol]\n", + "Vc_12 = Vc_12*10**(-6)\t\t\t#[m**(3)/mol]\n", + "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "Tr_12 = T/Tc_12;\n", + "\n", + "\t\t\t#At reduced temperature%Tr_12%\n", + "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n", + "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n", + "B_12 = ((B_0 + (w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For the mixture\n", + "B = y1**(2)*B_11+2*y1*y2*B_12 + y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#Now given virial equation is% Z=1+(B*P)/(R*T)\n", + "Z = 1 + (B*P)/(R*T)\n", + "\t\t\t#Also Z = (P*V)/(R*T).Therefore%\n", + "V_real = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t\n", + "\n", + "T_prime = 560.;\t\t\t#[K]\n", + "fault = 10.;\n", + "\n", + "while(fault > 1):\n", + " T_prime_r1 = T_prime/Tc_1;\n", + " B_prime1_0 = 7.7674*10**(-3)\n", + " B_prime1_1 = 0.13714;\n", + " B_prime_11 = ((B_prime1_0 + (w_1*B_prime1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\n", + " \t\t\t#Similarly for component 2%\n", + " T_prime_r2 = T_prime/Tc_2;\n", + " B_prime2_0 = -0.1343;\n", + " B_prime2_1 = 0.10887;\n", + " B_prime_22 = ((B_prime2_0 + (w_2*B_prime2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\n", + " \t\t\t#For cross coefficient (assuming k12=0)\n", + " \t\t\t#Tc_12 % w_12 % Zc_12 % Vc_12 and Pc_12 have already been calculated above%now\n", + " T_prime_r12 = T_prime/Tc_12;\t\t\t#\n", + " \t\t\t#At reduced temperature%T_prime_r12%\n", + " B_prime_0 = 0.083 - (0.422/(T_prime_r12)**(1.6))\n", + " B_prime_1 = 0.139 - (0.172/(T_prime_r12)**(4.2))\n", + " B_prime_12 = ((B_prime_0+(w_12*B_prime_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "\n", + " \t\t\t#For the mixture\n", + " B_prime = y1**(2)*B_prime_11 + 2*y1*y2*B_prime_12 + y2**(2)*B_prime_22;\t\t\t#[m**(3)/mol]\n", + " Z_prime = 1 + (B_prime*P_max)/(R*T_prime)\n", + " T_new = (P_max*V_real)/(Z_prime*R)\n", + " fault = abs(T_prime - T_new)\n", + " T_prime = T_new;\n", + "\n", + "print \" (2).The maximum temperature assuming the gas to follow virial equation of state is %f K\"%T_new\n", + "\n", + "# Note : Answers varies because of rounding error. Please check it manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (1).The maximum temperature assuming ideal behaviour is 560.000000 K\n", + " (2).The maximum temperature assuming the gas to follow virial equation of state is 440.112497 K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.12 Page number - 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "V_vessel = 0.1;\t\t\t#[m**(3)]\t\t\t# Volume of vessel\n", + "T = 25 + 273.15;\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "m = 25*1000;\t\t\t#[g]\t\t\t# Mass of ethylene\n", + "Tc = 282.3;\t\t\t#[K] - Critical temperature\n", + "Pc = 50.40;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5)\t\t\t#[N/m**(2)]\n", + "Zc = 0.281;\t\t\t# Critical compressibility factor\n", + "Vc = 131;\t\t\t#[cm**(3)/mol] - Critical volume\n", + "Vc = Vc*10**(-6)\t\t\t#[m**(3)/mol]\n", + "w = 0.087;\t\t\t# Acentric factor\n", + "M = 28.054;\t\t\t# Molecular weight of ethylene\n", + "\n", + "# Calculations\n", + "n = m/M;\t\t\t#[mole] - No. of moles of ethylene\n", + "V = V_vessel/n;\t\t#[m**(3)/mol] - Molar volume\n", + "\n", + "\t\t\t#Under Redlich Kwong equation of state% we have\n", + "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "P = ((R*T)/(V-b))-(a/(T**(1./2)*V*(V+b)))\t\t\t#[N/m**(2)]\n", + "\n", + "# Results\n", + "print \" The required pressure using Redlich Kwong equation of state is %e N/m**(2)\"%P\n", + "\n", + "\t\t\t#For ideal gas equation of state%\n", + "P_ideal = (R*T)/V;\t\t\t#[N/m**(2)]\n", + "print \" For ideal gas equation of state,the required pressure is %e N/m**(2)\"%P_ideal\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The required pressure using Redlich Kwong equation of state is 7.934745e+06 N/m**(2)\n", + " For ideal gas equation of state,the required pressure is 2.208971e+07 N/m**(2)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.13 Page number - 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "V_vessel = 360*10**(-3)\t\t\t#[m**(3)] - volume of vessel\n", + "T = 62+273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "m = 70.*1000;\t\t\t#[g]/ - Mass of carbon dioxide\n", + "\n", + "\t\t\t#For carbon dioxide\n", + "Tc = 304.2;\t\t\t#[K] - Cricitical temperature\n", + "Pc = 73.83;\t\t\t#[bar] - Cricitical pressure\n", + "Pc = Pc*10**(5)\t\t\t# [N/m**(2)]\n", + "Zc = 0.274;\t\t\t# Critical compressibility factor\n", + "Vc = 94.0;\t\t\t#[cm**(3)/mol]\n", + "Vc = Vc*10**(-6)\t\t\t#[m**(3)/mol]\n", + "w = 0.224;\t\t\t# Acentric factor\n", + "M = 44.01;\t\t\t# Molecular weight of carbon dioxide\n", + "\n", + "# Calculations and Results\n", + "n = m/M;\t\t\t#[mol] - No. of moles\n", + "V = V_vessel/n;\t\t\t#[m**(3)/mol]\t\t\t#molar volume\n", + "\n", + "\t\t\t# (1)\n", + "\t\t\t# Ideal gas behaviour\n", + "P_1 = (R*T)/V;\t\t\t#[N/m**(2)]\n", + "print \" (1).The required pressure using ideal equation of state is %e N/m**(2)\"%P_1\n", + "\n", + "\t\t\t# (2)\n", + "\t\t\t# Virial equation of state% Z = 1 + (B*P)/(R*T)\n", + "\t\t\t# (P*V)/(R*T) = 1 + (B*P)/(R*T)% and thus P = (R*T)/(V - B). Now\n", + "Tr = T/Tc;\t\t\t#Reduced temperature\n", + "\t\t\t# At reduced temperature Tr%\n", + "B_0 = 0.083 - (0.422/(Tr)**(1.6))\n", + "B_1 = 0.139 - (0.172/(Tr)**(4.2))\n", + "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "P_2 = (R*T)/(V - B)\t\t\t#[N/m**(2)]\n", + "print \" (2).The required pressure using given virial equation of state is %e N/m**(2)\"%P_2\n", + "\n", + "\t\t\t# (3)\n", + "\t\t\t# Virial equation of state% Z = 1 + (B/V)\n", + "\t\t\t# (P*V)/(R*T) = 1 + (B/V)\n", + "P_3 = ((R*T)/V) + (B*R*T)/(V**(2))\t\t\t#[N/m**(2)]\n", + "print \" (3).The required pressure using given virial equation of state is %e N/m**(2)\"%P_3\n", + "\n", + "\t\t\t# (4)\n", + "\t\t\t# Van der Walls equation of state%P = ((R*T)/(V-b)) - a/(V**(2))\n", + "a = (27*(R**(2))*(Tc**(2)))/(64*Pc)\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc)\t\t\t#[m**(3)/mol]\n", + "P_4 = ((R*T)/(V-b)) - a/(V**(2))\t\t\t#[N/m**(2)]\n", + "print \" (4).The required pressure using van der Walls equation of state is %e N/m**(2)\"%P_4\n", + "\n", + "\t\t\t#(5)\n", + "\t\t\t# Redlich Kwong equation of state%\n", + "a_1 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b_1 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "P_5 = ((R*T)/(V - b_1)) - (a_1/(T**(1./2)*V*(V + b_1)))\t\t\t#[N/m**(2)]\n", + "print \" (5).The required pressure using Redlich Kwong equation of state is %e N/m**(2)\"%P_5\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (1).The required pressure using ideal equation of state is 1.231100e+07 N/m**(2)\n", + " (2).The required pressure using given virial equation of state is 8.712394e+06 N/m**(2)\n", + " (3).The required pressure using given virial equation of state is 7.226009e+06 N/m**(2)\n", + " (4).The required pressure using van der Walls equation of state is 8.048790e+06 N/m**(2)\n", + " (5).The required pressure using Redlich Kwong equation of state is 8.079803e+06 N/m**(2)\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.14 Page number - 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 500+273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "P = 325*1000;\t\t\t#[Pa] - Pressure\n", + "Tc = 647.1;\t\t\t#[K] - Cricitical temperature\n", + "Pc = 220.55;\t\t\t#[bar] - Cricitical pressure\n", + "Pc = Pc*10**(5)\t\t\t#[N/m**(2)]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t# Van der Walls equation of state%\n", + "a = (27*(R**(2))*(Tc**(2)))/(64*Pc)\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc)\t\t\t#[m**(3)/mol]\n", + "\t\t\t# The cubic form of van der Walls equation of state is given by%\n", + "\t\t\t# V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P=0\n", + "\t\t\t# Solving the cubic equation\n", + "def f(V):\n", + " global b,R,T,P,a\n", + " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n", + "from scipy.optimize import fsolve\n", + "V_1 = fsolve(f,1)\n", + "V_2 = fsolve(f,10)\n", + "V_3 = fsolve(f,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root%\n", + "Z_1 = (P*V_1)/(R*T)\t\t\t#compressibility factor\n", + "print \" (1).The compressibility factor of steam using van der Walls equation of state is %f\"%Z_1\n", + "\n", + "\t\t\t#(2)\n", + "\n", + "\t\t\t#Redlich Kwong equation of state%\n", + "a_1 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b_1 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\t\t\t# The cubic form of Redlich Kwong equation of state is given by%\n", + "\t\t\t# V**(3)-((R*T)/P)*V**(2)-((b_1**(2))+((b_1*R*T)/P)-(a/(T**(1/2)*P))*V-(a*b)/(T**(1/2)*P)=0\n", + "\t\t\t#Solving the cubic equation\n", + "def f1(V):\n", + " return V**(3)-((R*T)/P)*V**(2)-((b_1**(2))+((b_1*R*T)/P)-(a_1/(T**(1./2)*P)))*V-(a_1*b_1)/(T**(1./2)*P)\n", + " \n", + "V_4=fsolve(f1,1)\n", + "V_5=fsolve(f1,10)\n", + "V_6=fsolve(f1,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root%\n", + "\t\t\t# Thus compressibility factor is\n", + "Z_2 = (P*V_4)/(R*T)\t\t\t#compressibility factor\n", + "print \" (2).The compressibility factor of steam using Redlich Kwong equation of state is %f\"%Z_2\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (1).The compressibility factor of steam using van der Walls equation of state is 0.997181\n", + " (2).The compressibility factor of steam using Redlich Kwong equation of state is 0.997028\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.15 Page number - 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve\n", + "\n", + "\n", + "# Variables\n", + "T = 250+273.15;\t\t\t#[K]\n", + "R = 8.314;\t\t\t#[J/mol*K]\n", + "P = 39.76;\t\t\t#[bar] Vapour pressure of water at T\n", + "P = P*10**(5)\t\t\t#[N/m**(2)]\n", + "Tc = 647.1;\t\t\t#[K] - Cricitical temperature\n", + "Pc = 220.55*10**(5)\t\t\t#[N/m**(2)] - Cricitical pressure\n", + "w = 0.345;\t\t\t#Acentric factor\n", + "M = 18.015;\t\t\t# Molecular weight of water\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Using peng-Robinson equation of stste \n", + "m = 0.37464 + 1.54226*w - 0.26992*w**(2)\n", + "Tr = T/Tc;\n", + "alpha = (1 + m*(1 - Tr**(1./2)))**(2)\n", + "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\t\t\t# Cubuc form of Peng-Robinson equation of stste is given by\n", + "\t\t\t# V**(3) + (b-(R*T)/P)*V**(2) - ((3*b**(2)) + ((2*R*T*b)/P) - (a/P))*V+b**(3) + ((R*T*(b**(2))/P) - ((a*b)/P) = 0;\n", + "\t\t\t# Solving the cubic equation\n", + "def f(V):\n", + " global b,R,T,P,a\n", + " return V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2)))/P)-((a*b)/P)\n", + "V_1 = fsolve(f,-1)\n", + "V_2 = fsolve(f,0)\n", + "V_3 = fsolve(f,1)\n", + "\t\t\t#The largest root is for vapour phase%\n", + "V_vap = V_3;\t\t\t#[m**(3)/mol] - Molar volume (saturated vapour)\n", + "V_vap = V_vap*10**(6)/M;\t\t\t#[cm**(3)/g]\n", + "\n", + "print \" The moar volume of saturated water in the vapour phase (V_vap) is %f cm**(3)/g\"%V_vap\n", + "\n", + "\t\t\t#The smallest root is for liquid phase%\n", + "V_liq = V_1;\t\t\t#[m**(3)/mol] - molar volume (saturated liquid)\n", + "V_liq = V_liq*10**(6)/M;\t\t\t#[cm**(3)/g]\n", + "print \" The moar volume of saturated water in the liquid phase (V_liq) is %f cm**(3)/g\"%V_liq\n", + "\n", + "\t\t\t#From steam table at 250 C% V_vap = 50.13 [cm**(3)/g] and V_liq = 1.251 [cm**(3)/g].\n", + "print \" From steam table at 250 C, V_vap = 50.13 [cm**(3)/g] and V_liq = 1.251 [cm**(3)/g]\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The moar volume of saturated water in the vapour phase (V_vap) is 51.757097 cm**(3)/g\n", + " The moar volume of saturated water in the liquid phase (V_liq) is 1.554560 cm**(3)/g\n", + " From steam table at 250 C, V_vap = 50.13 [cm**(3)/g] and V_liq = 1.251 [cm**(3)/g]\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.16 Page number - 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 500+273.15;\t\t\t#[K] - Temperature\n", + "P = 15.;\t\t\t#[atm] - Pressure\n", + "P = P*101325;\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Tc = 190.6;\t\t\t#[K] - Cricitical temperature\n", + "Pc = 45.99*10**(5)\t\t\t#[N/m**(2)] - Cricitical pressure\n", + "Vc = 98.6;\t\t\t#[cm**(3)/mol] - Cricitical molar volume\n", + "Zc = 0.286;\t\t\t# Critical compressibility factor\n", + "w = 0.012;\t\t\t# Acentric factor\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t#Virial equation of state%Z = 1 + (B*P)/(R*T)\n", + "Tr_1 = T/Tc;\t\t\t#Reduced temperature\n", + "B_0 = 0.083-(0.422/(Tr_1)**(1.6))\n", + "B_1 = 0.139-(0.172/(Tr_1)**(4.2)) \t\t\t# We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\t\t\t#second virial coefficient\n", + "Z = 1 + (B*P)/(R*T)\t\t\t#compressibility factor\n", + "\t\t\t#(P*V)/(R*T)=1+(B*P)/(R*T)%and thus%\n", + "V_1 = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n", + "print \" (1).The molar volume of methane using given virial equation is %e m**(3)/mol\"%V_1\n", + "\n", + "\t\t\t#(2).\n", + "\t\t\t#Virial equation of state%Z = 1 + (B/V)\n", + "\t\t\t#Also%Z = (P*V)/(R*T). Substituting the value of Z%we get\n", + "\t\t\t# V**(2) - ((R*T)/P)*V - ((B*R*T)/P) = 0.Solving the quadratic equation\n", + "def f(V):\n", + " global R,T,P,B\n", + " return V**(2)-((R*T)/P)*V-((B*R*T)/P)\n", + "V2_1=fsolve(f,0)\n", + "V2_2=fsolve(f,1)\n", + "\t\t\t# Out of two roots%we will consider only positive root\n", + "print \" (2).The molar volume of methane using given virial equation is %e m**(3)/mol\"%V2_2\n", + "\n", + "\t\t\t# (3)\n", + "\t\t\t# Van der Walls equation of state%\n", + "\t\t\t# (P + (a/V**(2)))*(V - b) = R*T\n", + "a_3 = (27*(R**(2))*(Tc**(2)))/(64*Pc)\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b_3 = (R*Tc)/(8*Pc)\t\t\t#[m**(3)/mol]\n", + "\t\t\t# The cubic form of van der Walls equation of state is given by%\n", + "\t\t\t# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "\t\t\t# Solving the cubic equation\n", + "def f1(V):\n", + " global b,R,T,P,a_3\n", + " return V**(3)-(b_3+(R*T)/P)*V**(2)+(a_3/P)*V-(a_3*b_3)/P\n", + "V3_1=fsolve(f1,1)\n", + "V3_2=fsolve(f1,10)\n", + "V3_3=fsolve(f1,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root.\n", + "print \" (3).The molar volume of methane using van der Walls equation of state is %e m**(3)/mol\"%V3_1\n", + "\n", + "\t\t\t# (4)\n", + "\t\t\t# Redlich Kwong equation of state\n", + "a_4 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b_4 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\t\t\t# The cubic form of Redlich Kwong equation of state is given by%\n", + "\t\t\t# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n", + "\t\t\t# Solving the cubic equation\n", + "def f2(V):\n", + " global R,T,P,b_4,a_4\n", + " return V**(3)-((R*T)/P)*V**(2)-((b_4**(2))+((b_4*R*T)/P)-(a_4/(T**(1./2)*P)))*V-(a_4*b_4)/(T**(1./2)*P)\n", + "V4_1=fsolve(f2,1)\n", + "V4_2=fsolve(f2,10)\n", + "V4_3=fsolve(f2,100)\n", + "\t\t\t#The above equation has 1 real and 2 imaginary roots. We consider only real root.\n", + "print \" (4).The molar volume of methane using Redlich Kwong equation of state is %e m**(3)/mol\"%V4_1\n", + "\n", + "\t\t\t# (5)\n", + "\t\t\t# Using Peng-Robinson equation of state \n", + "m = 0.37464 + 1.54226*w - 0.26992*w**(2)\n", + "Tr_5 = T/Tc;\n", + "alpha = (1 + m*(1 - Tr_5**(1./2)))**(2)\n", + "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\t\t\t# Cubic form of Peng-Robinson equation of stste is given by\n", + "\t\t\t# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n", + "\t\t\t# Solving the cubic equation\n", + "def f3(V):\n", + " global b,R,T,P,a\n", + " return V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2)))/P)-((a*b)/P)\n", + "V5_1=fsolve(f3,-1)\n", + "V5_2=fsolve(f3,0)\n", + "V5_3=fsolve(f3,1)\n", + "\t\t\t#The largest root is for vapour phase%\n", + "\t\t\t#The largest root is only considered as the systemis gas\n", + "print \" (5).The molar volume of methane using Peng-Robinson equation of state is %e m**(3)/mol\"%V5_3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (1).The molar volume of methane using given virial equation is 4.242974e-03 m**(3)/mol\n", + " (2).The molar volume of methane using given virial equation is 4.242930e-03 m**(3)/mol\n", + " (3).The molar volume of methane using van der Walls equation of state is 4.236938e-03 m**(3)/mol\n", + " (4).The molar volume of methane using Redlich Kwong equation of state is 4.241402e-03 m**(3)/mol\n", + " (5).The molar volume of methane using Peng-Robinson equation of state is 4.242341e-03 m**(3)/mol\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example - 2.17 Page number - 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 310.93;\t\t\t#[K] - Temperature\n", + "P = 2.76*10**(6)\t\t\t#[N/m**(2)] - Pressure\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "y1 = 0.8942;\t\t\t# Mole fraction of component 1 (methane)\n", + "y2 = 1-y1;\t\t\t# Mole fraction of component 2 (n-butane)\n", + "\n", + "#For component 1 (methane)\n", + "Tc_1 = 190.58;\t\t\t#[K] - Cricitical temperature\n", + "Pc_1 = 46.05;\t\t\t#[bar] - Cricitical pressure\n", + "Pc_1 = Pc_1*10**(5)\t\t\t#[N/m**(2)]\n", + "Zc_1 = 0.288;\t\t\t# Critical compressibility factor\n", + "Vc_1 = 99.1;\t\t\t#[cm**(3)/mol]\n", + "Vc_1 = Vc_1*10**(-6)\t\t\t#[m**(3)/mol]\n", + "w_1 = 0.011;\t\t\t# Acentric factor\n", + "\n", + "\t\t\t#For component 2 (n-butane)\n", + "Tc_2 = 425.18;\t\t\t#[K] - Cricitical temperature\n", + "Pc_2 = 37.97;\t\t\t#[bar] - Cricitical pressure\n", + "Pc_2 = Pc_2*10**(5)\t\t\t# [N/m**(2)]\n", + "Zc_2 = 0.274;\t\t\t# Critical compressibility factor\n", + "Vc_2 = 255.1;\t\t\t# [cm**(3)/mol]\n", + "Vc_2 = Vc_2*10**(-6)\t\t\t# [m**(3)/mol]\n", + "w_2 = 0.193;\t\t\t# Acentric factor\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (1)\n", + "\t\t\t# Virial equation of state% Z = 1 + (B*P)/(R*T)\n", + "\t\t\t# For component 1 (methane)\n", + "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n", + "\t\t\t# At reduced temperature\n", + "B1_0 = 0.083 - (0.422/(Tr_1)**(1.6))\n", + "B1_1 = 0.139 - (0.172/(Tr_1)**(4.2))\n", + "\t\t\t# We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#Similarly for component 2\n", + "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n", + "\t\t\t#At reduced temperature Tr_2%\n", + "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6))\n", + "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2))\n", + "B_22 = ((B2_0 + (w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For cross coeffcient\n", + "Tc_12 = (Tc_1*Tc_2)**(1./2)\t\t\t#[K]\n", + "w_12 = (w_1 + w_2)/2;\n", + "Zc_12 = (Zc_1 + Zc_2)/2;\n", + "Vc_12 = (((Vc_1)**(1./3)+(Vc_2)**(1./3))/2)**(3)\t\t\t#[m**(3)/mol]\n", + "Pc_12 =(Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "\n", + "\t\t\t#Now we have%(B_12*Pc_12)/(R*Tc_12) = B_0+(w_12*B_1)\n", + "\t\t\t#where B_0 and B_1 are to be evaluated at Tr_12\n", + "Tr_12 = T/Tc_12;\n", + "\t\t\t#At reduced temperature Tr_12\n", + "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n", + "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n", + "B_12 = ((B_0+(w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For the mixture\n", + "B = y1**(2)*B_11+2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n", + "Z_1 = 1+(B*P)/(R*T)\t\t\t#compressibility factor\n", + "print \" (1).The compressibility factor of mixture using Virial equation of state is %f\"%Z_1\n", + "\n", + "\t\t\t# (2)\n", + "\t\t\t# Pseudo reduced method.\n", + "T_pc = (y1*Tc_1)+(y2*Tc_2)\t\t\t#[K] - Cricitical temperature\n", + "P_pc = (y1*Pc_1)+(y2*Pc_2)\t\t\t#[N/m**(2)] - Cricitical pressure\n", + "w = (y1*w_1)+(y2*w_2)\t\t\t# Acentric factor\n", + "T_pr = T/T_pc;\t\t\t# Reduced temperature\n", + "P_pr = P/P_pc;\t\t\t# Reduced pressure\n", + "\t\t\t#At this value of Tpr%\n", + "B0 = 0.083 - (0.422/(T_pr)**(1.6))\n", + "B1 = 0.139 - (0.172/(T_pr)**(4.2))\n", + "Z0 = 1 + B0*(P_pr/T_pr)\n", + "Z1 = B1*(P_pr/T_pr)\n", + "Z = Z0 + w*Z1;\n", + "print \" (2).The compressibility factor of mixture using pseudo reduced method is %f\"%Z\n", + "\n", + "\t\t\t# (3)\n", + "\t\t\t# Redlich Kwong equation of state is given by\n", + "\t\t\t# P = ((R*T)/(V-b)) - (a/(T**(1/2)*V*(V+b)))\n", + "\t\t\t# For methane%component 1\n", + "a_1 = (0.42748*(R**(2))*(Tc_1**(2.5)))/Pc_1;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b_1 = (0.08664*R*Tc_1)/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\t\t\t#For n-butane%component 2\n", + "a_2 = (0.42748*(R**(2))*(Tc_2**(2.5)))/Pc_2;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b_2 = (0.08664*R*Tc_2)/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\t\t\t#For the mixture\n", + "a_12 = (a_1*a_2)**(1./2)\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "a = y1**(2)*a_1 + 2*y1*y2*a_12 + y2**(2)*a_2;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b = (y1*b_1) + (y2*b_2)\t\t\t#[m**(3)/mol]\n", + "\t\t\t# The cubic form of Redlich Kwong equation of state is given by%\n", + "\t\t\t# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n", + "\t\t\t# Solving the cubic equation\n", + "def f(V):\n", + " global R,T,P,b,a\n", + " return V**(3)-((R*T)/P)*V**(2)-((b**(2))+((b*R*T)/P)-(a/(T**(1./2)*P)))*V-(a*b)/(T**(1./2)*P)\n", + "V_1=fsolve(f,1)\n", + "V_2=fsolve(f,10)\n", + "V_3=fsolve(f,100)\n", + "\t\t\t# Thus compressibility factor is\n", + "Z_3 = (P*V_1)/(R*T)\t\t\t#compressibility factor\n", + "print \" (3).The compressibility factor of mixture using Redlich Kwong equation of state is %f\"%Z_3\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (1).The compressibility factor of mixture using Virial equation of state is 0.926842\n", + " (2).The compressibility factor of mixture using pseudo reduced method is 0.937191\n", + " (3).The compressibility factor of mixture using Redlich Kwong equation of state is 0.927540\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb new file mode 100755 index 00000000..6e43a54d --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb @@ -0,0 +1,1524 @@ +{ + "metadata": { + "name": "ch3_2", + "signature": "sha256:8255c3a74c7b52da7fb922c8e6e009ed3e07e5e50a88f1302c38a2c832cbdc1f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : The First Law and Its Applications" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.1 Page number - 80 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "\n", + "# Variables\n", + "V_vessel = 4.*10**(-3);\t\t\t#[m**(-3)] - Volume of vessel\n", + "T = 200+273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal fas constant\n", + "P = 1.5*10**(6);\t\t\t#[Pa] - Pressure\n", + "Q = 40.*1000;\t\t\t#[J] - Heat input\n", + "\t\t\t# From steam table at 200 C,Psat=1.55549 MPa,therefore the steam is superheated.\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (1)\n", + "\t\t\t# Using steam table,at 1.5 MPa and 200 C,\n", + "V_1 = 0.1325;\t\t\t#[m**(3)/mol] - Specific volume\n", + "U_1 = 2598.1;\t\t\t#[kJ/kg] - Specific internal energy\n", + "\t\t\t# From first law under constant pressure,\n", + "\t\t\t# Q - m*P*(V2 - V1) = m*(U2 - U1)\n", + "m = V_vessel/V_1;\t\t\t#[kg] - Mass of system\n", + "\t\t\t# Putting the values,the above equation becomes\n", + "\t\t\t# 45283*(V2 - 0.1325) + 30.1887*(U2 - 2598.1) = 40000\n", + "\t\t\t# From steam table at 700 C LHS is 33917.0 and at 800 C,it is 40925.3.\n", + "\t\t\t# Therefore the final temperature lies between 700 and 800 C\n", + "print \" 1.From steam table the final temperature lies between 700 and 800 C\";\n", + "\n", + "\t\t\t# Alternate method\n", + "\t\t\t# Here we use first law at constant pressure,\n", + "\t\t\t# Q = m*(H_2 - H_1)\n", + "H_1 = 2796.8;\t\t\t#[kJ/kg]\n", + "\t\t\t# Substituting the values,\n", + "\t\t\t# 40 = 0.0301887*(H_2 - 2796.8)\n", + "H_2 = (40/0.0301887) + 2796.9;\t\t\t#[kJ/kg]\n", + "\t\t\t# Threfore,final enthalpy is (H2) 4121.8 [kJ/kg] and pressure is 1.5 [MPa].\n", + "\t\t\t# From steam table at 1.5 [MPa]and 700 C,enthalpy is 3920.3 [kj/kg] and at 1.5 [MPa]and 800 C,enthalpy is 4152.6 [kj/kg]\n", + "print \"\\tAlternate method\";\n", + "print \"\\tBy linear interpolation we get the temperature at which enthlpy is 4121.8 kJ/kg to be 786.74 C\";\n", + "\n", + "\t\t\t# (2)\n", + "\t\t\t# Assuming ideal behaviour.\n", + "n = (P*V_vessel)/(R*T);\t\t\t#[mol] - No of moles\n", + "M = 18.015;\t\t\t# Molecular weight of water\n", + "m_2 = n*M;\t\t\t#[g] - mass of moles\n", + "Cp_1 = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant presure\n", + "R0 = 1.987;\t\t\t#[cal/mol*K] - universal gas constant\n", + "Cv_1 = Cp_1 - R0;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n", + "Cv_1 = Cv_1*4.184/M;\t\t\t#[J/g*K]\n", + "T1 = T;\n", + "\t\t\t# From 1st law energy balance for constant pressure, we have Q-W= m*(delta_U)\n", + "\t\t\t# Q = P*(V2 - V1)*m = m*Cv*(T2 - T1)\n", + "\t\t\t# Q = P*((T2/T1)-1)*V1*m = m*Cv*(T2-T1)\n", + "\t\t\t# But, (V1*Cv)=initial total volume of system = V_vessel\n", + "\t\t\t# Q-P((T2/T1)-1)*V_vessel = m_2*Cv_0*(T2-T1);\n", + "def f(T2): \n", + "\t return Q-P*((T2/T1)-1)*V_vessel-m_2*Cv_1*(T2-T1)\n", + "T2_1 = fsolve(f,1)\n", + "\t\t\t#The heat capacity should be evaluted at mean temperature\n", + "T_mean = (T1 + T2_1)/2;\n", + "Cp_2 = 7.7 + 0.04594*10**(-2)*T_mean+0.2521*10**(-5)*T_mean**(2) - 0.8587*10**(-9)*T_mean**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant presure\n", + "Cv_2 = Cp_2-R0;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n", + "Cv_2 = Cv_2*4.184/M;\t\t\t#[J/g*K]\n", + "\t\t\t#Now again solving the equation Q=P*((T2/T1)-1)*V1*m = m*Cv*(T2-T1),for Cv=Cv_2\n", + "def f1(T2): \n", + "\t return Q-P*((T2/T1)-1)*V_vessel-m_2*Cv_2*(T2-T1)\n", + "T2_2 = fsolve(f1,1)\n", + "print \" 2).The temperature assuming ideal behaviour is %f K\"%(T2_2);\n", + "\n", + "\t\t\t# Alternate method\n", + "\t\t\t# From 1st law at constant pressure, we have Q = m*Cp(T2-T1)\n", + "T2_3 = Q/(m_2*(Cp_1*4.184/M))+T1;\n", + "\t\t\t#We can calculate the mean temperature as done above\n", + "T_mean1 = (T1 + T2_3)/2;\t\t\t#[J/g*K]\n", + "\t\t\t#The heat capacity should be evaluted at mean temperature\n", + "Cp_3 = 7.7 + 0.04594*10**(-2)*T_mean1 + 0.2521*10**(-5)*T_mean1**(2)-0.8587*10**(-9)*T_mean1**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant presure\n", + "Cp_3 = Cp_3*4.184/M;\t\t\t#[J/g*K]\n", + "\t\t\t# Again solving the equation Q = m*Cp(T2-T1), for Cp=Cp_3\n", + "T2_4 = Q/(m_2*Cp_3) + T1;\n", + "print \"\\tAlternate method\";\n", + "print \"\\tThe temperature assuming ideal behaviour alternate method) is %f K\"%(T2_4);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1.From steam table the final temperature lies between 700 and 800 C\n", + "\tAlternate method\n", + "\tBy linear interpolation we get the temperature at which enthlpy is 4121.8 kJ/kg to be 786.74 C\n", + " 2).The temperature assuming ideal behaviour is 1141.732355 K\n", + "\tAlternate method\n", + "\tThe temperature assuming ideal behaviour alternate method) is 1141.738180 K\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n", + " improvement from the last ten iterations.\n", + " warnings.warn(msg, RuntimeWarning)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.2 Page number - 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "V_tank = 1;\t\t\t#[m**(3)] - Volume of the tank\n", + "V_liq = 0.05;\t\t\t#[m**(3)] - Volume of saturated water\n", + "V_vap = 0.95;\t\t\t#[m**(3)] - Volume of saturated vapour\n", + "P = 1;\t\t\t#[bar] - Pressure\n", + "V_liq_sat = 0.001043;\t\t\t#[m**(3)/kg] - Specific volume of saturated water\n", + "V_vap_sat = 1.6940;\t\t\t#[m**(3)/kg] - Specific volume of saturated vapour\n", + "U_liq_sat = 417.4;\t\t\t#[kJ/kg] - Saturated liquid internal energy\n", + "U_vap_sat = 2506.1;\t\t\t#[kJ/kg] - Saturated vapour internal energy\n", + "\n", + "# Calculations\n", + "m = (V_liq/V_liq_sat) + (V_vap/V_vap_sat);\t\t\t#[kg] - Total mass of water\n", + "U_1 = (V_liq/V_liq_sat)*U_liq_sat + (V_vap/V_vap_sat)*U_vap_sat;\t\t\t#[kJ] - Total internal energy\n", + "\n", + "\t\t\t# At final state,which is saturated vapour\n", + "V = V_tank/m;\t\t\t#[m**(3)/kg] - Molar volume\n", + "\t\t\t# From saturated steam table at 8 MPa,as reported in the book V_vap = 0.02352[m**(3)/kg] and U_vap = 2569.8[kJ/kg]\n", + "\t\t\t# At 9 MPa, Vv = 0.02048[m**(3)/kg] and Uv = 2557.8[kJ/kg]\n", + "\t\t\t# Therefore final state pressure of the system (from interpolation) is 8.954 [MPa] and internal energy of saturated vapour is 2558.35 [kJ/kg]\n", + "U_2 = m*2558.35;\t\t\t#[kJ] - Final total internal energy\n", + "del_Ut = U_2 - U_1;\t\t\t#[kJ] \n", + "\t\t\t#we have, del_U = Q - W\n", + "\t\t\t#Here work done is zero because volume is rigid.\n", + "Q = del_Ut;\t\t\t#[kJ]\n", + "Q = del_Ut*10**(-3);\t\t\t#[MJ]\n", + "\n", + "# Results\n", + "print \" The amount of heat to be added is %f MJ\"%( Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The amount of heat to be added is 102.663530 MJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.3 Page number - 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "M_vap_sat = 0.22;\t\t\t#[kg] - mass of saturated vapour\n", + "M_liq_sat = 1.78;\t\t\t#[kg] - mass of saturated liquid\n", + "P = 700;\t\t\t#[kPa] - Pressure\n", + "\n", + "#At P=700 kPa,the systen is saturated,from steam table as reported in the book\n", + "T_sat1 = 164.97;\t\t\t#[C]\n", + "V_liq_1 = 0.001108;\t\t\t#[m**(3)/kg] \n", + "V_vap_1 = 0.2729;\t\t\t#[m**(3)/kg]\n", + "\n", + "# Calculations and Results\n", + "Vt_1 = V_liq_1*M_liq_sat + V_vap_1*M_vap_sat;\t\t\t#[m**(3)] - total volume\n", + "\n", + "\t\t\t#At final state,P = 8 MPa\n", + "T_sat2 = 295.06;\t\t\t#[C]\n", + "V_liq_2 = 0.001384;\t\t\t#[m**(3)/kg] \n", + "V_vap_2=0.02352;\t\t\t#[m**(3)/kg]\n", + "Vt_2 = Vt_1;\t\t\t# Since the volume is rigid.\n", + "\t\t\t# Since the volume of 2 kg of vapour is 0.062 [m**(3)]\n", + "V = Vt_2/2;\t\t\t#[m**(3)/kg] - specific volume\n", + "\n", + "\t\t\t# (a)\n", + "\t\t\t# From steam table at 8 [MPa]and 350 [C],V=0.02995[m**(3)/kg]; \n", + "V_1 = 0.02995;\t\t\t#[m**(3)/kg]\n", + "\t\t\t# And at 8 [MPa]and 400 [C],\n", + "V_2 = 0.03432;\t\t\t#[m**(3)/kg]\n", + "\t\t\t# By interpolation,\n", + "T = ((V-V_1)/(V_2 - V_1))*(400-350)+350;\n", + "print \" a).The final temperature is %f c\"%(T);\n", + "\n", + "\t\t\t# (b)\n", + "\t\t\t# From steam table \n", + "U_1 = 2747.7;\t\t\t#[kJ/kg]\n", + "H_1 = 2987.3;\t\t\t#[kJ/kg]\n", + "\t\t\t# And at 8 [MPa]and 400 C,\n", + "U_2 = 2863.8;\t\t\t#[kJ/kg]\n", + "H_2 = 3138.3;\t\t\t#[kJ/kg]\n", + "\t\t\t# Therefore at T = 362.01 C\n", + "U = U_1+((U_2 - U_1)/(400 - 350))*(T - 350);\n", + "print \" b).The internal energy is %f kJ/kg\"%(U);\n", + "\n", + "\t\t\t#(c)\n", + "H = H_1+((H_2 - H_1)/(400 - 350))*(T - 350);\n", + "print \" b).The enthalpy is %f kJ/kg\"%(H);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The final temperature is 362.072311 c\n", + " b).The internal energy is 2775.731907 kJ/kg\n", + " b).The enthalpy is 3023.758380 kJ/kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.4 Page number - 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "T = 300;\t\t\t#[K] - Temperature\n", + "P1 = 1;\t\t\t#[bar] - Initial pressure\n", + "P1 = P1*10**(5);\t\t\t#[N/m**(2)]\n", + "P2 = 8;\t\t\t#[bar] - Final pressure\n", + "P2 = P2*10**(5);\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Tc = 126.2;\t\t\t#[K] - Critical temperature\n", + "Pc = 34;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[N/m**(2)]\n", + "w = 0.038;\t\t\t# Acentric factor\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# w = integral(Pdv)\n", + "\t\t\t# Z = 1 + (B/V)\n", + "\t\t\t# (P*V)/(R*T) = 1 + (B/V)\n", + "\t\t\t# P = (R*T)/V + (B*R*T)/V**(2)\n", + "\n", + "def f29(V): \n", + "\t return (R*T/V) + (B*R*T)/V**(2)\n", + "\n", + "\t\t\t# w = quad(f29,V1,V2)[0]\n", + "\n", + "\t\t\t# Under isothermal conditions,\n", + "\t\t\t# w = R*T*math.log(V2/V1) - B*R*T*((1/V2) - (1/V1));\n", + "\n", + "Tr = T/Tc;\n", + "B_0 = 0.083 - (0.422/(Tr)**(1.6));\n", + "B_1 = 0.139 - (0.172/(Tr)**(4.2));\n", + "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t# Now we have to calculate molar volume i.e V1 and V2 at given conditions\n", + "\t\t\t# At state 1,\n", + "def f(V): \n", + "\t return V**(2)-(R*T/P1)*V-(B*R*T)/P1\n", + "V_1 = fsolve(f,-1)\n", + "V_2 = fsolve(f,1)\n", + "\t\t\t# We will take root near to (R*T)/P, i.e V_2\n", + "V1 = V_2;\n", + "\n", + "\t\t\t# At state 2,\n", + "def f1(V): \n", + "\t return V**(2)-(R*T/P2)*V-(B*R*T)/P2\n", + "V_3=fsolve(f1,-1)\n", + "V_4=fsolve(f1,1)\n", + "V2 = V_4;\n", + "\t\t\t# The work done is thus,\n", + "w = R*T*math.log(V2/V1) - B*R*T*((1/V2) - (1/V1));\t\t\t#[J]\n", + "w = w*10**(-3);\t\t\t#[kJ]\n", + "\n", + "print \" The work done is %f kJ/mol\"%(w);\n", + "print \" Negative sign indicates that work is done on the gas\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done is -5.186547 kJ/mol\n", + " Negative sign indicates that work is done on the gas\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.5 Page number - 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "\n", + "T = 300;\t\t\t#[K] - Temperature\n", + "P1 = 1;\t\t\t#[bar] - Initial pressure\n", + "P1 = P1*10**(5);\t\t\t#[N/m**(2)]\n", + "P2 = 8;\t\t\t#[bar] - Final pressure\n", + "P2 = P2*10**(5);\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "y1 = 0.21;\t\t\t# Mole fraction of component 1 (oxygen)\n", + "y2 = 0.79;\t\t\t# Mole fraction of component 1 (nitroen)\n", + "\n", + "# For component 1 (Oxygen)\n", + "Tc_1 = 154.6;\t\t\t#[K]\n", + "Pc_1 = 50.43*10**(5);\t\t\t#[N/m**(2)]\n", + "Vc_1 = 73.4;\t\t\t#[cm**(3)/mol]\n", + "Zc_1 = 0.288;\n", + "w_1 = 0.022;\n", + "\n", + "\t\t\t#For component 2 (Nitrogen)\n", + "Tc_2 = 126.2;\t\t\t#[K]\n", + "Pc_2 = 34*10**(5);\t\t\t#[N/m**(2)]\n", + "Vc_2 = 89.2;\t\t\t#[cm**(3)/mol]\n", + "Zc_2 = 0.289;\n", + "w_2 = 0.038;\n", + "\n", + "# Calculations\n", + "\t\t\t#For component 1\n", + "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n", + "\t\t\t#At reduced temperature\n", + "B1_0 = 0.083 - (0.422/(Tr_1)**(1.6));\n", + "B1_1 = 0.139 - (0.172/(Tr_1)**(4.2));\n", + "\t\t\t# We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n", + "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t# Similarly for component 2\n", + "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n", + "\t\t\t# At reduced temperature Tr_2,\n", + "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6));\n", + "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2));\n", + "B_22 = ((B2_0 + (w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t#For cross coeffcient\n", + "Tc_12 = (Tc_1*Tc_2)**(1/2);\t\t\t#[K]\n", + "w_12 = (w_1 + w_2)/2;\n", + "Zc_12 = (Zc_1+Zc_2)/2;\n", + "Vc_12 = (((Vc_1)**(1/3)+(Vc_2)**(1/3))/2)**(3);\t\t\t#[cm**(3)/mol]\n", + "Vc_12 = Vc_12*10**(-6);\t\t\t#[m**(3)/mol]\n", + "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n", + "\n", + "\t\t\t# Now we have,(B_12*Pc_12)/(R*Tc_12) = B_0 + (w_12*B_1)\n", + "\t\t\t# where B_0 and B_1 are to be evaluated at Tr_12\n", + "Tr_12 = T/Tc_12;\n", + "\t\t\t# At reduced temperature Tr_12\n", + "B_0 = 0.083 - (0.422/(Tr_12)**(1.6));\n", + "B_1 = 0.139 - (0.172/(Tr_12)**(4.2));\n", + "B_12 = ((B_0+(w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t# For the mixture\n", + "B = y1**(2)*B_11 + 2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n", + "\t\t\t# Now we have to calculate molar volume i.eV1 and V2 at given conditions\n", + "\n", + "\t\t\t# At state 1,\n", + "def f(V): \n", + "\t return V**(2)-(R*T/P1)*V-(B*R*T)/P1\n", + "V_1=fsolve(f,-1)\n", + "V_2=fsolve(f,1)\n", + "\t\t\t# We will take root near to (R*T)/P, i.e V_2\n", + "V1 = V_2;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t# At state 2,\n", + "def f1(V): \n", + "\t return V**(2)-(R*T/P2)*V-(B*R*T)/P2\n", + "V_3=fsolve(f1,-1)\n", + "V_4=fsolve(f1,1)\n", + "V2 = V_4;\t\t\t#[m**(3)/mol]\n", + "\n", + "\t\t\t# Work done per mole of air is given by, w=integral(Pdv)\n", + "\t\t\t# Z = 1 + (B/V)\n", + "\t\t\t# (P*V)/(R*T) = 1 +( B/V)\n", + "\t\t\t# P = (R*T)/V+(B*R*T)/V**(2)\n", + "\n", + "def f43(V): \n", + "\t return (R*T/V)+(B*R*T)/V**(2)\n", + "\n", + "\t\t\t# w = quad(f43,V1,V2)[0]\n", + "\n", + "\t\t\t# Under isothermal conditions,\n", + "w = R*T*math.log(V2/V1)-B*R*T*((1/V2)-(1/V1));\n", + "w = w*10**(-3);\t\t\t#[kJ/mol]\n", + "\n", + "# Results\n", + "print \" The work done is %f kJ/mol\"%(w);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done is -5.186545 kJ/mol\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.6 Page number - 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 125+273.15;\t\t\t#[K] - Temperature\n", + "P1 = 1;\t\t\t#[bar] - Initial pressure\n", + "P1 = P1*10**(5);\t\t\t#[N/m**(2)]\n", + "P2 = 60;\t\t\t#[bar] - Final pressure\n", + "P2 = P2*10**(5);\t\t\t#[N/m**(2)]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "Tc = 416.3;\t\t\t#[K] - Critical temperature\n", + "Pc = 66.80*10**(5);\t\t\t#[N/m**(2)] - Critical pressure\n", + "\n", + "\t\t\t# (1)\n", + "\t\t\t# Virial equation of state, Z = 1 + (B/V)+(C/V**(2))\n", + "\t\t\t# (P*V)/(R*T) = 1 + (B/V)+(C/V**(2))\n", + "\t\t\t# P = (R*T)/V+(B*R*T)/V**(2)+(C*R*T)/V**(3)\n", + "\t\t\t# w = integral(PdV)=R*T*math.log(V2/V1)-(B*R*T)*(1/V2-1/V1)-(C*R*T/2)*(1/V2**(2)-1/V1**(2))\n", + "\n", + "B = -207.5;\t\t\t#[cm**(3)/mol] - Second virial coefficient\n", + "B = -207.5*10**(-6);\t\t\t#[m**(3)/mol]\n", + "C = 18200;\t\t\t#[cm**(6)/mol**(2)] - Third virial coefficient\n", + "C = 18200*10**(-12);\t\t\t#[m**(6)/mol**(2)]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# We need to calculate molar volume at state 1 and 2,\n", + "\t\t\t# At state 1,P = P1,\n", + "\t\t\t# V**(3)-(R*T/P)*V**(2)-(B*R*T/P)*V-(C*R*T/P)=0\n", + "\t\t\t# Solving the cubic equation\n", + "def f1(V): \n", + "\t return V**(3)-(R*T/P1)*V**(2)-(B*R*T/P1)*V-(C*R*T/P1)\n", + "V_1=fsolve(f1,-1)\n", + "V_2=fsolve(f1,0)\n", + "V_3=fsolve(f1,10)\n", + "\t\t\t# The cubic equation has only 1 real root,other two roots are imaginary.\n", + "V1 = V_3;\n", + "\n", + "\t\t\t# Similarly at state 2,P=P2\n", + "\t\t\t# V**(3) - (R*T/P)*V**(2) - (B*R*T/P)*V - (C*R*T/P) = 0\n", + "\t\t\t# Solving the cubic equation\n", + "def f2(V): \n", + "\t return V**(3)-(R*T/P2)*V**(2)-(B*R*T/P2)*V-(C*R*T/P2)\n", + "V_4=fsolve(f2,-1)\n", + "V_5=fsolve(f2,0)\n", + "V_6=fsolve(f2,1)\n", + "V2 = V_6;\n", + "\t\t\t# Finally work done is given by,\n", + "w1 = R*T*math.log(V2/V1)-(B*R*T)*(1/V2-1/V1)-(C*R*T/2)*(1/V2**(2)-1/V1**(2));\t\t\t#[J/mol]\n", + "w1 = w1*10**(-3);\t\t\t#[kJ/mol]\n", + "print \" 1).The work done using given virial equation of state is %f kJ/mol\"%(w1);\n", + "\n", + "\t\t\t# (2)\n", + "\t\t\t# Virial equation of state, Z = 1+(B*P)/(R*T)+((C-B**(2))/(R*T)**(2))*P**(2)\n", + "\t\t\t# (P*V)/(R*T)= 1+(B*P)/(R*T)+((C-B**(2))/(R*T)**(2))*P**(2)\n", + "\t\t\t# V = (R*T)/P+B+((C-B**(2))/(R*T))*P\n", + "\t\t\t# Differentiating both sides by P and integrating we get,\n", + "\t\t\t# w = integral(PdV)=-(R*T)*math.log(P2/P1)+((C-B**(2))/(2*R*T))*(P2**(2)-P1**(2))\n", + "w2 = -(R*T)*math.log(P2/P1) + ((C-B**(2))/(2*R*T))*(P2**(2)-P1**(2));\t\t\t#[J/mol]\n", + "w2 = w2*10**(-3);\t\t\t#[kJ/mol]\n", + "print \" 2).The work done using given virial equation of state is %f kJ/mol\"%(w2);\n", + "\n", + "\t\t\t# (3)\n", + "\t\t\t# Van der Walls equation of state is given by,\n", + "a = (27*(R**(2))*(Tc**(2)))/(64*Pc);\t\t\t#[Pa*m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\t\t\t# P = ((R*T)/(V-b))-a/(V**(2));\t\t\t#[N/m**(2)]\n", + "\t\t\t# w = integral(PdV)=R*T*math.log((V2-b)/(V1-a))+a*(1/V2-1/V1)\n", + "\t\t\t# The cubic form of van der Walls equation of state is given by,\n", + "\t\t\t# V**(3) - (b+(R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n", + "\t\t\t# Solving the cubic equation for P=P1\n", + "def f3(V): \n", + "\t return V**(3)-(b+(R*T)/P1)*V**(2)+(a/P1)*V-(a*b)/P1\n", + "V2_1=fsolve(f3,1)\n", + "V2_2=fsolve(f3,10)\n", + "V2_3=fsolve(f3,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V2_3).\n", + "\n", + "\t\t\t# Similarly at state 2,for P=P2,\n", + "def f4(V): \n", + "\t return V**(3)-(b+(R*T)/P2)*V**(2)+(a/P2)*V-(a*b)/P2\n", + "V2_4=fsolve(f4,1)\n", + "V2_5=fsolve(f4,10)\n", + "V2_6=fsolve(f4,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V2_6).\n", + "\t\t\t# Finally work done is given by\n", + "w3 = R*T*math.log((V2_6-b)/(V2_3-b))+a*(1/V2_6-1/V2_3);\t\t\t#[J/mol]\n", + "w3 = w3*10**(-3);\t\t\t#[kJ/mol]\n", + "print \" 3).The work done using van der Walls equation of state is %f kJ/mol\"%(w3);\n", + "\n", + "\t\t\t# (4)\n", + "\t\t\t# Redlich Kwong equation of state,\n", + "a_1 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n", + "b_1 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n", + "\t\t\t# P = ((R*T)/(V-b_1))-(a_1/(T**(1/2)*V*(V+b_1)));\t\t\t#[N/m**(2)]\n", + "\t\t\t# Work done is given by\n", + "\n", + "def f4(V): \n", + "\t return (V2-b)/(V1-b)-a/T**(1./2)*integrate(1/V*(V+b))\n", + "\n", + "\t\t\t# w = R*T*math.log((V2-b)/(V1-b))-a/T**(1/2)* quad(f4,V1,V2)[0]\n", + "\n", + "\t\t\t# Using the factorization 1/(V*(V+b))=(1/b)*((1/V)-(1/V+b)),we get\n", + "\t\t\t# w = R*T*math.log((V2-b)/(V1-b))-(a/(b*T**(1/2)))*(math.log(V2/V1)-math.log((V2+b)/(V1+b))\n", + "\t\t\t# Now we have calculate V1 and V2,\n", + "\t\t\t# The cubic form of Redlich Kwong equation of state is given by,\n", + "\t\t\t# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n", + "\t\t\t# Solving the cubic equation at state 1,\n", + "def f5(V): \n", + "\t return V**(3)-((R*T)/P1)*V**(2)-((b_1**(2))+((b_1*R*T)/P1)-(a_1/(T**(1./2)*P1)))*V-(a_1*b_1)/(T**(1./2)*P1)\n", + "V3_1=fsolve(f5,1)\n", + "V3_2=fsolve(f5,10)\n", + "V3_3=fsolve(f5,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V3_3).\n", + "\n", + "\t\t\t# Similarly at state 2,for P = P2,\n", + "def f6(V): \n", + "\t return V**(3)-((R*T)/P2)*V**(2)-((b_1**(2))+((b_1*R*T)/P2)-(a_1/(T**(1./2)*P2)))*V-(a_1*b_1)/(T**(1./2)*P2)\n", + "V3_4=fsolve(f6,1)\n", + "V3_5=fsolve(f6,10)\n", + "V3_6=fsolve(f6,100)\n", + "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V3_6).\n", + "\t\t\t# Finally work done is given by\n", + "w4 = R*T*math.log((V3_6-b_1)/(V3_3-b_1))-(a_1/(b_1*T**(1./2)))*(math.log(V3_6/V3_3)-math.log((V3_6+b_1)/(V3_3+b_1)));\t\t\t#[J/mol]\n", + "w4 = w4*10**(-3);\t\t\t#[kJ/mol]\n", + "print \" 3).The work done using Redlich Kwong equation of state is %f kJ/mol\"%(w4);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The work done using given virial equation of state is -13.848149 kJ/mol\n", + " 2).The work done using given virial equation of state is -13.688301 kJ/mol\n", + " 3).The work done using van der Walls equation of state is -14.802420 kJ/mol\n", + " 3).The work done using Redlich Kwong equation of state is -14.704965 kJ/mol\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n", + " improvement from the last five Jacobian evaluations.\n", + " warnings.warn(msg, RuntimeWarning)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.8 Page number - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 20 + 273.15;\t\t\t#[K] - Temperature\n", + "P_1 = 140.;\t\t\t#[kPa] - Initial pressure\n", + "P_1 = P_1*10.**(3);\t\t\t#[Pa]\n", + "P_2 = 560.;\t\t\t#[kPa] - Final pressure\n", + "P_2 = P_2*10.**(3);\t\t\t#[Pa]\n", + "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n", + "\n", + "# Calculations\n", + "\t\t\t# Cp_0 = 1.648+4.124*10**(-2)*T - 1.53*10**(-5)*T**(2) + 1.74*10**(-9)*T**(3)\n", + "\t\t\t# Using adiabatic compression, P*V**(Y)=constant. For ideal gases\n", + "\t\t\t# P*(R*T/P)**(Y) = constant\n", + "\t\t\t# P**(1-Y)*T**(Y) = constant or,P1**(1-Y)*T1**(Y)=P2**(1-Y)*T2**(Y)\n", + "\t\t\t# Now,at state 1, i.e at T=20[C]\n", + "Cp_1 = 1.648+4.124*10**(-2)*T-1.53*10**(-5)*T**(2)+1.74*10**(-9)*T**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant pressure\n", + "Cv_1 = Cp_1 - R;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n", + "Y1 = Cp_1/Cv_1;\t\t\t# Ratio of heat capacities\n", + "\n", + "\t\t\t# Now calculatung the temperature at state 2 (T2)\n", + "\t\t\t# (T2/T1)=(P1/P2)**((1-Y1)/Y1)\n", + "T_1 = T;\n", + "T_2 = ((P_1/P_2)**((1-Y1)/Y1))*T_1;\t\t\t#[K]\n", + "\n", + "\t\t\t# Now calculating the mean temperature\n", + "T_mean = (T_1 + T_2)/2;\t\t\t#[K]\n", + "\t\t\t# At mean temperature\n", + "Cp_2 = 1.648+4.124*10**(-2)*T_mean - 1.53*10**(-5)*T_mean**(2) + 1.74*10**(-9)*T_mean**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant pressure\n", + "Cv_2 = Cp_2 - R;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n", + "Y2 = Cp_2/Cv_2;\n", + "\n", + "\t\t\t# Calculating exit temperature\n", + "\t\t\t# Again using the realation,(T2/T1)=(P1/P2)**((1-Y1)/Y1)\n", + "T_exit = ((P_1/P_2)**((1-Y2)/Y2))*T_1;\t\t\t#[K]\n", + "\t\t\t# Since value of mean temperature has not changed much the molar heat capacity ratio can be assumed to be same.Therefore\n", + "\t\t\t# w = -delta(U)=Cv_0*(T2-T1)\n", + "w = Cv_2*(T_1 - T_exit);\t\t\t#[cal/mol]\n", + "w = w*4.184;\t\t\t#[J/mol]\n", + "\n", + "# Results\n", + "print \" The work done for adiabatic compression is %f J/mol\"%(w);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done for adiabatic compression is -3198.427072 J/mol\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.9 Page number - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "m_ice = 1000;\t\t\t#[g] - Mass of ice\n", + "m_water = 1000;\t\t\t#[g] - Mass of water\n", + "T_ice = 273.15;\t\t\t#[K] - Temperature of ice\n", + "T_water = 373.15;\t\t\t#[K] - Temperature of water\n", + "L = 79.71;\t\t\t#[cal/g] - Latent heat of melting of ice.\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "Cp_1 = 1;\t\t\t#[cal/g-K] - Heat capacity at constant pressure\n", + "\t\t\t# Let the final temperature be T\n", + "\t\t\t# We assume that all of the ice melts.Energy taken up by ice is\n", + "\t\t\t# E1 = L*m_ice + m_ice*Cp_1*(T - T_ice)\n", + "\t\t\t# Energy given by hot water is,\n", + "\t\t\t# E2 = m_water*Cp_1*(T_water - T)\n", + "\t\t\t# No heat exchange with surrounding.Solving for T\n", + "T_1 = (m_ice*Cp_1*T_ice + m_water*Cp_1*T_water - L*m_ice)/(m_ice*Cp_1 + m_water*Cp_1);\t\t\t#[K]\n", + "T_1 = T_1 - 273.15;\t\t\t#[C]\n", + "\n", + "print \" 1).The final temperature taking Cp_water = 1 cal/g-K) is %f C\"%(T_1);\n", + "\t\t\t#Since the final temperature is greater than 273.15 K,so our assumption that all of ice melts is correct\n", + "\n", + "\t\t\t# (2)\n", + "\t\t\t# Cp_2 = 1.00874-0.7067*10**(-3)*T+15.93*10**(-6)*T**(2)-83.8*10**(-9)*T**(3);\n", + "\n", + "def f15(T): \n", + "\t return Cp_2\n", + "\n", + "\t\t\t# From energy balance,we get L*m_ice + m_ice* quad(f15,0,T) + m_water*integrate(Cp_2)[0]\n", + "\n", + "\t\t\t# On putting the values and then simplifying we get\n", + "\t\t\t# 2.01748*T - 0.0007067*T**(2) + 1.062*10**(-5)*T**(3) - 4.19*10**(-8)*T**(4) - 20.8455 = 0\n", + "\t\t\t# Solving the above equation we get\n", + "def f1(T): \n", + "\t return 2.01748*T - 0.0007067*T**(2) + 1.062*10**(-5)*T**(3) - 4.19*10**(-8)*T**(4) - 20.8455\n", + "T_0 = fsolve(f1,1)\n", + "print \" 2).The final temperature using specific heat capacity equation is %f C\"%(T_0);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The final temperature taking Cp_water = 1 cal/g-K) is 10.145000 C\n", + " 2).The final temperature using specific heat capacity equation is 10.364452 C\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.11 Page number - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "n = 1.5;\t\t\t# - ratio of heat capacities\n", + "T_1 = 500.;\t\t\t#[K] - Initial temperature\n", + "T_2 = 1000.;\t\t\t#[K] - Final temperature\n", + "P_1 = 1.;\t\t\t#[bar] - Initial pressure\n", + "P_1 = P_1*10.**(5);\t\t\t#[Pa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The compression path is given by, P*V**(1.5) = constant\n", + "\t\t\t# P*(R*T/P)**(1.5) = constant\n", + "\t\t\t# P1**(-0.5)*T1**(1.5) = P2**(-0.5)*T2**(1.5)\n", + "P_2 = P_1*(T_1/T_2)**(-3);\t\t\t#[Pa]\n", + "P_2_final = P_2*10**(-5);\t\t\t#[bar] - Final pressure in bar\n", + "print \" The final pressure is %f bar\"%(P_2_final);\n", + "\n", + "\t\t\t# From first law q - w = delta(U). \n", + "\t\t\t# First w and delta(U) are calculated and thereafter heat exchange is determined.\n", + "V_1 = R*T_1/P_1;\t\t\t#[m**(3)/mol] - Initial volume\n", + "V_2 = R*T_2/P_2;\t\t\t#[m**(3)/mol] - Final volume\n", + "w = ((P_1*V_1)/(n - 1))*(1 - (P_2/P_1)**(1 - 1/n));\t\t\t#[J/mol] - work done\n", + "\n", + "\t\t\t# Mean temperature is given by,\n", + "T_mean = (T_1 + T_2)/2;\t\t\t#[K]\n", + "\n", + "\t\t\t#Now, heat capacity at T_mean is given by,\n", + "Cp_0 = R*(3.3 + 0.63*10**(-3)*T_mean);\t\t\t#[J/mol*K]\n", + "Cv_0 = Cp_0 - R;\t\t\t#[J/mol*K]\n", + "\t\t\t#Therefore delta(U) is given by\n", + "del_U = Cv_0*(T_2 - T_1);\t\t\t#[J/mol] - Change in internal energy\n", + "q = w + del_U;\t\t\t#[J/mol] - heat change\n", + "print \" The amount of heat supplied to the system is %f J/mol\"%(q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final pressure is 8.000000 bar\n", + " The amount of heat supplied to the system is 3211.282500 J/mol\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.12 Page number - 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 150*10**(3);\t\t\t#[Pa] - Initial pressure\n", + "V_1 = 0.001;\t\t\t#[m**(3)] - Initial volume\n", + "P_2 = 1000*10**(3);\t\t\t#[Pa] - Final pressure\n", + "V_2 = 0.003;\t\t\t#[m**(3)] - Final volume\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# At x = 0, Vt(total volume) = 0.001 m**(3), therefore x = (V_t - V_1)/A; where A is area of cross section and x is length\n", + "\t\t\t# Force exerted b sprig is given by, F = Ps*A = k*x = k*(V_t - V_1)/A\n", + "\t\t\t# Ps = (k/A**(2))*(V_t - V_1)\n", + "\t\t\t# Total pressure = Initial pressre + Pressre due to spring\n", + "\t\t\t# P = P_1 + (k/A**(2))*(V_t - V_1)\n", + "\t\t\t# Let (k/A**(2)) = t (say)\n", + "\t\t\t# At state 2, i.e at P2 and V_t = V_2.\n", + "def f(t): \n", + "\t return P_2-P_1 - t*(V_2-V_1)\n", + "t = fsolve(f,1000)\n", + "\t\t\t# Therefore,pressure is related to total volume as P = P_1-t*(V_t - V_1)\n", + "\n", + "\t\t\t# (a)\n", + "\t\t\t#slope = (k/A**(2))\n", + "print \" a).The slope of the line on P-Vt diagram is %e N/m**5)\"%(t);\n", + "\n", + "\t\t\t# (b)\n", + "\t\t\t# Work done by the gas is given by w=integral(PdVt)\n", + "\n", + "def f30(V_t): \n", + "\t return P_1+t*(V_t-V_1)\n", + "\n", + "w = quad(f30,V_1,V_2)[0]\n", + "\n", + "w = w*10**(-3);\t\t\t#[kJ]\n", + "print \" b).The work done by gas is %f kJ\"%(w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The slope of the line on P-Vt diagram is 4.250000e+08 N/m**5)\n", + " b).The work done by gas is 1.150000 kJ\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.13 Page number - 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "V = 36;\t\t\t#[L] - Vol of gas on each side\n", + "P_1 = 1;\t\t\t#[atm] - pressure on left side of the piston\n", + "P_1 = P_1*101325;\t\t\t#[Pa]\n", + "T = 273.15;\t\t\t#[K]\n", + "P_2 = 3.375;\t\t\t#[atm] - Pressure on right side of the piston\n", + "P_2 = P_2*101325;\t\t\t#[Pa]\n", + "Y = 1.44;\t\t\t# Ratio of heat capacities\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constnt\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (a)\n", + "\t\t\t# For total system, del(U_total) = Q. \n", + "\t\t\t\n", + "\t\t\t# T_2/T_1 = (P_2/P_1)**((Y - 1)/Y)\n", + "T_right = T*(P_2/P_1)**((Y - 1)/Y);\t\t\t#[K]\n", + "\n", + "Cv_0 = R/(Y-1);\t\t\t#[J/mol*K] - Heat capacity at constant volume.\n", + "\t\t\t# Now work done on the gas on right hand side is given by\n", + "\t\t\t# W = (P_1*V_1 - P_2*V_2)/(Y - 1) = R*(T_2 - T_1)/(Y - 1) = Cv_0*(T_1 - T_2)\n", + "W_left = Cv_0*(T - T_right);\t\t\t#[J/mol]\n", + "\t\t\t# Negative sign for the work done on LHS gas implies work is done on the gas\n", + "\n", + "\t\t\t# For right hand side of the gas\n", + "\t\t\t# P*Vt = n*R*T\n", + "n = P_1*(V*10**(-3))/(R*T);\t\t\t# number of moles\n", + "W_right = (-W_left)*n;\t\t\t#[J] - We used negative sign for 'W_left' because it is negative in magnitude.\n", + "W_right = W_right/1000;\t\t\t#[kJ]\n", + "print \" a).Total work done on gas on the right hand side is %f kJ\"%(W_right);\n", + "\n", + "\t\t\t#(b)\n", + "print \" b).The final temperature of the gas on right side is %f K\"%(T_right);\n", + "\n", + "\t\t\t# (c)\n", + " # We have (P_left*V_left)/T_left = (P_right*V_right)/T_right.\n", + "\t\t\t# Since P_left = P_right, (V_left/T_left) = (V_right/T-right) and also P*V**(Y) = constant.\n", + "V_right = V*(P_1/P_2)**(1/Y);\t\t\t#[L] - The total volume on right side \n", + "\n", + "\t\t\t# The total volume on right side can also be calculated using P2*V2 = n*R*T2.\n", + "\t\t\t# Since total volume = 72 [L], therefore volume of left side is\n", + "V_left = 2*V - V_right;\t\t\t#[L]\n", + "T_left = T_right*(V_left/V_right);\n", + "print \" c).Final temperature of the gas on the left side is %f K\"%(T_left);\n", + "\n", + "\t\t\t#(d)\n", + "\t\t\t#The first law applied to the total system (left side and right side) gives.\n", + "\t\t\t#Q - W = del(U_left) + del(U_right)\n", + "\t\t\t#There is no net work done by the total system as the cylinder is closed at both ends.\n", + "Q = n*Cv_0*(T_left-T) + n*Cv_0*(T_right-T);\t\t\t#[J]\n", + "Q = Q/1000;\t\t\t#[kJ]\n", + "print \" d).Amount of heat added to the gas on the left side is %f kJ\"%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).Total work done on gas on the right hand side is 3.731958 kJ\n", + " b).The final temperature of the gas on right side is 396.112176 K\n", + " c).Final temperature of the gas on the left side is 1447.650324 K\n", + " d).Amount of heat added to the gas on the left side is 39.378580 kJ\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.14 Page number - 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_2 = 0.2;\t\t\t#[bar]\n", + "P_2 = P_2*10**(5);\t\t\t#[Pa]\n", + "int_dia_2 = 2.4*10**(-2);\t\t\t#[m] - internal diameter at state 2.\n", + "Q = 5*10**(-3);\t\t\t#[cubic metre/s] - Flow rate at point 2.\n", + "den = 1000;\t\t\t#[kg/cubic metre] - density\n", + "delta_z = 1;\t\t\t#[m] - Difference in height\n", + "g = 9.81;\t\t\t#[m/s**(2)] - Acceleration due to gravity\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (1)\n", + "\n", + "\t\t\t# (delta(P)/den) = (P2-P1)/den = P2/den\n", + "Vel_2 = Q/(3.14*(int_dia_2/2)**(2));\t\t\t#[m/s] - Velocity of water at state 2.\n", + "\t\t\t# Velocity at state 1 i negligible as compared to velocity at state 2,because the diameter of reservoir is very large as compared to diameter of pipe at state 2\n", + "\n", + "\t\t\t# From bernaulli equation we get,\n", + "\t\t\t# -w = (delta(P)/den) + delta(v**(2))/2 + g*delta_z\n", + "w = -((P_2/den )+ (Vel_2**(2)/2) + (g*delta_z));\t\t\t#[J/kg]\n", + "\t\t\t# w multiplied by m = (den*Q), will give the fluid power.\n", + "m = den*Q;\t\t\t#[kg/s]\n", + "W_net = m*w;\t\t\t#[Watt]\n", + "print \" 1).The fluid power is %f Watt\"%(W_net);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# Total discharge head developed by the pump is given by\n", + "\t\t\t# h = (delta(P)/den*g) + (Vel_2**(2)/2*g) + delta_z\n", + "h = (P_2/(den*g)) + (Vel_2**(2)/(2*g)) + delta_z;\t\t\t#[m]\n", + "print \" 2).Total discharge head developed by the pump is given by h = %f m\"%(h);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The fluid power is -454.750210 Watt\n", + " 2).Total discharge head developed by the pump is given by h = 9.271156 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.15 Page number - 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 1000.;\t\t\t#[K] - Temperature at entry\n", + "P_1 = 0.6;\t\t\t#[MPa] - Pressure at entry\n", + "P_2 = 0.2;\t\t\t#[MPa] - Exit pressure\n", + "Vel_1 = 50.;\t\t\t#[m/s] - Entry velocity \n", + "Y = 1.4;\t\t\t# Ratio of heat capacities\n", + "Mol_wt = 28.;\t\t\t#[g/mol] - Molecular weight of air\n", + "Cp = 29.099;\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n", + "Cp = (Cp/Mol_wt)*1000;\t\t\t#[J/kg-K]\n", + "\n", + "# Calculations\n", + "\t\t\t# We know that for a flow process \n", + "\t\t\t# delta_H + delta_V**(2)/2 + delta_(g*z) = q - w\n", + "\t\t\t# delta_H + delta_V**(2)/2 = 0\n", + "\n", + "\t\t\t# For a reversible process P*V**(Y) = constant and thus (T_2/T_1) = (P_2/P_1)**((Y-1)/Y)\n", + "T_2 = T_1*(P_2/P_1)**((Y-1)/Y);\t\t\t#[K] - Exit temperature\n", + "\n", + "\t\t\t# delta_H + delta_V**(2)/2 = 0\n", + "\t\t\t# Vel_2**(2)/2 - Vel_1**(2)/2 - (H_1 - H_2)= 0\n", + "\t\t\t# Vel_2**(2)/2 - Vel_1**(2)/2 - Cp*(T_1 - T_2) = 0\n", + "Vel_2_square = 2*(Vel_1**(2.)/2 - Cp*(T_2 - T_1));\t\t\t#[m**(2)/s**(2)]\n", + "Vel_2 = (Vel_2_square)**(1./2);\t\t\t#[m/s]\n", + "\n", + "# Results\n", + "print \" The discharge velocity is %f m/s\"%(Vel_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The discharge velocity is 749.965327 m/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.16 Page number - 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_entry = 10;\t\t\t#[bar] - Pressure at entry\n", + "V_entry = 200;\t\t\t#[m/s] - Velocity at entry\n", + "P_exit = 1;\t\t\t#[bar] - Vressure at exit\n", + "V_exit = 800;\t\t\t#[m/s] - Velocity at exit\n", + "g = 9.81;\t\t\t#[m/s**(2)] - Acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\t\t\t#Heat balance gives\n", + "\t\t\t# delta_H + (delta_V**(2))/2 + g*delta_z = q - w\n", + "\t\t\t#delta_H = q - w - (delta_V**(2))/2 \n", + "\t\t\t#From nozzle no work is extracted,therefore\n", + "delta_H = -(V_exit**(2)- V_entry**(2))/2;\t\t\t#[J/kg]\n", + "delta_H = delta_H*10**(-3);\t\t\t#[kJ/kg]\n", + "\n", + "# Results\n", + "print \" The change in enthalpy per kg of steam is %f kJ/kg\"%(delta_H);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The change in enthalpy per kg of steam is -300.000000 kJ/kg\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.17 Page number - 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 280;\t\t\t#[K] - Temperature at entry\n", + "P_1 = 100;\t\t\t#[kPa] - Pressure at entry\n", + "T_2 = 400;\t\t\t#[K] - Temperature at exit\n", + "P_2 = 600;\t\t\t#[kPa] - Pressure at exit\n", + "m = 0.02;\t\t\t#[kg/s] - Mass flow rate\n", + "m = m*10**(3);\t\t\t#[g/s]\n", + "heat_loss = 16;\t\t\t#[kJ/kg]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Cp_0 = 28.11 + 0.1967*10**(-2)*T + 0.4802*10**(-5)*T**(2) - 1.966*10**(-9)*T**(3)\n", + "\t\t\t#delta_H = q - w (neglecting kinetic and potential changes)\n", + "\t\t\t#delta_H = integral(Cp_0*dT)\n", + "\n", + "def f22(T): \n", + "\t return 28.11 + 0.1967*10**(-2)*T + 0.4802*10**(-5)*T**(2) - 1.966*10**(-9)*T**(3)\n", + "\n", + "delta_H = quad(f22,T_1,T_2)[0]\n", + "\n", + "print \" Change in enthalpy is %f J/mol\"%(delta_H);\n", + "\n", + "\t\t\t#Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n", + "Mol_wt = 28.84;\t\t\t#[g/mol]\n", + "q = - (heat_loss*Mol_wt);\t\t\t#[J/mol]\n", + "w = q - delta_H;\t\t\t#[J/mol]\n", + "print \" The work done per mole of air is %f J/mol\"%(w);\n", + "\t\t\t#the negative sign implies that work is done on the compressor.\n", + "\n", + "n = m/Mol_wt;\t\t\t#[mol/s] - Mole flow rate\n", + "W_net = delta_H*n;\t\t\t#[W]\n", + "W_net = -W_net*10**(-3);\t\t\t#[kW]\n", + "print \" And the necessary power input to the compressor is %f kW\"%(W_net);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Change in enthalpy is 3511.197066 J/mol\n", + " The work done per mole of air is -3972.637066 J/mol\n", + " And the necessary power input to the compressor is -2.434949 kW\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.18 Page number - 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 300;\t\t\t#[K] - Temperature at entry\n", + "P_1 = 100;\t\t\t#[kPa] - Pressure at entry\n", + "P_2 = 900;\t\t\t#[kPa] - Pressure at exit\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (a)\n", + "\t\t\t# Reversible adiabatic compression\n", + "Y = 1.4;\t\t\t#Ratio of specific heat capacities\n", + "\t\t\t# For ideal gas, P*V**(Y)= constant and it takes the form of (T_2/T_1) = (P_2/P_1)**((Y-1)/Y)\n", + "T_2 = T_1*(P_2/P_1)**((Y - 1)/Y);\t\t\t#[K]\n", + "\t\t\t# The work exchange for adiabatic process is given by\n", + "\t\t\t# W_adia = -delta_H = -Cp*(T2-T1) = Cp*(T1-T2) = ((Y*R)/(Y-1))*(T1-T2)\n", + "W_adia = ((Y*R)/(Y - 1))*(T_1 - T_2);\t\t\t#[J/mol] -work done\n", + "\t\t\t# Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n", + "Mol_wt = 28.84;\t\t\t#[g/mol]\n", + "W_adia = W_adia/Mol_wt;\t\t\t#[J/g]\n", + "print \" a).The compressor work done for reversible adiabatic compession is %f J/g\"%(W_adia);\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t#Isothermal compression\n", + "\t\t\t#W_iso = -integral(V*dP) = -integral((R*T/P)*dP) = R*T*ln(P_2/P_1)\n", + "W_iso = -R*T_1*math.log(P_2/P_1);\t\t\t#[J/mol]\n", + "W_iso = W_iso/Mol_wt;\t\t\t#[J/g]\n", + "print \" b).The compressor work done for isothermal compession is %f J/g\"%(W_iso);\n", + "\t\t\t#Note that in isothermal compression between the same states work done is less as compared to reversible adiabatic compression.\n", + "\n", + "\t\t\t#(c)\n", + "\t\t\t#Ideal two-stage compression \n", + "n = 1.3;\t\t\t#Polytropic exponent.\n", + "\t\t\t#Minimum work done in two stage compression is given by\n", + "\t\t\t#W_comp = ((2*n*R*T_1)/(n-1))*[1-(P_x/P_1)**(n-1)/n]\n", + "\t\t\t#where for minimum work, (P_x/P_1) = (P_x/P_2), and thus\n", + "P_x = (P_1*P_2)**(1./2);\t\t\t#[kPa]\n", + "\t\t\t#therefore, work done is given by,\n", + "W_comp = ((2*n*R*T_1)/(n-1))*(1-(P_x/P_1)**((n-1)/n));\t\t\t#[J/mol]\n", + "W_comp = W_comp/Mol_wt;\t\t\t#[J/g]\n", + "print \" c).The compressor work done for ideal two-stage compession is %f J/g\"%(W_comp);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The compressor work done for reversible adiabatic compession is -264.386412 J/g\n", + " b).The compressor work done for isothermal compession is -190.024880 J/g\n", + " c).The compressor work done for ideal two-stage compession is -216.284501 J/g\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.19 Page number - 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 600;\t\t\t#[C] - Temperature at entry\n", + "P_1 = 15;\t\t\t#[MPa] - Pressure at entry\n", + "T_2 = 400;\t\t\t#[K] - Temperature at exit\n", + "P_2 = 100;\t\t\t#[kPa] - Pressure at exit\n", + "A_in = 0.045;\t\t\t#[metre square] - flow in area\n", + "A_out = 0.31;\t\t\t#[metre square] - flow out area\n", + "m = 30;\t\t\t#[kg/s] - mass flow rate.\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#At 15 MPa and 600 C,it has been reported in the book that the properties of steam are,\n", + "Vol_1 = 0.02491;\t\t\t#[m**(3)/kg] - Specific volume\n", + "H_1 = 3582.3;\t\t\t#[kJ/kg] - Enthalpy\n", + "\t\t\t# m = den*vel*A = (Vel*A)/Vol, substituting the values\n", + "vel_1 = (m*Vol_1)/A_in;\t\t\t#[m/s] - Velocity at point 1.\n", + "print \" The inlet velocity is %f m/s\"%(vel_1);\n", + "\n", + "\t\t\t#At 100 MPa (saturated vapour),it has been reported in the book that the properties of steam are, T_sat = 99.63 C, and\n", + "Vol_vap_2 = 1.6940;\t\t\t#[m**(3)/kg] - specific volume of saturated vapour.\n", + "H_vap_2 = 2675.5;\t\t\t#[kJ/kg] - Enthalpy os saturated vapour.\n", + "vel_2 = (m*Vol_vap_2)/A_out;\t\t\t#[m/s] - Velocity at point 2.\n", + "print \" The exit velocity is %f m/s\"%(vel_2);\n", + "\n", + "\t\t\t#From first law we get, q - w =delta_H + delta_V**(2)/2\n", + "\t\t\t#q = 0, therefore, -w = delta_H + delta_V**(2)/2\n", + "delta_H = H_vap_2 - H_1;\t\t\t#[kJ/kg] - change in enthalpy.\n", + "delta_V_square = (vel_2**(2) - vel_1**(2))/2;\t\t\t#[J/kg]\n", + "delta_V_square = delta_V_square*10**(-3);\t\t\t#[kJ/kg]\n", + "w = -(delta_H + delta_V_square);\t\t\t#[J/kg] \n", + "W_net = w*m;\t\t\t#[kW]\n", + "W_net = W_net*10**(-3);\t\t\t#[MW] - power produced.\n", + "print \" The power that can be produced by the turbine is %f MW\"%(W_net);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The inlet velocity is 16.606667 m/s\n", + " The exit velocity is 163.935484 m/s\n", + " The power that can be produced by the turbine is 26.805014 MW\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.20 Page number - 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "Cp_0 = 2.5*R;\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n", + "Cv_0 = 1.5*R;\t\t\t#[J/mol-K] - Specific heat capacity at constant volume\n", + "T_L = 300;\t\t\t#[K] - Temperature at which port properties are constant.\n", + "\n", + "# Calculations\n", + "Y = Cp_0/Cv_0;\t\t\t# Ratio of heat capacities.\n", + "\t\t\t#From part(1) we obtained the relation,\n", + "\t\t\t# T_2 = 1/(((P_2-P_1)/(Y*T_L*P_2))+(P_1/(P_2*T_1)))\n", + "\t\t\t# Not that when P_2 >> P_1 ,T_2 approaches Y*T_L and thus\n", + "T_2 = Y*T_L;\t\t\t#[K]\n", + "\n", + "# Results\n", + "print \" b).The final temperature is %f K\"%(T_2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " b).The final temperature is 500.000000 K\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.21 Page number - 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 40 + 273.15;\t\t\t#[K] - Initial temperature.\n", + "P_1 = 1;\t\t\t#[bar] - Initial pressure.\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "Vol_1 = 0.01;\t\t\t#[cubic metre] - Initial volume of the cylinder.\n", + "T_2 = 100 + 273.15;\t\t\t#[K] - Final temperature.\n", + "P_2 = 100;\t\t\t#[kPa] - Final pressure.\n", + "P_2 = P_2*10**(5);\t\t\t#[Pa]\n", + "Vol_2 = 0.02;\t\t\t#[cubic metre] - Final volume of the cylinder.\n", + "Cp = 1.005;\t\t\t#[J/g-K] - Specific heat capacity at constant pressure.\n", + "Cv = 0.718;\t\t\t#[J/g-K] - Specific heat capacity at constant volume.\n", + "Mol_wt = 28.84;\t\t\t#[g/mol] - Molecular weight of air.\n", + "R = 8.314;\t\t\t#[J/mol-K] - universal gas constant\n", + "\n", + "# Calculations\n", + "delta_Vol = Vol_2 - Vol_1;\t\t\t# [cubic metre] - Change in volume.\n", + "\t\t\t# Assuming ideal gas P*V = R*T\n", + "V_1 = (R*T_1)/P_1;\t\t\t# [m**(3)/mol] - Initial specific volume.\n", + "\t\t\t# Therefore,the total number of moles initially in the system is,\n", + "n_1 = (Vol_1/V_1);\t\t\t# [mol]\n", + "m_1 = n_1*Mol_wt;\t\t\t# [g] - Initial mass of the system.\n", + "Y = Cp/Cv;\t\t\t#Ratio of heat capacities\n", + "\n", + "\t\t\t# The energy balance equation is given by\n", + "\t\t\t# -P*delta_Vol + H_liq*(m_2 - m_1) = m_2*Cv*(P*V2)/R - m_1*Cv*T_1\n", + "\t\t\t# m_2*Cv*(P*V2)/R = (Cv*P_1*Vol_2)/R\n", + "\t\t\t# Cv/R = 1/(Y-1)\n", + "\t\t\t# Since pressure of the gas in system is assumed constant,therefore it remains at 1 bar and thus P = P_1,\n", + "H_liq = Cp*T_2;\t\t\t# [J/g] - Enthalpy of liquid\n", + "m_2 = (P_1*delta_Vol + ((P_1*Vol_2)/(Y-1)) + H_liq*m_1 - m_1*Cv*T_1)/H_liq;\t\t\t#[g]\n", + "\n", + "\t\t\t#The mass entering the assembly during the filling process is given by\n", + "m = m_2 - m_1;\t\t\t#[g]\n", + "n_2 = m_2/Mol_wt;\t\t\t#[mol] - Number of moles in the final state.\n", + "V_2 = Vol_2/n_2;\t\t\t#[m**(3)/mol] - Final specific volume.\n", + "\t\t\t# Therfore,final temperature is given by,\n", + "T_2 = (P_1*V_2)/R;\t\t\t#[K] - Final temperature.\n", + "\n", + "# Results\n", + "print \" The final equilibrium temperature is %f K\"%(T_2);\n", + "print \" The mass entering through the valve is %f g\"%(m);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final equilibrium temperature is 339.343160 K\n", + " The mass entering through the valve is 9.367211 g\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example - 3.22 Page number - 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "V_total = 5;\t\t\t#[L] - Volume of pressure cooker.\n", + "V_total = V_total*10**(-3);\t\t\t#m**(3)\n", + "P_gauze = 15;\t\t\t#[psi] - Operating pressure (gauze)of pressure cooker.\n", + "P_gauze = (P_gauze/14.5)*10**(5);\t\t\t#[N/m**(2)]\n", + "P_atm = 0.966*10**(5);\t\t\t#[N/m**(2)] - Atmospheric pressure.\n", + "m_1 = 1;\t\t\t#[kg] - Initial mass.\n", + "t = 30*60;\t\t\t#[s] - Total time.\n", + "J = 500;\t\t\t#[W] - Rate of heat supply\n", + "\n", + "# Calculations\n", + "P_abs = P_gauze + P_atm;\t\t\t#[N/m**(2)] - Absolute pressure.\n", + "\t\t\t#The energy balance equqtion gives,\n", + "\t\t\t# Q = m_e*H_e +(m_2*U_2 - m_1*U_1), where 'm_e' is the mass exit from the system and 'H_e' is enthalpy at exit conditions.\n", + "\n", + "\t\t\t#It has been reported in the book that from steam table at P_abs,\n", + "T_sat = 120.23;\t\t\t#[K]- Saturated temperature\n", + "V_liq = 0.001061;\t\t\t#[m**(3)/kg] - specific volume of liquid.\n", + "V_vap = 0.8857;\t\t\t#[m**(3)/kg] - specific volume of vapour.\n", + "U_liq = 504.49;\t\t\t#[kJ/kg] - specific internal energy of liquid.\n", + "U_vap = 2529.5;\t\t\t#[kJ/kg] - specific internal energy of vapour.\n", + "H_liq = 504.70;\t\t\t#[kJ/kg] - specific enthalpy of liquid.\n", + "H_vap = 2706.7;\t\t\t#[kJ/kg] - specific internal energy of vapour.\n", + "\n", + "\t\t\t#We know that total volume occupied by 1 kg of fluid is \n", + "\t\t\t#V_total = (1-x)*V_liq + x*V_vap\n", + "x1 = (V_liq - V_total)/(V_liq - V_vap);\t\t\t#[g]\n", + "\n", + "\t\t\t#Internal energy at this state is\n", + "U_1 = (1-x1)*U_liq + x1*U_vap;\t\t\t#[kJ/kg] - specific internal energy\n", + "U_1_net = m_1*U_1;\t\t\t#[kJ] - Internal energy\n", + "\n", + "\t\t\t#The amount of heat suplied is given by,\n", + "J_net = J*t;\t\t\t#[J] - Net heat supplied.\n", + "J_net = J_net*10**(-3);\t\t\t#[kJ]\n", + "\n", + "\t\t\t#Let the dryness factor at the end of the process be x\n", + "\t\t\t#Let the total mass of H2O (liquid + vapour) at the end of the process be 'm' kg.\n", + "\t\t\t# V_total/m = (1-x)*(V_liq) + x*V_vap ......equqtion(1)\n", + "\n", + "\n", + "\t\t\t#The energy balance equqtion gives,\n", + "\t\t\t# Q = m_e*H_e +(m_2*U_2 - m_1*U_1), where 'm_e' is the mass exit from the system and 'H_e' is enthalpy at exit conditions.\n", + "\n", + " \t\t# The second equation on simplification becomes\n", + "\t\t\t# x = ((0.005/m) - 0.001061)/0.884639\n", + "\n", + "\t\t\t# Putting the expression of x in first equation and then simplifying, we get\n", + "\t\t\t# - 1293.2 = -2202.21*m + 11.445 - 2.429*m\n", + "m = (11.445+1293.2)/(2202.21+2.429);\t\t\t#[kg]\n", + "\n", + "\t\t\t# Therefore x can be calculated as\n", + "x = ((0.005/m) - 0.001061)/0.884639;\n", + "\n", + "\t\t\t# Therfore total water (liquid + vapour) present in the pressure cooker at the end of the process is m kg.\n", + "m_vapour = x*m;\t\t\t#[kg] - Mass of vapour\n", + "m_liquid = (1-x)*m;\t\t\t#[kg] - Mass of vapour\n", + "\n", + "# Results\n", + "print \" Total water liquid + vapour) present in the pressure cooker at the end of the process is %f kg\"%(m);\n", + "print \" The mass of vapour is %f kg\"%(m_vapour);\n", + "print \" The mass of liquid is %f kg\"%(m_liquid);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total water liquid + vapour) present in the pressure cooker at the end of the process is 0.591773 kg\n", + " The mass of vapour is 0.004942 kg\n", + " The mass of liquid is 0.586830 kg\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb new file mode 100755 index 00000000..ebeadf70 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb @@ -0,0 +1,1508 @@ +{ + "metadata": { + "name": "ch4_2", + "signature": "sha256:8185298e7063d37f738c422b0f9a0946dd677189cdf544f54e436d8d650cb521" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : The Secomd Law and Its Applications" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.1 Page Number : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "n = 1000.;\t\t\t#[mol]\n", + "T = 400.;\t\t\t#[K]\n", + "P_1 = 100.;\t\t\t#[kPa]\n", + "P_2 = 1000.;\t\t\t#[kPa]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "T_surr = 400.;\t\t\t#[K] - surrounding temperature\n", + "\t\t\t# Total change in entropy of the system is given by\n", + "\t\t\t# delta_S_sys = n*(Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1))\n", + "\t\t\t# The process being isothermal the first term is zero and the total entropy change of the system is\n", + "delta_S_sys_a = - n*R*math.log(P_2/P_1);\t\t\t#[J/K]\n", + "delta_S_sys_a = delta_S_sys_a*10**(-3);\t\t\t#[kJ/K]\n", + "\n", + "\t\t\t# Since the process is reversible therefore\n", + "Q_sys = T_surr*delta_S_sys_a;\t\t\t#[kJ] - Heat change in the system\n", + "\n", + "Q_surr = - Q_sys;\t\t\t#[kJ] - Heat change in the surrounding\n", + "delta_S_surr_a = Q_surr/T_surr;\t\t\t#[kJ/K]\n", + "\n", + "delta_S_univ_a = delta_S_sys_a + delta_S_surr_a;\t\t\t#[kJ/K]\n", + "\t\t\t# We get delta_S_univ = 0, which is true for a reversible process\n", + "\n", + "print \" a).The entropy change of the gas is given by delta_S_sys = %f kJ/K \"%(delta_S_sys_a);\n", + "print \" The entropy change of the surrounding is delta_S_surr = %f kJ/K \"%(delta_S_surr_a);\n", + "print \" The total entropy change of the gas is delta_S_univ = %f kJ/K \"%(delta_S_univ_a);\n", + "\n", + "\t\t\t#(b)\n", + "T_surr_b = 300.;\t\t\t#[K] - surrounding temperature\n", + "\n", + "delta_S_sys_b = delta_S_sys_a;\n", + "\n", + "\t\t\t# Work done under reversible condition is given by\n", + "\t\t\t# W = integral(P*dV) = integral(((R*T)/V)*dV) = R*T*math.log(V_2/V_1)\n", + "\t\t\t# For ideal gas we have, P1*V1/T1 = P2*V2/T2 or, V2/V1 = P1/P2 (for isothermal conditions)\n", + "W = R*T*math.log(P_1/P_2);\t\t\t#[J/mol]\n", + "W = W*10**(-3);\t\t\t#[kJ/mol]\n", + "\n", + "W = W*(120./100);\t\t\t#[kJ/mol]\n", + "W = W*n;\t\t\t#[kJ] - Total work done for n moles\n", + "\n", + "\t\t\t# Using the first law we have delta_U = Q - W. Now under isothermal conditions for ideal gas, delta_U = 0. Therefore,\n", + "Q = -W;\n", + "\n", + "\t\t\t# Since heat is gained by the surroundings therefore\n", + "delta_S_surr_b = Q/T_surr_b;\t\t\t#[kJ/K]\n", + "\n", + "delta_S_univ_b = delta_S_sys_b + delta_S_surr_b;\t\t\t#[kJ/K]\n", + "\n", + "print \" b).The entropy change of the gas is given by delta_S_sys = %f kJ/K \"%(delta_S_sys_b);\n", + "print \" The entropy change of the surrounding is delta_S_surr = %f kJ/K \"%(delta_S_surr_b);\n", + "print \" The total entropy change of the gas is delta_S_univ = %f kJ/K \"%(delta_S_univ_b);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The entropy change of the gas is given by delta_S_sys = -19.143692 kJ/K \n", + " The entropy change of the surrounding is delta_S_surr = 19.143692 kJ/K \n", + " The total entropy change of the gas is delta_S_univ = 0.000000 kJ/K \n", + " b).The entropy change of the gas is given by delta_S_sys = -19.143692 kJ/K \n", + " The entropy change of the surrounding is delta_S_surr = 30.629908 kJ/K \n", + " The total entropy change of the gas is delta_S_univ = 11.486215 kJ/K \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.2 Page Number : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 400.;\t\t\t#[K] - Temperature\n", + "P_1 = 500.*10**(3);\t\t\t#[Pa] - Initial pressure\n", + "P_2 = 100.*10**(3);\t\t\t#[Pa] - Final pressure\n", + "V_1 = 750.*10**(-6);\t\t\t#[m**(3)] - Initial volume\n", + "W_actual = 0.55*10**(3);\t\t\t#[J] - Actual work done\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal fas constant\n", + "\n", + "# Calculations\n", + "\t\t\t# Suppose that the surroundings are at 400 K.\n", + "\n", + "\t\t\t# The number of moles is given by\n", + "n = (P_1*V_1)/(R*T);\t\t\t#[mol]\n", + "\t\t\t# The entropy change of ideal gas under isothermal condition is given by\n", + "delta_S_sys = - n*R*math.log(P_2/P_1);\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# The heat supplied to the system in the internally reversible process is\n", + "Q_theot = T*delta_S_sys;\t\t\t#[J]\n", + "\t\t\t# Since the process is isothermal therefore, workdone is given by\n", + "W_theot = Q_theot;\t\t\t#[J] - Theoritical work done\n", + "\t\t\t# Since actual work done by the gas is 0.55 kJ therefore actual heat supplied is also 0.55 kJ because under isothermal conditions delta_U = 0\n", + "Q_actual = W_actual;\n", + "\n", + "# Results\n", + "\t\t\t# Since Q_theot > Q_actual, so the process is irreversible\n", + "print \" Since Q_theot = %f J is greater than Q_actual = %f J\"%(Q_theot,Q_actual);\n", + "print \" Therefore, the process is internally irreversible\"\n", + "\n", + "\n", + "\t\t\t# delta_S_sys = Q/T_b + S_gen\n", + "S_gen = delta_S_sys - (Q_theot/T);\t\t\t#[J/K]\n", + "\t\t\t# The entropy generated may be due to friction and other dissipayive effects or due to non-quasi-static expansion\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Since Q_theot = 603.539217 J is greater than Q_actual = 550.000000 J\n", + " Therefore, the process is internally irreversible\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.3 Page Number : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\t\t\t# For side A\n", + "V_A = 1;\t\t\t#[L] - Volume\n", + "V_A = V_A*10**(-3);\t\t\t#[m**(3)]\n", + "T_A = 300;\t\t\t#[K] - Temperature\n", + "P_A = 2;\t\t\t#[atm] - Pressure\n", + "P_A = P_A*101325;\t\t\t#[Pa]\n", + "\n", + "\t\t\t# For side B\n", + "V_B = 1;\t\t\t#[L] - volume\n", + "V_B = V_B*10**(-3);\t\t\t#[m**(3)]\n", + "T_B = 300;\t\t\t#[K] - Temperature\n", + "P_B = 1;\t\t\t#[atm] - Pressure\n", + "P_B = P_B*101325;\t\t\t#[Pa]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# From first law final temperature and pressure are given by (example 3.30)\n", + "\t\t\t# T = ((n_A*T_A) + (n_B*T_B))/(n_A + n_B)\n", + "\t\t\t# P = ((P_A*V_A) + (P_A*V_B))/(V_A + V_B)\n", + "\n", + "\t\t\t# Since in this case T_A = T_B, therefore final pressure is given by\n", + "P = ((P_A*V_A) + (P_B*V_B))/(V_A + V_B);\t\t\t#[Pa]\n", + "P = P/101325;\t\t\t#[atm]\n", + "\n", + "print \" The final temperature is %f K\"%(T_A);\n", + "print \" The final pressure is %f atm\"%(P);\n", + "\n", + "\t\t\t# The number of moles of air on each side are\n", + "n_A = (P_A*V_A)/(R*T_A);\t\t\t#[mol]\n", + "n_B = (P_B*V_B)/(R*T_B);\t\t\t#[mol]\n", + "\n", + "delta_S_A = -n_A*R*math.log((P*101325)/P_A);\t\t\t#[J/K] - Entropy change on side A\n", + "delta_S_B = -n_B*R*math.log((P*101325)/P_B);\t\t\t#[J/K] - Entropy change on side B\n", + "delta_S_sys = delta_S_A + delta_S_B;\t\t\t#[J/K] - Total entropy change of system\n", + "\n", + "\t\t\t# Since the system is insulated there is no heat exchange with the surroundings, therefore entropy change of surrounding is zero\n", + "delta_S_surr = 0;\t\t\t#[J/K]\n", + "delta_S_univ = delta_S_sys + delta_S_surr;\t\t\t#[J/K]\n", + "print \" The total increase in entropy is %f J/K\"%(delta_S_univ);\n", + "\n", + "\t\t\t# The entropy change of the system can also be writtten as\n", + "\t\t\t# delta_s_sys = Q/T_b + S_gen\n", + "\t\t\t# Since there is no heat transfer, therefore\n", + "S_gen = delta_S_univ;\t\t\t#[J/K]\n", + "\t\t\t# The process is reversible because of entropy generation due to spontaneous release of piston.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final temperature is 300.000000 K\n", + " The final pressure is 1.500000 atm\n", + " The total increase in entropy is 0.057383 J/K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.4 Page Number : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "V_vessel = 0.2;\t\t\t#[m**(3)] - Volume of the vessel\n", + "P_1 = 10;\t\t\t#[bar] - Initial pressure inside the vessel\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "P_2 = 3.5;\t\t\t#[bar] - Final pressure inside the vessel\n", + "P_2 = P_2*10**(5);\t\t\t#Pa\n", + "T_1 = 250 + 273.15;\t\t\t#[K] - Initial temperature of the vesssel\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (a)\n", + "\t\t\t# At 10 bar and 250 C the steam is superheated. From steam table as reported in book we have\n", + "V_1 = 0.2327;\t\t\t#[m**(3)/kg] - specific volume\n", + "U_1 = 2709.9;\t\t\t#[kJ/kg] - specific internal energy\n", + "H_1 = 2942.6;\t\t\t#[kj/kg] - Specific enthalpy\n", + "S_1 = 6.9247;\t\t\t#[kJ/kg-K] - Specific entropy\n", + "\t\t\t# the quantity of steam is given by\n", + "m = V_vessel/V_1;\t\t\t#[kg]\n", + "\n", + "\t\t\t# At final state \n", + "V_2 = 0.2327;\t\t\t#[m**(3)/kg] - Molar volume\n", + "V_liq_2 = 0.001079;\t\t\t# [m**(3)/kg]\n", + "V_vap_2 = 0.5243;\t\t\t# [m**(3)/kg]\n", + "\t\t\t# Since overall volume lies between saturated liquid and saturated vapour therefore the steam is saturated and its dryness fraction at final state is given by\n", + "x = (V_2 - V_liq_2)/(V_vap_2 - V_liq_2);\n", + "\t\t\t# Final temperature = T_sat (at 3 bar) from steam table\n", + "T_final = 138.88;\t\t\t#[C]\n", + "\n", + "\t\t\t# At 3.5 bar saturated conditions \n", + "S_liq = 1.7275;\t\t\t#[kJ/kg-K] - Entropy of saturated liquid\n", + "S_vap = 6.9405;\t\t\t#[kJ/kg-K] - Entropy of saturated vapour\n", + "U_liq = 583.95;\t\t\t#[kJ/kg] - Internal energy of saturated liquid\n", + "U_vap = 2548.9;\t\t\t#[kJ/kg] - Internal energy of saturated vapour\n", + "\t\t\t# Therefore at final state \n", + "U_2 = U_liq*(1 - x) + x*U_vap;\t\t\t#[kJ/kg]\n", + "S_2 = S_liq*(1 - x) + x*S_vap;\t\t\t#[kJ/kg-K]\n", + "Q_1 = m*(U_2 - U_1);\t\t\t#[kJ]\n", + "delta_S_1 = m*(S_2 - S_1);\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" a).The final temperature is %f C\"%(T_final);\n", + "print \" The amount of heat transfer is %f kJ\"%(Q_1);\n", + "print \" The change of entropy is %f kJ/kg-K\"%(delta_S_1);\n", + "\n", + "\t\t\t# (b)\n", + "Y = 1.4;\t\t\t# Ratio of heat capacities for air\n", + "\t\t\t# (P_1*V_1)/T_1 = (P_2*V_2)/T_2 and since V_1 = V_2\n", + "T_2 = (P_2/P_1)*T_1;\t\t\t#[K]\n", + "\n", + "\t\t\t# Since the volume is fixed therefore work done (W) = 0 and from first law we get\n", + "\t\t\t# Q = delta_U = n*Cv_0*(T_2 - T_1)\n", + "Cv_0 = R/(Y - 1);\t\t\t#[J/mol-K] - Heat capacity at constant volume\n", + "Cp_0 = (Y*R)/(Y - 1);\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n", + "n = (P_1*V_vessel)/(R*T_1);\t\t\t#[mol] - No. of moles\n", + "Q_2 = n*Cv_0*(T_2 - T_1);\t\t\t#[J] - Heat change\n", + "Q_2 = Q_2*10**(-3);\t\t\t#[kJ]\n", + "\n", + "delta_S_2 = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n", + "delta_S_2 = n*delta_S_2*10**(-3);\t\t\t#[kJ/K]\n", + "\n", + "print \" b).The final temperature is %f C\"%(T_2);\n", + "print \" The amount of heat transfer is %f kJ\"%(Q_2);\n", + "print \" The change of entropy is %f kJ/K\"%(delta_S_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The final temperature is 138.880000 C\n", + " The amount of heat transfer is -1079.587621 kJ\n", + " The change of entropy is -2.483450 kJ/kg-K\n", + " b).The final temperature is 183.102500 C\n", + " The amount of heat transfer is -325.000000 kJ\n", + " The change of entropy is -1.003366 kJ/K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.5 Page Number : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from math import *\n", + "# Variables\n", + "m = 1000.;\t\t\t#[g] - Mass of fluid\n", + "P_1 = 20.;\t\t\t#[bar] - Initial pressure\n", + "P_1 = P_1*10.**(5);\t\t\t#[Pa]\n", + "P_2 = 2;\t\t\t#[bar] - Final pressure\n", + "P_2 = P_2*10.**(5);\t\t\t#Pa\n", + "T_1 = 250 + 273.15;\t\t\t#[K] - Initial temperature\n", + "n = 1.25;\n", + "R = 8.314;\t\t\t#[J/mol*-] - Universal gas constant\n", + "Y = 1.4;\t\t\t# Index of expansion\n", + "Cv_0 = R/(Y- 1);\t\t\t#[J/mol-K]\n", + "Cp_0 = R + Cv_0;\t\t\t#[J/mol-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "\t\t\t# For steam at 20 bar and 250 C, from steam table as reported in the book\n", + "V_1 = 0.11144;\t\t\t#[m**(3)/kg]\n", + "U_1 = 2679.6;\t\t\t#[kJ/kg]\n", + "S_1 = 6.5453;\t\t\t#[kJ/kg-K]\n", + "\t\t\t# P_1*V_1**(n) = P_2*V_2**(n)\n", + "V_2 = ((P_1*V_1**(n))/P_2)**(1/n);\t\t\t#[m**(3)/kg]\n", + "\n", + "\t\t\t# At 2 bar under saturated conditions,from steam table as reported in the book\n", + "V_liq = 0.001061;\t\t\t#[m**(3)/kg]\n", + "V_vap = 0.8857;\t\t\t#[m**(3)/kg]\n", + "x = (V_2 - V_liq)/(V_vap - V_liq);\t\t\t# Dryness fraction\n", + "T_sat = 120.23;\t\t\t#[C] - The final temperature\n", + "U_liq = 504.49;\t\t\t#[kJ/kg] - Internal energy of saturate liquid\n", + "U_vap = 2529.5;\t\t\t#[kJ/kg] - Internal energy of saturate vapour\n", + "\t\t\t# Therefore, internal energy at state 2 is given by\n", + "U_2 = U_liq*(1 - x) + x*U_vap;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# Work transfer is given by\n", + "W = (P_1*V_1 - P_2*V_2)/(n - 1);\t\t\t#[J/kg]\n", + "W = W*10**(-3);\t\t\t#[kJ/kg]\n", + "delta_U = U_2 - U_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# From first law, q - W = delta_U\n", + "q = W + delta_U;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# At final state (2 bar saturated), as reported in the book\n", + "S_liq = 1.5301;\t\t\t#[kJ/kg-K] - Entropy of saturated liquid\n", + "S_vap = 7.1271;\t\t\t#[kJ/kg-K] - Entropy of saturated vapour\n", + "\t\t\t# Therefore, entropy at state 2 is given by\n", + "S_2 = S_liq*(1 - x) + x*S_vap;\t\t\t#[kJ/kg-K]\n", + "delta_S = S_2 - S_1;\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" a).The final temperature is %f C\"%(T_sat);\n", + "print \" The work done is equal to %f kJ/kg\"%(W);\n", + "print \" The heat change is equal to %f kJ/kg\"%(q);\n", + "print \" The entropy change is equal to %f kJ/kg-K\"%(delta_S);\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t# P*V**(n) = constant\n", + "\t\t\t# Since the gas behaves as ideal we can write\n", + "\t\t\t# P_1**(1-n)*T_1**(n) = P_2**(1-n)*T_2**(n)\n", + "T_2 = T_1*(P_1/P_2)**((1-n)/n);\t\t\t#[K]\n", + "\n", + "\t\t\t# Molar volume is given by\n", + "V_2_1 = (R*T_1)/P_1;\t\t\t#[m**(3)/mol] - At state 1\n", + "V_2_2 = (R*T_2)/P_2;\t\t\t#[m**(3)/mol] - At state 2\n", + "\n", + "\t\t\t# Work transfer is given by\n", + "w_2 = ((P_1*V_2_1) - (P_2*V_2_2))/(n-1);\t\t\t#[J/mol]\n", + "Mol_wt_air = 0.21*32 + 0.79*28;\t\t\t#[g/mol] - Molecular weight of air\n", + "n_mole = m/Mol_wt_air;\n", + "\t\t\t# Total work transfer is given by\n", + "W_2 = w_2*n_mole*10**(-3);\t\t\t#[kJ]\n", + "\t\t\t# Internal energy change is given by\n", + "delta_U = n_mole*Cv_0*(T_2 - T_1)*10**(-3);\t\t\t#[kJ]\n", + "\n", + "\t\t\t# Heat transfer is given by\n", + "Q = W_2 + delta_U;\t\t\t#[kJ]\n", + "\n", + "\t\t\t# Entropy change is given by\n", + "delta_S_2 = Cp_0*log(T_2/T_1) - R*log(P_2/P_1);\t\t\t#[J/mol-K]\n", + "delta_S_2 = delta_S_2*n_mole;\t\t\t#[J/mol]\n", + "\n", + "print \" b).The final temperature is %f C\"%(T_2);\n", + "print \" The work done is equal to %f kJ/kg\"%(W_2);\n", + "print \" The total heat change is equal to %f kJ\"%(Q);\n", + "print \" The entropy change is equal to %f J/kg-K\"%(delta_S_2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The final temperature is 120.230000 C\n", + " The work done is equal to 329.008908 kJ/kg\n", + " The heat change is equal to -238.988250 kJ/kg\n", + " The entropy change is equal to -0.573241 kJ/kg-K\n", + " b).The final temperature is 330.085335 C\n", + " The work done is equal to 222.626855 kJ/kg\n", + " The total heat change is equal to 83.485071 kJ\n", + " The entropy change is equal to 199.136884 J/kg-K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.6 Page Number : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "m = 1000;\t\t\t#[g] - Mass of fluid\n", + "P_1 = 20;\t\t\t#[bar] - Initial pressure\n", + "P_2 = 2;\t\t\t#[bar] - Final ressure\n", + "T_1 = 250 + 273.15;\t\t\t#[K] - Initial tempearture\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t# (a).\n", + "\t\t\t# At 20 bar and 250 C as reported in the book\n", + "V_1 = 0.11144;\t\t\t#[m**(3)/kg] - Specific volume\n", + "U_1 = 2679.6;\t\t\t#[kJ/kg] - Specific internal energy\n", + "S_1 = 6.5453;\t\t\t#[kJ/kg-K] - Specific entropy\n", + "S_2 = S_1;\t\t\t# Isentropic expansion\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# At 2 bar under saturated conditions \n", + "S_liq = 1.5301;\t\t\t#[kJ/kg-K]\n", + "S_vap = 7.1271;\t\t\t#[kJ/kg-K]\n", + "U_liq = 504.49;\t\t\t#[kJ/kg-K]\n", + "U_vap = 2529.5;\t\t\t#[kJ/kg-K]\n", + "\t\t\t# Therefore dryness factor can be determined as\n", + "x = (S_1 - S_liq)/(S_vap - S_liq);\n", + "U_2 = U_liq*(1 - x) + x*U_vap;\t\t\t#[kJ/kg] - Specific internal energy at final state\n", + "delta_U = U_2 - U_1;\t\t\t#[kJ/kg] - change in internal energy\n", + "W = - delta_U;\t\t\t# - Work done\n", + "\n", + "\t\t\t# The final saturated temperature at 2 bar from steam table is\n", + "T_2 = 120.23;\t\t\t#[C]\n", + "\n", + "print \" a).The final temperature is %f C\"%(T_2);\n", + "print \" The work done is equal to %f kJ/kg\"%(W);\n", + "\n", + "\t\t\t# (b).\n", + "Y = 1.4;\t\t\t# Index of expansion for air\n", + "Cv_0 = R/(Y-1);\t\t\t#[J/mol*K] - Specific heat capacity at constant volume\n", + "\t\t\t# Ideal gas under isentropic expansion P_1**(1-Y)*T_1**(Y) =P_2**(1-Y)*T_2**(Y)\n", + "T_2_prime = T_1*(P_1/P_2)**((1-Y)/Y);\t\t\t#[K] - Final temperature\n", + "delta_U_prime = Cv_0*(T_2_prime - T_1);\t\t\t#[J/mol] - change in internal energy\n", + "\n", + "\t\t\t# Number of moles is given by\n", + "n = m/28.84;\t\t\t#[mol]\n", + "delta_U_prime = delta_U_prime*n*10**(-3);\t\t\t#[kJ]\n", + "W_prime = - delta_U_prime;\t\t\t# Work done\n", + "\n", + "print \" b).The final temperature is %f C\"%(T_2_prime);\n", + "print \" The work done is equal to %f kJ/kg\"%(W_prime);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The final temperature is 120.230000 C\n", + " The work done is equal to 360.596841 kJ/kg\n", + " b).The final temperature is 270.964218 C\n", + " The work done is equal to 181.750398 kJ/kg\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.7 Page Number : 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1 = 15.;\t\t\t#[bar] - Initial pressure\n", + "P_2 = 0.15;\t\t\t#[bar] - Final pressure\n", + "\n", + "\t\t\t# We know that during isentropic expansion\n", + "\t\t\t# W = ((P_1*V_1) - (P_2*V_2))/(Y - 1)\n", + "\n", + "\t\t\t# At 15 bar (saturated vapour), from steam table as reported in the book\n", + "V_1 = 0.13177;\t\t\t#[m**(3)/kg]\n", + "U_1 = 2594.5;\t\t\t#[kJ/kg]\n", + "S_1 = 6.4448;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t# Now at state 2 (P_2 = 0.15 bar),from steam table as reported in the book\n", + "S_2 = S_1;\t\t\t# Isentropic expansion\n", + "S_liq = 0.7549;\t\t\t#[kJ/kg-K]\n", + "S_vap = 8.0085;\t\t\t#[kJ/kg-K]\n", + "U_liq = 225.92;\t\t\t#[kJ/kg]\n", + "U_vap = 2448.7;\t\t\t#[kJ/kg]\n", + "V_liq = 0.001014;\t\t\t#[m**(3)/kg]\n", + "V_vap = 10.02;\t\t\t#[m**(3)/kg]\n", + "\n", + "# Calculations\n", + "\t\t\t# Therefore dryness factor can be calculated as\n", + "x = round((S_1 - S_liq)/(S_vap - S_liq),3);\n", + "U_2 = round(U_liq*(1 - x) + x*U_vap,2);\t\t\t#[kJ/kg] - Specific internal energy at final state\n", + "delta_U = U_2 - U_1;\t\t\t#[kJ/kg] - change in internal energy\n", + "W = - delta_U;\t\t\t# - Work done\n", + "\n", + "\t\t\t# The specific volume at the final state is\n", + "V_2 = round(V_liq*(1 - x) + x*V_vap,3);\t\t\t#[m**(3)/kg]\n", + "\n", + "\t\t\t# From work done under adiabatic conditions we get\n", + "\t\t\t# W = ((P_1*V_1) - (P_2*V_2))/(Y - 1)\n", + "Y = (((P_1*V_1) - (P_2*V_2))*10**2/W) + 1;\n", + "\n", + "# Results\n", + "print \" The index of expansion is given by Y = %.4f\"%(Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The index of expansion is given by Y = 1.1275\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.8 Page Number : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 40;\t\t\t#[bar] - Initial pressure\n", + "T_1 = 500;\t\t\t#[C] - Initial temperature\n", + "Vel_1 = 140;\t\t\t#[m/s] - Initial velocity\n", + "T_2 = 100;\t\t\t#[C] - Final temperature\n", + "Vel_2 = 80;\t\t\t#[m/s] - Final velocity\n", + "W = 746.0;\t\t\t#[kJ/kg] - Work output\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# (a).\n", + "\t\t\t# From steam table as reported in the book\n", + "H_1 = 3445.3;\t\t\t#[kJ/kg]\n", + "H_2 = 2676.1;\t\t\t#[kJ/kg]\n", + "S_1 = 7.0901;\t\t\t#[kJ/kh-K]\n", + "S_2 = 7.3549;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t# The temperature at which heat exchange take place is given by \n", + "T_b =(T_1 + T_2)/2 + 273.15;\t\t\t#[K]\n", + "\n", + "\t\t\t# From first law in a control volume \n", + "\t\t\t# q - W = delta_H + (delta_V**(2))/2 , therefore\n", + "q = W*10**(3) + (H_2 - H_1)*10**(3) + (Vel_2**(2) - Vel_1**(2))/2;\t\t\t#[J/kg]\n", + "q = q*10**(-3);\t\t\t#[kJ/kg]\n", + "\n", + "S_gen = (S_2 - S_1) - (q/T_b);\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" a).The specific entropy production within turbine is %f kJ/kg-K\"%(S_gen);\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t# If control volume is too large to include the turbine and the environment then T_b becomes equal to 289 K. In this case\n", + "T_b_prime = 298;\t\t\t#[K]\n", + "\n", + "\t\t\t# The entropy change of the sysytem is given by \n", + "\t\t\t#delta_S = q/T_b + S_gen\n", + "S_gen = (S_2 - S_1) - (q/T_b_prime);\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" b).The specific entropy production within turbine is %f kJ/kg-K\"%(S_gen);\n", + "\n", + "\t\t\t# In the first part only irreversibilities within the turbine are evaluated\n", + "\t\t\t# whereas in part (2) irreversible heat transfer between the turbine cover and environment are also included.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The specific entropy production within turbine is 0.316793 kJ/kg-K\n", + " b).The specific entropy production within turbine is 0.364800 kJ/kg-K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.9 Page Number : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 1.;\t\t\t#[MPa] - Initial pressure\n", + "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 8.;\t\t\t#[MPa] - Final pressure\n", + "Y = 1.4;\t\t\t# Index of expansion of gas\n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t# The exit temperature for ideal gas under isentropic conditions is given by \n", + "T_2 = round(T_1*(round((P_2/P_1)**((Y-1)/Y),2)),1);\t\t\t#[K] - Exit temperature\n", + "\n", + "Cp_0 = round(Y*R/(Y-1),1);\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n", + "\t\t\t# For isentropic conditions the enthalpy change for ideal gas is given by\n", + "delta_H_s = Cp_0*(T_2 - T_1);\t\t\t#[J/mol]\n", + "\t\t\t# Therefore work is given by\n", + "W = - delta_H_s;\t\t\t#[J/mol]\n", + "\n", + "print \" 1).The exit temperature of steam is %.2f K\"%(T_2);\n", + "print \" The required work is %.2f J/mol\"%(W);\n", + "\n", + "\t\t\t#(2)\n", + "eff = 0.8;\t\t\t# Adiabatic efficiency\n", + "\t\t\t# delta_H_s/delta_H_a = 0.8\n", + "delta_H_a = delta_H_s/eff;\t\t\t#[J/mol] - Actual enthalpy change\n", + "W_a = - delta_H_a;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# The ideal gas enthalpy is a function only of temperature,therefore actual exit temperature T_2a is given by \n", + "\t\t\t# delta_H_a = Cp_0*(T_2a - T_1)\n", + "T_2a = (delta_H_a/Cp_0) + T_1;\n", + "\n", + "print \" 2).The exit temperature of steam is %.2f K\"%(T_2a);\n", + "print \" The required work is %.2f J/mol\"%(W_a);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The exit temperature of steam is 856.40 K\n", + " The required work is -11152.58 J/mol\n", + " 2).The exit temperature of steam is 952.21 K\n", + " The required work is -13940.72 J/mol\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.10 Page Number : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\n", + "\n", + "# Variables\n", + "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n", + "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 8;\t\t\t#[MPa] - Final pressure\n", + "Y = 1.4;\t\t\t# Index of expansion of gas\n", + "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n", + "\t\t\t# Cp_0 = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3), here T is in K and Cp_0 is in cal/mol-K\n", + "a = 7.7;\n", + "b = 0.04594*10**(-2);\n", + "c = 0.2521*10**(-5);\n", + "d = - 0.8587*10**(-9);\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# delta_S = integral((Cp_0/T)*dT) - R*math.log(P_2/P_1) = 0\n", + "\t\t\t# delta_S = integral(((a + b*T + c*T**(2) + d*T**(3))/T)*dT) - R*math.log(P_2/P_1) = 0\n", + "\t\t\t# delta_S = a*math.log(T_2/T_1) + b*(T_2 - T_1) + (c/2)*(T_2**(2) - T_1**(2)) + (d/3)*(T_2**(3) - T_1**(3)) - R*math.log(P_2/P_1) = 0\n", + "\t\t\t# Solving for T_2 in the above equation we get\n", + "def f(T_2): \n", + "\t return a*math.log(T_2/T_1)+b*(T_2-T_1)+(c/2)*(T_2**(2)-T_1**(2))+(d/3)*(T_2**(3)-T_1**(3))-R*math.log(P_2/P_1)\n", + "T_2 = fsolve(f,100)\n", + "\n", + "\t\t\t# Now let us calculate the enthalpy change under these conditions \n", + "\n", + "def f0(T): \n", + "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n", + "\n", + "delta_H_s = quad(f0,T_1,T_2)[0]\n", + "\n", + "delta_H_s = delta_H_s*4.184;\t\t\t#[J/mol]\n", + "\t\t\t# Therefore isentropic work done is\n", + "W = - delta_H_s;\n", + "\n", + "print \" 1).The exit temperature of steam is %f K\"%(T_2);\n", + "print \" The required work is %f J/mol\"%(W);\n", + "\n", + "\t\t\t#(2)\n", + "eff = 0.8;\n", + "delta_H_a = delta_H_s/eff;\t\t\t#[J/mol] - Actual enthalpy change\n", + "\t\t\t# Therefore actual work done is given by \n", + "W_a = - delta_H_a;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# Now we have to determine the exit temperature under actual conditions\n", + "\t\t\t# delta_H_a = integral(Cp_0*dT) from limit T_1 = 473.15 K to T_2\n", + "\t\t\t# On putting the values and simplifying we get\n", + "\t\t\t# 7.7*T_2 + 0.02297*10**(-2)*T_2**(2) + 0.084*10**(-5)*T_2**(3) - 0.214675*10**(-9)*T_2**(4) - 6907.106 = 0\n", + "\n", + "def f1(T_2_prime): \n", + "\t return a*(T_2_prime-T_1)+(b/2)*(T_2_prime**(2)-T_1**(2))+(c/3)*(T_2_prime**(3)-T_1**(3))+(d/4)*(T_2_prime**(4)-T_1**(4))-(delta_H_a/4.184)\n", + "T_2_prime = fsolve(f1,100)\n", + "\n", + "print \" 2).The exit temperature of steam is %f K\"%(T_2_prime);\n", + "print \" The required work is %f J/mol\"%(W_a);\n", + "\n", + "# Answers are vary because of rounding error. Calculations are correct. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The exit temperature of steam is 760.037501 K\n", + " The required work is -10499.128839 J/mol\n", + " 2).The exit temperature of steam is 828.044888 K\n", + " The required work is -13123.911049 J/mol\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.11 Page Number : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n", + "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 8;\t\t\t#[MPa] - Final pressure\n", + "Y = 1.4;\t\t\t# Index of expansion of gas\n", + "\n", + "\t\t\t# At state 1 (1 MPa and 200 C) from steam table as reported in the book\n", + "H_1 = 2827.9;\t\t\t#[kJ/kg]\n", + "S_1 = 6.694;\t\t\t#[kJ/kg]\n", + "\t\t\t# At state 2 (8 MPa)\n", + "S_2 = S_1;\t\t\t# Isentropic process\n", + "\t\t\t# From steam table at 8 MPa and 450 C\n", + "S_21 = 6.5551;\t\t\t#[kJ/kg-K]\n", + "\t\t\t# From steam table at 8 MPa and 500 C\n", + "S_22 = 6.7240;\t\t\t#[kJ/kg-K]\n", + "\t\t\t# Therefore temperature at which entropy of steam is 6.694 kJ/kg-K is given by\n", + "T_2 = 450 + (500-450)/(S_22-S_21)*(S_2-S_21);\t\t\t#[C]\n", + "T_2 = T_2 + 273.15;\t\t\t#[K]\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Enthalpy of steam at 8 MPa and 450 C from steam table as reported in the book \n", + "H_21 = 3272.0;\t\t\t#[kJ/kg]\n", + "\t\t\t# And at 8 MPA and 500 C\n", + "H_22 = 3398.3;\t\t\t#[kJ/kg]\n", + "\t\t\t# Therefore enthalpy of steam at 8 MPa and T_2 \n", + "H_2 = H_21 + ((H_22-H_21)/(500-450))*((T_2-273.15) - 450); \n", + "\t\t\t# Work done is given by \n", + "\t\t\t# W = - delta_H_s\n", + "W = - (H_2 - H_1);\t\t\t#[J/g]\n", + "W = W*18.015;\t\t\t#[J/mol]\n", + "delta_H_s = - W;\n", + "\n", + "print \" 1).The exit temperature of steam is %f K\"%(T_2);\n", + "print \" The required work is %f J/mol\"%(W);\n", + "\n", + "\t\t\t#(2)\n", + "eff = 0.8;\t\t\t# Adiabatic efficiency\n", + "\t\t\t# delta_H_s/delta_H_a = 0.8\n", + "delta_H_a = delta_H_s/eff;\t\t\t#[J/mol] - Actual enthalpy change\n", + "\t\t\t# Therefore actual work done \n", + "W_a = - delta_H_a;\t\t\t#[J/mol]\n", + "\t\t\t# Enthalpy at actual exit conditions is \n", + "H_2_a = H_1 + delta_H_a/18.015;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# Enthalpy of steam at 8 MPa and 500 C from steam table as reported in the book \n", + "H_21_a = 3398.3;\t\t\t#[kJ/kg]\n", + "\t\t\t# And at 8 MPA and 550 C\n", + "H_22_a = 3521.0;\t\t\t#[kJ/kg]\n", + "\t\t\t# Therefore temperature at H_22_a is given by\n", + "T_2_a = 500 + ((550-500)*(H_2_a - H_21_a))/(H_22_a - H_21_a);\t\t\t#[C]\n", + "T_2_a = T_2_a + 273.15;\t\t\t#[K]\n", + "\n", + "print \" 2).The exit temperature of steam is %f K\"%(T_2_a);\n", + "print \" The required work is %f J/mol\"%(W_a);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The exit temperature of steam is 764.269005 K\n", + " The required work is -9871.618433 J/mol\n", + " 2).The exit temperature of steam is 819.832257 K\n", + " The required work is -12339.523042 J/mol\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.12 Page Number : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 140.;\t\t\t#[kPa] - Initial pressure\n", + "T_1 = 20. + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 560.;\t\t\t#[kPa] - Final pressure\n", + "eff = 0.75;\t\t\t# Compressor efficiency\n", + "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n", + "\t\t\t# Cp_0 = 4.750 + 1.200*10**(-2)*T + 0.3030*10**(-5)*T**(2) - 2.630*10**(-9)*T**(3), here T is in K and Cp_0 is in cal/mol-K\n", + "a = 7.7;\n", + "b = 0.04594*10**(-2);\n", + "c = 0.2521*10**(-5);\n", + "d = - 0.8587*10**(-9);\n", + "\n", + "# Calculations and Results\n", + "# At 20 C,as reported in the book\n", + "Cp_0 = 8.46;\t\t\t#[cal/mol-K] - Specific heat capacity at constant pressure\n", + "Cv_0 = Cp_0 - R;\t\t\t#[cal/mol-K] - Specific heat capacity at constant volume\n", + "Y = Cp_0/Cv_0;\t\t\t# Index of expansion\n", + "\n", + "\t\t\t# Assuming 100 % efficiency,for reversible and adiabatic process the final temperature is given by\n", + "\t\t\t# P*V**(Y) = constant or, P*((R*T)/P)**(Y) = constant\n", + "T_2 = ((P_1/P_2)**((1-Y)/Y))*T_1;\t\t\t#[K]\n", + "\n", + "\t\t\t# Since at final temperature the value of heat capacity ratio would have changed \n", + "\t\t\t# So let us determine Y at mean temperature and then calculating final temperature\n", + "T_mean = (T_1 + T_2)/2;\t\t\t#[K]\n", + "\n", + "\t\t\t# At T_mean,as reported in the book\n", + "Cp_0_new = 9.153;\t\t\t#[cal/mol-K]\n", + "Cv_0_new = Cp_0_new - R;\t\t\t#[cal/mol-K]\n", + "Y_new = Cp_0_new/Cv_0_new;\n", + "T_2_new = T_1*((P_1/P_2)**((1-Y_new)/Y_new));\t\t\t#[K]\n", + "\n", + "\t\t\t# The enthalpy change is given by \n", + "\n", + "def f23(T): \n", + "\t return 4.750+1.200*10**(-2)*T+0.3030*10**(-5)*T**(2)-2.630*10**(-9)*T**(3)\n", + "\n", + "delta_H = quad(f23,T_1,T_2_new)[0]\n", + "\n", + "\n", + "\t\t\t#For adiabatic process\n", + "W = - delta_H;\t\t\t#[cal/mol]\n", + "\t\t\t# Now actual work done on the system is given by \n", + "W_a = W/eff;\t\t\t#[cal/mol]\n", + "\n", + "\n", + "\t\t\t# Therefore actual change in enthalpy is - W_a, or\n", + "\t\t\t# - W_a = 4.750*(T_2-T_1) + (1.2*10**(-2)/2)*(T_2**(2)-T_1**(2)) + (0.3030*10**(-5)/3)*(T_2**(3)-T_1**(3)) - (2.63*10**(-9)/4)*(T_2***(4)-T_1**(4));\n", + "\t\t\t# Solving for T_2 in the above equation\n", + "def f1(T_2_prime): \n", + "\t return 4.750*(T_2_prime-T_1)+((1.2*10**(-2))/2)*(T_2_prime**(2)-T_1**(2))+((0.3030*10**(-5))/3)*(T_2_prime**(3)-T_1**(3))-((2.63*10**(-9))/4)*(T_2_prime**(4)-T_1**(4))+W_a\n", + "T_2_prime=fsolve(f1,100)\n", + "\n", + "print \" The required work is %f cal/mol\"%(W_a);\n", + "print \" The discharge temperature of methane is %f K\"%(T_2_prime);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The required work is -1254.158148 cal/mol\n", + " The discharge temperature of methane is 427.374758 K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.13 Page Number : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 10;\t\t\t#[bar] - Initial pressure\n", + "T_1 = 500 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 2;\t\t\t#[psia] - Final pressure\n", + "P_2 = P_2/14.5;\t\t\t#[bar]\n", + "P_2 = P_2*10**(2);\t\t\t#[kPa]\n", + "m = 1.8;\t\t\t#[kg/s] - Mass flux\n", + "eff = 0.8;\t\t\t# Efficiency\n", + "\n", + "\t\t\t# At state 1, from steam table\n", + "H_1 = 3478.5;\t\t\t#[kJ/kg]\n", + "S_1 = 7.7622;\t\t\t#[kJ/kg-K]\n", + "S_2 = S_1;\t\t\t# Adiabatic process\n", + "\n", + "\t\t\t# From saturated steam table at 10 kPa\n", + "S_liq_1 = 0.6493;\t\t\t#[kJ/kg-K]\n", + "S_vap_1 = 8.1502;\t\t\t#[kJ/kg-K]\n", + "\t\t\t# From saturated steam table at 15 kPa\n", + "S_liq_2 = 0.7549;\t\t\t#[kJ/kg-K]\n", + "S_vap_2 = 8.0085;\t\t\t#[kJ/kg-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# Threfore at P_2 \n", + "S_liq = S_liq_1 + ((S_liq_2-S_liq_1)/(15-10))*(P_2-10);\n", + "S_vap = S_vap_1 + ((S_vap_2-S_vap_1)/(15-10))*(P_2-10);\n", + "\n", + "\t\t\t# The dryness fraction at exit state is\n", + "x_2 = (S_1-S_liq)/(S_vap-S_liq);\n", + "\t\t\t# The enthalpy at exit to be determined. At 10 kPa\n", + "H_liq_1 = 191.83;\t\t\t#[kJ/kg]\n", + "H_vap_1 = 2584.7;\t\t\t#[kJ/kg]\n", + "\t\t\t# At 15 kPa\n", + "H_liq_2 = 225.94;\t\t\t#[kJ/kg]\n", + "H_vap_2 = 2599.1;\t\t\t#[kJ/kg]\n", + "\t\t\t# Therfore at P_2\n", + "H_liq = H_liq_1 + ((H_liq_2-H_liq_1)/(15-10))*(P_2-10);\n", + "H_vap = H_vap_1 + ((H_vap_2-H_vap_1)/(15-10))*(P_2-10);\n", + "\n", + "\t\t\t# Enthalpy at state 2\n", + "H_2_s = H_liq*(1-x_2) + x_2*H_vap;\t\t\t#[kJ/kg]\n", + "W = m*(H_1 - H_2_s);\t\t\t#[kW]\n", + "\n", + "print \" 1).The power output is %f kW\"%(W);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# If the process is 80 % efficient the enthalpy change is\n", + "\t\t\t# H_1 - H_2_a = eff*(H_1 - H_2_s)\n", + "H_2_a = H_1 - (0.8*(H_1 - H_2_s));\n", + "\n", + "\t\t\t# Now under these conditions temperature and entropy have to be determined. From superheated steam tables,as reported in the book\n", + "\t\t\t# At 10 kPa and 100 C\n", + "H_2_1 = 2687.5;\t\t\t#[kJ/kg]\n", + "S_2_1 = 8.4479;\t\t\t#[kJ/kg-k]\n", + "\t\t\t# At 10 kPa and 150 C\n", + "H_2_2 = 2783.0;\t\t\t#[kJ/kg]\n", + "S_2_2 = 8.6882;\t\t\t#[kJ/kg-k]\n", + "\t\t\t# At 50 kPa and 100 C\n", + "H_3_1 = 2682.5;\t\t\t#[kJ/kg]\n", + "S_3_1 = 7.6947;\t\t\t#[kJ/kg-k]\n", + "\t\t\t# At 50 kPa and 150 C\n", + "H_4_1 = 2780.1;\t\t\t#[kJ/kg]\n", + "S_4_1 = 7.9401;\t\t\t#[kJ/kg-k]\n", + "\t\t\t# Therefore at P_2 and 100 C\n", + "H_prime_1 = H_2_1 + ((H_3_1-H_2_1)/(50-10))*(P_2-10);\t\t\t#[kJ/kg]\n", + "S_prime_1 = S_2_1 + ((S_3_1-S_2_1)/(50-10))*(P_2-10);\t\t\t#[kJ/kg-K]\n", + "\t\t\t# Therefore at P_2 and 150 C\n", + "H_prime_2 = H_2_2 + ((H_4_1-H_2_2)/(50-10))*(P_2-10);\t\t\t#[kJ/kg]\n", + "S_prime_2 = S_2_2 + ((S_4_1-S_2_2)/(50-10))*(P_2-10);\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t# Enthalpy at exit is H_2_a. So at this condition temperature can be nom be determined\n", + "T_exit = ((H_2_a - H_prime_1)/(H_prime_2 - H_prime_1))/(150-100) + 100;\t\t\t#[C]\n", + "\t\t\t# The entropy at exit is\n", + "S_exit = ((H_2_a - H_prime_1)/(H_prime_2 - H_prime_1))/(S_prime_2 - S_prime_1) + S_prime_1;\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" 2).The entropy at exit is %f kJ/kg-K\"%(S_exit);\n", + "print \" The temperature of the exit state is %f C\"%(T_exit);\n", + "\n", + "print \" The irreversibility is advatageous because the exit steam is superheated and therefore\";\n", + "print \" the blades of the turbine are not eroded by water droplets which get formed when the process is isentropic\";\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The power output is 1753.346828 kW\n", + " 2).The entropy at exit is 8.906311 kJ/kg-K\n", + " The temperature of the exit state is 100.002552 C\n", + " The irreversibility is advatageous because the exit steam is superheated and therefore\n", + " the blades of the turbine are not eroded by water droplets which get formed when the process is isentropic\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.14 Page Number : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 6;\t\t\t#[MPa] - Initial pressure\n", + "T_1 = 500 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 10;\t\t\t#[kPa] - Final pressure\n", + "out_qlty = 0.9;\t\t\t# Output quality\n", + "\n", + "\t\t\t# At 6 MPa and 500 C, from steam table as reported in the book\n", + "H_1 = 3422.2;\t\t\t#[kJ/kg]\n", + "S_1 = 6.8803;\t\t\t#[kJ/kg-K]\n", + "S_2 = S_1;\t\t\t# Adiabatic reversible conditions\n", + "\t\t\t# At 10 kPa saturated\n", + "H_liq = 191.83;\t\t\t#[kJ/kg]\n", + "H_vap = 2584.7;\t\t\t#[kJ/kg]\n", + "S_liq = 0.6493;\t\t\t#[kJ/kg-K]\n", + "S_vap = 8.1502;\t\t\t#[kJ/kg-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The dryness fraction is given by \n", + "x = (S_1-S_liq)/(S_vap-S_liq);\n", + "\n", + "\t\t\t# Now the exit enthalpy is given by\n", + "H_2 = H_liq*(1-x) + x*H_vap;\t\t\t#[kJ/kg]\n", + "W = - (H_2 - H_1);\t\t\t#[kJ/kg] - Under isentropic conditions\n", + "\n", + "\t\t\t# We know that, delta_S = q/T_b + S_gen\n", + "\t\t\t# Since delta_S = 0, therefore under isentropic conditions\n", + "S_gen = 0;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t# Now for output quality 0.9\n", + "H_2_a = H_liq*(1-out_qlty) + out_qlty*H_vap;\t\t\t#[kJ/kg]\n", + "S_2_a = S_liq*(1-out_qlty) + out_qlty*S_vap;\t\t\t#[kJ/kg]\n", + "W_a = - (H_2_a - H_1);\t\t\t#[kJ/kg]\n", + "delta_S_a = S_2_a - S_1;\t\t\t#[kJ/kg-k]\n", + "\t\t\t# Again, delta_S = q/T_b + S_gen\n", + "\t\t\t# Since q = 0, therefore under isentropic conditions\n", + "S_gen_a = delta_S_a;\t\t\t#[kJ/kg-K\n", + "\t\t\t# Now efficiency is given by eff = delta_H_a/delta_H_s\n", + "eff = W_a/W;\n", + "\n", + "print \" For output quality = 0.9\";\n", + "print \" The work output per unit mass is %f kJ/kg\"%(W_a);\n", + "print \" The entropy generation is given by S_gen = %f kJ/kg-K\"%(S_gen_a);\n", + "print \" The efficiency with respect to reversible adiabatic case is given by eff = %f\"%(eff);\n", + "\n", + "\t\t\t# Now for output quality 1\n", + "out_qlty_1 = 1;\n", + "H_2_a_1 = H_liq*(1-out_qlty_1) + out_qlty_1*H_vap;\t\t\t#[kJ/kg]\n", + "S_2_a_1 = S_liq*(1-out_qlty_1) + out_qlty_1*S_vap;\t\t\t#[kJ/kg]\n", + "W_a_1 = - (H_2_a_1 - H_1);\t\t\t#[kJ/kg]\n", + "delta_S_a_1 = S_2_a_1 - S_1;\t\t\t#[kJ/kg-k]\n", + "\t\t\t# Again, delta_S = q/T_b + S_gen\n", + "\t\t\t# Since q = 0, therefore under isentropic conditions\n", + "S_gen_a_1 = delta_S_a_1;\t\t\t#[kJ/kg-K\n", + "\t\t\t# Now efficiency is given by eff = delta_H_a/delta_H_s\n", + "eff_1 = W_a_1/W;\n", + "\n", + "print \" For output quality = 1.0\";\n", + "print \" The work output per unit mass is %f kJ/kg\"%(W_a_1);\n", + "print \" The entropy generation is given by S_gen = %f kJ/kg-K\"%(S_gen_a_1);\n", + "print \" The efficiency with respect to reversible adiabatic case is given by eff = %f\"%(eff_1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " For output quality = 0.9\n", + " The work output per unit mass is 1076.787000 kJ/kg\n", + " The entropy generation is given by S_gen = 0.519810 kJ/kg-K\n", + " The efficiency with respect to reversible adiabatic case is given by eff = 0.866551\n", + " For output quality = 1.0\n", + " The work output per unit mass is 837.500000 kJ/kg\n", + " The entropy generation is given by S_gen = 1.269900 kJ/kg-K\n", + " The efficiency with respect to reversible adiabatic case is given by eff = 0.673983\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.15 Page Number : 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 3.;\t\t\t#[bar] - Initial pressure\n", + "T_1 = 150. + 273.15;\t\t\t#[K] - Initial temperature\n", + "Vel_1 = 90.;\t\t\t#[m/s] - Initial velocity\n", + "P_2 = 1.;\t\t\t#[bar] - Final pressure\n", + "eff = 0.95;\t\t\t# Adiabatic effciciency of the nozzle\n", + "R = 8.314;\t\t\t#[J/mol*-] - Universal gas constant\n", + "\n", + "\t\t\t# At 3 bar and 150 C, from steam table\n", + "S_1 = 7.0778;\t\t\t#[kJ/kg-K]\n", + "H_1 = 2761.0;\t\t\t#[kJ/kg]\n", + "S_2 = S_1;\t\t\t# \n", + "\n", + "\t\t\t# At 1 bar saturated\n", + "S_liq = 1.3026;\t\t\t#[kJ/kg-K]\n", + "S_vap = 7.3594;\t\t\t#[kJ/kg-K]\n", + "H_liq = 417.46;\t\t\t#[kJ/kg]\n", + "H_vap = 2675.5;\t\t\t#[kJ/kg]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The dryness factor of exit steam can be determined as\n", + "x = (S_1-S_liq)/(S_vap-S_liq);\n", + "\t\t\t# Enthalpy of exit steam is given by \n", + "H_2 = H_liq*(1-x) + x*H_vap;\t\t\t#[kJ/kg]\n", + "delta_H_s = H_2 - H_1;\t\t\t#[kJ/kg] - Enthalpy change\n", + "delta_H_a = eff*delta_H_s;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# Assuming no heat exchange with surroundings and since no work is done\n", + "\t\t\t# delta_H + (delta_V**(2))/2 = 0\n", + "delta_Vel_square = 2*(-delta_H_a)*1000;\t\t\t#[m**(2)/s**(2)]\n", + "Vel_2 = (delta_Vel_square + Vel_1**(2))**(1./2);\t\t\t#[m/s]\n", + "\n", + "print \" 1).The final velocity when fluid is steam) is %f m/s\"%(Vel_2);\n", + "\n", + "\t\t\t# (2)\n", + "Y = 1.4;\t\t\t# Index of expansion\n", + "Cp_0 = (Y*R)/(Y-1);\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n", + "\n", + "\t\t\t# P_1**(1-Y)*T_1**(Y) = P_2**(1-Y)*T_2**(Y)\n", + "T_2 = T_1*(P_1/P_2)**((1-Y)/Y);\t\t\t#[K]\n", + "delta_H_s_2 = Cp_0*(T_2 - T_1);\t\t\t#[J/mol]\n", + "delta_H_a_2 = eff*delta_H_s_2;\t\t\t#[J/mol]\n", + "delta_H_a_2 = (delta_H_a_2*1000)/28.84;\t\t\t#[J/kg]\n", + "\n", + "delta_Vel_square_2 = 2*(-delta_H_a_2);\t\t\t#[m**(2)/s**(2)]\n", + "Vel_2_2 = (delta_Vel_square_2 + Vel_1**(2))**(1./2);\t\t\t#[m/s]\n", + "\n", + "print \" 2).The final velocity when fluid is air which behaves as an ideal gas) is %f m/s\"%(Vel_2_2);\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The final velocity when fluid is steam) is 608.291583 m/s\n", + " 2).The final velocity when fluid is air which behaves as an ideal gas) is 476.065890 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.16 Page Number : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1 = 300.;\t\t\t#[kPa] - Initial pressure\n", + "T_1 = 450.;\t\t\t#[K] - Initial temperature\n", + "Vel_1 = 90.;\t\t\t#[m/s] - Initial velocity\n", + "P_2 = 180.;\t\t\t#[kPa] - Final pressure\n", + "eff = 0.95;\t\t\t# Adiabatic effciciency of the nozzle\n", + "R = 8.314;\t\t\t#[J/mol*-] - Universal gas constant\n", + "Cp = 5.19;\t\t\t#[kJ/kg-K] - Specific heat capacity at constant pressure\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "\n", + "\n", + "Mol_wt_He = 4;\t\t\t#[g/mol] - Molecular weight of helium\n", + "R_He = R/Mol_wt_He;\t\t\t# 'R' for helium\n", + "Y = Cp/(Cp - R_He);\n", + "\n", + "\t\t\t# Now temperature at exit to be determined\n", + "T_2s = T_1*(P_1/P_2)**((1-Y)/Y);\t\t\t#[K]\n", + "delta_H_2s = Cp*(T_2s - T_1);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# Since no work is done and heat exchange is zero,from first law we get\n", + "\t\t\t# delta_H + delta_Vel**(2)/2 = 0\n", + "delta_Vel_square = 2*(-delta_H_2s)*1000;\t\t\t#[m**(2)/s**(2)]\n", + "Vel_2 = (delta_Vel_square)**(1./2);\t\t\t#[m/s] - ( as Vel_1 << Vel_2)\n", + "\n", + "print \" a).The maximum exit velocity is %f m/s\"%(Vel_2);\n", + "\n", + "\t\t\t#(b)\n", + "T_2a = 373;\t\t\t#[K] - Measured temperature of helium\n", + "delta_H_a = Cp*(T_2a - T_1);\t\t\t#[kJ/kg]\n", + "delta_Vel_square_a = 2*(-delta_H_a)*1000;\t\t\t#[m**(2)/s**(2)]\n", + "Vel_2a = (delta_Vel_square_a)**(1./2);\t\t\t#[m/s] - ( as Vel_1 << Vel_2a)\n", + "\n", + "print \" b).The actual exit velocity is %f m/s\"%(Vel_2a);\n", + "\n", + "\t\t\t#(c)\n", + "delta_S_sys = Cp*math.log(T_2a/T_1) - R_He*math.log(P_2/P_1);\n", + "\t\t\t# we know that delta_S_sys = q/T_b + S_gen and since q = 0, therfore\n", + "S_gen = delta_S_sys;\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" c).The increasse in entropy per unit mass is %f kJ/kg-K\"%(S_gen);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The maximum exit velocity is 929.607346 m/s\n", + " b).The actual exit velocity is 894.013423 m/s\n", + " c).The increasse in entropy per unit mass is 0.087748 kJ/kg-K\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.17 Page Number : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 1;\t\t\t#[bar] - Initial pressure\n", + "T_1 = 150 + 273.15;\t\t\t#[K] - Initial temperature\n", + "V_2 = 0.28;\t\t\t#[m**(3)/kg] - Final specific volume\n", + "T_2 = T_1;\t\t\t#[K] - Isothermal process\n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "\n", + "\t\t\t# At 1 bar and 150 C, from steam table\n", + "S_1 = 7.6134;\t\t\t#[kJ/kg-K]\n", + "H_1 = 2776.4;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# At 150 C saturated\n", + "V_liq = 0.001091;\t\t\t#[m**(3)/kg]\n", + "V_vap = 0.3928;\t\t\t#[m**(3)/kg]\n", + "H_liq = 632.2;\t\t\t#[kJ/kg]\n", + "H_vap = 2746.5;\t\t\t#[kJ/kg]\n", + "S_liq = 1.8418;\t\t\t#[kJ/kg-K]\n", + "S_vap = 6.8379;\t\t\t#[kJ/kg-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The dryness factor of exit steam can be determined as\n", + "x = (V_2 - V_liq)/(V_vap - V_liq);\n", + "S_2 = S_liq*(1-x) + x*S_vap;\t\t\t#[kJ/kg-K] -Entropy \n", + "H_2 = H_liq*(1-x) + x*H_vap;\t\t\t#[kJ/kg] -Enthalpy \n", + "delta_H = H_2 - H_1;\t\t\t#[kJ/kg] - Enthalpy change\n", + "delta_S = S_2 - S_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# Since the compression is reversible\n", + "q = T_1*delta_S;\t\t\t#[kJ/kg] - Heat transfer\n", + "\t\t\t# From first law q - W = delta_H\n", + "W = q - delta_H;\t\t\t#[kJ/kg]\n", + "\n", + "print \" 1).The amount of heat transfer when fluid is steam) is %f kJ/kg\"%(q)\n", + "print \" The amount of work transfer when fluid is steam) is %f kJ/kg\"%(W)\n", + "\n", + "\t\t\t#(2)\n", + "V_2 = V_2*(28.84/1000);\t\t\t#[m**(3)/mol] - Molar volume at exit\n", + "\t\t\t# Pressure at exit is given by \n", + "P_2 = ((R*T_2)/V_2);\t\t\t#[N/m**(2)]\n", + "P_2 = P_2*10**(-5);\t\t\t#[bar]\n", + "\n", + "\t\t\t# Entropy change is given by, delta_S_2 = Cp*math.log(T_2/T_1) - R*math.log(P_2/P_1), but since T_1 = T_2, therfore\n", + "delta_S_2 = - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n", + "\n", + "q_2 = T_1*delta_S_2;\t\t\t#[J/mol] - Heat change\n", + "q_2 = q_2/28.84;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# Enthalpy change is given by, delta_H_2 = Cp*(T_2 - T_1) = 0 (as T_1 = T_2)\n", + "delta_H_2 = 0;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# From first law q - W = delta_H, therefore\n", + "W_2 = q_2 - delta_H_2;\t\t\t#[kJ/kg]\n", + "\n", + "print \" 2).The amount of heat transfer when fluid is ideal gas) is %f kJ/kg\"%(q_2)\n", + "print \" The amount of work transfer when fluid is ideal gas) is %f kJ/kg\"%(W_2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The amount of heat transfer when fluid is steam) is -936.947741 kJ/kg\n", + " The amount of work transfer when fluid is steam) is -298.195149 kJ/kg\n", + " 2).The amount of heat transfer when fluid is ideal gas) is -179.526401 kJ/kg\n", + " The amount of work transfer when fluid is ideal gas) is -179.526401 kJ/kg\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.18 Page Number : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 7*10**(5);\t\t\t#[Pa] - Initial pressure\n", + "T_1 = 95 + 273.15;\t\t\t#[K] - Initial temperature\n", + "P_2 = 3.5*10**(5);\t\t\t#[Pa] - Final pressure\n", + "dia = 15*10**(-2);\t\t\t#[m] - Diameter of pipe\n", + "m = 2;\t\t\t#[kg/s] - Mass flow rate\n", + "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n", + "Y = 1.4;\t\t\t# Index of expansion\n", + "Cp_0 = (R*Y)/(Y-1);\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n", + "Cp_0 = (Cp_0/28.84)*1000;\t\t\t#[J/kg-K]\n", + "rho_1 = 6.6;\t\t\t#[kg/m**(3)] - Density\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# velocity before throttling is to be determined m = rho*Vol*Area\n", + "V_1 = (R*T_1)/P_1;\t\t\t#[m**(3)/mol] - Specific volume\n", + "V_1 = (V_1/28.84)*1000;\t\t\t#[m**(3)/kg]\n", + "Vel_1 = m/(rho_1*3.14*(dia/2)**(2));\t\t\t#[m/s] - Velocity before throttling\n", + "\n", + "\t\t\t# Let the temperature after throttling be T_2, then\n", + "\t\t\t# Vel_2 = m/(rho_2*Area) = (m*V_2)/(3.14*(dia/2)**(2))\n", + "\t\t\t# From first law, since q = W = 0, we get\n", + "\t\t\t# delta_H + (delta_V**(2))/2 = 0\n", + "\t\t\t#Cp_0*(T_2 - T_1) + (((m*((((R*T_2)/P_2)/28.84)*1000))/(3.14*(dia/2)**(2)))**(2) - (Vel_1)**(2))/2 = 0\n", + "\t\t\t# Solving the above equation for T_2, we get\n", + "def f1(T_2): \n", + "\t return Cp_0*(T_2 - T_1) + (((m*((((R*T_2)/P_2)/28.84)*1000))/(3.14*(dia/2)**(2)))**(2) - (Vel_1)**(2))/2\n", + "T_2 =fsolve(f1,100)\n", + "\t\t\t# Therefore velocity of air downstream of restriction is given by \n", + "Vel_2 = ((m*((((R*T_2)/P_2)/28.84)*1000))/(3.14*(dia/2)**(2)));\t\t\t#[m/s]\n", + "\n", + "print \" The velocity of air downstream of restriction is %f m/s\"%(Vel_2);\n", + "\n", + "delta_T = (T_2 - T_1);\n", + "\t\t\t# Since temperature difference (delta_T) is very small, therefore enthalpy change is also very small\n", + "\n", + "\t\t\t# Entropy change is given by, delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), but since T_1 and T_2 are almost equal\n", + "delta_S = - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n", + "\n", + "print \" The change in entropy is %f kJ/mol-k\"%(delta_S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The velocity of air downstream of restriction is 34.295216 m/s\n", + " The change in entropy is 5.762826 kJ/mol-k\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb new file mode 100755 index 00000000..6f1963f8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb @@ -0,0 +1,743 @@ +{ + "metadata": { + "name": "ch5_2", + "signature": "sha256:beb354ab1f11a4413c580f54f984be6db9b7dd2c39bed82bc1f4874533d75759" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Exergy" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.1 Page Number : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "T_1 = 500+273.15;\t\t\t#[C] - Condensation temperature\n", + "T_2 = 250+273.15;\t\t\t#[C] - Temperature at which vaporization takes place.\n", + "\n", + "T_3 = 25+273.15;\t\t\t#[C] - Ambient atmospheric temperature.\n", + "\n", + "Q = 1;\t\t\t\n", + "\n", + "# Calculations\n", + "\t\t\t#The exergy content of the vapour at 500 C,\n", + "Ex_T_1 = Q*(1-(T_3/T_1));\n", + "Ex_T_2 = Q*(1-(T_3/T_2));\n", + "\t\t\t#Therefore,loss in exergy is given by\n", + "Ex_loss = Ex_T_1 - Ex_T_2;\n", + "\t\t\t#Fraction of exergy lost due to irreversible process is,\n", + "Ex_fraction =(Ex_loss/Ex_T_1);\n", + "\n", + "# Results\n", + "print \" The fraction of exergy lost due to irreversible process is %f\"%(Ex_fraction);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fraction of exergy lost due to irreversible process is 0.299954\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2 Page Number : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T_1 = 300.;\t\t\t#[K] - Initial temperature.\n", + "P_1 = 100.;\t\t\t#[kPa] - Initial pressure.\n", + "T_2 = 500.;\t\t\t#[K] - Final temperature.\n", + "T_0 = 300.;\t\t\t#[K] - Environment temperature.\n", + "P_0 = 1.;\t\t\t#[atm] - Environment pressure.\n", + "R = 8.314;\t\t\t#[J/mol*K]\n", + "\t\t\t#(Cp_0/R)= 3.626\n", + "Cp_0 = 3.626*R;\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1).\n", + "\t\t\t#The availability change is given by, (phi_1 - phi_2) = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2)\n", + "\t\t\t#Let us determine the change in internal energy\n", + "\n", + "\t\t\t#For ideal gas Cp_0 - Cv_0 = R, and therefore\n", + "Cv_0 = ((Cp_0/R)- 1)*R;\t\t\t#[J/mol-K] - Heat capacity at constant volume\n", + "delta_U = Cv_0*(T_2-T_1);\t\t\t#[J/mol]\n", + "\t\t\t#delta_U = -w (from energy balance). Therefore, U1-U2 = -delta_U.\n", + "\t\t\t#The entropy change of ideal gas is given by\n", + "\t\t\t#delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), but,(P1*V1/T1) = (P1*V1/T1) and therefore (P2/P1) = (T2/T1)\n", + "delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(T_2/T_1);\t\t\t#[J/mol-K]\n", + "\t\t\t#The exergy change is given by, (phi_1 - phi_2) = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2)\n", + "\t\t\t#(V_1 - V_2) = 0, because the tank is rigid and so the volume is constant\n", + "delta_phi = (-delta_U) - T_0*(-delta_S);\t\t\t#[J/mol]\n", + "print \" 1).The change in exergy is %f J/mol\"%(delta_phi);\n", + "\n", + "\t\t\t#(2).\n", + "\t\t\t#Entropy change of the system is given by, delta_S_sys = q/T_b + S_gen\n", + "\t\t\t#Since the system is adiabatic therefore, delta_S_sys = S_gen\n", + "S_gen = delta_S;\n", + "\t\t\t#Irreversibility is given by\n", + "i = T_0*S_gen;\t\t\t#[J/mol]\n", + "print \" 2).The value of irreversibility is %f J/mol\"%(i);\n", + "\t\t\t#Irreversibility can also be determined using\n", + "\t\t\t#i = (W_rev_use - W_use)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The change in exergy is -1020.722863 J/mol\n", + " 2).The value of irreversibility is 3345.789937 J/mol\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.3 Page Number : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "# Variables\n", + "P_1 = 15.;\t\t\t#[bar] - Initial pressure\n", + "P_1 = P_1*10**(5);\t\t\t#[Pa]\n", + "T_1 = 300.+273.15;\t\t\t#[K] - Initial temperature\n", + "T_0 = 298.15;\t\t\t#[K]\n", + "T_R = 1200.;\t\t\t#[K] - Reservoir temerature.\n", + "P_0 = 1.;\t\t\t#[bar]\n", + "P_0 = P_0*10**(5);\t\t\t#[Pa]\n", + "n = 1.;\t\t\t#[mol] - No of moles\n", + "R = 8.314;\t\t\t#[J/mol*K]\n", + "Y = 1.4;\t\t\t# - Ratio of heat capacities.\n", + "Cv_0 = R/(Y-1);\t\t\t#[J/mol-K] - Heat capacity at constant volume\n", + "Cp_0 = Cv_0 + R;\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t#V_2 = 2*V_1 and since pressure is constant,we get (V_1/T_1) = (2*V_1/T_1), or, T_2 = 2*T_1.\n", + "T_2 = 2*T_1;\t\t\t#[K]\n", + "W = P_1*(((R*T_2)/P_1)-((R*T_1)/P_1));\t\t\t#[J/mol] - Actual work done\n", + "delta_U = Cv_0*(T_2-T_1);\t\t\t#[J/mol] - Change in internal energy.\n", + "q = W + delta_U;\t\t\t#[J/mol] - Heat change\n", + "\t\t\t#Now the availability change is given by, (phi_1 - phi_2) = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2) + q*(1-(T_0/T_R))\n", + "\t\t\t#delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), and P_1 = P_2, Therefore\n", + "delta_S = Cp_0*math.log(T_2/T_1);\t\t\t#[J/mol-K] - Entropy change.\n", + "\t\t\t#Substituting expressions for delta_phi calculation. Decrease in availability is given by,\n", + "delta_phi = (-delta_U) + P_0*(((R*T_1)/P_1)-((R*T_2)/P_1)) - T_0*(-delta_S) + q*(1-(T_0/T_R));\t\t\t#[J/mol]\n", + "\t\t\t#Actual work done is given by, W = P_1*(V2-V1)\n", + "\t\t\t#Work done to print lace the atmosphere is given by, W = P_0*(V_2-V_1)\n", + "\t\t\t#Therefore, W_use = (P_1*(V2-V1) - P_0*(V2-V1))\n", + "W_use = (P_1-P_0)*(((R*T_2)/P_1)-((R*T_1)/P_1));\t\t\t#[J/mol] - useful work done\n", + "W_rev_use = delta_phi;\t\t\t# reversible useful work done\n", + "\t\t\t#Irreversibility is given by,\n", + "i = W_rev_use - W_use;\t\t\t#[J/mol]\n", + "print \" a).When the system is confined at constant pressure by a piston and is heated until it's volume is doubled \\n the ireversibility value is %f J/mol\"%(i);\n", + "\n", + "\t\t\t#The irreversibility can also be calculated using \n", + "\t\t\t# i = T_0*S_gen\n", + "\t\t\t#S_gen = delta_S - (q/T_R)\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t#V2 = 2*V_1 and therefore T_2 = 2*T_1, as P_2 = P_1\n", + "\t\t\t#Actual work done is same as before\n", + "\t\t\t#Let work done on stirrer be W_stir. Thus net work done by the system is W - W_stir.Fron energy balance we get,\n", + "W_stir = W + delta_U;\n", + "\t\t\t#Initially the exergy is due to that of the system at state 1 and stirrer work,'W_stir' and finally we have the exergy due to system at state 2,the stirrer work is spent,thus availability is given by\n", + "delta_phi_b = (-delta_U) + P_0*(((R*T_1)/P_1)-((R*T_2)/P_1)) - T_0*(-delta_S) + W_stir;\t\t\t#[J/mol]\n", + "W_rev_use_b = delta_phi_b;\t\t\t# reversible useful work done\n", + "W_use_b = W_use;\t\t\t# useful work done\n", + "\t\t\t#Now the irreversibility is given by,\n", + "i_b = W_rev_use_b - W_use_b;\t\t\t#[J/mol]\n", + "print \" b).When the system is confined at constant pressure by a piston and is stirred until it's volume is doubled \\n the ireversibility value is %f J/mol\"%(i_b);\n", + "\n", + "\t\t\t#The irreversibility can also be calculated using \n", + "\t\t\t# i_b = T_0*S_gen\n", + "\t\t\t#S_gen = delta_S - (q/T_R) and here, q = 0\n", + "\n", + "\t\t\t#(c)\n", + "P_2_c = 10;\t\t\t#[bar] - Final pressure, (Given)\n", + "P_2_c = P_2_c*10**(5);\t\t\t#[Pa]\n", + "\t\t\t#(P_1**(1-Y))*(T_1**(Y)) = (P_2**(1-Y))*(T_2**(Y))\n", + "T_2_c = T_1*((P_1/P_2_c)**((1-Y)/Y));\t\t\t#[K]\n", + "\t\t\t#Work done is given by, W = -delta_U = -Cv_0*(T_2_c - T_1)\n", + "W_c = -Cv_0*(T_2_c - T_1);\t\t\t#[J/mol]\n", + "\t\t\t#The final molar volume is calculated using P_1*V_1**(Y) = P_2*V_2**(Y)\n", + "\t\t\t#V_2 = V_1*((P_1/P_2_c)**(1/Y))\n", + "V_1 = (R*T_1)/P_1;\t\t\t#[cubic metre/mol] - Initial molar volume\n", + "V_2 = V_1*((P_1/P_2_c)**(1/Y));\t\t\t#[cubic metre/mol] - Final molar volume\n", + "\t\t\t#Now let us determine the work done to print lace the atmosphere,\n", + "W_atm_c = P_0*(V_2 - V_1);\t\t\t#[J/mol] - work done to print lace the atmosphere\n", + "\t\t\t#Thus useful work is given by,\n", + "W_use_c = W - W_atm_c;\t\t\t#[J/mol] - useful work done\n", + "\t\t\t#Here delta_S = 0,for reversible adiabatic process.Therefore,\n", + "W_rev_use_c = W_use_c;\n", + "\t\t\t#Now finally the irreversibility is given by,\n", + "i_c = W_rev_use_c - W_use_c;\t\t\t#[J/mol]\n", + "print \" c).When the system expands reversibly and adiabatically behind a piston \\n the ireversibility value is %f J/mol\"%(i_c);\n", + "\n", + "\t\t\t#(d)\n", + "\t\t\t#Here temperature is constant,but V_2 = 2*V_1, therefore P_2 = P_1/2\n", + "V_2_d = 2*V_1;\n", + "P_2_d = P_1/2;\n", + "\t\t\t#Under isothermal conditions work done is\n", + "W_d = R*T_1*math.log(V_2_d/V_1);\t\t\t#[J/mol]\n", + "\t\t\t#Work done to print lace the atmosphere is given by,\n", + "W_atm_d = P_0*(V_2_d - V_1);\t\t\t#[J/mol] - work done to print lace the atmosphere\n", + "\t\t\t#Thus useful work is given by,\n", + "W_use_d = W_d - W_atm_d;\t\t\t#[J/mol] - useful work done\n", + "delta_U_d = 0;\t\t\t#isothermal conditions\n", + "q_d = W_d;\t\t\t# since, delta_U_d = 0\n", + "\t\t\t#delta_S_d = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), and T_1 = T_2, Therefore\n", + "delta_S_d = -R*math.log(P_2_d/P_1);\t\t\t#[J/mol-K] - Entropy change\n", + "\t\t\t#The reversible useful work is given by,\n", + "W_rev_use_d = P_0*(V_1 - V_2_d) - T_0*(-delta_S_d) + q_d*(1-(T_0/T_R));\t\t\t#[J/mol] - Reversible useful work done.\n", + "\t\t\t#The irreversibility is given by,\n", + "i_d = W_rev_use_d - W_use_d;\t\t\t#[J/mol]\n", + "print \" d).When the system expands reversibly and isothermally behind a piston until it's volume is doubled \\n the ireversibility value is %f J/mol\"%(i_d);\n", + "\n", + "\t\t\t#(e)\n", + "P_2_e = 10;\t\t\t#[bar] - Final pressure, (Given)\n", + "P_2_e = P_2_e*10**(5);\t\t\t#[Pa]\n", + "\t\t\t#During the expansion of an ideal gas in into vacuum the temperature of the gas remains the same,\n", + "T_2_e = T_1;\t\t\t# Final temperature\n", + "\t\t\t#Since boundary of the system is fixed so no net work is done, W = 0 and thus\n", + "W_use_e = 0;\t\t\t#[J/mol] - Useful work done\n", + "\t\t\t#Here, delta_U = 0,as temperature is same and\n", + "\t\t\t#(V_1-V_2) = 0,as for overall system there is no change in volume\n", + "delta_S_e = - R*math.log(P_2_e/P_1);\t\t\t#[J/mol-K] - Entropy change\n", + "\t\t\t#The reversible useful work is given by,\n", + "W_rev_use_e = - T_0*(-delta_S_e);\t\t\t#[J/mol] - Reversible useful work done.\n", + "\t\t\t#The irreversibility is given by,\n", + "i_e = W_rev_use_e - W_use_e;\t\t\t#[J/mol]\n", + "print \" e).When the system expands adiabatically into an adjacent chamber \\n the ireversibility value is %f J/mol\"%(i_e);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).When the system is confined at constant pressure by a piston and is heated until it's volume is doubled \n", + " the ireversibility value is 1869.841742 J/mol\n", + " b).When the system is confined at constant pressure by a piston and is stirred until it's volume is doubled \n", + " the ireversibility value is 6013.652646 J/mol\n", + " c).When the system expands reversibly and adiabatically behind a piston \n", + " the ireversibility value is 0.000000 J/mol\n", + " d).When the system expands reversibly and isothermally behind a piston until it's volume is doubled \n", + " the ireversibility value is 897.537657 J/mol\n", + " e).When the system expands adiabatically into an adjacent chamber \n", + " the ireversibility value is 1005.074654 J/mol\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.4 Page Number : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 150+273.15;\t\t\t#[K] - Initial temperature.\n", + "m = 4.6;\t\t\t#[kg] - mass of water\n", + "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n", + "Q = 11000;\t\t\t#[kJ] - Heat transferred to the system.\n", + "T_R = 600+273.15;\t\t\t#[K] - Temperature of the reservior.\n", + "T_0 = 298;\t\t\t#[K] - Temperature of the environment\n", + "P_0 = 100;\t\t\t#[kPa] - Pressure of the environment\n", + "\n", + "# Calculations\n", + "\t\t\t#(1)\n", + "\t\t\t#The entropy change of an isothermal system undergoing an internally reversible process is given by,\n", + "delta_S_t = (Q/T_1);\t\t\t#[kJ] - Entropy change\n", + "delta_S = delta_S_t/m;\t\t\t#[kJ/kg-K] - \n", + "\n", + "\t\t\t#At 150 C,it has been reported in the book that, P_sat - 0.4758 kPa, V_liq = 0.001091 m**(3)/kg, U_liq = 631.68 kJ/kg, S_liq = 1.8418 kJ/kg-K, S_vap = 6.8379 kJ/kg-K\n", + "V_1 = 0.001091;\t\t\t#[m**(3)/kg] - initial specific volume\n", + "U_1 = 631.68;\t\t\t#[kJ/kg] - initial specific internal energy\n", + "S_1 = 1.8418;\t\t\t#[kJ/kg-K] - initial entropy\n", + "\t\t\t#The initial state of the water is a compressed liquid state,and S_1 is therefore equal to the entropy of the saturated liquid of the saturated liquid at the same temperature.\n", + "S_2 = S_1 + delta_S;\t\t\t#[kJ/kg-K] - Final entropy\n", + "\n", + "\t\t\t#At the final state the temperature is 150 C and S = 7.499 kJ/kg-K which is more than S_vap therefore it is superheated steam.\n", + "S_final = 7.494;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#At 150 C, and 0.1 MPa: V = 1.9364 m**(3)/kg, U = 2582.8 kJ/kg, S = 7.6134 kJ/kg-K\n", + "\t\t\t#At 150 C, and 0.2 MPa: V = 0.9596 m**(3)/kg, U = 2576.9 kJ/kg, S = 7.2795 kJ/kg-K\n", + "U_t_1 = 2582.8;\t\t\t#[kJ/kg] - Internal energy\n", + "U_t_2 = 2576.9;\t\t\t#[kJ/kg]\n", + "V_t_1 = 1.9364;\t\t\t#[m**(3)/kg] - Specific volume\n", + "V_t_2 = 0.9596;\t\t\t#[m**(3)/kg]\n", + "S_t_1 = 7.6134;\t\t\t#[kJ/kg-K] - Entropy\n", + "S_t_2 = 7.2795;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#The pressure at exit is given by,\n", + "P_2 = ((S_final - S_t_1)/(S_t_2 - S_t_1))*(0.2 - 0.1) + 0.1;\t\t\t#[Mpa] - Final pressure\n", + "\t\t\t#At final state\n", + "U_2 = U_t_1 + (U_t_2 - U_t_1)*((S_final - S_t_1)/(S_t_2 - S_t_1));\t\t\t#[kJ/kg] - Final specific internal energy\n", + "V_2 = V_t_1 + (V_t_2 - V_t_1)*((S_final - S_t_1)/(S_t_2 - S_t_1));\t\t\t#[m**(3)/kg] - Final specific volume\n", + "\n", + "q = Q/m;\t\t\t#[kJ/kg] - Heat supplied per unit kg of mass.\n", + "W_rev_use = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2) + q*(1 - (T_0/T_R));\t\t\t#[kJ/kg] - Reversible useful work done.\n", + "\n", + "\t\t\t#Now let us calculate the actual work done. We know q - W = delta_U, therefore\n", + "W = q - (U_2 - U_1);\t\t\t#[kJ/kg] - Work done\n", + "W_use = W - P_0*(V_2 - V_1);\t\t\t#[kJ/kg]\n", + "i = W_rev_use - W_use;\t\t\t#[kJ/kg] - Irreversibility\n", + "\t\t\t#Since the system contains 4.6 g therefore, \n", + "W_use_new = W_use*m;\t\t\t#[kJ]\n", + "W_rev_use_new = W_rev_use*m;\t\t\t#[kJ]\n", + "I = W_rev_use_new - W_use_new;\t\t\t#[kJ]\n", + "\n", + "# Results\n", + "print \" 1).The useful work obtained is %f kJ\"%(W_use_new);\n", + "print \" 2).The reversible usefuk work done is %f kJ\"%(W_rev_use_new);\n", + "print \" 3).The irreversibility is %f kJ\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The useful work obtained is 1304.987050 kJ\n", + " 2).The reversible usefuk work done is 5297.425775 kJ\n", + " 3).The irreversibility is 3992.438725 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.5 Page Number : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 700+273.15;\t\t\t#[K] - Initial temperature.\n", + "P_1 = 12;\t\t\t#[MPa] - Initial pressure\n", + "P_2 = 0.6;\t\t\t#[MPa] - Final pressure\n", + "\t\t\t#At 12 MPa and 700 C,\n", + "H_1 = 3858.4;\t\t\t#[kJ/kg] - initial enthalpy\n", + "S_1 = 7.0757;\t\t\t#[kJ/kg-K] - initial entropy\n", + "\n", + "\t\t\t#At 0.6 MPa and 200 C,\n", + "H_2 = 2850.1;\t\t\t#[kJ/kg]\n", + "S_2 = 6.9673;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t#At 0.6 MPa and 250 C,\n", + "H_3 = 2957.2;\t\t\t#[kJ/kg]\n", + "S_3 = 7.1824;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t#At 0.6 MPa and 300 C,\n", + "H_4 = 3061.6;\t\t\t#[kJ/kg]\n", + "S_4 = 7.3732;\t\t\t#[kJ/kg-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\n", + "P_exit = P_2;\t\t\t#[MPa] - exit pressure\n", + "T_exit = ((S_1 - S_2)/(S_3 - S_2))*(250 - 200) + 200;\t\t\t#[C] - exit temperature\n", + "H_exit = ((S_1 - S_2)/(S_3 - S_2))*(H_3 - H_2) + H_2;\t\t\t#[kJ/kg] - exit enthalpy\n", + "\n", + "\t\t\t#Snce it is a flow pocess,therfore\n", + "\t\t\t#W_rev = H_1 - H_exit - T_0*(S_1 - S_2)\n", + "\t\t\t#As S_1 = S_2,the above equation becomes\n", + "W_rev_1 = H_1 - H_exit;\t\t\t#[kJ/kg] - reversible work done\n", + "\n", + "\t\t\t#From the first law the actual work done can be calculated using, delta_H = q - W\n", + "\t\t\t#Since the turbine does not exchange heat,therefore W = - delta_H.\n", + "W_1 = - (H_exit - H_1);\t\t\t#[kJ/kg]\n", + "\n", + "print \" 1).The reversible work done is %f kJ/kg\"%(W_1);\n", + "print \" And since the maximum work is same as the actual work ,therefore irreversibility is zero\"\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# Variables\n", + "T_0 = 298.15;\t\t\t#[K] - Environment temperature\n", + "P_0 = 1;\t\t\t#[atm] - Environment pressure\n", + "adi_eff = 0.88;\t\t\t#adiabatc efficiency\n", + "\n", + "\t\t\t#(H_1 - H_exit_actual)/(H_1 - H_exit) = 0.88, therefore\n", + "H_exit_actual = H_1 - 0.88*(H_1 - H_exit);\t\t\t# - Actual exit enthalpy\n", + "\n", + "\t\t\t#Now two properties i.e pressure = 0.6 MPa and enthalpy = H_exit_actual is fixed at the exit. The exit temperature is given by,\n", + "T_exit_actual = ((H_exit_actual - H_3)/(H_4 - H_3))*(300 - 250) + 250;\t\t\t#[C]\n", + "S_exit_actual = ((H_exit_actual - H_3)/(H_4 - H_3))*(S_4 - S_3) + S_3;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Now reversible work done is given by,\n", + "W_rev_2 = H_1 - H_exit_actual - T_0*(S_1 - S_exit_actual);\t\t\t#[kJ/kg]\n", + "print \" 2).The reversible work done is %f kJ/kg\"%(W_rev_2);\n", + "\n", + "\t\t\t#The actual work is given by the first law,\n", + "W_2 = H_1 - H_exit_actual;\t\t\t#[kJ/kg] - Actual work done\n", + "i = W_rev_2 - W_2;\t\t\t#[kJ/kg] - irreversibility\n", + "print \" The value of irreversibility is %f kJ/kg\"%(i);\n", + "\n", + "\t\t\t#The irreversibility can also be determined using\n", + "\t\t\t# i = T_0*S_gen, and S_gen is given by\n", + "\t\t\t# S_gen = (q/T_R) - delta_S\n", + "\n", + "\t\t\t#The second law efficiency of the turbine is actual work done divided by reversible work,therefore\n", + "sec_eff = W_2/W_rev_2;\n", + "print \" The second law efficiency of the turbine is %f\"%(sec_eff);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The reversible work done is 954.326778 kJ/kg\n", + " And since the maximum work is same as the actual work ,therefore irreversibility is zero\n", + " 2).The reversible work done is 905.072590 kJ/kg\n", + " The value of irreversibility is 65.265025 kJ/kg\n", + " The second law efficiency of the turbine is 0.927890\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.6 Page Number : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_1 = 8.;\t\t\t#[bar] - Initial pressure\n", + "T_1 = 93. + 273.15;\t\t\t#[C] - Initial temperature\n", + "V_1 = 100.;\t\t\t#[m/s] - Initial velocity\n", + "P_2 = 1.25;\t\t\t#[bar] - Exit pressure\n", + "T_2 = 27. + 273.15;\t\t\t#[C] - Exit temperature\n", + "V_2 = 60.;\t\t\t#[m/s] - Exit velocity \n", + "Y = 1.4;\t\t\t#Ratio of specific heat capacities\n", + "T_0 = 298.15;\t\t\t#[K] - surrounding temperature\n", + "P_0 = 1.;\t\t\t#[bar] - surrounding pressure\n", + "R = 8.314;\t\t\t#[J/mol*K] - Gas constant\n", + "Cp_0 = (R*Y)/(Y-1);\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n", + "\n", + "# Calculations and Results\n", + "\n", + "\t\t\t#W = delta_H + (delta_V_square)/2\n", + "delta_H = Cp_0*(T_2 - T_1);\t\t\t#[J/mol] - enthalpy change\n", + "delta_H = (delta_H/28.84);\t\t\t#[kJ/kg] - (1 mole = 28.84 g).\n", + "delta_V_square = V_2**(2) - V_1**(2);\n", + "\n", + "W = - delta_H - ((delta_V_square)/2)/1000;\t\t\t#[kJ/kg] - Actual work done\n", + "print \" The actual work done is %f kJ/kg\"%(W);\n", + "\n", + "\t\t\t#Now let us calculate the maximum work that can be obtained\n", + "\t\t\t#W_rev = (H_1 + (V_1**(2))/2) - (H_2 + (V_2**(2))/2) - T_0*(S_1 - S_2)\n", + "delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K] - Entropy change\n", + "delta_S = delta_S/28.84;\t\t\t#kJ/kg-K]\n", + "W_rev = -delta_H - ((delta_V_square/2)/1000) + T_0*delta_S;\t\t\t#[kJ/kg]\n", + "print \" The maximum work obtainable per kg of air is %f kJ/kg\"%(W_rev);\n", + "\n", + "\t\t\t#The second law efficiency of the turbine is actual work done divided by reversible work,therefore\n", + "sec_eff = W/W_rev;\n", + "print \" The second law efficiency of the turbine is %f\"%(sec_eff);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The actual work done is 69.792718 kJ/kg\n", + " The maximum work obtainable per kg of air is 169.550182 kJ/kg\n", + " The second law efficiency of the turbine is 0.411635\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.7 Page Number : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "m_cold_water = 60;\t\t\t#[kg/s] - mass flow rate of cold water\n", + "P_1 = 50;\t\t\t#[kPa]\n", + "T_2 = 250;\t\t\t#[C]\n", + "T_water_1 = 1000 + 273.15;\t\t\t#[K] - Entering temperature of water\n", + "T_water_2 = 450 +273.15;\t\t\t#[K] - Exit temperature of water\n", + "T_0 = 298.15;\t\t\t#[K] - surrounding temperature\n", + "P_0 = 1;\t\t\t#[atm] - surrounding pressure\n", + "Cp_0 = 1.005;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t#For water at 50 kPa under saturated conditions,T_sat = 81.33 C, \n", + "H_liq_1 = 340.49;\t\t\t#[kJ/kg] - Enthalpy\n", + "S_liq_1 = 1.0910;\t\t\t#[kJ/kg-K] - Entropy\n", + "\n", + "\t\t\t#For steam at 50 kPa and 250 C,\n", + "H_2 = 2976.0;\t\t\t#[kJ/kg]\n", + "S_2 = 8.3556;\t\t\t#[kJ/kg-K]\n", + "\n", + "# Calculations and Results\n", + "\n", + "\n", + "m_hot_water = (m_cold_water*(H_2 - H_liq_1))/(Cp_0*(T_water_1 - T_water_2));\t\t\t#[kg/s] - mass flow rate of hot water\n", + "\n", + "\n", + "\t\t\t#S_gen = delta_S_hot + delta_S_cold\n", + "delta_S_cold = S_2 - S_liq_1;\t\t\t#[kJ/kg-K] - change of entropy of cold water\n", + "\t\t\t#delta_S_hot = Cp_0*math.log(T_2/T_1)-R*math.log(P_2/P_1), But pressure drop is zero,therfore\n", + "delta_S_hot = Cp_0*math.log(T_water_2/T_water_1);\t\t\t#[kJ/kg-K] - change of entropy of hot water\n", + "\n", + "S_gen = m_cold_water*delta_S_cold + m_hot_water*delta_S_hot;\t\t\t#[kW/K] - Entropy generated\n", + "print \" The entropy generation rate is %f kW/K\"%(S_gen);\n", + "\n", + "\t\t\t#The irreversibility rete is given by\n", + "I = T_0*S_gen;\t\t\t#[kW]\n", + "print \" The irreversibility rate of the heat exchanger is %f kW\"%(I);\n", + "\n", + "\t\t\t\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The entropy generation rate is 273.250824 kW/K\n", + " The irreversibility rate of the heat exchanger is 81469.733193 kW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.8 Page Number : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "m_water = 10000.;\t\t\t#[kg/h] - Mass flow rate of cold water\n", + "m_water = m_water/3600;\t\t\t#[kg/s]\n", + "T_1_water = 30. + 273.15;\t\t\t#[K] - Cold water entering temperature\n", + "m_HC = 5000.;\t\t\t#[kg/h] - mass flow rate of hot hydrocarbon\n", + "m_HC = m_HC/3600;\t\t\t#[kg/s]\n", + "T_1_HC = 200. + 273.15;\t\t\t#[K] - Hot hydrocarbon entering temperature\n", + "T_2_HC = 100. + 273.15;\t\t\t#[K] - Hot hydrocarbon leaving temperature\n", + "Cp_0_water = 1.0;\t\t\t#[kcal/kg-K] - Mean heat capacity of cooling water\n", + "Cp_0_HC = 0.6;\t\t\t#[kcal/kg-K] - Mean heat capacity of hydrocarbon\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t#Applying energy balance to the heat exchanger,we get\n", + "\t\t\t#m_water*Cp_0_water*(T - T_1_water) = m_HC*Cp_0_HC*(T_1_HC - T_2_HC)\n", + "T_2_water = ((m_HC*Cp_0_HC*(T_1_HC - T_2_HC))/(m_water*Cp_0_water)) + T_1_water;\t\t\t#[K]\n", + "T_2 = T_2_water - 273.15;\t\t\t#[C]\n", + "print \" 1).The exit temperature of the cooling water is %f C\"%(T_2);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t#delta_S_hot_HC = Cp_0*math.log(T_2/T_1)-R*math.log(P_2/P_1), But pressure drop is zero,therfore\n", + "delta_S_hot_HC = (Cp_0_HC*4.184)*math.log(T_2_HC/T_1_HC);\t\t\t#[kW/K] - change of entropy of hot hydrocarbon\n", + "delta_S_HC = m_HC*delta_S_hot_HC;\t\t\t#[kW/K] - Entropy change for hudrocarbon liquid \n", + "print \" 2).Entropy change rate of hydrocarbon liquid is %f kW/K\"%(delta_S_HC);\n", + "\n", + "delta_S_cold_water = (Cp_0_water*4.184)*math.log(T_2_water/T_1_water);\t\t\t#[kW/K] - change of entropy of cooling water\n", + "delta_S_water = m_water*delta_S_cold_water;\t\t\t#[kW/K] - Entropy change for water\n", + "print \" And entropy change rate of water is %f kW/K\"%(delta_S_water);\n", + "\n", + "\t\t\t#(3)\n", + "T_0 = 298.15;\t\t\t#[K] - Surrounding temperature\n", + "\t\t\t#S_gen = delta_S_cold_water + delta_S_hot_HC = m_water*delta_S_cold_water + m_HC*delta_S_hot_HC;\t\t\t#[kW/K] - Entropy generated\n", + "S_gen = delta_S_water + delta_S_HC;\t\t\t#[kW/K]\n", + "I = T_0*S_gen;\t\t\t#[kW]\n", + "print \" 3).The irreversibility rate of the heat exchanger is %f kW\"%(I);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The exit temperature of the cooling water is 60.000000 C\n", + " 2).Entropy change rate of hydrocarbon liquid is -0.827846 kW/K\n", + " And entropy change rate of water is 1.096732 kW/K\n", + " 3).The irreversibility rate of the heat exchanger is 80.168382 kW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.9 Page Number : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1_hotgas = 800.;\t\t\t#[K]\n", + "P_1_hotgas = 1.;\t\t\t#[bar]\n", + "T_2_hotgas = 700.;\t\t\t#[K]\n", + "P_2_hotgas = 1.;\t\t\t#[bar]\n", + "T_1_air = 470.;\t\t\t#[K]\n", + "P_1_air = 1.;\t\t\t#[bar]\n", + "P_2_air = 1.;\t\t\t#[bar]\n", + "Cp_0_hotgas = 1.08;\t\t\t#[kJ/kg-K] - Mean heat capacity of hot gas\n", + "Cp_0_air = 1.05;\t\t\t#[kcal/kg-K] - Mean heat capacity of air\n", + "T_0 = 298.15;\t\t\t#[K] - surrounding temperature\n", + "P_0 = 1.;\t\t\t#[bar] - surrounding pressure\n", + "\t\t\t#m_air = 2*m_hotgas\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t#Assuming heat exchange only takes places in-between the streams,from energy balance we get,\n", + "\t\t\t#m_gas*Cp_0_hotgas*(T_2_hotgas - T_1_hotgas) + 2*m_gas*Cp_0_air*(T - T_1_air), \n", + "T_2_air = T_1_air - ((Cp_0_hotgas*(T_2_hotgas - T_1_hotgas))/(2*Cp_0_air));\t\t\t#[K] - Temp of emerging air\n", + "print \" 1).The temperature of emerging air is %f K\"%(T_2_air);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t#Availability change of hot gas is given by,\n", + "\t\t\t#(si_1 - si_2)_hot = H_1 - H_2 - T_0*(S_1 - S_2)\n", + "delta_H_hotgas = (Cp_0_hotgas*(T_2_hotgas - T_1_hotgas));\t\t\t#[kJ/kg] - change in enthalpy of hotgas\n", + "\t\t\t#delta_S_hotgas = Cp_0_hotgas*math.log(T_2_hotgas/T_1_hotgas)- R*math.log(P_2/P_1), But pressure drop is zero (P_1 = P_2),therfore\n", + "delta_S_hotgas = Cp_0_hotgas*math.log(T_2_hotgas/T_1_hotgas);\t\t\t#[kJ/kg-K] - change of entropy of hot gas\n", + "delta_si_hotgas = (-delta_H_hotgas) - (-T_0*delta_S_hotgas);\t\t\t#[kJ/kg]\n", + "print \" 2).The availability change of hot gas is %f kJ/kg\"%(delta_si_hotgas);\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t#Availability change of air is given by,\n", + "\t\t\t#(si_1 - si_2)_air = H_1 - H_2 - T_0*(S_1 - S_2)\n", + "delta_H_air = (Cp_0_air*(T_2_air - T_1_air));\t\t\t#[kJ/kg] - change in enthalpy of air\n", + "\t\t\t#delta_S_air = Cp_0_air*math.log(T_2_air/T_1_air)- R*math.log(P_2/P_1), But pressure drop is zero (P_1 = P_2),therfore\n", + "delta_S_air = Cp_0_air*math.log(T_2_air/T_1_air);\t\t\t#[kJ/kg-K] - change of entropy of air\n", + "delta_si_air = (-delta_H_air) - (-T_0*delta_S_air);\t\t\t#[kJ/kg]\n", + "print \" 3).The availability change of air is %f kJ/kg\"%(delta_si_air);\n", + "\n", + "\t\t\t#(4)\n", + "\t\t\t#For the heat exchanger (Q = 0, W = 0)\n", + "\t\t\t#Basis : 1 kg of hot gas flowing through heat exchanger\n", + "S_gen = delta_S_hotgas + 2*delta_S_air;\t\t\t#[kJ/kg-K] - (as m_air = 2*m_hotgas)\n", + "I = T_0*S_gen;\t\t\t#[kJ/kg]\n", + "print \" 4).The irreversibility of thr exchanger per kg of hot gas flowing is %f kJ/kg\"%(I);\n", + "\n", + "\t\t\t#Irreversibility can also be obtained using\n", + "\t\t\t#I = 2*(si_1 - si_2)_air + (si_1 - si_2)_hotgas\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The temperature of emerging air is 521.428571 K\n", + " 2).The availability change of hot gas is 65.002625 kJ/kg\n", + " 3).The availability change of air is -21.492234 kJ/kg\n", + " 4).The irreversibility of thr exchanger per kg of hot gas flowing is 22.018157 kJ/kg\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb new file mode 100755 index 00000000..4cdc915d --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb @@ -0,0 +1,847 @@ +{ + "metadata": { + "name": "ch6_2", + "signature": "sha256:5875fd58ba5a3eb4a34d80c6cbf01fc2219f223f8352a521a425e02950a18a26" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 :Chemical reactions" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.1 Page Number : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - standard temperature\n", + "T_2 = 880;\t\t\t#[K] - Reaction temperature\n", + "\n", + "a_SO2 = 6.157;\n", + "a_SO3 = 3.918;\n", + "a_O2 = 6.732;\n", + "b_SO2 = 1.384*10**(-2);\n", + "b_SO3 = 3.483*10**(-2);\n", + "b_O2 = 0.1505*10**(-2);\n", + "c_SO2 = -0.9103*10**(-5);\n", + "c_SO3 = -2.675*10**(-5);\n", + "c_O2 = -0.01791*10**(-5);\n", + "d_SO2 = 2.057*10**(-9);\n", + "d_SO3 = 7.744*10**(-9);\n", + "\n", + "delta_H_rkn_298 = -23.45*10**(3);\t\t\t#[cal] - Rkn enthalpy at 298.15 K\n", + "delta_H_SO2_for_298 = -70.94*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of S02 at 298.15 K\n", + "delta_H_SO3_for_298 = -94.39*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of SO3 at 298.15 K\n", + "delta_G_SO2_for_298 = -71.68*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n", + "delta_G_SO3_for_298 = -88.59*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "delta_a = a_SO3 - a_SO2 - (a_O2/2);\n", + "delta_b = b_SO3 - b_SO2 - (b_O2/2);\n", + "delta_c = c_SO3 - c_SO2 - (c_O2/2);\n", + "delta_d = d_SO3 - d_SO2;\n", + "\n", + "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n", + "\t\t\t#Therefore we get,\n", + "\n", + "def f44(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "delta_H_rkn_880 = delta_H_rkn_298 + quad(f44,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t#On manual simplification of the above expression,we will get the expression for 'delta_H_rkn_880' as a function of T,\n", + " \n", + "print \" 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by\";\n", + "print \" delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4\"\n", + "\n", + "print \" 2).Staandard enthalpy change of reaction at 880 K is %f cal\"%(delta_H_rkn_880);\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t#Let us determine the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n", + "delta_S_SO2_298 = (delta_H_SO2_for_298 - delta_G_SO2_for_298)/298.15;\t\t\t#[cal/mol-K]\n", + "delta_S_SO3_298 = (delta_H_SO3_for_298 - delta_G_SO3_for_298)/298.15;\t\t\t#[cal/mol-K]\n", + "delta_S_O2_298 = 0;\t\t\t#[cal/mol-K]\n", + "\n", + "delta_S_rkn_298 = delta_S_SO3_298 - delta_S_SO2_298 - (delta_S_O2_298/2);\t\t\t#[cal/K]\n", + "\n", + "def f45(T): \n", + "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n", + "\n", + "delta_S_rkn_880 = delta_S_rkn_298 + quad(f45,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" 3).Standard entropy change of reaction at 880 K is %f cal/K\"%(delta_S_rkn_880);\n", + "\n", + "\t\t\t#(4)\n", + "delta_G_rkn_880 = delta_H_rkn_880 - 880*delta_S_rkn_880;\t\t\t#[cal]\n", + "\n", + "print \" 4).Standard Gibbs free energy change of reaction at 880 K is %f cal\"%(delta_G_rkn_880);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by\n", + " delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4\n", + " 2).Staandard enthalpy change of reaction at 880 K is -22766.609215 cal\n", + " 3).Standard entropy change of reaction at 880 K is -21.002783 cal/K\n", + " 4).Standard Gibbs free energy change of reaction at 880 K is -4284.160417 cal\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.2 Page Number : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - standard temperature\n", + "T_2 = 400;\t\t\t#[K] - Reaction temperature\n", + "\n", + "a_CH3OH = 4.55;\n", + "a_CO = 6.726;\n", + "a_H2 = 6.952;\n", + "b_CH3OH = 2.186*10**(-2);\n", + "b_CO = 0.04001*10**(-2);\n", + "b_H2 = -0.04576*10**(-2);\n", + "c_CH3OH = -0.291*10**(-5);\n", + "c_CO = 0.1283*10**(-5);\n", + "c_H2 = 0.09563*10**(-5);\n", + "d_CH3OH = -1.92*10**(-9);\n", + "d_CO = -0.5307*10**(-9);\n", + "d_H2 = -0.2079*10**(-9);\n", + "\n", + "delta_H_rkn_298 = -21.6643*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n", + "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO at 298.15 K\n", + "delta_H_CH3OH_for_298 = -48.08*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CH3OH at 298.15 K\n", + "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n", + "delta_G_CH3OH_for_298 = -38.69*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "delta_a = a_CH3OH - a_CO - 2*(a_H2);\n", + "delta_b = b_CH3OH - b_CO - 2*(b_H2);\n", + "delta_c = c_CH3OH - c_CO - 2*(c_H2);\n", + "delta_d = d_CH3OH - d_CO - 2*(d_H2);\n", + "\n", + "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n", + "\t\t\t#Therefore we get,\n", + "\n", + "def f56(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "delta_H_rkn_400 = delta_H_rkn_298 + quad(f56,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 400 K is %f cal\"%(delta_H_rkn_400);\n", + "\n", + "\t\t\t#Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n", + "delta_G_rkn_298 = delta_G_CH3OH_for_298 - delta_G_CO_for_298;\t\t\t#[cal]\n", + "\n", + "\t\t\t#Now determining the standard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n", + "\n", + "\n", + "def f57(T): \n", + "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n", + "\n", + "delta_S_rkn_400 = delta_S_rkn_298 + quad(f57,T_1,T_2)[0]\n", + "\n", + "\t\t\t#Therefore,the standard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_400 = delta_H_rkn_400 - 400*delta_S_rkn_400;\t\t\t#[cal]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 400 K is %f cal\"%(delta_G_rkn_400);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 400 K is -22587.159576 cal\n", + " Standard Gibbs free energy change of reaction at 400 K is -343.363287 cal\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.3 Page Number : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 1200;\t\t\t#[K] - Reaction temperature\n", + "\n", + "\n", + "a_CO2 = 5.316;\n", + "a_H2 = 6.952;\n", + "a_CO = 6.726;\n", + "a_H2O = 7.700;\n", + "b_CO2 = 1.4285*10**(-2);\n", + "b_H2 = -0.04576*10**(-2);\n", + "b_CO = 0.04001*10**(-2);\n", + "b_H2O = 0.04594*10**(-2);\n", + "c_CO2 = -0.8362*10**(-5);\n", + "c_H2 = 0.09563*10**(-5);\n", + "c_CO = 0.1283*10**(-5);\n", + "c_H2O = 0.2521*10**(-5);\n", + "d_CO2 = 1.784*10**(-9);\n", + "d_H2 = -0.2079*10**(-9);\n", + "d_CO = -0.5307*10**(-9);\n", + "d_H2O = -0.8587*10**(-9);\n", + "\n", + "# Calculations and Results\n", + "delta_H_rkn_298 = -9.8382*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n", + "delta_H_CO2_for_298 = -94.0518*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of CO2 at 298.15 K\n", + "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of CO at 298.15 K\n", + "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of H2O at 298.15 K\n", + "delta_G_CO2_for_298 = -94.2598*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n", + "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n", + "delta_G_H2O_for_298 = -54.6357*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n", + "\n", + "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "delta_a = a_CO2 + a_H2 - a_CO - a_H2O;\n", + "delta_b = b_CO2 + b_H2 - b_CO - b_H2O;\n", + "delta_c = c_CO2 + c_H2 - c_CO - c_H2O;\n", + "delta_d = d_CO2 + d_H2 - d_CO - d_H2O;\n", + "\n", + "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n", + "\t\t\t#Therefore we get,\n", + "\n", + "def f11(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "delta_H_rkn_1200 = delta_H_rkn_298 + quad(f11,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 1200 K is %f cal\"%(delta_H_rkn_1200);\n", + "\n", + "\t\t\t#Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n", + "delta_G_rkn_298 = delta_G_CO2_for_298 - delta_G_CO_for_298 - delta_G_H2O_for_298;\t\t\t#[cal]\n", + "\n", + "\t\t\t#Now determining the standard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n", + "\n", + "\n", + "def f12(T): \n", + "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n", + "\n", + "delta_S_rkn_1200 = delta_S_rkn_298 + quad(f12,T_1,T_2)[0]\n", + "\n", + "\t\t\t#Therefore,the standard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_1200 = delta_H_rkn_1200 - 1200*delta_S_rkn_1200;\t\t\t#[cal]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 1200 K is %f cal\"%(delta_G_rkn_1200);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 1200 K is -7850.182811 cal\n", + " Standard Gibbs free energy change of reaction at 1200 K is 953.652749 cal\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.4 Page Number : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 500;\t\t\t#[K] - Reaction temperature\n", + "\n", + "a_NH3 = 6.5846;\n", + "a_N2 = 6.903;\n", + "a_H2 = 6.952;\n", + "b_NH3 = 0.61251*10**(-2);\n", + "b_N2 = -0.03753*10**(-2);\n", + "b_H2 = -0.04576*10**(-2);\n", + "c_NH3 = 0.23663*10**(-5);\n", + "c_N2 = 0.1930*10**(-5);\n", + "c_H2 = 0.09563*10**(-5);\n", + "d_NH3 = -1.5981*10**(-9);\n", + "d_N2 = -0.6861*10**(-9);\n", + "d_H2 = -0.2079*10**(-9);\n", + "\n", + "delta_H_rkn_298 = -22.08*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n", + "delta_H_NH3_for_298 = -11.04*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of NH3 at 298.15 K\n", + "delta_G_NH3_for_298 = -3.976*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of NH3 at 298.15 K\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "delta_a = 2*a_NH3 - a_N2 - 3*a_H2;\n", + "delta_b = 2*b_NH3 - b_N2 - 3*b_H2;\n", + "delta_c = 2*c_NH3 - c_N2 - 3*c_H2;\n", + "delta_d = 2*d_NH3 - d_N2 - 3*d_H2;\n", + "\n", + "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n", + "\t\t\t#Therefore we get,\n", + "\n", + "def f5(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "delta_H_rkn_500 = delta_H_rkn_298 + quad(f5,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 500 K is %f cal\"%(delta_H_rkn_500);\n", + "\n", + "\t\t\t#Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n", + "delta_G_rkn_298 = 2*delta_G_NH3_for_298;\t\t\t#[cal]\n", + "\n", + "\t\t\t#Now determining the standard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n", + "\n", + "\n", + "def f6(T): \n", + "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n", + "\n", + "delta_S_rkn_500 = delta_S_rkn_298 + quad(f6,T_1,T_2)[0]\n", + "\n", + "\t\t\t#Therefore,the standard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_500 = delta_H_rkn_500 - 500*delta_S_rkn_500;\t\t\t#[cal]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 500 K is %f cal\"%(delta_G_rkn_500);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 500 K is -23925.267197 cal\n", + " Standard Gibbs free energy change of reaction at 500 K is 2159.910425 cal\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.5 Page Number : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "delta_H_rkn_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Reaction enthalpy at 298.15 K\n", + "delta_G_rkn_298 = -54.6351*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n", + "\n", + "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2_1 = 873.15;\t\t\t#[K] - Reaction temperature\n", + "T_2_2 = 1000;\t\t\t#[K] - Reaction temperature\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Therefore we get,\n", + "\n", + "def f34(T): \n", + "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n", + "\n", + "delta_H_rkn_873 = delta_H_rkn_298 + quad(f34,T_1,T_2_1)[0]\n", + "\n", + "\n", + "def f35(T): \n", + "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n", + "\n", + "delta_H_rkn_1000 = delta_H_rkn_298 + quad(f35,T_1,T_2_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 873 K is %f cal/mol\"%(delta_H_rkn_873);\n", + "print \" Standard enthalpy change of reaction at 1000 K is %f cal/mol\"%(delta_H_rkn_1000);\n", + "\n", + "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n", + "\n", + "\n", + "def f36(T): \n", + "\t return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T\n", + "\n", + "delta_S_rkn_873 = delta_S_rkn_298 + quad(f36,T_1,T_2_1)[0]\n", + "\n", + "\n", + "def f37(T): \n", + "\t return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T\n", + "\n", + "delta_S_rkn_1000 = delta_S_rkn_298 + quad(f37,T_1,T_2_2)[0]\n", + "\n", + "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_873 = (delta_H_rkn_873 - 873.15*delta_S_rkn_873)*10**(-3);\t\t\t#[kcal/mol]\n", + "delta_G_rkn_1000 = (delta_H_rkn_1000 - 1000*delta_S_rkn_1000)*10**(-3);\t\t\t#[kcal/mol]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 873 K is %f kcal/mol\"%(delta_G_rkn_873);\n", + "print \" Standard Gibbs free energy change of reaction at 1000 K is %f kcal/mol\"%(delta_G_rkn_1000);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 873 K is -52801.656303 cal/mol\n", + " Standard enthalpy change of reaction at 1000 K is -51579.290952 cal/mol\n", + " Standard Gibbs free energy change of reaction at 873 K is -51.575573 kcal/mol\n", + " Standard Gibbs free energy change of reaction at 1000 K is -51.481661 kcal/mol\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.6 Page Number : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 500.;\t\t\t#[K] - Reaction temperature\n", + "\n", + "a_C2H6 = 1.648;\n", + "a_O2 = 6.085;\n", + "a_CO2 = 5.316;\n", + "a_H2O = 7.700;\n", + "b_C2H6 = 4.124*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "b_CO2 = 1.4285*10**(-2);\n", + "b_H2O = 0.04594*10**(-2);\n", + "c_C2H6 = -1.530*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "c_CO2 = -0.8362*10**(-5);\n", + "c_H2O = 0.2521*10**(-5);\n", + "d_C2H6 = 1.740*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "d_CO2 = 1.784*10**(-9);\n", + "d_H2O = -0.8587*10**(-9);\n", + "\n", + "# Calculations and Results\n", + "\n", + "\n", + "\n", + "delta_H_C2H6_for_298 = -20.236*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of C2H6 at 298.15 K\n", + "delta_H_CO2_for_298 = -94.0518*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n", + "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n", + "\n", + "delta_H_rkn_298 = 2*delta_H_CO2_for_298 + 3*delta_H_H2O_for_298 - delta_H_C2H6_for_298;\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n", + "\n", + "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "delta_a = 2*a_CO2 + 3*a_H2O - a_C2H6 - 7./2*(a_O2);\n", + "delta_b = 2*b_CO2 + 3*b_H2O - b_C2H6 - 7./2*(b_O2);\n", + "delta_c = 2*c_CO2 + 3*c_H2O - c_C2H6 - 7./2*(c_O2);\n", + "delta_d = 2*d_CO2 + 3*d_H2O - d_C2H6 - 7./2*(d_O2);\n", + "\n", + "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n", + "\t\t\t#Therefore we get,\n", + "\n", + "def f55(T): \n", + "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n", + "\n", + "delta_H_rkn_500 = delta_H_rkn_298 + quad(f55,T_1,T_2)[0]\n", + "\n", + "delta_H_rkn_500 = delta_H_rkn_500*10**(-3);\t\t\t#[kcal]\n", + "\n", + "print \" The heat exchange of the reaction at 500 K is %f kcal\"%(delta_H_rkn_500);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The heat exchange of the reaction at 500 K is -340.644585 kcal\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.7 Page Number : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 600.;\t\t\t#[K] - Reaction temperature\n", + "\n", + "a_C2H6 = -8.65;\n", + "a_H2O = 7.700;\n", + "a_CH4 = 4.750;\n", + "a_O2 = 6.085;\n", + "b_C2H6 = 11.578*10**(-2);\n", + "b_H2O = 0.04594*10**(-2);\n", + "b_CH4 = 1.200*10**(-2);\n", + "b_O2 = 0.3631*10**(-2);\n", + "c_C2H6 = -7.540*10**(-5);\n", + "c_H2O = 0.2521*10**(-5);\n", + "c_CH4 = 0.3030*10**(-5);\n", + "c_O2 = -0.1709*10**(-5);\n", + "d_C2H6 = 18.54*10**(-9);\n", + "d_H2O = -0.8587*10**(-9);\n", + "d_CH4 = -2.630*10**(-9);\n", + "d_O2 = 0.3133*10**(-9);\n", + "\n", + "delta_S_CH4_for_298 = 44.50;\t\t\t#[cal/mol-K] - Entropy of formation of CH4 at 298.15 K\n", + "delta_S_O2_for_298 = 49.00;\t\t\t#[cal/mol-K] - Entropy of formation of O2 at 298.15 K\n", + "delta_S_C2H6_for_298 = 64.34;\t\t\t#[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n", + "delta_S_H2O_for_298 = 45.11;\t\t\t#[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n", + "\n", + "\t\t\t#Smath.tan(math.radiansard entropy change of reaction at temperature T is given by,\n", + "\t\t\t#delta_S_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n", + "delta_a = 1./6*(a_C2H6) + 3./2*(a_H2O) - a_CH4 - 3./4*(a_O2);\n", + "delta_b = 1./6*(b_C2H6) + 3./2*(b_H2O) - b_CH4 - 3./4*(b_O2);\n", + "delta_c = 1./6*(c_C2H6) + 3./2*(c_H2O) - c_CH4 - 3./4*(c_O2);\n", + "delta_d = 1./6*(d_C2H6) + 3./2*(d_H2O) - d_CH4 - 3./4*(d_O2);\n", + "\n", + "delta_S_rkn_298 = 1./6*(delta_S_C2H6_for_298) + 3./2*(delta_S_H2O_for_298) - delta_S_CH4_for_298 - 3./4*(delta_S_O2_for_298);\t\t\t#[cal/K]\n", + "\n", + "def f27(T): \n", + "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n", + "\n", + "delta_S_rkn_600 = delta_S_rkn_298 + quad(f27,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Change in entropy of the reaction at 298.15 K is %f cal/K\"%(delta_S_rkn_298);\n", + "print \" Standard entropy change of reaction at 600 K is %f cal/K\"%(delta_S_rkn_600);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Change in entropy of the reaction at 298.15 K is -2.861667 cal/K\n", + " Standard entropy change of reaction at 600 K is -1.880233 cal/K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.8 Page Number : 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 973.15;\t\t\t#[K] - Reaction temperature\n", + "\n", + "\t\t\t#At 298.15 K\n", + "delta_H_CH4_for_298 = -17.889*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CH4 at 298.15 K\n", + "delta_H_C_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of C (s, graphite) at 298.15 K\n", + "delta_H_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n", + "delta_G_CH4_for_298 = -12.140*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n", + "delta_G_C_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of C (s, graphite) at 298.15 K\n", + "delta_G_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#/standard heat capacity data in cal/mol-K are given below, T is in K\n", + "\t\t\t#Cp_0_CH4 = 4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3)\n", + "\t\t\t#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)\n", + "\t\t\t#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)\n", + "\n", + "\t\t\t#Therefore standard heat capacity of reaction is given by,\n", + "\t\t\t#Cp_0_rkn = 2*Cp_0_H2 + Cp_0_C - Cp_0_CH4\n", + "\t\t\t#On simplification,we get the relation\n", + "\t\t\t#Cp_0_rkn = 12.673 - 0.0113832*T - 1.1174*10**(-6)*T**(2) + 2.2142*10**(-9)*T**(3) - 1.723*10**(5)*T**(-2)\n", + "\n", + "delta_H_rkn_298 = -delta_H_CH4_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n", + "delta_G_rkn_298 = -delta_G_CH4_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n", + "\n", + "\n", + "def f63(T): \n", + "\t return 12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2)\n", + "\n", + "delta_H_rkn_973 = delta_H_rkn_298 + quad(f63,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 973.15 K is %f cal\"%(delta_H_rkn_973);\n", + "\n", + "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n", + "\n", + "def f64(T): \n", + "\t return (12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2))/T\n", + "\n", + "delta_S_rkn_973 = delta_S_rkn_298 + quad(f64,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_973 = delta_H_rkn_973 - 973.15*delta_S_rkn_973;\t\t\t#[cal]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 973 K is %f cal\"%(delta_G_rkn_973);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 973.15 K is 21316.998642 cal\n", + " Standard Gibbs free energy change of reaction at 973 K is -3880.803382 cal\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.9 Page Number : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 1000;\t\t\t#[K] - Reaction temperature\n", + "\n", + "\t\t\t#At 298.15 K\n", + "delta_H_C_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of C(s,graphite) at 298.15 K\n", + "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n", + "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO at 298.15 K\n", + "delta_H_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n", + "delta_G_C_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of C(s, graphite) at 298.15 K\n", + "delta_G_H2O_for_298 = -54.6357*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n", + "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n", + "delta_G_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#/standard heat capacity data in cal/mol-K are given below, T is in K\n", + "\t\t\t#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)\n", + "\t\t\t#Cp_0_H2O = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3)\n", + "\t\t\t#Cp_0_CO = 6.726 + 0.04001*10**(-2)*T + 0.1283*10**(-5)*T**(2) - 0.5307*10**(-9)*T**(3)\n", + "\t\t\t#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)\n", + "\n", + "\t\t\t#Therefore standard heat capacity of reaction is given by,\n", + " #Cp_0_rkn = 2.459 - 2.0489*10**(-3)*T - 2.817*10**(-7)*T**(2) + 1.201*10**(-10)*T**(3) + 1.723*10**(5)*T**(-2)\n", + "\n", + "delta_H_rkn_298 = delta_H_CO_for_298 + delta_H_H2_for_298 - delta_H_C_for_298 - delta_H_H2O_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n", + "delta_G_rkn_298 = delta_G_CO_for_298 + delta_G_H2_for_298 - delta_G_C_for_298 - delta_G_H2O_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n", + "\n", + "\n", + "def f13(T): \n", + "\t return 2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2)\n", + "\n", + "delta_H_rkn_1000 = delta_H_rkn_298 + quad(f13,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 1000 K is %f cal\"%(delta_H_rkn_1000);\n", + "\n", + "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n", + "\n", + "def f14(T): \n", + "\t return (2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2))/T\n", + "\n", + "delta_S_rkn_1000 = delta_S_rkn_298 + quad(f14,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_1000 = delta_H_rkn_1000 - 1000*delta_S_rkn_1000;\t\t\t#[cal]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 1000 K is %f cal\"%(delta_G_rkn_1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 1000 K is 32518.639475 cal\n", + " Standard Gibbs free energy change of reaction at 1000 K is -1858.365607 cal\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.10 Page Number : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n", + "T_2 = 1042;\t\t\t#[K] - Reaction temperature\n", + "\n", + "\t\t\t#At 298.15 K\n", + "delta_H_CaCO3_for_298 = -289.5*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CaCO3 at 298.15 K\n", + "delta_H_CaO_for_298 = -151.7*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CaO at 298.15 K\n", + "delta_H_CO2_for_298 = -94.052*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n", + "delta_G_CaCO3_for_298 = -270.8*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K\n", + "delta_G_CaO_for_298 = -144.3*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CaO at 298.15 K\n", + "delta_G_CO2_for_298 = -94.260*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#/Smath.tan(math.radiansaerd heat capacity data in cal/mol-K are given below, T is in K\n", + "\t\t\t#Cp_0_CO2 = 5.316 + 1.4285*10**(-2)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3)\n", + "\t\t\t#Cp_0_CaO = 12.129 + 0.88*10**(-3)*T + 2.08*10**(5)*T**(-2)\n", + "\t\t\t#Cp_0_CaCO3 = 24.98 + 5.240*10**(-3)*T + 6.199*10**(5)*T**(-2)\n", + "\n", + "\t\t\t#Therefore smath.tan(math.radiansard heat capacity of reaction is given by,\n", + " #Cp_0_rkn = -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n", + "\n", + "delta_H_rkn_298 = delta_H_CaO_for_298 + delta_H_CO2_for_298 - delta_H_CaCO3_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n", + "delta_G_rkn_298 = delta_G_CaO_for_298 + delta_G_CO2_for_298 - delta_G_CaCO3_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n", + "\n", + "\n", + "def f38(T): \n", + "\t return -7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2)\n", + "\n", + "delta_H_rkn_1042 = delta_H_rkn_298 + quad(f38,T_1,T_2)[0]\n", + "\n", + "\n", + "print \" Standard enthalpy change of reaction at 1042 K is %f cal\"%(delta_H_rkn_1042);\n", + "\n", + "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n", + "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n", + "\n", + "def f39(T): \n", + "\t return (-7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2))/T\n", + "\n", + "delta_S_rkn_1042 = delta_S_rkn_298 + quad(f39,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n", + "delta_G_rkn_1042 = delta_H_rkn_1042 - 1042*delta_S_rkn_1042;\t\t\t#[cal]\n", + "\n", + "print \" Standard Gibbs free energy change of reaction at 1042 K is %f cal\"%(delta_G_rkn_1042);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard enthalpy change of reaction at 1042 K is 41518.919956 cal\n", + " Standard Gibbs free energy change of reaction at 1042 K is 4873.416608 cal\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb new file mode 100755 index 00000000..5f644cdd --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb @@ -0,0 +1,1542 @@ +{ + "metadata": { + "name": "ch7_2", + "signature": "sha256:1fc4ec5605309ff88ba6d75ddff6c3046fc8a8dc45dca2d12f7651c49812921e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Thermodynamic property relations of pure substance" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.6 Page Number : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "\n", + "\n", + "# Variables\n", + "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n", + "P_2 = 1.4;\t\t\t#[MPa] - Final pressure\n", + "\n", + "# Calculations\n", + "\t\t\t#We know that\n", + "\t\t\t# dS = (Cp/T)*dT - (dV/dT)*dP\n", + "\t\t\t# Along an isothermal path,integration of above expression between states 1 and 2 yields\n", + "\t\t\t# S_2 - S_1 = - integral((dV/dT)*dP)_P\n", + "\t\t\t# An estimate can be made by assuming that (dV/dT)_P remains constant over the range of pressure from P_1 to P_2 and evaluating the derivative at average pressure of 1.2 MPa\n", + "P_avg = P_2;\n", + "\t\t\t# S_2 - S_1 = -integral((dV/dT)*dP)_Pavg*(P_2 - P_1)\n", + "\t\t\t# (dV/dT)_P=1.2MPa = ((V_350 - V_250)/(350 - 250))\n", + "dV_dT = (0.2345 - 0.19234)/100;\t\t\t#[m**(3)/kg-K]\n", + "\t\t\t#Therefore\n", + "delta_S = -dV_dT*(P_2 - P_1)*1000;\t\t\t#[kJ/kg-K] - Entropy change\n", + "\n", + "# Results\n", + "print \"The change in entropy is given by S_2-S_1 = %f kJ/kg-K\"%(delta_S);\n", + "\n", + "\t\t\t#Let us compare this tabulated values. At 1MPA and 300 C, S_1 = 7.1229 kJ/kg-K. At 1.4 MPa and 300 C, S_2 = 6.9534 kJ/kg-K. \n", + "\t\t\t#Therefore S_2 - S_1 = -0.1695 kJ/kg-K\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in entropy is given by S_2-S_1 = -0.168640 kJ/kg-K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.7 Page Number : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\n", + "# Variables\n", + "T = 25. + 273.15;\t\t\t#[K] - Temperature of the surrounding\n", + "P_1 = 1.;\t\t\t#[atm] - Initial pressure\n", + "P_2 = 1000.;\t\t\t#[atm] - Final pressure\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# V = 18.066 - 7.15*10**(-4)*P + 4.6*10**(-8)*P**(2) where, V is in 'cm**(3)/mol' and P is in 'atm\n", + "\t\t\t# (dV/dT)_P = 0.0045 + 1.4*10**(-6)*P ;\t\t\t#cm**(3)/mol-K\n", + "\n", + "\t\t\t# The work done by 1 mol is given by W = integral(P*dV)\n", + "\t\t\t# Differentiating both sides of the expression for V, we get\n", + "\t\t\t# dV = -7.15*10**(-4)*dP + 9.2*10**(-8)*(P*dP) \n", + "\t\t\t# P*dV = -7.15*10**(-4)*P*dP + 9.2*10**(-8)*(P**(2)*dP)\n", + "\n", + "\t\t\t# The work done is given by\n", + "\n", + "def f58(P): \n", + "\t return -7.15*10**(-4)*P + 9.2*10**(-8)*(P**(2))\n", + "\n", + "W = quad(f58,P_1,P_2)[0];\t\t\t#[atm-cm**(3)[0]\n", + "\n", + "W = W*101325*10**(-6);\t\t\t#[J/mol]\n", + "\n", + "print \"The necessary work to compress water from 1 atm to 1000 atm is %f J/mol\"%(W);\n", + "\n", + "\t\t\t#Let us calculate the amount of heat transfer\n", + "\t\t\t# q = integral(T*dS)\n", + "\t\t\t# dS = ((ds/dT)_P)*dT + ((dS/dP)_T)*dP\n", + "\t\t\t# Since the temperature is constant the first term is zero and\n", + "\t\t\t# dS = ((dS/dP)_T)*dP = -((dV/dT)_P)*dP\n", + "\t\t\t# Thus, q = integral(T*dS) = T*(integral(dS)) ( as temperature is constant )\n", + "\t\t\t# or, q = -T*(integral((dV/dT)_P)*dP)\n", + "\n", + "\t\t\t# Thus the heat transfer is given by\n", + "\n", + "def f59(P): \n", + "\t return 0.0045+1.4*10**(-6)*P\n", + "\n", + "q = -T* quad(f59,P_1,P_2)[0];\t\t\t#[atm-cm**(3)[0]\n", + "\n", + "q = q*101325*10**(-6);\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# q - W = delta_U\n", + "\t\t\t# Thus delta_U is given by\n", + "delta_U = q - W;\t\t\t#[J/mol]\n", + "\n", + "print \"The change in internal energy is %f J/mol\"%(delta_U);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The necessary work to compress water from 1 atm to 1000 atm is -33.116351 J/mol\n", + "The change in internal energy is -123.839936 J/mol\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.12 Page Number : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "\n", + "\n", + "# Variables\n", + "T = 25+273.15;\t\t\t#[K] - Temperature\n", + "P = 1;\t\t\t#[atm] - Pressure\n", + "P = P*101325;\t\t\t#[Pa]\n", + "Tc = 126.2;\t\t\t#[K] - Critical temperature\n", + "Pc = 34;\t\t\t#[bar] - Critical pressure\n", + "Pc = Pc*10**(5);\t\t\t#[Pa]\n", + "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "a = (27*R**(2)*Tc**(2)/(64*Pc));\t\t\t#[Pa-m**(6)/mol**(2)]\n", + "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# the cubic form of van der Walls equation of state is\n", + "\t\t\t# V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P=0\n", + "\t\t\t#Solving the cubic equation\n", + "def f(V): \n", + "\t return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n", + "V = fsolve(f,1)\n", + "\t\t\t#The above equation has 1 real and 2 imaginary roots. We consider only real root.\n", + "\n", + "Beta = R/((P*V)-(a/V)+((2*a*b)/V**(2)));\t\t\t#[K**(-1)]\n", + "\n", + "K_t = (V-b)/((P*V)-(a/V)+((2*a*b)/V**(2)));\t\t\t#[Pa**(-1)]\n", + "K_t = K_t*101325;\t\t\t#[atm**(-1)]\n", + "\n", + "print \" Beta\\t = \\t %f K**-1)\"%(Beta);\n", + "print \" K_t\\t = \\t %f atm**-1)\"%(K_t);\n", + "\n", + "\t\t\t#For ideal gas, Beta = 1/T = 0.0033354 K**(-1) and K_t = 1/P = 1 atm**(-1)\n", + "\t\t\t# So results obtained are convergent with those obtained assuming ideal gas.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Beta\t = \t 0.003364 K**-1)\n", + " K_t\t = \t 1.000672 atm**-1)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.13 Page Number : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 45+273.15;\t\t\t#[K]\n", + "P_1 = 10;\t\t\t#[kPa] - Initial pressure\n", + "P_2 = 8600;\t\t\t#[kPa] - Final pressure\n", + "V = 1010;\t\t\t#[cm**(3)/kg] - Specific volume for saturated liquid water at 45 C\n", + "V = V*10**(-6);\t\t\t#[m**(3)/kg]\n", + "\t\t\t# Beta = (1/V)*(dV/dT)_P\n", + "Beta = 4.25*10**(-4);\t\t\t#[k**(-1)]\n", + "Cp = 4.178;\t\t\t#[kJ/kg-K] - Specific heat at constant pressure\n", + "eff = 0.75;\t\t\t# Efficiency of the pump\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t#when efficiency of the pump is 100% , W = -delta_Hs\n", + "\t\t\t# Now delta_H = T*dS + V*dP, therefore under isentropic conditions, dH = V*dP\n", + "\t\t\t# delta_Hs = V*dP\n", + "delta_Hs = V*(P_2 - P_1);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Actual pumps are not isentropic and therefore not 100% efficient. Therefore actual work done by the pump is given by\n", + "W = -delta_Hs/eff;\t\t\t#[kJ/kg]\n", + "\n", + "print \" 1).The work done by the pump is %f kJ/kg\"%(W);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# We know that dH = Cp*dT + (1 - Beta*T)*V*dP\n", + "\t\t\t# Integrating the above equation we get\n", + "\t\t\t# delta_H = Cp*delta_T + (1 - Beta*T)*V*(delta_P)\n", + "\t\t\t# Now from energy balance delta_H = q - W . But q = 0. Therefore,\n", + "delta_H = -W;\t\t\t#[kJ/kg]\n", + "\t\t\t# Solving for delta_T\n", + "delta_T = (delta_H - (1 - Beta*T)*V*(P_2-P_1))/Cp;\n", + "\n", + "print \" 2).The temperature of water change by delta_T = %f K\"%(delta_T);\n", + "\n", + "\t\t\t#(3)\n", + "T_1 = T;\t\t\t#[K]\n", + "T_2 = T + delta_T;\t\t\t#[K]\n", + "\t\t\t# dS = (Cp/T)*dT - Beta*V*dP\n", + "\t\t\t# Beta and V are weak functions of pressure in the case of liquids. Integrating the above equation we get\n", + "delta_S = Cp*math.log(T_2/T_1) - Beta*V*(P_2-P_1);\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" 3).The entropy change of water is given by delta_S = %f kJ/kg-K\"%(delta_S);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The work done by the pump is -11.567867 kJ/kg\n", + " 2).The temperature of water change by delta_T = 0.972970 K\n", + " 3).The entropy change of water is given by delta_S = 0.009070 kJ/kg-K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.14 Page Number : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 270;\t\t\t#[K]\n", + "P_1 = 381;\t\t\t#[kPa] - Initial pressure\n", + "P_2 = 1200;\t\t\t#[kPa] - Final pressure\n", + "V_liq = 1.55*10**(-3);\t\t\t#[m**(3)/kg] - Specific volume for saturated water in liquid phase at 270 C\n", + "Beta = 2.095*10**(-3);\t\t\t#[K**(-1)]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#dH = Cp*dT + [V - T*(dV/dT)_P]*dP\n", + "\t\t\t# dS = (Cp/T)*dT - ((dV/dT)_P)*dP\n", + "\t\t\t# dH = [V - T*(dV/dT)_P]*dP = V*(1 - Beta*T)*dP\n", + "\t\t\t# For the liquid assuming V and Beta to remain constant during pressure change, and since temperature is constant we get\n", + "delta_H = V_liq*(1 - Beta*T)*(P_2 - P_1);\t\t\t#[kJ/kg]\n", + "\n", + "print \"The enthalpy change is given by delta_H = %f kJ/kg\"%(delta_H);\n", + "\n", + "\t\t\t# Under isothermal conditions \n", + "\t\t\t# dS = -((dV/dT)_P)*dP = -Beta*V_liq*dP\n", + "\t\t\t# If Beta*V is assumed to remain constant during pressure change we get\n", + "delta_S = -Beta*V_liq*(P_2-P_1);\t\t\t#[kJ/kg-K]\n", + "\n", + "print \"The entropy change is given by delta_S = %e kJ/kg-K\"%(delta_S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy change is given by delta_H = 0.551386 kJ/kg\n", + "The entropy change is given by delta_S = -2.659498e-03 kJ/kg-K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.15 Page Number : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T_1 = 0;\t\t\t#[C] - Initial tempetaure\n", + "T_2 = 100;\t\t\t#[C] - Final temperature\n", + "\t\t\t# Beta = 1.0414*10**(-3) + 1.5672*10**(-6)*T + 5.148*10**(-8)*T**(2), where T is in C\n", + "\t\t\t# At constant pressure (1/V)*(dV/dT) = Beta\n", + "\t\t\t# or, d(math.log(V)) = Beta*dT\n", + "\t\t\t# Integrating we get math.log(V_2/V_1) = integral(Beta*dT) from limit T_1 to T_2\n", + "\n", + "# Calculations and Results\n", + "def f62(T): \n", + "\t return 1.0414*10**(-3)+1.5672*10**(-6)*T+5.148*10**(-8)*T**(2)\n", + "\n", + "integral = quad(f62,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t# math.log(V_2/V_1) = integral\n", + "\t\t\t# (V_2/V_1) = exp(integral)\n", + "\t\t\t# (V_2 - V_1)/V_1 = change = exp(integral) - 1;\n", + "change = math.exp(integral) - 1;\n", + "per_change = 100*change;\n", + "\n", + "print \"The percentage change in volume = %f %%\"%(per_change);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in volume = 13.784486 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.16 Page Number : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_1 = 25 + 273.15;\t\t\t#[C] - Initial tempetaure\n", + "T_2 = 50 + 273.15;\t\t\t#[C] - Final temperature\n", + "P_1 = 1;\t\t\t#[bar] - Initial pressure\n", + "P_2 = 1000;\t\t\t#[bar] - Final pressure\n", + "\n", + "Cp_T1_P1 = 75.305;\t\t\t#[J/mol-K]\n", + "Cp_T2_P1 = 75.314;\t\t\t#[J/mol-K]\n", + "V_T1_P1 = 18.071;\t\t\t#[cm**(3)/mol]\n", + "V_T1_P2 = 18.012;\t\t\t#[cm**(3)/mol]\n", + "V_T2_P1 = 18.234;\t\t\t#[cm**(3)/mol]\n", + "V_T2_P2 = 18.174;\t\t\t#[cm**(3)/mol]\n", + "Beta_T1_P1 = 256*10**(-6);\t\t\t#[K**(-1)]\n", + "Beta_T1_P2 = 366*10**(-6);\t\t\t#[K**(-1)]\n", + "Beta_T2_P1 = 458*10**(-6);\t\t\t#[K**(-1)]\n", + "Beta_T2_P2 = 568*10**(-6);\t\t\t#[K**(-1)]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The entropy change is given by\n", + "\t\t\t# dS = (Cp/T)*dT - ((dV/dT)_P)*dP\n", + "\t\t\t# The mean Cp between 25 and 50 C is \n", + "Cp_mean = (Cp_T1_P1 + Cp_T1_P1)/2;\t\t\t#[J/mol-K]\n", + "\n", + "\n", + "\t\t\t# (dV/dT)_P=1bar = (V_T2_P1 - V_T1_P1)/(50 - 25)\n", + "dV_dT_P1 = ((V_T2_P1 - V_T1_P1)/(50 - 25))*10**(-6);\t\t\t#[m**(-3)/mol-K]\n", + "dV_dT_P2 = ((V_T2_P2 - V_T1_P2)/(50 - 25))*10**(-6);\t\t\t#[m**(-3)/mol-K]\n", + "\t\t\t# The mean value of (dV/dT)_P between 1 and 1000 bar is\n", + "dV_dT_mean = (dV_dT_P1 + dV_dT_P2)/2;\t\t\t#[m**(-3)/mol-K]\n", + "delta_S = Cp_mean*math.log(T_2/T_1) - dV_dT_mean*(P_2 - P_1)*10**(5);\t\t\t#[J/mol-K]\n", + "\n", + "print \" The value of entropy change is given by delta_S = %f J/mol-K\"%(delta_S);\n", + "\n", + "\t\t\t# Now let us determine the enthalpy change. We know that\n", + "\t\t\t# dH = Cp*dT + [V - T*(dV/dT)_P]*dP\n", + "\t\t\t# [V - T*(dV/dT)_P] = (V - T*V*Beta) = val (say)\n", + "\t\t\t# At state 1\n", + "val_1 = ((V_T1_P1)*10**(-6))*(1 - (T_1)*(Beta_T1_P1));\t\t\t#[m**(3)/mol]\n", + "\t\t\t# At state 2\n", + "val_2 = ((V_T2_P2)*10**(-6))*(1 - (T_2)*(Beta_T2_P2));\t\t\t#[m**(3)/mol]\n", + "val_mean = (val_1 + val_2)/2;\t\t\t#[m**(3)/mol]\n", + "\n", + "delta_H = Cp_mean*(T_2 - T_1) + val_mean*(P_2-P_1)*10**(5);\t\t\t#[J/mol]\n", + "\n", + "print \" The value of enthalpy change is given by delta_H = %f J/mol\"%(delta_H);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of entropy change is given by delta_S = 5.414201 J/mol-K\n", + " The value of enthalpy change is given by delta_H = 3457.542629 J/mol\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.22 Page Number : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 100 + 273.15;\t\t\t#[K]\n", + "P = 10;\t\t\t#[MPa]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# The volume expansivity is defined as \n", + "\t\t\t# Beta = (1/V)*(del V/del T)_P = (1/V)*(dV/dT)_P\n", + "\t\t\t# From compressed liquid water tables at 100 C and 10 MPa,\n", + "V = 0.0010385;\t\t\t#[m(3)/kg]\n", + "Beta = (1/V)*((0.0010549 - 0.0010245)/(120 - 80));\t\t\t#[K**(-1)] \t\t\t# The values are obtained from the steam table as reported in the book.\n", + "\n", + "print \"The value of volume expansivity is Beta = %e K**-1)\"%(Beta);\n", + "\n", + "\t\t\t#Isothermal compressibility is defined as\n", + "\t\t\t# K_t = -(1/V)*(del V/del T)_T = -(1/V)*(dV/dT)_T\n", + "K_t = -(1/V)*((0.0010361 - 0.0010410)/(15 - 5));\t\t\t#[MPa**(-1)] \t\t\t# The values are obtained from the steam table as reported in the book.\n", + "\n", + "K_t = K_t*10**(-3);\t\t\t#[kPa]\n", + "\n", + "print \"The value of isothermal compressibility is K_t = %e kPa**-1)\"%(K_t);\n", + "\n", + "\t\t\t# Cp - Cv = (T*V*(Beta**(2)))/K_t\n", + "R = (T*V*(Beta**(2)))/K_t;\t\t\t#[kJ/kg-K]\n", + "\n", + "print \"The value of the difference between Cp and Cv is Cp-Cv = %f kJ/kg-K\"%(R);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of volume expansivity is Beta = 7.318247e-04 K**-1)\n", + "The value of isothermal compressibility is K_t = 4.718344e-07 kPa**-1)\n", + "The value of the difference between Cp and Cv is Cp-Cv = 0.439860 kJ/kg-K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.23 Page Number : 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 300 + 273.15;\t\t\t#[K]\n", + "P = 4;\t\t\t#[MPa] \n", + "\n", + "# Calculations and Results\n", + "Cp_0 = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3);\t\t\t#[cal/mol-K]\n", + "Cp_0 = (Cp_0*4.186)/18.015;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t# Cp(T,P) = Cp_0(T,P=0) - T*integral((del**2 V/del T**(2))_P)*dP from limit 0 to P\n", + "\t\t\t# Cp = Cp_0 - T*((del**2 V/del T**2)_Pavg)*(P_2 - P_1)\n", + "\n", + "P_avg = (0+4)/2;\t\t\t#[MPa]\n", + "\n", + "\t\t\t#Using finite difference we get (del**2 V/del T**(2)) = ((V_(T+delta T) - 2*V_T + V_(T-delta T))/(delta_T**(2))\n", + "\t\t\t#(del**2 V/del T**(2))_Pavg = (V_(350 C) + V_(250 C) - 2*V_(300 C))/(delta_T**(2)) = del_2 (say)\n", + "del_2 = (0.13857 + 0.11144 - 2*0.12547)/(50**(2));\t\t\t#[m**(3)/kg-K**2] \t\t\t# The values are obtained from the steam table as reported in the book.\n", + "\n", + "\n", + "Cp = Cp_0 - T*del_2*4000;\t\t\t#[kJ/kg-K]\n", + "\n", + "print \" The value of constant pressure specific heat capacity is Cp = %f kJ/kg-K\"%(Cp);\n", + "\n", + "\t\t\t# At P = 4 MPa\n", + "\t\t\t# Cp = (del H/del T)_P = (H_350 C - H_250 C)/(350 - 250.4)\n", + "\t\t\t# Cp = (3092.5 - 2801.4)/(350 - 250.4) = 2.923 [kJ/kg-K]\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of constant pressure specific heat capacity is Cp = 2.858079 kJ/kg-K\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.24 Page Number : 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 300 + 273.15;\t\t\t#[K]\n", + "P = 2.0;\t\t\t#[MPa]\n", + "\n", + "\t\t\t# At 2 MPa and 250 C \n", + "H_1 = 2902.5;\t\t\t#[kJ/kg]\n", + "\t\t\t# At 2 MPa and 350 C \n", + "H_2 = 3137.0;\t\t\t#[kJ/kg]\n", + "\n", + "# Calculations\n", + "Cp = (H_2 - H_1)/(350 - 250);\t\t\t#[kJ/kg-K]\n", + "\n", + "# Results\n", + "print \" The value of constant pressure specific heat capacity is Cp = %f kJ/kg-K\"%(Cp);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of constant pressure specific heat capacity is Cp = 2.345000 kJ/kg-K\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.25 Page Number : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T = 80 + 273.15;\t\t\t#[K]\n", + "P = 10;\t\t\t#[MPa] \n", + "\n", + "V_1 = 0.0010245;\t\t\t#[m**(3)/kg]\n", + "\t\t\t# At 60 C and 10 MPa\n", + "V_2 = 0.0010127;\t\t\t#[m**(3)/kg]\n", + "\t\t\t# At 100 C and 10 MPa\n", + "V_3 = 0.0010385;\t\t\t#[m**(3)/kg]\n", + "\n", + "# Calculations and Results\n", + "Beta = (1/V_1)*((V_3 - V_2)/(100 - 60));\t\t\t#[K**(-1)]\n", + "\n", + "print \"The value of volume expansivity is Beta = %e K**-1)\"%(Beta);\n", + "\n", + "\t\t\t#Isothermal compressibility is given by\n", + "\t\t\t# K_t = -(1/V)*(del V/del P)_T\n", + "\n", + "\t\t\t# Temperature is kept fixed at 80 C and different pressures are taken to calculate (del V/del P)_T\n", + "\t\t\t# At 80 C and 5 MPa\n", + "V_4 = 0.0010268;\t\t\t#[m**(3)/kg]\n", + "\t\t\t# At 80 C and 10 MPa\n", + "V_5 = 0.0010245;\t\t\t#[m**(3)/kg]\n", + "\t\t\t# At 80 C and 15 MPa\n", + "V_6 = 0.0010222;\t\t\t#[m**(3)/kg]\n", + "\n", + "\t\t\t# K_t = -(1/V)*(del V/del T)_P\n", + "K_t = -(1/V_1)*((V_4 - V_6)/(5 - 15));\t\t\t#[MPa**(-1)]\n", + "K_t = K_t*10**(-6);\t\t\t#[Pa**(-1)]\n", + "\n", + "print \"The value of isothermal compressibility is K_t = %e Pa**-1)\"%(K_t);\n", + "\n", + "\t\t\t# Cp - Cv = (T*V*(Beta**(2)))/K_t\n", + "R = (T*V_1*(Beta**(2)))/K_t;\t\t\t#[J/kg-K]\n", + "\n", + "print \"The value of the difference between Cp and Cv is Cp-Cv = %f J/kg-K\"%(R);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of volume expansivity is Beta = 6.295754e-04 K**-1)\n", + "The value of isothermal compressibility is K_t = 4.489995e-10 Pa**-1)\n", + "The value of the difference between Cp and Cv is Cp-Cv = 319.389628 J/kg-K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.26 Page Number : 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "P_1 = 150;\t\t\t#[bar]\n", + "P_2 = 1;\t\t\t#[bar]\n", + "\n", + "T_1 = 300;\t\t\t#[K]\n", + "T_2 = 260;\t\t\t#[K]\n", + "T_3 = 280;\t\t\t#[K]\n", + "T_4 = 200;\t\t\t#[K]\n", + "T_5 = 120;\t\t\t#[K]\n", + "T_6 = 140;\t\t\t#[K]\n", + "\n", + "H_P1_T1 = 271.8;\t\t\t#[kJ/kg]\n", + "H_P2_T2 = 260.0;\t\t\t#[kJ/kg] \n", + "H_P2_T3 = 280.2;\t\t\t#[kJ/kg]\n", + "H_P1_T4 = 129.2;\t\t\t#[kJ/kg]\n", + "H_P2_T5 = 118.8;\t\t\t#[kJ/kg]\n", + "H_P2_T6 = 139.1;\t\t\t#[kJ/kg]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "\n", + "\n", + "T_new = ((H_P1_T1 - H_P2_T2)/(H_P2_T3 - H_P2_T2))*(T_3 - T_2) + T_2;\t\t\t#[K]\n", + "\n", + "\t\t\t# Therefore Joule-Thomson coefficient is given by,\n", + "meu = (T_1 - T_new)/(P_1 - P_2);\t\t\t#[K/bar]\n", + "\n", + "print \" a).The value of Joule-Thomson coefficient for initial T = 300 K) is %f J/bar\"%(meu);\n", + "\n", + "\t\t\t#(b)\n", + "\n", + "\n", + "T_new_prime = ((H_P1_T4 - H_P2_T5)/(H_P2_T6 - H_P2_T5))*(T_6 - T_5) + T_5;\t\t\t#[K]\n", + "\n", + "\t\t\t# Therefore Joule-Thomson coefficient is given by,\n", + "meu_prime = (T_4 - T_new_prime)/(P_1 - P_2);\t\t\t#[K/bar]\n", + "\n", + "print \" b).The value of Joule-Thomson coefficient for initial T = 200 K) is %f J/bar\"%(meu_prime);\n", + "\n", + "\t\t\t# Therefore the Joule-Thomson coefficient is higher for low initial temperatures and therefore the drop in temperature is more.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The value of Joule-Thomson coefficient for initial T = 300 K) is 0.190046 J/bar\n", + " b).The value of Joule-Thomson coefficient for initial T = 200 K) is 0.468146 J/bar\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.27 Page Number : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 300;\t\t\t#[K] - Temperature\n", + "P = 5;\t\t\t#[atm] - Pressure\n", + "P = P*101325;\t\t\t#[Pa]\n", + "Cp_0 = 35.78;\t\t\t#[J/mol-K] - Smath.tan(math.radiansard specific heat capacity at constant pressure\n", + "B = -50;\t\t\t#[cm**(3)/mol]\n", + "B = B*10**(-6);\t\t\t#[m**(3)/mol]\n", + "\n", + "# Calculations\n", + "\t\t\t# (dB/dT) = 1.0 = dB_dT (say)\n", + "dB_dT = 1.0;\t\t\t#[cm**(3)/mol-K]\n", + "dB_dT = dB_dT*10**(-6);\t\t\t#[m**(3)/mol-K]\n", + "\n", + "\t\t\t# (d**2 B/d T**2) = -0.01 = dB_dT_2 (say)\n", + "dB_dT_2 = -0.01;\t\t\t#[cm**(3)/mol-K**(2)]\n", + "dB_dT_2 = dB_dT_2*10**(-6);\t\t\t#[m**(3)/mol-K**(2)]\n", + "\n", + "Cp = Cp_0 - P*T*(dB_dT_2);\t\t\t#[[J/mol-K]] - Specific heat capacity at constant pressure\n", + "\n", + "\t\t\t#Therefore Joule-Thomson coefficient is given by,\n", + "meu = (1/Cp)*(-B + T*dB_dT);\t\t\t#[K/Pa]\n", + "meu = meu*10**(5);\t\t\t#[K/bar]\n", + "\n", + "# Results\n", + "print \" c).The value of Joule-Thomson coefficient is %f K/bar\"%(meu);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " c).The value of Joule-Thomson coefficient is 0.938341 K/bar\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.30 Page Number : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "den_liq = 13690.;\t\t\t#[kg/m**(3)] - Density of liquid mercury\n", + "den_solid = 14190.;\t\t\t#[kg/m**(3)] - Density of solid mercury\n", + "mp = -38.87;\t\t\t#[C] - Melting point of mercury at pressure of 1 bar\n", + "mp = mp + 273.15;\t\t\t#[K]\n", + "T_req = 0.;\t\t\t#[C] - Required temperature to which the melting point is to be raised\n", + "T_req = T_req + 273.15;\t\t\t#[K]\n", + "H_fus = 11.62;\t\t\t#[kJ/kg] - Latent heat of fusion of mercury\n", + "\n", + "# Calculations\n", + "V_liq = (1/den_liq);\t\t\t#[m**(3)/kg] - Specific volume of liquid mercury\n", + "\n", + "V_solid = (1/den_solid);\t\t\t#[m**(3)/kg] - Specific volume of solid mercury\n", + "\n", + "\t\t\t# (delta P/delta T) = ((P - 1)*100)/(T_req - mp)\n", + "\t\t\t# delta H/(T*delta V) = (H_liq - H_solid)/(T*(V_liq - V_solid)) = del (say)\n", + "d = (H_fus)/(mp*(V_liq - V_solid));\t\t\t#[kPa/K] - delta H/(T*delta V)\n", + "\n", + "\t\t\t#Equating the two sides and then solving we get\n", + "P = (d*(T_req - mp))/100 + 1;\t\t\t#[bar]\n", + "\n", + "# Results\n", + "print \" The required pressure should be %f bar\"%(P);\n", + "\n", + "# answers are correct but vary from book because of rouding error. please calculate manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The required pressure should be 7491.335878 bar\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.31 Page Number : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Calculations and Results\n", + "\t\t\t#(1)\n", + "\t\t\t# At 1 bar\n", + "\t\t\t# Considering the data given at pressure 1 and 1000 bar, we have\n", + "delta_H_fus_1 = ((1000-1)*10**(5)*(273.15-22.6)*3.97*10**(-6))/(14.8+22.6);\t\t\t#[J/mol]\n", + "delta_S_fus_1 = delta_H_fus_1/(273.15-22.6);\t\t\t#[J/mol-K]\n", + "\n", + "print \" 1).The delta_H_fus at 1 bar is %f J/mol\"%(delta_H_fus_1);\n", + "print \" The delta_S_fus at 1 bar is %f J/mol-K\"%(delta_S_fus_1);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t# At 6000 bar\n", + "T_mean = (128.8+173.6)/2;\t\t\t#[C] - Mean temperature\n", + "T_mean = T_mean + 273.15;\t\t\t#[K]\n", + "delta_V_fus_mean = (1.12+1.55)/2;\t\t\t#[cm**(3)/mol]\n", + "\n", + "\t\t\t# Consider the data at pressure of 5000 and 7000 bar we get,\n", + "delta_H_fus_2 = ((7000-5000)*10**(5)*(T_mean*delta_V_fus_mean*10**(-6)))/(173.6-128.8);\t\t\t#[J/mol]\n", + "delta_S_fus_2 = delta_H_fus_2/T_mean;\t\t\t#[J/mol-K]\n", + "\n", + "print \" 2).The delta_H_fus at 6000 bar is %f J/mol\"%(delta_H_fus_2);\n", + "print \" The delta_S_fus at 6000 bar is %f J/mol-K\"%(delta_S_fus_2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1).The delta_H_fus at 1 bar is 2656.921969 J/mol\n", + " The delta_S_fus at 1 bar is 10.604358 J/mol-K\n", + " 2).The delta_H_fus at 6000 bar is 2529.050223 J/mol\n", + " The delta_S_fus at 6000 bar is 5.959821 J/mol-K\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.32 Page Number : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "H_fus = 80;\t\t\t#[cal/g] - Heat of fusion at 0 C and 1 atm pressure\n", + "T = 0+273.15;\t\t\t#[K] - Temperature\n", + "vol_ratio = 1.091;\t\t\t# Ratio of the specific volume of ice and water.\n", + "sp_vol = 0.001;\t\t\t#[m**(3)/kg] - Specific volume of saturated liquid water.\n", + "\n", + "# Calculations\n", + "\t\t\t# The clapeyron equation can be written as\n", + "\t\t\t# (dP/dT)_sat = T*delta V_LS/(delta H_LS) = (T*(V_ice - V_water))/(H_ice - H_water)\n", + "dP_dT = (T*(vol_ratio - 1)*10**(-3))/(-H_fus*4.186);\t\t\t#[K/kPa]\n", + "\n", + "# Results\n", + "print \"The value of dT/dP)_sat is %e K/kPa\"%(dP_dT);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of dT/dP)_sat is -7.422554e-05 K/kPa\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.33 Page Number : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "P = 2;\t\t\t#[atm] - Surrounding pressure\n", + "bp_water = 100 + 273.15;\t\t\t#[K] - Boiling point of water at 1 atm pressure\n", + "delta_H_vap = 2257;\t\t\t#[kJ/kg] - Enthalpy of vaporization\n", + "delta_H_vap = delta_H_vap*18.015;\t\t\t#[J/mol]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations\n", + "\t\t\t# The clapeyron equation is given by\n", + "\t\t\t# math.log(P_2_sat/P_1_sat) = (-delta H_vap/R)*(1/T_2 - 1/T_1)\n", + "P_1_sat = 1;\t\t\t#[atm]\n", + "P_2_sat = P;\n", + "T_1 = bp_water;\n", + "\n", + "\t\t\t# Solving the above equation\n", + "T_2 = 1/((math.log(P_2_sat/P_1_sat))/(-delta_H_vap/R) + (1/T_1));\t\t\t#[K]\n", + "T_2 = T_2 - 273.15;\t\t\t#[C]\n", + "\n", + "# Results\n", + "print \" The boiling point of water at a pressure of 2 atm is %f C\"%(T_2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The boiling point of water at a pressure of 2 atm is 120.836990 C\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.34 Page Number : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T_1 = 0.01 +273.15;\t\t\t#[K]\n", + "T_2 = 1 + 273.15;\t\t\t#[K]\n", + "P_sat_1 = 0.611;\t\t\t#[kPa] - P_sat at temperature T_1\n", + "P_sat_2 = 0.657;\t\t\t#[kPa] - P_sat at temperature T_2\n", + "Mol_wt = 18.015;\t\t\t#[g/mol] - Molecular weight of water\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results \n", + " # The clapeyron equation is given by\n", + "\t\t\t# math.log(P_sat_2/P_sat_1) = (-delta H_LV/R)*(1/T_2 - 1/T_1)\n", + "\n", + "\t\t\t# Solving the above equation\n", + "delta_H = -(math.log(P_sat_2/P_sat_1)/(1/T_2 - 1/T_1))*R;\t\t\t#[J/mol]\n", + "delta_H = delta_H/Mol_wt;\t\t\t#[kJ/kg]\n", + "\n", + "print \" The enthalpy of vaporization is %f kJ/kg\"%(delta_H);\n", + "\n", + "\t\t\t# Entropy of vaporization is given by\n", + "S_vap = delta_H/T_2;\t\t\t#[kJ/kg-K]\n", + "print \" The entropy of vaporization is %f kJ/kg-K\"%(S_vap);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy of vaporization is 2533.991278 kJ/kg\n", + " The entropy of vaporization is 9.243083 kJ/kg-K\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.35 Page Number : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 100. + 273.15;\t\t\t#[K]\n", + "\t\t\t# (dT/dP)_sat = (1/27.12) K/mm\n", + "dT_dP = (1/27.12);\t\t\t#[K/mm]\n", + "dT_dP = dT_dP*(760./101325);\t\t\t#[K/Pa]\n", + "\n", + "# Calculations\n", + "\t\t\t# The clapeyron equation is given by\n", + "\t\t\t# (dP/dT)_sat = (-delta H_LV)/(T*delta V_LV)\n", + "\t\t\t# delta H_LV = T*delta V_LV*(dP/dT)_sat\n", + "\n", + "\t\t\t# (dP/dT)_sat = 1/(dT/dP)_sat\n", + "dP_dT = 1/dT_dP;\t\t\t#[Pa/K]\n", + "\n", + "\t\t\t# From saturated steam table at 100 C\n", + "V_vap = 1.6729;\t\t\t#[m**(3)/kg]\n", + "V_liq = 0.001044;\t\t\t#[m**(3)/kg]\n", + "delta_V = V_vap - V_liq;\t\t\t#[m**(3)/kg]\n", + "\n", + "\t\t\t# Therefore delta_H_LV is given by\n", + "delta_H_LV = T*delta_V*(dP_dT);\t\t\t#[J/kg]\n", + "delta_H_LV = delta_H_LV*10**(-3);\t\t\t#[kJ/kg]\n", + "\n", + "# Results\n", + "print \" The heat of vaporization of water is %f kJ/kg\"%(delta_H_LV);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The heat of vaporization of water is 2255.667174 kJ/kg\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.36 Page Number : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T_1 = 100 + 273.15;\t\t\t#[K]\n", + "P_1 = 1.01325;\t\t\t#[bar]\n", + "T_2 = 98 + 273.15;\t\t\t#[K]\n", + "P_2 = 0.943;\t\t\t#[bar]\n", + "V_vap = 1.789;\t\t\t#[m**(3)] - Volume in vapour phase\n", + "vessel_vol = 1.673;\t\t\t#[m**(3)] - Volume of the vessel\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t\n", + "x = vessel_vol/V_vap;\n", + "\n", + "\t\t\t\n", + "m_vap = x;\t\t\t#[kg] - Mass of saturated vapour\n", + "m_liq = (1 - x);\t\t\t#[kg] - Mass of saturated liquid\n", + "\n", + "print \" The amount of vapour condensed is %f kg\"%(m_liq);\n", + "\n", + "\t\t\t# The clapeyron equation is given by\n", + "\t\t\t# math.log(P_2_sat/P_1_sat) = (-delta H_LV/R)*(1/T_2 - 1/T_1)\n", + "\n", + "\t\t\t# Solving the above equation\n", + "delta_H = -(math.log(P_2/P_1)/(1/T_2 - 1/T_1))*R;\n", + "delta_H = delta_H/18.015;\t\t\t#[kJ/kg]\n", + "\n", + "print \" The latent heat of vaporization is %f kJ/kg\"%(delta_H);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The amount of vapour condensed is 0.064841 kg\n", + " The latent heat of vaporization is 2296.240786 kJ/kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.37 Page Number : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.integrate import quad \n", + "from scipy.optimize import *\n", + "\n", + "\n", + "# Variables\n", + "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n", + "delta_H_gas = -52.23;\t\t\t#[kcal/mol] - Enthalpy of formation of C2H5OH(gas)\n", + "delta_H_liq = -66.35;\t\t\t#[kcal/mol] - Enthalpy of formation of C2H5OH(liq)\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# For ethanol(g) [T is in K and Cp_0 in cal/mol-K]\n", + "\t\t\t# Cp_0 = 4.75 + 5.006*10**(-2)*T - 2.479*10**(-5)*T**(2) + 4.79*10**(-9)*T**(3)\n", + "\n", + "\t\t\t# For ethanol(l) [T is in K and Cp_0 in cal/mol-K]\n", + "\t\t\t# Cp_0 = 67.29 - 0.343*T - 6.94*10**(-4)*T**(2)\n", + "\n", + "\t\t\t# The vaporization of a liquid can be written as C2H5OH(liq) - C2H5OH(gas)\n", + "\t\t\t# Since the pressure is 1 atm therefore the standard data can be used\n", + "delta_H_298 = delta_H_gas - delta_H_liq;\t\t\t#[kcal/mol]\n", + "delta_H_298 = delta_H_298*1000;\t\t\t#[cal/mol]\n", + "delta_a = 4.75 - 67.29;\n", + "delta_b = 5.006*10**(-2) - (-0.343);\n", + "delta_c = -2.479*10**(-5) - 6.94*10**(-4);\n", + "delta_d = 4.79*10**(-9);\n", + "\n", + "\t\t\t# The standard enthalpy of vaporization at a temperature T is given by\n", + "\n", + "def f31(T): \n", + "\t return delta_a + delta_b*T + delta_c*T**(2) + delta_d*T**(3)\n", + "\n", + "\t\t\t# delta_H_T = delta_H_298 + quad(f31,T_1,T)[0]\n", + "\n", + "\n", + "\t\t\t# Therefore the standard enthalpy of vaporization at a temperature T = 283 K is given by\n", + "T_2 = 283;\t\t\t#[K]\n", + "\n", + "def f32(T): \n", + "\t return delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3)\n", + "\n", + "delta_H_283 = delta_H_298 + quad(f32,T_1,T_2)[0]\n", + "\n", + "\n", + "\t\t\t# Therefore the standard enthalpy of vaporization at a temperature T = 348 K is given by\n", + "T_3 = 348;\t\t\t#[K]\n", + "\n", + "def f33(T): \n", + "\t return delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3)\n", + "\n", + "delta_H_348 = delta_H_298 + quad(f33,T_1,T_3)[0]\n", + "\n", + "\n", + "print \" The value of enthalpy of vaporization at 283 K is %f cal/mol\"%(delta_H_283);\n", + "print \" The value of enthalpy of vaporization at 298.15 K is %f cal/mol\"%(delta_H_298);\n", + "print \" The value of enthalpy of vaporization at 348 K is %f cal/mol\"%(delta_H_348);\n", + "\n", + "\n", + "\t\t\t# Solving the above equatio manually we get,\n", + "\t\t\t# delta_H_vap = 1.1975*10**(-9)*T**(4) - 2.396*10**(-4)*T**(3) + 0.1965*T**(2) - 62.54*T + 21639.54 \n", + "\t\t\t# Solving for 'T' at which 'delta_H_vap' = 0\n", + "def f(T): \n", + "\t return 1.1975*10**(-9)*T**(4)-2.396*10**(-4)*T**(3)+0.1965*T**(2)-62.54*T + 21639.54\n", + "T_0 = fsolve(f,500)\n", + "\n", + "\n", + "\n", + "\n", + "print \" The temperature obtained by equating standard enthalpy of vaporization equal to zero is %f K\"%(T_0);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of enthalpy of vaporization at 283 K is 14255.030925 cal/mol\n", + " The value of enthalpy of vaporization at 298.15 K is 14120.000000 cal/mol\n", + " The value of enthalpy of vaporization at 348 K is 13593.385895 cal/mol\n", + " The temperature obtained by equating standard enthalpy of vaporization equal to zero is 635.058887 K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.38 Page Number : 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "T = 300 + 273.15;\t\t\t#[K] - Temperature\n", + "P = 9000;\t\t\t#[kPa] - Pressure\n", + "P_sat = 8592.7;\t\t\t#[kPa] - Vapour pressure of saturated water at 300 C\n", + "f_sat = 6738.9;\t\t\t#[kPa] - Fugacity of saturated water at 300 C\n", + "V_liq = 25.28;\t\t\t#[cm**(3)/mol] - Molar volume of water in liquid phase\n", + "V_liq = V_liq*10**(-6);\t\t\t# [m**(3)/mol]\n", + "V_vap = 391.1;\t\t\t#[cm**(3)/mol] - Molar volume of water in vapour phase\n", + "V_vap = V_vap*10**(-6);\t\t\t# [m**(3)/mol]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations\n", + "\t\t\t# At 300 C and 9000 kPa water is a compressed liquid and its fugacity is given by\n", + "\t\t\t# f = f_sat*exp[V_liq*(P - P_sat)/R*T]\n", + "fugacity = f_sat*math.exp((V_liq*(P - P_sat)*1000)/(R*T));\n", + "\n", + "# Results\n", + "print \" The fugacity of water at 9000 kPa is %f kPa\"%(fugacity);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity of water at 9000 kPa is 6753.477111 kPa\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.39 Page Number : 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 200 + 273.15;\t\t\t#[K] - Temperature\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\t\t\t# From steam table at 200 C as reported in the book\n", + "P_sat = 1.5538;\t\t\t#[MPa] - Vapour pressure of saturated steam\n", + "H_vap = 2793.2;\t\t\t#[kJ/kg] - Enthalpy of saturated steam in vapour phase\n", + "S_vap = 6.4323;\t\t\t#[kJ/kg-K] - Entropy of saturated steam in vapour phase\n", + "\n", + "# Calculations\n", + "G_sat = H_vap - T*S_vap;\t\t\t#[kJ/kg] - Gibbs free energy\n", + "G_sat = G_sat*18.015;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# Now let us calculate the Gibbs free energy at the lowest pressure available in superheated steam tables at 200 C\n", + "\t\t\t# At 200 C and 0.01 MPa as reported in the book\n", + "H = 2879.5;\t\t\t#[kJ/kg] - Enthalpy\n", + "S = 8.9038;\t\t\t#[kJ/kg-K] - Entropy\n", + "G_ig = H - T*S;\t\t\t#[kJ/kg] - Gibbs free energy\n", + "G_ig = G_ig*18.015;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# Integrating from ideal gas state at 200 C and 0.01 MPa to saturated vapour at 200 C we get\n", + "\t\t\t# G_sat - G_ig = R*T*math.log(f_sat/f_ig)\n", + "\n", + "\t\t\t# Under the ideal gas condition the pressure is small therefore f_ig = P = 0.01 MPa\n", + "f_ig = 0.01;\t\t\t#[MPa]\n", + "\n", + "\t\t\t# Solving the above equation\n", + "f_sat = f_ig*(math.exp((G_sat - G_ig)/(R*T)));\t\t\t#[MPa]\n", + "\n", + "# Results\n", + "print \" The fugacity of saturated steam at 200 C is %f MPa\"%(f_sat);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity of saturated steam at 200 C is 1.426074 MPa\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.40 Page Number : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 320 + 273.15;\t\t\t#[K]\n", + "P_1 = 70;\t\t\t#[bar]\n", + "P_2 = 170;\t\t\t#[bar]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#(a)\n", + "\t\t\t# dG = R*T*dmath.log(f)\n", + "\t\t\t# G - G_ig = R*T*math.log(f/f_ig)\n", + "\n", + "\t\t\t# From steam table the low pressure that is available is 1 kPa.\n", + "f_ig = 1;\t\t\t#[kPa] - Assuming ideal gas behaviour at such low pressure\n", + "\n", + "\t\t\t# At 1 kPa (under saturated conditions)\n", + "P_sat = 112.891;\t\t\t#[bar]\n", + "\t\t\t# Therefore at both 1 kPa and 70 bar the stem is superheated and byond a pressure of 112.891 bar it is compressed liquid.\n", + "\n", + "\t\t\t# For superheated steam table at 1 kPa and 320 C, as repoted in the book\n", + "H_1 = 3117.08;\t\t\t#[kJ/kg] - Enthalpy\n", + "S_1 = 10.41232;\t\t\t#[kJ/kg-K] - Entropy\n", + "\n", + "\t\t\t# For superheated steam table at 70 bar and 320 C, as repoted in the book\n", + "H_2 = 2916.92;\t\t\t#[kJ/kg] - Enthalpy\n", + "S_2 = 6.0651;\t\t\t#[kJ/kg-K] - Entropy\n", + "\n", + "\t\t\t# At 70 bar and 320 C,\n", + "G = H_2 - T*S_2;\t\t\t#[kJ/kg] - Gibbs free energy\n", + "\t\t\t# At 1 kPa and 320 C\n", + "G_ig = H_1 - T*S_1;\t\t\t#[kJ/kg] - Gibbs free energy\n", + "\n", + "\t\t\t# math.log(f/f_ig) = (G - G_ig)/(R*T)\n", + "f = f_ig*(math.exp((G - G_ig)*18/(R*T)));\t\t\t#[kPa]\n", + "f = f*10**(-2);\t\t\t#[bar]\n", + "\n", + "\t\t\t# At 70 bar\n", + "phi = f/P_1;\n", + "\n", + "print \" a).The fugacity of steam at 320 C and 70 bar is %f bar\"%(f);\n", + "print \" The fugacity coefficient at 320 C and 70 bar is phi = %f\"%(phi);\n", + "\n", + "\t\t\t#(b)\n", + "\t\t\t# Now consider saturated steam at 320 C. We have\n", + "P_sat = 112.891;\t\t\t#[bar]\n", + "V_liquid = 1.5;\t\t\t#[cm**(3)/mol] - Molar vlume of saturated liquid\n", + "V_liquid = V_liquid*10**(-6);\t\t\t#[m**(3)/mol]\n", + "V_vapour = 15.48;\t\t\t#[cm**(3)/mol] - Molar vlume of saturated vapour\n", + "U_liqid = 1445.7;\t\t\t#[Kj/kg] - Internal energy of satuarted liquid\n", + "U_vapour = 2528.9;\t\t\t#[kJ/kg] - Internal energy of satuarted vapour\n", + "H_liquid = 1462.6;\t\t\t#[kJ/kg] - Enthalpy of saturated liquid\n", + "H_vapour = 2703.7;\t\t\t#[kJ/kg] - Enthalpy of saturated vapour\n", + "S_liquid = 3.45;\t\t\t#[kJ/kg-K] - Entropy of saturated liquid\n", + "S_vapour = 5.5423;\t\t\t#[kJ/kg-K] - Entropy of saturated vapour\n", + "\n", + "\t\t\t# Now let us calculate Gibbs free energy of saturated liquid and saturated vapour\n", + "G_liquid = H_liquid - T*S_liquid;\t\t\t#[kJ/kg]\n", + "G_vapour = H_vapour - T*S_vapour;\t\t\t#[kJ/kg]\n", + "\t\t\t# Note that under saturated conditions\n", + "\t\t\t# G_sat = G_liquid = G_vapour\n", + "G_sat = G_liquid;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t# math.log(f_sat/f_ig) = (G_sat - G_ig)/(R*T)\n", + "f_sat = f_ig*(math.exp((G_sat - G_ig)*18/(R*T)));\t\t\t#[kPa]\n", + "f_sat = f_sat*10**(-2);\t\t\t#[bar]\n", + "\n", + "phi_sat = f_sat/P_sat;\n", + "\n", + "\t\t\t# And now the fugacity is to be determined at 320 C and P = 170 bar. We know the following relation for compressed liquid.\n", + "\t\t\t# f_CL = f_sat*exp(V_liquid*(P-P_sat)/(R*T))\n", + "f_CL = f_sat*math.exp(V_liquid*18*(P_2-P_sat)*10**(5)/(R*T));\t\t\t#[bar]\n", + "\n", + "\t\t\t# Therefore the fugacity coefficient at 170 bar and 320 C is given by\n", + "phi_2 = f_CL/P_2;\n", + "\n", + "print \" b).The fugacity of steam at 320 C and 170 bar is %f bar\"%(f_CL);\n", + "print \" The fugacity coefficient at 320 C and 170 bar is phi = %f\"%(phi_2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a).The fugacity of steam at 320 C and 70 bar is 58.913361 bar\n", + " The fugacity coefficient at 320 C and 70 bar is phi = 0.841619\n", + " b).The fugacity of steam at 320 C and 170 bar is 86.552966 bar\n", + " The fugacity coefficient at 320 C and 170 bar is phi = 0.509135\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.41 Page Number : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "# Variables\n", + "T = 300 + 273.15;\t\t\t#[K]\n", + "P_1 = 12500*10**(3);\t\t\t#[Pa]\n", + "P_2 = 8581*10**(3);\t\t\t#[Pa]\n", + "P_3 = 300*10**(3);\t\t\t#[Pa]\n", + "V_liq = 1.404;\t\t\t#[cm**(3)/g] - Specific volume of liquid\n", + "V_liq = (V_liq/10**(6))*18.015;\t\t\t#[m**(3)/mol]\n", + "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n", + "\n", + "# Calculations and Results\n", + "\t\t\t# state 1: 300 C, 12500 kPa\n", + "\t\t\t# state 2: 300 C, 8581 kPa\n", + "\t\t\t# state 3: 300 C, 300 kPa\n", + "\n", + "\t\t\t# From state 1 to state 2 the system is liquid water and if the molar volume of liquid is assumed costant we can write\n", + "\t\t\t# G_2 - G_1 = V_liq*(P_2 - P_1)\n", + "\t\t\t# G_2 - G_1 = R*Tmath.log(f_2/f_1)\n", + "\t\t\t# Comparing the above two equations we get\n", + "\t\t\t# (f_2/f_1) = exp((V_liq*(P_2 - P_1)/(R*T))\n", + "f2_f1 = math.exp((V_liq*(P_2 - P_1)/(R*T))); \t\t\t# (f_2/f_1) = f2_f1 (say)\n", + "\n", + "\t\t\t# In state 2 the fugacity of liquid is same as that of saturated vapour and for the vapour phase change from state 2 to 3 the fugacity ratio is calculated using \n", + "\t\t\t# G_3 - G_2 = R*Tmath.log(f_3/f_2)\n", + "\n", + "\t\t\t# At 300 C, 8581 kPa \n", + "H_liq_2 = 2749.0;\t\t\t#[kJ/kg]\n", + "S_vap_2 = 5.7045;\t\t\t#[kJ/kg-K]\n", + "G_vap_2 = -520.53;\t\t\t#[kJ/kg]\n", + "G_vap_2 = G_vap_2*18.015;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# At 300 C, 300 kPa \n", + "H_3 = 3069.3;\t\t\t#[kJ/kg]\n", + "S_3 = 7.7022;\t\t\t#[kJ/kg-K]\n", + "G_3 = -1345.22;\t\t\t#[kJ/kg]\n", + "G_3 = G_3*18.015;\t\t\t#[J/mol]\n", + "\n", + "\t\t\t# Substituting and solving the equation G_3 - G_2 = R*Tmath.log(f_3/f_2)\n", + "f3_f2 = math.exp((G_3 - G_vap_2)/(R*T));\t\t\t# (f_3/f_2) = f3_f2 (say)\n", + "\n", + "\t\t\t# (f_3/f_1) = (f_3/f_2)*(f_2/f_1)\n", + "f3_f1 = f3_f2*f2_f1;\n", + "\n", + "print \" The ratio of fugacity in the final state to that in the initial state is given by f3/f2 = %f\"%(f3_f2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The ratio of fugacity in the final state to that in the initial state is given by f3/f2 = 0.044255\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb new file mode 100755 index 00000000..6b83d68c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb @@ -0,0 +1,752 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8df6804e24ffba947b26128cacd98ede56f82be4a3089c7567d672249f51ebda" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "\n", + "Chapter 8 : Thermodynamic Cycles" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.1 Page Number : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "P_1 = 30;\t\t\t#[bar]\n", + "P_2 = 0.04;\t\t\t#[bar]\n", + "\n", + "\t\t\t#(1).Carnot cycle\n", + "\t\t\t#It has been reported in the book that at 30 bar pressure (saturated) :\n", + "H_liq_1 = 1008.42;\t\t\t#[kJ/kg]\n", + "H_vap_1 = 2804.2;\t\t\t#[kJ/kg]\n", + "S_liq_1 = 2.6457;\t\t\t#[kJ/kg-K]\n", + "S_vap_1 = 6.1869;\t\t\t#[kJ/kh-K]\n", + "\t\t\t#Therefore, H_1 = H_liq_1, H_2 = H_vap_1, S_1 = S_liq_1 and S_2 = S_vap_1\n", + "H_1 = H_liq_1;\n", + "H_2 = H_vap_1;\n", + "S_1 = S_liq_1;\n", + "S_2 = S_vap_1;\n", + "\n", + "#At 0.04 bar pressure (saturated) :\n", + "H_liq_2 = 121.46;\t\t\t#[kJ/kg]\n", + "H_vap_2 = 2554.4;\t\t\t#[kJ/kg]\n", + "S_liq_2 = 0.4226;\t\t\t#[kJ/kg-K]\n", + "S_vap_2 = 8.4746;\t\t\t#[kJ/kh-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Dryness fraction at state 3 can be found the fact that S_3 = S_2 \n", + "x_3 = (S_2 - S_liq_2)/(S_vap_2 - S_liq_2);\n", + "H_3 = H_liq_2*(1 - x_3) + x_3*H_vap_2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Dryness fraction at state 4 can be found the fact that S_4 = S_1\n", + "x_4 = (S_1 - S_liq_2)/(S_vap_2 - S_liq_2);\n", + "H_4 = H_liq_2*(1 - x_4) + x_4*H_vap_2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work done by turbine W_tur = -delta_H = -(H_3 - H_2)\n", + "W_tur = H_2 - H_3;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work supplied by boiler,\n", + "q_H = H_2 - H_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work transfer in compressor is given by\n", + "W_com = -(H_1 - H_4);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Efficiency can now be calculated as\n", + "\t\t\t#n = (Net work done/Work supplied by boiler)\n", + "n_carnot = (W_tur + W_com)/q_H;\n", + "\n", + "\t\t\t#Efficiency of the Carnot cycle can also be determined from the formula\n", + "\t\t\t# n = 1 - (T_L/T_H), Where T_L is saturated temperature at 0.04 bar and T_H is saturated temperature at 30 bar\n", + "\n", + "print \"1.Carnot cycle\";\n", + "print \"The work done by the turbine is %f kJ/kg\"%(W_tur);\n", + "print \"The heat transfer in the boiler is %f kJ/kg\"%(q_H);\n", + "print \"The cycle efficiency is %f\"%(n_carnot);\n", + "\n", + "\t\t\t#(2).Rankine cycle\n", + "\t\t\t#The enthalpies at state 2 and 3 remain as in the Carnot cycle\n", + "\t\t\t#Saturated liquid enthalpy at 0.04 bar is \n", + "H_4_prime = H_liq_2;\n", + "\n", + "\t\t\t#Saturated liquid volume at 0.04 bar as reported in the book is\n", + "V_liq = 0.001004;\t\t\t#[m**(3)/kg]\n", + "\t\t\t#Work transfer in pump can be calculated as\n", + "W_pump = -V_liq*(P_1 - P_2)*100;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work transfer around pump gives, W_pump = -delta_H = -(H_1_prime - H_4_prime);\n", + "H_1_prime = H_4_prime - W_pump;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Heat supplied to boiler is\n", + "q_H_prime = H_2 - H_1_prime;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work done by turbine is\n", + "W_tur_prime = H_2 - H_3;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Efficiency can now be calculated as\n", + "\t\t\t#n = (Net work done/Heat input)\n", + "n_rankine = (W_tur_prime + W_pump)/q_H_prime;\t\t\t#\n", + "\n", + "print \"2.Rankine cycle\";\n", + "print \"The work done by the turbine is %f kJ/kg\"%(W_tur_prime);\n", + "print \"The heat transfer in the boiler is %f kJ/kg\"%(q_H_prime);\n", + "print \"The cycle efficiency is %f\"%(n_rankine);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.Carnot cycle\n", + "The work done by the turbine is 941.036567 kJ/kg\n", + "The heat transfer in the boiler is 1795.780000 kJ/kg\n", + "The cycle efficiency is 0.404166\n", + "2.Rankine cycle\n", + "The work done by the turbine is 941.036567 kJ/kg\n", + "The heat transfer in the boiler is 2679.732016 kJ/kg\n", + "The cycle efficiency is 0.350046\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.2 Page Number : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_max = 700+273.15;\t\t\t#[K] - Maximum temperature.\n", + "P_boiler = 10*10**(6);\t\t\t#[Pa] - Constant pressure in the boiler\n", + "P_condenser = 10*10**(3);\t\t\t#[Pa] - Constant pressure in the condenser\n", + "\n", + "\t\t\t#At state 2 i.e, at 700 C and 10 MPa,it has been reported in the book that from steam table\n", + "S_2 = 7.1687;\t\t\t#[kJ/kg-K] - Entropy\n", + "H_2 = 3870.5;\t\t\t#[kJ/kg] - Enthalpy\n", + "\n", + "\t\t\t#At state 3 i.e, at 700 C and 10 KPa,\n", + "S_3 = S_2;\t\t\t#[kJ/kg-K]- Entropy \n", + "\n", + "\t\t\t#For sturated steam at 10 kPa, it has been reported in the book that from steam table\n", + "S_liq = 0.6493;\t\t\t#[kJ/kg-K]- Entropy of saturated liquid\n", + "S_vap = 8.1502;\t\t\t#[kJ/kg-K] - Enthalpy of saturated liquid\n", + "\t\t\t#Therefore steam is saturated and its dryness factor can be calculated as\n", + "x = (S_2 - S_liq)/(S_vap - S_liq);\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#The enthalpy at state 3 is now calculated. For steam at 10 kPa,it has been reported in the book that from steam table\n", + "H_liq = 191.83;\t\t\t#[kJ/kg]\n", + "H_vap = 2584.7;\t\t\t#[kJ/kg]\n", + "\t\t\t#Therefore enthalpy at state 3 is\n", + "H_3 = H_liq*(1-x) + H_vap*x;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work done by the turbine \n", + "W_tur = -(H_3 - H_2);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Now we have to calculate work input to the pump\n", + "\t\t\t#State 4:Saturated liquid at 10 kPa\n", + "\t\t\t#State 4:Compressed liquid at 10 MPa\n", + "\t\t\t#Since volume of liquid does not get affected by pressure we take volume of saturated liquid at 10 kPa,\n", + "V_liq = 0.001010;\t\t\t#[m**(3)/kg]\n", + "\n", + "\t\t\t#Work transfer in the pump is\n", + "W_pump = -V_liq*(P_boiler - P_condenser)*10**(-3);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Energy balance around pump gives, W_pump = -delta_H = -(H_1 - H_4)\n", + "H_4 = H_liq;\t\t\t# Enthalpy at state 4 (saturated liquid at 10 kPa)\n", + "H_1 = H_4 - W_pump;\t\t\t#[kJ/kg]\n", + " \n", + "\t\t\t#Heat supplied to boiler is\n", + "q_H = H_2 - H_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Efficiency can now be calculated as\n", + "\t\t\t#n = (Net work done/Heat input)\n", + "n_rankine = (W_tur + W_pump)/q_H;\n", + "\n", + "print \"The efficiency of the Rankine cycle is found to be %f\"%(n_rankine);\n", + "\n", + "\t\t\t#Now let us determine the efficiency of Carnot cycle. The maximun temperature is 700 C and minimum temperature is that of saturated steam at 10 kPa,\n", + "T_min = 45.81 + 273.15;\t\t\t#[K] - From steam table as reported in the book\n", + "n_carnot = 1-(T_min/T_max);\n", + "\t\t\t#Note that the efficiency of Rankine cycle is less than that of carnot cycle" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the Rankine cycle is found to be 0.433088\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.3 Page Number : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "W = 1.1;\t\t\t#[kW] - Work done per ton of refrigeration \n", + "\t\t\t#1 ton refrigeration = 3.517 kW, therefore\n", + "H = 3.517;\t\t\t#[kW] - Heat absorbed\n", + "T_low = -30 + 273.15;\t\t\t#[K] - Low temperature maintained\n", + "\n", + "# Calculations\n", + "\t\t\t#COP can be calculated as\n", + "\t\t\t#COP = (Heat absorbed/Work done)\n", + "COP = H/W;\n", + "\n", + "\t\t\t#For reversed carnot cycle, COP = T_low/(T_high - T_low). Solving this we get\n", + "T_high = (T_low/COP) + T_low;\t\t\t#[K] - Higher temperature\n", + "\n", + "\t\t\t#Heat rejected is\n", + "H_rej = W + H;\t\t\t#[kW];\n", + "\n", + "# Results\n", + "print \"The COP is %f\"%(COP);\n", + "print \"The higher temperature of the cycle is %f K\"%(T_high);\n", + "print \"The heat rejected per ton of refrigeration is %f kW\"%(H_rej);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The COP is 3.197273\n", + "The higher temperature of the cycle is 319.199190 K\n", + "The heat rejected per ton of refrigeration is 4.617000 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.4 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_high = 20 + 273.15;\t\t\t#[K] - High temperature\n", + "T_low = 0 + 273.15;\t\t\t#[K] - Low temperature\n", + "Q_H = 10;\t\t\t#[kW] - Heat supplied\n", + "\n", + "# Calculations\n", + "\t\t\t#If 'Q_H' is the rate at which heat is taken from surrounding and 'W' is the rate at which work is done,then\n", + "\t\t\t# Q_H = W + Q_L\n", + "\t\t\t#(Q_H/Q_L) = (T_high/T_low)\n", + "\t\t\t#Also for a reversible cycle, (Q_H/Q_L) = 1 + (W/Q_L). Solving we get,\n", + "Q_L = (T_low/T_high)*Q_H;\t\t\t#[kW]\n", + "W = (Q_H - Q_L) ;\t\t\t#[kW]\n", + " \n", + "# Results\n", + "print \"The minimum power required is %f kW\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum power required is 0.682245 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.5 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_high = 40 + 273.15;\t\t\t#[K] - High temperature\n", + "T_low = -20 + 273.15;\t\t\t#[K] - Low temperature\n", + "C = 10;\t\t\t#[tons of refrigeration] - Capacity\n", + "\t\t\t#1 ton refrigeration = 3.517 kW, therefore\n", + "H = C*3.517;\t\t\t#[kW] - Heat absorbed\n", + "\n", + "# Calculations\n", + "\t\t\t#For reversed carnot cycle, COP = T_low/(T_high - T_low)\n", + "COP = T_low/(T_high - T_low);\n", + "\n", + "\t\t\t# COP = (Refrigerating effect)/(Work input), therefore power required is given by\n", + "P = (H/COP);\t\t\t#[kW]\n", + "\n", + "# Results\n", + "print \"The COP is %f\"%(COP);\n", + "print \"The power required is %f kW\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The COP is 4.219167\n", + "The power required is 8.335769 kW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.6 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "COP = 4;\t\t\t#Coefficient of performance\n", + "P = 10;\t\t\t#[kW] - Work done on the cycle\n", + "\n", + "# Calculations\n", + "\t\t\t#For reversed carnot cycle, COP = T_low/(T_high - T_low)\n", + "\t\t\t#ratio = (T_high/T_low),therefore\n", + "ratio = -1/(COP + 1);\n", + "\n", + "\t\t\t# Refrigerating effect = (COP)*Work input, therefore refrigeration is given by\n", + "H = COP*P;\t\t\t#[kW]\n", + "\n", + "\t\t\t#Maximum refrigearation in tons is given by\n", + "H_max = (H/3.517);\n", + "\n", + "# Results\n", + "print \"The maximum refrigeration value is %f ton\"%(H_max);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum refrigeration value is 11.373330 ton\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.7 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "m = 0.6;\t\t\t#[kg/s] - mass flow rate\n", + "T_low = -20+273.15;\t\t\t#[K] - Temperature at which vapour enters the compressor\n", + "T_high = 30+273.15;\t\t\t#[K] - Temperature at which vapour leaves the condenser\n", + "\n", + "\t\t\t#From saturated refrigeration-12 tables we get,at -20 C\n", + "H_1 = 178.74;\t\t\t#[kJ/kg] - (H_1 = H_vap)\n", + "P_1 = 0.15093;\t\t\t#[MPa] - (P_1 = P_sat)\n", + "P_4 = P_1;\n", + "S_1 = 0.7087;\t\t\t#[kJ/kg-K] - (S_1 = S_vap)\n", + "S_2 = S_1;\n", + "\n", + "\t\t\t#At 30 C\n", + "P_2 = 0.7449;\t\t\t#[MPa] - (P_2 = P_sat)\n", + "P_3 = P_2;\n", + "H_3 = 64.59;\t\t\t#[kJ/kg] - (H_3 = H_liq)\n", + "H_4 = H_3;\n", + "S_3 = 0.24;\t\t\t#[kJ/kg-K] - (S_3 = S_liq)\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#It is assumed that presssure drop in the evaporator and condenser are negligible. The heat transfer rate in the evaporator is\n", + "Q_L = m*(H_1 - H_4);\n", + "\n", + "print \"The heat transfer rate in the evaporator is %f kW\"%(Q_L);\n", + "\n", + "\t\t\t#At state 2 (P = 0.7449 MPa and S = 0.7087 kJ/kg-K) and looking in the superheated tables we have to calculate the enthalpy at state 2\n", + "\n", + "\t\t\t#At P = 0.7 MPa and S = 0.6917 kJ/kg-K,\n", + "H_11 = 200.46;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.7 MPa and S = 0.7153 kJ/kg-K,\n", + "H_12 = 207.73;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Thus at P = 0.7 MPa and S = 0.7087 kJ/kg-K, enthalpy is given by\n", + "H_13 = ((S_2 -0.6917)/(0.7153 - 0.6917))*(H_12 - H_11) + H_11;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.8 MPa and S = 0.7021 kJ/kg-K,\n", + "H_21 = 206.07;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.8 MPa and S = 0.7253 kJ/kg-K,\n", + "H_22 = 213.45;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Thus at P = 0.8 MPa and S = 0.7087 kJ/kg-K, enthalpy is given by\n", + "H_23 = ((S_2 -0.7021)/(0.7253 - 0.7021))*(H_22 - H_21) + H_21;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.7449 MPa, S = 0.7087 kJ/kg-K, the enthalpy is\n", + "H_2 = ((0.7449 - 0.7)/(0.8 - 0.7))*(H_23 - H_13) + H_13;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Power consumed by the compressor is\n", + "W_comp = m*(H_2 - H_1);\t\t\t#[kW]\n", + "\n", + "print \"The power consumed by the compressor is %f kW\"%(W_comp);\n", + "\n", + "\t\t\t#Heat removed in evaporator/work done on compressor\n", + "COP_R = Q_L/W_comp;\n", + "\n", + "print \"The COP the refrigerator is %f kW\"%(COP_R);\n", + "\n", + "\n", + "\t\t\t#At -20 C,saturated conditions \n", + "H_liq = 17.82;\t\t\t#[kJ/kg]\n", + "H_vap = 178.74;\t\t\t#[kJ/kg]\n", + "x_4 = (H_4 - H_liq)/(H_vap - H_liq);\n", + "\n", + "print \"The dryness factor of refrigerant after the expansion valve is %f\"%(x_4);\n", + "\n", + "\t\t\t#The heat transfer rate in the condenser is\n", + "Q_H = m*(H_3 - H_2);\t\t\t#[kW]\n", + "\n", + "print \"The heat transfer rate in the condenser is %f kW\"%(Q_H);\n", + "\n", + "\t\t\t#If the cycle would have worked as a pump then,\n", + "\t\t\t#COP_HP = (Heat supplied from condenser/Work done on compressor)\n", + "COP_HP = (-Q_H)/W_comp;\n", + "\n", + "print \"The COP if cycle would work as a heat pump is %f kW\"%(COP_HP);\n", + "\n", + "\t\t\t#If the cycle would have been a reversed Carnot cycle then\n", + "COP_C = T_low/(T_high - T_low);\n", + "\n", + "print \"The COP if cycle would run as reversed Carnot cycle is %f kW\"%(COP_C);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transfer rate in the evaporator is 68.490000 kW\n", + "The power consumed by the compressor is 16.840242 kW\n", + "The COP the refrigerator is 4.067044 kW\n", + "The dryness factor of refrigerant after the expansion valve is 0.290641\n", + "The heat transfer rate in the condenser is -85.330242 kW\n", + "The COP if cycle would work as a heat pump is 5.067044 kW\n", + "The COP if cycle would run as reversed Carnot cycle is 5.063000 kW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.8 Page Number : 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\t\t\n", + "\n", + "# Variables\n", + "H_1 = 310.38;\t\t\t#[kJ/kg]\n", + "H_2 = 277.7;\t\t\t#[kJ/kg]\n", + "H_5 = -122.6;\t\t\t#[kJ/kg]\n", + "H_6 = 77.8;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#The enthalpy at point 3 is same at point 4 as the expansion is isenthalpic\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#The mass condensed is 1 kg and therefore m_1 = m+6 + 1\n", + "\n", + "\t\t\t#Enthalpy balance around heat exchanger\n", + "\t\t\t#m_2*H_2 + m_2*H_6 = m_3*H_3 + m_7*H_7\n", + "\n", + "\t\t\t#Enthalpy balance around separator\n", + "\t\t\t#m_4*H_4 = m_5*H_5 + m_6*H_6\n", + "\t\t\t#It can be seen that m_1 = m_2 = m_3 = m_4\n", + "\t\t\t#and m_6 = m_7 = m_1 - 1\n", + "\n", + "\t\t\t#Substituting the values for enthalpy balance around heat exchanger we get,\n", + "\t\t\t#m_1*H_2 + (m_1 - 1)*(H_6) = m_1*H_3 + (m_1 - 1)*H_1\n", + "\t\t\t#and substituting the values for enthalpy balance around seperator we get\n", + "\t\t\t#m_1*H_3 = (1)*(-122.6) + (m_1 - 1)*77.8\n", + "\t\t\t#H_3 = ((1)*(-122.6) + (m_1 - 1)*77.8)/m_1\n", + "\t\t\t#Substituting the expression for 'H_3' in the above equation and then solving for m_1, we get\n", + "def f(m_1): \n", + "\t return m_1*H_2+(m_1-1)*(H_6)-m_1*(((1)*(-122.6) + (m_1 - 1)*77.8)/m_1)-(m_1-1)*H_1\n", + "m_1 = fsolve(f,4)\n", + "\t\t\t#Thus to liquify 1 kg of air compression of m_1 kg of air is carried out.\n", + "\n", + "\t\t\t#Now substituting this value of m_1 to get the value of H_3,\n", + "H_3 = ((1)*(-122.6) + (m_1 - 1)*77.8)/m_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#From given compressed air table we see at 200 bar and 160 K,\n", + "H_3_1 = 40.2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At 200 bar and 180 K,\n", + "H_3_2 = 79.8;\t\t\t#[kJ/kg]\n", + "\t\t\t#By interpolation we get,\n", + "T_3 = ((H_3 - H_3_1)*(180 - 160))/(H_3_2 - H_3_1) + 160;\t\t\t#[K]\n", + "\n", + "print \"Temperature before throttling is %f K\"%(T_3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature before throttling is 171.350719 K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.9 Page Number : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "\t\t\t#At 1 bar, 310 K \n", + "H_1 = 310.38;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 200 bar, 310 K\n", + "H_2 = 277.7;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar, Saturated liquid\n", + "H_7 = -122.6;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar, Saturated vapour\n", + "H_8 = 77.8;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 200 bar, 200 K\n", + "H_3 = 117.6;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar, 100 K\n", + "H_11 = 98.3;\t\t\t#[kJ/kg]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#For 1 kg of liquid air obtained,the overall enthalpy balance is\n", + "\t\t\t#m_2*H_2 = W - 122.6 + (m_2 - 1)*H_1\n", + "\t\t\t#W = - 0.8*m_2*(H_11 - H_3)\n", + "\t\t\t#Overall enthalpy balance equation becomes\n", + "\t\t\t#H_2*m_2 = 15.44*m_2 - H_7 + (m_2 - 1)*H_1, solving\n", + "m_2_prime = (H_7 - H_1)/(H_2 - 15.44 - H_1);\n", + "\n", + "print \"The number of kimath.lograms of air compressed per kg of liquid air produced is %f kg\"%(m_2_prime);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t#Enthalpy balance around separator is \n", + "\t\t\t#0.2*m_2*H_5 = -H_7 + (0.2*m_2 - 1)*H_8, solving\n", + "m_2 = m_2_prime;\n", + "H_5_prime = ((0.2*m_2-1)*H_8 - H_7)/(0.2*m_2);\n", + "\n", + "\t\t\t#At point 5, P = 200 bar and enthalpy is\n", + "H_5_1 = -33.53;\t\t\t#[kJ/kg]\n", + "\t\t\t#From compressed air tables at 200 bar and 140 K,\n", + "H_5_2 = 0.2;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 200 bar and 120 K,\n", + "H_5_3 = -38.0;\t\t\t#[kJ/kg]\n", + "\t\t\t#Solving by interpolation we get\n", + "T_5 = ((H_5_1 - H_5_3)*(140 - 120))/(H_5_2 - H_5_3) + 120;\t\t\t#[K]\n", + "\n", + "print \"The temperature of air before throttling is %f K\"%(T_5);\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t#During mixing of streams 8 and 11 to produce stream 9, the enthalpy balance is\n", + "\t\t\t# (0.2*m_2 - 1)*H_8 + 0.8*m_2*H_11 = (m_2 - 1)*H_9,Solving for H_9\n", + "\n", + "H_9_prime = ((0.2*m_2-1)*H_8+0.8*m_2*H_11)/(m_2 - 1);\n", + "\n", + "\t\t\t#From given compressed air tables at 1 bar and 100 K,\n", + "H_9_1 = H_11;\n", + "\t\t\t#At 1 bar and 90 K \n", + "H_9_2 = 87.9;\t\t\t#[kJ/kg]\n", + "\t\t\t#Solving by interpolation we get\n", + "T_9 = ((H_9_prime - H_9_2)*(100 - 90))/(H_9_1 - H_9_2) + 90;\t\t\t#[K]\n", + "\n", + "print \"The temperature of stream entering second heat exchanger is %f K\"%(T_9);\n", + "\n", + "\t\t\t#(4)\n", + "\t\t\t#Enthalpy balance around first heat exchanger is\n", + "\t\t\t#H_2*m_2 + (m_2 - 1)*H_10 = H_3*m-2 + (m-2 - 1)*H_1, solving for H_10\n", + "\n", + "H_10_prime = ((m_2 - 1)*H_1 + H_3*m_2 - H_2*m_2)/(m_2 - 1);\n", + "\n", + "\t\t\t#From given compressed air tables at 1 bar and 140 K,\n", + "H_10_1 = 139.1;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar and 120 K \n", + "H_10_2 = 118.8;\t\t\t#[kJ/kg]\n", + "\t\t\t#Solving by interpolation we get\n", + "T_10 = ((H_10_prime - H_10_2)*(140 - 120))/(H_10_1 - H_10_2) + 120;\t\t\t#[K]\n", + "\n", + "print \"The temperature of stream exiting second heat exchanger is %f K\"%(T_10);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of kimath.lograms of air compressed per kg of liquid air produced is 8.997922 kg\n", + "The temperature of air before throttling is 122.340314 K\n", + "The temperature of stream entering second heat exchanger is 98.029358 K\n", + "The temperature of stream exiting second heat exchanger is 131.292906 K\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.10 Page Number : 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_high = 40;\t\t\t#[bar]\n", + "P_low = 5;\t\t\t#[bar]\n", + "m_1 = 0.5;\t\t\t#[kg/s] - Rate of mass moving through the expander\n", + "m_2 = 0.1;\t\t\t#[kg/s] - Rate of mass of vapour mixing with air\n", + "e = 0.7;\t\t\t#Efficiency\n", + "\n", + "\t\t\t#At state 3,(40 bar and 200 K),enthalpy and entropy is given by\n", + "H_3 = 179.7;\t\t\t#[kJ/kg]\n", + "S_3 = 5.330;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t#If isentropic conditions exits in the turbine then state 11 is at 5 bar\n", + "S_11 = 5.330;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#From given compressed air tables at 5 bar and 120 K,\n", + "H_11_1 = 113.6;\t\t\t#[kJ/kg]\n", + "S_11_1 = 5.455;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#At 5 bar and 100 K \n", + "H_11_2 = 90.6;\t\t\t#[kJ/kg]\n", + "S_11_2 = 5.246;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#The enthalpy has to be determined when S = S_3\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Solving by interpolation we get\n", + "H_11_s = ((H_11_1 - H_11_2)*(S_3 - S_11_2))/(S_11_1 - S_11_2) + H_11_2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#The adiabatic efficiency of tyrbine is given by\n", + "\t\t\t#(H_3 - H_11_a)/(H_3 - H_11_s) = e\n", + "H_11_a = H_3 - e*(H_3 - H_11_s);\t\t\t#[kJ/kg] - Actual enthalpy\n", + "\n", + " \t\t\t#At 5 bar,the saturated enthalpy is given to be\n", + "H_8 = 88.7;\t\t\t#[kJ/kg]\n", + "\t\t\t#From enthalpy balance during mixing we get,\n", + "\t\t\t#0.1*H_8 + 0.5*H_11_a = 0.6*H_9\n", + "H_9 = (m_2*H_8 + m_1*H_11_a)/(m_1 + m_2);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#From given compressed air tables at 5 bar and 140 K,\n", + "H_9_1 = 135.3;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 5 bar and 120 K \n", + "H_9_2 = 113.6;\t\t\t#[kJ/kg]\n", + "\t\t\t#By interpolation we get\n", + "T_9 = ((H_9 - H_11_1)*(140 - 120))/(H_9_1 - H_11_1) + 120;\t\t\t#[K]\n", + "\n", + "print \" The temperature of air entering the second heat exchanger is %f K\"%(T_9);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The temperature of air entering the second heat exchanger is 124.009841 K\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic111.png b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic111.png new file mode 100755 index 00000000..0564964c Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic111.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic222.png b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic222.png new file mode 100755 index 00000000..2442734b Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic222.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic333.png b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic333.png new file mode 100755 index 00000000..2fcec895 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic333.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt old mode 100644 new mode 100755 diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png new file mode 100755 index 00000000..1d1f5f7b Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png new file mode 100755 index 00000000..939248bf Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png new file mode 100755 index 00000000..d1051723 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/README.txt b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/README.txt new file mode 100755 index 00000000..98c63c7c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/README.txt @@ -0,0 +1,10 @@ +Contributed By: Jai Mathur +Course: mca +College/Institute/Organization: IIT +Department/Designation: System Admin +Book Title: Chemical Engineering Thermodynamics +Author: Y. V. C. Rao +Publisher: Universities Press +Year of publication: 1997 +Isbn: 81-7371-048-1 +Edition: 1 \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch1.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch1.ipynb new file mode 100755 index 00000000..c7a29075 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch1.ipynb @@ -0,0 +1,145 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4f7d90cd7b10a2be32d6f9985c84b88b7895b54f53fda509a7ab6972ab90144a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "weight = 981. \t\t\t #weight of payload in N\n", + "gmoon = 1.62;\t\t\t #acceleration due to gravity on the moon in m/s**2\n", + "g = 9.81;\t\t\t #acceleration due to gravity on earth\n", + "\n", + "# Calculations\n", + "mass = weight/g; \t\t\t # Calculations of mass of the payload in kg (calculated as F = m*g)\n", + "weightmoon = mass*gmoon;\t\t\t # Calculations of weight of payload on the moon in N\n", + "\n", + "# Results\n", + "print ' The weight of payload on the moon = %d N'%(weightmoon);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The weight of payload on the moon = 162 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "l = 15.;\t\t\t #length of the child's head in cm\n", + "b = 12.;\t\t\t #breadth of the child's head in cm\n", + "p = 101325.;\t\t\t #atmospheric pressure in Pa\n", + "\n", + "# Calculations\n", + "area = (l*b)/(10**4);\t\t\t # Calculations of area of the child's head in m**2\n", + "force = p*area;\t\t\t # Calculations of force exerted on the child's head due to atmospheric air in N\n", + "\n", + "# Results\n", + "print ' The force exerted on the childs head due to atmospheric air = %.2f N'%(force);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The force exerted on the childs head due to atmospheric air = 1823.85 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "rho_water = 1000.;\t\t\t #density of water flowing through the pipeline in kg/m**3\n", + "rho_manomtr = 1595.;\t\t #density of manometric fluid (carbon tetrachloride) in kg/m**3\n", + "l = 40.;\t \t\t #length between the selected sections in cm\n", + "theta = 45.\t\t\t #inclination of the manometer in degrees\n", + "g = 9.81;\t \t\t #acceleration due to gravity in m/s**2\n", + "\n", + "# Calculations\n", + "delp = (l/100.)*math.sin((theta*math.pi)/180.)*g*(rho_manomtr-rho_water); # Calculations of pressure drop between the required sections in Pa\n", + "\n", + "# Results\n", + "print ' The pressure drop between the required sections = %.2f Pa'%delp\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The pressure drop between the required sections = 1650.94 Pa\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch10.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch10.ipynb new file mode 100755 index 00000000..5d1a66e8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch10.ipynb @@ -0,0 +1,202 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Stability and phase transition in thermodynamic systems" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 2;\t\t\t #number of phases (no unit)\n", + "C = 2;\t\t\t #number of components (no unit)\n", + "\n", + "# Calculations\n", + "F = C+2-P\n", + "\n", + "# Results\n", + "print \" The number of degrees of freedom = %d \"%(F);\n", + "print \"Two intensive properties are required to be specified to\\\n", + " describe the thermodynamic state of the system,and the fundamental relation in\\\n", + " the Gibbs free energy representation for this system is of the type, G = GT,P,N1,N2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The number of degrees of freedom = 2 \n", + "Two intensive properties are required to be specified to describe the thermodynamic state of the system,and the fundamental relation in the Gibbs free energy representation for this system is of the type, G = GT,P,N1,N2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import cmath\n", + "import math\n", + "\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", + "w = 0.398;\t\t\t #acentric factor (no unit) \n", + "\n", + "# Calculations\n", + "Pguess = 0.215\n", + "\n", + "\n", + "Tr = T/Tc\n", + "Pr = (Pguess*10**6)/(Pc*10**5)\n", + "S = 0.37464+(1.54226*w)-(0.26992*w**2)\n", + "alpha1 = (1+(S*(1-math.sqrt(Tr))))**2;\n", + "a = (0.45724*R**2*Tc**2*alpha1)/(Pc*10**5)\n", + "b = (0.07780*R*Tc)/(Pc*10**5);\t\t\t \n", + "A = (a*Pguess*10**6)/(R*T)**2;\t\t\t \n", + "B = (b*Pguess*10**6)/(R*T);\t\t\t \n", + "alpha = -1+B\n", + "beeta = A-(2*B)-(3*B**2)\n", + "gaamma = -(A*B)+(B**2)+(B**3)\n", + "p = beeta-(alpha**2)/3;\t\t\n", + "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", + "D = (((q)**2)/4)+(((p)**3)/27);\t\t\t \n", + "\n", + "\n", + "if D>0:\n", + " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3);\n", + " Z_l = Z;\n", + " Z_v = Z;\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3);\t\t\t \n", + " Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " Z = [Z1 ,Z2, Z3];\n", + " Z_l = min(Z);\n", + " Z_v = max(Z);\n", + "else:\n", + " r = math.sqrt((-(p**3)/27));\t\t\t \n", + " theta = math.acos((-(q)/2)*(1./r));\t\t\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3)\n", + " Z = [Z1, Z2, Z3];\n", + " Z_l = min(Z)\n", + " Z_v = max(Z)\n", + "\n", + "\n", + "phi_l = math.exp(Z_l-1-math.log(Z_l-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_l+(B*(1+math.sqrt(2))))/(Z_l+(B*(1-math.sqrt(2)))))));\n", + "phi_v = math.exp(Z_v-1-math.log(Z_v-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_v+(B*(1+math.sqrt(2))))/(Z_v+(B*(1-math.sqrt(2)))))));\n", + "fl = Pguess*phi_l;\t\t\t # Calculations of the fugacity of the liquid in MPa\n", + "fv = Pguess*phi_v;\t\t\t # Calculations of the fugacity of the vapour in MPa\n", + "tolerance = 1e-3;\t\t\t #defining the tolerance to compare fl and fv\n", + "\n", + "if abs(fl-fv)tolerance:\n", + " Tr = T/Tc\n", + " Pr = (Prevised*10**6)/(Pc*10**5);\n", + " S = 0.37464+(1.54226*w)-(0.26992*w**2)\n", + " alpha1 = (1+(S*(1-math.sqrt(Tr))))**2;\n", + " a = (0.45724*R**2*Tc**2*alpha1)/(Pc*10**5)\n", + " b = (0.07780*R*Tc)/(Pc*10**5);\t\t\t \n", + " A = (a*Prevised*10**6)/(R*T)**2;\t\t\n", + " B = (b*Prevised*10**6)/(R*T);\t\t\t\n", + " alpha = -1+B;\t\t\t \n", + " beeta = A-(2*B)-(3*B**2);\n", + " gaamma = -(A*B)+(B**2)+(B**3)\n", + " p = beeta-(alpha**2)/3;\t\t\n", + " q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", + " D = (((q)**2)/4)+(((p)**3)/27);\t\n", + " \n", + " if D > 0:\n", + " Z=((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3); #One real root given by Eq.(3.32)\n", + " Z_l=Z;\n", + " Z_v=Z;\n", + " elif D==0:\n", + " Z1=((-2*(q/2))**(1./3))-(alpha/3); #Three real roots and two equal given by Eq.(3.33)\n", + " Z2=((q/2)**(1./3))-(alpha/3);\n", + " Z3=((q/2)**(1./3))-(alpha/3);\n", + " Z=[Z1, Z2, Z3];\n", + " Z_l=min(Z);\n", + " Z_v=max(Z);\n", + " else:\n", + " r = math.sqrt((-(p**3)/27));\t\t\t \n", + " theta = math.acos((-(q)/2)*(1./r));\t\t\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", + " Z = [Z1, Z2, Z3];\n", + " Z_l = Z[0];\n", + " Z_v = Z[1];\n", + "\n", + " phi_l = math.exp(Z_l-1-math.log(Z_l-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_l+(B*(1+math.sqrt(2))))/(Z_l+(B*(1-math.sqrt(2)))))));\n", + " phi_v = math.exp(Z_v-1-math.log(Z_v-B)-((a/(2*math.sqrt(2)*b*R*T))*math.log((Z_v+(B*(1+math.sqrt(2))))/(Z_v+(B*(1-math.sqrt(2)))))));\n", + " fl = Prevised*phi_l;\t\n", + " fv = Prevised*phi_v;\t\n", + " Prevised = Prevised*fl/fv\n", + "\n", + "P = Prevised;\t\t\t\n", + "\n", + "# Results\n", + "print \" The vapour pressure of n-octane at 427.85K = %.5f\"%P,\" MPa\"\n", + "\n", + "# Note: answer is slightly differnt because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The vapour pressure of n-octane at 427.85K = 0.21196 MPa\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch11.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch11.ipynb new file mode 100755 index 00000000..9c8a35bf --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch11.ipynb @@ -0,0 +1,585 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Properties of solutions" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "%matplotlib inline\n", + "import math \n", + "from numpy import *\n", + "from matplotlib.pyplot import *\n", + "\n", + "\n", + "# Variables\n", + "antoine_const_benzene = [6.87987,1196.760,219.161]\n", + "antoine_const_toluene = [6.95087,1342.310,219.187]\n", + "t = 95.\n", + "P = 101.325\n", + "\n", + "# Calculations\n", + "P1_s = 10**(antoine_const_benzene[0]-(antoine_const_benzene[1]/(t+antoine_const_benzene[2])))\t\t\t \n", + "P2_s = 10**(antoine_const_toluene[0]-(antoine_const_toluene[1]/(t+antoine_const_toluene[2])))\t\t\t\n", + "x1 = linspace(0,1,10)\n", + "i = 0;\t\t\t #iteration parameter\n", + "n = len(x1);\t\t\t #iteration parameter\n", + "P_tot = zeros(10)\n", + "y1 = zeros(10)\n", + "\n", + "while i" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 95. \t\t \t #temperature of the equimolar vapour mixture of benzene and toluene in degree celsius\n", + "y1 = 0.5\t \t\t #mole fraction of benzene in vapour phase (no unit)\n", + "y2 = 0.5 \t\t\t #mole fraction of toluene in vapour phase (no unit)\n", + "P1_s = 1176.21\t\t\t #saturation pressure of benzene at T, taken from Example 11.1 in Torr\n", + "P2_s = 477.03\t\t\t #saturation pressure of toluene at T, taken from Example 11.1 in Torr\n", + "\n", + "# Calculations\n", + "P = 1./((y1/P1_s)+(y2/P2_s))\n", + "x1 = (y1*P)/P1_s;\t\t\t \n", + "x2 = 1-x1\n", + "\n", + "# Results\n", + "print 'The composition of the liquid which is in equilibrium with the equimolar vapour mixture of\\\n", + " benzene and toluene at 95 degree celsius is mole fraction of benzene\\\n", + " in liquid phase x1 = %f mole fraction of toluene in liquid phase x2 = %f '%(x1,x2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The composition of the liquid which is in equilibrium with the equimolar vapour mixture of benzene and toluene at 95 degree celsius is mole fraction of benzene in liquid phase x1 = 0.288542 mole fraction of toluene in liquid phase x2 = 0.711458 \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.5 page no : 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "n_pentaneA = 6.87632 # Antoine constants\n", + "n_hexaneA = 6.91058\n", + "n_heptanA = 6.89386\n", + "n_pentaneB = 1075.780 \n", + "n_hexaneB = 1189.640\n", + "n_heptanB = 1264.370\n", + "n_pentaneC = 233.205\n", + "n_hexaneC = 226.205\n", + "n_heptanC = 216.640\n", + "pressure = 90 # pressure\n", + "\n", + "# Calculations\n", + "logP1 = n_pentaneA - (n_pentaneB/(90 + n_pentaneC))\n", + "P1 = round(10**logP1 *133.322 /1000,1)\n", + "logP2 = n_hexaneA - (n_hexaneB/(90 + n_hexaneC))\n", + "P2 = round(10**logP2 *133.322 /1000,2)\n", + "logP3 = n_heptanA - (n_heptanB/(90 + n_heptanC))\n", + "P3 = round(10**logP3 *133.322 /1000,2)\n", + "P = 200\n", + "K1 = round(P1/P,3)\n", + "K2 = round(P2/P,2)\n", + "K3 = P3/P\n", + "\n", + "# assume L/F = 0.4\n", + "L_F = 0.4\n", + "x1 = 0.3/(L_F + (1-L_F) * K1)\n", + "x2 = 0.3/(L_F + (1-L_F) * K2)\n", + "x3 = 0.4/(L_F + (1-L_F) * K3)\n", + "sum_x = x1+x2+x3\n", + "\n", + "# assume L/F = 0.752\n", + "L_F = 0.752\n", + "x1 = 0.3/(L_F + (1-L_F) * K1)\n", + "x2 = 0.3/(L_F + (1-L_F) * K2)\n", + "x3 = 0.4/(L_F + (1-L_F) * K3)\n", + "sum_x = round(x1+x2+x3,1) # which is equal to 1 \n", + "\n", + "# Hence, L/F = 0.752 is correct\n", + "y1 = K1*x1\n", + "y2 = K2*x2\n", + "y3 = K3*x3\n", + "\n", + "# Results\n", + "print \"Hence, fraction vaporized, V/F = 1-(L-F) = %.3f\"%(1-L_F)\n", + "print \"Compositions of liquid and vapor leaving the flash unit are :\"\n", + "print \"x1 = %.4f y1 = %.4f\"%(x1,y1)\n", + "print \"x2 = %.4f y2 = %.4f\"%(x2,y2)\n", + "print \"x3 = %.4f y3 = %.4f\"%(x3,y3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence, fraction vaporized, V/F = 1-(L-F) = 0.248\n", + "Compositions of liquid and vapor leaving the flash unit are :\n", + "x1 = 0.2246 y1 = 0.5285\n", + "x2 = 0.3045 y2 = 0.2863\n", + "x3 = 0.4709 y3 = 0.1851\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 45.\t \t\t #temperature of the mixture in degree celsius\n", + "A = 2.230\t\t\t #van laar constant for the system at T (no unit)\n", + "B = 1.959\t\t\t #van laar constant for the system at T (no unit)\n", + "n1 = 30. \t\t #mole percentage of nitromethane in the mixture ( in percentage)\n", + "\n", + "# Calculations\n", + "n2 = 100-n1\n", + "x1 = n1/100\n", + "x2 = 1-x1\n", + "gaamma1 = math.exp(A/(1+((A/B)*(x1/x2)))**2)\n", + "gaamma2 = math.exp(B/(1+((B/A)*(x2/x1)))**2)\n", + "\n", + "# Results\n", + "print 'The activity coefficients for the system using van laar equation is : gamma1 \\\n", + " = %f, gamma2 = %f \\t '%( gaamma1,gaamma2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activity coefficients for the system using van laar equation is : gamma1 = 2.738343, gamma2 = 1.234443 \t \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "n_azeo = 44.8;\t\t\t #azeotropic composition given as mole percentage\n", + "Tb = 68.24;\t\t\t #boiling point of mixture in degree celsius\n", + "P = 760.;\t\t\t #pressure in Torr\n", + "P1_s = 506.;\t\t\t #saturation pressure of ethanol at Tb in Torr\n", + "P2_s = 517.;\t\t\t #saturation pressure of benzene at Tb in Torr\n", + "n1 = 10.;\t\t\t #mole percentage of ethanol in the mixture (in percentage)\n", + "\n", + "# Calculations\n", + "x1 = n_azeo/100\n", + "x2 = 1-x1;\t\t\n", + "gaamma1 = P/P1_s\n", + "gaamma2 = P/P2_s\n", + "A = math.log(gaamma1)*(1+((x2*math.log(gaamma2))/(x1*math.log(gaamma1))))**2\n", + "B = math.log(gaamma2)*(1+((x1*math.log(gaamma1))/(x2*math.log(gaamma2))))**2\n", + "x1 = n1/100\n", + "x2 = 1-x1;\t\n", + "gaamma1 = math.exp(A/(1+((A/B)*(x1/x2)))**2)\n", + "gaamma2 = math.exp(B/(1+((B/A)*(x2/x1)))**2)\n", + "\n", + "# Results\n", + "print 'The van Laar constants for the system are : A = %f \\t B = %f '%(A,B)\n", + "print 'The activity coefficients for the system using van laar equation are\\\n", + " : gamma1 = %f \\t gamma2 = %f \\t '%( gaamma1,gaamma2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The van Laar constants for the system are : A = 1.910203 \t B = 1.328457 \n", + "The activity coefficients for the system using van laar equation are : gamma1 = 4.137783 \t gamma2 = 1.025531 \t \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "\n", + "T = 45. \t\t\t #temperature of the system in degree celsius\n", + "A_12 = 0.1156;\t\t\t #Wilson's parameter for the system at T (no unit)\n", + "A_21 = 0.2879;\t\t\t #Wilson's parameter for the system at T (no unit)\n", + "x1 = 0.3;\t \t\t #mole fraction of nitromethane in the liquid mixture (no unit)\n", + "\n", + "# Calculations\n", + "x2 = 1-x1\n", + "ln_gaamma1 = -math.log(x1+(A_12*x2))+(x2*((A_12/(x1+(A_12*x2)))-(A_21/((A_21*x1)+x2))));\t\t\t\n", + "gaamma1 = math.exp(ln_gaamma1)\n", + "ln_gaamma2 = -math.log(x2+(A_21*x1))-(x1*((A_12/(x1+(A_12*x2)))-(A_21/((A_21*x1)+x2))));\t\t\t # Calculations of ln(activity coefficient) using Eq.(11.90) (no unit)\n", + "gaamma2 = math.exp(ln_gaamma2)\n", + "\n", + "# Results\n", + "print 'The activity coefficients for the system using Wilsons parameters are : gamma1 = %f \\\n", + " \\t gamma2 = %f \\t '%( gaamma1,gaamma2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activity coefficients for the system using Wilsons parameters are : gamma1 = 2.512605 \t gamma2 = 1.295788 \t \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 345.\t\t\t #temperature of the mixture in K\n", + "x1 = 0.8\t\t\t #mole fraction of ethanol in the liquid phase (no unit)\n", + "\n", + "nu_ki = [1,1,1,6]\t\t\t #number of groups of type: CH3, CH2, OH and ACH respectively (no unit)\n", + "R_k = [0.9011,0.6744,1.0000,0.5313];\t\t\t #Group volume parameter for CH3, CH2, OH and ACH respectively (no unit)\n", + "Q_k = [0.848,0.540,1.200,0.400];\t\t\t #Area parameter for CH3, CH2, OH and ACH respectively (no unit)\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "u12_u22 = -241.2287;\t\t#UNIQUAC parameter for the system in J/molK\n", + "u21_u11 = 2799.5827;\t\t#UNIQUAC parameter for the system in J/molK\n", + "z = 10. \t\t\t #co-ordination number usually taken as 10 (no unit)\n", + "\n", + "# Calculations\n", + "x2 = 1-x1\n", + "r1 = (nu_ki[0]*R_k[0])+(nu_ki[1]*R_k[1])+(nu_ki[2]*R_k[2]);\t\t\t \n", + "r2 = (nu_ki[3]*R_k[3])\n", + "phi1 = (x1*r1)/((x1*r1)+(x2*r2));\t\t\t \n", + "phi2 = (x2*r2)/((x2*r2)+(x1*r1));\t\t\t \n", + "q1 = (nu_ki[0]*Q_k[0])+(nu_ki[1]*Q_k[1])+(nu_ki[2]*Q_k[2])\t\t\t \n", + "q2 = (nu_ki[3]*Q_k[3])\t\t\t\n", + "theta1 = (x1*q1)/((x1*q1)+(x2*q2))\n", + "theta2 = (x2*q2)/((x1*q1)+(x2*q2))\n", + "l1 = ((z/2)*(r1-q1))-(r1-1);\t\t\n", + "l2 = ((z/2)*(r2-q2))-(r2-1);\t\t\n", + "tau_12 = math.exp(-(u12_u22)/(R*T));\t\t\n", + "tau_21 = math.exp(-(u21_u11)/(R*T));\t\t\n", + "tau_11 = 1.0;\t\t\t \n", + "tau_22 = 1.0;\t\t\t \n", + "\n", + "ln_gaamma1_c = math.log(phi1/x1)+((z/2)*q1*math.log(theta1/phi1))+l1-((phi1/x1)*((x1*l1)+(x2*l2)));\n", + "ln_gaamma2_c = math.log(phi2/x2)+((z/2)*q2*math.log(theta2/phi2))+l2-((phi2/x2)*((x1*l1)+(x2*l2)));\n", + "ln_gaamma1_r = q1*(1-math.log((theta1*tau_11)+(theta2*tau_21))-(((theta1*tau_11)/((theta1*tau_11)+(theta2*tau_21)))+((theta2*tau_12)/((theta1*tau_12)+(theta2*tau_22)))));\n", + "ln_gaamma2_r = q2*(1-math.log((theta1*tau_12)+(theta2*tau_22))-(((theta1*tau_21)/((theta1*tau_11)+(theta2*tau_21)))+((theta2*tau_22)/((theta1*tau_12)+(theta2*tau_22)))));\n", + "ln_gaamma1 = ln_gaamma1_c+ln_gaamma1_r\n", + "ln_gaamma2 = ln_gaamma2_c+ln_gaamma2_r\n", + "gaamma1 = math.exp(ln_gaamma1);\t\t\t \n", + "gaamma2 = math.exp(ln_gaamma2);\t\t\t \n", + "\n", + "# Results\n", + "print 'The activity coefficients for the system using the UNIQUAC equation are : gamma1 \\\n", + " = %f \\t gamma2 = %f \\t '%( gaamma1,gaamma2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activity coefficients for the system using the UNIQUAC equation are : gamma1 = 1.060567 \t gamma2 = 3.679066 \t \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 307.\t\t\t #temperature of the mixture in K\n", + "x1 = 0.3\t\t\t #mole fraction of acetone in the liquid phase (no unit)\n", + "\n", + "nu_ki = [1.,1.,2.,3.]\n", + "R_k = [0.9011,1.6724,0.6744]\n", + "Q_k = [0.848,1.488,0.540];\t\t\t \n", + "a_19 = 476.40;\t\t\t #group interaction parameter for the system in K\n", + "a_91 = 26.760;\t\t\t #group interaction parameter for the system in K\n", + "z = 10. \t\t\t #co-ordination number usually taken as 10 (no unit)\n", + "\n", + "# Calculations\n", + "x2 = 1-x1;\t\t\t # Calculations of mole fraction of benzene in liquid phase (no unit)\n", + "r1 = (nu_ki[0]*R_k[0])+(nu_ki[1]*R_k[1])\n", + "r2 = (nu_ki[2]*R_k[0])+(nu_ki[3]*R_k[2])\n", + "phi1 = (x1*r1)/((x1*r1)+(x2*r2))\n", + "phi2 = (x2*r2)/((x2*r2)+(x1*r1))\n", + "q1 = (nu_ki[0]*Q_k[0])+(nu_ki[1]*Q_k[1])\t\t\t\n", + "q2 = (nu_ki[2]*Q_k[0])+(nu_ki[3]*Q_k[2])\n", + "theta1 = (x1*q1)/((x1*q1)+(x2*q2));\n", + "theta2 = (x2*q2)/((x1*q1)+(x2*q2));\n", + "l1 = ((z/2)*(r1-q1))-(r1-1);\t\t\n", + "l2 = ((z/2)*(r2-q2))-(r2-1);\t\t\n", + "ln_gaamma1_c = math.log(phi1/x1)+((z/2)*q1*math.log(theta1/phi1))+l1-((phi1/x1)*((x1*l1)+(x2*l2)));\n", + "ln_gaamma2_c = math.log(phi2/x2)+((z/2)*q2*math.log(theta2/phi2))+l2-((phi2/x2)*((x1*l1)+(x2*l2)));\n", + "a_11 = 0.\n", + "a_99 = 0.\n", + "psi_19 = math.exp(-(a_19)/(T));\t\t\t\n", + "psi_91 = math.exp(-(a_91)/(T));\t\t\t\n", + "psi_11 = 1.;\t\t\t \n", + "psi_99 = 1.;\t\t\t \n", + "x1_1 = nu_ki[0]/(nu_ki[0]+nu_ki[1]);\t\t\t\n", + "x1_18 = nu_ki[1]/(nu_ki[0]+nu_ki[1]);\t\t\n", + "theta1_1 = (Q_k[0]*x1_1)/((Q_k[0]*x1_1)+(Q_k[1]*x1_18))\n", + "theta1_18 = (Q_k[1]*x1_18)/((Q_k[1]*x1_18)+(Q_k[0]*x1_1))\n", + "ln_tau1_1 = Q_k[0]*(1-math.log((theta1_1*psi_11)+(theta1_18*psi_91))-(((theta1_1*psi_11)/((theta1_1*psi_11)+(theta1_18*psi_91)))+((theta1_18*psi_19)/((theta1_1*psi_19)+(theta1_18*psi_11)))));\n", + "ln_tau1_18 = Q_k[1]*(1-math.log((theta1_1*psi_19)+(theta1_18*psi_99))-(((theta1_1*psi_91)/((theta1_1*psi_99)+(theta1_18*psi_91)))+((theta1_18*psi_99)/((theta1_1*psi_19)+(theta1_18*psi_99)))));\n", + "x2_1 = nu_ki[2]/(nu_ki[2]+nu_ki[3]);\t\t\t \n", + "x2_2 = nu_ki[3]/(nu_ki[2]+nu_ki[3]);\t\t\t \n", + "ln_tau2_1 = 0;\n", + "ln_tau2_2 = 0;\n", + "x_1 = ((x1*nu_ki[0])+(x2*nu_ki[2]))/((((x1*nu_ki[0])+(x1*nu_ki[1])))+((x2*nu_ki[2])+(x2*nu_ki[3])));\n", + "x_2 = ((x2*nu_ki[3]))/((((x1*nu_ki[0])+(x1*nu_ki[1])))+((x2*nu_ki[2])+(x2*nu_ki[3])));\n", + "x_18 = ((x1*nu_ki[1]))/((((x1*nu_ki[0])+(x1*nu_ki[1])))+((x2*nu_ki[2])+(x2*nu_ki[3])));\n", + "theta_1 = (Q_k[0]*x_1)/((Q_k[0]*x_1)+(Q_k[1]*x_18)+(Q_k[2]*x_2));\t\t\t\n", + "theta_2 = (Q_k[2]*x_2)/((Q_k[0]*x_1)+(Q_k[1]*x_18)+(Q_k[2]*x_2));\t\t\t\n", + "theta_18 = (Q_k[1]*x_18)/((Q_k[0]*x_1)+(Q_k[1]*x_18)+(Q_k[2]*x_2));\t\t\t\n", + "ln_tau_1 = Q_k[0]*(1-math.log((theta_1*psi_11)+(theta_2*psi_11)+(theta_18*psi_91))-((((theta_1*psi_11)+(theta_2*psi_11))/((((theta_1*psi_11)+(theta_2*psi_11))+(theta_18*psi_91)))+((theta_18*psi_19)/((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_11))))));\n", + "ln_tau_2 = Q_k[2]*(1-math.log((theta_1*psi_11)+(theta_2*psi_11)+(theta_18*psi_91))-((((theta_1*psi_11)+(theta_2*psi_11))/((((theta_1*psi_11)+(theta_2*psi_11))+(theta_18*psi_91)))+((theta_18*psi_19)/((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_11))))));\n", + "ln_tau_18 = Q_k[1]*(1-math.log((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_99))-(((((theta_1+theta_2)*psi_91)/((theta_1*psi_11)+(theta_2*psi_11)+(theta_18*psi_91)))+((theta_18*psi_99)/((theta_1*psi_19)+(theta_2*psi_19)+(theta_18*psi_11))))));\n", + "ln_gaamma1_r = (nu_ki[0]*(ln_tau_1-ln_tau1_1))+(nu_ki[1]*(ln_tau_18-ln_tau1_18));\n", + "ln_gaamma2_r = (nu_ki[2]*(ln_tau_1-ln_tau2_1))+(nu_ki[3]*(ln_tau_2-ln_tau2_2));\n", + "ln_gaamma1 = ln_gaamma1_c+ln_gaamma1_r\n", + "ln_gaamma2 = ln_gaamma2_c+ln_gaamma2_r\n", + "gaamma1 = math.exp(ln_gaamma1);\t\t\t\n", + "gaamma2 = math.exp(ln_gaamma2);\t\t\t\n", + "\n", + "# Results\n", + "print 'The activity coefficients for the system using the UNIFAC method are\\\n", + " : gamma1 = %f \\t gamma2 = %f \\t '%( gaamma1,gaamma2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activity coefficients for the system using the UNIFAC method are : gamma1 = 2.149891 \t gamma2 = 1.191192 \t \n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch12.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch12.ipynb new file mode 100755 index 00000000..fe626468 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch12.ipynb @@ -0,0 +1,716 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Vapor liquid Equilibrium" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "%matplotlib inline\n", + "import math \n", + "from numpy import *\n", + "from matplotlib.pyplot import *\n", + "\n", + "# Variables\n", + "T = 60.\t\t\t #temperature of the system in degree celsius\n", + "P = [237.60,265.20,317.50,333.00,368.70,387.20];\t\t\t #Pressure data in Torr (from Danneil et al.)\n", + "x1 = [0.0870,0.1800,0.4040,0.4790,0.7130,0.9070];\t\t\t #mole fraction of benzene in the liquid phase corresponding to the given pressure (no unit) (from Danneil et al.)\n", + "y1 = [0.1870,0.3400,0.5780,0.6420,0.7960,0.9220];\t\t\t #mole fraction of benzene in the vapour phase corresponding to the given pressure (no unit) (from Danneil et al.)\n", + "antoine_const_benzene = [6.87987,1196.760,219.161];\t\t\t #Antoine's constants for Benzene from Table A.7\n", + "antoine_const_heptane = [6.89386,1264.370,216.640];\t\t\t #Antoine's constants for heptane from Table A.7\n", + "\n", + "# Calculations\n", + "P1_s = 10**(antoine_const_benzene[0]-(antoine_const_benzene[1]/(T+antoine_const_benzene[2])));\n", + "P2_s = 10**(antoine_const_heptane[0]-(antoine_const_heptane[1]/(T+antoine_const_heptane[2])));\n", + "l = len(P);\t\t\t #iteration parameter\n", + "i = 0;\t\t\t #iteration parameter\n", + "gaamma1 = zeros(l)\n", + "gaamma2 = zeros(l)\n", + "ln_gaamma1_expt = zeros(l)\n", + "ln_gaamma2_expt = zeros(l)\n", + "gE_RTx1x2 = zeros(l)\n", + "while i" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "# Variables\n", + "T = 25. \t\t\t #temperature of the system in degree celsius\n", + "A12 = 2.0522;\t\t\t #three suffix Margules parameters for the system (no unit)\n", + "A21 = 1.7201;\t\t\t #three suffix Margules parameters for the system (no unit)\n", + "P = [118.05,207.70,246.35,259.40,261.50,262.00,261.90,258.70,252.00];\t\t\t #Pressure data in Torr (from Tasic et al.)\n", + "x1 = [0.0115,0.1125,0.3090,0.5760,0.6920,0.7390,0.7575,0.8605,0.9250];\n", + "y1 = [0.1810,0.5670,0.6550,0.7050,0.7250,0.7390,0.7460,0.8030,0.8580];\n", + "antoine_const_acetone = [7.11714,1210.595,229.664];\t\t\t #Antoine's constants for acetone from Table A.7\n", + "antoine_const_chexane = [6.85146,1206.470,223.136];\t\t\t #Antoine's constants for cyclohexane from Table A.7\n", + "\n", + "# Calculations\n", + "P1_s = 10**(antoine_const_acetone[0]-(antoine_const_acetone[1]/(T+antoine_const_acetone[2])));\n", + "P2_s = 10**(antoine_const_chexane[0]-(antoine_const_chexane[1]/(T+antoine_const_chexane[2])));\n", + "\n", + "l = len(P)\n", + "ln_gaamma1 = zeros(l)\n", + "ln_gaamma2 = zeros(l)\n", + "gaamma1 = zeros(l)\n", + "gaamma2 = zeros(l)\n", + "P = zeros(l)\n", + "y1_calc = zeros(l)\n", + "j = 0;\t\n", + "\n", + "while j" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.9 Page No : 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "from matplotlib.pyplot import *\n", + "%matplotlib inline\n", + "# Variables\n", + "\n", + "P = 760.\t\t\t #pressure of the system in Torr\n", + "antoine_const_benzene = [6.87987,1196.760,219.161];\t\t\t #Antoine's constants for Benzene from Table A.7\n", + "t = linspace(60,100,9);\t\t\t #temperature range in degree celsius\n", + "\n", + "P2_s = [149.40,187.58,233.71,289.13,355.21,433.51,525.84,634.00,760.00];\n", + "x1 = linspace(0,1,6)\n", + "\n", + "# Calculations\n", + "l = len(t)\n", + "i = 0\n", + "P1_s = zeros(l)\n", + "P_tot = zeros(l)\n", + "\n", + "while i" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch13.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch13.ipynb new file mode 100755 index 00000000..8dc5f0be --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch13.ipynb @@ -0,0 +1,235 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Dilute solution laws" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "weight = 10. \t\t\t #weight of NaCl in grams\n", + "volume = 1. \t \t\t #volume of water in litres\n", + "weight_water = 1000. \t\t\t # weight of water in grams (Weight = Volume*Density, density of water = 1g/cc = 1g/ml = 1000g/l)\n", + "molwt_NaCl = 58.5 \t\t\t #molecular weight of NaCl in grams\n", + "molwt_water = 18. \t\t\t #molecular weight of water in grams\n", + "hf = 6.002; \t\t\t #enthalpy change of fusion in kJ/mol at 0 degree celsius\n", + "P = 101.325; \t\t\t #pressure in kPa\n", + "T = 273.15; \t\t\t # freezing point temperature of water at the given pressure in K\n", + "R = 8.314; \t\t\t #universal gas constant in J/molK;\n", + "\n", + "# Calculations\n", + "x2 = (weight/molwt_NaCl)/((weight/molwt_NaCl)+(weight_water/molwt_water))\n", + "delt = (R*T**2*x2)/(hf*10**3)\n", + "\n", + "# Results\n", + "print ' The depression in freezing point of water when 10g of NaCl solute is added = %0.2f K'%(delt);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The depression in freezing point of water when 10g of NaCl solute is added = 0.32 K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "weight = 10.; \t\t \t #weight of NaCl in grams\n", + "volume = 1.; \t\t\t #volume of water in litres\n", + "weight_water = 1000.; \t\t\t # weight of water in grams (Weight = Volume*Density, density of water = 1g/cc = 1g/ml = 1000g/l)\n", + "molwt_NaCl = 58.5; \t\t\t #molecular weight of NaCl in grams\n", + "molwt_water = 18; \t\t\t #molecular weight of water in grams\n", + "lat_ht = 2256.94; \t\t\t #latent heat of vaporization in kJ/kg at 100 degree celsius (obtained from steam tables)\n", + "P = 101.325; \t\t\t #pressure in kPa\n", + "T = 373.15; \t\t\t #boiling point temperature of water at the given pressure in K\n", + "R = 8.314; \t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "x2 = 0.0031\n", + "hv = (lat_ht*molwt_water)/1000\n", + "delt = (R*T**2*x2)/(hv*10**3)\n", + "\n", + "# Results\n", + "print ' The elevation in boiling point of water when 10g of NaCl solute is added = %0.2f K'%(delt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The elevation in boiling point of water when 10g of NaCl solute is added = 0.09 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.3 Page No : 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "weight = 10.; \t\t\t #weight of NaCl in grams\n", + "weight_water = 1000.; \t\t\t # weight of water in grams\n", + "molwt_NaCl = 58.5; \t\t\t #molecular weight of NaCl in grams\n", + "molwt_water = 18.; \t\t\t #molecular weight of water in grams\n", + "T = 300.; \t\t\t #prevailing temperature of water in K\n", + "R = 8.314; \t\t\t #universal gas constant in (Pa m**3)/(mol K);\n", + "v = 18*10**-6;\t\t\t #molar volume in m**3/mol\n", + "\n", + "# Calculations\n", + "x2 = 0.0031\n", + "pi = ((R*T*x2)/v)*10**-3\n", + "\n", + "# Results\n", + "print ' The osmotic pressure of a solution conatining 10g of NaCl in 1000g of water at 300K = %0.2f kPa'%(pi);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The osmotic pressure of a solution conatining 10g of NaCl in 1000g of water at 300K = 429.56 kPa\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.4 Page No : 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "temp = 20. \t\t\t # prevailing tempearture in degree celsius\n", + "melt_temp = 80.05; \t\t\t # melting point of naphthalene in degree celsius\n", + "hf = 18.574 \t\t\t # enthalpy of fusion in kJ/mol\n", + "R = 8.314 \t\t\t # universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "t = temp+273.15\n", + "melt_t = melt_temp+273.15\n", + "x2 = math.exp(((hf*10**3)/R)*((1./melt_t)-(1./t)))\n", + "\n", + "# Results\n", + "print ' The ideal solubility of naphthalene at 20 degree celsius = %0.4f'%(x2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The ideal solubility of naphthalene at 20 degree celsius = 0.2737\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 13.5 Page No : 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t = 295.43; \t\t\t #prevailing temperature in K\n", + "sat_p = 6.05; \t\t\t #Sasturation pressure of carbon dioxide at the prevailing temperature in MPa\n", + "p = 0.1; \t\t\t #pressure at which solubility has to be determined in MPa\n", + "\n", + "# Calculations\n", + "x2 = p/sat_p\n", + "\n", + "# Results\n", + "print ' The solubility of carbon dioxide expressed in mole fraction of carbon dioxide in solution\\\n", + " at 0.1MPa = %0.4f'%(x2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The solubility of carbon dioxide expressed in mole fraction of carbon dioxide in solution at 0.1MPa = 0.0165\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch14.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch14.ipynb new file mode 100755 index 00000000..e54d6be2 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch14.ipynb @@ -0,0 +1,846 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Chemical reaction equilibrium" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.1 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "T = 298.15;\t\t\t #temperature in K\n", + "del_Gf = [-137.327,-228.600,-394.815,0]; #the standard Gibbs free energy of formation of CO(g),H2O(g),CO2(g) and H2(g) in kJ\n", + "n = [1,1,-1,-1] \t\t\t #stoichiometric coefficients of CO(g),H2O(g),CO2(g) and H2(g) respectively (no unit)\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "del_G = (n[0]*del_Gf[0])+(n[1]*del_Gf[1])+(n[2]*del_Gf[2])+(n[3]*del_Gf[3]);\n", + "Ka = math.exp((-(del_G*10**3))/(R*T))\n", + "\n", + "# Results\n", + "print 'The standard Gibbs free energy of the water gas shift reaction at 298.15K = %0.3f kJ '%(del_G);\n", + "print 'The equilibrium constant of the water gas shift reaction at 298.15K = %0.3e '%(Ka);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The standard Gibbs free energy of the water gas shift reaction at 298.15K = 28.888 kJ \n", + "The equilibrium constant of the water gas shift reaction at 298.15K = 8.685e-06 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.2 Page No : 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 298.15;\t\t\t #temperature in K\n", + "P_s = 0.16716;\t\t\t #saturation pressure of CH3OH in bar at T\n", + "del_G1 = -166.215\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "f_v = 1\n", + "f_l = P_s\n", + "del_G2 = R*T*math.log(f_v/f_l)*10**-3;\t\t\t # Calculations of the value of del_G2 in kJ\n", + "del_G = del_G2+del_G1;\t\t\n", + "\n", + "# Results\n", + "print 'The standard Gibbs free energy of formation of CH3OHg = %0.3f kJ '%(del_G);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The standard Gibbs free energy of formation of CH3OHg = -161.781 kJ \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.3 Page No : 491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#The water gas shift reaction is given by: CO2(g)+H2(g)--->CO(g)+H2O(g)\n", + "T1 = 298.15 \t\t\t #initial temperature in K\n", + "Ka1 = 8.685*10**-6;\t\t\t #equilibrium constant for the water-gas shift reaction at T1 (no unit)\n", + "T2 = 1000.\t\t \t #temperature at which the equilibrium constant has to be determined in K\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "del_Hf = [-110.532,-241.997,-393.978,0];\t\t\t #the standard enthalpy of formation of CO(g),H2O(g),CO2(g) and H2(g) in kJ\n", + "n = [1,1,-1,-1];\t\t\t #stoichiometric coefficients of CO(g),H2O(g),CO2(g) and H2(g) respectively (no unit)\n", + "\n", + "# Calculations\n", + "#It is assumed that del_H is constant in the temperature range T1 and T2\n", + "del_H = (n[0]*del_Hf[0])+(n[1]*del_Hf[1])+(n[2]*del_Hf[2])+(n[3]*del_Hf[3])\n", + "Ka2 = Ka1*math.exp(((del_H*10**3)/R)*((1./T1)-(1./T2)));\t\t\t \n", + "\n", + "# Results\n", + "print 'The equilibrium constant for the water gas shift reaction at 1000K = %f '%(Ka2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equilibrium constant for the water gas shift reaction at 1000K = 1.085357 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.4 Page No : 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "P = 0.1 \t\t\t #pressure in MPa\n", + "T1 = 298.15;\t\t\t #initial temperature in K\n", + "Ka1 = 8.685*10**-6;\t\t\t #equilibrium constant for the water-gas shift reaction at T1 (no unit) (from Example 14.1)\n", + "T2 = 1000. \t\t\t #temperature at which the equilibrium constant is to be found, in K\n", + "del_H = 41.449;\t\t\t #smath.tan(math.radiansard enthalpy of the reaction at T1 in kJ (from Example 14.3)\n", + "a = [28.068,28.850,45.369,27.012];\n", + "b = [4.631*10**-3,12.055*10**-3,8.688*10**-3,3.509*10**-3]\n", + "c = [0,0,0,0];\n", + "d = [0,0,0,0];\n", + "e = [-0.258*10**5,1.006*10**5,-9.619*10**5,0.690*10**5]\n", + "n = [1,1,-1,-1]\n", + "R = 8.314;\t\t\n", + "Ka2_prev = 1.0855\n", + "\n", + "\n", + "# Calculations\n", + "del_a = (n[0]*a[0])+(n[1]*a[1])+(n[2]*a[2])+(n[3]*a[3]);\n", + "del_b = (n[0]*b[0])+(n[1]*b[1])+(n[2]*b[2])+(n[3]*b[3]);\n", + "del_c = (n[0]*c[0])+(n[1]*c[1])+(n[2]*c[2])+(n[3]*c[3]);\n", + "del_d = (n[0]*d[0])+(n[1]*d[1])+(n[2]*d[2])+(n[3]*d[3]);\n", + "del_e = (n[0]*e[0])+(n[1]*e[1])+(n[2]*e[2])+(n[3]*e[3]);\n", + "del_H0 = (del_H*10**3)-((del_a*T1)+((del_b/2)*T1**2)+((del_c/3)*T1**3)+((del_d/4)*T1**4)-(del_e/T1));\n", + "I = (math.log(Ka1))-((1./R)*((-del_H0/T1)+(del_a*math.log(T1))+((del_b/2)*T1)+((del_c/6)*T1**2)+((del_d/12)*T1**3)+((del_e/(2*T1**2)))));\n", + "Ka2 = math.exp(((1./R)*((-del_H0/T2)+(del_a*math.log(T2))+((del_b/2)*T2)+((del_c/6)*T2**2)+((del_d/12)*T2**3)+((del_e/(2*T2**2)))))+I);\n", + "\n", + "\t\t\t # Results\n", + "print 'The equilibrium constant for the water gas shift reaction at 1000K\\\n", + " by taking into account the variation of del_H with temperature = %f '%(Ka2);\n", + "print 'The equilibrium constant for the water gas shift reaction at 1000K without\\\n", + " considering the variation of del_H with temperature as given by Example14.3 = %0.4f '%(Ka2_prev);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equilibrium constant for the water gas shift reaction at 1000K by taking into account the variation of del_H with temperature = 0.664976 \n", + "The equilibrium constant for the water gas shift reaction at 1000K without considering the variation of del_H with temperature as given by Example14.3 = 1.0855 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.5 page no : 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "import math\n", + "\n", + "# variables\n", + "deltaGf = -161.781 # kJ from exa. 14.2\n", + "deltaG298 = deltaGf - (-137.327)\n", + "deltaH298 = -200.660 - (-110.532)\n", + "deltaA = 18.382 - 28.068 - 2 * 27.012\n", + "deltaB = (101.564 - 4.631 - 2 * 3.509) * 10**-3\n", + "deltaC = -28.683 * 10**-6\n", + "deltaD = 0\n", + "deltaE = (0.258 - 2 * 0.690) * 10**5\n", + "T = 298.15\n", + "\n", + "# calculations\n", + "deltaHf298 = -238.648 + 37.988\n", + "deltaH0 = Symbol('deltaH0')\n", + "Eq = deltaH0 + deltaA*T + deltaB*T**2/2 + deltaC*T**3/3 - deltaE/T - deltaH298*1000\n", + "deltaH0 = solve(Eq,deltaH0)[0]/1000\n", + "I = Symbol('I')\n", + "\n", + "Eq1 = deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I + 24454\n", + "I = round(solve(Eq1,I)[0],3)\n", + "\n", + "T = 500\n", + "deltaG500 = (deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I)/1000\n", + "\n", + "Ka = math.exp(-22048/(8.314*T))\n", + "e = Symbol('e')\n", + "Eq3 = ( (e*(3-2*e)**2) / (1 - e)**3) / 0.4973 -1\n", + "e = round(solve(Eq3,e)[0],4)\n", + "yCH3OH = e/(3-2*e)\n", + "yco = (1-e)/(3-2*e)\n", + "yh2 = (2*(1-e) / (3-2*e))\n", + "\n", + "# Results\n", + "print \"E = %.4f\"%e\n", + "print \"YCH30H = %.4f\"%yCH3OH\n", + "print \"YCO = %.4f\"%yco\n", + "print \"YH2 = %.4f\"%yh2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 0.0506\n", + "YCH30H = 0.0175\n", + "YCO = 0.3275\n", + "YH2 = 0.6550\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.6, Page 496" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy.solvers import solve \n", + "from sympy import Symbol \n", + "\n", + "#Variables\n", + "e = Symbol('e')\n", + "\n", + "#Calculations\n", + "x = solve((((e/(3-2*e))/(((1-e)/(3-2*e))*(((2*(1-e))/(3-2*e))**2)))-49.73),e)\n", + "print \"e =\",round(x[0],3)\n", + "ych3oh = x[0]/(3-2*x[0])\n", + "yco = (1-x[0])/(3-2*x[0])\n", + "yh2 = ((2*(1-x[0]))/(3-2*x[0]))\n", + "print \"yCH3OH =\",round(ych3oh,4)\n", + "print \"yCO =\",round(yco,4)\n", + "print \"yH2 =\",round(yh2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e = 0.801\n", + "yCH3OH = 0.5731\n", + "yCO = 0.1423\n", + "yH2 = 0.2846\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.7 pageno : 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "\n", + "# variables\n", + "Ka = 4.973*10**-3 # from example 14.5\n", + "Ky = 25 * Ka # from example 14.5\n", + "\n", + "# calculations\n", + "e = Symbol('e')\n", + "Eq1 = ( (e*(4-e)**2)/(1-e)**3 ) / .1243 - 1\n", + "e = round(solve(Eq1,e)[0],5)\n", + "yCH3OH = e/(8-2*e)\n", + "yco = (1-e)/(8-2*e)\n", + "yh2 = (2*(1-e) / (8-2*e))\n", + "yA = 5/(8-2*e)\n", + "\n", + "# Results\n", + "print \"E = %.5f\"%e\n", + "print \"YCH30H = %.5f\"%yCH3OH\n", + "print \"YCO = %.5f\"%yco\n", + "print \"YH2 = %.5f\"%yh2\n", + "print \"YA = %.5f\"%yA" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 0.00762\n", + "YCH30H = 0.00095\n", + "YCO = 0.12428\n", + "YH2 = 0.24857\n", + "YA = 0.62619\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.8 pageno : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "\n", + "# variables\n", + "Ka = 4.973*10**-3 # example 14.5\n", + "Ky = 25 * Ka # example 14.5\n", + "\n", + "# calculations and results\n", + "e = Symbol('e')\n", + "Eq1= ((e*(1-e))/(1-2*e)**2)/.03108 - 1\n", + "e = solve(Eq1,e)\n", + "print \"part a\"\n", + "print \"e = %.5f and e = %.5f\"%(e[0],e[1])\n", + "print \"The admissible value is e = %.5f\"%e[0]\n", + "\n", + "print \"part b\"\n", + "print \"e = 0.0506 ( from example 14.5 )\"\n", + "\n", + "x = 4\n", + "e = Symbol('e')\n", + "Eq1= ((e/(1-e) ) * ( (5 - 2*e)/ (2-e) )**2)/ 0.4973 - 1\n", + "e = solve(Eq1,e)\n", + "print \"part c\"\n", + "print \"e = %.4f\" %(e[0])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part a\n", + "e = 0.02845 and e = 0.97155\n", + "The admissible value is e = 0.02845\n", + "part b\n", + "e = 0.0506 ( from example 14.5 )\n", + "part c" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "e = 0.0727\n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.9 pageno : 499" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "\n", + "# variables\n", + "Ka = 4.973*10**-3 # example 14.5\n", + "Ky = 25 * Ka # example 14.5\n", + "\n", + "# calculations\n", + "e = Symbol('e')\n", + "Eq1 = (0.02 + e)*(1.51-e)**2 / (1-e)**3 / Ky - 1\n", + "e = solve(Eq1,e)[0]\n", + "\n", + "# Results\n", + "print \"E = %.5f\"%e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 0.03165\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.10 pageno : 500" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import *\n", + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "from scipy.integrate import quad\n", + "import math\n", + "\n", + "# variables\n", + "deltaA = round(28.850 - 27.012 - 0.5 * 30.255,2)\n", + "deltaB = (12.055 - 3.509 - 0.5 * 4.207) * 10**-3\n", + "deltaC = 0\n", + "deltaD = 0\n", + "deltaE = round((1.006 - 0.690 + 0.5 * 1.887),3) * 10**5\n", + "deltaH298 = -241.997\n", + "Ts = [2000,2500,3000,3500,3800]\n", + "deltaHt = []\n", + "deltaGt = []\n", + "Ka = []\n", + "Ea = []\n", + "Eb = []\n", + "\n", + "# Calculations\n", + "T = 298.15\n", + "deltaH0 = Symbol('deltaH0')\n", + "Eq = deltaH0 + deltaA*T + deltaB*T**2/2 + deltaC*T**3/3 + deltaD*T**4/4 - deltaE/T - deltaH298*1000\n", + "deltaH0 = round(solve(Eq,deltaH0)[0]/1000,3)\n", + "I = Symbol('I')\n", + "Eq1 = deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I + 228600\n", + "I = round(solve(Eq1,I)[0],3)\n", + "\n", + "def fun1(T1):\n", + " #return 42.1395*(T1 - 298.15) + 5.613*10**-3/2*(T1**2 - 298.15**2) + .2535 * 10**5 * (1./T1 - 1/298.15)\n", + " return 42.1395*T1 + 5.613*10**-3/2 * T1**2 + 0.2535*10**5/T1 - 12898.37\n", + "\n", + "for T in Ts:\n", + " Ht = deltaH0*1000 + deltaA*T + deltaB*T**2/2 + deltaC*T**3/3 + deltaD*T**4/4 - deltaE/T \n", + " Gt = deltaH0*1000 - deltaA*T*math.log(T) - deltaB*T**2/2 - deltaC*T**3/6 - deltaD*T**4/12 - deltaE/(2*T) - 8.314 * T * I \n", + " ka = math.exp(-Gt/(8.314*T))\n", + " e = Symbol('e')\n", + " Eq2 = ( e * (3-e)**(1./2) ) / ( 1-e)**(3./2) / ka - 1\n", + " b = round(solve(Eq2)[0],4)\n", + " a = (quad(fun1,298.15,T)[0]/1000) / -Ht\n", + " deltaHt.append(Ht)\n", + " deltaGt.append(Gt)\n", + " Ka.append(ka)\n", + " Ea.append(a)\n", + " Eb.append(b)\n", + "\n", + "\n", + "# Results \n", + "plot(Ts,Ea,\"g\")\n", + "plot(Ts,Eb,\"b\")\n", + "xlabel(\"T(k)\")\n", + "ylabel(\"E\")\n", + "suptitle(\"Plot of e versus adiabatic reaction temperature\")\n", + "show()\n", + "print \"from plot, it can be seen that both lines are simultaneously satisfied at the point \\\n", + "\\nintersection where e = 0.68 and T = 3440 K\"\n", + "e = 0.68\n", + "T = 3440\n", + "yh2 = (1- e)/(1.5 - 0.5*e)\n", + "yo2 = 0.5*(1-e) / (1.5-0.5*e)\n", + "yh2o = e/(1.5- 0.5*e)\n", + "\n", + "print \"yH2 = %.4f\"%yh2\n", + "print \"yO2 = %.4f\"%yo2\n", + "print \"yH2O = %.4f\"%yh2o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['solve', 'draw_if_interactive', 'e']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAAC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PQA8Dly5cRFBSEXbt2lZmFs02bNrhx40YVJyQyLBYKosdQuhtKoVCgdevWsLCwwJkzZ8osp9Fo\noFAoqjoekUHVkzsAUU3TokUL5OTkaO8LIdC0aVOEh4fDz88PTzzxBHr37g0AuHXrlvaylEQ1FVsU\nRJVU0jIwNTVFly5dcOXKFe3jCoUCrVq1wq5du/Dmm28iNjYWAHD69Gn06tVLtsxEhsBpxokew+rV\nq5Geno7Zs2frXEaj0cDNzQ1xcXGoV4+Nd6q52KIgegyvvPIKdu/erfc6zrt27YK/vz+LBNV4bFEQ\nEZFebFEQEZFeLBRERKQXCwUREenFQkFERHqxUBARkV4sFEREpNf/ARiuLhNA/r0uAAAAAElFTkSu\nQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "from plot, it can be seen that both lines are simultaneously satisfied at the point \n", + "intersection where e = 0.68 and T = 3440 K\n", + "yH2 = 0.2759\n", + "yO2 = 0.1379\n", + "yH2O = 0.5862\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.11 Page No : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from numpy import *\n", + "\n", + "# Variables\n", + "stoichio_matrix = matrix([[-1,-1, 1, 3, 0, 0],[0, -1, -1, 1, 1 ,0],[-1, -2, 0 ,4, 1, 0], \\\n", + " [0,0, 1, 0, -1, 0.5],[-1, 2 ,0, 0, 1, -2],[-1, 1, 1, 1, 0, -1]])\t\t\t #Framing the stoichiometric coefficient matrix\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "r = linalg.matrix_rank(stoichio_matrix)\n", + "\n", + "stoichio_matrix[0] = -stoichio_matrix[0];\n", + "stoichio_matrix[2] = stoichio_matrix[2]+stoichio_matrix[0];\n", + "stoichio_matrix[5:] = stoichio_matrix[5:]+stoichio_matrix[0];\n", + "stoichio_matrix[6:] = stoichio_matrix[6:]+stoichio_matrix[0];\n", + "stoichio_matrix[1] = -stoichio_matrix[1];\n", + "stoichio_matrix[2] = stoichio_matrix[2]+stoichio_matrix[1];\n", + "stoichio_matrix[5:] = stoichio_matrix[5:]-(3*stoichio_matrix[1]);\n", + "stoichio_matrix[6:] = stoichio_matrix[6:]-(2*stoichio_matrix[1]);\n", + "x = stoichio_matrix[:3]\n", + "y = stoichio_matrix[:4];\n", + "stoichio_matrix[:4] = y;\n", + "stoichio_matrix[:3] = x;\n", + "stoichio_matrix[5:] = stoichio_matrix[5:]+(4*stoichio_matrix[3]);\n", + "stoichio_matrix[6:] = stoichio_matrix[6:]+(2*stoichio_matrix[3]);\n", + "\n", + "\n", + "\n", + "# Results\n", + "print ' The stoichiometric coefficient matrix after performing the elementary row operations = ';\n", + "print (stoichio_matrix);\n", + "print ' The number of primary reactions = %d'%(r);\n", + "print ' The non zero rows are 1,2,4'\n", + "print ' The primary reactions are: CH4g)+H2Og)--->COg)+3H2g)%( COg)+H2Og)--->CO2g)+H2g),( CO2g)--->COg)+1./2)O2g)'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The stoichiometric coefficient matrix after performing the elementary row operations = \n", + "[[ 1. 1. -1. -3. -0. -0. ]\n", + " [-0. 1. 1. -1. -1. -0. ]\n", + " [ 0. 0. 0. 0. 0. 0. ]\n", + " [ 0. 0. 1. 0. -1. 0.5]\n", + " [-1. 2. 0. 0. 1. -2. ]\n", + " [ 0. -1. 1. 1. -1. 1. ]]\n", + " The number of primary reactions = 3\n", + " The non zero rows are 1,2,4\n", + " The primary reactions are: CH4g)+H2Og)--->COg)+3H2g)%( COg)+H2Og)--->CO2g)+H2g),( CO2g)--->COg)+1./2)O2g)\n" + ] + } + ], + "prompt_number": 169 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.13 pageno : 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "\n", + "# variables\n", + "Ka1 = 0.1429\n", + "Ka2 = 2\n", + "\n", + "# calculations and Results\n", + "\n", + "# assume e1 = .3\n", + "e2 = Symbol('e2')\n", + "Eq1 = ((0.3 - e2)*(0.3+e2) /((0.7 - e2) * 0.7)) / 0.1429 -1\n", + "e2 = solve(Eq1)\n", + "print \"E2 = %.1f and %.1f \"%(e2[0],e2[1])\n", + "\n", + "# since negative value is inadmissible. e2 = 0.2\n", + "e2 = round(e2[1],1)\n", + "e1 = Symbol('e1')\n", + "Eq2 = ((e1 + 0.2)*(0.2) /((0.8 - e1) *(e1 - 0.2) ) ) / 2 -1\n", + "e1 = solve(Eq2)\n", + "print \"E1 = %.1f and %.1f \"%(e1[0],e1[1])\n", + "e1 = round(e1[0],1)\n", + "print \"Satisfied results when e1 = %.1f and e2 = %.1f\"%(e1,e2)\n", + "\n", + "yA = (1-e1-e2)/2\n", + "yB = (1-e1)/2\n", + "yC = (e1-e2)/2\n", + "yD = (e1+e2)/2\n", + "yE = e2/2\n", + "\n", + "print \"yA = %.2f\"%yA\n", + "print \"yB = %.2f\"%yB\n", + "print \"yC = %.2f\"%yC\n", + "print \"yD = %.2f\"%yD\n", + "print \"yE = %.2f\"%yE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E2 = -0.1 and 0.2 \n", + "E1 = 0.3 and 0.6 \n", + "Satisfied results when e1 = 0.3 and e2 = 0.2\n", + "yA = 0.25\n", + "yB = 0.35\n", + "yC = 0.05\n", + "yD = 0.25\n", + "yE = 0.10\n" + ] + } + ], + "prompt_number": 214 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 14.14 page no : 515" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol\n", + "from sympy.solvers import solve\n", + "\n", + "# variables\n", + "Kc = 2.92\n", + "\n", + "# Calculations and results\n", + "e = Symbol('e')\n", + "Eq1 = (e*(10+e)/((5-e)*(10-e)))/Kc - 1\n", + "e = round(solve(Eq1)[0],4)\n", + "print \"E = %.4f\"%e\n", + "\n", + "cA = 5-e\n", + "cB = 10-e\n", + "cC = e\n", + "cD = 10+e\n", + "\n", + "print \"CA = %.4f kmol/m*3\"%cA\n", + "print \"CB = %.4f kmol/m*3\"%cB\n", + "print \"CC = %.4f kmol/m*3\"%cC\n", + "print \"CD = %.4f kmol/m*3\"%cD" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 3.0446\n", + "CA = 1.9554 kmol/m*3\n", + "CB = 6.9554 kmol/m*3\n", + "CC = 3.0446 kmol/m*3\n", + "CD = 13.0446 kmol/m*3\n" + ] + } + ], + "prompt_number": 220 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.15, Page 517" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 1200. \t\t\t #temperature in K\n", + "T0 = 298.15 \t\t\t #reference temperature in K\n", + "a = [41.84,45.369,82.34];\n", + "b = [20.25*10**-3,8.688*10**-3,49.75*10**-3];\n", + "c = [0,0,0];\n", + "d = [0,0,0];\n", + "e = [-4.51*10**5,-9.619*10**5,-12.87*10**5];\n", + "del_Gf = [-604.574,-394.815,-1129.515]\n", + "del_Hf = [-635.975,-393.978,-1207.683]\n", + "n = [1,1,-1]\n", + "R = 8.314\n", + "\n", + "# Calculations\n", + "del_G = (n[0]*del_Gf[0])+(n[1]*del_Gf[1])+(n[2]*del_Gf[2]);\n", + "del_H = (n[0]*del_Hf[0])+(n[1]*del_Hf[1])+(n[2]*del_Hf[2]);\n", + "del_a = (n[0]*a[0])+(n[1]*a[1])+(n[2]*a[2]);\n", + "del_b = (n[0]*b[0])+(n[1]*b[1])+(n[2]*b[2]);\n", + "del_c = (n[0]*c[0])+(n[1]*c[1])+(n[2]*c[2]);\n", + "del_d = (n[0]*d[0])+(n[1]*d[1])+(n[2]*d[2]);\n", + "del_e = (n[0]*e[0])+(n[1]*e[1])+(n[2]*e[2]);\n", + "del_H0 = ((del_H*10**3)-((del_a*T0)+((del_b/2)*T0**2)+((del_c/3)*T0**3)+((del_d/4)*T0**4)-(del_e/T0)))*10**-3;\n", + "IR = (1./(T0))*((del_H0*10**3)-(del_a*T0*math.log(T0))-((del_b/2)*T0**2)-((del_c/6)*T0**3)-((del_d/12)*T0**4)-((del_e/2)*(1./T0))-(del_G*10**3));\n", + "del_G_T = ((del_H0*10**3)-(del_a*T*math.log(T))-((del_b/2)*T**2)-((del_c/6)*T**3)-((del_d/12)*T**4)-((del_e/2)*(1./T))-(IR*T))*10**-3;\n", + "Ka = math.exp((-del_G_T*10**3)/(R*T))\n", + "y = 1;\n", + "phi = 1;\n", + "f0 = 1;\n", + "P = (Ka*f0)/(phi*y)\n", + "\n", + "# Results\n", + "print ' The decomposition pressure,P = %f bar '%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The decomposition pressure,P = 2.384295 bar \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch2.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch2.ipynb new file mode 100755 index 00000000..b7849ef3 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch2.ipynb @@ -0,0 +1,117 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:76568d79b614fc85568c92855047632dbe19f5ec7540dbd287268967c3318f2b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Review of basic concepts" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "t1 = 300.;\t\t\t #initial temperature of gas in K\n", + "p1 = 0.1;\t\t\t #initial pressure of the gas in MPa\n", + "p2 = 0.5;\t\t\t #pressure of gas after heating in MPa\n", + "p3 = 0.1;\t\t\t #pressure of gas after expansion in MPa\n", + "n = 1.; \t\t\t #number of moles of gas in mole\n", + "\n", + "# Calculations\n", + "w1 = 0*n; \t\t\t # Calculations of work done by the gas during heating in kJ (since dv = 0)\n", + "t2 = t1*(p2/p1);\t\t\t # Calculations of temperature of gas after heating in K\n", + "t3 = t2;\t\t \t # Calculations of temperature of gas after expansion in K (constant temperature expansion)\n", + "volume2 = p2/p3;\t\t\t # Calculations of ratio of volume of gas after expansion to the volume of gas after heating (no unit)\n", + "w2 = (R*t2*math.log(volume2)*n)/1000\n", + "volume3 = t3/t1;\t\t\n", + "w3 = (R*t1*(1-volume3)*n)/1000\n", + "work_net = w1+w2+w3;\t\t\t # Calculations of net work done by the gas for the process in kJ\n", + "\n", + "# Results\n", + "print ' Work done during heating process:Work from 1-2 = %d kJ '%(w1);\n", + "print ' Work done during constant temperature expansion: Work from 2-3 = %.3f kJ '%(w2);\n", + "print ' Work done during constant pressure compression: Work from 3-1 = %.3f kJ '%(w3);\n", + "print ' Net work done by the gas during the process = %.3f kJ '%(work_net);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Work done during heating process:Work from 1-2 = 0 kJ \n", + " Work done during constant temperature expansion: Work from 2-3 = 20.071 kJ \n", + " Work done during constant pressure compression: Work from 3-1 = -9.977 kJ \n", + " Net work done by the gas during the process = 10.095 kJ \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "v1 = 0.1;\t\t\t #volume of gas initially present in the cylinder in m**3\n", + "p1 = 0.1;\t\t\t #initial pressure of gas in MPa\n", + "p_atm = 0.1;\t\t #atmospheric pressure acting on the piston in MPa\n", + "v2 = 0.3;\t\t\t #volume of gas after heating in m**3\n", + "p2 = 0.6;\t\t\t #pressure of gas after heating in MPa\n", + "\n", + "# Calculations\n", + "work = ((p1+p2)*(v2-v1)*10**6)/(2*1000);\t\t\t # Calculations of work done by the gas in kJ \n", + "\n", + "# Results\n", + "print ' The work done by the gas = %d kJ'%(work);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done by the gas = 70 kJ\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch3.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch3.ipynb new file mode 100755 index 00000000..2b39d6e0 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch3.ipynb @@ -0,0 +1,897 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8d10c3a8d696216084bffc2404a32e0b3c15831ac555c05fcb7016ab7d75d0e7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : PvT relations of fluids" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "X = 0.8; \t\t\t #Quality of wet steam (no unit)\n", + "T = 150.;\t \t\t #Temperature of the wet steam in degree celsius\n", + "vf = 0.0010908;\t\t\t #molar volume of saturated liquid in m**3/kg\n", + "vg = 0.3924;\t\t\t #molar volume of saturated vapour in m**3/kg\n", + "uf = 631.63;\t\t\t #molar internal energy of the saturated liquid in kJ/kg\n", + "ug = 2558.6;\t\t\t #molar internal energy of the saturated vapour in kJ/kg\n", + "\n", + "# Calculations\n", + "V = (X*vg)+((1-X)*vf);\t\t\t # Calculations of specific volume in m**3/kg using Eq.(3.3)\n", + "U = (X*ug)+((1-X)*uf);\t\t\t # Calculations of specific internal energy in kJ/kg using Eq.(3.6)\n", + "\n", + "# Results\n", + "print 'The specific volume of wet steam = %0.4f m**3/kg '%(V);\n", + "print 'The specific internal energy of wet steam = %0.1f kJ/kg '%(U);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific volume of wet steam = 0.3141 m**3/kg \n", + "The specific internal energy of wet steam = 2173.2 kJ/kg \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 1.42;\t\t\t #specific volume of wet steam in m**3/kg\n", + "T = 100.;\t\t\t #temperature of wet steam in degree celsius\n", + "vf = 0.0010437;\t\t #molar volume of saturated liquid in m**3/kg\n", + "vg = 1.673;\t\t\t #molar volume of saturated vapour in m**3/kg\n", + "\n", + "# Calculations\n", + "X = (V-vf)/(vg-vf);\t\t\t # Calculations of the quality of wet steam using Eq.(3.3) (no unit)\n", + "\n", + "# Results\n", + "print ' The quality of wet steam = %0.4f '%(X);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quality of wet steam = 0.8487 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 100.;\t\t\t #temperature inside the vessel in degree celsius\n", + "V = 0.00317;\t\t\t #specific volume of water at the critical point in m**3/kg\n", + "vf = 0.0010437;\t\t\t #molar volume of saturated liquid in m**3/kg\n", + "vg = 1.673;\t\t\t #molar volume of saturated vapour in m**3/kg\n", + "\n", + "# Calculations\n", + "X = (V-vf)/(vg-vf);\t\t\t # Calculations of the quality of wet steam using Eq.(3.3) (no unit)\n", + "ratio = (X*vg)/((1-X)*vf);\t\t\t # Calculations of volume ratio of saturated vapour to the saturated liquid (no unit)\n", + "\n", + "# Results\n", + "print ' The volume ratio of saturated vapour to the saturated liquid = %0.2f '%(ratio);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume ratio of saturated vapour to the saturated liquid = 2.04 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "U = 2000.\t\t\t #specific internal energy of liquid-vapour mixture in kJ/kg\n", + "uf = 850.6\t\t\t #specific internal energy of saturated liquid in kJ/kg\n", + "ug = 2593.2\t\t\t #specific internal energy of saturated vapour in kJ/kg\n", + "\n", + "# Calculations\n", + "mass_ratio = (U-uf)/(ug-U);\t\t\t # Calculations of the mass ratio of vapour to liquid using the lever rule (no unit)\n", + "\n", + "# Results\n", + "print ' The mass ratio of vapour to liquid = %0.4f '%(mass_ratio);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mass ratio of vapour to liquid = 1.9376 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 1.\t\t\t #number of moles of n-octane vapour in mol\n", + "T = 427.85;\t\t\t #tempearture of n-octane vapour in K\n", + "P = 0.215;\t\t\t #pressure n-octane vapour in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in (kPa m**3)/(kmol K)\n", + "\n", + "# Calculations\n", + "V = ((n*10**-3)*R*T)/(P*10**3);\t\t\t # Calculations of volume using ideal gas law-Eq.(3.9) in m**3\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane vapour = %f m**3 '%(V);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane vapour = 0.016545 m**3 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 1.; \t\t\t #number of moles occupied by n-octane vapour in mol\n", + "T = 427.85;\t\t\t #temperature in K\n", + "P = 0.215;\t\t\t #saturation pressure in MPa\n", + "a = 3.789;\t\t\t #van der Waals constant in Pa(m**3/mol)**2\n", + "b = 2.37*10**-4;\t #van der Waals constant in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "Vguess = (n*R*T)/(P*10**6);\t\t\t \n", + "Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b\n", + "tolerance = 1e-6\n", + "\n", + "while abs(Vguess-Vnew)>tolerance:\n", + " Vguess = Vnew;\n", + " Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b;\t\t\t #the iteration process to solve the system of equation\n", + "\n", + "V = Vnew;\t\t\t #The volume calculated using the van der Waals equation in m**3/mol\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane vapour obtained by van der Waals equation = %f m**3/mol'%(V);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane vapour obtained by van der Waals equation = 0.015675 m**3/mol\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 1.; \t\t\t #number of moles occupied by n-octane liquid in mol\n", + "T = 427.85;\t\t\t #temperature in K\n", + "P = 0.215;\t\t\t #saturation pressure in MPa\n", + "a = 3.789;\t\t\t #van der Waals constant in Pa(m**3/mol)**2\n", + "b = 2.37*10**-4;\t\t\t #van der Waals constant in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "Vguess = b\n", + "Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b\n", + "tolerance = 1e-6\n", + "while abs(Vguess-Vnew)>tolerance:\n", + " Vguess = Vnew;\n", + " Vnew = (R*T)/((P*10**6)+(a/Vguess**2))+b;\t\t\t #the iteration process to solve the system of equation\n", + "\n", + "V = Vnew;\t\t\t #The volume calculated using the van der Waals equation in m**3/mol\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane liquid obtained by van der Waals equation = %e m**3/mol'%(V);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane liquid obtained by van der Waals equation = 3.517652e-04 m**3/mol\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "T = 427.85; \t\t \t #temperature in K\n", + "P = 0.215;\t \t\t #saturation pressure in MPa\n", + "a = 3.789;\t\t \t #van der Waals constant in Pa(m**3/mol)**2\n", + "b = 2.37*10**-4;\t\t\t #van der Waals constant in m**3/mol\n", + "R = 8.314;\t\t \t #universal gas constant in (Pa m**3)/(mol K)\n", + "Pcvc = 3\n", + "RTc = 8.\n", + "# Calculations\n", + "#The Cardan's method simplifies the equation of state into a cubic equation which can be solved easily\n", + "#The general form of the cubic equation is (Z**3)+(alpha*Z**2)+(beeta*Z)+gaamma = 0, where alpha,beeta and gaamma are determined using established relations\n", + "\n", + "A = (a*P*10**6)/(R*T)**2;\t\t\t\n", + "B = (b*P*10**6)/(R*T);\t\t\t \n", + "alpha = -1-B;\t\t\t \n", + "beeta = A;\t\t\t \n", + "gaamma = -(A*B);\t\n", + "p = round(beeta-(alpha**2)/3,4)\n", + "q = round(((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma,4)\n", + "D = (q**2/4)+(p**3/27);\t\n", + "\n", + "\n", + "if D>0 :\n", + " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3);\n", + " vf = ((Z)*R*T)/(P*10**6);\t\t\n", + " vg = ((Z)*R*T)/(P*10**6);\t\t\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3);\t\n", + " Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " Z = [Z1 ,Z2, Z3];\n", + " vf = (min(Z)*R*T)/(P*10**6)\n", + " vg = (max(Z)*R*T)/(P*10**6)\n", + "else:\n", + " r = math.sqrt((-(p**3)/27));\t\t\t # Calculations of r using Eq.(3.38)\n", + " theta = math.cos((-(q)/2)*(1./r));\t\t\t # Calculations of theta in radians using Eq.(3.37)\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3);\t\t\t #Three unequal real roots given by Eqs.(3.34,3.35 and 3.36)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", + " Z = [Z1, Z2, Z3];\n", + " vf = (min(Z)*R*T)/(P*10**6)\n", + " vg = (max(Z)*R*T)/(P*10**6)\n", + "\n", + "crit = Pcvc/RTc \n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane saturated liquid obtained by Cardans method = %.3e m**3/mol'%(vf);\n", + "print ' The volume occupied by n-octane saturated vapour obtained by Cardans method = %.2e m**3/mol'%(vg);\n", + "print \" At the critical point, PcVc/RTc = %.3f\"%crit\n", + "\n", + "# Note: value of D is calculated wrongly in book. Please calculate manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane saturated liquid obtained by Cardans method = -9.345e-04 m**3/mol\n", + " The volume occupied by n-octane saturated vapour obtained by Cardans method = 1.55e-02 m**3/mol\n", + " At the critical point, PcVc/RTc = 0.375\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from numpy import *\n", + "import math\n", + "\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature in K\n", + "P = 0.215;\t\t\t #saturation pressure in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "\n", + "# Calculations\n", + "a = (0.42748*R**2*Tc**2.5)/(Pc*100*10**3*math.sqrt(T));\t\t\t \n", + "b = (0.08664*R*Tc)/(Pc*100*10**3);\t\t\t\n", + "\n", + "\n", + "A = (a*P*10**6)/(R*T)**2;\t\t\t \n", + "B = (b*P*10**6)/(R*T);\n", + "alpha = -1.;\t\t\t\n", + "beeta = A-B-B**2.;\t\n", + "gaamma = -(A*B);\t\n", + "p = beeta-(alpha**2)/3.\n", + "q = ((2*alpha**3.)/27.)-((alpha*beeta)/3)+gaamma\n", + "D = (((q)**2)/4.)+(((p)**3)/27.);\t\t\t \n", + "#if D>0 then:\n", + " # Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", + " # vf = ((Z)*R*T)/(P*10**6)\n", + " # vg = ((Z)*R*T)/(P*10**6)\n", + "#elif D == 0:\n", + " # Z1 = ((-2*(q/2))**(1./3))-(alpha/3);\n", + " # Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " # Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " # Z = [Z1 ,Z2, Z3];\n", + " # vf = (min(Z)*R*T)/(P*10**6);\t\t\n", + " # vg = (max(Z)*R*T)/(P*10**6);\t\t\n", + "#else:\n", + "\n", + "r = math.sqrt((-(p**3)/27));\t\t\t\n", + "theta = (math.acos((-(q)/2)*(1./r)));\n", + "Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + "Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3);\t\n", + "Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", + "Z = [Z1, Z2, Z3];\n", + "vf = (min(Z)*R*T)/(P*10**6);\t\t\n", + "vg = (max(Z)*R*T)/(P*10**6);\t\t\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane saturated vapour) using Redlich-Kwong equation of state = %f m**3/mol'%(vg);\n", + "print ' The volume occupied by n-octane saturated liquid) using Redlich-Kwong equation of state = %f m**3/mol'%(vf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane saturated vapour) using Redlich-Kwong equation of state = 0.015401 m**3/mol\n", + " The volume occupied by n-octane saturated liquid) using Redlich-Kwong equation of state = 0.000244 m**3/mol\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T = 180.;\t\t\t #temperature of water in degree celsius\n", + "P = 1.0027;\t\t\t #saturation pressure of water in MPa\n", + "Tc = 647.3;\t\t\t #critical temperature of water in K\n", + "Pc = 221.2;\t\t\t #critical pressure of water in bar\n", + "Tr = 0.7;\t\t\t #reduced temperature at which acentric factor was defined by Pitzer \n", + "\n", + "# Calculations\n", + "T1 = Tr*Tc; \t\t\t #calculating temperature in K using reduced temperature value\n", + "T1 = T1-273.15;\t\t\t #conversion to degree celsius\n", + "Pr = (P*10)/Pc;\t\t\t # Calculations of reduced pressure (no unit) using saturation pressure at t1. In this case t1 equals t, therefore the given saturation pressure is taken\n", + "w = -math.log10(Pr)-1.0;\t\t\t # Calculations of acentric factor using Eq.(3.62)\n", + "\n", + "# Results\n", + "print ' The acentric factor of water = %f '%(w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The acentric factor of water = 0.343614 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 409.41;\t\t\t #temperature of n-octane in degree celsius\n", + "P = 4.98;\t\t\t #pressure in bar\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", + "w = 0.398;\t\t\t #acentric factor (no unit)\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "Tr = (T+273.15)/Tc;\t\n", + "Pr = P/Pc;\t\t\t\n", + "z0 = 0.96;\t\t\t\n", + "V1 = (z0*R*(T+273.15))/(P*10**5);\t\t\t \n", + "z1 = 0.01;\t\t\t \n", + "z = z0+(w*z1);\t\t\n", + "V2 = (z*R*(T+273.15))/(P*10**5)\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane obtained by the two parameter compressibilty \\\n", + " factor correlation = %f m**3/mol'%(V1);\n", + "print ' The volume occupied by n-octane obtained by the three parameter compressibility \\\n", + "factor correlation = %f m**3/mol'%(V2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane obtained by the two parameter compressibilty factor correlation = 0.010939 m**3/mol\n", + " The volume occupied by n-octane obtained by the three parameter compressibility factor correlation = 0.010985 m**3/mol\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 1.;\t \t\t #volume of the tank in m**3\n", + "m = 180.;\t\t\t #mass of carbon dioxide in kg\n", + "T = 91.8;\t\t\t #temperature of the tank in degree celsius after it is placed in the vicinity of a furnace\n", + "Tc = 304.2;\t\t\t #critical temperature of carbon dioxide in K\n", + "Pc = 73.87;\t\t\t #critical pressure of carbon dioxide in bar\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "mwt = 44.*10**-3\t #molecular weight of carbon dioxide in kg/mol\n", + "n = m/mwt;\t\t\t # Calculations of number of moles of carbon dioxide in the tank in moles\n", + "MV = V/n;\t\t\t # Calculations of molar volume in m**3/mol\n", + "slope = (MV*Pc*10**5)/(R*(T+273.15));\t\t\t #slope of the straight line formed when z0 is plotted against Pr formed by using the relation z0 = (V*Pc*Pr)/(R*T)\n", + "Tr = (T+273.15)/Tc;\t\t\t # Calculations of reduced temperature (no unit)\n", + "\n", + "#At the given conditions, the state of CO2 must lie on the curve corresponding to the obtained value of Tr. To determine the state of CO2, a straight line passing through the origin, with the obtained value of slope is drawn on the z0 vs Pr plot of Fig.3.12 and the point of intersection of this straight line with the Tr curve is obtained to get the value of z0\n", + "z0 = 0.725;\t\t\t #value of compressibilty factor obtained by doing the above mentioned procedure\n", + "P = (z0*R*10**-6*(T+273.15))/(MV)\t\t\t # Calculations of pressure in MPa using Eq.(3.59)\n", + "\n", + "# Results\n", + "print ' The pressure developed by carbon dioxide = %.0f MPa'%(P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The pressure developed by carbon dioxide = 9 MPa\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "\n", + "# Variables\n", + "V = 1.;\t\t\t #volume of the tank in m**3\n", + "m = 180.;\t\t\t #mass of carbon dioxide in kg\n", + "T = 91.8;\t\t\t #temperature of the tank in degree celsius after it is placed in the vicinity of a furnace\n", + "Tc = 304.2;\t\t\t #critical temperature of carbon dioxide in K\n", + "Pc = 73.87;\t\t\t #critical pressure of carbon dioxide in bar\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "w = 0.239;\t\t\t #acentric factor (no unit)\n", + "\n", + "# Calculations\n", + "mwt = 44.*10**-3\n", + "n = m/mwt\n", + "MV = V/n;\t\t\t\n", + "Tr = (T+273.15)/Tc\n", + "z0 = 0.725\n", + "z_init = z0;\t\t\t \n", + "slope = (MV*Pc*10**5)/(R*(T+273.15));\t\t\t \n", + "Prguess = z_init/slope;\t\n", + "z1guess = 0.1;\t\t\t \n", + "tolerance = 1e-6;\t\t\t \n", + "\n", + "def solver_function(zi):\n", + " return zi-(z0+(w*z1guess))\n", + "\n", + "z = fsolve(solver_function,z1guess)\n", + "Pr = z/slope;\t\t\t \n", + "P = ((Pc*10**5)*Pr)*10**-6\n", + "\n", + "# Results\n", + "print ' The pressure developed by carbon dioxide = %f MPa'%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The pressure developed by carbon dioxide = 9.295806 MPa\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve\n", + "\n", + "\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", + "P = 0.215;\t\t\t #pressure of n-ocatne vapour in MPa\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "Pc = 2.497;\t\t\t #critical pressure of n-octane in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "z_init = 1\n", + "h = (0.08664*Pr)/(z_init*Tr)\n", + "tolerance = 1e-6;\t\t\t\n", + "\n", + "def solver_func(zi):\n", + " return zi-((1./(1-h))-((h/(1+h))*(4.93398/(Tr**(3./2)))))\n", + "\n", + "z = fsolve(solver_func,h)\n", + "V = (z*R*T)/(P*10**6);\t\t\t\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane vapour obtained by the generalized form of \\\n", + " \\n Redlich-Kwong equation of state = %.2e m**3/mol'%(V);\n", + "\n", + "\n", + "# Note : Answer may vary because of rouding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane vapour obtained by the generalized form of \n", + " Redlich-Kwong equation of state = 1.55e-02 m**3/mol\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature in K\n", + "P = 0.215;\t\t\t #saturation pressure in MPa\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", + "w = 0.398;\t\t\t #acentric factor (no unit) \n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "#The Cardan's method simplifies the equation of state into a cubic equation which can be solved easily\n", + "#The general form of the cubic equation is (Z**3)+(alpha*Z**2)+(beeta*Z)+gaamma = 0, where alpha,beeta and gaamma are determined using established relations\n", + "\n", + "Tr = T/Tc\n", + "Pr = (P*10**6)/(Pc*10**5)\n", + "S = 0.48+(1.574*w)-(0.176*w**2)\n", + "alpha1 = (1+(S*(1-math.sqrt(Tr))))**2\n", + "a = (0.42748*R**2*Tc**2*alpha1)/(Pc*10**5)\n", + "b = (0.08664*R*Tc)/(Pc*10**5)\n", + "A = (a*P*10**6)/(R*T)**2\n", + "B = (b*P*10**6)/(R*T)\n", + "alpha = -1.\n", + "beeta = A-B-B**2\n", + "gaamma = -(A*B)\n", + "p = beeta-(alpha**2)/3\n", + "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", + "D = (((q)**2)/4.)+(((p)**3)/27.)\n", + "\n", + "if D>0:\n", + " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", + " vf = ((Z)*R*T)/(P*10**6)\n", + " vg = ((Z)*R*T)/(P*10**6)\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", + " Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " Z = [Z1, Z2, Z3];\n", + " vf = (min(Z)*R*T)/(P*10**6);\t\t\n", + " vg = (max(Z)*R*T)/(P*10**6);\t\t\n", + "else:\n", + " r = math.sqrt((-(p**3)/27));\t\t\n", + " theta = acos((-(q)/2)*(1./r));\t\t\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", + " Z = [Z1, Z2, Z3];\n", + " vf = (min(Z)*R*T)/(P*10**6)\n", + " vg = (max(Z)*R*T)/(P*10**6)\n", + "\n", + "# Results\n", + "print ' The volume occupied by n-octane saturated vapour obtained by Soave-Redlich-Kwong \\\n", + " equation of state = %f m**3/mol'%(vg);\n", + "print ' The volume occupied by n-octane saturated liquid obtained by Soave-Redlich-Kwong \\\n", + " equation of state = %f m**3/mol'%(vf);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane saturated vapour obtained by Soave-Redlich-Kwong equation of state = 0.015207 m**3/mol\n", + " The volume occupied by n-octane saturated liquid obtained by Soave-Redlich-Kwong equation of state = 0.000227 m**3/mol\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature in K\n", + "P = 0.215;\t\t\t #saturation pressure in MPa\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", + "w = 0.398;\t\t\t #acentric factor (no unit) \n", + "R = 8.314;\t\t\t #universal gas constant in (Pa m**3)/(mol K)\n", + "\n", + "# Calculations\n", + "Tr = T/Tc;\t\t\t\n", + "Pr = (P*10**6)/(Pc*10**5)\n", + "S = 0.37464+(1.54226*w)-(0.26992*w**2)\n", + "alpha1 = (1+(S*(1-math.sqrt(Tr))))**2\n", + "a = (0.45724*R**2*Tc**2*alpha1)/(Pc*10**5)\n", + "b = (0.07780*R*Tc)/(Pc*10**5)\n", + "A = (a*P*10**6)/(R*T)**2\n", + "B = (b*P*10**6)/(R*T)\n", + "alpha = -1+B;\t\n", + "beeta = A-(2*B)-(3*B**2)\n", + "gaamma = -(A*B)+(B**2)+(B**3)\n", + "p = beeta-(alpha**2)/3;\t\t\n", + "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", + "D = (((q)**2)/4)+(((p)**3)/27)\n", + "\n", + "if D>0:\n", + " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", + " vf = ((Z)*R*t)/(P*10**6)\n", + " vg = ((Z)*R*t)/(P*10**6)\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", + " Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " Z = [Z1 ,Z2, Z3];\n", + " vf = (min(Z)*R*T)/(P*10**6)\n", + " vg = (max(Z)*R*T)/(P*10**6)\n", + "else:\n", + " r = math.sqrt((-(p**3)/27))\n", + " theta = .1533\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3);\t\t\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", + " Z = [Z1, Z2, Z3];\n", + " vf = (min(Z)*R*T)/(P*10**6)\n", + " vg = (max(Z)*R*T)/(P*10**6)\n", + " \n", + "# Results\n", + "print ' The volume occupied by n-octane saturated vapour, obtained by Peng\\\n", + "-Robinson equation of state = %.3e m**3/mol'%(vg);\n", + "print ' The volume occupied by n-octane saturated liquid, obtained by Peng-Robinson\\\n", + " equation of state = %.3e m**3/mol'%(vf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume occupied by n-octane saturated vapour, obtained by Peng-Robinson equation of state = 1.514e-02 m**3/mol\n", + " The volume occupied by n-octane saturated liquid, obtained by Peng-Robinson equation of state = 2.003e-04 m**3/mol\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch4.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch4.ipynb new file mode 100755 index 00000000..5433cf7c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch4.ipynb @@ -0,0 +1,1291 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : First law of thermodynamics and its applications" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q1 = 50.;\t\t\t #Energy added as heat in kJ when the system undergoes a process 1-2\n", + "W1 = 30.;\t\t\t #Work done by the system in kJ during the process 1-2\n", + "Q2 = -40.;\t\t\t #Energy rejected as heat in kJ during the process 2-3\n", + "W2 = -50.;\t\t\t #Work done on the system in kJ during the process 2-3\n", + "Q3 = 0.\t \t\t #System undergoes an adiabatic process to return to initial state\n", + "\n", + "# Calculations\n", + "U2_1 = Q1-W1\n", + "U3_2 = Q2-W2\n", + "U1_3 = (-U2_1)-(U3_2)\n", + "W3 = Q3-U1_3\n", + "net_work = W1+W2+W3\n", + "\n", + "# Results\n", + "print ' The net work done by the system = %d kJ'%(net_work);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The net work done by the system = 10 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 1. \t\t\t #volume of tank in m**3;\n", + "N = 200.;\t\t\t #number of moles of carbon dioxide in tank in mol\n", + "T1 = 25.;\t\t\t #ambient temperature in degree celsius\n", + "I = 5.; \t\t\t #current in amperes passed through the resistor place in the tank\n", + "Voltage = 440.\t\t #voltage in volts existing across the resistor\n", + "t = 10.;\t\t\t #time in minutes for which the current is passed\n", + "a = 363.077*10**-3\t\t\t #van der waals constant in Pa (m**3/mol)**2\n", + "b = 0.043*10**-3\t\t\t #van der waals constant in m**3/mol\n", + "Cv = 32.34\t\t\t #molar heat capacity at constant volume in J/molK\n", + "R = 8.314\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "MV = V/N;\t\t\t # Calculations of molar volume in m**3/mol\n", + "Q = 0. \t\t\t #energy transfer as heat during the process\n", + "W_Pdv = 0.;\t\t\t #mechanical work done by the system\n", + "W_elec = -(Voltage*I*t*60)*(10**-6)\n", + "U2_1 = Q-(W_Pdv+W_elec);\t\t\t\n", + "T2 = ((U2_1*10**6)/(N*Cv))+(T1+273.15)\n", + "P = (((R*T2)/(MV-b))-(a/(MV**2)))*10**-3\n", + "\n", + "# Results\n", + "print ' The final pressure = %0.3f kPa '%(P);\n", + "print ' The final temperature = %0.2f K'%(T2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final pressure = 827.832 kPa \n", + " The final temperature = 502.23 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 0.1;\t\t\t #volume of tank in m**3\n", + "T1 = 200.;\t\t\t #initial temperature of saturated steam inside the tank in degree celsius\n", + "T2 = 150.;\t\t\t #temperature in degree celsius that the tank attains after some time due to poor insulation\n", + "P1 = 15.549;\t\t\t #pressure in bar obtained from steam tables corresponding to T1\n", + "vg1 = 0.1272;\t\t\t #specific volume of saturated vapour in m**3/kg obtained from steam tables corresponding to T1\n", + "hg1 = 2790.9;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables corresponding to T1\n", + "P2 = 4.76;\t\t\t #pressure in bar obtained from steam tables corresponding to T2\n", + "vf = 0.0010908;\t\t\t #specific volume of saturated liquid in m**3/kg obtained from steam tables corresponding to T2\n", + "vg2 = 0.3924;\t\t\t #specific volume of saturated vapour in m**3/kg obtained from steam tables corresponding to T2\n", + "hf = 632.15;\t\t\t #specific enthalpy of saturated liquid in kJ/kg obtained from steam tables corresponding to T1\n", + "hg2 = 2745.4;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables corresponding to T1\n", + "\n", + "# Calculations\n", + "ug1 = ((hg1*10**3)-(P1*10**5*vg1))*10**-3\n", + "uf = ((hf*10**3)-(P2*10**5*vf))*10**-3\n", + "ug2 = ((hg2*10**3)-(P2*10**5*vg2))*10**-3\n", + "v2 = vg1\n", + "X2 = (v2-vf)/(vg2-vf)\n", + "u2 = (X2*ug2)+((1-X2)*uf)\n", + "m = V/vg1\n", + "Q = m*(u2-ug1)\n", + "mf = m*(1-X2)\n", + "mg = m*X2\n", + "\n", + "# Results\n", + "print ' The energy transferred as heat = %f kJ'%(Q);\n", + "print ' The mass of liquid in the tank in the final state = %0.3f kg'%(mf)\n", + "print ' The mass of vapour in the tank in the final state = %0.3f kg'%(mg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The energy transferred as heat = -1053.825572 kJ\n", + " The mass of liquid in the tank in the final state = 0.533 kg\n", + " The mass of vapour in the tank in the final state = 0.253 kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "W = 1.;\t \t\t #weight of steam in kg in the piston cylinder assembly\n", + "X = 0.8;\t\t\t #quality of steam (no unit)\n", + "T1 = 150.;\t\t\t #initial temperature of steam in degree celsius\n", + "T2 = 200.;\t\t\t #final temperature of steam in degree celsius\n", + "P1 = 476.;\t\t\t #pressure in kPa obatined from steam tables (corresponding to T1)\n", + "vf = 0.0010908;\t\t\t #specific volume of saturated liquid in m**3/kg obatined from steam tables (corresponding to T1)\n", + "vg = 0.3924;\t\t\t #specific volume of satuarted vapour in m**3/kg obatined from steam tables (corresponding to T1)\n", + "hf = 632.15;\t\t\t #specific enthalpy of saturated liquid in kJ/kg obtained from steam tables (corresponding to T1)\n", + "hg = 2745.4;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables (corresponding to T1)\n", + "\n", + "# Calculations\n", + "V1 = (X*vg)+((1-X)*vf)\n", + "h1 = (X*hg)+((1-X)*hf)\n", + "P2 = 0.476;\t\t\t \n", + "P_int1 = 0.4;\t\t\n", + "P_int2 = 0.5;\t\t\n", + "V_int1 = 0.5343;\t\n", + "V_int2 = 0.4250;\t\n", + "h_int1 = 2860.4;\t\n", + "h_int2 = 2855.1;\t\n", + "V2 = (((P2-P_int1)/(P_int2-P_int1))*(V_int2-V_int1))+V_int1\n", + "h2 = (((P2-P_int1)/(P_int2-P_int1))*(h_int2-h_int1))+h_int1\n", + "Q = (h2-h1)*W\n", + "W = P1*(V2-V1)*W\n", + "\n", + "# Results\n", + "print ' The work done by steam = %0.2f kJ '%(W);\n", + "print ' The net energy transferred as heat = %0.2f kJ'%(Q);\n", + "print ' The final state of superheated steam,Pressure = %0.3f MPa '%(P2);\n", + "print ' The final state of superheated steam,Temperature = %d degree celsius '%(T2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done by steam = 65.26 kJ \n", + " The net energy transferred as heat = 533.62 kJ\n", + " The final state of superheated steam,Pressure = 0.476 MPa \n", + " The final state of superheated steam,Temperature = 200 degree celsius \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "W = 1. \t\t\t #weight of steam in kg in the piston cylinder assembly\n", + "X = 0.8;\t\t\t #quality of steam (no unit)\n", + "T1 = 150.\t\t\t #initial temperature of steam in degree celsius\n", + "I = 5. \t\t\t #current passed in Amperes\n", + "V = 220.\t\t\t #voltage in volts across the resistor\n", + "t = 10. \t\t\t #time for which the current is passed in minutes\n", + "P1 = 476.\t\t\t #pressure in kPa obatined from steam tables (corresponding to T1)\n", + "vf = 0.0010908;\t\t\t #specific volume of saturated liquid in m**3/kg obatined from steam tables (corresponding to T1)\n", + "vg = 0.3924;\t\t\t #specific volume of satuarted vapour in m**3/kg obatined from steam tables (corresponding to T1)\n", + "hf = 632.15;\t\t\t #specific enthalpy of saturated liquid in kJ/kg obtained from steam tables (corresponding to T1)\n", + "hg = 2745.4;\t\t\t #specific enthalpy of saturated vapour in kJ/kg obtained from steam tables (corresponding to T1)\n", + "\n", + "# Calculations\n", + "V1 = (X*vg)+((1-X)*vf);\t\n", + "h1 = (X*hg)+((1-X)*hf);\t\n", + "Ws = -V*I*t*60*10**-3;\t\n", + "h2 = h1-Ws;\t\t\t \n", + "P2 = 0.476;\t\t\t \n", + "T_int1 = 200;\t\t\n", + "T_int2 = 300;\t\t\n", + "V_int1 = 0.4512;\t\n", + "V_int2 = 0.5544;\t\n", + "h_int1 = 2856.37;\t\n", + "h_int2 = 3065.38;\t\n", + "V2 = (((h2-h_int1)/(h_int2-h_int1))*(V_int2-V_int1))+V_int1;\n", + "T2 = (((h2-h_int1)/(h_int2-h_int1))*(T_int2-T_int1))+T_int1;\n", + "W = (P1*10**3*(V2-V1)*W)*10**-3\n", + "\n", + "# Results\n", + "print ' The work done by steam = %0.2f kJ '%(W);\n", + "print ' The final temperature = %0.2f degree celsius'%(T2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done by steam = 94.94 kJ \n", + " The final temperature = 260.47 degree celsius\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 1.\t\t\t #number of moles of carbon dioxide in kmol\n", + "T1 = 298.\t\t\t #initial temperature in K\n", + "T2 = 600.\t\t\t #final raised temperature in K\n", + "a = 45.369\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "b = 8.688*10**-3\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "e = -9.619*10**5\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "\n", + "# Calculations\n", + "Q = N*10**3*((a*(T2-T1)+((b/2)*(T2**2-T1**2))-(e*((1./T2)-(1./T1)))))*10**-6\n", + "\n", + "# Results\n", + "print ' The amount of energy to be transferred as heat = %0.3f MJ'%(Q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The amount of energy to be transferred as heat = 13.255 MJ\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 298. \t\t\t #initial temperature in K\n", + "T2 = 600.\t \t\t #final raised temperature in K\n", + "a = 45.369;\t\t \t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "b = 8.688*10**-3;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "e = -9.619*10**5;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "\n", + "# Calculations\n", + "Cpm = ((a*(T2-T1))+((b/2)*(T2**2-T1**2))-(e*((1./T2)-(1./T1))))/(T2-T1)\n", + "\n", + "# Results\n", + "print ' The isobaric molar heat capacity = %0.2f J/molK'%(Cpm);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The isobaric molar heat capacity = 43.89 J/molK\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 1.\t \t\t #number of moles of carbon dioxide in kmol\n", + "T1 = 298.\t\t\t #initial temperature in K\n", + "T2 = 600.\t\t\t #final raised temperature in K\n", + "a = 45.369;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "b = 8.688*10**-3;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "e = -9.619*10**5;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "\n", + "# Calculations\n", + "Cpm = ((a*(T2-T1))+((b/2)*(T2**2-T1**2))-(e*((1./T2)-(1./T1))))/(T2-T1)\n", + "Q = N*10**3*Cpm*(T2-T1)*10**-6\n", + "\n", + "# Results\n", + "print ' The amount of energy to be transferred as heat = %0.3f MJ '%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The amount of energy to be transferred as heat = 13.255 MJ \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 100.\t\t\t #number of moles of carbon dioxide in mol\n", + "T1 = 298.\t\t\t #initial temperature in K\n", + "Q = 1. \t\t\t #energy added as heat in MJ\n", + "a = 45.369;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "b = 8.688*10**-3;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "e = -9.619*10**5;\t\t\t #coefficient in the specific heat capacity expression where Cp = a+bT+eT**-2\n", + "\n", + "# Calculations\n", + "delh = Q*10**6/N\n", + "Tguess = 520.\t\n", + "Cpm_guess = a+(b*((T1+Tguess)/2))+(e/(T1*Tguess))\n", + "T2_guess = T1+(delh/Cpm_guess)\n", + "tolerance = 1e-6;\t\t\t\n", + "while abs(T2_guess-Tguess)>tolerance:\n", + " Tguess = T2_guess;\n", + " Cpm_guess = a+(b*((T1+Tguess)/2))+(e/(T1*Tguess));\n", + " T2_guess = T1+(delh/Cpm_guess)\n", + "\n", + "T2 = T2_guess\n", + "\n", + "# Results\n", + "print ' The final temperature = %0.1f K'%(T2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final temperature = 531.1 K\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "volume_ratio = 1./15\t #final volume to the initial volume of air at the end of compression stroke (no unit)\n", + "gaamma = 1.4\t\t\t #ratio of the molar heat capacities at constant pressure and constant volume for air (no unit)\n", + "T1 = 300.\t\t\t #initial temperature of air in K\n", + "P1 = 0.1;\t\t\t #initial pressure of air in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "T2 = T1*((1./volume_ratio)**(gaamma-1))\n", + "P2 = P1*((1./volume_ratio)**(gaamma))\n", + "W = (R*(T1-T2)*10**-3)/(gaamma-1)\n", + "\n", + "# Results\n", + "print ' The final temperature = %0.2f K'%(T2);\n", + "print ' The final pressure = %0.4f MPa'%(P2);\n", + "print ' Work done per mole of air = %0.3f kJ/mol'%(W);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final temperature = 886.25 K\n", + " The final pressure = 4.4313 MPa\n", + " Work done per mole of air = -12.185 kJ/mol\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "volume_ratio = 1./15;\t\t\t #final volume to the initial volume of ideal gas at the end of compression (no unit)\n", + "T1 = 300. \t\t\t #initial temperature of ideal gas in K\n", + "P1 = 0.1;\t \t\t #initial pressure of ideal gas in MPa\n", + "R = 8.314;\t\t \t #universal gas constant in J/molK\n", + "n = 1.2;\t\t\t #index of expansion (no unit)\n", + "gaamma = 1.4;\t\t\t #ratio of the molar heat capacities at constant pressure and constant volume for ideal gas (no unit)\n", + "\n", + "# Calculations\n", + "P2 = P1*((1./volume_ratio)**n)\n", + "T2 = T1*(P2/P1)*(volume_ratio)\n", + "W = (R*(T1-T2)*10**-3)/(n-1)\n", + "del_u = (R*(T2-T1)*10**-3)/(gaamma-1)\n", + "q = del_u+W\n", + "\n", + "# Results\n", + "print ' The final pressure = %0.3f MPa'%(P2);\n", + "print ' The final temperature = %0.1f K'%(T2);\n", + "print ' Work done on the gas = %f kJ/mol'%(W);\n", + "print ' Heat interaction during the process = %f kJ/mol'%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final pressure = 2.578 MPa\n", + " The final temperature = 515.6 K\n", + " Work done on the gas = -8.963805 kJ/mol\n", + " Heat interaction during the process = -4.481902 kJ/mol\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 1.;\t \t\t #volume of tank in m**3\n", + "T0 = 300.\t\t\t #initial temperature of ideal gas in K\n", + "P0 = 0.1\t\t\t #initial pressure of ideal gas in MPa\n", + "T = 500.\t\t\t #temperature of ideal gas in the pipeline in K\n", + "P = 3.\t\t \t #pressure of ideal gas in the pipeline in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "gaamma = 1.4;\t\t\t #ratio of the molar heat capacities at constant pressure and constant volume for ideal gas (no unit)\n", + "\n", + "# Calculations\n", + "Pf = 3.\n", + "Tf = (Pf*10**6)/((((Pf*10**6)-(P0*10**6))/(gaamma*T))+((P0*10**6)/T0));\n", + "N = (V/R)*(((Pf*10**6)/Tf)-((P0*10**6)/T0));\n", + "\n", + "# Results\n", + "print ' The final temperature = %0.1f K'%(Tf);\n", + "print ' The amount of gas that has entered the tank = %0.2f mol'%(N);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final temperature = 670.2 K\n", + " The amount of gas that has entered the tank = 498.30 mol\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from scipy.optimize import fsolve\n", + "\n", + "# Variables\n", + "V = 3. \t\t\t #volume of tank in m**3\n", + "T0 = 100.;\t\t\t #initial temperature of steam in degree celsius\n", + "T = 300.;\t\t\t #temperature of superheated steam in the pipeline in degree celsius\n", + "P = 3.;\t\t\t #pressure of superheated steam in the pipeline in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "Ps = 101.33\n", + "vg = 1.673\n", + "hg = 2676.0\n", + "h = 2995.1\n", + "u0 = ((hg*10**3)-(Ps*10**3*vg))*10**-3\n", + "m0 = V/vg;\t\t\t\n", + "\n", + "Tf = 418.\n", + "vf = 0.102329\n", + "uf = 2965.78\n", + "\n", + "mf_guess = V/vf\n", + "\n", + "def solver_func(ui):\n", + " return (mf_guess*ui)-(m0*u0)-((mf_guess-m0)*h);\n", + "\n", + "uf_solved = fsolve(solver_func,mf_guess)\n", + "mf = mf_guess\n", + "mass = mf-m0\n", + "\n", + "# Results\n", + "print \" The final state of steamsuperheated, Pressure = %d MPa\"%(P);\n", + "print \" The final state of steamsuperheated, Temperature = %d degree celsius\"%(Tf);\n", + "print \" The mass of steam that entered the tank = %0.3f kg\"%(mass);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final state of steamsuperheated, Pressure = 3 MPa\n", + " The final state of steamsuperheated, Temperature = 418 degree celsius\n", + " The mass of steam that entered the tank = 27.524 kg\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 0.1;\t\t\t #volume of cylinder in m**3\n", + "T0 = 300.\t\t\t #initial temperature of nitrogen in K\n", + "P0 = 14.\t\t\t #initial pressure of nitrogen in MPa\n", + "P = 0.1;\t\t\t #ambient pressure in MPa\n", + "Pf = 2. \t\t\t #final pressure of nitrogen in MPa\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "gaamma = 1.4;\t\t #ratio of the molar heat capacities at constant pressure and constant volume for nitrogen (no unit)\n", + "\n", + "# Calculations\n", + "def solver_func(Ti):\n", + " return ((P0*10**6)-(Pf*10**6))-((gaamma/2)*(T0+Ti)*(((P0*10**6)/T0)-((Pf*10**6)/Ti)));\n", + "\n", + "Tguess = 300.\n", + "Tf = fsolve(solver_func,Tguess)\n", + "\n", + "N = (V/R)*(((P0*10**6)/T0)-((Pf*10**6)/Tf));\n", + "\n", + "# Results\n", + "print ' The final temperature = %0.1f K'%(Tf);\n", + "print ' The amount of gas that has escaped from the cylinder = %0.2f mol'%(N);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The final temperature = 181.2 K\n", + " The amount of gas that has escaped from the cylinder = 428.52 mol\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.16 Page No : 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T0 = 300.;\t\t\t #initial temperature of superheated steam in degree celsius\n", + "P0 = 3.;\t\t\t #initial pressure of superheated steam in MPa\n", + "Xe = 0.85;\t\t\t #quality of steam leaving the turbine (no unit)\n", + "Tf = 45.;\t\t\t #final temperature of steam leaving the turbine in degree celsius\n", + "Vi = 10.;\t\t\t #velocity of steam at the entrance in m/s\n", + "Ve = 40.;\t\t\t #exit velocity of steam in m/s\n", + "Zi = 10.;\t\t\t #elevation at the entrance in m\n", + "Ze = 4.;\t\t\t #elevation at the exit in m\n", + "m = 1.;\t\t\t #mass flow rate of steam through turbine in kg/s\n", + "g = 9.81;\t\t\t #accleration due to gravity in m/s**2\n", + "\n", + "# Calculations\n", + "hi = 2995.1\n", + "hf = 188.35\n", + "hg = 2583.3\n", + "he = ((1-Xe)*hf)+(Xe*hg)\n", + "Q = 0.\t\t\t \n", + "enthalpy_change = (he*10**3)-(hi*10**3)\n", + "KE_change = ((Ve**2)-(Vi**2))/2\n", + "PE_change = g*(Ze-Zi);\t\t\t\n", + "Ws = Q-(m*(enthalpy_change+KE_change+PE_change)*10**-3)\n", + "err_KE = ((KE_change)/(Ws*10**3))*100;\t\n", + "err_PE = ((abs (PE_change)/(Ws*10**3)))*100\n", + "err = err_KE+err_PE\n", + "\n", + "# Results\n", + "print ' The percentage error when Kinetic energy change is ignored = %0.3f '%(err_KE);\n", + "print ' The percentage error when Potential energy change is ignored = %0.4f '%(err_PE);\n", + "print ' The percentage error when both Kinetic and Potential energy changes are ignored = %f '%(err);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The percentage error when Kinetic energy change is ignored = 0.097 \n", + " The percentage error when Potential energy change is ignored = 0.0076 \n", + " The percentage error when both Kinetic and Potential energy changes are ignored = 0.104999 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.17 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Pi = 5.;\t\t\t #pressure of dry saturated steam at the entrance in bar\n", + "Pe = 2.;\t\t\t #pressure of dry saturated steam at the exit in bar\n", + "Vi = 3.;\t\t\t #velocity of dry saturated steam at the entrance in m/s\n", + "m = 1.; \t\t\t #flow rate of steam through the nozzle in kg/s\n", + "g = 9.81;\t\t\t #acceleration due to gravity in m/s**2\n", + "\n", + "# Calculations\n", + "hi = 2747.5\n", + "he = 2706.3\n", + "ve = 0.8854\n", + "Zi = 0;\t\t\n", + "Ze = 0;\t\t\n", + "Q = 0;\t\t\n", + "Ws = 0;\t\t\n", + "Ve = math.sqrt (2*(((Q-Ws)/m)-(g*(Zi-Ze))-((he*10**3)-(hi*10**3)))+(Vi**2))\n", + "A = (m*ve)/Ve\n", + "\n", + "# Results\n", + "print ' The velocity of dry saturated steam at the exit = %0.2f m/s'%(Ve);\n", + "print ' The cross sectional area of the nozzle at the exit = %0.3e m**2'%(A);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The velocity of dry saturated steam at the exit = 287.07 m/s\n", + " The cross sectional area of the nozzle at the exit = 3.084e-03 m**2\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.18 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 270.\t\t\t #temperature of wet steam in degree celsius\n", + "T2 = 120.\t\t\t #final temperature of superheated steam in degree celsius\n", + "P = 0.1;\t\t\t #pressure of superheated steam in MPa\n", + "\n", + "# Calculations\n", + "hf = 1185.2 \t\t\t\n", + "hg = 2789.9\t \t\t\n", + "he = 2716.04\t\t\t\n", + "Xi = (he-hf)/(hg-hf);\t\n", + "\n", + "# Results\n", + "print ' The quality of wet steam = %0.3f '%(Xi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quality of wet steam = 0.954 \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.20 Page No : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "del_H = -90.135;\t\t\t #standard enthalpy change for the reaction CO(g)+2H2(g)--->CH3OH(g) at 298.15K in kJ\n", + "\n", + "# Calculations\n", + "del_H1 = 2*del_H\n", + "del_H2 = (1./2)*del_H\n", + "\n", + "# Results\n", + "print ' The standard enthalpy change for the reaction 2COg)+4H2g)---->2CH3OHg \\\n", + ") at 298.15K = %0.2f kJ'%(del_H1);\n", + "print ' The standard enthalpy change for the reaction 1./2)COg)+H2g)---->1./2\\\n", + ")CH3OHg) at 298.15K = %0.4f kJ'%(del_H2 );\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The standard enthalpy change for the reaction 2COg)+4H2g)---->2CH3OHg ) at 298.15K = -180.27 kJ\n", + " The standard enthalpy change for the reaction 1./2)COg)+H2g)---->1./2)CH3OHg) at 298.15K = -45.0675 kJ\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.22 Page No : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "del_Hf_C4H10 = -74.943;\t\t\t #smath.tan(math.radiansard enthalpy of formation of C4H10(g) at 298.15K in kJ\n", + "del_Hf_CO2 = -393.978;\t\t\t #smath.tan(math.radiansard enthalpy of formation of CO2(g) at 298.15K in kJ\n", + "del_Hf_H2O = -241.997;\t\t\t #smath.tan(math.radiansard enthalpy of formation of H2O(g) at 298.15K in kJ\n", + "\n", + "# Calculations\n", + "\n", + "del_Hr = (5*del_Hf_H2O)+(4*del_Hf_CO2)-(del_Hf_C4H10);\n", + "\n", + "# Results\n", + "print ' The standard enthalpy change for the reaction C4H10g)+13\\\n", + "/2)O2g)---->4CO2g)+5H2Og) at 298.15K = %0.3f kJ'%(del_Hr);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The standard enthalpy change for the reaction C4H10g)+13/2)O2g)---->4CO2g)+5H2Og) at 298.15K = -2710.954 kJ\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.23 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "del_Hf_C4H10 = -74.943;\t\t\t #smath.tan(math.radiansard enthalpy of formation of C4H10(g) at 298.15K in kJ\n", + "del_Hf_CO2 = -393.978;\t\t\t #smath.tan(math.radiansard enthalpy of formation of CO2(g) at 298.15K in kJ\n", + "del_Hf_H2O = -241.997;\t\t\t #smath.tan(math.radiansard enthalpy of formation of H2O(g) at 298.15K in kJ\n", + "del_H_vap = 43.966;\t\t\t #enthalpy of vaporization of H2O at 298.15K in kJ/mol\n", + "\n", + "# Calculations\n", + "\n", + "del_H1 = 0.\n", + "del_H2 = 5*(-del_H_vap)\n", + "del_H3 = 0.\n", + "\n", + "del_H = (5*del_Hf_H2O)+(4*del_Hf_CO2)-(del_Hf_C4H10);\n", + "del_net_H = (del_H)+(del_H1)+(del_H2)+(del_H3)\n", + "\n", + "# Results\n", + "print ' The standard enthalpy change for the reaction C4H10g)+13/2)O2g)---->4CO2g\\\n", + ")+5H2Ol) at 298.15K = %0.3f kJ'%(del_net_H);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The standard enthalpy change for the reaction C4H10g)+13/2)O2g)---->4CO2g)+5H2Ol) at 298.15K = -2930.784 kJ\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.24 Page No : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "del_H_comb = 2880.44;\t\t\t #gross heating value of n-buatne gas at 298.15K in kJ/mol\n", + "del_Hf_CO2 = -393.978;\t\t\t #standard enthalpy of formation of CO2(g) at 298.15K in kJ\n", + "del_Hf_H2O = -285.958;\t\t\t #standard enthalpy of formation of H2O(l) at 298.15K in kJ\n", + "del_Hf_O2 = 0.;\t\t \t #standard enthalpy of formation of O2(g) at 298.15K in kJ\n", + "\t\t\t \n", + "# Calculations\n", + "n_CO2 = 4.\n", + "n_H2O = 5.\n", + "n_O2 = -13./2\n", + "n_C4H10 = -1.\n", + "\t\t\t \n", + "del_Hf_C4H10 = (n_CO2*del_Hf_CO2)+(n_H2O*del_Hf_H2O)+(n_O2*del_Hf_O2)-(-del_H_comb);\n", + "\n", + "\n", + "# Results\n", + "print ' The standard enthalpy of formation of n-butane gas at 298.15K = %0.3f kJ'%(del_Hf_C4H10);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The standard enthalpy of formation of n-butane gas at 298.15K = -125.262 kJ\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.25 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "del_Hc_A = -890.94;\t\t\t #enthalpy change accompanying reaction A in kJ\n", + "del_Hc_B = -283.18;\t\t\t #enthalpy change accompanying reaction B in kJ\n", + "del_Hc_C = -286.03;\t\t\t #enthalpy change accompanying reaction C in kJ\n", + "del_H_vap = -43.966;\t\t\t #enthalpy change of vaporization of H2O at 298.15K in kJ/mol\n", + "\n", + "# Calculations\n", + "del_H0 = (del_Hc_A)-(del_Hc_B)-(3*del_Hc_C)+(del_H_vap)\n", + "\n", + "# Results\n", + "print ' The standard enthalpy change at 298.15K for the reaction \\\n", + "CH4g)+H2Og)--->COg)+3H2g) = %0.3f kJ'%(del_H0);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The standard enthalpy change at 298.15K for the reaction CH4g)+H2Og)--->COg)+3H2g) = 206.364 kJ\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.26 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#The reaction is : C2H4(g)+H2O(g)--->C2H5OH(g)\n", + "del_H_vap = 43.82\n", + "\n", + "del_Hf = [52.335,-241.997,0,-277.819]\n", + "a = [4.196,28.850,20.691,0]\t\n", + "b = [154.565*10**-3,12.055*10**-3,205.346*10**-3,0]\n", + "c = [-81.076*10**-6,0,-99.793*10**-6,0]\n", + "d = [16.813*10**-9,0,18.825*10**-9,0]\t\n", + "e = [0,1.006*10**5,0,0];\t\t\n", + "\n", + "T1 = 298.15\t\t\n", + "T2 = 400.\t\t\t\n", + "n_C2H4 = -1.\n", + "n_H2O = -1.\n", + "n_C2H5OH = 1.\n", + "\n", + "# Calculations\n", + "\n", + "del_Hf_C2H5OH_g = del_Hf[3]+del_H_vap;\n", + "del_Hr = (n_C2H5OH*del_Hf_C2H5OH_g)+(n_C2H4*del_Hf[0])+(n_H2O*del_Hf[1])\n", + "del_a = (n_C2H4*a[0])+(n_H2O*a[1])+(n_C2H5OH*a[2])\t\t\t \n", + "del_b = (n_C2H4*b[0])+(n_H2O*b[1])+(n_C2H5OH*b[2])\t\t\t \n", + "del_c = (n_C2H4*c[0])+(n_H2O*c[1])+(n_C2H5OH*c[2])\t\t\t \n", + "del_d = (n_C2H4*d[0])+(n_H2O*d[1])+(n_C2H5OH*d[2])\t\t\t \n", + "del_e = (n_C2H4*e[0])+(n_H2O*e[1])+(n_C2H5OH*e[2])\t\t\t \n", + "del_H0 = (del_Hr*10**3)-((del_a*T1)+((del_b/2)*T1**2)+((del_c/3)*T1**3)+((del_d/4)*T1**4)-(del_e/T1))\n", + "del_Hr_T2 = (del_H0+((del_a*T2)+((del_b/2)*T2**2)+((del_c/3)*T2**3)+((del_d/4)*T2**4)-(del_e/T2)))*10**-3;\n", + "\n", + "# Results\n", + "print ' The standard enthalpy change at 400K for the reaction\\\n", + " C2H4g)+H2Og)--->C2H5OHg) = %f kJ'%(del_Hr_T2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The standard enthalpy change at 400K for the reaction C2H4g)+H2Og)--->C2H5OHg) = -44.529472 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.28 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + " \n", + "#The combustion reaction of methane is given by:\n", + "# CH4(g)+2O2(g)--->CO2(g)+2H2O(g)\n", + "\n", + "n_O2 = 2.\t\t\t # stoichiometric amount of oxygen required for combustion\n", + "n_CH4 = 1.\t\t\t #number of moles of CH4(g) in moles\n", + "n_CO2 = 1.\t\t\t #number of moles of CO2(g) formed in the combustion reaction in moles\n", + "n_H2O = 2.\t\t\t #number of moles of H2O(g) formed in the combustion reaction in moles\n", + "del_Hf = [-74.943,0,-393.978,-241.997];\t\t\t # standard enthalpies of formation of CH4(g),O2(g),CO2(g),H2O(g) at 298.15K in kJ\n", + "a = [45.369,28.850,30.255,27.270];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", + "b = [8.688*10**-3,12.055*10**-3,4.207*10**-3,4.930*10**-3];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", + "c = [0,0,0,0]; \t \t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", + "d = [0,0,0,0];\t \t \t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", + "e = [-9.619*10**5,1.006*10**5,-1.887*10**5,0.333*10**5];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),H2O(g),O2(g),N2(g) in J/molK\n", + "per_excess_air = 50. \t\t\t #percentage excess of air supplied to the adiabatic burner\n", + "T_amb = 298.15\t\t\t # temperature at which air and methane enter the burner in K\n", + "per_N2 = 79.\t\t\t #percentage of N2 in the air supplied\n", + "per_O2 = 21.\t\t\t #percentage of O2 in the air supplied\n", + "\n", + "# Calculations\n", + "n_O2_actual = (1+(per_excess_air/100))*n_O2\n", + "n_N2 = n_O2_actual*(per_N2/per_O2);\t\t\t\n", + "n_O2_residual = n_O2_actual-n_O2;\t\t\t\n", + "\n", + "del_Hr = (n_CO2*del_Hf[2])+(n_H2O*del_Hf[3])-(n_O2*del_Hf[1])-(n_CH4*del_Hf[0])\n", + "\n", + "del_a = (n_CO2*a[0])+(n_H2O*a[1])+(n_O2_residual*a[2])+(n_N2*a[3])\n", + "del_b = (n_CO2*b[0])+(n_H2O*b[1])+(n_O2_residual*b[2])+(n_N2*b[3])\n", + "del_c = (n_CO2*c[0])+(n_H2O*c[1])+(n_O2_residual*c[2])+(n_N2*c[3])\n", + "del_d = (n_CO2*d[0])+(n_H2O*d[1])+(n_O2_residual*d[2])+(n_N2*d[3])\n", + "del_e = (n_CO2*e[0])+(n_H2O*e[1])+(n_O2_residual*e[2])+(n_N2*e[3]);\t\n", + "tguess = 500.\n", + "\n", + "def solver_func(ti):\n", + " return (-(del_Hr*10**3))-((del_a*(ti-T_amb))+((del_b/2)*((ti**2)-(T_amb**2)))+((del_c/3)*((ti**3)-(T_amb**3)))+((del_d/4)*((ti**4)-(T_amb**4)))+(del_e*((1./T_amb)-(1./ti))));\n", + "\n", + "T = fsolve(solver_func,tguess)\n", + "\n", + "# Results\n", + "print ' The flame temperature when methane is burned with 50 percent excess air \\\n", + "in an adiabatic burner = %f K'%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The flame temperature when methane is burned with 50 percent excess air in an adiabatic burner = 1793.784965 K\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.29 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T_exit = 550.\t\t\t #temperature in K at which the combustion products leave the boiler\n", + "percent_molar_comp_prdct = [6.28,3.14,7.85,82.73];\t\t\t # percentage molar composition of the combustion products CO2(g),CO(g),O2(g),N2(g) on dry basis\n", + "T_ent = 298.15;\t\t\t #temperature in K at which Propane and air enter the combustion chamber\n", + "del_Hf = [-393.978,-110.532,-241.997,0,0,-103.833];\t\t\t #smath.tan(math.radiansard enthalpies of formation of CO2(g),CO(g),H2O(g),O2(g),N2(g),C3H8(g) at 298.15K in kJ\n", + "a = [45.369,28.068,30.255,27.270,28.850];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", + "\n", + "#coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", + "b = [8.688*10**-3,4.631*10**-3,4.207*10**-3,4.930*10**-3,12.055*10**-3];\n", + "c = [0,0,0,0,0];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", + "d = [0,0,0,0,0];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", + "e = [-9.619*10**5,-0.258*10**5,-1.887*10**5,0.333*10**5,1.006*10**5];\t\t\t #coefficients to compute isobaric molar heat capacity of CO2(g),CO(g),O2(g),N2(g),H2O(g) in J/molK\n", + "per_N2 = 79.\t\t\t #percentage of nitrogen in air\n", + "per_O2 = 21.\t\t\t #percentage of oxygen in air\n", + "molar_mass_propane = 44.*10**-3;\t\t\t #molar mass of propane in kg/mole\n", + "\n", + "# Calculations\n", + "# TAKE BASIS AS 100 mol OF DRY COMBUSTION PRODUCTS\n", + "n_CO2 = percent_molar_comp_prdct[0]\t\t\t #number of moles of CO2(g) in the product stream\n", + "n_CO = percent_molar_comp_prdct[1]\t\t\t #number of moles of CO(g) in the product stream\n", + "n_O2 = percent_molar_comp_prdct[2]\t\t\t #number of moles of O2(g) in the product stream\n", + "n_N2 = percent_molar_comp_prdct[3]\t\t\t #number of moles of N2(g) in the product stream\n", + "\n", + "x = (n_CO2+n_CO)/3;\n", + "\n", + "y = (2*n_N2)/(2*(per_N2/per_O2));\n", + "\n", + "z = (2*y)-(2*n_CO2)-(n_CO)-(2*n_O2);\n", + "\n", + "n_H2O = z\n", + "n_C3H8 = x\n", + "\n", + "del_Hr = (n_CO2*del_Hf[0])+(n_CO*del_Hf[1])+(n_H2O*del_Hf[2])-(n_C3H8*del_Hf[5]);\n", + "\n", + "del_a = (n_CO2*a[0])+(n_CO*a[1])+(n_O2*a[2])+(n_N2*a[3])+(n_H2O*a[4])\t\n", + "del_b = (n_CO2*b[0])+(n_CO*b[1])+(n_O2*b[2])+(n_N2*b[3])+(n_H2O*b[4])\t\n", + "del_c = (n_CO2*c[0])+(n_CO*c[1])+(n_O2*c[2])+(n_N2*c[3])+(n_H2O*c[4])\t\n", + "del_d = (n_CO2*d[0])+(n_CO*d[1])+(n_O2*d[2])+(n_N2*d[3])+(n_H2O*d[4])\t\n", + "del_e = (n_CO2*e[0])+(n_CO*e[1])+(n_O2*e[2])+(n_N2*e[3])+(n_H2O*e[4])\t\n", + "\n", + "#calulation of del_Hp J\n", + "del_Hp = (del_a*(T_exit-T_ent))+((del_b/2)*((T_exit**2)-(T_ent**2)))+((del_c/3)*((T_exit**3)-(T_ent**3)))+((del_d/4)*((T_exit**4)-(T_ent**4)))-(del_e*((1./T_exit)-(1./T_ent)));\n", + "del_H = ((del_Hr*10**3)+(del_Hp))*10**-3;\t\t\t \n", + "mass_propane = n_C3H8*molar_mass_propane;\t\t\t \n", + "energy = (-(del_H*10**3)/mass_propane)*10**-6;\t\t\n", + " \n", + "# Results\n", + "print ' The energy transferred as heat per kg propane = %f MJ'%(energy); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The energy transferred as heat per kg propane = 33.741510 MJ\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch5.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch5.ipynb new file mode 100755 index 00000000..9cf5b1c8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch5.ipynb @@ -0,0 +1,974 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Second law of thermodynamics and its applications" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "Q = 1000.;\t\t \t #amount of energy absorbed by the heat engine in kJ/s\n", + "W = 650.;\t\t\t #work delivered by the heat engine in kW\n", + "T_source = 500. \t\t #temperature of the source in degree celsius\n", + "T_sink = 25.\t\t\t #temperature of the sink in degree celsius\n", + "\n", + "# Calculations\n", + "n_claimed = W/Q\n", + "T1 = T_source+273.15\n", + "T2 = T_sink+273.15\n", + "n_carnot = 1-(T2/T1)\n", + "\n", + "# Results\n", + "print \" The efficiency of the Carnot engine = %0.3f \"%(n_carnot);\n", + "print \" The efficiency of the engine claimed by the inventor = %0.2f \"%(n_claimed);\n", + "if n_claimed0 or S_G == 0 :\n", + " print \" As the first and second law of thermodynamics are satisfied, the device is theoretically feasible \"\n", + "else:\n", + " print \" As both the first and second law or either the first or second law of thermodynamics \\\n", + " are not satisfied, the device is not feasible \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The LHS of the equation applied to the flow device to check if the first law of thermodynamics is satisfied = 2745.4 kJ\n", + " The RHS of the equation applied to the flow device to check if the first law of thermodynamics is satisfied = 2745.5 kJ\n", + " The entropy generated by applying the second law of thermodynamics to the flow device = 0.3552 kJ/kgK\n", + " As the first and second law of thermodynamics are satisfied, the device is theoretically feasible \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pi = 30.\t\t\t #pressure of superheated steam entering the turbine in bar\n", + "Ti = 300.\t\t\t #temperature of superheated steam entering the turbine in degree celsius\n", + "Pe = 0.1\t\t\t #pressure at which steam exits the turbine in bar\n", + "Xe = 0.9\t\t\t #quality of steam at the exit (no unit)(for the actual turbine)\n", + "\n", + "# Calculations\n", + "#For superheated steam at Pi and Ti\n", + "hi = 2995.1;\t\t\t #enthalpy of superheated steam at the entrance in kJ/kg\n", + "si = 6.5422;\t\t\t #entropy of superheated steam at the entrance in kJ/kgK\n", + "\n", + "#For steam at Pe\n", + "hf = 191.83;\t\t\t #enthalpy of saturated liquid in kJ/kg\n", + "hg = 2584.8;\t\t\t #enthalpy of saturated vapour in kJ/kg\n", + "sf = 0.6493;\t\t\t #entropy of saturated liquid in kJ/kgK\n", + "sg = 8.1511;\t\t\t #entropy of saturated vapour in kJ/kgK\n", + "\n", + "X2 = (si-sf)/(sg-sf)\n", + "h2 = (hf*(1-X2))+(X2*hg)\n", + "he = (hf*(1-Xe))+(Xe*hg)\n", + "n_T = (hi-he)/(hi-h2)\n", + "\n", + "# Results\n", + "print \" The isentropic efficiency of the turbine = %f \"%(n_T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The isentropic efficiency of the turbine = 0.703395 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ti = 25.\t\t\t #temperature of air taken in by the adiabatic air compressor in degree celsius\n", + "Pi = 0.1\t\t\t #pressure of air taken in by the adiabatic air compressor in MPa\n", + "Pe = 1.\t \t\t #discharge pressure of air in MPa\n", + "n_c = 0.8\t\t\t #isentropic efficiency of the compressor (no unit)\n", + "gaamma = 1.4\t\t #ratio of molar specific heat capacities (no unit)\n", + "R = 8.314\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "Ti = Ti+273.15\n", + "Te = Ti*(((Pe*10**6)/(Pi*10**6))**((gaamma-1)/gaamma))\n", + "W_s = (((R*gaamma)/(gaamma-1))*(Te-Ti))*10**-3;\t\t\t\n", + "Ws = W_s/n_c\n", + "Te_actual = ((Ws*10**3*(gaamma-1))/(R*gaamma))+Ti\n", + "\n", + "# Results\n", + "print \" The exit temperature of air = %0.2f K\"%(Te_actual);\n", + "print \" The power consumed by the compressor = %f kW/mol\"%(Ws);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The exit temperature of air = 645.01 K\n", + " The power consumed by the compressor = 10.093262 kW/mol\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ti = 30.\t\t\t #temperature of saturated liquid water in degree celsius\n", + "m = 500.\t\t\t #mass flow rate of water being pumped in kg/s\n", + "P2 = 3. \t\t\t #preesure maintained in the boiler in MPa\n", + "n_p = 0.75;\t\t\t #isentropic efficiency of the pump (no unit)\n", + "\n", + "# Calculations\n", + "#For saturated liquid water at Ti\n", + "vf = 0.0010043\n", + "P1 = 4.241;\t\t\n", + "\n", + "Ws_m = (vf*((P2*10**6)-(P1*10**3)))*10**-3\n", + "Ws_act_m = Ws_m/n_p;\t\t\t \n", + "P = ((Ws_act_m*10**3)*m)*10**-6;\n", + "\n", + "# Results\n", + "print \" The power consumed by the pump = %d MW\"%(P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power consumed by the pump = 2 MW\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pi = 3.\t\t\t #pressure of dry saturated steam entering the nozzle in bar\n", + "Xe = 0.98\t\t #quality of steam exiting the nozzle (no unit)\n", + "Pe = 2.\t\t\t #pressure of steam exiting the nozzle in bar\n", + "\n", + "# Calculations\n", + "#For steam at Pi\n", + "hi = 2724.7\n", + "he = 2652.8\n", + "V2_2_s = hi-he\n", + "\n", + "#For steam at Pe\n", + "hf = 504.70\n", + "hg = 2706.3\n", + "he_act = ((1-Xe)*hf)+(Xe*hg)\n", + "V2_2 = hi-he_act;\t\t\t\n", + "n_N = (V2_2)/(V2_2_s)\t\t\n", + "\n", + "# Results\n", + "print \" The isentropic efficiency of the nozzle = %0.3f \"%(n_N);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The isentropic efficiency of the nozzle = 0.868 \n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch6.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch6.ipynb new file mode 100755 index 00000000..cf3f1f12 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch6.ipynb @@ -0,0 +1,214 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Thermodynamic potentials" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 0.1;\t\t\t #mass of superheated steam in the piston cylinder assembly in kg\n", + "P1 = 1.\t \t\t #initial pressure of superheated steam in MPa\n", + "T1 = 300.\t\t\t #initial temperature of superheated steam in degree celsius\n", + "P2 = 0.1\t\t\t #pressure of steam after expansion in MPa\n", + "T2 = 200.\t\t\t #temperature of steam after expansion in degree celsius\n", + "\n", + "# Calculations\n", + "#For steam at P1 and T1:\n", + "h1 = 3052.1\n", + "v1 = 0.2580\n", + "\n", + "#For steam at P2 and T2:\n", + "h2 = 2875.4\n", + "v2 = 2.1720\n", + "\n", + "del_u = (((h1*10**3)-(P1*10**6*v1))-((h2*10**3)-(P2*10**6*v2)))*10**-3\n", + "W = m*(del_u)\n", + "\n", + "# Results\n", + "print \" The work done by steam = %0.2f kJ\"%(W);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work done by steam = 13.59 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 3.\t \t\t #pressure of superheated steam in MPa\n", + "Ti = 300.\t\t\t #temperature at which the steam enters the turbine in degree celsius\n", + "m = 1.\t\t \t #mass flow rate of steam in kg/s\n", + "Te = 60.\t\t\t #temperature of dry saturated steam when it leaves the turbine in degree celsius\n", + "\n", + "# Calculations\n", + "#For steam at P and Ti:\n", + "h1 = 2995.1\t\t\t #specific entahlpy of steam in kJ/kg\n", + "\n", + "#For saturated steam at Te:\n", + "h2 = 2609.7\t\t\t #specific enthalpy of saturated vapour in kJ/kg\n", + "\n", + "Ws = m*(h1-h2)\t\t # Calculations of the power Results of the turbine using Eq.(6.83) in kW\n", + "\n", + "# Results\n", + "print \" The power Results of the turbine = %0.1f kW\"%(Ws);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power Results of the turbine = 385.4 kW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 0.1 \t\t\t #mass of superheated steam in the piston cylinder assembly in kg\n", + "P1 = 3.\t \t\t #initial pressure of superheated steam in MPa\n", + "T1 = 300.\t\t\t #initial temperature of superheated steam in degree celsius\n", + "T0 = 300.\t\t\t #temperature of the reservoir which is placed in thermal contact with the piston-cylinder assembly in degree celsius\n", + "P2 = 0.1\t\t\t #pressure of steam after expansion in MPa\n", + "\n", + "#For steam at P1 and T1:\n", + "h1 = 2995.1\n", + "v1 = 0.08116\n", + "s1 = 6.5422\n", + "\n", + "#For steam at P2 and T2:\n", + "h2 = 3074.5\n", + "v2 = 2.6390\n", + "s2 = 8.2166\n", + "\n", + "# Calculations\n", + "T0 = T0+273.15\n", + "\n", + "W = m*(h1-h2-(((P1*v1)-(P2*v2))*10**3)-(T0*(s1-s2)))\n", + "\n", + "# Results\n", + "print \" The maximum work obtained from steam = %0.2f kJ\"%(W);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum work obtained from steam = 90.07 kJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "P1 = 0.1\t\t\t #pressure at which air enters the compressor in MPa\n", + "T1 = 300.\t\t\t #temperature at which air enters the compressor in K\n", + "P2 = 1. \t\t\t #pressure at which air leaves the compressor in MPa\n", + "T2 = 300.\t\t\t #temperature at which air leaves the compressor in K\n", + "T0 = 300.\t\t\t #ambient temperature in K\n", + "N = 1. \t\t\t #molar flow rate of air in mol/s\n", + "gaamma = 1.4\t\t #ratio of specific heat capacities (no unit)\n", + "R = 8.314\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "\n", + "Ws = (-N*T0*(-R*math.log (P2/P1)))*10**-3\n", + "\n", + "# Results\n", + "print \" The minimum power required to compress one mole per second of air = %0.3f kW\"%(Ws);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The minimum power required to compress one mole per second of air = 5.743 kW\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch7.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch7.ipynb new file mode 100755 index 00000000..879f7b43 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch7.ipynb @@ -0,0 +1,255 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Thermodynamic property relations" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "T2 = 150. \t\t\t #temperature at which water it is desired to boil water in degree celsius\n", + "P1 = 0.10133\t\t\t #ambient pressure in MPa\n", + "T1 = 100.\t \t\t #temperature at which water boils corresponding at pressure P1 in degree celsius\n", + "del_hv = 2256.94\t\t #enthalpy of vaporization in kJ/kg\n", + "R = 8.314;\t\t \t #universal gas constant in J/molK\n", + "M = 18*10**-3;\t\t\t #molar mass of water in kg/mol\n", + "\n", + "# Calculations\n", + "T1 = T1+273.15\n", + "T2 = T2+273.15\n", + "P2 = P1*(math.exp(((del_hv*10**3*M)*((1./T1)-(1./T2)))/(R)))\n", + "\n", + "# Results\n", + "print \" The approximate pressure at which the boiler is to be operated = %0.3f MPa\"%(P2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The approximate pressure at which the boiler is to be operated = 0.476 MPa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.11 Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 60. \t\t\t #mass of the person who wants to skate in kg\n", + "T = -2.\t\t\t #temperature of the ice in degree celsius\n", + "A = 15.\t\t\t #area of contact between the skate edges and ice in mm**2\n", + "vs = 1.091*10**-3;\t\t\t #specific volume of ice in m**3/kg (at Tref)\n", + "vf = 1.0*10**-3;\t\t\t #specific volume of water in m**3/kg (at Tref)\n", + "del_hf = 6.002;\t\t \t #enthalpy of melting of ice in kJ/mol\n", + "g = 9.81;\t\t\t #accleration due to gravity in m/s**2\n", + "Tref = 0. \t\t\t #reference temperature at which the specific enthalpy of ice and water are taken in degree celsius\n", + "\n", + "# Calculations\n", + "Tref = Tref+273.15\n", + "del_P = ((m*g)/(A*10**-6))*10**-6\n", + "del_v = (vf-vs)*(18*10**-3);\t\n", + "del_T = (del_P*10**6)/((del_hf*10**3)/(Tref*del_v));\t\t\t \n", + "\n", + "# Results\n", + "print \" The temperature of ice originally = %d degree celsius \"%(T);\n", + "print \" The reduction in melting point of ice due to the additional pressure,computed using the Clayperon equation = %0.2f degree celsius \"%(del_T);\n", + "if del_T0:\n", + " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3)\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", + " Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " Za = [Z1 ,Z2, Z3];\n", + " Z = max(Za);\n", + "else:\n", + " theta = math.cos((-(q)/2)*(math.sqrt((-27)/(((p)**3)))))\n", + " r = math.sqrt((-(p**3)/27));\t\t\t \n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3)\n", + " Za = [Z1, Z2, Z3];\n", + " Z = max(Za);\n", + "da_dT = (-a*S)/(cmath.sqrt(alpha*T_ref*Tc));\t\t\t \n", + "\n", + "dep_h = (R*T_ref*(Z-1))+(((((T_ref*da_dT)-a)/(2*math.sqrt(2)*b)))*(math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2)))))));\n", + "dep_s = (R*math.log (Z-B))+((1./(2*math.sqrt (2)*b))*(da_dT)*(math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2)))))));\n", + "del_hb = -dep_h\n", + "del_sb = -dep_s\n", + "\n", + "del_hc = ((Cp[0]*(T-T_ref))+(((Cp[1])/2)*((T**2)-(T_ref**2)))+(((Cp[2])/3)*((T**3)-(T_ref**3)))+(((Cp[3])/4)*((T**4)-(T_ref**4)))-((Cp[4])*((1./T)-(1./T_ref))))*10**-3;\n", + "del_sc = ((Cp[0])*math.log (T/T_ref))+((Cp[1])*(T-T_ref))+(((Cp[2])/2)*((T**2)-(T_ref**2)))+(((Cp[3])/3)*((T**3)-(T_ref**3)))-(((Cp[4])/2)*((1./(T**2))-(1./(T_ref**2))))-(R*math.log((P*10**6)/(P2*10**3)))\t\t\t \n", + "\n", + "Z = 0.9151\n", + "da_dT = (-a*S)/(cmath.sqrt (alpha*T*Tc));\t\t\t \n", + "\n", + "del_hd = (R*T*(Z-1))+((((T*da_dT)-a)/(2*math.sqrt(2)*b))*math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2))))));\n", + "\n", + "del_sd = (R*math.log (Z-B))+((1./(2*math.sqrt(2)*b))*(da_dT)*(math.log ((Z+(B*(1+math.sqrt (2))))/(Z+(B*(1-math.sqrt (2)))))));\n", + "\n", + "h = h0+del_ha+(del_hb*10**-3)+del_hc+(del_hd*10**-3)\n", + "s = s0+del_sa+del_sb+del_sc+del_sd;\t\t\t \n", + "\n", + "# Results\n", + "print \" The enthalpy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation\\\n", + " of state =\",h, \"kJ/mol\"\n", + "print \" The entropy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson\\\n", + " equation of state = \",s,\" J/mol K\"\n", + "print \" The volume of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson\\\n", + " equation of state =\",v,\" m**3/mol\"\n", + "\n", + "\n", + "#THE VOLUME OF n-OCTANE VAPOUR AS COMPUTED IN EXAMPLE 3.16 IS 15.14*10**-3 m**3/mol AND NOT \n", + "#15.41*10**-3 m**3/mol AS PRINTED IN THIS EXAMPLE IN THE TEXTBOOK.\n", + "# So ANSWER WOULD BE DIFFERENT\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation of state = (76.8343786515+0.000518888144511j) kJ/mol\n", + " The entropy of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation of state = (207.222784016-0.000740500199878j) J/mol K\n", + " The volume of n-octane vapour at 427.85K and 0.215MPa using the Peng-Robinson equation of state = 0.01514 m**3/mol\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch9.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch9.ipynb new file mode 100755 index 00000000..9efdc810 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch9.ipynb @@ -0,0 +1,1125 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Multicomponent mixtures" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "per_ethanol = 60.\t\t\t #mole percent of ethanol in a ethanol-water system\n", + "per_water = 40. \t\t\t #mole percent of water in a ethanol-water system\n", + "v1 = 57.5*10**-6\t\t\t #partial molar volume of ethanol in the ethanol-water system in m**3\n", + "rho = 849.4;\t \t\t #density of the mixture in kg/m**3\n", + "M_ethanol = 46*10**-3\t\t\t #molar mass of ethanol in kg/mol\n", + "M_water = 18*10**-3 \t\t\t #molar mass of ethanol in kg/mol\n", + "\n", + "# Calculations\n", + "X1 = per_ethanol/100\n", + "X2 = per_water/100\n", + "M = (X1*M_ethanol)+(X2*M_water)\n", + "v = M/rho\n", + "v2 = (v-(X1*v1))/(X2);\t\t\t \n", + "\n", + "# Results\n", + "print \" The partial molar volume of water = %f m**3/mol\"%(v2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The partial molar volume of water = 0.000016 m**3/mol\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 3.\t\t\t #volume of mixture to be prepared in m**3\n", + "per_ethanol = 60.\t\t\t #mole percent of ethanol in a ethanol-water system\n", + "per_water = 40.\t\t\t #mole percent of water in a ethanol-water system\n", + "v1 = 57.5*10**-6;\t\t\t #partial molar volume of ethanol in the ethanol-water system in m**3/mol\n", + "v2 = 16*10**-6\t\t\t #partial molar volume of water in the ethanol-water system in m**3/mol\n", + "v1_pure = 57.9*10**-6\t\t\t #molar volume of pure ethanol in m**3/mol\n", + "v2_pure = 18*10**-6\t\t\t #molar volume of pure water in m**3/mol\n", + "\n", + "# Calculations\n", + "X1 = per_ethanol/100;\t\t\t # Calculations of the mole fraction of ethanol (no unit)\n", + "X2 = per_water/100;\t\t\t # Calculations of the mole fraction of water (no unit)\n", + "v = (X1*v1)+(X2*v2);\t\t\t # Calculations of the molar volume of the solution using Eq.(9.10) in m**3/mol\n", + "N = V/v\t \t\t # Calculations of the mole number of solution required in mol\n", + "N1 = N*X1\t\t\t # Calculations of the mole number of ethanol in solution in mol\n", + "N2 = N*X2;\t\t\t # Calculations of the mole number of water in solution in mol\n", + "V1 = N1*v1_pure;\t\t\t # Calculations of the volume of pure ethanol required in m**3\n", + "V2 = N2*v2_pure;\t\t\t # Calculations of the volume of pure water required in m**3\n", + "\n", + "# Results\n", + "print \" The volume of pure ethanol required = %0.3f m**3\"%(V1);\n", + "print \" The volume of pure water required = %0.3f m**3\"%(V2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volume of pure ethanol required = 2.548 m**3\n", + " The volume of pure water required = 0.528 m**3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", + "P = 0.215;\t\t\t #pressure of n-octane vapour in MPa\n", + "a = 3.789;\t\t\t #van der Waals constant in Pa(m**3/mol)**2\n", + "b = 2.37*10**-4;\t\t\t #van der Waals constant in m**3/mol\n", + "v = 15.675*10**-3;\t\t\t #molar volume of n-octane saturated vapour taken from Example 3.8 in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "Z = (P*10**6*v)/(R*T)\t\t\t # Calculations of the compressibility factor (no unit)\n", + "# Calculations of the fugacity coefficient (f/P) using the expression derived in Example 9.3 (no unit)\n", + "phi = math.exp(Z-1-math.log (((P*10**6)*(v-b))/(R*T))-a/(R*T*v));\n", + "f = (P*10**6*phi)*10**-6\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of n-octane vapour = %0.2f \"%(phi);\n", + "print \" The fugacity of n-octane vapour = %0.4f MPa\"%(f);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of n-octane vapour = 0.95 \n", + " The fugacity of n-octane vapour = 0.2043 MPa\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 427.85;\t\t\t #temperature of n-octane vapour in K\n", + "P = 0.215;\t\t\t #pressure of n-octane vapour in MPa\n", + "Tc = 569.4;\t\t\t #critical temperature of n-octane in K\n", + "Pc = 24.97;\t\t\t #critical pressure of n-octane in bar\n", + "w = 0.398;\t\t\t #acentric factor (no unit)\n", + "\n", + "# Calculations\n", + "Tr = T/Tc\n", + "Pr = (P*10**6)/(Pc*10**5)\n", + "log_phi0 = -0.032;\t\n", + "log_phi1 = -0.025;\n", + "phi = round(log_phi0 + 0.398*log_phi1,3)\n", + "phie = 1.1014\n", + "f = P*phie\n", + "\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of n-octane vapour = %.3f \"%(phi);\n", + "print \" The fugacity of n-octane vapour = %.4f MPa\"%(f);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of n-octane vapour = -0.042 \n", + " The fugacity of n-octane vapour = 0.2368 MPa\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 339.7\t\t\t #temperature of ethylene in K\n", + "P = 1.\t \t\t #pressure of ethylene in bar\n", + "Tc = 283.1\t\t\t #critical temperature of ethylene in K\n", + "Pc = 51.17\t\t\t #critical pressure of ethylene in bar\n", + "w = 0.089\t\t\t #acentric factor (no unit)\n", + "\n", + "# Calculations\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "B0 = 0.083-(0.422/(Tr**1.6))\n", + "B1 = 0.139-(0.172/(Tr**4.2))\n", + "phi = math.exp((B0+(w*B1))*(Pr/Tr))\n", + "f = P*phi\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of ethylene = %0.4f \"%(phi);\n", + "print \" The fugacity of ethylene = %0.4f bar\"%(f);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of ethylene = 0.9963 \n", + " The fugacity of ethylene = 0.9963 bar\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t \t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", + "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", + "vc = [255.0*10**-6,486.0*10**-6];\t\t\t #critical molar volume of n-butane and n-octane in m**3/mol\n", + "Zc = [0.274,0.256];\t \t\t #compressibility factor of n-butane and n-octane corresponding to Tc,Pc (no unit)\n", + "w = [0.199,0.398];\t\t\t #acentric factor of n-butane and n-octane (no unit)\n", + "R = 8.314 \t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "K_12 = 1-((8*((vc[0]*vc[1])**(1./2)))/((((vc[0])**(1./3))+((vc[1])**(1./3)))**3))\n", + "Tc_12 = (((Tc[0])*(Tc[1]))**(1./2))*(1-K_12);\t\t\t \n", + "w_12 = (w[0]+w[1])/2\n", + "Zc_12 = (Zc[0]+Zc[1])/2\n", + "vc_12 = ((((vc[0])**(1./3))+((vc[1])**(1./3)))/2)**3\n", + "Pc_12 = ((Zc_12*R*Tc_12)/vc_12)*10**-6;\t\t\t \n", + "Tr_12 = T/Tc_12\n", + "B_12_0 = 0.083-(0.422/(Tr_12**(1.6)));\t\t\t \n", + "B_12_1 = 0.139-(0.172/(Tr_12**(4.2)));\t\t\t \n", + "B_12 = ((R*Tc_12)/(Pc_12*10**6))*(B_12_0+(w_12*B_12_1))\n", + "Tr1 = T/Tc[0]\n", + "B_11_0 = 0.083-(0.422/(Tr1**(1.6)));\t\t\t \n", + "B_11_1 = 0.139-(0.172/(Tr1**(4.2)));\t\t\t \n", + "B_11 = ((R*Tc[0])/(Pc[0]*10**5))*(B_11_0+(w[0]*B_11_1))\n", + "Tr2 = T/Tc[1]\n", + "B_22_0 = 0.083-(0.422/(Tr2**(1.6)))\n", + "B_22_1 = 0.139-(0.172/(Tr2**(4.2)))\n", + "B_22 = ((R*Tc[1])/(Pc[1]*10**5))*(B_22_0+(w[1]*B_22_1))\n", + "Bm = ((y1**2)*B_11)+((2*y1*y2)*B_12)+((y2**2)*B_22);\t\t\n", + "\n", + "# Results\n", + "print \" The second virial coefficient for an equimolar mixture of n-butane and n-octane at\\\n", + " 600K = %.2e m**3/mol\"%(Bm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The second virial coefficient for an equimolar mixture of n-butane and n-octane at 600K = -3.09e-04 m**3/mol\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "a = [1.3874,3.7890];\t\t\t #van der Waals constant of n-butane and n-octane in Pa(m**3/mol)**2\n", + "b = [0.1163*10**-3,0.237*10**-3];\t\t\t #van der Waals constant of n-butane and n-octane in m**3/mol\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "a_m = ((y1**2)*a[0])+((2*y1*y2)*math.sqrt(a[0]*a[1]))+((y2**2)*a[1])\n", + "b_m = (y1*b[0])+(y2*b[1])\t\t\t\n", + "\n", + "# Results\n", + "print \" The van der Waals constant for an equimolar mixture of n-butane and n-octane,\\\n", + " a_m = %0.4f Pam**3/mol)**2\"%(a_m);\n", + "print \" The van der Waals constant for an equimolar mixture of n-butane and n-octane,\\\n", + " b_m = %f m**3/mol\"%(b_m);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The van der Waals constant for an equimolar mixture of n-butane and n-octane, a_m = 2.4405 Pam**3/mol)**2\n", + " The van der Waals constant for an equimolar mixture of n-butane and n-octane, b_m = 0.000177 m**3/mol\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t \t \t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16.\t \t \t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", + "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "Tr1 = T/Tc[0]\n", + "Pr1 = P/Pc[0]\n", + "Z1_0 = 0.95\n", + "Tr2 = T/Tc[1]\n", + "Pr2 = P/Pc[1]\n", + "Z2_0 = 0.785\n", + "\n", + "Zm = (y1*Z1_0)+(y2*Z2_0)\n", + "vm = (Zm*R*T)/(P*10**5)\n", + "\n", + "P1 = y1*P\n", + "P2 = y2*P\n", + "Pr1 = P1/Pc[0]\n", + "Pr2 = P2/Pc[1]\n", + "Z1_0 = 0.97\n", + "Z2_0 = 0.91\n", + "Zm = (y1*Z1_0)+(y2*Z2_0)\n", + "vm_dalton = (Zm*R*T)/(P*10**5)\n", + "\n", + "P1 = ((Z1_0*y1*R*T)/(vm_dalton))*10**-2\n", + "P2 = ((Z2_0*y2*R*T)/(vm_dalton))*10**-2\n", + "Pr1 = P1/Pc[0]\n", + "Pr2 = P2/Pc[1]\n", + "Z1_0_new = 0.97\n", + "Z2_0_new = 0.91\n", + "if Z1_0_new == Z1_0 and Z2_0_new == Z2_0:\n", + " vm_new = vm_dalton;\t\t\t \n", + "else:\n", + " Zm = (y1*Z1_0_new)+(y2*Z2_0_new)\n", + " vm_new = (Zm*R*T)/(P*10**5);\t\n", + "\n", + "# Results\n", + "print \" The molar volume of an equimolar mixture of n-butane and n-octane found using the\\\n", + " Amagats law of additive volumes = %0.4e m**3/mol\"%(vm);\n", + "print \" The molar volume of an equimolar mixture of n-butane and\\\n", + " n-octane found using the Daltons law of additive pressures = %0.2e m**3/mol\"%(vm_new);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of an equimolar mixture of n-butane and n-octane found using the Amagats law of additive volumes = 2.7046e-03 m**3/mol\n", + " The molar volume of an equimolar mixture of n-butane and n-octane found using the Daltons law of additive pressures = 2.93e-03 m**3/mol\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16.\t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", + "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", + "R = 8.314;\t \t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "Tcm = (y1*Tc[0])+(y2*Tc[1]);\t\t\t \n", + "Pcm = (y1*Pc[0])+(y2*Pc[1])\n", + "Trm = T/Tcm;\t\t\t \n", + "Prm = P/Pcm;\t\t\t \n", + "Zm0 = 0.9;\t\t\t \n", + "vm = (Zm0*R*T)/(P*10.**5)\n", + "\n", + "# Results\n", + "print \" The molar volume of an equimolar mixture of n-butane and n-octane using the\\\n", + " pseudocritical properties estimated through Kays rule = %0.2e m**3/mol\"%(vm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of an equimolar mixture of n-butane and n-octane using the pseudocritical properties estimated through Kays rule = 2.81e-03 m**3/mol\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.11 Page No : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", + "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", + "vc = [255.0*10**-6,486.0*10**-6];\t\t\t #critical molar volume of n-butane and n-octane in m**3/mol\n", + "Zc = [0.274,0.256];\t\t\t #compressibility factor of n-butane and n-octane corresponding to Tc,Pc (no unit)\n", + "R = 8.314;\t \t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "Tcm = (y1*Tc[0])+(y2*Tc[1]);\t\t\t \n", + "Pcm = ((R*((y1*Zc[0])+(y2*Zc[1]))*Tcm)/((y1*vc[0])+(y2*vc[1])))*10**-5\n", + "Trm = T/Tcm\n", + "Prm = P/Pcm\n", + "Zm0 = 0.89\n", + "vm = (Zm0*R*T)/(P*10**5)\n", + "\n", + "# Results\n", + "print \" The molar volume of an equimolar mixture of n-butane and n-octane at 600K\\\n", + " and 16bar estimated using the Prausnitz-Gunn rule = %0.2e m**3/mol\"%(vm);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar estimated using the Prausnitz-Gunn rule = 2.77e-03 m**3/mol\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.12 Page No : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "a_m = 2.4405\t\t\t #van der Waals constant for the mixture as determined in Example 9.8 in Pa(m**3/mol)**2\n", + "b_m = 0.1767*10**-3\t\t #van der Waals constant for the mixture as determined in Example 9.8 in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "A = (a_m*P*10**5)/(R*T)**2\n", + "B = (b_m*P*10**5)/(R*T)\n", + "alpha = -1-B\n", + "beeta = A\n", + "gaamma = -(A*B)\n", + "p = beeta-((alpha**2)/3)\n", + "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", + "D = (((q)**2)/4)+(((p)**3)/27)\n", + "\n", + "if D>0 :\n", + " Z = (((-(q)/2)+(math.sqrt(D)))**(1./3))+(((-(q)/2)-(math.sqrt(D)))**(1./3))-(alpha/3);\t\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", + " Z2 = ((q/2)**(1./3))-(alpha/3)\n", + " Z3 = ((q/2)**(1./3))-(alpha/3)\n", + " Za = [Z1 ,Z2, Z3];\n", + " Z = max(Za);\n", + "else:\n", + " r = math.sqrt((-(p**3)/27));\t\t\t \n", + " theta = amath.cos((-(q)/2)*(1./r));\t\t\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3)\n", + " Za = [Z1, Z2, Z3];\n", + " Z = max(Za);\n", + "\n", + "vm = (Z*R*T)/(P*10**5)\n", + "\n", + "# Results\n", + "print \" The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar found \\\n", + " using the van der Waals equation of state = %e m**3/mol\"%(vm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar found using the van der Waals equation of state = 2.780786e-03 m**3/mol\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.13 Page No : 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t\t \t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16.\t\t \t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Bm = -309.*10**-6;\t\t\t #second virial coefficient for the mixture taken from Example(9.7) in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "Zm = 1+((Bm*P*10**5)/(R*T))\n", + "vm = (Zm*R*T)/(P*10**5)\t\n", + "\n", + "# Results\n", + "print \" The molar volume of an equimolar mixture of n-butane and n-octane\\\n", + " found using the generalized virial coefficient correlation = %0.4e m**3/mol\"%(vm);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The molar volume of an equimolar mixture of n-butane and n-octane found using the generalized virial coefficient correlation = 2.8088e-03 m**3/mol\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.14 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "am = 2.4405\t\t\t #van der Waals constant for the mixture taken from Example 9.8 in Pa(m**3/mol)**2\n", + "bm = 0.1767*10**-3;\t\t\t #van der Waals constant for the mixture taken from Example 9.8 in m**3/mol\n", + "vm = 2.8933*10**-3;\t\t\t #molar volume of the mixture taken from Example 9.12 in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "dep_h = ((P*10**5*vm)-(R*T)-(am/vm))*10**-3\n", + "dep_s = R*(math.log ((P*10**5*(vm-bm))/(R*T)))\n", + "\n", + "# Results\n", + "print \" The enthalpy departure of an equimolar mixture of n-butane and n-octane = %0.3f kJ/mol\"%(dep_h);\n", + "print \" The entropy departure of an equimolar mixture of n-butane and n-octane = %0.3f J/mol K\"%(dep_s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy departure of an equimolar mixture of n-butane and n-octane = -1.203 kJ/mol\n", + " The entropy departure of an equimolar mixture of n-butane and n-octane = -1.145 J/mol K\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.15 Page No : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600. \t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t \t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tcm = 497.3;\t\t\t #pseudocritical temperature of mixture taken from Example(9.10) in K\n", + "Pcm = 31.47;\t\t\t #pseudocritical pressure of mixture taken from Example(9.10) in bar\n", + "Trm = 1.21;\t\t \t #pseudoreduced temperature of the mixture taken from Example(9.10) (no unit)\n", + "Prm = 0.51;\t\t\t #pseudoreduced pressure of the mixture taken from Example(9.10) (no unit)\n", + "w_butane = 0.199;\t\t #acentric factor for n-butane (no unit)\n", + "w_octane = 0.398;\t\t #acentric factor for n-octane (no unit)\n", + "R = 8.314;\t\t \t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "wm = (y1*w_butane)+(y2*w_octane)\n", + "del_h0 = 0.380;\t\t\t \n", + "del_h1 = 0.188;\t\t\t \n", + "del_s0 = 0.22;\t\t\t \n", + "del_s1 = 0.18;\t\t\t \n", + "dep_h = ((R*Tcm)*(del_h0+(wm*del_h1)))*10**-3;\t\t\t \n", + "dep_s = (R)*(del_s0+(wm*del_s1));\t\t\t \n", + "\n", + "# Results\n", + "print \" The enthalpy departure of an equimolar mixture of n-butane and n-octane using\\\n", + " the generalized compressibility factor correlation = %0.3f kJ/mol\"%(dep_h);\n", + "print \" The entropy departure of an equimolar mixture of n-butane and n-octane using \\\n", + "the generalized compressibility factor correlation = %f J/mol K\"%(dep_s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy departure of an equimolar mixture of n-butane and n-octane using the generalized compressibility factor correlation = 1.803 kJ/mol\n", + " The entropy departure of an equimolar mixture of n-butane and n-octane using the generalized compressibility factor correlation = 2.275791 J/mol K\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.16 Page No : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", + "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", + "w = [0.199,0.398];\t\t\t #acentric factor of n-butane and n-octane (no unit)\n", + "Tr1 = 1.411;\t\t\t #reduced temperature of n-butane (no unit) taken from Example (9.7)\n", + "Tr2 = 1.054;\t\t\t #reduced temperature of n-octane (no unit) taken from Example (9.7)\n", + "Tr_12 = 1.24;\t\t\t #reduced temperature for computing the mixture interaction virial coefficient (no unit) taken from Example(9.7)\n", + "Pc_12 = 2.978;\t\t\t #Pc_ij in MPa taken from Example(9.7)\n", + "Tc_12 = 483.9;\t\t\t #Tc_ij in K taken from Example(9.7)\n", + "w_12 = 0.2985;\t\t\t # w_ij (no unit) taken from Example(9.7)\n", + "Bm = -309*10**-6;\t\t\t #second virial coefficient in m**3/mol taken from Example (9.7)\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "dB0_dTr1 = 0.675/(Tr1**2.6);\t\t\t \n", + "dB0_dTr2 = 0.675/(Tr2**2.6);\t\t\t \n", + "dB1_dTr1 = 0.722/(Tr1**5.2);\t\t\t \n", + "dB1_dTr2 = 0.722/(Tr2**5.2);\t\t\t \n", + "dB0_dTr12 = 0.675/(Tr_12**2.6);\t\t\t \n", + "dB1_dTr12 = 0.722/(Tr_12**5.2);\t\t\t \n", + "dB1_dT = (R/(Pc[0]*10**5))*((dB0_dTr1)+(w[0]*(dB1_dTr1)));\t\t\t\n", + "dB2_dT = (R/(Pc[1]*10**5))*((dB0_dTr2)+(w[1]*(dB1_dTr2)));\t\t\t\n", + "dB12_dT = (R/(Pc_12*10**6))*((dB0_dTr12)+(w_12*(dB1_dTr12)));\t\t\t\n", + "dBm_dT = ((y1**2)*(dB1_dT))+((2*y1*y2)*(dB12_dT))+((y2**2)*(dB2_dT));\t\n", + "dep_h = ((Bm-(T*dBm_dT))*P*10**5)*10**-3\n", + "dep_s = -P*10**5*(dBm_dT);\t\t\t \n", + "\n", + "# Results\n", + "print \" The enthalpy departure of an equimolar mixture of n-butane and n-octane\\\n", + " using the virial coefficient correlation = %f kJ/mol\"%(dep_h);\n", + "print \" The entropy departure of an equimolar mixture of n-butane and n-octane\\\n", + " using the virial coefficient correlation = %0.3f J/mol K\"%(dep_s);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy departure of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = -1.908476 kJ/mol\n", + " The entropy departure of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = -2.357 J/mol K\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.17 Page No : 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "a_m = 2.4405\t\t\t #van der Waals constant (a_m) in Pa(m**3/mol)**2 taken from Example(9.8)\n", + "b_m = 0.1767*10**-3\t\t #van der Waals constant (b_m) in m**3/mol taken from Example(9.8)\n", + "Z = 0.928;\t\t\t #compressibility factor taken from Example(9.12)\n", + "vm = 2.8933*10**-3;\t\t #molar volume of the equimolar mixture in m**3/mol taken from Example(9.12)\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "phi = math.exp(Z-1-math.log ((P*10**5*(vm-b_m))/(R*T))-(a_m/(R*T*vm)));\t\t\t\n", + "f = phi*P;\t\t\n", + "\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of an equimolar mixture of n-butane and n-octane\\\n", + " using the van der Waals equation of state = %0.4f \"%(phi);\n", + "print \" The fugacity of an equimolar mixture of n-butane and n-octane using the van der Waals \\\n", + "equation of state = %0.2f bar\"%(f);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the van der Waals equation of state = 0.9018 \n", + " The fugacity of an equimolar mixture of n-butane and n-octane using the van der Waals equation of state = 14.43 bar\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.18 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16.\t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tcm = 497.3;\t\t\t #pseudocritical temperature of mixture in K taken from Example(9.10)\n", + "Pcm = 31.47;\t\t\t #pseudocritical pressure of mixture in bar taken from Example(9.10)\n", + "Trm = 1.21;\t\t\t #pseudoreduced temperature of the mixture (no unit) taken from Example(9.10)\n", + "Prm = 0.51;\t\t\t #pseudoreduced pressure of the mixture (no unit) taken from Example(9.10)\n", + "w = [0.199,0.398];\t\t\t #acentric factor of n-butane and n-octane (no unit)\n", + "\n", + "# Calculations\n", + "wm = (w[0]+w[1])/2\n", + "log_phi0 = -0.042\n", + "log_phi1 = 0.01\n", + "phi = 10**(log_phi0+(wm*log_phi1));\t\t\n", + "f = P*phi;\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of an equimolar mixture of n-butane and n-octane \\\n", + "using the pseudocritical constants method = %0.3f \"%(phi);\n", + "print \" The fugacity of an equimolar mixture of n-butane and n-octane using\\\n", + " the pseudocritical constants method = %f bar\"%(f);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the pseudocritical constants method = 0.914 \n", + " The fugacity of an equimolar mixture of n-butane and n-octane using the pseudocritical constants method = 14.625307 bar\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.19 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Bm = -309.*10**-6;\t\t\t #second virial coefficient in m**3/mol taken from Example (9.7)\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "phi = math.exp((Bm*P*10**5)/(R*T))\n", + "f = phi*P;\t\t\t \n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of an equimolar mixture of n-butane and n-octane using\\\n", + " the virial coefficient correlation = %.3f \"%(phi);\n", + "print \" The fugacity of an equimolar mixture of n-butane and n-octane using\\\n", + " the virial coefficient correlation = %f bar\"%(f);\n", + "\n", + "# Note : answers in book is wrong please check manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = 0.906 \n", + " The fugacity of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = 14.490290 bar\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.20 Page No : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "Tc = [425.2,569.4];\t\t\t #critical temperature of n-butane and n-octane in K\n", + "Pc = [37.97,24.97];\t\t\t #critical pressure of n-butane and n-octane in bar\n", + "R = 8.314;\t \t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "a1 = (0.42748*R**2*Tc[0]**2.5)/(Pc[0]*10**5*math.sqrt(T))\n", + "a2 = (0.42748*R**2*Tc[1]**2.5)/(Pc[1]*10**5*math.sqrt(T))\n", + "b1 = (0.08664*R*Tc[0])/(Pc[0]*10**5);\t\t\t \n", + "b2 = (0.08664*R*Tc[1])/(Pc[1]*10**5);\t\t\t \n", + "\n", + "a = ((y1**2)*a1)+(2*y1*y2*math.sqrt(a1*a2))+((y2**2)*a2)\n", + "b = (y1*b1)+(y2*b2)\n", + "\n", + "A = (a*P*10**5)/(R*T)**2\n", + "B = (b*P*10**5)/(R*T);\t\n", + "alpha = -1.\t\t\t \n", + "beeta = A-B-B**2\n", + "gaamma = -(A*B)\n", + "p = beeta-(alpha**2)/3\n", + "q = ((2*alpha**3)/27)-((alpha*beeta)/3)+gaamma\n", + "D = (((q)**2)/4)+(((p)**3)/27)\n", + "\n", + "if D>0:\n", + " Z = ((-q/2)+(math.sqrt(D)))**(1./3)+((-q/2)-(math.sqrt(D)))**(1./3)-(alpha/3);\t\t\t #One real root given by Eq.(3.32)\n", + "elif D == 0:\n", + " Z1 = ((-2*(q/2))**(1./3))-(alpha/3)\n", + " Z2 = ((q/2)**(1./3))-(alpha/3);\n", + " Z3 = ((q/2)**(1./3))-(alpha/3);\n", + " Za = [Z1, Z2, Z3];\n", + " Z = max(Za);\n", + "else:\n", + " r = math.sqrt((-(p**3)/27));\t\t\n", + " theta = amath.cos((-(q)/2)*(1./r));\t\n", + " Z1 = (2*(r**(1./3))*math.cos(theta/3))-(alpha/3);\n", + " Z2 = (2*(r**(1./3))*math.cos(((2*math.pi)+theta)/3))-(alpha/3)\n", + " Z3 = (2*(r**(1./3))*math.cos(((4*math.pi)+theta)/3))-(alpha/3);\n", + " Za = [Z1, Z2, Z3];\n", + " Z = max(Za);\n", + "\n", + "phi1 = math.exp(((b1/b)*(Z-1))-math.log(Z-B)+((a/(b*R*T))*((b1/b)-(2*math.sqrt(a1/a)))*math.log((Z+B)/Z)));\n", + "\n", + "phi2 = math.exp(((b2/b)*(Z-1))-math.log(Z-B)+((a/(b*R*T))*((b2/b)-(2*math.sqrt(a2/a)))*math.log((Z+B)/Z)));\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of n-butane in the equimolar mixture using the\\\n", + " Redlich-Kwong Equation of state = %0.4f \"%(phi1);\n", + "print \" The fugacity coefficient of n-octane in the equimolar mixture using the\\\n", + " Redlich-Kwong Equation of state = %0.4f \"%(phi2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of n-butane in the equimolar mixture using the Redlich-Kwong Equation of state = 0.9644 \n", + " The fugacity coefficient of n-octane in the equimolar mixture using the Redlich-Kwong Equation of state = 0.8326 \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.21 Page No : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 600.\t\t\t #temperature of the equimolar n-butane and n-octane mixture in K\n", + "P = 16. \t\t\t #pressure of the equimolar n-butane and n-octane mixture in bar\n", + "B_11 = -131*10**-6\t\t\t #pure component (n-butane) second virial coefficient in m**3/mol taken from Example(9.7)\n", + "B_22 = -577*10**-6\t\t\t #pure component (n-octane) second virial coefficient in m**3/mol taken from Example(9.7)\n", + "B_12 = -264*10**-6\t\t\t #mixture interaction virial coefficient in m**3/mol taken from Example(9.7)\n", + "Bm = -309*10**-6\t\t\t #second virial coefficient in m**3/mol taken from Example(9.7)\n", + "R = 8.314 \t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "y1 = 0.5\n", + "y2 = 0.5\n", + "Zm = (1./2)*(1+math.sqrt(1+((4*Bm*P*10**5)/(R*T))))\n", + "phi1 = math.exp((((2*P*10**5)/(Zm*R*T))*((y1*B_11)+(y2*B_12)))-math.log(Zm))\n", + "phi2 = math.exp((((2*P*10**5)/(Zm*R*T))*((y1*B_12)+(y2*B_22)))-math.log(Zm))\n", + "\n", + "# Results\n", + "print \" The fugacity coefficient of n-butane in the equimolar mixture using the\\\n", + " Virial Equation of state = %0.3f \"%(phi1);\n", + "print \" The fugacity coefficient of n-octane in the equimolar mixture using the Virial\\\n", + " Equation of state = %f \"%(phi2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity coefficient of n-butane in the equimolar mixture using the Virial Equation of state = 0.976 \n", + " The fugacity coefficient of n-octane in the equimolar mixture using the Virial Equation of state = 0.830827 \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.22 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T = 427.85 \t\t\t #temperature of n-octane vapour in K\n", + "Psat = 0.215;\t\t\t #saturation pressure of n-octane vapour at T in MPa\n", + "P = 1.\t\t \t #pressure at which the fugacity of liquid n-octane is to be determined in MPa\n", + "f_sat = 0.2368;\t\t\t #fugacity of n-octane vapour at T and Psat taken from Example(9.5) in MPa\n", + "vl = 0.2003*10**-3;\t\t\t #molar volume of n-octane liquid at T and Psat taken from Example(3.16) in m**3/mol\n", + "R = 8.314;\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "f_l = (0.2368*math.exp((vl*(P-Psat)*10**6)/(R*T)));\t\t\t \n", + "\n", + "# Results\n", + "print \" The fugacity of liquid n-octane at 427.85K and 1MPa = %0.4f MPa\"%(f_l);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fugacity of liquid n-octane at 427.85K and 1MPa = 0.2475 MPa\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_gE-RTx1x2_vs_x1.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_gE-RTx1x2_vs_x1.png new file mode 100755 index 00000000..90bbaf61 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_gE-RTx1x2_vs_x1.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png new file mode 100755 index 00000000..b7a97cb1 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/T-x-y_diagram.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/T-x-y_diagram.png new file mode 100755 index 00000000..f231eb76 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/T-x-y_diagram.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/pressureVSvol3.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/pressureVSvol3.png new file mode 100755 index 00000000..9e02c340 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/pressureVSvol3.png differ diff --git a/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt b/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt old mode 100644 new mode 100755 diff --git a/DC_Machines_and_Synchronous_Machines/README.txt b/DC_Machines_and_Synchronous_Machines/README.txt deleted file mode 100755 index 9c84b56e..00000000 --- a/DC_Machines_and_Synchronous_Machines/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Hiren Shah -Course: mca -College/Institute/Organization: Financial Technology -Department/Designation: Developer -Book Title: DC Machines and Synchronous Machines -Author: U. A. Bakshi and M. V. Bakshi -Publisher: Technical Publications, Pune -Year of publication: 2008 -Isbn: 9788184314830 -Edition: 1 \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch1.ipynb b/DC_Machines_and_Synchronous_Machines/ch1.ipynb deleted file mode 100755 index 04ab6c30..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch1.ipynb +++ /dev/null @@ -1,1633 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:28530af987ec737018da049988fa2fb2a82d79acc8dd496873e17355c1e77828" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1 : D.C. Generators" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.1 page no : 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "p = 4.\n", - "Z = 440.\n", - "theta = 0.07 # Wb\n", - "N = 900. # rpm\n", - "\n", - "# calculations and results\n", - "E = theta*N*Z/60.\n", - "print \"For lap wound : E = %.f V\"%E\n", - "\n", - "E = theta*N*Z*4/120.\n", - "print \"For wave wound : E = %.f V\"%E\n", - "\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For lap wound : E = 462 V\n", - "For wave wound : E = 924 V\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "\n", - "Example 1.2 page no : 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 4.\n", - "phi = 21.*10**-3 \t\t\t#flux produced by each pole in webers\n", - "N = 1120. \t\t\t#Speed of armature in r.p.m\n", - "Coils = 42.\n", - "turns_per_coil = 8.\n", - "Turns = Coils * turns_per_coil\n", - "Z = 2*Turns \t\t\t#Number of armature conductors\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "A1 = Pole \t\t\t#no of parallel paths for lap winding\n", - "E1 = phi*N*Z*Pole/(60*A1)\n", - "print 'i) e.m.f generated is %.3f V'%(E1)\n", - "\n", - "#Part(ii)\n", - "A2 = 2 \t\t\t#wave winding\n", - "E2 = E1 \t\t\t#as mentioned in the question\n", - "N2 = E2/(phi*Z*Pole/(60*A2)) \t\t\t#E = phi*N*Z*Pole/(60*A)\n", - "print 'ii) For wave-wound armature,above calculated e.m.f is generated at %.0f r.p.m'%(N2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) e.m.f generated is 263.424 V\n", - "ii) For wave-wound armature,above calculated e.m.f is generated at 560 r.p.m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3 page no: 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 4.\n", - "coils = 12.\n", - "commutator_segments = coils\n", - "coil_sides = coils*2\n", - "Z = coil_sides \t\t\t#No of conductors\n", - "pole_pitch = Z/Pole\n", - "\n", - "# Calculations and Results\n", - "#for Simplex lap winding\n", - "y_f = pole_pitch-1\n", - "y_b = pole_pitch+1\n", - "\n", - "y_c = 1 \t\t\t#Note that it's positive and it's progressive type of Simplex lap winding\n", - "\n", - "\n", - "print 'WINDING TABLE: 1<- 8-> 3<- 10-> 5<- 12-> 7<- 14-> 9<- 16-> 11<- 18->13<- 20-> 15<- 22-> 17<- 24->19<- 2-> 21<- 4-> 23<- 6-> 1 '\n", - "print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)\n", - "print 'Another form of winding table:'\n", - "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", - "\n", - "print ' 1 to 1+7 = 8 -> 8 to 8-5 = 3'\n", - "print ' 3 to 3+7 = 10 -> 10 to 10-5 = 5'\n", - "print ' 5 to 5+7 = 12 -> 12 to 12-5 = 7'\n", - "print ' 7 to 7+7 = 14 -> 14 to 14-5 = 9'\n", - "print ' 9 to 9+7 = 16 -> 16 to 16-5 = 11'\n", - "print ' 11 to 11+7 = 18 -> 18 to 18-5 = 13'\n", - "print ' 13 to 13+7 = 20 -> 20 to 20-5 = 15'\n", - "print ' 15 to 15+7 = 22 -> 22 to 22-5 = 17'\n", - "print ' 17 to 17+7 = 24 -> 24 to 24-5 = 19'\n", - "print ' 19 to 19+7 = 26 = 26-24 = 2 -> 2 to 26-5 = 21'\n", - "print ' 21 to 21+7 = 28 = 28-24 = 4 -> 4 to 28-5 = 23'\n", - "print ' 23 to 23+7 = 30 = 30-24 = 6 -> 6 to 30-5 = 25 = 25-24 = 1'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "WINDING TABLE: 1<- 8-> 3<- 10-> 5<- 12-> 7<- 14-> 9<- 16-> 11<- 18->13<- 20-> 15<- 22-> 17<- 24->19<- 2-> 21<- 4-> 23<- 6-> 1 \n", - "Note that <- indicates back connection with y_back = 7 and -> indicates front connection with y_front = 5\n", - "Another form of winding table:\n", - " BACK CONNECTIONS FRONT CONNECTIONS\n", - " 1 to 1+7 = 8 -> 8 to 8-5 = 3\n", - " 3 to 3+7 = 10 -> 10 to 10-5 = 5\n", - " 5 to 5+7 = 12 -> 12 to 12-5 = 7\n", - " 7 to 7+7 = 14 -> 14 to 14-5 = 9\n", - " 9 to 9+7 = 16 -> 16 to 16-5 = 11\n", - " 11 to 11+7 = 18 -> 18 to 18-5 = 13\n", - " 13 to 13+7 = 20 -> 20 to 20-5 = 15\n", - " 15 to 15+7 = 22 -> 22 to 22-5 = 17\n", - " 17 to 17+7 = 24 -> 24 to 24-5 = 19\n", - " 19 to 19+7 = 26 = 26-24 = 2 -> 2 to 26-5 = 21\n", - " 21 to 21+7 = 28 = 28-24 = 4 -> 4 to 28-5 = 23\n", - " 23 to 23+7 = 30 = 30-24 = 6 -> 6 to 30-5 = 25 = 25-24 = 1\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4 page no : 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 4.\n", - "Z = 18. \t\t\t#no of armature conductors\n", - "Y_A = (Z+2)/Pole \t\t\t#For progressive type wave winding,positive sign is used\n", - "Y_C = Y_A \t\t\t#For wave winding\n", - "\n", - "# Calculations\n", - "#Since Y_A = (y_b+y_f)/2, we let y_b = Y_f\n", - "y_b = Y_A/2 \t\t\t#say\n", - "y_f = y_b\n", - "\n", - "coils = Z/2\n", - "slots = coils\n", - "commutator_segments = coils\n", - "\n", - "print commutator_segments\n", - "print 'WINDING TABLE: 1<- 6-> 11<- 16-> 3<- 8->13<- 18-> 5<- 10-> 15<- 2-> 7<- 12-> 17<- 4-> 9<- 14->1 '\n", - "\n", - "print 'Another form of winding table:'\n", - "\n", - "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", - "\n", - "print ' 1 to 1+5 = 6 -> 6 to 6+5 = 11'\n", - "print ' 11 to 11+5 = 16 -> 16 to 16+5 = 21 -18 = 3'\n", - "print ' 3 to 3+5 = 8 -> 8 to 8+5 = 13'\n", - "print ' 13 to 13+5 = 18 -> 18 to 18+5 = 23 -18 = 5'\n", - "print ' 5 to 5+5 = 10 -> 10 to 10+5 = 15'\n", - "print ' 15 to 15+5 = 20 -18 = 2 -> 2 to 2+5 = 7'\n", - "print ' 7 to 7+5 = 12 -> 12 to 12+5 = 17'\n", - "print ' 17 to 17+5 = 22 -18 = 4 -> 4 to 4+5 = 9'\n", - "print ' 9 to 9+5 = 14 -> 14 to 14+5 = 19 -18 = 1'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "9.0\n", - "WINDING TABLE: 1<- 6-> 11<- 16-> 3<- 8->13<- 18-> 5<- 10-> 15<- 2-> 7<- 12-> 17<- 4-> 9<- 14->1 \n", - "Another form of winding table:\n", - " BACK CONNECTIONS FRONT CONNECTIONS\n", - " 1 to 1+5 = 6 -> 6 to 6+5 = 11\n", - " 11 to 11+5 = 16 -> 16 to 16+5 = 21 -18 = 3\n", - " 3 to 3+5 = 8 -> 8 to 8+5 = 13\n", - " 13 to 13+5 = 18 -> 18 to 18+5 = 23 -18 = 5\n", - " 5 to 5+5 = 10 -> 10 to 10+5 = 15\n", - " 15 to 15+5 = 20 -18 = 2 -> 2 to 2+5 = 7\n", - " 7 to 7+5 = 12 -> 12 to 12+5 = 17\n", - " 17 to 17+5 = 22 -18 = 4 -> 4 to 4+5 = 9\n", - " 9 to 9+5 = 14 -> 14 to 14+5 = 19 -18 = 1\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5 page no : 42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 4.\n", - "Z = 480. \t\t\t#No of armature conductors\n", - "I_a = 144.\n", - "I = I_a/2 \t\t\t#For wave wound\n", - "theta_m = 10. \t\t\t#lead angle in DEGREES\n", - "\n", - "# Calculations\n", - "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#demagnetising Ampere-turns per pole\n", - "amp_turns_PP_c = Z*I*(1/(2*Pole)-theta_m/360) \t\t\t#cross-magnetising Ampere-turns per pole\n", - "\n", - "# Results\n", - "print 'De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d)\n", - "print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "De-magnetising ampere-turns per pole is 960\n", - "Cross-magnetising ampere-turns per pole is 3360\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.6 page no : 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 10.\n", - "Z = 800. \t\t\t#No of armature conductors\n", - "A = Pole \t\t\t#For lap wound\n", - "ratio = 0.7 \t\t\t#ratio of pole arc to pole pitch\n", - "\n", - "# Calculations\n", - "#amp_turns_PP = ratio*(I_a*Z)/(2*A*P)\n", - "turns_PP = ratio*(Z)/(2*A*Pole) \t\t\t#turns per pole\n", - "conductors_PP = turns_PP*2 \t\t\t#multiplied with 2 because 2 conductors form 1 turn\n", - "\n", - "# Results\n", - "print 'Compensating conductors per pole = %.f'%(conductors_PP)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Compensating conductors per pole = 6\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.7 page no : 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "I_L = 150.\n", - "A = 4.\n", - "N = 1800. \t\t\t#in rpm\n", - "W_b = 1.2 \t\t\t#Brush width\n", - "W_m = 0 \t\t\t#width of mica insulation\n", - "L = 0.06*10**-3 \t\t\t#Inducmath.tance\n", - "segments = 64.\n", - "n_s = 1800./60 \t\t\t#in rps and not rpm\n", - "v = n_s*segments \t\t\t#peripheral speed in segments per second\n", - "\n", - "# Calculations and Results\n", - "T_c = (W_b-W_m)/v \t\t\t#Time of commutation\n", - "I = I_L/A \t\t\t#Current through a conductor\n", - "\n", - "#Part(i)\n", - "E_l = L*2*I/T_c\n", - "print 'i) Reactive voltage using Linear commutation is %.1f V'%(E_l)\n", - "\n", - "#Part(ii)\n", - "E_s = 1.11*L*2*I/T_c\n", - "print 'ii) Reactive voltage using Sinusoidal commutation is %.3f V'%(E_s)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Reactive voltage using Linear commutation is 7.2 V\n", - "ii) Reactive voltage using Sinusoidal commutation is 7.992 V\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.8 page no : 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V_t = 250. \t\t\t#Terminal voltage\n", - "R_sh = 100. \t\t\t#resistance of shunt field winding\n", - "I_sh = V_t/R_sh \t\t\t#shunt current\n", - "R_a = 0.22 \t\t\t#Armature resistance\n", - "\n", - "# Calculations\n", - "P = 5*10**3 \t\t\t#Load power\n", - "I_L = P/V_t \t\t\t#Load current\n", - "I_a = I_L+I_sh \t\t\t#armature current\n", - "\n", - "E = V_t + I_a*R_a \t\t\t#Induced emf\n", - "\n", - "# Results\n", - "print 'Induced e.m.f to supply the 5kW load is %.2f V'%(E)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced e.m.f to supply the 5kW load is 254.95 V\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.9 page no : 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V_t = 250. \t\t\t#terminal voltage\n", - "P = 10.*10**3 \t\t\t#10kW power of generator\n", - "I_L = P/V_t \t\t\t#load current\n", - "I_a = I_L \t \t\t#As seperately excited\n", - "V_brush = 2.*2 \t\t\t# 2 * no of brushes\n", - "\n", - "E = 255. \t\t\t#on full load\n", - "\n", - "# Calculations\n", - "R_a = (E-V_t-V_brush)/I_a \t\t\t#Because E = V_t+ I_a*R_a + V_brush\n", - "\n", - "# Results\n", - "print 'Armature resistance of generator is %.3f ohm'%(R_a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature resistance of generator is 0.025 ohm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.10 page no : 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "R_a = 0.5\n", - "R_se = 0.03 \t\t\t#resimath.tance due to armature and series field winding\n", - "V_brush = 2. \t\t\t#brush drop\n", - "N = 1500. \t\t\t#generator speed in r.p.m\n", - "coils = 540.\n", - "turns_per_coil = 6.\n", - "\n", - "# Calculations\n", - "total_turns = coils*turns_per_coil\n", - "Z = 2*total_turns \t\t\t#Total conductors\n", - "I_a = 50 \t\t\t#armature current\n", - "\n", - "phi = 2*10**-3 \t\t\t#flux per pole in webers\n", - "E = phi*N*Z/(60) \t\t\t#A = P for lap-wound and they cancel out\n", - "V_t = E- (I_a*(R_a+R_se) + V_brush) \t\t\t#Because E = V_t+ I_a*R_a + V_brush\n", - "\n", - "# Results\n", - "print 'Terminal voltage is %.1f V'%(V_t)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminal voltage is 295.5 V\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.11 page no : 65" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V_t = 225. \t\t\t#voltage across winding\n", - "R_a = 0.04 \t\t\t#armature resistance\n", - "R_sh = 90 \t\t\t#shunt resistance\n", - "R_se = 0.02\t\t\t#resistance of series field winding\n", - "I_L = 75. \t\t\t#load current\n", - "\n", - "# Calculations\n", - "#E -I_a*R_a = V_t+I_L*R_se \n", - "I_sh = (V_t+I_L*R_se)/R_sh \t\t\t#current through shunt field winding\n", - "\n", - "I_a = I_L + I_sh \t\t\t #armature current \n", - "E = V_t+ I_a*R_a+I_L*R_se \t\t\t#induced emf\n", - "\n", - "# Results\n", - "print 'Generated voltage is %.1f V'%(E)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Generated voltage is 229.6 V\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.12 page no : 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "R_sh = 53. \t\t\t#resistance of field winding\n", - "V_t = 100. \t\t\t#terminal voltage \n", - "I_sh = V_t/R_sh \t\t\t#shunt current\n", - "I_f = I_sh\n", - "R_a = 0.1 \t\t\t#armature resistance\n", - "E_o = 143. \t\t\t# for I_sh = I_f = 1.8867 as obtained from graph\n", - "\n", - "# Calculations\n", - "I_a = (E_o-V_t)/R_a \t\t\t#Because E_o = V_t + I_a*R_a\n", - "I_L = I_a-I_sh \t\t\t#no load current\n", - "\n", - "# Results\n", - "print 'Note: Open circuit voltage was obtained as followsE_o = R_sh*I_f \t\t\t# y = mx+c form with c = 0 and R_sh = 53Hence%( a line with slope 53 through origin is made to intersect OCC at 150 V'\n", - "print 'Therefore, Open circuit voltage is 150 V'\n", - "print 'No load current is %.4f A '%(I_L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Note: Open circuit voltage was obtained as followsE_o = R_sh*I_f \t\t\t# y = mx+c form with c = 0 and R_sh = 53Hence%( a line with slope 53 through origin is made to intersect OCC at 150 V\n", - "Therefore, Open circuit voltage is 150 V\n", - "No load current is 428.1132 A \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.13 page no : 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "#part(1)\n", - "E_o = 240. \t\t\t#on no-load\n", - "\n", - "# Calculations and Results\n", - "#Draw horizontal line from 240 V, to intersect OCC at A. corresponding I_f is 2.25 A\n", - "#The slope pf OA is corresponding R_sh\n", - "I_f = 2.25 \t\t\t#Corresponds to 240 V when intersected OCC\n", - "R_sh = E_o/I_f \t\t\t#shunt resistance\n", - "print 'i)Field resistance that gives 240 V on no-load is %.2f ohms '%(R_sh)\n", - "\n", - "#Part(ii)\n", - "N1 = 1000. \t\t\t#speed of shunt generator in rpm\n", - "I_f = 1.\n", - "\n", - "#Draw line OP math.tangential to OCC at N1 = 1000 r.p.m.\n", - "#Select I_f = 1A i.e. point R\n", - "#Draw vertical from R to intersect OP at S and OA at T....this gives RT = 105 and RS = 159\n", - "#At critcal speed generator just fails to build up\n", - "\n", - "RT = 105.\n", - "RS = 159.\n", - "N_C = N1*RT/RS \t\t\t#Critical speed\n", - "print 'ii)Critical speed is %.2f r.p.m '%(N_C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Field resistance that gives 240 V on no-load is 106.67 ohms \n", - "ii)Critical speed is 660.38 r.p.m \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.14 page no : 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P = 4. \t\t\t#number of poles\n", - "A = 2. \t\t\t#because wave wound\n", - "Z = 792 \t\t\t#No of conductors\n", - "phi = 0.012 \t\t\t#flux per pole in weber\n", - "E_g = 240 \t\t\t#on no-load\n", - "\n", - "# Calculations\n", - "#running speed\n", - "N = E_g*60*A/(phi*P*Z) \t\t\t#becuase E_g = phi*P*N*Z/(60*A)\n", - "\n", - "# Results\n", - "print 'Required running speed is %.3f r.p.m'%(N)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required running speed is 757.576 r.p.m\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.15 page no : 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "#open circuit condition\n", - "I_L = 0. \t\t\t#because of open circuit\n", - "V_t = 127. \t\t\t#terminal voltage\n", - "E_g = V_t \t\t\t#because I_L = 0\n", - "\n", - "# Calculations\n", - "#load condition\n", - "V_t = 120\n", - "R_sh = 15.\n", - "R_a = 0.02 \t\t\t#shunt and armature resistance\n", - "I_sh1 = V_t/R_sh \t\t\t#current through shunt winding in loaded condition\n", - "\n", - "I_L = (E_g-V_t)/R_a - I_sh1 \t\t\t#because I_a1 = I_L+I_sh1 and E_g = V_t + I_a1*R_a\n", - "\n", - "# Results\n", - "print 'Load current is %.0f A'%(I_L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load current is 342 A\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.16 page no : 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V_t = 550. \t\t\t#Terminal voltage\n", - "R_lamp = 500. \t\t\t#Each lamp\n", - "I_lamp = V_t/R_lamp \t\t\t#each lamp ; V_t because all lamps are in parallel\n", - "\n", - "# Calculations\n", - "I_L = 20*I_lamp \t\t\t#there exist 20 lamps\n", - "R_sh = 25.\n", - "R_a = 0.06\n", - "R_se = 0.04 \t\t\t#resistance of shunt winding,armature,series field\n", - "I_sh = V_t/R_sh \t\t\t#current throough shunt winding\n", - "I_a = I_L+I_sh\t\t\t#armature current\n", - "E = V_t + I_a*(R_a+R_se) \t\t\t#generated emf\n", - "\n", - "# Results\n", - "print 'Armature current and generated e.m.f is %.0f A and %.1f V respectively '%(I_a,E )\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature current and generated e.m.f is 44 A and 554.4 V respectively \n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.17 page no : 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P = 4. \t\t\t#number of poles\n", - "A = P \t\t\t# because of lap wound\n", - "N = 750. \t\t\t#speed in rpm\n", - "Z = 720. \t\t\t#number of armature conductors\n", - "phi = 30.*10**-3 \t\t\t#flux per pole in weber\n", - "R_sh = 200.\n", - "R_a = 0.4\n", - "R_L = 15. \t\t\t#resistance of shunt winding,armature,series field\n", - "E = phi*P*N*Z/(60*A) \t\t\t#generated emf\n", - "\n", - "# Calculations\n", - "#solving the following equations for V_t\n", - "#E = V_t + I_a*R_a\n", - "#E = V_t + (I_L + I_sh)*R_a\n", - "#E = V_t + ((V_t/R_L) + (V_t/R_sh))*R_a\n", - "V_t = E/(1+(R_a/R_L)+(R_a/R_sh))\n", - "\n", - "# Results\n", - "print 'Terminal voltage = %.4f V'%(V_t)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminal voltage = 262.4757 V\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.18 page no : 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P = 6. \t\t\t#number of poles\n", - "A = 2. \t\t\t# because of wave wound\n", - "N_1 = 300. \t\t\t#speed of generator\n", - "Z = 600. \t\t\t#number of armature conductors\n", - "phi_1 = 0.06 \t\t\t#flux per pole in webers \n", - "\n", - "# Calculations and Results\n", - "E_g1 = phi_1*P*N_1*Z/(60*A) \t\t\t#generated emf\n", - "print 'Emf generated is %.0f V'%(E_g1)\n", - "\n", - "phi_2 = 0.055 \t\t\t#new flux per pole \n", - "E_g2 = 550.\t\t\t# new generated emf\n", - "N_2 = E_g2/(phi_2*P*Z/(60*A)) \t\t\t#new speed of generator\n", - "print 'Required speed is %.2f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Emf generated is 540 V\n", - "Required speed is 333.33 r.p.m\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.19 page no : 84" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "\n", - "print 'Refer to code for explanation'\n", - "\n", - "# Variables\n", - "N_1 = 300.\n", - "N_2 = 375. \t\t\t#generator speeds\n", - "\n", - "#E_g2 = E_g1*(N_2/N_1)\n", - "#using this new table OCC at N_2 = 375 is made\n", - "#Draw a line with slope R_sh = 40 through origin which cuts this OCC at 248\n", - "#I_f_table = [0,2,3,4,5,6,7]\n", - "#Arm_vol_table = [9.375,115,165,202.5,228.75,237.5,265]\n", - "\n", - "#part(i)\n", - "#at V = 200 volts, I_f = 3.9 from the graph\n", - "V = 200.\n", - "I_f = 3.9\n", - "\n", - "# Calculations and Results\n", - "R_sh2 = V/I_f\n", - "R_sh = 40.\n", - "print 'Additional resistance required is %.3f ohms '%(R_sh2-R_sh)\n", - "\n", - "#part(ii)\n", - "V_t = 200.\n", - "I_f = V_t/R_sh\n", - "E_g = 228.75 \t\t\t#For this I_f from the table \n", - "R_a = 0.4\n", - "I_a = (E_g-V_t)/R_a \t\t\t#Because E_g = V_t + I_a*R_a\n", - "I_L = I_a-I_f\n", - "print 'Load current supplied by the generator is %.3f A'%(I_L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Refer to code for explanation\n", - "Additional resistance required is 11.282 ohms \n", - "Load current supplied by the generator is 66.875 A\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.20 page no : 86" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "I_a = 750. \t\t\t#full load current \n", - "Pole = 6. \n", - "A = Pole \t\t\t#lap winding\n", - "I = I_a/A \t\t\t#Full-load current per path\n", - "Z = 900. \t\t\t#no of conductors\n", - "lambda1 = 1.4 \t\t\t#leakage coefficient\n", - "theta_e = 21. \t\t\t#lead angle in degrees electrical\n", - "\n", - "# Calculations\n", - "theta_m = theta_e/(Pole/2) \t\t\t#lead angle in degrees mechanical\n", - "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#demagnetising ampere turns per pole\n", - "amp_turns_PP_c = Z*I*(1./(2*Pole)-theta_m/360) \t\t\t#cross-magnetising ampere turns per pole\n", - "balance_turns = amp_turns_PP_d*lambda1/I_a \t\t\t#series turns required to balance demagnetising component\n", - "\n", - "# Results\n", - "print 'i) De-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_d)\n", - "print 'ii) Cross-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_c)\n", - "print 'iii)Turns required to balance demagnetising component is %.0f'%(balance_turns)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) De-magnetising ampere-turns per pole is 2187.5\n", - "ii) Cross-magnetising ampere-turns per pole is 7187.5\n", - "iii)Turns required to balance demagnetising component is 4\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.21 page no : 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pole = 4. \n", - "Z = 32. \t\t\t#no of conductors\n", - "coil_sides = Z \n", - "segments = 16.\n", - "pole_pitch = Z/Pole\n", - "slots = 16.\n", - "slots_per_pole = slots/Pole\n", - "\n", - "# Calculations\n", - "#for Simplex lap winding\n", - "y_b = pole_pitch+1 \t\t\t#back pitch\n", - "y_f = pole_pitch-1 \t\t\t#front pitch\n", - "\n", - "y_c = 1 \t\t\t#Commutator pitch; Note that it is positive and it is progressive type of Simplex lap winding\n", - "\n", - "# Results\n", - "print 'WINDING TABLE: 1<- 10-> 3<- 12-> 5<- 14-> 7<- 16-> 9<- 18-> 11<- 20->13<- 22-> 15<- 24-> 17<- 26->19<- 28-> 21<- 30-> 23<- 32->25<- 2-> 27<- 4-> 29<- 6->31<- 8->1 '\n", - "print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)\n", - "\n", - "print 'Another form of winding table:'\n", - "\n", - "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", - "\n", - "print ' 1 to 1+9 = 10 -> 10 to 10-7 = 3'\n", - "print ' 3 to 3+9 = 12 -> 12 to 12-7 = 5'\n", - "print ' 5 to 5+9 = 14 -> 14 to 14-7 = 7'\n", - "print ' 7 to 7+9 = 16 -> 16 to 16-7 = 9'\n", - "print ' 9 to 9+9 = 18 -> 18 to 18-7 = 11'\n", - "print ' 11 to 11+9 = 20 -> 20 to 20-7 = 13'\n", - "print ' 13 to 13+9 = 22 -> 22 to 22-7 = 15'\n", - "print ' 15 to 15+9 = 24 -> 24 to 24-7 = 17'\n", - "print ' 17 to 17+9 = 26 -> 26 to 26-7 = 19'\n", - "print ' 19 to 19+9 = 28 -> 28 to 28-7 = 21'\n", - "print ' 21 to 21+9 = 30 -> 30 to 30-7 = 23'\n", - "print ' 23 to 23+9 = 32 -> 32 to 32-7 = 25'\n", - "print ' 25 to 25+9 = 34 = 34-32 = 2 -> 2 to 34-7 = 27'\n", - "print ' 27 to 27+9 = 36 = 36-32 = 4 -> 4 to 36-7 = 29'\n", - "print ' 29 to 29+9 = 38 = 38-32 = 6 -> 6 to 38-7 = 31'\n", - "print ' 31 to 31+9 = 40 = 40-32 = 4 -> 8 to 40-7 = 33 -32 = 1'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "WINDING TABLE: 1<- 10-> 3<- 12-> 5<- 14-> 7<- 16-> 9<- 18-> 11<- 20->13<- 22-> 15<- 24-> 17<- 26->19<- 28-> 21<- 30-> 23<- 32->25<- 2-> 27<- 4-> 29<- 6->31<- 8->1 \n", - "Note that <- indicates back connection with y_back = 9 and -> indicates front connection with y_front = 7\n", - "Another form of winding table:\n", - " BACK CONNECTIONS FRONT CONNECTIONS\n", - " 1 to 1+9 = 10 -> 10 to 10-7 = 3\n", - " 3 to 3+9 = 12 -> 12 to 12-7 = 5\n", - " 5 to 5+9 = 14 -> 14 to 14-7 = 7\n", - " 7 to 7+9 = 16 -> 16 to 16-7 = 9\n", - " 9 to 9+9 = 18 -> 18 to 18-7 = 11\n", - " 11 to 11+9 = 20 -> 20 to 20-7 = 13\n", - " 13 to 13+9 = 22 -> 22 to 22-7 = 15\n", - " 15 to 15+9 = 24 -> 24 to 24-7 = 17\n", - " 17 to 17+9 = 26 -> 26 to 26-7 = 19\n", - " 19 to 19+9 = 28 -> 28 to 28-7 = 21\n", - " 21 to 21+9 = 30 -> 30 to 30-7 = 23\n", - " 23 to 23+9 = 32 -> 32 to 32-7 = 25\n", - " 25 to 25+9 = 34 = 34-32 = 2 -> 2 to 34-7 = 27\n", - " 27 to 27+9 = 36 = 36-32 = 4 -> 4 to 36-7 = 29\n", - " 29 to 29+9 = 38 = 38-32 = 6 -> 6 to 38-7 = 31\n", - " 31 to 31+9 = 40 = 40-32 = 4 -> 8 to 40-7 = 33 -32 = 1\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.22 page no : 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from numpy import *\n", - "\n", - "# Variables\n", - "Z = 496. \t\t\t#no of conductors\n", - "P = 4. \t\t\t#poles\n", - "slots = 31.\n", - "coilsides_per_slot = 4.\n", - "coilsides = slots*coilsides_per_slot\n", - "coils = coilsides/2\n", - "turns = Z/2\n", - "turns_per_coil = turns/coils\n", - "\n", - "# Calculations\n", - "y_c = array([(Z-2)/P, (Z+2)/P]) \t\t\t#commutator pitch\n", - "coils_active = (Z/(2*P))-1 \t\t\t# because y_c didnt turn out to be integer, 1 coil was made inactive/dummy\n", - "segments = coils_active \t\t\t#no of commutative segments\n", - "Y_A = [ (segments+1)/(P/2), (segments-1)/(P/2) ]\n", - "Y_A = Y_A[0] \t\t\t#Y_A(2) is discarded because of progressive wave winding\n", - "y_f = 29.\n", - "y_b = 33. \t\t\t#front and back pitch ; note that Y_A = (y_b+y_f)/2\n", - "resultant_pitch = 2*Y_A \t\t\t#because Y_A = (y_b+y_f)/2 and resultant pitch = y_b+ y_f\n", - "\n", - "# Results\n", - "print 'i) Total number of coils = %.0f'%(coils)\n", - "print 'ii) Turns per coils = %.0f'%(turns_per_coil)\n", - "print 'iii) Commutator pitch = %.0f'%((y_c[0]+y_c[1])/2)\n", - "print 'iv) Back pitch = %.0f front pitch = %.0f total pitch = %.0f'%(y_b,y_f,resultant_pitch)\n", - "print 'v) No of commutator segments = %.0f'%(segments)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Total number of coils = 62\n", - "ii) Turns per coils = 4\n", - "iii) Commutator pitch = 124\n", - "iv) Back pitch = 33 front pitch = 29 total pitch = 62\n", - "v) No of commutator segments = 61\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.23 page no : 90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "slots = 13.\n", - "Pole = 4.\n", - "conductors_per_slot = 2.\n", - "Z = conductors_per_slot*slots\n", - "Y_A = (Z+2)/Pole \t\t\t#For progressive type wave winding\n", - "\n", - "# Calculations\n", - "#Since Y_A = (y_b+y_f)/2, we let y_b = y_f\n", - "y_b = Y_A\n", - "y_f = y_b \t\t \t#because y_b = Y_A/2\n", - "\n", - "segments = 13. \t\t\t#commutator segments\n", - "\n", - "# Results\n", - "print 'WINDING TABLE: 1<- 8-> 15<- 22-> 3<- 10->17<- 24-> 5<- 12-> 19<- 26-> 7<- 14-> 21<- 2-> 9<- 16->23<- 4-> 11<- 18-> 25<- 6->13<- 20-> 1 '\n", - "print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)\n", - "\n", - "print 'Another form of winding table:'\n", - "\n", - "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", - "\n", - "print ' 1 to 1+7 = 8 -> 8 to 8+7 = 15'\n", - "print ' 15 to 15+7 = 22 -> 22 to 22+7 = 29 -26 = 3'\n", - "print ' 3 to 3+7 = 10 -> 10 to 10+7 = 17'\n", - "print ' 17 to 17+7 = 24 -> 24 to 24+7 = 31 -26 = 5'\n", - "print ' 5 to 5+7 = 14 -> 12 to 12+7 = 19'\n", - "print ' 19 to 19+7 = 26 -> 26 to 26+7 = 33 -26 = 7'\n", - "print ' 7 to 7+7 = 14 -> 14 to 14+7 = 21'\n", - "print ' 21 to 21+7 = 28 -26 = 2 -> 2 to 2+7 = 9'\n", - "print ' 9 to 9+7 = 16 -> 16 to 16+7 = 23 '\n", - "print ' 23 to 23+7 = 30 -26 = 4 -> 4 to 4+7 = 11'\n", - "print ' 11to 11+7 = 18 -> 18 to 18+7 = 25'\n", - "print ' 25 to 25+7 = 32 -26 = 6 -> 6 to 6+7 = 13'\n", - "print ' 13 to`13+7 = 20 -> 20 to 20+7 = 27 -26 = 1'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "WINDING TABLE: 1<- 8-> 15<- 22-> 3<- 10->17<- 24-> 5<- 12-> 19<- 26-> 7<- 14-> 21<- 2-> 9<- 16->23<- 4-> 11<- 18-> 25<- 6->13<- 20-> 1 \n", - "Note that <- indicates back connection with y_back = 7 and -> indicates front connection with y_front = 7\n", - "Another form of winding table:\n", - " BACK CONNECTIONS FRONT CONNECTIONS\n", - " 1 to 1+7 = 8 -> 8 to 8+7 = 15\n", - " 15 to 15+7 = 22 -> 22 to 22+7 = 29 -26 = 3\n", - " 3 to 3+7 = 10 -> 10 to 10+7 = 17\n", - " 17 to 17+7 = 24 -> 24 to 24+7 = 31 -26 = 5\n", - " 5 to 5+7 = 14 -> 12 to 12+7 = 19\n", - " 19 to 19+7 = 26 -> 26 to 26+7 = 33 -26 = 7\n", - " 7 to 7+7 = 14 -> 14 to 14+7 = 21\n", - " 21 to 21+7 = 28 -26 = 2 -> 2 to 2+7 = 9\n", - " 9 to 9+7 = 16 -> 16 to 16+7 = 23 \n", - " 23 to 23+7 = 30 -26 = 4 -> 4 to 4+7 = 11\n", - " 11to 11+7 = 18 -> 18 to 18+7 = 25\n", - " 25 to 25+7 = 32 -26 = 6 -> 6 to 6+7 = 13\n", - " 13 to`13+7 = 20 -> 20 to 20+7 = 27 -26 = 1\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.24 page no : 93" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P = 4.\n", - "I_L = 150.\n", - "N = 1500. \t\t\t#commutator speed in rpm\n", - "n_s = N/60. \t\t\t#commutator speed in r.p.s\n", - "W_b = 1.2 \t\t\t#Brush pitch\n", - "W_m = 0\t\t\t#Pitch of mica insulation\n", - "L = 0.05*10**-3 \t\t\t#inducmath.tance of armature coils in henry\n", - "A = P \t\t\t#A = P for lap wound\n", - "segments = 64.\n", - "\n", - "# Calculations\n", - "v = n_s*segments \t\t\t#peripheral speed in segments per second\n", - "T_c = (W_b-W_m)/v \t\t\t#Time of commutation\n", - "I = I_L/A \t\t\t#current through each conductor\n", - "E = L*2*I/T_c \t\t\t#Linear commutation\n", - "E2 = 1.11*L*2*I/T_c \t\t\t#Sinusoidal commutation\n", - "\n", - "# Results\n", - "print 'Reactive voltage linear commutation) is %.0f V'%(E)\n", - "print 'Reactive voltage math.sinusoidal commutation) is %.2f V'%(E2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reactive voltage linear commutation) is 5 V\n", - "Reactive voltage math.sinusoidal commutation) is 5.55 V\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.25 page no : 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P = 4. \t\t\t#Pole\n", - "Z = 386. \t\t\t#no of wave connected conductors\n", - "A = 2. \t\t\t#Wave winding\n", - "R_a = 1.\n", - "R_sh = 100.\n", - "R_L = 40 \t\t\t#Armature ,shunt field and load resistance\n", - "phi = 25.*10**-3 \t\t\t#flux per pole in weber\n", - "N = 1000. \t\t\t#speed in rpm\n", - "\n", - "\n", - "# Calculations\n", - "E_g = (phi*P*N*Z)/(60*A) \t\t\t#generated emf\n", - "\n", - "#Solving following equations for V_t\n", - "#E_g = V_t+I_a*R_a\n", - "#I_a = (I_L+I_sh) I_L = V_t/R_L I_sh = V_t/R_sj\n", - "#E_g = V_t(1 + (R_a/R_L) + (R_a/R_sh)\n", - "V_t = E_g/(1 + (R_a/R_L) + (R_a/R_sh))\n", - "\n", - "I_L = V_t/R_L \t\t\t# load current\n", - "I_sh = V_t/R_sh \t\t\t# current through shunt field resistance\n", - "\n", - "# Results\n", - "I_a = I_L+I_sh \t\t\t#armature current \n", - "print 'armature current is is %.4f A'%(I_a)\n", - "\n", - "output_power = V_t*I_L\n", - "print 'output power is %.3f W'%(output_power)\n", - "\n", - "# Note :answer obtained will not match with textbook answer because I_L = V_t/R_L = 310.79/40 = 7.77 \n", - "#Awhile its taken as 8.045 A in textbook'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "armature current is is 10.8776 A\n", - "output power is 2414.746 W\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.26 page no : 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "I = 40. \t\t \t#current PER conductor\n", - "W_b = 3.\n", - "W_m = 0.\t\t\t #brush width and width of mica insulation\n", - "N = 600. \t\t\t #commutator speed in rpm \n", - "n_s = N/60 \t\t\t #commutator speed in rps\n", - "L = 0.15*10**-3 \t\t\t#self inducmath.tance in Henry\n", - "segments = 50. \n", - "v = n_s*segments \t\t\t#peripheral speed in segments per second\n", - "T_c = (W_b-W_m)/v \t\t\t#time of commutation\n", - "\n", - "# Calculations\n", - "E = L*2*I/T_c \t\t\t#Linear commutation\n", - "E2 = 1.11*L*2*I/T_c \t\t\t#Sinusoidal commutation\n", - "\n", - "# Results\n", - "print 'Reactive voltage linear commutation) is %.0f volts'%(E)\n", - "print 'Reactive voltage math.sinusoidal commutation) is %.2f volts'%(E2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reactive voltage linear commutation) is 2 volts\n", - "Reactive voltage math.sinusoidal commutation) is 2.22 volts\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.27 page no : 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 400.\n", - "P = 6. \t\t\t #Poles\n", - "A = P \t\t \t#For lap wound\n", - "output_power = 250.*10**3\n", - "R_sh = 200. \t\t\t#shunt field circuit resistance\n", - "Z = 720. \t\t\t#number of lap wound conductors\n", - "\n", - "theta_m = 2.5 \t\t\t#brush lead angle in degree mechanical\n", - "I_L = output_power/V\n", - "V_sh = V\n", - "\n", - "# Calculations\n", - "I_sh = V_sh/R_sh \t\t\t#Current through shunt field circuit resistance\n", - "I_a = I_L+I_sh \t\t\t#armature currrent\n", - "I = I_a/P\n", - "\n", - "#Part(i)\n", - "amp_turns_PP_d = Z*I*theta_m/360\t\t\t#demagnetising ampere turns per pole\n", - "#Part(ii)\n", - "amp_turns_PP_c = Z*I*(1/(2*P)-theta_m/360) \t\t\t#cross-magnetising ampere turns per pole\n", - "\n", - "# Results\n", - "print 'i) De-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_d)\n", - "print 'ii) Cross-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_c)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) De-magnetising ampere-turns per pole is 522.5\n", - "ii) Cross-magnetising ampere-turns per pole is 5747.5\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.28 page no : 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "I_L = 100.\n", - "P = 4. \t\t\t #Poles\n", - "A = P \t\t\t #for lap wound armature\n", - "W_b = 1.4\n", - "W_m = 0. \t\t\t#Brush width and width of mica insulation\n", - "N = 1400.\t\t\t#armature speed in r.p.m\n", - "segments = 64. \t\t\t#no of commutator segments\n", - "L = 0.05*10**-3 \t\t\t#inducmath.tance of armature coil in henry\n", - "\n", - "# Calculations\n", - "n_s = N/60 \t\t\t#speed in r.p.s\n", - "v = n_s*segments \t\t\t#Segments per second\n", - "T_c = (W_b-W_m)/v \t\t\t#time of commutation\n", - "I = I_L/A \t\t\t#Current through conductor\n", - "E = L*2*I/T_c \t\t\t#Linear commutation\n", - "\n", - "# Results\n", - "print 'Reactive voltage considering linear commutation is %.2f volts'%(E)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reactive voltage considering linear commutation is 2.67 volts\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.29 page no : 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P = 8. \t\t \t#Poles\n", - "A = 2. \t\t \t#Wave wound armature\n", - "Z = 480. \t\t\t#number of armature conductors\n", - "I_a = 200.\n", - "I = I_a/A\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "theta_m = 0. \t\t\t#Geometric nuetral axis\n", - "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#De-magnetising ampere-turns per pole\n", - "amp_turns_PP_c = Z*I*(1/(2*P)-theta_m/360) \t\t\t#Cross-magnetising ampere-turns per pole\n", - "print 'Parti)De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d)\n", - "print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c)\n", - "\n", - "#Part(ii)\n", - "theta_e2 = 6. \t\t\t#angle shift of brushes in degrees electrical\n", - "theta_m2 = theta_e2/(P/2) \t\t\t#angle shift of brushes in degrees mechanical\n", - "amp_turns_PP_d2 = Z*I*theta_m2/360 \t\t\t#De-magnetising ampere-turns per pole\n", - "amp_turns_PP_c2 = Z*I*(1/(2*P)-theta_m2/360) \t\t\t#Cross-magnetising ampere-turns per pole\n", - "print 'Partii)De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d2)\n", - "print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Parti)De-magnetising ampere-turns per pole is 0\n", - "Cross-magnetising ampere-turns per pole is 3000\n", - "Partii)De-magnetising ampere-turns per pole is 200\n", - "Cross-magnetising ampere-turns per pole is 2800\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.30 page no : 98" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P_input = 7.46*10**3\n", - "V = 230.\n", - "Pole = 8.\n", - "Z = 188. \t\t\t#number of armature consuctors\n", - "I_L = P_input/V\n", - "theta_m = 7.5 \t\t\t#brush lead angle in degree mechanical\n", - "\n", - "A = 2. \t\t\t# assumed wave wound because of low-current and high voltage\n", - "I = I_L/A\n", - "\n", - "#Part(i)\n", - "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#De-magnetising ampere-turns per pole\n", - "#Part(ii)\n", - "amp_turns_PP_c = Z*I*(1/(2*Pole)-theta_m/360) \t\t\t#Cross-magnetising ampere-turns per pole\n", - "\n", - "print 'De-magnetising ampere-turns per pole is %.2f'%(amp_turns_PP_d)\n", - "print 'Cross-magnetising ampere-turns per pole is %.2f'%(amp_turns_PP_c)\n", - "\n", - "# note : The difference in answer occured because I is approximated to 16 in last 2 steps in book\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "De-magnetising ampere-turns per pole is 63.52\n", - "Cross-magnetising ampere-turns per pole is 127.04\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.31 page no : 99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "N_1 = 1200. \t\t\t#initial speed \n", - "I_L1 = 200. \t\t\t#initial load current\n", - "V_t1 = 125.\n", - "N_2 = 1000. \t\t\t#altered speed\n", - "R_a = 0.04 \t\t\t#armature resistance\n", - "V_brush = 2. \t\t\t#brush drop\n", - "\n", - "# Calculations\n", - "# Initial Load\n", - "I_a1 = I_L1\n", - "E_g1 = V_t1+I_a1*R_a+V_brush \t\t\t#induced emf\n", - "\n", - "E_g2 = E_g1*(N_2/N_1) \t\t\t#Because E_g proportional to N during constant flux\n", - "R_L = V_t1/I_L1 \t\t\t#Load resistance\n", - "\n", - "#Solving for I_L2 as follows\n", - "#V_t2 = R_L*I_L2 \t\t\t#I_a2 = I_L2\n", - "#V_t2 = E_g2-(I_L2*R_2 + V_brush)\n", - "I_L2 = (E_g2-V_brush)/(R_L+R_a) \t\t\t#new current\n", - "\n", - "# Results\n", - "print 'Load current at new speed is %.4f A'%(I_L2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load current at new speed is 166.1654 A\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch2.ipynb b/DC_Machines_and_Synchronous_Machines/ch2.ipynb deleted file mode 100755 index b87a9190..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch2.ipynb +++ /dev/null @@ -1,2010 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:78f41af8e7d3182972251bae0a04df7a30b3aeb555cc290301b49daf9f643c37" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 : D.C. Motors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 page no : 5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "# Variables\n", - "V = 220.\n", - "I_a = 30. \t\t\t#armature currnet\n", - "R_a = 0.75 \t\t\t#Armature resistance\n", - "\n", - "# Calculations\n", - "E_b = V - I_a*R_a \t\t\t# Since V = E_b+ I_a*R_a\n", - "\n", - "\n", - "# Results\n", - "print 'Induced EMF or back EMF in the motor is %.1f V'%(E_b)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced EMF or back EMF in the motor is 197.5 V\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 page no : 6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pole = 4.\n", - "A = Pole \t\t\t#for lap winding\n", - "V = 230.\n", - "Z = 250. \t\t\t#number of armature conductors\n", - "phi = 30.*10**-3 \t\t\t#flux per pole in weber\n", - "I_a = 40.\n", - "R_a = 0.6 \t\t\t#Armature resistance\n", - "\n", - "# Calculations \n", - "E_b = V - I_a*R_a \t\t\t# Since V = E_b+ I_a*R_a\n", - "N = E_b * 60*A/(phi*Pole*Z) \t\t\t#because E_b = phi*P*N*Z/(60*A)\n", - "\n", - "# Results\n", - "print 'Back emf is %.0f V and running speed is %.0f rpm'%(E_b,N)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Back emf is 206 V and running speed is 1648 rpm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 page no : 9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pole = 4.\n", - "A = Pole \t\t\t#for lap winding\n", - "Z = 480.\t\t\t#number of armature conductors\n", - "phi = 20.*10**-3 \t\t\t#flux per pole in weber\n", - "I_a = 50. \t\t\t#Armature current\n", - "\n", - "# Calculations\n", - "T_a = 0.159*phi*I_a*Pole*Z/A \t\t\t#Gross torque developed by armature\n", - "\n", - "# Results\n", - "print 'Gross torque developed by armature is %.3f N-m'%(T_a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Gross torque developed by armature is 76.320 N-m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4 page no : 10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 4.\n", - "A = Pole \t\t\t#for lap winding\n", - "V = 230.\n", - "R_a = 0.8 \t\t\t#Armature resistance\n", - "N_0 = 1000. \t\t\t#no load speed in rpm\n", - "Z = 540. \t\t\t#number of armature conductors\n", - "phi = 25.*10**-3 \t\t\t#flux per pole in weber\n", - "\n", - "# Calculations and Results\n", - "E_b0 = phi*Pole*N_0*Z/(60*A) \t\t\t#induced emf\n", - "\n", - "#part(i)\n", - "print 'i)Induced e.m.f = %.0f V'%(E_b0)\n", - "\n", - "#part(ii)\n", - "I_a0 = (V- E_b0)/R_a \t\t\t#because V = E_b0+ I_a0*R_a\n", - "print 'ii)Armature current = %.2f A'%(I_a0)\n", - "\n", - "#part(iii)\n", - "stray_losses = E_b0*I_a0 \t\t\t#on no load ,power developed is fully power required to overcome strya losses\n", - "print 'iii)Stray loss = %.2f W'%(stray_losses)\n", - "\n", - "#part(iv)\n", - "T_f = E_b0*I_a0/(2*math.pi*N_0/60) \t\t\t#lost torque\n", - "print 'iv)Lost torque = %.3f N-m'%(T_f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Induced e.m.f = 225 V\n", - "ii)Armature current = 6.25 A\n", - "iii)Stray loss = 1406.25 W\n", - "iv)Lost torque = 13.429 N-m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5 page no : 21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pole = 4.\n", - "Z = 200. \t\t\t #No of armature conductors\n", - "A = 2. \t\t\t #wave connected armature\n", - "V = 250.\n", - "phi = 25.*10**-3 \t\t\t#flux per pole in weber\n", - "I_a = 60.\n", - "I_L = I_a \t \t\t#armature current\n", - "R_a = 0.15\n", - "R_se = 0.2 \t\t\t#resistances of armature and series field winding\n", - "\n", - "# Calculations\n", - "E_b = V - I_a*(R_a+R_se) \t\t\t#induced emf\n", - "N = E_b * 60*A/(phi*Pole*Z) \t\t\t#because E_b = phi*P*N*Z/(60*A)\n", - "\n", - "# Results\n", - "print 'Required speed is %.0f r.p.m'%(N)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required speed is 1374 r.p.m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 page no : 22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 250.\n", - "I_L = 20. \t\t\t#load current\n", - "R_a = 0.3\n", - "R_sh = 200. \t\t\t#Armature and shunt field winding\n", - "\n", - "# Calculations\n", - "I_sh = V/R_sh \t\t\t#shunt current\n", - "I_a = I_L-I_sh \t\t\t#armature current\n", - "E_b = V - I_a*R_a \t\t\t#emf generated\n", - "\n", - "# Results\n", - "print 'Armature current is %.2f A'%(I_a)\n", - "print 'Back e.m.f is %.3f V'%(E_b)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature current is 18.75 A\n", - "Back e.m.f is 244.375 V\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7 page no : 22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 220.\n", - "R_a = 0.3\n", - "R_sh = 110. \t\t\t#resistance of armature and shunt field winding\n", - "\n", - "#no load\n", - "N_0 = 1000. \t\t\t#no load speed in r.p.m\n", - "I_L0 = 6. \t\t\t#line current on no load\n", - "I_sh = V/R_sh \t\t\t#no load shnt current\n", - "I_a0 = I_L0 - I_sh \t\t\t#no load armature current\n", - "E_b0 = V - I_a0*R_a \t\t\t#no load induced emf\n", - "\n", - "# Calculations\n", - "#full load\n", - "I_sh_FL = V/R_sh\n", - "I_L_FL = 50 \t\t\t#line current at full load\n", - "I_a_FL = I_L_FL - I_sh_FL\t\t\t#full load armature current\n", - "E_b_FL = V - I_a_FL * R_a \t\t\t#full load induced emf\n", - "\t\t\t#using speed equation as treating phi as constant\n", - "N_FL = N_0 * (E_b_FL/E_b0)\n", - "\n", - "# Results\n", - "print 'Speed on full load is %.2f r.p.m'%(N_FL)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed on full load is 939.67 r.p.m\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8 page no : 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "R_a = 0.2\n", - "R_se = 0.3 \t\t\t#resistance of armature and series field winding\n", - "#following variables correspond to load 1\n", - "V = 250.\n", - "N_1 = 800.\n", - "I_1 = 20.\n", - "I_a1 = I_1\n", - "I_se1 = I_a1\n", - "\n", - "# Calculations\n", - "E_b1 = V - I_a1*(R_a+R_se)\n", - "#following variables correspond to load 2\n", - "I_2 = 50.\n", - "I_a2 = I_2\n", - "E_b2 = V - I_a2*(R_a+R_se)\n", - "\n", - "#from speed equation it can be derived that\n", - "\n", - "N_2 = N_1 * (E_b2/E_b1) * (I_a1/I_a2)\n", - "\n", - "# Results\n", - "print 'Speed on motor on no load is %.0f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed on motor on no load is 300 r.p.m\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9 page no : 31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 250.\n", - "R_a = 0.3\n", - "R_sh = 200. \t\t\t#resistance of armature and shunt field winding\n", - "R_x = 150. \t\t\t#additional resistance added in series to field winding\n", - "I_L1 = 22.\n", - "I_sh1 = V/R_sh \t\t\t#initial shunt current before adding 150 ohms resistance\n", - "I_a1 = I_L1 - I_sh1 \t\t\t#initial armature current before adding 150 ohms resistance\n", - "N_1 = 1500. \t\t\t#initial speed before adding 150 ohms resistance\n", - "\n", - "# Calculations\n", - "#T (prop.) phi*I_a (prop.) I_sh*I_a and T_1 = T_2 and simplifying further \n", - "I_sh2 = V/(R_sh + R_x) \t\t\t#new shunt current\n", - "I_a2 = I_sh1*I_a1/I_sh2 \t\t\t#New armature current\n", - "\n", - "E_b1 = V - I_a1*R_a \t\t\t#induced emf before adding 150 ohms resistance\n", - "E_b2 = V - I_a2*R_a \t\t\t#new emf\n", - "\n", - "N_2 = N_1 * (E_b2/E_b1) * (I_sh1/I_sh2) \t\t\t#new speed\n", - "\n", - "# Results\n", - "print 'New armature current and speed are %.4f A and %.f r.p.m respectively'%(I_a2,N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New armature current and speed are 36.3125 A and 2575 r.p.m respectively\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.10 page no : 36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 250.\n", - "R_a = 0.15\n", - "R_se = 0.1\n", - "R_x = 0.1 \t\t\t#Resimath.tance of armature , series field winding and extra resistance\n", - "N_1 = 800. \t\t\t#initial speed before load torque is increased\n", - "I_1 = 30.\n", - "I_a1 = I_1\n", - "I_se1 = I_1 \t\t\t#initial currents\n", - "\n", - "# Calculations\n", - "T_2_by_T_1 = 1 + (50./100) \t\t\t#50 percent increase as mentioned in question\n", - "I_se2_by_I_a2 = R_x/(R_x + R_se) \t\t\t#from the figure\n", - "\n", - "#T (prop.) phi*I_a (prop.) I_sh*I_a and T_1 = T_2 and simplifying ,solving further \n", - "I_a2 = math.sqrt(I_a1*I_se1*T_2_by_T_1/I_se2_by_I_a2) \t\t\t#new armature current\n", - "I_se2 = I_se2_by_I_a2 *I_a2 \t\t\t#new series field current\n", - "\n", - "E_b1 = V - I_a1*R_a - I_se1*R_se \t\t\t#indiced emf initially\n", - "E_b2 = V - I_a2*R_a - I_se2*R_se \t\t\t#new induced emf\n", - "N_2 = N_1 * (E_b2/E_b1) * (I_se1/I_se2) \t\t\t#required speed\n", - "\n", - "# Results\n", - "print 'The required running speed of motor is %.3f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required running speed of motor is 912.743 r.p.m\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.11 page no : 38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 220.\n", - "I_1 = 50.\n", - "I_a1 = I_1 \t\t\t#Currents before adding extra resistance\n", - "T_2_by_T_1 = 0.5\n", - "R_t = 0.15 \t\t\t#R_e + R_se = 0.15\n", - "\n", - "# Calculations\n", - "I_a2 = I_a1 * math.sqrt(T_2_by_T_1) \t\t\t#Because T (prop.) I_a**2\n", - "E_b1 = V-I_a1*(R_t) \t\t\t#induced emf before adding extra resistance\n", - "N_1 = 500.\n", - "N_2 = 300. \t\t\t#speeds before and adding extra resistance\n", - "\n", - "#N (prop.) E_b/phi (prop.) E_b/I_a\n", - "E_b2 = E_b1 *(I_a2/I_a1)*(N_2/N_1) \t\t\t#induced emf after adding resistance\n", - "R_x = (V-E_b2)/I_a2 -R_t \t\t\t#because E_b2 = V - I_a2*(R_a + R_se + R_x)\n", - "\n", - "# Results\n", - "print 'Desired extrea resistance = %.4f ohms '%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Desired extrea resistance = 3.5225 ohms \n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.12 page no : 43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "R_a = 1.\n", - "I_a = 1.2 \n", - "V = 50.\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "E_b = V - I_a*R_a\n", - "rot_loss_NL = E_b*I_a \t\t\t#no load rotational loss \n", - "print 'i)No load rotational losses = %.2f W'%(rot_loss_NL)\n", - "\n", - "#part(ii)\n", - "omega_2000 = 2*math.pi*2000/60 \t\t\t#angular velocity when speed of motor = 2000 rpm\n", - "K_m = E_b/omega_2000 \t\t\t#to determine K_m\n", - "V = 48.\n", - "omega_1800 = 2*math.pi*1800/60 \t\t\t#angular velocity when speed of motor = 1800 rpm\n", - "E_b = K_m*omega_1800\n", - "I_a = (V-E_b)/R_a \t\t\t#armature current\n", - "P_dev = E_b*I_a\t\t\t#power developed\n", - "motor_output = P_dev - rot_loss_NL\n", - "print 'ii)Motor output = %.f W'%(motor_output)\n", - "\n", - "#part(iii)\n", - "E_b = 0. \t\t\t#when motor stalls\n", - "V_stall = 20. \t\t\t#voltage during stalling\n", - "I_a = V_stall/R_a \t\t\t#armature current during stalling\n", - "T_stall = K_m*I_a \t\t\t#stalling torque\n", - "print 'iii)Stalling torque = %.2f N-m'%(T_stall)\n", - "print 'partii answer is slightly different due to inaccurate calculation of Power developed'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)No load rotational losses = 58.56 W\n", - "ii)Motor output = 121 W\n", - "iii)Stalling torque = 4.66 N-m\n", - "partii answer is slightly different due to inaccurate calculation of Power developed\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.13 page no : 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 120.\n", - "R_a = 0.2 \n", - "R_sh = 60. \t\t\t#armature and field resistance\n", - "I_L1 = 40.\n", - "N_1 = 1800. \n", - "\n", - "# Calculations\n", - "I_sh = V/R_sh\n", - "\n", - "I_a1 = I_L1 - I_sh \n", - "E_b1 = V -I_a1*R_a \t\t\t#Induced emf at half load\n", - "T2_by_T1 = 1./2 \n", - "I_a2 = I_a1*(T2_by_T1) \t\t\t#T (prop.)I_a\n", - "E_b2 = V- I_a2*R_a\t\t\t#induced emf at half load\n", - "N_2 = N_1 *(E_b2/E_b1) \t\t\t#N (prop.) E_b as phi is constant\n", - "\n", - "# Results\n", - "print 'Speed on half load condition is %.2f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed on half load condition is 1860.85 r.p.m\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.14 page no : 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "R_a = 0.08\n", - "E_b1 = 242. \n", - "V = 250.\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "I_a1 = (V-E_b1)/R_a\n", - "print 'i)Armature current = %.0f A'%(I_a1)\n", - "\n", - "#part(ii)\n", - "N = 0.\n", - "E_b = 0. \t\t\t#because N = 0\n", - "I_a_start = V/R_a\n", - "print 'ii)Starting armature current = %.0f A'%(I_a_start)\n", - "\n", - "#part(iii)\n", - "I_a2 = 120.\n", - "E_b2 = V-I_a2*R_a\n", - "print 'iii)Back emf if armature current is changed to 120 A = %.1f V'%(E_b2)\n", - "\n", - "#part(iv)\n", - "I_a = 87.\n", - "N_m = 1500.\n", - "E_g = V + I_a*R_a \t\t\t#induced emf\n", - "N_g = N_m*(E_g/E_b1)\t\t\t#as E (prop.) N\n", - "print 'iv)Generator speed to deliver 87 A at 250 V = %.1f rpm'%(N_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Armature current = 100 A\n", - "ii)Starting armature current = 3125 A\n", - "iii)Back emf if armature current is changed to 120 A = 240.4 V\n", - "iv)Generator speed to deliver 87 A at 250 V = 1592.7 rpm\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.15 page no : 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "shaft_output = 80.*746 \t\t\t#coverted to watts\n", - "eta = 80./100 \t\t\t#efficiency\n", - "V = 250.\n", - "N_1 = 1200.\n", - "R_a = 0.04\n", - "R_sh = 250. \t\t\t #armature and shunt field resistance\n", - "\n", - "# Calculations and Results\n", - "power_input = shaft_output/eta\n", - "I_L = power_input /V\n", - "I_sh = V / R_sh\n", - "I_a = I_L - I_sh\n", - "E_b1 = V - I_a*R_a\n", - "\n", - "gross_mechanical_power = E_b1*I_a \t\t\t#electrical equivalent of mechanical power developed\n", - "stray_losses = gross_mechanical_power - shaft_output\n", - "print 'Mechanical power developed on full load = %.3f kW'%(gross_mechanical_power/1000)\n", - "\n", - "#on no load shaft_output = 0 and entire gross power is used to overcome stray losses\n", - "Eb0_Ia0 = stray_losses\n", - "#E_b0 = V - I_a0*R_a ... solving for I_0\n", - "p = [R_a, -V, Eb0_Ia0]\n", - "ans = roots(p)\n", - "I_a0 = ans[1] \t\t\t#first root is ignored math.since its too large\n", - "I_L0 = I_sh+I_a0 \t\t\t#current drawn from supply\n", - "E_b0 = V - I_a0*R_a \n", - "\n", - "#From speed equation N (prop.) E_b\n", - "N_0 = N_1*(E_b0/E_b1)\n", - "print 'No load speed and current are %.4f rpm and %.2f A respectively'%(N_0,I_L0)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mechanical power developed on full load = 70.812 kW\n", - "No load speed and current are 1250.9121 rpm and 45.85 A respectively" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.16 page no : 53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 250.\n", - "P = 4. \n", - "R_a = 0.1 \n", - "R_sh = 124. \t\t\t#armature and shunt field resistance \n", - "I_L0 = 4.\n", - "N_0 = 1200.\n", - "I_L_1 = 61.\n", - "\n", - "# Calculations\n", - "I_sh = V/R_sh\n", - "I_a0 = I_L0-I_sh\n", - "V_brush = 2 \t\t\t#voltage loss due to brush\n", - "E_b0 = V - I_a0*R_a- V_brush\n", - "\n", - "I_a1 = I_L_1 - I_sh\n", - "E_b1 = V - I_a1*R_a -V_brush\n", - "\n", - "phi1_by_phi0 = 1-(5./100) \t\t\t#weakened by 5 %\n", - "N_1 = N_0 *(E_b1/E_b0) /phi1_by_phi0\n", - "\n", - "# Results\n", - "print 'Full load speed is %.3f r.p.m'%(N_1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full load speed is 1234.102 r.p.m\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.17 page no : 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 250.\n", - "R_a = 0.15 \n", - "R_sh = 167.67 \t\t\t#armature and shunt field resistance\n", - "N_0 = 1280. \t\t\t#speed at no load\n", - "\n", - "#full load\n", - "I_L1 = 67. \t\t\t#current drawn on full load\n", - "I_sh = V / R_sh \t\t\t#as shunt motor\n", - "I_a1 = I_L1- I_sh\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "#on no load\n", - "I_L0 = 6.5\n", - "I_a0 = I_L0 - I_sh\n", - "E_b0 = V - I_a0*R_a\n", - "\n", - "# Calculations and Results\n", - "#part(i) USING SPEED EQUATION\n", - "#N (prop.) E_b/phi (prop.)E_b \t\t\t#as phi is constant\n", - "N_1 = N_0 * (E_b1 / E_b0)\n", - "print 'i)Full load speed = %.3f r.p.m'%(N_1)\n", - "\n", - "#part(ii)\n", - "speed_regulation = 100* ((N_0-N_1)/N_1)\n", - "#N_1 is full load speed and N_0 = No load speed \n", - "print 'ii)Speed regulation = %.2f percent '%(speed_regulation )\n", - "\n", - "#part(iii)\n", - "shaft_output_FL = E_b1*I_a1 - E_b0*I_a0 \t\t\t#full load power developed - stray losses\n", - "hp_rating = shaft_output_FL /746\n", - "print 'iii)HP rating of machine = %.2f h.p'%(hp_rating)\n", - "\n", - "#part(iv)\n", - "power_input = V*I_L1\n", - "eta = 100*(shaft_output_FL/power_input) \t\t\t#full load efficiency\n", - "print 'iv)Full load efficiency = %.2f percent'%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Full load speed = 1233.396 r.p.m\n", - "ii)Speed regulation = 3.78 percent \n", - "iii)HP rating of machine = 19.42 h.p\n", - "iv)Full load efficiency = 86.48 percent\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.18 page no : 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 200.\n", - "R_a = 0.5\n", - "R_se = 0.2\n", - "R_x = 0.2 \t\t\t#armature and series field resistance; extra resistance\n", - "I_a1 = 20.\n", - "I_1 = I_a1 \n", - "I_se1 = I_a1\n", - "I_a2 = 20.\n", - "I_2 = I_a2\n", - "I_se2 = I_2 *(R_x/(R_se+R_x))\n", - "\n", - "# Calculations\n", - "E_b1 = V -I_a1*R_a - I_a1*R_se\n", - "E_b2 = V -I_a2*R_a - I_se2*R_se\n", - "\n", - "phi2_by_phi1 = 70./100\n", - "N_1 = 1000\n", - "N_2 = N_1*(E_b2/E_b1) /phi2_by_phi1 \t\t\t#N (prop.) E_b/phi\n", - "\n", - "# Results\n", - "print 'Required speed is %.2f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required speed is 1443.93 r.p.m\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.19 page no : 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 110.\n", - "P = 4.\n", - "R_a = 0.1\n", - "R = 0.01 \t\t\t#A resistance of 0.01 ohms\n", - "R_se = R+R\n", - "\n", - "# Calculations\n", - "#case(i)\n", - "I_1 = 50.\n", - "I_a1 = I_1\n", - "N_1 = 700.\n", - "E_b1 = V -I_a1*(R_a + R_se)\n", - "\n", - "#T (prop) phi*I_a from torque equation (1)\n", - "\n", - "#phi_1 (prop.) I_a1 (2)\n", - "#case(ii) when I_a2 gets divided to half\n", - "#phi_2 (prop.) I_a2/2 (3)\n", - "\n", - "#combining (1)(2)(3) and T1 = T2\n", - "I_a2 = math.sqrt(2*I_a1**2)\n", - "R_se_eqvt = (R*R)/(R+R) \t\t\t#Equavalent of parallel combination\n", - "E_b2 = V - I_a2*R_a - I_a2* R_se_eqvt\n", - "\n", - "#using speed equation N (prop.) E_b / phi and using (2) and (3)\n", - "N_2 = N_1 *( E_b2/E_b1) *(I_a1/(I_a2/2))\n", - "\n", - "# Results\n", - "print 'Speed after reconnection = %.3f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed after reconnection = 976.389 r.p.m\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.20 page no : 58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P = 4.\n", - "I_a1 = 50.\n", - "N_1 = 2000.\n", - "V = 230.\n", - "\n", - "\n", - "# Calculations and Results\n", - "#phi_1 is proportioanl to total ampere-turns produced by field coils\n", - "#phi_1 (prop.) I_a1*P*n (prop.) 200*n (1)\n", - "\n", - "#After reconnection ,phi_2 proportional to ampere turns divided as follows\n", - "#phi_2 (prop.) [I_a2/2*2*n + I_a2/2*2*n] (prop.) 2*n*I_a2 (2)\n", - "\n", - "# Dividing (1) and (2) ,(phi_1/phi_2) = 100 / I_a2 (3)\n", - "\n", - "#T (prop.) phi*I_a AND T (prop.) N**2 (4)(5)\n", - "#therefore N**2 (prop.) phi*I_a (6)\n", - "\n", - "#N (prop.) E_b/phi (prop.) 1/phi ..\n", - "#Because drops across windings can be neglected , E_b1 = E_b2\n", - "#therefore N (prop.) 1/phi (7)\n", - "\n", - "#using (7) and (6) phi**3 (prop.) 1/I_a (8)\n", - "\n", - "#combining (3) and (8)\n", - "I_a2 = (50.*100**3)**(1./4) \t\t\t#new armature current\n", - "print 'New armature current = %.3f A'%(I_a2)\n", - "#combining (6) and (7) N**3 (prop.) I_a1\n", - "N_2 = N_1 *(I_a2/I_a1)**(1./3)\n", - "print 'New motor speed = %.3f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New armature current = 84.090 A\n", - "New motor speed = 2378.414 r.p.m\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example 2.22 page no : 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 200.\n", - "I_a1 = 30.\n", - "R_t = 1.5 \t\t\t#R_a + R_se\n", - "E_b1 = V - I_a1*R_t\n", - "N2_by_N1 = (60./100)\n", - "\n", - "# Calculations\n", - "#T (prop.) I_a**2 and T (prop.) N_3....therefore I_a**2 (prop.) N**3\n", - "I_a2 = I_a1*math.sqrt(N2_by_N1**3)\n", - "\n", - "#N (prop.) E_b/I_a\n", - "N2_by_N1\n", - "E_b2 = E_b1 *(I_a2/I_a1)*N2_by_N1\n", - "R_x = (V- E_b2)/I_a2 - R_t \t\t\t#because E_b2 = V - I_a2*(R_x+R_t)\n", - "\n", - "# Results\n", - "print 'Additional resistance to be added in series with motor circuit = %.3f ohms'%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Additional resistance to be added in series with motor circuit = 9.744 ohms\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.23 page no : 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "V = 250.\n", - "R_a = 0.4 \n", - "R_sh = 100. \t\t\t#armature and shunt field resistance\n", - "I_sh1 = V / R_sh\n", - "P_out_FL = 10 * 735.5\n", - "eta = 85./100 \t\t\t#efficiency\n", - "P_in = P_out_FL/eta\n", - "I_L1 = P_in /V\n", - "I_a1 = I_L1 - I_sh1\n", - "\n", - "# T (prop.) phi*I_a (prop.) I_sh*I_a because phi (prop.) I_sh\n", - "#Bu torque is constant.. \n", - "Ia2_Ish2 = I_a1*I_sh1\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "#N (prop.) E_b/I_sh\n", - "#put E_b2 = V - I_a2*R_a and solving further for I_sh2 we get ,I_sh2**2 - 1.8824 I_sh2 +0.2417 = 0\n", - "p = array([1, -1.8824, 0.2417])\n", - "ans = roots(p) \n", - "I_sh2 = ans[0]\n", - "#root 1 was considered because its always easier to attain root(1) because less resistacne is needeed\n", - "#R_x in series with field\n", - "R_x = (V/I_sh2) -R_sh \t\t\t#because I_sh2 = V/(R_sh + R_x)\n", - "print 'Extra resistance to be added = %.2f ohms'%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Extra resistance to be added = 43.37 ohms\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.24 page no : 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "R_t = 1. \t\t\t#R_t = R_se + R_a\n", - "V_1 = 230.\n", - "N_1 = 300.\n", - "N_2 = 375.\n", - "I_1 = 15.\n", - "I_a1 = I_1\n", - "\n", - "# Calculations\n", - "#T (prop.) I_a**2 and T (prop.) N_2....therefore I_a**2 (prop.) N**2\n", - "I_a2 = I_a1 *(N_2/N_1)\n", - "E_b1 = V_1 - I_a1*(R_t)\n", - "\n", - "#N (prop.) E_b/I_a\n", - "E_b2 = E_b1*(I_a2/I_a1)*(N_2/N_1)\n", - "V_2 = E_b2 + I_a2* (R_t) \t\t\t#because E_b2 = V_2 - I_a2*(R_a+R_se)\n", - "\n", - "# Results\n", - "print 'Voltage supply needed = %.4f V'%(V_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage supply needed = 354.6875 V\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.25 page no : 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "I_L1 = 30.\n", - "V = 230.\n", - "R_sh = 230.\n", - "R_a = 1.\n", - "I_sh = V / R_sh\n", - "I_a1 = I_L1 - I_sh\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "# Calculations\n", - "#T (prop.) phi*I_a (prop.) I_a as phi is constant\n", - "#and torque is constant\n", - "I_a2 = I_a1\n", - "N2_by_N1 = 1./2\n", - "#N (prop.) E_b/phi (prop.) E_b\n", - "E_b2 = E_b1 *(N2_by_N1)\n", - "R_x = (V- E_b2)/I_a2 - R_a \t\t\t#Because E_b2 = V - I_a2*(R_a + R_x)\n", - "\n", - "# Results\n", - "print 'resistance to be inserted in series = %.4f ohms '%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance to be inserted in series = 3.4655 ohms \n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.26 page no : 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "# Variables\n", - "T_1 = 40. \t\t\t#initial torque\n", - "#phi_1 is initial flux\n", - "#phi_2 is new flux\n", - "#T_2 is new torque\n", - "#I_a1 is initial current\n", - "#I_a2 is new current\n", - "phi2_by_phi1 = 1- (30./100) \t\t\t#decrease by 30 percent\n", - "Ia2_by_Ia1 = 1+(15./100) \t\t\t#increase by 15 percent\n", - "\n", - "# Calculations\n", - "#T (prop.)phi*I_a\n", - "T_2 = T_1*(phi2_by_phi1)*(Ia2_by_Ia1)\n", - "\n", - "# Results\n", - "print 'New torque is %.1f N-m'%(T_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New torque is 32.2 N-m\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.27 page no : 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "# Variables\n", - "V = 230.\n", - "N_1 = 1000.\n", - "N_2 = 950.\n", - "R_a = 0.5\n", - "R_sh = 230. \t\t\t#armature and shunt field resistance\n", - "I_L1 = 10.\n", - "\n", - "# Calculations\n", - "I_sh = V/R_sh\n", - "I_a1 = I_L1 - I_sh\n", - "\n", - "#T (prop.) phi*I_a (prop.) I_a with phi constant and T is constant due to full-load\n", - "I_a2 = I_a1\n", - "\n", - "E_b1 = V - I_a1*R_a\n", - "E_b2 = E_b1*(N_2/N_1) \t\t\t#N (prop.) E_b /phi (prop.) E_b as phi is constant\n", - "\n", - "R_x = (V-E_b2)/I_a2 -R_a \n", - "\n", - "# Results\n", - "print 'resistance to be inserted in series with armature = %.4f ohms'%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance to be inserted in series with armature = 1.2528 ohms\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.28 page no : 68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 250.\n", - "N_0 = 1000.\n", - "I_0 = 5.\n", - "R_a = 0.2\n", - "R_sh = 250. \t\t\t#armature and shunt field resistance\n", - "I_L = 50. \t\t\t#on no load\n", - "I_sh = V / R_sh\n", - "I_a0 = I_0 - I_sh\n", - "I_a = I_L - I_sh\n", - "E_b0 = V- I_a0*R_a\n", - "E_b1 = V- I_a *R_a\n", - "\n", - "# Calculations\n", - "phi1_by_phi0 = 1-(3./100) \t\t\t#weakens by 3 percent\n", - "#N (prop.) E_b/phi\n", - "N_1 = N_0 *(E_b1/E_b0) /phi1_by_phi0\n", - "\n", - "# Results\n", - "print 'Speed when loaded and drawing 50A current is %.3f r.p.m'%(N_1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed when loaded and drawing 50A current is 993.695 r.p.m\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.29 page no : 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 230.\n", - "I_a0 = 3.3\n", - "R_a = 0.3\n", - "R_sh = 160. \t\t\t#armature and shunt field resistance \n", - "I_L1 = 40.\n", - "N_0 = 1000.\n", - "E_b0 = V - I_a0*R_a\n", - "I_sh = V/ R_sh\n", - "I_a1 = I_L1 - I_sh\n", - "E_b1 = V - I_a1*R_a\n", - "phi1_by_phi0 = 1- (4./100) \t\t\t#weakening by 4 percent \n", - "\n", - "# Calculations and Results\n", - "N_1 = N_0 *(E_b1/E_b0)/(phi1_by_phi0) \t\t\t#because N (prop.) E_b/phi\n", - "print 'Full load speed is %.4f rpm'%(N_1)\n", - "T_0 = E_b0*I_a0/(2*math.pi*N_0/60)\n", - "T_1 = T_0*(I_a1/I_a0)*phi1_by_phi0 \t\t\t# because T (prop.) phi*I_a\n", - "print 'Full load developed torque is %.4f N-m'%(T_1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full load speed is 993.5485 rpm\n", - "Full load developed torque is 80.9585 N-m\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.30 page no : 70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 220.\n", - "I_L = 52.\n", - "N_1 = 750.\n", - "N_2 = 600.\n", - "R_a = 0.2\n", - "R_sh = 110. \t\t\t#armature and shunt field resistance\n", - "\n", - "# Calculations and Results\n", - "I_sh = V/ R_sh\n", - "I_a1 = I_L - I_sh\n", - "I_a2 = I_a1\t\t\t#T (prop.) I_a and T is constant\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "#N (prop.) E_b/phi (prop.) E_b\n", - "E_b2 = E_b1*(N_2/N_1)\n", - "R_x = (V- E_b2)/I_a2 -R_a \t\t\t#Because E_b2 = V - I_a2*(R_a+R_x)\n", - "print 'resistance to be connected in series = %.2f ohms'%(R_x)\n", - "\n", - "#After R_x gets connected in series with armature and 110 ohms in series with field winding\n", - "N_1 = 600.\n", - "I_sh2 = V /(R_sh+110)\n", - "I_a1 = 50.\n", - "I_sh1 = 2.\n", - "I_sh2 = 1.\n", - "#T (prop.) I_a*I_sh and T doesn't vary\n", - "I_a2 = I_a1*(I_sh1/I_sh2)\n", - "E_b1 = V - I_a1*(R_a+R_x)\n", - "E_b2 = V - I_a2*(R_a+R_x)\n", - "N_2 = N_1*(E_b2/E_b1)*(I_sh1/I_sh2) \t\t\t#Because N (prop.) E_b/I_sh\n", - "print 'New speed = %.3f rpm'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance to be connected in series = 0.84 ohms\n", - "New speed = 828.571 rpm\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.31 page no : 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 230.\n", - "R_a = 0.15\n", - "R_sh = 250. \t\t\t#armature and shunt field resistance\n", - "I_a1 = 50.\n", - "I_a2 = 80.\n", - "N_1 = 800.\n", - "N_2 = 1000.\n", - "I_sh1 = V / R_sh\n", - "\n", - "# Calculations\n", - "E_b1 = V - I_a1*R_a\n", - "E_b2 = V - I_a2*R_a\n", - "\n", - "I_sh2 = I_sh1*(E_b2/E_b1)*(N_1/N_2) \t\t\t#Because N (prop.) E_b/ I_sh\n", - "R_x = (V/I_sh2 ) - R_sh \t\t\t#because I_sh2 = V /(R_x+ R_sh)\n", - "\n", - "# Results\n", - "print 'resistance to be added is R_x = %.0f ohms'%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance to be added is R_x = 69 ohms\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.32 page no : 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 230.\n", - "R_a = 0.5\n", - "N_1 = 800.\n", - "N_2 = 600.\n", - "I_a2 = 20. \n", - "I_a1 = I_a2\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "# Calculations\n", - "#N (prop.) E_b/phi (prop.) E_b as phi is constant\n", - "E_b2 = E_b1 *(N_2/N_1)\n", - "#additional resistance required\n", - "R_x = (V -E_b2)/I_a2 - R_a \t\t\t#because E_b2 = V - I_a2*(R_a+R_x)\n", - "\n", - "# Results\n", - "print 'Additional resistance required = %.2f ohms '%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Additional resistance required = 2.75 ohms \n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.33 page no : 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 220.\n", - "R_a = 0.5\n", - "R_x = 5. \t\t\t#armature resistacne and extra resistance\n", - "I_1 = 15.\n", - "I_se1 = I_1\n", - "I_se2 = I_se1 \n", - "I_2 = I_se2\n", - "N_1 = 800.\n", - "\n", - "# Calculations\n", - "E_b1 = V - I_1*R_a\n", - "E_b2 = V - I_2*(R_a+R_x)\n", - "\n", - "N_2 = N_1*(E_b2/E_b1)*(I_se1/I_se2) \t\t\t#because N (prop.) E_b/I_se\n", - "\n", - "# Results\n", - "print 'New speed of rotor = %.3f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New speed of rotor = 517.647 r.p.m\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.34 page no : 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 250.\n", - "I_a1 = 20.\n", - "R_a = 0.5\n", - "N_1 = 1000.\n", - "N_2 = 500.\n", - "\n", - "# Calculations and Results\n", - "#T (prop.) I_a and T_1 = T_2\n", - "I_a2 = I_a1\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "#N (prop.) E_b\n", - "E_b2 = E_b1 *(N_2/N_1)\n", - "R_x = (V-E_b2)/I_a2 - R_a \t\t\t#because E_b2 = V - I_a2*(R_a+R_x)\n", - "print 'Additional resistance = %.0f ohms'%(R_x)\n", - "T3_by_T2 = 0.5 \t\t\t#torque is halved\n", - "I_a3 = I_a2 *(T3_by_T2) \t\t\t#new armature current\n", - "E_b3 = V - I_a3*(R_x + R_a)\n", - "N_3 = E_b3*N_2 / E_b2 \t\t\t#N (prop.) E_b\n", - "print 'New speed = %.3f rpm'%(N_3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Additional resistance = 6 ohms\n", - "New speed = 770.833 rpm\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.35 page no : 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "P_out = 100*735.5\n", - "V = 500.\n", - "P = 4.\n", - "A = 2.\t\t\t# due to wave winding\n", - "Z = 492. \t\t\t#no of conductors\n", - "phi = 50.*10**-3 \t\t\t#flux per pole\n", - "eta = 92./100 \t\t\t#efficiency\n", - "P_in = P_out/eta\n", - "R_a = 0.1 \n", - "R_sh = 250. \t\t\t#amature and shunt field resistance\n", - "\n", - "# Calculations\n", - "I_L = P_in/V\n", - "I_sh = V/ R_sh\n", - "I_a = I_L - I_sh\n", - "E_b = V - I_a*R_a\n", - "N = E_b*60*A/(phi*P*Z) \t\t\t#because E_b = phi*P*N*Z/(60*A)\n", - "\n", - "T_sh = P_out/(2*math.pi*N/60) \t\t\t#Useful torque\n", - "\n", - "# Results\n", - "print 'i)Speed at full load = %.4f rpm'%(N)\n", - "print 'ii)Useful torque = %.2f N-m'%(T_sh)\n", - "print 'Answer mismatches due to improper approximation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Speed at full load = 590.5011 rpm\n", - "ii)Useful torque = 1189.41 N-m\n", - "Answer mismatches due to improper approximation\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.36 page no : 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from numpy import *\n", - "import math \n", - "\n", - "# Variables\n", - "N_1 = 1000.\n", - "I_1 = 50.\n", - "I_a1 = I_1\n", - "V = 250.\n", - "R_x = 4.4\n", - "R_t = 0.6 \t\t\t#R_t = R_a+R_se\n", - "E_b1 = V - I_a1*(R_t)\n", - "\n", - "# Calculations\n", - "#T (prop.)I_a**2 T (prop.) N**2 .... hence N (prop.) I_a\n", - "#N (prop.) E_b /I_a \n", - "#combining both E_b (prop.) I_a**2\n", - "#using E_b2 = V - I_a2*(R_a + R_se + R_x) and solving for I_a2 we get 0.088 I_a2**2 +5 I_a2 -250 = 0\n", - "p = [0.088 ,5, -250] \n", - "ans = roots(p)\n", - "I_a2 = ans[1] \t\t\t#root(1) is ignored as it is -ve\n", - "E_b2 = V - I_a2*(R_t + R_x) \n", - "N_2 = N_1*(E_b2/E_b1)*(I_a1/I_a2)\n", - "\n", - "# Results\n", - "print 'Motor speed = %.2f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Motor speed = 639.79 r.p.m\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.37 page no : 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from numpy import *\n", - "import math \n", - "\n", - "# Variables\n", - "V = 250.\n", - "I_a1 = 20.\n", - "R_sh = 250.\n", - "R_a = 0.5 \t\t\t#shunt field and armature resistance\n", - "I_sh1 = V / R_sh\n", - "E_b1 = V - I_a1*R_a\n", - "\n", - "#T (prop.) phi*I_a (prop.) I_sh*I_a\n", - "#math.since T_1 = T_2\n", - "I_sh2_I_a2 = I_sh1*I_a1 \n", - "I_sh2_I_a2 = I_sh1*I_a1 \t\t\t# = 20\n", - "\n", - "# Calculations\n", - "#N (prop.) E_b/I_sh\n", - "#E_b1 = V - I_a1*R_a\n", - "#Solving further for I_a2 we get I_a2**2 -500 I_a2 + 12800\n", - "p = [1, -500, 12800]\n", - "ans = roots(p)\n", - "I_a2 = ans[1] \t\t\t#higher root is neglected\n", - "I_sh2 = I_sh2_I_a2 / I_a2\n", - "R_x = (V / I_sh2) - R_sh \t\t\t#resistance to be inserted in shunt field\n", - "\n", - "# Results\n", - "print 'resistance to be inserted = %.4f ohms '%(R_x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance to be inserted = 88.3129 ohms \n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.38 page no : 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "\n", - "# Variables\n", - "V = 250.\n", - "N_1 = 1000.\n", - "I_L1 = 25.\n", - "R_a = 0.2\n", - "R_sh = 250. \t\t\t#armature and shunt field resistance\n", - "V_brush = 1. \t\t\t#voltage drop due to brushes\n", - "\n", - "# Calculations and Results\n", - "I_sh1 = V/R_sh\n", - "I_a1 = I_L1 - I_sh1\n", - "E_b1 = V- I_a1*R_a - 2 *V_brush\n", - "\n", - "#when loaded\n", - "I_L2 = 50.\n", - "I_sh2 = I_sh1 \t\t\t#as flux weakensby armature reaction shunt field current remains same \n", - "I_a2 = I_L2 - I_sh2\n", - "E_b2 = V- I_a2*R_a - 2 *V_brush\n", - "\n", - "phi2_by_phi1 = 1- (3./100) \t\t\t#weakens by 3 percent\n", - "N_2 = N_1*(E_b2/E_b1)/ phi2_by_phi1 \t\t\t#N (prop.) E_b/phi\n", - "print 'New speed = %.3f rpm'%(N_2)\n", - "T_1 = E_b1*I_a1/(2*math.pi*N_1/60)\n", - "T_2 = E_b2*I_a2/(2*math.pi*N_2/60)\n", - "print 'Torque before field weakening = %.4f N-m'%(T_1)\n", - "print 'Torque after field weakening = %.4f N-m'%(T_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New speed = 1009.733 rpm\n", - "Torque before field weakening = 55.7373 N-m\n", - "Torque after field weakening = 110.3831 N-m\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.39 page no : 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "\n", - "# Variables\n", - "V = 220.\n", - "R_a = 0.5\n", - "R_x = 1. \t\t\t#armature resistance and extra resistance\n", - "N_FL = 500. \t\t\t#full load speed in r.p.m\n", - "I_a_FL = 30.\n", - "\n", - "# Calculations and Results\n", - "#part(i) Full load \n", - "E_b_FL = V- I_a_FL * R_a\n", - "#T (prop.) I_a... T is constant\n", - "I_a_dash_FL = I_a_FL \n", - "E_b_dash_FL = V- I_a_dash_FL * (R_a+R_x)\n", - "#N (prop.) E_b/phi (prop.) E_b\n", - "N_dash_FL = N_FL*(E_b_dash_FL/E_b_FL)\n", - "print 'i)Speed at full load torque = %.4f r.p.m'%(N_dash_FL)\n", - "\n", - "#part(ii)\n", - "T2_by_T1 = 2\n", - "I_a_dash_FL = I_a_FL *(T2_by_T1)\n", - "E_b_dash_FL = V- I_a_dash_FL * (R_a+R_x)\n", - "N_dash_FL = N_FL*(E_b_dash_FL/E_b_FL)\n", - "print 'ii)Speed at double full load torque = %.3f r.p.m'%(N_dash_FL)\n", - "\n", - "#part(iii) ...stalling\n", - "E_b = 0 \t\t\t#as speed is zero in case of stalling torque\n", - "I_a_stall = (V-E_b)/(R_a+R_x)\n", - "T_FL = E_b_FL * I_a_FL/(2*math.pi*N_FL/60)\n", - "T_stall = T_FL *(I_a_stall/ I_a_FL)\n", - "print 'iii)Stalling torque = %.3f Nm'%(T_stall)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Speed at full load torque = 426.8293 r.p.m\n", - "ii)Speed at double full load torque = 317.073 r.p.m\n", - "iii)Stalling torque = 574.231 Nm\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.40 page no : 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 230.\n", - "I_a1 = 30.\n", - "R_a = 0.4\n", - "R_x = 1.1\t\t\t#armature resistance and extra resistance\n", - "N_1 = 500.\n", - "\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "E_b1 = V - I_a1*R_a\n", - "I_a2 = I_a1 \t\t\t#I_a is constant as T , phi are constant\n", - "E_b2 = V - I_a2*(R_a+R_x)\n", - "N_2 = N_1 *(E_b2/E_b1) \t\t\t#Because N (prop.) E_b/phi (prop.) E_b\n", - "print 'i)Speed at full load torque = %.3f r.p.m'%(N_2)\n", - "\n", - "#part(ii)\n", - "T2_by_T1 = 1.5\n", - "I_a2 = I_a1 * T2_by_T1\n", - "E_b2 = V - I_a2*(R_a+R_x)\n", - "N_2 = N_1 *(E_b2/E_b1) \t\t\t#Because N (prop.) E_b/phi (prop.) E_b\n", - "print 'ii)Speed at 1.5 times full load torque = %.3f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Speed at full load torque = 424.312 r.p.m\n", - "ii)Speed at 1.5 times full load torque = 372.706 r.p.m\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch3.ipynb b/DC_Machines_and_Synchronous_Machines/ch3.ipynb deleted file mode 100755 index 6f59c07f..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch3.ipynb +++ /dev/null @@ -1,1912 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:851db29572c4b7f5287b09f53c6bb9c3406b6b6577d3bab318bf198d21eaaa81" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3 : Testing of D C Machines" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1 page no : 5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 6.\n", - "V = 500.\n", - "A = 2. \t\t\t#because of wave wound armature\n", - "Z = 1200. \t\t\t#number of armature conductors\n", - "phi = 20.*10**-3 \t\t\t#useful flux per pole\n", - "Ra = 0.5 \n", - "Rsh = 250. \t\t\t#armature and field resistance\n", - "Il = 20. \t\t\t#current drawn from supply\n", - "mechanical_losses = 900.\n", - "Ish = V/Rsh\n", - "Ia = Il-Ish\n", - "Eb = V-Ia*Ra \t\t\t#because V = Eb+Ia*Ra\n", - "N = Eb*60*A/(phi*Pole*Z) \t\t\t#Eb = phi*Pole*N*Z/(60*A)\n", - "\n", - "# Calculations\n", - "P_m = Eb*Ia \t\t\t#Electrical equivalent of mechanical power\n", - "omega = 2*math.pi*N/60\n", - "Tg = P_m/omega\n", - "\n", - "P_out = P_m-mechanical_losses\n", - "T_sh = P_out/omega \t\t\t#Useful torque\n", - "P_in = V*Il\n", - "percentage_efficiency = 100*P_out/P_in\n", - "\n", - "# Results\n", - "print 'Speed developed is %.3f r.p.m \\\n", - "\\nTorque developed is %.2f N-m \\\n", - "\\nUseful torque is %.2f N-m \\\n", - "\\nEfficiency is %.2f percent'%(N,Tg,T_sh,percentage_efficiency)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed developed is 409.167 r.p.m \n", - "Torque developed is 206.26 N-m \n", - "Useful torque is 185.26 N-m \n", - "Efficiency is 79.38 percent\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2 page no : 10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "#no load\n", - "I_noload = 2.5 \t\t\t#No load current\n", - "V = 440.\n", - "R_a = 1.2\n", - "R_sh = 550.\t\t\t#resistance of armature and shunt field windings\n", - "no_load_input = V*I_noload\n", - "\n", - "# Calculations\n", - "I_sh = V/R_sh\n", - "I_a_noload = I_noload-I_sh\n", - "no_load_armature_copper = (I_a_noload**2)*R_a\n", - "constant_losses = no_load_input-no_load_armature_copper\n", - "\n", - "#full load\n", - "I_fullload = 32\n", - "I_a_fullload = I_fullload-I_sh\n", - "full_load_armature_coppe = (I_a_fullload**2)*R_a\n", - "total_losses = full_load_armature_coppe+constant_losses\n", - "full_load_motor_input = V*I_fullload\n", - "full_load_motor_output = full_load_motor_input-total_losses\n", - "efficiency_at_full_load = full_load_motor_output*100/full_load_motor_input\n", - "\n", - "# Results\n", - "print 'Full load motor output is %.2f W \\\n", - "\\nEfficiency of motor at full-load is %.2f percent'%(full_load_motor_output,efficiency_at_full_load)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full load motor output is 11815.34 W \n", - "Efficiency of motor at full-load is 83.92 percent\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3 page no : 11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "#no load\n", - "I = 14. \t\t\t#input current\n", - "V = 230.\n", - "power_output_FL = 45.*10**3\n", - "power_input = V*I\n", - "I_sh = 2.55 \t\t\t#field current\n", - "R_a = 0.032 \t\t\t#armature resistance\n", - "I_a = I-I_sh\n", - "cu_loss_NL = I_a**2*R_a \t\t\t#no load copper loss\n", - "brush_loss = 2*I_a\n", - "constant_loss = power_input - cu_loss_NL - brush_loss\n", - "\n", - "# Calculations and Results\n", - "#full load\n", - "#I = I_a+ 2.55\n", - "#Motor input = Motor output + constant loss + brush loss + cu loss\n", - "# solving for I_a I_a**2 - 7125 I_a + 1487700.3 = 0\n", - "p = [1, -7125, 1487700.3]\n", - "ans = roots(p)\n", - "I_a = ans[1] \t\t\t#ignoring second root as its too large\n", - "I = I_a+I_sh\n", - "print 'Full load current is %.2f A'%(I)\n", - "power_input = V*I\n", - "eta = 100*(power_output_FL/power_input)\n", - "print 'Efficiency at full load is %.2f percent'%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full load current is 217.86 A\n", - "Efficiency at full load is 89.81 percent\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4 page no : 14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "\n", - "# Variables\n", - "W1 = 9.1 \t\t\t#Tension on tight side\n", - "W2 = 0.8 \t\t\t#Tension on slack side\n", - "I = 10. \t\t\t#Total_current\n", - "V = 110. \t\t\t#Supply voltage\n", - "R = 7.5/100 \t\t\t#Radius of p-ulley in metres\n", - "N = 1320. \t\t\t#speed in r.p.m\n", - "\n", - "# Calculations\n", - "T_sh = (W1-W2)*9.81*R \t\t\t#9.81 is the accelration due to gravity\n", - "omega = (2*math.pi*N/60)\n", - "P_out = T_sh*omega\n", - "P_in = V*I\n", - "\n", - "efficiency = 100*P_out/P_in\n", - "\n", - "# Results\n", - "print 'Full load Efficiency is %.2f percent'%(efficiency)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full load Efficiency is 76.74 percent\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5 page no : 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 250.\n", - "I_av = 10.\n", - "V_av = (240.+220)/2 \t\t\t#average voltage across load\n", - "W_dash = V_av*I_av \t\t\t#Power absorbed\n", - "t1 = 25.\n", - "t2 = 6.\n", - "R_sh = 200.\n", - "R_a = 0.3\t\t\t#resistance of field winding and armature \n", - "\n", - "# Calculations\n", - "W = W_dash*t2/(t1-t2) \t\t\t#Stray Losses\n", - "I_l = 25 \t\t\t#Input current\n", - "I_sh = V/R_sh \t\t\t#current through field winding\n", - "\n", - "I_a = I_l-I_sh \t\t\t#Armature current\n", - "arm_cu_loss = R_a*I_a**2 \t\t\t#Armature copper losses\n", - "sh_cu_loss = R_sh*I_sh**2 \t\t\t# Shunt copper loss\n", - "\n", - "Total_losses = arm_cu_loss + sh_cu_loss + W\n", - "Motor_input = V*I_l\n", - "Output = Motor_input- Total_losses\n", - "efficiency = Output*100/Motor_input\n", - "\n", - "# Results\n", - "print 'Efficiency as motor at 25 A and 250 V is %.2f percent'%(efficiency)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency as motor at 25 A and 250 V is 80.67 percent\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6 page no : 22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "# Variables\n", - "I_a = 37.\n", - "I_sh = 0.85\t\t\t#armature and field current for motor\n", - "V = 230.\n", - "R_a = 0.33 \t\t\t#armature resistance\n", - "\n", - "I_a_g = 30.\n", - "I_sh_g = 0.8\t\t\t#armature and field current for generator\n", - "\n", - "\n", - "# Calculations and Results\n", - "#for motor\n", - "arm_cu_loss = I_a**2* R_a \t\t\t#armature copper losses\n", - "field_cu_loss = V*I_sh \t\t\t#field copper loss\n", - "total_cu_loss = field_cu_loss + arm_cu_loss \t\t\t#total copper loss \n", - "\n", - "#for generator\n", - "arm_cu_loss_g = I_a_g**2* R_a \t\t\t#armature copper losses\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss\n", - "total_cu_loss_g = field_cu_loss_g + arm_cu_loss_g \t\t\t#total copper loss\n", - "\n", - "#for motor-generator set\n", - "total_cu_loss_set = total_cu_loss_g + total_cu_loss\n", - "P_supply = V*(I_a - I_a_g + I_sh+ I_sh_g ) \t\t\t#power taken from supply\n", - "stray_loss = P_supply - (total_cu_loss_g + total_cu_loss) \n", - "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", - "\n", - "#efficiency of motor\n", - "motor_input = V*(I_a+I_sh)\n", - "motor_output = motor_input - (stray_loss_each + total_cu_loss)\n", - "eta_m = 100* motor_output/motor_input \t\t\t#efficiency of motor\n", - "print 'Efficiency of motor is %.2f percent '%(eta_m)\n", - "#efficiency of generator\n", - "generator_input = motor_output \t\t\t#output of motor is input of generator\n", - "generator_output = generator_input - (stray_loss_each + total_cu_loss_g)\n", - "eta_g = 100* generator_output/generator_input \t\t\t#efficiency of generator\n", - "print 'Efficiency of generator is %.2f percent '%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 87.62 percent \n", - "Efficiency of generator is 88.05 percent \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7 page no : 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_1 = 400. \t\t\t#motor input current\n", - "V = 200. \t\t\t#voltage across armature\n", - "I_2 = 32. \t\t\t#load current\n", - "V_2 = 160. \t\t\t#voltage across generator\n", - "V_f = 15. \t\t\t#voltage drop across field windings\n", - "total_input = (V+V_f)*I_1 \n", - "Output = V_2*I_2\n", - "total_losses = total_input-Output \t\t\t#total losses in 2 machines\n", - "\n", - "# Calculations and Results\n", - "R_se = V_f/I_1 \t\t\t#series field resistance\n", - "R_a = 0.4 \t\t\t# armature field resistance\n", - "\n", - "total_cu_loss = (R_a + 2*R_se) * I_1**2 + I_2**2*R_a \t\t\t#total copper loss\n", - "stray_losses = total_losses - total_cu_loss\n", - "stray_losses_each = stray_losses /2 \t\t\t#stray losses for each machine\n", - "\n", - "#for motor\n", - "motor_input = V*I_1\n", - "arm_cu_loss = (R_a + R_se)*I_1*I_1 \t\t\t#armature copper loss\n", - "total_losses_motor = arm_cu_loss + stray_losses_each \n", - "motor_output = motor_input- total_losses_motor\n", - "eta_m = 100*motor_output/motor_input \t\t\t#efficiency of motor\n", - "print 'Efficiency of motor is %.2f percent '%(eta_m)\n", - "#for generator\n", - "arm_cu_loss_gen = R_a*I_2**2 \t\t\t#armature copper loss\n", - "series_field_cu_loss = V_f*I_1 \t\t\t#series field copper loss\n", - "total_losses_gen = arm_cu_loss_gen + series_field_cu_loss + stray_losses_each \n", - "generator_input = total_losses_gen+ Output\n", - "eta_gen = 100*Output/generator_input \t\t\t#efficiency of generator\n", - "print 'Efficiency of generator is %.2f percent'%(eta_gen)\n", - "\n", - "\n", - "#Note : 'Answer dont match because Output-of-generator is taken as 5220 for calculation while its should have been 5120'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 9.71 percent \n", - "Efficiency of generator is 37.20 percent\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8 page no : 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "V = 500.\n", - "Io = 5. \t\t\t#no load current\n", - "R_a = 0.5\n", - "R_sh = 250.\t\t\t#resistance of armature and field circuits\n", - "I = 100. \t\t\t#current at unknown efficiency\n", - "\n", - "# Calculations\n", - "P_in_NL = V*Io \t\t\t#no load input\n", - "I_sh = V/R_sh\n", - "\n", - "Iao = Io-I_sh\n", - "arm_cu_loss_no_load = R_a*Iao**2 \t\t\t#No load armature copper loss\n", - "constant_losses = P_in_NL- arm_cu_loss_no_load\n", - "\n", - "I_a = I-I_sh\n", - "arm_cu_loss = R_a*I_a**2 \t\t\t#New armature copper loss\n", - "\n", - "Total_loss = arm_cu_loss + constant_losses\n", - "P_in = V*I\n", - "efficiency = (P_in-Total_loss)*100/P_in \t\t\t#required efficiency\n", - "\n", - "\n", - "# Results\n", - "print 'Efficiency is %.3f percent when motor takes %.0f A current'%(efficiency,I)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency is 85.405 percent when motor takes 100 A current\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9 page no : 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 500. \n", - "I_NL = 5. \t\t\t#no load current \n", - "P_in_NL = V* I_NL \t\t\t#no load input\n", - "R_a = 0.22\n", - "R_sh = 250. \t\t\t#resistance of armature and shunt field winding\n", - "I_sh = V/R_sh\n", - "I_a_NL = I_NL-I_sh \t\t\t#armature current no load\n", - "arm_cu_loss_NL = R_a*I_a_NL**2 \t\t\t#No-load armature copper loss\n", - "constant_loss = P_in_NL - arm_cu_loss_NL\n", - "\n", - "# Calculations and Results\n", - "#at 100 A current\n", - "I = 100.\n", - "I_a = I - I_sh\n", - "arm_cu_loss = R_a*I_a**2 \t\t\t#armature copper loss\n", - "total_loss = arm_cu_loss + constant_loss \n", - "motor_input = V*I\n", - "motor_output = motor_input- total_loss\n", - "eta_m = 100*motor_output/motor_input \t\t\t#motor efficiency\n", - "print 'Parta)Efficiency of motor when it takes 100 A current and loaded is %.2f percent'%(eta_m)\n", - "\n", - "#part(b)\n", - "E_b_NL = V - I_a_NL*R_a \t\t\t#back emf at no load\n", - "\n", - "E_b = V- I_a*R_a \t\t\t#back EMF at 100 A current\n", - "#Since E_b is proportional to N and using componendo dividendo\n", - "delta_speed = 100*((E_b_NL-E_b)/E_b)\n", - "print 'Partb)Percentage speed in speed is %.3f percent'%(delta_speed)\n", - "\n", - "print 'Note that the following were assumptions made'\n", - "print 'i) Due to heating %( resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected'\n", - "print 'ii) Though the motor speed is changing from no load to given load , the mechanical losses are assumed to be cosnstant'\n", - "print 'iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Parta)Efficiency of motor when it takes 100 A current and loaded is 90.78 percent\n", - "Partb)Percentage speed in speed is 4.368 percent\n", - "Note that the following were assumptions made\n", - "i) Due to heating %( resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected\n", - "ii) Though the motor speed is changing from no load to given load , the mechanical losses are assumed to be cosnstant\n", - "iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10 page no : 30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "motor_output_FL = 15000. \t\t\t#full load motor output\n", - "V = 250.\n", - "R_sh = 100.\n", - "\n", - "# Calculations\n", - "#at 80 % of full load\n", - "motor_output_FL_dash = (80./100)*motor_output_FL \t\t\t#80 percent of full load output\n", - "eta = 90./100 \t\t\t#efficiency\n", - "motor_input = motor_output_FL_dash/eta\n", - "total_losses = motor_input - motor_output_FL_dash \t\t\t#at 80 % of full load\n", - "#at maximum efficiency variable losses = constant losses\n", - "constant_losses = total_losses/2\n", - "variable_losses = constant_losses\n", - "I = motor_input/V \t\t\t#line current at 80% load\n", - "I_sh = V/ R_sh\n", - "I_a = I- I_sh\n", - "#math.since armature copper loss = R_a*I_a**2 \n", - "R_a = variable_losses/I_a**2\n", - "E_b1 = V-I_a*R_a \t\t\t#motor back EMF at 80% of full load\n", - "N_1 = 750. \t\t\t# corresponding speed is given as 750 rpm\n", - "\n", - "#When motor current is 80 A\n", - "I = 80.\n", - "I_a = I-I_sh\n", - "arm_cu_losses = R_a*I_a**2 \t\t\t#armature copper loss\n", - "total_losses = arm_cu_losses + constant_losses\n", - "motor_input = V*I\n", - "motor_output = motor_input- total_losses\n", - "eta = 100*motor_output/motor_input \t\t\t#efficiency of motor\n", - "E_b2 = V-I_a*R_a \t\t\t#motor back EMF at 80% of full load\n", - "N_2 = N_1*(E_b2/E_b1) \t\t\t#because E_b is proportional to N\n", - "\n", - "# Results\n", - "print 'Efficiency of motor is %.2f percent when motor draws 80A current'%(eta)\n", - "print 'and Speed is %.2f r.p.m'%(N_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 88.92 percent when motor draws 80A current\n", - "and Speed is 728.22 r.p.m\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11 page no : 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 250.\n", - "R_sh = 166.67\n", - "R_a = 0.15 \t \t\t#resistance of shunt field winding and armature\n", - "N_0 = 1280. \t\t\t#in rpm\n", - "I_L1 = 67. \t\t\t#current drawn on full load\n", - "I_sh = V/ R_sh\n", - "I_a1 = I_L1 - I_sh\n", - "E_b1 = V-I_a1*R_a\n", - "\n", - "#on no load\n", - "I_L0 = 6.5\n", - "I_a0 = I_L0 - I_sh\n", - "E_b0 = V-I_a0*R_a\n", - "\n", - "# Calculations and Results\n", - "#part (i)\n", - "#using speed equation N is proportional to E_b\n", - "N_1 = N_0*(E_b1/E_b0)\n", - "print 'i)Full load speed is %.3f r.p.m'%(N_1)\n", - "\n", - "#part (ii)\n", - "speed_regulation = 100*((N_0-N_1)/N_1)\n", - "print 'ii)Speed regulation is %.2f percent '%(speed_regulation)\n", - "\n", - "#part (iii)\n", - "stray_losses = E_b0*I_a0 \t\t\t#mechanical power developed on no load\n", - "power_developed_FL = E_b1*I_a1 \n", - "shaft_output_FL = power_developed_FL - stray_losses \n", - "hp_rating = shaft_output_FL/746 \t\t\t#in horse power\n", - "print 'iii)H.P rating of the machine Is %.2f H.P'%(hp_rating)\n", - "\n", - "#part (iv)\n", - "power_input = V*I_L1\n", - "eta = 100*(shaft_output_FL/power_input) \t\t\t#efficiency at full load\n", - "print 'iv)Efficiency at full load is %.2f percent'%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Full load speed is 1233.396 r.p.m\n", - "ii)Speed regulation is 3.78 percent \n", - "iii)H.P rating of the machine Is 19.42 H.P\n", - "iv)Efficiency at full load is 86.48 percent\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.12 page no : 33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 200.\n", - "R_sh = 240.\n", - "R_a = 0.1 \t\t\t#resistance of shunt field winding and armature\n", - "rotational_loss = 236.\n", - "I_L_FL = 9.8 \t\t\t#full load line current\n", - "N = 1450.\n", - "I_sh = V/R_sh\n", - "I_a_FL = I_L_FL - I_sh\n", - "E_b = V- I_a_FL * R_a\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "gross_mech_P_dev = E_b*I_a_FL \t\t\t#gross mechanical power developed\n", - "mech_P_dev = gross_mech_P_dev - rotational_loss \t\t\t#mechanical power developed\n", - "print 'i)Gross mechanical power developed is %.2f W'%(gross_mech_P_dev )\n", - "print ' Mechanical power developed is %.2f W'%(mech_P_dev )\n", - "\n", - "#part(ii)\n", - "P_out = mech_P_dev \n", - "print 'ii)The power output is %.2f W'%(P_out)\n", - "\n", - "#part(iii)\n", - "T_sh = P_out*60/(2*math.pi*N)\n", - "T_L = T_sh\n", - "print 'iii)Load torque is %.2f N-m'%(T_L)\n", - "\n", - "#part(iv)\n", - "P_in = V*I_L_FL\n", - "eta = 100*P_out/P_in\n", - "print 'iv)Efficiency at full load is %.2f percent'%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Gross mechanical power developed is 1785.29 W\n", - " Mechanical power developed is 1549.29 W\n", - "ii)The power output is 1549.29 W\n", - "iii)Load torque is 10.20 N-m\n", - "iv)Efficiency at full load is 79.05 percent\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.13 page no : 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 240.\n", - "P_out = 25*735.5 \t\t\t#output power in watts\n", - "R_a = 0.14\n", - "R_sh = 80. \t \t\t#resistance of armature and shunt field winding\n", - "brush_drop = 1. \t\t\t#voltage drop across brush\n", - "I_L_FL = 95. \t\t \t#input current at full load \n", - "I_sh = V/R_sh\n", - "I_a_FL = I_L_FL - I_sh \t\t\t#armature current at full load\n", - "\n", - "# Calculations and Results\n", - "arm_cu_loss_FL = R_a*I_a_FL**2 \t\t\t#full load armature copper loss\n", - "field_cu_loss = R_sh*I_sh**2 \t\t\t#field copper loss\n", - "print 'i)Armature and field copper losses are %.2f W and %.0f W respectively'%(arm_cu_loss_FL,field_cu_loss)\n", - "brush_cu_loss = 2*brush_drop*I_a_FL \t\t\t#brush contact copper loss\n", - "print 'ii)Brush contact copper loss is %.0f W'%(brush_cu_loss)\n", - "E_b = V-I_a_FL*R_a - 2*brush_drop \t\t\t#back emf\n", - "gross_mech_P_dev = E_b*I_a_FL \t\t\t#gross mechanical power developed\n", - "IFW_losses = gross_mech_P_dev - P_out \t\t\t#iron friction and windage losses\n", - "print 'iii)Core plus mechanical losses = %.1f W'%(IFW_losses+field_cu_loss+arm_cu_loss_FL)\n", - "eta = 100*(P_out/(P_out + IFW_losses+ brush_cu_loss+field_cu_loss+arm_cu_loss_FL ))\n", - "print 'iv)Efficiency is %.2f percent'%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Armature and field copper losses are 1184.96 W and 720 W respectively\n", - "ii)Brush contact copper loss is 184 W\n", - "iii)Core plus mechanical losses = 4228.5 W\n", - "iv)Efficiency is 80.65 percent\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.14 page no : 36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I = 5. \t\t\t#no load current\n", - "V = 500.\n", - "R_sh = 250.\n", - "R_a = 0.5 \t\t\t#resistance of shunt field winding and armature\n", - "motor_input_NL = V*I\n", - "I_sh = V/R_sh\n", - "I_a = I-I_sh\n", - "arm_cu_loss_NL = R_a*I_a**2 \t\t\t#no load armature copper loss\n", - "constant_loss = motor_input_NL - arm_cu_loss_NL\n", - "I_FL = 50.\n", - "I_a_FL = I_FL - I_sh \t\t\t#currents at full load\n", - "arm_cu_loss_FL = R_a*I_a_FL**2 \t\t\t#full load armature copper loss\n", - "\n", - "# Calculations and Results\n", - "total_loss = constant_loss + arm_cu_loss_FL \n", - "motor_input = V*I_FL\n", - "motor_output_FL = motor_input - total_loss\n", - "print 'Required output power is %.3f kW'%(motor_output_FL/1000)\n", - "eta = 100*(motor_output_FL/motor_input) \t\t\t#full load efficiency\n", - "print 'Full load efficiency of motor with 50A current is %.2f percent '%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required output power is 21.352 kW\n", - "Full load efficiency of motor with 50A current is 85.41 percent \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15 page no : 36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 250.\n", - "R_sh = 275.\n", - "R_a = 0.8 \t\t\t#resistance of shunt field and amature\n", - "I_L0 = 3.91 \t\t\t#load current\n", - "I_sh = V/R_sh\n", - "I_a0 = I_L0 - I_sh\n", - "constant_losses = V*I_L0 -R_a*(I_a0)**2\n", - "\n", - "# Calculations and Results\n", - "#as a generator\n", - "P_out = 10*10**3\n", - "I_L = P_out/V\n", - "I_a = I_L + I_sh \n", - "field_cu_loss = R_sh*(I_sh)**2 \t\t\t#field copper loss\n", - "arm_cu_loss = R_a*(I_a)**2 \t\t\t#armature copper loss \n", - "eta_gen = 100 *(P_out/(P_out+constant_losses + field_cu_loss+ arm_cu_loss)) \t\t\t#efficiency as generator\n", - "print 'Efficiency as a generator = %.2f percent'%(eta_gen)\n", - "\n", - "#as a motor\n", - "P_in = 10*10**3 \t\t\t#at V = 250 \n", - "I_L = P_in/V\n", - "I_a = I_L - I_sh\n", - "field_cu_loss = R_sh*(I_sh)**2 \t\t\t#field copper loss\n", - "arm_cu_loss = R_a*(I_a)**2 \t\t\t#armature copper loss \n", - "eta_m = 100 *((P_in-(constant_losses + field_cu_loss+ arm_cu_loss))/(P_in)) \t\t\t#efficiency as motor\n", - "print 'Efficiency as a motor = %.2f percent'%(eta_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency as a generator = 79.77 percent\n", - "Efficiency as a motor = 75.80 percent\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.16 page no : 38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I = 4. \t\t\t#no load current in amperes\n", - "V = 500.\n", - "motor_input_no_load = I*V \t\t\t#no load motor input\n", - "R_a = 0.5\n", - "R_sh = 250.\t\t\t#resistance of armature and shunt field resistnace\n", - "I_sh = V/R_sh\n", - "\n", - "I_a = I-I_sh\n", - "arm_cu_loss_noload = R_a*I_a**2 \t\t\t#No-load armature copper losses\n", - "constant_loss = motor_input_no_load - arm_cu_loss_noload\n", - "I_FL = 40.\n", - "I_aFL = I_FL- I_a \t\t\t#full load currents\n", - "arm_cu_loss_fulload = R_a*I_aFL**2 \t\t\t#Full-load armature copper losses\n", - "Total_loss = arm_cu_loss_fulload + constant_loss\n", - "\n", - "# Calculations and Results\n", - "motor_input = V*I_FL\n", - "motor_output_fullload = motor_input - Total_loss\n", - "print 'Output power at full-load is %.0f W'%(motor_output_fullload) \n", - "efficiency = motor_output_fullload*100/motor_input \t\t\t#motor efficiency\n", - "print 'Efficiency at full-load is %.1f percent'%(efficiency)\n", - "\n", - "E_bNL = V-I_a*R_a\n", - "E_bFL = V-I_FL*R_a\n", - "\n", - "#E_b = N*phi\n", - "#E_bNL/E_bFL = N_NL/N_FL\n", - "#applying rules of componendo and dividendo\n", - "#change_in _speed = (N_NL - N_FL)/N_FL = (E_bNL - E_bFL)/E_bFl\n", - "\n", - "change_in_speed = 100*(E_bNL - E_bFL)/E_bFL\n", - "print 'percentage change in speed from no load to full load is %.3f percent'%(change_in_speed)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output power at full-load is 17280 W\n", - "Efficiency at full-load is 86.4 percent\n", - "percentage change in speed from no load to full load is 3.958 percent\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.17 page no : 39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 500.\n", - "R_a = 0.22\n", - "R_sh = 250.\t\t\t#armature resistance and shunt field resistance\n", - "I = 5. \t\t\t#no load current\n", - "motor_input_NL = V*I \t\t\t#no load motor input\n", - "I_sh = V/R_sh\n", - "I_a_NL = I- I_sh \t\t\t#no load armature current\n", - "arm_cu_loss_NL = R_a*I_a_NL**2 \t\t\t#no load armature copper loss\n", - "constant_loss = motor_input_NL - arm_cu_loss_NL \n", - "\n", - "# Calculations and Results\n", - "#When motor draws 100 A current \n", - "I = 100\n", - "I_a = I - I_sh\n", - "arm_cu_loss = R_a* I_a**2 \t\t\t#armature copper loss\n", - "total_losses = arm_cu_loss + constant_loss\n", - "motor_input = V*I\n", - "motor_output = motor_input -total_losses \n", - "eta_m = 100*(motor_output/motor_input) \t\t\t#motor efficiency\n", - "print 'i)Efficiency of motor at 100 A current is %.2f percent '%(eta_m)\n", - "\n", - "#part(b)\n", - "E_b_NL = V- I_a_NL*R_a \t\t\t#back emf at no load\n", - "E_b = V- I_a*R_a \t\t\t#back emf at 100 A \n", - "#E_b is proportional to N.. and using componendo dividendo\n", - "speed_change = 100*((E_b_NL - E_b)/E_b)\n", - "print 'ii)Percentage change in speed = %.3f percent'%(speed_change)\n", - "\n", - "\n", - "print 'Note that the following were assumptions made'\n", - "print 'i) Due to heating resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected'\n", - "print 'ii) Though the motor speed is changing from no load to given load %( the mechanical losses are assumed to be cosnstant'\n", - "print 'iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Efficiency of motor at 100 A current is 90.78 percent \n", - "ii)Percentage change in speed = 4.368 percent\n", - "Note that the following were assumptions made\n", - "i) Due to heating resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected\n", - "ii) Though the motor speed is changing from no load to given load %( the mechanical losses are assumed to be cosnstant\n", - "iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.18 page no : 41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 200.\n", - "I_L = 40.\n", - "\n", - "R_sh = 200.\n", - "R_a = 0.2 \t\t\t#shunt field winding and armature resistance\n", - "\n", - "# Calculations and Results\n", - "#case(a) : As a generator\n", - "P_out_g = V*I_L \t\t\t#output poewr as generator\n", - "I_sh = V/R_sh\n", - "I_a = I_L + I_sh\n", - "E = V + I_a*R_a\n", - "P_a_g = E*I_a \t\t\t#power developed in armature\n", - "P_cu_g = R_a*I_a**2 + R_sh*I_sh**2 \t\t\t#copper loss as genrator\n", - "print 'i)Output as generator is %.f kW'%(P_out_g/1000)\n", - "\n", - "#case(b) : As a motor\n", - "P_in_m = V*I_L \t\t\t#input power as motor\n", - "I_sh = V/R_sh\n", - "I_a = I_L - I_sh\n", - "E_b = V - I_a*R_a\n", - "P_a_m = E_b*I_a \t\t\t#power developed in armature\n", - "P_cu_m = R_a*I_a**2 + R_sh*I_sh**2\t\t\t#copper loss as motor\n", - "print 'ii)Input as motor is %.0f kW'%( P_in_m/1000)\n", - "print 'iii)Power developed in Armature:%.4f kW for generator%.4f kW for motor'%(P_a_g/1000,P_a_m/1000)\n", - "print 'iv)Copper losses:%.1f W for generator%.1f W for motor'%(P_cu_g,P_cu_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Output as generator is 8 kW\n", - "ii)Input as motor is 8 kW\n", - "iii)Power developed in Armature:8.5362 kW for generator7.4958 kW for motor\n", - "iv)Copper losses:536.2 W for generator504.2 W for motor\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.19 page no : 42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 219.\n", - "I = 10.\n", - "dN = 1030. - 970 \t\t\t#given\n", - "t_1 = 36. \t\t\t#time with no excitation\n", - "t_2 = 9.\t\t\t# time with full excitation and armature supporting an extra load of 10 A at 219 V\n", - "t_3 = 15. \t\t\t#time with full exciation\n", - "W_dash = V*I \t\t\t#additioanl loss when armature is suddenly connected to loads\n", - "W_s = W_dash *(t_2/(t_3-t_2)) \t\t\t#total stray losses\n", - "N = 1000. \t\t\t#speed in rpm\n", - "\n", - "# Calculations\n", - "#using W_s = (2*pi/60)**2 * I *N *dN / t_3 where W_s is stray losses\n", - "I = W_s*(t_3/dN)*(30/math.pi)**2/N \t\t\t#moment of inertia\n", - "W_m = W_s*(t_3/t_1) \t\t\t#mechanical losses\n", - "iron_losses = W_s - W_m\n", - "\n", - "# Results\n", - "print 'i)The moment of inertia of armature is %.2f kg-m**2'%(I)\n", - "print 'ii)Iron loss = %.2f W'%(iron_losses)\n", - "print 'iii)Mechanical losses at 1000 rpm mean speed is %.2f W'%(W_m)\n", - "\n", - "print 'Noteworthy points:1)When armature is slowing down and there is no excitation,then kinetic energy is used to overcome mechanical losses only.Iron losses are absent as excitation is absent2)When excitation is given%( kinetic energy is used to overcome both mechanical as well as iron losses.Total called stray losses.3)If moment of inertia is in kg-m**2,then loss of energy is in watts'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)The moment of inertia of armature is 74.89 kg-m**2\n", - "ii)Iron loss = 1916.25 W\n", - "iii)Mechanical losses at 1000 rpm mean speed is 1368.75 W\n", - "Noteworthy points:1)When armature is slowing down and there is no excitation,then kinetic energy is used to overcome mechanical losses only.Iron losses are absent as excitation is absent2)When excitation is given%( kinetic energy is used to overcome both mechanical as well as iron losses.Total called stray losses.3)If moment of inertia is in kg-m**2,then loss of energy is in watts\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.20 page no : 43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 225.\n", - "I = 10.\n", - "dN = 1030. - 970 \t\t\t#given\n", - "t_1 = 40. \t\t\t#time with no excitation\n", - "t_2 = 9.\t\t\t# time with full excitation and armature supporting an extra load of 10 A at 219 V\n", - "t_3 = 20. \t\t\t#time with full exciation\n", - "\n", - "# Calculations\n", - "W_dash = V*I \t\t\t#additional loss\n", - "W_s = W_dash *(t_2/(t_3-t_2)) \t\t\t#total stray losses\n", - "N = 1000\t\t\t#Speed in rpm\n", - "\t\t\t#using W_s = (2*pi/60)**2 * I *N *dN / t_3 where W_s is stray losses\n", - "I = W_s*(t_3/dN)*(30/math.pi)**2/N \t\t\t#moment of inertia\n", - "W_m = W_s*(t_3/t_1) \t\t\t#mechanical losses\n", - "iron_losses = W_s - W_m\n", - "\n", - "# Results\n", - "print 'i)The moment of inertia of armature is %.2f kg-m**2'%(I)\n", - "print 'ii)Iron loss = %.2f W'%(iron_losses)\n", - "print 'iii)Mechanical losses at 1000 rpm mean speed is %.2f W'%(W_m)\n", - "\n", - "print 'Noteworthy points:1)When there is no excitation and armature is slowed down , its K.E. is used to overcome mechanical mechanical losses only math.since there will be no iron loss as there is no flux.2)When there is excitation provided then K.E. is used to supply mechanical as well as iron losses together called stray losses '\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)The moment of inertia of armature is 55.96 kg-m**2\n", - "ii)Iron loss = 920.45 W\n", - "iii)Mechanical losses at 1000 rpm mean speed is 920.45 W\n", - "Noteworthy points:1)When there is no excitation and armature is slowed down , its K.E. is used to overcome mechanical mechanical losses only math.since there will be no iron loss as there is no flux.2)When there is excitation provided then K.E. is used to supply mechanical as well as iron losses together called stray losses \n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.21 page no : 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_avg = (220.+190)/2 \t\t\t#average voltage across load\n", - "I_avg = 12.\n", - "R_a = 0.5\n", - "R_sh = 250.\n", - "W_dash = V_avg*I_avg \t\t\t#power absorbed \n", - "t_1 = 30.\n", - "t_2 = 5.\n", - "W = W_dash*(t_2/(t_1-t_2))\n", - "V = 250.\n", - "I = 22. \t\t\t#input current\n", - "\n", - "# Calculations\n", - "I_sh = V/R_sh\n", - "I_a = I - I_sh\n", - "arm_cu_loss = R_a*I_a**2 \t\t\t#armature copper loss\n", - "shunt_field_cu_loss = V*I_sh \t\t\t#shunt field copper loss\n", - "total_losses = shunt_field_cu_loss + arm_cu_loss + W\n", - "\n", - "machine_input = V*I\n", - "machine_output = machine_input - total_losses \n", - "eta_m = 100*(machine_output /machine_input ) \t\t\t#efficiency when running as motor\n", - "\n", - "# Results\n", - "print 'Efficiency of machine when opeating as motor taking current of 22A on 250V supply is %.1f percent'%(eta_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of machine when opeating as motor taking current of 22A on 250V supply is 82.5 percent\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.22 page no : 45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_avg = 10.\n", - "V_avg = (220.+190)/2 \t\t\t#average voltage across load\n", - "W_dash = V_avg*I_avg \t\t\t#power absorbed\n", - "t_1 = 30.\n", - "t_2 = 20.\n", - "\n", - "# Calculations\n", - "W = W_dash * (t_2/(t_1-t_2)) \t\t\t#stray losses\n", - "\n", - "# Results\n", - "print 'Stray losses of motor is %.1f kW'%(W/1000)\n", - "print 'Answers mismatch because V_average is 205 volts but it is taken as 220 volts in Power absorbed calculation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Stray losses of motor is 4.1 kW\n", - "Answers mismatch because V_average is 205 volts but it is taken as 220 volts in Power absorbed calculation\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.23 page no : 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_a_g = 330.\n", - "I_a_m = 380.\n", - "R_a = 0.02 \t\t\t#armature resistance\n", - "V = 250.\n", - "I = 50.\n", - "\n", - "\n", - "arm_cu_loss_g = R_a*I_a_g**2\t\t\t#armature copper loss for generator\n", - "arm_cu_loss_m = R_a*I_a_m**2\t\t\t#armature copper loss for motor\n", - "power_drawn = V*I\n", - "stray_losses = power_drawn - (arm_cu_loss_m + arm_cu_loss_g)\n", - "stray_losses_each = stray_losses/2 \t\t\t#stray losses for each machine\n", - "\n", - "\n", - "# Calculations and Results\n", - "#for motor\n", - "I_sh_m = 4.2 \t\t\t#Shunt current in case of motor\n", - "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss in case of motor\n", - "total_loss = field_cu_loss_m + stray_losses_each + arm_cu_loss_m\n", - "motor_input = V*(I_a_m+I_sh_m) \n", - "motor_output = motor_input - total_loss\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", - "\n", - "#for generator\n", - "I_sh_g = 5 \t\t\t#Shunt current in case of generator\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss in case of generator\n", - "total_loss = field_cu_loss_g + stray_losses_each + arm_cu_loss_g\n", - "generator_output = V*I_a_g\n", - "generator_input = generator_output + total_loss\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 92.0302 percent\n", - "Efficiency of generator is 92.0297 percent\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24 page no : 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "R_a = 0.02 \t\t\t#armature resistance\n", - "V = 250. \t\t\t#line voltage\n", - "I = 50. \t\t\t#current taken from supply \n", - "\n", - "# Calculations and Results\n", - "#for generator\n", - "I_a_g = 330.\n", - "I_sh_g = 5. \t\t\t#armature current and current through shunt field \n", - "arm_cu_loss_g = R_a*I_a_g**2\t\t\t#armature copper loss for generator\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", - "\n", - "#for motor\n", - "I_a_m = 380\n", - "I_sh_m = 4.2 \t\t\t#armature current and current through shunt field\n", - "arm_cu_loss_m = R_a*I_a_m**2\t\t\t#armature copper loss for motor\n", - "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", - "power_drawn = V*I\n", - "IFW_losses = power_drawn - (arm_cu_loss_g + arm_cu_loss_m) \t\t\t#Iron friction and windage losses\n", - "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", - "\n", - "#for generator\n", - "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each\n", - "generator_output = V*I_a_g\n", - "generator_input = generator_output + total_loss_g \n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n", - "\n", - "#for motor\n", - "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m\n", - "motor_input = V*(I_a_m+I_sh_m)\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of generator is 92.0297 percent\n", - "Efficiency of motor is 92.0302 percent\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.25 page no : 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 220.\n", - "I = 40.\n", - "I_a_g = 160. \n", - "I_a_m = 200. \t\t\t#armature currents for generator and motor\n", - "I_sh_g = 7. \n", - "I_sh_m = 6. \t\t\t#current through shunt field for generator and motor\n", - "R_a = 0.015 \t\t\t#armature resistance\n", - "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#armature copper loss for motor\n", - "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#armature copper loss for motor\n", - "power_drawn = V*I\n", - "IFW_losses = power_drawn - (arm_cu_loss_g + arm_cu_loss_m) \t\t\t#Iron friction and windage losses\n", - "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", - "\n", - "# Calculations and Results\n", - "#for motor\n", - "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", - "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m \t\t\t#total losses in motor\n", - "motor_input = V * I_a_m\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input) \t\t\t#motor efficiency\n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", - "\n", - "#for generator\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", - "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each \t\t\t#total losses in generator\n", - "generator_output = V*I_a_g\n", - "generator_input = generator_output + total_loss_g\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency\n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 86.7545 percent\n", - "Efficiency of generator is 85.7867 percent\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.26 page no : 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "R_a = 0.2 \t\t\t#armature resistance \n", - "V = 240.\n", - "I = 16.\n", - "I_a_g = 60. \n", - "I_a_m = 71. \t\t\t#armature currents for generator and motor\n", - "I_sh_g = 3. \n", - "I_sh_m = 2. \t\t\t#field current for generator and motor \n", - "\n", - "\n", - "#for generator\n", - "arm_cu_loss_g = R_a*I_a_g**2\t\t\t#armature copper loss for generator\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", - "\n", - "#for motor\n", - "arm_cu_loss_m = R_a*I_a_m**2\t\t\t#armature copper loss for motor\n", - "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", - "power_drawn = V*I\n", - "field_loss_total_g_m = field_cu_loss_m + field_cu_loss_g\n", - "arm_cu_loss_total_g_m = arm_cu_loss_m + arm_cu_loss_g\n", - "IFW_losses = power_drawn - (arm_cu_loss_total_g_m + field_loss_total_g_m) \t\t\t#Iron friction and windage losses\n", - "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", - "\n", - "# Calculations and Results\n", - "#for generator\n", - "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each \t\t\t#total loss in generator\n", - "generator_output = V*I_a_g\n", - "generator_input = generator_output + total_loss_g\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n", - "\n", - "#for motor\n", - "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m \t\t\t#total loss in motor\n", - "motor_input = V*(I_a_m+I_sh_m)\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of generator is 88.3658 percent\n", - "Efficiency of motor is 88.9035 percent\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.27 page no : 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "R_a = 0.015\n", - "V = 250. \t\t\t#line voltage\n", - "I = 45. \t\t\t#line current\n", - "I_a_m = 385.\n", - "I_sh_m = 4. \t\t\t#armature and field currents for motor\n", - "I_a_g = 340.\n", - "I_sh_g = 5. \t\t\t#armature and field currents for generator\n", - "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#armature copper loss for motor\n", - "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", - "\n", - "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#armature copper loss for generator\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for motor\n", - "\n", - "total_cu_loss = field_cu_loss_g + arm_cu_loss_g + field_cu_loss_m + arm_cu_loss_m \t\t\t#total copper loss for both machines\n", - "P_aux = V*I \t\t\t#power taken from auxillary supply\n", - "stray_loss = P_aux - total_cu_loss\n", - "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", - "\n", - "# Calculations and Results\n", - "total_loss_g = stray_loss_each + arm_cu_loss_g + field_cu_loss_g \t\t\t#total losses in generator\n", - "generator_output = V* I_a_g\n", - "eta_g = 100*(generator_output/(generator_output + total_loss_g))\t\t\t#generator efficiency\n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n", - "\n", - "total_loss_m = stray_loss_each + arm_cu_loss_m + field_cu_loss_m\t\t\t#total losses in motor\n", - "motor_input = V*(I_a_m+I_sh_m)\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of generator is 93.9171 percent\n", - "Efficiency of motor is 94.0929 percent\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.28 page no : 53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 500.\n", - "P = 1000.*10**3\n", - "I = 30.\n", - "I_a_m = 200. + 30 \n", - "I_a_g = 200. \t\t\t#armature current for motor and generator\n", - "I_sh_m = 1.8\n", - "I_sh_g = 3.5 \t\t\t#field current for motor and generator\n", - "brush_drop = 230.\n", - "R_a = 0.075 \t\t\t#armature resimath.tance\n", - "\n", - "# Calculations\n", - "arm_cu_loss_m = R_a*I_a_m**2 + 2*brush_drop \t\t\t#motor armature copper loss\n", - "field_cu_loss_m = V*I_sh_m \t\t\t# motor field copper loss \n", - "\n", - "arm_cu_loss_g = R_a*I_a_g**2 + 2*brush_drop \t\t\t#generator armature copper loss\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss generator\n", - "\n", - "total_cu_loss = field_cu_loss_g + arm_cu_loss_g + field_cu_loss_m + arm_cu_loss_m \t\t\t#total copper loss for both machines\n", - "P_aux = V*I \t\t\t#power taken from auxillary supply\n", - "stray_loss = P_aux - total_cu_loss \n", - "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", - "\n", - "total_loss_g = stray_loss_each + arm_cu_loss_g + field_cu_loss_g \t\t\t#total loss in generator\n", - "generator_output = V* I_a_g\n", - "eta_g = 100*(generator_output/(generator_output + total_loss_g))\t\t\t#generator efficiency\n", - "\n", - "# Results\n", - "print 'Efficiency of generator is %.0f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of generator is 93 percent\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.29 page no : 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 220.\n", - "I = 10.\n", - "R_a = 0.05 \t \t\t#artmature resistance\n", - "I_a_m = 73. \n", - "I_sh_m = 2. \t \t\t#armature and field current for motor\n", - "I_a_g = 67.5\n", - "I_sh_g = 2.5\t\t \t#armature and field current for generator\n", - "\n", - "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#motor armature copper loss\n", - "field_cu_loss_m = V*I_sh_m \t\t\t# motor field copper loss \n", - "\n", - "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#generator armature copper loss\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss generator\n", - "\n", - "total_cu_loss = field_cu_loss_g + arm_cu_loss_g + field_cu_loss_m + arm_cu_loss_m \t\t\t#total copper loss for both machines\n", - "power_input = V*I\n", - "stray_loss = power_input - total_cu_loss \n", - "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", - "\n", - "# Calculations and Results\n", - "#motor efficiency\n", - "total_loss_m = field_cu_loss_m + stray_loss_each + arm_cu_loss_m \t\t\t#total motor losses\n", - "motor_input = V*(I_a_m + I_sh_m )\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", - "\n", - "#generator efficiency\n", - "total_loss_g = field_cu_loss_g + stray_loss_each + arm_cu_loss_g \t\t\t#total generator losses\n", - "generator_output = V*I_a_g\n", - "generator_input = generator_output + total_loss_g\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 93.5496 percent\n", - "Efficiency of generator is 92.8956 percent\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30 page no : 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 400.\n", - "I = 50.\n", - "I_a_g = 250. \n", - "I_a_m = 300. \t\t\t#armature current for generator and motor\n", - "I_sh_g = 2.5 \n", - "I_sh_m = 2.4 \t\t\t#field current for generator and motor\n", - "R_a = 0.1 \t\t\t#armature resistance\n", - "\n", - "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#armature copper loss for generator\n", - "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#armature copper loss for motor\n", - "power_drawn = V*I\n", - "IFW_losses = power_drawn - (arm_cu_loss_g + arm_cu_loss_m) \t\t\t#Iron friction and windage losses\n", - "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", - "\n", - "# Calculations and Results\n", - "#for motor\n", - "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", - "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m\n", - "motor_input = V * I_a_m\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input) \t\t\t#motor efficiency\n", - "print 'Efficiency of motor is %.2f percent'%(eta_m)\n", - "\n", - "#for generator\n", - "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", - "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each\n", - "generator_output = V*I_a_g\n", - "generator_input = generator_output + total_loss_g\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency\n", - "print 'Efficiency of generator is %.2f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 89.72 percent\n", - "Efficiency of generator is 91.22 percent\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.31 page no : 58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_1 = 56. \t\t\t#motor input current\n", - "V = 590. \t\t\t#voltage across armature\n", - "I_2 = 44. \t\t\t# load current\n", - "V_2 = 400. \t\t\t# voltage across generator\n", - "V_field = 40. \t\t\t#voltage drop across field winding\n", - "R_a = 0.3\n", - "R_se = 0.7142 \t\t\t#armature and series field resistance for each machine\n", - "total_input = (V+V_field)*I_1\n", - "output = V_2*I_2\n", - "total_loss_g_m = total_input - output \t\t\t#total losses of 2 machines\n", - "R_se = V_field/I_1 \t\t\t#series field resistance for both windings\n", - "total_cu_loss = (R_a+ 2*R_se)*I_1**2 + R_a*I_2**2 \t\t\t#total copper loss\n", - "stray_loss = total_loss_g_m - total_cu_loss\n", - "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", - "\n", - "# Calculations and Results\n", - "# for motor\n", - "motor_input = V*I_1\n", - "arm_cu_loss_m = (R_a+ R_se)*I_1**2 \t\t\t#armature coper losses of motor\n", - "total_loss_m = arm_cu_loss_m + stray_loss_each\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", - "\n", - "# for generator\n", - "arm_cu_loss_g = R_a*I_2**2 \t\t\t#armature coper losses of generator\n", - "series_field_cu_loss_g = V_field*I_1 \t\t\t#series field copper loss\n", - "total_loss_g = arm_cu_loss_g + series_field_cu_loss_g + stray_loss_each\n", - "generator_output = V_2*I_2\n", - "generator_input = generator_output + total_loss_g\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 72.6998 percent\n", - "Efficiency of generator is 67.0221 percent\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.32 page no : 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_1 = 56. \t\t\t#motor input current\n", - "V = 590. \t\t\t#voltage across armature\n", - "I_2 = 44. \t\t\t# load current\n", - "V_2 = 400. \t\t\t# voltage across generator\n", - "V_field = 40. \t\t\t#voltage drop across field winding\n", - "R_a = 0.3\n", - "R_se = 0.7142 \t\t\t#armature and series field resismath.tane for each machine\n", - "\n", - "total_input = (V+V_field)*I_1\n", - "output = V_2*I_2\n", - "total_loss_g_m = total_input - output \t\t\t#total losses of 2 machines\n", - "R_se = V_field/I_1 \t\t\t#series field resistance for both windings\n", - "total_cu_loss = (R_a+ 2*R_se)*I_1**2 + R_a*I_2**2 \t\t\t#total copper loss\n", - "stray_loss = total_loss_g_m - total_cu_loss\n", - "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", - "\n", - "# Calculations and Results\n", - "# for motor\n", - "motor_input = V*I_1\n", - "arm_cu_loss_m = (R_a+ R_se)*I_1**2 \t\t\t#armature coper losses of motor\n", - "total_loss_m = arm_cu_loss_m + stray_loss_each\n", - "motor_output = motor_input - total_loss_m\n", - "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", - "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", - "\n", - "# for generator\n", - "arm_cu_loss_g = R_a*I_2**2 \t\t\t#armature coper losses of generator\n", - "series_field_cu_loss_g = V_field*I_1 \t\t\t#series field copper loss\n", - "total_loss_g = arm_cu_loss_g + series_field_cu_loss_g + stray_loss_each\n", - "generator_output = V_2*I_2\n", - "generator_input = generator_output + total_loss_g\n", - "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", - "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of motor is 72.6998 percent\n", - "Efficiency of generator is 67.0221 percent\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch4.ipynb b/DC_Machines_and_Synchronous_Machines/ch4.ipynb deleted file mode 100755 index 7e4b687b..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch4.ipynb +++ /dev/null @@ -1,1114 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e5bf1101b5ca7d663f8c7db6ba5353cd5daf17690d3f4785e774f0306b01e83e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4 : Synchronous Machines : Alternators" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1 page no : 16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# Variables\n", - "Pole = 4.\n", - "Slots = 24.\n", - "Phase = 3. \t\t\t#number of phases\n", - "\n", - "# Calculations\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = Slots/Pole/Phase \t\t\t#slots per pole per phase\n", - "beeta = 180/n \t\t\t#Slot angle\n", - "\n", - "# results\n", - "print \"Slot angle : %.f degrees\"%beeta" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Slot angle : 30 degrees\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2 page no : 26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Slots = 120.\n", - "Pole = 8.\n", - "Phase = 3. \t\t\t#number of phases\n", - "\n", - "# Calculations\n", - "n = Slots/Pole \t\t\t#Slots per Pole\n", - "m = Slots/Pole/Phase \t\t\t#Slots per Pole per Phase\n", - "beeta = 180/n \t\t\t#Slot angle in degree\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#Distribution Factor\n", - "\n", - "# Results\n", - "print 'Distribution Factor:K_d = %.3f'%(K_d)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Distribution Factor:K_d = 0.957\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3 page no : 26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Slots = 36.\n", - "Pole = 4.\n", - "Phase = 3. \t\t\t#number of phases\n", - "n = Slots/Pole \t\t\t#Slots per pole\n", - "beeta = 180/n \t\t\t#Slot angle in degrees\n", - "\n", - "# Calculations\n", - "#coil is shorted by 1 slot i.e. by beeta degrees to full pitch dismath.tance\n", - "alpha = beeta \t\t\t#angle of short pitch\n", - "K_c = math.cos(math.radians(alpha/2)) \t\t\t#Coil span Factor\n", - "\n", - "# Results\n", - "print 'Coil Span Factor:K_c = %.4f'%(K_c)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Coil Span Factor:K_c = 0.9848\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4 page no : 26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "N_s = 250. \t\t\t#Synchronous speed in r.p.m\n", - "f = 50. \t\t\t#Frequency of generated e.m.f in hertz\n", - "Slots = 216.\n", - "phi = 30.*10**-3 \t\t\t#flux per pole in weber\n", - "\n", - "Pole = 120*f/N_s\n", - "n = Slots/Pole \t\t\t#Slots per Pole\n", - "m = n/3 \t\t\t#Slots per Pole per Phase\n", - "beeta = 180/n \t\t\t#Slot angle in degree\n", - "\n", - "# Calculations\n", - "K_d = math.sin(math.radians(m*beeta/2))/(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "K_c = 1 \t\t\t#Coil Span Factor for full pitch coils = 1\n", - "\n", - "Z = Slots*5 \t\t\t#Z is total no of conductors\n", - "Z_ph = Z/3 \t\t\t#Conductors Per Phase\n", - "T_ph = Z_ph/2 \t\t\t#Turns per phase\n", - "E_ph = 4.44*K_c*K_d*f*phi*T_ph \t\t\t#induced emf\n", - "E_line = E_ph*math.sqrt(3)\n", - "\n", - "# Results\n", - "print 'Induced e.m.f across the Terminals is %.2f V'%(E_line)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced e.m.f across the Terminals is 1992.90 V\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5 page no : 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 16.\n", - "N_s = 375. \t\t\t#synchronous speed in rpm\n", - "Slots = 144.\n", - "E_line = 2.657*10**3 \t\t\t#line value of emf across terminals\n", - "f = Pole*N_s/120 \t\t\t#frequency\n", - "\n", - "# Calculations\n", - "K_c = 1 \t\t\t#assuming full pitch winding Coil span Factor = 1\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "\n", - "beeta = 180/n\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#Distribution Fcator\n", - "conductors_per_slot = 10\n", - "Z = Slots*conductors_per_slot \t\t\t#total conductors\n", - "\n", - "Z_ph = Z/3 \t\t\t#number of conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#no of turns per phase\n", - "E_ph = E_line/math.sqrt(3) \t\t\t#phase value of emf across terminals\n", - "\n", - "phi = E_ph/(4.44*K_c*K_d*f*T_ph) \t\t\t#E_ph = 4.44*K_c*K_d*f*phi*T_ph\n", - "\n", - "# Results\n", - "print 'Frequency of Induced e.m.f is %.0fHz \\nFlux per Pole is %.0f mWb'%(f,phi*1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Frequency of Induced e.m.f is 50Hz \n", - "Flux per Pole is 30 mWb\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6 page no : 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "d = 0.25 \t\t\t#Diameter in metre\n", - "l = 0.3 \t\t\t#Length in metre\n", - "Pole = 4.\n", - "A1 = math.pi*d*l/Pole \t\t\t#Area of each fundamental pole\n", - "f = 50. \t\t\t#frequency in hertz\n", - "B_m1 = 0.15 \n", - "B_m3 = 0.03\n", - "B_m5 = 0.02 \t\t\t#Amplitude of 1st 3rd and 5th harmonics\n", - "phi_1 = (2/math.pi)*B_m1*A1 \t\t\t#average value of fundamental flux per pole in weber\n", - "\n", - "\n", - "# Calculations and Results\n", - "#PART A\n", - "E_c1 = 1.11*2*f*phi_1 \t\t\t#R.M.S value of fundamental frequency e.m.f generated in math.single conductor\n", - "Coil_span = (13./15)*180 \t\t\t#math.since winding coil span is 13/15 of pole pitch\n", - "alpha = 180-Coil_span\n", - "\n", - "#Pitch factor for 1st 3rd and 5th harmonic\n", - "K_c1 = math.cos(math.radians(alpha/2))\n", - "K_c3 = math.cos(math.radians(3*alpha/2))\n", - "K_c5 = math.cos(math.radians(5*alpha/2))\n", - "\n", - "#using E_cx = E_c1 * (B_mx/B_m1)\n", - "E_c3 = E_c1 * (B_m3/B_m1)\n", - "E_c5 = E_c1 * (B_m5/B_m1)\n", - "\n", - "E_t1 = K_c1 * (2*E_c1) \t\t\t#R.M.S Vaue of fundamental frequency EMF generated in 1 turn (in volts)\n", - "E_t3 = K_c3 * 2*E_c3\n", - "E_t5 = K_c5 * 2*E_c5\n", - "E_t = math.sqrt(E_t1**2 +E_t3**2 +E_t5**2)\n", - "V = 10*E_t \t\t\t#(number of turns per coil )* (Total e.m.f per turn)\n", - "print 'Voltage generated per coil is %.1f V'%(V)\n", - "\n", - "# PART B\n", - "#E_1ph = 4.44*K_c1*K_d1*phi_1*f*T_ph\n", - "T_ph = 200. \t\t\t#T_ph = (60 coils * 10 turns per coil)/3\n", - "\n", - "Total_Conductors = 1200. \t\t\t# 60 coils * 10 turns per coil * 2\n", - "Conductors_per_Slot = 20. \t\t\t#2 conductors per turn * 10 turns per slot\n", - "Slots = Total_Conductors/Conductors_per_Slot\n", - "\n", - "n = Slots/Pole\n", - "m = n/3\n", - "beeta = 180/n \t\t\t#Slot angle in degree\n", - "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta/2)))\n", - "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta/2)))\n", - "K_d5 = math.sin(math.radians(m*5*beeta/2)) /(m*math.sin(math.radians(5*beeta/2)))\n", - "\n", - "E_1ph = 4.44 * K_c1 * K_d1*phi_1 * f * T_ph\n", - "# using E_xph = E_1ph* (B_mx*K_cx*K_dx)/(B_m1*K_c1*K_d1)\n", - "E_3ph = E_1ph* (B_m3*K_c3*K_d3)/(B_m1*K_c1*K_d1)\n", - "E_5ph = E_1ph* (B_m5*K_c5*K_d5)/(B_m1*K_c1*K_d1)\n", - "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 + E_5ph**2 ) \t\t\t#voltage generated per phase\n", - "print 'Voltage generated per phase is %.f V'%(E_ph)\n", - "\n", - "#PART c\n", - "E_line = math.sqrt(3) * math.sqrt( E_1ph**2 + E_5ph**2 ) \t\t\t#terminal voltage\n", - "print 'Terminal Voltage is %.1f V '%(E_line)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage generated per coil is 12.4 V\n", - "Voltage generated per phase is 235 V\n", - "Terminal Voltage is 404.8 V \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7 page no : 38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Ns = 250. \t\t\t#Synchronous speed in rpm\n", - "f = 50.\n", - "Slots = 288.\n", - "E_line = 6600.\n", - "Pole = 120*f/Ns \n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "beeta = 180/n \t\t\t#slot angle\n", - "conductors_per_slot = 32 \t\t\t#16 conductors per coil-side *2 coil-sides per slot\n", - "\n", - "# Calculations\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "alpha = 2*beeta\t\t\t# angle of short pitch\n", - "K_c = math.cos(math.radians(alpha/2)) \t\t\t#coil span factor\n", - "Z = Slots*conductors_per_slot \t\t\t#total conductors\n", - "Z_ph = Z/3 \t\t\t#Conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "\n", - "E_ph = E_line/math.sqrt(3)\n", - "phi = E_ph/(4.44*K_c*K_d*f*T_ph) \t\t\t#Because E_ph = 4.44 *K_c *K_d *phi *f *T_ph\n", - "\n", - "# Results\n", - "print 'Flux per pole is %.0f mWb '%(phi*1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flux per pole is 12 mWb \n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.8 page no : 40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Ns = 1500. \t\t\t#synchronous speed in rpm\n", - "Pole = 4.\n", - "Slots = 24.\n", - "conductor_per_slot = 8.\n", - "phi = 0.05 \t\t\t#flux per pole in weber\n", - "f = Pole*Ns/120 \t\t\t#frequenccy\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n \t\t\t# as number of phases is 1\n", - "beeta = 180/n \t\t\t#slot angle\n", - "\n", - "# Calculations\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "\n", - "#Full pitch = n = 6 slots\n", - "#(1/6)th of full pitch = 1slot\n", - "#angle of short pitch = 1 slot angle\n", - "alpha = beeta\n", - "K_c = math.cos(math.radians(alpha/2)) \t\t\t#coil span factor\n", - "\n", - "Z = conductor_per_slot*Slots \t\t\t#total conductors\n", - "Z_ph = Z \t\t\t# as number of phases is 1\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "E_ph = 4.44*K_c*K_d* phi *f *T_ph \t\t\t#induced emf\n", - "\n", - "# Results\n", - "print 'Induced e.m.f is %.1f V '%(E_ph)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced e.m.f is 662.8 V \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9 page no : 41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 48.\n", - "n = 9. \t\t\t#slots per pole\n", - "phi = 51.75*10**-3 \t\t\t#flux per pole in weber\n", - "Ns = 125.\n", - "f = Ns*Pole/120 \t\t\t#frequency\n", - "K_c = 1. \t\t\t#due to full pitch winding\n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "beeta = 180/n \t\t\t#slot angle\n", - "\n", - "# Calculations\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "conductor_per_slot = 4*2 \t\t\t#Each slot has 2 coil sides and each coil side has 4 conductors\n", - "Slots = n*Pole\n", - "Z = conductor_per_slot*Slots \t\t\t#total number of conductors\n", - "Z_ph = Z/3 \t\t\t#conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "E_ph = 4.44 *K_c *K_d *phi *f *T_ph \t\t\t#induced emf\n", - "\n", - "E_line = (math.sqrt(3))*E_ph \t\t\t#due to star connection\n", - "\n", - "# Results\n", - "print 'Induced e.m.f is %.0f kV '%(E_line/1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced e.m.f is 11 kV \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10 page no : 42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Slots = 180.\n", - "Pole = 12.\n", - "Ns = 600. \t\t\t#Synchronous speen in rpm\n", - "f = Pole*Ns/120 \t\t\t#frequency\n", - "phi = 0.05 \t\t\t#flux per pole in weber\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "#Average EMF in a conductor = 2*f*phi\n", - "rms_value_1 = 1.11*2*f*phi \t\t\t#rms value of emf in a conductor\n", - "print 'i)r.m.s value of e.m.f in a conductor is %.2f V '%(rms_value_1)\n", - "\n", - "#part(ii)\n", - "#Average EMF in a turn = 4*f*phi\n", - "rms_value_2 = 1.11*4*f*phi\t\t\t#r.m.s value of e.m.f in a turn\n", - "print 'ii)r.m.s value of e.m.f in a turn is %.2f V '%(rms_value_2)\n", - "\n", - "#part(iii)\n", - "conductors_per_coilside = 10/2 \n", - "rms_value_3 = rms_value_2*conductors_per_coilside \t\t\t#r.m.s value of e.m.f in a coil\n", - "print 'iii)r.m.s value of e.m.f in a coil is %.1f V '%(rms_value_3)\n", - "\n", - "#part(iv)\n", - "conductors_per_slot = 10\n", - "Z = conductors_per_slot * Slots \t\t\t#total number of conductors\n", - "Z_ph = Z/3 \t\t\t#conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n/3 \t\t\t#slots per pole per phase \n", - "beeta = 180/n \t\t\t#slot angle\n", - "\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2)))\n", - "K_c = 1 \t\t\t#distribution & coil-span factor\n", - "E_ph = rms_value_2*T_ph*K_d*K_c \t\t\t#induced emf\n", - "print 'iv)per phase induced e.m.f is %.1f V '%(E_ph)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)r.m.s value of e.m.f in a conductor is 6.66 V \n", - "ii)r.m.s value of e.m.f in a turn is 13.32 V \n", - "iii)r.m.s value of e.m.f in a coil is 66.6 V \n", - "iv)per phase induced e.m.f is 3822.9 V \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.11 page no : 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 8.\n", - "f = 50. \t\t\t#frequency\n", - "phi = 60.*10**-3 \t\t\t#flux per pole in weber\n", - "Slots = 96. \n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "beeta = 180/n \t\t\t#slot angle \n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "\n", - "# Calculations and Results\n", - "coil_pitch = 10*beeta \t\t\t#10 slots\n", - "alpha = 180-coil_pitch\n", - "K_c = math.cos(math.radians(alpha/2)) \t\t\t#coi;-span factor\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "\n", - "conductors_per_slot = 4 \n", - "Z = Slots*conductors_per_slot \t\t\t#total conductors\n", - "Total_turns = Z/2 \n", - "T_ph = Total_turns/3 \t\t\t#turns per phase\n", - "\n", - "#part (i)\n", - "E_ph = 4.44 *K_c *K_d *phi *f *T_ph\n", - "print '\\The phase voltage is %.2f V '%(E_ph)\n", - "\n", - "#part(ii)\n", - "E_line = E_ph*math.sqrt(3)\n", - "print 'The Line Voltage is %.2f V '%(E_line)\n", - "\n", - "#part(iii)\n", - "I_ph = 650\n", - "I_l = I_ph \t\t\t# Star Connection\n", - "kVA_rating = math.sqrt(3)*E_line*I_l\n", - "print 'kVA rating is %.1f kVA '%(kVA_rating/1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\\The phase voltage is 788.57 V \n", - "The Line Voltage is 1365.84 V \n", - "kVA rating is 1537.7 kVA \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12 page no : 45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Ns = 600. \t\t\t#synchronous speed in rpm\n", - "Pole = 10.\n", - "l = 30./100 \t\t\t#divided by 100 for centimetre-metre conversion\n", - "Pole_pitch = 35./100 \t\t\t#numerically equal to pi*d/Pole\n", - "Phase = 3.\n", - "conductors_per_slot = 8.\n", - "A1 = Pole_pitch*l \t\t\t#Area of each fundamental pole\n", - "m = 3. \t\t\t#Slot per Pole per Phase\n", - "n = Phase*m \t\t\t#slots per pole\n", - "beeta = 180/n \t\t\t#slot angle\n", - "\n", - "B_m1 = 1.\n", - "B_m3 = 0.3\n", - "B_m5 = 0.2 \t\t\t#amplitude of 1st 3rd and 5th harmonic\n", - "phi_1 = (2/math.pi)*A1*B_m1 \t\t\t#average value of fundamental flux per pole \n", - "f = Ns*Pole/120 \t\t\t#frequency\n", - "\n", - "# Calculations\n", - "Coil_span = (8./9)*180\n", - "alpha = 180-Coil_span\n", - "#pitch factor for 1st 3rd and 5th harmonic\n", - "K_c1 = math.cos(math.radians(alpha/2)) \n", - "K_c3 = math.cos(math.radians(3*alpha/2))\n", - "K_c5 = math.cos(math.radians(5*alpha/2))\n", - "\n", - "# using K_dx = math.sin(m*x*beeta*(math.pi/180)/2) /(m*math.sin(x*beeta*(math.pi/180)/2))\n", - "#distribution factor for 1st 3rd and 5th harmonic\n", - "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta/2)))\n", - "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta/2)))\n", - "K_d5 = math.sin(math.radians(m*5*beeta/2)) /(m*math.sin(math.radians(5*beeta/2)))\n", - "\n", - "Slots = n*Pole\n", - "Total_conductors = conductors_per_slot * Slots\n", - "Total_turns = Total_conductors/2\n", - "T_ph = Total_turns/3 \t\t\t#turns per phase\n", - "\n", - "#EMF of 1st 3rd and 5th harmonic\n", - "E_1ph = 4.44 * K_c1 * K_d1*phi_1 * f * T_ph\n", - "E_3ph = E_1ph* (B_m3*K_c3*K_d3)/(B_m1*K_c1*K_d1)\n", - "E_5ph = E_1ph* (B_m5*K_c5*K_d5)/(B_m1*K_c1*K_d1)\n", - "\n", - "# Results\n", - "# using E_xph = E_1ph* (B_mx*K_cx*K_dx)/(B_m1*K_c1*K_d1)\n", - "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 + E_5ph**2 )\n", - "print 'Phase value of induced e.m.f is %.2f V '%(E_ph)\n", - "E_line = math.sqrt(3) * math.sqrt( E_1ph**2 + E_5ph**2 )\t\t\t#no 3rd harmonic appears in line value\n", - "print 'line value of induced e.m.f is %.2f V '%(E_line)\n", - "\n", - "print 'Answer mismatches due to approximation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Phase value of induced e.m.f is 1711.94 V \n", - "line value of induced e.m.f is 2916.65 V \n", - "Answer mismatches due to approximation\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.13 page no : 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 16.\n", - "phi = 0.03 \t\t\t#flux per pole\n", - "Ns = 375. \t\t\t#synchronous speed in rpm\n", - "\n", - "# Calculations and Results\n", - "f = Ns*Pole/120 \t\t\t#frequency\n", - "print 'frequency is %.0f Hz '%(f)\n", - "Slots = 144\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "beeta = 180/n \t\t\t#slot angle\n", - "K_c = 1 \t\t\t#assuming Full-Pitch coil\n", - "Conductors_per_slot = 10\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "\n", - "Total_conductors = Slots*Conductors_per_slot\n", - "Total_turns = Total_conductors/2\n", - "T_ph = Total_turns/3 \t\t\t#turns per phase\n", - "E_ph = 4.44* K_c* K_d*phi* f* T_ph\n", - "E_line = E_ph*math.sqrt(3)\n", - "print 'line voltage is %.2f V '%(E_line)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "frequency is 50 Hz \n", - "line voltage is 2657.20 V \n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14 page no : 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Ns = 250. \t\t\t#Speed in rpm\n", - "f = 50. \t\t\t#frequency\n", - "I_l = 100.\n", - "Slots = 216.\n", - "Conductors_per_slot = 5\n", - "Pole = 120.*f/Ns\n", - "phi = 30.*10**-3\t\t\t#flux per pole in weber\n", - "Z = Slots*Conductors_per_slot \t\t\t#Total Conductors\n", - "Z_ph = Z/3 \t\t\t#conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "beeta = 180./n \t\t\t#Slot angle\n", - "\n", - "# Calculations\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "\n", - "e_av = 2*f*phi \t\t\t#Average Value of EMF in each conductor\n", - "E_c = 1.11*(2*f*phi) \t\t\t#RMS value of EMF in each conductor\n", - "E = 2*E_c*K_d \t\t\t#RMS value of EMF in each turn\n", - "E_ph = T_ph*E \t\t\t#RMS value of EMF in each phase\n", - "E_line = E_ph*math.sqrt(3) \t\t\t#As Star Connected Alternator\n", - "\n", - "# Results\n", - "print 'RMS value of EMF in each phase = %.3f V'%(E_ph)\n", - "print 'RMS value of EMF line value = %.3f V'%(E_line)\n", - "kVA_rating = math.sqrt(3)*E_line*I_l\n", - "print 'kVA rating is %.3f kVA '%(kVA_rating/1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "RMS value of EMF in each phase = 1150.602 V\n", - "RMS value of EMF line value = 1992.902 V\n", - "kVA rating is 345.181 kVA \n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.15 page no : 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 10.\n", - "Slots = 90.\n", - "E_l = 11000.\n", - "f = 50.\n", - "phi = 0.15 \t\t\t#flux per pole in weber\n", - "n = Slots/Pole \t\t\t#slots per pole\n", - "m = n/3 \t\t\t#slots per pole per phase\n", - "beeta = 180/n \t\t\t#slot angle\n", - " \n", - "# Calculations \n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", - "K_c = 1 \t\t\t#coil span factor\n", - "\n", - "E_ph = E_l/math.sqrt(3)\n", - "T_ph = ( E_ph/(4.44*K_c*K_d*phi*f) )\n", - "#T_ph should necessarily be an integer\n", - "Z_ph = (T_ph)*2 \n", - "\n", - "# Results\n", - "print 'Required number of armature conductors is %d'%(Z_ph)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required number of armature conductors is 397\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.16 page no : 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 10.\n", - "Ns = 600. \t\t\t#speen in rpm\n", - "conductor_per_slot = 8.\n", - "n = 12. \t\t\t#slots per pole\n", - "Slots = Pole*n \n", - "m = n/3 \t\t\t#slots per pole per phase \n", - "beeta = 180/n \t\t\t#slot angle\n", - "alpha = 2*beeta \t\t\t#short by 2 slots\n", - "\n", - "#flux per pole corresponding to 1st 3rd and 5th harmonic\n", - "phi_1 = 100*10**-3\n", - "phi_3 = (33./100)*phi_1\n", - "phi_5 = (20./100)*phi_1\n", - "\n", - "#coil span factor corresponding to 1st 3rd and 5th harmonic\n", - "K_c1 = math.cos(math.radians( alpha/2))\n", - "K_c3 = math.cos(math.radians( 3*alpha/2))\n", - "K_c5 = math.cos(math.radians( 5*alpha/2))\n", - "\n", - "# using K_dx = math.sin(m*x*beeta /2) /(m*math.sin(x*beeta /2))\n", - "#distribution factor corresponding to 1st 3rd and 5th harmonic\n", - "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta /2)))\n", - "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta /2)))\n", - "K_d5 = math.sin(math.radians(m*5*beeta/2)) /(m*math.sin(math.radians(5*beeta /2)))\n", - "\n", - "Z = conductor_per_slot*n*Pole \t\t\t#Total Conductors\n", - "Zph = Z/3 \t\t\t#conductors per phase\n", - "T_ph = Zph/2 \t\t\t#turns per phase\n", - "\n", - "f = Ns*Pole/120\n", - "E_1ph = 4.44*K_c1*K_d1*phi_1*f*T_ph\n", - "E_3ph = 4.44*K_c3*K_d3*phi_3*f*T_ph\n", - "E_5ph = 4.44*K_c5*K_d5*phi_5*f*T_ph\n", - "\n", - "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 + E_5ph**2 )\n", - "\n", - "# Results\n", - "print 'Phase value of induced e.m.f is %.0f V '%(E_ph)\n", - "E_line = math.sqrt(3)*math.sqrt( E_1ph**2 + E_5ph**2 ) \t\t\t#In a line value 3rd harmonic doesnt appear\n", - "print 'line value of induced e.m.f is %d V '%(E_line)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Phase value of induced e.m.f is 3330 V \n", - "line value of induced e.m.f is 5691 V \n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.17 page no : 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 6.\n", - "Ns = 1000. \t\t\t#speed in rpm\n", - "d = 28./100 \t\t\t#Divided by 100 to convert from centimeters to metres\n", - "l = 23./100 \t\t\t#Divided by 100 to convert from centimeters to metres\n", - "m = 4. \t \t\t#slots per pole per phase\n", - "B_m1 = 0.87 \t\t\t#amplitude of 1st harmonic component of flux density\n", - "B_m3 = 0.24 \t\t\t#amplitude of 3rd harmonic component of flux density\n", - "Conductors_per_slot = 8\n", - "f = Ns*Pole/120 \t\t\t#frequency\n", - "A1 = math.pi*d*l/Pole \t\t\t#area of each fundamental pole\n", - "phi_1 = (2/math.pi)*A1*B_m1 \t\t\t#flux per pole in weber\n", - "n = m*3 \t\t \t#slots per pole\n", - "beeta = 180/n \t\t\t#slot angle\n", - "alpha = beeta \t\t\t#because of 1 slot short\n", - "\n", - "# Calculations\n", - "K_c1 = math.cos(math.radians(alpha/2)) \t\t\t#coil span factor corresponding to 1st harmonic\n", - "K_c3 = math.cos(math.radians(3*alpha/2))\t\t\t#coil span factor corresponding to 3rd harmonic\n", - "# using K_dx = math.sin(m*x*beeta*(math.pi/180)/2) /(m*math.sin(x*beeta*(math.pi/180)/2))\n", - "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta/2))) \t\t\t#distribution factor corresponding to 1st harmonic\n", - "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta/2))) \t\t\t#distribution factor corresponding to 3rd harmonic\n", - "\n", - "Slots = n*Pole\n", - "Z = Slots*Conductors_per_slot \t\t\t#total number of conductors\n", - "Z_ph = Z/3 \t\t\t#conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "\n", - "E_1ph = 4.44*K_c1*K_d1*phi_1*f*T_ph\n", - "E_3ph = E_1ph* (B_m3*K_c3*K_d3)/(B_m1*K_c1*K_d1) \t\t\t#using E_xph = E_1ph* (B_mx*K_cx*K_dx)/(B_m1*K_c1*K_d1)\n", - "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 )\n", - "print 'r.m.s value of resultant voltage is %.1f V'%(E_ph)\n", - "E_line = math.sqrt(3)*E_1ph \t\t\t#For line Value 3rd harmonic does not appear\n", - "print 'line voltage is %.3f V'%(E_line)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "r.m.s value of resultant voltage is 383.7 V\n", - "line voltage is 654.560 V\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.18 page no : 53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 125.\n", - "V_ph = V_L\n", - "VA = 600.*10**3\n", - "I_L = VA/(math.sqrt(3)*V_L) \t\t\t# Because VA = math.sqrt(3)* V_L * I_L\n", - "I_ph = I_L/(math.sqrt(3))\n", - "\n", - "# Calculations and Results\n", - "#After Reconnection\n", - "V_ph = 125\n", - "V_L = V_ph*math.sqrt(3)\n", - "print 'New rating in volts is %.3f V'%(V_L)\n", - "#Winding Impedances remain the same\n", - "I_ph = 1600\n", - "I_L = I_ph\n", - "\n", - "print 'New rating in amperes is %.0f A'%(I_L)\n", - "kVA = math.sqrt(3)*V_L*I_L*(10**-3)\n", - "print 'New rating in kVA is %.0f kVA'%(kVA)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New rating in volts is 216.506 V\n", - "New rating in amperes is 1600 A\n", - "New rating in kVA is 600 kVA\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19 page no : 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Pole = 4.\n", - "f = 50. \t\t\t#frequency\n", - "phi = 0.12 \t\t\t#flux per pole in weber\n", - "m = 4. \t\t\t# slot per pole per phase\n", - "conductor_per_slot = 4.\n", - "coilspan = 150.\n", - "Ns = 120*f/Pole \t\t\t#synchronous speed in rpm\n", - "n = m*3 \t \t\t#Slots per pole\n", - "beeta = 180/n \t\t\t#slot angle\n", - "\n", - "# Calculations\n", - "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t# distribution factor\n", - "alpha = 180-coilspan \t\t\t#angle of short pitch\n", - "K_c = math.cos((math.pi/180)*alpha/2) \t\t\t#coil span factor\n", - "Z = m*(n*Pole) \t\t\t# Also equal to (conductors/slots)*slots\n", - "Z_ph = Z/3 \t\t\t#conductors per phase\n", - "T_ph = Z_ph/2 \t\t\t#turns per phase\n", - "E_ph = 4.44*K_c*K_d*phi*f*T_ph\n", - "E_line = math.sqrt(3)*E_ph\n", - "\n", - "# Results\n", - "print 'e.m.f generated is %.2f Vphase, %.2f Vline)'%(E_ph,E_line)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "e.m.f generated is 788.57 Vphase, 1365.84 Vline)\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch5.ipynb b/DC_Machines_and_Synchronous_Machines/ch5.ipynb deleted file mode 100755 index 4aca598c..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch5.ipynb +++ /dev/null @@ -1,1612 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ae2b9384b1b13f79321d75082b020b6a54688771e761bc6446ad00de14bf068e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5 : Methods for Calculating Regulation of Alternator" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1 page no : 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P = 1000.*10**3 \t\t\t#load power\n", - "phi = math.acos(math.radians(0.8)) \t\t\t#power factor lagging angle\n", - "V_L = 11.*10**3 \t\t\t#rated terminal voltae\n", - "R_a = 0.4 \t\t\t#armature resistance per phase\n", - "X_s = 3.\t\t\t#synchronous reactance per phase\n", - "\n", - "# Calculations\n", - "I_L = P/(math.sqrt(3)*V_L*math.cos(math.radians(phi)))\n", - "I_aph = I_L \t\t\t#for star connected load\n", - "I_a = I_L\t\t\t#current through armature\n", - "V_ph = V_L/math.sqrt(3) \t\t\t#rated terminal volatge phase value\n", - "\n", - "E_ph = math.sqrt( (V_ph*math.cos(math.radians(phi))+I_a*R_a)**2+(V_ph*math.sin(math.radians(phi))+I_a*X_s)**2 ) \t\t\t#emf generated phase value\n", - "E_line = E_ph*math.sqrt(3) \t\t\t#line value of emf generated\n", - "regulation = 100*(E_ph-V_ph)/V_ph \t\t\t#pecentage regulation\n", - "\n", - "# Results\n", - "print 'Line value of e.m.f generated is %.2f kV \\nRegulation is %.3f percent'%(E_line*10**-3,regulation)\n", - "\n", - "# note : book answer is wrong.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Line value of e.m.f generated is 11.05 kV \n", - "Regulation is 0.428 percent\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2 Page no : 14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "VA = 1200.*10**3\n", - "V_L = 6600.\n", - "R_a = 0.25 \t\t\t#armature resistance per phase\n", - "X_s = 5.\t\t\t#synchronous reactance per phase\n", - "\n", - "# Calculations and Results\n", - "I_L = VA/(math.sqrt(3)*V_L)\n", - "I_aph = I_L \t\t\t#for star connected load\n", - "I_a = I_L\n", - "V_ph = V_L/math.sqrt(3)\n", - "\n", - "#Part(i)\n", - "phi1 = math.acos(0.8)\t\t\t#and lagging\n", - "E_ph1 = math.sqrt( (V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2 )\n", - "regulation = 100*(E_ph1-V_ph)/V_ph \t\t\t#percentage regulation\n", - "print 'i)Regulation at 0.8 lagging pf is %.2f percent'%(regulation)\n", - "#Part(ii)\n", - "phi2 = math.acos(0.8)\t\t\t#and leading\n", - "E_ph2 = math.sqrt( (V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2 )\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph \t\t\t#percentage regulation\n", - "print 'ii)Regulation at 0.8 leading pf is %.f percent'%(regulation2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Regulation at 0.8 lagging pf is 9.33 percent\n", - "ii)Regulation at 0.8 leading pf is -7 percent\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3 Page no : 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "#full load\n", - "V_L_FL = 1100.\n", - "V_ph_FL = V_L_FL/math.sqrt(3)\n", - "\n", - "# Calculations\n", - "#no load\n", - "V_L_NL = 1266\n", - "E_line = V_L_NL\n", - "E_ph = E_line/math.sqrt(3)\n", - "regulation = 100*(E_ph-V_ph_FL)/V_ph_FL\n", - "\n", - "# Results\n", - "print 'Regulation at full load is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at full load is 15.09 percent\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4 Page no : 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 866.\n", - "VA = 100.*10**3\n", - "I_L = VA/(math.sqrt(3)*V_L) \t\t\t#because VA = math.sqrt(3)*V_L*I_L\n", - "I_aph = I_L\t\t\t#full load and star connected alternator\n", - "V_ph = V_L/math.sqrt(3)\n", - "\n", - "# Calculations\n", - "#Graph is plotted and V_oc_ph and I_asc_Ph is obtained for \n", - "#SCC for I_asc = 66.67 A\n", - "I_f = 2.4 # A\n", - "#OCC for I_f = 2.4 A\n", - "V_oc_ph = 240 # V\n", - "\n", - "#for measruemnt of impedance\n", - "V_oc_ph = 240 \t\t\t#for I_f = 2.4..From o.c.c graph\n", - "I_asc_ph = 66.67 \t\t\t#for I_f = 2.4...From s.c.c graph\n", - "Z_s = V_oc_ph/I_asc_ph\n", - "R_a = 0.15\n", - "X_s = math.sqrt( Z_s**2-R_a**2 )\n", - "\n", - "V_ph_FL = 500.\n", - "phi = math.acos(0.8) \t\t\t#lagging pf\n", - "E_ph = math.sqrt((V_ph_FL*math.cos(phi)+I_aph*R_a)**2+(V_ph_FL*math.sin(phi)+I_aph*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Full-load regulation at 0.8 lagging pf is %.2f percent '%(regulation )\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full-load regulation at 0.8 lagging pf is 35.57 percent \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5 Page no : 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_OC_line = 230.\n", - "I_asc = 12.5 \t\t\t# when I_f = 0.38\n", - "V_OC_ph = V_OC_line/math.sqrt(3)\n", - "Z_s = V_OC_ph/I_asc \n", - "\n", - "R_a = 1.8/2 \t\t\t#1.8 is between terminals..0.9 is per phase\n", - "X_s = math.sqrt(Z_s**2-R_a**2)\n", - "\n", - "I_a = 10.\t\t\t# when regulation is needed\n", - "V_L = 230.\n", - "V_ph = V_L/math.sqrt(3)\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "phi1 = math.acos(0.8) \t\t\t#and lagging\n", - "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", - "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", - "print 'Regulation for 10 A at 0.8 lagging pf is %.2f percent'%(regulation1)\n", - "#Part(ii)\n", - "phi2 = math.acos(0.8) \t\t\t#and leading\n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2)\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'Regulation for 10 A at 0.8 leading pf is %.2f percent'%(regulation2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation for 10 A at 0.8 lagging pf is 64.47 percent\n", - "Regulation for 10 A at 0.8 leading pf is -11.01 percent\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6 Page no : 31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "phi = math.acos(0.8)\n", - "VA = 1000.*10**3\n", - "V_L = 1905.\n", - "V_ph = V_L/math.sqrt(3)\n", - "R_a = 0.2\t\t\t#Armature reactance per phase\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "#Ampere-turn method\n", - "I_L = VA/(math.sqrt(3)*V_L)\n", - "I_aph = I_L\n", - "V_dash = V_ph+I_aph*R_a*math.cos(phi)\t\t\t#V_dash is a dummy quantity and has no significance..it's used only for mapping correcponding current\n", - "F_o = 32 \t\t\t#F_o corresponds to voltage V_dash = 1148.5 from O.C.C graph\n", - "F_AR = 27.5 \t\t\t#Field current required to circulate full-load short circuit current of 303.07A.From SCC F_AR = 27.5\n", - "F_R = math.sqrt( F_o**2 + F_AR**2-2*F_o*F_AR*math.cos(phi+math.pi/2) )\t\t\t#using Comath.sine rule\n", - "\n", - "# for F_R = 53.25 E_ph = 1490 V from O.C.C\n", - "E_ph = 1490.\n", - "regulation1 = 100*(E_ph-V_ph)/V_ph\n", - "print 'Regulation on full-load by ampere-turn method is %.2f percent'%(regulation1)\n", - "\n", - "#Part (ii)\n", - "#Synchronous Impedance method\n", - "\n", - "I_sc = I_L\n", - "I_aph2 = I_sc\n", - "I_f = 27.5\n", - "\n", - "V_OC_ph = 1060. \t\t\t#corresponding to I-f = 27.5 in the graph\n", - "Z_s = V_OC_ph/I_aph2\n", - "X_s = math.sqrt(Z_s**2-R_a**2)\n", - "\n", - "E_ph2 = math.sqrt( (V_ph*math.cos(phi)+I_aph2*R_a)**2+(V_ph*math.sin(phi)+I_aph2*X_s)**2 ) \t\t\t#from phasor diagram\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'Regulation on full-load by synchronous impedance method is %.2f percent'%(regulation2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation on full-load by ampere-turn method is 35.47 percent\n", - "Regulation on full-load by synchronous impedance method is 78.09 percent\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7 Page no : 39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "#case(i)\n", - "V_L = 440.\n", - "V_ph = V_L/math.sqrt(3)\n", - "phi = math.acos(0.8)\n", - "\n", - "#armature resistance drop from the graph\n", - "#RS = 1.1 cm and scale = 50 V/cm\n", - "arm_leak_resis = 1.1*50 \t\t\t#armature leakage resistance\n", - "\n", - "OB = V_ph*math.cos(phi)\n", - "AB = V_ph*math.sin(phi) + arm_leak_resis\n", - "E_1ph = math.sqrt( OB**2+AB**2 )\n", - "\n", - "F_f1 = 6.1 \t\t\t#corresponding value from OCC\n", - "F_AR = 3.1*1\n", - "\n", - "# Calculations and Results\n", - "F_R = math.sqrt( F_f1**2 + F_AR**2 -2*F_f1*F_AR*math.cos(math.radians(90+math.acos(math.radians(0.8)))))\n", - "E_ph = 328. \t\t\t#voltage corresponding to F_R = 8.33 A from OCC graph\n", - "regulation1 = 100*(E_ph - V_ph)/V_ph\n", - "print 'i)Regulation for 0.8 pf lagging is %.2f percent '%(regulation1)\n", - "\n", - "#case(ii)\n", - "\n", - "OC = V_ph*math.cos(phi)\n", - "BC = V_ph*math.sin(phi) - arm_leak_resis\n", - "E_1ph = math.sqrt( OC**2+BC**2 )\n", - "\n", - "F_f1 = 6.1 \t\t\t#corresponding value from OCC\n", - "F_R = math.sqrt( F_f1**2 + F_AR**2 -2*F_f1*F_AR*math.cos(math.radians(90-math.acos(math.radians(0.8)))))\n", - "E_ph = 90 \t\t\t#volatge corresponding to F_R = 3.34 A from OCC graph\n", - "regulation2 = 100*(E_ph - V_ph)/V_ph\n", - "print 'ii)Regulation for 0.8 pf leading is %.2f percent '%(regulation2)\n", - "print 'The answer in part ii doesnt match with textbook because of calculation mistake done in last step in the textbook'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Regulation for 0.8 pf lagging is 29.12 percent \n", - "ii)Regulation for 0.8 pf leading is -64.57 percent \n", - "The answer in part ii doesnt match with textbook because of calculation mistake done in last step in the textbook\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8 Page no : 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P = 1200.*10**3\n", - "V_line = 12000.\n", - "R_a = 2.\n", - "X_s = 35.\t\t\t#armature resistance and synchronous reactance\n", - "phi = math.acos(0.8)\n", - "\n", - "# Calculations\n", - "I_L = P/(math.sqrt(3)*V_line*math.cos(phi))\n", - "I_a = I_L\n", - "V_ph = V_line/math.sqrt(3)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Regulation at 0.8 lag power factor is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at 0.8 lag power factor is 26.66 percent\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9 Page no : 45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 11000. \n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 1000.*1000\n", - "I_L = VA/(V_L*math.sqrt(3))\n", - "\n", - "V_OC_ph = 433/math.sqrt(3)\n", - "I_asc_ph = I_L\n", - "\n", - "Z_s = V_OC_ph /I_asc_ph \t\t\t#ohms per phase\n", - "R_a = 0.45 \t\t\t#ohms per phase\n", - "X_s = math.sqrt(Z_s**2-R_a**2)\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "phi = math.acos(0.8) \t\t\t#lagging\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_L*R_a)**2 +(V_ph*math.sin(phi)+ I_L*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'Voltage regulation at 0.8 pf lagging is %f percent'%(regulation)\n", - "\n", - "#part(ii)\n", - "phi = math.acos(0.8) \t\t\t#leading\n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi)+I_L*R_a)**2 +(V_ph*math.sin(phi)- I_L*X_s)**2)\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'Voltage regulation at 0.8 pf lagging is %f percent'%(regulation2)\n", - "print 'Answer mismatches due to improper approximation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage regulation at 0.8 pf lagging is 2.690067 percent\n", - "Voltage regulation at 0.8 pf lagging is -1.996182 percent\n", - "Answer mismatches due to improper approximation\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10 Page no : 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "VA = 125.*10**3\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_L = VA/(math.sqrt(3)*V_L)\n", - "I_aph = I_L\n", - "\n", - "# Calculations\n", - "I_f = 4.\n", - "I_asc = I_aph/2 \t\t\t#for half load.. refer to graph\n", - "V_OC_line = 140.\n", - "V_OC_ph = V_OC_line/math.sqrt(3)\n", - "I_asc_ph = I_asc\n", - "Z_s = V_OC_ph/I_asc_ph\n", - "R_a = 0.1\n", - "X_s = math.sqrt(Z_s**2-R_a**2) \t\t\t#armature resistance and synchronous reactance\n", - "\n", - "phi = math.acos(0.8)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_asc*R_a)**2 +(V_ph*math.sin(phi)- I_asc*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Voltage regulation at 0.8 pf leading for half load is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage regulation at 0.8 pf leading for half load is -12.39 percent\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.11 Page no : 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "V_OC_line = 575.\n", - "V_OC_ph = V_OC_line/math.sqrt(3)\n", - "I_asc_line = 75.\n", - "I_asc_ph = I_asc_line \n", - "I_aph = I_asc_ph\n", - "I_L = I_aph\n", - "\n", - "Z_s = V_OC_ph/I_asc_ph\n", - "R_a = 2.16/2\n", - "X_s = math.sqrt(Z_s**2 - R_a**2)\n", - "\n", - "# Calculations and Results\n", - "#on full load\n", - "E_ph = 6100.\n", - "phi = math.acos(0.8) \t\t\t#leading\n", - "\n", - "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)- I_a*X_s)**2)\n", - "p = [1, -256.68, -3.71*10**7]\n", - "ans = roots(p)\n", - "V_ph = ans[0] \t\t\t#second root is ignored as its -ve\n", - "V_L = V_ph*math.sqrt(3)\n", - "print 'Rated terminal voltage between the lines is %.3f V '%(V_L)\n", - "VA_rating = math.sqrt(3)*V_L*I_L\n", - "print 'kVA rating of the alternator is %.f kVA'%(VA_rating*10**-3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rated terminal voltage between the lines is 10774.515 V \n", - "kVA rating of the alternator is 1400 kVA\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12 Page no : 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "V_L = 6600.\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 1500.*10**3\n", - "I_L = VA/(math.sqrt(3)*V_L)\n", - "I_aph = I_L\n", - "\n", - "# Calculations and Results\n", - "R_a = 0.5\n", - "X_s = 5\t\t\t#armature resistance and synchronous reactance\n", - "phi = math.acos(0.8)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", - "print 'Induced EMF per phase is %f V'%(E_ph)\n", - "\n", - "#full load \n", - "phi = math.acos(1)\n", - "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)- I_a*X_s)**2)\n", - "p = [1, 131.215, -1.791*10**7]\n", - "ans = roots(p)\n", - "V_ph = ans[1] \t\t\t#first root is ignored as it is -ve\n", - "print 'Terminal voltage per phase is %f V'%(V_ph)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced EMF per phase is 4284.243828 V\n", - "Terminal voltage per phase is 4166.921808 V\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13 Page no : 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_ph = 2000.\n", - "R_a = 0.8\n", - "I_sc = 100.\n", - "V_OC = 500.\n", - "I_f = 2.5\n", - "Z_s = V_OC/I_sc\n", - "X_s = math.sqrt(Z_s**2 - R_a**2 )\n", - "I_aFL = 100.\n", - "I_a = I_aFL\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "phi = math.acos(1)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)+ I_a*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'i)Voltage regulation is %.2f percent'%(regulation)\n", - "\n", - "#part(ii)\n", - "phi2 = math.acos(0.8)\n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2 +(V_ph*math.sin(phi2)- I_a*X_s)**2)\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'ii)Voltage regulation is %.2f percent'%(regulation2)\n", - "\n", - "#part(iii)\n", - "phi3 = math.acos(0.71)\n", - "E_ph3 = math.sqrt((V_ph*math.cos(phi3)+I_a*R_a)**2 +(V_ph*math.sin(phi3)+ I_a*X_s)**2)\n", - "regulation3 = 100*(E_ph3-V_ph)/V_ph\n", - "print 'iii)Voltage regulation is %.2f percent'%(regulation3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Voltage regulation is 6.89 percent\n", - "ii)Voltage regulation is -8.88 percent\n", - "iii)Voltage regulation is 21.11 percent\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.14 Page no : 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "VA = 1000.*1000\n", - "V_L = 4600. \n", - "V_ph = V_L/math.sqrt(3)\n", - "I_L = VA/(math.sqrt(3)*V_L)\n", - "I_aph_FL = I_L\n", - "I_aph = I_aph_FL\n", - "I_sc = (150./100)* I_aph_FL\n", - "V_OC_line = 1744\n", - "V_OC_ph = V_OC_line/math.sqrt(3)\n", - "\n", - "# Calculations\n", - "Z_s = V_OC_ph / I_sc\n", - "R_a = 1\n", - "X_s = math.sqrt(Z_s**2-R_a**2)\n", - "\n", - "phi = math.acos(0.8 ) \t\t\t#lagging\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Voltage regulation at full load 0.8 pf is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage regulation at full load 0.8 pf is 19.89 percent\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.15 Page no : 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "\n", - "#part(i) Ampere turn method\n", - "# Variables\n", - "F_O = 37.5\n", - "F_AR = 20.\n", - "V_L = 6600.\n", - "V_ph = V_L/math.sqrt(3)\n", - "\n", - "# Calculations and Results\n", - "#lagging\n", - "phi = math.acos(0.8) \n", - "F_R = math.sqrt((F_O+F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", - "#E_ph corresponding to F_R can be obtained by plotting open circuit characteristics\n", - "E_ph = 4350\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'i)By Ampere-turn method or MMF methodFull-load regulation at 0.8 lagging pf is %.2f percent'%(regulation)\n", - "#leading\n", - "phi = math.acos(0.8) \n", - "F_R = math.sqrt((F_O-F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", - "#E_ph corresponding to F_R can be obtained by plotting open circuit characteristics\n", - "E_ph = 3000\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'Full-load regulation at 0.8 leading pf is %.2f percent'%(regulation)\n", - "\n", - "#EMF method\n", - "V_OC_ph = 100\n", - "V_ph = 100\n", - "I_sc = 100*(F_O/F_AR) \t\t\t#times the rated value\n", - "Z_s = V_OC_ph/I_sc\n", - "F_O = 100\n", - "F_AR = Z_s*100\n", - "\n", - "#lagging\n", - "phi = math.acos(0.8)\n", - "F_R = math.sqrt((F_O+F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", - "regulation = 100*(F_R-V_ph)/V_ph\n", - "print 'iiSynchronous impedance method or EMF method'\n", - "print 'Full-load regulation at 0.8 lagging pf is %.2f percent'%(regulation)\n", - "#leading\n", - "phi = math.acos(0.8)\n", - "F_R = math.sqrt((F_O-F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", - "regulation = 100*(F_R-V_ph)/V_ph\n", - "print 'Full-load regulation at 0.8 leading pf is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)By Ampere-turn method or MMF methodFull-load regulation at 0.8 lagging pf is 14.16 percent\n", - "Full-load regulation at 0.8 leading pf is -21.27 percent\n", - "iiSynchronous impedance method or EMF method\n", - "Full-load regulation at 0.8 lagging pf is 38.72 percent\n", - "Full-load regulation at 0.8 leading pf is -19.72 percent\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.16 Page no : 56" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6000.\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_ph_X_Lph = 0.9*500 \t\t\t#leakage reactance drop in volts = 0.9 cm * 500 V/cm\n", - "phi = math.acos(0.8) \t\t\t#lagging\n", - "\n", - "# Calculations\n", - "E_1ph = math.sqrt( (V_ph*math.cos(phi))**2 + (V_ph*math.sin(phi)+I_ph_X_Lph)**2 ) \t\t\t#From triangle OAB\n", - "F_f1 = 26 \t\t\t#from OCC\n", - "F_AR = 2.9*5 \t\t\t#2.9cm * 5 A/cm\n", - "\n", - "F_R = math.sqrt(F_f1**2 + F_AR**2 -2*F_AR*F_f1*math.cos(phi+ (math.pi/2)) )\n", - "\n", - "# Results\n", - "print 'Required field current is %.2f A'%(F_R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required field current is 36.59 A\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.17 Page no : 58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 40.*10**3\n", - "I_L = VA/(math.sqrt(3)*V_L) \n", - "I_aph = I_L\n", - "\n", - "# Calculations and Results\n", - "I_aph_X_Lph = 0.65*50 \t\t\t#leakage reactance drop in volts = 2.4 cm * 500 V/cm\n", - "X_Lph = I_aph_X_Lph/ I_aph\n", - "print 'Armature leakage reactance is %.3f ohms'%(X_Lph)\n", - "phi = math.acos(0.8) \t\t\t#lagging\n", - "E_ph = math.sqrt((V_ph*math.cos(phi))**2 +(V_ph*math.sin(phi)+ I_aph_X_Lph)**2)\n", - "F_f1 = 15.6 \t\t\t#as obtained from OCC corresponding to this E_ph\n", - "\n", - "F_AR = 2.3*3 \t\t\t#2.3cm * 3 A/cm\n", - "print 'Armature reaction is %.1f '%(F_AR)\n", - "F_R = math.sqrt(F_f1**2 + F_AR**2 -2*F_AR*F_f1*math.cos(phi+ (math.pi/2)) ) \t\t\t#math.comath.sine rule to Triangle OAB\n", - "E_ph = 267.5 \t\t\t#corresponding to F_R from open circiut characteristics\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'Voltage regulation at 0.8 pf lagging is %.1f percent'%(regulation)\n", - "\n", - "\n", - "#Note:This answer doesnt match with textbook as it has been reciprocated in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature leakage reactance is 0.563 ohms\n", - "Armature reaction is 6.9 \n", - "Voltage regulation at 0.8 pf lagging is 15.8 percent\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.18 Page no : 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "VA = 10.*10**3\n", - "V_L = 11.*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_ph_X_Lph = 2.4*500 \t\t\t#leakage reactance drop in volts = 2.4 cm * 500 V/cm\n", - "\n", - "# Calculations\n", - "I_ph_R_aph = VA/(math.sqrt(3)*V_L)\n", - "phi = math.acos(0.8)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_ph_R_aph)**2 +(V_ph*math.sin(phi)+ I_ph_X_Lph)**2)\n", - "F_f1 = 109 \t\t\t#obtained from open circuit characteristics corresponding to calculated E_ph\n", - "F_AR = 2.8*10 \t\t\t#2.8cm * 10 A/cm\n", - "F_R = math.sqrt(F_f1**2 + F_AR**2 -2*F_AR*F_f1*math.cos(phi+ (math.pi/2)) ) \t\t\t#math.comath.sine rule to Triangle OAB\n", - "E_ph = 7700. \t\t\t#corresponding to F_R from open circiut characteristics\n", - "\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Voltage regulation at full-load 0.8 pf lagging is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage regulation at full-load 0.8 pf lagging is 21.24 percent\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.19 Page no : 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "VA = 2000.*1000\n", - "V_L = 11000.\n", - "V_ph = V_L/math.sqrt(3)\n", - "R_a = 0.3\n", - "X_s = 5. \t\t\t#armature resistance and synchronous reactance\n", - "\n", - "# Calculations\n", - "#case (i)\n", - "phi = math.acos(0.8) \t\t\t#lagging\n", - "I_L = VA/(math.sqrt(3)*V_L) \n", - "I_a = I_L\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)+ I_a*X_s)**2)\n", - "\n", - "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", - "#we get V_ph**2 -579.4455 V_ph -44653301.91 = 0\n", - "p = [1, -579.4455, -44653301.91]\n", - "ans = roots(p)\n", - "V_ph = ans[0] \t\t#second root is ignored as its -ve\n", - "print 'Terminal voltage is %.4f V'%(V_ph)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminal voltage is 6978.3131 V\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.20 Page no : 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "R_a = 0.6\n", - "X_s = 6. \t\t\t#armature resistance and synchronous reactance per phase\n", - "E_L = 6599.\n", - "E_ph = E_L/math.sqrt(3)\n", - "I_L = 180.\n", - "I_a = I_L\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "# using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)+ I_a*X_s)**2) and solving for V_ph\n", - "p = [1 ,1135.83, -13338836.49]\n", - "ans = roots(p)\n", - "V_ph = ans[1]\n", - "V_L = V_ph*math.sqrt(3)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "phi = math.acos(0.9)\n", - "theta = math.atan((I_a*X_s+V_ph*math.sin(phi) )/(E_ph))\n", - "delta = theta-phi\n", - "print 'i)0.9 laggingTerminal voltage is %.2f VVoltage regulation is %.2f percentLoad angle is %.2f degrees'%(V_ph*math.sqrt(3),regulation,delta*180/math.pi)\n", - "\n", - "#part(ii)\n", - "phi_2 = math.acos(0.8)\n", - "p = [1, -941.53, -11399574.87]\n", - "ans = roots(p) \n", - "V_ph = ans[0] \t\t\t#second root is ignored as its -ve\n", - "V_L = V_ph*math.sqrt(3)\n", - "regulation2 = 100*(E_ph-V_ph)/V_ph\n", - "delta_2 = math.asin( (math.tan(phi)*(V_ph*math.cos(phi_2)+I_a*R_a) -I_a*X_s )/E_ph )\n", - "print 'ii)0.8 leadingTerminal voltage is %.2f VVoltage regulation is %.2f percentLoad angle is %.2f degrees'%(V_L,regulation2,delta_2*180/math.pi)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)0.9 laggingTerminal voltage is 5418.22 VVoltage regulation is 21.79 percentLoad angle is 6.83 degrees\n", - "ii)0.8 leadingTerminal voltage is 6719.93 VVoltage regulation is -1.80 percentLoad angle is 7.17 degrees\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.21 Page no : 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_ph = 2000.\n", - "R_a = 0.8\n", - "I_sc = 100.\n", - "I_a = I_sc\n", - "V_OC = 500.\n", - "I_f = 2.5\n", - "Z_s = V_OC/I_sc\n", - "\n", - "X_s = math.sqrt(Z_s**2- R_a**2)\n", - "I_a_FL = 100.\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "phi1 = math.acos(1) \t\t\t#and lagging\n", - "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", - "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", - "print 'Regulation at upf is %.2f percent'%(regulation1)\n", - "\n", - "#Part(ii)\n", - "phi2 = math.acos(0.8) \n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2)\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'Regulation at 0.8 leading pf is %.2f percent'%(regulation2)\n", - "\n", - "#Part(iii)\n", - "phi3 = math.acos(0.71) \n", - "E_ph3 = math.sqrt((V_ph*math.cos(phi3)+I_a*R_a)**2+(V_ph*math.sin(phi3)+I_a*X_s)**2)\n", - "regulation3 = 100*(E_ph3-V_ph)/V_ph\n", - "print 'Regulation at 0.71 lagging pf is %.2f percent'%(regulation3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at upf is 6.89 percent\n", - "Regulation at 0.8 leading pf is -8.88 percent\n", - "Regulation at 0.71 lagging pf is 21.11 percent\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.22 Page no : 68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V = 600.\n", - "VA = 60.*10**3\n", - "I_sc = 210.\n", - "V_oc = 480.\n", - "I_f = 10.\n", - "R_a = 0.2\n", - "\n", - "I = VA/V \t\t\t#VA = V*I and alternator is math.single phase\n", - "I_a = I\n", - "\n", - "# Calculations and Results\n", - "Z_s = V_oc/I_sc \t\t\t#Synchronous Impedance\n", - "X_s = math.sqrt(Z_s**2-R_a**2) \t\t\t#SYnchronous reactance\n", - "print 'Synchronous impedances is %f ohms and synchronous reactance is %f ohms'%(Z_s,X_s)\n", - "\n", - "#PART (i)\n", - "phi1 = math.acos(0.8) \t\t\t#and lagging\n", - "E1 = math.sqrt((V*math.cos(phi1)+I_a*R_a)**2+(V*math.sin(phi1)+I_a*X_s)**2) \t\t\t#plus sign for lagging power factor\n", - "regulation1 = 100*(E1-V)/V\n", - "print 'Regulation at 0.8 lagging pf is %.2f percent '%(regulation1 )\n", - "\n", - "#PART (ii)\n", - "phi2 = math.acos(1) \n", - "E2 = math.sqrt((V*math.cos(phi2)+I_a*R_a)**2+(V*math.sin(phi2)+I_a*X_s)**2) \n", - "regulation2 = 100*(E2-V)/V\n", - "print 'Regulation at UNITY pf is %.2f percent '%(regulation2 )\n", - "\n", - "#PART (iii)\n", - "phi3 = math.acos(0.6) \t\t\t#and leading \n", - "E3 = math.sqrt((V*math.cos(phi3)+I_a*R_a)**2+(V*math.sin(phi3)-I_a*X_s)**2) \t\t\t#minus sign for leading power factor\n", - "regulation3 = 100*(E3-V)/V\n", - "print 'Regulation at 0.6 leading pf is %.2f percent '%(regulation3 )\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronous impedances is 2.285714 ohms and synchronous reactance is 2.276947 ohms\n", - "Regulation at 0.8 lagging pf is 28.60 percent \n", - "Regulation at UNITY pf is 10.08 percent \n", - "Regulation at 0.6 leading pf is -23.98 percent \n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.23 Page no : 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3300.\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_a = 100.\n", - "I_f = 5.\n", - "V_OC_line = 900. \n", - "V_OC_ph = V_OC_line/math.sqrt(3) \n", - "R_a = 0.8 \t\t\t#armature resistance\n", - "I_aph = I_a\n", - "Z_s = V_OC_ph/I_aph\n", - "X_s = math.sqrt(Z_s**2-R_a**2) \t\t\t#synchronous reactance\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "phi1 = math.acos(0.8) \t\t\t#and lagging\n", - "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", - "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", - "print 'Regulation at 0.8 lagging is %.2f percent'%(regulation1)\n", - "\n", - "#Part(ii)\n", - "phi2 = math.acos(0.8) \t\t\t#and leading\n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2)\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'Regulation at 0.8 leading pf is %.2f percent'%(regulation2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at 0.8 lagging is 21.03 percent\n", - "Regulation at 0.8 leading pf is -9.55 percent\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.24 Page no : 70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 13500.\n", - "R_a = 1.5 \n", - "X_s = 30. \t\t\t#armature resistance and synchronous reactance\n", - "V_ph = V_L/math.sqrt(3)\n", - "\n", - "# Calculations and Results\n", - "#CASE 1\n", - "phi1 = math.acos(0.8)\n", - "P_out = 1280*10**3\n", - "I_L = P_out/ (math.sqrt(3)*V_L*math.cos(phi1) ) \t\t\t#because P_out = math.sqrt(3)*V_L*I_L*math.cos(phi)\n", - "\n", - "I_a = I_L\n", - "E_ph = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'Regulation at 0.8 lagging power factor is %.2f percent'%(regulation)\n", - "\n", - "#Case 2\n", - "phi2 = math.acos(1)\n", - "I_L = P_out/ (math.sqrt(3)*V_L*math.cos(phi2) ) \t\t\t#because P_out = math.sqrt(3)*V_L*I_L*math.cos(phi)\n", - "\n", - "I_a = I_L\n", - "E_ph = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)+I_a*X_s)**2)\n", - "regulation2 = 100*(E_ph-V_ph)/V_ph\n", - "print 'Regulation at unity power factor is %.2f percent'%(regulation2)\n", - "\n", - "#case 3\n", - "phi3 = math.acos(0.8)\n", - "I_L = P_out/ (math.sqrt(3)*V_L*math.cos(phi3) ) \t\t\t#because P_out = math.sqrt(3)*V_L*I_L*math.cos(phi)\n", - "I_a = I_L\n", - "E_ph = math.sqrt((V_ph*math.cos(phi3)+I_a*R_a)**2+(V_ph*math.sin(phi3)-I_a*X_s)**2)\t\t\t# minus sign in the second bracket beacuse of leading pf\n", - "regulation3 = 100*(E_ph-V_ph)/V_ph\n", - "print 'Regulation at 0.8 leading power factor is %.2f percent'%(regulation3)\n", - "\n", - "# note : rounding off error" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at 0.8 lagging power factor is 18.60 percent\n", - "Regulation at unity power factor is 3.23 percent\n", - "Regulation at 0.8 leading power factor is -11.99 percent\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.26 Page no : 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 11.*10**3\n", - "VA_rating = 10.**6\n", - "R_a = 2.2 \t\t\t#alternator resistance\n", - "phi = math.acos(0.8)\n", - "\n", - "# Calculations\n", - "I_L = VA_rating/(math.sqrt(3)*V_L)\t\t\t#VA = math.sqrt(3)V_L*I_L\n", - "I_a = I_L\n", - "V_ph = V_L/math.sqrt(3)\n", - "regulation = 24.\n", - "\n", - "E_ph = ((regulation/100)+1)*V_ph \t\t\t# because regulation = 100*(E_ph-V_ph)/V_ph\n", - "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*X_s)**2)\n", - "X_s = (math.sqrt(E_ph**2-((V_ph*math.cos(phi)+I_a*R_a)**2))-V_ph*math.sin(phi))*(1/I_a)\n", - "\n", - "phi1 = math.acos(0.8)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)-I_a*X_s)**2)\n", - "regulation1 = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Regulation at 0.8 leading power factor is %.2f percent'%(regulation1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at 0.8 leading power factor is -13.90 percent\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.27 Page no : 73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 220.\n", - "VA = 100.*10**3\n", - "R_a = 0.1 \t\t\t#effective resistacne of alternator\n", - "X_a = 0.5 \t\t\t#leakage reactance\n", - "X_ar = 2*X_a\n", - "\n", - "Z_s = complex(R_a,X_a+X_ar)\n", - "\n", - "# Calculations and Results\n", - "#Part(1)\n", - "phi = math.acos(0.4)\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_L = VA/(math.sqrt(3)*V_L)\t\t\t#VA = math.sqrt(3)*V_L*I_L\n", - "I_a = I_L\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*(X_a+X_ar))**2)\n", - "print 'i)Required noload voltage is %.3f V'%(E_ph)\n", - "\n", - "#Part(2)\n", - "V_ph2 = 0\n", - "E_ph2 = math.sqrt((V_ph2*math.cos(phi)+I_a*R_a)**2+(V_ph2*math.sin(phi)+I_a*(X_a+X_ar))**2)\n", - "print 'ii)Required noload voltage is %.3f V'%(E_ph2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Required noload voltage is 515.848 V\n", - "ii)Required noload voltage is 394.522 V\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.28 Page no : 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 2000.\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 1000.*10**3\n", - "I_L = VA/(math.sqrt(3)*V_L) \t\t\t#because VA = math.sqrt(3)*V_L*I_L\n", - "I_aph = I_L\n", - "\n", - "I_f = 28.5\t\t\t#for this I_aph = 288.67513 as obtained from SCC graph\n", - "V_oc_ph = 1060.\t\t\t#for I_f = 28.5 as obtained fromOCC graph\n", - "Z_s = V_oc_ph/I_aph\n", - "R_a = 0.2 \t\t\t#armature effective resistance\n", - "X_s = math.sqrt( Z_s**2-R_a**2 )\n", - "\n", - "# Calculations and Results\n", - "#Part(i)\n", - "phi1 = math.acos(0.8)\t\t\t#lagging\n", - "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_aph*R_a)**2+(V_ph*math.sin(phi1)+I_aph*X_s)**2)\n", - "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", - "print \"i)Full-load percentage regulation at 0.8 pf lagging is %.2f percent\"%(regulation1)\n", - "\n", - "#Part(ii)\n", - "phi2 = math.acos(0.8)\t\t\t#leading\n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_aph*R_a)**2+(V_ph*math.sin(phi2)-I_aph*X_s)**2)\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print \"ii)Full-load percentage regulation at 0.8 pf leading is %.2f percent\"%(regulation2)\n", - "print 'Note that the answer mismatches because of calculation mistake done in the last step of part 1'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Full-load percentage regulation at 0.8 pf lagging is 73.86 percent\n", - "ii)Full-load percentage regulation at 0.8 pf leading is -9.29 percent\n", - "Note that the answer mismatches because of calculation mistake done in the last step of part 1\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.29 Page no : 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3300.\n", - "VA = 200.*10**3\n", - "R_a = 0.6\n", - "X_s = 6.\t\t\t#armature resistance and synchronous reactance\n", - "\n", - "# Calculations\n", - "I_L = VA/(math.sqrt(3)*V_L)\t\t\t#VA = math.sqrt(3)V_L*I_L\n", - "I_a = I_L\n", - "V_ph = V_L/math.sqrt(3)\n", - "phi = math.acos(0.8)\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*X_s)**2)\n", - "\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "\n", - "# Results\n", - "print 'Regulation at 0.8 lagging power factor is %.3f percent'%(regulation)\n", - "print ' Note : Regulation is positive for lagging power factor loads'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Regulation at 0.8 lagging power factor is 7.802 percent\n", - " Note : Regulation is positive for lagging power factor loads\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.30 Page no : 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 2300. \n", - "V_ph = V_L/math.sqrt(3)\n", - "f = 50.\n", - "R_a = 0.2 \t\t\t#armature resistance\n", - "I_sc = 150.\n", - "V_OC_line = 780. \n", - "V_OC_ph = V_OC_line/math.sqrt(3)\n", - "\n", - "Z_s = V_OC_ph/I_sc\n", - "X_s = math.sqrt(Z_s**2 - R_a**2)\n", - "I_aph = 25 \n", - "I_aFL = I_aph\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "phi = math.acos(0.8) \t\t\t#lag\n", - "E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", - "regulation = 100*(E_ph-V_ph)/V_ph\n", - "print 'Voltage regulation at 0.8 pf lagging is %.3f percent'%(regulation)\n", - "\n", - "#part(ii)\n", - "phi2 = math.acos(0.8) \t\t\t#lead\n", - "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_aph*R_a)**2 +(V_ph*math.sin(phi2)- I_aph*X_s)**2 )\n", - "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", - "print 'Voltage regulation at 0.8 pf leading is %.3f percent'%(regulation2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage regulation at 0.8 pf lagging is 3.774 percent\n", - "Voltage regulation at 0.8 pf leading is -2.967 percent\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch6.ipynb b/DC_Machines_and_Synchronous_Machines/ch6.ipynb deleted file mode 100755 index b2228585..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch6.ipynb +++ /dev/null @@ -1,2427 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:9f548e729a327e12aefb50cf84c5cae777df427713c1104c34d610a547e935f3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6 : Synchronization and Parallel Operation of Alternators" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " \n", - "Example 6.2 Page no : 31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "X_d = 0.7 \n", - "X_q = 0.4 \t\t\t#direct and quadrature axis synchronous reactance p.u.\n", - "R_a = 0\n", - "phi = math.acos(0.8) \t\t\t#Lag\n", - "\n", - "V_t = 1. \t\t\t#assumed rated terminal Voltage \n", - "I_a = 1. \t\t\t#Full-load armature current\n", - "\n", - "# Calculations\n", - "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", - "delta = psi-phi\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "\n", - "# Results\n", - "print 'Total e.m.f induced on open circuit is %.4f p.u.'%(E_f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total e.m.f induced on open circuit is 1.5149 p.u.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3 Page no : 35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp((math.pi*Theeeta/180.)*1j);\n", - "\n", - "# Variables\n", - "Z1 = complex(0,3) \t\t\t#impedance of alternator 1\n", - "Z2 = complex(0,4) \t\t\t#impedance of alternator 2\n", - "Z = 6. #load\n", - "\n", - "E1 = p2z(220,0) \t\t\t#induced emf vector on no load\n", - "E2 = p2z(220,10)\t\t\t#induced emf vector on no load\n", - "\n", - "# Calculations and Results\n", - "I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)\n", - "I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)\n", - "\n", - "phi1 = math.degrees(math.atan(I1.imag/I1.real)) \t\t\t#Phasemag returns the angle of complex number in degrees\n", - "phi2 = math.degrees(math.atan(I2.imag/I2.real)) \t\t\t#Phasemag returns the angle of complex number in degrees\n", - "\n", - "I = I1+I2\n", - "V = I*Z \t\t\t#Terminal voltage\n", - "print 'i) Terminal voltage is %.1f volts at %.2f degrees'%(abs(V),math.degrees(math.atan(V.imag/V.real)))\n", - "print 'ii) Currents are %.2f A at %.2f degrees and %.2f A at %.2f degrees \\\n", - "\\nTotal current is %.2f A at %.2f degrees '%(abs(I1),math.degrees(math.atan(I1.imag/I1.real)),\\\n", - " abs(I2),math.degrees(math.atan(I2.imag/I2.real)),\\\n", - " abs(I),math.degrees(math.atan(I.imag/I.real)))\n", - "\n", - "P1 = abs(V)*abs(I1)*math.cos(math.radians(phi1))\n", - "P2 = abs(V)*abs(I2)*math.cos(math.radians(phi2))\n", - "print 'iii)Power delivered is %.2f watts and %.2f watts'%(P1,P2)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Terminal voltage is 210.7 volts at -11.66 degrees\n", - "ii) Currents are 14.91 A at -17.71 degrees and 20.36 A at -7.24 degrees \n", - "Total current is 35.12 A at -11.66 degrees \n", - "iii)Power delivered is 2992.46 watts and 4257.11 watts\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4 Page no : 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_l = 10000.\n", - "V_ph = V_l/math.sqrt(3)\n", - "VA = 10.*10**6\n", - "I_FL = VA/(V_l*math.sqrt(3)) \t\t\t#Current at full laod\n", - "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", - "\n", - "# Calculations\n", - "X_s = IX_s/I_FL\n", - "N_s = 1500.\n", - "f = 50.\n", - "P = 120*f/N_s \t\t\t#poles\n", - "\n", - "delta_dash_mech = math.pi/180 \t\t\t#phase print lacement in degree mechanical\n", - "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", - "E = V_ph \t\t\t#math.since alternator is on no-load\n", - "P_SY = delta_dash_elec*E**2/X_s \t\t\t#Synchronous Power\n", - "P_SY_3ph = P_SY*3 \t\t\t#For 3 phases\n", - "\n", - "# Results\n", - "print 'Synchronising Power of armature is %.3f kW.\\\n", - "\\nSynchronising Power for 3 phase is %.3f kW'%(P_SY*10**-3,P_SY_3ph*10**-3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising Power of armature is 581.776 kW.\n", - "Synchronising Power for 3 phase is 1745.329 kW\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5 Page no : 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "# Variables\n", - "V_L = 6.6*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 3.*10**6\n", - "I_FL = VA/(V_L*math.sqrt(3)) \t\t\t#full load current \n", - "P = 8.\n", - "f = 50. \t\t\t#poles and frequency\n", - "\n", - "X_s = complex(0,2.9)\t\t\t#X_s = 2.9\n", - "delta_dash_mech = math.pi/180\n", - "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "E = V_ph\n", - "P_SY = delta_dash_elec*E**2/abs(X_s) \t\t\t#Synchronous Power per phase\n", - "P_SY_3ph = P_SY*3 \t\t\t#For 3 phases\n", - "print 'i) Synchronising power at no load is %.3f kW'%(P_SY*10**-3)\n", - "print ' Total Synchronising power at no load is %.2f kW'%(P_SY_3ph*10**-3)\n", - "\n", - "N_s = 120*f/P \t\t\t#in rpm\n", - "n_s = (N_s)/60 \t\t\t#in rps\n", - "T_SY = P_SY_3ph/(2*math.pi*n_s)\n", - "print 'Synchronous torque per mechanical degree of phase print lacement is %.2f * 10**3 N-m'%(T_SY*10**-3)\n", - "\n", - "#part(ii)\n", - "phi = math.acos(math.radians(0.85))\n", - "I = p2z(I_FL,0)\n", - "V = p2z(V_ph,phi)\n", - "\n", - "E = V+I*X_s\n", - "#E leads I by phasemag(E). V leads I by phasemag(V)\n", - "\n", - "delta = (math.pi/180)* (math.atan(E.imag/E.real)-math.atan(V.imag/V.real) ) \t\t\t#power angle in radians\n", - "P_SY2 = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)\n", - "\n", - "P_SY_total_2 = 3*P_SY2\n", - "#n_s = T_SY/(P_SY/(2*math.pi) ) \t\t\t#because T_SY = P_SY/(2*math.pi*n_s)\n", - "print 'ii)Total Synchronising power is %.0f kW'%(P_SY_total_2*10**-3)\n", - "\n", - "T_SY2 = P_SY_total_2/(2*math.pi*n_s)\n", - "print 'Synchronising torque is %.2f * 10**3 N-m'%(T_SY2/1000)\n", - "\n", - "# note : book answer is wrong.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Synchronising power at no load is 349.547 kW\n", - " Total Synchronising power at no load is 1048.64 kW\n", - "Synchronous torque per mechanical degree of phase print lacement is 13.35 * 10**3 N-m\n", - "ii)Total Synchronising power is 1074 kW\n", - "Synchronising torque is 13.68 * 10**3 N-m\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6 Page no : 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.)\n", - "\n", - "# Variables\n", - "V_l = 10.*10**3\n", - "V_ph = V_l/math.sqrt(3)\n", - "R_a = 0.4\n", - "Z = complex(R_a,6)\n", - "I_a = p2z(300,-math.acos(math.radians(0.8)))\n", - "E = V_ph+I_a*Z\n", - "\n", - "# Calculations\n", - "phi = math.acos(0.8)\n", - "alternator_op_ph = V_ph*abs(I_a)*math.cos(phi) \t\t\t#Power delivered to infinite bus per phase\n", - "\n", - "#Power deliered to the altrernator = Power delivewred to bus bar + I**2*R losses in armature\n", - "alternator_power = alternator_op_ph+ abs(I_a)**2*R_a\n", - "\n", - "#this power developed remains constant.change pf to 1 and calculate corresponding armature current\n", - "#alternator_power = V_ph*I_a1*math.cos(phi1)+I_a1**2*0.4\n", - "#solve the quadratic equation 0.4 I_a1**2+5773.50 I_a1- 1421640 = 0\n", - "I_a1 = (-1*V_ph+math.sqrt(V_ph**2-4*R_a*-1*alternator_power))/(2*R_a)\n", - "\n", - "#also as follows \n", - "E1 = V_ph+I_a1*Z\n", - "decrease = 100*(abs(E)-abs(E1))/abs(E)\n", - "\n", - "# Results\n", - "print 'Percentage decrease in induced e.m.f is %.1f percent'%(decrease)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage decrease in induced e.m.f is 2.6 percent\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7 Page no : 58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#Line PQ for Altermnator 1 and PR for alternaator 2.AB is at frequency x from P where total load is 3000 kW\n", - "\n", - "# Variables\n", - "QC = 2000.\n", - "PS = 2.5\n", - "#PC = x\n", - "TR = 2000.\n", - "PT = 2.\n", - "\n", - "# Calculations and Results\n", - "#using similarity of triangles PAC and PQS\n", - "AC_by_PC = (QC/PS)\t\t\t# because (AC/QC) = (PC/PS)\n", - "#using similarity of triangles PCB and PTR\n", - "CB_by_PC = (TR/PT) \t\t\t# because (CB/TR) = (PC/PT)\n", - "\n", - "AC_by_x = AC_by_PC \t\t\t#which implies AC = 12.5*x\n", - "CB_by_x = CB_by_PC \t\t\t#which implies CB = 16.67*x\n", - "\n", - "AC_plus_CB = 3000. \t\t\t#total load at the frequency at P is 30 kW\n", - "x = AC_plus_CB/(AC_by_x + CB_by_x)\n", - "AC = AC_by_x * x\n", - "CB = CB_by_x * x \n", - "frequency = 50-x\n", - "print 'Loads shared by alternator 1 and 2 are %.2f kW and %.2f kW respectively'%(AC,CB)\n", - "\n", - "#construction for max load: RT is extended to cut PQ at X.\n", - "QS = 2000.\n", - "RT = 2000. \t\t\t#see figure\n", - "XT = QS*(PT/PS)\n", - "RX = RT+XT \t\t\t#maximum load\n", - "\n", - "print 'Maximum load is %.0f kW'%(RX)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loads shared by alternator 1 and 2 are 1333.33 kW and 1666.67 kW respectively\n", - "Maximum load is 3600 kW\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8 Page no : 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P_out = 1500.*10**3\n", - "V_L = 11000.\n", - "phi = math.acos(0.8)\n", - "I_L = P_out/(math.sqrt(3)*V_L*math.cos(phi))\n", - "\n", - "I_L_actv = I_L*math.cos(phi) \t\t\t#wattful or active component of current\n", - "I_L_reactive = I_L*math.sin(phi) \t\t\t#wattless or reactive component of current\n", - "\n", - "# Calculations and Results\n", - "I_each = I_L/2 \t\t\t#in identical conditions\n", - "I_arm1 = 45. \t\t\t#given\n", - "I_1_reactive = math.sqrt(I_arm1**2-39.364**2 ) \t\t\t#from the power triangle \n", - "I_2_reactive = 59.046-21.80\n", - "I_a_2 = math.sqrt( 39.364**2 + I_2_reactive**2 ) \t\t\t#required armature current of 2nd alternator\n", - "print 'Required armature current of second alternator is %.4f A'%(I_a_2)\n", - "#power factors of 2 machines\n", - "cos_phi1 = 39.364/45 \n", - "cos_phi2 = 39.364/54.1921\n", - "\n", - "print 'Power factors are %.4f lagging and %.4f lagging'%(cos_phi1,cos_phi2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required armature current of second alternator is 54.1921 A\n", - "Power factors are 0.8748 lagging and 0.7264 lagging\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9 Page no : 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#Line AB for Altermnator 1 and AC for alternator 2.AF is at frequency x measured from A where total load is 3000 kW\n", - "# Variables\n", - "BO = 2000.\n", - "AO = 5.\t\t\t#AF = x\n", - "DC = 2000.\n", - "AD = 3.\n", - "#AF = x\n", - "\n", - "# Calculations\n", - "#using similarity of triangles AEF and ABO\n", - "EF_by_AF = (BO/AO)\t\t\t# because (EF/BO) = (AF/AO)\n", - "#using similarity of triangles AFG and ADC\n", - "FG_by_AF = (DC/AD) \t\t\t#because (FG/DC) = (AF/AD)\n", - "\n", - "EF_by_x = EF_by_AF \t\t\t#which implies EF = 400*x\n", - "FG_by_x = FG_by_AF \t\t\t#which implies FG = 666.67*x\n", - "\n", - "EF_plus_FG = 3000 \t\t\t#total load at the frequency at P is 3000 kW\n", - "x = EF_plus_FG/(EF_by_x + FG_by_x)\n", - "EF = (BO/AO)*x\n", - "FG = (DC/AD)*x \n", - "\n", - "# Results\n", - "print 'Loads shared by machine 1 and 2 are %.0f kW and %.0f kW respectively'%(EF,FG)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loads shared by machine 1 and 2 are 1125 kW and 1875 kW respectively\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10 Page no : 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "# Variables\n", - "V_l = 6000.\n", - "V_ph = V_l/math.sqrt(3)\n", - "VA = 2000.*10**3\n", - "I_FL = VA/(V_l*math.sqrt(3))\n", - "X_s = complex(0,6) \t\t\t#synchronous reactance\n", - "P = 8.\n", - "f = 50.\n", - "\n", - "delta_mech = math.pi/180 \t\t\t#phase print lacemant in degree mechanical \n", - "#phase print lacemant in degree electrical\n", - "delta_elec = delta_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", - "\n", - "phi = math.acos(math.radians(0.8))\n", - "V = p2z(V_ph,phi)\n", - "E = V+I_FL*X_s\n", - "#E leads I by phasemag(E). V leads I by phasemag(V)\n", - "\n", - "# Calculations and Results\n", - "delta = (math.pi/180)* (math.atan(E.imag/E.real)-(math.atan(V.imag/V.real ) ) ) \t\t\t#power angle in radians\n", - "P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_elec)/abs(X_s) \t\t\t#Synchronising power\n", - "P_SY_total = 3*P_SY \t\t\t#totla Synchronising power \n", - "print 'Total Synchronising power is %.3f kW'%(10**-3*P_SY_total)\n", - "\n", - "N_s = 120*f/P \t\t\t#in rpm\n", - "n_s = (N_s)/60 \t\t\t#in rps\n", - "T_SY = P_SY_total/(2*math.pi*n_s)\n", - "print 'Synchronising torque is %.0f N-m'%(T_SY)\n", - "\n", - "# note : book answer it seems wrong." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total Synchronising power is 444.753 kW\n", - "Synchronising torque is 5663 N-m\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.11 Page no : 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "# Variables\n", - "V_l = 3300.\n", - "V_ph = V_l/math.sqrt(3)\n", - "VA = 3*10.**6\n", - "I_FL = VA/(V_l*math.sqrt(3))\n", - "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = complex(0,IX_s/I_FL) \t\t\t#synchronous reactance\n", - "N_s = 1000. \t\t\t#in rpm\n", - "P = 6.\n", - "f = 50.\n", - "\n", - "# Calculations and Results\n", - "delta_dash_mech = math.pi/180\n", - "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", - "\n", - "I = I_FL\n", - "phi = math.acos(math.radians(0.8))\n", - "V = p2z(V_ph,phi)\n", - "E = V+I*X_s\n", - "#E leads I by phasemag(E). V leads I by phasemag(V)\n", - "\n", - "delta = (math.pi/180)* (math.atan(E.imag/E.real)-math.atan(V.imag/V.real) ) \t\t\t#power angle in radians\n", - "P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase\n", - "print 'Synchronising power is %.3f kW'%(10**-3*P_SY)\n", - "P_SY_total = 3*P_SY \t\t\t#Total Synchronising power\n", - "\n", - "N_s = 120*f/P \t\t\t#in rpm\n", - "n_s = (N_s)/60 \t\t\t#in rps\n", - "T_SY = P_SY_total/(2*math.pi*n_s)\n", - "print 'Synchronising torque is %.0f N-m'%(T_SY)\n", - "\n", - "print 'Answer mismatches due to approximation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power is 217.160 kW\n", - "Synchronising torque is 6221 N-m\n", - "Answer mismatches due to approximation\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12 Page no : 65" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_l = 3300.\n", - "V_ph = V_l/math.sqrt(3)\n", - "VA = 3*10.**6\n", - "I_FL = VA/(V_l*math.sqrt(3))\n", - "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = complex(0,IX_s/I_FL) \t\t\t#synchronous reactance\n", - "N_s = 1000.\n", - "P = 6.\n", - "f = 50.\n", - "\n", - "delta_dash_mech = math.pi/180 \t\t\t#phase print lacement in degree mechanical\n", - "#phase print lacement in degree electrical\n", - "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", - "\n", - "# Calculations and Results\n", - "E = V_ph\n", - "Z_s = X_s \t\t\t#math.since R = 0\n", - "P_SY = abs(E)*abs(V_ph)*delta_dash_elec/abs(Z_s) \t\t\t#Synchronising power per phase\n", - "print 'Synchronising power is %.3f kW'%(10**-3*P_SY)\n", - "P_SY_total = 3*P_SY \t\t\t#Total Synchronising power\n", - "print '3 phase Synchronising power is %.3f kW'%(10**-3*P_SY_total)\n", - "\n", - "N_s = 120*f/P \t\t\t#in rpm\n", - "n_s = (N_s)/60 \t\t\t#in rps\n", - "T_SY = P_SY_total/(2*math.pi*n_s)\n", - "print 'Synchronising torque is %.0f N-m'%(T_SY)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power is 261.799 kW\n", - "3 phase Synchronising power is 785.398 kW\n", - "Synchronising torque is 7500 N-m\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.13 Page no : 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 11.*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 700.*10**3\n", - "I_FL = VA/(math.sqrt(3)*V_L) \t\t\t#full load current\n", - "IR_a = (1.5/100)*V_ph \t\t\t#product of I and R_a\n", - "R_a = IR_a/I_FL\n", - "IX_s = (14./100)*V_ph \t\t\t# product of I and X_s\n", - "X_s = IX_s/I_FL \t\t\t#synchronous reactance\n", - "\n", - "# Calculations\n", - "#at full load and 0.8 pf\n", - "I = I_FL\n", - "phi = math.acos(0.8)\n", - "V_ph = complex(V_ph*math.cos(phi),V_ph*math.sin(phi)) \t\t\t#just introduced the angle\n", - "E_ph = math.sqrt( (abs(V_ph)*math.cos(phi)+ IR_a)**2+ (abs(V_ph)*math.sin(phi)+ IX_s)**2 )\n", - "\n", - "Poles = 4.\n", - "f = 50. \t\t\t#poles and frequency\n", - "delta = math.asin( (abs(V_ph)*math.sin(phi)+IX_s)/E_ph) -phi\n", - "delta_dash_mech = (math.pi/180) \t\t\t#print lacement in degree mechanical\n", - "\t\t\t#print lacement in degree electrical\n", - "delta_dash_elec = delta_dash_mech*(Poles/2)\n", - "P_SY = abs(E_ph)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/X_s \t\t\t#Synchronising power per phase \n", - "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", - "\n", - "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", - "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", - "\n", - "# Results\n", - "print 'Synchronising power is %.2fkW'%(P_SY_total/1000)\n", - "print 'Synchronising torque is %.2f N-m'%(T_SY)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power is 191.25kW\n", - "Synchronising torque is 1217.53 N-m\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.14 Page no : 68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_l = 9.*10**3\n", - "V_ph = V_l/math.sqrt(3)\n", - "VA = 5.5*10**6\n", - "I_FL = VA/(V_l*math.sqrt(3))\n", - "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = complex(0,IX_s/I_FL) \t\t\t#synchronous reactance\n", - "N_s = 1500. \t\t\t#in rpm\n", - "n_s = N_s/60 \t\t\t#in rps\n", - "f = 50.\n", - "P = 120.*f/N_s \t\t\t#frequency and pole\n", - "\n", - "# Calculations\n", - "delta_dash_mech = math.pi/180 \t\t\t#print lacemnt in degree mechanical \n", - "#print lacemnt in degree electrical\n", - "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", - "\n", - "E = V_ph\n", - "P_SY = abs(E)*abs(V_ph)*delta_dash_elec/abs(X_s) \t\t\t#Synchronising power per phase\n", - "P_SY_total = 3*P_SY \t\t\t#Total Synchronising power\n", - "\n", - "T_SY = P_SY_total/(2*math.pi*n_s)\n", - "\n", - "# Results\n", - "print 'Synchronising torque is %.2f N-m'%(T_SY)\n", - "print 'Answer mismatches due to approximation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising torque is 4888.89 N-m\n", - "Answer mismatches due to approximation\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.15 Page no : 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6.*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 2000.*10**3\n", - "I_FL = VA/(math.sqrt(3)*V_L) \n", - "I = I_FL\n", - "\n", - "# Calculations\n", - "X_s = 1.2\n", - "R_a = 0.01 \t\t\t#both per unit\n", - "IR_a = (1/100)*V_ph \t\t\t#product of I and R_a\n", - "R_a = IR_a/I_FL\n", - "IX_s = (120/100)*V_ph \t\t\t#product of I and X_s\n", - "#IX_s = (12/100)*V_ph \t\t\t# this is the mistake made in the textbook\n", - "X_s = IX_s/I_FL\n", - "\n", - "#at full load and 0.8 pf\n", - "phi = math.acos(0.8)\n", - "#V_ph = complex(V_ph*math.cos(phi)V_ph*math.sin(phi)) \t\t\t#just introduced the angle\n", - "E_ph = math.sqrt( (abs(V_ph)*math.cos(phi)+ IR_a)**2+ (abs(V_ph)*math.sin(phi)+ IX_s)**2 )\n", - "Poles = 8\n", - "f = 50\n", - "\n", - "delta = math.asin( (abs(V_ph)*math.sin(phi)+IX_s)/E_ph) -phi\n", - "delta_dash_mech = (math.pi/180) \t\t\t#print lacemnt in degree mechanical \n", - "#print lacemnt in degree electrical\n", - "delta_dash_elec = delta_dash_mech*(Poles/2)\n", - "P_SY = abs(E_ph)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/X_s \t\t\t#Synchronising power per phase\n", - "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", - "\n", - "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", - "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", - "\n", - "# Results\n", - "print 'Synchronising power is %.2f kW'%(P_SY_total/1000)\n", - "print 'Synchronising torque is %.2f N-m'%(T_SY)\n", - "\n", - "print 'Note that answer obtained doesnt match with textbook due to the following reasons: \\\n", - "\\niIX_s is considered wrong in textbook.It should have been 4156.92instead of 415.692 To verify this use commented statement of IX_s line 13and notice that it matches with textbook ans then' \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power is 223.22 kW\n", - "Synchronising torque is 2960.56 N-m\n", - "Note that answer obtained doesnt match with textbook due to the following reasons: \n", - "iIX_s is considered wrong in textbook.It should have been 4156.92instead of 415.692 To verify this use commented statement of IX_s line 13and notice that it matches with textbook ans then\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.16 Page no : 71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "E = 11.*10**3/math.sqrt(3)\n", - "I_sc = 1000.\n", - "Pole = 2.\n", - "f = 50.\n", - "delta_dash_mech = 1*math.pi/180 \t\t\t#print lacemnt in degree mechanical \n", - "\n", - "# Calculations\n", - "#print lacemnt in degree electrical \n", - "delta_dash_elec = delta_dash_mech*(Pole/2)\n", - "P_SY = E*I_sc*delta_dash_mech \t\t\t#Synchronising power per phase\n", - "P_SY_total = P_SY*3 \t\t\t#total Synchronising power\n", - "\n", - "ns = 120*f/(60*Pole) \t\t\t#in r.p.s\n", - "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", - "\n", - "# Results\n", - "print 'Synchronising power is %.2f kW'%(P_SY_total/1000)\n", - "print 'Synchronising torque is %.2f N-m'%(T_SY)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power is 332.53 kW\n", - "Synchronising torque is 1058.48 N-m\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17 Page no : 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#Line PQ for Altermnator 1 and PR for alternaator 2.AB is at frequency x from P where total load is 30 MW\n", - "# Variables\n", - "QT = 25.\n", - "PT = 2.\n", - "#PC = x\n", - "SR = 25.\n", - "PS = 1.5\n", - "\n", - "# Calculations\n", - "#using similarity of triangles PAC and PQT\n", - "AC_by_PC = (QT/PT)\t\t\t# because (AC/QT) = (PC/PT)\n", - "#using similarity of triangles PCB and PSR\n", - "CB_by_PC = (SR/PS)\n", - "\n", - "AC_by_x = AC_by_PC \t\t\t#which implies AC = 12.5*x\n", - "CB_by_x = CB_by_PC \t\t\t#which implies CB = 16.67*x\n", - "\n", - "AC_plus_CB = 30 \t\t\t#total load at the frequency at P is 30 MW\n", - "x = AC_plus_CB/(AC_by_x + CB_by_x)\n", - "AC = 12.5*x\n", - "CB = 16.67*x \n", - "frequency = 50-x\n", - "\n", - "# Results\n", - "print 'Loads shared by alternator 1 and 2 are %.2f MW and %.2f MW respectively'%(AC,CB)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loads shared by alternator 1 and 2 are 12.86 MW and 17.15 MW respectively\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.18 Page no : 73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "# Variables\n", - "load_total = 1600.*10**3\n", - "pf = 1/math.sqrt(2) \t\t\t#lag\n", - "V_L = 6600.\n", - "\n", - "# Calculations\n", - "I_L = p2z(load_total/(math.sqrt(3)*V_L*pf),-1*math.acos(math.radians(pf)) )\n", - "I_1 = p2z(90,-1*math.acos(math.radians(0.8)))\n", - "I_2 = I_L-I_1\n", - "phi = abs(math.atan(I_2.imag/I_2.real))\n", - "I_a = abs(I_2)\n", - "R_a = 1.05\n", - "X_s = 5 \t\t\t#resistance and synchronous reactance per phase\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_ph = math.sqrt( (V_ph*math.cos(phi)+I_a*R_a )**2 + ( V_ph*math.sin(phi)+I_a*X_s )**2 )\n", - "E_line = math.sqrt(3)*E_ph\n", - "\n", - "# Results\n", - "print 'Excitation of second alternator is %.2f V '%(E_line)\n", - "print ' The corresponding field current from the graph is about 310 A'\n", - "print 'Note: The answer obtained will differ from textbook answer because of higher degree of accuracy while storing I_2 and the improper rounding off of I_2 in the textbook'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Excitation of second alternator is 6884.65 V \n", - " The corresponding field current from the graph is about 310 A\n", - "Note: The answer obtained will differ from textbook answer because of higher degree of accuracy while storing I_2 and the improper rounding off of I_2 in the textbook\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.19 Page no : 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 10.*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 5.*10**6\n", - "I_FL = VA/(math.sqrt(3)*V_L) \t\t\t#full-load current\n", - "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = IX_s/I_FL \t\t\t#synchronous reactance\n", - "P = 4.\n", - "\n", - "# Calculations\n", - "delta_dash_mech = 1*(math.pi/180) \t\t\t#print lacement in degree mechanical \n", - "#print lacement in degree electrical\n", - "delta_dash_elec = delta_dash_mech*(P/2)\n", - "E = V_ph \t\t\t#at no load\n", - "P_SY = delta_dash_elec*E**2/X_s \t\t\t#Synchronising power per phase\n", - "P_SY_total = P_SY*3 \t\t\t#Total Synchronising power\n", - "\n", - "# Results\n", - "print 'Synchronising power per phase is %.2fkW \\\n", - "\\nTotal Synchronising power is %.2fkW '%(P_SY/1000,P_SY_total/1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power per phase is 290.89kW \n", - "Total Synchronising power is 872.66kW \n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.20 Page no : 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Power_total = 1.414 \t\t\t#per unit\n", - "V_L = 1. \t\t\t#per unit\n", - "phi_t = math.acos(0.707)\n", - "I_L_T = Power_total/(math.sqrt(3)*V_L*math.cos(phi_t)) \t\t\t#Total current\n", - "\n", - "# Calculations\n", - "#Current supplied by each alternator\n", - "I_1 = I_L_T/2\n", - "I_2 = I_1\n", - "V_ph = V_L/math.sqrt(3)\n", - "\n", - "phi = math.acos(0.707)\n", - "R_a = 0\n", - "X_s = 0.6 \t\t\t#resistacne and synchronous reactance\n", - "E_ph = math.sqrt( (V_ph*math.cos(phi)+ I_1*R_a)**2 + (V_ph*math.sin(phi)+I_1*X_s)**2 )\n", - "delta = math.atan((I_1*X_s+V_ph*math.sin(phi)) / (V_ph*math.cos(phi))) - phi \t\t\t#power angle\n", - "\n", - "# Results\n", - "print 'EMF is %.4f p.u. and power angle is %.2f degrees '%(E_ph,delta*180/math.pi)\n", - "print 'Following assumptions were made :'\n", - "print '1.Terminal or bus bar voltage at ppoint of connection is constant'\n", - "print '2.The alternators are identical and are initially equally excited'\n", - "print '3.The power supplied by prime movers is adjusted so that each machine carries half the load represented by external impedance Z = R+ j 2pifL %( where R and L are constant'\n", - "print '4.The stator resistance is negligible'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "EMF is 0.8580 p.u. and power angle is 16.58 degrees \n", - "Following assumptions were made :\n", - "1.Terminal or bus bar voltage at ppoint of connection is constant\n", - "2.The alternators are identical and are initially equally excited\n", - "3.The power supplied by prime movers is adjusted so that each machine carries half the load represented by external impedance Z = R+ j 2pifL %( where R and L are constant\n", - "4.The stator resistance is negligible\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.21 Page no : 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_l = 480.\n", - "X_d = 0.1\n", - "X_q = 0.075\n", - "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "I_l = 1200.\n", - "I_ph = I_l/math.sqrt(3)\n", - "V_ph = V_l\n", - "V_t = V_l\n", - "I_a = I_ph\n", - "\n", - "# Calculations\n", - "phi = math.acos(0.8)\n", - "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", - "delta = psi-phi \n", - "\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "\n", - "# Results\n", - "print 'Excitation e.m.f is %.f V '%(E_f)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Excitation e.m.f is 524 V \n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.22 Page no : 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "VA = 3.5*10**6\n", - "P = 32. \t\t\t#Poles\n", - "Power = 2.5*10**6 \t\t\t#In watts\n", - "V_l = 6.6*10**3\n", - "phi = math.acos(0.8)\n", - "I_l = Power/(V_l*math.cos(phi)*math.sqrt(3))\n", - "X_d = 9.6\n", - "X_q = 6.\n", - "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "\n", - "# Calculations\n", - "V_t = V_l/math.sqrt(3)\n", - "psi = math.atan( (V_t*math.sin(phi)+I_l*X_q)/(V_t*math.cos(phi)+I_l*R_a) )\n", - "delta = psi-phi\n", - "I_s = I_l\n", - "I_d = I_s*math.sin(psi)\n", - "I_q = I_s*math.cos(psi)\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "regulation = 100*(E_f-V_t)/V_t\n", - "\n", - "# Results\n", - "print 'percentage regulation is %.2f percent'%(regulation)\n", - "print 'Excitation emf = %.0f V'%(E_f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage regulation is 50.85 percent\n", - "Excitation emf = 5748 V\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.23 Page no : 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "X_d = 7.6\n", - "X_q = 4.5\n", - "R_a = 0.15 \t\t\t#armature resistance and synchronous reactance of directquadrature \n", - "axisV_l = 13.8*10**3\n", - "V_l = 13.8*10**3\n", - "V_t = V_l/math.sqrt(3)\n", - "phi = math.acos(0.8)\n", - "VA = 25*10**6\n", - "I_a = VA/(math.sqrt(3)*V_l)\n", - "psi = math.atan( (V_t*math.cos(phi)+I_a*X_q)/(V_t*math.sin(phi)+I_a*R_a) )\n", - "\n", - "# Calculations\n", - "delta = psi-phi\n", - "I_s = I_a\n", - "I_d = I_s*math.sin(psi)\n", - "I_q = I_s*math.cos(psi)\n", - "\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "regulation = 100*(E_f-V_t)/V_t\n", - "\n", - "# Results\n", - "print 'percentage regulation is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage regulation is 79.30 percent\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.24 Page no : 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "X_d = 1.\n", - "X_q = 0.6\n", - "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "phi = math.acos(0.8) \t\t\t#lag\n", - "V_t = 1.\n", - "I_a = 1. \t\t\t#full load\n", - "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", - "\n", - "# Calculations\n", - "delta = psi-phi\n", - "I_s = I_a\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "regulation = 100*(E_f-V_t)/V_t\n", - "\n", - "# Results\n", - "print 'percentage regulation is %.2f percent'%(regulation)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage regulation is 77.50 percent\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.25 Page no : 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_a = 10.\n", - "phi = 20. \t\t\t#lag and degrees\n", - "V_t = 400.\n", - "X_d = 10.\n", - "X_q = 6.5\n", - "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "\n", - "# Calculations\n", - "psi = math.atan((V_t*math.sin(math.radians(phi))+I_a*X_q)/(V_t*math.cos(math.radians(phi))+I_a*R_a))\n", - "delta = math.degrees(psi)-phi\n", - "I_d = math.degrees(I_a*math.sin(math.radians(psi)))\n", - "I_q = (I_a*math.cos(psi))\n", - "\n", - "# Results\n", - "print 'Load angle is %.2f degrees '%(delta)\n", - "print 'I_d and I_q are %.4f A and %.4f A respectively '%(I_d,I_q )\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load angle is 8.23 degrees \n", - "I_d and I_q are 4.9272 A and 8.8105 A respectively \n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.26 Page no : 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "X_d = 0.8\n", - "X_q = 0.5\n", - "R_a = 0.02 \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "\n", - "\t\t\t#case(i) lag\n", - "phi = math.acos(0.8)\n", - "V_t = 1\n", - "I_a = 1\t\t\t#full-load\n", - "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", - "delta = psi-phi\n", - "\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "regulation = 100*(E_f-V_t)/V_t\n", - "print 'percentage regulation at 0.8 pf lag is %.2f percent'%(regulation)\n", - "\n", - "\t\t\t#case(ii) lead\n", - "phi2 = -1*math.acos(0.8) \t\t\t#minus sign because of leading pf\n", - "psi2 = math.atan( (V_t*math.sin(phi2)+I_a*X_q)/(V_t*math.cos(phi2)+I_a*R_a) )\n", - "delta2 = psi2-phi2\n", - "\n", - "I_d2 = I_a*math.sin(psi2)\n", - "I_q2 = I_a*math.cos(psi2)\n", - "\n", - "E_f2 = V_t*math.cos(delta2)+I_d2*X_d+I_q2*R_a\n", - "regulation2 = 100*(E_f2-V_t)/V_t\n", - "print 'percentage regulation at 0.8 pf lead is %.f percent'%(regulation2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage regulation at 0.8 pf lag is 61.25 percent\n", - "percentage regulation at 0.8 pf lead is -21 percent\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.27 Page no : 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "kW = array([800,500,1000,600])\n", - "cosphi = array([1,0.9,0.8,0.9])\n", - "tanphi = tan(arccos(cosphi))\n", - "kVAR = kW*tanphi\n", - "\n", - "# Calculations\n", - "kW_total = kW[0]+kW[1]+kW[2]+kW[3]\n", - "kVAR_total = kVAR[0]+kVAR[1]+kVAR[2]+-1*kVAR[3] \t\t\t#4th case is leading \n", - "\n", - "phi_c = math.atan(kVAR_total/kW_total) \t\t\t#total power factor angle\n", - "phi_1 = math.acos(0.95)\t\t\t#pf of machine 1\n", - "kW_1 = 1000 \t\t\t#active component of machine 1\n", - "kVAR_1 = kW_1*math.tan(phi_1) \t\t\t#reactive component of machine 1\n", - "kW_2 = kW_total - kW_1 \t\t\t#active component of machine 1\n", - "kVAR_2 = kVAR_total-kVAR_1 \t\t\t#reactive component of machine 2\n", - "\n", - "phi_2 = math.atan(kVAR_2/kW_2) \n", - "pf_2 = math.cos(phi_2) \t\t\t#power factor of machine 2\n", - "\n", - "# Results\n", - "print 'Output of second alternator = %.0f kW'%(kW_2)\n", - "print 'power factor of machine 2 = %.2f and lagging'%(pf_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output of second alternator = 1900 kW\n", - "power factor of machine 2 = 0.98 and lagging\n" - ] - } - ], - "prompt_number": 56 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.28 Page no : 84" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "kW = array([250,300,150])\n", - "cosphi = array([0.9,0.75,0.8]) \t\t\t#all lagging\n", - "tanphi = tan(arccos(cosphi))\n", - "kVAR = kW*tanphi\n", - "\n", - "# Calculations\n", - "kW_total = kW[0]+kW[1]+kW[2]\n", - "kVAR_total = kVAR[0]+kVAR[1]+kVAR[2] \n", - "\n", - "phi_1 = math.acos(0.8)\t\t\t#pf of machine 1\n", - "kW_1 = 100 \t\t\t#active component of machine 1\n", - "kVAR_1 = kW_1*math.tan(phi_1) \t\t\t#reactive component of machine 1\n", - "kW_2 = kW_total - kW_1 \t\t\t#active component of machine 1\n", - "kVAR_2 = kVAR_total-kVAR_1 \t\t\t#reactive component of machine 2\n", - "phi_2 = math.atan(kVAR_2/kW_2) \n", - "pf_2 = math.cos(phi_2) \t\t\t#power factor of machine 2\n", - "\n", - "# Results\n", - "print 'Output of second alternator = %.0f kW'%(kW_2)\n", - "print 'power factor of machine 2 = %.4f and lagging'%(pf_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output of second alternator = 600 kW\n", - "power factor of machine 2 = 0.8172 and lagging\n" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.29 Page no : 85" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6.6*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "V_t = V_ph\n", - "X_d = 9.6\n", - "X_q = 6.\n", - "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "VA = 3.5*10**6\n", - "I_L = VA/(math.sqrt(3)*V_L)\n", - "\n", - "# Calculations\n", - "P = 2.5*10**6\n", - "phi = math.acos(0.8)\n", - "I_a = P/(math.sqrt(3)*V_L*math.cos(phi))\n", - "psi = math.atan( (V_t*math.sin(phi)+ I_a*X_q)/(V_t*math.cos(phi)+ I_a*R_a) )\n", - "\n", - "delta = psi-phi\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(phi)\n", - "\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "regulation = 100*(E_f-V_t)/V_t\n", - "P_max = (V_ph**2/2)*((X_d-X_q)/(X_d*X_q))*(math.sin(2*delta))\n", - "\n", - "# Results\n", - "print 'percentage voltage regulation is %.2f percent'%(regulation)\n", - "print 'Power under open circuit is %.1f kW per phase'%(P_max/1000)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage voltage regulation is 50.85 percent\n", - "Power under open circuit is 231.1 kW per phase\n" - ] - } - ], - "prompt_number": 58 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.30 Page no : 86" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3.3*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 3.*10**6\n", - "I_FL = VA/(math.sqrt(3)*V_L)\n", - "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = complex(0,IX_s/I_FL)\n", - "N_s = 1000 \t\t\t#in r.p.m\n", - "\n", - "\n", - "# Calculations\n", - "Poles = 6.\n", - "f = 50.\n", - "delta_dash_mech = (math.pi/180) \t\t\t#print lacement in degree mechanical\n", - "#print lacement in degree electrical\n", - "delta_dash_elec = delta_dash_mech*(Poles/2)\n", - "\n", - "I = I_FL\n", - "phi = math.acos(0.8)\n", - "V = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))\n", - "E = V+ I*X_s\n", - "\n", - "delta = (math.pi/180)*math.atan(E.imag/E.real)-phi \t\t\t#E leads I by (math.pi/180)*phasemag(E) and V leads I by phi radians \n", - "P_SY = abs(E)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase \n", - "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", - "\n", - "ns = 120*f/(60*Poles) \t\t\t#in r.p.m\n", - "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", - "\n", - "# Results\n", - "print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)\n", - "print 'Synchronising torque is %.0f N-m'%(T_SY)\n", - "print 'Answer mismatches due to improper approximation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power per phase is 197.555 kW\n", - "Synchronising torque is 5660 N-m\n", - "Answer mismatches due to improper approximation\n" - ] - } - ], - "prompt_number": 60 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.31 Page no : 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3.3*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 3.*10**6\n", - "I_FL = VA/(math.sqrt(3)*V_L)\n", - "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = complex(0,IX_s/I_FL)\n", - "N_s = 1000. \t\t\t#in r.p.m\n", - "Poles = 6.\n", - "f = 50.\n", - "\n", - "# Calculations\n", - "delta_dash_mech = (math.pi/180) \t\t\t#print lacement in degree mechanical\n", - "#print lacement in degree electrical \n", - "delta_dash_elec = delta_dash_mech*(Poles/2)\n", - "\n", - "#E = V as the alternator is on no-load and X_s = Z_s\n", - "P_SY = abs(V_ph)**2*(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase\n", - "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", - "\n", - "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", - "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", - "\n", - "# Results\n", - "print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)\n", - "print 'Total Synchronising power is %.3f kW'%(P_SY_total/1000)\n", - "print 'Synchronising torque is %.0f N-m'%(T_SY)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power per phase is 261.799 kW\n", - "Total Synchronising power is 785.398 kW\n", - "Synchronising torque is 7500 N-m\n" - ] - } - ], - "prompt_number": 61 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.32 Page no : 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 11.*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 700.*10**3\n", - "I_FL = VA/(math.sqrt(3)*V_L)\n", - "IX_s = (14./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = IX_s/I_FL\n", - "#X_s = complex(0,IX_s/I_FL)\n", - "IR_a = (1.5/100)*V_ph \t\t\t#product of I and R_a\n", - "R_a = IR_a/I_FL\n", - "\n", - "\n", - "# Calculations\n", - "I = I_FL\n", - "phi = math.acos(0.8)\n", - "V = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))\n", - "E_ph = math.sqrt( (V_ph*math.cos(phi)+IR_a)**2 +(V_ph*math.sin(phi)+IX_s)**2 )\n", - "delta = math.asin((V_ph*math.sin(phi)+IX_s)/E_ph) -phi\n", - "\n", - "Poles = 4.\n", - "f = 50.\n", - "delta_dash_mech = (math.pi/180) \t\t\t#phase print lacemnt in degree mechanical\n", - "delta_dash_elec = delta_dash_mech*(Poles/2)\t\t\t#phase print lacemnt in degree electrical\n", - "\n", - "P_SY = abs(V_ph)*abs(E_ph)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase\n", - "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", - "\n", - "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", - "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", - "\n", - "# Results\n", - "print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)\n", - "print 'Synchronising power is %.3f kW ; '%(P_SY/1000)\n", - "print 'Total Synchronising power is %.3f kW'%(P_SY_total/1000)\n", - "print 'Synchronising torque is %.2f N-m'%(T_SY)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power per phase is 63.750 kW\n", - "Synchronising power is 63.750 kW ; \n", - "Total Synchronising power is 191.249 kW\n", - "Synchronising torque is 1217.53 N-m\n" - ] - } - ], - "prompt_number": 62 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.33 Page no : 91" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "# Variables\n", - "Z1 = complex(0,2)\n", - "Z2 = complex(0,3)\n", - "Z = 6.\n", - "E1 = p2z(230,0)\n", - "E2 = p2z(230,10)\n", - "\n", - "# Calculations\n", - "I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)\n", - "I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)\n", - "\n", - "phi1 = math.atan(I1.imag/I1.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", - "phi2 = math.atan(I2.imag/I2.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", - "\n", - "I = I1+I2\n", - "V = I*Z \t\t\t#Terminal voltage\n", - "\n", - "# Results\n", - "print 'i) Terminal voltage is %.2f volts at %.1f degrees'%(abs(V),math.degrees(math.atan(V.imag/V.real)))\n", - "print 'ii) Currents are %.2f A at %.0f degrees and %.2f A at %.2f degrees \\\n", - "\\nTotal current is %.2f A at %.1f degrees '%(abs(I1),math.degrees(math.atan(I1.imag/I1.real)),abs(I2),\\\n", - " math.degrees(math.atan(I2.imag/I2.real)),abs(I) \\\n", - " ,math.degrees(math.atan(I.imag/I.real)))\n", - "\n", - "P1 = abs(V)*abs(I1)*math.cos(math.radians(phi1))\n", - "P2 = abs(V)*abs(I2)*math.cos(math.radians(phi2))\n", - "print 'iii)Power delivered %.2f watts and %.2f watts'%(P1,P2)\n", - "\n", - "# note : rounding off error. kindly check the calculations\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Terminal voltage is 224.71 volts at -7.3 degrees\n", - "ii) Currents are 14.74 A at -14 degrees and 22.88 A at -3.03 degrees \n", - "Total current is 37.45 A at -7.3 degrees \n", - "iii)Power delivered 3311.43 watts and 5141.03 watts\n" - ] - } - ], - "prompt_number": 65 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.34 Page no : 91" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "X_d = 0.8\n", - "X_q = 0.5 \t\t\t#both per unit\n", - "R_a = 0. \t\t\t#assumed\n", - "phi = math.acos(0.8)\n", - "V_t = 1.\t\t\t#pu\n", - "I_a = 1. \t\t\t#full-load\n", - "\n", - "# Calculations\n", - "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", - "delta = psi-phi\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "\n", - "# Results\n", - "print 'Open circuit voltage is %.3f p.u.'%(E_f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Open circuit voltage is 1.603 p.u.\n" - ] - } - ], - "prompt_number": 66 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.35 Page no : 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "V_L = 6600.\n", - "I_L = 110.\n", - "phi_1 = math.acos(0.9) \t\t\t#lagging\n", - "kW = array([400,1000,400,300])*10**3\n", - "cosphi = array([1,0.71,0.8,0.9])\n", - "tanphi = tan(arccos(cosphi))\n", - "kVAR = kW*tanphi\n", - "\n", - "# Calculations\n", - "kW_total = kW[0]+kW[1]+kW[2]+kW[3]\n", - "kVAR_total = kVAR[0]+kVAR[1]+kVAR[2]+kVAR[3]\n", - "\n", - "phi_c = math.atan(kVAR_total/kW_total) \t\t\t#total power factor angle\n", - "load_1 = math.sqrt(3)*V_L*I_L*math.cos(phi_1)\n", - "\n", - "kW_1 = load_1 \t\t\t#active component of machine 1\n", - "kVAR_1 = kW_1*math.tan(phi_1) \t\t\t#reactive component of machine 1\n", - "kW_2 = kW_total - kW_1 \t\t\t#active component of machine 1\n", - "kVAR_2 = kVAR_total-kVAR_1 \t\t\t#reactive component of machine 2\n", - "\n", - "phi_2 = math.atan(kVAR_2/kW_2) \n", - "pf_2 = math.cos(phi_2) \t\t\t#power factor of machine 2\n", - "\n", - "# Results\n", - "print 'Output of second alternator = %.2f kW'%(kW_2/1000)\n", - "print 'Power factor of machine 2 = %.4f and lagging'%(pf_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output of second alternator = 968.28 kW\n", - "Power factor of machine 2 = 0.7366 and lagging\n" - ] - } - ], - "prompt_number": 67 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.36 Page no : 93" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 11000.\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 2.*10**6\n", - "phi = math.acos(0.8)\n", - "I_FL = VA/(math.sqrt(3)*V_L)\n", - "phi_1 = math.acos(0.8)\n", - "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", - "\n", - "# Calculations\n", - "X_s = IX_s/I_FL\n", - "I_1 = I_FL\n", - "BC = I_1*math.cos(phi_1)*X_s\n", - "AB = I_1*math.sin(phi_1)*X_s \n", - "OA = V_ph\n", - "OC = math.sqrt( (OA+AB)**2+(BC)**2 ) \n", - "E_1 = OC\n", - "E_2 = 1.25*E_1\n", - "OE = E_2\n", - "DE = BC\n", - "AD = math.sqrt(OE**2-DE**2) -OA \t\t\t#because OE = math.sqrt( (OA+AD)**2 + (DE)**2 )\n", - "\n", - "I_2sinphi2 = AD/X_s\n", - "I_2cosphi2 = I_1*math.cos(phi)\n", - "I_2 = math.sqrt( (I_2cosphi2)**2 + (I_2sinphi2)**2 )\n", - "phi2 = math.atan( I_2sinphi2/ I_2cosphi2 )\n", - "new_pf = math.cos(phi2)\n", - "\n", - "# Results\n", - "print 'Machine current is %.2f A '%(I_2)\n", - "print 'Power factor is %.4f lagging'%(new_pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Machine current is 228.62 A \n", - "Power factor is 0.3673 lagging\n" - ] - } - ], - "prompt_number": 68 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.37 Page no : 95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - " return RRRR*exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "\n", - "# Variables\n", - "P_out = 3000.*10**3\n", - "V_L = 6.6*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "phi = math.acos(0.8)\n", - "I_L = p2z(P_out/(math.sqrt(3)*V_L*math.cos(phi)),-1*(180/math.pi)*phi)\n", - "\n", - "# Calculations\n", - "P_out1 = P_out/2\n", - "I_L1 = 150 \t\t\t#given\n", - "phi_L1 = math.acos( P_out1/(math.sqrt(3)*V_L*I_L1) )\n", - "I_L1 = p2z(I_L1,-1*(180/math.pi)*phi_L1)\n", - "\n", - "I_L2 = I_L-I_L1\n", - "pf_2 = math.cos(math.atan(I_L2.imag/I_L2.real))\n", - "Z_1 = complex(0.5,10)\n", - "I_1 = I_L1\n", - "E_1 = V_ph + I_1*Z_1\n", - "delta_1 = math.atan(E_1.imag/E_1.real) \t\t\t#load angle of alternator 1\n", - "E_1L = math.sqrt(3)*E_1\n", - "\n", - "Z_2 = complex(0.4,12)\n", - "I_2 = I_L2\n", - "E_2 = V_ph + I_2*Z_2\n", - "delta_2 = (math.pi/180)*math.atan(E_2.imag/E_2.real) \t\t\t#load angle of alternator 2\n", - "\n", - "# Results\n", - "print 'Part i) Currents are %.0f A at %.1f degrees and %.1f A at %.1f degrees\\nTotal current is %.0f at %.2f' %(abs(I_L1),\\\n", - " math.degrees(math.atan(I_L1.imag/I_L1.real)),abs(I_L2),\\\n", - " math.degrees(math.atan(I_L2.imag/I_L2.real)),abs(I_L),math.degrees(math.atan(I_L.imag/I_L.real)))\n", - "print 'Part ii)Power factor is %.4f and lagging'%(math.cos(phi_L1))\n", - "print 'Part iii)emf are %.2f V at %.2f degrees and %.4f V at %.0f degrees'%(abs(E_1),\\\n", - " math.degrees(math.atan(E_1.imag/E_1.real)),abs(E_2),math.degrees(math.atan(E_2.imag/E_2.real)))\n", - "print 'Part iv)Power angles are %.2f degrees and %.0f degrees '%(180/math.pi*delta_1,(180/math.pi)*delta_2)\n", - "\n", - "# note : rounding off error. kindly check the calculations\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part i) Currents are 150 A at -29.0 degrees and 180.6 A at -43.4 degrees\n", - "Total current is 328 at -36.87\n", - "Part ii)Power factor is 0.8748 and lagging\n", - "Part iii)emf are 4776.46 V at 15.49 degrees and 5565.7081 V at 16 degrees\n", - "Part iv)Power angles are 15.49 degrees and 0 degrees \n" - ] - } - ], - "prompt_number": 73 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.38 Page no : 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "Z1 = complex(0.2,2)\n", - "Z2 = Z1\n", - "ZL = complex(3,4)\n", - "Z = ZL\n", - "E1 = complex(2000,0)\n", - "E2 = complex(2200,100)\n", - "\n", - "# Calculations\n", - "I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)\n", - "I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)\n", - "\n", - "IL = I1+I2\n", - "V = IL*Z \t\t\t#Terminal voltage\n", - "\n", - "phi1 = math.atan(V.imag/V.real)-math.atan(I1.imag/I1.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", - "phi2 = math.atan(V.imag/V.real)-math.atan(I2.imag/I2.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", - "\n", - "Pout1 = math.sqrt(3)*math.sqrt(3)*abs(V)*abs(I1)*math.cos(math.radians(phi1))\n", - "Pout2 = math.sqrt(3)*math.sqrt(3)*abs(V)*abs(I2)*math.cos(math.radians(phi2))\n", - "\n", - "# Results\n", - "print 'Power delivered is %.2f kW and %.2f kW at power-factors %.4f lag and %.4f lag respectively'%(Pout1/1000,Pout2/1000,math.cos(math.radians(phi1)),math.cos(math.radians(phi2)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power delivered is 658.24 kW and 1253.92 kW at power-factors 0.9999 lag and 0.9999 lag respectively\n" - ] - } - ], - "prompt_number": 74 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.39 Page no : 99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "f = 50.\n", - "P = 12.\n", - "V_L = 6600.\n", - "V_ph = V_L/math.sqrt(3)\n", - "VA = 2000.*10**3\n", - "I_FL = VA/(math.sqrt(3)*V_L)\n", - "\n", - "# Calculations\n", - "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", - "X_s = complex(0,IX_s/I_FL)\n", - "N_s = 12*f/P \t\t\t#in rpm\n", - "delta_dash_mech = (math.pi/180) \t\t\t#phase print lacemnt in degree mechanical\n", - "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#phase print lacemnt in degree electrical\n", - "\n", - "phi = math.acos(0.8) \t\t\t#lag\n", - "I = complex(I_FL*math.cos(-1*phi),I_FL*math.sin(-1*phi))\n", - "V = V_ph\n", - "E = V + I*X_s\n", - "delta = math.atan(E.imag/E.real)*(math.pi/180)\n", - "P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)\n", - "P_SY_total = 3*P_SY\n", - "\n", - "# Results\n", - "print 'Synchronising power is %.2f kW'%(P_SY/1000)\n", - "print 'Total Synchronising power is %.2f kW'%(P_SY_total/1000)\n", - "\n", - "# note : rounding off error. kindly check." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Synchronising power is 325.36 kW\n", - "Total Synchronising power is 976.09 kW\n" - ] - } - ], - "prompt_number": 76 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.40 Page no : 101" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 22000.\n", - "V_ph = V_L/math.sqrt(3)\n", - "power = 230.*10**6\n", - "phi = math.acos(1.)\n", - "I_FL = power/(math.sqrt(3)*V_L*math.cos(phi))\n", - "I_1 = I_FL\n", - "X_s = 1.2\n", - "\n", - "# Calculations\n", - "E_1 = math.sqrt( V_ph**2 + (I_1*X_s)**2 )\n", - "E_2 = 1.3*E_1\n", - "AC = math.sqrt( E_2**2-(I_1*X_s)**2 ) -V_ph \t\t\t# because E**2 = (V_ph+AC)**2+(I_1*X_s)**2\n", - "I2X_S = AC\n", - "\n", - "I_2cosphi2 = I_1 \t\t\t#because phi_2 = math.acos(I_1/I_2) \t\t\t#from ACD\n", - "I_2sinphi2 = AC/X_s\n", - "I_2 = math.sqrt( (I_2cosphi2)**2 + (I_2sinphi2)**2 )\n", - "phi2 = math.atan( I_2sinphi2/ I_2cosphi2 )\n", - "new_pf = math.cos(phi2)\n", - "\n", - "# Results\n", - "print 'Machine current is %.2f A '%(I_2)\n", - "print 'Power factor is %.4f and lagging'%(new_pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Machine current is 7274.58 A \n", - "Power factor is 0.8297 and lagging\n" - ] - } - ], - "prompt_number": 77 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.41 Page no : 102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import cmath\n", - "\n", - "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", - "def p2z(RRRR,Theeeta):\n", - "\treturn RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", - "\n", - "# Variables\n", - "P_out = 1500.*10**3\n", - "V_L = 3.3*10**3\n", - "phi = math.acos(0.8)\n", - "I_L = p2z(P_out/(math.sqrt(3)*V_L*math.cos(phi)),-1*math.acos(math.radians(0.8)))\n", - "\n", - "I_L1_magnitude = 150. \t\t\t#given\n", - "P_out1 = (3.*10**6)/2 \t\t\t#because load is EQUALLY shared between 2 alternators\n", - "pf_L1 = P_out1/(math.sqrt(3)*2*V_L*I_L1_magnitude) \t\t\t#operating pf of alternator 1\n", - "phi1 = math.acos(math.radians(pf_L1))\n", - "I_L1 = p2z(I_L1_magnitude,-1*phi1)\n", - "I_L2 = I_L-I_L1 \t\t\t#because I_L = I_L1 + I_L2\n", - "pf_L2 = math.cos(math.atan(I_L2.imag/I_L2.real))\n", - "\n", - "# Calculations\n", - "V_ph = 6.6*10**3/math.sqrt(3)\n", - "Z_1 = complex(0.5,10)\n", - "I_1 = I_L1\n", - "E_1 = V_ph + I_1*Z_1\n", - "delta_1 = math.atan(E_1.imag/E_1.real) \t\t\t#load angle of alternator 1\n", - "I_2 = I_L2\n", - "\n", - "Z_2 = complex(0.4,12)\n", - "E_2 = V_ph + I_2*Z_2\n", - "delta_2 = math.atan(E_2.imag/E_2.real) \t\t\t#load angle of alternator 1\n", - "\n", - "# Results\n", - "print 'for machine 1current is %.0f A at %.2f degrees \\nPower factor of %.4f laginduced emf \\\n", - " of %.2f V \\nload angle of %.2f degrees'%(abs(I_L1),math.degrees(math.atan(I_L1.imag/I_L1.real)),pf_L1,abs(E_1),delta_1)\n", - "print 'for machine 2current is %.1f A at %.1f degrees\\nPower factor of %.4f laginduced emf \\\n", - " of %.2f V\\nload angle of %.0f degrees'%(abs(I_L2),math.degrees(math.atan(I_L2.imag/I_L2.real)),pf_L2,abs(E_2),math.degrees(delta_2))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for machine 1current is 150 A at -1.56 degrees \n", - "Power factor of 0.8748 laginduced emf of 4202.06 V \n", - "load angle of 0.36 degrees\n", - "for machine 2current is 178.0 A at -1.6 degrees\n", - "Power factor of 0.9996 laginduced emf of 4480.49 V\n", - "load angle of 28 degrees\n" - ] - } - ], - "prompt_number": 81 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.42 Page no : 104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_l = 230\n", - "VA = 5*10**3\n", - "X_d = 12\n", - "X_q = 7\n", - "R_a = 0 \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "phi = math.acos(1)\n", - "\n", - "# Calculations\n", - "I_l = VA/(V_l*math.sqrt(3))\n", - "V_ph = V_l/math.sqrt(3)\n", - "V_t = V_ph\n", - "I_a = I_l\n", - "\n", - "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", - "delta = psi-phi\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", - "\n", - "# Results\n", - "print 'Excitation voltage is %.3f V '%(E_f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Excitation voltage is 193.852 V \n" - ] - } - ], - "prompt_number": 82 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.43 Page no : 104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_l = 6.6*10**3\n", - "V_t = V_l/math.sqrt(3)\n", - "X_d = 23.2\n", - "X_q = 14.5\n", - "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", - "VA = 1800.*10**3\n", - "phi = math.acos(0.8) \t\t\t#lag\n", - "\n", - "# Calculations and Results\n", - "I_a = VA/(V_l*math.sqrt(3))\n", - "\n", - "psi = math.atan( (V_t*math.sin(phi)-I_a*X_q)/(V_t*math.cos(phi)-I_a*R_a) ) \t\t\t#minus sign in numerator and denomenator for motors\n", - "delta = psi+phi\n", - "I_d = I_a*math.sin(psi)\n", - "I_q = I_a*math.cos(psi)\n", - "E_f = V_t*math.cos(delta)-I_d*X_d-I_q*R_a\n", - "print 'Excitation emf = %.4f V'%(E_f)\n", - "#P_m = ( V_t*E_f*math.sin(delta)/X_d ) + ((1/X_q)-(1/X_d))*0.5*math.sin(2*delta)*V_t**2\n", - "#P_m = 0.4996*math.cos(delta)+0.1877*math.sin(2*delta)\n", - "#for maximum power output differenciate and equate to zero\n", - "\n", - "delta_max = 63.4 \t\t\t#degree\n", - "\n", - "P_m_max = ((1/X_q)-(1/X_d))*0.5*math.sin(math.radians(2*delta_max))*V_t**2 \t\t\t#Maximuum load supplied with E_f = 0\n", - "print 'Maximum load the motor can supply is %.4f MW per phase '%(P_m_max*10**-6 )\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Excitation emf = 3042.2721 V\n", - "Maximum load the motor can supply is 0.1503 MW per phase \n" - ] - } - ], - "prompt_number": 83 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/ch7.ipynb b/DC_Machines_and_Synchronous_Machines/ch7.ipynb deleted file mode 100755 index a22a6459..00000000 --- a/DC_Machines_and_Synchronous_Machines/ch7.ipynb +++ /dev/null @@ -1,1711 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:95ca4467d5385b9a67e6a4c31c682e32bf0713e6d2ff74a5a89a56c51df83062" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7 : Synchronous Motors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1 Page no : 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "import numpy as np\n", - "\n", - "# Variables\n", - "V_l = 400.\n", - "R_a = 0.2\n", - "X_s = 2. \t\t\t#armature resistance and synchronous reactance\n", - "I_L = 25.\n", - "I_aph = I_L\n", - "V_ph = V_l/math.sqrt(3)\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "angle = math.atan(Z_s.imag/Z_s.real)\n", - "angle = math.degrees(angle)\n", - "E_Rph=I_aph*abs(Z_s)\n", - "theta = (math.pi/180.)*angle \n", - "\n", - "# Calculations and Results\n", - "#case 1\n", - "phi = math.acos(0.8) \t\t\t#lagging\n", - "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta-phi) )\n", - "print 'i)Back EMF induced with 0.8 lagging pf is %.3f V'%(E_bph)\n", - "\n", - "#case 2\n", - "phi = math.acos(0.9) \t\t\t#leading\n", - "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", - "print 'ii)Back EMF induced with 0.8 lagging pf is %.3f V'%(E_bph)\n", - "\n", - "#case 3\n", - "phi = math.acos(1)\n", - "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta) )\n", - "print 'iii)Back EMF induced with 0.8 lagging pf is %.3f V'%(E_bph)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Back EMF induced with 0.8 lagging pf is 200.386 V\n", - "ii)Back EMF induced with 0.8 lagging pf is 252.678 V\n", - "iii)Back EMF induced with 0.8 lagging pf is 231.406 V\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2 Page no : 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import *\n", - "\n", - "# Variables\n", - "V_l = 500.\n", - "R_a = 0.4\n", - "X_s = 4. \t\t\t#armature resistance and synchronous reactance\n", - "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "theta = (math.pi/180)*angle\t\t\t#phasemag returns angle in degrees,not radians\n", - "V_ph = V_l/math.sqrt(3)\n", - "I_l = 50.\n", - "I_aph = I_l\n", - "E_Rph = I_aph*abs(Z_s)\n", - "\n", - "# Calculations and Results\t\t\n", - "#case 1\n", - "E_bline = 600\n", - "E_bph = E_bline/math.sqrt(3)\n", - "phi = math.acos( (-E_bph**2 + E_Rph**2 + V_ph**2 )/(2*E_Rph*V_ph) ) -theta \t\t\t#leading\n", - "#because E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", - "print 'i)power factor is %.4f leading'%(cos(phi))\n", - "\n", - "#case 2\n", - "E_bline = 380\n", - "E_bph = E_bline/math.sqrt(3)\n", - "phi = theta-math.acos( (-E_bph**2 + E_Rph**2 + V_ph**2 )/(2*E_Rph*V_ph) ) \t\t\t#leading\n", - "#because E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta-phi)\n", - "print 'ii)power factor is %.4f lagging'%(cos(phi))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)power factor is 0.9977 leading\n", - "ii)power factor is 0.8197 lagging\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3 Page no : 29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6600.\n", - "P_out = 500.*10**3\n", - "eta = 83./100 \t\t\t#efficiency\n", - "R_a = 0.3\n", - "X_s = 3.2 \t\t\t#armature resistance and synchronous reactance\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "theta = (math.pi/180)* angle \t\t\t#phasemag returns the angle in degrees not radians\n", - "phi = math.acos(0.8) \t\t\t#leading\n", - "V_ph = V_L/math.sqrt(3)\n", - "P_in = P_out/eta\n", - "\n", - "# Calculations and Results\n", - "I_L = P_in/ (math.sqrt(3) * V_L * math.cos(phi) )\n", - "\n", - "# because P_in = math.sqrt(3) * V_L * I_L * math.cos(phi)\n", - "I_aph = I_L\n", - "E_Rph = I_aph*abs(Z_s)\n", - "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", - "print 'i) Generated EmF on full loaad is %.2f V'%(E_bph)\n", - "\n", - "delta = math.degrees(math.asin( (E_Rph/E_bph))*math.sin(theta+phi) )\n", - "#This is obtained after applying sune rule to triangle OAB from thre phasor diagram\n", - "print 'ii) load angle is %.2f degrees'%(delta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Generated EmF on full loaad is 3925.33 V\n", - "ii) load angle is 2.64 degrees\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4 Page no : 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "V_L = 500.\n", - "V_ph = V_L/math.sqrt(3)\n", - "phi = math.acos(0.9) \t\t\t\t#lagging\n", - "output_power = 17.*10**3\n", - "R_a = 0.8 \t\t\t\t\t\t\t#armaature reactance\n", - "mechanical_losses = 1300. \t\t\t#mechanical losses is W\n", - "P_m = output_power+mechanical_losses \t\t\t#gross mechanical power developed\n", - "\n", - "# P_m = input_power - stator losses\n", - "# input_power = 3* V_ph * I_aph * math.cos(phi)\n", - "# Stator losses = 3*I_aph**2*R_a\n", - "# solving above equations we get 2.4 I_a**2 - 779/.4225*I_a + 18300 = 0\n", - "I_a_eqn = [2.4, -779.4225, 18300]\n", - "I_a_roots = roots(I_a_eqn)\n", - "I_a = I_a_roots[1] \t\t\t#neglecting higher value\n", - "I_aph = I_a\n", - "print 'Current drawn by the motor is %.3f A'%(I_a)\n", - "\n", - "input_power = 3* V_ph * I_aph * math.cos(phi)\n", - "eta = 100*output_power/input_power\n", - "print 'Full load efficiency is %.2f percent'%(eta)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current drawn by the motor is 25.478 A\n", - "Full load efficiency is 85.61 percent\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5 Page no : 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "#subscript 1 is for industrial load and 2 for synchronous motor\n", - "P_1 = 800. \t\t\t# Active power in KW\n", - "phi_1 = math.acos(0.6) \t\t\t#lagging\n", - "Q_1 = P_1*math.tan(phi_1) \t\t\t#reactive power by load 1\n", - "\n", - "# Calculations and Results\n", - "output_power = 200.\n", - "eta = 91./100 \t\t\t#efficiency of synchronous motor\n", - "input_power = output_power/eta\n", - "P_2 = input_power\t\t\t# active power drawn by synchronous motor\n", - "P_T = P_1 + P_2 \t\t\t#combined total load of industry and synchronous motor\n", - "phi_T = math.acos(0.92 )\t\t\t#lagging\n", - "Q_T = P_T* math.tan(phi_T) \t\t\t#from power triangle\n", - "Q_2 = Q_T - Q_1 \t\t\t#it turns out to be negative indicating its leading nature\n", - "S_2 = math.sqrt( P_2**2 + Q_2**2 )\n", - "print 'Desired kVA rating of Synchronous motor is %.3f kVA'%(S_2)\n", - "\n", - "phi_2 = math.atan (Q_2/P_2)\n", - "print 'Power factor of synchronous motor is %.4f LEADING'%(math.cos(phi_2))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Desired kVA rating of Synchronous motor is 669.353 kVA\n", - "Power factor of synchronous motor is 0.3283 LEADING\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.6 Page no : 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "output_power = 37.3*1000 \t\t\t#Watts on full load\n", - "Z_s = complex(0.2,1.6) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "theta = (math.pi/180)*angle \t\t\t#phase mag returns the angle in degrees and not raidians\n", - "phi = math.acos(0.9) \t\t\t#leading\n", - "V_ph = V_L/math.sqrt(3)\n", - "eta = 88. \t\t\t#efficiency in percentage\n", - "\n", - "# Calculations\n", - "input_power = 100*output_power/eta\n", - "I_L = input_power/(math.sqrt(3)*V_L*math.cos(phi))\n", - "I_aph = I_L\n", - "E_Rph = I_aph*abs(Z_s)\n", - "\n", - "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", - "E_line = math.sqrt(3)*E_bph\n", - "\n", - "# Results\n", - "print 'Induced EMF is %.2f V and its line value is %.2f V'%(E_bph,E_line)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Induced EMF is 285.65 V and its line value is 494.75 V\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.7 Page no : 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "input_power = 20.*1000 \n", - "R_a = 0.\n", - "X_s = 4. \t\t\t#armature reactance and synchronous reactance\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag))\n", - "\n", - "theta = (math.pi/180)*angle \t\t\t#phase mag returns the angle in degrees and not raidians\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_bline = 550. \t\t\t#star connection\n", - "E_bph = E_bline/math.sqrt(3)\n", - "\n", - "# Calculations\n", - "I_a_cos_phi = input_power/(math.sqrt(3)*V_L) \t\t\t#product of I_a and math.cos(phi)\n", - "I_a_sin_phi = ( math.sqrt(E_bph**2- (abs(Z_s)*I_a_cos_phi)**2 ) -V_ph )/abs(Z_s)\t\t\t#from triangle DAB\n", - "phi = math.atan(I_a_sin_phi/I_a_cos_phi)\n", - "I_a = I_a_cos_phi/math.cos(phi) \n", - "\n", - "# Results\n", - "print 'Motor power fctor is %.3f Leading'%(cos(phi))\n", - "print 'Current drawn by the motor is %.2f A'%(I_a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Motor power fctor is 0.872 Leading\n", - "Current drawn by the motor is 33.11 A\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.8 Page no : 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3300.\n", - "V_ph = V_L/math.sqrt(3)\n", - "R_a = 2.\n", - "X_s = 18. \t\t\t#armature reactance and synchronous reactance\n", - "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degrees not radians\n", - "E_bline = 3800.\n", - "E_bph = E_bline/math.sqrt(3)\n", - "\n", - "#part(i)\n", - "P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph**2/abs(Z_s))*math.cos(theta)\n", - "print 'i)Max total mechanical power developed that motor can develop is %.2f W per phase'%(P_m_max)\n", - "\n", - "#part(ii)\n", - "#from phasor diagram applying math.comath.sine rule to triangle OAB\n", - "E_Rph = math.sqrt( E_bph**2 + V_ph**2 -2*E_bph*V_ph*math.cos(theta) ) \n", - "I_aph = E_Rph/abs(Z_s)\n", - "print 'ii)Current at max power developed is %.1f A'%(I_aph)\n", - "\n", - "copper_loss = 3* I_aph**2 * R_a\n", - "P_in_max_total = 3 * P_m_max \t\t\t#input power at max power developed\n", - "total_P_in = P_in_max_total + copper_loss \t\t\t#total input power \n", - "pf = total_P_in/(math.sqrt(3)*I_aph*V_L)\n", - "print 'Power factor at max power developed is %.3f leading'%(pf)\n", - "\n", - "\n", - "# 'Answer in part1 mismatched because of improper approximation in book'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Max total mechanical power developed that motor can develop is 201452.30 W per phase\n", - "ii)Current at max power developed is 151.4 A\n", - "Power factor at max power developed is 0.857 leading\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.9 Page no : 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 500.\n", - "R_a = 0.03\n", - "X_s = 0.3 \t\t\t#armature reactance and synchronous reactance\n", - "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degrees not radians\n", - "phi = math.acos(0.8)\n", - "eta = 93/100.\n", - "output_power = 100.*746\n", - "input_power = output_power/eta\n", - "I_L = input_power/(math.sqrt(3)*V_L*math.cos(phi))\n", - "I_aph = I_L\n", - "E_Rph = I_aph*abs(Z_s)\n", - "\n", - "#from the phasor diagram\n", - "E_bph = math.sqrt( E_Rph**2 + (V_L/math.sqrt(3))**2 - 2*E_Rph*(V_L/math.sqrt(3))*math.cos(phi+theta) ) \n", - "\n", - "cu_losses = 3*(I_aph)**2*R_a \t\t\t#total copper losses\n", - "P_m = input_power - cu_losses \t\t\t#total mechanical power developed\n", - "\n", - "print 'EMF developed per phase is %.4f V \\nTotal mechanical power developed is %.1f watts'%(E_bph,P_m)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "EMF developed per phase is 308.1880 V \n", - "Total mechanical power developed is 79008.6 watts\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.10 Page no : 53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 415.\n", - "V_ph = V_L \t\t\t#due to delta connection\n", - "E_bline = 520.\n", - "R_a = 0.5\n", - "X_s = 4. \t\t\t#armature reactance and synchronous reactance\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180.)*angle \t\t\t#phasemag returns angle in degrees not radians\n", - "\n", - "delta = theta \t\t\t#for maximum power\n", - "P_m_max = (E_bline*V_ph/abs(Z_s))- (E_bline**2/abs(Z_s))*math.cos(theta)\n", - "P_m_max_total = 3* P_m_max\n", - "fi_loss = 1000. \t\t\t#frictional and iron losses\n", - "P_out_total = P_m_max_total-fi_loss \n", - "\n", - "HP_output = P_out_total/746 \t\t\t#converting watts to horse power\n", - "print 'HP output for maximum power output is %.2f HP'%(HP_output)\n", - "\n", - "#from the phasor diagram\n", - "E_Rph = math.sqrt( E_bline**2 + V_ph**2 -2*E_bline*V_ph*math.cos(delta) ) \n", - "I_aph = E_Rph/abs(Z_s)\n", - "I_L = I_aph*math.sqrt(3)\n", - "print 'Line current is %f A'%(I_L)\n", - "cu_loss_total = 3*(I_aph)**2*R_a \t\t\t#total copper losses\n", - "input_power = P_m_max_total+ cu_loss_total\n", - "pf = input_power/(math.sqrt(3)*I_L*V_L) \t\t\t#leading\n", - "print 'Power factor for maximum power output is %.2f leading '%(pf)\n", - "\n", - "eta = 100*P_out_total /input_power\n", - "print 'Efficiency for maximum power output is %.2f percent'%(eta)\n", - "\n", - "# 'Answer might mismatch because of improper approximation done in book'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "HP output for maximum power output is 180.48 HP\n", - "Line current is 268.015479 A\n", - "Power factor for maximum power output is 0.89 leading \n", - "Efficiency for maximum power output is 78.48 percent\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.11 Page no : 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "P = 8.\n", - "f = 50. \t\t\t#Pole and frequency\n", - "N_s = 120.*f/P \t\t\t#synchronous speed\n", - "V_L = 6.6*10**3 \n", - "V_ph = V_L/math.sqrt(3)\n", - "Z_s = complex(0.66,6.6) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degree not radians\n", - "E_bph = 4500.\n", - "input_power = 2500.*10**3\n", - "I_a_cosphi = input_power/(math.sqrt(3)*V_L) \t\t\t#Its product of I_a and math.cos(phi);I_a = I_l for star conneted load\n", - "\n", - "# Calculations\n", - "#applying math.comath.sine rule to triangle ABC from phasor diagram and solve \n", - "#math.tan(phi)**2 + 5.2252 math.tan(phi)-2.2432 = 0\n", - "p = [1, 5.2252, -2.2432]\n", - "tan_phi = roots(p)\n", - "phi = math.atan(tan_phi[1])\n", - "pf = math.cos(phi)\n", - "I_a = I_a_cosphi/ math.cos(phi)\n", - "\n", - "#apply math.sine rule to triangle ABC\n", - "delta = math.asin(I_a*abs(Z_s)*math.sin(theta+phi)/E_bph)\n", - "P_m = 3*E_bph*I_a*math.cos(delta+phi)\n", - "T_g = P_m/(2*math.pi*N_s/60)\n", - "\n", - "# Results\n", - "print 'i)Torque developed is %f N-m'%(T_g)\n", - "print 'ii)Input current is %.4f A'%(I_a)\n", - "print 'iii)Power factor is %.4f leading'%(pf)\n", - "print 'iv)Power angle is %.2f degrees '%((180/math.pi)*delta)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Torque developed is 30437.047497 N-m\n", - "ii)Input current is 235.4472 A\n", - "iii)Power factor is 0.9288 leading\n", - "iv)Power angle is 19.48 degrees \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.12 Page no : 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "input_power = 15.*10**3\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_b = 480.\n", - "E_bph = E_b/math.sqrt(3)\n", - "Z_s = complex(1,5) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degree not radians\n", - "\n", - "# Calculations\n", - "I_a_cosphi = input_power/(math.sqrt(3)*V_L) \t\t\t#product of I_a & math.cos(phi)\n", - "#Applying math.comath.sine rule to triangle OAB and solving\n", - "#math.tan(phi)**2+ 4.101*math.tan(phi)-1.7499 = 0\n", - "p = [1,4.101,-1.7449]\n", - "tan_phi = roots(p)\n", - "phi = math.atan(tan_phi[1]) \t\t\t#ignoring negative vaule\n", - "I_a = I_a_cosphi/ math.cos(phi)\n", - "\n", - "#applying math.sine rule to Triangle OAB\n", - "delta = math.asin( I_a*abs(Z_s)* math.sin(theta+phi)/E_bph )\n", - "\n", - "# Results\n", - "print 'Load angle is %.1f degrees'%(delta*180/math.pi)\n", - "print 'Armature current is %.4f A'%(I_a)\n", - "print 'Power factor is %.3f leading'%(cos(phi))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load angle is 24.9 degrees\n", - "Armature current is 23.2283 A\n", - "Power factor is 0.932 leading\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.13 Page no : 59" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "from numpy import roots\n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_b = 460.\n", - "E_bph = E_b/math.sqrt(3)\n", - "input_power = 3.75*10**3\n", - "Z_s = complex(1,8) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = math.degrees(angle) \t\t\t#phasemag returns angle in degree ,not radians\n", - "I_L_cos_phi = input_power/(math.sqrt(3)*V_L)\n", - "\n", - "# Calculations and Results\n", - "#Applying math.comath.sine rule to triangle OAB and solving further\n", - "#math.tan(phi)**2 + 458.366*math.tan(phi) -450.65 = 0 \n", - "p = [1,458.366-450.65]\n", - "tan_phi = roots(p)\n", - "\n", - "phi = math.atan(tan_phi[0]) \t\t\t#ignoring negative value\n", - "print 'Required power factor is %.4f leading'%(cos(phi))\n", - "I_L = I_L_cos_phi /math.cos(phi)\n", - "print 'Required current is %.4f A'%(I_L)\n", - "\n", - "# roots() python gives some different answer. Kindly check." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required power factor is 0.1285 leading\n", - "Required current is 42.1134 A\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.14 Page no : 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "#subscript 1 indicates induction motor 1\n", - "P_1 = 350.\n", - "phi_1 = math.acos(0.7071) \t\t\t#lagging\n", - "Q_1 = P_1*math.tan(phi_1)\t\t\t#from power triangle\n", - "\n", - "#subscript 2 indicates induction motor 2\n", - "P_2 = 190.\n", - "\n", - "# Calculations\n", - "#subscript T indicates total\n", - "P_T = P_1+P_2\n", - "phi_T = math.acos(0.9) \t\t\t#lagging\n", - "Q_T = P_T*math.tan(phi_T)\n", - "\n", - "Q_2 = Q_T-Q_1\n", - "kva_rating = math.sqrt(P_2**2+ Q_2**2)\n", - "\n", - "# Results\n", - "print 'kVA rating of synchronous motor is %.2f kVA'%(kva_rating)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "kVA rating of synchronous motor is 209.59 kVA\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.15 Page no : 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "Pole = 6.\n", - "f = 50.\n", - "R_a = 0.2\n", - "X_s = 3. \t\t\t#armature reactance and synchronous reactance\n", - "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag/Z_s.real) # calculates angle in radians\n", - "\n", - "N_s = 120*f/Pole \t\t\t#synchronous speed\n", - "\n", - "# Calculations\n", - "#subscript 1` refers to load 1\n", - "I_a1 = 20.\n", - "phi_1 = math.acos(1)\n", - "E_R1 = I_a1* abs(Z_s)\n", - "E_bph = math.sqrt( E_R1**2 + V_ph**2 - 2*E_R1*V_ph*math.cos(phi_1+theta) )\n", - "\n", - "#subscript 2` refers to load 2\n", - "I_a2 = 60.\n", - "E_R2 = I_a2* abs(Z_s)\n", - "phi_2 = math.acos ((E_R2**2 + V_ph**2 -E_bph**2 )/(2*E_R2*V_ph)) -theta \t\t\t#new power factor\n", - "\n", - "input_power = math.sqrt(3)*V_L*I_a2*math.cos(phi_2)\n", - "cu_loss = 3*I_a2**2*R_a\n", - "P_m = input_power-cu_loss\n", - "T_g = P_m /(2*math.pi*N_s/60) \t\t\t#gross mechanical power developed\n", - "\n", - "# Results\n", - "print 'Gross torque developed is %.4f N-m and new power factor is %.4f lagging'%(T_g,cos(phi_2))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Gross torque developed is 357.1971 N-m and new power factor is 0.9518 lagging\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.16 Page no : 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3300.\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_bph = V_ph\n", - "Z_s = complex(0.5,5) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degrees, not radians\n", - "P = 8.\n", - "f = 50. \t\t\t#pole and frequency\n", - "delta_mech = 3. \t\t\t#mechanical angle in degrees by which rotor is behind\n", - "delta_elec = (P/2)*delta_mech \t\t\t#delta mech converted to electrical degrees\n", - "E_Rph = math.sqrt( E_bph**2 + V_ph**2 -2*E_bph*V_ph*math.cos(math.radians(delta_elec) )) \n", - "I_aph = E_Rph/abs(Z_s)\n", - "\n", - "#from the phasor diagram \n", - "phi = theta- math.asin( math.sin(math.radians(delta_elec))*E_bph/E_Rph )\n", - "pf = math.cos(phi)\n", - "print 'power factor of the motor is %.5f lagging'%(pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "power factor of the motor is 0.99999 lagging\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.17 Page no : 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_bph = V_ph\n", - "P = 4.\n", - "f = 50.\t\t\t#Pole and frequency\n", - "delta_mech = 4*(math.pi/180) \t\t\t#mechanical angle in degrees by which rotor is behind\n", - "delta_elec = delta_mech *(P/2) \t\t\t#delta_mech convertd to electrical degrees\n", - "Z_s = complex(0,2) \t\t\t#synchronous impedance\n", - "\n", - "# Calculations\n", - "#referring to phasor diagram\n", - "BC = E_bph*math.sin(delta_elec)\n", - "AB = E_bph\n", - "OA = V_ph\n", - "\n", - "AC = math.sqrt(AB**2-BC**2)\n", - "OC = OA-AC\n", - "phi = math.atan(OC/BC)\n", - "OB = math.sqrt(OC**2 + BC**2)\n", - "I_a = OB/abs(Z_s)\n", - "\n", - "# Results\n", - "print 'Armature current drawn by the motor is %.4f A'%(I_a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature current drawn by the motor is 16.1096 A\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.18 Page no : 65" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "input_power = 5472.\n", - "Z_s = complex(0,10) \t\t\t#synchronous impedance\n", - "I_L_cosphi = input_power/(math.sqrt(3)*V_L) \t\t\t#product of I_L & math.cos(phi)\n", - "BC = 10*I_L_cosphi\n", - "AB = V_ph\n", - "OA = V_ph\n", - "\n", - "# Calculations\n", - "#from Triangle ABC in phasor diagram\n", - "AC = math.sqrt(AB**2- BC**2)\n", - "OC = OA - AC\n", - "\n", - "\t\t\t#from Triangle OCB \n", - "OB = math.sqrt( OC**2+ BC**2 )\n", - "E_Rph = OB\n", - "I_L = E_Rph/abs(Z_s)\n", - "\n", - "phi = math.atan(OC/BC)\n", - "pf = math.cos(phi)\n", - "delta = math.atan(BC/AC) \t\t\t#load angle\n", - "\n", - "# Results\n", - "print 'Power factor is %.4f lagging'%(pf)\n", - "print 'Load angle is %.0f degrees'%(delta*180/math.pi)\n", - "print 'Armature current is %.3f A'%(I_L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power factor is 0.9848 lagging\n", - "Load angle is 20 degrees\n", - "Armature current is 8.020 A\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.19 Page no : 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6600.\n", - "V_ph = V_L/math.sqrt(3)\n", - "Z_s = complex(2,20) \t\t\t#synchronous impedance\n", - "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", - "\n", - "theta = (math.pi/180) * angle \t\t\t#phasemag returns angle in degrees not radians\n", - "P_1 = 1000*10**3\n", - "P_2 = 1500*10**3\n", - "phi_1 = math.acos(0.8) \t\t\t#leading\n", - "\n", - "# Calculations\n", - "I_L1 = P_1/(math.sqrt(3)*V_L*math.cos(phi_1))\n", - "I_a1ph = I_L1\n", - "E_R1ph = I_a1ph*abs(Z_s)\n", - "E_bph = math.sqrt( V_ph**2 + E_R1ph** -2*V_ph*E_R1ph*math.cos(theta+phi_1) )\n", - "I_a2_cosphi_2 = P_2/(math.sqrt(3)*V_L)\n", - "\n", - "#Refer to the phasor diagram and solving for I_y\n", - "#404I_y**2 -152399.968 I_y -4543000 = 0\n", - "p = [404, -152399.968, -4543000]\n", - "ans = roots(p)\n", - "I_y = abs(ans[1]) \t\t\t#becuase root 1 is too high and root is -ve\n", - "\n", - "I_a2 = complex(I_a2_cosphi_2,I_y)\n", - "phi_2 = math.degrees(math.atan(I_a2.imag/I_a2.real))\n", - "\n", - "print 'Required power factor is %.3f leading'%(math.cos(math.radians(phi_2)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required power factor is 0.978 leading\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.20 Page no : 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "V_L = 2300.\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_L = 200.\n", - "I_a = I_L\n", - "Z_s = complex(0.2,2.2) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag/Z_s.real)\n", - "phi = math.acos(0.5)\n", - "\n", - "# Calculations\n", - "E_Rph = I_a*abs(Z_s)\n", - "E_bph = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(phi+theta) ) \n", - "\n", - "# Results\n", - "print 'Generated EMF per phase is %.3f V'%(E_bph)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Generated EMF per phase is 1708.045 V\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.21 Page no : 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3300.\n", - "V_ph = V_L/math.sqrt(3)\n", - "E_bline = 3800.\n", - "E_bph = E_bline/math.sqrt(3)\n", - "\n", - "R_a = 2.\n", - "X_s = 18. \t\t\t#armature resistance and synchronous reactance\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag/Z_s.real)\n", - "\n", - "#part(i)\n", - "P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph**2/abs(Z_s))*math.cos(theta) \t\t\t#maximum total mechanical power\n", - "print 'i)Maximum total mechanical power that the motor can develop is %.2f W per phase'%(P_m_max )\n", - "#part(ii)\n", - "delta = theta \t\t\t#for max P_m\n", - "E_Rph = math.sqrt( E_bph**2 + V_ph**2 -2*E_bph*V_ph*math.cos(delta) ) \n", - "I_aph = E_Rph/abs(Z_s)\n", - "print 'ii)Current at maximum power developed is %.1f A'%(I_aph)\n", - "cu_loss_total = 3*I_aph**2*R_a \t\t\t#total copper loss\n", - "P_m_max_total = 3*P_m_max \t\t\t#total maximum total mechanical power\n", - "P_in_total = P_m_max_total+ cu_loss_total \t\t\t#total input power\n", - "\n", - "pf = P_in_total/(math.sqrt(3)*V_L*I_aph)\n", - "print ' Power factor at maximum power developed is %.3f leading'%(pf)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Maximum total mechanical power that the motor can develop is 201452.30 W per phase\n", - "ii)Current at maximum power developed is 151.4 A\n", - " Power factor at maximum power developed is 0.857 leading\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.22 Page no : 71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#subscript 1 refers to load 1\n", - "I_1 = 18.\n", - "phi_1 = math.acos(0.8)\n", - "V_L = 440.\n", - "S_1 = math.sqrt(3)*I_1*V_L /1000 \t\t\t#kVA for load 1\n", - "P_1 = S_1*math.cos(phi_1)\n", - "Q_1 = S_1*math.sin(phi_1)\n", - "\n", - "# Calculations\n", - "P_out = 6.\n", - "eta_motor = 88./100\n", - "P_2 = P_out/eta_motor\n", - "\n", - "P_T = P_1+P_2\n", - "phi_T = math.acos(1) \t\t\t#total power factor angle\n", - "Q_T = P_T*math.tan(phi_T)\n", - "\n", - "Q_2 = Q_T - Q_1 \t\t\t#kVAR supplied by motor\n", - "#this will have a negative sign just indicating its leading nature \n", - "phi_2 = math.atan(abs(Q_2)/P_2)\n", - "pf = math.cos(phi_2) \t\t\t#leading\n", - "S_2 = P_2/math.cos(phi_2) \t\t\t#kVA input to the motor\n", - "\n", - "# Results\n", - "print 'kVA input to the motor is %.3f kVA '%(S_2)\n", - "print 'Power factor when driving a 6kW mechanical load is %.4f leading'%(pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "kVA input to the motor is 10.688 kVA \n", - "Power factor when driving a 6kW mechanical load is 0.6379 leading\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.23 Page no : 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "output_power = 8.*10**3\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "R_a = 0.\n", - "X_s = 8.\t\t\t#armature resistance and syncronous reactance\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", - "eta = 88./100\n", - "input_power = output_power/eta\n", - "\n", - "# Calculations and Results\n", - "#minimum current occurs at max power factors\n", - "phi = math.acos(1)\n", - "I_a_min = input_power/(math.sqrt(3)*V_L*math.cos(phi)) \t\t\t#required minimum current \n", - "print 'Minimum current is %.3f A'%(I_a_min)\n", - "E_R = I_a_min * abs(Z_s)\n", - "E_bph = math.sqrt( E_R**2 + V_ph**2 - 2*E_R*V_ph*math.cos(phi+theta) ) \n", - "print 'Induced EMF at full-load is %.3f V'%(E_bph)\n", - "\n", - "# note : rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum current is 13.122 A\n", - "Induced EMF at full-load is 241.534 V\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.24 Page no : 73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "R_a = 0.8\n", - "X_s = 5.\n", - "Z_s = complex(R_a,X_s) \t\t\t#armature resistance and syncronous reactance\n", - "theta = math.atan(Z_s.imag/Z_s.real) \t\t\t# returns angle in radians \n", - "alpha = (math.pi/2) - theta\n", - "V_t = 3300/math.sqrt(3)\n", - "P_e_in = 800./(3) \t\t\t#per phase\n", - "phi = math.acos(0.8) \t\t\t#leading\n", - "Q_e_in = -P_e_in*math.tan(phi)\n", - "\n", - "# Calculations\n", - "# using the following equation\n", - "# P_e_in = V_t**2*R_a/(abs(Z_s))**2 + V_t*E_b*math.sin(delta-alpha)/abs(Z_S)\n", - "# Q_e_in = V_t**2*X_s/(abs(Z_s))**2 - V_t*E_b*math.cos(delta-alpha)/abs(Z_S)\n", - "E_b_sin_delta_minus_9 = 407.2\n", - "E_b_cos_delta_minus_9 = 2413.6\n", - "#solving further\n", - "delta = math.atan(E_b_sin_delta_minus_9/E_b_cos_delta_minus_9 ) + 9\n", - "E_b = E_b_sin_delta_minus_9/math.sin(math.radians(delta-9))\n", - "\n", - "P_e_in_new = 1200*10**3/3\n", - "# using the following equation again\n", - "# P_e_in = V_t**2*R_a/(abs(Z_s))**2 + V_t*E_b*math.sin(delta-alpha)/abs(Z_S)\n", - "# Q_e_in = V_t**2*X_s/(abs(Z_s))**2 - V_t*E_b*math.cos(delta-alpha)/abs(Z_S)\n", - "\n", - "alpha = delta - math.asin(math.radians(P_e_in_new - V_t**2*R_a/(abs(Z_s))**2 ) / (V_t*E_b/abs(Z_s)))\n", - "Q_e_in_new = V_t**2*X_s/(abs(Z_s))**2 - V_t*E_b*math.cos(math.radians(delta - alpha))/abs(Z_s)\n", - "\n", - "pf = math.cos ( math.atan(abs(Q_e_in_new/P_e_in_new)))\n", - "\n", - "# Results\n", - "print 'New power factor is %.2f leading '%(pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "New power factor is 0.01 leading \n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.25 Page no : 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6.6*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "P_in = 900.*10**3\n", - "R_a = 0.\n", - "X_s = 20. \t\t\t#armature resistance and synchronous reactance \n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", - "E_b_L = 8.6*10**3\n", - "E_bph = E_b_L/math.sqrt(3) \n", - "\n", - "# Calculations\n", - "#refer to phasor diagram\n", - "OA = V_ph\n", - "AB = E_bph \t\t\t#OB = E_Rph\n", - "\n", - "I_a_cosphi = P_in/(math.sqrt(3)*V_L) \t\t\t#I_a*math.cos(phi)\n", - "BC = I_a_cosphi*abs(Z_s) \t\t\t#BC is a vector in phasor diagram\n", - "\n", - "OC = math.sqrt(AB**2 -BC**2 )- OA \t\t\t#from phasor diagram\n", - "I_a_sinphi = OC/abs(Z_s) \t\t\t#product of I_a and math.sin(phi)\n", - "phi = math.atan (I_a_sinphi/I_a_cosphi)\n", - "I_a = I_a_cosphi/math.cos(phi) \t\t\t#product of I_a and math.cos(phi)\n", - "\n", - "# Results\n", - "print 'Motor current is %.3f A'%(I_a)\n", - "print 'Power factor of motor is %f leading'%(cos(phi))\n", - "print 'Note:There is slight mismatch in answer due to the approximation made during I_a* sinphi calculation'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Motor current is 90.643 A\n", - "Power factor of motor is 0.868564 leading\n", - "Note:There is slight mismatch in answer due to the approximation made during I_a* sinphi calculation\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.26 Page no : 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "\n", - "# Variables\n", - "#subscipt 1 refers to factory load\n", - "P_1 = 1800.\n", - "phi_1 = math.acos(0.6) \t\t\t#lagging\n", - "Q_1 = P_1*math.tan(phi_1)\n", - "\n", - "#Subscript 2 refers to synchronous condenser\n", - "P_2 = 0.\n", - "\n", - "# Calculations\n", - "#Subscript T refers to combination of condenser and factory load\n", - "P_T = P_1+P_2\n", - "phi_T = math.acos(0.95) \t\t\t#lagging\n", - "Q_T = P_T*math.tan(phi_T)\n", - "\n", - "kva_rating = math.sqrt(P_T**2+ Q_T**2)\n", - "\n", - "Q_2 = Q_T - Q_1\n", - "\n", - "# Results\n", - "print 'i)kVA rating of synchronous condender is %.3f kVA Minus sign indicates leading nature'%(Q_2)\n", - "print 'ii)kVA rating of total factory is %.4f kVA'%(kva_rating)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)kVA rating of synchronous condender is -1808.369 kVA Minus sign indicates leading nature\n", - "ii)kVA rating of total factory is 1894.7368 kVA\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.27 Page no : 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "I_1 = 35.\n", - "phi_1 = math.acos(0.8)\n", - "V_L = 440.\n", - "S_1 = math.sqrt(3)*I_1*V_L /1000 \t\t\t#in kVA\n", - "\n", - "\n", - "# Calculations\n", - "P_1 = S_1*math.cos(phi_1)\n", - "Q_1 = S_1*math.sin(phi_1)\n", - "\n", - "P_out = 12. \t\t\t#motor load\n", - "eta_motor = 85./100\n", - "P_2 = P_out/eta_motor\n", - "\n", - "P_T = P_1 + P_2\n", - "phi_T = math.acos(1)\n", - "Q_T = P_T * math.tan(phi_T)\n", - "\n", - "\n", - "Q_2 = Q_T - Q_1 \t\t\t#kVA supplied by motor\n", - "#negative sign of Q_2 indicates its leading nature\n", - "phi_2 = math.atan(abs(Q_2)/P_2)\n", - "S_2 = P_2/math.cos(phi_2)\n", - "\n", - "# Results\n", - "print 'Power factor when motor supplies 12kW load is %.4f leading'%(math.cos(phi_2))\n", - "print 'kVA input to the motor is %.3f kVA'%(S_2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power factor when motor supplies 12kW load is 0.6615 leading\n", - "kVA input to the motor is 21.341 kVA\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.28 Page no : 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400\n", - "V_ph = V_L/math.sqrt(3)\n", - "Z_s = complex(0.5,4) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag/Z_s.real) \t\t\t# returns angle in radians \n", - "\n", - "I_aph = 60.\n", - "phi = math.acos(0.866) \t\t\t#leading\n", - "power_losses = 2*10**3\n", - "\n", - "# Calculations\n", - "E_bph = math.sqrt( (I_aph*abs(Z_s))**2 + (V_ph)**2 - 2*(I_aph*abs(Z_s))*(V_ph)*math.cos(phi+theta) ) \n", - "delta = theta \t\t\t#for P_m_max\n", - "P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph**2/abs(Z_s))*math.cos(delta)\n", - "P_m_max_total = 3 * P_m_max\n", - "P_out_max = P_m_max_total- power_losses\n", - "\n", - "# Results\n", - "print 'Maximum power output is %.4f kW'%(P_out_max*10**-3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum power output is 51.3899 kW\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.29 Page no : 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 6.6*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "I_L = 50.\n", - "I_aph = I_L\n", - "Z_s = complex(1.5,8) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag/Z_s.real) \t\t\t# returns angle in radians \n", - "E_Rph = I_aph*abs(Z_s)\n", - "\n", - "# Calculations and Results\n", - "#part(i)\n", - "phi = math.acos(0.8)\n", - "P_in = math.sqrt(3)*V_L*I_L*math.cos(phi) \t\t\t#for both lag and lead supplied power will be the same\n", - "print 'i)Power supplied to the motor is %.3f kW'%(P_in*10**-3)\n", - "#part(ii)\n", - "E_bph_lag = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(theta-phi) ) \t\t\t#for lagging power factor\n", - "#Note that E_bph_lag > V_ph\n", - "print 'ii)Induced EMF for 0.8 power factor lag is %.3f V'%(E_bph_lag)\n", - "E_bph_lead = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(theta+phi) ) \t\t\t#for leading power factor\n", - "#Note that E_bph_lead < V_ph\n", - "print ' Induced EMF for 0.8 power factor lead is %.3f V'%(E_bph_lead)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Power supplied to the motor is 457.261 kW\n", - "ii)Induced EMF for 0.8 power factor lag is 3521.267 V\n", - " Induced EMF for 0.8 power factor lead is 4007.170 V\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.30 Page no : 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 400.\n", - "V_ph = V_L/math.sqrt(3)\n", - "P_out = 7.5*735.5\n", - "eta = 85./100 \t\t\t#efficiency\n", - "R_a = 0.\n", - "X_s = 10. \t\t\t#armature resistance and synchronous reactance\n", - "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", - "\n", - "# Calculations and Results\n", - "P_in = P_out/eta\n", - "phi = math.acos(1) \t\t\t#for mimimum current power factor is maximum\n", - "I_L = P_in/(math.sqrt(3)*V_L*math.cos(phi)) \n", - "I_aph = I_L\n", - "print 'Minimum current is %.3f A at full load condition '%(I_L)\n", - "\n", - "E_Rph = I_aph*abs(Z_s)\n", - "E_bph = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(phi+theta) ) \n", - "print 'and corresponding EMF is %.4f V'%(E_bph)\n", - "\n", - "# note : rounding off error.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum current is 9.367 A at full load condition \n", - "and corresponding EMF is 240.4216 V\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.31 Page no : 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "# Variables\n", - "V_L = 3.3*10**3\n", - "V_ph = V_L/math.sqrt(3)\n", - "V_t = V_ph\n", - "Pole = 24.\n", - "f = 50. \t\t\t#Pole and frequency\n", - "P = 1000.*10**3\n", - "R_a = 0\n", - "X_s = 3.24 \t\t\t#armature resistance and synchronous reactance\n", - "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", - "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", - "phi = math.acos(1)\n", - "I_aph = P/(math.sqrt(3)*V_L*math.cos(phi))\n", - "\n", - "# Calculations\n", - "E_Rph = I_aph*abs(Z_s)\n", - "E_bph = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(phi+theta) ) \n", - "\n", - "P_m_max = 3*(E_bph*V_ph/abs(Z_s)) \t\t\t#maximum power that can be delivered\n", - "N_s = 120*f/Pole \t\t\t#synchronous speed\n", - "T_max = P_m_max /(2*math.pi*N_s/60) \t\t\t#maximum torque that can be developed\n", - "\n", - "# Results\n", - "print 'Maximum power and torque the motor can deliver is %.3f kW and %.2f *10**3 Nm respectively'%(P_m_max*10**-3,T_max/1000)\n", - "\n", - "# rounding off error." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum power and torque the motor can deliver is 3211.633 kW and 122.68 *10**3 Nm respectively\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch1.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch1.png deleted file mode 100755 index a18f9a05..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch1.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_1.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch1_1.png deleted file mode 100755 index a18f9a05..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_1.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_2.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch1_2.png deleted file mode 100755 index a18f9a05..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_2.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch4.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch4.png deleted file mode 100755 index 4e0892cf..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch4.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_1.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch4_1.png deleted file mode 100755 index 4e0892cf..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_1.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_2.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch4_2.png deleted file mode 100755 index 4e0892cf..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_2.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch7.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch7.png deleted file mode 100755 index 6244be52..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch7.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_1.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch7_1.png deleted file mode 100755 index 6244be52..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_1.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_2.png b/DC_Machines_and_Synchronous_Machines/screenshots/ch7_2.png deleted file mode 100755 index 6244be52..00000000 Binary files a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_2.png and /dev/null differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/README.txt b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/README.txt new file mode 100755 index 00000000..9c84b56e --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/README.txt @@ -0,0 +1,10 @@ +Contributed By: Hiren Shah +Course: mca +College/Institute/Organization: Financial Technology +Department/Designation: Developer +Book Title: DC Machines and Synchronous Machines +Author: U. A. Bakshi and M. V. Bakshi +Publisher: Technical Publications, Pune +Year of publication: 2008 +Isbn: 9788184314830 +Edition: 1 \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch1_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch1_2.ipynb new file mode 100755 index 00000000..b98c0ac6 --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch1_2.ipynb @@ -0,0 +1,1625 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ae45c35a90f5d6d72689d00dd327a0dd50ebdc721f0cf7cc3ef6e9742fbf7b87" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : D.C. Generators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 page no : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "p = 4.\n", + "Z = 440.\n", + "theta = 0.07 # Wb\n", + "N = 900. # rpm\n", + "\n", + "# calculations and results\n", + "E = theta*N*Z/60.\n", + "print \"For lap wound : E = %.f V\"%E\n", + "\n", + "E = theta*N*Z*4/120.\n", + "print \"For wave wound : E = %.f V\"%E\n", + "\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For lap wound : E = 462 V\n", + "For wave wound : E = 924 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Example 1.2 page no : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 4.\n", + "phi = 21.*10**-3 \t\t\t#flux produced by each pole in webers\n", + "N = 1120. \t\t\t#Speed of armature in r.p.m\n", + "Coils = 42.\n", + "turns_per_coil = 8.\n", + "Turns = Coils * turns_per_coil\n", + "Z = 2*Turns \t\t\t#Number of armature conductors\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "A1 = Pole \t\t\t#no of parallel paths for lap winding\n", + "E1 = phi*N*Z*Pole/(60*A1)\n", + "print 'i) e.m.f generated is %.3f V'%(E1)\n", + "\n", + "#Part(ii)\n", + "A2 = 2 \t\t\t#wave winding\n", + "E2 = E1 \t\t\t#as mentioned in the question\n", + "N2 = E2/(phi*Z*Pole/(60*A2)) \t\t\t#E = phi*N*Z*Pole/(60*A)\n", + "print 'ii) For wave-wound armature,above calculated e.m.f is generated at %.0f r.p.m'%(N2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) e.m.f generated is 263.424 V\n", + "ii) For wave-wound armature,above calculated e.m.f is generated at 560 r.p.m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 page no: 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 4.\n", + "coils = 12.\n", + "commutator_segments = coils\n", + "coil_sides = coils*2\n", + "Z = coil_sides \t\t\t#No of conductors\n", + "pole_pitch = Z/Pole\n", + "\n", + "# Calculations and Results\n", + "#for Simplex lap winding\n", + "y_f = pole_pitch-1\n", + "y_b = pole_pitch+1\n", + "\n", + "y_c = 1 \t\t\t#Note that it's positive and it's progressive type of Simplex lap winding\n", + "\n", + "\n", + "print 'WINDING TABLE: 1<- 8-> 3<- 10-> 5<- 12-> 7<- 14-> 9<- 16-> 11<- 18->13<- 20-> 15<- 22-> 17<- 24->19<- 2-> 21<- 4-> 23<- 6-> 1 '\n", + "print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)\n", + "print 'Another form of winding table:'\n", + "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", + "\n", + "print ' 1 to 1+7 = 8 -> 8 to 8-5 = 3'\n", + "print ' 3 to 3+7 = 10 -> 10 to 10-5 = 5'\n", + "print ' 5 to 5+7 = 12 -> 12 to 12-5 = 7'\n", + "print ' 7 to 7+7 = 14 -> 14 to 14-5 = 9'\n", + "print ' 9 to 9+7 = 16 -> 16 to 16-5 = 11'\n", + "print ' 11 to 11+7 = 18 -> 18 to 18-5 = 13'\n", + "print ' 13 to 13+7 = 20 -> 20 to 20-5 = 15'\n", + "print ' 15 to 15+7 = 22 -> 22 to 22-5 = 17'\n", + "print ' 17 to 17+7 = 24 -> 24 to 24-5 = 19'\n", + "print ' 19 to 19+7 = 26 = 26-24 = 2 -> 2 to 26-5 = 21'\n", + "print ' 21 to 21+7 = 28 = 28-24 = 4 -> 4 to 28-5 = 23'\n", + "print ' 23 to 23+7 = 30 = 30-24 = 6 -> 6 to 30-5 = 25 = 25-24 = 1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "WINDING TABLE: 1<- 8-> 3<- 10-> 5<- 12-> 7<- 14-> 9<- 16-> 11<- 18->13<- 20-> 15<- 22-> 17<- 24->19<- 2-> 21<- 4-> 23<- 6-> 1 \n", + "Note that <- indicates back connection with y_back = 7 and -> indicates front connection with y_front = 5\n", + "Another form of winding table:\n", + " BACK CONNECTIONS FRONT CONNECTIONS\n", + " 1 to 1+7 = 8 -> 8 to 8-5 = 3\n", + " 3 to 3+7 = 10 -> 10 to 10-5 = 5\n", + " 5 to 5+7 = 12 -> 12 to 12-5 = 7\n", + " 7 to 7+7 = 14 -> 14 to 14-5 = 9\n", + " 9 to 9+7 = 16 -> 16 to 16-5 = 11\n", + " 11 to 11+7 = 18 -> 18 to 18-5 = 13\n", + " 13 to 13+7 = 20 -> 20 to 20-5 = 15\n", + " 15 to 15+7 = 22 -> 22 to 22-5 = 17\n", + " 17 to 17+7 = 24 -> 24 to 24-5 = 19\n", + " 19 to 19+7 = 26 = 26-24 = 2 -> 2 to 26-5 = 21\n", + " 21 to 21+7 = 28 = 28-24 = 4 -> 4 to 28-5 = 23\n", + " 23 to 23+7 = 30 = 30-24 = 6 -> 6 to 30-5 = 25 = 25-24 = 1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 page no : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 4.\n", + "Z = 18. \t\t\t#no of armature conductors\n", + "Y_A = (Z+2)/Pole \t\t\t#For progressive type wave winding,positive sign is used\n", + "Y_C = Y_A \t\t\t#For wave winding\n", + "\n", + "# Calculations\n", + "#Since Y_A = (y_b+y_f)/2, we let y_b = Y_f\n", + "y_b = Y_A/2 \t\t\t#say\n", + "y_f = y_b\n", + "\n", + "coils = Z/2\n", + "slots = coils\n", + "commutator_segments = coils\n", + "\n", + "print commutator_segments\n", + "print 'WINDING TABLE: 1<- 6-> 11<- 16-> 3<- 8->13<- 18-> 5<- 10-> 15<- 2-> 7<- 12-> 17<- 4-> 9<- 14->1 '\n", + "\n", + "print 'Another form of winding table:'\n", + "\n", + "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", + "\n", + "print ' 1 to 1+5 = 6 -> 6 to 6+5 = 11'\n", + "print ' 11 to 11+5 = 16 -> 16 to 16+5 = 21 -18 = 3'\n", + "print ' 3 to 3+5 = 8 -> 8 to 8+5 = 13'\n", + "print ' 13 to 13+5 = 18 -> 18 to 18+5 = 23 -18 = 5'\n", + "print ' 5 to 5+5 = 10 -> 10 to 10+5 = 15'\n", + "print ' 15 to 15+5 = 20 -18 = 2 -> 2 to 2+5 = 7'\n", + "print ' 7 to 7+5 = 12 -> 12 to 12+5 = 17'\n", + "print ' 17 to 17+5 = 22 -18 = 4 -> 4 to 4+5 = 9'\n", + "print ' 9 to 9+5 = 14 -> 14 to 14+5 = 19 -18 = 1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "9.0\n", + "WINDING TABLE: 1<- 6-> 11<- 16-> 3<- 8->13<- 18-> 5<- 10-> 15<- 2-> 7<- 12-> 17<- 4-> 9<- 14->1 \n", + "Another form of winding table:\n", + " BACK CONNECTIONS FRONT CONNECTIONS\n", + " 1 to 1+5 = 6 -> 6 to 6+5 = 11\n", + " 11 to 11+5 = 16 -> 16 to 16+5 = 21 -18 = 3\n", + " 3 to 3+5 = 8 -> 8 to 8+5 = 13\n", + " 13 to 13+5 = 18 -> 18 to 18+5 = 23 -18 = 5\n", + " 5 to 5+5 = 10 -> 10 to 10+5 = 15\n", + " 15 to 15+5 = 20 -18 = 2 -> 2 to 2+5 = 7\n", + " 7 to 7+5 = 12 -> 12 to 12+5 = 17\n", + " 17 to 17+5 = 22 -18 = 4 -> 4 to 4+5 = 9\n", + " 9 to 9+5 = 14 -> 14 to 14+5 = 19 -18 = 1\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 page no : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 4.\n", + "Z = 480. \t\t\t#No of armature conductors\n", + "I_a = 144.\n", + "I = I_a/2 \t\t\t#For wave wound\n", + "theta_m = 10. \t\t\t#lead angle in DEGREES\n", + "\n", + "# Calculations\n", + "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#demagnetising Ampere-turns per pole\n", + "amp_turns_PP_c = Z*I*(1/(2*Pole)-theta_m/360) \t\t\t#cross-magnetising Ampere-turns per pole\n", + "\n", + "# Results\n", + "print 'De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d)\n", + "print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "De-magnetising ampere-turns per pole is 960\n", + "Cross-magnetising ampere-turns per pole is 3360\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 10.\n", + "Z = 800. \t\t\t#No of armature conductors\n", + "A = Pole \t\t\t#For lap wound\n", + "ratio = 0.7 \t\t\t#ratio of pole arc to pole pitch\n", + "\n", + "# Calculations\n", + "#amp_turns_PP = ratio*(I_a*Z)/(2*A*P)\n", + "turns_PP = ratio*(Z)/(2*A*Pole) \t\t\t#turns per pole\n", + "conductors_PP = turns_PP*2 \t\t\t#multiplied with 2 because 2 conductors form 1 turn\n", + "\n", + "# Results\n", + "print 'Compensating conductors per pole = %.f'%(conductors_PP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compensating conductors per pole = 6\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 page no : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I_L = 150.\n", + "A = 4.\n", + "N = 1800. \t\t\t#in rpm\n", + "W_b = 1.2 \t\t\t#Brush width\n", + "W_m = 0 \t\t\t#width of mica insulation\n", + "L = 0.06*10**-3 \t\t\t#Inducmath.tance\n", + "segments = 64.\n", + "n_s = 1800./60 \t\t\t#in rps and not rpm\n", + "v = n_s*segments \t\t\t#peripheral speed in segments per second\n", + "\n", + "# Calculations and Results\n", + "T_c = (W_b-W_m)/v \t\t\t#Time of commutation\n", + "I = I_L/A \t\t\t#Current through a conductor\n", + "\n", + "#Part(i)\n", + "E_l = L*2*I/T_c\n", + "print 'i) Reactive voltage using Linear commutation is %.1f V'%(E_l)\n", + "\n", + "#Part(ii)\n", + "E_s = 1.11*L*2*I/T_c\n", + "print 'ii) Reactive voltage using Sinusoidal commutation is %.3f V'%(E_s)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Reactive voltage using Linear commutation is 7.2 V\n", + "ii) Reactive voltage using Sinusoidal commutation is 7.992 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V_t = 250. \t\t\t#Terminal voltage\n", + "R_sh = 100. \t\t\t#resistance of shunt field winding\n", + "I_sh = V_t/R_sh \t\t\t#shunt current\n", + "R_a = 0.22 \t\t\t#Armature resistance\n", + "\n", + "# Calculations\n", + "P = 5*10**3 \t\t\t#Load power\n", + "I_L = P/V_t \t\t\t#Load current\n", + "I_a = I_L+I_sh \t\t\t#armature current\n", + "\n", + "E = V_t + I_a*R_a \t\t\t#Induced emf\n", + "\n", + "# Results\n", + "print 'Induced e.m.f to supply the 5kW load is %.2f V'%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced e.m.f to supply the 5kW load is 254.95 V\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V_t = 250. \t\t\t#terminal voltage\n", + "P = 10.*10**3 \t\t\t#10kW power of generator\n", + "I_L = P/V_t \t\t\t#load current\n", + "I_a = I_L \t \t\t#As seperately excited\n", + "V_brush = 2.*2 \t\t\t# 2 * no of brushes\n", + "\n", + "E = 255. \t\t\t#on full load\n", + "\n", + "# Calculations\n", + "R_a = (E-V_t-V_brush)/I_a \t\t\t#Because E = V_t+ I_a*R_a + V_brush\n", + "\n", + "# Results\n", + "print 'Armature resistance of generator is %.3f ohm'%(R_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature resistance of generator is 0.025 ohm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 page no : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R_a = 0.5\n", + "R_se = 0.03 \t\t\t#resimath.tance due to armature and series field winding\n", + "V_brush = 2. \t\t\t#brush drop\n", + "N = 1500. \t\t\t#generator speed in r.p.m\n", + "coils = 540.\n", + "turns_per_coil = 6.\n", + "\n", + "# Calculations\n", + "total_turns = coils*turns_per_coil\n", + "Z = 2*total_turns \t\t\t#Total conductors\n", + "I_a = 50 \t\t\t#armature current\n", + "\n", + "phi = 2*10**-3 \t\t\t#flux per pole in webers\n", + "E = phi*N*Z/(60) \t\t\t#A = P for lap-wound and they cancel out\n", + "V_t = E- (I_a*(R_a+R_se) + V_brush) \t\t\t#Because E = V_t+ I_a*R_a + V_brush\n", + "\n", + "# Results\n", + "print 'Terminal voltage is %.1f V'%(V_t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Terminal voltage is 295.5 V\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 page no : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V_t = 225. \t\t\t#voltage across winding\n", + "R_a = 0.04 \t\t\t#armature resistance\n", + "R_sh = 90 \t\t\t#shunt resistance\n", + "R_se = 0.02\t\t\t#resistance of series field winding\n", + "I_L = 75. \t\t\t#load current\n", + "\n", + "# Calculations\n", + "#E -I_a*R_a = V_t+I_L*R_se \n", + "I_sh = (V_t+I_L*R_se)/R_sh \t\t\t#current through shunt field winding\n", + "\n", + "I_a = I_L + I_sh \t\t\t #armature current \n", + "E = V_t+ I_a*R_a+I_L*R_se \t\t\t#induced emf\n", + "\n", + "# Results\n", + "print 'Generated voltage is %.1f V'%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated voltage is 229.6 V\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R_sh = 53. \t\t\t#resistance of field winding\n", + "V_t = 100. \t\t\t#terminal voltage \n", + "I_sh = V_t/R_sh \t\t\t#shunt current\n", + "I_f = I_sh\n", + "R_a = 0.1 \t\t\t#armature resistance\n", + "E_o = 143. \t\t\t# for I_sh = I_f = 1.8867 as obtained from graph\n", + "\n", + "# Calculations\n", + "I_a = (E_o-V_t)/R_a \t\t\t#Because E_o = V_t + I_a*R_a\n", + "I_L = I_a-I_sh \t\t\t#no load current\n", + "\n", + "# Results\n", + "print 'Note: Open circuit voltage was obtained as followsE_o = R_sh*I_f \t\t\t# y = mx+c form with c = 0 and R_sh = 53Hence%( a line with slope 53 through origin is made to intersect OCC at 150 V'\n", + "print 'Therefore, Open circuit voltage is 150 V'\n", + "print 'No load current is %.4f A '%(I_L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Note: Open circuit voltage was obtained as followsE_o = R_sh*I_f \t\t\t# y = mx+c form with c = 0 and R_sh = 53Hence%( a line with slope 53 through origin is made to intersect OCC at 150 V\n", + "Therefore, Open circuit voltage is 150 V\n", + "No load current is 428.1132 A \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 page no : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#part(1)\n", + "E_o = 240. \t\t\t#on no-load\n", + "\n", + "# Calculations and Results\n", + "#Draw horizontal line from 240 V, to intersect OCC at A. corresponding I_f is 2.25 A\n", + "#The slope pf OA is corresponding R_sh\n", + "I_f = 2.25 \t\t\t#Corresponds to 240 V when intersected OCC\n", + "R_sh = E_o/I_f \t\t\t#shunt resistance\n", + "print 'i)Field resistance that gives 240 V on no-load is %.2f ohms '%(R_sh)\n", + "\n", + "#Part(ii)\n", + "N1 = 1000. \t\t\t#speed of shunt generator in rpm\n", + "I_f = 1.\n", + "\n", + "#Draw line OP math.tangential to OCC at N1 = 1000 r.p.m.\n", + "#Select I_f = 1A i.e. point R\n", + "#Draw vertical from R to intersect OP at S and OA at T....this gives RT = 105 and RS = 159\n", + "#At critcal speed generator just fails to build up\n", + "\n", + "RT = 105.\n", + "RS = 159.\n", + "N_C = N1*RT/RS \t\t\t#Critical speed\n", + "print 'ii)Critical speed is %.2f r.p.m '%(N_C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Field resistance that gives 240 V on no-load is 106.67 ohms \n", + "ii)Critical speed is 660.38 r.p.m \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4. \t\t\t#number of poles\n", + "A = 2. \t\t\t#because wave wound\n", + "Z = 792 \t\t\t#No of conductors\n", + "phi = 0.012 \t\t\t#flux per pole in weber\n", + "E_g = 240 \t\t\t#on no-load\n", + "\n", + "# Calculations\n", + "#running speed\n", + "N = E_g*60*A/(phi*P*Z) \t\t\t#becuase E_g = phi*P*N*Z/(60*A)\n", + "\n", + "# Results\n", + "print 'Required running speed is %.3f r.p.m'%(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required running speed is 757.576 r.p.m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#open circuit condition\n", + "I_L = 0. \t\t\t#because of open circuit\n", + "V_t = 127. \t\t\t#terminal voltage\n", + "E_g = V_t \t\t\t#because I_L = 0\n", + "\n", + "# Calculations\n", + "#load condition\n", + "V_t = 120\n", + "R_sh = 15.\n", + "R_a = 0.02 \t\t\t#shunt and armature resistance\n", + "I_sh1 = V_t/R_sh \t\t\t#current through shunt winding in loaded condition\n", + "\n", + "I_L = (E_g-V_t)/R_a - I_sh1 \t\t\t#because I_a1 = I_L+I_sh1 and E_g = V_t + I_a1*R_a\n", + "\n", + "# Results\n", + "print 'Load current is %.0f A'%(I_L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load current is 342 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16 page no : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V_t = 550. \t\t\t#Terminal voltage\n", + "R_lamp = 500. \t\t\t#Each lamp\n", + "I_lamp = V_t/R_lamp \t\t\t#each lamp ; V_t because all lamps are in parallel\n", + "\n", + "# Calculations\n", + "I_L = 20*I_lamp \t\t\t#there exist 20 lamps\n", + "R_sh = 25.\n", + "R_a = 0.06\n", + "R_se = 0.04 \t\t\t#resistance of shunt winding,armature,series field\n", + "I_sh = V_t/R_sh \t\t\t#current throough shunt winding\n", + "I_a = I_L+I_sh\t\t\t#armature current\n", + "E = V_t + I_a*(R_a+R_se) \t\t\t#generated emf\n", + "\n", + "# Results\n", + "print 'Armature current and generated e.m.f is %.0f A and %.1f V respectively '%(I_a,E )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature current and generated e.m.f is 44 A and 554.4 V respectively \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17 page no : 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4. \t\t\t#number of poles\n", + "A = P \t\t\t# because of lap wound\n", + "N = 750. \t\t\t#speed in rpm\n", + "Z = 720. \t\t\t#number of armature conductors\n", + "phi = 30.*10**-3 \t\t\t#flux per pole in weber\n", + "R_sh = 200.\n", + "R_a = 0.4\n", + "R_L = 15. \t\t\t#resistance of shunt winding,armature,series field\n", + "E = phi*P*N*Z/(60*A) \t\t\t#generated emf\n", + "\n", + "# Calculations\n", + "#solving the following equations for V_t\n", + "#E = V_t + I_a*R_a\n", + "#E = V_t + (I_L + I_sh)*R_a\n", + "#E = V_t + ((V_t/R_L) + (V_t/R_sh))*R_a\n", + "V_t = E/(1+(R_a/R_L)+(R_a/R_sh))\n", + "\n", + "# Results\n", + "print 'Terminal voltage = %.4f V'%(V_t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Terminal voltage = 262.4757 V\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18 page no : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 6. \t\t\t#number of poles\n", + "A = 2. \t\t\t# because of wave wound\n", + "N_1 = 300. \t\t\t#speed of generator\n", + "Z = 600. \t\t\t#number of armature conductors\n", + "phi_1 = 0.06 \t\t\t#flux per pole in webers \n", + "\n", + "# Calculations and Results\n", + "E_g1 = phi_1*P*N_1*Z/(60*A) \t\t\t#generated emf\n", + "print 'Emf generated is %.0f V'%(E_g1)\n", + "\n", + "phi_2 = 0.055 \t\t\t#new flux per pole \n", + "E_g2 = 550.\t\t\t# new generated emf\n", + "N_2 = E_g2/(phi_2*P*Z/(60*A)) \t\t\t#new speed of generator\n", + "print 'Required speed is %.2f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emf generated is 540 V\n", + "Required speed is 333.33 r.p.m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19 page no : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "print 'Refer to code for explanation'\n", + "\n", + "# Variables\n", + "N_1 = 300.\n", + "N_2 = 375. \t\t\t#generator speeds\n", + "\n", + "#E_g2 = E_g1*(N_2/N_1)\n", + "#using this new table OCC at N_2 = 375 is made\n", + "#Draw a line with slope R_sh = 40 through origin which cuts this OCC at 248\n", + "#I_f_table = [0,2,3,4,5,6,7]\n", + "#Arm_vol_table = [9.375,115,165,202.5,228.75,237.5,265]\n", + "\n", + "#part(i)\n", + "#at V = 200 volts, I_f = 3.9 from the graph\n", + "V = 200.\n", + "I_f = 3.9\n", + "\n", + "# Calculations and Results\n", + "R_sh2 = V/I_f\n", + "R_sh = 40.\n", + "print 'Additional resistance required is %.3f ohms '%(R_sh2-R_sh)\n", + "\n", + "#part(ii)\n", + "V_t = 200.\n", + "I_f = V_t/R_sh\n", + "E_g = 228.75 \t\t\t#For this I_f from the table \n", + "R_a = 0.4\n", + "I_a = (E_g-V_t)/R_a \t\t\t#Because E_g = V_t + I_a*R_a\n", + "I_L = I_a-I_f\n", + "print 'Load current supplied by the generator is %.3f A'%(I_L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to code for explanation\n", + "Additional resistance required is 11.282 ohms \n", + "Load current supplied by the generator is 66.875 A\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20 page no : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I_a = 750. \t\t\t#full load current \n", + "Pole = 6. \n", + "A = Pole \t\t\t#lap winding\n", + "I = I_a/A \t\t\t#Full-load current per path\n", + "Z = 900. \t\t\t#no of conductors\n", + "lambda1 = 1.4 \t\t\t#leakage coefficient\n", + "theta_e = 21. \t\t\t#lead angle in degrees electrical\n", + "\n", + "# Calculations\n", + "theta_m = theta_e/(Pole/2) \t\t\t#lead angle in degrees mechanical\n", + "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#demagnetising ampere turns per pole\n", + "amp_turns_PP_c = Z*I*(1./(2*Pole)-theta_m/360) \t\t\t#cross-magnetising ampere turns per pole\n", + "balance_turns = amp_turns_PP_d*lambda1/I_a \t\t\t#series turns required to balance demagnetising component\n", + "\n", + "# Results\n", + "print 'i) De-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_d)\n", + "print 'ii) Cross-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_c)\n", + "print 'iii)Turns required to balance demagnetising component is %.0f'%(balance_turns)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) De-magnetising ampere-turns per pole is 2187.5\n", + "ii) Cross-magnetising ampere-turns per pole is 7187.5\n", + "iii)Turns required to balance demagnetising component is 4\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.21 page no : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pole = 4. \n", + "Z = 32. \t\t\t#no of conductors\n", + "coil_sides = Z \n", + "segments = 16.\n", + "pole_pitch = Z/Pole\n", + "slots = 16.\n", + "slots_per_pole = slots/Pole\n", + "\n", + "# Calculations\n", + "#for Simplex lap winding\n", + "y_b = pole_pitch+1 \t\t\t#back pitch\n", + "y_f = pole_pitch-1 \t\t\t#front pitch\n", + "\n", + "y_c = 1 \t\t\t#Commutator pitch; Note that it is positive and it is progressive type of Simplex lap winding\n", + "\n", + "# Results\n", + "print 'WINDING TABLE: 1<- 10-> 3<- 12-> 5<- 14-> 7<- 16-> 9<- 18-> 11<- 20->13<- 22-> 15<- 24-> 17<- 26->19<- 28-> 21<- 30-> 23<- 32->25<- 2-> 27<- 4-> 29<- 6->31<- 8->1 '\n", + "print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)\n", + "\n", + "print 'Another form of winding table:'\n", + "\n", + "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", + "\n", + "print ' 1 to 1+9 = 10 -> 10 to 10-7 = 3'\n", + "print ' 3 to 3+9 = 12 -> 12 to 12-7 = 5'\n", + "print ' 5 to 5+9 = 14 -> 14 to 14-7 = 7'\n", + "print ' 7 to 7+9 = 16 -> 16 to 16-7 = 9'\n", + "print ' 9 to 9+9 = 18 -> 18 to 18-7 = 11'\n", + "print ' 11 to 11+9 = 20 -> 20 to 20-7 = 13'\n", + "print ' 13 to 13+9 = 22 -> 22 to 22-7 = 15'\n", + "print ' 15 to 15+9 = 24 -> 24 to 24-7 = 17'\n", + "print ' 17 to 17+9 = 26 -> 26 to 26-7 = 19'\n", + "print ' 19 to 19+9 = 28 -> 28 to 28-7 = 21'\n", + "print ' 21 to 21+9 = 30 -> 30 to 30-7 = 23'\n", + "print ' 23 to 23+9 = 32 -> 32 to 32-7 = 25'\n", + "print ' 25 to 25+9 = 34 = 34-32 = 2 -> 2 to 34-7 = 27'\n", + "print ' 27 to 27+9 = 36 = 36-32 = 4 -> 4 to 36-7 = 29'\n", + "print ' 29 to 29+9 = 38 = 38-32 = 6 -> 6 to 38-7 = 31'\n", + "print ' 31 to 31+9 = 40 = 40-32 = 4 -> 8 to 40-7 = 33 -32 = 1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "WINDING TABLE: 1<- 10-> 3<- 12-> 5<- 14-> 7<- 16-> 9<- 18-> 11<- 20->13<- 22-> 15<- 24-> 17<- 26->19<- 28-> 21<- 30-> 23<- 32->25<- 2-> 27<- 4-> 29<- 6->31<- 8->1 \n", + "Note that <- indicates back connection with y_back = 9 and -> indicates front connection with y_front = 7\n", + "Another form of winding table:\n", + " BACK CONNECTIONS FRONT CONNECTIONS\n", + " 1 to 1+9 = 10 -> 10 to 10-7 = 3\n", + " 3 to 3+9 = 12 -> 12 to 12-7 = 5\n", + " 5 to 5+9 = 14 -> 14 to 14-7 = 7\n", + " 7 to 7+9 = 16 -> 16 to 16-7 = 9\n", + " 9 to 9+9 = 18 -> 18 to 18-7 = 11\n", + " 11 to 11+9 = 20 -> 20 to 20-7 = 13\n", + " 13 to 13+9 = 22 -> 22 to 22-7 = 15\n", + " 15 to 15+9 = 24 -> 24 to 24-7 = 17\n", + " 17 to 17+9 = 26 -> 26 to 26-7 = 19\n", + " 19 to 19+9 = 28 -> 28 to 28-7 = 21\n", + " 21 to 21+9 = 30 -> 30 to 30-7 = 23\n", + " 23 to 23+9 = 32 -> 32 to 32-7 = 25\n", + " 25 to 25+9 = 34 = 34-32 = 2 -> 2 to 34-7 = 27\n", + " 27 to 27+9 = 36 = 36-32 = 4 -> 4 to 36-7 = 29\n", + " 29 to 29+9 = 38 = 38-32 = 6 -> 6 to 38-7 = 31\n", + " 31 to 31+9 = 40 = 40-32 = 4 -> 8 to 40-7 = 33 -32 = 1\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.22 page no : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\n", + "# Variables\n", + "Z = 496. \t\t\t#no of conductors\n", + "P = 4. \t\t\t#poles\n", + "slots = 31.\n", + "coilsides_per_slot = 4.\n", + "coilsides = slots*coilsides_per_slot\n", + "coils = coilsides/2\n", + "turns = Z/2\n", + "turns_per_coil = turns/coils\n", + "\n", + "# Calculations\n", + "y_c = array([(Z-2)/P, (Z+2)/P]) \t\t\t#commutator pitch\n", + "coils_active = (Z/(2*P))-1 \t\t\t# because y_c didnt turn out to be integer, 1 coil was made inactive/dummy\n", + "segments = coils_active \t\t\t#no of commutative segments\n", + "Y_A = [ (segments+1)/(P/2), (segments-1)/(P/2) ]\n", + "Y_A = Y_A[0] \t\t\t#Y_A(2) is discarded because of progressive wave winding\n", + "y_f = 29.\n", + "y_b = 33. \t\t\t#front and back pitch ; note that Y_A = (y_b+y_f)/2\n", + "resultant_pitch = 2*Y_A \t\t\t#because Y_A = (y_b+y_f)/2 and resultant pitch = y_b+ y_f\n", + "\n", + "# Results\n", + "print 'i) Total number of coils = %.0f'%(coils)\n", + "print 'ii) Turns per coils = %.0f'%(turns_per_coil)\n", + "print 'iii) Commutator pitch = %.0f'%((y_c[0]+y_c[1])/2)\n", + "print 'iv) Back pitch = %.0f front pitch = %.0f total pitch = %.0f'%(y_b,y_f,resultant_pitch)\n", + "print 'v) No of commutator segments = %.0f'%(segments)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Total number of coils = 62\n", + "ii) Turns per coils = 4\n", + "iii) Commutator pitch = 124\n", + "iv) Back pitch = 33 front pitch = 29 total pitch = 62\n", + "v) No of commutator segments = 61\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.23 page no : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "slots = 13.\n", + "Pole = 4.\n", + "conductors_per_slot = 2.\n", + "Z = conductors_per_slot*slots\n", + "Y_A = (Z+2)/Pole \t\t\t#For progressive type wave winding\n", + "\n", + "# Calculations\n", + "#Since Y_A = (y_b+y_f)/2, we let y_b = y_f\n", + "y_b = Y_A\n", + "y_f = y_b \t\t \t#because y_b = Y_A/2\n", + "\n", + "segments = 13. \t\t\t#commutator segments\n", + "\n", + "# Results\n", + "print 'WINDING TABLE: 1<- 8-> 15<- 22-> 3<- 10->17<- 24-> 5<- 12-> 19<- 26-> 7<- 14-> 21<- 2-> 9<- 16->23<- 4-> 11<- 18-> 25<- 6->13<- 20-> 1 '\n", + "print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)\n", + "\n", + "print 'Another form of winding table:'\n", + "\n", + "print ' BACK CONNECTIONS FRONT CONNECTIONS'\n", + "\n", + "print ' 1 to 1+7 = 8 -> 8 to 8+7 = 15'\n", + "print ' 15 to 15+7 = 22 -> 22 to 22+7 = 29 -26 = 3'\n", + "print ' 3 to 3+7 = 10 -> 10 to 10+7 = 17'\n", + "print ' 17 to 17+7 = 24 -> 24 to 24+7 = 31 -26 = 5'\n", + "print ' 5 to 5+7 = 14 -> 12 to 12+7 = 19'\n", + "print ' 19 to 19+7 = 26 -> 26 to 26+7 = 33 -26 = 7'\n", + "print ' 7 to 7+7 = 14 -> 14 to 14+7 = 21'\n", + "print ' 21 to 21+7 = 28 -26 = 2 -> 2 to 2+7 = 9'\n", + "print ' 9 to 9+7 = 16 -> 16 to 16+7 = 23 '\n", + "print ' 23 to 23+7 = 30 -26 = 4 -> 4 to 4+7 = 11'\n", + "print ' 11to 11+7 = 18 -> 18 to 18+7 = 25'\n", + "print ' 25 to 25+7 = 32 -26 = 6 -> 6 to 6+7 = 13'\n", + "print ' 13 to`13+7 = 20 -> 20 to 20+7 = 27 -26 = 1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "WINDING TABLE: 1<- 8-> 15<- 22-> 3<- 10->17<- 24-> 5<- 12-> 19<- 26-> 7<- 14-> 21<- 2-> 9<- 16->23<- 4-> 11<- 18-> 25<- 6->13<- 20-> 1 \n", + "Note that <- indicates back connection with y_back = 7 and -> indicates front connection with y_front = 7\n", + "Another form of winding table:\n", + " BACK CONNECTIONS FRONT CONNECTIONS\n", + " 1 to 1+7 = 8 -> 8 to 8+7 = 15\n", + " 15 to 15+7 = 22 -> 22 to 22+7 = 29 -26 = 3\n", + " 3 to 3+7 = 10 -> 10 to 10+7 = 17\n", + " 17 to 17+7 = 24 -> 24 to 24+7 = 31 -26 = 5\n", + " 5 to 5+7 = 14 -> 12 to 12+7 = 19\n", + " 19 to 19+7 = 26 -> 26 to 26+7 = 33 -26 = 7\n", + " 7 to 7+7 = 14 -> 14 to 14+7 = 21\n", + " 21 to 21+7 = 28 -26 = 2 -> 2 to 2+7 = 9\n", + " 9 to 9+7 = 16 -> 16 to 16+7 = 23 \n", + " 23 to 23+7 = 30 -26 = 4 -> 4 to 4+7 = 11\n", + " 11to 11+7 = 18 -> 18 to 18+7 = 25\n", + " 25 to 25+7 = 32 -26 = 6 -> 6 to 6+7 = 13\n", + " 13 to`13+7 = 20 -> 20 to 20+7 = 27 -26 = 1\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.24 page no : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 4.\n", + "I_L = 150.\n", + "N = 1500. \t\t\t#commutator speed in rpm\n", + "n_s = N/60. \t\t\t#commutator speed in r.p.s\n", + "W_b = 1.2 \t\t\t#Brush pitch\n", + "W_m = 0\t\t\t#Pitch of mica insulation\n", + "L = 0.05*10**-3 \t\t\t#inducmath.tance of armature coils in henry\n", + "A = P \t\t\t#A = P for lap wound\n", + "segments = 64.\n", + "\n", + "# Calculations\n", + "v = n_s*segments \t\t\t#peripheral speed in segments per second\n", + "T_c = (W_b-W_m)/v \t\t\t#Time of commutation\n", + "I = I_L/A \t\t\t#current through each conductor\n", + "E = L*2*I/T_c \t\t\t#Linear commutation\n", + "E2 = 1.11*L*2*I/T_c \t\t\t#Sinusoidal commutation\n", + "\n", + "# Results\n", + "print 'Reactive voltage linear commutation) is %.0f V'%(E)\n", + "print 'Reactive voltage math.sinusoidal commutation) is %.2f V'%(E2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reactive voltage linear commutation) is 5 V\n", + "Reactive voltage math.sinusoidal commutation) is 5.55 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.25 page no : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4. \t\t\t#Pole\n", + "Z = 386. \t\t\t#no of wave connected conductors\n", + "A = 2. \t\t\t#Wave winding\n", + "R_a = 1.\n", + "R_sh = 100.\n", + "R_L = 40 \t\t\t#Armature ,shunt field and load resistance\n", + "phi = 25.*10**-3 \t\t\t#flux per pole in weber\n", + "N = 1000. \t\t\t#speed in rpm\n", + "\n", + "\n", + "# Calculations\n", + "E_g = (phi*P*N*Z)/(60*A) \t\t\t#generated emf\n", + "\n", + "#Solving following equations for V_t\n", + "#E_g = V_t+I_a*R_a\n", + "#I_a = (I_L+I_sh) I_L = V_t/R_L I_sh = V_t/R_sj\n", + "#E_g = V_t(1 + (R_a/R_L) + (R_a/R_sh)\n", + "V_t = E_g/(1 + (R_a/R_L) + (R_a/R_sh))\n", + "\n", + "I_L = V_t/R_L \t\t\t# load current\n", + "I_sh = V_t/R_sh \t\t\t# current through shunt field resistance\n", + "\n", + "# Results\n", + "I_a = I_L+I_sh \t\t\t#armature current \n", + "print 'armature current is is %.4f A'%(I_a)\n", + "\n", + "output_power = V_t*I_L\n", + "print 'output power is %.3f W'%(output_power)\n", + "\n", + "# Note :answer obtained will not match with textbook answer because I_L = V_t/R_L = 310.79/40 = 7.77 \n", + "#Awhile its taken as 8.045 A in textbook'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "armature current is is 10.8776 A\n", + "output power is 2414.746 W\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.26 page no : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 40. \t\t \t#current PER conductor\n", + "W_b = 3.\n", + "W_m = 0.\t\t\t #brush width and width of mica insulation\n", + "N = 600. \t\t\t #commutator speed in rpm \n", + "n_s = N/60 \t\t\t #commutator speed in rps\n", + "L = 0.15*10**-3 \t\t\t#self inducmath.tance in Henry\n", + "segments = 50. \n", + "v = n_s*segments \t\t\t#peripheral speed in segments per second\n", + "T_c = (W_b-W_m)/v \t\t\t#time of commutation\n", + "\n", + "# Calculations\n", + "E = L*2*I/T_c \t\t\t#Linear commutation\n", + "E2 = 1.11*L*2*I/T_c \t\t\t#Sinusoidal commutation\n", + "\n", + "# Results\n", + "print 'Reactive voltage linear commutation) is %.0f volts'%(E)\n", + "print 'Reactive voltage math.sinusoidal commutation) is %.2f volts'%(E2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reactive voltage linear commutation) is 2 volts\n", + "Reactive voltage math.sinusoidal commutation) is 2.22 volts\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.27 page no : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 400.\n", + "P = 6. \t\t\t #Poles\n", + "A = P \t\t \t#For lap wound\n", + "output_power = 250.*10**3\n", + "R_sh = 200. \t\t\t#shunt field circuit resistance\n", + "Z = 720. \t\t\t#number of lap wound conductors\n", + "\n", + "theta_m = 2.5 \t\t\t#brush lead angle in degree mechanical\n", + "I_L = output_power/V\n", + "V_sh = V\n", + "\n", + "# Calculations\n", + "I_sh = V_sh/R_sh \t\t\t#Current through shunt field circuit resistance\n", + "I_a = I_L+I_sh \t\t\t#armature currrent\n", + "I = I_a/P\n", + "\n", + "#Part(i)\n", + "amp_turns_PP_d = Z*I*theta_m/360\t\t\t#demagnetising ampere turns per pole\n", + "#Part(ii)\n", + "amp_turns_PP_c = Z*I*(1/(2*P)-theta_m/360) \t\t\t#cross-magnetising ampere turns per pole\n", + "\n", + "# Results\n", + "print 'i) De-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_d)\n", + "print 'ii) Cross-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) De-magnetising ampere-turns per pole is 522.5\n", + "ii) Cross-magnetising ampere-turns per pole is 5747.5\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.28 page no : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I_L = 100.\n", + "P = 4. \t\t\t #Poles\n", + "A = P \t\t\t #for lap wound armature\n", + "W_b = 1.4\n", + "W_m = 0. \t\t\t#Brush width and width of mica insulation\n", + "N = 1400.\t\t\t#armature speed in r.p.m\n", + "segments = 64. \t\t\t#no of commutator segments\n", + "L = 0.05*10**-3 \t\t\t#inducmath.tance of armature coil in henry\n", + "\n", + "# Calculations\n", + "n_s = N/60 \t\t\t#speed in r.p.s\n", + "v = n_s*segments \t\t\t#Segments per second\n", + "T_c = (W_b-W_m)/v \t\t\t#time of commutation\n", + "I = I_L/A \t\t\t#Current through conductor\n", + "E = L*2*I/T_c \t\t\t#Linear commutation\n", + "\n", + "# Results\n", + "print 'Reactive voltage considering linear commutation is %.2f volts'%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reactive voltage considering linear commutation is 2.67 volts\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.29 page no : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 8. \t\t \t#Poles\n", + "A = 2. \t\t \t#Wave wound armature\n", + "Z = 480. \t\t\t#number of armature conductors\n", + "I_a = 200.\n", + "I = I_a/A\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "theta_m = 0. \t\t\t#Geometric nuetral axis\n", + "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#De-magnetising ampere-turns per pole\n", + "amp_turns_PP_c = Z*I*(1/(2*P)-theta_m/360) \t\t\t#Cross-magnetising ampere-turns per pole\n", + "print 'Parti)De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d)\n", + "print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c)\n", + "\n", + "#Part(ii)\n", + "theta_e2 = 6. \t\t\t#angle shift of brushes in degrees electrical\n", + "theta_m2 = theta_e2/(P/2) \t\t\t#angle shift of brushes in degrees mechanical\n", + "amp_turns_PP_d2 = Z*I*theta_m2/360 \t\t\t#De-magnetising ampere-turns per pole\n", + "amp_turns_PP_c2 = Z*I*(1/(2*P)-theta_m2/360) \t\t\t#Cross-magnetising ampere-turns per pole\n", + "print 'Partii)De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d2)\n", + "print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parti)De-magnetising ampere-turns per pole is 0\n", + "Cross-magnetising ampere-turns per pole is 3000\n", + "Partii)De-magnetising ampere-turns per pole is 200\n", + "Cross-magnetising ampere-turns per pole is 2800\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.30 page no : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P_input = 7.46*10**3\n", + "V = 230.\n", + "Pole = 8.\n", + "Z = 188. \t\t\t#number of armature consuctors\n", + "I_L = P_input/V\n", + "theta_m = 7.5 \t\t\t#brush lead angle in degree mechanical\n", + "\n", + "A = 2. \t\t\t# assumed wave wound because of low-current and high voltage\n", + "I = I_L/A\n", + "\n", + "#Part(i)\n", + "amp_turns_PP_d = Z*I*theta_m/360 \t\t\t#De-magnetising ampere-turns per pole\n", + "#Part(ii)\n", + "amp_turns_PP_c = Z*I*(1/(2*Pole)-theta_m/360) \t\t\t#Cross-magnetising ampere-turns per pole\n", + "\n", + "print 'De-magnetising ampere-turns per pole is %.2f'%(amp_turns_PP_d)\n", + "print 'Cross-magnetising ampere-turns per pole is %.2f'%(amp_turns_PP_c)\n", + "\n", + "# note : The difference in answer occured because I is approximated to 16 in last 2 steps in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "De-magnetising ampere-turns per pole is 63.52\n", + "Cross-magnetising ampere-turns per pole is 127.04\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.31 page no : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N_1 = 1200. \t\t\t#initial speed \n", + "I_L1 = 200. \t\t\t#initial load current\n", + "V_t1 = 125.\n", + "N_2 = 1000. \t\t\t#altered speed\n", + "R_a = 0.04 \t\t\t#armature resistance\n", + "V_brush = 2. \t\t\t#brush drop\n", + "\n", + "# Calculations\n", + "# Initial Load\n", + "I_a1 = I_L1\n", + "E_g1 = V_t1+I_a1*R_a+V_brush \t\t\t#induced emf\n", + "\n", + "E_g2 = E_g1*(N_2/N_1) \t\t\t#Because E_g proportional to N during constant flux\n", + "R_L = V_t1/I_L1 \t\t\t#Load resistance\n", + "\n", + "#Solving for I_L2 as follows\n", + "#V_t2 = R_L*I_L2 \t\t\t#I_a2 = I_L2\n", + "#V_t2 = E_g2-(I_L2*R_2 + V_brush)\n", + "I_L2 = (E_g2-V_brush)/(R_L+R_a) \t\t\t#new current\n", + "\n", + "# Results\n", + "print 'Load current at new speed is %.4f A'%(I_L2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load current at new speed is 166.1654 A\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch2_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch2_2.ipynb new file mode 100755 index 00000000..deb5684b --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch2_2.ipynb @@ -0,0 +1,1995 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f03a268884ccacb4d0b4a4e0ccceeba1a58caa51f0cbd85024ffaf9d558c0182" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : D.C. Motors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 page no : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V = 220.\n", + "I_a = 30. \t\t\t#armature currnet\n", + "R_a = 0.75 \t\t\t#Armature resistance\n", + "\n", + "# Calculations\n", + "E_b = V - I_a*R_a \t\t\t# Since V = E_b+ I_a*R_a\n", + "\n", + "\n", + "# Results\n", + "print 'Induced EMF or back EMF in the motor is %.1f V'%(E_b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced EMF or back EMF in the motor is 197.5 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 page no : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pole = 4.\n", + "A = Pole \t\t\t#for lap winding\n", + "V = 230.\n", + "Z = 250. \t\t\t#number of armature conductors\n", + "phi = 30.*10**-3 \t\t\t#flux per pole in weber\n", + "I_a = 40.\n", + "R_a = 0.6 \t\t\t#Armature resistance\n", + "\n", + "# Calculations \n", + "E_b = V - I_a*R_a \t\t\t# Since V = E_b+ I_a*R_a\n", + "N = E_b * 60*A/(phi*Pole*Z) \t\t\t#because E_b = phi*P*N*Z/(60*A)\n", + "\n", + "# Results\n", + "print 'Back emf is %.0f V and running speed is %.0f rpm'%(E_b,N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Back emf is 206 V and running speed is 1648 rpm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 page no : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pole = 4.\n", + "A = Pole \t\t\t#for lap winding\n", + "Z = 480.\t\t\t#number of armature conductors\n", + "phi = 20.*10**-3 \t\t\t#flux per pole in weber\n", + "I_a = 50. \t\t\t#Armature current\n", + "\n", + "# Calculations\n", + "T_a = 0.159*phi*I_a*Pole*Z/A \t\t\t#Gross torque developed by armature\n", + "\n", + "# Results\n", + "print 'Gross torque developed by armature is %.3f N-m'%(T_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gross torque developed by armature is 76.320 N-m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 page no : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 4.\n", + "A = Pole \t\t\t#for lap winding\n", + "V = 230.\n", + "R_a = 0.8 \t\t\t#Armature resistance\n", + "N_0 = 1000. \t\t\t#no load speed in rpm\n", + "Z = 540. \t\t\t#number of armature conductors\n", + "phi = 25.*10**-3 \t\t\t#flux per pole in weber\n", + "\n", + "# Calculations and Results\n", + "E_b0 = phi*Pole*N_0*Z/(60*A) \t\t\t#induced emf\n", + "\n", + "#part(i)\n", + "print 'i)Induced e.m.f = %.0f V'%(E_b0)\n", + "\n", + "#part(ii)\n", + "I_a0 = (V- E_b0)/R_a \t\t\t#because V = E_b0+ I_a0*R_a\n", + "print 'ii)Armature current = %.2f A'%(I_a0)\n", + "\n", + "#part(iii)\n", + "stray_losses = E_b0*I_a0 \t\t\t#on no load ,power developed is fully power required to overcome strya losses\n", + "print 'iii)Stray loss = %.2f W'%(stray_losses)\n", + "\n", + "#part(iv)\n", + "T_f = E_b0*I_a0/(2*math.pi*N_0/60) \t\t\t#lost torque\n", + "print 'iv)Lost torque = %.3f N-m'%(T_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Induced e.m.f = 225 V\n", + "ii)Armature current = 6.25 A\n", + "iii)Stray loss = 1406.25 W\n", + "iv)Lost torque = 13.429 N-m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 page no : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pole = 4.\n", + "Z = 200. \t\t\t #No of armature conductors\n", + "A = 2. \t\t\t #wave connected armature\n", + "V = 250.\n", + "phi = 25.*10**-3 \t\t\t#flux per pole in weber\n", + "I_a = 60.\n", + "I_L = I_a \t \t\t#armature current\n", + "R_a = 0.15\n", + "R_se = 0.2 \t\t\t#resistances of armature and series field winding\n", + "\n", + "# Calculations\n", + "E_b = V - I_a*(R_a+R_se) \t\t\t#induced emf\n", + "N = E_b * 60*A/(phi*Pole*Z) \t\t\t#because E_b = phi*P*N*Z/(60*A)\n", + "\n", + "# Results\n", + "print 'Required speed is %.0f r.p.m'%(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required speed is 1374 r.p.m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 page no : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 250.\n", + "I_L = 20. \t\t\t#load current\n", + "R_a = 0.3\n", + "R_sh = 200. \t\t\t#Armature and shunt field winding\n", + "\n", + "# Calculations\n", + "I_sh = V/R_sh \t\t\t#shunt current\n", + "I_a = I_L-I_sh \t\t\t#armature current\n", + "E_b = V - I_a*R_a \t\t\t#emf generated\n", + "\n", + "# Results\n", + "print 'Armature current is %.2f A'%(I_a)\n", + "print 'Back e.m.f is %.3f V'%(E_b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature current is 18.75 A\n", + "Back e.m.f is 244.375 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 page no : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 220.\n", + "R_a = 0.3\n", + "R_sh = 110. \t\t\t#resistance of armature and shunt field winding\n", + "\n", + "#no load\n", + "N_0 = 1000. \t\t\t#no load speed in r.p.m\n", + "I_L0 = 6. \t\t\t#line current on no load\n", + "I_sh = V/R_sh \t\t\t#no load shnt current\n", + "I_a0 = I_L0 - I_sh \t\t\t#no load armature current\n", + "E_b0 = V - I_a0*R_a \t\t\t#no load induced emf\n", + "\n", + "# Calculations\n", + "#full load\n", + "I_sh_FL = V/R_sh\n", + "I_L_FL = 50 \t\t\t#line current at full load\n", + "I_a_FL = I_L_FL - I_sh_FL\t\t\t#full load armature current\n", + "E_b_FL = V - I_a_FL * R_a \t\t\t#full load induced emf\n", + "\t\t\t#using speed equation as treating phi as constant\n", + "N_FL = N_0 * (E_b_FL/E_b0)\n", + "\n", + "# Results\n", + "print 'Speed on full load is %.2f r.p.m'%(N_FL)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed on full load is 939.67 r.p.m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 page no : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R_a = 0.2\n", + "R_se = 0.3 \t\t\t#resistance of armature and series field winding\n", + "#following variables correspond to load 1\n", + "V = 250.\n", + "N_1 = 800.\n", + "I_1 = 20.\n", + "I_a1 = I_1\n", + "I_se1 = I_a1\n", + "\n", + "# Calculations\n", + "E_b1 = V - I_a1*(R_a+R_se)\n", + "#following variables correspond to load 2\n", + "I_2 = 50.\n", + "I_a2 = I_2\n", + "E_b2 = V - I_a2*(R_a+R_se)\n", + "\n", + "#from speed equation it can be derived that\n", + "\n", + "N_2 = N_1 * (E_b2/E_b1) * (I_a1/I_a2)\n", + "\n", + "# Results\n", + "print 'Speed on motor on no load is %.0f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed on motor on no load is 300 r.p.m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 page no : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 250.\n", + "R_a = 0.3\n", + "R_sh = 200. \t\t\t#resistance of armature and shunt field winding\n", + "R_x = 150. \t\t\t#additional resistance added in series to field winding\n", + "I_L1 = 22.\n", + "I_sh1 = V/R_sh \t\t\t#initial shunt current before adding 150 ohms resistance\n", + "I_a1 = I_L1 - I_sh1 \t\t\t#initial armature current before adding 150 ohms resistance\n", + "N_1 = 1500. \t\t\t#initial speed before adding 150 ohms resistance\n", + "\n", + "# Calculations\n", + "#T (prop.) phi*I_a (prop.) I_sh*I_a and T_1 = T_2 and simplifying further \n", + "I_sh2 = V/(R_sh + R_x) \t\t\t#new shunt current\n", + "I_a2 = I_sh1*I_a1/I_sh2 \t\t\t#New armature current\n", + "\n", + "E_b1 = V - I_a1*R_a \t\t\t#induced emf before adding 150 ohms resistance\n", + "E_b2 = V - I_a2*R_a \t\t\t#new emf\n", + "\n", + "N_2 = N_1 * (E_b2/E_b1) * (I_sh1/I_sh2) \t\t\t#new speed\n", + "\n", + "# Results\n", + "print 'New armature current and speed are %.4f A and %.f r.p.m respectively'%(I_a2,N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New armature current and speed are 36.3125 A and 2575 r.p.m respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 page no : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 250.\n", + "R_a = 0.15\n", + "R_se = 0.1\n", + "R_x = 0.1 \t\t\t#Resimath.tance of armature , series field winding and extra resistance\n", + "N_1 = 800. \t\t\t#initial speed before load torque is increased\n", + "I_1 = 30.\n", + "I_a1 = I_1\n", + "I_se1 = I_1 \t\t\t#initial currents\n", + "\n", + "# Calculations\n", + "T_2_by_T_1 = 1 + (50./100) \t\t\t#50 percent increase as mentioned in question\n", + "I_se2_by_I_a2 = R_x/(R_x + R_se) \t\t\t#from the figure\n", + "\n", + "#T (prop.) phi*I_a (prop.) I_sh*I_a and T_1 = T_2 and simplifying ,solving further \n", + "I_a2 = math.sqrt(I_a1*I_se1*T_2_by_T_1/I_se2_by_I_a2) \t\t\t#new armature current\n", + "I_se2 = I_se2_by_I_a2 *I_a2 \t\t\t#new series field current\n", + "\n", + "E_b1 = V - I_a1*R_a - I_se1*R_se \t\t\t#indiced emf initially\n", + "E_b2 = V - I_a2*R_a - I_se2*R_se \t\t\t#new induced emf\n", + "N_2 = N_1 * (E_b2/E_b1) * (I_se1/I_se2) \t\t\t#required speed\n", + "\n", + "# Results\n", + "print 'The required running speed of motor is %.3f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required running speed of motor is 912.743 r.p.m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 page no : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 220.\n", + "I_1 = 50.\n", + "I_a1 = I_1 \t\t\t#Currents before adding extra resistance\n", + "T_2_by_T_1 = 0.5\n", + "R_t = 0.15 \t\t\t#R_e + R_se = 0.15\n", + "\n", + "# Calculations\n", + "I_a2 = I_a1 * math.sqrt(T_2_by_T_1) \t\t\t#Because T (prop.) I_a**2\n", + "E_b1 = V-I_a1*(R_t) \t\t\t#induced emf before adding extra resistance\n", + "N_1 = 500.\n", + "N_2 = 300. \t\t\t#speeds before and adding extra resistance\n", + "\n", + "#N (prop.) E_b/phi (prop.) E_b/I_a\n", + "E_b2 = E_b1 *(I_a2/I_a1)*(N_2/N_1) \t\t\t#induced emf after adding resistance\n", + "R_x = (V-E_b2)/I_a2 -R_t \t\t\t#because E_b2 = V - I_a2*(R_a + R_se + R_x)\n", + "\n", + "# Results\n", + "print 'Desired extrea resistance = %.4f ohms '%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Desired extrea resistance = 3.5225 ohms \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 page no : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R_a = 1.\n", + "I_a = 1.2 \n", + "V = 50.\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "E_b = V - I_a*R_a\n", + "rot_loss_NL = E_b*I_a \t\t\t#no load rotational loss \n", + "print 'i)No load rotational losses = %.2f W'%(rot_loss_NL)\n", + "\n", + "#part(ii)\n", + "omega_2000 = 2*math.pi*2000/60 \t\t\t#angular velocity when speed of motor = 2000 rpm\n", + "K_m = E_b/omega_2000 \t\t\t#to determine K_m\n", + "V = 48.\n", + "omega_1800 = 2*math.pi*1800/60 \t\t\t#angular velocity when speed of motor = 1800 rpm\n", + "E_b = K_m*omega_1800\n", + "I_a = (V-E_b)/R_a \t\t\t#armature current\n", + "P_dev = E_b*I_a\t\t\t#power developed\n", + "motor_output = P_dev - rot_loss_NL\n", + "print 'ii)Motor output = %.f W'%(motor_output)\n", + "\n", + "#part(iii)\n", + "E_b = 0. \t\t\t#when motor stalls\n", + "V_stall = 20. \t\t\t#voltage during stalling\n", + "I_a = V_stall/R_a \t\t\t#armature current during stalling\n", + "T_stall = K_m*I_a \t\t\t#stalling torque\n", + "print 'iii)Stalling torque = %.2f N-m'%(T_stall)\n", + "print 'partii answer is slightly different due to inaccurate calculation of Power developed'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)No load rotational losses = 58.56 W\n", + "ii)Motor output = 121 W\n", + "iii)Stalling torque = 4.66 N-m\n", + "partii answer is slightly different due to inaccurate calculation of Power developed\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 120.\n", + "R_a = 0.2 \n", + "R_sh = 60. \t\t\t#armature and field resistance\n", + "I_L1 = 40.\n", + "N_1 = 1800. \n", + "\n", + "# Calculations\n", + "I_sh = V/R_sh\n", + "\n", + "I_a1 = I_L1 - I_sh \n", + "E_b1 = V -I_a1*R_a \t\t\t#Induced emf at half load\n", + "T2_by_T1 = 1./2 \n", + "I_a2 = I_a1*(T2_by_T1) \t\t\t#T (prop.)I_a\n", + "E_b2 = V- I_a2*R_a\t\t\t#induced emf at half load\n", + "N_2 = N_1 *(E_b2/E_b1) \t\t\t#N (prop.) E_b as phi is constant\n", + "\n", + "# Results\n", + "print 'Speed on half load condition is %.2f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed on half load condition is 1860.85 r.p.m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R_a = 0.08\n", + "E_b1 = 242. \n", + "V = 250.\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "I_a1 = (V-E_b1)/R_a\n", + "print 'i)Armature current = %.0f A'%(I_a1)\n", + "\n", + "#part(ii)\n", + "N = 0.\n", + "E_b = 0. \t\t\t#because N = 0\n", + "I_a_start = V/R_a\n", + "print 'ii)Starting armature current = %.0f A'%(I_a_start)\n", + "\n", + "#part(iii)\n", + "I_a2 = 120.\n", + "E_b2 = V-I_a2*R_a\n", + "print 'iii)Back emf if armature current is changed to 120 A = %.1f V'%(E_b2)\n", + "\n", + "#part(iv)\n", + "I_a = 87.\n", + "N_m = 1500.\n", + "E_g = V + I_a*R_a \t\t\t#induced emf\n", + "N_g = N_m*(E_g/E_b1)\t\t\t#as E (prop.) N\n", + "print 'iv)Generator speed to deliver 87 A at 250 V = %.1f rpm'%(N_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Armature current = 100 A\n", + "ii)Starting armature current = 3125 A\n", + "iii)Back emf if armature current is changed to 120 A = 240.4 V\n", + "iv)Generator speed to deliver 87 A at 250 V = 1592.7 rpm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "shaft_output = 80.*746 \t\t\t#coverted to watts\n", + "eta = 80./100 \t\t\t#efficiency\n", + "V = 250.\n", + "N_1 = 1200.\n", + "R_a = 0.04\n", + "R_sh = 250. \t\t\t #armature and shunt field resistance\n", + "\n", + "# Calculations and Results\n", + "power_input = shaft_output/eta\n", + "I_L = power_input /V\n", + "I_sh = V / R_sh\n", + "I_a = I_L - I_sh\n", + "E_b1 = V - I_a*R_a\n", + "\n", + "gross_mechanical_power = E_b1*I_a \t\t\t#electrical equivalent of mechanical power developed\n", + "stray_losses = gross_mechanical_power - shaft_output\n", + "print 'Mechanical power developed on full load = %.3f kW'%(gross_mechanical_power/1000)\n", + "\n", + "#on no load shaft_output = 0 and entire gross power is used to overcome stray losses\n", + "Eb0_Ia0 = stray_losses\n", + "#E_b0 = V - I_a0*R_a ... solving for I_0\n", + "p = [R_a, -V, Eb0_Ia0]\n", + "ans = roots(p)\n", + "I_a0 = ans[1] \t\t\t#first root is ignored math.since its too large\n", + "I_L0 = I_sh+I_a0 \t\t\t#current drawn from supply\n", + "E_b0 = V - I_a0*R_a \n", + "\n", + "#From speed equation N (prop.) E_b\n", + "N_0 = N_1*(E_b0/E_b1)\n", + "print 'No load speed and current are %.4f rpm and %.2f A respectively'%(N_0,I_L0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mechanical power developed on full load = 70.812 kW\n", + "No load speed and current are 1250.9121 rpm and 45.85 A respectively\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 250.\n", + "P = 4. \n", + "R_a = 0.1 \n", + "R_sh = 124. \t\t\t#armature and shunt field resistance \n", + "I_L0 = 4.\n", + "N_0 = 1200.\n", + "I_L_1 = 61.\n", + "\n", + "# Calculations\n", + "I_sh = V/R_sh\n", + "I_a0 = I_L0-I_sh\n", + "V_brush = 2 \t\t\t#voltage loss due to brush\n", + "E_b0 = V - I_a0*R_a- V_brush\n", + "\n", + "I_a1 = I_L_1 - I_sh\n", + "E_b1 = V - I_a1*R_a -V_brush\n", + "\n", + "phi1_by_phi0 = 1-(5./100) \t\t\t#weakened by 5 %\n", + "N_1 = N_0 *(E_b1/E_b0) /phi1_by_phi0\n", + "\n", + "# Results\n", + "print 'Full load speed is %.3f r.p.m'%(N_1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load speed is 1234.102 r.p.m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 page no : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 250.\n", + "R_a = 0.15 \n", + "R_sh = 167.67 \t\t\t#armature and shunt field resistance\n", + "N_0 = 1280. \t\t\t#speed at no load\n", + "\n", + "#full load\n", + "I_L1 = 67. \t\t\t#current drawn on full load\n", + "I_sh = V / R_sh \t\t\t#as shunt motor\n", + "I_a1 = I_L1- I_sh\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "#on no load\n", + "I_L0 = 6.5\n", + "I_a0 = I_L0 - I_sh\n", + "E_b0 = V - I_a0*R_a\n", + "\n", + "# Calculations and Results\n", + "#part(i) USING SPEED EQUATION\n", + "#N (prop.) E_b/phi (prop.)E_b \t\t\t#as phi is constant\n", + "N_1 = N_0 * (E_b1 / E_b0)\n", + "print 'i)Full load speed = %.3f r.p.m'%(N_1)\n", + "\n", + "#part(ii)\n", + "speed_regulation = 100* ((N_0-N_1)/N_1)\n", + "#N_1 is full load speed and N_0 = No load speed \n", + "print 'ii)Speed regulation = %.2f percent '%(speed_regulation )\n", + "\n", + "#part(iii)\n", + "shaft_output_FL = E_b1*I_a1 - E_b0*I_a0 \t\t\t#full load power developed - stray losses\n", + "hp_rating = shaft_output_FL /746\n", + "print 'iii)HP rating of machine = %.2f h.p'%(hp_rating)\n", + "\n", + "#part(iv)\n", + "power_input = V*I_L1\n", + "eta = 100*(shaft_output_FL/power_input) \t\t\t#full load efficiency\n", + "print 'iv)Full load efficiency = %.2f percent'%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Full load speed = 1233.396 r.p.m\n", + "ii)Speed regulation = 3.78 percent \n", + "iii)HP rating of machine = 19.42 h.p\n", + "iv)Full load efficiency = 86.48 percent\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 page no : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 200.\n", + "R_a = 0.5\n", + "R_se = 0.2\n", + "R_x = 0.2 \t\t\t#armature and series field resistance; extra resistance\n", + "I_a1 = 20.\n", + "I_1 = I_a1 \n", + "I_se1 = I_a1\n", + "I_a2 = 20.\n", + "I_2 = I_a2\n", + "I_se2 = I_2 *(R_x/(R_se+R_x))\n", + "\n", + "# Calculations\n", + "E_b1 = V -I_a1*R_a - I_a1*R_se\n", + "E_b2 = V -I_a2*R_a - I_se2*R_se\n", + "\n", + "phi2_by_phi1 = 70./100\n", + "N_1 = 1000\n", + "N_2 = N_1*(E_b2/E_b1) /phi2_by_phi1 \t\t\t#N (prop.) E_b/phi\n", + "\n", + "# Results\n", + "print 'Required speed is %.2f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required speed is 1443.93 r.p.m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 page no : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 110.\n", + "P = 4.\n", + "R_a = 0.1\n", + "R = 0.01 \t\t\t#A resistance of 0.01 ohms\n", + "R_se = R+R\n", + "\n", + "# Calculations\n", + "#case(i)\n", + "I_1 = 50.\n", + "I_a1 = I_1\n", + "N_1 = 700.\n", + "E_b1 = V -I_a1*(R_a + R_se)\n", + "\n", + "#T (prop) phi*I_a from torque equation (1)\n", + "\n", + "#phi_1 (prop.) I_a1 (2)\n", + "#case(ii) when I_a2 gets divided to half\n", + "#phi_2 (prop.) I_a2/2 (3)\n", + "\n", + "#combining (1)(2)(3) and T1 = T2\n", + "I_a2 = math.sqrt(2*I_a1**2)\n", + "R_se_eqvt = (R*R)/(R+R) \t\t\t#Equavalent of parallel combination\n", + "E_b2 = V - I_a2*R_a - I_a2* R_se_eqvt\n", + "\n", + "#using speed equation N (prop.) E_b / phi and using (2) and (3)\n", + "N_2 = N_1 *( E_b2/E_b1) *(I_a1/(I_a2/2))\n", + "\n", + "# Results\n", + "print 'Speed after reconnection = %.3f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed after reconnection = 976.389 r.p.m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 page no : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 4.\n", + "I_a1 = 50.\n", + "N_1 = 2000.\n", + "V = 230.\n", + "\n", + "\n", + "# Calculations and Results\n", + "#phi_1 is proportioanl to total ampere-turns produced by field coils\n", + "#phi_1 (prop.) I_a1*P*n (prop.) 200*n (1)\n", + "\n", + "#After reconnection ,phi_2 proportional to ampere turns divided as follows\n", + "#phi_2 (prop.) [I_a2/2*2*n + I_a2/2*2*n] (prop.) 2*n*I_a2 (2)\n", + "\n", + "# Dividing (1) and (2) ,(phi_1/phi_2) = 100 / I_a2 (3)\n", + "\n", + "#T (prop.) phi*I_a AND T (prop.) N**2 (4)(5)\n", + "#therefore N**2 (prop.) phi*I_a (6)\n", + "\n", + "#N (prop.) E_b/phi (prop.) 1/phi ..\n", + "#Because drops across windings can be neglected , E_b1 = E_b2\n", + "#therefore N (prop.) 1/phi (7)\n", + "\n", + "#using (7) and (6) phi**3 (prop.) 1/I_a (8)\n", + "\n", + "#combining (3) and (8)\n", + "I_a2 = (50.*100**3)**(1./4) \t\t\t#new armature current\n", + "print 'New armature current = %.3f A'%(I_a2)\n", + "#combining (6) and (7) N**3 (prop.) I_a1\n", + "N_2 = N_1 *(I_a2/I_a1)**(1./3)\n", + "print 'New motor speed = %.3f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New armature current = 84.090 A\n", + "New motor speed = 2378.414 r.p.m\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 2.22 page no : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 200.\n", + "I_a1 = 30.\n", + "R_t = 1.5 \t\t\t#R_a + R_se\n", + "E_b1 = V - I_a1*R_t\n", + "N2_by_N1 = (60./100)\n", + "\n", + "# Calculations\n", + "#T (prop.) I_a**2 and T (prop.) N_3....therefore I_a**2 (prop.) N**3\n", + "I_a2 = I_a1*math.sqrt(N2_by_N1**3)\n", + "\n", + "#N (prop.) E_b/I_a\n", + "N2_by_N1\n", + "E_b2 = E_b1 *(I_a2/I_a1)*N2_by_N1\n", + "R_x = (V- E_b2)/I_a2 - R_t \t\t\t#because E_b2 = V - I_a2*(R_x+R_t)\n", + "\n", + "# Results\n", + "print 'Additional resistance to be added in series with motor circuit = %.3f ohms'%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Additional resistance to be added in series with motor circuit = 9.744 ohms\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,roots\n", + "\n", + "# Variables\n", + "V = 250.\n", + "R_a = 0.4 \n", + "R_sh = 100. \t\t\t#armature and shunt field resistance\n", + "I_sh1 = V / R_sh\n", + "P_out_FL = 10 * 735.5\n", + "eta = 85./100 \t\t\t#efficiency\n", + "P_in = P_out_FL/eta\n", + "I_L1 = P_in /V\n", + "I_a1 = I_L1 - I_sh1\n", + "\n", + "# T (prop.) phi*I_a (prop.) I_sh*I_a because phi (prop.) I_sh\n", + "#Bu torque is constant.. \n", + "Ia2_Ish2 = I_a1*I_sh1\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "#N (prop.) E_b/I_sh\n", + "#put E_b2 = V - I_a2*R_a and solving further for I_sh2 we get ,I_sh2**2 - 1.8824 I_sh2 +0.2417 = 0\n", + "p = array([1, -1.8824, 0.2417])\n", + "ans = roots(p) \n", + "I_sh2 = ans[0]\n", + "#root 1 was considered because its always easier to attain root(1) because less resistacne is needeed\n", + "#R_x in series with field\n", + "R_x = (V/I_sh2) -R_sh \t\t\t#because I_sh2 = V/(R_sh + R_x)\n", + "print 'Extra resistance to be added = %.2f ohms'%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Extra resistance to be added = 43.37 ohms\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 page no : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R_t = 1. \t\t\t#R_t = R_se + R_a\n", + "V_1 = 230.\n", + "N_1 = 300.\n", + "N_2 = 375.\n", + "I_1 = 15.\n", + "I_a1 = I_1\n", + "\n", + "# Calculations\n", + "#T (prop.) I_a**2 and T (prop.) N_2....therefore I_a**2 (prop.) N**2\n", + "I_a2 = I_a1 *(N_2/N_1)\n", + "E_b1 = V_1 - I_a1*(R_t)\n", + "\n", + "#N (prop.) E_b/I_a\n", + "E_b2 = E_b1*(I_a2/I_a1)*(N_2/N_1)\n", + "V_2 = E_b2 + I_a2* (R_t) \t\t\t#because E_b2 = V_2 - I_a2*(R_a+R_se)\n", + "\n", + "# Results\n", + "print 'Voltage supply needed = %.4f V'%(V_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage supply needed = 354.6875 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 page no : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I_L1 = 30.\n", + "V = 230.\n", + "R_sh = 230.\n", + "R_a = 1.\n", + "I_sh = V / R_sh\n", + "I_a1 = I_L1 - I_sh\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "# Calculations\n", + "#T (prop.) phi*I_a (prop.) I_a as phi is constant\n", + "#and torque is constant\n", + "I_a2 = I_a1\n", + "N2_by_N1 = 1./2\n", + "#N (prop.) E_b/phi (prop.) E_b\n", + "E_b2 = E_b1 *(N2_by_N1)\n", + "R_x = (V- E_b2)/I_a2 - R_a \t\t\t#Because E_b2 = V - I_a2*(R_a + R_x)\n", + "\n", + "# Results\n", + "print 'resistance to be inserted in series = %.4f ohms '%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance to be inserted in series = 3.4655 ohms \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 page no : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T_1 = 40. \t\t\t#initial torque\n", + "#phi_1 is initial flux\n", + "#phi_2 is new flux\n", + "#T_2 is new torque\n", + "#I_a1 is initial current\n", + "#I_a2 is new current\n", + "phi2_by_phi1 = 1- (30./100) \t\t\t#decrease by 30 percent\n", + "Ia2_by_Ia1 = 1+(15./100) \t\t\t#increase by 15 percent\n", + "\n", + "# Calculations\n", + "#T (prop.)phi*I_a\n", + "T_2 = T_1*(phi2_by_phi1)*(Ia2_by_Ia1)\n", + "\n", + "# Results\n", + "print 'New torque is %.1f N-m'%(T_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New torque is 32.2 N-m\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 page no : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V = 230.\n", + "N_1 = 1000.\n", + "N_2 = 950.\n", + "R_a = 0.5\n", + "R_sh = 230. \t\t\t#armature and shunt field resistance\n", + "I_L1 = 10.\n", + "\n", + "# Calculations\n", + "I_sh = V/R_sh\n", + "I_a1 = I_L1 - I_sh\n", + "\n", + "#T (prop.) phi*I_a (prop.) I_a with phi constant and T is constant due to full-load\n", + "I_a2 = I_a1\n", + "\n", + "E_b1 = V - I_a1*R_a\n", + "E_b2 = E_b1*(N_2/N_1) \t\t\t#N (prop.) E_b /phi (prop.) E_b as phi is constant\n", + "\n", + "R_x = (V-E_b2)/I_a2 -R_a \n", + "\n", + "# Results\n", + "print 'resistance to be inserted in series with armature = %.4f ohms'%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance to be inserted in series with armature = 1.2528 ohms\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28 page no : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 250.\n", + "N_0 = 1000.\n", + "I_0 = 5.\n", + "R_a = 0.2\n", + "R_sh = 250. \t\t\t#armature and shunt field resistance\n", + "I_L = 50. \t\t\t#on no load\n", + "I_sh = V / R_sh\n", + "I_a0 = I_0 - I_sh\n", + "I_a = I_L - I_sh\n", + "E_b0 = V- I_a0*R_a\n", + "E_b1 = V- I_a *R_a\n", + "\n", + "# Calculations\n", + "phi1_by_phi0 = 1-(3./100) \t\t\t#weakens by 3 percent\n", + "#N (prop.) E_b/phi\n", + "N_1 = N_0 *(E_b1/E_b0) /phi1_by_phi0\n", + "\n", + "# Results\n", + "print 'Speed when loaded and drawing 50A current is %.3f r.p.m'%(N_1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed when loaded and drawing 50A current is 993.695 r.p.m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 page no : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 230.\n", + "I_a0 = 3.3\n", + "R_a = 0.3\n", + "R_sh = 160. \t\t\t#armature and shunt field resistance \n", + "I_L1 = 40.\n", + "N_0 = 1000.\n", + "E_b0 = V - I_a0*R_a\n", + "I_sh = V/ R_sh\n", + "I_a1 = I_L1 - I_sh\n", + "E_b1 = V - I_a1*R_a\n", + "phi1_by_phi0 = 1- (4./100) \t\t\t#weakening by 4 percent \n", + "\n", + "# Calculations and Results\n", + "N_1 = N_0 *(E_b1/E_b0)/(phi1_by_phi0) \t\t\t#because N (prop.) E_b/phi\n", + "print 'Full load speed is %.4f rpm'%(N_1)\n", + "T_0 = E_b0*I_a0/(2*math.pi*N_0/60)\n", + "T_1 = T_0*(I_a1/I_a0)*phi1_by_phi0 \t\t\t# because T (prop.) phi*I_a\n", + "print 'Full load developed torque is %.4f N-m'%(T_1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load speed is 993.5485 rpm\n", + "Full load developed torque is 80.9585 N-m\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 page no : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 220.\n", + "I_L = 52.\n", + "N_1 = 750.\n", + "N_2 = 600.\n", + "R_a = 0.2\n", + "R_sh = 110. \t\t\t#armature and shunt field resistance\n", + "\n", + "# Calculations and Results\n", + "I_sh = V/ R_sh\n", + "I_a1 = I_L - I_sh\n", + "I_a2 = I_a1\t\t\t#T (prop.) I_a and T is constant\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "#N (prop.) E_b/phi (prop.) E_b\n", + "E_b2 = E_b1*(N_2/N_1)\n", + "R_x = (V- E_b2)/I_a2 -R_a \t\t\t#Because E_b2 = V - I_a2*(R_a+R_x)\n", + "print 'resistance to be connected in series = %.2f ohms'%(R_x)\n", + "\n", + "#After R_x gets connected in series with armature and 110 ohms in series with field winding\n", + "N_1 = 600.\n", + "I_sh2 = V /(R_sh+110)\n", + "I_a1 = 50.\n", + "I_sh1 = 2.\n", + "I_sh2 = 1.\n", + "#T (prop.) I_a*I_sh and T doesn't vary\n", + "I_a2 = I_a1*(I_sh1/I_sh2)\n", + "E_b1 = V - I_a1*(R_a+R_x)\n", + "E_b2 = V - I_a2*(R_a+R_x)\n", + "N_2 = N_1*(E_b2/E_b1)*(I_sh1/I_sh2) \t\t\t#Because N (prop.) E_b/I_sh\n", + "print 'New speed = %.3f rpm'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance to be connected in series = 0.84 ohms\n", + "New speed = 828.571 rpm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.31 page no : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 230.\n", + "R_a = 0.15\n", + "R_sh = 250. \t\t\t#armature and shunt field resistance\n", + "I_a1 = 50.\n", + "I_a2 = 80.\n", + "N_1 = 800.\n", + "N_2 = 1000.\n", + "I_sh1 = V / R_sh\n", + "\n", + "# Calculations\n", + "E_b1 = V - I_a1*R_a\n", + "E_b2 = V - I_a2*R_a\n", + "\n", + "I_sh2 = I_sh1*(E_b2/E_b1)*(N_1/N_2) \t\t\t#Because N (prop.) E_b/ I_sh\n", + "R_x = (V/I_sh2 ) - R_sh \t\t\t#because I_sh2 = V /(R_x+ R_sh)\n", + "\n", + "# Results\n", + "print 'resistance to be added is R_x = %.0f ohms'%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance to be added is R_x = 69 ohms\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.32 page no : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 230.\n", + "R_a = 0.5\n", + "N_1 = 800.\n", + "N_2 = 600.\n", + "I_a2 = 20. \n", + "I_a1 = I_a2\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "# Calculations\n", + "#N (prop.) E_b/phi (prop.) E_b as phi is constant\n", + "E_b2 = E_b1 *(N_2/N_1)\n", + "#additional resistance required\n", + "R_x = (V -E_b2)/I_a2 - R_a \t\t\t#because E_b2 = V - I_a2*(R_a+R_x)\n", + "\n", + "# Results\n", + "print 'Additional resistance required = %.2f ohms '%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Additional resistance required = 2.75 ohms \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.33 page no : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 220.\n", + "R_a = 0.5\n", + "R_x = 5. \t\t\t#armature resistacne and extra resistance\n", + "I_1 = 15.\n", + "I_se1 = I_1\n", + "I_se2 = I_se1 \n", + "I_2 = I_se2\n", + "N_1 = 800.\n", + "\n", + "# Calculations\n", + "E_b1 = V - I_1*R_a\n", + "E_b2 = V - I_2*(R_a+R_x)\n", + "\n", + "N_2 = N_1*(E_b2/E_b1)*(I_se1/I_se2) \t\t\t#because N (prop.) E_b/I_se\n", + "\n", + "# Results\n", + "print 'New speed of rotor = %.3f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New speed of rotor = 517.647 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.34 page no : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 250.\n", + "I_a1 = 20.\n", + "R_a = 0.5\n", + "N_1 = 1000.\n", + "N_2 = 500.\n", + "\n", + "# Calculations and Results\n", + "#T (prop.) I_a and T_1 = T_2\n", + "I_a2 = I_a1\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "#N (prop.) E_b\n", + "E_b2 = E_b1 *(N_2/N_1)\n", + "R_x = (V-E_b2)/I_a2 - R_a \t\t\t#because E_b2 = V - I_a2*(R_a+R_x)\n", + "print 'Additional resistance = %.0f ohms'%(R_x)\n", + "T3_by_T2 = 0.5 \t\t\t#torque is halved\n", + "I_a3 = I_a2 *(T3_by_T2) \t\t\t#new armature current\n", + "E_b3 = V - I_a3*(R_x + R_a)\n", + "N_3 = E_b3*N_2 / E_b2 \t\t\t#N (prop.) E_b\n", + "print 'New speed = %.3f rpm'%(N_3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Additional resistance = 6 ohms\n", + "New speed = 770.833 rpm\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.35 page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P_out = 100*735.5\n", + "V = 500.\n", + "P = 4.\n", + "A = 2.\t\t\t# due to wave winding\n", + "Z = 492. \t\t\t#no of conductors\n", + "phi = 50.*10**-3 \t\t\t#flux per pole\n", + "eta = 92./100 \t\t\t#efficiency\n", + "P_in = P_out/eta\n", + "R_a = 0.1 \n", + "R_sh = 250. \t\t\t#amature and shunt field resistance\n", + "\n", + "# Calculations\n", + "I_L = P_in/V\n", + "I_sh = V/ R_sh\n", + "I_a = I_L - I_sh\n", + "E_b = V - I_a*R_a\n", + "N = E_b*60*A/(phi*P*Z) \t\t\t#because E_b = phi*P*N*Z/(60*A)\n", + "\n", + "T_sh = P_out/(2*math.pi*N/60) \t\t\t#Useful torque\n", + "\n", + "# Results\n", + "print 'i)Speed at full load = %.4f rpm'%(N)\n", + "print 'ii)Useful torque = %.2f N-m'%(T_sh)\n", + "print 'Answer mismatches due to improper approximation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Speed at full load = 590.5011 rpm\n", + "ii)Useful torque = 1189.41 N-m\n", + "Answer mismatches due to improper approximation\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.36 page no : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import roots\n", + "import math \n", + "\n", + "# Variables\n", + "N_1 = 1000.\n", + "I_1 = 50.\n", + "I_a1 = I_1\n", + "V = 250.\n", + "R_x = 4.4\n", + "R_t = 0.6 \t\t\t#R_t = R_a+R_se\n", + "E_b1 = V - I_a1*(R_t)\n", + "\n", + "# Calculations\n", + "#T (prop.)I_a**2 T (prop.) N**2 .... hence N (prop.) I_a\n", + "#N (prop.) E_b /I_a \n", + "#combining both E_b (prop.) I_a**2\n", + "#using E_b2 = V - I_a2*(R_a + R_se + R_x) and solving for I_a2 we get 0.088 I_a2**2 +5 I_a2 -250 = 0\n", + "p = [0.088 ,5, -250] \n", + "ans = roots(p)\n", + "I_a2 = ans[1] \t\t\t#root(1) is ignored as it is -ve\n", + "E_b2 = V - I_a2*(R_t + R_x) \n", + "N_2 = N_1*(E_b2/E_b1)*(I_a1/I_a2)\n", + "\n", + "# Results\n", + "print 'Motor speed = %.2f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Motor speed = 639.79 r.p.m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.37 page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import roots\n", + "import math \n", + "\n", + "# Variables\n", + "V = 250.\n", + "I_a1 = 20.\n", + "R_sh = 250.\n", + "R_a = 0.5 \t\t\t#shunt field and armature resistance\n", + "I_sh1 = V / R_sh\n", + "E_b1 = V - I_a1*R_a\n", + "\n", + "#T (prop.) phi*I_a (prop.) I_sh*I_a\n", + "#math.since T_1 = T_2\n", + "I_sh2_I_a2 = I_sh1*I_a1 \n", + "I_sh2_I_a2 = I_sh1*I_a1 \t\t\t# = 20\n", + "\n", + "# Calculations\n", + "#N (prop.) E_b/I_sh\n", + "#E_b1 = V - I_a1*R_a\n", + "#Solving further for I_a2 we get I_a2**2 -500 I_a2 + 12800\n", + "p = [1, -500, 12800]\n", + "ans = roots(p)\n", + "I_a2 = ans[1] \t\t\t#higher root is neglected\n", + "I_sh2 = I_sh2_I_a2 / I_a2\n", + "R_x = (V / I_sh2) - R_sh \t\t\t#resistance to be inserted in shunt field\n", + "\n", + "# Results\n", + "print 'resistance to be inserted = %.4f ohms '%(R_x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance to be inserted = 88.3129 ohms \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.38 page no : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables\n", + "V = 250.\n", + "N_1 = 1000.\n", + "I_L1 = 25.\n", + "R_a = 0.2\n", + "R_sh = 250. \t\t\t#armature and shunt field resistance\n", + "V_brush = 1. \t\t\t#voltage drop due to brushes\n", + "\n", + "# Calculations and Results\n", + "I_sh1 = V/R_sh\n", + "I_a1 = I_L1 - I_sh1\n", + "E_b1 = V- I_a1*R_a - 2 *V_brush\n", + "\n", + "#when loaded\n", + "I_L2 = 50.\n", + "I_sh2 = I_sh1 \t\t\t#as flux weakensby armature reaction shunt field current remains same \n", + "I_a2 = I_L2 - I_sh2\n", + "E_b2 = V- I_a2*R_a - 2 *V_brush\n", + "\n", + "phi2_by_phi1 = 1- (3./100) \t\t\t#weakens by 3 percent\n", + "N_2 = N_1*(E_b2/E_b1)/ phi2_by_phi1 \t\t\t#N (prop.) E_b/phi\n", + "print 'New speed = %.3f rpm'%(N_2)\n", + "T_1 = E_b1*I_a1/(2*math.pi*N_1/60)\n", + "T_2 = E_b2*I_a2/(2*math.pi*N_2/60)\n", + "print 'Torque before field weakening = %.4f N-m'%(T_1)\n", + "print 'Torque after field weakening = %.4f N-m'%(T_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New speed = 1009.733 rpm\n", + "Torque before field weakening = 55.7373 N-m\n", + "Torque after field weakening = 110.3831 N-m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.39 page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables\n", + "V = 220.\n", + "R_a = 0.5\n", + "R_x = 1. \t\t\t#armature resistance and extra resistance\n", + "N_FL = 500. \t\t\t#full load speed in r.p.m\n", + "I_a_FL = 30.\n", + "\n", + "# Calculations and Results\n", + "#part(i) Full load \n", + "E_b_FL = V- I_a_FL * R_a\n", + "#T (prop.) I_a... T is constant\n", + "I_a_dash_FL = I_a_FL \n", + "E_b_dash_FL = V- I_a_dash_FL * (R_a+R_x)\n", + "#N (prop.) E_b/phi (prop.) E_b\n", + "N_dash_FL = N_FL*(E_b_dash_FL/E_b_FL)\n", + "print 'i)Speed at full load torque = %.4f r.p.m'%(N_dash_FL)\n", + "\n", + "#part(ii)\n", + "T2_by_T1 = 2\n", + "I_a_dash_FL = I_a_FL *(T2_by_T1)\n", + "E_b_dash_FL = V- I_a_dash_FL * (R_a+R_x)\n", + "N_dash_FL = N_FL*(E_b_dash_FL/E_b_FL)\n", + "print 'ii)Speed at double full load torque = %.3f r.p.m'%(N_dash_FL)\n", + "\n", + "#part(iii) ...stalling\n", + "E_b = 0 \t\t\t#as speed is zero in case of stalling torque\n", + "I_a_stall = (V-E_b)/(R_a+R_x)\n", + "T_FL = E_b_FL * I_a_FL/(2*math.pi*N_FL/60)\n", + "T_stall = T_FL *(I_a_stall/ I_a_FL)\n", + "print 'iii)Stalling torque = %.3f Nm'%(T_stall)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Speed at full load torque = 426.8293 r.p.m\n", + "ii)Speed at double full load torque = 317.073 r.p.m\n", + "iii)Stalling torque = 574.231 Nm\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.40 page no : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 230.\n", + "I_a1 = 30.\n", + "R_a = 0.4\n", + "R_x = 1.1\t\t\t#armature resistance and extra resistance\n", + "N_1 = 500.\n", + "\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "E_b1 = V - I_a1*R_a\n", + "I_a2 = I_a1 \t\t\t#I_a is constant as T , phi are constant\n", + "E_b2 = V - I_a2*(R_a+R_x)\n", + "N_2 = N_1 *(E_b2/E_b1) \t\t\t#Because N (prop.) E_b/phi (prop.) E_b\n", + "print 'i)Speed at full load torque = %.3f r.p.m'%(N_2)\n", + "\n", + "#part(ii)\n", + "T2_by_T1 = 1.5\n", + "I_a2 = I_a1 * T2_by_T1\n", + "E_b2 = V - I_a2*(R_a+R_x)\n", + "N_2 = N_1 *(E_b2/E_b1) \t\t\t#Because N (prop.) E_b/phi (prop.) E_b\n", + "print 'ii)Speed at 1.5 times full load torque = %.3f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Speed at full load torque = 424.312 r.p.m\n", + "ii)Speed at 1.5 times full load torque = 372.706 r.p.m\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch3_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch3_2.ipynb new file mode 100755 index 00000000..70deb8f3 --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch3_2.ipynb @@ -0,0 +1,1904 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:19909d6eede67a544640ad0d428f3fdc9bcbea2eb33090ca90ae171a5a4991eb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Testing of D C Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 page no : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 6.\n", + "V = 500.\n", + "A = 2. \t\t\t#because of wave wound armature\n", + "Z = 1200. \t\t\t#number of armature conductors\n", + "phi = 20.*10**-3 \t\t\t#useful flux per pole\n", + "Ra = 0.5 \n", + "Rsh = 250. \t\t\t#armature and field resistance\n", + "Il = 20. \t\t\t#current drawn from supply\n", + "mechanical_losses = 900.\n", + "Ish = V/Rsh\n", + "Ia = Il-Ish\n", + "Eb = V-Ia*Ra \t\t\t#because V = Eb+Ia*Ra\n", + "N = Eb*60*A/(phi*Pole*Z) \t\t\t#Eb = phi*Pole*N*Z/(60*A)\n", + "\n", + "# Calculations\n", + "P_m = Eb*Ia \t\t\t#Electrical equivalent of mechanical power\n", + "omega = 2*math.pi*N/60\n", + "Tg = P_m/omega\n", + "\n", + "P_out = P_m-mechanical_losses\n", + "T_sh = P_out/omega \t\t\t#Useful torque\n", + "P_in = V*Il\n", + "percentage_efficiency = 100*P_out/P_in\n", + "\n", + "# Results\n", + "print 'Speed developed is %.3f r.p.m \\\n", + "\\nTorque developed is %.2f N-m \\\n", + "\\nUseful torque is %.2f N-m \\\n", + "\\nEfficiency is %.2f percent'%(N,Tg,T_sh,percentage_efficiency)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed developed is 409.167 r.p.m \n", + "Torque developed is 206.26 N-m \n", + "Useful torque is 185.26 N-m \n", + "Efficiency is 79.38 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 page no : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#no load\n", + "I_noload = 2.5 \t\t\t#No load current\n", + "V = 440.\n", + "R_a = 1.2\n", + "R_sh = 550.\t\t\t#resistance of armature and shunt field windings\n", + "no_load_input = V*I_noload\n", + "\n", + "# Calculations\n", + "I_sh = V/R_sh\n", + "I_a_noload = I_noload-I_sh\n", + "no_load_armature_copper = (I_a_noload**2)*R_a\n", + "constant_losses = no_load_input-no_load_armature_copper\n", + "\n", + "#full load\n", + "I_fullload = 32\n", + "I_a_fullload = I_fullload-I_sh\n", + "full_load_armature_coppe = (I_a_fullload**2)*R_a\n", + "total_losses = full_load_armature_coppe+constant_losses\n", + "full_load_motor_input = V*I_fullload\n", + "full_load_motor_output = full_load_motor_input-total_losses\n", + "efficiency_at_full_load = full_load_motor_output*100/full_load_motor_input\n", + "\n", + "# Results\n", + "print 'Full load motor output is %.2f W \\\n", + "\\nEfficiency of motor at full-load is %.2f percent'%(full_load_motor_output,efficiency_at_full_load)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load motor output is 11815.34 W \n", + "Efficiency of motor at full-load is 83.92 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 page no : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "#no load\n", + "I = 14. \t\t\t#input current\n", + "V = 230.\n", + "power_output_FL = 45.*10**3\n", + "power_input = V*I\n", + "I_sh = 2.55 \t\t\t#field current\n", + "R_a = 0.032 \t\t\t#armature resistance\n", + "I_a = I-I_sh\n", + "cu_loss_NL = I_a**2*R_a \t\t\t#no load copper loss\n", + "brush_loss = 2*I_a\n", + "constant_loss = power_input - cu_loss_NL - brush_loss\n", + "\n", + "# Calculations and Results\n", + "#full load\n", + "#I = I_a+ 2.55\n", + "#Motor input = Motor output + constant loss + brush loss + cu loss\n", + "# solving for I_a I_a**2 - 7125 I_a + 1487700.3 = 0\n", + "p = [1, -7125, 1487700.3]\n", + "ans = roots(p)\n", + "I_a = ans[1] \t\t\t#ignoring second root as its too large\n", + "I = I_a+I_sh\n", + "print 'Full load current is %.2f A'%(I)\n", + "power_input = V*I\n", + "eta = 100*(power_output_FL/power_input)\n", + "print 'Efficiency at full load is %.2f percent'%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load current is 217.86 A\n", + "Efficiency at full load is 89.81 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 page no : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables\n", + "W1 = 9.1 \t\t\t#Tension on tight side\n", + "W2 = 0.8 \t\t\t#Tension on slack side\n", + "I = 10. \t\t\t#Total_current\n", + "V = 110. \t\t\t#Supply voltage\n", + "R = 7.5/100 \t\t\t#Radius of p-ulley in metres\n", + "N = 1320. \t\t\t#speed in r.p.m\n", + "\n", + "# Calculations\n", + "T_sh = (W1-W2)*9.81*R \t\t\t#9.81 is the accelration due to gravity\n", + "omega = (2*math.pi*N/60)\n", + "P_out = T_sh*omega\n", + "P_in = V*I\n", + "\n", + "efficiency = 100*P_out/P_in\n", + "\n", + "# Results\n", + "print 'Full load Efficiency is %.2f percent'%(efficiency)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load Efficiency is 76.74 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 page no : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 250.\n", + "I_av = 10.\n", + "V_av = (240.+220)/2 \t\t\t#average voltage across load\n", + "W_dash = V_av*I_av \t\t\t#Power absorbed\n", + "t1 = 25.\n", + "t2 = 6.\n", + "R_sh = 200.\n", + "R_a = 0.3\t\t\t#resistance of field winding and armature \n", + "\n", + "# Calculations\n", + "W = W_dash*t2/(t1-t2) \t\t\t#Stray Losses\n", + "I_l = 25 \t\t\t#Input current\n", + "I_sh = V/R_sh \t\t\t#current through field winding\n", + "\n", + "I_a = I_l-I_sh \t\t\t#Armature current\n", + "arm_cu_loss = R_a*I_a**2 \t\t\t#Armature copper losses\n", + "sh_cu_loss = R_sh*I_sh**2 \t\t\t# Shunt copper loss\n", + "\n", + "Total_losses = arm_cu_loss + sh_cu_loss + W\n", + "Motor_input = V*I_l\n", + "Output = Motor_input- Total_losses\n", + "efficiency = Output*100/Motor_input\n", + "\n", + "# Results\n", + "print 'Efficiency as motor at 25 A and 250 V is %.2f percent'%(efficiency)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency as motor at 25 A and 250 V is 80.67 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 page no : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "I_a = 37.\n", + "I_sh = 0.85\t\t\t#armature and field current for motor\n", + "V = 230.\n", + "R_a = 0.33 \t\t\t#armature resistance\n", + "\n", + "I_a_g = 30.\n", + "I_sh_g = 0.8\t\t\t#armature and field current for generator\n", + "\n", + "\n", + "# Calculations and Results\n", + "#for motor\n", + "arm_cu_loss = I_a**2* R_a \t\t\t#armature copper losses\n", + "field_cu_loss = V*I_sh \t\t\t#field copper loss\n", + "total_cu_loss = field_cu_loss + arm_cu_loss \t\t\t#total copper loss \n", + "\n", + "#for generator\n", + "arm_cu_loss_g = I_a_g**2* R_a \t\t\t#armature copper losses\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss\n", + "total_cu_loss_g = field_cu_loss_g + arm_cu_loss_g \t\t\t#total copper loss\n", + "\n", + "#for motor-generator set\n", + "total_cu_loss_set = total_cu_loss_g + total_cu_loss\n", + "P_supply = V*(I_a - I_a_g + I_sh+ I_sh_g ) \t\t\t#power taken from supply\n", + "stray_loss = P_supply - (total_cu_loss_g + total_cu_loss) \n", + "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", + "\n", + "#efficiency of motor\n", + "motor_input = V*(I_a+I_sh)\n", + "motor_output = motor_input - (stray_loss_each + total_cu_loss)\n", + "eta_m = 100* motor_output/motor_input \t\t\t#efficiency of motor\n", + "print 'Efficiency of motor is %.2f percent '%(eta_m)\n", + "#efficiency of generator\n", + "generator_input = motor_output \t\t\t#output of motor is input of generator\n", + "generator_output = generator_input - (stray_loss_each + total_cu_loss_g)\n", + "eta_g = 100* generator_output/generator_input \t\t\t#efficiency of generator\n", + "print 'Efficiency of generator is %.2f percent '%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 87.62 percent \n", + "Efficiency of generator is 88.05 percent \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 page no : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_1 = 400. \t\t\t#motor input current\n", + "V = 200. \t\t\t#voltage across armature\n", + "I_2 = 32. \t\t\t#load current\n", + "V_2 = 160. \t\t\t#voltage across generator\n", + "V_f = 15. \t\t\t#voltage drop across field windings\n", + "total_input = (V+V_f)*I_1 \n", + "Output = V_2*I_2\n", + "total_losses = total_input-Output \t\t\t#total losses in 2 machines\n", + "\n", + "# Calculations and Results\n", + "R_se = V_f/I_1 \t\t\t#series field resistance\n", + "R_a = 0.4 \t\t\t# armature field resistance\n", + "\n", + "total_cu_loss = (R_a + 2*R_se) * I_1**2 + I_2**2*R_a \t\t\t#total copper loss\n", + "stray_losses = total_losses - total_cu_loss\n", + "stray_losses_each = stray_losses /2 \t\t\t#stray losses for each machine\n", + "\n", + "#for motor\n", + "motor_input = V*I_1\n", + "arm_cu_loss = (R_a + R_se)*I_1*I_1 \t\t\t#armature copper loss\n", + "total_losses_motor = arm_cu_loss + stray_losses_each \n", + "motor_output = motor_input- total_losses_motor\n", + "eta_m = 100*motor_output/motor_input \t\t\t#efficiency of motor\n", + "print 'Efficiency of motor is %.2f percent '%(eta_m)\n", + "#for generator\n", + "arm_cu_loss_gen = R_a*I_2**2 \t\t\t#armature copper loss\n", + "series_field_cu_loss = V_f*I_1 \t\t\t#series field copper loss\n", + "total_losses_gen = arm_cu_loss_gen + series_field_cu_loss + stray_losses_each \n", + "generator_input = total_losses_gen+ Output\n", + "eta_gen = 100*Output/generator_input \t\t\t#efficiency of generator\n", + "print 'Efficiency of generator is %.2f percent'%(eta_gen)\n", + "\n", + "\n", + "#Note : 'Answer dont match because Output-of-generator is taken as 5220 for calculation while its should have been 5120'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 9.71 percent \n", + "Efficiency of generator is 37.20 percent\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 500.\n", + "Io = 5. \t\t\t#no load current\n", + "R_a = 0.5\n", + "R_sh = 250.\t\t\t#resistance of armature and field circuits\n", + "I = 100. \t\t\t#current at unknown efficiency\n", + "\n", + "# Calculations\n", + "P_in_NL = V*Io \t\t\t#no load input\n", + "I_sh = V/R_sh\n", + "\n", + "Iao = Io-I_sh\n", + "arm_cu_loss_no_load = R_a*Iao**2 \t\t\t#No load armature copper loss\n", + "constant_losses = P_in_NL- arm_cu_loss_no_load\n", + "\n", + "I_a = I-I_sh\n", + "arm_cu_loss = R_a*I_a**2 \t\t\t#New armature copper loss\n", + "\n", + "Total_loss = arm_cu_loss + constant_losses\n", + "P_in = V*I\n", + "efficiency = (P_in-Total_loss)*100/P_in \t\t\t#required efficiency\n", + "\n", + "\n", + "# Results\n", + "print 'Efficiency is %.3f percent when motor takes %.0f A current'%(efficiency,I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency is 85.405 percent when motor takes 100 A current\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 page no : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 500. \n", + "I_NL = 5. \t\t\t#no load current \n", + "P_in_NL = V* I_NL \t\t\t#no load input\n", + "R_a = 0.22\n", + "R_sh = 250. \t\t\t#resistance of armature and shunt field winding\n", + "I_sh = V/R_sh\n", + "I_a_NL = I_NL-I_sh \t\t\t#armature current no load\n", + "arm_cu_loss_NL = R_a*I_a_NL**2 \t\t\t#No-load armature copper loss\n", + "constant_loss = P_in_NL - arm_cu_loss_NL\n", + "\n", + "# Calculations and Results\n", + "#at 100 A current\n", + "I = 100.\n", + "I_a = I - I_sh\n", + "arm_cu_loss = R_a*I_a**2 \t\t\t#armature copper loss\n", + "total_loss = arm_cu_loss + constant_loss \n", + "motor_input = V*I\n", + "motor_output = motor_input- total_loss\n", + "eta_m = 100*motor_output/motor_input \t\t\t#motor efficiency\n", + "print 'Parta)Efficiency of motor when it takes 100 A current and loaded is %.2f percent'%(eta_m)\n", + "\n", + "#part(b)\n", + "E_b_NL = V - I_a_NL*R_a \t\t\t#back emf at no load\n", + "\n", + "E_b = V- I_a*R_a \t\t\t#back EMF at 100 A current\n", + "#Since E_b is proportional to N and using componendo dividendo\n", + "delta_speed = 100*((E_b_NL-E_b)/E_b)\n", + "print 'Partb)Percentage speed in speed is %.3f percent'%(delta_speed)\n", + "\n", + "print 'Note that the following were assumptions made'\n", + "print 'i) Due to heating %( resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected'\n", + "print 'ii) Though the motor speed is changing from no load to given load , the mechanical losses are assumed to be cosnstant'\n", + "print 'iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parta)Efficiency of motor when it takes 100 A current and loaded is 90.78 percent\n", + "Partb)Percentage speed in speed is 4.368 percent\n", + "Note that the following were assumptions made\n", + "i) Due to heating %( resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected\n", + "ii) Though the motor speed is changing from no load to given load , the mechanical losses are assumed to be cosnstant\n", + "iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page no : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "motor_output_FL = 15000. \t\t\t#full load motor output\n", + "V = 250.\n", + "R_sh = 100.\n", + "\n", + "# Calculations\n", + "#at 80 % of full load\n", + "motor_output_FL_dash = (80./100)*motor_output_FL \t\t\t#80 percent of full load output\n", + "eta = 90./100 \t\t\t#efficiency\n", + "motor_input = motor_output_FL_dash/eta\n", + "total_losses = motor_input - motor_output_FL_dash \t\t\t#at 80 % of full load\n", + "#at maximum efficiency variable losses = constant losses\n", + "constant_losses = total_losses/2\n", + "variable_losses = constant_losses\n", + "I = motor_input/V \t\t\t#line current at 80% load\n", + "I_sh = V/ R_sh\n", + "I_a = I- I_sh\n", + "#math.since armature copper loss = R_a*I_a**2 \n", + "R_a = variable_losses/I_a**2\n", + "E_b1 = V-I_a*R_a \t\t\t#motor back EMF at 80% of full load\n", + "N_1 = 750. \t\t\t# corresponding speed is given as 750 rpm\n", + "\n", + "#When motor current is 80 A\n", + "I = 80.\n", + "I_a = I-I_sh\n", + "arm_cu_losses = R_a*I_a**2 \t\t\t#armature copper loss\n", + "total_losses = arm_cu_losses + constant_losses\n", + "motor_input = V*I\n", + "motor_output = motor_input- total_losses\n", + "eta = 100*motor_output/motor_input \t\t\t#efficiency of motor\n", + "E_b2 = V-I_a*R_a \t\t\t#motor back EMF at 80% of full load\n", + "N_2 = N_1*(E_b2/E_b1) \t\t\t#because E_b is proportional to N\n", + "\n", + "# Results\n", + "print 'Efficiency of motor is %.2f percent when motor draws 80A current'%(eta)\n", + "print 'and Speed is %.2f r.p.m'%(N_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 88.92 percent when motor draws 80A current\n", + "and Speed is 728.22 r.p.m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page no : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 250.\n", + "R_sh = 166.67\n", + "R_a = 0.15 \t \t\t#resistance of shunt field winding and armature\n", + "N_0 = 1280. \t\t\t#in rpm\n", + "I_L1 = 67. \t\t\t#current drawn on full load\n", + "I_sh = V/ R_sh\n", + "I_a1 = I_L1 - I_sh\n", + "E_b1 = V-I_a1*R_a\n", + "\n", + "#on no load\n", + "I_L0 = 6.5\n", + "I_a0 = I_L0 - I_sh\n", + "E_b0 = V-I_a0*R_a\n", + "\n", + "# Calculations and Results\n", + "#part (i)\n", + "#using speed equation N is proportional to E_b\n", + "N_1 = N_0*(E_b1/E_b0)\n", + "print 'i)Full load speed is %.3f r.p.m'%(N_1)\n", + "\n", + "#part (ii)\n", + "speed_regulation = 100*((N_0-N_1)/N_1)\n", + "print 'ii)Speed regulation is %.2f percent '%(speed_regulation)\n", + "\n", + "#part (iii)\n", + "stray_losses = E_b0*I_a0 \t\t\t#mechanical power developed on no load\n", + "power_developed_FL = E_b1*I_a1 \n", + "shaft_output_FL = power_developed_FL - stray_losses \n", + "hp_rating = shaft_output_FL/746 \t\t\t#in horse power\n", + "print 'iii)H.P rating of the machine Is %.2f H.P'%(hp_rating)\n", + "\n", + "#part (iv)\n", + "power_input = V*I_L1\n", + "eta = 100*(shaft_output_FL/power_input) \t\t\t#efficiency at full load\n", + "print 'iv)Efficiency at full load is %.2f percent'%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Full load speed is 1233.396 r.p.m\n", + "ii)Speed regulation is 3.78 percent \n", + "iii)H.P rating of the machine Is 19.42 H.P\n", + "iv)Efficiency at full load is 86.48 percent\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page no : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 200.\n", + "R_sh = 240.\n", + "R_a = 0.1 \t\t\t#resistance of shunt field winding and armature\n", + "rotational_loss = 236.\n", + "I_L_FL = 9.8 \t\t\t#full load line current\n", + "N = 1450.\n", + "I_sh = V/R_sh\n", + "I_a_FL = I_L_FL - I_sh\n", + "E_b = V- I_a_FL * R_a\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "gross_mech_P_dev = E_b*I_a_FL \t\t\t#gross mechanical power developed\n", + "mech_P_dev = gross_mech_P_dev - rotational_loss \t\t\t#mechanical power developed\n", + "print 'i)Gross mechanical power developed is %.2f W'%(gross_mech_P_dev )\n", + "print ' Mechanical power developed is %.2f W'%(mech_P_dev )\n", + "\n", + "#part(ii)\n", + "P_out = mech_P_dev \n", + "print 'ii)The power output is %.2f W'%(P_out)\n", + "\n", + "#part(iii)\n", + "T_sh = P_out*60/(2*math.pi*N)\n", + "T_L = T_sh\n", + "print 'iii)Load torque is %.2f N-m'%(T_L)\n", + "\n", + "#part(iv)\n", + "P_in = V*I_L_FL\n", + "eta = 100*P_out/P_in\n", + "print 'iv)Efficiency at full load is %.2f percent'%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Gross mechanical power developed is 1785.29 W\n", + " Mechanical power developed is 1549.29 W\n", + "ii)The power output is 1549.29 W\n", + "iii)Load torque is 10.20 N-m\n", + "iv)Efficiency at full load is 79.05 percent\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 page no : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 240.\n", + "P_out = 25*735.5 \t\t\t#output power in watts\n", + "R_a = 0.14\n", + "R_sh = 80. \t \t\t#resistance of armature and shunt field winding\n", + "brush_drop = 1. \t\t\t#voltage drop across brush\n", + "I_L_FL = 95. \t\t \t#input current at full load \n", + "I_sh = V/R_sh\n", + "I_a_FL = I_L_FL - I_sh \t\t\t#armature current at full load\n", + "\n", + "# Calculations and Results\n", + "arm_cu_loss_FL = R_a*I_a_FL**2 \t\t\t#full load armature copper loss\n", + "field_cu_loss = R_sh*I_sh**2 \t\t\t#field copper loss\n", + "print 'i)Armature and field copper losses are %.2f W and %.0f W respectively'%(arm_cu_loss_FL,field_cu_loss)\n", + "brush_cu_loss = 2*brush_drop*I_a_FL \t\t\t#brush contact copper loss\n", + "print 'ii)Brush contact copper loss is %.0f W'%(brush_cu_loss)\n", + "E_b = V-I_a_FL*R_a - 2*brush_drop \t\t\t#back emf\n", + "gross_mech_P_dev = E_b*I_a_FL \t\t\t#gross mechanical power developed\n", + "IFW_losses = gross_mech_P_dev - P_out \t\t\t#iron friction and windage losses\n", + "print 'iii)Core plus mechanical losses = %.1f W'%(IFW_losses+field_cu_loss+arm_cu_loss_FL)\n", + "eta = 100*(P_out/(P_out + IFW_losses+ brush_cu_loss+field_cu_loss+arm_cu_loss_FL ))\n", + "print 'iv)Efficiency is %.2f percent'%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Armature and field copper losses are 1184.96 W and 720 W respectively\n", + "ii)Brush contact copper loss is 184 W\n", + "iii)Core plus mechanical losses = 4228.5 W\n", + "iv)Efficiency is 80.65 percent\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 page no : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I = 5. \t\t\t#no load current\n", + "V = 500.\n", + "R_sh = 250.\n", + "R_a = 0.5 \t\t\t#resistance of shunt field winding and armature\n", + "motor_input_NL = V*I\n", + "I_sh = V/R_sh\n", + "I_a = I-I_sh\n", + "arm_cu_loss_NL = R_a*I_a**2 \t\t\t#no load armature copper loss\n", + "constant_loss = motor_input_NL - arm_cu_loss_NL\n", + "I_FL = 50.\n", + "I_a_FL = I_FL - I_sh \t\t\t#currents at full load\n", + "arm_cu_loss_FL = R_a*I_a_FL**2 \t\t\t#full load armature copper loss\n", + "\n", + "# Calculations and Results\n", + "total_loss = constant_loss + arm_cu_loss_FL \n", + "motor_input = V*I_FL\n", + "motor_output_FL = motor_input - total_loss\n", + "print 'Required output power is %.3f kW'%(motor_output_FL/1000)\n", + "eta = 100*(motor_output_FL/motor_input) \t\t\t#full load efficiency\n", + "print 'Full load efficiency of motor with 50A current is %.2f percent '%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required output power is 21.352 kW\n", + "Full load efficiency of motor with 50A current is 85.41 percent \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 page no : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 250.\n", + "R_sh = 275.\n", + "R_a = 0.8 \t\t\t#resistance of shunt field and amature\n", + "I_L0 = 3.91 \t\t\t#load current\n", + "I_sh = V/R_sh\n", + "I_a0 = I_L0 - I_sh\n", + "constant_losses = V*I_L0 -R_a*(I_a0)**2\n", + "\n", + "# Calculations and Results\n", + "#as a generator\n", + "P_out = 10*10**3\n", + "I_L = P_out/V\n", + "I_a = I_L + I_sh \n", + "field_cu_loss = R_sh*(I_sh)**2 \t\t\t#field copper loss\n", + "arm_cu_loss = R_a*(I_a)**2 \t\t\t#armature copper loss \n", + "eta_gen = 100 *(P_out/(P_out+constant_losses + field_cu_loss+ arm_cu_loss)) \t\t\t#efficiency as generator\n", + "print 'Efficiency as a generator = %.2f percent'%(eta_gen)\n", + "\n", + "#as a motor\n", + "P_in = 10*10**3 \t\t\t#at V = 250 \n", + "I_L = P_in/V\n", + "I_a = I_L - I_sh\n", + "field_cu_loss = R_sh*(I_sh)**2 \t\t\t#field copper loss\n", + "arm_cu_loss = R_a*(I_a)**2 \t\t\t#armature copper loss \n", + "eta_m = 100 *((P_in-(constant_losses + field_cu_loss+ arm_cu_loss))/(P_in)) \t\t\t#efficiency as motor\n", + "print 'Efficiency as a motor = %.2f percent'%(eta_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency as a generator = 79.77 percent\n", + "Efficiency as a motor = 75.80 percent\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 page no : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I = 4. \t\t\t#no load current in amperes\n", + "V = 500.\n", + "motor_input_no_load = I*V \t\t\t#no load motor input\n", + "R_a = 0.5\n", + "R_sh = 250.\t\t\t#resistance of armature and shunt field resistnace\n", + "I_sh = V/R_sh\n", + "\n", + "I_a = I-I_sh\n", + "arm_cu_loss_noload = R_a*I_a**2 \t\t\t#No-load armature copper losses\n", + "constant_loss = motor_input_no_load - arm_cu_loss_noload\n", + "I_FL = 40.\n", + "I_aFL = I_FL- I_a \t\t\t#full load currents\n", + "arm_cu_loss_fulload = R_a*I_aFL**2 \t\t\t#Full-load armature copper losses\n", + "Total_loss = arm_cu_loss_fulload + constant_loss\n", + "\n", + "# Calculations and Results\n", + "motor_input = V*I_FL\n", + "motor_output_fullload = motor_input - Total_loss\n", + "print 'Output power at full-load is %.0f W'%(motor_output_fullload) \n", + "efficiency = motor_output_fullload*100/motor_input \t\t\t#motor efficiency\n", + "print 'Efficiency at full-load is %.1f percent'%(efficiency)\n", + "\n", + "E_bNL = V-I_a*R_a\n", + "E_bFL = V-I_FL*R_a\n", + "\n", + "#E_b = N*phi\n", + "#E_bNL/E_bFL = N_NL/N_FL\n", + "#applying rules of componendo and dividendo\n", + "#change_in _speed = (N_NL - N_FL)/N_FL = (E_bNL - E_bFL)/E_bFl\n", + "\n", + "change_in_speed = 100*(E_bNL - E_bFL)/E_bFL\n", + "print 'percentage change in speed from no load to full load is %.3f percent'%(change_in_speed)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power at full-load is 17280 W\n", + "Efficiency at full-load is 86.4 percent\n", + "percentage change in speed from no load to full load is 3.958 percent\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 page no : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 500.\n", + "R_a = 0.22\n", + "R_sh = 250.\t\t\t#armature resistance and shunt field resistance\n", + "I = 5. \t\t\t#no load current\n", + "motor_input_NL = V*I \t\t\t#no load motor input\n", + "I_sh = V/R_sh\n", + "I_a_NL = I- I_sh \t\t\t#no load armature current\n", + "arm_cu_loss_NL = R_a*I_a_NL**2 \t\t\t#no load armature copper loss\n", + "constant_loss = motor_input_NL - arm_cu_loss_NL \n", + "\n", + "# Calculations and Results\n", + "#When motor draws 100 A current \n", + "I = 100\n", + "I_a = I - I_sh\n", + "arm_cu_loss = R_a* I_a**2 \t\t\t#armature copper loss\n", + "total_losses = arm_cu_loss + constant_loss\n", + "motor_input = V*I\n", + "motor_output = motor_input -total_losses \n", + "eta_m = 100*(motor_output/motor_input) \t\t\t#motor efficiency\n", + "print 'i)Efficiency of motor at 100 A current is %.2f percent '%(eta_m)\n", + "\n", + "#part(b)\n", + "E_b_NL = V- I_a_NL*R_a \t\t\t#back emf at no load\n", + "E_b = V- I_a*R_a \t\t\t#back emf at 100 A \n", + "#E_b is proportional to N.. and using componendo dividendo\n", + "speed_change = 100*((E_b_NL - E_b)/E_b)\n", + "print 'ii)Percentage change in speed = %.3f percent'%(speed_change)\n", + "\n", + "\n", + "print 'Note that the following were assumptions made'\n", + "print 'i) Due to heating resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected'\n", + "print 'ii) Though the motor speed is changing from no load to given load %( the mechanical losses are assumed to be cosnstant'\n", + "print 'iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Efficiency of motor at 100 A current is 90.78 percent \n", + "ii)Percentage change in speed = 4.368 percent\n", + "Note that the following were assumptions made\n", + "i) Due to heating resistance of shunt field winding will be increased which will reduce the shunt field current.This will decrease the flux which is neglected\n", + "ii) Though the motor speed is changing from no load to given load %( the mechanical losses are assumed to be cosnstant\n", + "iiiThe effect of armature reaction aon main pole flux and its effect on iron loss is neglected\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 page no : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 200.\n", + "I_L = 40.\n", + "\n", + "R_sh = 200.\n", + "R_a = 0.2 \t\t\t#shunt field winding and armature resistance\n", + "\n", + "# Calculations and Results\n", + "#case(a) : As a generator\n", + "P_out_g = V*I_L \t\t\t#output poewr as generator\n", + "I_sh = V/R_sh\n", + "I_a = I_L + I_sh\n", + "E = V + I_a*R_a\n", + "P_a_g = E*I_a \t\t\t#power developed in armature\n", + "P_cu_g = R_a*I_a**2 + R_sh*I_sh**2 \t\t\t#copper loss as genrator\n", + "print 'i)Output as generator is %.f kW'%(P_out_g/1000)\n", + "\n", + "#case(b) : As a motor\n", + "P_in_m = V*I_L \t\t\t#input power as motor\n", + "I_sh = V/R_sh\n", + "I_a = I_L - I_sh\n", + "E_b = V - I_a*R_a\n", + "P_a_m = E_b*I_a \t\t\t#power developed in armature\n", + "P_cu_m = R_a*I_a**2 + R_sh*I_sh**2\t\t\t#copper loss as motor\n", + "print 'ii)Input as motor is %.0f kW'%( P_in_m/1000)\n", + "print 'iii)Power developed in Armature:%.4f kW for generator%.4f kW for motor'%(P_a_g/1000,P_a_m/1000)\n", + "print 'iv)Copper losses:%.1f W for generator%.1f W for motor'%(P_cu_g,P_cu_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Output as generator is 8 kW\n", + "ii)Input as motor is 8 kW\n", + "iii)Power developed in Armature:8.5362 kW for generator7.4958 kW for motor\n", + "iv)Copper losses:536.2 W for generator504.2 W for motor\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 page no : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 219.\n", + "I = 10.\n", + "dN = 1030. - 970 \t\t\t#given\n", + "t_1 = 36. \t\t\t#time with no excitation\n", + "t_2 = 9.\t\t\t# time with full excitation and armature supporting an extra load of 10 A at 219 V\n", + "t_3 = 15. \t\t\t#time with full exciation\n", + "W_dash = V*I \t\t\t#additioanl loss when armature is suddenly connected to loads\n", + "W_s = W_dash *(t_2/(t_3-t_2)) \t\t\t#total stray losses\n", + "N = 1000. \t\t\t#speed in rpm\n", + "\n", + "# Calculations\n", + "#using W_s = (2*pi/60)**2 * I *N *dN / t_3 where W_s is stray losses\n", + "I = W_s*(t_3/dN)*(30/math.pi)**2/N \t\t\t#moment of inertia\n", + "W_m = W_s*(t_3/t_1) \t\t\t#mechanical losses\n", + "iron_losses = W_s - W_m\n", + "\n", + "# Results\n", + "print 'i)The moment of inertia of armature is %.2f kg-m**2'%(I)\n", + "print 'ii)Iron loss = %.2f W'%(iron_losses)\n", + "print 'iii)Mechanical losses at 1000 rpm mean speed is %.2f W'%(W_m)\n", + "\n", + "print 'Noteworthy points:1)When armature is slowing down and there is no excitation,then kinetic energy is used to overcome mechanical losses only.Iron losses are absent as excitation is absent2)When excitation is given%( kinetic energy is used to overcome both mechanical as well as iron losses.Total called stray losses.3)If moment of inertia is in kg-m**2,then loss of energy is in watts'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)The moment of inertia of armature is 74.89 kg-m**2\n", + "ii)Iron loss = 1916.25 W\n", + "iii)Mechanical losses at 1000 rpm mean speed is 1368.75 W\n", + "Noteworthy points:1)When armature is slowing down and there is no excitation,then kinetic energy is used to overcome mechanical losses only.Iron losses are absent as excitation is absent2)When excitation is given%( kinetic energy is used to overcome both mechanical as well as iron losses.Total called stray losses.3)If moment of inertia is in kg-m**2,then loss of energy is in watts\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 page no : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 225.\n", + "I = 10.\n", + "dN = 1030. - 970 \t\t\t#given\n", + "t_1 = 40. \t\t\t#time with no excitation\n", + "t_2 = 9.\t\t\t# time with full excitation and armature supporting an extra load of 10 A at 219 V\n", + "t_3 = 20. \t\t\t#time with full exciation\n", + "\n", + "# Calculations\n", + "W_dash = V*I \t\t\t#additional loss\n", + "W_s = W_dash *(t_2/(t_3-t_2)) \t\t\t#total stray losses\n", + "N = 1000\t\t\t#Speed in rpm\n", + "\t\t\t#using W_s = (2*pi/60)**2 * I *N *dN / t_3 where W_s is stray losses\n", + "I = W_s*(t_3/dN)*(30/math.pi)**2/N \t\t\t#moment of inertia\n", + "W_m = W_s*(t_3/t_1) \t\t\t#mechanical losses\n", + "iron_losses = W_s - W_m\n", + "\n", + "# Results\n", + "print 'i)The moment of inertia of armature is %.2f kg-m**2'%(I)\n", + "print 'ii)Iron loss = %.2f W'%(iron_losses)\n", + "print 'iii)Mechanical losses at 1000 rpm mean speed is %.2f W'%(W_m)\n", + "\n", + "print 'Noteworthy points:1)When there is no excitation and armature is slowed down , its K.E. is used to overcome mechanical mechanical losses only math.since there will be no iron loss as there is no flux.2)When there is excitation provided then K.E. is used to supply mechanical as well as iron losses together called stray losses '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)The moment of inertia of armature is 55.96 kg-m**2\n", + "ii)Iron loss = 920.45 W\n", + "iii)Mechanical losses at 1000 rpm mean speed is 920.45 W\n", + "Noteworthy points:1)When there is no excitation and armature is slowed down , its K.E. is used to overcome mechanical mechanical losses only math.since there will be no iron loss as there is no flux.2)When there is excitation provided then K.E. is used to supply mechanical as well as iron losses together called stray losses \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 page no : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_avg = (220.+190)/2 \t\t\t#average voltage across load\n", + "I_avg = 12.\n", + "R_a = 0.5\n", + "R_sh = 250.\n", + "W_dash = V_avg*I_avg \t\t\t#power absorbed \n", + "t_1 = 30.\n", + "t_2 = 5.\n", + "W = W_dash*(t_2/(t_1-t_2))\n", + "V = 250.\n", + "I = 22. \t\t\t#input current\n", + "\n", + "# Calculations\n", + "I_sh = V/R_sh\n", + "I_a = I - I_sh\n", + "arm_cu_loss = R_a*I_a**2 \t\t\t#armature copper loss\n", + "shunt_field_cu_loss = V*I_sh \t\t\t#shunt field copper loss\n", + "total_losses = shunt_field_cu_loss + arm_cu_loss + W\n", + "\n", + "machine_input = V*I\n", + "machine_output = machine_input - total_losses \n", + "eta_m = 100*(machine_output /machine_input ) \t\t\t#efficiency when running as motor\n", + "\n", + "# Results\n", + "print 'Efficiency of machine when opeating as motor taking current of 22A on 250V supply is %.1f percent'%(eta_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of machine when opeating as motor taking current of 22A on 250V supply is 82.5 percent\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 page no : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_avg = 10.\n", + "V_avg = (220.+190)/2 \t\t\t#average voltage across load\n", + "W_dash = V_avg*I_avg \t\t\t#power absorbed\n", + "t_1 = 30.\n", + "t_2 = 20.\n", + "\n", + "# Calculations\n", + "W = W_dash * (t_2/(t_1-t_2)) \t\t\t#stray losses\n", + "\n", + "# Results\n", + "print 'Stray losses of motor is %.1f kW'%(W/1000)\n", + "print 'Answers mismatch because V_average is 205 volts but it is taken as 220 volts in Power absorbed calculation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stray losses of motor is 4.1 kW\n", + "Answers mismatch because V_average is 205 volts but it is taken as 220 volts in Power absorbed calculation\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_a_g = 330.\n", + "I_a_m = 380.\n", + "R_a = 0.02 \t\t\t#armature resistance\n", + "V = 250.\n", + "I = 50.\n", + "\n", + "\n", + "arm_cu_loss_g = R_a*I_a_g**2\t\t\t#armature copper loss for generator\n", + "arm_cu_loss_m = R_a*I_a_m**2\t\t\t#armature copper loss for motor\n", + "power_drawn = V*I\n", + "stray_losses = power_drawn - (arm_cu_loss_m + arm_cu_loss_g)\n", + "stray_losses_each = stray_losses/2 \t\t\t#stray losses for each machine\n", + "\n", + "\n", + "# Calculations and Results\n", + "#for motor\n", + "I_sh_m = 4.2 \t\t\t#Shunt current in case of motor\n", + "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss in case of motor\n", + "total_loss = field_cu_loss_m + stray_losses_each + arm_cu_loss_m\n", + "motor_input = V*(I_a_m+I_sh_m) \n", + "motor_output = motor_input - total_loss\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", + "\n", + "#for generator\n", + "I_sh_g = 5 \t\t\t#Shunt current in case of generator\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss in case of generator\n", + "total_loss = field_cu_loss_g + stray_losses_each + arm_cu_loss_g\n", + "generator_output = V*I_a_g\n", + "generator_input = generator_output + total_loss\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 92.0302 percent\n", + "Efficiency of generator is 92.0297 percent\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R_a = 0.02 \t\t\t#armature resistance\n", + "V = 250. \t\t\t#line voltage\n", + "I = 50. \t\t\t#current taken from supply \n", + "\n", + "# Calculations and Results\n", + "#for generator\n", + "I_a_g = 330.\n", + "I_sh_g = 5. \t\t\t#armature current and current through shunt field \n", + "arm_cu_loss_g = R_a*I_a_g**2\t\t\t#armature copper loss for generator\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", + "\n", + "#for motor\n", + "I_a_m = 380\n", + "I_sh_m = 4.2 \t\t\t#armature current and current through shunt field\n", + "arm_cu_loss_m = R_a*I_a_m**2\t\t\t#armature copper loss for motor\n", + "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", + "power_drawn = V*I\n", + "IFW_losses = power_drawn - (arm_cu_loss_g + arm_cu_loss_m) \t\t\t#Iron friction and windage losses\n", + "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", + "\n", + "#for generator\n", + "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each\n", + "generator_output = V*I_a_g\n", + "generator_input = generator_output + total_loss_g \n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n", + "\n", + "#for motor\n", + "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m\n", + "motor_input = V*(I_a_m+I_sh_m)\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of generator is 92.0297 percent\n", + "Efficiency of motor is 92.0302 percent\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 220.\n", + "I = 40.\n", + "I_a_g = 160. \n", + "I_a_m = 200. \t\t\t#armature currents for generator and motor\n", + "I_sh_g = 7. \n", + "I_sh_m = 6. \t\t\t#current through shunt field for generator and motor\n", + "R_a = 0.015 \t\t\t#armature resistance\n", + "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#armature copper loss for motor\n", + "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#armature copper loss for motor\n", + "power_drawn = V*I\n", + "IFW_losses = power_drawn - (arm_cu_loss_g + arm_cu_loss_m) \t\t\t#Iron friction and windage losses\n", + "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", + "\n", + "# Calculations and Results\n", + "#for motor\n", + "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", + "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m \t\t\t#total losses in motor\n", + "motor_input = V * I_a_m\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input) \t\t\t#motor efficiency\n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", + "\n", + "#for generator\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", + "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each \t\t\t#total losses in generator\n", + "generator_output = V*I_a_g\n", + "generator_input = generator_output + total_loss_g\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency\n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 86.7545 percent\n", + "Efficiency of generator is 85.7867 percent\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R_a = 0.2 \t\t\t#armature resistance \n", + "V = 240.\n", + "I = 16.\n", + "I_a_g = 60. \n", + "I_a_m = 71. \t\t\t#armature currents for generator and motor\n", + "I_sh_g = 3. \n", + "I_sh_m = 2. \t\t\t#field current for generator and motor \n", + "\n", + "\n", + "#for generator\n", + "arm_cu_loss_g = R_a*I_a_g**2\t\t\t#armature copper loss for generator\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", + "\n", + "#for motor\n", + "arm_cu_loss_m = R_a*I_a_m**2\t\t\t#armature copper loss for motor\n", + "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", + "power_drawn = V*I\n", + "field_loss_total_g_m = field_cu_loss_m + field_cu_loss_g\n", + "arm_cu_loss_total_g_m = arm_cu_loss_m + arm_cu_loss_g\n", + "IFW_losses = power_drawn - (arm_cu_loss_total_g_m + field_loss_total_g_m) \t\t\t#Iron friction and windage losses\n", + "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", + "\n", + "# Calculations and Results\n", + "#for generator\n", + "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each \t\t\t#total loss in generator\n", + "generator_output = V*I_a_g\n", + "generator_input = generator_output + total_loss_g\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n", + "\n", + "#for motor\n", + "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m \t\t\t#total loss in motor\n", + "motor_input = V*(I_a_m+I_sh_m)\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of generator is 88.3658 percent\n", + "Efficiency of motor is 88.9035 percent\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27 page no : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R_a = 0.015\n", + "V = 250. \t\t\t#line voltage\n", + "I = 45. \t\t\t#line current\n", + "I_a_m = 385.\n", + "I_sh_m = 4. \t\t\t#armature and field currents for motor\n", + "I_a_g = 340.\n", + "I_sh_g = 5. \t\t\t#armature and field currents for generator\n", + "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#armature copper loss for motor\n", + "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", + "\n", + "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#armature copper loss for generator\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for motor\n", + "\n", + "total_cu_loss = field_cu_loss_g + arm_cu_loss_g + field_cu_loss_m + arm_cu_loss_m \t\t\t#total copper loss for both machines\n", + "P_aux = V*I \t\t\t#power taken from auxillary supply\n", + "stray_loss = P_aux - total_cu_loss\n", + "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", + "\n", + "# Calculations and Results\n", + "total_loss_g = stray_loss_each + arm_cu_loss_g + field_cu_loss_g \t\t\t#total losses in generator\n", + "generator_output = V* I_a_g\n", + "eta_g = 100*(generator_output/(generator_output + total_loss_g))\t\t\t#generator efficiency\n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n", + "\n", + "total_loss_m = stray_loss_each + arm_cu_loss_m + field_cu_loss_m\t\t\t#total losses in motor\n", + "motor_input = V*(I_a_m+I_sh_m)\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of generator is 93.9171 percent\n", + "Efficiency of motor is 94.0929 percent\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 500.\n", + "P = 1000.*10**3\n", + "I = 30.\n", + "I_a_m = 200. + 30 \n", + "I_a_g = 200. \t\t\t#armature current for motor and generator\n", + "I_sh_m = 1.8\n", + "I_sh_g = 3.5 \t\t\t#field current for motor and generator\n", + "brush_drop = 230.\n", + "R_a = 0.075 \t\t\t#armature resimath.tance\n", + "\n", + "# Calculations\n", + "arm_cu_loss_m = R_a*I_a_m**2 + 2*brush_drop \t\t\t#motor armature copper loss\n", + "field_cu_loss_m = V*I_sh_m \t\t\t# motor field copper loss \n", + "\n", + "arm_cu_loss_g = R_a*I_a_g**2 + 2*brush_drop \t\t\t#generator armature copper loss\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss generator\n", + "\n", + "total_cu_loss = field_cu_loss_g + arm_cu_loss_g + field_cu_loss_m + arm_cu_loss_m \t\t\t#total copper loss for both machines\n", + "P_aux = V*I \t\t\t#power taken from auxillary supply\n", + "stray_loss = P_aux - total_cu_loss \n", + "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", + "\n", + "total_loss_g = stray_loss_each + arm_cu_loss_g + field_cu_loss_g \t\t\t#total loss in generator\n", + "generator_output = V* I_a_g\n", + "eta_g = 100*(generator_output/(generator_output + total_loss_g))\t\t\t#generator efficiency\n", + "\n", + "# Results\n", + "print 'Efficiency of generator is %.0f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of generator is 93 percent\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.29 page no : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 220.\n", + "I = 10.\n", + "R_a = 0.05 \t \t\t#artmature resistance\n", + "I_a_m = 73. \n", + "I_sh_m = 2. \t \t\t#armature and field current for motor\n", + "I_a_g = 67.5\n", + "I_sh_g = 2.5\t\t \t#armature and field current for generator\n", + "\n", + "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#motor armature copper loss\n", + "field_cu_loss_m = V*I_sh_m \t\t\t# motor field copper loss \n", + "\n", + "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#generator armature copper loss\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss generator\n", + "\n", + "total_cu_loss = field_cu_loss_g + arm_cu_loss_g + field_cu_loss_m + arm_cu_loss_m \t\t\t#total copper loss for both machines\n", + "power_input = V*I\n", + "stray_loss = power_input - total_cu_loss \n", + "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", + "\n", + "# Calculations and Results\n", + "#motor efficiency\n", + "total_loss_m = field_cu_loss_m + stray_loss_each + arm_cu_loss_m \t\t\t#total motor losses\n", + "motor_input = V*(I_a_m + I_sh_m )\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", + "\n", + "#generator efficiency\n", + "total_loss_g = field_cu_loss_g + stray_loss_each + arm_cu_loss_g \t\t\t#total generator losses\n", + "generator_output = V*I_a_g\n", + "generator_input = generator_output + total_loss_g\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 93.5496 percent\n", + "Efficiency of generator is 92.8956 percent\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30 page no : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 400.\n", + "I = 50.\n", + "I_a_g = 250. \n", + "I_a_m = 300. \t\t\t#armature current for generator and motor\n", + "I_sh_g = 2.5 \n", + "I_sh_m = 2.4 \t\t\t#field current for generator and motor\n", + "R_a = 0.1 \t\t\t#armature resistance\n", + "\n", + "arm_cu_loss_g = R_a*I_a_g**2 \t\t\t#armature copper loss for generator\n", + "arm_cu_loss_m = R_a*I_a_m**2 \t\t\t#armature copper loss for motor\n", + "power_drawn = V*I\n", + "IFW_losses = power_drawn - (arm_cu_loss_g + arm_cu_loss_m) \t\t\t#Iron friction and windage losses\n", + "IFW_losses_each = IFW_losses /2 \t\t\t# Iron friction and windage losses for each machine\n", + "\n", + "# Calculations and Results\n", + "#for motor\n", + "field_cu_loss_m = V*I_sh_m \t\t\t#field copper loss for motor\n", + "total_loss_m = field_cu_loss_m + IFW_losses_each + arm_cu_loss_m\n", + "motor_input = V * I_a_m\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input) \t\t\t#motor efficiency\n", + "print 'Efficiency of motor is %.2f percent'%(eta_m)\n", + "\n", + "#for generator\n", + "field_cu_loss_g = V*I_sh_g \t\t\t#field copper loss for generator\n", + "total_loss_g = field_cu_loss_g + arm_cu_loss_g + IFW_losses_each\n", + "generator_output = V*I_a_g\n", + "generator_input = generator_output + total_loss_g\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency\n", + "print 'Efficiency of generator is %.2f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 89.72 percent\n", + "Efficiency of generator is 91.22 percent\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.31 page no : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_1 = 56. \t\t\t#motor input current\n", + "V = 590. \t\t\t#voltage across armature\n", + "I_2 = 44. \t\t\t# load current\n", + "V_2 = 400. \t\t\t# voltage across generator\n", + "V_field = 40. \t\t\t#voltage drop across field winding\n", + "R_a = 0.3\n", + "R_se = 0.7142 \t\t\t#armature and series field resistance for each machine\n", + "total_input = (V+V_field)*I_1\n", + "output = V_2*I_2\n", + "total_loss_g_m = total_input - output \t\t\t#total losses of 2 machines\n", + "R_se = V_field/I_1 \t\t\t#series field resistance for both windings\n", + "total_cu_loss = (R_a+ 2*R_se)*I_1**2 + R_a*I_2**2 \t\t\t#total copper loss\n", + "stray_loss = total_loss_g_m - total_cu_loss\n", + "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", + "\n", + "# Calculations and Results\n", + "# for motor\n", + "motor_input = V*I_1\n", + "arm_cu_loss_m = (R_a+ R_se)*I_1**2 \t\t\t#armature coper losses of motor\n", + "total_loss_m = arm_cu_loss_m + stray_loss_each\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", + "\n", + "# for generator\n", + "arm_cu_loss_g = R_a*I_2**2 \t\t\t#armature coper losses of generator\n", + "series_field_cu_loss_g = V_field*I_1 \t\t\t#series field copper loss\n", + "total_loss_g = arm_cu_loss_g + series_field_cu_loss_g + stray_loss_each\n", + "generator_output = V_2*I_2\n", + "generator_input = generator_output + total_loss_g\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 72.6998 percent\n", + "Efficiency of generator is 67.0221 percent\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 page no : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_1 = 56. \t\t\t#motor input current\n", + "V = 590. \t\t\t#voltage across armature\n", + "I_2 = 44. \t\t\t# load current\n", + "V_2 = 400. \t\t\t# voltage across generator\n", + "V_field = 40. \t\t\t#voltage drop across field winding\n", + "R_a = 0.3\n", + "R_se = 0.7142 \t\t\t#armature and series field resismath.tane for each machine\n", + "\n", + "total_input = (V+V_field)*I_1\n", + "output = V_2*I_2\n", + "total_loss_g_m = total_input - output \t\t\t#total losses of 2 machines\n", + "R_se = V_field/I_1 \t\t\t#series field resistance for both windings\n", + "total_cu_loss = (R_a+ 2*R_se)*I_1**2 + R_a*I_2**2 \t\t\t#total copper loss\n", + "stray_loss = total_loss_g_m - total_cu_loss\n", + "stray_loss_each = stray_loss/2 \t\t\t#stray loss for each machine\n", + "\n", + "# Calculations and Results\n", + "# for motor\n", + "motor_input = V*I_1\n", + "arm_cu_loss_m = (R_a+ R_se)*I_1**2 \t\t\t#armature coper losses of motor\n", + "total_loss_m = arm_cu_loss_m + stray_loss_each\n", + "motor_output = motor_input - total_loss_m\n", + "eta_m = 100*(motor_output/motor_input)\t\t\t#motor efficiency \n", + "print 'Efficiency of motor is %.4f percent'%(eta_m)\n", + "\n", + "# for generator\n", + "arm_cu_loss_g = R_a*I_2**2 \t\t\t#armature coper losses of generator\n", + "series_field_cu_loss_g = V_field*I_1 \t\t\t#series field copper loss\n", + "total_loss_g = arm_cu_loss_g + series_field_cu_loss_g + stray_loss_each\n", + "generator_output = V_2*I_2\n", + "generator_input = generator_output + total_loss_g\n", + "eta_g = 100*(generator_output/generator_input)\t\t\t#generator efficiency \n", + "print 'Efficiency of generator is %.4f percent'%(eta_g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of motor is 72.6998 percent\n", + "Efficiency of generator is 67.0221 percent\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch4_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch4_2.ipynb new file mode 100755 index 00000000..801aa5cf --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch4_2.ipynb @@ -0,0 +1,1106 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:37c6f1ad2861e36aaa3d0e24a0317df8883a0a0a3ce46bfb539d00dfac4215c9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Synchronous Machines : Alternators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 page no : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pole = 4.\n", + "Slots = 24.\n", + "Phase = 3. \t\t\t#number of phases\n", + "\n", + "# Calculations\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = Slots/Pole/Phase \t\t\t#slots per pole per phase\n", + "beeta = 180/n \t\t\t#Slot angle\n", + "\n", + "# results\n", + "print \"Slot angle : %.f degrees\"%beeta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slot angle : 30 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 page no : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Slots = 120.\n", + "Pole = 8.\n", + "Phase = 3. \t\t\t#number of phases\n", + "\n", + "# Calculations\n", + "n = Slots/Pole \t\t\t#Slots per Pole\n", + "m = Slots/Pole/Phase \t\t\t#Slots per Pole per Phase\n", + "beeta = 180/n \t\t\t#Slot angle in degree\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#Distribution Factor\n", + "\n", + "# Results\n", + "print 'Distribution Factor:K_d = %.3f'%(K_d)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distribution Factor:K_d = 0.957\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 page no : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Slots = 36.\n", + "Pole = 4.\n", + "Phase = 3. \t\t\t#number of phases\n", + "n = Slots/Pole \t\t\t#Slots per pole\n", + "beeta = 180/n \t\t\t#Slot angle in degrees\n", + "\n", + "# Calculations\n", + "#coil is shorted by 1 slot i.e. by beeta degrees to full pitch dismath.tance\n", + "alpha = beeta \t\t\t#angle of short pitch\n", + "K_c = math.cos(math.radians(alpha/2)) \t\t\t#Coil span Factor\n", + "\n", + "# Results\n", + "print 'Coil Span Factor:K_c = %.4f'%(K_c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coil Span Factor:K_c = 0.9848\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 page no : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N_s = 250. \t\t\t#Synchronous speed in r.p.m\n", + "f = 50. \t\t\t#Frequency of generated e.m.f in hertz\n", + "Slots = 216.\n", + "phi = 30.*10**-3 \t\t\t#flux per pole in weber\n", + "\n", + "Pole = 120*f/N_s\n", + "n = Slots/Pole \t\t\t#Slots per Pole\n", + "m = n/3 \t\t\t#Slots per Pole per Phase\n", + "beeta = 180/n \t\t\t#Slot angle in degree\n", + "\n", + "# Calculations\n", + "K_d = math.sin(math.radians(m*beeta/2))/(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "K_c = 1 \t\t\t#Coil Span Factor for full pitch coils = 1\n", + "\n", + "Z = Slots*5 \t\t\t#Z is total no of conductors\n", + "Z_ph = Z/3 \t\t\t#Conductors Per Phase\n", + "T_ph = Z_ph/2 \t\t\t#Turns per phase\n", + "E_ph = 4.44*K_c*K_d*f*phi*T_ph \t\t\t#induced emf\n", + "E_line = E_ph*math.sqrt(3)\n", + "\n", + "# Results\n", + "print 'Induced e.m.f across the Terminals is %.2f V'%(E_line)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced e.m.f across the Terminals is 1992.90 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 page no : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 16.\n", + "N_s = 375. \t\t\t#synchronous speed in rpm\n", + "Slots = 144.\n", + "E_line = 2.657*10**3 \t\t\t#line value of emf across terminals\n", + "f = Pole*N_s/120 \t\t\t#frequency\n", + "\n", + "# Calculations\n", + "K_c = 1 \t\t\t#assuming full pitch winding Coil span Factor = 1\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "\n", + "beeta = 180/n\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#Distribution Fcator\n", + "conductors_per_slot = 10\n", + "Z = Slots*conductors_per_slot \t\t\t#total conductors\n", + "\n", + "Z_ph = Z/3 \t\t\t#number of conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#no of turns per phase\n", + "E_ph = E_line/math.sqrt(3) \t\t\t#phase value of emf across terminals\n", + "\n", + "phi = E_ph/(4.44*K_c*K_d*f*T_ph) \t\t\t#E_ph = 4.44*K_c*K_d*f*phi*T_ph\n", + "\n", + "# Results\n", + "print 'Frequency of Induced e.m.f is %.0fHz \\nFlux per Pole is %.0f mWb'%(f,phi*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of Induced e.m.f is 50Hz \n", + "Flux per Pole is 30 mWb\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 page no : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = 0.25 \t\t\t#Diameter in metre\n", + "l = 0.3 \t\t\t#Length in metre\n", + "Pole = 4.\n", + "A1 = math.pi*d*l/Pole \t\t\t#Area of each fundamental pole\n", + "f = 50. \t\t\t#frequency in hertz\n", + "B_m1 = 0.15 \n", + "B_m3 = 0.03\n", + "B_m5 = 0.02 \t\t\t#Amplitude of 1st 3rd and 5th harmonics\n", + "phi_1 = (2/math.pi)*B_m1*A1 \t\t\t#average value of fundamental flux per pole in weber\n", + "\n", + "\n", + "# Calculations and Results\n", + "#PART A\n", + "E_c1 = 1.11*2*f*phi_1 \t\t\t#R.M.S value of fundamental frequency e.m.f generated in math.single conductor\n", + "Coil_span = (13./15)*180 \t\t\t#math.since winding coil span is 13/15 of pole pitch\n", + "alpha = 180-Coil_span\n", + "\n", + "#Pitch factor for 1st 3rd and 5th harmonic\n", + "K_c1 = math.cos(math.radians(alpha/2))\n", + "K_c3 = math.cos(math.radians(3*alpha/2))\n", + "K_c5 = math.cos(math.radians(5*alpha/2))\n", + "\n", + "#using E_cx = E_c1 * (B_mx/B_m1)\n", + "E_c3 = E_c1 * (B_m3/B_m1)\n", + "E_c5 = E_c1 * (B_m5/B_m1)\n", + "\n", + "E_t1 = K_c1 * (2*E_c1) \t\t\t#R.M.S Vaue of fundamental frequency EMF generated in 1 turn (in volts)\n", + "E_t3 = K_c3 * 2*E_c3\n", + "E_t5 = K_c5 * 2*E_c5\n", + "E_t = math.sqrt(E_t1**2 +E_t3**2 +E_t5**2)\n", + "V = 10*E_t \t\t\t#(number of turns per coil )* (Total e.m.f per turn)\n", + "print 'Voltage generated per coil is %.1f V'%(V)\n", + "\n", + "# PART B\n", + "#E_1ph = 4.44*K_c1*K_d1*phi_1*f*T_ph\n", + "T_ph = 200. \t\t\t#T_ph = (60 coils * 10 turns per coil)/3\n", + "\n", + "Total_Conductors = 1200. \t\t\t# 60 coils * 10 turns per coil * 2\n", + "Conductors_per_Slot = 20. \t\t\t#2 conductors per turn * 10 turns per slot\n", + "Slots = Total_Conductors/Conductors_per_Slot\n", + "\n", + "n = Slots/Pole\n", + "m = n/3\n", + "beeta = 180/n \t\t\t#Slot angle in degree\n", + "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta/2)))\n", + "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta/2)))\n", + "K_d5 = math.sin(math.radians(m*5*beeta/2)) /(m*math.sin(math.radians(5*beeta/2)))\n", + "\n", + "E_1ph = 4.44 * K_c1 * K_d1*phi_1 * f * T_ph\n", + "# using E_xph = E_1ph* (B_mx*K_cx*K_dx)/(B_m1*K_c1*K_d1)\n", + "E_3ph = E_1ph* (B_m3*K_c3*K_d3)/(B_m1*K_c1*K_d1)\n", + "E_5ph = E_1ph* (B_m5*K_c5*K_d5)/(B_m1*K_c1*K_d1)\n", + "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 + E_5ph**2 ) \t\t\t#voltage generated per phase\n", + "print 'Voltage generated per phase is %.f V'%(E_ph)\n", + "\n", + "#PART c\n", + "E_line = math.sqrt(3) * math.sqrt( E_1ph**2 + E_5ph**2 ) \t\t\t#terminal voltage\n", + "print 'Terminal Voltage is %.1f V '%(E_line)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage generated per coil is 12.4 V\n", + "Voltage generated per phase is 235 V\n", + "Terminal Voltage is 404.8 V \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page no : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ns = 250. \t\t\t#Synchronous speed in rpm\n", + "f = 50.\n", + "Slots = 288.\n", + "E_line = 6600.\n", + "Pole = 120*f/Ns \n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "beeta = 180/n \t\t\t#slot angle\n", + "conductors_per_slot = 32 \t\t\t#16 conductors per coil-side *2 coil-sides per slot\n", + "\n", + "# Calculations\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "alpha = 2*beeta\t\t\t# angle of short pitch\n", + "K_c = math.cos(math.radians(alpha/2)) \t\t\t#coil span factor\n", + "Z = Slots*conductors_per_slot \t\t\t#total conductors\n", + "Z_ph = Z/3 \t\t\t#Conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "\n", + "E_ph = E_line/math.sqrt(3)\n", + "phi = E_ph/(4.44*K_c*K_d*f*T_ph) \t\t\t#Because E_ph = 4.44 *K_c *K_d *phi *f *T_ph\n", + "\n", + "# Results\n", + "print 'Flux per pole is %.0f mWb '%(phi*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux per pole is 12 mWb \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 page no : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ns = 1500. \t\t\t#synchronous speed in rpm\n", + "Pole = 4.\n", + "Slots = 24.\n", + "conductor_per_slot = 8.\n", + "phi = 0.05 \t\t\t#flux per pole in weber\n", + "f = Pole*Ns/120 \t\t\t#frequenccy\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n \t\t\t# as number of phases is 1\n", + "beeta = 180/n \t\t\t#slot angle\n", + "\n", + "# Calculations\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "\n", + "#Full pitch = n = 6 slots\n", + "#(1/6)th of full pitch = 1slot\n", + "#angle of short pitch = 1 slot angle\n", + "alpha = beeta\n", + "K_c = math.cos(math.radians(alpha/2)) \t\t\t#coil span factor\n", + "\n", + "Z = conductor_per_slot*Slots \t\t\t#total conductors\n", + "Z_ph = Z \t\t\t# as number of phases is 1\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "E_ph = 4.44*K_c*K_d* phi *f *T_ph \t\t\t#induced emf\n", + "\n", + "# Results\n", + "print 'Induced e.m.f is %.1f V '%(E_ph)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced e.m.f is 662.8 V \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 page no : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 48.\n", + "n = 9. \t\t\t#slots per pole\n", + "phi = 51.75*10**-3 \t\t\t#flux per pole in weber\n", + "Ns = 125.\n", + "f = Ns*Pole/120 \t\t\t#frequency\n", + "K_c = 1. \t\t\t#due to full pitch winding\n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "beeta = 180/n \t\t\t#slot angle\n", + "\n", + "# Calculations\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "conductor_per_slot = 4*2 \t\t\t#Each slot has 2 coil sides and each coil side has 4 conductors\n", + "Slots = n*Pole\n", + "Z = conductor_per_slot*Slots \t\t\t#total number of conductors\n", + "Z_ph = Z/3 \t\t\t#conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "E_ph = 4.44 *K_c *K_d *phi *f *T_ph \t\t\t#induced emf\n", + "\n", + "E_line = (math.sqrt(3))*E_ph \t\t\t#due to star connection\n", + "\n", + "# Results\n", + "print 'Induced e.m.f is %.0f kV '%(E_line/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced e.m.f is 11 kV \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 page no : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Slots = 180.\n", + "Pole = 12.\n", + "Ns = 600. \t\t\t#Synchronous speen in rpm\n", + "f = Pole*Ns/120 \t\t\t#frequency\n", + "phi = 0.05 \t\t\t#flux per pole in weber\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "#Average EMF in a conductor = 2*f*phi\n", + "rms_value_1 = 1.11*2*f*phi \t\t\t#rms value of emf in a conductor\n", + "print 'i)r.m.s value of e.m.f in a conductor is %.2f V '%(rms_value_1)\n", + "\n", + "#part(ii)\n", + "#Average EMF in a turn = 4*f*phi\n", + "rms_value_2 = 1.11*4*f*phi\t\t\t#r.m.s value of e.m.f in a turn\n", + "print 'ii)r.m.s value of e.m.f in a turn is %.2f V '%(rms_value_2)\n", + "\n", + "#part(iii)\n", + "conductors_per_coilside = 10/2 \n", + "rms_value_3 = rms_value_2*conductors_per_coilside \t\t\t#r.m.s value of e.m.f in a coil\n", + "print 'iii)r.m.s value of e.m.f in a coil is %.1f V '%(rms_value_3)\n", + "\n", + "#part(iv)\n", + "conductors_per_slot = 10\n", + "Z = conductors_per_slot * Slots \t\t\t#total number of conductors\n", + "Z_ph = Z/3 \t\t\t#conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n/3 \t\t\t#slots per pole per phase \n", + "beeta = 180/n \t\t\t#slot angle\n", + "\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2)))\n", + "K_c = 1 \t\t\t#distribution & coil-span factor\n", + "E_ph = rms_value_2*T_ph*K_d*K_c \t\t\t#induced emf\n", + "print 'iv)per phase induced e.m.f is %.1f V '%(E_ph)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)r.m.s value of e.m.f in a conductor is 6.66 V \n", + "ii)r.m.s value of e.m.f in a turn is 13.32 V \n", + "iii)r.m.s value of e.m.f in a coil is 66.6 V \n", + "iv)per phase induced e.m.f is 3822.9 V \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 page no : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 8.\n", + "f = 50. \t\t\t#frequency\n", + "phi = 60.*10**-3 \t\t\t#flux per pole in weber\n", + "Slots = 96. \n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "beeta = 180/n \t\t\t#slot angle \n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "\n", + "# Calculations and Results\n", + "coil_pitch = 10*beeta \t\t\t#10 slots\n", + "alpha = 180-coil_pitch\n", + "K_c = math.cos(math.radians(alpha/2)) \t\t\t#coi;-span factor\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "\n", + "conductors_per_slot = 4 \n", + "Z = Slots*conductors_per_slot \t\t\t#total conductors\n", + "Total_turns = Z/2 \n", + "T_ph = Total_turns/3 \t\t\t#turns per phase\n", + "\n", + "#part (i)\n", + "E_ph = 4.44 *K_c *K_d *phi *f *T_ph\n", + "print '\\The phase voltage is %.2f V '%(E_ph)\n", + "\n", + "#part(ii)\n", + "E_line = E_ph*math.sqrt(3)\n", + "print 'The Line Voltage is %.2f V '%(E_line)\n", + "\n", + "#part(iii)\n", + "I_ph = 650\n", + "I_l = I_ph \t\t\t# Star Connection\n", + "kVA_rating = math.sqrt(3)*E_line*I_l\n", + "print 'kVA rating is %.1f kVA '%(kVA_rating/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\\The phase voltage is 788.57 V \n", + "The Line Voltage is 1365.84 V \n", + "kVA rating is 1537.7 kVA \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 page no : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ns = 600. \t\t\t#synchronous speed in rpm\n", + "Pole = 10.\n", + "l = 30./100 \t\t\t#divided by 100 for centimetre-metre conversion\n", + "Pole_pitch = 35./100 \t\t\t#numerically equal to pi*d/Pole\n", + "Phase = 3.\n", + "conductors_per_slot = 8.\n", + "A1 = Pole_pitch*l \t\t\t#Area of each fundamental pole\n", + "m = 3. \t\t\t#Slot per Pole per Phase\n", + "n = Phase*m \t\t\t#slots per pole\n", + "beeta = 180/n \t\t\t#slot angle\n", + "\n", + "B_m1 = 1.\n", + "B_m3 = 0.3\n", + "B_m5 = 0.2 \t\t\t#amplitude of 1st 3rd and 5th harmonic\n", + "phi_1 = (2/math.pi)*A1*B_m1 \t\t\t#average value of fundamental flux per pole \n", + "f = Ns*Pole/120 \t\t\t#frequency\n", + "\n", + "# Calculations\n", + "Coil_span = (8./9)*180\n", + "alpha = 180-Coil_span\n", + "#pitch factor for 1st 3rd and 5th harmonic\n", + "K_c1 = math.cos(math.radians(alpha/2)) \n", + "K_c3 = math.cos(math.radians(3*alpha/2))\n", + "K_c5 = math.cos(math.radians(5*alpha/2))\n", + "\n", + "# using K_dx = math.sin(m*x*beeta*(math.pi/180)/2) /(m*math.sin(x*beeta*(math.pi/180)/2))\n", + "#distribution factor for 1st 3rd and 5th harmonic\n", + "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta/2)))\n", + "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta/2)))\n", + "K_d5 = math.sin(math.radians(m*5*beeta/2)) /(m*math.sin(math.radians(5*beeta/2)))\n", + "\n", + "Slots = n*Pole\n", + "Total_conductors = conductors_per_slot * Slots\n", + "Total_turns = Total_conductors/2\n", + "T_ph = Total_turns/3 \t\t\t#turns per phase\n", + "\n", + "#EMF of 1st 3rd and 5th harmonic\n", + "E_1ph = 4.44 * K_c1 * K_d1*phi_1 * f * T_ph\n", + "E_3ph = E_1ph* (B_m3*K_c3*K_d3)/(B_m1*K_c1*K_d1)\n", + "E_5ph = E_1ph* (B_m5*K_c5*K_d5)/(B_m1*K_c1*K_d1)\n", + "\n", + "# Results\n", + "# using E_xph = E_1ph* (B_mx*K_cx*K_dx)/(B_m1*K_c1*K_d1)\n", + "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 + E_5ph**2 )\n", + "print 'Phase value of induced e.m.f is %.2f V '%(E_ph)\n", + "E_line = math.sqrt(3) * math.sqrt( E_1ph**2 + E_5ph**2 )\t\t\t#no 3rd harmonic appears in line value\n", + "print 'line value of induced e.m.f is %.2f V '%(E_line)\n", + "\n", + "print 'Answer mismatches due to approximation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase value of induced e.m.f is 1711.94 V \n", + "line value of induced e.m.f is 2916.65 V \n", + "Answer mismatches due to approximation\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 16.\n", + "phi = 0.03 \t\t\t#flux per pole\n", + "Ns = 375. \t\t\t#synchronous speed in rpm\n", + "\n", + "# Calculations and Results\n", + "f = Ns*Pole/120 \t\t\t#frequency\n", + "print 'frequency is %.0f Hz '%(f)\n", + "Slots = 144\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "beeta = 180/n \t\t\t#slot angle\n", + "K_c = 1 \t\t\t#assuming Full-Pitch coil\n", + "Conductors_per_slot = 10\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "\n", + "Total_conductors = Slots*Conductors_per_slot\n", + "Total_turns = Total_conductors/2\n", + "T_ph = Total_turns/3 \t\t\t#turns per phase\n", + "E_ph = 4.44* K_c* K_d*phi* f* T_ph\n", + "E_line = E_ph*math.sqrt(3)\n", + "print 'line voltage is %.2f V '%(E_line)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency is 50 Hz \n", + "line voltage is 2657.20 V \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ns = 250. \t\t\t#Speed in rpm\n", + "f = 50. \t\t\t#frequency\n", + "I_l = 100.\n", + "Slots = 216.\n", + "Conductors_per_slot = 5\n", + "Pole = 120.*f/Ns\n", + "phi = 30.*10**-3\t\t\t#flux per pole in weber\n", + "Z = Slots*Conductors_per_slot \t\t\t#Total Conductors\n", + "Z_ph = Z/3 \t\t\t#conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "beeta = 180./n \t\t\t#Slot angle\n", + "\n", + "# Calculations\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "\n", + "e_av = 2*f*phi \t\t\t#Average Value of EMF in each conductor\n", + "E_c = 1.11*(2*f*phi) \t\t\t#RMS value of EMF in each conductor\n", + "E = 2*E_c*K_d \t\t\t#RMS value of EMF in each turn\n", + "E_ph = T_ph*E \t\t\t#RMS value of EMF in each phase\n", + "E_line = E_ph*math.sqrt(3) \t\t\t#As Star Connected Alternator\n", + "\n", + "# Results\n", + "print 'RMS value of EMF in each phase = %.3f V'%(E_ph)\n", + "print 'RMS value of EMF line value = %.3f V'%(E_line)\n", + "kVA_rating = math.sqrt(3)*E_line*I_l\n", + "print 'kVA rating is %.3f kVA '%(kVA_rating/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of EMF in each phase = 1150.602 V\n", + "RMS value of EMF line value = 1992.902 V\n", + "kVA rating is 345.181 kVA \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 10.\n", + "Slots = 90.\n", + "E_l = 11000.\n", + "f = 50.\n", + "phi = 0.15 \t\t\t#flux per pole in weber\n", + "n = Slots/Pole \t\t\t#slots per pole\n", + "m = n/3 \t\t\t#slots per pole per phase\n", + "beeta = 180/n \t\t\t#slot angle\n", + " \n", + "# Calculations \n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t#distribution factor\n", + "K_c = 1 \t\t\t#coil span factor\n", + "\n", + "E_ph = E_l/math.sqrt(3)\n", + "T_ph = ( E_ph/(4.44*K_c*K_d*phi*f) )\n", + "#T_ph should necessarily be an integer\n", + "Z_ph = (T_ph)*2 \n", + "\n", + "# Results\n", + "print 'Required number of armature conductors is %d'%(Z_ph)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required number of armature conductors is 397\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 10.\n", + "Ns = 600. \t\t\t#speen in rpm\n", + "conductor_per_slot = 8.\n", + "n = 12. \t\t\t#slots per pole\n", + "Slots = Pole*n \n", + "m = n/3 \t\t\t#slots per pole per phase \n", + "beeta = 180/n \t\t\t#slot angle\n", + "alpha = 2*beeta \t\t\t#short by 2 slots\n", + "\n", + "#flux per pole corresponding to 1st 3rd and 5th harmonic\n", + "phi_1 = 100*10**-3\n", + "phi_3 = (33./100)*phi_1\n", + "phi_5 = (20./100)*phi_1\n", + "\n", + "#coil span factor corresponding to 1st 3rd and 5th harmonic\n", + "K_c1 = math.cos(math.radians( alpha/2))\n", + "K_c3 = math.cos(math.radians( 3*alpha/2))\n", + "K_c5 = math.cos(math.radians( 5*alpha/2))\n", + "\n", + "# using K_dx = math.sin(m*x*beeta /2) /(m*math.sin(x*beeta /2))\n", + "#distribution factor corresponding to 1st 3rd and 5th harmonic\n", + "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta /2)))\n", + "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta /2)))\n", + "K_d5 = math.sin(math.radians(m*5*beeta/2)) /(m*math.sin(math.radians(5*beeta /2)))\n", + "\n", + "Z = conductor_per_slot*n*Pole \t\t\t#Total Conductors\n", + "Zph = Z/3 \t\t\t#conductors per phase\n", + "T_ph = Zph/2 \t\t\t#turns per phase\n", + "\n", + "f = Ns*Pole/120\n", + "E_1ph = 4.44*K_c1*K_d1*phi_1*f*T_ph\n", + "E_3ph = 4.44*K_c3*K_d3*phi_3*f*T_ph\n", + "E_5ph = 4.44*K_c5*K_d5*phi_5*f*T_ph\n", + "\n", + "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 + E_5ph**2 )\n", + "\n", + "# Results\n", + "print 'Phase value of induced e.m.f is %.0f V '%(E_ph)\n", + "E_line = math.sqrt(3)*math.sqrt( E_1ph**2 + E_5ph**2 ) \t\t\t#In a line value 3rd harmonic doesnt appear\n", + "print 'line value of induced e.m.f is %d V '%(E_line)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase value of induced e.m.f is 3330 V \n", + "line value of induced e.m.f is 5691 V \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 page no : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 6.\n", + "Ns = 1000. \t\t\t#speed in rpm\n", + "d = 28./100 \t\t\t#Divided by 100 to convert from centimeters to metres\n", + "l = 23./100 \t\t\t#Divided by 100 to convert from centimeters to metres\n", + "m = 4. \t \t\t#slots per pole per phase\n", + "B_m1 = 0.87 \t\t\t#amplitude of 1st harmonic component of flux density\n", + "B_m3 = 0.24 \t\t\t#amplitude of 3rd harmonic component of flux density\n", + "Conductors_per_slot = 8\n", + "f = Ns*Pole/120 \t\t\t#frequency\n", + "A1 = math.pi*d*l/Pole \t\t\t#area of each fundamental pole\n", + "phi_1 = (2/math.pi)*A1*B_m1 \t\t\t#flux per pole in weber\n", + "n = m*3 \t\t \t#slots per pole\n", + "beeta = 180/n \t\t\t#slot angle\n", + "alpha = beeta \t\t\t#because of 1 slot short\n", + "\n", + "# Calculations\n", + "K_c1 = math.cos(math.radians(alpha/2)) \t\t\t#coil span factor corresponding to 1st harmonic\n", + "K_c3 = math.cos(math.radians(3*alpha/2))\t\t\t#coil span factor corresponding to 3rd harmonic\n", + "# using K_dx = math.sin(m*x*beeta*(math.pi/180)/2) /(m*math.sin(x*beeta*(math.pi/180)/2))\n", + "K_d1 = math.sin(math.radians(m*1*beeta/2)) /(m*math.sin(math.radians(1*beeta/2))) \t\t\t#distribution factor corresponding to 1st harmonic\n", + "K_d3 = math.sin(math.radians(m*3*beeta/2)) /(m*math.sin(math.radians(3*beeta/2))) \t\t\t#distribution factor corresponding to 3rd harmonic\n", + "\n", + "Slots = n*Pole\n", + "Z = Slots*Conductors_per_slot \t\t\t#total number of conductors\n", + "Z_ph = Z/3 \t\t\t#conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "\n", + "E_1ph = 4.44*K_c1*K_d1*phi_1*f*T_ph\n", + "E_3ph = E_1ph* (B_m3*K_c3*K_d3)/(B_m1*K_c1*K_d1) \t\t\t#using E_xph = E_1ph* (B_mx*K_cx*K_dx)/(B_m1*K_c1*K_d1)\n", + "E_ph = math.sqrt( E_1ph**2 + E_3ph**2 )\n", + "print 'r.m.s value of resultant voltage is %.1f V'%(E_ph)\n", + "E_line = math.sqrt(3)*E_1ph \t\t\t#For line Value 3rd harmonic does not appear\n", + "print 'line voltage is %.3f V'%(E_line)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "r.m.s value of resultant voltage is 383.7 V\n", + "line voltage is 654.560 V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 125.\n", + "V_ph = V_L\n", + "VA = 600.*10**3\n", + "I_L = VA/(math.sqrt(3)*V_L) \t\t\t# Because VA = math.sqrt(3)* V_L * I_L\n", + "I_ph = I_L/(math.sqrt(3))\n", + "\n", + "# Calculations and Results\n", + "#After Reconnection\n", + "V_ph = 125\n", + "V_L = V_ph*math.sqrt(3)\n", + "print 'New rating in volts is %.3f V'%(V_L)\n", + "#Winding Impedances remain the same\n", + "I_ph = 1600\n", + "I_L = I_ph\n", + "\n", + "print 'New rating in amperes is %.0f A'%(I_L)\n", + "kVA = math.sqrt(3)*V_L*I_L*(10**-3)\n", + "print 'New rating in kVA is %.0f kVA'%(kVA)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New rating in volts is 216.506 V\n", + "New rating in amperes is 1600 A\n", + "New rating in kVA is 600 kVA\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 page no : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pole = 4.\n", + "f = 50. \t\t\t#frequency\n", + "phi = 0.12 \t\t\t#flux per pole in weber\n", + "m = 4. \t\t\t# slot per pole per phase\n", + "conductor_per_slot = 4.\n", + "coilspan = 150.\n", + "Ns = 120*f/Pole \t\t\t#synchronous speed in rpm\n", + "n = m*3 \t \t\t#Slots per pole\n", + "beeta = 180/n \t\t\t#slot angle\n", + "\n", + "# Calculations\n", + "K_d = math.sin(math.radians(m*beeta/2)) /(m*math.sin(math.radians(beeta/2))) \t\t\t# distribution factor\n", + "alpha = 180-coilspan \t\t\t#angle of short pitch\n", + "K_c = math.cos((math.pi/180)*alpha/2) \t\t\t#coil span factor\n", + "Z = m*(n*Pole) \t\t\t# Also equal to (conductors/slots)*slots\n", + "Z_ph = Z/3 \t\t\t#conductors per phase\n", + "T_ph = Z_ph/2 \t\t\t#turns per phase\n", + "E_ph = 4.44*K_c*K_d*phi*f*T_ph\n", + "E_line = math.sqrt(3)*E_ph\n", + "\n", + "# Results\n", + "print 'e.m.f generated is %.2f Vphase, %.2f Vline)'%(E_ph,E_line)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e.m.f generated is 788.57 Vphase, 1365.84 Vline)\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch5_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch5_2.ipynb new file mode 100755 index 00000000..b8d7dccd --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch5_2.ipynb @@ -0,0 +1,1604 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:933ba5514f95bafa26850ac6e2454a01e504df02d55087ce5bb50cc93571fedc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Methods for Calculating Regulation of Alternator" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 page no : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 1000.*10**3 \t\t\t#load power\n", + "phi = math.acos(math.radians(0.8)) \t\t\t#power factor lagging angle\n", + "V_L = 11.*10**3 \t\t\t#rated terminal voltae\n", + "R_a = 0.4 \t\t\t#armature resistance per phase\n", + "X_s = 3.\t\t\t#synchronous reactance per phase\n", + "\n", + "# Calculations\n", + "I_L = P/(math.sqrt(3)*V_L*math.cos(math.radians(phi)))\n", + "I_aph = I_L \t\t\t#for star connected load\n", + "I_a = I_L\t\t\t#current through armature\n", + "V_ph = V_L/math.sqrt(3) \t\t\t#rated terminal volatge phase value\n", + "\n", + "E_ph = math.sqrt( (V_ph*math.cos(math.radians(phi))+I_a*R_a)**2+(V_ph*math.sin(math.radians(phi))+I_a*X_s)**2 ) \t\t\t#emf generated phase value\n", + "E_line = E_ph*math.sqrt(3) \t\t\t#line value of emf generated\n", + "regulation = 100*(E_ph-V_ph)/V_ph \t\t\t#pecentage regulation\n", + "\n", + "# Results\n", + "print 'Line value of e.m.f generated is %.2f kV \\nRegulation is %.3f percent'%(E_line*10**-3,regulation)\n", + "\n", + "# note : book answer is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Line value of e.m.f generated is 11.05 kV \n", + "Regulation is 0.428 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page no : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "VA = 1200.*10**3\n", + "V_L = 6600.\n", + "R_a = 0.25 \t\t\t#armature resistance per phase\n", + "X_s = 5.\t\t\t#synchronous reactance per phase\n", + "\n", + "# Calculations and Results\n", + "I_L = VA/(math.sqrt(3)*V_L)\n", + "I_aph = I_L \t\t\t#for star connected load\n", + "I_a = I_L\n", + "V_ph = V_L/math.sqrt(3)\n", + "\n", + "#Part(i)\n", + "phi1 = math.acos(0.8)\t\t\t#and lagging\n", + "E_ph1 = math.sqrt( (V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2 )\n", + "regulation = 100*(E_ph1-V_ph)/V_ph \t\t\t#percentage regulation\n", + "print 'i)Regulation at 0.8 lagging pf is %.2f percent'%(regulation)\n", + "#Part(ii)\n", + "phi2 = math.acos(0.8)\t\t\t#and leading\n", + "E_ph2 = math.sqrt( (V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2 )\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph \t\t\t#percentage regulation\n", + "print 'ii)Regulation at 0.8 leading pf is %.f percent'%(regulation2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Regulation at 0.8 lagging pf is 9.33 percent\n", + "ii)Regulation at 0.8 leading pf is -7 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page no : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#full load\n", + "V_L_FL = 1100.\n", + "V_ph_FL = V_L_FL/math.sqrt(3)\n", + "\n", + "# Calculations\n", + "#no load\n", + "V_L_NL = 1266\n", + "E_line = V_L_NL\n", + "E_ph = E_line/math.sqrt(3)\n", + "regulation = 100*(E_ph-V_ph_FL)/V_ph_FL\n", + "\n", + "# Results\n", + "print 'Regulation at full load is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at full load is 15.09 percent\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page no : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 866.\n", + "VA = 100.*10**3\n", + "I_L = VA/(math.sqrt(3)*V_L) \t\t\t#because VA = math.sqrt(3)*V_L*I_L\n", + "I_aph = I_L\t\t\t#full load and star connected alternator\n", + "V_ph = V_L/math.sqrt(3)\n", + "\n", + "# Calculations\n", + "#Graph is plotted and V_oc_ph and I_asc_Ph is obtained for \n", + "#SCC for I_asc = 66.67 A\n", + "I_f = 2.4 # A\n", + "#OCC for I_f = 2.4 A\n", + "V_oc_ph = 240 # V\n", + "\n", + "#for measruemnt of impedance\n", + "V_oc_ph = 240 \t\t\t#for I_f = 2.4..From o.c.c graph\n", + "I_asc_ph = 66.67 \t\t\t#for I_f = 2.4...From s.c.c graph\n", + "Z_s = V_oc_ph/I_asc_ph\n", + "R_a = 0.15\n", + "X_s = math.sqrt( Z_s**2-R_a**2 )\n", + "\n", + "V_ph_FL = 500.\n", + "phi = math.acos(0.8) \t\t\t#lagging pf\n", + "E_ph = math.sqrt((V_ph_FL*math.cos(phi)+I_aph*R_a)**2+(V_ph_FL*math.sin(phi)+I_aph*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Full-load regulation at 0.8 lagging pf is %.2f percent '%(regulation )\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full-load regulation at 0.8 lagging pf is 35.57 percent \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page no : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_OC_line = 230.\n", + "I_asc = 12.5 \t\t\t# when I_f = 0.38\n", + "V_OC_ph = V_OC_line/math.sqrt(3)\n", + "Z_s = V_OC_ph/I_asc \n", + "\n", + "R_a = 1.8/2 \t\t\t#1.8 is between terminals..0.9 is per phase\n", + "X_s = math.sqrt(Z_s**2-R_a**2)\n", + "\n", + "I_a = 10.\t\t\t# when regulation is needed\n", + "V_L = 230.\n", + "V_ph = V_L/math.sqrt(3)\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "phi1 = math.acos(0.8) \t\t\t#and lagging\n", + "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", + "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", + "print 'Regulation for 10 A at 0.8 lagging pf is %.2f percent'%(regulation1)\n", + "#Part(ii)\n", + "phi2 = math.acos(0.8) \t\t\t#and leading\n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2)\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'Regulation for 10 A at 0.8 leading pf is %.2f percent'%(regulation2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation for 10 A at 0.8 lagging pf is 64.47 percent\n", + "Regulation for 10 A at 0.8 leading pf is -11.01 percent\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page no : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "phi = math.acos(0.8)\n", + "VA = 1000.*10**3\n", + "V_L = 1905.\n", + "V_ph = V_L/math.sqrt(3)\n", + "R_a = 0.2\t\t\t#Armature reactance per phase\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "#Ampere-turn method\n", + "I_L = VA/(math.sqrt(3)*V_L)\n", + "I_aph = I_L\n", + "V_dash = V_ph+I_aph*R_a*math.cos(phi)\t\t\t#V_dash is a dummy quantity and has no significance..it's used only for mapping correcponding current\n", + "F_o = 32 \t\t\t#F_o corresponds to voltage V_dash = 1148.5 from O.C.C graph\n", + "F_AR = 27.5 \t\t\t#Field current required to circulate full-load short circuit current of 303.07A.From SCC F_AR = 27.5\n", + "F_R = math.sqrt( F_o**2 + F_AR**2-2*F_o*F_AR*math.cos(phi+math.pi/2) )\t\t\t#using Comath.sine rule\n", + "\n", + "# for F_R = 53.25 E_ph = 1490 V from O.C.C\n", + "E_ph = 1490.\n", + "regulation1 = 100*(E_ph-V_ph)/V_ph\n", + "print 'Regulation on full-load by ampere-turn method is %.2f percent'%(regulation1)\n", + "\n", + "#Part (ii)\n", + "#Synchronous Impedance method\n", + "\n", + "I_sc = I_L\n", + "I_aph2 = I_sc\n", + "I_f = 27.5\n", + "\n", + "V_OC_ph = 1060. \t\t\t#corresponding to I-f = 27.5 in the graph\n", + "Z_s = V_OC_ph/I_aph2\n", + "X_s = math.sqrt(Z_s**2-R_a**2)\n", + "\n", + "E_ph2 = math.sqrt( (V_ph*math.cos(phi)+I_aph2*R_a)**2+(V_ph*math.sin(phi)+I_aph2*X_s)**2 ) \t\t\t#from phasor diagram\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'Regulation on full-load by synchronous impedance method is %.2f percent'%(regulation2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation on full-load by ampere-turn method is 35.47 percent\n", + "Regulation on full-load by synchronous impedance method is 78.09 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page no : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#case(i)\n", + "V_L = 440.\n", + "V_ph = V_L/math.sqrt(3)\n", + "phi = math.acos(0.8)\n", + "\n", + "#armature resistance drop from the graph\n", + "#RS = 1.1 cm and scale = 50 V/cm\n", + "arm_leak_resis = 1.1*50 \t\t\t#armature leakage resistance\n", + "\n", + "OB = V_ph*math.cos(phi)\n", + "AB = V_ph*math.sin(phi) + arm_leak_resis\n", + "E_1ph = math.sqrt( OB**2+AB**2 )\n", + "\n", + "F_f1 = 6.1 \t\t\t#corresponding value from OCC\n", + "F_AR = 3.1*1\n", + "\n", + "# Calculations and Results\n", + "F_R = math.sqrt( F_f1**2 + F_AR**2 -2*F_f1*F_AR*math.cos(math.radians(90+math.acos(math.radians(0.8)))))\n", + "E_ph = 328. \t\t\t#voltage corresponding to F_R = 8.33 A from OCC graph\n", + "regulation1 = 100*(E_ph - V_ph)/V_ph\n", + "print 'i)Regulation for 0.8 pf lagging is %.2f percent '%(regulation1)\n", + "\n", + "#case(ii)\n", + "\n", + "OC = V_ph*math.cos(phi)\n", + "BC = V_ph*math.sin(phi) - arm_leak_resis\n", + "E_1ph = math.sqrt( OC**2+BC**2 )\n", + "\n", + "F_f1 = 6.1 \t\t\t#corresponding value from OCC\n", + "F_R = math.sqrt( F_f1**2 + F_AR**2 -2*F_f1*F_AR*math.cos(math.radians(90-math.acos(math.radians(0.8)))))\n", + "E_ph = 90 \t\t\t#volatge corresponding to F_R = 3.34 A from OCC graph\n", + "regulation2 = 100*(E_ph - V_ph)/V_ph\n", + "print 'ii)Regulation for 0.8 pf leading is %.2f percent '%(regulation2)\n", + "print 'The answer in part ii doesnt match with textbook because of calculation mistake done in last step in the textbook'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Regulation for 0.8 pf lagging is 29.12 percent \n", + "ii)Regulation for 0.8 pf leading is -64.57 percent \n", + "The answer in part ii doesnt match with textbook because of calculation mistake done in last step in the textbook\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page no : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 1200.*10**3\n", + "V_line = 12000.\n", + "R_a = 2.\n", + "X_s = 35.\t\t\t#armature resistance and synchronous reactance\n", + "phi = math.acos(0.8)\n", + "\n", + "# Calculations\n", + "I_L = P/(math.sqrt(3)*V_line*math.cos(phi))\n", + "I_a = I_L\n", + "V_ph = V_line/math.sqrt(3)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Regulation at 0.8 lag power factor is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at 0.8 lag power factor is 26.66 percent\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page no : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 11000. \n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 1000.*1000\n", + "I_L = VA/(V_L*math.sqrt(3))\n", + "\n", + "V_OC_ph = 433/math.sqrt(3)\n", + "I_asc_ph = I_L\n", + "\n", + "Z_s = V_OC_ph /I_asc_ph \t\t\t#ohms per phase\n", + "R_a = 0.45 \t\t\t#ohms per phase\n", + "X_s = math.sqrt(Z_s**2-R_a**2)\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "phi = math.acos(0.8) \t\t\t#lagging\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_L*R_a)**2 +(V_ph*math.sin(phi)+ I_L*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'Voltage regulation at 0.8 pf lagging is %f percent'%(regulation)\n", + "\n", + "#part(ii)\n", + "phi = math.acos(0.8) \t\t\t#leading\n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi)+I_L*R_a)**2 +(V_ph*math.sin(phi)- I_L*X_s)**2)\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'Voltage regulation at 0.8 pf lagging is %f percent'%(regulation2)\n", + "print 'Answer mismatches due to improper approximation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage regulation at 0.8 pf lagging is 2.690067 percent\n", + "Voltage regulation at 0.8 pf lagging is -1.996182 percent\n", + "Answer mismatches due to improper approximation\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "VA = 125.*10**3\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_L = VA/(math.sqrt(3)*V_L)\n", + "I_aph = I_L\n", + "\n", + "# Calculations\n", + "I_f = 4.\n", + "I_asc = I_aph/2 \t\t\t#for half load.. refer to graph\n", + "V_OC_line = 140.\n", + "V_OC_ph = V_OC_line/math.sqrt(3)\n", + "I_asc_ph = I_asc\n", + "Z_s = V_OC_ph/I_asc_ph\n", + "R_a = 0.1\n", + "X_s = math.sqrt(Z_s**2-R_a**2) \t\t\t#armature resistance and synchronous reactance\n", + "\n", + "phi = math.acos(0.8)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_asc*R_a)**2 +(V_ph*math.sin(phi)- I_asc*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Voltage regulation at 0.8 pf leading for half load is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage regulation at 0.8 pf leading for half load is -12.39 percent\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "V_OC_line = 575.\n", + "V_OC_ph = V_OC_line/math.sqrt(3)\n", + "I_asc_line = 75.\n", + "I_asc_ph = I_asc_line \n", + "I_aph = I_asc_ph\n", + "I_L = I_aph\n", + "\n", + "Z_s = V_OC_ph/I_asc_ph\n", + "R_a = 2.16/2\n", + "X_s = math.sqrt(Z_s**2 - R_a**2)\n", + "\n", + "# Calculations and Results\n", + "#on full load\n", + "E_ph = 6100.\n", + "phi = math.acos(0.8) \t\t\t#leading\n", + "\n", + "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)- I_a*X_s)**2)\n", + "p = [1, -256.68, -3.71*10**7]\n", + "ans = roots(p)\n", + "V_ph = ans[0] \t\t\t#second root is ignored as its -ve\n", + "V_L = V_ph*math.sqrt(3)\n", + "print 'Rated terminal voltage between the lines is %.3f V '%(V_L)\n", + "VA_rating = math.sqrt(3)*V_L*I_L\n", + "print 'kVA rating of the alternator is %.f kVA'%(VA_rating*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rated terminal voltage between the lines is 10774.515 V \n", + "kVA rating of the alternator is 1400 kVA\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "V_L = 6600.\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 1500.*10**3\n", + "I_L = VA/(math.sqrt(3)*V_L)\n", + "I_aph = I_L\n", + "\n", + "# Calculations and Results\n", + "R_a = 0.5\n", + "X_s = 5\t\t\t#armature resistance and synchronous reactance\n", + "phi = math.acos(0.8)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", + "print 'Induced EMF per phase is %f V'%(E_ph)\n", + "\n", + "#full load \n", + "phi = math.acos(1)\n", + "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)- I_a*X_s)**2)\n", + "p = [1, 131.215, -1.791*10**7]\n", + "ans = roots(p)\n", + "V_ph = ans[1] \t\t\t#first root is ignored as it is -ve\n", + "print 'Terminal voltage per phase is %f V'%(V_ph)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced EMF per phase is 4284.243828 V\n", + "Terminal voltage per phase is 4166.921808 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_ph = 2000.\n", + "R_a = 0.8\n", + "I_sc = 100.\n", + "V_OC = 500.\n", + "I_f = 2.5\n", + "Z_s = V_OC/I_sc\n", + "X_s = math.sqrt(Z_s**2 - R_a**2 )\n", + "I_aFL = 100.\n", + "I_a = I_aFL\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "phi = math.acos(1)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)+ I_a*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'i)Voltage regulation is %.2f percent'%(regulation)\n", + "\n", + "#part(ii)\n", + "phi2 = math.acos(0.8)\n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2 +(V_ph*math.sin(phi2)- I_a*X_s)**2)\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'ii)Voltage regulation is %.2f percent'%(regulation2)\n", + "\n", + "#part(iii)\n", + "phi3 = math.acos(0.71)\n", + "E_ph3 = math.sqrt((V_ph*math.cos(phi3)+I_a*R_a)**2 +(V_ph*math.sin(phi3)+ I_a*X_s)**2)\n", + "regulation3 = 100*(E_ph3-V_ph)/V_ph\n", + "print 'iii)Voltage regulation is %.2f percent'%(regulation3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Voltage regulation is 6.89 percent\n", + "ii)Voltage regulation is -8.88 percent\n", + "iii)Voltage regulation is 21.11 percent\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "VA = 1000.*1000\n", + "V_L = 4600. \n", + "V_ph = V_L/math.sqrt(3)\n", + "I_L = VA/(math.sqrt(3)*V_L)\n", + "I_aph_FL = I_L\n", + "I_aph = I_aph_FL\n", + "I_sc = (150./100)* I_aph_FL\n", + "V_OC_line = 1744\n", + "V_OC_ph = V_OC_line/math.sqrt(3)\n", + "\n", + "# Calculations\n", + "Z_s = V_OC_ph / I_sc\n", + "R_a = 1\n", + "X_s = math.sqrt(Z_s**2-R_a**2)\n", + "\n", + "phi = math.acos(0.8 ) \t\t\t#lagging\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Voltage regulation at full load 0.8 pf is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage regulation at full load 0.8 pf is 19.89 percent\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page no : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#part(i) Ampere turn method\n", + "# Variables\n", + "F_O = 37.5\n", + "F_AR = 20.\n", + "V_L = 6600.\n", + "V_ph = V_L/math.sqrt(3)\n", + "\n", + "# Calculations and Results\n", + "#lagging\n", + "phi = math.acos(0.8) \n", + "F_R = math.sqrt((F_O+F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", + "#E_ph corresponding to F_R can be obtained by plotting open circuit characteristics\n", + "E_ph = 4350\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'i)By Ampere-turn method or MMF methodFull-load regulation at 0.8 lagging pf is %.2f percent'%(regulation)\n", + "#leading\n", + "phi = math.acos(0.8) \n", + "F_R = math.sqrt((F_O-F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", + "#E_ph corresponding to F_R can be obtained by plotting open circuit characteristics\n", + "E_ph = 3000\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'Full-load regulation at 0.8 leading pf is %.2f percent'%(regulation)\n", + "\n", + "#EMF method\n", + "V_OC_ph = 100\n", + "V_ph = 100\n", + "I_sc = 100*(F_O/F_AR) \t\t\t#times the rated value\n", + "Z_s = V_OC_ph/I_sc\n", + "F_O = 100\n", + "F_AR = Z_s*100\n", + "\n", + "#lagging\n", + "phi = math.acos(0.8)\n", + "F_R = math.sqrt((F_O+F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", + "regulation = 100*(F_R-V_ph)/V_ph\n", + "print 'iiSynchronous impedance method or EMF method'\n", + "print 'Full-load regulation at 0.8 lagging pf is %.2f percent'%(regulation)\n", + "#leading\n", + "phi = math.acos(0.8)\n", + "F_R = math.sqrt((F_O-F_AR*math.sin(phi) )**2 + (F_AR*math.cos(phi))**2 ) \n", + "regulation = 100*(F_R-V_ph)/V_ph\n", + "print 'Full-load regulation at 0.8 leading pf is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)By Ampere-turn method or MMF methodFull-load regulation at 0.8 lagging pf is 14.16 percent\n", + "Full-load regulation at 0.8 leading pf is -21.27 percent\n", + "iiSynchronous impedance method or EMF method\n", + "Full-load regulation at 0.8 lagging pf is 38.72 percent\n", + "Full-load regulation at 0.8 leading pf is -19.72 percent\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page no : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6000.\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_ph_X_Lph = 0.9*500 \t\t\t#leakage reactance drop in volts = 0.9 cm * 500 V/cm\n", + "phi = math.acos(0.8) \t\t\t#lagging\n", + "\n", + "# Calculations\n", + "E_1ph = math.sqrt( (V_ph*math.cos(phi))**2 + (V_ph*math.sin(phi)+I_ph_X_Lph)**2 ) \t\t\t#From triangle OAB\n", + "F_f1 = 26 \t\t\t#from OCC\n", + "F_AR = 2.9*5 \t\t\t#2.9cm * 5 A/cm\n", + "\n", + "F_R = math.sqrt(F_f1**2 + F_AR**2 -2*F_AR*F_f1*math.cos(phi+ (math.pi/2)) )\n", + "\n", + "# Results\n", + "print 'Required field current is %.2f A'%(F_R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required field current is 36.59 A\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page no : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 40.*10**3\n", + "I_L = VA/(math.sqrt(3)*V_L) \n", + "I_aph = I_L\n", + "\n", + "# Calculations and Results\n", + "I_aph_X_Lph = 0.65*50 \t\t\t#leakage reactance drop in volts = 2.4 cm * 500 V/cm\n", + "X_Lph = I_aph_X_Lph/ I_aph\n", + "print 'Armature leakage reactance is %.3f ohms'%(X_Lph)\n", + "phi = math.acos(0.8) \t\t\t#lagging\n", + "E_ph = math.sqrt((V_ph*math.cos(phi))**2 +(V_ph*math.sin(phi)+ I_aph_X_Lph)**2)\n", + "F_f1 = 15.6 \t\t\t#as obtained from OCC corresponding to this E_ph\n", + "\n", + "F_AR = 2.3*3 \t\t\t#2.3cm * 3 A/cm\n", + "print 'Armature reaction is %.1f '%(F_AR)\n", + "F_R = math.sqrt(F_f1**2 + F_AR**2 -2*F_AR*F_f1*math.cos(phi+ (math.pi/2)) ) \t\t\t#math.comath.sine rule to Triangle OAB\n", + "E_ph = 267.5 \t\t\t#corresponding to F_R from open circiut characteristics\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'Voltage regulation at 0.8 pf lagging is %.1f percent'%(regulation)\n", + "\n", + "\n", + "#Note:This answer doesnt match with textbook as it has been reciprocated in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature leakage reactance is 0.563 ohms\n", + "Armature reaction is 6.9 \n", + "Voltage regulation at 0.8 pf lagging is 15.8 percent\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page no : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "VA = 10.*10**3\n", + "V_L = 11.*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_ph_X_Lph = 2.4*500 \t\t\t#leakage reactance drop in volts = 2.4 cm * 500 V/cm\n", + "\n", + "# Calculations\n", + "I_ph_R_aph = VA/(math.sqrt(3)*V_L)\n", + "phi = math.acos(0.8)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_ph_R_aph)**2 +(V_ph*math.sin(phi)+ I_ph_X_Lph)**2)\n", + "F_f1 = 109 \t\t\t#obtained from open circuit characteristics corresponding to calculated E_ph\n", + "F_AR = 2.8*10 \t\t\t#2.8cm * 10 A/cm\n", + "F_R = math.sqrt(F_f1**2 + F_AR**2 -2*F_AR*F_f1*math.cos(phi+ (math.pi/2)) ) \t\t\t#math.comath.sine rule to Triangle OAB\n", + "E_ph = 7700. \t\t\t#corresponding to F_R from open circiut characteristics\n", + "\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Voltage regulation at full-load 0.8 pf lagging is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage regulation at full-load 0.8 pf lagging is 21.24 percent\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "VA = 2000.*1000\n", + "V_L = 11000.\n", + "V_ph = V_L/math.sqrt(3)\n", + "R_a = 0.3\n", + "X_s = 5. \t\t\t#armature resistance and synchronous reactance\n", + "\n", + "# Calculations\n", + "#case (i)\n", + "phi = math.acos(0.8) \t\t\t#lagging\n", + "I_L = VA/(math.sqrt(3)*V_L) \n", + "I_a = I_L\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)+ I_a*X_s)**2)\n", + "\n", + "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", + "#we get V_ph**2 -579.4455 V_ph -44653301.91 = 0\n", + "p = [1, -579.4455, -44653301.91]\n", + "ans = roots(p)\n", + "V_ph = ans[0] \t\t#second root is ignored as its -ve\n", + "print 'Terminal voltage is %.4f V'%(V_ph)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Terminal voltage is 6978.3131 V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page no : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "R_a = 0.6\n", + "X_s = 6. \t\t\t#armature resistance and synchronous reactance per phase\n", + "E_L = 6599.\n", + "E_ph = E_L/math.sqrt(3)\n", + "I_L = 180.\n", + "I_a = I_L\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "# using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2 +(V_ph*math.sin(phi)+ I_a*X_s)**2) and solving for V_ph\n", + "p = [1 ,1135.83, -13338836.49]\n", + "ans = roots(p)\n", + "V_ph = ans[1]\n", + "V_L = V_ph*math.sqrt(3)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "phi = math.acos(0.9)\n", + "theta = math.atan((I_a*X_s+V_ph*math.sin(phi) )/(E_ph))\n", + "delta = theta-phi\n", + "print 'i)0.9 laggingTerminal voltage is %.2f VVoltage regulation is %.2f percentLoad angle is %.2f degrees'%(V_ph*math.sqrt(3),regulation,delta*180/math.pi)\n", + "\n", + "#part(ii)\n", + "phi_2 = math.acos(0.8)\n", + "p = [1, -941.53, -11399574.87]\n", + "ans = roots(p) \n", + "V_ph = ans[0] \t\t\t#second root is ignored as its -ve\n", + "V_L = V_ph*math.sqrt(3)\n", + "regulation2 = 100*(E_ph-V_ph)/V_ph\n", + "delta_2 = math.asin( (math.tan(phi)*(V_ph*math.cos(phi_2)+I_a*R_a) -I_a*X_s )/E_ph )\n", + "print 'ii)0.8 leadingTerminal voltage is %.2f VVoltage regulation is %.2f percentLoad angle is %.2f degrees'%(V_L,regulation2,delta_2*180/math.pi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)0.9 laggingTerminal voltage is 5418.22 VVoltage regulation is 21.79 percentLoad angle is 6.83 degrees\n", + "ii)0.8 leadingTerminal voltage is 6719.93 VVoltage regulation is -1.80 percentLoad angle is 7.17 degrees\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page no : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_ph = 2000.\n", + "R_a = 0.8\n", + "I_sc = 100.\n", + "I_a = I_sc\n", + "V_OC = 500.\n", + "I_f = 2.5\n", + "Z_s = V_OC/I_sc\n", + "\n", + "X_s = math.sqrt(Z_s**2- R_a**2)\n", + "I_a_FL = 100.\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "phi1 = math.acos(1) \t\t\t#and lagging\n", + "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", + "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", + "print 'Regulation at upf is %.2f percent'%(regulation1)\n", + "\n", + "#Part(ii)\n", + "phi2 = math.acos(0.8) \n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2)\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'Regulation at 0.8 leading pf is %.2f percent'%(regulation2)\n", + "\n", + "#Part(iii)\n", + "phi3 = math.acos(0.71) \n", + "E_ph3 = math.sqrt((V_ph*math.cos(phi3)+I_a*R_a)**2+(V_ph*math.sin(phi3)+I_a*X_s)**2)\n", + "regulation3 = 100*(E_ph3-V_ph)/V_ph\n", + "print 'Regulation at 0.71 lagging pf is %.2f percent'%(regulation3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at upf is 6.89 percent\n", + "Regulation at 0.8 leading pf is -8.88 percent\n", + "Regulation at 0.71 lagging pf is 21.11 percent\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page no : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 600.\n", + "VA = 60.*10**3\n", + "I_sc = 210.\n", + "V_oc = 480.\n", + "I_f = 10.\n", + "R_a = 0.2\n", + "\n", + "I = VA/V \t\t\t#VA = V*I and alternator is math.single phase\n", + "I_a = I\n", + "\n", + "# Calculations and Results\n", + "Z_s = V_oc/I_sc \t\t\t#Synchronous Impedance\n", + "X_s = math.sqrt(Z_s**2-R_a**2) \t\t\t#SYnchronous reactance\n", + "print 'Synchronous impedances is %f ohms and synchronous reactance is %f ohms'%(Z_s,X_s)\n", + "\n", + "#PART (i)\n", + "phi1 = math.acos(0.8) \t\t\t#and lagging\n", + "E1 = math.sqrt((V*math.cos(phi1)+I_a*R_a)**2+(V*math.sin(phi1)+I_a*X_s)**2) \t\t\t#plus sign for lagging power factor\n", + "regulation1 = 100*(E1-V)/V\n", + "print 'Regulation at 0.8 lagging pf is %.2f percent '%(regulation1 )\n", + "\n", + "#PART (ii)\n", + "phi2 = math.acos(1) \n", + "E2 = math.sqrt((V*math.cos(phi2)+I_a*R_a)**2+(V*math.sin(phi2)+I_a*X_s)**2) \n", + "regulation2 = 100*(E2-V)/V\n", + "print 'Regulation at UNITY pf is %.2f percent '%(regulation2 )\n", + "\n", + "#PART (iii)\n", + "phi3 = math.acos(0.6) \t\t\t#and leading \n", + "E3 = math.sqrt((V*math.cos(phi3)+I_a*R_a)**2+(V*math.sin(phi3)-I_a*X_s)**2) \t\t\t#minus sign for leading power factor\n", + "regulation3 = 100*(E3-V)/V\n", + "print 'Regulation at 0.6 leading pf is %.2f percent '%(regulation3 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronous impedances is 2.285714 ohms and synchronous reactance is 2.276947 ohms\n", + "Regulation at 0.8 lagging pf is 28.60 percent \n", + "Regulation at UNITY pf is 10.08 percent \n", + "Regulation at 0.6 leading pf is -23.98 percent \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page no : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3300.\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_a = 100.\n", + "I_f = 5.\n", + "V_OC_line = 900. \n", + "V_OC_ph = V_OC_line/math.sqrt(3) \n", + "R_a = 0.8 \t\t\t#armature resistance\n", + "I_aph = I_a\n", + "Z_s = V_OC_ph/I_aph\n", + "X_s = math.sqrt(Z_s**2-R_a**2) \t\t\t#synchronous reactance\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "phi1 = math.acos(0.8) \t\t\t#and lagging\n", + "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", + "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", + "print 'Regulation at 0.8 lagging is %.2f percent'%(regulation1)\n", + "\n", + "#Part(ii)\n", + "phi2 = math.acos(0.8) \t\t\t#and leading\n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)-I_a*X_s)**2)\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'Regulation at 0.8 leading pf is %.2f percent'%(regulation2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at 0.8 lagging is 21.03 percent\n", + "Regulation at 0.8 leading pf is -9.55 percent\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page no : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 13500.\n", + "R_a = 1.5 \n", + "X_s = 30. \t\t\t#armature resistance and synchronous reactance\n", + "V_ph = V_L/math.sqrt(3)\n", + "\n", + "# Calculations and Results\n", + "#CASE 1\n", + "phi1 = math.acos(0.8)\n", + "P_out = 1280*10**3\n", + "I_L = P_out/ (math.sqrt(3)*V_L*math.cos(phi1) ) \t\t\t#because P_out = math.sqrt(3)*V_L*I_L*math.cos(phi)\n", + "\n", + "I_a = I_L\n", + "E_ph = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)+I_a*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'Regulation at 0.8 lagging power factor is %.2f percent'%(regulation)\n", + "\n", + "#Case 2\n", + "phi2 = math.acos(1)\n", + "I_L = P_out/ (math.sqrt(3)*V_L*math.cos(phi2) ) \t\t\t#because P_out = math.sqrt(3)*V_L*I_L*math.cos(phi)\n", + "\n", + "I_a = I_L\n", + "E_ph = math.sqrt((V_ph*math.cos(phi2)+I_a*R_a)**2+(V_ph*math.sin(phi2)+I_a*X_s)**2)\n", + "regulation2 = 100*(E_ph-V_ph)/V_ph\n", + "print 'Regulation at unity power factor is %.2f percent'%(regulation2)\n", + "\n", + "#case 3\n", + "phi3 = math.acos(0.8)\n", + "I_L = P_out/ (math.sqrt(3)*V_L*math.cos(phi3) ) \t\t\t#because P_out = math.sqrt(3)*V_L*I_L*math.cos(phi)\n", + "I_a = I_L\n", + "E_ph = math.sqrt((V_ph*math.cos(phi3)+I_a*R_a)**2+(V_ph*math.sin(phi3)-I_a*X_s)**2)\t\t\t# minus sign in the second bracket beacuse of leading pf\n", + "regulation3 = 100*(E_ph-V_ph)/V_ph\n", + "print 'Regulation at 0.8 leading power factor is %.2f percent'%(regulation3)\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at 0.8 lagging power factor is 18.60 percent\n", + "Regulation at unity power factor is 3.23 percent\n", + "Regulation at 0.8 leading power factor is -11.99 percent\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page no : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 11.*10**3\n", + "VA_rating = 10.**6\n", + "R_a = 2.2 \t\t\t#alternator resistance\n", + "phi = math.acos(0.8)\n", + "\n", + "# Calculations\n", + "I_L = VA_rating/(math.sqrt(3)*V_L)\t\t\t#VA = math.sqrt(3)V_L*I_L\n", + "I_a = I_L\n", + "V_ph = V_L/math.sqrt(3)\n", + "regulation = 24.\n", + "\n", + "E_ph = ((regulation/100)+1)*V_ph \t\t\t# because regulation = 100*(E_ph-V_ph)/V_ph\n", + "#using E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*X_s)**2)\n", + "X_s = (math.sqrt(E_ph**2-((V_ph*math.cos(phi)+I_a*R_a)**2))-V_ph*math.sin(phi))*(1/I_a)\n", + "\n", + "phi1 = math.acos(0.8)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi1)+I_a*R_a)**2+(V_ph*math.sin(phi1)-I_a*X_s)**2)\n", + "regulation1 = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Regulation at 0.8 leading power factor is %.2f percent'%(regulation1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at 0.8 leading power factor is -13.90 percent\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page no : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 220.\n", + "VA = 100.*10**3\n", + "R_a = 0.1 \t\t\t#effective resistacne of alternator\n", + "X_a = 0.5 \t\t\t#leakage reactance\n", + "X_ar = 2*X_a\n", + "\n", + "Z_s = complex(R_a,X_a+X_ar)\n", + "\n", + "# Calculations and Results\n", + "#Part(1)\n", + "phi = math.acos(0.4)\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_L = VA/(math.sqrt(3)*V_L)\t\t\t#VA = math.sqrt(3)*V_L*I_L\n", + "I_a = I_L\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*(X_a+X_ar))**2)\n", + "print 'i)Required noload voltage is %.3f V'%(E_ph)\n", + "\n", + "#Part(2)\n", + "V_ph2 = 0\n", + "E_ph2 = math.sqrt((V_ph2*math.cos(phi)+I_a*R_a)**2+(V_ph2*math.sin(phi)+I_a*(X_a+X_ar))**2)\n", + "print 'ii)Required noload voltage is %.3f V'%(E_ph2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Required noload voltage is 515.848 V\n", + "ii)Required noload voltage is 394.522 V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page no : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 2000.\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 1000.*10**3\n", + "I_L = VA/(math.sqrt(3)*V_L) \t\t\t#because VA = math.sqrt(3)*V_L*I_L\n", + "I_aph = I_L\n", + "\n", + "I_f = 28.5\t\t\t#for this I_aph = 288.67513 as obtained from SCC graph\n", + "V_oc_ph = 1060.\t\t\t#for I_f = 28.5 as obtained fromOCC graph\n", + "Z_s = V_oc_ph/I_aph\n", + "R_a = 0.2 \t\t\t#armature effective resistance\n", + "X_s = math.sqrt( Z_s**2-R_a**2 )\n", + "\n", + "# Calculations and Results\n", + "#Part(i)\n", + "phi1 = math.acos(0.8)\t\t\t#lagging\n", + "E_ph1 = math.sqrt((V_ph*math.cos(phi1)+I_aph*R_a)**2+(V_ph*math.sin(phi1)+I_aph*X_s)**2)\n", + "regulation1 = 100*(E_ph1-V_ph)/V_ph\n", + "print \"i)Full-load percentage regulation at 0.8 pf lagging is %.2f percent\"%(regulation1)\n", + "\n", + "#Part(ii)\n", + "phi2 = math.acos(0.8)\t\t\t#leading\n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_aph*R_a)**2+(V_ph*math.sin(phi2)-I_aph*X_s)**2)\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print \"ii)Full-load percentage regulation at 0.8 pf leading is %.2f percent\"%(regulation2)\n", + "print 'Note that the answer mismatches because of calculation mistake done in the last step of part 1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Full-load percentage regulation at 0.8 pf lagging is 73.86 percent\n", + "ii)Full-load percentage regulation at 0.8 pf leading is -9.29 percent\n", + "Note that the answer mismatches because of calculation mistake done in the last step of part 1\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3300.\n", + "VA = 200.*10**3\n", + "R_a = 0.6\n", + "X_s = 6.\t\t\t#armature resistance and synchronous reactance\n", + "\n", + "# Calculations\n", + "I_L = VA/(math.sqrt(3)*V_L)\t\t\t#VA = math.sqrt(3)V_L*I_L\n", + "I_a = I_L\n", + "V_ph = V_L/math.sqrt(3)\n", + "phi = math.acos(0.8)\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_a*R_a)**2+(V_ph*math.sin(phi)+I_a*X_s)**2)\n", + "\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "\n", + "# Results\n", + "print 'Regulation at 0.8 lagging power factor is %.3f percent'%(regulation)\n", + "print ' Note : Regulation is positive for lagging power factor loads'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulation at 0.8 lagging power factor is 7.802 percent\n", + " Note : Regulation is positive for lagging power factor loads\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page no : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 2300. \n", + "V_ph = V_L/math.sqrt(3)\n", + "f = 50.\n", + "R_a = 0.2 \t\t\t#armature resistance\n", + "I_sc = 150.\n", + "V_OC_line = 780. \n", + "V_OC_ph = V_OC_line/math.sqrt(3)\n", + "\n", + "Z_s = V_OC_ph/I_sc\n", + "X_s = math.sqrt(Z_s**2 - R_a**2)\n", + "I_aph = 25 \n", + "I_aFL = I_aph\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "phi = math.acos(0.8) \t\t\t#lag\n", + "E_ph = math.sqrt((V_ph*math.cos(phi)+I_aph*R_a)**2 +(V_ph*math.sin(phi)+ I_aph*X_s)**2)\n", + "regulation = 100*(E_ph-V_ph)/V_ph\n", + "print 'Voltage regulation at 0.8 pf lagging is %.3f percent'%(regulation)\n", + "\n", + "#part(ii)\n", + "phi2 = math.acos(0.8) \t\t\t#lead\n", + "E_ph2 = math.sqrt((V_ph*math.cos(phi2)+I_aph*R_a)**2 +(V_ph*math.sin(phi2)- I_aph*X_s)**2 )\n", + "regulation2 = 100*(E_ph2-V_ph)/V_ph\n", + "print 'Voltage regulation at 0.8 pf leading is %.3f percent'%(regulation2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage regulation at 0.8 pf lagging is 3.774 percent\n", + "Voltage regulation at 0.8 pf leading is -2.967 percent\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch6_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch6_2.ipynb new file mode 100755 index 00000000..5cc8495d --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch6_2.ipynb @@ -0,0 +1,2419 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:65f8e8657a6631c1a9d4f4644c0ba8ed136071b32d61999a56bf9cfb9b9555d8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Synchronization and Parallel Operation of Alternators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " \n", + "Example 6.2 Page no : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "X_d = 0.7 \n", + "X_q = 0.4 \t\t\t#direct and quadrature axis synchronous reactance p.u.\n", + "R_a = 0\n", + "phi = math.acos(0.8) \t\t\t#Lag\n", + "\n", + "V_t = 1. \t\t\t#assumed rated terminal Voltage \n", + "I_a = 1. \t\t\t#Full-load armature current\n", + "\n", + "# Calculations\n", + "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", + "delta = psi-phi\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "\n", + "# Results\n", + "print 'Total e.m.f induced on open circuit is %.4f p.u.'%(E_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total e.m.f induced on open circuit is 1.5149 p.u.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page no : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp((math.pi*Theeeta/180.)*1j);\n", + "\n", + "# Variables\n", + "Z1 = complex(0,3) \t\t\t#impedance of alternator 1\n", + "Z2 = complex(0,4) \t\t\t#impedance of alternator 2\n", + "Z = 6. #load\n", + "\n", + "E1 = p2z(220,0) \t\t\t#induced emf vector on no load\n", + "E2 = p2z(220,10)\t\t\t#induced emf vector on no load\n", + "\n", + "# Calculations and Results\n", + "I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)\n", + "I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)\n", + "\n", + "phi1 = math.degrees(math.atan(I1.imag/I1.real)) \t\t\t#Phasemag returns the angle of complex number in degrees\n", + "phi2 = math.degrees(math.atan(I2.imag/I2.real)) \t\t\t#Phasemag returns the angle of complex number in degrees\n", + "\n", + "I = I1+I2\n", + "V = I*Z \t\t\t#Terminal voltage\n", + "print 'i) Terminal voltage is %.1f volts at %.2f degrees'%(abs(V),math.degrees(math.atan(V.imag/V.real)))\n", + "print 'ii) Currents are %.2f A at %.2f degrees and %.2f A at %.2f degrees \\\n", + "\\nTotal current is %.2f A at %.2f degrees '%(abs(I1),math.degrees(math.atan(I1.imag/I1.real)),\\\n", + " abs(I2),math.degrees(math.atan(I2.imag/I2.real)),\\\n", + " abs(I),math.degrees(math.atan(I.imag/I.real)))\n", + "\n", + "P1 = abs(V)*abs(I1)*math.cos(math.radians(phi1))\n", + "P2 = abs(V)*abs(I2)*math.cos(math.radians(phi2))\n", + "print 'iii)Power delivered is %.2f watts and %.2f watts'%(P1,P2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Terminal voltage is 210.7 volts at -11.66 degrees\n", + "ii) Currents are 14.91 A at -17.71 degrees and 20.36 A at -7.24 degrees \n", + "Total current is 35.12 A at -11.66 degrees \n", + "iii)Power delivered is 2992.46 watts and 4257.11 watts\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page no : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_l = 10000.\n", + "V_ph = V_l/math.sqrt(3)\n", + "VA = 10.*10**6\n", + "I_FL = VA/(V_l*math.sqrt(3)) \t\t\t#Current at full laod\n", + "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", + "\n", + "# Calculations\n", + "X_s = IX_s/I_FL\n", + "N_s = 1500.\n", + "f = 50.\n", + "P = 120*f/N_s \t\t\t#poles\n", + "\n", + "delta_dash_mech = math.pi/180 \t\t\t#phase print lacement in degree mechanical\n", + "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", + "E = V_ph \t\t\t#math.since alternator is on no-load\n", + "P_SY = delta_dash_elec*E**2/X_s \t\t\t#Synchronous Power\n", + "P_SY_3ph = P_SY*3 \t\t\t#For 3 phases\n", + "\n", + "# Results\n", + "print 'Synchronising Power of armature is %.3f kW.\\\n", + "\\nSynchronising Power for 3 phase is %.3f kW'%(P_SY*10**-3,P_SY_3ph*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising Power of armature is 581.776 kW.\n", + "Synchronising Power for 3 phase is 1745.329 kW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page no : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "# Variables\n", + "V_L = 6.6*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 3.*10**6\n", + "I_FL = VA/(V_L*math.sqrt(3)) \t\t\t#full load current \n", + "P = 8.\n", + "f = 50. \t\t\t#poles and frequency\n", + "\n", + "X_s = complex(0,2.9)\t\t\t#X_s = 2.9\n", + "delta_dash_mech = math.pi/180\n", + "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "E = V_ph\n", + "P_SY = delta_dash_elec*E**2/abs(X_s) \t\t\t#Synchronous Power per phase\n", + "P_SY_3ph = P_SY*3 \t\t\t#For 3 phases\n", + "print 'i) Synchronising power at no load is %.3f kW'%(P_SY*10**-3)\n", + "print ' Total Synchronising power at no load is %.2f kW'%(P_SY_3ph*10**-3)\n", + "\n", + "N_s = 120*f/P \t\t\t#in rpm\n", + "n_s = (N_s)/60 \t\t\t#in rps\n", + "T_SY = P_SY_3ph/(2*math.pi*n_s)\n", + "print 'Synchronous torque per mechanical degree of phase print lacement is %.2f * 10**3 N-m'%(T_SY*10**-3)\n", + "\n", + "#part(ii)\n", + "phi = math.acos(math.radians(0.85))\n", + "I = p2z(I_FL,0)\n", + "V = p2z(V_ph,phi)\n", + "\n", + "E = V+I*X_s\n", + "#E leads I by phasemag(E). V leads I by phasemag(V)\n", + "\n", + "delta = (math.pi/180)* (math.atan(E.imag/E.real)-math.atan(V.imag/V.real) ) \t\t\t#power angle in radians\n", + "P_SY2 = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)\n", + "\n", + "P_SY_total_2 = 3*P_SY2\n", + "#n_s = T_SY/(P_SY/(2*math.pi) ) \t\t\t#because T_SY = P_SY/(2*math.pi*n_s)\n", + "print 'ii)Total Synchronising power is %.0f kW'%(P_SY_total_2*10**-3)\n", + "\n", + "T_SY2 = P_SY_total_2/(2*math.pi*n_s)\n", + "print 'Synchronising torque is %.2f * 10**3 N-m'%(T_SY2/1000)\n", + "\n", + "# note : book answer is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Synchronising power at no load is 349.547 kW\n", + " Total Synchronising power at no load is 1048.64 kW\n", + "Synchronous torque per mechanical degree of phase print lacement is 13.35 * 10**3 N-m\n", + "ii)Total Synchronising power is 1074 kW\n", + "Synchronising torque is 13.68 * 10**3 N-m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page no : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.)\n", + "\n", + "# Variables\n", + "V_l = 10.*10**3\n", + "V_ph = V_l/math.sqrt(3)\n", + "R_a = 0.4\n", + "Z = complex(R_a,6)\n", + "I_a = p2z(300,-math.acos(math.radians(0.8)))\n", + "E = V_ph+I_a*Z\n", + "\n", + "# Calculations\n", + "phi = math.acos(0.8)\n", + "alternator_op_ph = V_ph*abs(I_a)*math.cos(phi) \t\t\t#Power delivered to infinite bus per phase\n", + "\n", + "#Power deliered to the altrernator = Power delivewred to bus bar + I**2*R losses in armature\n", + "alternator_power = alternator_op_ph+ abs(I_a)**2*R_a\n", + "\n", + "#this power developed remains constant.change pf to 1 and calculate corresponding armature current\n", + "#alternator_power = V_ph*I_a1*math.cos(phi1)+I_a1**2*0.4\n", + "#solve the quadratic equation 0.4 I_a1**2+5773.50 I_a1- 1421640 = 0\n", + "I_a1 = (-1*V_ph+math.sqrt(V_ph**2-4*R_a*-1*alternator_power))/(2*R_a)\n", + "\n", + "#also as follows \n", + "E1 = V_ph+I_a1*Z\n", + "decrease = 100*(abs(E)-abs(E1))/abs(E)\n", + "\n", + "# Results\n", + "print 'Percentage decrease in induced e.m.f is %.1f percent'%(decrease)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage decrease in induced e.m.f is 2.6 percent\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page no : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Line PQ for Altermnator 1 and PR for alternaator 2.AB is at frequency x from P where total load is 3000 kW\n", + "\n", + "# Variables\n", + "QC = 2000.\n", + "PS = 2.5\n", + "#PC = x\n", + "TR = 2000.\n", + "PT = 2.\n", + "\n", + "# Calculations and Results\n", + "#using similarity of triangles PAC and PQS\n", + "AC_by_PC = (QC/PS)\t\t\t# because (AC/QC) = (PC/PS)\n", + "#using similarity of triangles PCB and PTR\n", + "CB_by_PC = (TR/PT) \t\t\t# because (CB/TR) = (PC/PT)\n", + "\n", + "AC_by_x = AC_by_PC \t\t\t#which implies AC = 12.5*x\n", + "CB_by_x = CB_by_PC \t\t\t#which implies CB = 16.67*x\n", + "\n", + "AC_plus_CB = 3000. \t\t\t#total load at the frequency at P is 30 kW\n", + "x = AC_plus_CB/(AC_by_x + CB_by_x)\n", + "AC = AC_by_x * x\n", + "CB = CB_by_x * x \n", + "frequency = 50-x\n", + "print 'Loads shared by alternator 1 and 2 are %.2f kW and %.2f kW respectively'%(AC,CB)\n", + "\n", + "#construction for max load: RT is extended to cut PQ at X.\n", + "QS = 2000.\n", + "RT = 2000. \t\t\t#see figure\n", + "XT = QS*(PT/PS)\n", + "RX = RT+XT \t\t\t#maximum load\n", + "\n", + "print 'Maximum load is %.0f kW'%(RX)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loads shared by alternator 1 and 2 are 1333.33 kW and 1666.67 kW respectively\n", + "Maximum load is 3600 kW\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page no : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P_out = 1500.*10**3\n", + "V_L = 11000.\n", + "phi = math.acos(0.8)\n", + "I_L = P_out/(math.sqrt(3)*V_L*math.cos(phi))\n", + "\n", + "I_L_actv = I_L*math.cos(phi) \t\t\t#wattful or active component of current\n", + "I_L_reactive = I_L*math.sin(phi) \t\t\t#wattless or reactive component of current\n", + "\n", + "# Calculations and Results\n", + "I_each = I_L/2 \t\t\t#in identical conditions\n", + "I_arm1 = 45. \t\t\t#given\n", + "I_1_reactive = math.sqrt(I_arm1**2-39.364**2 ) \t\t\t#from the power triangle \n", + "I_2_reactive = 59.046-21.80\n", + "I_a_2 = math.sqrt( 39.364**2 + I_2_reactive**2 ) \t\t\t#required armature current of 2nd alternator\n", + "print 'Required armature current of second alternator is %.4f A'%(I_a_2)\n", + "#power factors of 2 machines\n", + "cos_phi1 = 39.364/45 \n", + "cos_phi2 = 39.364/54.1921\n", + "\n", + "print 'Power factors are %.4f lagging and %.4f lagging'%(cos_phi1,cos_phi2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required armature current of second alternator is 54.1921 A\n", + "Power factors are 0.8748 lagging and 0.7264 lagging\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page no : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Line AB for Altermnator 1 and AC for alternator 2.AF is at frequency x measured from A where total load is 3000 kW\n", + "# Variables\n", + "BO = 2000.\n", + "AO = 5.\t\t\t#AF = x\n", + "DC = 2000.\n", + "AD = 3.\n", + "#AF = x\n", + "\n", + "# Calculations\n", + "#using similarity of triangles AEF and ABO\n", + "EF_by_AF = (BO/AO)\t\t\t# because (EF/BO) = (AF/AO)\n", + "#using similarity of triangles AFG and ADC\n", + "FG_by_AF = (DC/AD) \t\t\t#because (FG/DC) = (AF/AD)\n", + "\n", + "EF_by_x = EF_by_AF \t\t\t#which implies EF = 400*x\n", + "FG_by_x = FG_by_AF \t\t\t#which implies FG = 666.67*x\n", + "\n", + "EF_plus_FG = 3000 \t\t\t#total load at the frequency at P is 3000 kW\n", + "x = EF_plus_FG/(EF_by_x + FG_by_x)\n", + "EF = (BO/AO)*x\n", + "FG = (DC/AD)*x \n", + "\n", + "# Results\n", + "print 'Loads shared by machine 1 and 2 are %.0f kW and %.0f kW respectively'%(EF,FG)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loads shared by machine 1 and 2 are 1125 kW and 1875 kW respectively\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "# Variables\n", + "V_l = 6000.\n", + "V_ph = V_l/math.sqrt(3)\n", + "VA = 2000.*10**3\n", + "I_FL = VA/(V_l*math.sqrt(3))\n", + "X_s = complex(0,6) \t\t\t#synchronous reactance\n", + "P = 8.\n", + "f = 50.\n", + "\n", + "delta_mech = math.pi/180 \t\t\t#phase print lacemant in degree mechanical \n", + "#phase print lacemant in degree electrical\n", + "delta_elec = delta_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", + "\n", + "phi = math.acos(math.radians(0.8))\n", + "V = p2z(V_ph,phi)\n", + "E = V+I_FL*X_s\n", + "#E leads I by phasemag(E). V leads I by phasemag(V)\n", + "\n", + "# Calculations and Results\n", + "delta = (math.pi/180)* (math.atan(E.imag/E.real)-(math.atan(V.imag/V.real ) ) ) \t\t\t#power angle in radians\n", + "P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_elec)/abs(X_s) \t\t\t#Synchronising power\n", + "P_SY_total = 3*P_SY \t\t\t#totla Synchronising power \n", + "print 'Total Synchronising power is %.3f kW'%(10**-3*P_SY_total)\n", + "\n", + "N_s = 120*f/P \t\t\t#in rpm\n", + "n_s = (N_s)/60 \t\t\t#in rps\n", + "T_SY = P_SY_total/(2*math.pi*n_s)\n", + "print 'Synchronising torque is %.0f N-m'%(T_SY)\n", + "\n", + "# note : book answer it seems wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Synchronising power is 444.753 kW\n", + "Synchronising torque is 5663 N-m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page no : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "# Variables\n", + "V_l = 3300.\n", + "V_ph = V_l/math.sqrt(3)\n", + "VA = 3*10.**6\n", + "I_FL = VA/(V_l*math.sqrt(3))\n", + "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = complex(0,IX_s/I_FL) \t\t\t#synchronous reactance\n", + "N_s = 1000. \t\t\t#in rpm\n", + "P = 6.\n", + "f = 50.\n", + "\n", + "# Calculations and Results\n", + "delta_dash_mech = math.pi/180\n", + "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", + "\n", + "I = I_FL\n", + "phi = math.acos(math.radians(0.8))\n", + "V = p2z(V_ph,phi)\n", + "E = V+I*X_s\n", + "#E leads I by phasemag(E). V leads I by phasemag(V)\n", + "\n", + "delta = (math.pi/180)* (math.atan(E.imag/E.real)-math.atan(V.imag/V.real) ) \t\t\t#power angle in radians\n", + "P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase\n", + "print 'Synchronising power is %.3f kW'%(10**-3*P_SY)\n", + "P_SY_total = 3*P_SY \t\t\t#Total Synchronising power\n", + "\n", + "N_s = 120*f/P \t\t\t#in rpm\n", + "n_s = (N_s)/60 \t\t\t#in rps\n", + "T_SY = P_SY_total/(2*math.pi*n_s)\n", + "print 'Synchronising torque is %.0f N-m'%(T_SY)\n", + "\n", + "print 'Answer mismatches due to approximation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power is 217.160 kW\n", + "Synchronising torque is 6221 N-m\n", + "Answer mismatches due to approximation\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page no : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_l = 3300.\n", + "V_ph = V_l/math.sqrt(3)\n", + "VA = 3*10.**6\n", + "I_FL = VA/(V_l*math.sqrt(3))\n", + "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = complex(0,IX_s/I_FL) \t\t\t#synchronous reactance\n", + "N_s = 1000.\n", + "P = 6.\n", + "f = 50.\n", + "\n", + "delta_dash_mech = math.pi/180 \t\t\t#phase print lacement in degree mechanical\n", + "#phase print lacement in degree electrical\n", + "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", + "\n", + "# Calculations and Results\n", + "E = V_ph\n", + "Z_s = X_s \t\t\t#math.since R = 0\n", + "P_SY = abs(E)*abs(V_ph)*delta_dash_elec/abs(Z_s) \t\t\t#Synchronising power per phase\n", + "print 'Synchronising power is %.3f kW'%(10**-3*P_SY)\n", + "P_SY_total = 3*P_SY \t\t\t#Total Synchronising power\n", + "print '3 phase Synchronising power is %.3f kW'%(10**-3*P_SY_total)\n", + "\n", + "N_s = 120*f/P \t\t\t#in rpm\n", + "n_s = (N_s)/60 \t\t\t#in rps\n", + "T_SY = P_SY_total/(2*math.pi*n_s)\n", + "print 'Synchronising torque is %.0f N-m'%(T_SY)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power is 261.799 kW\n", + "3 phase Synchronising power is 785.398 kW\n", + "Synchronising torque is 7500 N-m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page no : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 11.*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 700.*10**3\n", + "I_FL = VA/(math.sqrt(3)*V_L) \t\t\t#full load current\n", + "IR_a = (1.5/100)*V_ph \t\t\t#product of I and R_a\n", + "R_a = IR_a/I_FL\n", + "IX_s = (14./100)*V_ph \t\t\t# product of I and X_s\n", + "X_s = IX_s/I_FL \t\t\t#synchronous reactance\n", + "\n", + "# Calculations\n", + "#at full load and 0.8 pf\n", + "I = I_FL\n", + "phi = math.acos(0.8)\n", + "V_ph = complex(V_ph*math.cos(phi),V_ph*math.sin(phi)) \t\t\t#just introduced the angle\n", + "E_ph = math.sqrt( (abs(V_ph)*math.cos(phi)+ IR_a)**2+ (abs(V_ph)*math.sin(phi)+ IX_s)**2 )\n", + "\n", + "Poles = 4.\n", + "f = 50. \t\t\t#poles and frequency\n", + "delta = math.asin( (abs(V_ph)*math.sin(phi)+IX_s)/E_ph) -phi\n", + "delta_dash_mech = (math.pi/180) \t\t\t#print lacement in degree mechanical\n", + "\t\t\t#print lacement in degree electrical\n", + "delta_dash_elec = delta_dash_mech*(Poles/2)\n", + "P_SY = abs(E_ph)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/X_s \t\t\t#Synchronising power per phase \n", + "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", + "\n", + "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", + "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", + "\n", + "# Results\n", + "print 'Synchronising power is %.2fkW'%(P_SY_total/1000)\n", + "print 'Synchronising torque is %.2f N-m'%(T_SY)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power is 191.25kW\n", + "Synchronising torque is 1217.53 N-m\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page no : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_l = 9.*10**3\n", + "V_ph = V_l/math.sqrt(3)\n", + "VA = 5.5*10**6\n", + "I_FL = VA/(V_l*math.sqrt(3))\n", + "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = complex(0,IX_s/I_FL) \t\t\t#synchronous reactance\n", + "N_s = 1500. \t\t\t#in rpm\n", + "n_s = N_s/60 \t\t\t#in rps\n", + "f = 50.\n", + "P = 120.*f/N_s \t\t\t#frequency and pole\n", + "\n", + "# Calculations\n", + "delta_dash_mech = math.pi/180 \t\t\t#print lacemnt in degree mechanical \n", + "#print lacemnt in degree electrical\n", + "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#P/2 is pole pairs(and not poles)\n", + "\n", + "E = V_ph\n", + "P_SY = abs(E)*abs(V_ph)*delta_dash_elec/abs(X_s) \t\t\t#Synchronising power per phase\n", + "P_SY_total = 3*P_SY \t\t\t#Total Synchronising power\n", + "\n", + "T_SY = P_SY_total/(2*math.pi*n_s)\n", + "\n", + "# Results\n", + "print 'Synchronising torque is %.2f N-m'%(T_SY)\n", + "print 'Answer mismatches due to approximation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising torque is 4888.89 N-m\n", + "Answer mismatches due to approximation\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page no : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6.*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 2000.*10**3\n", + "I_FL = VA/(math.sqrt(3)*V_L) \n", + "I = I_FL\n", + "\n", + "# Calculations\n", + "X_s = 1.2\n", + "R_a = 0.01 \t\t\t#both per unit\n", + "IR_a = (1/100)*V_ph \t\t\t#product of I and R_a\n", + "R_a = IR_a/I_FL\n", + "IX_s = (120/100)*V_ph \t\t\t#product of I and X_s\n", + "#IX_s = (12/100)*V_ph \t\t\t# this is the mistake made in the textbook\n", + "X_s = IX_s/I_FL\n", + "\n", + "#at full load and 0.8 pf\n", + "phi = math.acos(0.8)\n", + "#V_ph = complex(V_ph*math.cos(phi)V_ph*math.sin(phi)) \t\t\t#just introduced the angle\n", + "E_ph = math.sqrt( (abs(V_ph)*math.cos(phi)+ IR_a)**2+ (abs(V_ph)*math.sin(phi)+ IX_s)**2 )\n", + "Poles = 8\n", + "f = 50\n", + "\n", + "delta = math.asin( (abs(V_ph)*math.sin(phi)+IX_s)/E_ph) -phi\n", + "delta_dash_mech = (math.pi/180) \t\t\t#print lacemnt in degree mechanical \n", + "#print lacemnt in degree electrical\n", + "delta_dash_elec = delta_dash_mech*(Poles/2)\n", + "P_SY = abs(E_ph)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/X_s \t\t\t#Synchronising power per phase\n", + "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", + "\n", + "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", + "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", + "\n", + "# Results\n", + "print 'Synchronising power is %.2f kW'%(P_SY_total/1000)\n", + "print 'Synchronising torque is %.2f N-m'%(T_SY)\n", + "\n", + "print 'Note that answer obtained doesnt match with textbook due to the following reasons: \\\n", + "\\niIX_s is considered wrong in textbook.It should have been 4156.92instead of 415.692 To verify this use commented statement of IX_s line 13and notice that it matches with textbook ans then' \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power is 223.22 kW\n", + "Synchronising torque is 2960.56 N-m\n", + "Note that answer obtained doesnt match with textbook due to the following reasons: \n", + "iIX_s is considered wrong in textbook.It should have been 4156.92instead of 415.692 To verify this use commented statement of IX_s line 13and notice that it matches with textbook ans then\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page no : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "E = 11.*10**3/math.sqrt(3)\n", + "I_sc = 1000.\n", + "Pole = 2.\n", + "f = 50.\n", + "delta_dash_mech = 1*math.pi/180 \t\t\t#print lacemnt in degree mechanical \n", + "\n", + "# Calculations\n", + "#print lacemnt in degree electrical \n", + "delta_dash_elec = delta_dash_mech*(Pole/2)\n", + "P_SY = E*I_sc*delta_dash_mech \t\t\t#Synchronising power per phase\n", + "P_SY_total = P_SY*3 \t\t\t#total Synchronising power\n", + "\n", + "ns = 120*f/(60*Pole) \t\t\t#in r.p.s\n", + "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", + "\n", + "# Results\n", + "print 'Synchronising power is %.2f kW'%(P_SY_total/1000)\n", + "print 'Synchronising torque is %.2f N-m'%(T_SY)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power is 332.53 kW\n", + "Synchronising torque is 1058.48 N-m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page no : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Line PQ for Altermnator 1 and PR for alternaator 2.AB is at frequency x from P where total load is 30 MW\n", + "# Variables\n", + "QT = 25.\n", + "PT = 2.\n", + "#PC = x\n", + "SR = 25.\n", + "PS = 1.5\n", + "\n", + "# Calculations\n", + "#using similarity of triangles PAC and PQT\n", + "AC_by_PC = (QT/PT)\t\t\t# because (AC/QT) = (PC/PT)\n", + "#using similarity of triangles PCB and PSR\n", + "CB_by_PC = (SR/PS)\n", + "\n", + "AC_by_x = AC_by_PC \t\t\t#which implies AC = 12.5*x\n", + "CB_by_x = CB_by_PC \t\t\t#which implies CB = 16.67*x\n", + "\n", + "AC_plus_CB = 30 \t\t\t#total load at the frequency at P is 30 MW\n", + "x = AC_plus_CB/(AC_by_x + CB_by_x)\n", + "AC = 12.5*x\n", + "CB = 16.67*x \n", + "frequency = 50-x\n", + "\n", + "# Results\n", + "print 'Loads shared by alternator 1 and 2 are %.2f MW and %.2f MW respectively'%(AC,CB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loads shared by alternator 1 and 2 are 12.86 MW and 17.15 MW respectively\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 Page no : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "# Variables\n", + "load_total = 1600.*10**3\n", + "pf = 1/math.sqrt(2) \t\t\t#lag\n", + "V_L = 6600.\n", + "\n", + "# Calculations\n", + "I_L = p2z(load_total/(math.sqrt(3)*V_L*pf),-1*math.acos(math.radians(pf)) )\n", + "I_1 = p2z(90,-1*math.acos(math.radians(0.8)))\n", + "I_2 = I_L-I_1\n", + "phi = abs(math.atan(I_2.imag/I_2.real))\n", + "I_a = abs(I_2)\n", + "R_a = 1.05\n", + "X_s = 5 \t\t\t#resistance and synchronous reactance per phase\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_ph = math.sqrt( (V_ph*math.cos(phi)+I_a*R_a )**2 + ( V_ph*math.sin(phi)+I_a*X_s )**2 )\n", + "E_line = math.sqrt(3)*E_ph\n", + "\n", + "# Results\n", + "print 'Excitation of second alternator is %.2f V '%(E_line)\n", + "print ' The corresponding field current from the graph is about 310 A'\n", + "print 'Note: The answer obtained will differ from textbook answer because of higher degree of accuracy while storing I_2 and the improper rounding off of I_2 in the textbook'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excitation of second alternator is 6884.65 V \n", + " The corresponding field current from the graph is about 310 A\n", + "Note: The answer obtained will differ from textbook answer because of higher degree of accuracy while storing I_2 and the improper rounding off of I_2 in the textbook\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 Page no : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 10.*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 5.*10**6\n", + "I_FL = VA/(math.sqrt(3)*V_L) \t\t\t#full-load current\n", + "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = IX_s/I_FL \t\t\t#synchronous reactance\n", + "P = 4.\n", + "\n", + "# Calculations\n", + "delta_dash_mech = 1*(math.pi/180) \t\t\t#print lacement in degree mechanical \n", + "#print lacement in degree electrical\n", + "delta_dash_elec = delta_dash_mech*(P/2)\n", + "E = V_ph \t\t\t#at no load\n", + "P_SY = delta_dash_elec*E**2/X_s \t\t\t#Synchronising power per phase\n", + "P_SY_total = P_SY*3 \t\t\t#Total Synchronising power\n", + "\n", + "# Results\n", + "print 'Synchronising power per phase is %.2fkW \\\n", + "\\nTotal Synchronising power is %.2fkW '%(P_SY/1000,P_SY_total/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power per phase is 290.89kW \n", + "Total Synchronising power is 872.66kW \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20 Page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Power_total = 1.414 \t\t\t#per unit\n", + "V_L = 1. \t\t\t#per unit\n", + "phi_t = math.acos(0.707)\n", + "I_L_T = Power_total/(math.sqrt(3)*V_L*math.cos(phi_t)) \t\t\t#Total current\n", + "\n", + "# Calculations\n", + "#Current supplied by each alternator\n", + "I_1 = I_L_T/2\n", + "I_2 = I_1\n", + "V_ph = V_L/math.sqrt(3)\n", + "\n", + "phi = math.acos(0.707)\n", + "R_a = 0\n", + "X_s = 0.6 \t\t\t#resistacne and synchronous reactance\n", + "E_ph = math.sqrt( (V_ph*math.cos(phi)+ I_1*R_a)**2 + (V_ph*math.sin(phi)+I_1*X_s)**2 )\n", + "delta = math.atan((I_1*X_s+V_ph*math.sin(phi)) / (V_ph*math.cos(phi))) - phi \t\t\t#power angle\n", + "\n", + "# Results\n", + "print 'EMF is %.4f p.u. and power angle is %.2f degrees '%(E_ph,delta*180/math.pi)\n", + "print 'Following assumptions were made :'\n", + "print '1.Terminal or bus bar voltage at ppoint of connection is constant'\n", + "print '2.The alternators are identical and are initially equally excited'\n", + "print '3.The power supplied by prime movers is adjusted so that each machine carries half the load represented by external impedance Z = R+ j 2pifL %( where R and L are constant'\n", + "print '4.The stator resistance is negligible'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EMF is 0.8580 p.u. and power angle is 16.58 degrees \n", + "Following assumptions were made :\n", + "1.Terminal or bus bar voltage at ppoint of connection is constant\n", + "2.The alternators are identical and are initially equally excited\n", + "3.The power supplied by prime movers is adjusted so that each machine carries half the load represented by external impedance Z = R+ j 2pifL %( where R and L are constant\n", + "4.The stator resistance is negligible\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21 Page no : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_l = 480.\n", + "X_d = 0.1\n", + "X_q = 0.075\n", + "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "I_l = 1200.\n", + "I_ph = I_l/math.sqrt(3)\n", + "V_ph = V_l\n", + "V_t = V_l\n", + "I_a = I_ph\n", + "\n", + "# Calculations\n", + "phi = math.acos(0.8)\n", + "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", + "delta = psi-phi \n", + "\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "\n", + "# Results\n", + "print 'Excitation e.m.f is %.f V '%(E_f)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excitation e.m.f is 524 V \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "VA = 3.5*10**6\n", + "P = 32. \t\t\t#Poles\n", + "Power = 2.5*10**6 \t\t\t#In watts\n", + "V_l = 6.6*10**3\n", + "phi = math.acos(0.8)\n", + "I_l = Power/(V_l*math.cos(phi)*math.sqrt(3))\n", + "X_d = 9.6\n", + "X_q = 6.\n", + "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "\n", + "# Calculations\n", + "V_t = V_l/math.sqrt(3)\n", + "psi = math.atan( (V_t*math.sin(phi)+I_l*X_q)/(V_t*math.cos(phi)+I_l*R_a) )\n", + "delta = psi-phi\n", + "I_s = I_l\n", + "I_d = I_s*math.sin(psi)\n", + "I_q = I_s*math.cos(psi)\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "regulation = 100*(E_f-V_t)/V_t\n", + "\n", + "# Results\n", + "print 'percentage regulation is %.2f percent'%(regulation)\n", + "print 'Excitation emf = %.0f V'%(E_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage regulation is 50.85 percent\n", + "Excitation emf = 5748 V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23 Page no : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "X_d = 7.6\n", + "X_q = 4.5\n", + "R_a = 0.15 \t\t\t#armature resistance and synchronous reactance of directquadrature \n", + "axisV_l = 13.8*10**3\n", + "V_l = 13.8*10**3\n", + "V_t = V_l/math.sqrt(3)\n", + "phi = math.acos(0.8)\n", + "VA = 25*10**6\n", + "I_a = VA/(math.sqrt(3)*V_l)\n", + "psi = math.atan( (V_t*math.cos(phi)+I_a*X_q)/(V_t*math.sin(phi)+I_a*R_a) )\n", + "\n", + "# Calculations\n", + "delta = psi-phi\n", + "I_s = I_a\n", + "I_d = I_s*math.sin(psi)\n", + "I_q = I_s*math.cos(psi)\n", + "\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "regulation = 100*(E_f-V_t)/V_t\n", + "\n", + "# Results\n", + "print 'percentage regulation is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage regulation is 79.30 percent\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 Page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "X_d = 1.\n", + "X_q = 0.6\n", + "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "phi = math.acos(0.8) \t\t\t#lag\n", + "V_t = 1.\n", + "I_a = 1. \t\t\t#full load\n", + "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", + "\n", + "# Calculations\n", + "delta = psi-phi\n", + "I_s = I_a\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "regulation = 100*(E_f-V_t)/V_t\n", + "\n", + "# Results\n", + "print 'percentage regulation is %.2f percent'%(regulation)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage regulation is 77.50 percent\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25 Page no : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_a = 10.\n", + "phi = 20. \t\t\t#lag and degrees\n", + "V_t = 400.\n", + "X_d = 10.\n", + "X_q = 6.5\n", + "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "\n", + "# Calculations\n", + "psi = math.atan((V_t*math.sin(math.radians(phi))+I_a*X_q)/(V_t*math.cos(math.radians(phi))+I_a*R_a))\n", + "delta = math.degrees(psi)-phi\n", + "I_d = math.degrees(I_a*math.sin(math.radians(psi)))\n", + "I_q = (I_a*math.cos(psi))\n", + "\n", + "# Results\n", + "print 'Load angle is %.2f degrees '%(delta)\n", + "print 'I_d and I_q are %.4f A and %.4f A respectively '%(I_d,I_q )\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load angle is 8.23 degrees \n", + "I_d and I_q are 4.9272 A and 8.8105 A respectively \n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 Page no : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "X_d = 0.8\n", + "X_q = 0.5\n", + "R_a = 0.02 \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "\n", + "\t\t\t#case(i) lag\n", + "phi = math.acos(0.8)\n", + "V_t = 1\n", + "I_a = 1\t\t\t#full-load\n", + "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", + "delta = psi-phi\n", + "\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "regulation = 100*(E_f-V_t)/V_t\n", + "print 'percentage regulation at 0.8 pf lag is %.2f percent'%(regulation)\n", + "\n", + "\t\t\t#case(ii) lead\n", + "phi2 = -1*math.acos(0.8) \t\t\t#minus sign because of leading pf\n", + "psi2 = math.atan( (V_t*math.sin(phi2)+I_a*X_q)/(V_t*math.cos(phi2)+I_a*R_a) )\n", + "delta2 = psi2-phi2\n", + "\n", + "I_d2 = I_a*math.sin(psi2)\n", + "I_q2 = I_a*math.cos(psi2)\n", + "\n", + "E_f2 = V_t*math.cos(delta2)+I_d2*X_d+I_q2*R_a\n", + "regulation2 = 100*(E_f2-V_t)/V_t\n", + "print 'percentage regulation at 0.8 pf lead is %.f percent'%(regulation2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage regulation at 0.8 pf lag is 61.25 percent\n", + "percentage regulation at 0.8 pf lead is -21 percent\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 Page no : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,tan,arccos\n", + "\n", + "# Variables\n", + "kW = array([800,500,1000,600])\n", + "cosphi = array([1,0.9,0.8,0.9])\n", + "tanphi = tan(arccos(cosphi))\n", + "kVAR = kW*tanphi\n", + "\n", + "# Calculations\n", + "kW_total = kW[0]+kW[1]+kW[2]+kW[3]\n", + "kVAR_total = kVAR[0]+kVAR[1]+kVAR[2]+-1*kVAR[3] \t\t\t#4th case is leading \n", + "\n", + "phi_c = math.atan(kVAR_total/kW_total) \t\t\t#total power factor angle\n", + "phi_1 = math.acos(0.95)\t\t\t#pf of machine 1\n", + "kW_1 = 1000 \t\t\t#active component of machine 1\n", + "kVAR_1 = kW_1*math.tan(phi_1) \t\t\t#reactive component of machine 1\n", + "kW_2 = kW_total - kW_1 \t\t\t#active component of machine 1\n", + "kVAR_2 = kVAR_total-kVAR_1 \t\t\t#reactive component of machine 2\n", + "\n", + "phi_2 = math.atan(kVAR_2/kW_2) \n", + "pf_2 = math.cos(phi_2) \t\t\t#power factor of machine 2\n", + "\n", + "# Results\n", + "print 'Output of second alternator = %.0f kW'%(kW_2)\n", + "print 'power factor of machine 2 = %.2f and lagging'%(pf_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output of second alternator = 1900 kW\n", + "power factor of machine 2 = 0.98 and lagging\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28 Page no : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,tan,arccos\n", + "\n", + "# Variables\n", + "kW = array([250,300,150])\n", + "cosphi = array([0.9,0.75,0.8]) \t\t\t#all lagging\n", + "tanphi = tan(arccos(cosphi))\n", + "kVAR = kW*tanphi\n", + "\n", + "# Calculations\n", + "kW_total = kW[0]+kW[1]+kW[2]\n", + "kVAR_total = kVAR[0]+kVAR[1]+kVAR[2] \n", + "\n", + "phi_1 = math.acos(0.8)\t\t\t#pf of machine 1\n", + "kW_1 = 100 \t\t\t#active component of machine 1\n", + "kVAR_1 = kW_1*math.tan(phi_1) \t\t\t#reactive component of machine 1\n", + "kW_2 = kW_total - kW_1 \t\t\t#active component of machine 1\n", + "kVAR_2 = kVAR_total-kVAR_1 \t\t\t#reactive component of machine 2\n", + "phi_2 = math.atan(kVAR_2/kW_2) \n", + "pf_2 = math.cos(phi_2) \t\t\t#power factor of machine 2\n", + "\n", + "# Results\n", + "print 'Output of second alternator = %.0f kW'%(kW_2)\n", + "print 'power factor of machine 2 = %.4f and lagging'%(pf_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output of second alternator = 600 kW\n", + "power factor of machine 2 = 0.8172 and lagging\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29 Page no : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6.6*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "V_t = V_ph\n", + "X_d = 9.6\n", + "X_q = 6.\n", + "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "VA = 3.5*10**6\n", + "I_L = VA/(math.sqrt(3)*V_L)\n", + "\n", + "# Calculations\n", + "P = 2.5*10**6\n", + "phi = math.acos(0.8)\n", + "I_a = P/(math.sqrt(3)*V_L*math.cos(phi))\n", + "psi = math.atan( (V_t*math.sin(phi)+ I_a*X_q)/(V_t*math.cos(phi)+ I_a*R_a) )\n", + "\n", + "delta = psi-phi\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(phi)\n", + "\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "regulation = 100*(E_f-V_t)/V_t\n", + "P_max = (V_ph**2/2)*((X_d-X_q)/(X_d*X_q))*(math.sin(2*delta))\n", + "\n", + "# Results\n", + "print 'percentage voltage regulation is %.2f percent'%(regulation)\n", + "print 'Power under open circuit is %.1f kW per phase'%(P_max/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage voltage regulation is 50.85 percent\n", + "Power under open circuit is 231.1 kW per phase\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.30 Page no : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3.3*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 3.*10**6\n", + "I_FL = VA/(math.sqrt(3)*V_L)\n", + "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = complex(0,IX_s/I_FL)\n", + "N_s = 1000 \t\t\t#in r.p.m\n", + "\n", + "\n", + "# Calculations\n", + "Poles = 6.\n", + "f = 50.\n", + "delta_dash_mech = (math.pi/180) \t\t\t#print lacement in degree mechanical\n", + "#print lacement in degree electrical\n", + "delta_dash_elec = delta_dash_mech*(Poles/2)\n", + "\n", + "I = I_FL\n", + "phi = math.acos(0.8)\n", + "V = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))\n", + "E = V+ I*X_s\n", + "\n", + "delta = (math.pi/180)*math.atan(E.imag/E.real)-phi \t\t\t#E leads I by (math.pi/180)*phasemag(E) and V leads I by phi radians \n", + "P_SY = abs(E)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase \n", + "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", + "\n", + "ns = 120*f/(60*Poles) \t\t\t#in r.p.m\n", + "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", + "\n", + "# Results\n", + "print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)\n", + "print 'Synchronising torque is %.0f N-m'%(T_SY)\n", + "print 'Answer mismatches due to improper approximation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power per phase is 197.555 kW\n", + "Synchronising torque is 5660 N-m\n", + "Answer mismatches due to improper approximation\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31 Page no : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3.3*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 3.*10**6\n", + "I_FL = VA/(math.sqrt(3)*V_L)\n", + "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = complex(0,IX_s/I_FL)\n", + "N_s = 1000. \t\t\t#in r.p.m\n", + "Poles = 6.\n", + "f = 50.\n", + "\n", + "# Calculations\n", + "delta_dash_mech = (math.pi/180) \t\t\t#print lacement in degree mechanical\n", + "#print lacement in degree electrical \n", + "delta_dash_elec = delta_dash_mech*(Poles/2)\n", + "\n", + "#E = V as the alternator is on no-load and X_s = Z_s\n", + "P_SY = abs(V_ph)**2*(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase\n", + "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", + "\n", + "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", + "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", + "\n", + "# Results\n", + "print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)\n", + "print 'Total Synchronising power is %.3f kW'%(P_SY_total/1000)\n", + "print 'Synchronising torque is %.0f N-m'%(T_SY)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power per phase is 261.799 kW\n", + "Total Synchronising power is 785.398 kW\n", + "Synchronising torque is 7500 N-m\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32 Page no : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 11.*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 700.*10**3\n", + "I_FL = VA/(math.sqrt(3)*V_L)\n", + "IX_s = (14./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = IX_s/I_FL\n", + "#X_s = complex(0,IX_s/I_FL)\n", + "IR_a = (1.5/100)*V_ph \t\t\t#product of I and R_a\n", + "R_a = IR_a/I_FL\n", + "\n", + "\n", + "# Calculations\n", + "I = I_FL\n", + "phi = math.acos(0.8)\n", + "V = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))\n", + "E_ph = math.sqrt( (V_ph*math.cos(phi)+IR_a)**2 +(V_ph*math.sin(phi)+IX_s)**2 )\n", + "delta = math.asin((V_ph*math.sin(phi)+IX_s)/E_ph) -phi\n", + "\n", + "Poles = 4.\n", + "f = 50.\n", + "delta_dash_mech = (math.pi/180) \t\t\t#phase print lacemnt in degree mechanical\n", + "delta_dash_elec = delta_dash_mech*(Poles/2)\t\t\t#phase print lacemnt in degree electrical\n", + "\n", + "P_SY = abs(V_ph)*abs(E_ph)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) \t\t\t#Synchronising power per phase\n", + "P_SY_total = 3*P_SY \t\t\t#total Synchronising power\n", + "\n", + "ns = 120*f/(60*Poles) \t\t\t#in r.p.s\n", + "T_SY = P_SY_total/(2*math.pi*ns) \t\t\t#Synchronising torque \n", + "\n", + "# Results\n", + "print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)\n", + "print 'Synchronising power is %.3f kW ; '%(P_SY/1000)\n", + "print 'Total Synchronising power is %.3f kW'%(P_SY_total/1000)\n", + "print 'Synchronising torque is %.2f N-m'%(T_SY)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power per phase is 63.750 kW\n", + "Synchronising power is 63.750 kW ; \n", + "Total Synchronising power is 191.249 kW\n", + "Synchronising torque is 1217.53 N-m\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33 Page no : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "# Variables\n", + "Z1 = complex(0,2)\n", + "Z2 = complex(0,3)\n", + "Z = 6.\n", + "E1 = p2z(230,0)\n", + "E2 = p2z(230,10)\n", + "\n", + "# Calculations\n", + "I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)\n", + "I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)\n", + "\n", + "phi1 = math.atan(I1.imag/I1.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", + "phi2 = math.atan(I2.imag/I2.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", + "\n", + "I = I1+I2\n", + "V = I*Z \t\t\t#Terminal voltage\n", + "\n", + "# Results\n", + "print 'i) Terminal voltage is %.2f volts at %.1f degrees'%(abs(V),math.degrees(math.atan(V.imag/V.real)))\n", + "print 'ii) Currents are %.2f A at %.0f degrees and %.2f A at %.2f degrees \\\n", + "\\nTotal current is %.2f A at %.1f degrees '%(abs(I1),math.degrees(math.atan(I1.imag/I1.real)),abs(I2),\\\n", + " math.degrees(math.atan(I2.imag/I2.real)),abs(I) \\\n", + " ,math.degrees(math.atan(I.imag/I.real)))\n", + "\n", + "P1 = abs(V)*abs(I1)*math.cos(math.radians(phi1))\n", + "P2 = abs(V)*abs(I2)*math.cos(math.radians(phi2))\n", + "print 'iii)Power delivered %.2f watts and %.2f watts'%(P1,P2)\n", + "\n", + "# note : rounding off error. kindly check the calculations\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Terminal voltage is 224.71 volts at -7.3 degrees\n", + "ii) Currents are 14.74 A at -14 degrees and 22.88 A at -3.03 degrees \n", + "Total current is 37.45 A at -7.3 degrees \n", + "iii)Power delivered 3311.43 watts and 5141.03 watts\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34 Page no : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "X_d = 0.8\n", + "X_q = 0.5 \t\t\t#both per unit\n", + "R_a = 0. \t\t\t#assumed\n", + "phi = math.acos(0.8)\n", + "V_t = 1.\t\t\t#pu\n", + "I_a = 1. \t\t\t#full-load\n", + "\n", + "# Calculations\n", + "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", + "delta = psi-phi\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "\n", + "# Results\n", + "print 'Open circuit voltage is %.3f p.u.'%(E_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open circuit voltage is 1.603 p.u.\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.35 Page no : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,tan,arccos\n", + "\n", + "# Variables\n", + "V_L = 6600.\n", + "I_L = 110.\n", + "phi_1 = math.acos(0.9) \t\t\t#lagging\n", + "kW = array([400,1000,400,300])*10**3\n", + "cosphi = array([1,0.71,0.8,0.9])\n", + "tanphi = tan(arccos(cosphi))\n", + "kVAR = kW*tanphi\n", + "\n", + "# Calculations\n", + "kW_total = kW[0]+kW[1]+kW[2]+kW[3]\n", + "kVAR_total = kVAR[0]+kVAR[1]+kVAR[2]+kVAR[3]\n", + "\n", + "phi_c = math.atan(kVAR_total/kW_total) \t\t\t#total power factor angle\n", + "load_1 = math.sqrt(3)*V_L*I_L*math.cos(phi_1)\n", + "\n", + "kW_1 = load_1 \t\t\t#active component of machine 1\n", + "kVAR_1 = kW_1*math.tan(phi_1) \t\t\t#reactive component of machine 1\n", + "kW_2 = kW_total - kW_1 \t\t\t#active component of machine 1\n", + "kVAR_2 = kVAR_total-kVAR_1 \t\t\t#reactive component of machine 2\n", + "\n", + "phi_2 = math.atan(kVAR_2/kW_2) \n", + "pf_2 = math.cos(phi_2) \t\t\t#power factor of machine 2\n", + "\n", + "# Results\n", + "print 'Output of second alternator = %.2f kW'%(kW_2/1000)\n", + "print 'Power factor of machine 2 = %.4f and lagging'%(pf_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output of second alternator = 968.28 kW\n", + "Power factor of machine 2 = 0.7366 and lagging\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.36 Page no : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 11000.\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 2.*10**6\n", + "phi = math.acos(0.8)\n", + "I_FL = VA/(math.sqrt(3)*V_L)\n", + "phi_1 = math.acos(0.8)\n", + "IX_s = (20./100)*V_ph \t\t\t#product of I and X_s\n", + "\n", + "# Calculations\n", + "X_s = IX_s/I_FL\n", + "I_1 = I_FL\n", + "BC = I_1*math.cos(phi_1)*X_s\n", + "AB = I_1*math.sin(phi_1)*X_s \n", + "OA = V_ph\n", + "OC = math.sqrt( (OA+AB)**2+(BC)**2 ) \n", + "E_1 = OC\n", + "E_2 = 1.25*E_1\n", + "OE = E_2\n", + "DE = BC\n", + "AD = math.sqrt(OE**2-DE**2) -OA \t\t\t#because OE = math.sqrt( (OA+AD)**2 + (DE)**2 )\n", + "\n", + "I_2sinphi2 = AD/X_s\n", + "I_2cosphi2 = I_1*math.cos(phi)\n", + "I_2 = math.sqrt( (I_2cosphi2)**2 + (I_2sinphi2)**2 )\n", + "phi2 = math.atan( I_2sinphi2/ I_2cosphi2 )\n", + "new_pf = math.cos(phi2)\n", + "\n", + "# Results\n", + "print 'Machine current is %.2f A '%(I_2)\n", + "print 'Power factor is %.4f lagging'%(new_pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Machine current is 228.62 A \n", + "Power factor is 0.3673 lagging\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.37 Page no : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + " return RRRR*exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "\n", + "# Variables\n", + "P_out = 3000.*10**3\n", + "V_L = 6.6*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "phi = math.acos(0.8)\n", + "I_L = p2z(P_out/(math.sqrt(3)*V_L*math.cos(phi)),-1*(180/math.pi)*phi)\n", + "\n", + "# Calculations\n", + "P_out1 = P_out/2\n", + "I_L1 = 150 \t\t\t#given\n", + "phi_L1 = math.acos( P_out1/(math.sqrt(3)*V_L*I_L1) )\n", + "I_L1 = p2z(I_L1,-1*(180/math.pi)*phi_L1)\n", + "\n", + "I_L2 = I_L-I_L1\n", + "pf_2 = math.cos(math.atan(I_L2.imag/I_L2.real))\n", + "Z_1 = complex(0.5,10)\n", + "I_1 = I_L1\n", + "E_1 = V_ph + I_1*Z_1\n", + "delta_1 = math.atan(E_1.imag/E_1.real) \t\t\t#load angle of alternator 1\n", + "E_1L = math.sqrt(3)*E_1\n", + "\n", + "Z_2 = complex(0.4,12)\n", + "I_2 = I_L2\n", + "E_2 = V_ph + I_2*Z_2\n", + "delta_2 = (math.pi/180)*math.atan(E_2.imag/E_2.real) \t\t\t#load angle of alternator 2\n", + "\n", + "# Results\n", + "print 'Part i) Currents are %.0f A at %.1f degrees and %.1f A at %.1f degrees\\nTotal current is %.0f at %.2f' %(abs(I_L1),\\\n", + " math.degrees(math.atan(I_L1.imag/I_L1.real)),abs(I_L2),\\\n", + " math.degrees(math.atan(I_L2.imag/I_L2.real)),abs(I_L),math.degrees(math.atan(I_L.imag/I_L.real)))\n", + "print 'Part ii)Power factor is %.4f and lagging'%(math.cos(phi_L1))\n", + "print 'Part iii)emf are %.2f V at %.2f degrees and %.4f V at %.0f degrees'%(abs(E_1),\\\n", + " math.degrees(math.atan(E_1.imag/E_1.real)),abs(E_2),math.degrees(math.atan(E_2.imag/E_2.real)))\n", + "print 'Part iv)Power angles are %.2f degrees and %.0f degrees '%(180/math.pi*delta_1,(180/math.pi)*delta_2)\n", + "\n", + "# note : rounding off error. kindly check the calculations\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part i) Currents are 150 A at -29.0 degrees and 180.6 A at -43.4 degrees\n", + "Total current is 328 at -36.87\n", + "Part ii)Power factor is 0.8748 and lagging\n", + "Part iii)emf are 4776.46 V at 15.49 degrees and 5565.7081 V at 16 degrees\n", + "Part iv)Power angles are 15.49 degrees and 0 degrees \n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.38 Page no : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Z1 = complex(0.2,2)\n", + "Z2 = Z1\n", + "ZL = complex(3,4)\n", + "Z = ZL\n", + "E1 = complex(2000,0)\n", + "E2 = complex(2200,100)\n", + "\n", + "# Calculations\n", + "I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)\n", + "I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)\n", + "\n", + "IL = I1+I2\n", + "V = IL*Z \t\t\t#Terminal voltage\n", + "\n", + "phi1 = math.atan(V.imag/V.real)-math.atan(I1.imag/I1.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", + "phi2 = math.atan(V.imag/V.real)-math.atan(I2.imag/I2.real) \t\t\t#Phasemag returns the angle of complex number in degrees\n", + "\n", + "Pout1 = math.sqrt(3)*math.sqrt(3)*abs(V)*abs(I1)*math.cos(math.radians(phi1))\n", + "Pout2 = math.sqrt(3)*math.sqrt(3)*abs(V)*abs(I2)*math.cos(math.radians(phi2))\n", + "\n", + "# Results\n", + "print 'Power delivered is %.2f kW and %.2f kW at power-factors %.4f lag and %.4f lag respectively'%(Pout1/1000,Pout2/1000,math.cos(math.radians(phi1)),math.cos(math.radians(phi2)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power delivered is 658.24 kW and 1253.92 kW at power-factors 0.9999 lag and 0.9999 lag respectively\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.39 Page no : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "f = 50.\n", + "P = 12.\n", + "V_L = 6600.\n", + "V_ph = V_L/math.sqrt(3)\n", + "VA = 2000.*10**3\n", + "I_FL = VA/(math.sqrt(3)*V_L)\n", + "\n", + "# Calculations\n", + "IX_s = (25./100)*V_ph \t\t\t#product of I and X_s\n", + "X_s = complex(0,IX_s/I_FL)\n", + "N_s = 12*f/P \t\t\t#in rpm\n", + "delta_dash_mech = (math.pi/180) \t\t\t#phase print lacemnt in degree mechanical\n", + "delta_dash_elec = delta_dash_mech*(P/2) \t\t\t#phase print lacemnt in degree electrical\n", + "\n", + "phi = math.acos(0.8) \t\t\t#lag\n", + "I = complex(I_FL*math.cos(-1*phi),I_FL*math.sin(-1*phi))\n", + "V = V_ph\n", + "E = V + I*X_s\n", + "delta = math.atan(E.imag/E.real)*(math.pi/180)\n", + "P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)\n", + "P_SY_total = 3*P_SY\n", + "\n", + "# Results\n", + "print 'Synchronising power is %.2f kW'%(P_SY/1000)\n", + "print 'Total Synchronising power is %.2f kW'%(P_SY_total/1000)\n", + "\n", + "# note : rounding off error. kindly check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronising power is 325.36 kW\n", + "Total Synchronising power is 976.09 kW\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.40 Page no : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 22000.\n", + "V_ph = V_L/math.sqrt(3)\n", + "power = 230.*10**6\n", + "phi = math.acos(1.)\n", + "I_FL = power/(math.sqrt(3)*V_L*math.cos(phi))\n", + "I_1 = I_FL\n", + "X_s = 1.2\n", + "\n", + "# Calculations\n", + "E_1 = math.sqrt( V_ph**2 + (I_1*X_s)**2 )\n", + "E_2 = 1.3*E_1\n", + "AC = math.sqrt( E_2**2-(I_1*X_s)**2 ) -V_ph \t\t\t# because E**2 = (V_ph+AC)**2+(I_1*X_s)**2\n", + "I2X_S = AC\n", + "\n", + "I_2cosphi2 = I_1 \t\t\t#because phi_2 = math.acos(I_1/I_2) \t\t\t#from ACD\n", + "I_2sinphi2 = AC/X_s\n", + "I_2 = math.sqrt( (I_2cosphi2)**2 + (I_2sinphi2)**2 )\n", + "phi2 = math.atan( I_2sinphi2/ I_2cosphi2 )\n", + "new_pf = math.cos(phi2)\n", + "\n", + "# Results\n", + "print 'Machine current is %.2f A '%(I_2)\n", + "print 'Power factor is %.4f and lagging'%(new_pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Machine current is 7274.58 A \n", + "Power factor is 0.8297 and lagging\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.41 Page no : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import cmath\n", + "\n", + "#note that a new function p2z has been defined below for direct representation of complex numbers in polar form\n", + "def p2z(RRRR,Theeeta):\n", + "\treturn RRRR*cmath.exp(1j*math.pi*Theeeta/180.);\n", + "\n", + "# Variables\n", + "P_out = 1500.*10**3\n", + "V_L = 3.3*10**3\n", + "phi = math.acos(0.8)\n", + "I_L = p2z(P_out/(math.sqrt(3)*V_L*math.cos(phi)),-1*math.acos(math.radians(0.8)))\n", + "\n", + "I_L1_magnitude = 150. \t\t\t#given\n", + "P_out1 = (3.*10**6)/2 \t\t\t#because load is EQUALLY shared between 2 alternators\n", + "pf_L1 = P_out1/(math.sqrt(3)*2*V_L*I_L1_magnitude) \t\t\t#operating pf of alternator 1\n", + "phi1 = math.acos(math.radians(pf_L1))\n", + "I_L1 = p2z(I_L1_magnitude,-1*phi1)\n", + "I_L2 = I_L-I_L1 \t\t\t#because I_L = I_L1 + I_L2\n", + "pf_L2 = math.cos(math.atan(I_L2.imag/I_L2.real))\n", + "\n", + "# Calculations\n", + "V_ph = 6.6*10**3/math.sqrt(3)\n", + "Z_1 = complex(0.5,10)\n", + "I_1 = I_L1\n", + "E_1 = V_ph + I_1*Z_1\n", + "delta_1 = math.atan(E_1.imag/E_1.real) \t\t\t#load angle of alternator 1\n", + "I_2 = I_L2\n", + "\n", + "Z_2 = complex(0.4,12)\n", + "E_2 = V_ph + I_2*Z_2\n", + "delta_2 = math.atan(E_2.imag/E_2.real) \t\t\t#load angle of alternator 1\n", + "\n", + "# Results\n", + "print 'for machine 1current is %.0f A at %.2f degrees \\nPower factor of %.4f laginduced emf \\\n", + " of %.2f V \\nload angle of %.2f degrees'%(abs(I_L1),math.degrees(math.atan(I_L1.imag/I_L1.real)),pf_L1,abs(E_1),delta_1)\n", + "print 'for machine 2current is %.1f A at %.1f degrees\\nPower factor of %.4f laginduced emf \\\n", + " of %.2f V\\nload angle of %.0f degrees'%(abs(I_L2),math.degrees(math.atan(I_L2.imag/I_L2.real)),pf_L2,abs(E_2),math.degrees(delta_2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for machine 1current is 150 A at -1.56 degrees \n", + "Power factor of 0.8748 laginduced emf of 4202.06 V \n", + "load angle of 0.36 degrees\n", + "for machine 2current is 178.0 A at -1.6 degrees\n", + "Power factor of 0.9996 laginduced emf of 4480.49 V\n", + "load angle of 28 degrees\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.42 Page no : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_l = 230\n", + "VA = 5*10**3\n", + "X_d = 12\n", + "X_q = 7\n", + "R_a = 0 \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "phi = math.acos(1)\n", + "\n", + "# Calculations\n", + "I_l = VA/(V_l*math.sqrt(3))\n", + "V_ph = V_l/math.sqrt(3)\n", + "V_t = V_ph\n", + "I_a = I_l\n", + "\n", + "psi = math.atan( (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a) )\n", + "delta = psi-phi\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a\n", + "\n", + "# Results\n", + "print 'Excitation voltage is %.3f V '%(E_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excitation voltage is 193.852 V \n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.43 Page no : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_l = 6.6*10**3\n", + "V_t = V_l/math.sqrt(3)\n", + "X_d = 23.2\n", + "X_q = 14.5\n", + "R_a = 0. \t\t\t#armature resistance and synchronous reactance of direct quadrature axis\n", + "VA = 1800.*10**3\n", + "phi = math.acos(0.8) \t\t\t#lag\n", + "\n", + "# Calculations and Results\n", + "I_a = VA/(V_l*math.sqrt(3))\n", + "\n", + "psi = math.atan( (V_t*math.sin(phi)-I_a*X_q)/(V_t*math.cos(phi)-I_a*R_a) ) \t\t\t#minus sign in numerator and denomenator for motors\n", + "delta = psi+phi\n", + "I_d = I_a*math.sin(psi)\n", + "I_q = I_a*math.cos(psi)\n", + "E_f = V_t*math.cos(delta)-I_d*X_d-I_q*R_a\n", + "print 'Excitation emf = %.4f V'%(E_f)\n", + "#P_m = ( V_t*E_f*math.sin(delta)/X_d ) + ((1/X_q)-(1/X_d))*0.5*math.sin(2*delta)*V_t**2\n", + "#P_m = 0.4996*math.cos(delta)+0.1877*math.sin(2*delta)\n", + "#for maximum power output differenciate and equate to zero\n", + "\n", + "delta_max = 63.4 \t\t\t#degree\n", + "\n", + "P_m_max = ((1/X_q)-(1/X_d))*0.5*math.sin(math.radians(2*delta_max))*V_t**2 \t\t\t#Maximuum load supplied with E_f = 0\n", + "print 'Maximum load the motor can supply is %.4f MW per phase '%(P_m_max*10**-6 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excitation emf = 3042.2721 V\n", + "Maximum load the motor can supply is 0.1503 MW per phase \n" + ] + } + ], + "prompt_number": 83 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch7_2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch7_2.ipynb new file mode 100755 index 00000000..90ee7606 --- /dev/null +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch7_2.ipynb @@ -0,0 +1,1702 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a6d47374988dffe6254758a68746561860439fac0faeabc093287fa2241d2260" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Synchronous Motors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page no : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import numpy as np\n", + "\n", + "# Variables\n", + "V_l = 400.\n", + "R_a = 0.2\n", + "X_s = 2. \t\t\t#armature resistance and synchronous reactance\n", + "I_L = 25.\n", + "I_aph = I_L\n", + "V_ph = V_l/math.sqrt(3)\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "angle = math.atan(Z_s.imag/Z_s.real)\n", + "angle = math.degrees(angle)\n", + "E_Rph=I_aph*abs(Z_s)\n", + "theta = (math.pi/180.)*angle \n", + "\n", + "# Calculations and Results\n", + "#case 1\n", + "phi = math.acos(0.8) \t\t\t#lagging\n", + "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta-phi) )\n", + "print 'i)Back EMF induced with 0.8 lagging pf is %.3f V'%(E_bph)\n", + "\n", + "#case 2\n", + "phi = math.acos(0.9) \t\t\t#leading\n", + "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", + "print 'ii)Back EMF induced with 0.8 lagging pf is %.3f V'%(E_bph)\n", + "\n", + "#case 3\n", + "phi = math.acos(1)\n", + "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta) )\n", + "print 'iii)Back EMF induced with 0.8 lagging pf is %.3f V'%(E_bph)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Back EMF induced with 0.8 lagging pf is 200.386 V\n", + "ii)Back EMF induced with 0.8 lagging pf is 252.678 V\n", + "iii)Back EMF induced with 0.8 lagging pf is 231.406 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page no : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import cos\n", + "# Variables\n", + "V_l = 500.\n", + "R_a = 0.4\n", + "X_s = 4. \t\t\t#armature resistance and synchronous reactance\n", + "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "theta = (math.pi/180)*angle\t\t\t#phasemag returns angle in degrees,not radians\n", + "V_ph = V_l/math.sqrt(3)\n", + "I_l = 50.\n", + "I_aph = I_l\n", + "E_Rph = I_aph*abs(Z_s)\n", + "\n", + "# Calculations and Results\t\t\n", + "#case 1\n", + "E_bline = 600\n", + "E_bph = E_bline/math.sqrt(3)\n", + "phi = math.acos( (-E_bph**2 + E_Rph**2 + V_ph**2 )/(2*E_Rph*V_ph) ) -theta \t\t\t#leading\n", + "#because E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", + "print 'i)power factor is %.4f leading'%(cos(phi))\n", + "\n", + "#case 2\n", + "E_bline = 380\n", + "E_bph = E_bline/math.sqrt(3)\n", + "phi = theta-math.acos( (-E_bph**2 + E_Rph**2 + V_ph**2 )/(2*E_Rph*V_ph) ) \t\t\t#leading\n", + "#because E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta-phi)\n", + "print 'ii)power factor is %.4f lagging'%(cos(phi))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)power factor is 0.9977 leading\n", + "ii)power factor is 0.8197 lagging\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page no : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6600.\n", + "P_out = 500.*10**3\n", + "eta = 83./100 \t\t\t#efficiency\n", + "R_a = 0.3\n", + "X_s = 3.2 \t\t\t#armature resistance and synchronous reactance\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "theta = (math.pi/180)* angle \t\t\t#phasemag returns the angle in degrees not radians\n", + "phi = math.acos(0.8) \t\t\t#leading\n", + "V_ph = V_L/math.sqrt(3)\n", + "P_in = P_out/eta\n", + "\n", + "# Calculations and Results\n", + "I_L = P_in/ (math.sqrt(3) * V_L * math.cos(phi) )\n", + "\n", + "# because P_in = math.sqrt(3) * V_L * I_L * math.cos(phi)\n", + "I_aph = I_L\n", + "E_Rph = I_aph*abs(Z_s)\n", + "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", + "print 'i) Generated EmF on full loaad is %.2f V'%(E_bph)\n", + "\n", + "delta = math.degrees(math.asin( (E_Rph/E_bph))*math.sin(theta+phi) )\n", + "#This is obtained after applying sune rule to triangle OAB from thre phasor diagram\n", + "print 'ii) load angle is %.2f degrees'%(delta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Generated EmF on full loaad is 3925.33 V\n", + "ii) load angle is 2.64 degrees\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page no : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "V_L = 500.\n", + "V_ph = V_L/math.sqrt(3)\n", + "phi = math.acos(0.9) \t\t\t\t#lagging\n", + "output_power = 17.*10**3\n", + "R_a = 0.8 \t\t\t\t\t\t\t#armaature reactance\n", + "mechanical_losses = 1300. \t\t\t#mechanical losses is W\n", + "P_m = output_power+mechanical_losses \t\t\t#gross mechanical power developed\n", + "\n", + "# P_m = input_power - stator losses\n", + "# input_power = 3* V_ph * I_aph * math.cos(phi)\n", + "# Stator losses = 3*I_aph**2*R_a\n", + "# solving above equations we get 2.4 I_a**2 - 779/.4225*I_a + 18300 = 0\n", + "I_a_eqn = [2.4, -779.4225, 18300]\n", + "I_a_roots = roots(I_a_eqn)\n", + "I_a = I_a_roots[1] \t\t\t#neglecting higher value\n", + "I_aph = I_a\n", + "print 'Current drawn by the motor is %.3f A'%(I_a)\n", + "\n", + "input_power = 3* V_ph * I_aph * math.cos(phi)\n", + "eta = 100*output_power/input_power\n", + "print 'Full load efficiency is %.2f percent'%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current drawn by the motor is 25.478 A\n", + "Full load efficiency is 85.61 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page no : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#subscript 1 is for industrial load and 2 for synchronous motor\n", + "P_1 = 800. \t\t\t# Active power in KW\n", + "phi_1 = math.acos(0.6) \t\t\t#lagging\n", + "Q_1 = P_1*math.tan(phi_1) \t\t\t#reactive power by load 1\n", + "\n", + "# Calculations and Results\n", + "output_power = 200.\n", + "eta = 91./100 \t\t\t#efficiency of synchronous motor\n", + "input_power = output_power/eta\n", + "P_2 = input_power\t\t\t# active power drawn by synchronous motor\n", + "P_T = P_1 + P_2 \t\t\t#combined total load of industry and synchronous motor\n", + "phi_T = math.acos(0.92 )\t\t\t#lagging\n", + "Q_T = P_T* math.tan(phi_T) \t\t\t#from power triangle\n", + "Q_2 = Q_T - Q_1 \t\t\t#it turns out to be negative indicating its leading nature\n", + "S_2 = math.sqrt( P_2**2 + Q_2**2 )\n", + "print 'Desired kVA rating of Synchronous motor is %.3f kVA'%(S_2)\n", + "\n", + "phi_2 = math.atan (Q_2/P_2)\n", + "print 'Power factor of synchronous motor is %.4f LEADING'%(math.cos(phi_2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Desired kVA rating of Synchronous motor is 669.353 kVA\n", + "Power factor of synchronous motor is 0.3283 LEADING\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "output_power = 37.3*1000 \t\t\t#Watts on full load\n", + "Z_s = complex(0.2,1.6) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "theta = (math.pi/180)*angle \t\t\t#phase mag returns the angle in degrees and not raidians\n", + "phi = math.acos(0.9) \t\t\t#leading\n", + "V_ph = V_L/math.sqrt(3)\n", + "eta = 88. \t\t\t#efficiency in percentage\n", + "\n", + "# Calculations\n", + "input_power = 100*output_power/eta\n", + "I_L = input_power/(math.sqrt(3)*V_L*math.cos(phi))\n", + "I_aph = I_L\n", + "E_Rph = I_aph*abs(Z_s)\n", + "\n", + "E_bph = math.sqrt( (E_Rph)**2 + (V_ph)**2 -2*E_Rph*V_ph*math.cos(theta+phi) )\n", + "E_line = math.sqrt(3)*E_bph\n", + "\n", + "# Results\n", + "print 'Induced EMF is %.2f V and its line value is %.2f V'%(E_bph,E_line)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced EMF is 285.65 V and its line value is 494.75 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "input_power = 20.*1000 \n", + "R_a = 0.\n", + "X_s = 4. \t\t\t#armature reactance and synchronous reactance\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag))\n", + "\n", + "theta = (math.pi/180)*angle \t\t\t#phase mag returns the angle in degrees and not raidians\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_bline = 550. \t\t\t#star connection\n", + "E_bph = E_bline/math.sqrt(3)\n", + "\n", + "# Calculations\n", + "I_a_cos_phi = input_power/(math.sqrt(3)*V_L) \t\t\t#product of I_a and math.cos(phi)\n", + "I_a_sin_phi = ( math.sqrt(E_bph**2- (abs(Z_s)*I_a_cos_phi)**2 ) -V_ph )/abs(Z_s)\t\t\t#from triangle DAB\n", + "phi = math.atan(I_a_sin_phi/I_a_cos_phi)\n", + "I_a = I_a_cos_phi/math.cos(phi) \n", + "\n", + "# Results\n", + "print 'Motor power fctor is %.3f Leading'%(cos(phi))\n", + "print 'Current drawn by the motor is %.2f A'%(I_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Motor power fctor is 0.872 Leading\n", + "Current drawn by the motor is 33.11 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3300.\n", + "V_ph = V_L/math.sqrt(3)\n", + "R_a = 2.\n", + "X_s = 18. \t\t\t#armature reactance and synchronous reactance\n", + "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degrees not radians\n", + "E_bline = 3800.\n", + "E_bph = E_bline/math.sqrt(3)\n", + "\n", + "#part(i)\n", + "P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph**2/abs(Z_s))*math.cos(theta)\n", + "print 'i)Max total mechanical power developed that motor can develop is %.2f W per phase'%(P_m_max)\n", + "\n", + "#part(ii)\n", + "#from phasor diagram applying math.comath.sine rule to triangle OAB\n", + "E_Rph = math.sqrt( E_bph**2 + V_ph**2 -2*E_bph*V_ph*math.cos(theta) ) \n", + "I_aph = E_Rph/abs(Z_s)\n", + "print 'ii)Current at max power developed is %.1f A'%(I_aph)\n", + "\n", + "copper_loss = 3* I_aph**2 * R_a\n", + "P_in_max_total = 3 * P_m_max \t\t\t#input power at max power developed\n", + "total_P_in = P_in_max_total + copper_loss \t\t\t#total input power \n", + "pf = total_P_in/(math.sqrt(3)*I_aph*V_L)\n", + "print 'Power factor at max power developed is %.3f leading'%(pf)\n", + "\n", + "\n", + "# 'Answer in part1 mismatched because of improper approximation in book'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Max total mechanical power developed that motor can develop is 201452.30 W per phase\n", + "ii)Current at max power developed is 151.4 A\n", + "Power factor at max power developed is 0.857 leading\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 500.\n", + "R_a = 0.03\n", + "X_s = 0.3 \t\t\t#armature reactance and synchronous reactance\n", + "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degrees not radians\n", + "phi = math.acos(0.8)\n", + "eta = 93/100.\n", + "output_power = 100.*746\n", + "input_power = output_power/eta\n", + "I_L = input_power/(math.sqrt(3)*V_L*math.cos(phi))\n", + "I_aph = I_L\n", + "E_Rph = I_aph*abs(Z_s)\n", + "\n", + "#from the phasor diagram\n", + "E_bph = math.sqrt( E_Rph**2 + (V_L/math.sqrt(3))**2 - 2*E_Rph*(V_L/math.sqrt(3))*math.cos(phi+theta) ) \n", + "\n", + "cu_losses = 3*(I_aph)**2*R_a \t\t\t#total copper losses\n", + "P_m = input_power - cu_losses \t\t\t#total mechanical power developed\n", + "\n", + "print 'EMF developed per phase is %.4f V \\nTotal mechanical power developed is %.1f watts'%(E_bph,P_m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EMF developed per phase is 308.1880 V \n", + "Total mechanical power developed is 79008.6 watts\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 415.\n", + "V_ph = V_L \t\t\t#due to delta connection\n", + "E_bline = 520.\n", + "R_a = 0.5\n", + "X_s = 4. \t\t\t#armature reactance and synchronous reactance\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180.)*angle \t\t\t#phasemag returns angle in degrees not radians\n", + "\n", + "delta = theta \t\t\t#for maximum power\n", + "P_m_max = (E_bline*V_ph/abs(Z_s))- (E_bline**2/abs(Z_s))*math.cos(theta)\n", + "P_m_max_total = 3* P_m_max\n", + "fi_loss = 1000. \t\t\t#frictional and iron losses\n", + "P_out_total = P_m_max_total-fi_loss \n", + "\n", + "HP_output = P_out_total/746 \t\t\t#converting watts to horse power\n", + "print 'HP output for maximum power output is %.2f HP'%(HP_output)\n", + "\n", + "#from the phasor diagram\n", + "E_Rph = math.sqrt( E_bline**2 + V_ph**2 -2*E_bline*V_ph*math.cos(delta) ) \n", + "I_aph = E_Rph/abs(Z_s)\n", + "I_L = I_aph*math.sqrt(3)\n", + "print 'Line current is %f A'%(I_L)\n", + "cu_loss_total = 3*(I_aph)**2*R_a \t\t\t#total copper losses\n", + "input_power = P_m_max_total+ cu_loss_total\n", + "pf = input_power/(math.sqrt(3)*I_L*V_L) \t\t\t#leading\n", + "print 'Power factor for maximum power output is %.2f leading '%(pf)\n", + "\n", + "eta = 100*P_out_total /input_power\n", + "print 'Efficiency for maximum power output is %.2f percent'%(eta)\n", + "\n", + "# 'Answer might mismatch because of improper approximation done in book'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HP output for maximum power output is 180.48 HP\n", + "Line current is 268.015479 A\n", + "Power factor for maximum power output is 0.89 leading \n", + "Efficiency for maximum power output is 78.48 percent\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page no : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 8.\n", + "f = 50. \t\t\t#Pole and frequency\n", + "N_s = 120.*f/P \t\t\t#synchronous speed\n", + "V_L = 6.6*10**3 \n", + "V_ph = V_L/math.sqrt(3)\n", + "Z_s = complex(0.66,6.6) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degree not radians\n", + "E_bph = 4500.\n", + "input_power = 2500.*10**3\n", + "I_a_cosphi = input_power/(math.sqrt(3)*V_L) \t\t\t#Its product of I_a and math.cos(phi);I_a = I_l for star conneted load\n", + "\n", + "# Calculations\n", + "#applying math.comath.sine rule to triangle ABC from phasor diagram and solve \n", + "#math.tan(phi)**2 + 5.2252 math.tan(phi)-2.2432 = 0\n", + "p = [1, 5.2252, -2.2432]\n", + "tan_phi = roots(p)\n", + "phi = math.atan(tan_phi[1])\n", + "pf = math.cos(phi)\n", + "I_a = I_a_cosphi/ math.cos(phi)\n", + "\n", + "#apply math.sine rule to triangle ABC\n", + "delta = math.asin(I_a*abs(Z_s)*math.sin(theta+phi)/E_bph)\n", + "P_m = 3*E_bph*I_a*math.cos(delta+phi)\n", + "T_g = P_m/(2*math.pi*N_s/60)\n", + "\n", + "# Results\n", + "print 'i)Torque developed is %f N-m'%(T_g)\n", + "print 'ii)Input current is %.4f A'%(I_a)\n", + "print 'iii)Power factor is %.4f leading'%(pf)\n", + "print 'iv)Power angle is %.2f degrees '%((180/math.pi)*delta)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Torque developed is 30437.047497 N-m\n", + "ii)Input current is 235.4472 A\n", + "iii)Power factor is 0.9288 leading\n", + "iv)Power angle is 19.48 degrees \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page no : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "input_power = 15.*10**3\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_b = 480.\n", + "E_bph = E_b/math.sqrt(3)\n", + "Z_s = complex(1,5) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degree not radians\n", + "\n", + "# Calculations\n", + "I_a_cosphi = input_power/(math.sqrt(3)*V_L) \t\t\t#product of I_a & math.cos(phi)\n", + "#Applying math.comath.sine rule to triangle OAB and solving\n", + "#math.tan(phi)**2+ 4.101*math.tan(phi)-1.7499 = 0\n", + "p = [1,4.101,-1.7449]\n", + "tan_phi = roots(p)\n", + "phi = math.atan(tan_phi[1]) \t\t\t#ignoring negative vaule\n", + "I_a = I_a_cosphi/ math.cos(phi)\n", + "\n", + "#applying math.sine rule to Triangle OAB\n", + "delta = math.asin( I_a*abs(Z_s)* math.sin(theta+phi)/E_bph )\n", + "\n", + "# Results\n", + "print 'Load angle is %.1f degrees'%(delta*180/math.pi)\n", + "print 'Armature current is %.4f A'%(I_a)\n", + "print 'Power factor is %.3f leading'%(cos(phi))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load angle is 24.9 degrees\n", + "Armature current is 23.2283 A\n", + "Power factor is 0.932 leading\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page no : 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_b = 460.\n", + "E_bph = E_b/math.sqrt(3)\n", + "input_power = 3.75*10**3\n", + "Z_s = complex(1,8) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = math.degrees(angle) \t\t\t#phasemag returns angle in degree ,not radians\n", + "I_L_cos_phi = input_power/(math.sqrt(3)*V_L)\n", + "\n", + "# Calculations and Results\n", + "#Applying math.comath.sine rule to triangle OAB and solving further\n", + "#math.tan(phi)**2 + 458.366*math.tan(phi) -450.65 = 0 \n", + "p = [1,458.366-450.65]\n", + "tan_phi = roots(p)\n", + "\n", + "phi = math.atan(tan_phi[0]) \t\t\t#ignoring negative value\n", + "print 'Required power factor is %.4f leading'%(cos(phi))\n", + "I_L = I_L_cos_phi /math.cos(phi)\n", + "print 'Required current is %.4f A'%(I_L)\n", + "\n", + "# roots() python gives some different answer. Kindly check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required power factor is 0.1285 leading\n", + "Required current is 42.1134 A\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page no : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#subscript 1 indicates induction motor 1\n", + "P_1 = 350.\n", + "phi_1 = math.acos(0.7071) \t\t\t#lagging\n", + "Q_1 = P_1*math.tan(phi_1)\t\t\t#from power triangle\n", + "\n", + "#subscript 2 indicates induction motor 2\n", + "P_2 = 190.\n", + "\n", + "# Calculations\n", + "#subscript T indicates total\n", + "P_T = P_1+P_2\n", + "phi_T = math.acos(0.9) \t\t\t#lagging\n", + "Q_T = P_T*math.tan(phi_T)\n", + "\n", + "Q_2 = Q_T-Q_1\n", + "kva_rating = math.sqrt(P_2**2+ Q_2**2)\n", + "\n", + "# Results\n", + "print 'kVA rating of synchronous motor is %.2f kVA'%(kva_rating)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kVA rating of synchronous motor is 209.59 kVA\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page no : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "Pole = 6.\n", + "f = 50.\n", + "R_a = 0.2\n", + "X_s = 3. \t\t\t#armature reactance and synchronous reactance\n", + "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag/Z_s.real) # calculates angle in radians\n", + "\n", + "N_s = 120*f/Pole \t\t\t#synchronous speed\n", + "\n", + "# Calculations\n", + "#subscript 1` refers to load 1\n", + "I_a1 = 20.\n", + "phi_1 = math.acos(1)\n", + "E_R1 = I_a1* abs(Z_s)\n", + "E_bph = math.sqrt( E_R1**2 + V_ph**2 - 2*E_R1*V_ph*math.cos(phi_1+theta) )\n", + "\n", + "#subscript 2` refers to load 2\n", + "I_a2 = 60.\n", + "E_R2 = I_a2* abs(Z_s)\n", + "phi_2 = math.acos ((E_R2**2 + V_ph**2 -E_bph**2 )/(2*E_R2*V_ph)) -theta \t\t\t#new power factor\n", + "\n", + "input_power = math.sqrt(3)*V_L*I_a2*math.cos(phi_2)\n", + "cu_loss = 3*I_a2**2*R_a\n", + "P_m = input_power-cu_loss\n", + "T_g = P_m /(2*math.pi*N_s/60) \t\t\t#gross mechanical power developed\n", + "\n", + "# Results\n", + "print 'Gross torque developed is %.4f N-m and new power factor is %.4f lagging'%(T_g,cos(phi_2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gross torque developed is 357.1971 N-m and new power factor is 0.9518 lagging\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3300.\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_bph = V_ph\n", + "Z_s = complex(0.5,5) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180)*angle \t\t\t#phasemag returns angle in degrees, not radians\n", + "P = 8.\n", + "f = 50. \t\t\t#pole and frequency\n", + "delta_mech = 3. \t\t\t#mechanical angle in degrees by which rotor is behind\n", + "delta_elec = (P/2)*delta_mech \t\t\t#delta mech converted to electrical degrees\n", + "E_Rph = math.sqrt( E_bph**2 + V_ph**2 -2*E_bph*V_ph*math.cos(math.radians(delta_elec) )) \n", + "I_aph = E_Rph/abs(Z_s)\n", + "\n", + "#from the phasor diagram \n", + "phi = theta- math.asin( math.sin(math.radians(delta_elec))*E_bph/E_Rph )\n", + "pf = math.cos(phi)\n", + "print 'power factor of the motor is %.5f lagging'%(pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power factor of the motor is 0.99999 lagging\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page no : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_bph = V_ph\n", + "P = 4.\n", + "f = 50.\t\t\t#Pole and frequency\n", + "delta_mech = 4*(math.pi/180) \t\t\t#mechanical angle in degrees by which rotor is behind\n", + "delta_elec = delta_mech *(P/2) \t\t\t#delta_mech convertd to electrical degrees\n", + "Z_s = complex(0,2) \t\t\t#synchronous impedance\n", + "\n", + "# Calculations\n", + "#referring to phasor diagram\n", + "BC = E_bph*math.sin(delta_elec)\n", + "AB = E_bph\n", + "OA = V_ph\n", + "\n", + "AC = math.sqrt(AB**2-BC**2)\n", + "OC = OA-AC\n", + "phi = math.atan(OC/BC)\n", + "OB = math.sqrt(OC**2 + BC**2)\n", + "I_a = OB/abs(Z_s)\n", + "\n", + "# Results\n", + "print 'Armature current drawn by the motor is %.4f A'%(I_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature current drawn by the motor is 16.1096 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page no : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "input_power = 5472.\n", + "Z_s = complex(0,10) \t\t\t#synchronous impedance\n", + "I_L_cosphi = input_power/(math.sqrt(3)*V_L) \t\t\t#product of I_L & math.cos(phi)\n", + "BC = 10*I_L_cosphi\n", + "AB = V_ph\n", + "OA = V_ph\n", + "\n", + "# Calculations\n", + "#from Triangle ABC in phasor diagram\n", + "AC = math.sqrt(AB**2- BC**2)\n", + "OC = OA - AC\n", + "\n", + "\t\t\t#from Triangle OCB \n", + "OB = math.sqrt( OC**2+ BC**2 )\n", + "E_Rph = OB\n", + "I_L = E_Rph/abs(Z_s)\n", + "\n", + "phi = math.atan(OC/BC)\n", + "pf = math.cos(phi)\n", + "delta = math.atan(BC/AC) \t\t\t#load angle\n", + "\n", + "# Results\n", + "print 'Power factor is %.4f lagging'%(pf)\n", + "print 'Load angle is %.0f degrees'%(delta*180/math.pi)\n", + "print 'Armature current is %.3f A'%(I_L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power factor is 0.9848 lagging\n", + "Load angle is 20 degrees\n", + "Armature current is 8.020 A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page no : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6600.\n", + "V_ph = V_L/math.sqrt(3)\n", + "Z_s = complex(2,20) \t\t\t#synchronous impedance\n", + "angle = math.degrees(math.atan(Z_s.imag/Z_s.real))\n", + "\n", + "theta = (math.pi/180) * angle \t\t\t#phasemag returns angle in degrees not radians\n", + "P_1 = 1000*10**3\n", + "P_2 = 1500*10**3\n", + "phi_1 = math.acos(0.8) \t\t\t#leading\n", + "\n", + "# Calculations\n", + "I_L1 = P_1/(math.sqrt(3)*V_L*math.cos(phi_1))\n", + "I_a1ph = I_L1\n", + "E_R1ph = I_a1ph*abs(Z_s)\n", + "E_bph = math.sqrt( V_ph**2 + E_R1ph** -2*V_ph*E_R1ph*math.cos(theta+phi_1) )\n", + "I_a2_cosphi_2 = P_2/(math.sqrt(3)*V_L)\n", + "\n", + "#Refer to the phasor diagram and solving for I_y\n", + "#404I_y**2 -152399.968 I_y -4543000 = 0\n", + "p = [404, -152399.968, -4543000]\n", + "ans = roots(p)\n", + "I_y = abs(ans[1]) \t\t\t#becuase root 1 is too high and root is -ve\n", + "\n", + "I_a2 = complex(I_a2_cosphi_2,I_y)\n", + "phi_2 = math.degrees(math.atan(I_a2.imag/I_a2.real))\n", + "\n", + "print 'Required power factor is %.3f leading'%(math.cos(math.radians(phi_2)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required power factor is 0.978 leading\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page no : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "V_L = 2300.\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_L = 200.\n", + "I_a = I_L\n", + "Z_s = complex(0.2,2.2) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag/Z_s.real)\n", + "phi = math.acos(0.5)\n", + "\n", + "# Calculations\n", + "E_Rph = I_a*abs(Z_s)\n", + "E_bph = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(phi+theta) ) \n", + "\n", + "# Results\n", + "print 'Generated EMF per phase is %.3f V'%(E_bph)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated EMF per phase is 1708.045 V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page no : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3300.\n", + "V_ph = V_L/math.sqrt(3)\n", + "E_bline = 3800.\n", + "E_bph = E_bline/math.sqrt(3)\n", + "\n", + "R_a = 2.\n", + "X_s = 18. \t\t\t#armature resistance and synchronous reactance\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag/Z_s.real)\n", + "\n", + "#part(i)\n", + "P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph**2/abs(Z_s))*math.cos(theta) \t\t\t#maximum total mechanical power\n", + "print 'i)Maximum total mechanical power that the motor can develop is %.2f W per phase'%(P_m_max )\n", + "#part(ii)\n", + "delta = theta \t\t\t#for max P_m\n", + "E_Rph = math.sqrt( E_bph**2 + V_ph**2 -2*E_bph*V_ph*math.cos(delta) ) \n", + "I_aph = E_Rph/abs(Z_s)\n", + "print 'ii)Current at maximum power developed is %.1f A'%(I_aph)\n", + "cu_loss_total = 3*I_aph**2*R_a \t\t\t#total copper loss\n", + "P_m_max_total = 3*P_m_max \t\t\t#total maximum total mechanical power\n", + "P_in_total = P_m_max_total+ cu_loss_total \t\t\t#total input power\n", + "\n", + "pf = P_in_total/(math.sqrt(3)*V_L*I_aph)\n", + "print ' Power factor at maximum power developed is %.3f leading'%(pf)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Maximum total mechanical power that the motor can develop is 201452.30 W per phase\n", + "ii)Current at maximum power developed is 151.4 A\n", + " Power factor at maximum power developed is 0.857 leading\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22 Page no : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#subscript 1 refers to load 1\n", + "I_1 = 18.\n", + "phi_1 = math.acos(0.8)\n", + "V_L = 440.\n", + "S_1 = math.sqrt(3)*I_1*V_L /1000 \t\t\t#kVA for load 1\n", + "P_1 = S_1*math.cos(phi_1)\n", + "Q_1 = S_1*math.sin(phi_1)\n", + "\n", + "# Calculations\n", + "P_out = 6.\n", + "eta_motor = 88./100\n", + "P_2 = P_out/eta_motor\n", + "\n", + "P_T = P_1+P_2\n", + "phi_T = math.acos(1) \t\t\t#total power factor angle\n", + "Q_T = P_T*math.tan(phi_T)\n", + "\n", + "Q_2 = Q_T - Q_1 \t\t\t#kVAR supplied by motor\n", + "#this will have a negative sign just indicating its leading nature \n", + "phi_2 = math.atan(abs(Q_2)/P_2)\n", + "pf = math.cos(phi_2) \t\t\t#leading\n", + "S_2 = P_2/math.cos(phi_2) \t\t\t#kVA input to the motor\n", + "\n", + "# Results\n", + "print 'kVA input to the motor is %.3f kVA '%(S_2)\n", + "print 'Power factor when driving a 6kW mechanical load is %.4f leading'%(pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kVA input to the motor is 10.688 kVA \n", + "Power factor when driving a 6kW mechanical load is 0.6379 leading\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23 Page no : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "output_power = 8.*10**3\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "R_a = 0.\n", + "X_s = 8.\t\t\t#armature resistance and syncronous reactance\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", + "eta = 88./100\n", + "input_power = output_power/eta\n", + "\n", + "# Calculations and Results\n", + "#minimum current occurs at max power factors\n", + "phi = math.acos(1)\n", + "I_a_min = input_power/(math.sqrt(3)*V_L*math.cos(phi)) \t\t\t#required minimum current \n", + "print 'Minimum current is %.3f A'%(I_a_min)\n", + "E_R = I_a_min * abs(Z_s)\n", + "E_bph = math.sqrt( E_R**2 + V_ph**2 - 2*E_R*V_ph*math.cos(phi+theta) ) \n", + "print 'Induced EMF at full-load is %.3f V'%(E_bph)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum current is 13.122 A\n", + "Induced EMF at full-load is 241.534 V\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.24 Page no : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R_a = 0.8\n", + "X_s = 5.\n", + "Z_s = complex(R_a,X_s) \t\t\t#armature resistance and syncronous reactance\n", + "theta = math.atan(Z_s.imag/Z_s.real) \t\t\t# returns angle in radians \n", + "alpha = (math.pi/2) - theta\n", + "V_t = 3300/math.sqrt(3)\n", + "P_e_in = 800./(3) \t\t\t#per phase\n", + "phi = math.acos(0.8) \t\t\t#leading\n", + "Q_e_in = -P_e_in*math.tan(phi)\n", + "\n", + "# Calculations\n", + "# using the following equation\n", + "# P_e_in = V_t**2*R_a/(abs(Z_s))**2 + V_t*E_b*math.sin(delta-alpha)/abs(Z_S)\n", + "# Q_e_in = V_t**2*X_s/(abs(Z_s))**2 - V_t*E_b*math.cos(delta-alpha)/abs(Z_S)\n", + "E_b_sin_delta_minus_9 = 407.2\n", + "E_b_cos_delta_minus_9 = 2413.6\n", + "#solving further\n", + "delta = math.atan(E_b_sin_delta_minus_9/E_b_cos_delta_minus_9 ) + 9\n", + "E_b = E_b_sin_delta_minus_9/math.sin(math.radians(delta-9))\n", + "\n", + "P_e_in_new = 1200*10**3/3\n", + "# using the following equation again\n", + "# P_e_in = V_t**2*R_a/(abs(Z_s))**2 + V_t*E_b*math.sin(delta-alpha)/abs(Z_S)\n", + "# Q_e_in = V_t**2*X_s/(abs(Z_s))**2 - V_t*E_b*math.cos(delta-alpha)/abs(Z_S)\n", + "\n", + "alpha = delta - math.asin(math.radians(P_e_in_new - V_t**2*R_a/(abs(Z_s))**2 ) / (V_t*E_b/abs(Z_s)))\n", + "Q_e_in_new = V_t**2*X_s/(abs(Z_s))**2 - V_t*E_b*math.cos(math.radians(delta - alpha))/abs(Z_s)\n", + "\n", + "pf = math.cos ( math.atan(abs(Q_e_in_new/P_e_in_new)))\n", + "\n", + "# Results\n", + "print 'New power factor is %.2f leading '%(pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New power factor is 0.01 leading \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.25 Page no : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6.6*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "P_in = 900.*10**3\n", + "R_a = 0.\n", + "X_s = 20. \t\t\t#armature resistance and synchronous reactance \n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", + "E_b_L = 8.6*10**3\n", + "E_bph = E_b_L/math.sqrt(3) \n", + "\n", + "# Calculations\n", + "#refer to phasor diagram\n", + "OA = V_ph\n", + "AB = E_bph \t\t\t#OB = E_Rph\n", + "\n", + "I_a_cosphi = P_in/(math.sqrt(3)*V_L) \t\t\t#I_a*math.cos(phi)\n", + "BC = I_a_cosphi*abs(Z_s) \t\t\t#BC is a vector in phasor diagram\n", + "\n", + "OC = math.sqrt(AB**2 -BC**2 )- OA \t\t\t#from phasor diagram\n", + "I_a_sinphi = OC/abs(Z_s) \t\t\t#product of I_a and math.sin(phi)\n", + "phi = math.atan (I_a_sinphi/I_a_cosphi)\n", + "I_a = I_a_cosphi/math.cos(phi) \t\t\t#product of I_a and math.cos(phi)\n", + "\n", + "# Results\n", + "print 'Motor current is %.3f A'%(I_a)\n", + "print 'Power factor of motor is %f leading'%(cos(phi))\n", + "print 'Note:There is slight mismatch in answer due to the approximation made during I_a* sinphi calculation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Motor current is 90.643 A\n", + "Power factor of motor is 0.868564 leading\n", + "Note:There is slight mismatch in answer due to the approximation made during I_a* sinphi calculation\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.26 Page no : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables\n", + "#subscipt 1 refers to factory load\n", + "P_1 = 1800.\n", + "phi_1 = math.acos(0.6) \t\t\t#lagging\n", + "Q_1 = P_1*math.tan(phi_1)\n", + "\n", + "#Subscript 2 refers to synchronous condenser\n", + "P_2 = 0.\n", + "\n", + "# Calculations\n", + "#Subscript T refers to combination of condenser and factory load\n", + "P_T = P_1+P_2\n", + "phi_T = math.acos(0.95) \t\t\t#lagging\n", + "Q_T = P_T*math.tan(phi_T)\n", + "\n", + "kva_rating = math.sqrt(P_T**2+ Q_T**2)\n", + "\n", + "Q_2 = Q_T - Q_1\n", + "\n", + "# Results\n", + "print 'i)kVA rating of synchronous condender is %.3f kVA Minus sign indicates leading nature'%(Q_2)\n", + "print 'ii)kVA rating of total factory is %.4f kVA'%(kva_rating)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)kVA rating of synchronous condender is -1808.369 kVA Minus sign indicates leading nature\n", + "ii)kVA rating of total factory is 1894.7368 kVA\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.27 Page no : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I_1 = 35.\n", + "phi_1 = math.acos(0.8)\n", + "V_L = 440.\n", + "S_1 = math.sqrt(3)*I_1*V_L /1000 \t\t\t#in kVA\n", + "\n", + "\n", + "# Calculations\n", + "P_1 = S_1*math.cos(phi_1)\n", + "Q_1 = S_1*math.sin(phi_1)\n", + "\n", + "P_out = 12. \t\t\t#motor load\n", + "eta_motor = 85./100\n", + "P_2 = P_out/eta_motor\n", + "\n", + "P_T = P_1 + P_2\n", + "phi_T = math.acos(1)\n", + "Q_T = P_T * math.tan(phi_T)\n", + "\n", + "\n", + "Q_2 = Q_T - Q_1 \t\t\t#kVA supplied by motor\n", + "#negative sign of Q_2 indicates its leading nature\n", + "phi_2 = math.atan(abs(Q_2)/P_2)\n", + "S_2 = P_2/math.cos(phi_2)\n", + "\n", + "# Results\n", + "print 'Power factor when motor supplies 12kW load is %.4f leading'%(math.cos(phi_2))\n", + "print 'kVA input to the motor is %.3f kVA'%(S_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power factor when motor supplies 12kW load is 0.6615 leading\n", + "kVA input to the motor is 21.341 kVA\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.28 Page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400\n", + "V_ph = V_L/math.sqrt(3)\n", + "Z_s = complex(0.5,4) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag/Z_s.real) \t\t\t# returns angle in radians \n", + "\n", + "I_aph = 60.\n", + "phi = math.acos(0.866) \t\t\t#leading\n", + "power_losses = 2*10**3\n", + "\n", + "# Calculations\n", + "E_bph = math.sqrt( (I_aph*abs(Z_s))**2 + (V_ph)**2 - 2*(I_aph*abs(Z_s))*(V_ph)*math.cos(phi+theta) ) \n", + "delta = theta \t\t\t#for P_m_max\n", + "P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph**2/abs(Z_s))*math.cos(delta)\n", + "P_m_max_total = 3 * P_m_max\n", + "P_out_max = P_m_max_total- power_losses\n", + "\n", + "# Results\n", + "print 'Maximum power output is %.4f kW'%(P_out_max*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power output is 51.3899 kW\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.29 Page no : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 6.6*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "I_L = 50.\n", + "I_aph = I_L\n", + "Z_s = complex(1.5,8) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag/Z_s.real) \t\t\t# returns angle in radians \n", + "E_Rph = I_aph*abs(Z_s)\n", + "\n", + "# Calculations and Results\n", + "#part(i)\n", + "phi = math.acos(0.8)\n", + "P_in = math.sqrt(3)*V_L*I_L*math.cos(phi) \t\t\t#for both lag and lead supplied power will be the same\n", + "print 'i)Power supplied to the motor is %.3f kW'%(P_in*10**-3)\n", + "#part(ii)\n", + "E_bph_lag = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(theta-phi) ) \t\t\t#for lagging power factor\n", + "#Note that E_bph_lag > V_ph\n", + "print 'ii)Induced EMF for 0.8 power factor lag is %.3f V'%(E_bph_lag)\n", + "E_bph_lead = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(theta+phi) ) \t\t\t#for leading power factor\n", + "#Note that E_bph_lead < V_ph\n", + "print ' Induced EMF for 0.8 power factor lead is %.3f V'%(E_bph_lead)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Power supplied to the motor is 457.261 kW\n", + "ii)Induced EMF for 0.8 power factor lag is 3521.267 V\n", + " Induced EMF for 0.8 power factor lead is 4007.170 V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.30 Page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 400.\n", + "V_ph = V_L/math.sqrt(3)\n", + "P_out = 7.5*735.5\n", + "eta = 85./100 \t\t\t#efficiency\n", + "R_a = 0.\n", + "X_s = 10. \t\t\t#armature resistance and synchronous reactance\n", + "Z_s = complex(R_a,X_s)\t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", + "\n", + "# Calculations and Results\n", + "P_in = P_out/eta\n", + "phi = math.acos(1) \t\t\t#for mimimum current power factor is maximum\n", + "I_L = P_in/(math.sqrt(3)*V_L*math.cos(phi)) \n", + "I_aph = I_L\n", + "print 'Minimum current is %.3f A at full load condition '%(I_L)\n", + "\n", + "E_Rph = I_aph*abs(Z_s)\n", + "E_bph = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(phi+theta) ) \n", + "print 'and corresponding EMF is %.4f V'%(E_bph)\n", + "\n", + "# note : rounding off error.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum current is 9.367 A at full load condition \n", + "and corresponding EMF is 240.4216 V\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.31 Page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V_L = 3.3*10**3\n", + "V_ph = V_L/math.sqrt(3)\n", + "V_t = V_ph\n", + "Pole = 24.\n", + "f = 50. \t\t\t#Pole and frequency\n", + "P = 1000.*10**3\n", + "R_a = 0\n", + "X_s = 3.24 \t\t\t#armature resistance and synchronous reactance\n", + "Z_s = complex(R_a,X_s) \t\t\t#synchronous impedance\n", + "theta = math.atan(Z_s.imag) \t\t\t# returns angle in radians \n", + "phi = math.acos(1)\n", + "I_aph = P/(math.sqrt(3)*V_L*math.cos(phi))\n", + "\n", + "# Calculations\n", + "E_Rph = I_aph*abs(Z_s)\n", + "E_bph = math.sqrt( E_Rph**2 + V_ph**2 - 2*E_Rph*V_ph*math.cos(phi+theta) ) \n", + "\n", + "P_m_max = 3*(E_bph*V_ph/abs(Z_s)) \t\t\t#maximum power that can be delivered\n", + "N_s = 120*f/Pole \t\t\t#synchronous speed\n", + "T_max = P_m_max /(2*math.pi*N_s/60) \t\t\t#maximum torque that can be developed\n", + "\n", + "# Results\n", + "print 'Maximum power and torque the motor can deliver is %.3f kW and %.2f *10**3 Nm respectively'%(P_m_max*10**-3,T_max/1000)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power and torque the motor can deliver is 3211.633 kW and 122.68 *10**3 Nm respectively\n" + ] + } + ], + "prompt_number": 42 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1.png new file mode 100755 index 00000000..a18f9a05 Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_1.png new file mode 100755 index 00000000..a18f9a05 Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_1.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_2.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_2.png new file mode 100755 index 00000000..a18f9a05 Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_2.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4.png new file mode 100755 index 00000000..4e0892cf Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_1.png new file mode 100755 index 00000000..4e0892cf Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_1.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_2.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_2.png new file mode 100755 index 00000000..4e0892cf Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_2.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7.png new file mode 100755 index 00000000..6244be52 Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_1.png new file mode 100755 index 00000000..6244be52 Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_1.png differ diff --git a/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_2.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_2.png new file mode 100755 index 00000000..6244be52 Binary files /dev/null and b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_2.png differ diff --git a/Digital_Communications/Chapter2.ipynb b/Digital_Communications/Chapter2.ipynb deleted file mode 100755 index 9cc6d1df..00000000 --- a/Digital_Communications/Chapter2.ipynb +++ /dev/null @@ -1,290 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 2: SAMPLING THEORY AND PULSE MODULATION

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, page no 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#find Nquist Rate\n", - "\n", - "#Variable declaration\n", - "#given \n", - "pi=3.14\n", - "w1=50*pi\n", - "w2=300*pi\n", - "w3=100*pi\n", - "#w=2*%pi*f\n", - "\n", - "#Calculation\n", - "f1=w1/(2*pi)\n", - "f2=w2/(2*pi)\n", - "f3=w3/(2*pi)\n", - "fm=f2 #fm = maximum frquency is present at the signal\n", - "\n", - "#Result\n", - "print('maximum frquency of the signal is = %.2f Hz' %f2)\n", - "fs=2*fm #Nyquist rate\n", - "print('Nquist Rate of Signal is = %.2f Hz' %fs)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum frquency of the signal is = 150.00 Hz\n", - "Nquist Rate of Signal is = 300.00 Hz\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 , page no 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Nquist Rate and Nquist time interval\n", - "\n", - "#Variable declaration\n", - "#given\n", - "w1=5000*math.pi\n", - "w2=3000*math.pi;\n", - "f1=w1/(2*math.pi);\n", - "f2=w2/(2*math.pi);\n", - "\n", - "#Calculation\n", - "fm=f1 #fm = maximum frquency is present at the signal\n", - "fs=2*fm #Nyquist rate\n", - "Ts=1.0/(2.0*fm) #frequncy =1/time\n", - "Ts=Ts*(10**3)\n", - "\n", - "#Result\n", - "print('maximum frquency of the signal is = %.f Hz' %f1)\n", - "print('Nquist Rate of the given Signal is = %.f Hz' %fs)\n", - "print('Nquist Interval of the given signal is = %.1f m Sec' %Ts)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum frquency of the signal is = 2500 Hz\n", - "Nquist Rate of the given Signal is = 5000 Hz\n", - "Nquist Interval of the given signal is = 0.2 m Sec\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3, page no 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find Nquist Rate \n", - "\n", - "#Variable declaration\n", - "#given\n", - "f=100.0 # Frequency component of continuous-time signal\n", - "\n", - "#Calculation\n", - "fs=2*f #Nyquist rate\n", - "\n", - "#Result\n", - "print('i) To avoid aliasing Nquist Rate is = %.f Hz' %fs)\n", - "print('ii) It is theoretical example ')\n", - "print('iii) It is theoretical example ')\n", - "print('iv) It is theoretical example ')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) To avoid aliasing Nquist Rate is = 200 Hz\n", - "ii) It is theoretical example \n", - "iii) It is theoretical example \n", - "iv) It is theoretical example \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4, page no 52 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Nquist Rate of Continous signal\n", - "\n", - "#Variable declaration\n", - "#given\n", - "w1=50*math.pi\n", - "w2=300*math.pi\n", - "w3=100*math.pi\n", - "\n", - "#Calculation\n", - "f1=w1/(2*math.pi)\n", - "f2=w2/(2*math.pi)\n", - "f3=w3/(2*math.pi)\n", - "fmax=f2 #fmax = Highest frquency component of the message signal\n", - "fs=2*fmax #Nyquist rate\n", - "\n", - "#Result\n", - "print('Highest frquency component of the message signal will be fmax = %.f Hz' %fmax)\n", - "print('Nquist Rate of the given Signal is = %.f Hz' %fs)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Highest frquency component of the message signal will be fmax = 150 Hz\n", - "Nquist Rate of the given Signal is = 300 Hz\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 2.7, page no 67

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#find amplitude distortion at highest frquency\n", - "\n", - "#Variable declaration\n", - "#given\n", - "fs=9.5 #samplig frequncy\n", - "fmax=1 #maximum frequncy\n", - "t=0.2 #pulse width\n", - "\n", - "#Calculation\n", - "c=3*10**8\n", - "f=fmax\n", - "H1=t*(0.9933) #aperture effect at highest frequency, sinc(f*t)=0.9933 (given)\n", - "H1=H1*100\n", - "\n", - "#Result\n", - "print('|H(1)|=%.2f' %H1)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "|H(1)|=19.87\n", - "Approximation error\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8, page no 74 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Calculate Transmission Bandwidth\n", - "\n", - "#Variable declaration\n", - "#given\n", - "fm=3.0*(10^3)\n", - "fs=8.0*(10^3) # sampling frequncy\n", - "\n", - "#Calculation\n", - "Ts=1.0/fs\n", - "t=0.1*Ts\n", - "BW=1.0/(2*t) #Bandwidth\n", - "BW=BW/(10^3)\n", - "\n", - "#Result\n", - "print('Transmission Bandwidth of PAM signal is kHz = %.f Khz ' %BW)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Transmission Bandwidth of PAM signal is kHz = 40 Khz \n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter3.ipynb b/Digital_Communications/Chapter3.ipynb deleted file mode 100755 index 805bc62b..00000000 --- a/Digital_Communications/Chapter3.ipynb +++ /dev/null @@ -1,2238 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 3: WAVEFORM CODING TECHNIQUES

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3,1 Page No 110" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print('This is a Theoretical example')\t" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This is a theoretcal example\n" - ] - } - ], - "prompt_number": 104 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3,2,i, Page No 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#find code word length\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512 #Quantization levels\n", - "#q=2^v\n", - "\n", - "#Calculation\n", - "v=math.log10(512)/math.log10(2)\n", - "\n", - "#Result\n", - "print(\"The code word legth is = %.f bits\" %v)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The code word legth is = 9 bits\n" - ] - } - ], - "prompt_number": 105 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.ii, Page No 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#find The transmission Bandwidth\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512.0 #Quantization levels\n", - "v=9.0\n", - "\n", - "#Calculation\n", - "bw=v*fm*10**-6\n", - "\n", - "#Result\n", - "print(\"The transmission Bandwidth is = %.1f MHz\" %bw)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transmission Bandwidth is = 37.8 MHz\n" - ] - } - ], - "prompt_number": 106 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.iii, Page No 111 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find Final Bit rate\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512.0 #Quantization levels\n", - "v=9.0\n", - "\n", - "#Calculation\n", - "fs=2*fm\n", - "r=v*fs #signaling rate\n", - "\n", - "#Result\n", - "print(\"Final Bit rate =%.1f x 10^6 bits/sec\" %(r/(10**6)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final Bit rate =75.6 x 10^6 bits/sec\n" - ] - } - ], - "prompt_number": 107 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.iv, Page No 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find Output signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512 #Quantization levels\n", - "v=9.0\n", - "\n", - "#Calculation\n", - "sn=4.8+6*v #noise in dB\n", - "\n", - "\n", - "print(\"Output signal to noise ratio is = %.1f dB\" %sn)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal to noise ratio is = 58.8 dB\n" - ] - } - ], - "prompt_number": 108 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.i, Page No 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find bits per sample\n", - "\n", - "#Variable Declaration\n", - "fmax=4*10**3\n", - "xmax=3.8\n", - "snr=100\n", - "\n", - "#Calculation\n", - "P=30*10**-3\n", - "v=(math.log10(((snr*xmax**2)/(3*P)))/(2*math.log10(2)))\n", - "\n", - "#Result\n", - "print(\"Number of bits required per sample are = %.2f bits\" %v)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of bits required per sample are = 6.98 bits\n" - ] - } - ], - "prompt_number": 109 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.ii, Page No 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find Transmission Bandwith\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=4*10**3 #Bandwidth of PCM\n", - "xmax=3.8\n", - "snr=100 #Signal to Noise Ratio\n", - "outputs=30.0\n", - "v=7.0\n", - "\n", - "#Calculation\n", - "bw=outputs*v*fm \n", - "r=bw*2\n", - "bw=bw/10**3\n", - "\n", - "#Result\n", - "print('Transmission Bandwith R = %.f kHz' %bw)\n", - "r=r/1000\n", - "print('Signaling rate R = %.f bits/sec' %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Transmission Bandwith R = 840 kHz\n", - "Signaling rate R = 1680 bits/sec\n" - ] - } - ], - "prompt_number": 110 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4, Page No 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#find sampling rate,number of bits,bit rate,bandwidht\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "emax=0.001\n", - "de=2*emax\n", - "fm=100.0\n", - "xmax=10.0\n", - "\n", - "#Calculation\n", - "q=(2*xmax)/de\n", - "fs=2*fm\n", - "v=(math.log10(q))/math.log10(2)\n", - "v=math.ceil(v)\n", - "r=v*fs\n", - "\n", - "#Result\n", - "print('1. sampling Frequncy = %.f Hz ' %fs) \n", - "print('2. No.of bits in PCM = %.f bits ' %v) \n", - "print('3. sampling rate = %.f bits per second ' %r)\n", - "r=r/2\n", - "print('4. Transmission Bandwidth = %.f Hz ' %r) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. sampling Frequncy = 200 Hz \n", - "2. No.of bits in PCM = 14 bits \n", - "3. sampling rate = 2800 bits per second \n", - "4. Transmission Bandwidth = 1400 Hz \n" - ] - } - ], - "prompt_number": 111 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5, Page No 113 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Bandwidth,Sampling Rate\n", - "\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=3.4*10**3\n", - "N=24\n", - "r=1.5*10**6\n", - "encoder=8\n", - "\n", - "#Calculation\n", - "BW=N*fm\n", - "BW=BW/10**3\n", - "r1=r/N\n", - "fs=r1/encoder\n", - "\n", - "#Result\n", - "print(\"i. Channel Bandwith is = %.2f kHz\" %BW)\n", - "print(\"ii. Sampling frequency is = %.2f Hz or samples per second.\" %fs)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i. Channel Bandwith is = 81.60 kHz\n", - "ii. Sampling frequency is = 7812.50 Hz or samples per second.\n" - ] - } - ], - "prompt_number": 112 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, Page No 114 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find Signal Bandwidth,Noise Ratio\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "v=7\n", - "r=50*10**6\n", - "\n", - "#Calculation\n", - "#fs=2*fm\n", - "fm=r/(2*v)\n", - "snr=1.8+(6*v);\n", - "fm=fm*10**-6\n", - "\n", - "#Result\n", - "print('i. Maximum message Bandwidth is = %.2f MHz ' %fm)\n", - "print('ii. signal to quantization niose ration = %.2f dB ' %snr)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i. Maximum message Bandwidth is = 3.57 MHz \n", - "ii. signal to quantization niose ration = 43.80 dB \n" - ] - } - ], - "prompt_number": 113 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7, Page No 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#find i)bits per sample,ii)transmission rate\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=3*10**3\n", - "q=16\n", - "\n", - "#Calculation\n", - "v=(math.log10(q))/math.log10(2)\n", - "\n", - "#Result\n", - "print('i) Bits in code word= %.f bits' %v)\n", - "fs=2*fm\n", - "r=v*fs\n", - "print('ii) it trasmission rate= %.f x 10^3 bits per second' %(r/(10**3)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Bits in code word= 4 bits\n", - "ii) it trasmission rate= 24 x 10^3 bits per second\n" - ] - } - ], - "prompt_number": 114 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page No 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=3.5*10**3\n", - "r=50*10**3\n", - "\n", - "#Calculation\n", - "fs=2*fm\n", - "rms=0.2\n", - "xmax=2\n", - "v=r/fs #signaling rate r=v*fs\n", - "v=math.ceil(v)\n", - "P=(rms**2)/1\n", - "SNR=((3*P*2**(2*v))/(xmax**2))\n", - "SN=10*math.log10(SNR)\n", - "SN=math.ceil(SN)\n", - "\n", - "#Result\n", - "print(\"signal to niose ratio =%.f dB\" %SN)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "signal to niose ratio =33 dB\n" - ] - } - ], - "prompt_number": 115 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10, Page No 117 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find i)noise ratio ii)bits\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "Am=3.0\n", - "v=10.0\n", - "\n", - "#Calculation\n", - "SNR=1.8+6*v #noise ratio \n", - "SN=40\n", - "v=(SN-1.8)/6\n", - "\n", - "#Result\n", - "print(\"i) Signal to Quantization noise ratio = %.1f dB\" %SNR)\n", - "print(\"ii) Bits required to get signal to niose ratio of 40dB = %.f \" %math.ceil(v))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Signal to Quantization noise ratio = 61.8 dB\n", - "ii) Bits required to get signal to niose ratio of 40dB = 7 \n" - ] - } - ], - "prompt_number": 116 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11, Page No 117 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Maximum frequency\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "v=7\n", - "SNR=1.8+6*v\n", - "r=56*10**3\n", - "\n", - "#Calculation\n", - "fs=r/v #r=v*fs signaling rate\n", - "fm=fs/2 #Nquset rate\n", - "\n", - "#Result\n", - "fm=fm/10**3\n", - "print(\"Maximum frequency is = %.f kHz\" %fm)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum frequency is = 4 kHz\n" - ] - } - ], - "prompt_number": 117 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.14, Page No 129 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Maximum Amplitude\n", - "\n", - "#Variable Declaration\n", - "fm=3*10**3.0\n", - "\n", - "#Calculation\n", - "Nyquistrate=2*fm #Nyquistrate\n", - "fs=5*Nyquistrate #Samplingfrquency\n", - "Ts=1/fs #Sampling Interval\n", - "de=0.25 #step size\n", - "fm1=2*10**3.0\n", - "Am=de/(2*math.pi*fm1*Ts)\n", - "\n", - "#Result\n", - "print(\"Maximum Amplitude = %.4f Volts\" %Am)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum Amplitude = 0.5968 Volts\n" - ] - } - ], - "prompt_number": 118 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.16, Page No 130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find signaling rate\n", - "\n", - "#Variable Declaration\n", - "fs1=8*10**3.0\n", - "de=31.25*10**-3\n", - "q=64.0\n", - "\n", - "#Calculation\n", - "v=math.log(q,2)\n", - "r=v*fs1 #signaling rate\n", - "fm=3*10**3.0\n", - "A=1\n", - "fs2=(2*math.pi*fm*A)/(de)\n", - "\n", - "#Result\n", - "r=r*10**-3\n", - "print(\"Signaling rate of PCM is = %.f kHz\" %r)\n", - "fs2=fs2*10**-3\n", - "print(\"The signaling rate of DM is = %.2f kHz\" %fs2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signaling rate of PCM is = 48 kHz\n", - "The signaling rate of DM is = 603.19 kHz\n" - ] - } - ], - "prompt_number": 119 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.17, Page No 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "fs=64.0*10**3 #frequency\n", - "fm=2.0*10**3 #Sinosoidal input signal sample \n", - "fM=4.0*10**3 #bandwidth\n", - "\n", - "#Calculation\n", - "SNR=(3*fs**3)/(8*math.pi**2*fm**2*fM) #Signal to noise ratio\n", - "SNRO=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print(\"Output signal to noise ratio = %.2f dB\" %SNRO)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal to noise ratio = 27.94 dB\n" - ] - } - ], - "prompt_number": 120 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.18, Page No 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find signal to Quatization noise ratio \n", - "\n", - "#Variable Declaration\n", - "fs=8.0*10**3 #Sampling frequency\n", - "r=64.0*10**3 #Data Rate\n", - "N=8 #number of bits\n", - "\n", - "#Calculation\n", - "SNR=(1.8+6*N) #signal to Quatization noise ratio\n", - "\n", - "#Result\n", - "print(\"Signal to Quatization noise ratio of PCM system is = %.f dB\" %SNR)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signal to Quatization noise ratio of PCM system is = 50 dB\n" - ] - } - ], - "prompt_number": 121 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.20, Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find sampling rate,quantizing level\n", - "\n", - "#Variable Declaration\n", - "r=36000\n", - "fm=3.2*10**3\n", - "\n", - "#Calculation\n", - "fs=2*fm #Nquest rate\n", - "v=r/fs #r=v*fs signaling rate\n", - "v=math.floor(v)\n", - "q=2**v\n", - "fs1=r/v\n", - "\n", - "#Result\n", - "print(\"Quantizing level q = %.f \" %q)\n", - "fs1=fs1/1000\n", - "print(\"sampling rate fs = %.1f kHz \" %fs1)\n", - "print(\"Number of binary digits = %.f \" %v)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizing level q = 32 \n", - "sampling rate fs = 7.2 kHz \n", - "Number of binary digits = 5 \n" - ] - } - ], - "prompt_number": 122 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.21, Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find time duration of 1bit binary encoded signal\n", - "\n", - "#Variable Declaration\n", - "fs=input(\"Enter the Nyquist rate of Signal fs(Hz)=\")\n", - "q=input(\"Enter the Quantization levels q =\")\n", - "\n", - "#Calculation\n", - "v=math.log(q,2) #binary pulses transmitted per second\n", - "t=1.0/(v*fs) #Nyquist interval\n", - "\n", - "#Result\n", - "print('Time duration of binary signal t = %.4f sec ' %t)\n", - "#output\n", - "#Enter the Nyquist rate fs(Hz)=3\n", - "#Enter the Quantization levels q =5\n", - "#time duration of 1bit binary signal \n", - "#t=0.1435589 sec" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Nyquist rate of Signal fs(Hz)=23\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Quantization levels q =34\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time duration of binary signal t = 0.0085 sec \n" - ] - } - ], - "prompt_number": 123 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.23, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "SNR=40\n", - "SNRO=10**(SNR/10)\n", - "\n", - "#SNR=3(q**2)/2, Signal to Quantization noise ratio\n", - "\n", - "#Calculation\n", - "q=math.sqrt((2*SNRO)/3)\n", - "q=math.ceil(q)\n", - "v=math.log(q,2) #q=2**v Quantization levels\n", - "v=math.ceil(v)\n", - "snr=1.76+6.02*v #output Signal to Quantization noise ratio\n", - "\n", - "#Result\n", - "print(\"Output Signal to Quantization noise ratio = %.1f dB\" %snr)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output Signal to Quantization noise ratio = 43.9 dB\n" - ] - } - ], - "prompt_number": 124 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24.i, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Quantizing levels,minimum number of bits per sample\n", - "\n", - "#Variable Declaration\n", - "SNRO=30.0\n", - "fmin=300.0\n", - "fmax=3300.0\n", - "fs=80000.0\n", - "\n", - "#Calculation\n", - "#SNRO=1.76+20log10(q)\n", - "q=10**((SNRO-1.76)/20)\n", - "q=math.ceil(q)\n", - "v=math.log(q,2)\n", - "\n", - "#Result\n", - "print('Quantizing levels required is =%.f' %q)\n", - "print('minimum number of bits per sample are=%.1f that is approximately 5' %v)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizing levels required is =26\n", - "minimum number of bits per sample are=4.7 that is approximately 5\n" - ] - } - ], - "prompt_number": 125 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24.ii, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find minimum required bandwidth\n", - "\n", - "#Variable Declaration\n", - "SNRO=30.0 #Signal to quantisizing noise ratio\n", - "fmin=300.0 #min frequency band\n", - "fmax=3300.0 #max frequency band\n", - "fs=8000.0 #Sampling rate\n", - "v=5.0 #Minimum number of bits per sample\n", - "\n", - "#Calculation\n", - "fPCM=(v*fs)/2\n", - "fPCM=fPCM/1000\n", - "\n", - "#Result\n", - "print('minimum required bandwidth =%.f kHz' %fPCM)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "minimum required bandwidth =20 kHz\n" - ] - } - ], - "prompt_number": 126 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24.iii, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Quantizing levels,minimum number of bits per sample and bandwidth\n", - "\n", - "#Variable Declaration\n", - "SNRO=30.0 #Signal to quantisizing noise ratio\n", - "fmin=300.0 #min frequency band\n", - "fmax=3300.0 #max frequency band\n", - "fs=8000.0 #Sampling rate\n", - "\n", - "#Calculation\n", - "q=10**((SNRO+10.1)/20)\n", - "q=math.ceil(q)\n", - "v=math.log(q,2)\n", - "v=math.ceil(v)\n", - "\n", - "#Result\n", - "print('Quantizing levels need is =%.f' %q)\n", - "print('minimum number of bits per sample is =%.f' %v)\n", - "fPCM=(v*fs)/2\n", - "fPCM=fPCM/1000\n", - "print('minimum required bandwidth =%.f Khz' %fPCM)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizing levels need is =102\n", - "minimum number of bits per sample is =7\n", - "minimum required bandwidth =28 Khz\n" - ] - } - ], - "prompt_number": 127 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.27, Page No 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#determine the Maximum Amplitude,\n", - "\n", - "#Variable Declaration\n", - "de=250*10**-3\n", - "wm=2*math.pi*1000 \n", - "fs=3*10**3\n", - "Ts=1/fs\n", - "\n", - "#Calculation\n", - "Amax=(de*3*fs*2)/(wm) #Amplitude\n", - "SNR=(3.0*((3*6*(10**3))**3))/((8*(math.pi**2)*(10**3)**3))\n", - "\n", - "#Result\n", - "print('Maximum Amplitude= %.1f mV' %(Amax*(10**2)))\n", - "print('Signal to noise ratio = %.2f dB' %(10*math.log10(SNR)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum Amplitude= 71.6 mV\n", - "Signal to noise ratio = 23.46 dB\n" - ] - } - ], - "prompt_number": 128 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.29, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of bits per sample\n", - "\n", - "#Variable Declaration\n", - "SNR=20\n", - "averagepower=30*10**-3\n", - "SNRO=10**(SNR/10)\n", - "A=3.8\n", - "\n", - "#SNRO=average signal power/Quatizing power\n", - "#de=(2*A)/L\n", - "\n", - "#Calculation\n", - "L=math.sqrt((SNRO*A**2)/(3*averagepower))\n", - "n=math.log(L,2)\n", - "n=math.ceil(n)\n", - "\n", - "#Result\n", - "print('Bits required per sample =%.f' %n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bits required per sample =7\n" - ] - } - ], - "prompt_number": 129 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30.i, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Normalized power for quantization noise\n", - "\n", - "#Variable Declaration\n", - "fm=3.0*10.0**3\n", - "v=8.0\n", - "VH=5.0\n", - "VL=-5.0\n", - "q=2**v\n", - "\n", - "#Calculation\n", - "de=(VH-VL)/q\n", - "Nq=de**2/12.0 #quantization noise\n", - "\n", - "#Result\n", - "print('Normalized power for quantization noise =%.2f x 10^-6 W' %(Nq*(10**6)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Normalized power for quantization noise =127.16 x 10^-6 W\n" - ] - } - ], - "prompt_number": 130 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30.ii, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find bit transmission rate\n", - "\n", - "#Variable Declaration\n", - "fm=3*10.0**3\n", - "v=8.0\n", - "VH=5.0\n", - "VL=-5\n", - "q=2**v\n", - "\n", - "#Calculation\n", - "fs=2*fm #Nyquist rate\n", - "r=8*fs/1000\n", - "\n", - "#Result\n", - "print('bit transmission rate %.f K bits/s' %r)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "bit transmission rate 48 K bits/s\n" - ] - } - ], - "prompt_number": 131 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30.iii, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Signal to quantization noise ratio\n", - "\n", - "#Variable Declaration\n", - "Nq=127.15*10**-6\n", - "Meansignal=2\n", - "\n", - "#Calculation\n", - "P=Meansignal/1\n", - "SNR=P/Nq\n", - "SNRq=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print('Signal to quantization noise ratio %.2f dB ' %SNRq)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signal to quantization noise ratio 41.97 dB \n" - ] - } - ], - "prompt_number": 132 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.31, Page No 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find i)SNR ii)output bit rate iii)no.of bits recorded\n", - "\n", - "#Variable Declaration\n", - "N=16.0\n", - "v=16.0\n", - "fs=44.1*10**3\n", - "\n", - "#Calculation\n", - "SNR=1.76+6*N\n", - "bitrate=2*v*fs\n", - "outputbitrate=2*bitrate*10**-6 #including addtional 100% over head\n", - "CD=outputbitrate*3600*10**-3\n", - "\n", - "#Result\n", - "print('i)Out put signal noise ratio =%.2f dB' %SNR)\n", - "print('ii)output bit rate =%.3f Mbits/sec' %outputbitrate)\n", - "print('iii)no.of bits recorded in CD =%.2f gigabits' %CD)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Out put signal noise ratio =97.76 dB\n", - "ii)output bit rate =2.822 Mbits/sec\n", - "iii)no.of bits recorded in CD =10.16 gigabits\n" - ] - } - ], - "prompt_number": 133 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.32, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find output SNR\n", - "#Variable Declaration\n", - "fm=1*10.0**3\n", - "fs=32*10**3\n", - "\n", - "#Calculation\n", - "FM=4*10**3 #Bandwidth\n", - "SNR=(3*fs**3)/(8*math.pi**2*fm**2*FM) #SNR\n", - "SNRO=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print('Output signal to noise ratio %.2f dB' %SNRO)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal to noise ratio 24.93 dB\n" - ] - } - ], - "prompt_number": 134 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.33.i, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step size\n", - "\n", - "#Variable Declaration\n", - "fs=64000.0 #samples/sec\n", - "Amax=1.0 #Maximum signal amplitude\n", - "fm=3500.0 #Sample Rate\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*Amax)/fs*1000\n", - "\n", - "#Result\n", - "print('Step Size %.2f mV ' %de)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Step Size 343.61 mV \n" - ] - } - ], - "prompt_number": 135 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.33ii, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Quantizatio noise power \n", - "#Variable Declaration\n", - "fs=64000.0 #sample Rate\n", - "Amax=1.0 #Maximum signal Amplitude\n", - "fm=3500.0\n", - "\n", - "#Calculation\n", - "de=343.6117*10**-3 #step size\n", - "Nq=de**2/3.0 #Quantizatio noise power\n", - "Nqd=Nq*(fm/fs)*1000\n", - "\n", - "#Result\n", - "print('Quantizatio noise power %.3f mW' %Nqd)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizatio noise power 2.152 mW\n" - ] - } - ], - "prompt_number": 136 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.33iii, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find SNR\n", - "\n", - "#Variable Declaration\n", - "fs=64000.0\n", - "Amax=1.0\n", - "fm=3500.0\n", - "Nqd=2.1522995*10**-3\n", - "\n", - "#Calculation\n", - "So=Amax**2/2\n", - "SNR=So/Nqd\n", - "SNRO=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print('Output signal noise ratio dB %.3f dB' %SNRO)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal noise ratio dB 23.661 dB\n" - ] - } - ], - "prompt_number": 137 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.34, Page No 156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Assuming signal is sampled at the rate 20% above Nyquist rate\n", - "\n", - "#Variable Declaration\n", - "fm=4.5*10**6\n", - "q=1024.0\n", - "\n", - "#Calculation\n", - "fs=1.2*2*fm #20% above Nyquist rate\n", - "v=math.log(q,2)\n", - "r=v*fs/10**6\n", - "\n", - "#Result\n", - "print('no.of bits/sec = %.f M bit/sec' %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "no.of bits/sec = 108 M bit/sec\n" - ] - } - ], - "prompt_number": 138 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.35, Page No 156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume bandwidth of the singal is 4kHz\n", - "\n", - "#Variable Declaration\n", - "fs=32000.0\n", - "A=2.0\n", - "fm=4000.0\n", - "BW=4000.0\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*A)/fs\n", - "Nq=de**2/3\n", - "SNR=(3*fs**3)/(8*math.pi**2*fm**2*BW)\n", - "\n", - "#Result\n", - "print('i)step size = %.3f M Volt' %de)\n", - "print('ii)noise power = %.3f W' %Nq)\n", - "print('iii)SNR= = %.3f ' %SNR)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)step size = 1.571 M Volt\n", - "ii)noise power = 0.822 W\n", - "iii)SNR= = 19.454 \n" - ] - } - ], - "prompt_number": 139 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.36, Page No 157" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assuming signal is sampled at the rate 20% above Nyquist rate\n", - "\n", - "#Variable Declaration\n", - "fm=15*10**3\n", - "fs=1.2*2*fm\n", - "q=65536\n", - "\n", - "#Calculation\n", - "v=math.log(q,2)\n", - "r=v*fs/1000\n", - "BW=r/2\n", - "\n", - "#Result\n", - "print('i)signaling rate,= %.f K bits/sec ' %r)\n", - "print('ii)bandwidth BW min = %.f kHz ' %BW)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)signaling rate,= 576 K bits/sec \n", - "ii)bandwidth BW min = 288 kHz \n" - ] - } - ], - "prompt_number": 140 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.37, Page No 157" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step size,noise power\n", - "\n", - "#Variable Declaration\n", - "fs=64*10**3\n", - "fm=3500.0\n", - "A=1.0\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*A)/fs #step size\n", - "Nq=(de**2/3)*(fm/fs) #Granular noise power\n", - "\n", - "#Result\n", - "print('i)step size = %.3f Volts' %de)\n", - "print('ii)Nq= %.5f W' %Nq)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)step size = 0.344 Volts\n", - "ii)Nq= 0.00215 W\n" - ] - } - ], - "prompt_number": 141 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.40, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step Nr,Transmission Bandwidth, SNR\n", - "\n", - "#Variable Declaration\n", - "fs=4 #kHz\n", - "N=12\n", - "\n", - "#Calculation\n", - "Nr=2*fs #Nyquest rate\n", - "Bt=1.0/2*N*fs #Transmission Bandwidth\n", - "SNR=1.8+(6*N) \n", - "\n", - "\n", - "#Result\n", - "print('i)Nyquest rate = %.1f kHz' %Nr)\n", - "print('ii)Transmission Bandwidth = %.1f kHz' %Bt)\n", - "print('iii)SNR = %.1f dB' %SNR)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Nyquest rate = 8.0 kHz\n", - "ii)Transmission Bandwidth = 24.0 kHz\n", - "iii)SNR = 73.8 dB\n" - ] - } - ], - "prompt_number": 142 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.41, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step size,noise power\n", - "\n", - "#Variable Declaration\n", - "fm=3.5*10**3\n", - "fs=64*10**3\n", - "A=2.0\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*A)/fs #step size\n", - "Nq=(de**2/3)*(fm/fs) #Granular noise power\n", - "\n", - "#Result\n", - "print('i)step size = %.3f Volts' %de)\n", - "print('ii)Nq= %.1f X 10^-3 W' %(Nq*10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)step size = 0.687 Volts\n", - "ii)Nq= 8.6 X 10^-3 W\n" - ] - } - ], - "prompt_number": 143 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.42, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Bit rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "W=4.5 * 10**6 #khz\n", - "Nr = 2 * W #Nyquist Rate\n", - "Q = 1024\n", - "fs=10.8\n", - "\n", - "#Calculation\n", - "N = math.log(Q,2) #number of binay pulse per word\n", - "Br= N*fs #Bit rate\n", - "Bw= 1.0/2*Br #Bandwidth\n", - "\n", - "#Result\n", - "print('i) Number of binay pulse per word = %.1f k bits/sec' %N)\n", - "print('ii) Bit rate = %.1f k bits/sec' %Br)\n", - "print('iii)Bandwidth= %.1f X 10^-3 kHz' %Bw)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of binay pulse per word = 10.0 k bits/sec\n", - "ii) Bit rate = 108.0 k bits/sec\n", - "iii)Bandwidth= 54.0 X 10^-3 kHz\n" - ] - } - ], - "prompt_number": 144 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.43, Page No 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Bit rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "W=15 #khz\n", - "Nr = 2*W #Nyquist Rate\n", - "Q = 65.53\n", - "fs=44.1 # Sampling rate kHz\n", - "N=16\n", - "\n", - "#Calculation\n", - "Br= N*fs #Bit rate\n", - "Bw= 1.0/2*Br #Bandwidth\n", - "\n", - "#Result\n", - "print('i) Number of binay pulse per word = %.3f bits' %N)\n", - "print('ii) Bit rate = %.1f k bits/sec' %Br)\n", - "print('iii)Bandwidth= %.1f kHz' %Bw)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of binay pulse per word = 16.000 bits\n", - "ii) Bit rate = 705.6 k bits/sec\n", - "iii)Bandwidth= 352.8 kHz\n" - ] - } - ], - "prompt_number": 145 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.44, Page No 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Number of binay pulse per word\n", - "\n", - "#Variable Declaration\n", - "W=3.3 #khz\n", - "fm = 1*10**3 #kHz\n", - "de = 250 #mV\n", - "fs=19.8 # Sampling rate kHz\n", - "\n", - "#Calculation\n", - "A=(de*fs)/(2*math.pi*fm)\n", - "\n", - "#Result\n", - "print('i) Number of binay pulse per word = %.3f' %A)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of binay pulse per word = 0.788\n" - ] - } - ], - "prompt_number": 146 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.45, Page No 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Signaling rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "W=3.3 #khz\n", - "fm = 3300 #Hz\n", - "Snq = 40 #dB\n", - "fs= 8000 # Samples/sec\n", - "\n", - "#Calculation \n", - "N=math.ceil((Snq-4.8)/6) # Number of bits per word\n", - "Q=2**N #\n", - "r=N*fs #Signaling rate k bits/sec\n", - "Bw=1.0/2*r\n", - "\n", - "#Result\n", - "print('i) Number of bits per word = %.1f' %N)\n", - "print('ii) Signaling rate rate = %.1f k bits/sec' %(r/10**3))\n", - "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of bits per word = 6.0\n", - "ii) Signaling rate rate = 48.0 k bits/sec\n", - "iii)Bandwidth= 24.0 kHz\n" - ] - } - ], - "prompt_number": 147 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.46, Page No 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find the maximun frequency with 1 volt amplitude\n", - "\n", - "#Variable Declaration\n", - "de=256*10**-3 #V\n", - "Ts = 10*10**-6 #kHz\n", - "fm = 10 #kHz\n", - "fs= 100 # kHz\n", - "A=1 #V\n", - "\n", - "#Calculation \n", - "wm=(de/A*Ts)*10**7\n", - "\n", - "#Result\n", - "print('i) maximun frequency = %.1f X 10^3 rad/sec' %wm)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) maximun frequency = 25.6 X 10^3 rad/sec\n" - ] - } - ], - "prompt_number": 148 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.47, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find the Signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "Q=256 \n", - "m=255\n", - "\n", - "#Calculation \n", - "SNR=(3*Q**2)/(math.log((1+m),math.e))**2 #dB\n", - "Gc=m/(math.log(1+m)) #Companding gain\n", - "Gc=20*math.log(Gc,10)\n", - "\n", - "#Result\n", - "print('i) The Signal to noise ratio= %.1f dB' %SNR)\n", - "print('ii) The Companding gain = %.1f dB' %Gc)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) The Signal to noise ratio= 6394.0 dB\n", - "ii) The Companding gain = 33.3 dB\n" - ] - } - ], - "prompt_number": 149 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.48, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Signaling rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "fm=15*10**3 #kHz\n", - "Q=200\n", - "fs=2*fm\n", - "\n", - "#Calculation \n", - "N=math.ceil(math.log(Q,2))\n", - "tr=N*fs #Transmission rate kbps\n", - "Bw=1.0/2*tr\n", - "\n", - "#Result\n", - "print('i) Number of bits per Samples = %.1f' %N)\n", - "print('ii) Signaling rate = %.1f k bits/sec' %(tr/10**3))\n", - "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of bits per Samples = 8.0\n", - "ii) Signaling rate = 240.0 k bits/sec\n", - "iii)Bandwidth= 120.0 kHz\n" - ] - } - ], - "prompt_number": 150 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.49, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of quantization level\n", - "\n", - "#Variable Declaration\n", - "tr=36.0 #kbps\n", - "fm=3.4 #kHz\n", - "fs=8\n", - "\n", - "#Calculation \n", - "N=math.ceil(tr/fs)\n", - "Q=2**N\n", - "\n", - "\n", - "#Result\n", - "print('i) number of quantization level = %.1f' %Q)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) number of quantization level = 32.0\n" - ] - } - ], - "prompt_number": 151 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.50, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find delta modulation\n", - "\n", - "#Variable Declaration\n", - "A=1 #V\n", - "fm=3.4 #kHz\n", - "fs=20\n", - "\n", - "#Calculation \n", - "de=1*2*math.pi*(fm/fs)\n", - "\n", - "\n", - "#Result\n", - "print('i) delta modulation = %.2f V' %de)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) delta modulation = 1.07 V\n" - ] - } - ], - "prompt_number": 152 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.51, Page No 163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "W=3.5 #kHz\n", - "r=50.0 #kbps\n", - "Vpp=4 #V\n", - "fs=8\n", - "\n", - "#Calculation \n", - "N=r/fs\n", - "SNR=4.8+(6.8*N)\n", - "\n", - "#Result\n", - "print('i) Signal to noise ratio = %.2f V' %SNR)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Signal to noise ratio = 47.30 V\n" - ] - } - ], - "prompt_number": 153 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.52, Page No 163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "W=1 #MHz\n", - "fs1=3 #MHz\n", - "fs2=2.4 #MHz\n", - "Q=256\n", - "m=255\n", - "\n", - "#Calculation \n", - "SNR=((3*Q**2)/(math.log((1+m),math.e))**2)\n", - "SNR1=63095.73 #SNR=38+10\n", - "Q1=math.sqrt((SNR1*((math.log(256,math.e))**2))/3)\n", - "N1=math.ceil(math.log(Q1,2))\n", - "r=N1*fs2\n", - "Bw=1.0/2*r\n", - "\n", - "#Result\n", - "print('i) Number of bits/word = %.2f ' %N1)\n", - "print('ii) Bit rate = %.1f Mb/s' %r)\n", - "print('iii) Bandwidth = %.1f Mb/s' %Bw)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of bits/word = 10.00 \n", - "ii) Bit rate = 24.0 Mb/s\n", - "iii) Bandwidth = 12.0 Mb/s\n" - ] - } - ], - "prompt_number": 154 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter4.ipynb b/Digital_Communications/Chapter4.ipynb deleted file mode 100755 index e56598ee..00000000 --- a/Digital_Communications/Chapter4.ipynb +++ /dev/null @@ -1,273 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 4: DIGITAL MULTIPLEXERS

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4, page no 190 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Caption: Sampling Rate\n", - "\n", - "#initialisation of variables\n", - "f1=4.0*10**3\n", - "f2=4.5*10**3\n", - "\n", - "#CALCULATIONS\n", - "fsmin=(2*f2)/1000\n", - "\n", - "#RESULTS\n", - "print(\" Sampling rate =%.2f kHz\" %fsmin)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Sampling rate =9.00 kHz\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5, Page No 190 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Caption: Nyquest rate,Signaling rate,bandwidth\n", - "\n", - "#initialisation of variables\n", - "f1=3000.0\n", - "f4=1000.0\n", - "f2=1000.0\n", - "f3=1000.0\n", - "\n", - "#CALCULATIONS\n", - "#Nyquest rate\n", - "nq1=2*f1\n", - "nq2=2*f2\n", - "nq3=2*f3\n", - "nq4=2*f4\n", - "\n", - "#RESULTS\n", - "print('i. Nyquest rate of x1 =%.2fkHz' %nq1)\n", - "print('ii. Nyquest rate of x2 =%.2fkHz' %nq2)\n", - "print('iii. Nyquest rate of x3 =%.2fkHz' %nq3)\n", - "print('iv. Nyquest rate of x4 =%.2fkHz' %nq4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i. Nyquest rate of x1 =6000.00kHz\n", - "ii. Nyquest rate of x2 =2000.00kHz\n", - "iii. Nyquest rate of x3 =2000.00kHz\n", - "iv. Nyquest rate of x4 =2000.00kHz\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6, Page No 190 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find The spacing between two successive pules\n", - "\n", - "#initialisation of variables\n", - "samplingrate=8000.0\n", - "totalsignals=24+1\n", - "\n", - "#CALCULATIONS\n", - "t=1/samplingrate\n", - "T=t/totalsignals\n", - "T=T*10**6 #time is now u sec\n", - "space=T-1\n", - "\n", - "#RESULTS\n", - "print('The spacing between two successive pules %.f u sec' %space)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing between two successive pules 4 u sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7, Page No 191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find signaling rate ,bandwidth\n", - "\n", - "#initialisation of variables\n", - "N=6.0\n", - "fm=5000.0\n", - "\n", - "#CALCULATIONS\n", - "r=2*fm #sampling rate\n", - "sr=N*r #signalingrate\n", - "BW=N*fm #Bandwith\n", - "sr=sr/1000\n", - "BW=BW/1000\n", - "\n", - "#RESULTS\n", - "print('Signaling rate %.f K bits/sec' %sr)\n", - "print('Bandwith to avoid the cross talk in TDM is %.f kHz' %BW)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signaling rate 60 K bits/sec\n", - "Bandwith to avoid the cross talk in TDM is 30 kHz\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9, Page No 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find signaling rate ,bandwidth\n", - "\n", - "#initialisation of variables\n", - "N=4.0\n", - "x=24 #bits/frame\n", - "D=1152\n", - "s=1.0/3\n", - "r=1.544*10**6\n", - "\n", - "#CALCULATIONS\n", - "r0=N*r*((D+x)/(D-s*N))\n", - "\n", - "#RESULTS\n", - "print('Output bit rate %.2f MB/sec' %(r0/(10**6)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output bit rate 6.31 MB/sec\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10, Page No 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find signaling rate ,bandwidth\n", - "\n", - "#initialisation of variables\n", - "N=24.0\n", - "x=72.0 #bits\n", - "D=192 #message and stuff bits\n", - "s=1.0/3\n", - "r=64 #kb/sec\n", - "\n", - "#CALCULATIONS\n", - "r0=N*r*((D+x)/(D-s*N))\n", - "r1=((N*r)/r0)*100\n", - "\n", - "#RESULTS\n", - "print('i) Output bit rate %.2f MB/sec' %(r0/(10**3)))\n", - "print('iI) Throughput efficiency is = %.2f percent' %r1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Output bit rate 2.20 MB/sec\n", - "iI) Throughput efficiency is = 69.70 percent\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter5.ipynb b/Digital_Communications/Chapter5.ipynb deleted file mode 100755 index bf535beb..00000000 --- a/Digital_Communications/Chapter5.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 5: DIGTIAL BASEBAND TRANSMISSION

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12, Page No 249 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find The roll of factor alpha\n", - "\n", - "#initialisation of variables\n", - "datarate=0.1*10**6\n", - "fB=75000.0 #bandwidth\n", - "\n", - "#CALCULATIONS\n", - "Tb=1/datarate\n", - "alpha=2*fB*Tb-1\n", - "\n", - "#RESULTS\n", - "print('The roll out factor alpha = = %.1f ' %alpha)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The roll out factor alpha = = 0.5 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13, Page No 249" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find The Transmission bandwidth\n", - "\n", - "#initialisation of variables\n", - "q=128.0\n", - "alpha=0.2\n", - "n=math.log(q,2)\n", - "fm=2000.0\n", - "\n", - "#CALCULATIONS\n", - "Nq=2*fm\n", - "fs=1.25*Nq\n", - "N=8.0\n", - "total=N*fs\n", - "bitrate=7*total\n", - "fB=((1+alpha)*bitrate)/2\n", - "fB=fB/1000\n", - "#RESULTS\n", - "print('The minimum transmission Bandwidth required = %.f kHz' %fB)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum transmission Bandwidth required = 168 kHz\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter6.ipynb b/Digital_Communications/Chapter6.ipynb deleted file mode 100755 index fd5f6716..00000000 --- a/Digital_Communications/Chapter6.ipynb +++ /dev/null @@ -1,158 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 6: DIGITAL MODULATION TECHNIQUES

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5, Page No 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#Symbol rate of transmission and bandwidth \n", - "\n", - "#initialisation of variables\n", - "fb=1.0 #MHz\n", - "Tb=1/fb #bit period ms\n", - "N=4\n", - "\n", - "#CALCULATIONS\n", - "Ts1=Tb\n", - "Bw1=2*fb\n", - "Ts2=Tb*2\n", - "Tr2=(1.0/2)*1000 #Symbols/sec\n", - "Bw2=1/Tb\n", - "Ts3=N*Tb\n", - "Tr3=(1.0/4)*1000\n", - "Bw3=(2.0*fb)/N\n", - "\n", - "#RESULTS\n", - "print(\"In BPSK\")\n", - "print(\"The symbol rate of transmission is = %.f X 10^6 symbol/sec \" %Ts1)\n", - "print(\"The Bandwidth is = %.f MHz \" %Bw1)\n", - "print(\"In QPSK\")\n", - "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr2)\n", - "print(\"The Bandwidth is = %.f MHz \" %Bw2)\n", - "print(\"In 16-ary PSK\")\n", - "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr3)\n", - "print(\"The Bandwidth is = %.f kHz \" %(Bw3*1000))\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In BPSK\n", - "The symbol rate of transmission is = 1 X 10^6 symbol/sec \n", - "The Bandwidth is = 2 MHz \n", - "In QPSK\n", - "The symbol rate of transmission is = 500 X 10^3 symbol/sec \n", - "The Bandwidth is = 1 MHz \n", - "In 16-ary PSK\n", - "The symbol rate of transmission is = 250 X 10^3 symbol/sec \n", - "The Bandwidth is = 500 kHz \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6, Page No 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "fb=90 #MHz\n", - "Bw=20 #Mb/s\n", - "\n", - "#CALCULATIONS\n", - "N=(2*fb)/Bw\n", - "\n", - "#RESULTS\n", - "print(\"Number of bits required = %.f \" %N)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of bits required = 9 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12, Page No 357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Tb=0.1 #msec\n", - "\n", - "#CALCULATIONS\n", - "fb=1/Tb\n", - "\n", - "#RESULTS\n", - "print(\"Transmission bandwidth = %.f kHz\" %fb)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Transmission bandwidth = 10 kHz\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter7.ipynb b/Digital_Communications/Chapter7.ipynb deleted file mode 100755 index 7c33676a..00000000 --- a/Digital_Communications/Chapter7.ipynb +++ /dev/null @@ -1,431 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 7: PERFORMANCE ANALYSIS OF DIGITAL COMMUNICATION SYSTEMS

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.15, Page No 414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "T=1.0*10**-6 #ms\n", - "A=10.0*10**-3\n", - "N=1*10**-11\n", - "\n", - "#CALCULATIONS\n", - "Eb=((A**2)*T)/2.0\n", - "Epb=math.sqrt(Eb/N)\n", - "Pb=(1.0/2)*math.erfc(Epb)*(1.0/4)\n", - "\n", - "#RESULTS\n", - "print(\"Bit error probability = %.2f X 10^-4 \" %(Pb*(10**4)))\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bit error probability = 1.96 X 10^-4 \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.16, Page No 420" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Br=25*10**6 #bits/sec\n", - "N=2*10**-20 #Power spectral density of noise\n", - "A=1.0*10**-6\n", - "Ps=1*10**-12 # Normalized power\n", - "\n", - "#CALCULATIONS\n", - "Tb=1.0/Br\n", - "Ps=(A**2)/2.0\n", - "Pe=1.0/2*(math.erfc((0.6*Ps*Tb)/N))\n", - "#RESULTS\n", - "print(\"Average probability of bit error is Pe= %.2f X 10^-4 \" %(Pe*10))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average probability of bit error is Pe= 1.98 X 10^-4 \n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.17, Page No 423" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find probability of error\n", - "\n", - "#initialisation of variables\n", - "A=2.0\n", - "N0=2.0*10**-4 #power sepctral density\n", - "\n", - "#CALCULATIONS\n", - "Tmin=(6.76*N0)/4\n", - "\n", - "#RESULTS\n", - "print(\"The min time for which the signal should be extended is Tmin= %.3f X 10^-3 msec \" %(Tmin*10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The min time for which the signal should be extended is Tmin= 0.338 X 10^-3 msec \n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.20, Page No 428" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#The average carrier\n", - "\n", - "#initialisation of variables\n", - "Pe=10**-4\n", - "N0=2*10**10\n", - "T=1.0/10**6\n", - "\n", - "#CALCULATIONS\n", - "E=6.76*N0\n", - "P=E/T\n", - "Eb=8.5171*N0\n", - "P2=Eb/T\n", - "\n", - "\n", - "#RESULTS\n", - "print(\"The average carrier = %.3f X 10^-3 mW \" %(P2/10**17))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average carrier = 1.703 X 10^-3 mW \n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.21, Page No 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#The average carrier\n", - "\n", - "#initialisation of variables\n", - "A=0.2*10**-3 #V\n", - "T=2*10**-6\n", - "N0=2*10**-15\n", - "\n", - "#CALCULATIONS\n", - "Pe=(math.sqrt((A**2*T)/4*N0))\n", - "\n", - "#RESULTS\n", - "print(\"The average carrier = %.3f X 10^-4 mW \" %(Pe*10**15))\n", - "print(\"Approximation error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average carrier = 6.325 X 10^-4 mW \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.29, Page No 447" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "A=1.0\n", - "N0=2.0*10**-5 #power sepctral density\n", - "\n", - "#CALCULATIONS\n", - "T=((3.71**2)*2*N0)/(A**2)\n", - "Br=1/T\n", - "#Results\n", - "print(\"Bit rate Br= %.2f k bits/sec\" %(Br/(10**3)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bit rate Br= 1.82 k bits/sec\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.31, Page No 448" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Pe=10.0**-4 #probability of error of PSK\n", - "N0=2.0*10**-10\n", - "Br=10**6 #Bit Rate\n", - "\n", - "\n", - "#CALCULATIONS\n", - "T=1.0/Br\n", - "E=N0*6.76\n", - "P=E/T\n", - "Eb=8.5171*N0\n", - "Pb=Eb/T\n", - "#Results\n", - "print(\"i) PSK system The required carrier power = %.2f mW\" %(P*10**3))\n", - "print(\"ii) DPSK system The required carrier power = %.2f mW\" %(Pb*10**3))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) PSK system The required carrier power = 1.35 mW\n", - "ii) DPSK system The required carrier power = 1.70 mW\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.32, Page No 450" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "A=0.2*10**-3 #V\n", - "T=2*10**-6 #Sec\n", - "N0=2*10**-15\n", - "\n", - "\n", - "#CALCULATIONS\n", - "x=math.sqrt((A**2*T)/(4*N0))\n", - "Pe=(1.0/2)*math.erfc(x/math.sqrt(2.0))\n", - "\n", - "#Results\n", - "print(\"Probability of error = %.2f X 10^-4\" %(Pe*10**4))\n", - "#print(\"Channel Bandwidth = %.5f MHz\" %BW)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probability of error = 7.83 X 10^-4\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.36, Page No 453" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Ap=1 #mV\n", - "En=192.3 #mV\n", - "Arms=707 #mV\n", - "\n", - "\n", - "#CALCULATIONS\n", - "Z=Arms/En\n", - "Pe=1.0/2*(math.erfc(math.sqrt(2)*(Z/math.sqrt(2))))\n", - "\n", - "#Results\n", - "print(\"Probability of error is %.7f \" %Pe)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probability of error is 0.0000001 \n" - ] - } - ], - "prompt_number": 52 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.37, Page No 454" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Br=2.08*10**-6 #Bit Rate\n", - "N0=2*10**-8\n", - "\n", - "#CALCULATIONS\n", - "Eb=(math.sqrt(3.3))/(5*10**7) #Eb=bit energy\n", - "Ps=Eb*Br\n", - "BW=2*Br #Bandwidth\n", - "Es=286.39*N0\n", - "Ps2=(Es*Br)/2\n", - "BW2=(2*Br)/4\n", - "\n", - "#Results\n", - "print(\"i) BPSK THe transmission bandwidth = %.2f MHz\" %(BW*10**6)) \n", - "print(\"ii) For 16 ary PSK THe transmission bandwidth = %.2f MHz\" %(BW2*10**6)) \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) BPSK THe transmission bandwidth = 4.16 MHz\n", - "ii) For 16 ary PSK THe transmission bandwidth = 1.04 MHz\n" - ] - } - ], - "prompt_number": 53 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter8.ipynb b/Digital_Communications/Chapter8.ipynb deleted file mode 100755 index 52d8741e..00000000 --- a/Digital_Communications/Chapter8.ipynb +++ /dev/null @@ -1,1439 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 8: INFORMATION THEORY

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1, Page No 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#Find Information Content of Each Symbol\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/8.0\n", - "\n", - "#Calculation\n", - "#information content of each symbol\n", - "Ix1=math.log(1/px1,2)\n", - "Ix2=math.log(1/px2,2)\n", - "Ix3=math.log(1/px3,2)\n", - "Ix4=math.log(1/px4,2)\n", - "\n", - "#Result\n", - "print(\"Information Content tI(x1)= %.2f bit\" %Ix1)\n", - "print(\" tI(x2)= %.f bits\" %Ix2)\n", - "print(\" tI(x3)= %.f bits\" %Ix3)\n", - "print(\" tI(x4)= %.f bits\" %Ix4)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Information Content tI(x1)= 1.00 bit\n", - " tI(x2)= 2 bits\n", - " tI(x3)= 3 bits\n", - " tI(x4)= 3 bits\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2, Page No 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find amount of Information\n", - "#Variable Declaration\n", - "#Calculation\n", - "pxi=1/4.0\n", - "Ixi=(math.log10(1/pxi))/math.log10(2)\n", - "\n", - "#RESULTS\n", - "print(\"The amount of Information I(Xi)= %.f \" %Ixi)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of Information I(Xi)= 2 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3, Page No 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Amount of Information\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/2.0\n", - "\n", - "#Calculation\n", - "Ix1=math.log(1/px1,2) #entropy\n", - "Ix2=math.log(1/px2,2)\n", - "\n", - "#Result\n", - "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n", - "print(\"The amount of Information I(X2)= %.f bit\" %Ix2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of Information I(X1)= 1 bit\n", - "The amount of Information I(X2)= 1 bit\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4, Page No 465" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Amount of Information \n", - "\n", - "#Variable Declaration\n", - "px1=1/4.0\n", - "px2=3/4.0\n", - "\n", - "#Calculation\n", - "Ix1=math.log(1/px1,2)\n", - "Ix2=math.log(1/px2,2)\n", - "\n", - "#Result\n", - "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n", - "print(\"The amount of Information I(X2)= %.2f bit\" %Ix2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of Information I(X1)= 2 bit\n", - "The amount of Information I(X2)= 0.42 bit\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9, Page No 468 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Entropy,Amount of information\n", - "\n", - "#Variable Declaration\n", - "px1=0.4\n", - "px2=0.3\n", - "px3=0.2\n", - "px4=0.1\n", - "\n", - "#Calculation\n", - "HX=-px1*math.log(px1,2)-px2*math.log(px2,2)-px3*math.log(px3,2)-px4*math.log(px4,2)\n", - "Px1x2x1x3=px1*px2*px1*px3\n", - "Ix1x2x1x3=-math.log(Px1x2x1x3,2)\n", - "Px4x3x3x2=px4*px3*px3*px2\n", - "Ix4x3x3x2=-math.log(Px4x3x3x2,2)\n", - "\n", - "#Result\n", - "print(\" \\n Entropy H(X) = %.2f bits/symbol \" %HX)\n", - "print(\"The amount of Information I(x1x2x1x3)= %.2f bits/symbol\" %Ix1x2x1x3)\n", - "print(\" I(x4x3x3x2) = %.2f bits/symbol \" %Ix4x3x3x2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " Entropy H(X) = 1.85 bits/symbol \n", - "The amount of Information I(x1x2x1x3)= 6.70 bits/symbol\n", - " I(x4x3x3x2) = 9.70 bits/symbol \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.13, Page No 471" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find information rate the telegraphic source\n", - "\n", - "#Variable Declaration\n", - "pdash=1/3.0\n", - "pdot=2/3.0\n", - "tdot=0.2\n", - "tdash=0.6\n", - "tspace=0.2\n", - "\n", - "#Calculation\n", - "HX=-pdash*math.log(pdash,2)-pdot*math.log(pdot,2)\n", - "Ts=pdot*tdot+pdash*tdash+tspace\n", - "r=1/Ts\n", - "R=r*HX\n", - "\n", - "#Result\n", - "print('Average rate of information R = %.2f bits/s' %R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average rate of information R = 1.72 bits/s\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.14, Page No 471" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find information rate of the source\n", - "\n", - "f=input('Enter the frequncy f=')\n", - "px1=1/8.0\n", - "px2=1/8.0\n", - "px3=3/8.0\n", - "px4=3/8.0\n", - "\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2) #entropy of the source\n", - "R=2*f*HX #r=2*f\n", - "print('information rate R= %.1f bits/sec ' %R) #f=signal bandwidth\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the frequncy f=34\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "information rate R= 123.2 bits/sec \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.15, Page No 472" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find information rate of the source\n", - "#all symbols are equally likely\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/2.0\n", - "px3=1/2.0\n", - "px4=1/2.0\n", - "\n", - "#Calculation\n", - "f=input('Enter the frequncy of system fm(in Hz) =')\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n", - "\n", - "#Result\n", - "print('\\n Entropy H(X) =%.f bits/symbol ' %HX)\n", - "R=2*f*HX\n", - "print('information rate =%.f bits/sec' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the frequncy of system fm(in Hz) =45\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Entropy H(X) =2 bits/symbol \n", - "information rate =180 bits/sec\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.16, Page No 473" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find source entropy ,information rate\n", - "\n", - "#Variable Declaration\n", - "#probability symbols\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/16.0\n", - "px5=1/16.0\n", - "Tb=10.0**-3\n", - "\n", - "#Calculation\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4)+px5*math.log(1/px5)\n", - "\n", - "#Result\n", - "print('1. source entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n", - "r=1.0/Tb\n", - "R=r*HX #information rate\n", - "print(' 2. Information rate R = %.2f bits/sec ' %R)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. source entropy H(X) = 1.72 bits/symbol \n", - " 2. Information rate R = 1721.57 bits/sec \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.17, Page No 473" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume if there are 16 outcomes per second\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/16.0\n", - "px5=1/16.0\n", - "r=16.0\n", - "\n", - "#Calculation\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)\n", - "\n", - "#Result\n", - "print('1. Entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n", - "\n", - "R=r*HX\n", - "print('2., Information rate R = %.f bits/sec' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. Entropy H(X) = 1.88 bits/symbol \n", - "2., Information rate R = 30 bits/sec\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.18, Page No 474" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#determine entropy ,information rate\n", - "\n", - "#Variable Declaration\n", - "px1=1/4.0\n", - "px2=1/5.0\n", - "px3=1/5.0\n", - "px4=1/10.0\n", - "px5=1/10.0\n", - "px6=1/20.0\n", - "px7=1/20.0\n", - "px8=1/20.0\n", - "f=10*10**3.0\n", - "fs=10*2*10**3.0\n", - "\n", - "#Calculation\n", - "#entropy\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)+px6*math.log(1/px6,2)+px7*math.log(1/px7,2)+px8*math.log(1/px8,2) \n", - "\n", - "#Result\n", - "print('bits/message H(X) = %.2f ' %HX)\n", - "r=fs\n", - "R=r*HX #information rate\n", - "print('bits/sec R = %.2f' %R)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "bits/message H(X) = 2.74 \n", - "bits/sec R = 54828.92\n", - "Approximation error\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.19, Page No 476 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from array import *\n", - "#Find Channel Matrix,joint probability\n", - "\n", - "#Variable Declaration\n", - "px1=0.5\n", - "px2=0.5\n", - "py1x1=0.9\n", - "py2x1=0.1\n", - "py1x2=0.2\n", - "py2x2=0.8\n", - "PYX=[[py1x1,py2x1],[py1x2,py2x2]]\n", - "PX=[[px1,px2]]\n", - "PY = [[0,0],\n", - " [0,0]]\n", - "PXY = [[0,0],\n", - " [0,0]]\n", - "\n", - "for i in range(len(PYX)):\n", - " # iterate through columns of Y\n", - " for j in range(len(PX[0])):\n", - " # iterate through rows of Y\n", - " for k in range(len(PX)):\n", - " PY[i][j] += PYX[i][k] * PX[k][j]\n", - "print(' PY ARRAY = \\n')\n", - "for r in PY:\n", - " print(r)\n", - "PXd=[[px1,0],[0,px2]]\n", - "\n", - "\n", - "for i in range(len(PXd)):\n", - " # iterate through columns of Y\n", - " for j in range(len(PYX[0])):\n", - " # iterate through rows of Y\n", - " for k in range(len(PYX)):\n", - " PXY[i][j] += PXd[i][k] * PYX[k][j]\n", - "\n", - " \n", - "print(' \\n PXY ARRAY = \\n')\n", - "for r in PXY:\n", - " print(r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " PY ARRAY = \n", - "\n", - "[0.45, 0.45]\n", - "[0.1, 0.1]\n", - " \n", - " PXY ARRAY = \n", - "\n", - "[0.45, 0.05]\n", - "[0.1, 0.4]\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.35, Page No 498" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Channel is aproximated by the AWGN Channel\n", - "\n", - "#Variable Declaration\n", - "B=4000.0\n", - "S=0.1*10**-3\n", - "n=2*10**-12\n", - "\n", - "#Calculation\n", - "N=n*B\n", - "C=B*math.log(1+(S/N),2) #Capacity of Channel\n", - "C=C/1000.0\n", - "#Result\n", - "print(' Capacity of Channel C=%.3f(10^3) b/s ' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Capacity of Channel C=54.439(10^3) b/s \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36i, Page No 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "fm=4000.0\n", - "fs=2*fm\n", - "n=1.25\n", - "\n", - "#Calculation\n", - "r=fs*n\n", - "pxi=1/256.0\n", - "HX=-math.log(pxi,2)\n", - "R=r*HX\n", - "R=R/1000\n", - "print('Information Rate R= %.f kb/s' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Information Rate R= 80 kb/s\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36ii, Page No 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "B=10*10**3.0\n", - "SN=20.0\n", - "\n", - "#Calculation\n", - "SNR=10**(SN/10.0)\n", - "C=B*math.log(1+(SNR),2)\n", - "C=C/1000\n", - "\n", - "#Result\n", - "print('The channel capacity = %.2f 10^3 b/s' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The channel capacity = 66.58 10^3 b/s\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36iii, Page No 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "C=8*10**4.0\n", - "B=10**4.0\n", - "\n", - "#Calculation\n", - "SN=2**(C/B)-1\n", - "SNR=10*math.log(SN,10) #SNR\n", - "\n", - "#Result\n", - "print(' The S/N ratio required for error-free transmission =%.2f dB ' %SNR) #required SNR is greater that 24.064\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The S/N ratio required for error-free transmission =24.07 dB \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36iv, Page No 499 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "SN=20.0\n", - "\n", - "#Calculation\n", - "SNR=10**(SN/10.0)\n", - "C=8*10**4.0\n", - "B=C/(math.log(1+SNR,2)) #Bandwidth\n", - "B=B/1000\n", - "\n", - "#Result\n", - "print('Bandwidth required for AWGN channel B =%.2f kHz ' %B)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bandwidth required for AWGN channel B =12.02 kHz \n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.37, Page No 502" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find code efficiency,redundancy\n", - "\n", - "#Variable Declaration\n", - "px1=0.9\n", - "px2=0.1\n", - "n1=1.0\n", - "n2=1.0\n", - "\n", - "#Calculation\n", - "L=px1*n1+px2*n2 #code leght\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)\n", - "n=(HX/L) #code efficiency\n", - "n=n*100\n", - "\n", - "print('Code efficiency = %.1f percent' %n)\n", - "r=(100-n) #code reduncy\n", - "print('Code redundancy = %.1f percent' %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Code efficiency = 46.9 percent\n", - "Code redundancy = 53.1 percent\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.38, Page No 502" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find code efficiency,redundancy\n", - "\n", - "#Variable Declaration\n", - "pa1=0.81\n", - "pa2=0.09 \n", - "pa3=0.09\n", - "pa4=0.01 \n", - "n1=1\n", - "n2=2 \n", - "n3=3\n", - "n4=3 \n", - "\n", - "#Calculation\n", - "L=pa1*n1+pa2*n2+pa3*n3+pa4*n4\n", - "HX2=pa1*math.log(1/pa1,2)+pa2*math.log(1/pa2,2)+pa3*math.log(1/pa3,2)+pa4*math.log(1/pa4,2)\n", - "n=HX2/L*100\n", - "\n", - "#Result\n", - "print(' code efficiency = %.2f percent' %n)\n", - "\n", - "r=(100-n) #code reduncy\n", - "print(' code redundancy = %.1f percent' %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " code efficiency = 72.71 percent\n", - " code redundancy = 27.3 percent\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.44, Page No 507" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find efficiency of the code\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/8.0\n", - "n1=1.0\n", - "n2=2.0\n", - "n3=3.0\n", - "n4=3.0\n", - "\n", - "#Calculation\n", - "#information content of each symbol\n", - "Ix1=-math.log(px1,2)\n", - "Ix2=-math.log(px2,2)\n", - "Ix3=-math.log(px3,2)\n", - "Ix4=-math.log(px4,2)\n", - "\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n", - "L=px1*n1+px2*n2+px3*n3+px4*n4\n", - "\n", - "n=HX/L*100\n", - "\n", - "#Result\n", - "print('Ccode efficiency = %.f Percent' %n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ccode efficiency = 100 Percent\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.50, Page No 512" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy ,information rate\n", - "#If there are 16 outcomes per second\n", - "\n", - "#Variable Declaration\n", - "P1=1/2.0\n", - "P2=1/4.0\n", - "P3=1/8.0\n", - "P4=1/16.0\n", - "P5=1/32.0\n", - "P6=1/32.0\n", - "r=16 #message rate\n", - "\n", - "#Calculation\n", - "H=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2)+P4*math.log(1/P4,2)+P5*math.log(1/P5,2)+P6*math.log(1/P6,2)\n", - "#Entropy of system\n", - "\n", - "#Result\n", - "print('1. Entropy of system H = %.2f bits/message ' %H)\n", - "R=H*r #R=Entropy*message rate\n", - "print(' 2. Information rate R = %.f bits/sec ' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. Entropy of system H = 1.94 bits/message \n", - " 2. Information rate R = 31 bits/sec \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.51, Page No 512" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Calculate H(X) ,H(Y)\n", - "\n", - "#Variable Declaration\n", - "px1=0.3\n", - "px2=0.4\n", - "px3=0.3\n", - "\n", - "#Calculation\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2) #Entropy of X\n", - "\n", - "\n", - "print(' 1.Entropy of X H(X)=%.3f bits/symbol ' %HX)\n", - "\n", - "PYX=[[0.8, 0.2, 0],[ 0, 1, 0],[ 0, 0.3, 0.7]]\n", - "PX=[[px1, px2, px3]]\n", - "PXY = [[0,0,0],\n", - " [0,0,0],\n", - " [0,0,0]]\n", - "\n", - "for i in range(len(PYX)):\n", - " # iterate through columns of PXd\n", - " for j in range(len(PX[0])):\n", - " # iterate through rows of PYX\n", - " for k in range(len(PX)):\n", - " PXY[i][j] += PYX[i][k] * PX[k][j]\n", - "\n", - "py1=PXY[0][0]\n", - "py2=PXY[0][1]\n", - "py3=PXY[0][2]\n", - "HY=py1*math.log(1/py1,2)+py2*math.log(1/py2,2)+py3*math.log(1/py3,2) #Entropy of Y\n", - "print(' 2. Entropy of Y H(Y)= %.2f bits/symbol ' %HY)\n", - "print('Approximation error')\t\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1.Entropy of X H(X)=1.571 bits/symbol \n", - " 2. Entropy of Y H(Y)= 1.51 bits/symbol \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.52, Page No 513" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source ,entropy of second order extension\n", - "\n", - "#Variable Declaration\n", - "P1=0.7\n", - "P2=0.15\n", - "P3=0.15\n", - "\n", - "#Calculation\n", - "HX=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2) #Entropy of source\n", - "print(' 1. Entropy of system H(X)=%.2f bits/symbol ' %HX)\n", - "#H(X^n)=n*H(X)\n", - "n=2 #for second order\n", - "HX2=n*HX\n", - "\n", - "#Result\n", - "print(' 2. Entropy of second order system extension of source can be H(X^2)=%.2f bits/symbol ' %(HX*2))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1. Entropy of system H(X)=1.18 bits/symbol \n", - " 2. Entropy of second order system extension of source can be H(X^2)=2.36 bits/symbol \n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.54, Page No 514" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "S0=1/3.0\n", - "S1=1/6.0\n", - "S2=1/4.0\n", - "S3=1/4.0\n", - "\n", - "#Calculation\n", - "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n", - "\n", - "#Result\n", - "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Entropy of system H(X)=1.96 bits/symbol \n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.56, Page No 515" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Information capacity of telephone\n", - "\n", - "#Variable Declaration\n", - "B=3.4*10**3\n", - "SNR=30.0\n", - "\n", - "#Calculation\n", - "SN=10**(SNR/10)\n", - "C=B*math.log(1+SN,2) #Information capacity\n", - "C=C/1000\n", - "\n", - "#Result\n", - "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Information capacity of telephone is C = 33.89 kbps \n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.59, Page No 516" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "S0=1/3.0\n", - "S1=1/6.0\n", - "S2=1/4.0\n", - "S3=1/4.0\n", - "\n", - "#Calculation\n", - "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n", - "\n", - "#Result\n", - "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Entropy of system H(X)=1.96 bits/symbol \n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.60, Page No 516" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "m1=1/2.0\n", - "m2=1/4.0\n", - "m3=1/8.0\n", - "m4=1/16.0\n", - "m5=1/16.0\n", - "\n", - "#Calculation\n", - "L=(m1*1)+(m2*2)+(m3*3)+(2*(m4)*4)\n", - "\n", - "#Result\n", - "print(' Average number of bits per message =%.2f bits ' %L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Average number of bits per message =1.88 bits \n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.61, Page No 517" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Information capacity of telephone\n", - "\n", - "#Variable Declaration\n", - "B=3.4*10**3\n", - "SNR=30.0\n", - "\n", - "#Calculation\n", - "SN=10**(SNR/10)\n", - "C=B*math.log(1+SN,2) #Information capacity\n", - "C=C/1000\n", - "\n", - "#Result\n", - "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Information capacity of telephone is C = 33.89 kbps \n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.62, Page No 517" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "p1=4.0\n", - "m1=0.5\n", - "m2=0.5\n", - "m3=0.375\n", - "m4=0.375\n", - "m5=0.375\n", - "m6=0.375\n", - "\n", - "#Calculation\n", - "I1=p1*math.log(1/p1,2) \n", - "HX=m1*math.log(1/m1,2)+m2*math.log(1/m2,2)+m3*math.log(1/m3,2)+m4*math.log(1/m4,2)+m5*math.log(1/m5,2)+m6*math.log(1/m6,2) #EntroSy of source\n", - "\n", - "#Result\n", - "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n", - "print('Approximation error')\t" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Entropy of system H(X)=3.12 bits/symbol \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.65, Page No 519" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "S0=1/2.0\n", - "S1=1/4.0\n", - "S2=1/8.0\n", - "S3=1/8.0\n", - "n=1\n", - "\n", - "#Calculation\n", - "H=S0*math.log(1.0/S0,2)+S1*math.log(1.0/S1,2)+S2*math.log(1.0/S2,2)+S3*math.log(1.0/S3,2) #EntroSy of source\n", - "L=H*n\n", - "\n", - "\n", - "#Result\n", - "print(' Code length =%.2f bits/messages ' %L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Code length =1.75 bits/messages \n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.67, Page No 520" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find channel capacity and new bandwidth\n", - "\n", - "#Variable Declaration\n", - "B=8*10**3\n", - "SNR=31.0\n", - "SNR2=61\n", - "\n", - "#Calculation\n", - "C=B*math.log(1+SNR,2) #Information capacity\n", - "B2=C/math.log(1+SNR2,2)\n", - "#Result\n", - "print(' Channel capacity is C = %.2f x 10^3 bits/sec ' %(C/1000))\n", - "print(' New Bandwidth is C = %.2f x kHz ' %(B2/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Channel capacity is C = 40.00 x 10^3 bits/sec \n", - " New Bandwidth is C = 6.72 x kHz \n" - ] - } - ], - "prompt_number": 31 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/Chapter9.ipynb b/Digital_Communications/Chapter9.ipynb deleted file mode 100755 index c91e1583..00000000 --- a/Digital_Communications/Chapter9.ipynb +++ /dev/null @@ -1,166 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater 9: ERROR CONTROL CODING

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find detected errors,corrected errors\n", - "\n", - "#initialisation of variables\n", - "dmin=5.0\n", - "#(s+1)<= dmin number errors can be detected(s)\n", - " \n", - "#CALCULATIONS\n", - "s=dmin-1\n", - "\n", - "#RESULTS\n", - "print(' i)Number of detected errors s <= %.f ' %s)\n", - "#(2t+1)<=dmin number errors can be corrected(t)\n", - "t=(dmin-1)/2.0\n", - "print('ii) Number of corrected errors t<= %.f ' %t)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " i)Number of detected errors s <= 4 \n", - "ii) Number of corrected errors t<= 2 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17, Page No 569" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Determine all possible code vectors \n", - "\n", - "m3=1\n", - "m2=0\n", - "m1=1\n", - "m0=0\n", - "#M=Message Matrix\n", - "#G=Generator Matrix\n", - "G=[[1, 0, 1, 1, 0, 0, 0],[0, 1, 0, 1, 1, 0, 0],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n", - "M=[[m3,m2,m1,m0]]\n", - "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n", - "\n", - "for i in range(len(G)):\n", - " # iterate through columns of PXd\n", - " for j in range(len(M[0])):\n", - " # iterate through rows of PYX\n", - " for k in range(len(M)):\n", - " X[i][j] += G[i][k] * M[k][j]\n", - "print('The required code word')\n", - "for r in range(0,7):\n", - " print(X[0][r])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required code word\n", - "1\n", - "0\n", - "1\n", - "0\n", - "0\n", - "0\n", - "0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.19, Page No 572" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Determine code word \n", - "m3=1\n", - "m2=0\n", - "m1=1\n", - "m0=0\n", - "#M=Message Matrix\n", - "#G=Generator Matrix\n", - "G=[[1, 0, 0, 0, 1, 0, 1],[0, 1, 0, 0, 1, 1, 1],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n", - "M=[[m3,m2,m1,m0]]\n", - "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n", - "\n", - "\n", - "for i in range(len(G)):\n", - " # iterate through columns of PXd\n", - " for j in range(len(M[0])):\n", - " # iterate through rows of PYX\n", - " for k in range(len(M)):\n", - " X[i][j] += G[i][k] * M[k][j]\n", - "print('The required code word')\n", - "for r in range(0,7):\n", - " print(X[0][r] )\n", - " \n", - "\n", - "print('The code in the book is wrong')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required code word\n", - "1\n", - "0\n", - "1\n", - "0\n", - "0\n", - "0\n", - "0\n", - "The code in the book is wrong\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo2.ipynb b/Digital_Communications/ChapterNo2.ipynb deleted file mode 100755 index f8cf6b90..00000000 --- a/Digital_Communications/ChapterNo2.ipynb +++ /dev/null @@ -1,290 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter no 2: SAMPLING THEORY AND PULSE MODULATION

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, page no 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#find Nquist Rate\n", - "\n", - "#Variable declaration\n", - "#given \n", - "pi=3.14\n", - "w1=50*pi\n", - "w2=300*pi\n", - "w3=100*pi\n", - "#w=2*%pi*f\n", - "\n", - "#Calculation\n", - "f1=w1/(2*pi)\n", - "f2=w2/(2*pi)\n", - "f3=w3/(2*pi)\n", - "fm=f2 #fm = maximum frquency is present at the signal\n", - "\n", - "#Result\n", - "print('maximum frquency of the signal is = %.2f Hz' %f2)\n", - "fs=2*fm #Nyquist rate\n", - "print('Nquist Rate of Signal is = %.2f Hz' %fs)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum frquency of the signal is = 150.00 Hz\n", - "Nquist Rate of Signal is = 300.00 Hz\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 , page no 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Nquist Rate and Nquist time interval\n", - "\n", - "#Variable declaration\n", - "#given\n", - "w1=5000*math.pi\n", - "w2=3000*math.pi;\n", - "f1=w1/(2*math.pi);\n", - "f2=w2/(2*math.pi);\n", - "\n", - "#Calculation\n", - "fm=f1 #fm = maximum frquency is present at the signal\n", - "fs=2*fm #Nyquist rate\n", - "Ts=1.0/(2.0*fm) #frequncy =1/time\n", - "Ts=Ts*(10**3)\n", - "\n", - "#Result\n", - "print('maximum frquency of the signal is = %.f Hz' %f1)\n", - "print('Nquist Rate of the given Signal is = %.f Hz' %fs)\n", - "print('Nquist Interval of the given signal is = %.1f m Sec' %Ts)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum frquency of the signal is = 2500 Hz\n", - "Nquist Rate of the given Signal is = 5000 Hz\n", - "Nquist Interval of the given signal is = 0.2 m Sec\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3, page no 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find Nquist Rate \n", - "\n", - "#Variable declaration\n", - "#given\n", - "f=100.0 # Frequency component of continuous-time signal\n", - "\n", - "#Calculation\n", - "fs=2*f #Nyquist rate\n", - "\n", - "#Result\n", - "print('i) To avoid aliasing Nquist Rate is = %.f Hz' %fs)\n", - "print('ii) It is theoretical example ')\n", - "print('iii) It is theoretical example ')\n", - "print('iv) It is theoretical example ')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) To avoid aliasing Nquist Rate is = 200 Hz\n", - "ii) It is theoretical example \n", - "iii) It is theoretical example \n", - "iv) It is theoretical example \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4, page no 52 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Nquist Rate of Continous signal\n", - "\n", - "#Variable declaration\n", - "#given\n", - "w1=50*math.pi\n", - "w2=300*math.pi\n", - "w3=100*math.pi\n", - "\n", - "#Calculation\n", - "f1=w1/(2*math.pi)\n", - "f2=w2/(2*math.pi)\n", - "f3=w3/(2*math.pi)\n", - "fmax=f2 #fmax = Highest frquency component of the message signal\n", - "fs=2*fmax #Nyquist rate\n", - "\n", - "#Result\n", - "print('Highest frquency component of the message signal will be fmax = %.f Hz' %fmax)\n", - "print('Nquist Rate of the given Signal is = %.f Hz' %fs)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Highest frquency component of the message signal will be fmax = 150 Hz\n", - "Nquist Rate of the given Signal is = 300 Hz\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 2.7, page no 67

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#find amplitude distortion at highest frquency\n", - "\n", - "#Variable declaration\n", - "#given\n", - "fs=9.5 #samplig frequncy\n", - "fmax=1 #maximum frequncy\n", - "t=0.2 #pulse width\n", - "\n", - "#Calculation\n", - "c=3*10**8\n", - "f=fmax\n", - "H1=t*(0.9933) #aperture effect at highest frequency, sinc(f*t)=0.9933 (given)\n", - "H1=H1*100\n", - "\n", - "#Result\n", - "print('|H(1)|=%.2f' %H1)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "|H(1)|=19.87\n", - "Approximation error\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8, page no 74 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Calculate Transmission Bandwidth\n", - "\n", - "#Variable declaration\n", - "#given\n", - "fm=3.0*(10^3)\n", - "fs=8.0*(10^3) # sampling frequncy\n", - "\n", - "#Calculation\n", - "Ts=1.0/fs\n", - "t=0.1*Ts\n", - "BW=1.0/(2*t) #Bandwidth\n", - "BW=BW/(10^3)\n", - "\n", - "#Result\n", - "print('Transmission Bandwidth of PAM signal is kHz = %.f Khz ' %BW)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Transmission Bandwidth of PAM signal is kHz = 40 Khz \n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo3.ipynb b/Digital_Communications/ChapterNo3.ipynb deleted file mode 100755 index 5b9ea469..00000000 --- a/Digital_Communications/ChapterNo3.ipynb +++ /dev/null @@ -1,2238 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 3: WAVEFORM CODING TECHNIQUES

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3,1 Page No 110" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "print('This is a Theoretical example')\t" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This is a theoretcal example\n" - ] - } - ], - "prompt_number": 104 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3,2,i, Page No 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#find code word length\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512 #Quantization levels\n", - "#q=2^v\n", - "\n", - "#Calculation\n", - "v=math.log10(512)/math.log10(2)\n", - "\n", - "#Result\n", - "print(\"The code word legth is = %.f bits\" %v)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The code word legth is = 9 bits\n" - ] - } - ], - "prompt_number": 105 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.ii, Page No 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#find The transmission Bandwidth\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512.0 #Quantization levels\n", - "v=9.0\n", - "\n", - "#Calculation\n", - "bw=v*fm*10**-6\n", - "\n", - "#Result\n", - "print(\"The transmission Bandwidth is = %.1f MHz\" %bw)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The transmission Bandwidth is = 37.8 MHz\n" - ] - } - ], - "prompt_number": 106 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.iii, Page No 111 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find Final Bit rate\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512.0 #Quantization levels\n", - "v=9.0\n", - "\n", - "#Calculation\n", - "fs=2*fm\n", - "r=v*fs #signaling rate\n", - "\n", - "#Result\n", - "print(\"Final Bit rate =%.1f x 10^6 bits/sec\" %(r/(10**6)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final Bit rate =75.6 x 10^6 bits/sec\n" - ] - } - ], - "prompt_number": 107 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.iv, Page No 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find Output signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "bandwidth=4.2*10**6\n", - "fm=bandwidth\n", - "q=512 #Quantization levels\n", - "v=9.0\n", - "\n", - "#Calculation\n", - "sn=4.8+6*v #noise in dB\n", - "\n", - "\n", - "print(\"Output signal to noise ratio is = %.1f dB\" %sn)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal to noise ratio is = 58.8 dB\n" - ] - } - ], - "prompt_number": 108 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.i, Page No 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find bits per sample\n", - "\n", - "#Variable Declaration\n", - "fmax=4*10**3\n", - "xmax=3.8\n", - "snr=100\n", - "\n", - "#Calculation\n", - "P=30*10**-3\n", - "v=(math.log10(((snr*xmax**2)/(3*P)))/(2*math.log10(2)))\n", - "\n", - "#Result\n", - "print(\"Number of bits required per sample are = %.2f bits\" %v)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of bits required per sample are = 6.98 bits\n" - ] - } - ], - "prompt_number": 109 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3.ii, Page No 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find Transmission Bandwith\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=4*10**3 #Bandwidth of PCM\n", - "xmax=3.8\n", - "snr=100 #Signal to Noise Ratio\n", - "outputs=30.0\n", - "v=7.0\n", - "\n", - "#Calculation\n", - "bw=outputs*v*fm \n", - "r=bw*2\n", - "bw=bw/10**3\n", - "\n", - "#Result\n", - "print('Transmission Bandwith R = %.f kHz' %bw)\n", - "r=r/1000\n", - "print('Signaling rate R = %.f bits/sec' %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Transmission Bandwith R = 840 kHz\n", - "Signaling rate R = 1680 bits/sec\n" - ] - } - ], - "prompt_number": 110 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4, Page No 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#find sampling rate,number of bits,bit rate,bandwidht\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "emax=0.001\n", - "de=2*emax\n", - "fm=100.0\n", - "xmax=10.0\n", - "\n", - "#Calculation\n", - "q=(2*xmax)/de\n", - "fs=2*fm\n", - "v=(math.log10(q))/math.log10(2)\n", - "v=math.ceil(v)\n", - "r=v*fs\n", - "\n", - "#Result\n", - "print('1. sampling Frequncy = %.f Hz ' %fs) \n", - "print('2. No.of bits in PCM = %.f bits ' %v) \n", - "print('3. sampling rate = %.f bits per second ' %r)\n", - "r=r/2\n", - "print('4. Transmission Bandwidth = %.f Hz ' %r) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. sampling Frequncy = 200 Hz \n", - "2. No.of bits in PCM = 14 bits \n", - "3. sampling rate = 2800 bits per second \n", - "4. Transmission Bandwidth = 1400 Hz \n" - ] - } - ], - "prompt_number": 111 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5, Page No 113 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Bandwidth,Sampling Rate\n", - "\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=3.4*10**3\n", - "N=24\n", - "r=1.5*10**6\n", - "encoder=8\n", - "\n", - "#Calculation\n", - "BW=N*fm\n", - "BW=BW/10**3\n", - "r1=r/N\n", - "fs=r1/encoder\n", - "\n", - "#Result\n", - "print(\"i. Channel Bandwith is = %.2f kHz\" %BW)\n", - "print(\"ii. Sampling frequency is = %.2f Hz or samples per second.\" %fs)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i. Channel Bandwith is = 81.60 kHz\n", - "ii. Sampling frequency is = 7812.50 Hz or samples per second.\n" - ] - } - ], - "prompt_number": 112 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, Page No 114 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find Signal Bandwidth,Noise Ratio\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "v=7\n", - "r=50*10**6\n", - "\n", - "#Calculation\n", - "#fs=2*fm\n", - "fm=r/(2*v)\n", - "snr=1.8+(6*v);\n", - "fm=fm*10**-6\n", - "\n", - "#Result\n", - "print('i. Maximum message Bandwidth is = %.2f MHz ' %fm)\n", - "print('ii. signal to quantization niose ration = %.2f dB ' %snr)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i. Maximum message Bandwidth is = 3.57 MHz \n", - "ii. signal to quantization niose ration = 43.80 dB \n" - ] - } - ], - "prompt_number": 113 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7, Page No 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#find i)bits per sample,ii)transmission rate\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=3*10**3\n", - "q=16\n", - "\n", - "#Calculation\n", - "v=(math.log10(q))/math.log10(2)\n", - "\n", - "#Result\n", - "print('i) Bits in code word= %.f bits' %v)\n", - "fs=2*fm\n", - "r=v*fs\n", - "print('ii) it trasmission rate= %.f x 10^3 bits per second' %(r/(10**3)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Bits in code word= 4 bits\n", - "ii) it trasmission rate= 24 x 10^3 bits per second\n" - ] - } - ], - "prompt_number": 114 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page No 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "fm=3.5*10**3\n", - "r=50*10**3\n", - "\n", - "#Calculation\n", - "fs=2*fm\n", - "rms=0.2\n", - "xmax=2\n", - "v=r/fs #signaling rate r=v*fs\n", - "v=math.ceil(v)\n", - "P=(rms**2)/1\n", - "SNR=((3*P*2**(2*v))/(xmax**2))\n", - "SN=10*math.log10(SNR)\n", - "SN=math.ceil(SN)\n", - "\n", - "#Result\n", - "print(\"signal to niose ratio =%.f dB\" %SN)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "signal to niose ratio =33 dB\n" - ] - } - ], - "prompt_number": 115 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10, Page No 117 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find i)noise ratio ii)bits\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "Am=3.0\n", - "v=10.0\n", - "\n", - "#Calculation\n", - "SNR=1.8+6*v #noise ratio \n", - "SN=40\n", - "v=(SN-1.8)/6\n", - "\n", - "#Result\n", - "print(\"i) Signal to Quantization noise ratio = %.1f dB\" %SNR)\n", - "print(\"ii) Bits required to get signal to niose ratio of 40dB = %.f \" %math.ceil(v))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Signal to Quantization noise ratio = 61.8 dB\n", - "ii) Bits required to get signal to niose ratio of 40dB = 7 \n" - ] - } - ], - "prompt_number": 116 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11, Page No 117 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Maximum frequency\n", - "\n", - "#Variable Declaration\n", - "#Given data\n", - "v=7\n", - "SNR=1.8+6*v\n", - "r=56*10**3\n", - "\n", - "#Calculation\n", - "fs=r/v #r=v*fs signaling rate\n", - "fm=fs/2 #Nquset rate\n", - "\n", - "#Result\n", - "fm=fm/10**3\n", - "print(\"Maximum frequency is = %.f kHz\" %fm)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum frequency is = 4 kHz\n" - ] - } - ], - "prompt_number": 117 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.14, Page No 129 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Maximum Amplitude\n", - "\n", - "#Variable Declaration\n", - "fm=3*10**3.0\n", - "\n", - "#Calculation\n", - "Nyquistrate=2*fm #Nyquistrate\n", - "fs=5*Nyquistrate #Samplingfrquency\n", - "Ts=1/fs #Sampling Interval\n", - "de=0.25 #step size\n", - "fm1=2*10**3.0\n", - "Am=de/(2*math.pi*fm1*Ts)\n", - "\n", - "#Result\n", - "print(\"Maximum Amplitude = %.4f Volts\" %Am)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum Amplitude = 0.5968 Volts\n" - ] - } - ], - "prompt_number": 118 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.16, Page No 130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find signaling rate\n", - "\n", - "#Variable Declaration\n", - "fs1=8*10**3.0\n", - "de=31.25*10**-3\n", - "q=64.0\n", - "\n", - "#Calculation\n", - "v=math.log(q,2)\n", - "r=v*fs1 #signaling rate\n", - "fm=3*10**3.0\n", - "A=1\n", - "fs2=(2*math.pi*fm*A)/(de)\n", - "\n", - "#Result\n", - "r=r*10**-3\n", - "print(\"Signaling rate of PCM is = %.f kHz\" %r)\n", - "fs2=fs2*10**-3\n", - "print(\"The signaling rate of DM is = %.2f kHz\" %fs2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signaling rate of PCM is = 48 kHz\n", - "The signaling rate of DM is = 603.19 kHz\n" - ] - } - ], - "prompt_number": 119 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.17, Page No 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "fs=64.0*10**3 #frequency\n", - "fm=2.0*10**3 #Sinosoidal input signal sample \n", - "fM=4.0*10**3 #bandwidth\n", - "\n", - "#Calculation\n", - "SNR=(3*fs**3)/(8*math.pi**2*fm**2*fM) #Signal to noise ratio\n", - "SNRO=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print(\"Output signal to noise ratio = %.2f dB\" %SNRO)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal to noise ratio = 27.94 dB\n" - ] - } - ], - "prompt_number": 120 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.18, Page No 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find signal to Quatization noise ratio \n", - "\n", - "#Variable Declaration\n", - "fs=8.0*10**3 #Sampling frequency\n", - "r=64.0*10**3 #Data Rate\n", - "N=8 #number of bits\n", - "\n", - "#Calculation\n", - "SNR=(1.8+6*N) #signal to Quatization noise ratio\n", - "\n", - "#Result\n", - "print(\"Signal to Quatization noise ratio of PCM system is = %.f dB\" %SNR)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signal to Quatization noise ratio of PCM system is = 50 dB\n" - ] - } - ], - "prompt_number": 121 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.20, Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find sampling rate,quantizing level\n", - "\n", - "#Variable Declaration\n", - "r=36000\n", - "fm=3.2*10**3\n", - "\n", - "#Calculation\n", - "fs=2*fm #Nquest rate\n", - "v=r/fs #r=v*fs signaling rate\n", - "v=math.floor(v)\n", - "q=2**v\n", - "fs1=r/v\n", - "\n", - "#Result\n", - "print(\"Quantizing level q = %.f \" %q)\n", - "fs1=fs1/1000\n", - "print(\"sampling rate fs = %.1f kHz \" %fs1)\n", - "print(\"Number of binary digits = %.f \" %v)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizing level q = 32 \n", - "sampling rate fs = 7.2 kHz \n", - "Number of binary digits = 5 \n" - ] - } - ], - "prompt_number": 122 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.21, Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find time duration of 1bit binary encoded signal\n", - "\n", - "#Variable Declaration\n", - "fs=input(\"Enter the Nyquist rate of Signal fs(Hz)=\")\n", - "q=input(\"Enter the Quantization levels q =\")\n", - "\n", - "#Calculation\n", - "v=math.log(q,2) #binary pulses transmitted per second\n", - "t=1.0/(v*fs) #Nyquist interval\n", - "\n", - "#Result\n", - "print('Time duration of binary signal t = %.4f sec ' %t)\n", - "#output\n", - "#Enter the Nyquist rate fs(Hz)=3\n", - "#Enter the Quantization levels q =5\n", - "#time duration of 1bit binary signal \n", - "#t=0.1435589 sec" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Nyquist rate of Signal fs(Hz)=23\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Quantization levels q =34\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time duration of binary signal t = 0.0085 sec \n" - ] - } - ], - "prompt_number": 123 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.23, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#find signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "SNR=40\n", - "SNRO=10**(SNR/10)\n", - "\n", - "#SNR=3(q**2)/2, Signal to Quantization noise ratio\n", - "\n", - "#Calculation\n", - "q=math.sqrt((2*SNRO)/3)\n", - "q=math.ceil(q)\n", - "v=math.log(q,2) #q=2**v Quantization levels\n", - "v=math.ceil(v)\n", - "snr=1.76+6.02*v #output Signal to Quantization noise ratio\n", - "\n", - "#Result\n", - "print(\"Output Signal to Quantization noise ratio = %.1f dB\" %snr)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output Signal to Quantization noise ratio = 43.9 dB\n" - ] - } - ], - "prompt_number": 124 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24.i, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Quantizing levels,minimum number of bits per sample\n", - "\n", - "#Variable Declaration\n", - "SNRO=30.0\n", - "fmin=300.0\n", - "fmax=3300.0\n", - "fs=80000.0\n", - "\n", - "#Calculation\n", - "#SNRO=1.76+20log10(q)\n", - "q=10**((SNRO-1.76)/20)\n", - "q=math.ceil(q)\n", - "v=math.log(q,2)\n", - "\n", - "#Result\n", - "print('Quantizing levels required is =%.f' %q)\n", - "print('minimum number of bits per sample are=%.1f that is approximately 5' %v)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizing levels required is =26\n", - "minimum number of bits per sample are=4.7 that is approximately 5\n" - ] - } - ], - "prompt_number": 125 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24.ii, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find minimum required bandwidth\n", - "\n", - "#Variable Declaration\n", - "SNRO=30.0 #Signal to quantisizing noise ratio\n", - "fmin=300.0 #min frequency band\n", - "fmax=3300.0 #max frequency band\n", - "fs=8000.0 #Sampling rate\n", - "v=5.0 #Minimum number of bits per sample\n", - "\n", - "#Calculation\n", - "fPCM=(v*fs)/2\n", - "fPCM=fPCM/1000\n", - "\n", - "#Result\n", - "print('minimum required bandwidth =%.f kHz' %fPCM)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "minimum required bandwidth =20 kHz\n" - ] - } - ], - "prompt_number": 126 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.24.iii, Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Quantizing levels,minimum number of bits per sample and bandwidth\n", - "\n", - "#Variable Declaration\n", - "SNRO=30.0 #Signal to quantisizing noise ratio\n", - "fmin=300.0 #min frequency band\n", - "fmax=3300.0 #max frequency band\n", - "fs=8000.0 #Sampling rate\n", - "\n", - "#Calculation\n", - "q=10**((SNRO+10.1)/20)\n", - "q=math.ceil(q)\n", - "v=math.log(q,2)\n", - "v=math.ceil(v)\n", - "\n", - "#Result\n", - "print('Quantizing levels need is =%.f' %q)\n", - "print('minimum number of bits per sample is =%.f' %v)\n", - "fPCM=(v*fs)/2\n", - "fPCM=fPCM/1000\n", - "print('minimum required bandwidth =%.f Khz' %fPCM)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizing levels need is =102\n", - "minimum number of bits per sample is =7\n", - "minimum required bandwidth =28 Khz\n" - ] - } - ], - "prompt_number": 127 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.27, Page No 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#determine the Maximum Amplitude,\n", - "\n", - "#Variable Declaration\n", - "de=250*10**-3\n", - "wm=2*math.pi*1000 \n", - "fs=3*10**3\n", - "Ts=1/fs\n", - "\n", - "#Calculation\n", - "Amax=(de*3*fs*2)/(wm) #Amplitude\n", - "SNR=(3.0*((3*6*(10**3))**3))/((8*(math.pi**2)*(10**3)**3))\n", - "\n", - "#Result\n", - "print('Maximum Amplitude= %.1f mV' %(Amax*(10**2)))\n", - "print('Signal to noise ratio = %.2f dB' %(10*math.log10(SNR)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum Amplitude= 71.6 mV\n", - "Signal to noise ratio = 23.46 dB\n" - ] - } - ], - "prompt_number": 128 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.29, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of bits per sample\n", - "\n", - "#Variable Declaration\n", - "SNR=20\n", - "averagepower=30*10**-3\n", - "SNRO=10**(SNR/10)\n", - "A=3.8\n", - "\n", - "#SNRO=average signal power/Quatizing power\n", - "#de=(2*A)/L\n", - "\n", - "#Calculation\n", - "L=math.sqrt((SNRO*A**2)/(3*averagepower))\n", - "n=math.log(L,2)\n", - "n=math.ceil(n)\n", - "\n", - "#Result\n", - "print('Bits required per sample =%.f' %n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bits required per sample =7\n" - ] - } - ], - "prompt_number": 129 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30.i, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Normalized power for quantization noise\n", - "\n", - "#Variable Declaration\n", - "fm=3.0*10.0**3\n", - "v=8.0\n", - "VH=5.0\n", - "VL=-5.0\n", - "q=2**v\n", - "\n", - "#Calculation\n", - "de=(VH-VL)/q\n", - "Nq=de**2/12.0 #quantization noise\n", - "\n", - "#Result\n", - "print('Normalized power for quantization noise =%.2f x 10^-6 W' %(Nq*(10**6)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Normalized power for quantization noise =127.16 x 10^-6 W\n" - ] - } - ], - "prompt_number": 130 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30.ii, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find bit transmission rate\n", - "\n", - "#Variable Declaration\n", - "fm=3*10.0**3\n", - "v=8.0\n", - "VH=5.0\n", - "VL=-5\n", - "q=2**v\n", - "\n", - "#Calculation\n", - "fs=2*fm #Nyquist rate\n", - "r=8*fs/1000\n", - "\n", - "#Result\n", - "print('bit transmission rate %.f K bits/s' %r)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "bit transmission rate 48 K bits/s\n" - ] - } - ], - "prompt_number": 131 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.30.iii, Page No 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Signal to quantization noise ratio\n", - "\n", - "#Variable Declaration\n", - "Nq=127.15*10**-6\n", - "Meansignal=2\n", - "\n", - "#Calculation\n", - "P=Meansignal/1\n", - "SNR=P/Nq\n", - "SNRq=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print('Signal to quantization noise ratio %.2f dB ' %SNRq)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signal to quantization noise ratio 41.97 dB \n" - ] - } - ], - "prompt_number": 132 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.31, Page No 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find i)SNR ii)output bit rate iii)no.of bits recorded\n", - "\n", - "#Variable Declaration\n", - "N=16.0\n", - "v=16.0\n", - "fs=44.1*10**3\n", - "\n", - "#Calculation\n", - "SNR=1.76+6*N\n", - "bitrate=2*v*fs\n", - "outputbitrate=2*bitrate*10**-6 #including addtional 100% over head\n", - "CD=outputbitrate*3600*10**-3\n", - "\n", - "#Result\n", - "print('i)Out put signal noise ratio =%.2f dB' %SNR)\n", - "print('ii)output bit rate =%.3f Mbits/sec' %outputbitrate)\n", - "print('iii)no.of bits recorded in CD =%.2f gigabits' %CD)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Out put signal noise ratio =97.76 dB\n", - "ii)output bit rate =2.822 Mbits/sec\n", - "iii)no.of bits recorded in CD =10.16 gigabits\n" - ] - } - ], - "prompt_number": 133 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.32, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find output SNR\n", - "#Variable Declaration\n", - "fm=1*10.0**3\n", - "fs=32*10**3\n", - "\n", - "#Calculation\n", - "FM=4*10**3 #Bandwidth\n", - "SNR=(3*fs**3)/(8*math.pi**2*fm**2*FM) #SNR\n", - "SNRO=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print('Output signal to noise ratio %.2f dB' %SNRO)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal to noise ratio 24.93 dB\n" - ] - } - ], - "prompt_number": 134 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.33.i, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step size\n", - "\n", - "#Variable Declaration\n", - "fs=64000.0 #samples/sec\n", - "Amax=1.0 #Maximum signal amplitude\n", - "fm=3500.0 #Sample Rate\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*Amax)/fs*1000\n", - "\n", - "#Result\n", - "print('Step Size %.2f mV ' %de)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Step Size 343.61 mV \n" - ] - } - ], - "prompt_number": 135 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.33ii, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Quantizatio noise power \n", - "#Variable Declaration\n", - "fs=64000.0 #sample Rate\n", - "Amax=1.0 #Maximum signal Amplitude\n", - "fm=3500.0\n", - "\n", - "#Calculation\n", - "de=343.6117*10**-3 #step size\n", - "Nq=de**2/3.0 #Quantizatio noise power\n", - "Nqd=Nq*(fm/fs)*1000\n", - "\n", - "#Result\n", - "print('Quantizatio noise power %.3f mW' %Nqd)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quantizatio noise power 2.152 mW\n" - ] - } - ], - "prompt_number": 136 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.33iii, Page No 155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find SNR\n", - "\n", - "#Variable Declaration\n", - "fs=64000.0\n", - "Amax=1.0\n", - "fm=3500.0\n", - "Nqd=2.1522995*10**-3\n", - "\n", - "#Calculation\n", - "So=Amax**2/2\n", - "SNR=So/Nqd\n", - "SNRO=10*math.log10(SNR)\n", - "\n", - "#Result\n", - "print('Output signal noise ratio dB %.3f dB' %SNRO)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output signal noise ratio dB 23.661 dB\n" - ] - } - ], - "prompt_number": 137 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.34, Page No 156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Assuming signal is sampled at the rate 20% above Nyquist rate\n", - "\n", - "#Variable Declaration\n", - "fm=4.5*10**6\n", - "q=1024.0\n", - "\n", - "#Calculation\n", - "fs=1.2*2*fm #20% above Nyquist rate\n", - "v=math.log(q,2)\n", - "r=v*fs/10**6\n", - "\n", - "#Result\n", - "print('no.of bits/sec = %.f M bit/sec' %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "no.of bits/sec = 108 M bit/sec\n" - ] - } - ], - "prompt_number": 138 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.35, Page No 156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume bandwidth of the singal is 4kHz\n", - "\n", - "#Variable Declaration\n", - "fs=32000.0\n", - "A=2.0\n", - "fm=4000.0\n", - "BW=4000.0\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*A)/fs\n", - "Nq=de**2/3\n", - "SNR=(3*fs**3)/(8*math.pi**2*fm**2*BW)\n", - "\n", - "#Result\n", - "print('i)step size = %.3f M Volt' %de)\n", - "print('ii)noise power = %.3f W' %Nq)\n", - "print('iii)SNR= = %.3f ' %SNR)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)step size = 1.571 M Volt\n", - "ii)noise power = 0.822 W\n", - "iii)SNR= = 19.454 \n" - ] - } - ], - "prompt_number": 139 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.36, Page No 157" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assuming signal is sampled at the rate 20% above Nyquist rate\n", - "\n", - "#Variable Declaration\n", - "fm=15*10**3\n", - "fs=1.2*2*fm\n", - "q=65536\n", - "\n", - "#Calculation\n", - "v=math.log(q,2)\n", - "r=v*fs/1000\n", - "BW=r/2\n", - "\n", - "#Result\n", - "print('i)signaling rate,= %.f K bits/sec ' %r)\n", - "print('ii)bandwidth BW min = %.f kHz ' %BW)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)signaling rate,= 576 K bits/sec \n", - "ii)bandwidth BW min = 288 kHz \n" - ] - } - ], - "prompt_number": 140 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.37, Page No 157" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step size,noise power\n", - "\n", - "#Variable Declaration\n", - "fs=64*10**3\n", - "fm=3500.0\n", - "A=1.0\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*A)/fs #step size\n", - "Nq=(de**2/3)*(fm/fs) #Granular noise power\n", - "\n", - "#Result\n", - "print('i)step size = %.3f Volts' %de)\n", - "print('ii)Nq= %.5f W' %Nq)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)step size = 0.344 Volts\n", - "ii)Nq= 0.00215 W\n" - ] - } - ], - "prompt_number": 141 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.40, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step Nr,Transmission Bandwidth, SNR\n", - "\n", - "#Variable Declaration\n", - "fs=4 #kHz\n", - "N=12\n", - "\n", - "#Calculation\n", - "Nr=2*fs #Nyquest rate\n", - "Bt=1.0/2*N*fs #Transmission Bandwidth\n", - "SNR=1.8+(6*N) \n", - "\n", - "\n", - "#Result\n", - "print('i)Nyquest rate = %.1f kHz' %Nr)\n", - "print('ii)Transmission Bandwidth = %.1f kHz' %Bt)\n", - "print('iii)SNR = %.1f dB' %SNR)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)Nyquest rate = 8.0 kHz\n", - "ii)Transmission Bandwidth = 24.0 kHz\n", - "iii)SNR = 73.8 dB\n" - ] - } - ], - "prompt_number": 142 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.41, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find step size,noise power\n", - "\n", - "#Variable Declaration\n", - "fm=3.5*10**3\n", - "fs=64*10**3\n", - "A=2.0\n", - "\n", - "#Calculation\n", - "de=(2*math.pi*fm*A)/fs #step size\n", - "Nq=(de**2/3)*(fm/fs) #Granular noise power\n", - "\n", - "#Result\n", - "print('i)step size = %.3f Volts' %de)\n", - "print('ii)Nq= %.1f X 10^-3 W' %(Nq*10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i)step size = 0.687 Volts\n", - "ii)Nq= 8.6 X 10^-3 W\n" - ] - } - ], - "prompt_number": 143 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.42, Page No 159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Bit rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "W=4.5 * 10**6 #khz\n", - "Nr = 2 * W #Nyquist Rate\n", - "Q = 1024\n", - "fs=10.8\n", - "\n", - "#Calculation\n", - "N = math.log(Q,2) #number of binay pulse per word\n", - "Br= N*fs #Bit rate\n", - "Bw= 1.0/2*Br #Bandwidth\n", - "\n", - "#Result\n", - "print('i) Number of binay pulse per word = %.1f k bits/sec' %N)\n", - "print('ii) Bit rate = %.1f k bits/sec' %Br)\n", - "print('iii)Bandwidth= %.1f X 10^-3 kHz' %Bw)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of binay pulse per word = 10.0 k bits/sec\n", - "ii) Bit rate = 108.0 k bits/sec\n", - "iii)Bandwidth= 54.0 X 10^-3 kHz\n" - ] - } - ], - "prompt_number": 144 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.43, Page No 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Bit rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "W=15 #khz\n", - "Nr = 2*W #Nyquist Rate\n", - "Q = 65.53\n", - "fs=44.1 # Sampling rate kHz\n", - "N=16\n", - "\n", - "#Calculation\n", - "Br= N*fs #Bit rate\n", - "Bw= 1.0/2*Br #Bandwidth\n", - "\n", - "#Result\n", - "print('i) Number of binay pulse per word = %.3f bits' %N)\n", - "print('ii) Bit rate = %.1f k bits/sec' %Br)\n", - "print('iii)Bandwidth= %.1f kHz' %Bw)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of binay pulse per word = 16.000 bits\n", - "ii) Bit rate = 705.6 k bits/sec\n", - "iii)Bandwidth= 352.8 kHz\n" - ] - } - ], - "prompt_number": 145 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.44, Page No 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Number of binay pulse per word\n", - "\n", - "#Variable Declaration\n", - "W=3.3 #khz\n", - "fm = 1*10**3 #kHz\n", - "de = 250 #mV\n", - "fs=19.8 # Sampling rate kHz\n", - "\n", - "#Calculation\n", - "A=(de*fs)/(2*math.pi*fm)\n", - "\n", - "#Result\n", - "print('i) Number of binay pulse per word = %.3f' %A)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of binay pulse per word = 0.788\n" - ] - } - ], - "prompt_number": 146 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.45, Page No 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Signaling rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "W=3.3 #khz\n", - "fm = 3300 #Hz\n", - "Snq = 40 #dB\n", - "fs= 8000 # Samples/sec\n", - "\n", - "#Calculation \n", - "N=math.ceil((Snq-4.8)/6) # Number of bits per word\n", - "Q=2**N #\n", - "r=N*fs #Signaling rate k bits/sec\n", - "Bw=1.0/2*r\n", - "\n", - "#Result\n", - "print('i) Number of bits per word = %.1f' %N)\n", - "print('ii) Signaling rate rate = %.1f k bits/sec' %(r/10**3))\n", - "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of bits per word = 6.0\n", - "ii) Signaling rate rate = 48.0 k bits/sec\n", - "iii)Bandwidth= 24.0 kHz\n" - ] - } - ], - "prompt_number": 147 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.46, Page No 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find the maximun frequency with 1 volt amplitude\n", - "\n", - "#Variable Declaration\n", - "de=256*10**-3 #V\n", - "Ts = 10*10**-6 #kHz\n", - "fm = 10 #kHz\n", - "fs= 100 # kHz\n", - "A=1 #V\n", - "\n", - "#Calculation \n", - "wm=(de/A*Ts)*10**7\n", - "\n", - "#Result\n", - "print('i) maximun frequency = %.1f X 10^3 rad/sec' %wm)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) maximun frequency = 25.6 X 10^3 rad/sec\n" - ] - } - ], - "prompt_number": 148 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.47, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find the Signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "Q=256 \n", - "m=255\n", - "\n", - "#Calculation \n", - "SNR=(3*Q**2)/(math.log((1+m),math.e))**2 #dB\n", - "Gc=m/(math.log(1+m)) #Companding gain\n", - "Gc=20*math.log(Gc,10)\n", - "\n", - "#Result\n", - "print('i) The Signal to noise ratio= %.1f dB' %SNR)\n", - "print('ii) The Companding gain = %.1f dB' %Gc)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) The Signal to noise ratio= 6394.0 dB\n", - "ii) The Companding gain = 33.3 dB\n" - ] - } - ], - "prompt_number": 149 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.48, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of binay pulse per word, Signaling rate, Bandwidth\n", - "\n", - "#Variable Declaration\n", - "fm=15*10**3 #kHz\n", - "Q=200\n", - "fs=2*fm\n", - "\n", - "#Calculation \n", - "N=math.ceil(math.log(Q,2))\n", - "tr=N*fs #Transmission rate kbps\n", - "Bw=1.0/2*tr\n", - "\n", - "#Result\n", - "print('i) Number of bits per Samples = %.1f' %N)\n", - "print('ii) Signaling rate = %.1f k bits/sec' %(tr/10**3))\n", - "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of bits per Samples = 8.0\n", - "ii) Signaling rate = 240.0 k bits/sec\n", - "iii)Bandwidth= 120.0 kHz\n" - ] - } - ], - "prompt_number": 150 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.49, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find number of quantization level\n", - "\n", - "#Variable Declaration\n", - "tr=36.0 #kbps\n", - "fm=3.4 #kHz\n", - "fs=8\n", - "\n", - "#Calculation \n", - "N=math.ceil(tr/fs)\n", - "Q=2**N\n", - "\n", - "\n", - "#Result\n", - "print('i) number of quantization level = %.1f' %Q)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) number of quantization level = 32.0\n" - ] - } - ], - "prompt_number": 151 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.50, Page No 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find delta modulation\n", - "\n", - "#Variable Declaration\n", - "A=1 #V\n", - "fm=3.4 #kHz\n", - "fs=20\n", - "\n", - "#Calculation \n", - "de=1*2*math.pi*(fm/fs)\n", - "\n", - "\n", - "#Result\n", - "print('i) delta modulation = %.2f V' %de)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) delta modulation = 1.07 V\n" - ] - } - ], - "prompt_number": 152 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.51, Page No 163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "W=3.5 #kHz\n", - "r=50.0 #kbps\n", - "Vpp=4 #V\n", - "fs=8\n", - "\n", - "#Calculation \n", - "N=r/fs\n", - "SNR=4.8+(6.8*N)\n", - "\n", - "#Result\n", - "print('i) Signal to noise ratio = %.2f V' %SNR)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Signal to noise ratio = 47.30 V\n" - ] - } - ], - "prompt_number": 153 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.52, Page No 163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Signal to noise ratio\n", - "\n", - "#Variable Declaration\n", - "W=1 #MHz\n", - "fs1=3 #MHz\n", - "fs2=2.4 #MHz\n", - "Q=256\n", - "m=255\n", - "\n", - "#Calculation \n", - "SNR=((3*Q**2)/(math.log((1+m),math.e))**2)\n", - "SNR1=63095.73 #SNR=38+10\n", - "Q1=math.sqrt((SNR1*((math.log(256,math.e))**2))/3)\n", - "N1=math.ceil(math.log(Q1,2))\n", - "r=N1*fs2\n", - "Bw=1.0/2*r\n", - "\n", - "#Result\n", - "print('i) Number of bits/word = %.2f ' %N1)\n", - "print('ii) Bit rate = %.1f Mb/s' %r)\n", - "print('iii) Bandwidth = %.1f Mb/s' %Bw)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Number of bits/word = 10.00 \n", - "ii) Bit rate = 24.0 Mb/s\n", - "iii) Bandwidth = 12.0 Mb/s\n" - ] - } - ], - "prompt_number": 154 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo4.ipynb b/Digital_Communications/ChapterNo4.ipynb deleted file mode 100755 index 547a969e..00000000 --- a/Digital_Communications/ChapterNo4.ipynb +++ /dev/null @@ -1,273 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 4: DIGITAL MULTIPLEXERS

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4, page no 190 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Caption: Sampling Rate\n", - "\n", - "#initialisation of variables\n", - "f1=4.0*10**3\n", - "f2=4.5*10**3\n", - "\n", - "#CALCULATIONS\n", - "fsmin=(2*f2)/1000\n", - "\n", - "#RESULTS\n", - "print(\" Sampling rate =%.2f kHz\" %fsmin)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Sampling rate =9.00 kHz\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5, Page No 190 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Caption: Nyquest rate,Signaling rate,bandwidth\n", - "\n", - "#initialisation of variables\n", - "f1=3000.0\n", - "f4=1000.0\n", - "f2=1000.0\n", - "f3=1000.0\n", - "\n", - "#CALCULATIONS\n", - "#Nyquest rate\n", - "nq1=2*f1\n", - "nq2=2*f2\n", - "nq3=2*f3\n", - "nq4=2*f4\n", - "\n", - "#RESULTS\n", - "print('i. Nyquest rate of x1 =%.2fkHz' %nq1)\n", - "print('ii. Nyquest rate of x2 =%.2fkHz' %nq2)\n", - "print('iii. Nyquest rate of x3 =%.2fkHz' %nq3)\n", - "print('iv. Nyquest rate of x4 =%.2fkHz' %nq4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i. Nyquest rate of x1 =6000.00kHz\n", - "ii. Nyquest rate of x2 =2000.00kHz\n", - "iii. Nyquest rate of x3 =2000.00kHz\n", - "iv. Nyquest rate of x4 =2000.00kHz\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6, Page No 190 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find The spacing between two successive pules\n", - "\n", - "#initialisation of variables\n", - "samplingrate=8000.0\n", - "totalsignals=24+1\n", - "\n", - "#CALCULATIONS\n", - "t=1/samplingrate\n", - "T=t/totalsignals\n", - "T=T*10**6 #time is now u sec\n", - "space=T-1\n", - "\n", - "#RESULTS\n", - "print('The spacing between two successive pules %.f u sec' %space)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing between two successive pules 4 u sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7, Page No 191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find signaling rate ,bandwidth\n", - "\n", - "#initialisation of variables\n", - "N=6.0\n", - "fm=5000.0\n", - "\n", - "#CALCULATIONS\n", - "r=2*fm #sampling rate\n", - "sr=N*r #signalingrate\n", - "BW=N*fm #Bandwith\n", - "sr=sr/1000\n", - "BW=BW/1000\n", - "\n", - "#RESULTS\n", - "print('Signaling rate %.f K bits/sec' %sr)\n", - "print('Bandwith to avoid the cross talk in TDM is %.f kHz' %BW)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signaling rate 60 K bits/sec\n", - "Bandwith to avoid the cross talk in TDM is 30 kHz\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9, Page No 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find signaling rate ,bandwidth\n", - "\n", - "#initialisation of variables\n", - "N=4.0\n", - "x=24 #bits/frame\n", - "D=1152\n", - "s=1.0/3\n", - "r=1.544*10**6\n", - "\n", - "#CALCULATIONS\n", - "r0=N*r*((D+x)/(D-s*N))\n", - "\n", - "#RESULTS\n", - "print('Output bit rate %.2f MB/sec' %(r0/(10**6)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Output bit rate 6.31 MB/sec\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10, Page No 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find signaling rate ,bandwidth\n", - "\n", - "#initialisation of variables\n", - "N=24.0\n", - "x=72.0 #bits\n", - "D=192 #message and stuff bits\n", - "s=1.0/3\n", - "r=64 #kb/sec\n", - "\n", - "#CALCULATIONS\n", - "r0=N*r*((D+x)/(D-s*N))\n", - "r1=((N*r)/r0)*100\n", - "\n", - "#RESULTS\n", - "print('i) Output bit rate %.2f MB/sec' %(r0/(10**3)))\n", - "print('iI) Throughput efficiency is = %.2f percent' %r1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) Output bit rate 2.20 MB/sec\n", - "iI) Throughput efficiency is = 69.70 percent\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo5.ipynb b/Digital_Communications/ChapterNo5.ipynb deleted file mode 100755 index b36df857..00000000 --- a/Digital_Communications/ChapterNo5.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 5: DIGTIAL BASEBAND TRANSMISSION

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12, Page No 249 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find The roll of factor alpha\n", - "\n", - "#initialisation of variables\n", - "datarate=0.1*10**6\n", - "fB=75000.0 #bandwidth\n", - "\n", - "#CALCULATIONS\n", - "Tb=1/datarate\n", - "alpha=2*fB*Tb-1\n", - "\n", - "#RESULTS\n", - "print('The roll out factor alpha = = %.1f ' %alpha)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The roll out factor alpha = = 0.5 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13, Page No 249" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find The Transmission bandwidth\n", - "\n", - "#initialisation of variables\n", - "q=128.0\n", - "alpha=0.2\n", - "n=math.log(q,2)\n", - "fm=2000.0\n", - "\n", - "#CALCULATIONS\n", - "Nq=2*fm\n", - "fs=1.25*Nq\n", - "N=8.0\n", - "total=N*fs\n", - "bitrate=7*total\n", - "fB=((1+alpha)*bitrate)/2\n", - "fB=fB/1000\n", - "#RESULTS\n", - "print('The minimum transmission Bandwidth required = %.f kHz' %fB)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum transmission Bandwidth required = 168 kHz\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo6.ipynb b/Digital_Communications/ChapterNo6.ipynb deleted file mode 100755 index 83113b9c..00000000 --- a/Digital_Communications/ChapterNo6.ipynb +++ /dev/null @@ -1,158 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 6: DIGITAL MODULATION TECHNIQUES

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5, Page No 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#Symbol rate of transmission and bandwidth \n", - "\n", - "#initialisation of variables\n", - "fb=1.0 #MHz\n", - "Tb=1/fb #bit period ms\n", - "N=4\n", - "\n", - "#CALCULATIONS\n", - "Ts1=Tb\n", - "Bw1=2*fb\n", - "Ts2=Tb*2\n", - "Tr2=(1.0/2)*1000 #Symbols/sec\n", - "Bw2=1/Tb\n", - "Ts3=N*Tb\n", - "Tr3=(1.0/4)*1000\n", - "Bw3=(2.0*fb)/N\n", - "\n", - "#RESULTS\n", - "print(\"In BPSK\")\n", - "print(\"The symbol rate of transmission is = %.f X 10^6 symbol/sec \" %Ts1)\n", - "print(\"The Bandwidth is = %.f MHz \" %Bw1)\n", - "print(\"In QPSK\")\n", - "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr2)\n", - "print(\"The Bandwidth is = %.f MHz \" %Bw2)\n", - "print(\"In 16-ary PSK\")\n", - "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr3)\n", - "print(\"The Bandwidth is = %.f kHz \" %(Bw3*1000))\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In BPSK\n", - "The symbol rate of transmission is = 1 X 10^6 symbol/sec \n", - "The Bandwidth is = 2 MHz \n", - "In QPSK\n", - "The symbol rate of transmission is = 500 X 10^3 symbol/sec \n", - "The Bandwidth is = 1 MHz \n", - "In 16-ary PSK\n", - "The symbol rate of transmission is = 250 X 10^3 symbol/sec \n", - "The Bandwidth is = 500 kHz \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6, Page No 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "fb=90 #MHz\n", - "Bw=20 #Mb/s\n", - "\n", - "#CALCULATIONS\n", - "N=(2*fb)/Bw\n", - "\n", - "#RESULTS\n", - "print(\"Number of bits required = %.f \" %N)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of bits required = 9 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12, Page No 357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Tb=0.1 #msec\n", - "\n", - "#CALCULATIONS\n", - "fb=1/Tb\n", - "\n", - "#RESULTS\n", - "print(\"Transmission bandwidth = %.f kHz\" %fb)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Transmission bandwidth = 10 kHz\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo7.ipynb b/Digital_Communications/ChapterNo7.ipynb deleted file mode 100755 index 9d58a722..00000000 --- a/Digital_Communications/ChapterNo7.ipynb +++ /dev/null @@ -1,431 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 7: PERFORMANCE ANALYSIS OF DIGITAL COMMUNICATION SYSTEMS

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.15, Page No 414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "T=1.0*10**-6 #ms\n", - "A=10.0*10**-3\n", - "N=1*10**-11\n", - "\n", - "#CALCULATIONS\n", - "Eb=((A**2)*T)/2.0\n", - "Epb=math.sqrt(Eb/N)\n", - "Pb=(1.0/2)*math.erfc(Epb)*(1.0/4)\n", - "\n", - "#RESULTS\n", - "print(\"Bit error probability = %.2f X 10^-4 \" %(Pb*(10**4)))\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bit error probability = 1.96 X 10^-4 \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.16, Page No 420" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Br=25*10**6 #bits/sec\n", - "N=2*10**-20 #Power spectral density of noise\n", - "A=1.0*10**-6\n", - "Ps=1*10**-12 # Normalized power\n", - "\n", - "#CALCULATIONS\n", - "Tb=1.0/Br\n", - "Ps=(A**2)/2.0\n", - "Pe=1.0/2*(math.erfc((0.6*Ps*Tb)/N))\n", - "#RESULTS\n", - "print(\"Average probability of bit error is Pe= %.2f X 10^-4 \" %(Pe*10))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average probability of bit error is Pe= 1.98 X 10^-4 \n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.17, Page No 423" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find probability of error\n", - "\n", - "#initialisation of variables\n", - "A=2.0\n", - "N0=2.0*10**-4 #power sepctral density\n", - "\n", - "#CALCULATIONS\n", - "Tmin=(6.76*N0)/4\n", - "\n", - "#RESULTS\n", - "print(\"The min time for which the signal should be extended is Tmin= %.3f X 10^-3 msec \" %(Tmin*10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The min time for which the signal should be extended is Tmin= 0.338 X 10^-3 msec \n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.20, Page No 428" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#The average carrier\n", - "\n", - "#initialisation of variables\n", - "Pe=10**-4\n", - "N0=2*10**10\n", - "T=1.0/10**6\n", - "\n", - "#CALCULATIONS\n", - "E=6.76*N0\n", - "P=E/T\n", - "Eb=8.5171*N0\n", - "P2=Eb/T\n", - "\n", - "\n", - "#RESULTS\n", - "print(\"The average carrier = %.3f X 10^-3 mW \" %(P2/10**17))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average carrier = 1.703 X 10^-3 mW \n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.21, Page No 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#The average carrier\n", - "\n", - "#initialisation of variables\n", - "A=0.2*10**-3 #V\n", - "T=2*10**-6\n", - "N0=2*10**-15\n", - "\n", - "#CALCULATIONS\n", - "Pe=(math.sqrt((A**2*T)/4*N0))\n", - "\n", - "#RESULTS\n", - "print(\"The average carrier = %.3f X 10^-4 mW \" %(Pe*10**15))\n", - "print(\"Approximation error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average carrier = 6.325 X 10^-4 mW \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.29, Page No 447" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "A=1.0\n", - "N0=2.0*10**-5 #power sepctral density\n", - "\n", - "#CALCULATIONS\n", - "T=((3.71**2)*2*N0)/(A**2)\n", - "Br=1/T\n", - "#Results\n", - "print(\"Bit rate Br= %.2f k bits/sec\" %(Br/(10**3)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bit rate Br= 1.82 k bits/sec\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.31, Page No 448" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Pe=10.0**-4 #probability of error of PSK\n", - "N0=2.0*10**-10\n", - "Br=10**6 #Bit Rate\n", - "\n", - "\n", - "#CALCULATIONS\n", - "T=1.0/Br\n", - "E=N0*6.76\n", - "P=E/T\n", - "Eb=8.5171*N0\n", - "Pb=Eb/T\n", - "#Results\n", - "print(\"i) PSK system The required carrier power = %.2f mW\" %(P*10**3))\n", - "print(\"ii) DPSK system The required carrier power = %.2f mW\" %(Pb*10**3))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) PSK system The required carrier power = 1.35 mW\n", - "ii) DPSK system The required carrier power = 1.70 mW\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.32, Page No 450" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "A=0.2*10**-3 #V\n", - "T=2*10**-6 #Sec\n", - "N0=2*10**-15\n", - "\n", - "\n", - "#CALCULATIONS\n", - "x=math.sqrt((A**2*T)/(4*N0))\n", - "Pe=(1.0/2)*math.erfc(x/math.sqrt(2.0))\n", - "\n", - "#Results\n", - "print(\"Probability of error = %.2f X 10^-4\" %(Pe*10**4))\n", - "#print(\"Channel Bandwidth = %.5f MHz\" %BW)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probability of error = 7.83 X 10^-4\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.36, Page No 453" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Ap=1 #mV\n", - "En=192.3 #mV\n", - "Arms=707 #mV\n", - "\n", - "\n", - "#CALCULATIONS\n", - "Z=Arms/En\n", - "Pe=1.0/2*(math.erfc(math.sqrt(2)*(Z/math.sqrt(2))))\n", - "\n", - "#Results\n", - "print(\"Probability of error is %.7f \" %Pe)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probability of error is 0.0000001 \n" - ] - } - ], - "prompt_number": 52 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.37, Page No 454" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "Br=2.08*10**-6 #Bit Rate\n", - "N0=2*10**-8\n", - "\n", - "#CALCULATIONS\n", - "Eb=(math.sqrt(3.3))/(5*10**7) #Eb=bit energy\n", - "Ps=Eb*Br\n", - "BW=2*Br #Bandwidth\n", - "Es=286.39*N0\n", - "Ps2=(Es*Br)/2\n", - "BW2=(2*Br)/4\n", - "\n", - "#Results\n", - "print(\"i) BPSK THe transmission bandwidth = %.2f MHz\" %(BW*10**6)) \n", - "print(\"ii) For 16 ary PSK THe transmission bandwidth = %.2f MHz\" %(BW2*10**6)) \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i) BPSK THe transmission bandwidth = 4.16 MHz\n", - "ii) For 16 ary PSK THe transmission bandwidth = 1.04 MHz\n" - ] - } - ], - "prompt_number": 53 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo8.ipynb b/Digital_Communications/ChapterNo8.ipynb deleted file mode 100755 index d34d983c..00000000 --- a/Digital_Communications/ChapterNo8.ipynb +++ /dev/null @@ -1,1439 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 8: INFORMATION THEORY

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1, Page No 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "#Find Information Content of Each Symbol\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/8.0\n", - "\n", - "#Calculation\n", - "#information content of each symbol\n", - "Ix1=math.log(1/px1,2)\n", - "Ix2=math.log(1/px2,2)\n", - "Ix3=math.log(1/px3,2)\n", - "Ix4=math.log(1/px4,2)\n", - "\n", - "#Result\n", - "print(\"Information Content tI(x1)= %.2f bit\" %Ix1)\n", - "print(\" tI(x2)= %.f bits\" %Ix2)\n", - "print(\" tI(x3)= %.f bits\" %Ix3)\n", - "print(\" tI(x4)= %.f bits\" %Ix4)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Information Content tI(x1)= 1.00 bit\n", - " tI(x2)= 2 bits\n", - " tI(x3)= 3 bits\n", - " tI(x4)= 3 bits\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2, Page No 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find amount of Information\n", - "#Variable Declaration\n", - "#Calculation\n", - "pxi=1/4.0\n", - "Ixi=(math.log10(1/pxi))/math.log10(2)\n", - "\n", - "#RESULTS\n", - "print(\"The amount of Information I(Xi)= %.f \" %Ixi)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of Information I(Xi)= 2 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3, Page No 464" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Amount of Information\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/2.0\n", - "\n", - "#Calculation\n", - "Ix1=math.log(1/px1,2) #entropy\n", - "Ix2=math.log(1/px2,2)\n", - "\n", - "#Result\n", - "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n", - "print(\"The amount of Information I(X2)= %.f bit\" %Ix2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of Information I(X1)= 1 bit\n", - "The amount of Information I(X2)= 1 bit\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4, Page No 465" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Amount of Information \n", - "\n", - "#Variable Declaration\n", - "px1=1/4.0\n", - "px2=3/4.0\n", - "\n", - "#Calculation\n", - "Ix1=math.log(1/px1,2)\n", - "Ix2=math.log(1/px2,2)\n", - "\n", - "#Result\n", - "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n", - "print(\"The amount of Information I(X2)= %.2f bit\" %Ix2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of Information I(X1)= 2 bit\n", - "The amount of Information I(X2)= 0.42 bit\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9, Page No 468 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Entropy,Amount of information\n", - "\n", - "#Variable Declaration\n", - "px1=0.4\n", - "px2=0.3\n", - "px3=0.2\n", - "px4=0.1\n", - "\n", - "#Calculation\n", - "HX=-px1*math.log(px1,2)-px2*math.log(px2,2)-px3*math.log(px3,2)-px4*math.log(px4,2)\n", - "Px1x2x1x3=px1*px2*px1*px3\n", - "Ix1x2x1x3=-math.log(Px1x2x1x3,2)\n", - "Px4x3x3x2=px4*px3*px3*px2\n", - "Ix4x3x3x2=-math.log(Px4x3x3x2,2)\n", - "\n", - "#Result\n", - "print(\" \\n Entropy H(X) = %.2f bits/symbol \" %HX)\n", - "print(\"The amount of Information I(x1x2x1x3)= %.2f bits/symbol\" %Ix1x2x1x3)\n", - "print(\" I(x4x3x3x2) = %.2f bits/symbol \" %Ix4x3x3x2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " Entropy H(X) = 1.85 bits/symbol \n", - "The amount of Information I(x1x2x1x3)= 6.70 bits/symbol\n", - " I(x4x3x3x2) = 9.70 bits/symbol \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.13, Page No 471" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Find information rate the telegraphic source\n", - "\n", - "#Variable Declaration\n", - "pdash=1/3.0\n", - "pdot=2/3.0\n", - "tdot=0.2\n", - "tdash=0.6\n", - "tspace=0.2\n", - "\n", - "#Calculation\n", - "HX=-pdash*math.log(pdash,2)-pdot*math.log(pdot,2)\n", - "Ts=pdot*tdot+pdash*tdash+tspace\n", - "r=1/Ts\n", - "R=r*HX\n", - "\n", - "#Result\n", - "print('Average rate of information R = %.2f bits/s' %R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average rate of information R = 1.72 bits/s\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.14, Page No 471" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find information rate of the source\n", - "\n", - "f=input('Enter the frequncy f=')\n", - "px1=1/8.0\n", - "px2=1/8.0\n", - "px3=3/8.0\n", - "px4=3/8.0\n", - "\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2) #entropy of the source\n", - "R=2*f*HX #r=2*f\n", - "print('information rate R= %.1f bits/sec ' %R) #f=signal bandwidth\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the frequncy f=34\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "information rate R= 123.2 bits/sec \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.15, Page No 472" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find information rate of the source\n", - "#all symbols are equally likely\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/2.0\n", - "px3=1/2.0\n", - "px4=1/2.0\n", - "\n", - "#Calculation\n", - "f=input('Enter the frequncy of system fm(in Hz) =')\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n", - "\n", - "#Result\n", - "print('\\n Entropy H(X) =%.f bits/symbol ' %HX)\n", - "R=2*f*HX\n", - "print('information rate =%.f bits/sec' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the frequncy of system fm(in Hz) =45\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Entropy H(X) =2 bits/symbol \n", - "information rate =180 bits/sec\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.16, Page No 473" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find source entropy ,information rate\n", - "\n", - "#Variable Declaration\n", - "#probability symbols\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/16.0\n", - "px5=1/16.0\n", - "Tb=10.0**-3\n", - "\n", - "#Calculation\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4)+px5*math.log(1/px5)\n", - "\n", - "#Result\n", - "print('1. source entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n", - "r=1.0/Tb\n", - "R=r*HX #information rate\n", - "print(' 2. Information rate R = %.2f bits/sec ' %R)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. source entropy H(X) = 1.72 bits/symbol \n", - " 2. Information rate R = 1721.57 bits/sec \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.17, Page No 473" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume if there are 16 outcomes per second\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/16.0\n", - "px5=1/16.0\n", - "r=16.0\n", - "\n", - "#Calculation\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)\n", - "\n", - "#Result\n", - "print('1. Entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n", - "\n", - "R=r*HX\n", - "print('2., Information rate R = %.f bits/sec' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. Entropy H(X) = 1.88 bits/symbol \n", - "2., Information rate R = 30 bits/sec\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.18, Page No 474" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#determine entropy ,information rate\n", - "\n", - "#Variable Declaration\n", - "px1=1/4.0\n", - "px2=1/5.0\n", - "px3=1/5.0\n", - "px4=1/10.0\n", - "px5=1/10.0\n", - "px6=1/20.0\n", - "px7=1/20.0\n", - "px8=1/20.0\n", - "f=10*10**3.0\n", - "fs=10*2*10**3.0\n", - "\n", - "#Calculation\n", - "#entropy\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)+px6*math.log(1/px6,2)+px7*math.log(1/px7,2)+px8*math.log(1/px8,2) \n", - "\n", - "#Result\n", - "print('bits/message H(X) = %.2f ' %HX)\n", - "r=fs\n", - "R=r*HX #information rate\n", - "print('bits/sec R = %.2f' %R)\n", - "print('Approximation error')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "bits/message H(X) = 2.74 \n", - "bits/sec R = 54828.92\n", - "Approximation error\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.19, Page No 476 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from array import *\n", - "#Find Channel Matrix,joint probability\n", - "\n", - "#Variable Declaration\n", - "px1=0.5\n", - "px2=0.5\n", - "py1x1=0.9\n", - "py2x1=0.1\n", - "py1x2=0.2\n", - "py2x2=0.8\n", - "PYX=[[py1x1,py2x1],[py1x2,py2x2]]\n", - "PX=[[px1,px2]]\n", - "PY = [[0,0],\n", - " [0,0]]\n", - "PXY = [[0,0],\n", - " [0,0]]\n", - "\n", - "for i in range(len(PYX)):\n", - " # iterate through columns of Y\n", - " for j in range(len(PX[0])):\n", - " # iterate through rows of Y\n", - " for k in range(len(PX)):\n", - " PY[i][j] += PYX[i][k] * PX[k][j]\n", - "print(' PY ARRAY = \\n')\n", - "for r in PY:\n", - " print(r)\n", - "PXd=[[px1,0],[0,px2]]\n", - "\n", - "\n", - "for i in range(len(PXd)):\n", - " # iterate through columns of Y\n", - " for j in range(len(PYX[0])):\n", - " # iterate through rows of Y\n", - " for k in range(len(PYX)):\n", - " PXY[i][j] += PXd[i][k] * PYX[k][j]\n", - "\n", - " \n", - "print(' \\n PXY ARRAY = \\n')\n", - "for r in PXY:\n", - " print(r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " PY ARRAY = \n", - "\n", - "[0.45, 0.45]\n", - "[0.1, 0.1]\n", - " \n", - " PXY ARRAY = \n", - "\n", - "[0.45, 0.05]\n", - "[0.1, 0.4]\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.35, Page No 498" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Channel is aproximated by the AWGN Channel\n", - "\n", - "#Variable Declaration\n", - "B=4000.0\n", - "S=0.1*10**-3\n", - "n=2*10**-12\n", - "\n", - "#Calculation\n", - "N=n*B\n", - "C=B*math.log(1+(S/N),2) #Capacity of Channel\n", - "C=C/1000.0\n", - "#Result\n", - "print(' Capacity of Channel C=%.3f(10^3) b/s ' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Capacity of Channel C=54.439(10^3) b/s \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36i, Page No 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "fm=4000.0\n", - "fs=2*fm\n", - "n=1.25\n", - "\n", - "#Calculation\n", - "r=fs*n\n", - "pxi=1/256.0\n", - "HX=-math.log(pxi,2)\n", - "R=r*HX\n", - "R=R/1000\n", - "print('Information Rate R= %.f kb/s' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Information Rate R= 80 kb/s\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36ii, Page No 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "B=10*10**3.0\n", - "SN=20.0\n", - "\n", - "#Calculation\n", - "SNR=10**(SN/10.0)\n", - "C=B*math.log(1+(SNR),2)\n", - "C=C/1000\n", - "\n", - "#Result\n", - "print('The channel capacity = %.2f 10^3 b/s' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The channel capacity = 66.58 10^3 b/s\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36iii, Page No 499" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "C=8*10**4.0\n", - "B=10**4.0\n", - "\n", - "#Calculation\n", - "SN=2**(C/B)-1\n", - "SNR=10*math.log(SN,10) #SNR\n", - "\n", - "#Result\n", - "print(' The S/N ratio required for error-free transmission =%.2f dB ' %SNR) #required SNR is greater that 24.064\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The S/N ratio required for error-free transmission =24.07 dB \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.36iv, Page No 499 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#assume that succeissive samples are statistically independent\n", - "\n", - "#Variable Declaration\n", - "SN=20.0\n", - "\n", - "#Calculation\n", - "SNR=10**(SN/10.0)\n", - "C=8*10**4.0\n", - "B=C/(math.log(1+SNR,2)) #Bandwidth\n", - "B=B/1000\n", - "\n", - "#Result\n", - "print('Bandwidth required for AWGN channel B =%.2f kHz ' %B)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bandwidth required for AWGN channel B =12.02 kHz \n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.37, Page No 502" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find code efficiency,redundancy\n", - "\n", - "#Variable Declaration\n", - "px1=0.9\n", - "px2=0.1\n", - "n1=1.0\n", - "n2=1.0\n", - "\n", - "#Calculation\n", - "L=px1*n1+px2*n2 #code leght\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)\n", - "n=(HX/L) #code efficiency\n", - "n=n*100\n", - "\n", - "print('Code efficiency = %.1f percent' %n)\n", - "r=(100-n) #code reduncy\n", - "print('Code redundancy = %.1f percent' %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Code efficiency = 46.9 percent\n", - "Code redundancy = 53.1 percent\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.38, Page No 502" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find code efficiency,redundancy\n", - "\n", - "#Variable Declaration\n", - "pa1=0.81\n", - "pa2=0.09 \n", - "pa3=0.09\n", - "pa4=0.01 \n", - "n1=1\n", - "n2=2 \n", - "n3=3\n", - "n4=3 \n", - "\n", - "#Calculation\n", - "L=pa1*n1+pa2*n2+pa3*n3+pa4*n4\n", - "HX2=pa1*math.log(1/pa1,2)+pa2*math.log(1/pa2,2)+pa3*math.log(1/pa3,2)+pa4*math.log(1/pa4,2)\n", - "n=HX2/L*100\n", - "\n", - "#Result\n", - "print(' code efficiency = %.2f percent' %n)\n", - "\n", - "r=(100-n) #code reduncy\n", - "print(' code redundancy = %.1f percent' %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " code efficiency = 72.71 percent\n", - " code redundancy = 27.3 percent\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.44, Page No 507" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find efficiency of the code\n", - "\n", - "#Variable Declaration\n", - "px1=1/2.0\n", - "px2=1/4.0\n", - "px3=1/8.0\n", - "px4=1/8.0\n", - "n1=1.0\n", - "n2=2.0\n", - "n3=3.0\n", - "n4=3.0\n", - "\n", - "#Calculation\n", - "#information content of each symbol\n", - "Ix1=-math.log(px1,2)\n", - "Ix2=-math.log(px2,2)\n", - "Ix3=-math.log(px3,2)\n", - "Ix4=-math.log(px4,2)\n", - "\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n", - "L=px1*n1+px2*n2+px3*n3+px4*n4\n", - "\n", - "n=HX/L*100\n", - "\n", - "#Result\n", - "print('Ccode efficiency = %.f Percent' %n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ccode efficiency = 100 Percent\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.50, Page No 512" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy ,information rate\n", - "#If there are 16 outcomes per second\n", - "\n", - "#Variable Declaration\n", - "P1=1/2.0\n", - "P2=1/4.0\n", - "P3=1/8.0\n", - "P4=1/16.0\n", - "P5=1/32.0\n", - "P6=1/32.0\n", - "r=16 #message rate\n", - "\n", - "#Calculation\n", - "H=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2)+P4*math.log(1/P4,2)+P5*math.log(1/P5,2)+P6*math.log(1/P6,2)\n", - "#Entropy of system\n", - "\n", - "#Result\n", - "print('1. Entropy of system H = %.2f bits/message ' %H)\n", - "R=H*r #R=Entropy*message rate\n", - "print(' 2. Information rate R = %.f bits/sec ' %R)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. Entropy of system H = 1.94 bits/message \n", - " 2. Information rate R = 31 bits/sec \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.51, Page No 512" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Calculate H(X) ,H(Y)\n", - "\n", - "#Variable Declaration\n", - "px1=0.3\n", - "px2=0.4\n", - "px3=0.3\n", - "\n", - "#Calculation\n", - "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2) #Entropy of X\n", - "\n", - "\n", - "print(' 1.Entropy of X H(X)=%.3f bits/symbol ' %HX)\n", - "\n", - "PYX=[[0.8, 0.2, 0],[ 0, 1, 0],[ 0, 0.3, 0.7]]\n", - "PX=[[px1, px2, px3]]\n", - "PXY = [[0,0,0],\n", - " [0,0,0],\n", - " [0,0,0]]\n", - "\n", - "for i in range(len(PYX)):\n", - " # iterate through columns of PXd\n", - " for j in range(len(PX[0])):\n", - " # iterate through rows of PYX\n", - " for k in range(len(PX)):\n", - " PXY[i][j] += PYX[i][k] * PX[k][j]\n", - "\n", - "py1=PXY[0][0]\n", - "py2=PXY[0][1]\n", - "py3=PXY[0][2]\n", - "HY=py1*math.log(1/py1,2)+py2*math.log(1/py2,2)+py3*math.log(1/py3,2) #Entropy of Y\n", - "print(' 2. Entropy of Y H(Y)= %.2f bits/symbol ' %HY)\n", - "print('Approximation error')\t\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1.Entropy of X H(X)=1.571 bits/symbol \n", - " 2. Entropy of Y H(Y)= 1.51 bits/symbol \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.52, Page No 513" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source ,entropy of second order extension\n", - "\n", - "#Variable Declaration\n", - "P1=0.7\n", - "P2=0.15\n", - "P3=0.15\n", - "\n", - "#Calculation\n", - "HX=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2) #Entropy of source\n", - "print(' 1. Entropy of system H(X)=%.2f bits/symbol ' %HX)\n", - "#H(X^n)=n*H(X)\n", - "n=2 #for second order\n", - "HX2=n*HX\n", - "\n", - "#Result\n", - "print(' 2. Entropy of second order system extension of source can be H(X^2)=%.2f bits/symbol ' %(HX*2))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1. Entropy of system H(X)=1.18 bits/symbol \n", - " 2. Entropy of second order system extension of source can be H(X^2)=2.36 bits/symbol \n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.54, Page No 514" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "S0=1/3.0\n", - "S1=1/6.0\n", - "S2=1/4.0\n", - "S3=1/4.0\n", - "\n", - "#Calculation\n", - "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n", - "\n", - "#Result\n", - "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Entropy of system H(X)=1.96 bits/symbol \n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.56, Page No 515" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Information capacity of telephone\n", - "\n", - "#Variable Declaration\n", - "B=3.4*10**3\n", - "SNR=30.0\n", - "\n", - "#Calculation\n", - "SN=10**(SNR/10)\n", - "C=B*math.log(1+SN,2) #Information capacity\n", - "C=C/1000\n", - "\n", - "#Result\n", - "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Information capacity of telephone is C = 33.89 kbps \n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.59, Page No 516" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "S0=1/3.0\n", - "S1=1/6.0\n", - "S2=1/4.0\n", - "S3=1/4.0\n", - "\n", - "#Calculation\n", - "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n", - "\n", - "#Result\n", - "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Entropy of system H(X)=1.96 bits/symbol \n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.60, Page No 516" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "m1=1/2.0\n", - "m2=1/4.0\n", - "m3=1/8.0\n", - "m4=1/16.0\n", - "m5=1/16.0\n", - "\n", - "#Calculation\n", - "L=(m1*1)+(m2*2)+(m3*3)+(2*(m4)*4)\n", - "\n", - "#Result\n", - "print(' Average number of bits per message =%.2f bits ' %L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Average number of bits per message =1.88 bits \n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.61, Page No 517" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find Information capacity of telephone\n", - "\n", - "#Variable Declaration\n", - "B=3.4*10**3\n", - "SNR=30.0\n", - "\n", - "#Calculation\n", - "SN=10**(SNR/10)\n", - "C=B*math.log(1+SN,2) #Information capacity\n", - "C=C/1000\n", - "\n", - "#Result\n", - "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Information capacity of telephone is C = 33.89 kbps \n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.62, Page No 517" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "p1=4.0\n", - "m1=0.5\n", - "m2=0.5\n", - "m3=0.375\n", - "m4=0.375\n", - "m5=0.375\n", - "m6=0.375\n", - "\n", - "#Calculation\n", - "I1=p1*math.log(1/p1,2) \n", - "HX=m1*math.log(1/m1,2)+m2*math.log(1/m2,2)+m3*math.log(1/m3,2)+m4*math.log(1/m4,2)+m5*math.log(1/m5,2)+m6*math.log(1/m6,2) #EntroSy of source\n", - "\n", - "#Result\n", - "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n", - "print('Approximation error')\t" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Entropy of system H(X)=3.12 bits/symbol \n", - "Approximation error\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.65, Page No 519" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find entropy of source \n", - "\n", - "#Variable Declaration\n", - "S0=1/2.0\n", - "S1=1/4.0\n", - "S2=1/8.0\n", - "S3=1/8.0\n", - "n=1\n", - "\n", - "#Calculation\n", - "H=S0*math.log(1.0/S0,2)+S1*math.log(1.0/S1,2)+S2*math.log(1.0/S2,2)+S3*math.log(1.0/S3,2) #EntroSy of source\n", - "L=H*n\n", - "\n", - "\n", - "#Result\n", - "print(' Code length =%.2f bits/messages ' %L)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Code length =1.75 bits/messages \n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.67, Page No 520" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Find channel capacity and new bandwidth\n", - "\n", - "#Variable Declaration\n", - "B=8*10**3\n", - "SNR=31.0\n", - "SNR2=61\n", - "\n", - "#Calculation\n", - "C=B*math.log(1+SNR,2) #Information capacity\n", - "B2=C/math.log(1+SNR2,2)\n", - "#Result\n", - "print(' Channel capacity is C = %.2f x 10^3 bits/sec ' %(C/1000))\n", - "print(' New Bandwidth is C = %.2f x kHz ' %(B2/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Channel capacity is C = 40.00 x 10^3 bits/sec \n", - " New Bandwidth is C = 6.72 x kHz \n" - ] - } - ], - "prompt_number": 31 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/ChapterNo9.ipynb b/Digital_Communications/ChapterNo9.ipynb deleted file mode 100755 index 8062105c..00000000 --- a/Digital_Communications/ChapterNo9.ipynb +++ /dev/null @@ -1,182 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chpater No 9: ERROR CONTROL CODING

" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4, Page No 540" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find detected errors,corrected errors\n", - "\n", - "#initialisation of variables\n", - "dmin=5.0\n", - "#(s+1)<= dmin number errors can be detected(s)\n", - " \n", - "#CALCULATIONS\n", - "s=dmin-1\n", - "\n", - "#RESULTS\n", - "print(' i)Number of detected errors s <= %.f ' %s)\n", - "#(2t+1)<=dmin number errors can be corrected(t)\n", - "t=(dmin-1)/2.0\n", - "print('ii) Number of corrected errors t<= %.f ' %t)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " i)Number of detected errors s <= 4 \n", - "ii) Number of corrected errors t<= 2 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17, Page No 569" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Determine all possible code vectors \n", - "\n", - "m3=1\n", - "m2=0\n", - "m1=1\n", - "m0=0\n", - "#M=Message Matrix\n", - "#G=Generator Matrix\n", - "G=[[1, 0, 1, 1, 0, 0, 0],[0, 1, 0, 1, 1, 0, 0],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n", - "M=[[m3,m2,m1,m0]]\n", - "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n", - "\n", - "for i in range(len(G)):\n", - " # iterate through columns of PXd\n", - " for j in range(len(M[0])):\n", - " # iterate through rows of PYX\n", - " for k in range(len(M)):\n", - " X[i][j] += G[i][k] * M[k][j]\n", - "print('The required code word')\n", - "for r in range(0,7):\n", - " print(X[0][r])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required code word\n", - "1\n", - "0\n", - "1\n", - "0\n", - "0\n", - "0\n", - "0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.19, Page No 572" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Determine code word \n", - "m3=1\n", - "m2=0\n", - "m1=1\n", - "m0=0\n", - "#M=Message Matrix\n", - "#G=Generator Matrix\n", - "G=[[1, 0, 0, 0, 1, 0, 1],[0, 1, 0, 0, 1, 1, 1],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n", - "M=[[m3,m2,m1,m0]]\n", - "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n", - "\n", - "\n", - "for i in range(len(G)):\n", - " # iterate through columns of PXd\n", - " for j in range(len(M[0])):\n", - " # iterate through rows of PYX\n", - " for k in range(len(M)):\n", - " X[i][j] += G[i][k] * M[k][j]\n", - "print('The required code word')\n", - "for r in range(0,7):\n", - " print(X[0][r] )\n", - " \n", - "\n", - "print('The code in the book is wrong')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required code word\n", - "1\n", - "0\n", - "1\n", - "0\n", - "0\n", - "0\n", - "0\n", - "The code in the book is wrong\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Digital_Communications/README.txt b/Digital_Communications/README.txt deleted file mode 100755 index cb9038a1..00000000 --- a/Digital_Communications/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Mayur Sabban -Course: be -College/Institute/Organization: Vishwakarma Institute of Technology Pune -Department/Designation: Computer Engg -Book Title: Digital Communications -Author: S. Sharma -Publisher: S. K. Kataria & Sons, New Delhi -Year of publication: 2013 -Isbn: 9789350142684 -Edition: 6 \ No newline at end of file diff --git a/Digital_Communications/screenshots/Chapter1.png b/Digital_Communications/screenshots/Chapter1.png deleted file mode 100755 index ecbda1c6..00000000 Binary files a/Digital_Communications/screenshots/Chapter1.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter2.png b/Digital_Communications/screenshots/chapter2.png deleted file mode 100755 index cfb39197..00000000 Binary files a/Digital_Communications/screenshots/chapter2.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter2_1.png b/Digital_Communications/screenshots/chapter2_1.png deleted file mode 100755 index 4eac12f5..00000000 Binary files a/Digital_Communications/screenshots/chapter2_1.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter2_2.png b/Digital_Communications/screenshots/chapter2_2.png deleted file mode 100755 index 2aa76318..00000000 Binary files a/Digital_Communications/screenshots/chapter2_2.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter2_3.png b/Digital_Communications/screenshots/chapter2_3.png deleted file mode 100755 index 2aa76318..00000000 Binary files a/Digital_Communications/screenshots/chapter2_3.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter3.png b/Digital_Communications/screenshots/chapter3.png deleted file mode 100755 index bd8ace20..00000000 Binary files a/Digital_Communications/screenshots/chapter3.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter3_1.png b/Digital_Communications/screenshots/chapter3_1.png deleted file mode 100755 index b59f5a6f..00000000 Binary files a/Digital_Communications/screenshots/chapter3_1.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter3_2.png b/Digital_Communications/screenshots/chapter3_2.png deleted file mode 100755 index 9e929daa..00000000 Binary files a/Digital_Communications/screenshots/chapter3_2.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter3_3.png b/Digital_Communications/screenshots/chapter3_3.png deleted file mode 100755 index 9e929daa..00000000 Binary files a/Digital_Communications/screenshots/chapter3_3.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter4.png b/Digital_Communications/screenshots/chapter4.png deleted file mode 100755 index 9160481e..00000000 Binary files a/Digital_Communications/screenshots/chapter4.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter4_1.png b/Digital_Communications/screenshots/chapter4_1.png deleted file mode 100755 index 230f9193..00000000 Binary files a/Digital_Communications/screenshots/chapter4_1.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter4_2.png b/Digital_Communications/screenshots/chapter4_2.png deleted file mode 100755 index 31a0c9c2..00000000 Binary files a/Digital_Communications/screenshots/chapter4_2.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter4_3.png b/Digital_Communications/screenshots/chapter4_3.png deleted file mode 100755 index 31a0c9c2..00000000 Binary files a/Digital_Communications/screenshots/chapter4_3.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter6.png b/Digital_Communications/screenshots/chapter6.png deleted file mode 100755 index 47807122..00000000 Binary files a/Digital_Communications/screenshots/chapter6.png and /dev/null differ diff --git a/Digital_Communications/screenshots/chapter7.png b/Digital_Communications/screenshots/chapter7.png deleted file mode 100755 index 12c93548..00000000 Binary files a/Digital_Communications/screenshots/chapter7.png and /dev/null differ diff --git a/Digital_Communications_by_S._Sharma/Chapter2.ipynb b/Digital_Communications_by_S._Sharma/Chapter2.ipynb new file mode 100755 index 00000000..9cc6d1df --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter2.ipynb @@ -0,0 +1,290 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter 2: SAMPLING THEORY AND PULSE MODULATION

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#find Nquist Rate\n", + "\n", + "#Variable declaration\n", + "#given \n", + "pi=3.14\n", + "w1=50*pi\n", + "w2=300*pi\n", + "w3=100*pi\n", + "#w=2*%pi*f\n", + "\n", + "#Calculation\n", + "f1=w1/(2*pi)\n", + "f2=w2/(2*pi)\n", + "f3=w3/(2*pi)\n", + "fm=f2 #fm = maximum frquency is present at the signal\n", + "\n", + "#Result\n", + "print('maximum frquency of the signal is = %.2f Hz' %f2)\n", + "fs=2*fm #Nyquist rate\n", + "print('Nquist Rate of Signal is = %.2f Hz' %fs)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum frquency of the signal is = 150.00 Hz\n", + "Nquist Rate of Signal is = 300.00 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 , page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Nquist Rate and Nquist time interval\n", + "\n", + "#Variable declaration\n", + "#given\n", + "w1=5000*math.pi\n", + "w2=3000*math.pi;\n", + "f1=w1/(2*math.pi);\n", + "f2=w2/(2*math.pi);\n", + "\n", + "#Calculation\n", + "fm=f1 #fm = maximum frquency is present at the signal\n", + "fs=2*fm #Nyquist rate\n", + "Ts=1.0/(2.0*fm) #frequncy =1/time\n", + "Ts=Ts*(10**3)\n", + "\n", + "#Result\n", + "print('maximum frquency of the signal is = %.f Hz' %f1)\n", + "print('Nquist Rate of the given Signal is = %.f Hz' %fs)\n", + "print('Nquist Interval of the given signal is = %.1f m Sec' %Ts)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum frquency of the signal is = 2500 Hz\n", + "Nquist Rate of the given Signal is = 5000 Hz\n", + "Nquist Interval of the given signal is = 0.2 m Sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, page no 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find Nquist Rate \n", + "\n", + "#Variable declaration\n", + "#given\n", + "f=100.0 # Frequency component of continuous-time signal\n", + "\n", + "#Calculation\n", + "fs=2*f #Nyquist rate\n", + "\n", + "#Result\n", + "print('i) To avoid aliasing Nquist Rate is = %.f Hz' %fs)\n", + "print('ii) It is theoretical example ')\n", + "print('iii) It is theoretical example ')\n", + "print('iv) It is theoretical example ')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) To avoid aliasing Nquist Rate is = 200 Hz\n", + "ii) It is theoretical example \n", + "iii) It is theoretical example \n", + "iv) It is theoretical example \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, page no 52 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Nquist Rate of Continous signal\n", + "\n", + "#Variable declaration\n", + "#given\n", + "w1=50*math.pi\n", + "w2=300*math.pi\n", + "w3=100*math.pi\n", + "\n", + "#Calculation\n", + "f1=w1/(2*math.pi)\n", + "f2=w2/(2*math.pi)\n", + "f3=w3/(2*math.pi)\n", + "fmax=f2 #fmax = Highest frquency component of the message signal\n", + "fs=2*fmax #Nyquist rate\n", + "\n", + "#Result\n", + "print('Highest frquency component of the message signal will be fmax = %.f Hz' %fmax)\n", + "print('Nquist Rate of the given Signal is = %.f Hz' %fs)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Highest frquency component of the message signal will be fmax = 150 Hz\n", + "Nquist Rate of the given Signal is = 300 Hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Example 2.7, page no 67

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#find amplitude distortion at highest frquency\n", + "\n", + "#Variable declaration\n", + "#given\n", + "fs=9.5 #samplig frequncy\n", + "fmax=1 #maximum frequncy\n", + "t=0.2 #pulse width\n", + "\n", + "#Calculation\n", + "c=3*10**8\n", + "f=fmax\n", + "H1=t*(0.9933) #aperture effect at highest frequency, sinc(f*t)=0.9933 (given)\n", + "H1=H1*100\n", + "\n", + "#Result\n", + "print('|H(1)|=%.2f' %H1)\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "|H(1)|=19.87\n", + "Approximation error\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8, page no 74 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate Transmission Bandwidth\n", + "\n", + "#Variable declaration\n", + "#given\n", + "fm=3.0*(10^3)\n", + "fs=8.0*(10^3) # sampling frequncy\n", + "\n", + "#Calculation\n", + "Ts=1.0/fs\n", + "t=0.1*Ts\n", + "BW=1.0/(2*t) #Bandwidth\n", + "BW=BW/(10^3)\n", + "\n", + "#Result\n", + "print('Transmission Bandwidth of PAM signal is kHz = %.f Khz ' %BW)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission Bandwidth of PAM signal is kHz = 40 Khz \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter3.ipynb b/Digital_Communications_by_S._Sharma/Chapter3.ipynb new file mode 100755 index 00000000..805bc62b --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter3.ipynb @@ -0,0 +1,2238 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 3: WAVEFORM CODING TECHNIQUES

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3,1 Page No 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print('This is a Theoretical example')\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This is a theoretcal example\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3,2,i, Page No 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#find code word length\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "bandwidth=4.2*10**6\n", + "fm=bandwidth\n", + "q=512 #Quantization levels\n", + "#q=2^v\n", + "\n", + "#Calculation\n", + "v=math.log10(512)/math.log10(2)\n", + "\n", + "#Result\n", + "print(\"The code word legth is = %.f bits\" %v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The code word legth is = 9 bits\n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.ii, Page No 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#find The transmission Bandwidth\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "bandwidth=4.2*10**6\n", + "fm=bandwidth\n", + "q=512.0 #Quantization levels\n", + "v=9.0\n", + "\n", + "#Calculation\n", + "bw=v*fm*10**-6\n", + "\n", + "#Result\n", + "print(\"The transmission Bandwidth is = %.1f MHz\" %bw)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transmission Bandwidth is = 37.8 MHz\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.iii, Page No 111 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#find Final Bit rate\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "bandwidth=4.2*10**6\n", + "fm=bandwidth\n", + "q=512.0 #Quantization levels\n", + "v=9.0\n", + "\n", + "#Calculation\n", + "fs=2*fm\n", + "r=v*fs #signaling rate\n", + "\n", + "#Result\n", + "print(\"Final Bit rate =%.1f x 10^6 bits/sec\" %(r/(10**6)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Bit rate =75.6 x 10^6 bits/sec\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.iv, Page No 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#find Output signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "bandwidth=4.2*10**6\n", + "fm=bandwidth\n", + "q=512 #Quantization levels\n", + "v=9.0\n", + "\n", + "#Calculation\n", + "sn=4.8+6*v #noise in dB\n", + "\n", + "\n", + "print(\"Output signal to noise ratio is = %.1f dB\" %sn)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output signal to noise ratio is = 58.8 dB\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.i, Page No 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#find bits per sample\n", + "\n", + "#Variable Declaration\n", + "fmax=4*10**3\n", + "xmax=3.8\n", + "snr=100\n", + "\n", + "#Calculation\n", + "P=30*10**-3\n", + "v=(math.log10(((snr*xmax**2)/(3*P)))/(2*math.log10(2)))\n", + "\n", + "#Result\n", + "print(\"Number of bits required per sample are = %.2f bits\" %v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of bits required per sample are = 6.98 bits\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.ii, Page No 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Find Transmission Bandwith\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "fm=4*10**3 #Bandwidth of PCM\n", + "xmax=3.8\n", + "snr=100 #Signal to Noise Ratio\n", + "outputs=30.0\n", + "v=7.0\n", + "\n", + "#Calculation\n", + "bw=outputs*v*fm \n", + "r=bw*2\n", + "bw=bw/10**3\n", + "\n", + "#Result\n", + "print('Transmission Bandwith R = %.f kHz' %bw)\n", + "r=r/1000\n", + "print('Signaling rate R = %.f bits/sec' %r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission Bandwith R = 840 kHz\n", + "Signaling rate R = 1680 bits/sec\n" + ] + } + ], + "prompt_number": 110 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page No 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#find sampling rate,number of bits,bit rate,bandwidht\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "emax=0.001\n", + "de=2*emax\n", + "fm=100.0\n", + "xmax=10.0\n", + "\n", + "#Calculation\n", + "q=(2*xmax)/de\n", + "fs=2*fm\n", + "v=(math.log10(q))/math.log10(2)\n", + "v=math.ceil(v)\n", + "r=v*fs\n", + "\n", + "#Result\n", + "print('1. sampling Frequncy = %.f Hz ' %fs) \n", + "print('2. No.of bits in PCM = %.f bits ' %v) \n", + "print('3. sampling rate = %.f bits per second ' %r)\n", + "r=r/2\n", + "print('4. Transmission Bandwidth = %.f Hz ' %r) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1. sampling Frequncy = 200 Hz \n", + "2. No.of bits in PCM = 14 bits \n", + "3. sampling rate = 2800 bits per second \n", + "4. Transmission Bandwidth = 1400 Hz \n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page No 113 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Bandwidth,Sampling Rate\n", + "\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "fm=3.4*10**3\n", + "N=24\n", + "r=1.5*10**6\n", + "encoder=8\n", + "\n", + "#Calculation\n", + "BW=N*fm\n", + "BW=BW/10**3\n", + "r1=r/N\n", + "fs=r1/encoder\n", + "\n", + "#Result\n", + "print(\"i. Channel Bandwith is = %.2f kHz\" %BW)\n", + "print(\"ii. Sampling frequency is = %.2f Hz or samples per second.\" %fs)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i. Channel Bandwith is = 81.60 kHz\n", + "ii. Sampling frequency is = 7812.50 Hz or samples per second.\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page No 114 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Find Signal Bandwidth,Noise Ratio\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "v=7\n", + "r=50*10**6\n", + "\n", + "#Calculation\n", + "#fs=2*fm\n", + "fm=r/(2*v)\n", + "snr=1.8+(6*v);\n", + "fm=fm*10**-6\n", + "\n", + "#Result\n", + "print('i. Maximum message Bandwidth is = %.2f MHz ' %fm)\n", + "print('ii. signal to quantization niose ration = %.2f dB ' %snr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i. Maximum message Bandwidth is = 3.57 MHz \n", + "ii. signal to quantization niose ration = 43.80 dB \n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7, Page No 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#find i)bits per sample,ii)transmission rate\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "fm=3*10**3\n", + "q=16\n", + "\n", + "#Calculation\n", + "v=(math.log10(q))/math.log10(2)\n", + "\n", + "#Result\n", + "print('i) Bits in code word= %.f bits' %v)\n", + "fs=2*fm\n", + "r=v*fs\n", + "print('ii) it trasmission rate= %.f x 10^3 bits per second' %(r/(10**3)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Bits in code word= 4 bits\n", + "ii) it trasmission rate= 24 x 10^3 bits per second\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page No 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Find signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "fm=3.5*10**3\n", + "r=50*10**3\n", + "\n", + "#Calculation\n", + "fs=2*fm\n", + "rms=0.2\n", + "xmax=2\n", + "v=r/fs #signaling rate r=v*fs\n", + "v=math.ceil(v)\n", + "P=(rms**2)/1\n", + "SNR=((3*P*2**(2*v))/(xmax**2))\n", + "SN=10*math.log10(SNR)\n", + "SN=math.ceil(SN)\n", + "\n", + "#Result\n", + "print(\"signal to niose ratio =%.f dB\" %SN)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "signal to niose ratio =33 dB\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10, Page No 117 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find i)noise ratio ii)bits\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "Am=3.0\n", + "v=10.0\n", + "\n", + "#Calculation\n", + "SNR=1.8+6*v #noise ratio \n", + "SN=40\n", + "v=(SN-1.8)/6\n", + "\n", + "#Result\n", + "print(\"i) Signal to Quantization noise ratio = %.1f dB\" %SNR)\n", + "print(\"ii) Bits required to get signal to niose ratio of 40dB = %.f \" %math.ceil(v))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Signal to Quantization noise ratio = 61.8 dB\n", + "ii) Bits required to get signal to niose ratio of 40dB = 7 \n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11, Page No 117 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Maximum frequency\n", + "\n", + "#Variable Declaration\n", + "#Given data\n", + "v=7\n", + "SNR=1.8+6*v\n", + "r=56*10**3\n", + "\n", + "#Calculation\n", + "fs=r/v #r=v*fs signaling rate\n", + "fm=fs/2 #Nquset rate\n", + "\n", + "#Result\n", + "fm=fm/10**3\n", + "print(\"Maximum frequency is = %.f kHz\" %fm)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency is = 4 kHz\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14, Page No 129 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Maximum Amplitude\n", + "\n", + "#Variable Declaration\n", + "fm=3*10**3.0\n", + "\n", + "#Calculation\n", + "Nyquistrate=2*fm #Nyquistrate\n", + "fs=5*Nyquistrate #Samplingfrquency\n", + "Ts=1/fs #Sampling Interval\n", + "de=0.25 #step size\n", + "fm1=2*10**3.0\n", + "Am=de/(2*math.pi*fm1*Ts)\n", + "\n", + "#Result\n", + "print(\"Maximum Amplitude = %.4f Volts\" %Am)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Amplitude = 0.5968 Volts\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16, Page No 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find signaling rate\n", + "\n", + "#Variable Declaration\n", + "fs1=8*10**3.0\n", + "de=31.25*10**-3\n", + "q=64.0\n", + "\n", + "#Calculation\n", + "v=math.log(q,2)\n", + "r=v*fs1 #signaling rate\n", + "fm=3*10**3.0\n", + "A=1\n", + "fs2=(2*math.pi*fm*A)/(de)\n", + "\n", + "#Result\n", + "r=r*10**-3\n", + "print(\"Signaling rate of PCM is = %.f kHz\" %r)\n", + "fs2=fs2*10**-3\n", + "print(\"The signaling rate of DM is = %.2f kHz\" %fs2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signaling rate of PCM is = 48 kHz\n", + "The signaling rate of DM is = 603.19 kHz\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17, Page No 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "fs=64.0*10**3 #frequency\n", + "fm=2.0*10**3 #Sinosoidal input signal sample \n", + "fM=4.0*10**3 #bandwidth\n", + "\n", + "#Calculation\n", + "SNR=(3*fs**3)/(8*math.pi**2*fm**2*fM) #Signal to noise ratio\n", + "SNRO=10*math.log10(SNR)\n", + "\n", + "#Result\n", + "print(\"Output signal to noise ratio = %.2f dB\" %SNRO)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output signal to noise ratio = 27.94 dB\n" + ] + } + ], + "prompt_number": 120 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18, Page No 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find signal to Quatization noise ratio \n", + "\n", + "#Variable Declaration\n", + "fs=8.0*10**3 #Sampling frequency\n", + "r=64.0*10**3 #Data Rate\n", + "N=8 #number of bits\n", + "\n", + "#Calculation\n", + "SNR=(1.8+6*N) #signal to Quatization noise ratio\n", + "\n", + "#Result\n", + "print(\"Signal to Quatization noise ratio of PCM system is = %.f dB\" %SNR)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal to Quatization noise ratio of PCM system is = 50 dB\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20, Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Find sampling rate,quantizing level\n", + "\n", + "#Variable Declaration\n", + "r=36000\n", + "fm=3.2*10**3\n", + "\n", + "#Calculation\n", + "fs=2*fm #Nquest rate\n", + "v=r/fs #r=v*fs signaling rate\n", + "v=math.floor(v)\n", + "q=2**v\n", + "fs1=r/v\n", + "\n", + "#Result\n", + "print(\"Quantizing level q = %.f \" %q)\n", + "fs1=fs1/1000\n", + "print(\"sampling rate fs = %.1f kHz \" %fs1)\n", + "print(\"Number of binary digits = %.f \" %v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantizing level q = 32 \n", + "sampling rate fs = 7.2 kHz \n", + "Number of binary digits = 5 \n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21, Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find time duration of 1bit binary encoded signal\n", + "\n", + "#Variable Declaration\n", + "fs=input(\"Enter the Nyquist rate of Signal fs(Hz)=\")\n", + "q=input(\"Enter the Quantization levels q =\")\n", + "\n", + "#Calculation\n", + "v=math.log(q,2) #binary pulses transmitted per second\n", + "t=1.0/(v*fs) #Nyquist interval\n", + "\n", + "#Result\n", + "print('Time duration of binary signal t = %.4f sec ' %t)\n", + "#output\n", + "#Enter the Nyquist rate fs(Hz)=3\n", + "#Enter the Quantization levels q =5\n", + "#time duration of 1bit binary signal \n", + "#t=0.1435589 sec" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Nyquist rate of Signal fs(Hz)=23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Quantization levels q =34\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time duration of binary signal t = 0.0085 sec \n" + ] + } + ], + "prompt_number": 123 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23, Page No 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#find signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "SNR=40\n", + "SNRO=10**(SNR/10)\n", + "\n", + "#SNR=3(q**2)/2, Signal to Quantization noise ratio\n", + "\n", + "#Calculation\n", + "q=math.sqrt((2*SNRO)/3)\n", + "q=math.ceil(q)\n", + "v=math.log(q,2) #q=2**v Quantization levels\n", + "v=math.ceil(v)\n", + "snr=1.76+6.02*v #output Signal to Quantization noise ratio\n", + "\n", + "#Result\n", + "print(\"Output Signal to Quantization noise ratio = %.1f dB\" %snr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Signal to Quantization noise ratio = 43.9 dB\n" + ] + } + ], + "prompt_number": 124 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24.i, Page No 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Quantizing levels,minimum number of bits per sample\n", + "\n", + "#Variable Declaration\n", + "SNRO=30.0\n", + "fmin=300.0\n", + "fmax=3300.0\n", + "fs=80000.0\n", + "\n", + "#Calculation\n", + "#SNRO=1.76+20log10(q)\n", + "q=10**((SNRO-1.76)/20)\n", + "q=math.ceil(q)\n", + "v=math.log(q,2)\n", + "\n", + "#Result\n", + "print('Quantizing levels required is =%.f' %q)\n", + "print('minimum number of bits per sample are=%.1f that is approximately 5' %v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantizing levels required is =26\n", + "minimum number of bits per sample are=4.7 that is approximately 5\n" + ] + } + ], + "prompt_number": 125 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24.ii, Page No 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find minimum required bandwidth\n", + "\n", + "#Variable Declaration\n", + "SNRO=30.0 #Signal to quantisizing noise ratio\n", + "fmin=300.0 #min frequency band\n", + "fmax=3300.0 #max frequency band\n", + "fs=8000.0 #Sampling rate\n", + "v=5.0 #Minimum number of bits per sample\n", + "\n", + "#Calculation\n", + "fPCM=(v*fs)/2\n", + "fPCM=fPCM/1000\n", + "\n", + "#Result\n", + "print('minimum required bandwidth =%.f kHz' %fPCM)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum required bandwidth =20 kHz\n" + ] + } + ], + "prompt_number": 126 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24.iii, Page No 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Quantizing levels,minimum number of bits per sample and bandwidth\n", + "\n", + "#Variable Declaration\n", + "SNRO=30.0 #Signal to quantisizing noise ratio\n", + "fmin=300.0 #min frequency band\n", + "fmax=3300.0 #max frequency band\n", + "fs=8000.0 #Sampling rate\n", + "\n", + "#Calculation\n", + "q=10**((SNRO+10.1)/20)\n", + "q=math.ceil(q)\n", + "v=math.log(q,2)\n", + "v=math.ceil(v)\n", + "\n", + "#Result\n", + "print('Quantizing levels need is =%.f' %q)\n", + "print('minimum number of bits per sample is =%.f' %v)\n", + "fPCM=(v*fs)/2\n", + "fPCM=fPCM/1000\n", + "print('minimum required bandwidth =%.f Khz' %fPCM)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantizing levels need is =102\n", + "minimum number of bits per sample is =7\n", + "minimum required bandwidth =28 Khz\n" + ] + } + ], + "prompt_number": 127 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27, Page No 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#determine the Maximum Amplitude,\n", + "\n", + "#Variable Declaration\n", + "de=250*10**-3\n", + "wm=2*math.pi*1000 \n", + "fs=3*10**3\n", + "Ts=1/fs\n", + "\n", + "#Calculation\n", + "Amax=(de*3*fs*2)/(wm) #Amplitude\n", + "SNR=(3.0*((3*6*(10**3))**3))/((8*(math.pi**2)*(10**3)**3))\n", + "\n", + "#Result\n", + "print('Maximum Amplitude= %.1f mV' %(Amax*(10**2)))\n", + "print('Signal to noise ratio = %.2f dB' %(10*math.log10(SNR)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Amplitude= 71.6 mV\n", + "Signal to noise ratio = 23.46 dB\n" + ] + } + ], + "prompt_number": 128 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.29, Page No 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find number of bits per sample\n", + "\n", + "#Variable Declaration\n", + "SNR=20\n", + "averagepower=30*10**-3\n", + "SNRO=10**(SNR/10)\n", + "A=3.8\n", + "\n", + "#SNRO=average signal power/Quatizing power\n", + "#de=(2*A)/L\n", + "\n", + "#Calculation\n", + "L=math.sqrt((SNRO*A**2)/(3*averagepower))\n", + "n=math.log(L,2)\n", + "n=math.ceil(n)\n", + "\n", + "#Result\n", + "print('Bits required per sample =%.f' %n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bits required per sample =7\n" + ] + } + ], + "prompt_number": 129 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30.i, Page No 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Normalized power for quantization noise\n", + "\n", + "#Variable Declaration\n", + "fm=3.0*10.0**3\n", + "v=8.0\n", + "VH=5.0\n", + "VL=-5.0\n", + "q=2**v\n", + "\n", + "#Calculation\n", + "de=(VH-VL)/q\n", + "Nq=de**2/12.0 #quantization noise\n", + "\n", + "#Result\n", + "print('Normalized power for quantization noise =%.2f x 10^-6 W' %(Nq*(10**6)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized power for quantization noise =127.16 x 10^-6 W\n" + ] + } + ], + "prompt_number": 130 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30.ii, Page No 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find bit transmission rate\n", + "\n", + "#Variable Declaration\n", + "fm=3*10.0**3\n", + "v=8.0\n", + "VH=5.0\n", + "VL=-5\n", + "q=2**v\n", + "\n", + "#Calculation\n", + "fs=2*fm #Nyquist rate\n", + "r=8*fs/1000\n", + "\n", + "#Result\n", + "print('bit transmission rate %.f K bits/s' %r)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "bit transmission rate 48 K bits/s\n" + ] + } + ], + "prompt_number": 131 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30.iii, Page No 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Signal to quantization noise ratio\n", + "\n", + "#Variable Declaration\n", + "Nq=127.15*10**-6\n", + "Meansignal=2\n", + "\n", + "#Calculation\n", + "P=Meansignal/1\n", + "SNR=P/Nq\n", + "SNRq=10*math.log10(SNR)\n", + "\n", + "#Result\n", + "print('Signal to quantization noise ratio %.2f dB ' %SNRq)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal to quantization noise ratio 41.97 dB \n" + ] + } + ], + "prompt_number": 132 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.31, Page No 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find i)SNR ii)output bit rate iii)no.of bits recorded\n", + "\n", + "#Variable Declaration\n", + "N=16.0\n", + "v=16.0\n", + "fs=44.1*10**3\n", + "\n", + "#Calculation\n", + "SNR=1.76+6*N\n", + "bitrate=2*v*fs\n", + "outputbitrate=2*bitrate*10**-6 #including addtional 100% over head\n", + "CD=outputbitrate*3600*10**-3\n", + "\n", + "#Result\n", + "print('i)Out put signal noise ratio =%.2f dB' %SNR)\n", + "print('ii)output bit rate =%.3f Mbits/sec' %outputbitrate)\n", + "print('iii)no.of bits recorded in CD =%.2f gigabits' %CD)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Out put signal noise ratio =97.76 dB\n", + "ii)output bit rate =2.822 Mbits/sec\n", + "iii)no.of bits recorded in CD =10.16 gigabits\n" + ] + } + ], + "prompt_number": 133 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32, Page No 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find output SNR\n", + "#Variable Declaration\n", + "fm=1*10.0**3\n", + "fs=32*10**3\n", + "\n", + "#Calculation\n", + "FM=4*10**3 #Bandwidth\n", + "SNR=(3*fs**3)/(8*math.pi**2*fm**2*FM) #SNR\n", + "SNRO=10*math.log10(SNR)\n", + "\n", + "#Result\n", + "print('Output signal to noise ratio %.2f dB' %SNRO)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output signal to noise ratio 24.93 dB\n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.33.i, Page No 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find step size\n", + "\n", + "#Variable Declaration\n", + "fs=64000.0 #samples/sec\n", + "Amax=1.0 #Maximum signal amplitude\n", + "fm=3500.0 #Sample Rate\n", + "\n", + "#Calculation\n", + "de=(2*math.pi*fm*Amax)/fs*1000\n", + "\n", + "#Result\n", + "print('Step Size %.2f mV ' %de)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Step Size 343.61 mV \n" + ] + } + ], + "prompt_number": 135 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.33ii, Page No 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Quantizatio noise power \n", + "#Variable Declaration\n", + "fs=64000.0 #sample Rate\n", + "Amax=1.0 #Maximum signal Amplitude\n", + "fm=3500.0\n", + "\n", + "#Calculation\n", + "de=343.6117*10**-3 #step size\n", + "Nq=de**2/3.0 #Quantizatio noise power\n", + "Nqd=Nq*(fm/fs)*1000\n", + "\n", + "#Result\n", + "print('Quantizatio noise power %.3f mW' %Nqd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantizatio noise power 2.152 mW\n" + ] + } + ], + "prompt_number": 136 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.33iii, Page No 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find SNR\n", + "\n", + "#Variable Declaration\n", + "fs=64000.0\n", + "Amax=1.0\n", + "fm=3500.0\n", + "Nqd=2.1522995*10**-3\n", + "\n", + "#Calculation\n", + "So=Amax**2/2\n", + "SNR=So/Nqd\n", + "SNRO=10*math.log10(SNR)\n", + "\n", + "#Result\n", + "print('Output signal noise ratio dB %.3f dB' %SNRO)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output signal noise ratio dB 23.661 dB\n" + ] + } + ], + "prompt_number": 137 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.34, Page No 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Assuming signal is sampled at the rate 20% above Nyquist rate\n", + "\n", + "#Variable Declaration\n", + "fm=4.5*10**6\n", + "q=1024.0\n", + "\n", + "#Calculation\n", + "fs=1.2*2*fm #20% above Nyquist rate\n", + "v=math.log(q,2)\n", + "r=v*fs/10**6\n", + "\n", + "#Result\n", + "print('no.of bits/sec = %.f M bit/sec' %r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no.of bits/sec = 108 M bit/sec\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.35, Page No 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#assume bandwidth of the singal is 4kHz\n", + "\n", + "#Variable Declaration\n", + "fs=32000.0\n", + "A=2.0\n", + "fm=4000.0\n", + "BW=4000.0\n", + "\n", + "#Calculation\n", + "de=(2*math.pi*fm*A)/fs\n", + "Nq=de**2/3\n", + "SNR=(3*fs**3)/(8*math.pi**2*fm**2*BW)\n", + "\n", + "#Result\n", + "print('i)step size = %.3f M Volt' %de)\n", + "print('ii)noise power = %.3f W' %Nq)\n", + "print('iii)SNR= = %.3f ' %SNR)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)step size = 1.571 M Volt\n", + "ii)noise power = 0.822 W\n", + "iii)SNR= = 19.454 \n" + ] + } + ], + "prompt_number": 139 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.36, Page No 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#assuming signal is sampled at the rate 20% above Nyquist rate\n", + "\n", + "#Variable Declaration\n", + "fm=15*10**3\n", + "fs=1.2*2*fm\n", + "q=65536\n", + "\n", + "#Calculation\n", + "v=math.log(q,2)\n", + "r=v*fs/1000\n", + "BW=r/2\n", + "\n", + "#Result\n", + "print('i)signaling rate,= %.f K bits/sec ' %r)\n", + "print('ii)bandwidth BW min = %.f kHz ' %BW)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)signaling rate,= 576 K bits/sec \n", + "ii)bandwidth BW min = 288 kHz \n" + ] + } + ], + "prompt_number": 140 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.37, Page No 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find step size,noise power\n", + "\n", + "#Variable Declaration\n", + "fs=64*10**3\n", + "fm=3500.0\n", + "A=1.0\n", + "\n", + "#Calculation\n", + "de=(2*math.pi*fm*A)/fs #step size\n", + "Nq=(de**2/3)*(fm/fs) #Granular noise power\n", + "\n", + "#Result\n", + "print('i)step size = %.3f Volts' %de)\n", + "print('ii)Nq= %.5f W' %Nq)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)step size = 0.344 Volts\n", + "ii)Nq= 0.00215 W\n" + ] + } + ], + "prompt_number": 141 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.40, Page No 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find step Nr,Transmission Bandwidth, SNR\n", + "\n", + "#Variable Declaration\n", + "fs=4 #kHz\n", + "N=12\n", + "\n", + "#Calculation\n", + "Nr=2*fs #Nyquest rate\n", + "Bt=1.0/2*N*fs #Transmission Bandwidth\n", + "SNR=1.8+(6*N) \n", + "\n", + "\n", + "#Result\n", + "print('i)Nyquest rate = %.1f kHz' %Nr)\n", + "print('ii)Transmission Bandwidth = %.1f kHz' %Bt)\n", + "print('iii)SNR = %.1f dB' %SNR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Nyquest rate = 8.0 kHz\n", + "ii)Transmission Bandwidth = 24.0 kHz\n", + "iii)SNR = 73.8 dB\n" + ] + } + ], + "prompt_number": 142 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.41, Page No 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find step size,noise power\n", + "\n", + "#Variable Declaration\n", + "fm=3.5*10**3\n", + "fs=64*10**3\n", + "A=2.0\n", + "\n", + "#Calculation\n", + "de=(2*math.pi*fm*A)/fs #step size\n", + "Nq=(de**2/3)*(fm/fs) #Granular noise power\n", + "\n", + "#Result\n", + "print('i)step size = %.3f Volts' %de)\n", + "print('ii)Nq= %.1f X 10^-3 W' %(Nq*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)step size = 0.687 Volts\n", + "ii)Nq= 8.6 X 10^-3 W\n" + ] + } + ], + "prompt_number": 143 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.42, Page No 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find number of binay pulse per word, Bit rate, Bandwidth\n", + "\n", + "#Variable Declaration\n", + "W=4.5 * 10**6 #khz\n", + "Nr = 2 * W #Nyquist Rate\n", + "Q = 1024\n", + "fs=10.8\n", + "\n", + "#Calculation\n", + "N = math.log(Q,2) #number of binay pulse per word\n", + "Br= N*fs #Bit rate\n", + "Bw= 1.0/2*Br #Bandwidth\n", + "\n", + "#Result\n", + "print('i) Number of binay pulse per word = %.1f k bits/sec' %N)\n", + "print('ii) Bit rate = %.1f k bits/sec' %Br)\n", + "print('iii)Bandwidth= %.1f X 10^-3 kHz' %Bw)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Number of binay pulse per word = 10.0 k bits/sec\n", + "ii) Bit rate = 108.0 k bits/sec\n", + "iii)Bandwidth= 54.0 X 10^-3 kHz\n" + ] + } + ], + "prompt_number": 144 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.43, Page No 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find number of binay pulse per word, Bit rate, Bandwidth\n", + "\n", + "#Variable Declaration\n", + "W=15 #khz\n", + "Nr = 2*W #Nyquist Rate\n", + "Q = 65.53\n", + "fs=44.1 # Sampling rate kHz\n", + "N=16\n", + "\n", + "#Calculation\n", + "Br= N*fs #Bit rate\n", + "Bw= 1.0/2*Br #Bandwidth\n", + "\n", + "#Result\n", + "print('i) Number of binay pulse per word = %.3f bits' %N)\n", + "print('ii) Bit rate = %.1f k bits/sec' %Br)\n", + "print('iii)Bandwidth= %.1f kHz' %Bw)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Number of binay pulse per word = 16.000 bits\n", + "ii) Bit rate = 705.6 k bits/sec\n", + "iii)Bandwidth= 352.8 kHz\n" + ] + } + ], + "prompt_number": 145 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.44, Page No 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Number of binay pulse per word\n", + "\n", + "#Variable Declaration\n", + "W=3.3 #khz\n", + "fm = 1*10**3 #kHz\n", + "de = 250 #mV\n", + "fs=19.8 # Sampling rate kHz\n", + "\n", + "#Calculation\n", + "A=(de*fs)/(2*math.pi*fm)\n", + "\n", + "#Result\n", + "print('i) Number of binay pulse per word = %.3f' %A)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Number of binay pulse per word = 0.788\n" + ] + } + ], + "prompt_number": 146 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.45, Page No 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find number of binay pulse per word, Signaling rate, Bandwidth\n", + "\n", + "#Variable Declaration\n", + "W=3.3 #khz\n", + "fm = 3300 #Hz\n", + "Snq = 40 #dB\n", + "fs= 8000 # Samples/sec\n", + "\n", + "#Calculation \n", + "N=math.ceil((Snq-4.8)/6) # Number of bits per word\n", + "Q=2**N #\n", + "r=N*fs #Signaling rate k bits/sec\n", + "Bw=1.0/2*r\n", + "\n", + "#Result\n", + "print('i) Number of bits per word = %.1f' %N)\n", + "print('ii) Signaling rate rate = %.1f k bits/sec' %(r/10**3))\n", + "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Number of bits per word = 6.0\n", + "ii) Signaling rate rate = 48.0 k bits/sec\n", + "iii)Bandwidth= 24.0 kHz\n" + ] + } + ], + "prompt_number": 147 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.46, Page No 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find the maximun frequency with 1 volt amplitude\n", + "\n", + "#Variable Declaration\n", + "de=256*10**-3 #V\n", + "Ts = 10*10**-6 #kHz\n", + "fm = 10 #kHz\n", + "fs= 100 # kHz\n", + "A=1 #V\n", + "\n", + "#Calculation \n", + "wm=(de/A*Ts)*10**7\n", + "\n", + "#Result\n", + "print('i) maximun frequency = %.1f X 10^3 rad/sec' %wm)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) maximun frequency = 25.6 X 10^3 rad/sec\n" + ] + } + ], + "prompt_number": 148 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.47, Page No 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find the Signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "Q=256 \n", + "m=255\n", + "\n", + "#Calculation \n", + "SNR=(3*Q**2)/(math.log((1+m),math.e))**2 #dB\n", + "Gc=m/(math.log(1+m)) #Companding gain\n", + "Gc=20*math.log(Gc,10)\n", + "\n", + "#Result\n", + "print('i) The Signal to noise ratio= %.1f dB' %SNR)\n", + "print('ii) The Companding gain = %.1f dB' %Gc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) The Signal to noise ratio= 6394.0 dB\n", + "ii) The Companding gain = 33.3 dB\n" + ] + } + ], + "prompt_number": 149 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.48, Page No 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find number of binay pulse per word, Signaling rate, Bandwidth\n", + "\n", + "#Variable Declaration\n", + "fm=15*10**3 #kHz\n", + "Q=200\n", + "fs=2*fm\n", + "\n", + "#Calculation \n", + "N=math.ceil(math.log(Q,2))\n", + "tr=N*fs #Transmission rate kbps\n", + "Bw=1.0/2*tr\n", + "\n", + "#Result\n", + "print('i) Number of bits per Samples = %.1f' %N)\n", + "print('ii) Signaling rate = %.1f k bits/sec' %(tr/10**3))\n", + "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Number of bits per Samples = 8.0\n", + "ii) Signaling rate = 240.0 k bits/sec\n", + "iii)Bandwidth= 120.0 kHz\n" + ] + } + ], + "prompt_number": 150 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.49, Page No 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find number of quantization level\n", + "\n", + "#Variable Declaration\n", + "tr=36.0 #kbps\n", + "fm=3.4 #kHz\n", + "fs=8\n", + "\n", + "#Calculation \n", + "N=math.ceil(tr/fs)\n", + "Q=2**N\n", + "\n", + "\n", + "#Result\n", + "print('i) number of quantization level = %.1f' %Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) number of quantization level = 32.0\n" + ] + } + ], + "prompt_number": 151 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.50, Page No 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find delta modulation\n", + "\n", + "#Variable Declaration\n", + "A=1 #V\n", + "fm=3.4 #kHz\n", + "fs=20\n", + "\n", + "#Calculation \n", + "de=1*2*math.pi*(fm/fs)\n", + "\n", + "\n", + "#Result\n", + "print('i) delta modulation = %.2f V' %de)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) delta modulation = 1.07 V\n" + ] + } + ], + "prompt_number": 152 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.51, Page No 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "W=3.5 #kHz\n", + "r=50.0 #kbps\n", + "Vpp=4 #V\n", + "fs=8\n", + "\n", + "#Calculation \n", + "N=r/fs\n", + "SNR=4.8+(6.8*N)\n", + "\n", + "#Result\n", + "print('i) Signal to noise ratio = %.2f V' %SNR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Signal to noise ratio = 47.30 V\n" + ] + } + ], + "prompt_number": 153 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.52, Page No 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Signal to noise ratio\n", + "\n", + "#Variable Declaration\n", + "W=1 #MHz\n", + "fs1=3 #MHz\n", + "fs2=2.4 #MHz\n", + "Q=256\n", + "m=255\n", + "\n", + "#Calculation \n", + "SNR=((3*Q**2)/(math.log((1+m),math.e))**2)\n", + "SNR1=63095.73 #SNR=38+10\n", + "Q1=math.sqrt((SNR1*((math.log(256,math.e))**2))/3)\n", + "N1=math.ceil(math.log(Q1,2))\n", + "r=N1*fs2\n", + "Bw=1.0/2*r\n", + "\n", + "#Result\n", + "print('i) Number of bits/word = %.2f ' %N1)\n", + "print('ii) Bit rate = %.1f Mb/s' %r)\n", + "print('iii) Bandwidth = %.1f Mb/s' %Bw)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Number of bits/word = 10.00 \n", + "ii) Bit rate = 24.0 Mb/s\n", + "iii) Bandwidth = 12.0 Mb/s\n" + ] + } + ], + "prompt_number": 154 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter4.ipynb b/Digital_Communications_by_S._Sharma/Chapter4.ipynb new file mode 100755 index 00000000..e56598ee --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter4.ipynb @@ -0,0 +1,273 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 4: DIGITAL MULTIPLEXERS

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, page no 190 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Caption: Sampling Rate\n", + "\n", + "#initialisation of variables\n", + "f1=4.0*10**3\n", + "f2=4.5*10**3\n", + "\n", + "#CALCULATIONS\n", + "fsmin=(2*f2)/1000\n", + "\n", + "#RESULTS\n", + "print(\" Sampling rate =%.2f kHz\" %fsmin)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sampling rate =9.00 kHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page No 190 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Caption: Nyquest rate,Signaling rate,bandwidth\n", + "\n", + "#initialisation of variables\n", + "f1=3000.0\n", + "f4=1000.0\n", + "f2=1000.0\n", + "f3=1000.0\n", + "\n", + "#CALCULATIONS\n", + "#Nyquest rate\n", + "nq1=2*f1\n", + "nq2=2*f2\n", + "nq3=2*f3\n", + "nq4=2*f4\n", + "\n", + "#RESULTS\n", + "print('i. Nyquest rate of x1 =%.2fkHz' %nq1)\n", + "print('ii. Nyquest rate of x2 =%.2fkHz' %nq2)\n", + "print('iii. Nyquest rate of x3 =%.2fkHz' %nq3)\n", + "print('iv. Nyquest rate of x4 =%.2fkHz' %nq4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i. Nyquest rate of x1 =6000.00kHz\n", + "ii. Nyquest rate of x2 =2000.00kHz\n", + "iii. Nyquest rate of x3 =2000.00kHz\n", + "iv. Nyquest rate of x4 =2000.00kHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page No 190 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find The spacing between two successive pules\n", + "\n", + "#initialisation of variables\n", + "samplingrate=8000.0\n", + "totalsignals=24+1\n", + "\n", + "#CALCULATIONS\n", + "t=1/samplingrate\n", + "T=t/totalsignals\n", + "T=T*10**6 #time is now u sec\n", + "space=T-1\n", + "\n", + "#RESULTS\n", + "print('The spacing between two successive pules %.f u sec' %space)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spacing between two successive pules 4 u sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page No 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find signaling rate ,bandwidth\n", + "\n", + "#initialisation of variables\n", + "N=6.0\n", + "fm=5000.0\n", + "\n", + "#CALCULATIONS\n", + "r=2*fm #sampling rate\n", + "sr=N*r #signalingrate\n", + "BW=N*fm #Bandwith\n", + "sr=sr/1000\n", + "BW=BW/1000\n", + "\n", + "#RESULTS\n", + "print('Signaling rate %.f K bits/sec' %sr)\n", + "print('Bandwith to avoid the cross talk in TDM is %.f kHz' %BW)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signaling rate 60 K bits/sec\n", + "Bandwith to avoid the cross talk in TDM is 30 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page No 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find signaling rate ,bandwidth\n", + "\n", + "#initialisation of variables\n", + "N=4.0\n", + "x=24 #bits/frame\n", + "D=1152\n", + "s=1.0/3\n", + "r=1.544*10**6\n", + "\n", + "#CALCULATIONS\n", + "r0=N*r*((D+x)/(D-s*N))\n", + "\n", + "#RESULTS\n", + "print('Output bit rate %.2f MB/sec' %(r0/(10**6)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output bit rate 6.31 MB/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page No 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find signaling rate ,bandwidth\n", + "\n", + "#initialisation of variables\n", + "N=24.0\n", + "x=72.0 #bits\n", + "D=192 #message and stuff bits\n", + "s=1.0/3\n", + "r=64 #kb/sec\n", + "\n", + "#CALCULATIONS\n", + "r0=N*r*((D+x)/(D-s*N))\n", + "r1=((N*r)/r0)*100\n", + "\n", + "#RESULTS\n", + "print('i) Output bit rate %.2f MB/sec' %(r0/(10**3)))\n", + "print('iI) Throughput efficiency is = %.2f percent' %r1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Output bit rate 2.20 MB/sec\n", + "iI) Throughput efficiency is = 69.70 percent\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter5.ipynb b/Digital_Communications_by_S._Sharma/Chapter5.ipynb new file mode 100755 index 00000000..bf535beb --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter5.ipynb @@ -0,0 +1,105 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 5: DIGTIAL BASEBAND TRANSMISSION

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12, Page No 249 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find The roll of factor alpha\n", + "\n", + "#initialisation of variables\n", + "datarate=0.1*10**6\n", + "fB=75000.0 #bandwidth\n", + "\n", + "#CALCULATIONS\n", + "Tb=1/datarate\n", + "alpha=2*fB*Tb-1\n", + "\n", + "#RESULTS\n", + "print('The roll out factor alpha = = %.1f ' %alpha)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The roll out factor alpha = = 0.5 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13, Page No 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find The Transmission bandwidth\n", + "\n", + "#initialisation of variables\n", + "q=128.0\n", + "alpha=0.2\n", + "n=math.log(q,2)\n", + "fm=2000.0\n", + "\n", + "#CALCULATIONS\n", + "Nq=2*fm\n", + "fs=1.25*Nq\n", + "N=8.0\n", + "total=N*fs\n", + "bitrate=7*total\n", + "fB=((1+alpha)*bitrate)/2\n", + "fB=fB/1000\n", + "#RESULTS\n", + "print('The minimum transmission Bandwidth required = %.f kHz' %fB)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum transmission Bandwidth required = 168 kHz\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter6.ipynb b/Digital_Communications_by_S._Sharma/Chapter6.ipynb new file mode 100755 index 00000000..fd5f6716 --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter6.ipynb @@ -0,0 +1,158 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 6: DIGITAL MODULATION TECHNIQUES

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page No 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Symbol rate of transmission and bandwidth \n", + "\n", + "#initialisation of variables\n", + "fb=1.0 #MHz\n", + "Tb=1/fb #bit period ms\n", + "N=4\n", + "\n", + "#CALCULATIONS\n", + "Ts1=Tb\n", + "Bw1=2*fb\n", + "Ts2=Tb*2\n", + "Tr2=(1.0/2)*1000 #Symbols/sec\n", + "Bw2=1/Tb\n", + "Ts3=N*Tb\n", + "Tr3=(1.0/4)*1000\n", + "Bw3=(2.0*fb)/N\n", + "\n", + "#RESULTS\n", + "print(\"In BPSK\")\n", + "print(\"The symbol rate of transmission is = %.f X 10^6 symbol/sec \" %Ts1)\n", + "print(\"The Bandwidth is = %.f MHz \" %Bw1)\n", + "print(\"In QPSK\")\n", + "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr2)\n", + "print(\"The Bandwidth is = %.f MHz \" %Bw2)\n", + "print(\"In 16-ary PSK\")\n", + "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr3)\n", + "print(\"The Bandwidth is = %.f kHz \" %(Bw3*1000))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In BPSK\n", + "The symbol rate of transmission is = 1 X 10^6 symbol/sec \n", + "The Bandwidth is = 2 MHz \n", + "In QPSK\n", + "The symbol rate of transmission is = 500 X 10^3 symbol/sec \n", + "The Bandwidth is = 1 MHz \n", + "In 16-ary PSK\n", + "The symbol rate of transmission is = 250 X 10^3 symbol/sec \n", + "The Bandwidth is = 500 kHz \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page No 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "fb=90 #MHz\n", + "Bw=20 #Mb/s\n", + "\n", + "#CALCULATIONS\n", + "N=(2*fb)/Bw\n", + "\n", + "#RESULTS\n", + "print(\"Number of bits required = %.f \" %N)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of bits required = 9 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12, Page No 357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Tb=0.1 #msec\n", + "\n", + "#CALCULATIONS\n", + "fb=1/Tb\n", + "\n", + "#RESULTS\n", + "print(\"Transmission bandwidth = %.f kHz\" %fb)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission bandwidth = 10 kHz\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter7.ipynb b/Digital_Communications_by_S._Sharma/Chapter7.ipynb new file mode 100755 index 00000000..7c33676a --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter7.ipynb @@ -0,0 +1,431 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 7: PERFORMANCE ANALYSIS OF DIGITAL COMMUNICATION SYSTEMS

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15, Page No 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "T=1.0*10**-6 #ms\n", + "A=10.0*10**-3\n", + "N=1*10**-11\n", + "\n", + "#CALCULATIONS\n", + "Eb=((A**2)*T)/2.0\n", + "Epb=math.sqrt(Eb/N)\n", + "Pb=(1.0/2)*math.erfc(Epb)*(1.0/4)\n", + "\n", + "#RESULTS\n", + "print(\"Bit error probability = %.2f X 10^-4 \" %(Pb*(10**4)))\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bit error probability = 1.96 X 10^-4 \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16, Page No 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Br=25*10**6 #bits/sec\n", + "N=2*10**-20 #Power spectral density of noise\n", + "A=1.0*10**-6\n", + "Ps=1*10**-12 # Normalized power\n", + "\n", + "#CALCULATIONS\n", + "Tb=1.0/Br\n", + "Ps=(A**2)/2.0\n", + "Pe=1.0/2*(math.erfc((0.6*Ps*Tb)/N))\n", + "#RESULTS\n", + "print(\"Average probability of bit error is Pe= %.2f X 10^-4 \" %(Pe*10))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average probability of bit error is Pe= 1.98 X 10^-4 \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17, Page No 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find probability of error\n", + "\n", + "#initialisation of variables\n", + "A=2.0\n", + "N0=2.0*10**-4 #power sepctral density\n", + "\n", + "#CALCULATIONS\n", + "Tmin=(6.76*N0)/4\n", + "\n", + "#RESULTS\n", + "print(\"The min time for which the signal should be extended is Tmin= %.3f X 10^-3 msec \" %(Tmin*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The min time for which the signal should be extended is Tmin= 0.338 X 10^-3 msec \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20, Page No 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#The average carrier\n", + "\n", + "#initialisation of variables\n", + "Pe=10**-4\n", + "N0=2*10**10\n", + "T=1.0/10**6\n", + "\n", + "#CALCULATIONS\n", + "E=6.76*N0\n", + "P=E/T\n", + "Eb=8.5171*N0\n", + "P2=Eb/T\n", + "\n", + "\n", + "#RESULTS\n", + "print(\"The average carrier = %.3f X 10^-3 mW \" %(P2/10**17))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average carrier = 1.703 X 10^-3 mW \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21, Page No 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#The average carrier\n", + "\n", + "#initialisation of variables\n", + "A=0.2*10**-3 #V\n", + "T=2*10**-6\n", + "N0=2*10**-15\n", + "\n", + "#CALCULATIONS\n", + "Pe=(math.sqrt((A**2*T)/4*N0))\n", + "\n", + "#RESULTS\n", + "print(\"The average carrier = %.3f X 10^-4 mW \" %(Pe*10**15))\n", + "print(\"Approximation error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average carrier = 6.325 X 10^-4 mW \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.29, Page No 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "A=1.0\n", + "N0=2.0*10**-5 #power sepctral density\n", + "\n", + "#CALCULATIONS\n", + "T=((3.71**2)*2*N0)/(A**2)\n", + "Br=1/T\n", + "#Results\n", + "print(\"Bit rate Br= %.2f k bits/sec\" %(Br/(10**3)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bit rate Br= 1.82 k bits/sec\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.31, Page No 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Pe=10.0**-4 #probability of error of PSK\n", + "N0=2.0*10**-10\n", + "Br=10**6 #Bit Rate\n", + "\n", + "\n", + "#CALCULATIONS\n", + "T=1.0/Br\n", + "E=N0*6.76\n", + "P=E/T\n", + "Eb=8.5171*N0\n", + "Pb=Eb/T\n", + "#Results\n", + "print(\"i) PSK system The required carrier power = %.2f mW\" %(P*10**3))\n", + "print(\"ii) DPSK system The required carrier power = %.2f mW\" %(Pb*10**3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) PSK system The required carrier power = 1.35 mW\n", + "ii) DPSK system The required carrier power = 1.70 mW\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.32, Page No 450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "A=0.2*10**-3 #V\n", + "T=2*10**-6 #Sec\n", + "N0=2*10**-15\n", + "\n", + "\n", + "#CALCULATIONS\n", + "x=math.sqrt((A**2*T)/(4*N0))\n", + "Pe=(1.0/2)*math.erfc(x/math.sqrt(2.0))\n", + "\n", + "#Results\n", + "print(\"Probability of error = %.2f X 10^-4\" %(Pe*10**4))\n", + "#print(\"Channel Bandwidth = %.5f MHz\" %BW)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error = 7.83 X 10^-4\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.36, Page No 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Ap=1 #mV\n", + "En=192.3 #mV\n", + "Arms=707 #mV\n", + "\n", + "\n", + "#CALCULATIONS\n", + "Z=Arms/En\n", + "Pe=1.0/2*(math.erfc(math.sqrt(2)*(Z/math.sqrt(2))))\n", + "\n", + "#Results\n", + "print(\"Probability of error is %.7f \" %Pe)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error is 0.0000001 \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.37, Page No 454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "Br=2.08*10**-6 #Bit Rate\n", + "N0=2*10**-8\n", + "\n", + "#CALCULATIONS\n", + "Eb=(math.sqrt(3.3))/(5*10**7) #Eb=bit energy\n", + "Ps=Eb*Br\n", + "BW=2*Br #Bandwidth\n", + "Es=286.39*N0\n", + "Ps2=(Es*Br)/2\n", + "BW2=(2*Br)/4\n", + "\n", + "#Results\n", + "print(\"i) BPSK THe transmission bandwidth = %.2f MHz\" %(BW*10**6)) \n", + "print(\"ii) For 16 ary PSK THe transmission bandwidth = %.2f MHz\" %(BW2*10**6)) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) BPSK THe transmission bandwidth = 4.16 MHz\n", + "ii) For 16 ary PSK THe transmission bandwidth = 1.04 MHz\n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter8.ipynb b/Digital_Communications_by_S._Sharma/Chapter8.ipynb new file mode 100755 index 00000000..52d8741e --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter8.ipynb @@ -0,0 +1,1439 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 8: INFORMATION THEORY

" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page No 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Find Information Content of Each Symbol\n", + "\n", + "#Variable Declaration\n", + "px1=1/2.0\n", + "px2=1/4.0\n", + "px3=1/8.0\n", + "px4=1/8.0\n", + "\n", + "#Calculation\n", + "#information content of each symbol\n", + "Ix1=math.log(1/px1,2)\n", + "Ix2=math.log(1/px2,2)\n", + "Ix3=math.log(1/px3,2)\n", + "Ix4=math.log(1/px4,2)\n", + "\n", + "#Result\n", + "print(\"Information Content tI(x1)= %.2f bit\" %Ix1)\n", + "print(\" tI(x2)= %.f bits\" %Ix2)\n", + "print(\" tI(x3)= %.f bits\" %Ix3)\n", + "print(\" tI(x4)= %.f bits\" %Ix4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Information Content tI(x1)= 1.00 bit\n", + " tI(x2)= 2 bits\n", + " tI(x3)= 3 bits\n", + " tI(x4)= 3 bits\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page No 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find amount of Information\n", + "#Variable Declaration\n", + "#Calculation\n", + "pxi=1/4.0\n", + "Ixi=(math.log10(1/pxi))/math.log10(2)\n", + "\n", + "#RESULTS\n", + "print(\"The amount of Information I(Xi)= %.f \" %Ixi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of Information I(Xi)= 2 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page No 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Amount of Information\n", + "\n", + "#Variable Declaration\n", + "px1=1/2.0\n", + "px2=1/2.0\n", + "\n", + "#Calculation\n", + "Ix1=math.log(1/px1,2) #entropy\n", + "Ix2=math.log(1/px2,2)\n", + "\n", + "#Result\n", + "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n", + "print(\"The amount of Information I(X2)= %.f bit\" %Ix2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of Information I(X1)= 1 bit\n", + "The amount of Information I(X2)= 1 bit\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page No 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Amount of Information \n", + "\n", + "#Variable Declaration\n", + "px1=1/4.0\n", + "px2=3/4.0\n", + "\n", + "#Calculation\n", + "Ix1=math.log(1/px1,2)\n", + "Ix2=math.log(1/px2,2)\n", + "\n", + "#Result\n", + "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n", + "print(\"The amount of Information I(X2)= %.2f bit\" %Ix2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of Information I(X1)= 2 bit\n", + "The amount of Information I(X2)= 0.42 bit\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9, Page No 468 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Entropy,Amount of information\n", + "\n", + "#Variable Declaration\n", + "px1=0.4\n", + "px2=0.3\n", + "px3=0.2\n", + "px4=0.1\n", + "\n", + "#Calculation\n", + "HX=-px1*math.log(px1,2)-px2*math.log(px2,2)-px3*math.log(px3,2)-px4*math.log(px4,2)\n", + "Px1x2x1x3=px1*px2*px1*px3\n", + "Ix1x2x1x3=-math.log(Px1x2x1x3,2)\n", + "Px4x3x3x2=px4*px3*px3*px2\n", + "Ix4x3x3x2=-math.log(Px4x3x3x2,2)\n", + "\n", + "#Result\n", + "print(\" \\n Entropy H(X) = %.2f bits/symbol \" %HX)\n", + "print(\"The amount of Information I(x1x2x1x3)= %.2f bits/symbol\" %Ix1x2x1x3)\n", + "print(\" I(x4x3x3x2) = %.2f bits/symbol \" %Ix4x3x3x2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " Entropy H(X) = 1.85 bits/symbol \n", + "The amount of Information I(x1x2x1x3)= 6.70 bits/symbol\n", + " I(x4x3x3x2) = 9.70 bits/symbol \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13, Page No 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Find information rate the telegraphic source\n", + "\n", + "#Variable Declaration\n", + "pdash=1/3.0\n", + "pdot=2/3.0\n", + "tdot=0.2\n", + "tdash=0.6\n", + "tspace=0.2\n", + "\n", + "#Calculation\n", + "HX=-pdash*math.log(pdash,2)-pdot*math.log(pdot,2)\n", + "Ts=pdot*tdot+pdash*tdash+tspace\n", + "r=1/Ts\n", + "R=r*HX\n", + "\n", + "#Result\n", + "print('Average rate of information R = %.2f bits/s' %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average rate of information R = 1.72 bits/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14, Page No 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find information rate of the source\n", + "\n", + "f=input('Enter the frequncy f=')\n", + "px1=1/8.0\n", + "px2=1/8.0\n", + "px3=3/8.0\n", + "px4=3/8.0\n", + "\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2) #entropy of the source\n", + "R=2*f*HX #r=2*f\n", + "print('information rate R= %.1f bits/sec ' %R) #f=signal bandwidth\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the frequncy f=34\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "information rate R= 123.2 bits/sec \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15, Page No 472" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find information rate of the source\n", + "#all symbols are equally likely\n", + "\n", + "#Variable Declaration\n", + "px1=1/2.0\n", + "px2=1/2.0\n", + "px3=1/2.0\n", + "px4=1/2.0\n", + "\n", + "#Calculation\n", + "f=input('Enter the frequncy of system fm(in Hz) =')\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n", + "\n", + "#Result\n", + "print('\\n Entropy H(X) =%.f bits/symbol ' %HX)\n", + "R=2*f*HX\n", + "print('information rate =%.f bits/sec' %R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the frequncy of system fm(in Hz) =45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Entropy H(X) =2 bits/symbol \n", + "information rate =180 bits/sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.16, Page No 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find source entropy ,information rate\n", + "\n", + "#Variable Declaration\n", + "#probability symbols\n", + "px1=1/2.0\n", + "px2=1/4.0\n", + "px3=1/8.0\n", + "px4=1/16.0\n", + "px5=1/16.0\n", + "Tb=10.0**-3\n", + "\n", + "#Calculation\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4)+px5*math.log(1/px5)\n", + "\n", + "#Result\n", + "print('1. source entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n", + "r=1.0/Tb\n", + "R=r*HX #information rate\n", + "print(' 2. Information rate R = %.2f bits/sec ' %R)\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1. source entropy H(X) = 1.72 bits/symbol \n", + " 2. Information rate R = 1721.57 bits/sec \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17, Page No 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#assume if there are 16 outcomes per second\n", + "\n", + "#Variable Declaration\n", + "px1=1/2.0\n", + "px2=1/4.0\n", + "px3=1/8.0\n", + "px4=1/16.0\n", + "px5=1/16.0\n", + "r=16.0\n", + "\n", + "#Calculation\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)\n", + "\n", + "#Result\n", + "print('1. Entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n", + "\n", + "R=r*HX\n", + "print('2., Information rate R = %.f bits/sec' %R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1. Entropy H(X) = 1.88 bits/symbol \n", + "2., Information rate R = 30 bits/sec\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18, Page No 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#determine entropy ,information rate\n", + "\n", + "#Variable Declaration\n", + "px1=1/4.0\n", + "px2=1/5.0\n", + "px3=1/5.0\n", + "px4=1/10.0\n", + "px5=1/10.0\n", + "px6=1/20.0\n", + "px7=1/20.0\n", + "px8=1/20.0\n", + "f=10*10**3.0\n", + "fs=10*2*10**3.0\n", + "\n", + "#Calculation\n", + "#entropy\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)+px6*math.log(1/px6,2)+px7*math.log(1/px7,2)+px8*math.log(1/px8,2) \n", + "\n", + "#Result\n", + "print('bits/message H(X) = %.2f ' %HX)\n", + "r=fs\n", + "R=r*HX #information rate\n", + "print('bits/sec R = %.2f' %R)\n", + "print('Approximation error')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "bits/message H(X) = 2.74 \n", + "bits/sec R = 54828.92\n", + "Approximation error\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19, Page No 476 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from array import *\n", + "#Find Channel Matrix,joint probability\n", + "\n", + "#Variable Declaration\n", + "px1=0.5\n", + "px2=0.5\n", + "py1x1=0.9\n", + "py2x1=0.1\n", + "py1x2=0.2\n", + "py2x2=0.8\n", + "PYX=[[py1x1,py2x1],[py1x2,py2x2]]\n", + "PX=[[px1,px2]]\n", + "PY = [[0,0],\n", + " [0,0]]\n", + "PXY = [[0,0],\n", + " [0,0]]\n", + "\n", + "for i in range(len(PYX)):\n", + " # iterate through columns of Y\n", + " for j in range(len(PX[0])):\n", + " # iterate through rows of Y\n", + " for k in range(len(PX)):\n", + " PY[i][j] += PYX[i][k] * PX[k][j]\n", + "print(' PY ARRAY = \\n')\n", + "for r in PY:\n", + " print(r)\n", + "PXd=[[px1,0],[0,px2]]\n", + "\n", + "\n", + "for i in range(len(PXd)):\n", + " # iterate through columns of Y\n", + " for j in range(len(PYX[0])):\n", + " # iterate through rows of Y\n", + " for k in range(len(PYX)):\n", + " PXY[i][j] += PXd[i][k] * PYX[k][j]\n", + "\n", + " \n", + "print(' \\n PXY ARRAY = \\n')\n", + "for r in PXY:\n", + " print(r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " PY ARRAY = \n", + "\n", + "[0.45, 0.45]\n", + "[0.1, 0.1]\n", + " \n", + " PXY ARRAY = \n", + "\n", + "[0.45, 0.05]\n", + "[0.1, 0.4]\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.35, Page No 498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Channel is aproximated by the AWGN Channel\n", + "\n", + "#Variable Declaration\n", + "B=4000.0\n", + "S=0.1*10**-3\n", + "n=2*10**-12\n", + "\n", + "#Calculation\n", + "N=n*B\n", + "C=B*math.log(1+(S/N),2) #Capacity of Channel\n", + "C=C/1000.0\n", + "#Result\n", + "print(' Capacity of Channel C=%.3f(10^3) b/s ' %C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Capacity of Channel C=54.439(10^3) b/s \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.36i, Page No 499" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#assume that succeissive samples are statistically independent\n", + "\n", + "#Variable Declaration\n", + "fm=4000.0\n", + "fs=2*fm\n", + "n=1.25\n", + "\n", + "#Calculation\n", + "r=fs*n\n", + "pxi=1/256.0\n", + "HX=-math.log(pxi,2)\n", + "R=r*HX\n", + "R=R/1000\n", + "print('Information Rate R= %.f kb/s' %R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Information Rate R= 80 kb/s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.36ii, Page No 499" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#assume that succeissive samples are statistically independent\n", + "\n", + "#Variable Declaration\n", + "B=10*10**3.0\n", + "SN=20.0\n", + "\n", + "#Calculation\n", + "SNR=10**(SN/10.0)\n", + "C=B*math.log(1+(SNR),2)\n", + "C=C/1000\n", + "\n", + "#Result\n", + "print('The channel capacity = %.2f 10^3 b/s' %C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The channel capacity = 66.58 10^3 b/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.36iii, Page No 499" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#assume that succeissive samples are statistically independent\n", + "\n", + "#Variable Declaration\n", + "C=8*10**4.0\n", + "B=10**4.0\n", + "\n", + "#Calculation\n", + "SN=2**(C/B)-1\n", + "SNR=10*math.log(SN,10) #SNR\n", + "\n", + "#Result\n", + "print(' The S/N ratio required for error-free transmission =%.2f dB ' %SNR) #required SNR is greater that 24.064\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The S/N ratio required for error-free transmission =24.07 dB \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.36iv, Page No 499 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#assume that succeissive samples are statistically independent\n", + "\n", + "#Variable Declaration\n", + "SN=20.0\n", + "\n", + "#Calculation\n", + "SNR=10**(SN/10.0)\n", + "C=8*10**4.0\n", + "B=C/(math.log(1+SNR,2)) #Bandwidth\n", + "B=B/1000\n", + "\n", + "#Result\n", + "print('Bandwidth required for AWGN channel B =%.2f kHz ' %B)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth required for AWGN channel B =12.02 kHz \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.37, Page No 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find code efficiency,redundancy\n", + "\n", + "#Variable Declaration\n", + "px1=0.9\n", + "px2=0.1\n", + "n1=1.0\n", + "n2=1.0\n", + "\n", + "#Calculation\n", + "L=px1*n1+px2*n2 #code leght\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)\n", + "n=(HX/L) #code efficiency\n", + "n=n*100\n", + "\n", + "print('Code efficiency = %.1f percent' %n)\n", + "r=(100-n) #code reduncy\n", + "print('Code redundancy = %.1f percent' %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Code efficiency = 46.9 percent\n", + "Code redundancy = 53.1 percent\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.38, Page No 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find code efficiency,redundancy\n", + "\n", + "#Variable Declaration\n", + "pa1=0.81\n", + "pa2=0.09 \n", + "pa3=0.09\n", + "pa4=0.01 \n", + "n1=1\n", + "n2=2 \n", + "n3=3\n", + "n4=3 \n", + "\n", + "#Calculation\n", + "L=pa1*n1+pa2*n2+pa3*n3+pa4*n4\n", + "HX2=pa1*math.log(1/pa1,2)+pa2*math.log(1/pa2,2)+pa3*math.log(1/pa3,2)+pa4*math.log(1/pa4,2)\n", + "n=HX2/L*100\n", + "\n", + "#Result\n", + "print(' code efficiency = %.2f percent' %n)\n", + "\n", + "r=(100-n) #code reduncy\n", + "print(' code redundancy = %.1f percent' %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " code efficiency = 72.71 percent\n", + " code redundancy = 27.3 percent\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.44, Page No 507" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find efficiency of the code\n", + "\n", + "#Variable Declaration\n", + "px1=1/2.0\n", + "px2=1/4.0\n", + "px3=1/8.0\n", + "px4=1/8.0\n", + "n1=1.0\n", + "n2=2.0\n", + "n3=3.0\n", + "n4=3.0\n", + "\n", + "#Calculation\n", + "#information content of each symbol\n", + "Ix1=-math.log(px1,2)\n", + "Ix2=-math.log(px2,2)\n", + "Ix3=-math.log(px3,2)\n", + "Ix4=-math.log(px4,2)\n", + "\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n", + "L=px1*n1+px2*n2+px3*n3+px4*n4\n", + "\n", + "n=HX/L*100\n", + "\n", + "#Result\n", + "print('Ccode efficiency = %.f Percent' %n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ccode efficiency = 100 Percent\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.50, Page No 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy ,information rate\n", + "#If there are 16 outcomes per second\n", + "\n", + "#Variable Declaration\n", + "P1=1/2.0\n", + "P2=1/4.0\n", + "P3=1/8.0\n", + "P4=1/16.0\n", + "P5=1/32.0\n", + "P6=1/32.0\n", + "r=16 #message rate\n", + "\n", + "#Calculation\n", + "H=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2)+P4*math.log(1/P4,2)+P5*math.log(1/P5,2)+P6*math.log(1/P6,2)\n", + "#Entropy of system\n", + "\n", + "#Result\n", + "print('1. Entropy of system H = %.2f bits/message ' %H)\n", + "R=H*r #R=Entropy*message rate\n", + "print(' 2. Information rate R = %.f bits/sec ' %R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1. Entropy of system H = 1.94 bits/message \n", + " 2. Information rate R = 31 bits/sec \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.51, Page No 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Calculate H(X) ,H(Y)\n", + "\n", + "#Variable Declaration\n", + "px1=0.3\n", + "px2=0.4\n", + "px3=0.3\n", + "\n", + "#Calculation\n", + "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2) #Entropy of X\n", + "\n", + "\n", + "print(' 1.Entropy of X H(X)=%.3f bits/symbol ' %HX)\n", + "\n", + "PYX=[[0.8, 0.2, 0],[ 0, 1, 0],[ 0, 0.3, 0.7]]\n", + "PX=[[px1, px2, px3]]\n", + "PXY = [[0,0,0],\n", + " [0,0,0],\n", + " [0,0,0]]\n", + "\n", + "for i in range(len(PYX)):\n", + " # iterate through columns of PXd\n", + " for j in range(len(PX[0])):\n", + " # iterate through rows of PYX\n", + " for k in range(len(PX)):\n", + " PXY[i][j] += PYX[i][k] * PX[k][j]\n", + "\n", + "py1=PXY[0][0]\n", + "py2=PXY[0][1]\n", + "py3=PXY[0][2]\n", + "HY=py1*math.log(1/py1,2)+py2*math.log(1/py2,2)+py3*math.log(1/py3,2) #Entropy of Y\n", + "print(' 2. Entropy of Y H(Y)= %.2f bits/symbol ' %HY)\n", + "print('Approximation error')\t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1.Entropy of X H(X)=1.571 bits/symbol \n", + " 2. Entropy of Y H(Y)= 1.51 bits/symbol \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.52, Page No 513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy of source ,entropy of second order extension\n", + "\n", + "#Variable Declaration\n", + "P1=0.7\n", + "P2=0.15\n", + "P3=0.15\n", + "\n", + "#Calculation\n", + "HX=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2) #Entropy of source\n", + "print(' 1. Entropy of system H(X)=%.2f bits/symbol ' %HX)\n", + "#H(X^n)=n*H(X)\n", + "n=2 #for second order\n", + "HX2=n*HX\n", + "\n", + "#Result\n", + "print(' 2. Entropy of second order system extension of source can be H(X^2)=%.2f bits/symbol ' %(HX*2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1. Entropy of system H(X)=1.18 bits/symbol \n", + " 2. Entropy of second order system extension of source can be H(X^2)=2.36 bits/symbol \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.54, Page No 514" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy of source \n", + "\n", + "#Variable Declaration\n", + "S0=1/3.0\n", + "S1=1/6.0\n", + "S2=1/4.0\n", + "S3=1/4.0\n", + "\n", + "#Calculation\n", + "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n", + "\n", + "#Result\n", + "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Entropy of system H(X)=1.96 bits/symbol \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.56, Page No 515" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Information capacity of telephone\n", + "\n", + "#Variable Declaration\n", + "B=3.4*10**3\n", + "SNR=30.0\n", + "\n", + "#Calculation\n", + "SN=10**(SNR/10)\n", + "C=B*math.log(1+SN,2) #Information capacity\n", + "C=C/1000\n", + "\n", + "#Result\n", + "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Information capacity of telephone is C = 33.89 kbps \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.59, Page No 516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy of source \n", + "\n", + "#Variable Declaration\n", + "S0=1/3.0\n", + "S1=1/6.0\n", + "S2=1/4.0\n", + "S3=1/4.0\n", + "\n", + "#Calculation\n", + "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n", + "\n", + "#Result\n", + "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Entropy of system H(X)=1.96 bits/symbol \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.60, Page No 516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy of source \n", + "\n", + "#Variable Declaration\n", + "m1=1/2.0\n", + "m2=1/4.0\n", + "m3=1/8.0\n", + "m4=1/16.0\n", + "m5=1/16.0\n", + "\n", + "#Calculation\n", + "L=(m1*1)+(m2*2)+(m3*3)+(2*(m4)*4)\n", + "\n", + "#Result\n", + "print(' Average number of bits per message =%.2f bits ' %L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Average number of bits per message =1.88 bits \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.61, Page No 517" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find Information capacity of telephone\n", + "\n", + "#Variable Declaration\n", + "B=3.4*10**3\n", + "SNR=30.0\n", + "\n", + "#Calculation\n", + "SN=10**(SNR/10)\n", + "C=B*math.log(1+SN,2) #Information capacity\n", + "C=C/1000\n", + "\n", + "#Result\n", + "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Information capacity of telephone is C = 33.89 kbps \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.62, Page No 517" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy of source \n", + "\n", + "#Variable Declaration\n", + "p1=4.0\n", + "m1=0.5\n", + "m2=0.5\n", + "m3=0.375\n", + "m4=0.375\n", + "m5=0.375\n", + "m6=0.375\n", + "\n", + "#Calculation\n", + "I1=p1*math.log(1/p1,2) \n", + "HX=m1*math.log(1/m1,2)+m2*math.log(1/m2,2)+m3*math.log(1/m3,2)+m4*math.log(1/m4,2)+m5*math.log(1/m5,2)+m6*math.log(1/m6,2) #EntroSy of source\n", + "\n", + "#Result\n", + "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n", + "print('Approximation error')\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Entropy of system H(X)=3.12 bits/symbol \n", + "Approximation error\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.65, Page No 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find entropy of source \n", + "\n", + "#Variable Declaration\n", + "S0=1/2.0\n", + "S1=1/4.0\n", + "S2=1/8.0\n", + "S3=1/8.0\n", + "n=1\n", + "\n", + "#Calculation\n", + "H=S0*math.log(1.0/S0,2)+S1*math.log(1.0/S1,2)+S2*math.log(1.0/S2,2)+S3*math.log(1.0/S3,2) #EntroSy of source\n", + "L=H*n\n", + "\n", + "\n", + "#Result\n", + "print(' Code length =%.2f bits/messages ' %L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Code length =1.75 bits/messages \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.67, Page No 520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Find channel capacity and new bandwidth\n", + "\n", + "#Variable Declaration\n", + "B=8*10**3\n", + "SNR=31.0\n", + "SNR2=61\n", + "\n", + "#Calculation\n", + "C=B*math.log(1+SNR,2) #Information capacity\n", + "B2=C/math.log(1+SNR2,2)\n", + "#Result\n", + "print(' Channel capacity is C = %.2f x 10^3 bits/sec ' %(C/1000))\n", + "print(' New Bandwidth is C = %.2f x kHz ' %(B2/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Channel capacity is C = 40.00 x 10^3 bits/sec \n", + " New Bandwidth is C = 6.72 x kHz \n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/Chapter9.ipynb b/Digital_Communications_by_S._Sharma/Chapter9.ipynb new file mode 100755 index 00000000..c91e1583 --- /dev/null +++ b/Digital_Communications_by_S._Sharma/Chapter9.ipynb @@ -0,0 +1,166 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chpater 9: ERROR CONTROL CODING

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find detected errors,corrected errors\n", + "\n", + "#initialisation of variables\n", + "dmin=5.0\n", + "#(s+1)<= dmin number errors can be detected(s)\n", + " \n", + "#CALCULATIONS\n", + "s=dmin-1\n", + "\n", + "#RESULTS\n", + "print(' i)Number of detected errors s <= %.f ' %s)\n", + "#(2t+1)<=dmin number errors can be corrected(t)\n", + "t=(dmin-1)/2.0\n", + "print('ii) Number of corrected errors t<= %.f ' %t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " i)Number of detected errors s <= 4 \n", + "ii) Number of corrected errors t<= 2 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.17, Page No 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Determine all possible code vectors \n", + "\n", + "m3=1\n", + "m2=0\n", + "m1=1\n", + "m0=0\n", + "#M=Message Matrix\n", + "#G=Generator Matrix\n", + "G=[[1, 0, 1, 1, 0, 0, 0],[0, 1, 0, 1, 1, 0, 0],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n", + "M=[[m3,m2,m1,m0]]\n", + "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n", + "\n", + "for i in range(len(G)):\n", + " # iterate through columns of PXd\n", + " for j in range(len(M[0])):\n", + " # iterate through rows of PYX\n", + " for k in range(len(M)):\n", + " X[i][j] += G[i][k] * M[k][j]\n", + "print('The required code word')\n", + "for r in range(0,7):\n", + " print(X[0][r])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required code word\n", + "1\n", + "0\n", + "1\n", + "0\n", + "0\n", + "0\n", + "0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.19, Page No 572" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Determine code word \n", + "m3=1\n", + "m2=0\n", + "m1=1\n", + "m0=0\n", + "#M=Message Matrix\n", + "#G=Generator Matrix\n", + "G=[[1, 0, 0, 0, 1, 0, 1],[0, 1, 0, 0, 1, 1, 1],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n", + "M=[[m3,m2,m1,m0]]\n", + "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n", + "\n", + "\n", + "for i in range(len(G)):\n", + " # iterate through columns of PXd\n", + " for j in range(len(M[0])):\n", + " # iterate through rows of PYX\n", + " for k in range(len(M)):\n", + " X[i][j] += G[i][k] * M[k][j]\n", + "print('The required code word')\n", + "for r in range(0,7):\n", + " print(X[0][r] )\n", + " \n", + "\n", + "print('The code in the book is wrong')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required code word\n", + "1\n", + "0\n", + "1\n", + "0\n", + "0\n", + "0\n", + "0\n", + "The code in the book is wrong\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/README.txt b/Digital_Communications_by_S._Sharma/README.txt new file mode 100755 index 00000000..cb9038a1 --- /dev/null +++ b/Digital_Communications_by_S._Sharma/README.txt @@ -0,0 +1,10 @@ +Contributed By: Mayur Sabban +Course: be +College/Institute/Organization: Vishwakarma Institute of Technology Pune +Department/Designation: Computer Engg +Book Title: Digital Communications +Author: S. Sharma +Publisher: S. K. Kataria & Sons, New Delhi +Year of publication: 2013 +Isbn: 9789350142684 +Edition: 6 \ No newline at end of file diff --git a/Digital_Communications_by_S._Sharma/screenshots/Chapter1.png b/Digital_Communications_by_S._Sharma/screenshots/Chapter1.png new file mode 100755 index 00000000..ecbda1c6 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/Chapter1.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2.png new file mode 100755 index 00000000..cfb39197 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter2.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter2_1.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2_1.png new file mode 100755 index 00000000..4eac12f5 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter2_1.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter2_2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2_2.png new file mode 100755 index 00000000..2aa76318 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter2_2.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter2_3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2_3.png new file mode 100755 index 00000000..2aa76318 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter2_3.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3.png new file mode 100755 index 00000000..bd8ace20 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter3.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter3_1.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3_1.png new file mode 100755 index 00000000..b59f5a6f Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter3_1.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter3_2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3_2.png new file mode 100755 index 00000000..9e929daa Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter3_2.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter3_3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3_3.png new file mode 100755 index 00000000..9e929daa Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter3_3.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter4.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4.png new file mode 100755 index 00000000..9160481e Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter4.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter4_1.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4_1.png new file mode 100755 index 00000000..230f9193 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter4_1.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter4_2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4_2.png new file mode 100755 index 00000000..31a0c9c2 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter4_2.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter4_3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4_3.png new file mode 100755 index 00000000..31a0c9c2 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter4_3.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter6.png b/Digital_Communications_by_S._Sharma/screenshots/chapter6.png new file mode 100755 index 00000000..47807122 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter6.png differ diff --git a/Digital_Communications_by_S._Sharma/screenshots/chapter7.png b/Digital_Communications_by_S._Sharma/screenshots/chapter7.png new file mode 100755 index 00000000..12c93548 Binary files /dev/null and b/Digital_Communications_by_S._Sharma/screenshots/chapter7.png differ diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt new file mode 100755 index 00000000..52274925 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt @@ -0,0 +1,10 @@ +Contributed By: kiruthika gowthaman +Course: be +College/Institute/Organization: Sona College of Technology,Salem,Tamil Nadu,India +Department/Designation: Computer Science +Book Title: Discrete Mathematics and its Applications +Author: Kenneth H.Rosen +Publisher: McGrawhill +Year of publication: 2012 +Isbn: 9780071315012 +Edition: 7 \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb new file mode 100755 index 00000000..8f25fc13 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"source": "##Example 01: Page 156", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "#To generate a sequence a_n=1/n\ni=1.0 #floating point division\nn=input(\"enter the number of terms in the sequence\");\nprint \"a_n=1/n\"\nprint \"when n=\",n,\"a_n is\"\nfor i in range(1,n+1): #iteration till the number of terms specified by the user\n a=1.0/i\n print \"1/\",i,\",\",\nprint \"\\n\"\nfor i in range(1,n+1): #iteration till the number of terms specified by the user\n a=1.0/i\n print a,\",\",\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter the number of terms in the sequence5\na_n=1/n\nwhen n= 5 a_n is\n1/ 1 , 1/ 2 , 1/ 3 , 1/ 4 , 1/ 5 , \n\n1.0 , 0.5 , 0.333333333333 , 0.25 , 0.2 ,\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 02: Page 157", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "n=input(\"Enter the number of terms in the sequence to generate the geometric progression\");\ni=1\nprint\"the list of terms\",\nfor i in range (n+1):print\"b\",i,\",\",\nprint \"begins with\", \nfor i in range (n+1): #iterate for the number of terms given as input\n b_n=(-1)**i\n print b_n,\nprint\"\\n\",\"the list of terms\",\nfor i in range (n+1):print\"c\",i,\",\",\nprint \"begins with\", \nfor i in range (n+1): #iterate for the number of terms given as input\n c_n=2*(5**i)\n print c_n,\nprint\"\\n\",\"the list of terms\",\nfor i in range (n+1):print\"c\",i,\",\",\nprint \"begins with\",\nfor i in range (n+1): #iterate for the number of terms given as input\n d_n=6.0*((1.0/3.0)**i)\n print d_n, #prints the fraction values in decimals. Floating point division\n\n \n \n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of terms in the sequence to generate the geometric progression5\nthe list of terms b 0 , b 1 , b 2 , b 3 , b 4 , b 5 , begins with 1 -1 1 -1 1 -1 \nthe list of terms c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , begins with 2 10 50 250 1250 6250 \nthe list of terms c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , begins with 6.0 2.0 0.666666666667 0.222222222222 0.0740740740741 0.0246913580247\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 157", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "n=input(\"Enter the number terms in the sequence\");\ns_n=-1+4*n\nt_n=7-3*n\ni=0\nprint \"The list of terms\",\nfor i in range(n): \n print \"s\",i,\",\",\nprint \"begins with\",\nfor i in range(n):#generates the sequence for -1*4i\n print -1+4*i,\nprint \"\\nThe list of terms\",\nfor i in range(n):\n print \"t\",i,\",\",\nprint \"begins with\",\nfor i in range(n):#generates the sequence for 7-3i\n print 7-3*i,\n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number terms in the sequence5\nThe list of terms s 0 , s 1 , s 2 , s 3 , s 4 , begins with -1 3 7 11 15 \nThe list of terms t 0 , t 1 , t 2 , t 3 , t 4 , begins with 7 4 1 -2 -5\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 158", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "a=[2,0,0,0] #assigning a[0]=2 (Given)\n\nfor i in range(1,4):#iteration to run till a[3]\n a[i]=a[i-1]+3\n print \"a[\",i,\"]\",a[i]", "outputs": [{"output_type": "stream", "name": "stdout", "text": "a[ 1 ] 5\na[ 2 ] 8\na[ 3 ] 11\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 06: Page 158", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "a=[3,5,0,0] #assingning a[0],a[1] to the given values\n\nfor i in range(2,4): # iterations to find the successive values. If values are to be found for further terms the for loop \"stop\" has to be modified\n a[i]=a[i-1]-a[i-2]\n print \"a[\",i,\"]\",a[i]", "outputs": [{"output_type": "stream", "name": "stdout", "text": "a[ 2 ] 2\na[ 3 ] -3\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 07: Page 158 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "f=[0,1,0,0,0,0,0] #assingning a[0],a[1] to the given values\nprint \"Fibonacci series is\"\nfor i in range(2,7): # iterations to find the successive values. If values are to be found for further terms the for loop \"stop\" has to be modified\n f[i]=f[i-1]+f[i-2]\n print \"f[\",i,\"]=f[\",i-1,\"]+f[\",i-2,\"]=\",f[i]", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fibonacci series is\nf[ 2 ]=f[ 1 ]+f[ 0 ]= 1\nf[ 3 ]=f[ 2 ]+f[ 1 ]= 2\nf[ 4 ]=f[ 3 ]+f[ 2 ]= 3\nf[ 5 ]=f[ 4 ]+f[ 3 ]= 5\nf[ 6 ]=f[ 5 ]+f[ 4 ]= 8\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 08: Page 159 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "n=1\nresult=0\nnumber=input(\"Enter the number\");\nfor i in range(1,number):\n n=n+i*n \nprint \"The factorial of\",number,\"is\",n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number5\nThe factorial of 5 is 120\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 18: Page 164", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#finding the summation of j^2\nup=input(\"Enter the upper limit for the operation j^2\");\nlow=input(\"Enter the lower limit for the operation j^2\");\nsum=0\nprint \"The square of terms form 1 to n\",\nfor j in range (low,up+1): #summation. Iteration from lower to upper limit.\n print j,\"^2+\",\n j=j**2 #square function is computed as '**'\n sum=sum+j\nprint \"=\",sum\n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the upper limit for the operation j^25\nEnter the lower limit for the operation j^21\nThe square of terms form 1 to n 1 ^2+ 2 ^2+ 3 ^2+ 4 ^2+ 5 ^2+ = 55\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 19: Page 164", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "k=4 #lower limit\nsum=0\nprint \"The value for the sequence\",\nfor k in range (4,8+1,1): #8+1 , 8 is the upper limit, in python to make for loop run till the limit equal to upper limit we give a +1.\n print \"(-1)^\",k,\"+\",\n sum=sum+((-1)**k)\nprint \"=\",sum\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The value for the sequence (-1)^ 4 + (-1)^ 5 + (-1)^ 6 + (-1)^ 7 + (-1)^ 8 + = 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 21: Page 165", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "\nglobals()['j']=0\ni=0\nglobals()['s']=0\nupj=input(\"Enter the upper limit for the inner summation\");\nlowj=input(\"Enter the lower limit for the inner summation\");\nupi=input(\"Enter the upper limit for the outer summation\");\nlowi=input(\"Enter the lower limit for the outer summation\");\nfor i in range (lowj,upj+1):\n j=j+i\nfor l in range(lowi,upi+1):\n s=s+(j*l)\nprint s\n \n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the upper limit for the inner summation3\nEnter the lower limit for the inner summation1\nEnter the upper limit for the outer summation4\nEnter the lower limit for the outer summation1\n60\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 13: Page 161", "cell_type": "markdown", "metadata": {"collapsed": true}}, {"execution_count": 4, "cell_type": "code", "source": "#To print series 1 once, 2 twice, 3 thrice and so on\na=[]\ni=1\nfor i in range(1,10+1): #for loop to initialise the number\n for j in range(1,i+1):#for loop to iterate to make the count\n print i,\n ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 22: Page 166", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "s=0 #initialise it to zero to store the results\nglobals()['res']=0 #difining result as global variable since it has to be accessed outside the loop\nprint \"Sum of values of s for all the members of the set {\",\nfor s in range (0,4+1,2): #iterate for terms 0,4,6\n print s,\n res=res+s\nprint \"} is\",res\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Sum of values of s for all the members of the set { 0 2 4 } is 6\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 178", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "def getmat(): #function to get the matrix elements\n m = int(input('number of rows, m = '))\n n = int(input('number of columns, n = '))\n matrix = []; columns = []\n\n for i in range(0,m):\n matrix.append([])\n for j in range(0,n):\n matrix[i].append(0)\n print ('entry in row: ',i+1,' column: ',j+1)\n matrix[i][j] = int(input())\n return (matrix)\n\ndef matrixADD(m1,m2): #function to add the matrix.\n z=[]\n for i in range (len(m1)):\n tem = []\n for j in range (len(m2)):\n x=m1[i][j]+m2[i][j]\n tem.append(x)\n z.append(tem)\n return z \n \n\n\nmat1=[]\nmat2=[]\nZ=[]\nprint \"Enter the elements of matrix 1\"\nmat1=getmat() #function call\nprint \"Enter the elements of matrix 2\"\nmat2=getmat() #function call\nprint \"Addition of \\n matrix 1\",mat1,\"and \\n matrix 2\",mat2,\"is \\n\",matrixADD(mat1,mat2) #function call to add \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the elements of matrix 1\nnumber of rows, m = 3\nnumber of columns, n = 3\n('entry in row: ', 1, ' column: ', 1)\n1\n('entry in row: ', 1, ' column: ', 2)\n0\n('entry in row: ', 1, ' column: ', 3)\n-1\n('entry in row: ', 2, ' column: ', 1)\n2\n('entry in row: ', 2, ' column: ', 2)\n2\n('entry in row: ', 2, ' column: ', 3)\n-3\n('entry in row: ', 3, ' column: ', 1)\n3\n('entry in row: ', 3, ' column: ', 2)\n4\n('entry in row: ', 3, ' column: ', 3)\n0\nEnter the elements of matrix 2\nnumber of rows, m = 3\nnumber of columns, n = 3\n('entry in row: ', 1, ' column: ', 1)\n3\n('entry in row: ', 1, ' column: ', 2)\n4\n('entry in row: ', 1, ' column: ', 3)\n-1\n('entry in row: ', 2, ' column: ', 1)\n1\n('entry in row: ', 2, ' column: ', 2)\n-3\n('entry in row: ', 2, ' column: ', 3)\n0\n('entry in row: ', 3, ' column: ', 1)\n-1\n('entry in row: ', 3, ' column: ', 2)\n1\n('entry in row: ', 3, ' column: ', 3)\n2\nAddition of \n matrix 1 [[1, 0, -1], [2, 2, -3], [3, 4, 0]] and \n matrix 2 [[3, 4, -1], [1, -3, 0], [-1, 1, 2]] is \n[[4, 4, -2], [3, -1, -3], [2, 5, 2]]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 179", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "\n# Program to multiply two matrices using nested loops\n\n# 3x3 matrix\nX = [[1,0,4],\n [2,1,1],\n [3,1,0],\n [0,2,2]]\n# 3x4 matrix\nY = [[2,4],\n [1,1],\n [3,0]]\n# result is 3x4\nresult = [[0,0],\n [0,0],\n [0,0,],\n [0,0]]\n\n# iterate through rows of X\nfor i in range(len(X)):\n # iterate through columns of Y\n for j in range(len(Y[0])):\n # iterate through rows of Y\n for k in range(len(Y)):\n result[i][j] += X[i][k] * Y[k][j]\nprint \"The multiplication of the two matrices AB is\"\n\nfor r in result:\n print(r)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The multiplication of the two matrices AB is\n[14, 4]\n[8, 9]\n[7, 13]\n[8, 2]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 181", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "# Program to transpose a matrix using nested loop\n# iterate through rows\ndef mattrans(X,result):\n print \"The transpose is\"\n for i in range(len(X)):\n # iterate through columns\n for j in range(len(X[0])):\n result[j][i] = X[i][j]\n for r in result:\n print(r)\n \ndef getmat():\n row = int(input('number of rows = '))\n col = int(input('number of columns = '))\n matrix = []; columns = []\n\n for i in range(0,row):\n matrix.append([])\n for j in range(0,col):\n matrix[i].append(0)\n print ('entry in row: ',i+1,' column: ',j+1)\n matrix[i][j] = int(input())\n for c in range(col):\n for r in range(row):\n result[c][r]=0\n mattrans(matrix,result)\n \n\n\nprint \"Enter the elements of the matrix\"\ngetmat()\n#mattrans(mat1)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the elements of the matrix\nnumber of rows = 2\nnumber of columns = 3\n('entry in row: ', 1, ' column: ', 1)\n1\n('entry in row: ', 1, ' column: ', 2)\n2\n('entry in row: ', 1, ' column: ', 3)\n3\n('entry in row: ', 2, ' column: ', 1)\n4\n('entry in row: ', 2, ' column: ', 2)\n5\n('entry in row: ', 2, ' column: ', 3)\n6\nThe transpose is\n[1, 4]\n[2, 5]\n[3, 6]\n[8, 2]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "", "cell_type": "markdown", "metadata": {}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb new file mode 100755 index 00000000..6dd38e86 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 01: The Foundations: Logic and Proofs\n", "cell_type": "markdown", "metadata": {}}, {"source": "##Example 01:Page 02", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print \"The following sentences are Propositions\" #Proposition should be a declarative sentence or should result in either a YES or a NO.\n\nprint \"1. Washington D.C is the capital of the United States of America\\n2. Toronto is the capital of Canada\\n3. 1+1=2.\\n4. 2+2=3.\" #Since these statements are declarative and they answer the question YES or NO they are called propositions.\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The following sentences are Propositions\n1. Washington D.C is the capital of the United States of America\n2. Toronto is the capital of Canada\n3. 1+1=2.\n4. 2+2=3.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 02:Page 02", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print \"1. What time is it? \\n2. Read this carefully. \\n3. x+1=2.\\n4. x+y=Z.\"\nprint\"Sentences 1 and 2 are not propositions since they are not declarative. Sentences 3 and 4 are neither true nor false and so they are not propositions.\"\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "1. What time is it? \n2. Read this carefully. \n3. x+1=2.\n4. x+y=Z.\nSentences 1 and 2 are not propositions since they are not declarative. Sentences 3 and 4 are neither true nor false and so they are not propositions.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 03:Page 03", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "print \"Propositon p=Michael's PC runs Linux.\"\nprint \"\\n Negation of p is ~p : It is not the case that Michael's PC runs Linux.\"\nprint \"\\n Negation of p is ~p : Michae's PC does not run.\"#Negation is opposite of the truth value of the proposition expressed with \"it is not the case that\" or with \"not\".\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Propositon p=Michael's PC runs Linux.\n\n Negation of p is ~p : It is not the case that Michael's PC runs Linux.\n\n Negation of p is ~p : Michae's PC does not run.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 04:Page 03", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "print \"Let p=Vandana's smartphone has at least 32GB of memory.\"\nprint \"The negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\"\nprint \"Or in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\"\nprint \"Or even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\"\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p=Vandana's smartphone has at least 32GB of memory.\nThe negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\nOr in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\nOr even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 05:Page 04", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "p=\"Rebecca's PC has more than 16GB free hard disk space\"\nq=\"The processor in Rebecca's PC runs faster than 1GHz\"\nprint \"Let p,q be two propositions\"\nprint \"Let p=\",p,\"\\n\",\"Let q=\",q\nprint \"Conjunction of p^q is : \"+p+\" and \"+q #conjunction combines two propositons with \"and\"\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p,q be two propositions\nLet p= Rebecca's PC has more than 16GB free hard disk space \nLet q= The processor in Rebecca's PC runs faster than 1GHz\nConjunction of p^q is : Rebecca's PC has more than 16GB free hard disk space and The processor in Rebecca's PC runs faster than 1GHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 06:Page 05", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "p=\"Rebecca's PC has more than 16GB free hard disk space\"\nq=\"The processor in Rebecca's PC runs faster than 1GHz\"\nprint \"Let p,q be two propositions\"\nprint \"Let p=\",p,\"\\n\",\"Let q=\",q\nprint \"Disjunction of p\\/q is : \"+p+\" or \"+q #unavailability of cup symbol. So \\/\n#Disjunction combines two propositons using OR \n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p,q be two propositions\nLet p= Rebecca's PC has more than 16GB free hard disk space \nLet q= The processor in Rebecca's PC runs faster than 1GHz\nDisjunction of p\\/q is : Rebecca's PC has more than 16GB free hard disk space or The processor in Rebecca's PC runs faster than 1GHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 07:Page 07", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "p=\"Maria learns discrete mathematics\"\nq=\"Maria will find a good job\"\nprint\"Let p=\",p,\"\\n\",\"Let q=\",q\nprint\"p->q is : \"+\"If \"+p+\" then \"+q #p->q p implies q means If P then Q.\nprint\"p->q is also expressed as :\",q,\" when \",p\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p= Maria learns discrete mathematics \nLet q= Maria will find a good job\np->q is : If Maria learns discrete mathematics then Maria will find a good job\np->q is also expressed as : Maria will find a good job when Maria learns discrete mathematics\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01:Page 37", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "def p(x): #Function defined to check whether the given statements are true.\n if(x>3):\n print \"p(\",x,\") which is the statement\",x,\">3, is true\"\n else:\n print \"p(\",x,\") which is the statement\",x,\">3, is false\"\np(4)#Fuction call \np(2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "p( 4 ) which is the statement 4 >3, is true\np( 2 ) which is the statement 2 >3, is false\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02:Page 38", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "x1=\"CS1\" #Defining systems to check whether they are under attack through a function.\nx2=\"CS2\"\nx3=\"MATH1\"\ndef A(x):\n if(x==\"CS1\"): #Since cs1 and Math1 are the two computers under attack\n print \"A(\",x,\") is true.\"\n else:\n if(x==\"MATH1\"): #Since CS1 and MATH1 are the two computers under attack\n print \"A(\",x,\") is true.\"\n else:\n print\"A(\",x,\") is false.\"\nprint \"Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\"\nA(x1)#Function call \nA(x2)\nA(x3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\nA( CS1 ) is true.\nA( CS2 ) is false.\nA( MATH1 ) is true.\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb new file mode 100755 index 00000000..8b20399a --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 03: Algorithms", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 03: Page 195", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "def binarysearch(a,num): #function definition with its parameters 'a' is the inputlist\n #and 'num' number to be found\n\n first=0 #initially the first position is zero\n last=len(a)-1 #initially the last position is the total length of the inputlist-1\n found=False #boolean value to indicate if the number to be searched is found or not.\n\n while first<=last and not found:\n midpoint=(first+last)//2 #dividing the inputlist into two halves and comparing the number to be found with the midpoint.\n\n if a[midpoint]==num: #If the number to be found is equal to the midpoint returns the position.\n found=True\n else:\n if num 0) and (inputlist[pos-1] > val_current)):\n inputlist[pos] = inputlist[pos-1]\n pos = pos-1\n \n if pos != i:\n inputlist[pos] = val_current \n print(inputlist)\n return inputlist\ninputlist = [3,2,4,1,5]\nprint sort_insertion(inputlist)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "[2, 3, 4, 1, 5]\n[1, 2, 3, 4, 5]\n[1, 2, 3, 4, 5]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "", "cell_type": "markdown", "metadata": {}}, {"source": "", "cell_type": "markdown", "metadata": {}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb new file mode 100755 index 00000000..740280e5 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 03: Page 239", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "#To find the quotient and remainder \ndividend=101\ndivisor=11\nquotient=dividend/divisor #To find quotient\nremainder=dividend%divisor #To find remainder\ndividend=(divisor*quotient)+remainder\nprint \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The quotient when 101 is divided by 11 is 9 = 101 div 11 and the remainder is 2 = 101 mod 11\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 240", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#To find the quotient and remainder\ndividend=-11\ndivisor=3\nquotient=dividend/divisor\nremainder=dividend%divisor\ndividend=(divisor*quotient)+remainder\nprint \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The quotient when -11 is divided by 3 is -4 = -11 div 3 and the remainder is 1 = -11 mod 3\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01: Page 246", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "#To convert binary to decimal equivalent\nbinary_num= raw_input('enter a number: ')\ndecimal = 0\nfor digit in binary_num:\n decimal = decimal*2 + int(digit)\n\nprint decimal\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter a number: 101011111\n351\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 247", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "#To convert decimal to hexadecimal\ndec= raw_input('enter a number: ')\n\nprint \"The conversion of\",dec,\"to hexadeimal is\",int(dec,16)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter a number: 2AE0B\nThe conversion of 2AE0B to hexadeimal is 175627\n"}], "metadata": {"scrolled": true, "collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 247", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "#To compute decimal to octal\nnumbers= []\ndec=input(\"Enter a number\");\nnum=dec\nwhile dec!=0:\n \n rem=dec%8\n dec=dec/8\n numbers.append(rem)\nprint \"The decimal number\",num,\"is converted to its octal equivalent : \",\nfor i in reversed(numbers):\n print i,\n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter a number12345\nThe decimal number 12345 is converted to its octal equivalent : 3 0 0 7 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 248", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "#To convert Decimal to hexadecimal\nnum=[]\ndef ChangeHex(n): #function to convert\n if (n < 0):\n num.append(\"\")\n elif (n<=1):\n num.append(n)\n else: #for numbers greater than 9\n x =(n%16)\n if (x < 10):\n num.append(x) \n if (x == 10):\n num.append(\"A\")\n if (x == 11):\n num.append(\"B\")\n if (x == 12):\n num.append(\"C\")\n if (x == 13):\n num.append(\"D\")\n if (x == 14):\n num.append(\"E\")\n if (x == 15):\n num.append(\"F\")\n ChangeHex( n / 16 )\ndec_num=input(\"Enter the decimal number which is to be converted to hexadecimal\");\nChangeHex(dec_num)\nprint \"The hexadecimal equivalent of decimal\",dec_num,\"is\",\nfor i in reversed(num):\n print i,\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the decimal number which is to be converted to hexadecimal177130\nThe hexadecimal equivalent of decimal 177130 is 0 2 B 3 E A\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 06: Page 249", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "#Compute Decimal to Binary\narray=[]\ndef conv(n):\n if n==0:\n print ''\n else:\n array.append(str(n%2)) #to compute remainder and append it to the result\n return conv(n/2) \ndec_num=input(\"Enter a decimal number\")\nconv(dec_num)\nprint \"The binary equivalent of decimal\",dec_num,\"is\",\nfor i in reversed(array):\n print i,\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter a decimal number241\n\nThe binary equivalent of decimal 241 is 1 1 1 1 0 0 0 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 06: Page 249", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "#To compute the binary addition\ndef binAdd(bin1, bin2): #function to add two binary numbers\n if not bin1 or not bin2:#checks if both the numbers are binary\n return '' \n\n maxlen = max(len(bin1), len(bin2))\n\n bin1 = bin1.zfill(maxlen) #zfill fills with zero to fill the entire width\n bin2 = bin2.zfill(maxlen)\n\n result = ''\n carry = 0\n\n i = maxlen - 1\n while(i >= 0):\n s = int(bin1[i]) + int(bin2[i])#adding bit by bit\n if s == 2: #1+1\n if carry == 0:\n carry = 1\n result = \"%s%s\" % (result, '0')\n else:\n result = \"%s%s\" % (result, '1')\n elif s == 1: # 1+0\n if carry == 1:\n result = \"%s%s\" % (result, '0')\n else:\n result = \"%s%s\" % (result, '1')\n else: # 0+0\n if carry == 1:\n result = \"%s%s\" % (result, '1')\n carry = 0 \n else:\n result = \"%s%s\" % (result, '0') \n\n i = i - 1;\n\n if carry>0:\n result = \"%s%s\" % (result, '1')\n return result[::-1]\nbin1 = raw_input('enter the first number: ')\nbin2 = raw_input('enter the second number: ')\nprint \"The sum of binary numbers\",bin1,\"and\",bin2,\"is\",binAdd(bin1,bin2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter the first number: 1110\nenter the second number: 1011\nThe sum of binary numbers 1110 and 1011 is 11001\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 258", "cell_type": "markdown", "metadata": {}}, {"execution_count": 21, "cell_type": "code", "source": "#to find the prime factors\n\ndef prime_factors(n):\n i = 2\n factors = []\n while i * i <= n:\n if n % i: #modulp division to check of the number is prime or not\n i += 1\n else:\n n //= i\n factors.append(i) #append those numbers which readily divides the given number\n if n > 1:\n factors.append(n)\n return factors\nnumber=input(\"Enter the number for which the prime factors have to be found\");\na=prime_factors(number)\nprint a\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number for which the prime factors have to be found100\n[2, 2, 5, 5]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 258", "cell_type": "markdown", "metadata": {}}, {"execution_count": 22, "cell_type": "code", "source": "#To say if a number is prime or not\nglobals() ['count']=0\nn=input(\"Enter the number\");\nfor i in range(2,n):#number thats not divisible by other than one and itself. so from 2 to n (n-1 in python for loop)\n if n%i==0:\n count=count+1\n num=i\nif count==0:\n print n,\"is prime\" \nelse:\n print n,\"is not prime because its divisible by\",num\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number101\n101 is prime\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 259", "cell_type": "markdown", "metadata": {}}, {"execution_count": 23, "cell_type": "code", "source": "#to find the prime factors\n\ndef prime_factors(n):\n i = 2\n factors = []\n while i * i <= n:\n if n % i: #modulp division to check of the number is prime or not\n i += 1\n else:\n n //= i\n factors.append(i) #append those numbers which readily divides the given number\n if n > 1:\n factors.append(n)\n return factors\nnumber=input(\"Enter the number for which the prime factors have to be found\");\na=prime_factors(number)\nprint a\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number for which the prime factors have to be found7007\n[7, 7, 11, 13]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 10: Page 263", "cell_type": "markdown", "metadata": {}}, {"execution_count": 24, "cell_type": "code", "source": "#To compute GCD\ndef gcd(a,b):#fuction computes gcd\n if b > a:\n return gcd(b,a)\n r = a%b\n if r == 0:\n return b\n return gcd(r,b)\nn1=input(\"Enter the first number\");\nn2=input(\"Enter the second number\");\nprint \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number24\nEnter the second number36\nGCD( 24 , 36 ) is 12\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 11: Page 263", "cell_type": "markdown", "metadata": {}}, {"execution_count": 25, "cell_type": "code", "source": "#To compute GCD\ndef gcd(a,b):#fuction computes gcd\n if b > a:\n return gcd(b,a)\n r = a%b\n if r == 0:\n return b\n return gcd(r,b)\nn1=input(\"Enter the first number\");\nn2=input(\"Enter the second number\");\nprint \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number17\nEnter the second number22\nGCD( 17 , 22 ) is 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 16: Page 268", "cell_type": "markdown", "metadata": {}}, {"execution_count": 26, "cell_type": "code", "source": "#to find gcd using euclidean algorithm\ndef gcd(a,b):#euclidean algithm definition\n x=a\n y=b\n while y!=0:\n r=x%y\n x=y\n y=r\n print \"gcd(\",a,\",\",b,\")is\",x\nnum1=input(\"Enter the first number\");\nnum2=input(\"Enter the second number\");\ngcd(num1,num2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number414\nEnter the second number662\ngcd( 414 , 662 )is 2\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 17: Page 270", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "#to find gcd using euclidean algorithm\ndef gcd(a,b):#euclidean algithm definition\n x=a\n y=b\n while y!=0:\n r=x%y\n x=y\n y=r\n print \"gcd(\",a,\",\",b,\")is\",x\nnum1=input(\"Enter the first number\");\nnum2=input(\"Enter the second number\");\ngcd(num1,num2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number252\nEnter the second number198\ngcd( 252 , 198 )is 18\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb new file mode 100755 index 00000000..2d1d9fff --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 01: Page 346", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "#to compute the recursive functions\ndef f(n):\n\n if n==0:\n return 3\n else:\n n=n-1\n result=2*f(n)+3 #recursive call\n return result\nfor num in range(1,5):\n r=f(num)\n print \"The value of f(\",num,\") is\",r #Prints the result for individual instance\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The value of f( 1 ) is 9\nThe value of f( 2 ) is 21\nThe value of f( 3 ) is 45\nThe value of f( 4 ) is 93\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01: Page 361", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#To compute the factorial of a given number using recursion\ndef factorial(n):\n if n==0:\n return 1\n else:\n return n*factorial(n-1) #recursive function call\nnum=input(\"Enter a number whose factorial is to be found\");\nprint \"The factorial of\",num,\"is\",factorial(num);\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter a number whose factorial is to be found4\nThe factorial of 4 is 24\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 361", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "#To compute power using recursive algorithm\ndef power(a,n):\n if n==0:\n return 1\n else:\n return a*power(a,n-1) #recursive call algorithm\nnum=input(\"Enter the number\");\np=input(\"Enter the power\");\nprint \"The value of\",num,\"to the power\",p,\"is\",power(num,p);\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number5\nEnter the power4\nThe value of 5 to the power 4 is 625\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 362", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "#To compute gcd using modular recursion\ndef gcd(a,b):\n if a==0:\n return b\n else:\n return gcd(b%a,a) #recursive call\n\nnum1=input(\"Enter the first number\")\nnum2=input(\"Enter the second number\")\nprint \"The gcd of\",num1,\",\",num2,\"is\",gcd(num1,num2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number5\nEnter the second number8\nThe gcd of 5 , 8 is 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 362", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "#To compute mpower function using recursion\ndef mpower(b,n,m):\n if n==0:\n return 1\n else:\n if n%2==0:\n return ((mpower(b,n/2,m))**2) % m #recursive call\n else:\n return ((mpower(b,n/2,m)**2)%m*(b%m))%m #recursive call\nnumber=input(\"Enter the number\")\npower=input(\"Enter the power\")\nmodulo=input(\"Enter the modulo number\");\nprint \"The answer of mpower(\",number,\",\",power,\",\",modulo,\") is\",mpower(number,power,modulo)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number2\nEnter the power5\nEnter the modulo number3\nThe answer of mpower( 2 , 5 , 3 ) is 2\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 09: Page 367", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "def msort2(x): #function for merge sort\n if len(x) < 2:\n return x\n result = [] \n mid = int(len(x)/2) #divides the elements into halves\n y = msort2(x[:mid])\n z = msort2(x[mid:])\n while (len(y) > 0) and (len(z) > 0):\n if y[0] > z[0]:\n result.append(z[0]) #merges to append the elements\n z.pop(0)\n else:\n result.append(y[0])\n y.pop(0)\n result += y\n result += z\n return result\nl=[]\nr=[]\nl=raw_input(\"enter the numbers to be merge sorted\").split(\",\")\nr=msort2(l)\nprint \"Ther Merge sort is\", r\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter the numbers to be merge sorted8,2,4,6,9,7,10,1,5,3\nTher Merge sort is ['1', '10', '2', '3', '4', '5', '6', '7', '8', '9']\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb new file mode 100755 index 00000000..72118ab0 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 01: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "n=2 #number of employees\nr=12 #number of office rooms\nways_alloc_sanchez=12\nways_alloc_patel=11\n\n#By PRODUCT RULE\nprint \"Total ways to assign offices to these employees is\",ways_alloc_sanchez*ways_alloc_patel\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Total ways to assign offices to these employees is 132\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "alphabets=26 #Total number of alphabets\nposint=100 #Total positive numbers not beyond 100\n\n#number of chairs to be labelled with a alphabet and an integer using product rule\nprint \"Total number of chairs that can be labelled with an alphabet and an integer is\",alphabets*posint\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Total number of chairs that can be labelled with an alphabet and an integer is 2600\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "mc=32 #total number of microcomputers\nport=24 #total number of ports in each microcomputer\n\n#total number of different ports to a microcomputer in the center are found using product rule\n\nprint \"total number of ports\",mc*port\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "total number of ports 768\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "bits=2 #possible bits either 0 or 1\nns=7 #number of bits in the string (ie). length of the string\n # 7 bits are capable of taking either 0 or 1 so by PRODUCT RULE\nprint \"Total different bit strings of lenth seven are\",bits**ns\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Total different bit strings of lenth seven are 128\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 387", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "letters=26 #number of letters in english alphabet\nno_of_letters=3 #number of letters \nchoices=10 #number of choices for each letter\nresult=1#in order to avoid junk values. Assigned it to 1.\nfor i in range(0,no_of_letters):\n result=result*letters*choices\nprint \"The total number of choices are\",result", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The total number of choices are 17576000\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01: Page 407", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "def permutation(n,r): #function definition\n \n i=n\n result=1\n for i in range((n-r)+1,n+1): #computing the permutation\n result=result*i\n \n return result\n\nprint \"The number of ways to select 3 students from a group of 5 students to line up for a picture is \",permutation(5,3) #function call\nprint \"The number of ways to select 5 students from a group of 5 students to line up for a picture is \",permutation(5,5) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The number of ways to select 3 students from a group of 5 students to line up for a picture is 60\nThe number of ways to select 5 students from a group of 5 students to line up for a picture is 120\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 409", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "def permutation(n,r): #function definition\n \n i=n\n result=1\n for i in range((n-r)+1,n+1): #permutation computation\n result=result*i\n return result\nnum=input(\"Enter the number of people\")\nperm=input(\"Enter the prizes\")\nprint \"The number of ways to decide the prize winners is\",permutation(num,perm) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of people100\nEnter the prizes3\nThe number of ways to decide the prize winners is 970200\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 409", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "def permutation(n,r):\n \n i=n\n result=1\n for i in range((n-r)+1,n+1):\n result=result*i\n \n return result\nnum=input(\"Enter the number of runners\")\nperm=input(\"Enter the number of prizes\")\nprint \"The number of ways to decide the prize winners is\",permutation(num,perm)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of runners8\nEnter the number of prizes3\nThe number of ways to decide the prize winners is 336\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 06: Page 409", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "def calc(n):\n \n i=n\n result=1\n for i in range(1,n): #find the number of ways to decide the path. since the first city us decided. The for loop is from 1 to n\n result=result*i\n \n return result\nnum=input(\"Enter the number of cities\") \nprint \"The number of possible ways to decide the path is\",calc(num)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of cities8\nThe number of possible ways to decide the path is 5040\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 10: Page 410", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "def combination(n,r): #combination function\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1):#computes the value of the numerator \n numerator=numerator*i\n for j in range (1,r+1): #computes the value of the denominator\n denominator=denominator*j\n result=numerator/denominator #computes result\n return result\nnum=input(\"Enter the number of elements\")\ncomb=input(\"Enter the combinations\")\nprint \"The number of combinations are \",combination(num,comb)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of elements4\nEnter the combinations2\nThe number of combinations are 6\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 12: Page 412", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "def combination(n,r): #function definition for combination\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1):\n numerator=numerator*i\n for j in range (1,r+1):\n denominator=denominator*j\n result=numerator/denominator\n return result\nnum=input(\"Enter the number of members in a team\")\ncomb=input(\"Enter the number of players\")\nprint \"The number of combinations are \",combination(num,comb) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of members in a team10\nEnter the number of players5\nThe number of combinations are 252\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 13: Page 412", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "def combination(n,r): #function definition\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1):\n numerator=numerator*i\n for j in range (1,r+1):\n denominator=denominator*j\n result=numerator/denominator\n return result\nnum=input(\"Enter the total number of astronauts\")\ncomb=input(\"Enter the number of astronauts to be selected \")\nprint \"The total number of combinations of selected astronauts to Mars are \",combination(num,comb) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the total number of astronauts30\nEnter the number of astronauts to be selected 6\nThe total number of combinations of selected astronauts to Mars are 593775\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 15: Page 413", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "def combination(n,r): #Function definition\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1): #computation of the numerator\n numerator=numerator*i\n for j in range (1,r+1): #computation of the denominator\n denominator=denominator*j\n result=numerator/denominator\n return result\nnum1=input(\"Enter the total number of faculty in computer science department\")\ncomb1=input(\"Enter the number of faculty to be selected for computer science department\")\nnum2=input(\"Enter the total number of faculty in maths department\")\ncomb2=input(\"Enter the number of faculty to be selected for maths department\")\n\nprint \"The total number of combinations of selected faculties are \",combination(num1,comb1)*combination(num2,comb2) #Function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the total number of faculty in computer science department9\nEnter the number of faculty to be selected for computer science department3\nEnter the total number of faculty in maths department11\nEnter the number of faculty to be selected for maths department4\nThe total number of combinations of selected faculties are 27720\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png new file mode 100755 index 00000000..c053a934 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png differ diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png new file mode 100755 index 00000000..06018c4c Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png differ diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png old mode 100644 new mode 100755 diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png new file mode 100755 index 00000000..88593253 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png differ diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png old mode 100644 new mode 100755 diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png old mode 100644 new mode 100755 diff --git a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter10-checkpoint.ipynb b/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter10-checkpoint.ipynb deleted file mode 100755 index de5013c9..00000000 --- a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter10-checkpoint.ipynb +++ /dev/null @@ -1,364 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10: Introduction to Power Electronics" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.5, Page number: 508" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from pylab import *\n", - "import numpy as np\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "w=2*pi*60 #frequency of voltage(Hz)\n", - "R=10 #ohm\n", - "C=0.01 #F\n", - "Vo=120*sqrt(2) #maximum voltage(V)\n", - "Nmax=800\n", - "tau=R*C #time constant(s)\n", - "\n", - "#Calculations:\n", - "# diode = 1 when rectifier bridge is conducting\n", - "\n", - "diode=1\n", - "t=[0]*801\n", - "vs=[0]*801\n", - "vrect=[0]*801\n", - "vR=[0]*801\n", - "iB=[0]*801\n", - "\n", - "t=[0]*801\n", - "for n in range(1,Nmax+2,1):\n", - " t[n-1] = (2.5*pi/w)*(n-1)/Nmax\n", - " vs[n-1]=Vo*math.cos(w*t[n-1])\n", - " vrect[n-1]=abs(vs[n-1])\n", - "#if the rectifier bridge is ON:\n", - " if diode==1:\n", - " vR[n-1]=vrect[n-1]\n", - " if (w*t[n-1])<=(pi/2):\n", - " iB[n-1]=vR[n-1]-Vo*C*w*math.sin(w*t[n-1])\n", - " elif (w*t[n-1])<=3*pi/2:\n", - " iB[n-1]=vR[n-1]/R+Vo*C*w*math.sin(w*t[n-1])\n", - " else:\n", - " iB[n-1]=vR[n-1]/R-Vo*C*w*math.sin(w*t[n-1])\n", - " if iB[n-1]<0:\n", - " diode=0\n", - " toff=t[n-1]\n", - " Voff=vrect[n-1]\n", - " else:\n", - " vR[n-1]=Voff*exp(-(t[n-1]-toff/tau))\n", - " iB[n-1]=0\n", - " if (vrect[n-1]-vR[n-1])>0:\n", - " diode=1\n", - "\n", - "\n", - "\n", - "#Results:\n", - "iR=(1/R)*np.array(vR)\n", - "plot(1000*np.array(t),vR)\n", - "xlabel('time [msec]')\n", - "ylabel('voltage [V]')\n", - "xlim(0,22)\n", - "ylim(0,180)\n", - "plot(1000*np.array(t),vrect,'--')\n", - "grid()\n", - "print \"The required plots are shown below:\"\n", - "show()\n", - "plot(1000*np.array(t),iR)\n", - "xlabel('time [msec]')\n", - "ylabel('source current [A]')\n", - "xlim(0 ,22)\n", - "ylim(-50,250) \n", - "plot(1000*np.array(t),1.5*np.array(iB),'--')\n", - "grid()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "The required plots are shown below:" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcFGf+B/DP0q0B6U1ArJQFBFFR7IViL7FEc4hJvBhj\n1JiYX3I5TLnYgkajJiZGyemZaJSLBSXGsooVpCjYFVCWoiCCCFL3+f3hsRGVsrAzz7O7z/v18nXO\nssx8/N5kvzvPzDwjIYQQcBzHcTpJj3YAjuM4jh7eBDiO43QYbwIcx3E6jDcBjuM4HcabAMdxnA7j\nTYDjOE6HCdYEwsPDYW1tDU9PT+Vrp0+fhre3Nzw8PODl5YUzZ84of7Zs2TK4ubnB09MThw8fFioW\nx3Ec9wzBmsCsWbMQGxtb57UlS5ZgxYoVSEtLw/Lly7FkyRIAQGJiIqKjo5GamorY2FjMmTMHlZWV\nQkXjOI7j/kewJhAYGAgzM7M6rzk6OqK4uBgAUFRUBCcnJwBATEwMpk6dCn19fdjb28Pd3R3x8fFC\nReM4juP+x0DMjS1fvhz9+/fH4sWLoVAocPbsWQBAdnY2hgwZonyfg4MD5HK5mNE4juN0kqgnhmfP\nno1169bh7t27WLNmDcLDw8XcPMdxHPccUY8Ezp07hyNHjgAAJk2ahFmzZgF4+s0/KytL+T65XA5H\nR8cXft/e3h45OTnihOU4jtMSXl5eSElJeenPRD0ScHJywokTJwAAx44dg4uLCwAgJCQEO3fuRHV1\nNeRyOdLS0uDv7//C7+fk5IAQwv+o8CciIoJ6BnX98fcnOHeO14ulP7xemlGvixcv1vu5LNiRwLRp\n03DixAkUFBTA0dERn3/+OX788UfMnTsXVVVVMDY2xk8//QQA8PX1xfjx4yGVSqGnp4dNmzbB0NBQ\nqGg6JTMzk3YEtamsBIyMhN2GNtVLDLxeqmGxXoI1gV9++eWlr9d3SPLxxx/j448/FioO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aEELJw4UKyatUqQgghAQEB5ObN\nm4QQQs6dO0f69ev3wnaWLl1Kvv76a+VyREQEGTBgAFEoFOTixYukVatW5PDhw4QQQsaPH09+++03\ncu/ePeLu7q78ncePHyt/furUKUIIIXfu3CGurq6EEELmz59PFi9erHx/cXGx8u+DBg0iiYmJzS0T\nxxFCCDGg3YQ4Tt1II9NhDR48GCYmJjAxMYGpqalyJkdPT0+kpKTgwYMHSEpKqnMe4cmTJ41uVyKR\nICgoCBKJBB4eHlAoFBg+fLhy3VlZWTA3N4ehoSFmz56NkJAQjB49GgBw5MgRZGRkKNdVUVGBR48e\n4ejRo9i7d6/ydVbnpOc0F28CnM4xNjZW/l1PT0+5rKenB4VCAUIILC0tkZycrPK6jYyMlOsyNDSs\nsx2FQgF9fX2cP38eR48exZ49e7BhwwYcO3YMEokECQkJMDB48T/Jxpoax7UEPyfAaZ1WrVopn6eg\nitoPWwsLC1haWuLAgQPK1+s7J6Cq0tJSlJSUIDg4GJGRkUhKSgIADBs2DN9//73yfbXbGz58ODZt\n2qR8/dGjR2rJwXG1eBPgtI61tTW8vb3h5uaGJUuWKJ9+BaDO32uXn/177fLOnTsRGRkJqVQKDw+P\nJp+QrW/dtcuPHj1CUFAQfHx8EBgYiDVr1gAAvv/+e/z555/w9PSEh4cH1q5dCwD44osvcPfuXbi5\nucHb2xtHjx5tRkU4rn78eQIc10yfffYZ2rZti/fff5/K9gcPHozIyEj07NmTyvY57cCPBDiumdq2\nbYsffviB2s1iGRkZdc47cFxz8CMBjuM4HcaPBDiO43QYbwIcx3E6jDcBjuM4HcabAMdxnA7jTYDj\nOE6H/T8o9Q6nwzgdWAAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEPCAYAAACgFqixAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVOW+P/DPDHJTGLz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lMrLYRA5TV5eXoNP5MrNzbVtv/XWW+I3v/mNuHbtmiguLhYGg0Fs2rRJCCHE0qVLxerV\nq4UQQgwfPlycPXtWCCHE4cOHxZ133tnodVJSUsRrr71m2162bJkYNWqUsFgs4quvvhL+/v5i9+7d\nQgghpk6dKrZv3y4KCwtFRESE7Tnl5eW2+w8ePCiEEOKnn34SYWFhQgghFi9eLJKTk22PLy0ttX0/\nevRocezYsdbGRCSEEKKD2s2IyFlEC8tuxcfHw8/PD35+fujcubNt5cioqCjk5OTg0qVLOH78eIPz\nDNeuXWvxdXU6He69917odDpERkbCYrFg7Nixtn3n5+ejW7du8Pb2xiOPPIKEhAT8+7//OwDgs88+\nQ25urm1f1dXVuHr1Kvbs2YMPP/zQdrusa+KTdrEZkMfy9fW1fa/X623ber0eFosFQgh0794dJ06c\nULxvHx8f2768vb0bvI7FYoGXlxeOHDmCPXv24P3338eGDRuwd+9e6HQ6HD16FB06NP6v2VJzI2oL\nnjMgt+Xv72/7PAclrG+6wcHB6N69Oz7++GPb7c2dM1CqoqICZWVlmDBhAtasWYPjx48DAO655x68\n+eabtsdZX2/s2LHYuHGj7farV6+2Sx1EVmwG5LZ69uyJ2NhYhIeH45lnnrF9GheABt9bt6//3rqd\nlpaGNWvWIDo6GpGRkQ6fuG1u39btq1ev4t5770VcXBxGjhyJ119/HQDw5ptv4tNPP0VUVBQiIyOx\nbt06AMDLL7+Mn3/+GeHh4YiNjcWePXtakQhR8/h5BkRttHz5cgQEBOD3v/+9Kq8fHx+PNWvWYNCg\nQaq8PrkHHhkQtVFAQAD++te/qjbpLDc3t8F5CaLW4JEBERHxyICIiNgMiIgIbAZERAQ2AyIiApsB\nEREB+P84YbaUtpWtuAAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.6, Page number: 522" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "w=2*pi*60 #Angular freq of voltage(rad/sec)\n", - "Vo=230*sqrt(2) #volt\n", - "R=5.6 #Resistance(ohm)\n", - "\n", - "#Calculations:\n", - "Ls=[0]*101\n", - "tc=[0]*101\n", - "Idc=[0]*101\n", - "for n in range(1,101,1):\n", - " Ls[n-1]=n*10**-3\n", - " Idc[n-1]=2*Vo/(pi*R+2*w*Ls[n-1])\n", - " tc[n-1]=(1/w)*acos(1-(2*Idc[n-1]*w*Ls[n-1])/Vo)\n", - "\n", - "#Results:\n", - "plot(1000*np.array(Ls),Idc,'g.')\n", - "xlabel('Commutating inductance Ls [mH]')\n", - "ylabel('Idc [A]')\n", - "title('Load current,Idc vs Commutating inductance,Ls')\n", - "show()\n", - "plot(1000*np.array(Ls),1000*np.array(tc),'g.')\n", - "xlabel('Commutating inductance L [mH]')\n", - "ylabel('tc [msec]')\n", - "title('Commutating Inductance,Ls vs time,tc')\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['fmod', 'sinh', 'trunc', 'tan', 'gamma', 'cosh', 'radians', 'modf', 'expm1', 'ldexp', 'linalg', 'random', 'frexp', 'ceil', 'isnan', 'copysign', 'cos', 'degrees', 'tanh', 'fabs', 'sqrt', 'hypot', 'power', 'log', 'log10', 'info', 'log1p', 'floor', 'fft', 'pi', 'exp', 'isinf', 'e', 'sin']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVOX+B/DPIKAog8CwC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SYHF8fDx69eqFoKAgdO/eXePzNFGPbf78+fj222/h7++PlJQU2Nvbo127dnVuoyn+\nqvtr1qzBlClT0LdvX9y6dUt6fNCgQXB0dES3bt3wwgsvoFevXgAAe3t7LF++HEOGDEFAQIDUdTV0\n6FAkJSXB398f+/btw5tvvoknnngCDz30EBQKhVSupvoPCAjAnDlz0K9fPwQEBOD5558HAHzyySfY\nsWMHfH194ePjgw8++KDO49y5cyecnZ3h7OyMLl264MSJE1KMQUFBWLp0qca6bWyd3W070j88/TW1\nWmVlZTA2NoaRkREOHDiAp556Cr/++quuw2px4uPjYW5ujjlz5jRpuRkZGRg6dChOnjzZpOXSvTPW\ndQBE2nLhwgWMGTNG+kX/6aef6jqkFsnc3BwrV67E9evXG70WQZPU1FQ899xzsLW1bZLyqGmwhUBE\nRAA4hkBERHcwIRAREQAmBCIiuoMJgYiIADAhEBHRHUwIREQEAPh//r/1KyU0gnEAAAAASUVORK5C\nYII=\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUVEe+B/BvsxiRZlcQBEVxAQQB1+iAdkaMijqJC24x\nER0fGY1mRo3RIRpRRx2XxKcvzyROHM2iSYw5ZqIG4opx17gvmbhEHNC4gRCQHX7vDx5XQGgaoemG\n+/2cw7Fv9+2q6mr8dlH33mqNiAiIiEg1LEzdACIiqlsMfiIilWHwExGpDIOfiEhlGPxERCrD4Cci\nUhkGP9Wa//znP7Czs4O5nSGckJAALy8vUzdDdQ4ePAhfX19TN4MqwOA3gs2bN6Nr166wt7eHk5MT\nwsPDsX//flM3S6/ExERYWFigqKjI4Od4e3tj3759ynbLli2RkZEBjUZT6+2LiorCvHnzar3c6tDp\ndFi/fr1J21CeOX2oWVhY4JdfflG2w8LC8O9//9skdZN+DP5a9u677+KNN97Aki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6PR4OTJkzhz5gzOnDmD\npKSkWgl9AGXe98re3/Kq2+9kOgz+Bur555/HnTt3sGnTJuW+Cxcu4NChQwgLC8NXX30FEUFqair2\n7duHnj171vp/XBcXF/z73/+GiOCbb75RwtTGxkaZRweAvLw8uLq6orCwEJs2bap0P0P06tVLOQ6w\nd+9ePHz48Kna3rRpUzRp0gTHjh0DAHz55ZfKY56enjh79ixEBLdu3cKJEyeg0WgQFhaGffv2Kd9+\nVPJl2DY2NsjKylKen5OTg+bNmwOAcnwFqDg4NRoN+vbtiy1btiA9PR0AlH/Dw8PxwQcfKPuWHOcg\nqgqDv4GytLREfHw8vv32WwQEBCAoKAhvvPEG3NzcMGrUKPj4+MDf3x+hoaFYunQpPDw8oNFoKh1h\nl3+sstulLV26FP3790dYWBjc3d2V+0eNGoWFCxcqB20XLFiALl26ICwsTJkyqmi/ypRu26JFi7Bt\n2zYEBwdjy5YtcHNzQ+PGjSt8TmXtL9nesGEDJk6ciO7du6OgoEC5/7nnnoOHhwc6dOiAP//5z8q0\nlpubG9auXYsBAwYgJCQEkZGRAIAhQ4Zg8+bNCA4OxqFDhzBv3jwMHToUPXr0gIuLi1JuZf0fEhKC\nmTNn4tlnn0VISAhef/11AMAHH3yA3bt3IzAwEAEBAVizZk2Fr3Pv3r3w8vJSfo4fP15pX+rrW319\nWNW+ZF64LDM1KHl5ebCysoKFhQWOHj2KSZMm4dKlS6Zulll77rnnsHLlyiqPy1TXxo0bcerUKfzP\n//xPrZZLNccRPzUoN2/eRJcuXRAYGIhXX30VH330kambZPacnZ0RFRVV7Qu49Fm1ahX+/ve/w8HB\nodbKpNrDET8RkcpwxE9EpDIMfiIilWHwExGpDIOfiEhlGPxERCrD4CciUpn/A229Zlz8j32nAAAA\nAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.7, Page number: 528" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "R=12.5*10**-3 #ohm\n", - "L=1.2 #H\n", - "Vo=15 #volt\n", - "w=120*pi #angular freq(Hz)\n", - "Idc=35 #DC current(A)\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "theta=[0]*1301\n", - "t=[0]*1301\n", - "vL=[0]*1301\n", - "vs=[0]*1301\n", - "\n", - "Vdc_a=R*Idc #Dc voltage(V)\n", - "P=Vdc_a*Idc #Power\n", - "alpha_da = acos(pi*R*Idc/(2*Vo)) ; #delay angle\n", - "for n in range(1,1301,1): #loop for calculating load voltage\n", - " theta[n-1]=2*pi*(n-1)/1000\n", - " t[n-1]=theta[n-1]/w\n", - " vs[n-1]=Vo*sin(theta[n-1])\n", - " if theta[n-1]" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part (a):\n", - "\n", - " Vdc_a= 437.5 mV\n", - "\n", - " Power= 15.0 W\n", - "\n", - " alpha_d= 87.4 degrees\n", - "\n", - " part (b):\n", - "\n", - " alpha_d= 162.0 degrees\n", - "\n", - " Vdc_b= -9.1 V\n", - "\n", - " Current will reach zero at 4.5 sec\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEPCAYAAAC3NDh4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8U2W+P/BP0oUWC54utEhb0lrASGnayiIDBYpQgSqo\nMy5sKsv9FeaqgIrDeGfmZQszI4zyErxFwY3eO6gjXJaZsnQEtRUGQehCUe6tLC1SEChd2Fra0J7f\nHzUnOSdJ0ywnZ/u+Xy9e5jltkofHQ755nu+z6FiWZUEIIYQ4oJe6AoQQQuSLggQhhBCnKEgQQghx\nioIEIYQQpyhIEEIIcYqCBCGEEKckDRLz5s1DTEwMUlJSuGu5ubmIi4tDeno60tPTUVRUJGENC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VQ+fZ6e60n4a22EI3T+tbRonQTRBKkSoEolHGpK75suWV3o/GvloSCh\ncFocbxUOOe2r3oezTWc12RbO2LaFcKipZ3BPP9eGT7hm4uiFo6K+H90X3qEgQRRH+G2UVvB2zfZw\noQBdAAoeLZCuMoDddhxNrU2UV5IxChIKp9U54MJvo4MiB2m2LRyxtIXwcKEHEh6Qxfh/eIg1L9HW\n3ibqkBPdF96hIEEUycAYeNt0lJwtoZ1hHRCujdj85GYJa2NVvqCcV953Zh/1JmSKgoTCaXm8Vbhp\n3NBXh0pYG3mx3Be2vYiI0AhZ9CIA++3fxVwzoeV/I75AQYIolnDIidZM8Am34fDXjq/dRWsmlIHW\nSRBFE66ZyB6QjV2zdklYI/mwXRuhhx71y+pl05MA7NdMBOuDcemVS7Kqo9rQOgmiOV1t06FlctiG\nwxWptukg7qEgoXBaH2/lrZmopiEni//a8V+8slTbcLjijyEnrf8b8RYFCaJotDOsY23tbdzjiNAI\n \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter3-checkpoint.ipynb b/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter3-checkpoint.ipynb deleted file mode 100755 index 22fca9a1..00000000 --- a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter3-checkpoint.ipynb +++ /dev/null @@ -1,460 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Electromechanical-Energy-Conversion-Principles " - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.1, Page number: 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "I=10 #current in the coil(A)\n", - "Bo=0.02 #magnetic field (T)\n", - "R=0.05 #radius of the rotor(m)\n", - "l=0.3 #rotor length(m)\n", - "\n", - "\n", - "#Calculations:\n", - "q=symbols('q') #Direction of torque\n", - "F1=-2*I*l*Bo*sin(q) #Force on the coil(N)\n", - "T=F1*R #Torque scting in theta direction(Nm)\n", - "\n", - "\n", - "#Results:\n", - "print \"Force per unit length:\",T,\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Force per unit length: -0.006*sin(q) Nm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.2, Page number: 121" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration\n", - "N=1000 #No of winding turns\n", - "g=2 #Air gap width(mm)\n", - "d=0.15 #Magnetic core width,d (m)\n", - "l=0.1 #thickness of core(0.1)\n", - "x,d=symbols('x d') #where h is height of plunger(m) \n", - " #Lx is inductance as a function of x(H)\n", - "i=10 #Current in the winding(A)\n", - "uo=4*3.14*10**-7 #permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "Lx=(uo*N**2*l*d)/(2*g*10**-3)*(1-x/d)\n", - "Wfld=(1./2)*Lx*i**2\n", - "\n", - "\n", - "#Results:\n", - "print \"The magnetic energy stored, Wfld:\",\"236*(1-x/d) J\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnetic energy stored, Wfld: 236*(1-x/d) J\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.3, Page number: 124" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "import numpy as np\n", - "\n", - "#Variable declaration:\n", - "xdata=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0] #(cm)\n", - "Ldata=[2.8, 2.26, 1.78, 1.52, 1.34, 1.26, 1.20, 1.16, 1.13, 1.11, 1.10] #(mH)\n", - "I = 0.75 #(A)\n", - "\n", - "\n", - "#Calculations:\n", - "x=0.01*np.array(xdata)\n", - "L=0.001*np.array(Ldata)\n", - "length=len(x)\n", - "xmax=x[length-1]\n", - "a=polyfit(x,L,4)\n", - "xfit=[0]*102\n", - "Lfit=[0]*102\n", - "for n in range(1,102,1):\n", - " xfit[n-1]=xmax*(n-1)/100\n", - " Lfit[n-1]=a[0]*xfit[n-1]**4+a[1]*xfit[n-1]**3+a[2]*xfit[n-1]**2+a[3]*xfit[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(xdata,Ldata,'o')\n", - "plot(100*np.array(xfit),1000*np.array(Lfit),'g.')\n", - "xlabel('x [cm] ')\n", - "ylabel('L [mH] ')\n", - "title('Inductance,L vs length,l')\n", - "grid()\n", - "print \"The required plots are shown below:\"\n", - "show()\n", - "\n", - "#set current to 0.75 A\n", - "I=0.75\n", - "F=[0]*102\n", - "for n in range(1,102,1):\n", - " xfit[n-1]=0.002+0.016*(n-1)/100\n", - " F[n-1]=4*a[0]*xfit[n-1]**3+3*a[1]*xfit[n-1]**2+2*a[2]*xfit[n-1]**1+a[3]\n", - " F[n-1]=(I**2/2)*F[n-1]\n", - "plot(100*np.array(xfit),F,'b.')\n", - "xlabel('x [cm]')\n", - "ylabel('Force [N]')\n", - "title('Force, F vs length,l')\n", - "grid()\n", - "\n", - "#Results:\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "The required plots are shown below:" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['Polygon', 'poly', 'sign', 'flatten', 'conjugate', 'diff', 'tan', 'Circle', 'roots', 'plot', 'eye', 'trace', 'floor', 'diag', 'invert', 'nan', 'sqrt', 'source', 'add', 'zeros', 'take', 'var', 'pi', 'plotting', 'product', 'seterr', 'power', 'multinomial', 'transpose', 'test', 'beta', 'ones', 'sinh', 'vectorize', 'cosh', 'trunc', 'cos', 'prod', 'tanh', 'mod', 'det', 'sin', 'binomial', 'solve', 'log', 'exp', 'reshape', 'gamma', 'interactive']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1YVHX+N/D3gA5ggIMPYAKFmWk8KSP+6jZEvNhEIYMW\nWRNDIV1Y+612WZvdJT50ZbXZuura1i23pq2Bm+G1rYYPkDFoZqmAqHlvFokw+jPFQB5iEGLuP4hp\nhuFhGL7DnJl5v67LaznMmcOXz57mw/fz+Z5zZFqtVgsiIqJfOFl7AEREJC1MDEREZICJgYiIDDAx\nEBGRASYGIiIywMRAREQGmBjI4tatW4eUlBRrD8MupKamYvXq1Vb52QEBATh69KhJ+/L/c9vGxEAm\n6cuHQmcymUzIGJycnPD9998LOZYoA/0BKJPJhMWzJ10loL787IEYI1kOEwOZZKA+kHojtesxrRET\nqcWgK7YwRuoeEwP12a5duxAREYEXXngBw4cPh6+vL/7973/rXv/mm28wZcoUeHp6YubMmaiurta9\nplKp4O/vb3A8/dlIa2srVq1aBV9fX3h4eECpVEKtViMyMhIAMHHiRHh4eOCjjz5CbW0tYmJiMGLE\nCHh4eOA3v/kNrly5ojtuVFQU1qxZg2nTpsHd3R2RkZG4efOm7vX8/HwolUp4eHjA19cX7733HgCg\nqakJS5cuhbe3N7y8vLBo0SI0NTV1GQtTPwCXLl2KF154weB78fHx2Lx5M4D2mYePjw88PDwwbtw4\nk2dnH374ISZMmABPT08olUqcPn1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bQgMDERYWJju\nfvepqal45plnEBERgbFjx0KlUiEtLQ0TJkxAcnKypX8VIiEkc68kImuZMmUKHn/8cWRmZqKpqQkp\nKSkIDAzs8T0lJSXYuHEjzpw5A09PT9TV1QFov51xXV0dPv/8c+zfvx+PP/44Tp06hfHjx2PKlCk4\nc+YMwsPDB+LXIjIbEwMRgDVr1iA8PBxubm7YunVrr/sfPXoU8+bNg6enJwDo/hcA4uLiAADBwcEY\nNWoUJkyYAAAICgpCVVUVEwNJHktJRGi/1XNjYyMaGhrQ1NTU6/4ymazbx0/K5XIAgJOTE1xcXHTf\nd3JyQltbm5gBE1kQEwMR2m9PvH79eiQnJ+PFF1/sdf/o6Gjs3bsXt2/fBgDd/xLZA5aSyOH94x//\ngIuLC5588km0tbVh6tSpUKlUiIqK6vY9YWFheP755/Hwww/D1dUVoaGheP/99wEYPjax86ojrkIi\nW8DnMRCZoKKiAnPmzMH58+eFHXPGjBnYuHGjsGsjiERhKYnIBIMGDcLt27eFXuB2+fJlDB48WMjx\niETijIGIiAxwxkBERAaYGIiIyAATAxERGWBiICIiA0wMRERk4P8Dh4QQJ+0nzZ8AAAAASUVORK5C\nYII=\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEZCAYAAACw69OmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9YVHW+B/D3CCoa2iiEGEOi3J6b/BJIumqa7BrRDNtq\nsS7pyoZ50Ut7+x2P6yMbuQutkJtpezO9t5UnUbsT3d1KZFrdmLAs7QpKVFfXX8WACIioFeAo3/sH\nOyPjDDIMZ+acGd6v5+GR75nvzHzn43nmw/l+zvcclRBCgIiIaJCGyT0AIiLyDUwoREQkCSYUIiKS\nBBMKERFJggmFiIgkwYRCRESSYEIh8hLDhg3DyZMnPf6+RqMR4eHhTvePiIjA3/72NzeOiJSKCYUU\nKyIiAqNHj8aYM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9ixQqkp6ejsrIS0dHRGDlyJLZu3Srz\nqJXLmXju3LkTW7ZsAQCMGDECO3bswLBhXv+3iVssWrQIH330EVpbWxEeHo41a9bAbDYD4L45UP3F\nkvvlwHzyyScoLS1FXFwcEhISAAAvvvgivv32WwCu7Z9c2EhERJJg+iYiIkkwoRARkSSYUIiISBJM\nKEREJAkmFCIikgQTChERSYIJhYiIJMGEQuQBfn5+SExMxJkzZwb9Wr/4xS8QFBSEd955R4KREUnH\n61fKE3mD0aNHo7q6WpLX2r59O5YuXcqLSJLi8AiFaIA+//xzTJs2DV1dXfj+++8RExODr776akCv\n8Ze//MV6yYt58+YBAF544QU88sgj+NGPfoSIiAj8z//8D5577jnExcVh3rx56OrqsnkNXuSClIZH\nKEQDlJSUhJ/+9KfIy8tDR0cHMjMzERUV5fTzz5w5g5ycHPzv//4vwsLCcPHiRetjp0+fhtFoxBdf\nfIEZM2bg3Xffxbp16/DQQw/h/fffx89+9jN3fCQiSTChELng+eefx/Tp0zFq1Ci8+uqrA3ruxx9/\njHvvvdd61daxY8cC6LnPxP333w+VSoWYmBh0d3cjJSUFABAbG2tzGXEiJeKUF5ELWltb8f333+O7\n775DR0fHgJ6rUqn6nK4aMWIEAGDYsGEYPny4dfuwYcPQ3d3t+oCJPIAJhcgFK1asQEFBARYvXoyV\nK1cO6LmzZ8/Ghx9+aL2Vant7uzuGSORxnPIiGqA333wTI0eOxMMPP4zu7m7MmjULRqMRycnJTj0/\nNDQUr732Gu6//34MHz4cwcHB2LNnDwDb26tefxYXz+oipeP9UIg8YMyYMbh06ZJkr5eVlYUHHngA\n6enpkr0m0WBxyovIA8aOHSvpwsZ9+/Zh1KhREoyMSDo8QiEiIknwCIWIiCTBhEJERJJgQiEiIkkw\noRARkSSYUIiISBL/D5upbph/P2HSAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.4, Page number: 128" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Lo=10.6*10**-3 #Initial inductance(H)\n", - "L2=2.7*10**-3 #H\n", - "\n", - "\n", - "#Calculations:\n", - "theta,i=symbols('theta i')\n", - "L=Lo+L2*cos(2*theta)\n", - "i=2 #Coil current,A\n", - "def T(theta):\n", - " return i**2*diff(L,theta)/2\n", - " \n", - "\n", - "#Results:\n", - "print \"Torque,Tfld =\",T(theta),\" N.m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Torque,Tfld = -0.0108*sin(2*theta) N.m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.6, Page number: 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "r1=2.5*10**-2 #radius of rotor(m)\n", - "h=1.8*10**-2 #Axial length(m)\n", - "g=3*10**-3 #Air gap length(m)\n", - "Bag=1.65 #Magnetic field(T)\n", - "uo=4*pi*10**-7 #permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "H=Bag/uo\n", - "Ni=2*g*H\n", - "T=uo*(Ni)**2*h*(r1+0.5*g)/(4*g)\n", - "\n", - "#Results:\n", - "print \"The maximum torque:\", round(T,2),\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum torque: 3.1 Nm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.7, Page number: 140" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from matplotlib import *\n", - "\n", - "#Variable declaration:\n", - "i1=0.8\n", - "i2=0.01\n", - "\n", - "\n", - "#Calculations & Results:\n", - "def df(f,x,h=0.1e-10):\n", - " return ( f(x+h/2) - f(x-h/2) )/h\n", - "\n", - "\n", - "\n", - "def l11(x):\n", - " return (3+cos(2*x))/1000.0\n", - "\n", - "def l12(x):\n", - " return (0.3*cos(x))\n", - "\n", - "def l22(x):\n", - " return (30+10*cos(2*x))\n", - "\n", - "def g(x):\n", - " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x) + (i1*i2)*df(l12,x)\n", - "\n", - "def r(x):\n", - " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x)\n", - "def s(x):\n", - " return (i1*i2)*df(l12,x)\n", - "\n", - "x=linspace(-pi,pi,100000)\n", - "\n", - "\n", - "plot(x,r(x))\n", - "plot(x,s(x))\n", - "plot(x,g(x))\n", - "grid()\n", - "annotate(\"Total torque\",xy=(-0.5,0.003))\n", - "annotate(\"Reluctance torque\",xy=(-2,-0.0015))\n", - "annotate(\"Mutual Interaction torque\",xy=(1.6,-0.0026))\n", - "xlabel(\"Theta [radians]\")\n", - "ylabel(\"Torque [N.m]\")\n", - "xlim(-pi,pi)\n", - "\n", - "\n", - "#Results\n", - "print \"Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)\"\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['vectorize', 'prod', 'plotting', 'Circle', 'diag', 'sinh', 'trunc', 'plot', 'eye', 'det', 'tan', 'product', 'gamma', 'roots', 'sin', 'zeros', 'cosh', 'interactive', 'conjugate', 'take', 'trace', 'beta', 'exp', 'ones', 'multinomial', 'cos', 'transpose', 'solve', 'diff', 'invert', 'pi', 'tanh', 'Polygon', 'reshape', 'sqrt', 'floor', 'source', 'add', 'poly', 'mod', 'sign', 'power', 'binomial', 'log', 'var', 'seterr', 'flatten', 'nan', 'test']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAcAAAAEPCAYAAADVmxQSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYFOcTx7+AvUfBioolFo4udiVgxII9UbFG0diVqCnm\np0aNLRE1doMt2CMIKipIROUUGypFBWtEkQMLiJ12cPP745UL6B0ccHe7LPt5Hh7dvbfM3O7t7Ftm\nxoCICCIiIiIiIqUMQ64FEBERERER4QLRAIqIiIiIlEpEAygiIiIiUioRDaCIiIiISKlENIAiIiIi\nIqUS0QCKiIiIiJRKODWAQUFBsLS0hLm5OVasWKGyjLu7OyQSCezs7BAZGalx3dWrV8PQ0BApKSk6\nk19EREREpOTCmQHMyMjAlClTEBQUhBs3bsDX1zePgQMAPz8/PH78GDExMdixYwfc3Nw0qhsfH4/g\n4GA0btxYrzqJiIiIiJQcODOAYWFhkEgkaNCgAcqUKQNXV1cEBATkKRMYGIjRo0cDAGxtbZGVlQWZ\nTFZg3dmzZ8PDw0Ov+oiIiIiIlCw4M4AymQwNGzZUHpuamkImk2lUJiEhQW1df39/mJqawsrKSsca\niIiIiIiUZMpw1bGBgYFG5TSJ1JZTJi0tDcuXL0dwcHCh6ouIiIiIlD44M4CmpqaIj49XHsfHx+cZ\n1eUu0759ewD/jQjlcnmeujnnHzx4gEePHsHa2lp5vk2bNrhy5Qpq166dp+3mzZvjwYMHulJPRERE\nRHBYW1sjKiqKazG0B3FEWloaNW7cmGQyGWVmZpK9vT2Fh4fnKePr60sDBw4kIqLw8HCysrLSuC4R\nkZmZGb148UJl//mpvnDhwiJqxV+EqBORMPUSdSo5CFGv/HTi0GToBM5GgBUqVMCff/6Jn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QkJFQqW1paCiMjI7Rv3x53797VaIuo7Oxs2NnZISgoCI6OjsjIyKhX3IQ0FdQA\nEvJUxR5cxd8rvo6KisKqVasglUohFovVDdGkSZOwdOlS9SCY0NBQODg4wMXFBdbW1pXOp0kMfn5+\n2LRpExwcHJCRkQEjIyN1Xd27d4eVlRWmTZuGAQMGVDqPVCqFRCJBnz594O3tDWdn51rrXLlyJaRS\nKWQyGVq2bAlPT0+NYiakqaL9AAnhSWhoKIyMjPDxxx/zHUqtjI2NaVQoERzqARLCEyMjI2zcuLHB\nE+F16dlE+K5du/IdCiFaRz1AQgghzRL1AAkhhDRL1AASQghplqgBJIQQ0ixRA0gIIaRZogaQEEJI\ns/T/jVWB3070t1UAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.9, Page number: 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "W=4.0*10**-2 #width of plunger lower arm(m)\n", - "W1=4.5*10**-2 #width of plunger upper arm(m)\n", - "D=3.5*10**-2 #depth of plunger (m)\n", - "d=8*10**-3 #length of magnet(m)\n", - "go=1*10**-3 #air gap length(m)\n", - "uo=4*pi*10**-7 #Permeability of free space(A.turns/m)\n", - "ur=1.06*uo #Relativity permeability\n", - "Hc1=-940 #Magnetising force(kA/m)\n", - "Bt=1.25 #Magnetic field induction(T)\n", - "N=1500 #No of turns\n", - "x=3*10**-3 #Position of plunger(m)\n", - "\n", - "#Calculation:\n", - "Ni=-Hc1*d*10**3\n", - "Rx=x/(uo*W1*D)\n", - "Ro=go/(uo*W*D)\n", - "Rm=d/(ur*W*D)\n", - "f=-((Ni)**2)/(uo*W1*D*(Rx+Ro+Rm)**2)\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"The x-directed force:\",round(f,1),\"N\"\n", - "print \"Current in the excitation winding:\",round(Ni/N,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The x-directed force: -703.3 N\n", - "Current in the excitation winding: 5.01 A\n" - ] - } - ], - "prompt_number": 31 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter5-checkpoint.ipynb b/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter5-checkpoint.ipynb deleted file mode 100755 index 3f99f735..00000000 --- a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter5-checkpoint.ipynb +++ /dev/null @@ -1,609 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5: Synchronous Machines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.1, Page number: 254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import cmath\n", - "\n", - "#Varaible Declaration:\n", - "pf=0.95 #Lagging power factor\n", - "Vl=460 #Terminal voltage(V)\n", - "I=120 #Terminal current(A)\n", - "If=47 #Field current(A)\n", - "X=1.68j #Line syncchronous reactance(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "#Choosing motor reference direction:\n", - "Va=Vl/math.sqrt(3)\n", - "theta=math.acos(0.95)\n", - "Ia=I*cmath.exp(-theta*1j)\n", - "Eaf=Va-X*Ia\n", - "wc=120*math.pi\n", - "Laf=math.sqrt(2)*abs(Eaf)/(wc*If)\n", - "P=3*Va*Ia*pf\n", - "\n", - "#Results:\n", - "print \"Generated emf:\",round(abs(Eaf),1),\"V line to line\"\n", - "print \"Fied to armature mutual inductance:\",round(Laf*1000,1),\"mH\"\n", - "print \"Three phase power:\",round(abs(P/1000),1),\"kW or\",round(abs(P)/746),\"hp\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Generated emf: 278.8 V line to line\n", - "Fied to armature mutual inductance: 22.3 mH\n", - "Three phase power: 90.8 kW or 122.0 hp\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.2, Page number: 255" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath \n", - "from math import *\n", - "\n", - "#Variable Declaration:\n", - "Pin=90.6*10**3 #Input power(kW)\n", - "Va=265.6 #Terninal voltage(V)\n", - "X=1.68j #Synchronous reactance(ohm)\n", - "Laf=22.3*10**-3 #Mutual inductance(H)\n", - "wc=120*pi #Angular frequency(rad/sec)\n", - "\n", - "\n", - "#Calculations:\n", - "Ia=Pin/(3*Va)\n", - "Eaf=Va-X*Ia\n", - "delta=degrees(cmath.phase(Eaf))\n", - "I=sqrt(2)*Eaf/(wc*Laf)\n", - "\n", - "\n", - "#Results:\n", - "print\"The phase angle,delta:\",round(delta,1),\"degrees\"\n", - "print\"Required field current:\",round(abs(I),2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The phase angle,delta: -35.7 degrees\n", - "Required field current: 55.04 A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.3, Page number: 257" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Eafl=13.8*10**3 #Open circuit voltage(V)\n", - "If1=318 #Field current(A)\n", - "If2=263 #Field current after extrapolation(A)\n", - "wc=120*pi #Angular frequency(Hz)\n", - "\n", - "#Calculations:\n", - "Eaf=Eafl/sqrt(3)\n", - "La1=sqrt(2)*Eaf/(wc*If1)\n", - "La2=sqrt(2)*Eaf/(wc*If2)\n", - "\n", - "#Results:\n", - "print \"Saturated Laf1:\",round(La1*1000,0),\"mH\" \n", - "print \"Unsaturated Laf1:\",round(La2*1000,0),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Saturated Laf1: 94.0 mH\n", - "Unsaturated Laf1: 114.0 mH\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.4, Page number: 262" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Ia=[118, 152] #Armature current from SC Characteristics(A)\n", - "If=[2.20, 2.84] #Field current from SC Characteristics(A)\n", - "Vll=220 #Line-to-line Voltage(V)\n", - "V=202 #Line-to-line air voltage(V) \n", - "P=45*10**3 #Power roted to motor(W) \n", - "Is_sc=1 #per unit rated current(A)\n", - "\n", - "#Calculations:\n", - "Va_ag=V/sqrt(3) #At field current of 2.20A,at air gap,(V)\n", - "Ia_ag=Ia[0]\n", - "Xs_u=Va_ag/Ia_ag\n", - "Ia_rated=P/(sqrt(3)*Vll)\n", - "Xa_g=Va_ag/1\n", - "Xs_u_pu=Va_ag/Is_sc\n", - "Xs=Vll/(Ia[1]*sqrt(3))\n", - "Ia_pu=Ia[1]/Ia[0]\n", - "SCR=If[1]/If[0]\n", - "Xs=1/SCR\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"'All quantities are in per unit values'\"\n", - "print\"Unsaturated value of synchronous reactance:\",round(Xs_u,3),\"ohm\"\n", - "print \"Satureted value of synchronous reactance: \",round(Xs,3),\"ohm\"\n", - "print\"Short circuit ratio:\",round(SCR,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "'All quantities are in per unit values'\n", - "Unsaturated value of synchronous reactance: 0.988 ohm\n", - "Satureted value of synchronous reactance: 0.775 ohm\n", - "Short circuit ratio: 1.291\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.5, Page number: 265" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "P_rated=45*10**3 #Rated power(KV)\n", - "Pl=1.80*10**3 #Short circuit load loss(W)\n", - "Ia_pu=1 #Per unit armature current\n", - "Ia=118 #rated armature current(A)\n", - "Ra_dc=0.0335 #Dc resistance(ohm/phase)\n", - "\n", - "\n", - "#Calculations:\n", - "Pl_pu=Pl/P_rated \n", - "Ra_eff1=Pl_pu/Ia_pu**2 #in per unit basis\n", - "Ra_eff2=Pl/(3*(Ia)**2)\n", - "\n", - "#Results:\n", - "print \"Armature resistance in per unit:\",round(Ra_eff1,3),\"per unit\" \n", - "print \"Armature resistance in ohms/phase:\", round(Ra_eff2,3),\"ohms/phase\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature resistance in per unit: 0.04 per unit\n", - "Armature resistance in ohms/phase: 0.043 ohms/phase\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.6, Page number: 269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "import cmath\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "Veq=1.0 #Externalsupply(p.u) \n", - "Eaf=1.0 #Internal voltage(p.u)\n", - "Xeq=0.23 #Eqv.resistance of external system(p.u)\n", - "Xs=1.35 #Saturated synchronous reactance(p.u)\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "P_max=Eaf*Veq/(Xs+Xeq)\n", - "\n", - "\n", - "#for part (b):\n", - "delta=[0]*500\n", - "Ia=[0]*500\n", - "Va=[0]*500\n", - "degree=[0]*500\n", - "for n in range(1,101,1):\n", - " delta[n-1]=(pi/2)*(n-1)/100\n", - " Ia[n-1] = (Eaf *exp(1j*delta[n-1]) - Veq)/(1j*(Xs + Xeq))\n", - " Va[n-1] = abs(Veq + 1j*Xeq*Ia[n-1])\n", - " degree[n-1]=180*delta[n-1]/pi\n", - "plot(degree,Va,'r.')\n", - "xlabel('Power angle,delta(degrees)')\n", - "ylabel('Terminal voltage(per unit)')\n", - "title('Terminal voltage vs. power angle for part (b)')\n", - "show()\n", - "#for part (c):\n", - "Vterm=1.0\n", - "P=[0]*500\n", - "deltat=[0]*500\n", - "Ia=[0]*500\n", - "Eaf=[0]*500\n", - "\n", - "for n in range(1,101,1):\n", - " P[n-1]=(n-1)/100\n", - " deltat[n-1]=math.asin(P[n-1]*Xeq/(Vterm*Veq))\n", - " Ia[n-1]=(Vterm*exp(1j*deltat[n-1])-Veq)/(1j*Xeq)\n", - " Eaf[n-1]=abs(Vterm+1j*(Xs+Xeq)*Ia[n-1])\n", - "plot(P,Eaf,'r.')\n", - "xlabel('Power [per unit]')\n", - "ylabel('Eaf [per unit]')\n", - "title('Eaf vs. power for part (c)')\n", - "show()\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"(a) Maximum power supplied to external system:\",round(P_max,2),\"p.u\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['prod', 'Circle', 'power', 'diag', 'sinh', 'trunc', 'binomial', 'plot', 'eye', 'det', 'tan', 'product', 'roots', 'vectorize', 'sin', 'plotting', 'zeros', 'cosh', 'conjugate', 'linalg', 'take', 'solve', 'trace', 'beta', 'draw_if_interactive', 'random', 'ones', 'transpose', 'cos', 'interactive', 'diff', 'invert', 'tanh', 'Polygon', 'reshape', 'sqrt', 'floor', 'source', 'add', 'multinomial', 'test', 'poly', 'mod', 'sign', 'fft', 'gamma', 'log', 'var', 'info', 'seterr', 'flatten', 'nan', 'pi', 'exp']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4TPf+B/D3RGRBEtllIwQJkZUgBFE0qPCrhqC0pUpz\ndbnVS91eWy9arvZ2uW2JW8ttLa2lC0WqJLFEBRVVqrGGJASxJWSffH5/RE6NLJOJzEyk79fz5DFn\n5pwzn3NmnPec7/csKhEREBHRn56JsQsgIqL6gYFAREQAGAhERHQPA4GIiAAwEIiI6B4GAhERAWAg\n1HsxMTGYP3/+Q88nLS0NJiYmKC0trYOq/jB37lyMGzeuTudJ9cPDfGfUajXGjBkDKysrdO/eXQ/V\nGca1a9fQoUMHFBYWAgDCw8OxfPnySse9cuUKOnbsiKKiIkOWWKcYCDXUrFkzWFlZwcrKCiYmJmjS\npIkyvG7dOr2975IlSzBz5ky9zf9hqVQq5bG+QocePbt378bevXtx7do1HDhwwNjlVMrExATnzp2r\ndpyFCxdi/PjxMDc3B1D2fb//O38/Z2dn9O3bF8uWLavzWg2FgVBDd+7cQW5uLnJzc9GqVSt8//33\nyvDo0aNrNI+SkhI9V2l4lZ3XyHMd9UNEHpl1m5GRAU9PT1hYWOg8rb7/n6jVauVxdeuzsLAQn3/+\nOcaOHVvjeT/99NOIjY19qPqMiYHwkEpLSzFr1iy4ubnBxsYGQ4cORXZ2NoA/fjGvWLECrVu3Rv/+\n/fG///0PPXv2xNSpU2FnZ4e2bdti//79WLlyJTw9PWFra4v//ve/yvyfe+45zJo1CwCQmJgId3d3\n/Pvf/4aLiwscHBywdOlSZdwtW7bA398f1tbWcHZ2xowZM2q0DIsWLcKIESM0nnv11Vfx6quvKssx\nYMAAWFlZwd3dHR9++KHGuOW/mHr37g0AaN68OaysrJCcnIyzZ8+iV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7u3uFjX1NxiEiIsPQWyCoVKoajSciNZtOpSr7IyIi/RA92bNnjzzxxBPK\n8L/+9S+ZP3++xjgTJkyQDRs2KMO+vr6SkZFRYV5egIB//OMf//in05+Xl5dO221T6ElISAiOHz+O\nzMxMODk5Yf369YiNjdUYZ/DgwVi9ejWioqJw5MgRNGrUCG5ubhXmdeaBvQgiIqp7egsECwsLLFmy\nBBERESgtLcW4ceMQHByshMLkyZPx1FNPISEhAb6+vjA3N8fKlSv1VQ4REWmhEuHPbyIiqudnKtfk\nxDZDmDBhApydneHn56c8d+PGDQwYMAD+/v6IiIjArVu3DFpTeno6evfuDT8/P3h7e+Nf//qX0esq\nKChASEgIgoKC0L59e7z22mtGr6mcWq1GUFAQIiMj60VNnp6e8Pf3R1BQELp27VovagKAW7duYcSI\nEQgICECHDh1w4MABo9aVmpqKoKAg5c/GxgYfffSR0dfVnDlz0L59e/j4+CAqKgp5eXlGr2nhwoVo\n3749OnXqhA8//BBALb5TOvU4GFBBQYF4enpKRkaGFBcXS5cuXeTIkSNGqWXPnj1y5MgR6dSpk/Lc\nSy+9JO+//76IiLz//vvyyiuvGLSmrKws+fXXX0VEJDc3V9q1aydHjx41el15eXkiIlJcXCzdunWT\n+Ph4o9ckIvLee+/JmDFjJDIyUkSM//l5enrK9evXNZ4zdk0iIlFRUbJ27VoREVGr1XL79u16UVd5\nPS1atJCLFy8atabTp09L69atpbCwUERERo4cKZ999plRazp8+LD4+vpKfn6+lJSUSP/+/eXYsWM6\n11RvA2H37t0aRyktXrxY5s2bZ7R6zp8/rxEIbdq0kezsbBERuXbtms69+XXtqaeekq1bt9abuu7e\nvStdunSR48ePG72m9PR06devn8THx8uQIUNExPifn6enp/L+5YxdU3Z2trRt27bC88auq9wPP/wg\nYWFhRq/p+vXr0r59e7lx44YUFxfLkCFDZMeOHUatac2aNfL8888rw/PmzZP58+frXFO9bTKq7yet\nXbt2Dfb29gAABwcHXL161Wi1pKWl4dChQwgLCzN6XaWlpQgMDISzszP69u0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7mEgEBERAAYCERHdw0AgIiIADAQiIrqHgUBERACA/wct+bjT\na/B03gAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVHX+B/D3IIogKKCCwuAlbEMIBDQNBZ3S1HDRvP0I\nFVf4WcTmtj219dNKhbYs3a19tmxdyKweuyiJ5oWkX6mD4GPoTy7mZbVMk4voYvaAIreZ7+8P1iMH\nmGGAOXOB9+t5ePacOd8585ljez7zvZ2vSgghQERE9B8O1g6AiIhsCxMDERHJMDEQEZEMEwMREckw\nMRARkQwTAxERyTAxkCJOnTqF0aNHw9XVFRs3brR2ODbj5s2bmD59OlxdXREbG2vtcDrtzJkzeOCB\nB9ott3fvXjz++OMWiIjMiYmBDBoxYgRcXFzg5uYm/T3zzDMmvXfDhg2Ijo7GzZs3sWLFCoUjtR8Z\nGRmoqqpCVVUVtm/fbu1wWrl06RIcHByg1+uNllu9ejVeeOGFds8XExOD06dP4/vvvzdXiGQBTAxk\nkEqlwr59+1BdXS39vfPOOya9t7S0FIGBgQpHaNt0Ol2r10pLS3HvvffCwaHj/9drbGw0R1gmnd/Y\nvNcrV65Aq9XiscceM+m8cXFxSE9P73J8ZDlMDNQpFy5cQFRUFDw9PTFgwADMnz8fN27cAAA8/PDD\nOHz4MFasWIH+/fvjxx9/lL13+/btrZoh/va3v2HOnDkAgC+//BL33nsvXF1d4ePjgw0bNpgU07Jl\ny/DUU09hxowZ6N+/PyZMmCD77AMHDuD++++Hm5sbgoODcfDgQQDAoUOHEBISIpV75JFHMH78eGk/\nKioKe/bsAdD0izo6Ohru7u4YOnQo1q9fL5VLSUnBggULEB8fDw8PD3z88cey+NauXYvXX38d27dv\nh5ubGz788EMIIbBq1Sp4e3vD3d0dCxculK7jnV/vW7Zsw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UiczADz44IP4zW9+A6Cps7q8vByRkZEAgKeffhq+vr4ICgrC\nmDFjkJCQgIaGBqnN3lT9+vXD0aNHERYWhn379uHVV18F0JQk3nrrLYSEhOD+++/HF198YfR7AIBG\no4GPjw/uu+8+/PGPf8TYsWPbfE/zGJtvx8fHIyEhoVXnM1Fn8LHbRCZyc3OTzZ9ouW9rli1bhpiY\nGMyfP9/aoZCdYY2ByET9+/dHeHg4KioqANh2m/7ixYuRm5sLZ2dna4dCdog1BiIikmGNgYiIZJgY\niIhIhomBiIhkmBiIiEiGiYGIiGSYGIiISOb/AYya6qOulzG5AAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Maximum power supplied to external system: 0.63 p.u\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.7, Page number: 272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "P_rated=2000*746/3 #per phase rated power of motor(W)\n", - "Xsm=1.95 #Synchronous reactance(ohm)\n", - "Vl=2300 #Line to line voltage(V)\n", - "f=60 #Angular frequency(Hz)\n", - "p=30 #No. of poles\n", - "Xsg=2.65 #Synchronous reactance of generator(ohm)\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "Vp=2300/sqrt(3)\n", - "Ip=P_rated/Vp\n", - "Eafm=sqrt(Vp**2+(Ip*Xsm)**2)\n", - "Pm=3*Vp*Eafm/Xsm #Max power delivered to motor(W)\n", - "ws=2*2*pi*f/p\n", - "Tmax=Pm/ws #MAx torque of motor(Nm)\n", - "\n", - "\n", - "#for part (b):\n", - "Eafg=sqrt(Vp**2+(Ip*Xsg)**2)\n", - "Pm2=3*Eafm*Eafg/(Xsg+Xsm) #Max power delivered to motor(W)\n", - "Tmax2=Pm2/ws #Max torque(Nm)\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print\"(a) Max power :\",round(Pm/1000,0),\"kW,3-ph\"\n", - "print\" Max torque :\",round(Tmax/1000,1),\"kNm\"\n", - "print \"(b) Max power :\", round(Pm2/1000,0),\"kW,3-ph\"\n", - "print \" Max torque:\", round(Tmax2/1000,1),\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Max power : 3096.0 kW,3-ph\n", - " Max torque : 123.2 kNm\n", - "(b) Max power : 1639.0 kW,3-ph\n", - " Max torque: 65.2 Nm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.8, Page number: 279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "P=45 #Power rated(KVA)\n", - "Va=220 #Terminal voltage(V)\n", - "Pin=45 #Power input to the armature(KVA)\n", - "If=5.50 #field current(A)\n", - "Rf=35.5 #Field winding resistance(ohm)\n", - "Ra=0.0399 #Armature dc resistance(ohm/phase)\n", - "Xal=0.215 #Leakage reactance of motor(ohm)\n", - "pf=0.80 #Lagging power factor \n", - "Pc=1.8 #Core loss(kW)\n", - "Pw=0.91 #Friction & windage losses(kW)\n", - "Ps=0.37 #Stray load loss(kW)\n", - "\n", - "\n", - "#Calculations:\n", - "Ia=P*10**3/(sqrt(3)*Va)\n", - "P1=If**2*Rf/10**3 #Loss in field winding(kW)\n", - "P2=3*Ia**2*Ra/10**3 #Loss in armature(kW)\n", - "Pl=(Pc+Pw+Ps+P1+P2)\n", - "Pi=Pin*pf+P1\n", - "Po=Pi-Pl\n", - "eff=(Po/Pi)*100\n", - "\n", - "#Results:\n", - "print \"Efficiency of the synchronous machine:\",round(eff,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of the synchronous machine: 84.3 %\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.9, Page number: 287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import cmath\n", - "\n", - "#Variable declaration:\n", - "Xd=1 #Direct axis synchronus reactance(p.u)\n", - "Xq=0.60 #Quadrature axis synchronous reactance(p.u)\n", - "Va=1 #Terminal voltage(p.u)\n", - "pf=0.8 #Lagging power factor\n", - "Ia=0.8-1j*math.sin(math.acos(0.8)) #Line current(p.u)\n", - "\n", - "\n", - "#Calculations:\n", - "phy=-math.acos(pf)\n", - "E=Va+1j*Xq*Ia\n", - "delta=cmath.phase(E)\n", - "Id=abs(Ia)*math.sin(delta-phy)*cmath.exp(1j*(-pi/2+delta))\n", - "Iq=abs(Ia)*math.cos(delta-phy)*cmath.exp(1j*delta)\n", - "Eaf=Va+Xd*Id*1j+Xq*Iq*1j\n", - "\n", - "\n", - "#Results:\n", - "print \"Generated voltage:\",round(abs(Eaf),2),\"p.u Volt\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Generated voltage: 1.78 p.u Volt\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.11, Page number: 291" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from pylab import *\n", - "import cmath\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "P_rated=2000*746 #Rated power of motor(W)\n", - "Xs=1.95 #Synchronous reactance(ohm/phase)\n", - "Xd=1.95 #Direct axis synchronous reactance(ohm/ph)\n", - "Xq=1.40 #Quadrature axis synchronous reactance(ohm/ph)\n", - "pf=1 #Power factor of the machine\n", - "Vl=2300 #Line to line voltage(V)\n", - "\n", - "#Calculatons:\n", - "Va=float(Vl/sqrt(3)) #volt\n", - "Ia=float(P_rated/(Va*3)) #ampere\n", - "E1=Va-1j*Ia*Xq #From phasor diagram\n", - "delta=cmath.phase(E1) #power angle\n", - "Id=Ia*sin(abs(delta)) #direct axis current(A)\n", - "Eaf=abs(E1)+Id*(Xd-Xq)\n", - "r=symbols('r')\n", - "def P(r): #Process for finding maximum power\n", - " return Eaf*Va*sin(r)/Xd + Va**2*(Xd-Xq)*sin(2*r)/(2*Xd*Xq)\n", - "P1=diff(P(r),r)\n", - "#On differentiation,\n", - "#P1 = 1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1)\n", - "l = solve(1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1),r)\n", - "P_max = (P(round(l[0],5)))\n", - "\n", - "\n", - "#Results:\n", - "print \"Maximum mechanical power:\",math.ceil(3*P_max/10**3),\"kW,3-phase\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum mechanical power: 3236.0 kW,3-phase\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/README.txt b/ELECTRIC_MACHINERY/README.txt deleted file mode 100755 index 4b574a6d..00000000 --- a/ELECTRIC_MACHINERY/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: SANTOSH BARNWAL -Course: be -College/Institute/Organization: BIRLA INSTITUTE OF TECHNOLOGY MESRA -Department/Designation: ELECTRICAL & ELECTRONICS -Book Title: ELECTRIC MACHINERY -Author: A. E. Fitzgerald, Charles Kingsley, Jr., Stephen D. Umans -Publisher: McGraw-Hill, New York -Year of publication: 2003 -Isbn: 0-07-112193-5 -Edition: Sixth Edition \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter1.ipynb b/ELECTRIC_MACHINERY/chapter1.ipynb deleted file mode 100755 index 3eaa70a1..00000000 --- a/ELECTRIC_MACHINERY/chapter1.ipynb +++ /dev/null @@ -1,560 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:29b5ec9b20f222bcfeb31d6e80f55e5d32272a4cce1e9227a6328e93313e209d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 1:Introduction to Magnetic Circuits

" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.1, Page number: 9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "#Variable declaration:\n", - "Ac=9 #Cross-sectional area of the core(cm**2)\n", - "Ag=9 #Cross-sectional area of the air-gap(cm**2)\n", - "g=0.050 #Air-gap length(cm) \n", - "lc=30 #Mean Length of the core(cm)\n", - "N=500 #No. of windings\n", - "ur=70000 #Relative permeability of the core material\n", - "Bc=1.0 # Magnetic Flux Density of the core(T)\n", - "uo=4*pi*10**-7 #Permeability of free space\n", - "\n", - "#Calculation\n", - "Rc=lc*10**-2/((ur*uo*Ac)*10**-4)\n", - "Rg=g*10**-2/((uo*Ag)*10**-4)\n", - "Q=Bc*Ac*10**-4\n", - "i=Q*(Rc+Rg)/N\n", - "\n", - "#Results\n", - "print \"a.Reluctance of the core,Rc:\",round(Rc,2), \"A.turns/Wb\" \n", - "print \" Reluctance of the air-gap,Rg:\", round(Rg,2), \"A.turns/Wb\"\n", - "print \"b.The flux, Q:\", round(Q,4), \"Wb\"\n", - "print \"c.The current,i:\", round(i,2), \"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a.Reluctance of the core,Rc: 3789.4 A.turns/Wb\n", - " Reluctance of the air-gap,Rg: 442097.06 A.turns/Wb\n", - "b.The flux, Q: 0.0009 Wb\n", - "c.The current,i: 0.8 A\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.2, Page number: 10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "#Variable declaration:\n", - "I=10 #Current in the coil(A)\n", - "N=1000 #No of turns in the rotor\n", - "g=1 #Air gap length(cm)\n", - "Ag=2000 #Cross-section of the air-gap(cm**2)\n", - "uo=4*pi*10**-7 #Permeability of free space\n", - "\n", - "#Calculation:\n", - "Q=(N*I*uo*Ag*10**-4)/(2*g*10**-2)\n", - "Bg=round(Q,2)/(Ag*10**-4)\n", - "\n", - "#Results\n", - "print \"The air-gap flux, Q:\", round(Q,2), \"Wb\"\n", - "print \"The flux density, Bg:\", round(Bg,4), \"T\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The air-gap flux, Q: 0.13 Wb\n", - "The flux density, Bg: 0.65 T\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.4, Page number: 13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "#Variable declaration\n", - "lc=0.3 #length of the core(cm)\n", - "ur1=72300 #Relative permeablity for case(a)\n", - "ur2=2900 #Relative permeablity for case(b)\n", - "Ac=9 #Cross-section of the core(cm**2)\n", - "Rg=4.42*10**5 #Reluctance of the air-gap(A.turns/Wb)\n", - "N=500 #No of coil turns\n", - "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "Rt1=(lc/(ur1*uo*Ac*10**-4))+Rg\n", - "L1=N**2/Rt1\n", - "Rt2=(lc/(ur2*uo*Ac*10**-4))+Rg\n", - "L2=N**2/Rt2\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"(a)Inductance,L:\",round(L1,2),\"H\"\n", - "print \"(b)Inductance,L:\",round(L2,2),\"H\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a)Inductance,L: 0.56 H\n", - "(b)Inductance,L: 0.47 H\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.5, Page number: 15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "from matplotlib import *\n", - "from math import *\n", - "%matplotlib inline\n", - "#Variable declaration:\n", - "Ac=9e-4 #Cross-section of the core(m)\n", - "Ag=9e-4 #Cross-section of the air-gap(m)\n", - "g=5e-4 #Air-gap length(m)\n", - "lc=0.3 #Mean length of the core(m)\n", - "N=500 #No. of turns of the core(m)\n", - "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "Rg=g/(uo*Ag) #Reluctance of the air-gap(A.turns/Wb)\n", - "ur=[0]*200 #Initialising array\n", - "L=[0]*200\n", - "\n", - "for n in range(1,101,1):\n", - " ur[n-1]=100+(10000-100)*(n-1)/100\n", - " Rc=lc/(ur[n-1]*uo*Ac) #Reluctance of the core(A.turns/Wb)\n", - " Rtot=Rg+Rc\n", - " L[n-1]=(N**2)/Rtot #Inductance(H)\n", - " \n", - "\n", - "#Results:\n", - "print \"The reqired plot is shown below:\"\n", - "plot(ur, L,'g.')\n", - "xlabel('Core relative permeability, ur')\n", - "ylabel('Inductance,L (H) ')\n", - "title('plot of inductance vs. relative permeability for Example 1.5.')\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The reqired plot is shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEXCAYAAABRWhj0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcE/f/B/BPgKDsPRMgCMgQwcEQrZq6cIILGYo4QVvb\n2lqrVq046qjab221Fq1Wq7KcjMoo1ah1gAqtAwcowbAUGbKFJPf7w9+1+ebLCEgY8no+Hvcwl3zu\n7n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rvvljMYDMrOzu4hHcOYMWNSpKc3MjJ6/uLFC8PS0lLd169f94qP\nj58sy3Khe0PSgGadPXt2WkpKyhhra+tsR0fHe2vXrv3axMSkcNq0aWednJzuODs7/z169Og/du7c\nudLQ0PCF9PP9Fy1a9LODg0PmoEGD0vv373936dKl++kEIklymrFjx/4eEBAQ7uHhcd3JyemOj4/P\nyaqqKnXJcrNnzz5x69YtFycnpzvHjh0LtLe3f0AIIXp6eiXDhg272r9//7urVq3aIR3PzJkzT0VF\nRfnOmjUrmv5u/fr1mxsaGphOTk53HB0d723YsGFjY/G5urreXLZs2V4HB4fMPn36PJ02bdpZfX39\nl0eOHJnn7+8f4ezs/PfQoUOvPXr0yLaxupSMQzou+rP0us+aNSu6qqpKffz48YlCoVDJwcEhc82a\nNds8PDyu09OqqalVp6WlufXv3/8uj8fjfvXVV5ta/p/937oihBBDQ8MXDg4OmfPnz/+FLldYWGii\npLHZU3wAAACpSURBVKQklJ6eyWQ2fPXVV5vc3NzSxo0bl+zg4JApy3Khe8MDCwFkwOPxuLt3714R\nFxc3pbNjkaeamhpVJyenOxkZGQPpF4Lt27fvQwsLi9zJkyfHd3Z80PnQpwEgg57wdriUlJQxixYt\n+vmzzz77VvINkh9++OG+zowLuhacaQAAgMzQpwEAADJD0gAAAJkhaQAAgMyQNAAAQGZIGgAAIDMk\nDQAAkNn/ASu6P4PfImgPAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.6, Page number: 19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Bc=1.0 #Magnetic field induction in the core\n", - "w=377 #Angular frequency of magnetic field(rad/s)\n", - "Rc=3791.33 #Reluctance of the core(A.turns/Wb)\n", - "Rg=442321.3 #Reluctance of the air-gap(A.turns/Wb)\n", - "N=500 #No. of windings\n", - "i=0.80 #Current in the coil\n", - "Ac=9*10**-4 #Cross-section of the core\n", - "\n", - "\n", - "#Calculations:\n", - "L=N**2/(Rc+Rg)\n", - "W=(1./2)*L*i**2\n", - "t = symbols('t')\n", - "Bc = 1.0*sin(w*t)\n", - "e=N*Ac*diff(Bc,t)\n", - "\n", - "#Results:\n", - "print \"The Inductance, L:\", round(L,2), \"H\"\n", - "print \"The magntic stored energy, W:\", round(W,2), \"J\"\n", - "print \"Induced voltage, e:\",e,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Inductance, L: 0.56 H\n", - "The magntic stored energy, W: 0.18 J\n", - "Induced voltage, e: 169.65*cos(377*t) V\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.7, Page number: 22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "#Variable declaration:\n", - "Bc=1 #Magnetic field in the core\n", - "Hc=11 #Magnetising force(A.turns/m)\n", - "lc=0.3 #length of the core(m)\n", - "N=500 #No of windings\n", - "g=0.050 #Air-gap length(cm)\n", - "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", - "\n", - "\n", - "#Calculation:\n", - "Fc=Hc*lc #mmf drop for the core path(A.turns)\n", - "Fg=Bc*g*10**-2/uo #mmf drop across the air gap(A.turns)\n", - "i=(Fc+Fg)/N\n", - "\n", - "\n", - "#Results:\n", - "print \"The required current,i:\" ,round(i,2) ,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required current,i: 0.8 A\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.8, Page number: 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "N=200 #No. of turns\n", - "Ac=4 #Cross-section of the core(in**2)\n", - "w=377 #Angular frequency of the magnetic field(rad/s)\n", - "Hm=36 #Max value magnetising force(A.turns/m)\n", - "Pc=1.2 #Core loss density(W/kg)\n", - "\n", - "\n", - "#Calculations:\n", - "t=symbols('t')\n", - "Bc=1.5*sin(w*t)\n", - "e=(round(N*Ac*0.94/(39.4**2),2)*diff(Bc,t))\n", - "Erms=275*0.707\n", - "lc=(6+6+8+8)/39.4 #Mean length of the core(m)\n", - "I=Hm*lc/N\n", - "Vc=4*0.94*28 #Core volume(m**3)\n", - "Wc=105.5*(2.54**3)*7.65*10**-3 #Core weight(kg)\n", - "Pa=1.5*13.2 #Watts per Kg\n", - "Irms=Pa/Erms #Current (A)\n", - "Pct=Pc*Wc #Total core loss(W)\n", - "\n", - "\n", - "#Results:\n", - "print \"The applied voltage,e:\", e, \"V\"\n", - "print \"The peak current,I:\", round(I,2), \"A\"\n", - "print \"The total rms current. Irms:\", round(Irms,2), \"A\"\n", - "print \"Total Core loss, Pct:\",round(Pct,2),\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The applied voltage,e: 271.44*cos(377*t) V\n", - "The peak current,I: 0.13 A\n", - "The total rms current. Irms: 0.1 A\n", - "Total Core loss, Pct: 15.87 W\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.9, Page number: 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "from math import *\n", - "\n", - "#Variable Declaration:\n", - "g=0.2 #air-gap length(cm)\n", - "lm=1.0 #length of magnetic section(cm)\n", - "Am=4 #Cross-section of the core(cm**2)\n", - "Ag=4 #Cross-section of the air-gap(cm**2)\n", - "\n", - "#Constants used:\n", - "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "Hm=symbols('Hm')\n", - "def Bg(Hm):\n", - " return -uo*Ag*lm*Hm/(Am*g) \n", - "\n", - "Hm1=-49*10**3 #Coercivity of ALNICO 5 (A/m)\n", - "Hm2=-6 #Coercivity of M-5 electrical steel (A/m) \n", - "\n", - "\n", - "#Results:\n", - "print \"Flux Density of air gap:\", round(Bg(Hm1),2),\"T\"\n", - "print \"\\nFlux Density of air gap:\", round(Bg(Hm2*10**4),2),\"gauss\"\n", - "print \"\\nwhere value of Hm for different material.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flux Density of air gap: 0.31 T\n", - "\n", - "Flux Density of air gap: 0.38 gauss\n", - "\n", - "where value of Hm for different material.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.10, Page number: 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Ag=2 #Cross-section of air-gap(cm**2) \n", - "Bg=0.8 #Air-gap flux density(t)\n", - "Bm=1.0 #Core-flux density(T)\n", - "Hm=-40 #Magnetising force in the core(kA/m)\n", - "uo=4*pi*10**-7 #permeability of free space(H/m)\n", - "g=0.2 #Air-gap length(cm)\n", - "\n", - "#Calculations:\n", - "Am=Ag*Bg/Bm\n", - "lm=-g*Bg/(Hm*uo*10**3)\n", - "Vm=Am*lm\n", - "\n", - "\n", - "#Results:\n", - "print \"The minimum magnet volume,Vm:\",round(Vm,2),\"cm**3\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum magnet volume,Vm: 5.09 cm**3\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1.11, Page number: 39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "from math import *\n", - "\n", - "#Variable Declaration:\n", - "Am = 2 #magnetic material cros-section(cm^2)\n", - "g=0.2 #air gap length(cm)\n", - "uo=4*pi*10**-7 #permeability of free space(H/m)\n", - "N=100 #No. of windings\n", - "\n", - "#Calculations and results:\n", - "#for part (a)\n", - "Bma = 1.0 #Tesla\n", - "Hma = - 4 #kA/m\n", - "Ag1 = 2 #cm**2\n", - "Ag2 = 4 #cm**2\n", - "\n", - "lm=g*(Am/Ag1)*(Bma/(-uo*Hma*10**4))\n", - "print \"(a) The Requied magnet length = \",round(lm,2),\"cm\"\n", - "\n", - "\n", - "#for part (b):\n", - "i,Hm=symbols('i Hm')\n", - "Bm=-uo*(Ag1/Am)*(lm/g)*Hm+(uo*N/g)*(Ag1/Am)*i\n", - "H_max=200 #kA/m\n", - "B_max=2.1 #Tesla\n", - "i_max=(B_max+2.50*10**-5*H_max)/(6.28*10**-2)\n", - "\n", - "print \"(b) Thus with the air-gap area set to 2 cm^2,\"\n", - "print \" increasing the current to i_max = 45.2 A and then reducing\"\n", - "print \" it to zero will achieve the desired magnetization.\"\n", - "\n", - "#for part (c):\n", - "Bm1=1.00 #Tesla\n", - "Bm2=1.08 #Tesla\n", - "Bg1=(Am/Ag1)*Bm1\n", - "Bg2=(Am/Ag2)*Bm2\n", - "print \"(c) The flux densities when plunger moves at two extremes are:\"\n", - "print \" Bg1 =\",Bg1,\"T and Bg2 =\",Bg2,\"T\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The Requied magnet length = 3.98 cm\n", - "(b) Thus with the air-gap area set to 2 cm^2,\n", - " increasing the current to i_max = 45.2 A and then reducing\n", - " it to zero will achieve the desired magnetization.\n", - "(c) The flux densities when plunger moves at two extremes are:\n", - " Bg1 = 1.0 T and Bg2 = 0.54 T\n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter10.ipynb b/ELECTRIC_MACHINERY/chapter10.ipynb deleted file mode 100755 index 2bcd2ccb..00000000 --- a/ELECTRIC_MACHINERY/chapter10.ipynb +++ /dev/null @@ -1,538 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:603160d56b04457665b7cf5381387c06e4c52903d6f85f1c61a983bdc3c14ebc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10: Introduction to Power Electronics" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.5, Page number: 508" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from pylab import *\n", - "import numpy as np\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "w=2*pi*60 #frequency of voltage(Hz)\n", - "R=10 #ohm\n", - "C=0.01 #F\n", - "Vo=120*sqrt(2) #maximum voltage(V)\n", - "Nmax=800\n", - "tau=R*C #time constant(s)\n", - "\n", - "#Calculations:\n", - "# diode = 1 when rectifier bridge is conducting\n", - "\n", - "diode=1\n", - "t=[0]*801\n", - "vs=[0]*801\n", - "vrect=[0]*801\n", - "vR=[0]*801\n", - "iB=[0]*801\n", - "\n", - "t=[0]*801\n", - "for n in range(1,Nmax+2,1):\n", - " t[n-1] = (2.5*pi/w)*(n-1)/Nmax\n", - " vs[n-1]=Vo*math.cos(w*t[n-1])\n", - " vrect[n-1]=abs(vs[n-1])\n", - "#if the rectifier bridge is ON:\n", - " if diode==1:\n", - " vR[n-1]=vrect[n-1]\n", - " if (w*t[n-1])<=(pi/2):\n", - " iB[n-1]=vR[n-1]-Vo*C*w*math.sin(w*t[n-1])\n", - " elif (w*t[n-1])<=3*pi/2:\n", - " iB[n-1]=vR[n-1]/R+Vo*C*w*math.sin(w*t[n-1])\n", - " else:\n", - " iB[n-1]=vR[n-1]/R-Vo*C*w*math.sin(w*t[n-1])\n", - " if iB[n-1]<0:\n", - " diode=0\n", - " toff=t[n-1]\n", - " Voff=vrect[n-1]\n", - " else:\n", - " vR[n-1]=Voff*exp(-(t[n-1]-toff/tau))\n", - " iB[n-1]=0\n", - " if (vrect[n-1]-vR[n-1])>0:\n", - " diode=1\n", - "\n", - "\n", - "\n", - "#Results:\n", - "iR=(1/R)*np.array(vR)\n", - "plot(1000*np.array(t),vR)\n", - "xlabel('time [msec]')\n", - "ylabel('voltage [V]')\n", - "xlim(0,22)\n", - "ylim(0,180)\n", - "plot(1000*np.array(t),vrect,'--')\n", - "grid()\n", - "print \"The required plots are shown below:\"\n", - "show()\n", - "plot(1000*np.array(t),iR)\n", - "xlabel('time [msec]')\n", - "ylabel('source current [A]')\n", - "xlim(0 ,22)\n", - "ylim(-50,250) \n", - "plot(1000*np.array(t),1.5*np.array(iB),'--')\n", - "grid()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required plots are shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEMCAYAAAAidwoiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcFGf+B/DPUkXALKgsVRcpSu9IVBQLWIPGGGNLwBKT\nqLHE7u9y8S5FjC3WnIlRiCaW2LsoRTQWOqKooC7SV5EqSt35/WHWEKWt7M4zu/u8X6953c2WmY/f\nm9sv80zjMQwDiqIoSj1pkA5AURRFkUObAEVRlBqjTYCiKEqN0SZAURSlxmgToCiKUmO0CVAURakx\nhTWBadOm7RQIBGIXF5d06Wvx8fG+vr6+8R4eHik+Pj4JCQkJPtL3Vq1atdzOzi6rV69edyIjI4MU\nlYuiKIpqhGEYhUxxcXH+ycnJHs7OzunS1wYMGBB79uzZoQzD4PTp08MDAgJiGIbBrVu3HN3c3FJr\na2u1RSKR0MbG5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xn88veeeedEwDg4uKSfuPGDdeqqir9K1eu\n9Gl8HKG2tlantfXyeDxm+PDhZzQ1NRucnZ1vSiQSjaFDh56TLjs7O1s4atSokx06dKiePn36L6NG\njTo5atSokwBw4cKFIbdv33aQLquystKwqqpKPyoqavD+/fs/kL7O5/PLZK8IRTWPNgFK7ejq6tZI\n/7uGhoZEOq+hoSGpr6/XkkgkGkZGRqUpKSkesi5bR0enVrosbW3tusbrqa+v19LU1GyIj4/3jYqK\nGnzw4MFxW7ZsmRMVFTWYYRje9evXe0u/31hrTY2i2oMeE6BUjqGhYaX0LqqykP7YGhoaVlpbW4sO\nHjw4Tvr6jRs3XOWRraqqSr+srIw/fPjwM+vXr/8iLS3NDQCCgoIiN23aNFf6OenrgYGB57du3Tpb\n+jp9cAslb7QJUCqnc+fOT/r27funi4tL+tKlS1c3fnjHqw/yePW/S+d/++23yb/88st0d3f3VGdn\n55vHjx8Pbsu6m1u2dL6ystLwnXfeOeHm5pbm7+9/acOGDQsAYNOmTXMTExO93dzc0pycnG5t3779\nEwD417/+9U1paamRi4tLuru7e2psbGxAO0pDUa+hdxGlqDf0n//85ysDA4OnpJ6oNXDgwJh169Yt\n9PT0TCaxfko10D0BinpDBgYGT3/66aeZpC4WE4lE1o2PO1DUm6B7AhRFUWqM7glQFEWpMdoEKIqi\n1BhtAhRFUWqMNgGKoig1RpsARVGUGvt/5i5yreN7pjkAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEMCAYAAAAmgtofAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcFFX7APBnYRcQdhcwBWkxFwWVVWRRRAtRUcD8pYiX\nUEpfVEyTrLyV2luJdhHzjmVpaqKmQl6ALhhqkmYhYqDWesFclDsqIMt1gZ3fH7S+iFx2YHfnzPB8\nP5/56MzOzjw+Lvsw58w5w6MoCh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0pKbN3c3K7J5fKM5OTk0R1IDUJPwVlLEeqgNWvWrBYKheVM\nPeHL19f37KZNm5YNHjz4TybOj7gBrwwQ6iChUFi+a9eu+UwNOlMqlU6N+yUQag+8MkAIIYRXBggh\nhLAYIIQQAiwGCCGEAIsBQgghwGKAEEIIAP4fpbFEnCBosTAAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.6, Page number: 522" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "w=2*pi*60 #Angular freq of voltage(rad/sec)\n", - "Vo=230*sqrt(2) #volt\n", - "R=5.6 #Resistance(ohm)\n", - "\n", - "#Calculations:\n", - "Ls=[0]*101\n", - "tc=[0]*101\n", - "Idc=[0]*101\n", - "for n in range(1,101,1):\n", - " Ls[n-1]=n*10**-3\n", - " Idc[n-1]=2*Vo/(pi*R+2*w*Ls[n-1])\n", - " tc[n-1]=(1/w)*acos(1-(2*Idc[n-1]*w*Ls[n-1])/Vo)\n", - "\n", - "#Results:\n", - "plot(1000*np.array(Ls),Idc,'g.')\n", - "xlabel('Commutating inductance Ls [mH]')\n", - "ylabel('Idc [A]')\n", - "title('Load current,Idc vs Commutating inductance,Ls')\n", - "show()\n", - "plot(1000*np.array(Ls),1000*np.array(tc),'g.')\n", - "xlabel('Commutating inductance L [mH]')\n", - "ylabel('tc [msec]')\n", - "title('Commutating Inductance,Ls vs time,tc')\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEXCAYAAACtTzM+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUE1f7B/AbNgVZAgIJCBjEogRBNnEpShQRF7DggmKL\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J169b5KSkpbv37979tb29/b9euXWFN7ef58+e9LC0tcy0tLXOtrKxy\n7ty54+Dn53eyf//+t4cOHXpx06ZNC5ur2zets9etB8oHN7eDTquurk5LXV29UV1dvfHq1auDP/30\n0x9v3brloui4OprVq1eH6+rqVtHJp60IhUKOn5/fyTt37ji0Zbnw9tCpDJ1WTk6OVWBgYIxEIlHT\n0tKqk24yg9bT1dWt2rVrV1hlZaXem16L0JyLFy8O/fTTT380MTEpbIvyoG3gDAEAAAgh6EMAAICX\nkBAAAIAQgoQAAAAvISEAAAAhBAkBAABeQkIAAABCCCH/D1IYMYHMZAvtAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEXCAYAAACqIS9uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcU1f/B/ATAsoIIyAIyAiCgymIoDjjYFTFalF/OECx\nytM66qpVWy1YLWJdRfvYp/hYnGgddaCCiBInTkAUaxUkMgRlDxFZ9/eHz7UphRAgIYH7eb9e9/Xi\nJjfnnHsC3xy+99wTFkVRBAAAmENJ3g0AAID2hcAPAMAwCPwAAAyDwA8AwDAI/AAADIPADwDAMAj8\nIBWZmZlmmpqa5RRFseTdFlECgYBvamqaJe92MM21a9eG9e3b94m82wGNQ+CXssjIyOkDBgy4p6mp\nWW5sbPxy7Nix52/cuDFE3u0SRygU8pSUlOrr6+sl/n3g8XjCy5cvj6L3zczMMsvLyzVZLJbUbwyZ\nPXv23rVr166XdrktwefzBXv27PlUnm1oSJE+1JSUlOqfP3/ek94fNmzYtSdPnvSVR93QPAR+Kdq2\nbduypUuXbl+zZs2G169fG2RlZZkuWLDg32fOnJkg77ZJoiWjdRaLRbXX6J7FYlGy+EBpaRvkWX9H\nIM//9hTtP02FR1EUNilsJSUl2hwOp/z48eM+TR1TVVXVdfHixT8aGxvnGBsb5yxZsmT7u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mJif3m3S5GNHDkyfsuWLV/SH2DSsnfv3tn37993Fp2dBIoDI37oNDIzM81cXFzuOjo6Ji9evDhM\nNNUFjdPV1S2aPXv23pbewCXO9u3bl4aGhq7S1tYulVaZIF0Y8QMAMAxG/AAADIPADwDAMAj8AAAM\ng8APAMAwCPwAAAyDwA8AwDD/DxR4tH4eP493AAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.7, Page number: 528" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "R=12.5*10**-3 #ohm\n", - "L=1.2 #H\n", - "Vo=15 #volt\n", - "w=120*pi #angular freq(Hz)\n", - "Idc=35 #DC current(A)\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "theta=[0]*1301\n", - "t=[0]*1301\n", - "vL=[0]*1301\n", - "vs=[0]*1301\n", - "\n", - "Vdc_a=R*Idc #Dc voltage(V)\n", - "P=Vdc_a*Idc #Power\n", - "alpha_da = acos(pi*R*Idc/(2*Vo)) ; #delay angle\n", - "for n in range(1,1301,1): #loop for calculating load voltage\n", - " theta[n-1]=2*pi*(n-1)/1000\n", - " t[n-1]=theta[n-1]/w\n", - " vs[n-1]=Vo*sin(theta[n-1])\n", - " if theta[n-1]" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part (a):\n", - "\n", - " Vdc_a= 437.5 mV\n", - "\n", - " Power= 15.0 W\n", - "\n", - " alpha_d= 87.4 degrees\n", - "\n", - " part (b):\n", - "\n", - " alpha_d= 162.0 degrees\n", - "\n", - " Vdc_b= -9.1 V\n", - "\n", - " Current will reach zero at 4.5 sec\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEMCAYAAAAxoErWAAAABHNCSVQICAgI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UVORK5C\nYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.8, Page number: 533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "f=60 #Hz\n", - "Vrms=35 #rms voltage of waveform\n", - "Ra=3.5 #Armature resistance(ohm)\n", - "La=0.175 #H\n", - "no=8000 #No load speed(r/min)\n", - "Va=50 #armature voltage(V)\n", - "\n", - "#Calculations:\n", - "Edc,alphad=symbols('Edc alphad')\n", - "Vdc=Edc #at no load, Vdc=Edc\n", - "Edc=round(float(2*sqrt(2)*(Vrms/math.pi)),2)*cos(alphad)\n", - "n=Edc*float(no/50)\n", - "\n", - "#Results:\n", - "print \"Speed at no-load =\",n,\" r/min (where 0 <= alphad <= pi/2)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed at no-load = 5041.6*cos(alphad) r/min (where 0 <= alphad <= pi/2)\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.9, Page number: 537" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Vll_rms=460 #rms voltage,line-to-line(V)\n", - "R=68 #resistance of load\n", - "Im=2.5 #magnet current(A)\n", - "\n", - "#Calculations:\n", - "Vdc_max=3*sqrt(2)*Vll_rms/pi\n", - "Idc_max=Vdc_max/R\n", - "Vdc=Im*R\n", - "alpha=acos(pi*Vdc/(3*sqrt(3)*Vll_rms))\n", - "\n", - "#Results:\n", - "print \"(a) Maximum dc voltage:\",round(Vdc_max),\"V\"\n", - "print \"\\n Maximum dc current:\",round(Idc_max,1),\"V\"\n", - "print \"\\n(b) Delay angle alpha:\",round(math.degrees(round(alpha,1)),1),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Maximum dc voltage: 621.0 V\n", - "\n", - " Maximum dc current: 9.1 V\n", - "\n", - "(b) Delay angle alpha: 74.5 degrees\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.10, Page number: 541" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "T=20*10**-3 #Time period(sec) \n", - "p=4 #no. of poles\n", - "delta=0.44 #ON- time fraction\n", - "Vo=125 #DC supply voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "fc=1/T\n", - "ns=(120*fc/p)\n", - "Va_peak=(4*Vo*sin(delta*pi))/pi\n", - "Vll_rms=sqrt(3/2)*Va_peak\n", - "\n", - "#Results:\n", - "print \"(a) Frequency:\",fc,\"Hz\"\n", - "print \"\\n Synchronous speed:\",ns,\"r/min\"\n", - "print \"\\n(b) Rms amplitude of line-to-line voltage:\",round(Vll_rms,0),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Frequency: 50.0 Hz\n", - "\n", - " Synchronous speed: 1500.0 r/min\n", - "\n", - "(b) Rms amplitude of line-to-line voltage: 191.0 V\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.13, Page number: 547" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Vo=48 #Load voltage(V)\n", - "R=3.7 #Resistance of load(ohm)\n", - "L=.32 #Inductance of laad(H)\n", - "D=0.8 #Duty cycle\n", - "f=1000 #Hz\n", - "\n", - "#Calculations:\n", - "iL_avg=(2*D-1)*Vo/R\n", - "T=1/f\n", - "tau=L/R\n", - "iL_min=((-Vo/R)*(1-2*exp(-T*(1-D)/tau)+exp(-T/tau)))/(1-exp(-T/tau))\n", - "iL_max=(Vo/R)*(1-2*exp(-D*T/tau)+exp(-T/tau))/(1-exp(-T/tau))\n", - "\n", - "#since T/tau << 1, so using 10.32 in e.g. given.\n", - "del_iL=(2*Vo)*T*D*(1-D)/(R*tau)\n", - "\n", - "\n", - "#Results:\n", - "print \"Avg load current:\",round(iL_avg,2),\"A\"\n", - "print \"Minimum load current:\",round(iL_min,2),\"A\"\n", - "print \"Maximum load current\",round(iL_max,2),\"A\"\n", - "print \"Current ripple:\",round(del_iL,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Avg load current: 7.78 A\n", - "Minimum load current: 7.76 A\n", - "Maximum load current 7.81 A\n", - "Current ripple: 0.05 A\n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter11.ipynb b/ELECTRIC_MACHINERY/chapter11.ipynb deleted file mode 100755 index 308afbf5..00000000 --- a/ELECTRIC_MACHINERY/chapter11.ipynb +++ /dev/null @@ -1,975 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4aa0be3787a5262658b58d5130a82adad92353bb1944b3902dc15e9d5045fa75" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11: Speed and Torque Control" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.1, Page number: 561" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Vdc=240 #DC supply (V)\n", - "D=0.75 #Duty cycle\n", - "Rf=187 #field resistance(ohm)\n", - "Lf=4.2 #field winding inductance(H)\n", - "T=1 #switching period(msec)\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "If=D*(Vdc/Rf)\n", - "tau=Lf/Rf #time constant(msec)\n", - "del_if=(2*Vdc/Rf)*(T/tau)*D*(1-D)\n", - "\n", - "\n", - "#Results:\n", - "print \"Avg field current:\",round(If,2),\"A\"\n", - "print \"Magnitude of currnet ripple:\",round(del_if,1),\"mA\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Avg field current: 0.96 A\n", - "Magnitude of currnet ripple: 21.4 mA\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.2, Page number: 563" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "n1=1800 #r/min\n", - "n2=3600 #r/min\n", - "Va=240 #terminal voltage(V)\n", - "Ifo=0.34 #No-load field current(A)\n", - "Ra=0.05 #Armature resistance(ohm)\n", - "Rsh=187 #Shunt field resistance(ohm)\n", - "\n", - "#Calculations:\n", - "wm=symbols('wm')\n", - "wm1=float(2*pi*n1/60)\n", - "wm2=float(2*pi*n2/60)\n", - "def Pload(wm):\n", - " return (22.4*(120*pi)**-3)*(wm)**3\n", - "\n", - "T1=Pload(wm1)*1000/wm1\n", - "T2=Pload(wm2)*1000/wm2\n", - "\n", - "Kf=Va/(Ifo*wm2)\n", - "def If(T,wm):\n", - " return (Va/(2*Kf*wm))*(1+sqrt(1-(4*wm*T*Ra)/Va**2))\n", - "\n", - "Rf1tot=round(Va/float(If(T1,wm1)))\n", - "Rf2tot=round(Va/float(If(T2,wm2)))\n", - "Rrh1=Rf1tot-Rsh\n", - "Rrh2=Rf2tot-Rsh\n", - "\n", - "\n", - "#Results:\n", - "print \"----------------------------------------------------------------\"\n", - "print \"r/min Tload[N.m] If[A] R(f)tot[ohm] Rrheostat[ohm]\"\n", - "print \"----------------------------------------------------------------\"\n", - "print n1,\"\\t \",round(float(T1),1),\"\\t\\t \",round(float(If(T1,wm1)),3),\"\\t\",Rf1tot,\"\\t \",Rrh1\n", - "print n2,\"\\t \",round(float(T2),1),\"\\t\\t \",round(float(If(T2,wm2)),3),\"\\t\",Rf2tot,\"\\t \",Rrh2\n", - "print \"----------------------------------------------------------------\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "----------------------------------------------------------------\n", - "r/min Tload[N.m] If[A] R(f)tot[ohm] Rrheostat[ohm]\n", - "----------------------------------------------------------------\n", - "1800 \t 14.9 \t\t 0.678 \t354.0 \t 167.0\n", - "3600 \t 59.4 \t\t 0.333 \t720.0 \t 533.0\n", - "----------------------------------------------------------------\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.3, Page number: 567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from math import *\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "Rf=109 #Field resistance(ohm)\n", - "Vf=300 #Rated field voltage(V)\n", - "Ra=0.084 #Armature resistance(ohm)\n", - "Kf=0.694 #Geometric constant(A.rad/sec)\n", - "\n", - "\n", - "#Calculations:\n", - "If=Vf/Rf #Resulting field current(A)\n", - "w_rated=2500*(pi/30) #Rated speed(rad/sec)\n", - "P_rated=100*746 #Watts\n", - "T_rated=P_rated/w_rated #Nm\n", - "Va=[0]*102\n", - "NoLoadRPM=[0]*102\n", - "FullLoadRPM=[0]*102 \n", - "for n in range(1,102,1):\n", - " Va[n-1]=250*(1+(n-1)/100)\n", - " T=0 #Zero torque\n", - " w=(Va[n-1]-T*Ra/(Kf*If))/(Kf*If)\n", - " NoLoadRPM[n-1]=w*30/pi\n", - " T=T_rated\n", - " w=(Va[n-1]-T*Ra/(Kf*If))/(Kf*If)\n", - " FullLoadRPM[n-1]=w*30/pi\n", - "\n", - "print\"The plot is as shown:\"\n", - "plot(Va,NoLoadRPM)\n", - "plot(Va[20] ,NoLoadRPM[20] ,'r+')\n", - "plot (Va[50] , NoLoadRPM[50] , 'r+')\n", - "plot (Va[80] ,NoLoadRPM[80] , 'r+')\n", - "plot (Va, FullLoadRPM,'.')\n", - "plot (Va[20] ,FullLoadRPM[20] ,'o')\n", - "plot (Va[50] , FullLoadRPM[50] , ' o' )\n", - "plot (Va[80] , FullLoadRPM[80] ,'o' )\n", - "title('Speed vs Armature voltage')\n", - "xlabel('Armature voltage [V] ')\n", - "ylabel('Speed [r/min] ')\n", - "annotate('+ = Zero torque',xy=(270,2300))\n", - "annotate('o = Full load torque',xy=(270,2100))\n", - "ylim(1000,2500)\n", - "xlim(250,500)\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The plot is as shown:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEXCAYAAACDChKsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYU2f7B/BvgOBCBBdogqCAYiQMR0ArEgcWfStQKShU\ncL6+1VaxttTRIbbu1Yot/upbtwVFUdC+grhQahUq4kQFFJSEUQcKKLJyfn/EgxEZIRDm/bmuczV5\nznpyGnNzzv0MDsMwIIQQQmpLo7ErQAghpHmiAEIIIUQlFEAIIYSohAIIIYQQlVAAIYQQohIKIIQQ\nQlRCAYQ0C2KxOGb79u0zG7seBEhPTzfR0NCQyWQy+v1o5egLQKr1559/Dh82bNhfenp6z7p06fJk\n+PDhf16+fHlwQ9eDw+EwHA5H7Z2WCgoKdHR0dArGjx9/XN3nqsjExCT9zJkzoxr6vHVFwb31ogBC\nqpSXl6f7wQcf/OHn57c5NzdXXyqV8pYtW7a8TZs2RY1dN3UJCwtz79Wr18OYmBhxTk6OQVXblZaW\natX3uTkcDsMwDEfV/cvKyjTrsz7KaojATpoohmFooaXS5e+//x6sp6eXW9X6nTt3Ths2bNiFzz77\nbEunTp2eWVhY3D59+vQodv2zZ886zZgxY3uPHj0yeTye5JtvvvmhrKxMg12/ffv2Gf3790/S19d/\n+v7770c9ePCgF7suOjraqV+/fnc6der07LPPPtvi6OgY89tvv82sWAepVNqzXbt2L58+farPll25\ncsW2a9euj0pLSzVTUlLMRowYca5Tp07Punbt+mjSpEn7q/vMI0eOPLNx48aFY8aMOblhw4YvFNcZ\nGxunr1279iuhUHi9bdu2hampqaYcDke2c+fOaUZGRg87d+78ZOvWrZ/Ex8cPEQqF1/X09HI/++yz\nLez+qamppiNHjjzTpUuXx127dn308ccf73v27FknhmEwZcqUvRoaGmXt2rV7qaOjk79+/fovz549\nK+bz+RkV68Be42XLlgW4u7sfmjJlyl5dXd3n27dvn1HTNVf2upWVlWn88MMP3xgbG6d37949x9fX\nd/fz5891GYZBWlqaCYfDkZWWlmouXbp0paamZmnbtm0LdXR08ufNmxfIMAzmz5+/2cjI6KGuru7z\nQYMGXY6NjR3Onufly5ftfH19d+vr6z/t379/0tq1a79S/JxSqbTnxIkTw7p16/ZP79697wcGBs5r\n7H8LtFS+NHoFaGm6S15eXscuXbo8njp16q7IyEhnxR8bhpEHEC0trZKffvrJr7S0VPPAgQOenTp1\nepabm6vHMAzc3NyOfPLJJ1tfvnzZ7p9//ukmEonifv3119kMwyA8PNzVzMws5c6dO/3Kyso0VqxY\n8fWwYcMuMAyDR48ede3YsWNeWFjYxNLSUs0ff/xxgZaWVsn27dtnVFbPUaNGnf7vf/87i33/5Zdf\nrp8zZ04QwzCYPHlyyKpVq5YwDIOioiLtCxcuDKvq86anpxtramqWZmRk8Ldt2/ZvKyura4rrjY2N\n021tba9IJBLeq1ev2rA/pHPmzAkqKirSjo6OdtLW1i5yc3M78ujRo65SqbRn9+7dc86dOzeCYeQB\n5NSpU6OLi4u5jx496jpixIhzCxYs+JE9vomJSZpiAK4sgChus2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yW0yIgMA0Ov1o8FgMFckEt03GAwXRSLR/QMHDvybk5Pzt8lk\n0mm1Wrq8vPxuVVXVrWQfh25sbPzZ7/cf0mg05mTSo/cXLqaI0FssFotxotHovrS0tKcrKytH5HL5\nnMfjOcrlcp8lk18mk1mHhob6jx8/vpxMep1OZ2ppabmmVCqvvF7L0bsARyAIvcUikUh6TU3Nolgs\nvtPa2jo9NjbWk2zwAADIzs7e1Ol0ppmZmeaXpT1z5syPCwsLtTwe78nrtRq9K3AEghBCKCU4AkEI\nIZQSDCAIIYRSggEEIYRQSjCAIIQQSgkGEIQQQinBAIIQQigl/wFG1ZEINLtYhQAAAABJRU5ErkJg\ngg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.4, Page number: 571" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Rf=109 #Field resistance(ohm)\n", - "Vf=300 #Rated field voltage(V)\n", - "n1=2000 #rpm\n", - "T_rated=285 #Rated torque(Nm)\n", - "n2=1975 #Dropped rpm\n", - "Kf=0.694 #Geometric constant(A.rad/sec\n", - "Ra=0.084 #Armature resistance(ohm)\n", - "\n", - "#Calculations:\n", - "If=Vf/Rf #Resulting field current(A)\n", - "wm1=2*pi*n1/60\n", - "w_ref=wm1\n", - "Vao=Kf*If*wm1\n", - "Ia=T_rated/(Kf*If)\n", - "wm2=2*pi*n2/60\n", - "Ea=Kf*If*wm2\n", - "Va=Ea+Ia*Ra\n", - "G=symbols('G')\n", - "x=solve(Vao-round(Va)+G*(w_ref-wm2),G)\n", - "\n", - "\n", - "#Results:\n", - "print \"Armature voltage,Vao:\",round(Va,0),\"V\"\n", - "print \"Multiplicative constant,G:\",float(round(x[0],2)),\"A.sec/rad\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature voltage,Vao: 408.0 V\n", - "Multiplicative constant,G: 3.04 A.sec/rad\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.5, Page number: 573" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "from sympy import *\n", - "\n", - "#Variable Declaration:\n", - "Km=0.22 #torque constant(V/(rad/sec))\n", - "Ra=1.03 #ohm\n", - "Pl=100 #Power load(W)\n", - "Va1=40 #Armature voltage(V)\n", - "Va2=50 # \" \" \"\n", - "\n", - "\n", - "#Calculations:\n", - "wm1=(Va1/(2*Km))*(1+sqrt(1-(4*Pl*Ra/Va1**2)))\n", - "wm2=(Va2/(2*Km))*(1+sqrt(1-(4*Pl*Ra/Va2**2)))\n", - "\n", - "#Results:\n", - "print \"for Va=40 V, wm=\",round(wm1,1),\"rad/sec\"\n", - "print \"for Va=50 V, wm=\",round(wm2,1),\"rad/sec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for Va=40 V, wm= 169.2 rad/sec\n", - "for Va=50 V, wm= 217.5 rad/sec\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.6, Page number: 575" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "\n", - "Rf=109 #Field resistance(ohm)\n", - "Vf=300 #Rated field voltage(V)\n", - "Ra=0.084 #Armature resistance(ohm)\n", - "Kf=0.694 #Geometric constant(A.rad/sec)\n", - "Tfl=285 #Full load torque(Nm)\n", - "nf=2500 #Speed at full load(r/min)\n", - "#wm=2500 #rated r/min\n", - "\n", - "#for part (1):\n", - "n1=2000 #r/min\n", - "n2=2500 #r/min\n", - "\n", - "\n", - "#Calculations:\n", - "#part (a):\n", - "If=Vf/Rf\n", - "w1=n1*2*pi/60\n", - "w2=n2*2*pi/60\n", - "Ea1=Kf*If*w1 #Avg Amature voltage(V)\n", - "Ea2=Kf*If*w2\n", - "Ia1=n1*Tfl/(nf*Kf*If)\n", - "Ia2=n2*Tfl/(nf*Kf*If)\n", - "Va1 = Ea1 + Ia1*Ra\n", - "Va2 = Ea2 + Ia2*Ra\n", - "Tl1=(n1/nf)*Tfl\n", - "Tl2=(n2/nf)*Tfl\n", - "\n", - "#part (b):\n", - "\n", - "# The dynamic equation governing the speed of the motor is\n", - "\n", - "# J*(dwm/dt)=Tmech-Tload\n", - "# wm=(pi/30)*n & wr=(pi/30)*nf\n", - "# Tload= (Tfl/wf)*wm\n", - "# Tmech = Kf*If*Ia=Kf*If*(Va-Ea)/Ra #Under armature-voltage control\n", - "\n", - "# Thus the governing differential equation is\n", - "# d(wm)/dt + 48.4*wm - 24.7*Va = 0\n", - " \n", - "# wm = wf + (wi-wf)*exp(-t/tau) #tau=1/48.4=20.7 msec\n", - "# n = 2500- 50*exp( -t/tau )\n", - "\n", - "# The armature current will decrease exponentially with the \n", - "# same 20.7 msec time constant from an initial value of \n", - "# (Vf - Vi)/Ra = 1190 A to its final value of 149 A.\n", - "\n", - "# Ia = 149 + 1041*exp(-t/tau)\n", - "\n", - "#part (c):\n", - "# J*d(wm)/dt = Tmech-Tload = Tf-(Tf/wm)*wm\n", - "# or d(wm)/dt + 1.18*wm - 310 = 0\n", - "\n", - "#In this case, the speed will rise exponentially to wm=wf=262 rad/sec as\n", - "# wm = 262-53*exp(-t/tau) #tau=1/1.18=845 msec\n", - "\n", - "#Results:\n", - "print \"part(a):\\n\"\n", - "print \"-------------------------------------------------\"\n", - "print \"r/min\\tw[rad/s]\\tVa(V)\\tIa(A)\\tTload[Nm]\"\n", - "print \"-------------------------------------------------\"\n", - "print n1,\"\\t\",round(w1),\"\\t\\t\",round(Va1),\"\\t\",round(Ia1),\"\\t\",Tl1,\"Nm\"\n", - "print n2,\"\\t\",round(w2),\"\\t\\t\",round(Va2),\"\\t\",round(Ia2),\"\\t\",Tl2,\"Nm\"\n", - "print \"-------------------------------------------------\"\n", - "print \"\\npart (b):\"\n", - "print \" The resultant motor speed, n = 2500 - 50*exp(-t/tau) where tau=20.7 msec\"\n", - "\n", - "print \"\\npart (c):\"\n", - "print \" The resultant motor speed, wm = 262 - 53*exp(-t/tau) where tau=845 msec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part(a):\n", - "\n", - "-------------------------------------------------\n", - "r/min\tw[rad/s]\tVa(V)\tIa(A)\tTload[Nm]\n", - "-------------------------------------------------\n", - "2000 \t209.0 \t\t410.0 \t119.0 \t228.0 Nm\n", - "2500 \t262.0 \t\t513.0 \t149.0 \t285.0 Nm\n", - "-------------------------------------------------\n", - "\n", - "part (b):\n", - " The resultant motor speed, n = 2500 - 50*exp(-t/tau) where tau=20.7 msec\n", - "\n", - "part (c):\n", - " The resultant motor speed, wm = 262 - 53*exp(-t/tau) where tau=845 msec\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.7, Page number: 581" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable Calculations:\n", - "f1=60 #Initial frequency(Hz)\n", - "f2=50 #Changed frequency(Hz)\n", - "Xs=0.836 #Saturated synch reactance(ohm)\n", - "Va=1+0j #Armature voltage(V p.u)\n", - "Ia=1+0j #Armature current(A p.u)\n", - "If_rated=2.84 #Rated field current(A)\n", - "p=6 #No. of poles\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "ns1=120*f1/p\n", - "ns2=120*f2/p\n", - "Eaf=Va-1j*Xs*Ia*exp(1j*0) #field voltage(V)\n", - "Ifo=abs(Eaf)*If_rated #motor field current(A)\n", - "\n", - "#for part(b):\n", - "#Eaf= (wm/wmo)*(If/Ifo)*Eafo\n", - "If=Ifo\n", - "\n", - "#Results:\n", - "print \"part(a):\"\n", - "print \"(i) The motor speed:\",ns1,\"r/min\"\n", - "print \"(ii) The motor field current:\",round(Ifo,2),\"A\"\n", - "print \"part(b):\"\n", - "print \"(i) The changed speed:\",ns2,\"A\"\n", - "print \"(ii) The mototr field current:\",round(If,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part(a):\n", - "(i) The motor speed: 1200.0 r/min\n", - "(ii) The motor field current: 3.7 A\n", - "part(b):\n", - "(i) The changed speed: 1000.0 A\n", - "(ii) The mototr field current: 3.7 A\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.8, Page number: 588" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "iF=2.84 #rated field current(A)\n", - "Vbase=220 #base voltage(V)\n", - "Eaf=220/sqrt(3) #Rms voltage line-to-neutral(V)\n", - "f=60 #Hz\n", - "p=6 #poles\n", - "P_rated=45*10**3 #rated power(W)\n", - "Xs_pu=0.836 #per unit synchronous reactance(ohm)\n", - "\n", - "#Calculations:\n", - "we=2*pi*f\n", - "Laf=sqrt(2)*Eaf/(we*iF) #Armature field reactance(H)\n", - "T_rated=P_rated/(we*2/p)\n", - "#setting rated values to reference values.\n", - "Tref=T_rated\n", - "iFref=iF\n", - "iQ=round((2/3)*(2/p)*Tref/(Laf*iFref),2)\n", - "iD=0\n", - "\n", - "#since theta_me=wc*t, iD=0,we have,\n", - "t=symbols('t')\n", - "wc=120*pi\n", - "def ia(t):\n", - " return iD*cos(wc*t)-iQ*sin(wc*t)\n", - "def ib(t):\n", - " return iD*cos(wc*t-2*pi/3)-iQ*sin(wc*t-2*pi/3)\n", - "def ic(t):\n", - " return iD*cos(wc*t+2*pi/3)-iQ*sin(wc*t+2*pi/3)\n", - "Ibase=P_rated/(sqrt(3)*Eaf)\n", - "Imax=round(ia((pi/(2*wc))))\n", - "Ia=1j*abs(round(Imax/sqrt(2)))\n", - "Eaf=1j*we*Laf*iF/sqrt(2)\n", - "Zbase=Vbase**2/P_rated\n", - "Xs=Xs_pu*Zbase\n", - "Va=1j*Xs*Ia+Eaf #line-to-neutral voltage\n", - "Vt=abs(sqrt(3)*Va)/Vbase #p.u terminal voltage(line-to-line)(V)\n", - "\n", - "#Results:\n", - "print \"part(a):\"\n", - "print \"\\tia(t)=\",ia(t),\"A\"\n", - "print \"\\tib(t)=\",ib(t),\"A\"\n", - "print \"\\tic(t)=\",ic(t),\"A\"\n", - "print \"part(b):\"\n", - "print \"\\tTerminal voltage:\",round(float(Vt),2),\"per unit\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part(a):\n", - "\tia(t)= -167.01*sin(120*pi*t) A\n", - "\tib(t)= 167.01*sin(120*pi*t + pi/3) A\n", - "\tic(t)= -167.01*cos(120*pi*t + pi/6) A\n", - "part(b):\n", - "\tTerminal voltage: 1.3 per unit\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.9, Page number: 591" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "iF=2.84 #rated field current(A)\n", - "Vrated=220 #rated terminal voltage,l-l(V)\n", - "Ibase=118 #base current(A)\n", - "Eaf=220/sqrt(3) #Rms voltage, line-to-neutral(V)\n", - "f=60 #Hz\n", - "p=6 #poles\n", - "P_rated=45*10**3 #rated power(W)\n", - "Xs=0.899 #Synchronous reactance(ohm)\n", - "Xs_pu=0.836 #per unit synchronous reactance(ohm)\n", - "Tref=358 #Reference torque(Nm) (from Ex11.8)\n", - "\n", - "#Calculations:\n", - "Va=Vrated/sqrt(3) #base voltage, line to neutral(V)\n", - "we=2*pi*f\n", - "wm=(2/p)*we\n", - "Laf=sqrt(2)*Eaf/(we*iF) #Armature field reactance(H)\n", - "Ia=Tref*wm/(3*Va)\n", - "Ls=Xs/we #Synchronous inductance(mH)\n", - "delta=-atan(we*Ls*Ia/Va)\n", - "iQ_ref=sqrt(2)*Ia*cos(delta)\n", - "iD_ref=sqrt(2)*Ia*sin(delta)\n", - "iF_ref=(2./3)*(2/p)*Tref/(Laf*iQ_ref)\n", - "\n", - "#since motor is running at rated voltage, base voltage and rated voltage \n", - "# are assumed to be same.\n", - "Va_pu=Va/Va \n", - "Ia_pu=Ia/Ibase\n", - "\n", - "\n", - "#Results:\n", - "print \"The reqd motor field current:\",round(iF_ref,2),\"A\"\n", - "print \"Per unit voltage:\",Va_pu,\"p.u\"\n", - "print \"Per unit current:\",round(Ia_pu),\"p.u\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The reqd motor field current: 3.7 A\n", - "Per unit voltage: 1.0 p.u\n", - "Per unit current: 1.0 p.u\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.10, Page number: 593" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "ns=4000 #rated speed(rpm)\n", - "Va=220 #rated voltage(V)\n", - "Ls=1.75*10**-3 #synchronous inductance(H)\n", - "Prated=25000 #Watts\n", - "n=3200 #rated OC speed(rpm)\n", - "p=2 #No. of poles\n", - "\n", - "#Calculations:\n", - "#for part(a):\n", - "Eaf=Va/sqrt(3)\n", - "wm=ns*pi/30 #rad/sec\n", - "Trated=Prated/wm\n", - "we=(p/2)*n*pi/30\n", - "lambdaPM=sqrt(2)*Eaf/we #flux linked wth permanent magnet(Wb) \n", - "Tref=Trated*0.65 #since motor is operated at 65% of Trated\n", - "iQref=(2./3)*(2/p)*(Tref/lambdaPM)\n", - "\n", - "#for part(b:)\n", - "lambdaD=lambdaPM #since iD=0\n", - "lambdaQ=Ls*iQref\n", - "lambdaa=sqrt((lambdaD**2+lambdaQ**2)/2) #rms line-to-neutral armature flux(Wb)\n", - "lambdaa_base=Eaf/wm\n", - "lambda_pu=lambdaa/lambdaa_base\n", - "\n", - "#for part(c)\n", - "lambdaD=sqrt(2*(lambdaa_base)**2-lambdaQ**2)\n", - "iDref=(lambdaD-lambdaPM)/Ls\n", - "Ia=sqrt((iDref**2+iQref**2)/2) #rms armature current(A)\n", - "Ibase=Prated/(sqrt(3)*Va)\n", - "I_pu=Ia/Ibase\n", - "\n", - "#Results:\n", - "print \"(a) Required quadrature-axis current:\",round(iQref,1),\"A\"\n", - "print \"(b) Resultant armature flux linkage\",round(lambda_pu,2),\"p.u\"\n", - "print \"(c) iD:\",round(iDref,1),\"A\"\n", - "print \" Rms value of armature current:\",round(Ia),\"A\"\n", - "print \" Per unit value of armature current:\",round(I_pu,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Required quadrature-axis current: 48.2 A\n", - "(b) Resultant armature flux linkage 1.27 p.u\n", - "(c) iD: -66.1 A\n", - " Rms value of armature current: 58.0 A\n", - " Per unit value of armature current: 0.88 A\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.11, Page number: 600" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "V10=230/sqrt(3)\n", - "Nph=3\n", - "p=4\n", - "fe0=60\n", - "R1=0.095 #Armature resistance(ohm)\n", - "R2=0.2 #Rotor resistance(ohm)\n", - "X10=0.680 #Armature leakage reactance(ohm)\n", - "X20=0.672 #Rotor leakage reactance(ohm)\n", - "Xm0=18.7 #Inductice reactance(ohm)\n", - "\n", - "\n", - "#Calculations:\n", - "#taking two frequency values:\n", - "fe1=40\n", - "fe2=60\n", - "\n", - "for m in range(1,3,1):\n", - " if m==1:\n", - " fe=fe1\n", - " else:\n", - " fe=fe2\n", - " X1=X10*(fe/fe0)\n", - " X2=X20*(fe/fe0)\n", - " Xm=Xm0*(fe/fe0)\n", - " V1=V10*(fe/fe0)\n", - " \n", - " ws=4*pi*fe/p\n", - " ns=120*fe/p\n", - " V1eq=abs(V1*1j*Xm/(R1+1j*(X1+Xm)))\n", - " Z1eq=1j*Xm*(R1+1j*X1)/(R1+1j*(X1+Xm))\n", - " R1eq=Z1eq.real\n", - " X1eq=Z1eq.imag\n", - " \n", - "#Search over the slip until the Pload = Pmech \n", - " s=0 #slip initialised to 0\n", - " error=1\n", - " \n", - " while error >=0:\n", - " s=s+0.00001\n", - " rpm=ns*(1-s)\n", - " wm=ws*(1-s)\n", - " Tmech=(1/ws)*Nph*V1eq**2*(R2/s)\n", - " Tmech = Tmech/((R1+R2/s)**2 + (X1+X2)**2)\n", - " Pmech=Tmech*wm\n", - " Pload=10.5*10**3*(rpm/1800)**3\n", - " error=Pload-Pmech\n", - " \n", - " print \"\\nFor fe =\",fe,\"Hz :\"\n", - " print \"\\tTerminal voltage=\",round(V1*sqrt(3)),\"V l-l\"\n", - " print \"\\trpm =\",round(rpm)\n", - " print \"\\tslip =\",round(100*s,1),\"%\"\n", - " print \"\\tPload =\",round(Pload/1000,2),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "For fe = 40 Hz :\n", - "\tTerminal voltage= 153.0 V l-l\n", - "\trpm = 1166.0\n", - "\tslip = 2.8 %\n", - "\tPload = 2.86 kW\n", - "\n", - "For fe = 60 Hz :\n", - "\tTerminal voltage= 230.0 V l-l\n", - "\trpm = 1721.0\n", - "\tslip = 4.4 %\n", - "\tPload = 9.17 kW\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.12, Page number: 608" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "V10=230/sqrt(3)\n", - "Nph=3\n", - "p=4\n", - "fe0=60\n", - "R1=0.095 #Armature resistance(ohm)\n", - "R2=0.2 #Rotor resistance(ohm)\n", - "X10=0.680 #Armature leakage reactance(ohm)\n", - "X20=0.672 #Rotor leakage reactance(ohm)\n", - "Xm0=18.7 #Inductice reactance(ohm)\n", - "n=1680 #rpm\n", - "Pmech=9.7*10**3 #Electromagnetic power(W)\n", - "\n", - "\n", - "#Calculations:\n", - "we0=2*pi*fe0\n", - "Lm=Xm0/we0\n", - "LS=Lm+X10/we0\n", - "LR=Lm+X20/we0\n", - "Ra=R1\n", - "RaR=R2\n", - "lambda_rated=sqrt(2)*V10/we0\n", - "lambdaDR=lambda_rated\n", - "#for specified operating condition\n", - "wm=n*(pi/30)\n", - "Tmech=Pmech/wm\n", - "iQ=(2/3)*(2/p)*(LR/Lm)*(Tmech/lambdaDR)\n", - "iD=lambdaDR/Lm\n", - "Ia=sqrt((iD**2+iQ**2)/2)\n", - "wme=(p/2)*wm\n", - "we=wme+(RaR/LR)*(iQ/iD)\n", - "fe=we/(2*pi)\n", - "Va=sqrt(((Ra*iD-we*(LS-Lm**2/LR)*iQ)**2 + (Ra*iQ+we*LS*iD)**2)/2)\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"Rms amplitude of the armature current:\",round(Ia,1),\"A\"\n", - "print \"The electrical frequency:\",round(fe,1),\"Hz\"\n", - "print \"Rms terminal voltage:\",round(sqrt(3)*Va,1),\"V line-line\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rms amplitude of the armature current: 27.9 A\n", - "The electrical frequency: 58.4 Hz\n", - "Rms terminal voltage: 243.6 V line-line\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.13, Page number: 610" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from math import *\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "P_rated = 12*10**3 #Watts\n", - "V_rated = 230 #Rated line-line voltage(v)\n", - "Va_rated = 230/sqrt(3) #Rated line to neutral(V)\n", - "fe_rated = 60 #Hz\n", - "we_rated = 2*pi*fe_rated #rad/sec\n", - "lambda_rated = sqrt(2)*Va_rated/we_rated #Wb\n", - "I_rated = P_rated/(sqrt(3)*V_rated) #A\n", - "Ipeak_base = sqrt(2)*I_rated #A\n", - "p = 4 #poles\n", - "\n", - "V10=V_rated/sqrt(3)\n", - "R1=0.095 #Armature resistance(ohm)\n", - "R2=0.2 #Rotor resistance(ohm)\n", - "X10=0.680 #Armature leakage reactance(ohm)\n", - "X20=0.672 #Rotor leakage reactance(ohm)\n", - "Xm0=18.7 #Inductice reactance(ohm)\n", - "\n", - "#Calculations:\n", - "Lm = Xm0/we_rated;\n", - "LS = Lm + X10/we_rated;\n", - "LR = Lm + X20/we_rated;\n", - "Ra = R1\n", - "RaR = R2\n", - "#operating point:\n", - "n = 1680 #rpm\n", - "lambdaDR=lambda_rated\n", - "wm = n*pi/30\n", - "wme = (p/2)*wm\n", - "Pmech = 9.7*10**3\n", - "Tmech = Pmech/wm\n", - "lambda_DRpu=[0]*42\n", - "iDpu=[0]*42\n", - "Iapu=[0]*42\n", - "fe=[0]*42\n", - "Vapu=[0]*42\n", - "\n", - "for n in range(1,43,1):\n", - " lambdaDR = (0.8+(n-1)*0.4/40)*lambda_rated\n", - " lambda_DRpu[n-1]=lambdaDR/lambda_rated\n", - " iQ=(2/3)*(2/p)*(LR/Lm)*(Tmech/lambdaDR)\n", - " iD=(lambdaDR/Lm)\n", - " iDpu[n-1]=iD/Ipeak_base\n", - " iQR=-(Lm/LR)**iQ\n", - " Ia=sqrt((iD**2+iQ**2)/2)\n", - " Iapu[n-1]=Ia/I_rated\n", - " we=wme-(RaR/LR)*(iQ/iD)\n", - " fe[n-1]=we/(2*pi)\n", - " Va_rms=sqrt(((Ra*iD-we*(LS-Lm**2/LR)*iQ)**2 +(Ra*iQ+ we*LS*iD)**2)/2)\n", - " Vapu[n-1]=Va_rms/Va_rated\n", - "\n", - "#Results:\n", - "print \"The required plot is as shown:\"\n", - "plot(iDpu,Iapu)\n", - "plot(iDpu,Vapu,':')\n", - "xlabel('i_D [per unit] ')\n", - "ylabel('per unit')\n", - "annotate('Ia',xy=(0.21,1.05))\n", - "annotate('Va',xy=(0.21,0.85))\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required plot is as shown:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAENCAYAAAD34uk0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlPXaB/DvMIyKLAKKiAw5CAgoMIAIapK4oZKiqKWo\naaJGdazs1RY7502xsigtLc/JJdfUpExFC9BMR3FFBJVECITBAUUB2RFme94/nsaXOCKMzPAMw/25\nrueKmWeZ+5c6N7+dxzAMCCGEEG2YcB0AIYSQjoeSByGEEK1R8iCEEKI1Sh6EEEK0RsmDEEKI1ih5\nEEII0ZrekkdUVNR2e3v7e97e3hmPO7937945YrH4mo+Pz/Vnn3323PXr130055KSkiZ4eHhkubm5\n5cTGxr6nrxgJIYQ8JYZh9HKcOXMmOC0tzc/LyyvjcefPnz8/rKKiogfDMEhMTJwQFBR0kWEYKJVK\nvouLS25+fr5ILpcLxGLx1czMTE99xUkHHXTQQYf2h95qHsHBwck2NjblzZ0fNmzYhR49elQCQFBQ\n0KXCwkIhAKSkpAS6urrmikQiqUAgUMyaNWt/fHz8FH3FSQghRHumXAcAANu2bVsYFhaWAABFRUWO\nTk5OMs05oVBY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Tp5+eXnpWV5dGa\nay9fvjzkxo0bg8zMzB4OGTLk8vPPP/9r9+7d63788ccXz58/P5zP56tef/31/+zdu3fOSy+99H1d\nXV33oUOHXly7du3yx8XZXKzXrl0TX7161bdLly5yd3f37DfffPNrR0fHIs09sbGx7924cWNQenq6\nnzZlJaStKHkQ8hdGi9VFQ0NDj2sWzZs2bdrBs2fPjuDz+aorV64MDggISAWAhw8fmvXp06cYAPh8\nvmr69Ok/axvTmDFjftf0XwwcODCzoKCgX+N9JLSJmRBdouRByF/S09P9Bg4cmNnSdU1rCQzD8DTv\nzZ8/f9eaNWs+aHpPt27d6purXZiamio1zVv19fXdGp/r2rVrg+ZnPp+vUiqV9G+WGATq8yAE7Oir\nd95554s33njjm5auZRiG99tvv40rLy+3efjwoVl8fPyUESNGnB0zZszvBw4cmFFSUmIHAA8ePLC9\nffv2My09TyQSSVNTUwMA4MCBAzO0idvS0rK6urraUpt7CNEFSh7EaLXU53Hr1i0XzVDdmTNnxr31\n1lsb5s+fv6s1zw0MDEyZPn36z2Kx+NqMGTMO+Pv7p3l6et78+OOP/xUaGnpcLBZfCw0NPV5cXNyn\npViWL1++9ttvv33N398/raysrKfm2if1hWj07Nmz7Nlnnz3n7e2d0bhDnRB9o1V1CWnBrl275qem\npgZ88803bwDsKKgrV64M1rw2RFQjIfpGNQ9CWmBmZvYwMTFxomaSYGtqBFzRTBLUdNQToi9U8yBG\nLSMjw7vpVq/dunWrv3DhwjCuYiLEGFDyIIQQojVqtiKEEKI1Sh6EEEK0RsmDEEKI1ih5EEII0Rol\nD0IIIVr7PxA8wzUjE2EJAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter2.ipynb b/ELECTRIC_MACHINERY/chapter2.ipynb deleted file mode 100755 index 855c3bd6..00000000 --- a/ELECTRIC_MACHINERY/chapter2.ipynb +++ /dev/null @@ -1,761 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2: Transformers" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.1, Page number: 63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Pc=16 #Core loss at Bmax=1.5 T\n", - "VIrms=20 #Voltamperess for the core\n", - "Vrms=194 #Rms induced voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "pf=Pc/VIrms\n", - "a=math.acos(pf)\n", - "I=VIrms/Vrms\n", - "Ic=I*pf\n", - "Im=I*math.fabs(math.sin(a))\n", - "\n", - "#Results:\n", - "print \"Power factor = \", round(pf,1),\"lagging\"\n", - "print \"The core-loss current,Ic =\", round(Ic,3), \"A rms\"\n", - "print \"The magnetising current,Im =\", round(Im,2),\"A rms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power factor = 0.8 lagging\n", - "The core-loss current,Ic = 0.082 A rms\n", - "The magnetising current,Im = 0.06 A rms\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.2, Page number: 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declarations:\n", - "k=5 #turns ratio,N1/N2\n", - "Z2=1+4j #Impedance of secondary side(ohm)\n", - "Vp=120 #primary voltage(V)\n", - "\n", - "#Calculations:\n", - "Z2p=k**2*(Z2)\n", - "I=Vp/Z2p\n", - "Is=k*I\n", - "\n", - "#Results:\n", - "print \"Primary current:\",complex(round(I.real,2),round(I.imag,2)), \"A rms\"\n", - "print \"Current in the short:\",round(Is.real,2)+1j*round(Is.imag,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Primary current: (0.28-1.13j) A rms\n", - "Current in the short: (1.41-5.65j) A\n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.4, Page number: 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "\n", - "#Variable declaration:\n", - "R1=0.72 #Resistance at high voltage side(ohm)\n", - "R2=0.70 #Resistance at low voltage side(ohm)\n", - "X1=0.92 #Reactance at high voltage side(ohm)\n", - "X2=0.90 #Reactance at low voltage side(ohm)\n", - "Zq=632+4370j #Impedance of exciting circuit(ohm)\n", - "\n", - "#Calculations:\n", - "Req=R1+R2\n", - "Xeq=X1+X2 \n", - "Vcd=2400*Zq/(Zq+complex(R1,X1))\n", - "V=complex(round(Vcd.real,2),round(Vcd.imag,3))\n", - "\n", - "#Results:\n", - "print \"Req:\",Req,\"ohm\",\" and Xeq:\",Xeq,\"ohm\"\n", - "print \"Voltage at low voltage terminal:\",V,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Req: 1.42 ohm and Xeq: 1.82 ohm\n", - "Voltage at low voltage terminal: (2399.45+0.316j) V\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.5, Page number: 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Zf=0.30+.160j #Impedance of feeder(ohm)\n", - "Zeq=1.42+3.42j #Equiv.impedance of transformer refd. to primary(ohm)\n", - "k=2400/240 #turns ratio\n", - "P=50000 #power rating of the transformer(VA)\n", - "Vs=2400 #sending end vltage of feeder(V)\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "I=P/2400 #Rated current(A)\n", - "theta=math.acos(0.80)\n", - "Zt=Zf+Zeq #combned impedance of feeder & transformer(ohm)\n", - "R=Zt.real\n", - "X=Zt.imag\n", - "bc=I*X*math.cos(theta)-I*R*math.sin(theta)\n", - "ab=I*R*math.cos(theta)+I*X*math.sin(theta)\n", - "Ob=(Vs**2-bc**2)**0.5\n", - "V2=Ob-ab\n", - "\n", - "\n", - "#Results:\n", - "print \"The voltage at the secondary terminals:\",round(V2/10,0),\"V\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The voltage at the secondary terminals: 233.0 V\n", - "\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.6, Page number: 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#short ckt test readings:\n", - "Vsc=48 #voltage(V)\n", - "Isc=20.8 #current(A)\n", - "Psc=617 #power(W)\n", - " \n", - "#Open ckt test readings:\n", - "Vs=240 #Voltage(V)\n", - "I=5.41 #current(A)\n", - "P=186 #power(W)\n", - "V2ph=2400 #voltage at full load at high voltage side(V)\n", - "pf=0.8 #lagging power factor at full load\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "theta=math.acos(pf)\n", - "Zeqh=Vsc/Isc #subscript h refers to high voltage side\n", - "Reqh=Psc/Isc**2\n", - "Xeqh=math.sqrt(Zeqh**2-Reqh**2)\n", - "Ih=50000/V2ph\n", - "Pout=50000*pf\n", - "Pwind=Ih**2*Reqh\n", - "Ptloss=P+Pwind\n", - "e=(1-Ptloss/(Ptloss+Pout))*100\n", - "Iph=(50000/2400)*complex(math.cos(theta),math.sin(-theta))\n", - "V1ph=V2ph+Iph*complex(Reqh,Xeqh)\n", - "r=(round(abs(V1ph),2)-2400)*100/V2ph\n", - "\n", - "\n", - "#Results:\n", - "print \"The efficiency of the transformer:\",round(e,0),\"%\"\n", - "print \"Volatge Regulation:\",round(r,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The efficiency of the transformer: 98.0 %\n", - "Volatge Regulation: 1.94 %\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.7, Page number: 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Varaible declaration:\n", - "Vx=2400 #Voltage at low voltage side(V)\n", - "Vbc=2400 #Voltage across branch bc(V)\n", - "Vab=240 #Voltage induced in winding ab(V)\n", - "Pl=803 #transformer losses(W)\n", - "pf=0.8 #Power factor of the transformer\n", - "\n", - "#Calculations:\n", - "Vh=Vab+Vbc\n", - "Ih=50000/Vab\n", - "KVA=Vh*Ih/1000 #Kva rating\n", - "P=pf*550000\n", - "e=(1-Pl/(P+Pl))*100\n", - "\n", - "\n", - "#Results:\n", - "print \"Voltage ratings, Vh:\",Vh,\"V \", \"& Vx:\",Vx,\"V\"\n", - "print \"KVA rating as an autotransformer:\",KVA,\"KVA\"\n", - "print \"full-load efficiency:\", round(e,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage ratings, Vh: 2640 V & Vx: 2400 V\n", - "KVA rating as an autotransformer: 550.0 KVA\n", - "full-load efficiency: 99.82 %\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.8, Page number: 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Vl1=4160 #line-to-line voltage at feeder's sending end(V)\n", - "Zf=0.30+.160j #Impedance of feeder(ohm)\n", - "Zeq=1.42+3.42j #Equiv.impedance of transformer refd. to primary(ohm)\n", - "k=2400/240 #turns ratio\n", - "P=50000 #power rating of the transformer(VA)\n", - "Vs=2400 #sending end vltage of feeder(V)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#this problem can be treated on a single phase basis,\n", - "#and whole problem is similar to Ex 2.5.\n", - "\n", - "I=P/2400 #Rated current(A)\n", - "theta=math.acos(0.80)\n", - "Zt=Zf+Zeq #combned impedance of feeder & transformer(ohm)\n", - "R=Zt.real\n", - "X=Zt.imag\n", - "bc=I*X*math.cos(theta)-I*R*math.sin(theta)\n", - "ab=I*R*math.cos(theta)+I*X*math.sin(theta)\n", - "Ob=(Vs**2-bc**2)**0.5\n", - "V2=Ob-ab\n", - "Vload=V2/k\n", - "\n", - "#Results:\n", - "print \"The line to line voltage:\",round(Vload,0),\"V line-to-line\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The line to line voltage: 233.0 V line-to-line\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.9, Page number: 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import cmath\n", - "\n", - "#Variable decclaration:\n", - "#All resistances, reactances, & impedances are on per phase basis\n", - "Req=1.42 #Series resist. of del-del transformer referred to 2400v side(ohm)\n", - "Xeq=1.82 #Series react. of del-del transformer referred to 2400v side(ohm)\n", - "Zs=0.17+0.92j #Equiv impedance of sending end transformer(ohm)\n", - "Xf=0.8j #Reactance of the feeder(ohm)\n", - "Vf=2400 #Voltage of the feeder(V)\n", - "k=10 #turns ratio(Vp/Vs)\n", - "\n", - "\n", - "#Calculations:\n", - "Zt=(complex(Req,Xeq)/3)+Zs+Xf\n", - "Ztot=complex(round(Zt.real,2),round(Zt.imag,2))\n", - "If=math.floor(Vf/(math.sqrt(3))/round(abs(Ztot),2))\n", - "I1=If/math.sqrt(3)\n", - "I2=I1*k\n", - "Ic=I2*math.sqrt(3)\n", - "\n", - "\n", - "#Results:\n", - "print \"Short circuit current in the 2400 feeder, per phase wires:\",round(Ic,1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Short circuit current in the 2400 feeder, per phase wires: 5720.0 A\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.10, Page number: 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "X1=143 #Reactance of primary(ohm)\n", - "X21=164 #Reactance of secondary ref. to primary(ohm)\n", - "Xm=163*10**3 #Reactance of magnetising ckt(ohm)\n", - "R1=128 #Resistance of primary(ohm)\n", - "R21=141 #Resistane of secondary ref. to primary(ohm)\n", - "k=20 #turns ratio(2400/120)\n", - "V1=2400 #primary voltage(V)\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "V2=(V1/k)*complex(0,Xm)/complex(R1,X1+Xm)\n", - "mag=abs(V2)\n", - "ph=degrees(cmath.phase(V2))\n", - "\n", - "\n", - "#Results:\n", - "print \"Magnitude of V2:\",round(mag,2),\"V\"\n", - "print \"Phase of V2:\",round(ph,3),\"degrees\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of V2: 119.89 V\n", - "Phase of V2: 0.045 degrees\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.11, Page number: 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "\n", - "\n", - "#variable declaration:\n", - "X1=44.8*10**-6 #Reactance of the primary(ohm)\n", - "R1=10.3*10**-6 #Resistance of the primary(ohm)\n", - "X21=54.3*10**-6 #Reactance of the secondary refd. to primary(ohm)\n", - "R21=9.6*10**-6 #Resistance of secondary ref. to primary(ohm)\n", - "Xm=17.7*10**-3 #Reactance of the magnetising ckt(ohm)\n", - "k=5/800 #turms ratio(I2/I1)\n", - "Zl=2.5+0j #Impedance ofthe load(ohm)\n", - "I1=800 #primary current(A)\n", - "\n", - "#Calculations:\n", - "Zp=k**2*Zl\n", - "I2=I1*k*Xm*1j/(Zp+R21+(X21+Xm)*1j)\n", - "phase=cmath.phase(I2)\n", - "\n", - "\n", - "#Results:\n", - "print \"Magnitude of current:\",round(abs(I2),2),\"A\"\n", - "print \"Phase of the current:\",round(math.degrees(phase),3),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of current: 4.98 A\n", - "Phase of the current: 0.346 degrees\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.12, Page number: 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "XL=0.040 #Reactance at l.v side(ohm)\n", - "XH=3.75 #Reactance at h.v side(ohm)\n", - "Xm=114 #Magnetising reactance(ohm)\n", - "RL=0.76*10**-3 #Resistance at l.v.side(ohm)\n", - "RH=0.085 #Resistance at l.v.side(ohm)\n", - "VA_base=100*10**6 #base VA\n", - "V_base=7.97*10**3 #base voltage(V)\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "#for l.v side\n", - "VA_base=100*10**6 #base VA\n", - "V_base=7.97*10**3 #base voltage(V)\n", - "Rbase1=Xbase1=V_base**2/VA_base\n", - "\n", - "#for h.v side:\n", - "VA_base=100*10**6 #base VA\n", - "V_base=79.7*10**3 #base voltage(V)\n", - "Rbase2=Xbase2=V_base**2/VA_base\n", - "\n", - "XL_pu=XL/Xbase1\n", - "XH_pu=XH/Xbase2\n", - "Xm_pu=Xm/Xbase1\n", - "RL_pu=RL/Rbase1\n", - "RH_pu=RH/Rbase2\n", - "K_pu=1 #per unit utrns ratio\n", - "\n", - "#Results:\n", - "print \"The per unit parameters are:\"\n", - "print \"XL_pu =\",round(XL_pu,3),\"p.u\"\n", - "print \"XH_pu =\",round(XH_pu,4),\"p.u\"\n", - "print \"Xm_pu =\",math.ceil(Xm_pu),\"p.u\"\n", - "print \"RL_pu =\",round(RL_pu,4),\"p.u\"\n", - "print \"XL_pu =\",round(RH_pu,4),\"p.u\"\n", - "print \"Turns ratio =\",K_pu,\"p.u\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The per unit parameters are:\n", - "XL_pu = 0.063 p.u\n", - "XH_pu = 0.059 p.u\n", - "Xm_pu = 180.0 p.u\n", - "RL_pu = 0.0012 p.u\n", - "XL_pu = 0.0013 p.u\n", - "Turns ratio = 1 p.u\n" - ] - } - ], - "prompt_number": 59 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.13, Page number: 98" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "\n", - "\n", - "#Variable declaration:\n", - "Ic=5.41 #Exciting current ref. to low volt. side(A)\n", - "k=10 #turns ratio(N1/N2=2400/240)\n", - "Vbh=2400 #base voltage at primary side(V)\n", - "Vbl=240 #base voltage at secondary side(V)\n", - "Ibh=20.8 #base current at primary side(A)\n", - "Ibl=208 #base current at secondary side(A)\n", - "Z=1.42+1.82j #Equiv.impedance ref.to high voltage side(ohm)\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "Zbh=Vbh/Ibh\n", - "Zbl=Vbl/Ibl\n", - "Icl=Ic/Ibl\n", - "Ich=Ic/(Ibh*k)\n", - "Zl=Z/(k**2*Zbl)\n", - "Zh=Z/Zbh\n", - "\n", - "\n", - "#Results:\n", - "print \"Per unit exciting current on low volt. sides:\",round(Icl,3,),\"A\" \n", - "print \"Per unit exciting current on high volt. sides:\",round(Ich,3),\"A\"\n", - "print \"per unit equiv.impedance at low volt. sides:\",round(Zl.real,4)+round(Zl.imag,4)*1j,\"ohm\"\n", - "print \"per unit equiv.impedance at high voltage sides:\",round(Zh.real,4)+round(Zh.imag,4)*1j,\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Per unit exciting current on low volt. sides: 0.026 A\n", - "Per unit exciting current on high volt. sides: 0.026 A\n", - "per unit equiv.impedance at low volt. sides: (0.0123+0.0158j) ohm\n", - "per unit equiv.impedance at high voltage sides: (0.0123+0.0158j) ohm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.14, Page number: 100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "Vb=24000 #Base voltage of secondary of sending end transformer(V) \n", - "Z=0.17+0.92j #Impedance of sending end transformer ref. to 2400V side(ohm)\n", - "P=150 #Power rating of the transformer(KVA)\n", - "V=2400 #Primary voltage of sending end transformer(v)\n", - "Ztot=0.64+2.33j #Total series impedance(ohm)\n", - "\n", - "#Calculations:\n", - "Zb=V**2/(P*10**3)\n", - "Ztotb=Ztot/Zb\n", - "Vsb=1 #Vs in terms of per unit values\n", - "Isc=Vsb/abs(Ztotb) #Short current in per unit values(A)\n", - "Ib1=P*10**3/(sqrt(3)*2400) #base current of the feeder at 2400V side(A)\n", - "If=Ib1*Isc\n", - "Ib2=P*10**3/(sqrt(3)*240)\n", - "Iscs=Isc*Ib2 #short ckt current at 2400V afeeder side (A)\n", - "\n", - "#Results:\n", - "print \"Short circuit current in 2400 feeder:\",round(Iscs/10**3,2),\"KA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Short circuit current in 2400 feeder: 5.73 KA\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.15, Page number: 102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "P=250*10**3 #power rating of transformer(KVA)\n", - "Vp=2400 #primary volatge(V)\n", - "Vs=460 #secondary voltage(V)\n", - "Pb=100*10**3 #new base power of transformer(KVA)\n", - "Vb=460 #new base voltage(V)\n", - "Z=0.026+0.12j #series impedance on its own base(ohm)\n", - "Vl=438 #load voltage(V)\n", - "Pl=95*10**3 #power drawn by the load(kW)\n", - "\n", - "#Calculations:\n", - "Zbo=Vs**2/P #base impedance for the transformer(ohm)\n", - "Zbn=Vb**2/Pb #base impedance for the transformer at 100KVA base(ohm)\n", - "Zpn=Z*Zbo/Zbn #base impedance at 100KVA base(ohm)\n", - "Vpl=Vl/Vb #per unit load voltage(V)\n", - "Ppl=Pl/Pb #per unit load power\n", - "Ipl=Ppl/Vpl #per unit load current(A)\n", - "Vpp=Vpl+Ipl*Zpn #high side voltage of the transformer(V) \n", - "\n", - "\n", - "#Results:\n", - "print \"The high side voltage:\",round(abs(Vpp*Vp),0),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The high side voltage: 2313.0 V\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter3.ipynb b/ELECTRIC_MACHINERY/chapter3.ipynb deleted file mode 100755 index 411be995..00000000 --- a/ELECTRIC_MACHINERY/chapter3.ipynb +++ /dev/null @@ -1,430 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3da4e1bbe19be5f3a05399c95840acc2f1758f76d57c3a0e757cbfa9a562b633" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Electromechanical-Energy-Conversion-Principles " - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.1, Page number: 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "I=10 #current in the coil(A)\n", - "Bo=0.02 #magnetic field (T)\n", - "R=0.05 #radius of the rotor(m)\n", - "l=0.3 #rotor length(m)\n", - "\n", - "\n", - "#Calculations:\n", - "q=symbols('q') #Direction of torque\n", - "F1=-2*I*l*Bo*sin(q) #Force on the coil(N)\n", - "T=F1*R #Torque scting in theta direction(Nm)\n", - "\n", - "\n", - "#Results:\n", - "print \"Force per unit length:\",T,\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Force per unit length: -0.006*sin(q) Nm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.2, Page number: 121" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration\n", - "N=1000 #No of winding turns\n", - "g=2 #Air gap width(mm)\n", - "d=0.15 #Magnetic core width,d (m)\n", - "l=0.1 #thickness of core(0.1)\n", - "x,d=symbols('x d') #where h is height of plunger(m) \n", - " #Lx is inductance as a function of x(H)\n", - "i=10 #Current in the winding(A)\n", - "uo=4*3.14*10**-7 #permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "Lx=(uo*N**2*l*d)/(2*g*10**-3)*(1-x/d)\n", - "Wfld=(1./2)*Lx*i**2\n", - "\n", - "\n", - "#Results:\n", - "print \"The magnetic energy stored, Wfld:\",\"236*(1-x/d) J\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnetic energy stored, Wfld: 236*(1-x/d) J\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.3, Page number: 124" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "import numpy as np\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "xdata=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0] #(cm)\n", - "Ldata=[2.8, 2.26, 1.78, 1.52, 1.34, 1.26, 1.20, 1.16, 1.13, 1.11, 1.10] #(mH)\n", - "I = 0.75 #(A)\n", - "\n", - "\n", - "#Calculations:\n", - "x=0.01*np.array(xdata)\n", - "L=0.001*np.array(Ldata)\n", - "length=len(x)\n", - "xmax=x[length-1]\n", - "a=polyfit(x,L,4)\n", - "xfit=[0]*102\n", - "Lfit=[0]*102\n", - "for n in range(1,102,1):\n", - " xfit[n-1]=xmax*(n-1)/100\n", - " Lfit[n-1]=a[0]*xfit[n-1]**4+a[1]*xfit[n-1]**3+a[2]*xfit[n-1]**2+a[3]*xfit[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(xdata,Ldata,'o')\n", - "plot(100*np.array(xfit),1000*np.array(Lfit),'g.')\n", - "xlabel('x [cm] ')\n", - "ylabel('L [mH] ')\n", - "title('Inductance,L vs length,l')\n", - "grid()\n", - "print \"The required plots are shown below:\"\n", - "show()\n", - "\n", - "#set current to 0.75 A\n", - "I=0.75\n", - "F=[0]*102\n", - "for n in range(1,102,1):\n", - " xfit[n-1]=0.002+0.016*(n-1)/100\n", - " F[n-1]=4*a[0]*xfit[n-1]**3+3*a[1]*xfit[n-1]**2+2*a[2]*xfit[n-1]**1+a[3]\n", - " F[n-1]=(I**2/2)*F[n-1]\n", - "plot(100*np.array(xfit),F,'b.')\n", - "xlabel('x [cm]')\n", - "ylabel('Force [N]')\n", - "title('Force, F vs length,l')\n", - "grid()\n", - "\n", - "#Results:\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required plots are shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEXCAYAAABCjVgAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX6B/BnWARGloFUUAYcE0zGhUUJMxWsFIFAb4Rb\nKpgGP/spebNdTczl3rpabjfDvIlmSIZZKEtaMqgpkopLYj+EGmWQSIFRdhDO7w+auePEMgxnmDMz\nn/frNa+Xh3Nm+PI4r3nmPM/5fg+PYRgCAAAgIjLT9wAAAIA7kBQAAEAJSQEAAJSQFAAAQAlJAQAA\nlJAUAABACUkBdCohISFh/vz5n+t7HMYgJiYmafXq1ev08btFIpH0hx9+eFqTY/F/btiQFKBL3flA\nUMfj8ViZCGNmZtb666+/PsrGa7Gltz/8eDwew1Y8O9Ne8unO7+6NMYLuIClAl3rrw6grDMPw9D0G\nVfqICddi0B5DGCN0DEkBuiUpKSlmwoQJp19//fV/OTk5VT766KO/ZmVlTVPs/+2334YEBgbm2Nvb\n3586deqxu3fv9lPsk0gkQW5ubiWqr6d6FtLS0mK+cePGdzw8PIrs7e3v+/v7/ySTyYSTJk06SUTk\n7e192c7Orvqrr76KksvlgmefffbogAED/nBycqoMDw8/Ulpa6qp43aCgIMm777773oQJE07b29vf\nDw4O/q6iouIRxf7Tp09PGD9+/BlHR8cqd3f3W3v37o0mImpsbLR67bXXNg0ePPimi4vL70uWLNnZ\n0NBg3V4sNP3wW7Jkyc7XX3/9X6o/mz59+rdbtmxZTkT0/vvvvykUCmX29vb3hw8f/suJEyee0uR1\njx49+qyPj88lR0fHqieffPLHq1evjlKN6+bNm1d4e3tfFggE8tmzZ6c0NjZaKfZ/8MEHbwwaNOi2\nUCiU7d69e7GZmVlrcXHx0F27dsUmJyfP/eCDD96ws7Ornj59+reK5+Tn5/t29HpgRBiGwQOPTh8i\nk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TpOGxub+pqaGlsiopKSErf2Pnjv3LnTv66ujj9mzJgLjo6O\nVY6OjlUhISGZqiUwbfB4PGb27NkpBw4cmEPUlpReeOGFL4iIPDw8irZs2bI8ISEhwdnZuXzOnDkH\nysrKBnb1mjdv3hy8efPmFYpxOjo6VslkMuHt27cHdfT319bW9iUiKisrG6haxhMKhTJN/o6O4gnG\nBUkBWDNw4MCyqqoqx7q6Or7iZzdv3hys+Hbbt2/fWtV9LS0t5nfu3Omv2HZzcyspKiry0OR3bd68\neUVhYeGwvLy8x+/du+eQk5MTyDAMT5ME5O7ufqu4uHio+s/79et318bGpr6goEBcVVXlWFVV5SiX\nywX379+3b+91utNonjNnzoHU1NTnb968OTgvL+/xyMjIQ6r7Tp06NVERqzfffPN9Tf6GlStXblCM\ns6qqyrGmpsZ21qxZX3b13IEDB5aVlJS4KbZV/63p39XZMVy4KAG0h6QArBk8ePDNsWPHnl+zZs3a\n5uZmy9OnT084evTos4r9w4YNK2xoaLDOyMgIbW5utly/fv0q1Wbl4sWLd69evXpdUVGRB8MwvCtX\nroyurKx0IiJydnYuV/0gr6mpsbWxsal3cHC4V1lZ6aRJCURh7ty5yd9///0zX331VdSDBw8sKioq\nHrl8+bK3mZlZ60svvfTp8uXLtyiSVWlpqeuxY8emKp5rZmbWevLkyUmK129tbTVrbGy0amhosG5o\naLDuqPnq4+NzqV+/fncXL168e9q0aVn29vb3iYgKCwuHnThx4qnGxkYrKyurRmtr6wZzc/OW9l5D\nNem99NJLn37yySf/k5eX9zjDMLza2tq+6enpYZ19e1c8d+bMmQf37Nmz8JdffhleV1fHX7du3WrV\n45ydncu7uvxXPbbqcensucBtSArQLe1dnqq6nZycPPfcuXMBTk5Ole+999670dHRexX7HBwc7n38\n8ccvL168eLdQKJTZ2trWqJYxXn311Q9nzpx5cOrUqcccHBzuvfTSS58qrvxJSEhIiI6O3uvo6FiV\nmpr6/PLly7fU19fb9OvX7+748ePPhISEZHY2LtVxu7u738rIyAjdvHnzikceeaTC19c3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kT9rsgjbvn37Fnh7e1/28fG5pFiBMiYmJunl\nl1/++Iknnjg7dOjQYolEEhQdHb1XLBYXLFy4cI/u/xqAnuPEjGYAffH39/8pIiIibdWqVevr6+tt\n5s+f/7lYLC7o7DnXrl0bsWHDhpVnz559wsnJqVIulwuI2hYZk8vlgrNnzz6RlpYWERERkXb27Nkn\nxGJxgb+//0+XL1/29vb2vtw7fxmAdpAUwOS9++67740dO/a8jY1N/fbt25d1dfyJEyeemjlz5kHF\nmjwCgUCu2BceHn6EiGjkyJE/u7i4/D5ixIhrREQjRoy4JpVKRUgKwHUoH4HJu3v3br/a2tq+NTU1\ntvX19TZdHc/j8ZiObgTTp0+fJiIiMzOzVisrq0bFz83MzFofPHiAL2HAeUgKYPLi4uIS169fv2ru\n3LnJb7755vtdHf/UU0+d+Oqrr6IUSzpXVVU56n6UAL0D31zApO3bt2+BlZVV4+zZs1NaW1vNxo8f\nf0YikQQFBQVJOnqOWCwuWLly5YbAwMAcc3PzFj8/v4ufffbZi0QP37xE/eoiXG0EhgCrpAJ0QSqV\nisLDw49cvXp1FFuvOXny5OzNmzevYGvuAwBbUD4C6IKFhcWDe/fuObA5ee23334bYmlp2czG6wGw\nCWcKAACghDMFAABQQlIAAAAlJAUAAFBCUgAAACUkBQAAUPp/47lOQdthO6gAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEXCAYAAACK4bLWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUU2f6B/AnbK0IGFEJStAoIYBVFgvSX6dWfqUBoTWi\n1ood2+i4nU5pp+2o0Kl1bOsSHDu/tjrtUacVqiPiUoUZEY1K1KkjaMGlBQtYU0MkUVlcqpXt/v5g\nrk1TlgA35CZ8P+fcU9+bN8mb56R5uO9z33sFDMMQAABATznZegAAAOAYkFAAAIATSCgAAMAJJBQA\nAOAEEgoAAHACCQUAADiBhAJgJ5ycnFq+//77Ub39vhqNJsbf319naX+JRKI9cuRIrDXHBPyEhAK8\nJZFItO7u7nc9PT1ve3p63vby8rplMBh8bT0ulpOTU4uHh8cddnze3t61th4TF3qauAQCASMQCLDA\nrQ9ysfUAANojEAiYf/3rX88+9dRTR7v7Gk1NTS4uLi5NXI7L1Pnz50NHjRr1vbVe31YYhhHYegxg\nf3CEAnbn/v37D73++usf+vn56f38/PRvvPHG/zU0NLgRtU7PiMXiqrVr1y4dOnRo9bx58z5raWlx\nWr169Z+kUmmll5fXrcjIyDNVVVViIqKLFy8Gy+Vy9aBBg2qCg4Mv7tq1awbXYxUKhfXffvvtI+y+\n69evD3F3d79748aNwTdu3Bj87LPP/mvgwIF1gwYNqnnyySePW/Jjfv/+/YcWL168bsSIET/4+voa\nXn755U9/+umnh01j8Ne//vVNkUhkHDZs2NWMjIw57HNramoGTZ48+Z8DBgy4OX78+KJly5atnDBh\nwgkioieffPI4EVFYWNg5T0/P26bxaO/1AFhIKMBrbf24rlq16u2ioqLx586dCzt37lxYUVHR+JUr\nVy5jHzcajaK6urqBV65cGb5x48ZFH3zwwR937NiRfODAgYRbt255bdmyZa67u/vdH3/8sb9cLlfP\nnj172/Xr14fs2LEj+fe///0nZWVlIT0Zn6mHHnro/vTp0/dkZWXNYvft3Lnz+ZiYGM3gwYNvfPDB\nB3/09/fX3bhxY/C1a9d81qxZ85Yl00VpaWmqyspK6blz58IqKyuler3e77333ltuGoNbt255Xb16\nddhnn30275VXXvnbzZs3BxARvfLKK3/z9PS8bTQaRZmZmcovvvjiJfY9jx8//iRR65HX7du3PWfM\nmLGLiMhgMPi293oADzAMgw0bL7cRI0ZoPTw8bguFwjqhUFg3derULxmGoVGjRl06cODAJLbfwYMH\n4yQSyWWGYaigoCDGzc3t/v37993Yx4OCgi7m5uZONn/9HTt2zJwwYcJx030LFy7c+O677y63ZHwC\ngaDFy8vrJju+P/zhDx+21e/w4cOxAQEBlWz78ccf/2r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6cuXKcKLufz8d9p7yAADQ\nu+x6ygsAAPgDCQUAADiBhAIAAJxAQgEAAE4goQAAACeQUAB6gbOzc/O4ceOKq6urh/b0tX7729/+\nY9CgQTV79uyZzsXYALhi1+tQAOyFu7v73eLi4nFcvNY//vGP386dO3cLLtMCfIMjFIAuOn36dFRY\nWNi5+/fvP/Tjjz/2HzNmzDddvRBhfn7+pEcfffTr8PDws3K5XE1EtGLFihVKpTLzySefPC6RSLRf\nfvnltMWLF68LDQ09n5CQcKCpqekXfwDiyrrANzhCAeiiqKio0wqFInfZsmUr79271+/FF1/cOnr0\n6FJLn3/9+vUhCxcu3HTixIkJI0aM+KG+vl7IPnb58uWRBQUF//vtt98+8thjj53au3fv1HXr1i2e\nNm3al/v3739mypQpOdb5VAA9h4QC0A3Lly9/LzIy8ky/fv3urV+//tWuPPfUqVOPTZw48diIESN+\nICISCoX1RK1Xck1ISDjg7OzcPGbMmG9aWlqc4uPjDxIRjR079oJWq5Vw/kEAOIQpL4BuuHHjxuAf\nf/yx/507dzzu3bvXryvPFQgETHvTVW5ubg1ERE5OTi2urq6N7H4nJ6cW8ykvAL5BQgHohkWLFm1c\nuXLlshdeeGF7ampqeleeGx0dXXj8+PEn2SMOXGIdHAX+4gHooi+++OKlhx566H5ycvKOlpYWp8cf\nf/ykRqOJiYmJ0Vjy/CFDhlzftGnTwmnTpn3Z0tLiJBKJjAcPHown+uUNjMzP4sJZXcB3uNowQC/w\n9PS8ffv2bU+uXm/OnDkZkydP/uf06dP3cPWaAD2FKS+AXuDl5XWLy4WNJ06cmNCvX797XIwNgCs4\nQgEAAE7gCAUAADiBhAIAAJxAQgEAAE4goQAAACeQUAAAgBP/Dy3G3mtzwdUhAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.4, Page number: 128" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Lo=10.6*10**-3 #Initial inductance(H)\n", - "L2=2.7*10**-3 #H\n", - "\n", - "\n", - "#Calculations:\n", - "theta,i=symbols('theta i')\n", - "L=Lo+L2*cos(2*theta)\n", - "i=2 #Coil current,A\n", - "def T(theta):\n", - " return i**2*diff(L,theta)/2\n", - " \n", - "\n", - "#Results:\n", - "print \"Torque,Tfld =\",T(theta),\" N.m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Torque,Tfld = -0.0108*sin(2*theta) N.m\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.6, Page number: 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "r1=2.5*10**-2 #radius of rotor(m)\n", - "h=1.8*10**-2 #Axial length(m)\n", - "g=3*10**-3 #Air gap length(m)\n", - "Bag=1.65 #Magnetic field(T)\n", - "uo=4*pi*10**-7 #permeability of free space(H/m)\n", - "\n", - "#Calculations:\n", - "H=Bag/uo\n", - "Ni=2*g*H\n", - "T=uo*(Ni)**2*h*(r1+0.5*g)/(4*g)\n", - "\n", - "#Results:\n", - "print \"The maximum torque:\", round(T,2),\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum torque: 3.1 Nm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.7, Page number: 140" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from matplotlib import *\n", - "\n", - "#Variable declaration:\n", - "i1=0.8\n", - "i2=0.01\n", - "\n", - "\n", - "#Calculations & Results:\n", - "def df(f,x,h=0.1e-10):\n", - " return ( f(x+h/2) - f(x-h/2) )/h\n", - "\n", - "\n", - "\n", - "def l11(x):\n", - " return (3+cos(2*x))/1000.0\n", - "\n", - "def l12(x):\n", - " return (0.3*cos(x))\n", - "\n", - "def l22(x):\n", - " return (30+10*cos(2*x))\n", - "\n", - "def g(x):\n", - " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x) + (i1*i2)*df(l12,x)\n", - "\n", - "def r(x):\n", - " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x)\n", - "def s(x):\n", - " return (i1*i2)*df(l12,x)\n", - "\n", - "x=linspace(-pi,pi,100000)\n", - "\n", - "\n", - "plot(x,r(x))\n", - "plot(x,s(x))\n", - "plot(x,g(x))\n", - "grid()\n", - "annotate(\"Total torque\",xy=(-0.5,0.003))\n", - "annotate(\"Reluctance torque\",xy=(-2,-0.0015))\n", - "annotate(\"Mutual Interaction torque\",xy=(1.6,-0.0026))\n", - "xlabel(\"Theta [radians]\")\n", - "ylabel(\"Torque [N.m]\")\n", - "xlim(-pi,pi)\n", - "\n", - "\n", - "#Results\n", - "print \"Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)\"\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAcAAAAEMCAYAAABTD2a8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdUFNcXx7+IGo2N2EABRUHBQlexxaDIT1TEqLHEhgW7\nxsQSY2Jijd1YY7Ci2Asq2BtgB6VYIqCgoHQVQXrZ3fv747kEcWEpuzvLMJ9z5hxm95V7md29M+/d\nokFEEBAQEBAQqGxU4VoAAQEBAQEBLhAMoICAgIBApUQwgAICAgIClRLBAAoICAgIVEoEAyggICAg\nUCkR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3P1PXmDwej3h7e0e2a9fuvazvgICALbdv3+YrKyuXy+LT\nXrx40Wny5MmHeDwe0dXVzXRxcblQXX/h4eETQkNDZ5WVlalkZmbqJiUlWVhZWd0DAB8fn6MAYGtr\nm3D06FEfAHB0dLy8cOHCDVOmTDno4+NzVE9PL6Mx7x2F0pqgBpBCqYLMCAGAsrJyeXFxcXupVKrU\npUuXXLFYLKyuTeV0Rv7+/nsjIyO9ra2t74pEIr/6ppWRJSQFgA0bNizU1dXN3L9//9Ty8nJlWfBy\nHo9HSB1Bv1NTU/usX7/+s/j4eHtNTc0306ZN2yNbxq2sn7KycrlsvzEwMHD1qFGjfvv99989HR0d\nL585c8bd1NQ0uT5yUyitFboHSKHUASGEp6GhUdCnT5/UI0eOjJXdu3Pnjg0AaGhoFOTn53eW1S8s\nLFTX0dHJKi0tVT1w4MDHjRkzPz+/s46OThYA7Nu377/l5eXKAODk5HQxPDx8glQqVcrMzNSNiYkZ\nWl3bTp06ve3cuXN+dna2dlRU1Ii6xnv8+LGhpaXl/aVLl67p16/fTdneIIXCZagBpFDwzxlc1eS0\nsuuDBw9O2bVr1wyBQJBoZWV1LzIy0hsAJk6ceHjt2rVL7Ozsbj158qTvt99++2X//v2vDx48+JK5\nufmD+ia7rVxv3rx520QikZ9AIEhMTk42lSVcHTNmzDFjY+MUCwuLJD8/P9GgQYOuVO2Hz+ffFgqF\nYjMzs4dTpkw5OHjw4Et1jblx48b/WVtb3+Xz+bfV1NRKRowYEVUfmSmU1gzNBkGhsMDXX3+9Ql1d\nvfCzzz5bz7YsdaGhoVFQUFCgwbYcFIq8oTNACoUF1NXVC3fu3Dm7qY7wikTmCC9biqVQuAadAVIo\nFAqlTUJngBQKhUJpk1ADSKFQKJQ2CTWAFAqFQmmTUANIoVAolDYJNYAUCoVCaZP8PyE+5ELWm4dH\nAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.9, Page number: 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "W=4.0*10**-2 #width of plunger lower arm(m)\n", - "W1=4.5*10**-2 #width of plunger upper arm(m)\n", - "D=3.5*10**-2 #depth of plunger (m)\n", - "d=8*10**-3 #length of magnet(m)\n", - "go=1*10**-3 #air gap length(m)\n", - "uo=4*pi*10**-7 #Permeability of free space(A.turns/m)\n", - "ur=1.06*uo #Relativity permeability\n", - "Hc1=-940 #Magnetising force(kA/m)\n", - "Bt=1.25 #Magnetic field induction(T)\n", - "N=1500 #No of turns\n", - "x=3*10**-3 #Position of plunger(m)\n", - "\n", - "#Calculation:\n", - "Ni=-Hc1*d*10**3\n", - "Rx=x/(uo*W1*D)\n", - "Ro=go/(uo*W*D)\n", - "Rm=d/(ur*W*D)\n", - "f=-((Ni)**2)/(uo*W1*D*(Rx+Ro+Rm)**2)\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"The x-directed force:\",round(f,1),\"N\"\n", - "print \"Current in the excitation winding:\",round(Ni/N,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The x-directed force: -703.3 N\n", - "Current in the excitation winding: 5.01 A\n" - ] - } - ], - "prompt_number": 31 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter4.ipynb b/ELECTRIC_MACHINERY/chapter4.ipynb deleted file mode 100755 index aef0df05..00000000 --- a/ELECTRIC_MACHINERY/chapter4.ipynb +++ /dev/null @@ -1,277 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4: Introduction to Rotating Machines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.2, Page number: 199" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "uo=4*pi*10**-7 #Permeabolity of free space(H/m)\n", - "g=0.7*10**-3 #Length of air gap(m)\n", - "p=4 #no. of poles\n", - "Ba=1.6 #Magnetic flux density(T)\n", - "Kr=0.935 #Winding constant\n", - "N=263 #No. of turns\n", - "\n", - "#Calculations:\n", - "Ir=(pi*g*p/(4*uo*Kr*N))*1.6\n", - "\n", - "\n", - "#Results:\n", - "print \"Rotor winding current:\",round(Ir,1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rotor winding current: 11.4 A\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.3, Page number: 208" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "fc=60 #frequency of the current(Hz)\n", - "p=[2, 4, 6] #matrix of no. of poles\n", - "\n", - "#Calculations:\n", - "ns=[0]*3\n", - "ws=[0]*3\n", - "wc=2*pi*fc\n", - "for n in range(0,3,1):\n", - " ws[n]=round((2/p[n])*wc,0)\n", - " \n", - "for i in range(0,3,1):\n", - " ns[i]=round(120*fc/p[i],0)\n", - "\n", - "\n", - "#Results:\n", - "print \"The synchronous angular velocities:\",ws, \"rad/sec\"\n", - "print \"The speed of the rotor:\",ns,\"r/min\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The synchronous angular velocities: [377.0, 188.0, 126.0] rad/sec\n", - "The speed of the rotor: [3600.0, 1800.0, 1200.0] r/min\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.5, Page number: 212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Nf=68 #Field winding\n", - "Na=18 #Armature winding\n", - "r=0.53 #mean air gap radius(m)\n", - "l=3.8 #Armature winding length(m)\n", - "Kf=0.945 #Winding factor of field winding\n", - "Ka=0.933 #Winding factor of armature winding\n", - "g=4.5*10**-2 #Air gap length(m)\n", - "p=2 #No. of poles\n", - "If=720 #field current(A)\n", - "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", - "f=60 #Frequency curent(Hz)\n", - "\n", - "#Calculations:\n", - "Fag1_peak=4*Kf*Nf*If/(pi*p)\n", - "Bag1_peak=uo*Fag1_peak/g\n", - "Qp=2*Bag1_peak*l*r\n", - "Erms=sqrt(3)*sqrt(2)*pi*f*Ka*Na*Qp\n", - "\n", - "\n", - "#Results:\n", - "print \"The peak fundamental mmf,Fag1_peak: \",round(Fag1_peak/10000,2),\"* 10^4 A.turns/pole\"\n", - "print \"\\nThe flux density in the air gap,Bag1_peak: \",round(Bag1_peak,2),\"T\"\n", - "print \"\\nThe fundamental flux per pole, Qp:\" ,round(Qp,2),\"Wb\"\n", - "print \"\\nThe rms value of open circuit voltage,Erms: \",round(Erms/1000,1),\"KV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The peak fundamental mmf,Fag1_peak: 2.95 * 10^4 A.turns/pole\n", - "\n", - "The flux density in the air gap,Bag1_peak: 0.82 T\n", - "\n", - "The fundamental flux per pole, Qp: 3.31 Wb\n", - "\n", - "The rms value of open circuit voltage,Erms: 25.7 KV\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.8, Page number: 225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable Declaration:\n", - "ns=1800 #Speed of rotor(rpm)\n", - "f=60 #Frequency(Hz)\n", - "g=1.2*10**-3 #Air gap length(m)\n", - "D=0.27 #Avg diameter of the gap(m)\n", - "Kr=0.976 #Winding factor\n", - "l=0.32 #Axial length(m)\n", - "I=18 #Rotor current(A)\n", - "p=4 #No of poles\n", - "Nr=786 #Rotor windings\n", - "B_max=1.5 #Max. flux densiity(T)\n", - "\n", - "\n", - "#Calculations:\n", - "Fr_max=4*Kr*Nr*I/(pi*p)\n", - "T_max=p*pi*D*l*B_max*Fr_max/4\n", - "wm=ns*pi/30\n", - "P=wm*T_max\n", - "\n", - "\n", - "#Results:\n", - "print \"Maximum torque, T_max:\",round(T_max,0),\"Nm\"\n", - "print \"Maximum power,P:\",round(P/1000,0),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum torque, T_max: 1790.0 Nm\n", - "Maximum power,P: 337.0 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.9, Page number: 229" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable Declaration:\n", - "b=0.5 #Wavelength of wnding(m)\n", - "l=1.5 #Winding length(m)\n", - "I=700 #Currents in windings(A)\n", - "N=45 #No. of turns\n", - "K=0.92 #winding factor\n", - "p=3 #No. of phases\n", - "uo=4*pi*10**-7\n", - "g=0.01 #Air gap flux(m)\n", - "f=25 #Frequency of the exciting current(A)\n", - "\n", - "#Calculations:\n", - "F_peak=(3*4*K*N*700)/round(4*pi*p,-1)\n", - "B=uo*F_peak/g\n", - "v=f*b\n", - "\n", - "#Results:\n", - "print \"Amplitude of the resultant mmf wave:\",round(F_peak/1000,1),\"kA/m\"\n", - "print \"Peak air gap flux:\",round(B,1),\"T\"\n", - "print \"Velocity of the travelling wave:\",v,\"m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Amplitude of the resultant mmf wave: 8.7 kA/m\n", - "Peak air gap flux: 1.1 T\n", - "Velocity of the travelling wave: 12.5 m/s\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter5.ipynb b/ELECTRIC_MACHINERY/chapter5.ipynb deleted file mode 100755 index e0897bf4..00000000 --- a/ELECTRIC_MACHINERY/chapter5.ipynb +++ /dev/null @@ -1,596 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fdfb62ac44329d8ca6f9c44e55b110ca6276a0bf982882f2c43000518ecc6bb3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5: Synchronous Machines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.1, Page number: 254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import cmath\n", - "\n", - "#Varaible Declaration:\n", - "pf=0.95 #Lagging power factor\n", - "Vl=460 #Terminal voltage(V)\n", - "I=120 #Terminal current(A)\n", - "If=47 #Field current(A)\n", - "X=1.68j #Line syncchronous reactance(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "#Choosing motor reference direction:\n", - "Va=Vl/math.sqrt(3)\n", - "theta=math.acos(0.95)\n", - "Ia=I*cmath.exp(-theta*1j)\n", - "Eaf=Va-X*Ia\n", - "wc=120*math.pi\n", - "Laf=math.sqrt(2)*abs(Eaf)/(wc*If)\n", - "P=3*Va*Ia*pf\n", - "\n", - "#Results:\n", - "print \"Generated emf:\",round(abs(Eaf),1),\"V line to line\"\n", - "print \"Fied to armature mutual inductance:\",round(Laf*1000,1),\"mH\"\n", - "print \"Three phase power:\",round(abs(P/1000),1),\"kW or\",round(abs(P)/746),\"hp\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Generated emf: 278.8 V line to line\n", - "Fied to armature mutual inductance: 22.3 mH\n", - "Three phase power: 90.8 kW or 122.0 hp\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.2, Page number: 255" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath \n", - "from math import *\n", - "\n", - "#Variable Declaration:\n", - "Pin=90.6*10**3 #Input power(kW)\n", - "Va=265.6 #Terninal voltage(V)\n", - "X=1.68j #Synchronous reactance(ohm)\n", - "Laf=22.3*10**-3 #Mutual inductance(H)\n", - "wc=120*pi #Angular frequency(rad/sec)\n", - "\n", - "\n", - "#Calculations:\n", - "Ia=Pin/(3*Va)\n", - "Eaf=Va-X*Ia\n", - "delta=degrees(cmath.phase(Eaf))\n", - "I=sqrt(2)*Eaf/(wc*Laf)\n", - "\n", - "\n", - "#Results:\n", - "print\"The phase angle,delta:\",round(delta,1),\"degrees\"\n", - "print\"Required field current:\",round(abs(I),2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The phase angle,delta: -35.7 degrees\n", - "Required field current: 55.04 A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.3, Page number: 257" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Eafl=13.8*10**3 #Open circuit voltage(V)\n", - "If1=318 #Field current(A)\n", - "If2=263 #Field current after extrapolation(A)\n", - "wc=120*pi #Angular frequency(Hz)\n", - "\n", - "#Calculations:\n", - "Eaf=Eafl/sqrt(3)\n", - "La1=sqrt(2)*Eaf/(wc*If1)\n", - "La2=sqrt(2)*Eaf/(wc*If2)\n", - "\n", - "#Results:\n", - "print \"Saturated Laf1:\",round(La1*1000,0),\"mH\" \n", - "print \"Unsaturated Laf1:\",round(La2*1000,0),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Saturated Laf1: 94.0 mH\n", - "Unsaturated Laf1: 114.0 mH\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.4, Page number: 262" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Ia=[118, 152] #Armature current from SC Characteristics(A)\n", - "If=[2.20, 2.84] #Field current from SC Characteristics(A)\n", - "Vll=220 #Line-to-line Voltage(V)\n", - "V=202 #Line-to-line air voltage(V) \n", - "P=45*10**3 #Power roted to motor(W) \n", - "Is_sc=1 #per unit rated current(A)\n", - "\n", - "#Calculations:\n", - "Va_ag=V/sqrt(3) #At field current of 2.20A,at air gap,(V)\n", - "Ia_ag=Ia[0]\n", - "Xs_u=Va_ag/Ia_ag\n", - "Ia_rated=P/(sqrt(3)*Vll)\n", - "Xa_g=Va_ag/1\n", - "Xs_u_pu=Va_ag/Is_sc\n", - "Xs=Vll/(Ia[1]*sqrt(3))\n", - "Ia_pu=Ia[1]/Ia[0]\n", - "SCR=If[1]/If[0]\n", - "Xs=1/SCR\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"'All quantities are in per unit values'\"\n", - "print\"Unsaturated value of synchronous reactance:\",round(Xs_u,3),\"ohm\"\n", - "print \"Satureted value of synchronous reactance: \",round(Xs,3),\"ohm\"\n", - "print\"Short circuit ratio:\",round(SCR,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "'All quantities are in per unit values'\n", - "Unsaturated value of synchronous reactance: 0.988 ohm\n", - "Satureted value of synchronous reactance: 0.775 ohm\n", - "Short circuit ratio: 1.291\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.5, Page number: 265" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "P_rated=45*10**3 #Rated power(KV)\n", - "Pl=1.80*10**3 #Short circuit load loss(W)\n", - "Ia_pu=1 #Per unit armature current\n", - "Ia=118 #rated armature current(A)\n", - "Ra_dc=0.0335 #Dc resistance(ohm/phase)\n", - "\n", - "\n", - "#Calculations:\n", - "Pl_pu=Pl/P_rated \n", - "Ra_eff1=Pl_pu/Ia_pu**2 #in per unit basis\n", - "Ra_eff2=Pl/(3*(Ia)**2)\n", - "\n", - "#Results:\n", - "print \"Armature resistance in per unit:\",round(Ra_eff1,3),\"per unit\" \n", - "print \"Armature resistance in ohms/phase:\", round(Ra_eff2,3),\"ohms/phase\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Armature resistance in per unit: 0.04 per unit\n", - "Armature resistance in ohms/phase: 0.043 ohms/phase\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.6, Page number: 269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "import cmath\n", - "import math\n", - "from pylab import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "Veq=1.0 #Externalsupply(p.u) \n", - "Eaf=1.0 #Internal voltage(p.u)\n", - "Xeq=0.23 #Eqv.resistance of external system(p.u)\n", - "Xs=1.35 #Saturated synchronous reactance(p.u)\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "P_max=Eaf*Veq/(Xs+Xeq)\n", - "\n", - "\n", - "#for part (b):\n", - "delta=[0]*500\n", - "Ia=[0]*500\n", - "Va=[0]*500\n", - "degree=[0]*500\n", - "for n in range(1,101,1):\n", - " delta[n-1]=(pi/2)*(n-1)/100\n", - " Ia[n-1] = (Eaf *exp(1j*delta[n-1]) - Veq)/(1j*(Xs + Xeq))\n", - " Va[n-1] = abs(Veq + 1j*Xeq*Ia[n-1])\n", - " degree[n-1]=180*delta[n-1]/pi\n", - "plot(degree,Va,'r.')\n", - "xlabel('Power angle,delta(degrees)')\n", - "ylabel('Terminal voltage(per unit)')\n", - "title('Terminal voltage vs. power angle for part (b)')\n", - "show()\n", - "#for part (c):\n", - "Vterm=1.0\n", - "P=[0]*500\n", - "deltat=[0]*500\n", - "Ia=[0]*500\n", - "Eaf=[0]*500\n", - "\n", - "for n in range(1,101,1):\n", - " P[n-1]=(n-1)/100\n", - " deltat[n-1]=math.asin(P[n-1]*Xeq/(Vterm*Veq))\n", - " Ia[n-1]=(Vterm*exp(1j*deltat[n-1])-Veq)/(1j*Xeq)\n", - " Eaf[n-1]=abs(Vterm+1j*(Xs+Xeq)*Ia[n-1])\n", - "plot(P,Eaf,'r.')\n", - "xlabel('Power [per unit]')\n", - "ylabel('Eaf [per unit]')\n", - "title('Eaf vs. power for part (c)')\n", - "show()\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"(a) Maximum power supplied to external system:\",round(P_max,2),\"p.u\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEXCAYAAACtTzM+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdUFNfbB/C7VAHpIgJLUYpUAaWIKMWCaBQrCsYCYk1s\nSV5jYjSSGI3GmBhDrEFQY0WNYiOIUhQVLKggFlCWDoL0zu7e9w+c/DaEtsiyaL6fc+awM3P3zjOz\nyz47996ZZVFKCQAAgIS4AwAAgJ4BCQEAAAghSAgAAPAGEgIAABBCkBAAAOANJAQAACCEICH0eEuX\nLt393XffrXvbejgcjoGEhASfz+d36WseGBgYOGfOnMNdWSf0DG/7nvH39w9RU1MrGTp06O2ujq27\nFBUVaZiZmT2pr6+XJYQQNze3mODg4ICWyhYWFmqam5unNjQ0yHRvlF0HCaGDevfuXaWoqFipqKhY\nKSEhwZeXl69h5o8dO+Yrqu3u3r176bp1674TVf1vi8Vi/X0hi6iSDrx7rl+/PiIqKmp0Xl6e9u3b\nt4eKO56WSEhI8F++fDmgrTJbtmz5wt/fP0RWVraekKb3u+B7XpCmpmahu7t79L59+xaJIt7ugH/c\nDqqqqupdWVmpWFlZqaivr5954cKFCcy8r6/vsY7UweVypUQdZ3ejlLI6sgzeHqWU9a4c28zMTH0D\nAwNOr1696oR9rqj/TwTrb+t41tfXyx46dGju7Nmz/+ho3R9++OGRvXv3Ln7bGMUFCeEt8fl8iS1b\ntnxhZGSU3qdPn+KZM2eeKC0tVSXkf9+YDxw4MF9fXz9z1KhRVw8ePDjP2dk5/tNPP/1JVVW11MjI\nKP3mzZvDQkJC/PX09LI0NTULDx06NJep38/PL3T9+vUbCSEkJibGjc1m5/z000+fampqFmpra+eF\nhob6MWUvXrz4ga2tbZKysnK5np5e1jfffLOhI/uwdevWNd7e3mGCy1auXPnLypUrfyGEkLy8PG0v\nL69wdXX118bGxmm///77AsGyzDcmFxeXOEIIUVFRKVNUVKxMSEhwfPHiheHIkSOv9enTp1hDQ6No\n9uzZf5SXlyszz71///5gW1vbJCUlpYoZM2acnDlz5glmfwkh5MKFCxNsbGweqKqqljo7O8cnJydb\ntbQPS5cu3b169eptgssmTZp0bseOHauYfWSz2TlKSkoVpqamT69duzayI8fGwMCAs2XLli8sLCwe\nq6mplcyfP/8A03xACCH79+9faGxsnKaurv560qRJ5/Lz87UIIWTDhg3frFixYichhDQ2NkorKChU\nf/755z8QQkhtba1cr1696srKylQIIeT27dtDhw0bdlNVVbXUxsbmQWxsrCtTv5ubW8y6deu+c3Z2\njldQUKjOyMjo3zxG5v2npKRUYWFh8fjs2bOTmXWhoaF+w4cPv7F69eptampqJQMGDHgZERHhyazP\nyMjo7+LiEqekpFQxZsyYKx9//PFvrTUBlpeXKwcEBARra2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A\nAEIIEgIAALyBhAAAAIQQJAQAAHgDCQEAAAghhPw/7SeFqF8U6+wAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEXCAYAAACpuuMDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYE+faB+A3QKjsICDVJBIEqiCbCCIqELeKKGhFK7iL\nRdpTra21xx7bU6ELra3tOVW+nqJ1aRVQq7a4ILaoQVQWFVlcimABAyiKgoBBCWG+P+jUJBIImCEB\nf/d1zdVM5s3Mk5HOk3ebYVEURQAAAGg6mg4AAAC0CxIDAADIQWIAAAA5SAwAACAHiQEAAOQgMQAA\ngBwkBlC7oqKioR4eHnmmpqb1cXFxKzQdj7ZoamoyCA4OPmxubl43d+7cvZqOp7uuXr3q7O3tfb6z\ncocPHw4OCwvb0xMxgZpRFIUFy1OLra1tmYGBgdjY2LiBXlauXLlJlc9GRERsW7169dea/g7atvz0\n008LR40alS2VSnU0HUt7S2lpKZ/FYrV2Ft+sWbMO7N2791VV9uni4lJYUFDgqunvhqVrC2oM0C4W\ni0UdOXJkekNDgwm9bNq06S1VPlteXm7r7Ox8lekYtZlUKtVVfK+8vNz2pZdeuq6jo9Pa1f21tLTo\nqSeyzvdPURRLWblbt24NFAqFgpkzZ/6qyn7Dw8OTtmzZslwdMUIP0nRmwqKdC5/PLz1x4sSE9raV\nlJTYjx8//qSlpWWNlZXV3fnz5++uq6szoyiKjB8//qSurm5Lv379mkxMTOqLi4sdZD+7Z8+euV5e\nXudl3/vmm2/eCQkJSaYoihw9ejTI2dn5iomJST2Hw6nYuHHju6rEu3jx4p1RUVHfT548+TcTE5P6\ngIAAYXl5+WB6+9mzZ8d4eXmdNzMzq/P29s45d+6cL0VR5OTJk+NdXV0L6HKTJk363dvbO4deHzdu\nXEZycnIIRVGksrJy0KxZsw5YW1vfsbOz+3PTp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CibF3bLFmyZGdwcPDh0NDQA5qOBXofNCUBqMDU1LTe09Mz9/bt2y8Sot1t\n+vPnz0/IyMjwMzAwaNJ0LNA7ocYAAAByUGMAAAA5SAwAACAHiQEAAOQgMQAAgBwkBgAAkIPEAAAA\ncv4f7PGByn7cLZQAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Maximum power supplied to external system: 0.63 p.u\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.7, Page number: 272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "P_rated=2000*746/3 #per phase rated power of motor(W)\n", - "Xsm=1.95 #Synchronous reactance(ohm)\n", - "Vl=2300 #Line to line voltage(V)\n", - "f=60 #Angular frequency(Hz)\n", - "p=30 #No. of poles\n", - "Xsg=2.65 #Synchronous reactance of generator(ohm)\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "Vp=2300/sqrt(3)\n", - "Ip=P_rated/Vp\n", - "Eafm=sqrt(Vp**2+(Ip*Xsm)**2)\n", - "Pm=3*Vp*Eafm/Xsm #Max power delivered to motor(W)\n", - "ws=2*2*pi*f/p\n", - "Tmax=Pm/ws #MAx torque of motor(Nm)\n", - "\n", - "\n", - "#for part (b):\n", - "Eafg=sqrt(Vp**2+(Ip*Xsg)**2)\n", - "Pm2=3*Eafm*Eafg/(Xsg+Xsm) #Max power delivered to motor(W)\n", - "Tmax2=Pm2/ws #Max torque(Nm)\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print\"(a) Max power :\",round(Pm/1000,0),\"kW,3-ph\"\n", - "print\" Max torque :\",round(Tmax/1000,1),\"kNm\"\n", - "print \"(b) Max power :\", round(Pm2/1000,0),\"kW,3-ph\"\n", - "print \" Max torque:\", round(Tmax2/1000,1),\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Max power : 3096.0 kW,3-ph\n", - " Max torque : 123.2 kNm\n", - "(b) Max power : 1639.0 kW,3-ph\n", - " Max torque: 65.2 Nm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.8, Page number: 279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "P=45 #Power rated(KVA)\n", - "Va=220 #Terminal voltage(V)\n", - "Pin=45 #Power input to the armature(KVA)\n", - "If=5.50 #field current(A)\n", - "Rf=35.5 #Field winding resistance(ohm)\n", - "Ra=0.0399 #Armature dc resistance(ohm/phase)\n", - "Xal=0.215 #Leakage reactance of motor(ohm)\n", - "pf=0.80 #Lagging power factor \n", - "Pc=1.8 #Core loss(kW)\n", - "Pw=0.91 #Friction & windage losses(kW)\n", - "Ps=0.37 #Stray load loss(kW)\n", - "\n", - "\n", - "#Calculations:\n", - "Ia=P*10**3/(sqrt(3)*Va)\n", - "P1=If**2*Rf/10**3 #Loss in field winding(kW)\n", - "P2=3*Ia**2*Ra/10**3 #Loss in armature(kW)\n", - "Pl=(Pc+Pw+Ps+P1+P2)\n", - "Pi=Pin*pf+P1\n", - "Po=Pi-Pl\n", - "eff=(Po/Pi)*100\n", - "\n", - "#Results:\n", - "print \"Efficiency of the synchronous machine:\",round(eff,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Efficiency of the synchronous machine: 84.3 %\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.9, Page number: 287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import cmath\n", - "\n", - "#Variable declaration:\n", - "Xd=1 #Direct axis synchronus reactance(p.u)\n", - "Xq=0.60 #Quadrature axis synchronous reactance(p.u)\n", - "Va=1 #Terminal voltage(p.u)\n", - "pf=0.8 #Lagging power factor\n", - "Ia=0.8-1j*math.sin(math.acos(0.8)) #Line current(p.u)\n", - "\n", - "\n", - "#Calculations:\n", - "phy=-math.acos(pf)\n", - "E=Va+1j*Xq*Ia\n", - "delta=cmath.phase(E)\n", - "Id=abs(Ia)*math.sin(delta-phy)*cmath.exp(1j*(-pi/2+delta))\n", - "Iq=abs(Ia)*math.cos(delta-phy)*cmath.exp(1j*delta)\n", - "Eaf=Va+Xd*Id*1j+Xq*Iq*1j\n", - "\n", - "\n", - "#Results:\n", - "print \"Generated voltage:\",round(abs(Eaf),2),\"p.u Volt\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Generated voltage: 1.78 p.u Volt\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.11, Page number: 291" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from pylab import *\n", - "import cmath\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "P_rated=2000*746 #Rated power of motor(W)\n", - "Xs=1.95 #Synchronous reactance(ohm/phase)\n", - "Xd=1.95 #Direct axis synchronous reactance(ohm/ph)\n", - "Xq=1.40 #Quadrature axis synchronous reactance(ohm/ph)\n", - "pf=1 #Power factor of the machine\n", - "Vl=2300 #Line to line voltage(V)\n", - "\n", - "#Calculatons:\n", - "Va=float(Vl/sqrt(3)) #volt\n", - "Ia=float(P_rated/(Va*3)) #ampere\n", - "E1=Va-1j*Ia*Xq #From phasor diagram\n", - "delta=cmath.phase(E1) #power angle\n", - "Id=Ia*sin(abs(delta)) #direct axis current(A)\n", - "Eaf=abs(E1)+Id*(Xd-Xq)\n", - "r=symbols('r')\n", - "def P(r): #Process for finding maximum power\n", - " return Eaf*Va*sin(r)/Xd + Va**2*(Xd-Xq)*sin(2*r)/(2*Xd*Xq)\n", - "P1=diff(P(r),r)\n", - "#On differentiation,\n", - "#P1 = 1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1)\n", - "l = solve(1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1),r)\n", - "P_max = (P(round(l[0],5)))\n", - "\n", - "\n", - "#Results:\n", - "print \"Maximum mechanical power:\",math.ceil(3*P_max/10**3),\"kW,3-phase\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum mechanical power: 3236.0 kW,3-phase\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter6.ipynb b/ELECTRIC_MACHINERY/chapter6.ipynb deleted file mode 100755 index 1e8c7e97..00000000 --- a/ELECTRIC_MACHINERY/chapter6.ipynb +++ /dev/null @@ -1,534 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:543f6585f8a1e6c2c290bd192837a35d6ff750409ce379696635948315dd7dcf" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6: Polyphase Induction Machines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.1, Page number: 318" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "n=3502 #Speed of motor(rpm)\n", - "Pin=15.7 #Input power(kW)\n", - "Ia=22.6 #Terminal current(A)\n", - "R=0.2 #Stator winding resistance(ohm/ph)\n", - "f=60 #frequency(Hz)\n", - "p=2 #No. of poles\n", - "\n", - "#Calculations:\n", - "Ps=3*Ia**2*R/10**3 #Power dissipated in stator winding(kW)\n", - "Pg=Pin-Ps #Air-gap power(kW)\n", - "ns=120*f/p\n", - "s=(ns-n)/ns\n", - "Pr=s*Pg #Power dissipated in stator(kW)\n", - "\n", - "\n", - "#Results:\n", - "print \"Power dissipated in stator:\",round(Pr*10**3,0),\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power dissipated in stator: 419.0 W\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.2, Page number: 320" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "R1=0.294 #Resistance of stator(ohm)\n", - "R2=0.144 #Rotor resistance referred to stator(ohm)\n", - "X1=0.503 #Reactance of stator(ohm)\n", - "X2=0.209 #Reactance of rotor referred to stator(ohm)\n", - "Xm=13.25 #Leakage reactance(ohm)\n", - "s=0.02 #slip\n", - "Prot=403 #Friction, windage and core losses(W)\n", - "V=220 #Line-to-line voltage(V) \n", - "p=6 #No. of poles\n", - "fc=60 #frequency(Hz)\n", - "nph=3 #No. of phase\n", - "\n", - "#Calculations:\n", - "Zf=((R2/s+1j*X2)*1j*Xm)/(R2/s+1j*X2+1j*Xm)\n", - "Zin=R1+1j*X1+Zf\n", - "V1=V/math.sqrt(3)\n", - "I1=V1/Zin\n", - "a=cmath.phase(I1)\n", - "pf=math.cos(a)\n", - "ns=120*fc/p\n", - "ws=4*math.pi*fc/p\n", - "n=(1-s)*ns\n", - "wm=(1-s)*ws\n", - "Pg=nph*abs(I1)**2*(Zf.real)\n", - "Psh=(1-s)*Pg-Prot\n", - "Tsh=Psh/wm\n", - "Pin=nph*(V1*I1).real\n", - "eff=Psh/Pin\n", - "\n", - "\n", - "#Results:\n", - "print \"Rotor speed: \",n,\"rpm\"\n", - "print \"Output torque: \",round(Tsh,2),\"Nm\"\n", - "print \"Output power: \",round(Psh,2),\"W\"\n", - "print \"Stator current: \",round(abs(I1),1),\"A\"\n", - "print \"Power factor: \",round(pf,3),\"lagging\"\n", - "print \"Efficiency of motor:\",round(eff*100,0),\"%\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rotor speed: 1176.0 rpm\n", - "Output torque: 42.4 Nm\n", - "Output power: 5221.6 W\n", - "Stator current: 18.8 A\n", - "Power factor: 0.846 lagging\n", - "Efficiency of motor: 86.0 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.3, Page number: 325" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "from math import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "R1=0.294 #Resistance of stator(ohm)\n", - "R2=0.144 #Rotor resistance referred to stator(ohm)\n", - "X1=0.503 #Reactance of stator(ohm)\n", - "X2=0.209 #Reactance of rotor referred to stator(ohm)\n", - "Xm=13.25 #Leakage reactance(ohm)\n", - "s=0.03 #slip\n", - "V=220 #Line-to-line voltage(V) \n", - "p=6 #No. of poles\n", - "fc=60 #frequency(Hz)\n", - "nph=3 #No. of phase\n", - "\n", - "\n", - "#Calculations:\n", - "#for part (a):\n", - "Zf=((R2/s+1j*X2)*1j*Xm)/(R2/s+1j*X2+1j*Xm) #Impedance referred to stator(ohm) \n", - "Zin=R1+1j*X1+Zf #Total input impedance(ohm)\n", - "Z1_eq=1j*Xm*(R1+1j*X1)/(R1+1j*(X1+Xm)) #Total equiv. impedance(ohm)\n", - "R1_eq=Z1_eq.real\n", - "X1_eq=Z1_eq.imag\n", - "V1=V/sqrt(3)\n", - "V1_eq=V1*(1j*Xm/(R1+1j*(X1+Xm)))\n", - "I2=abs(V1_eq)/sqrt((R1_eq+R2/s)**2+(X1_eq+X2)**2)\n", - "ws=4*pi*fc/p\n", - "ns=120*fc/p\n", - "Tmech=nph*I2**2*(R2/s)/ws\n", - "Pmech=nph*round(I2,1)**2*(R2/s)*(1-s)\n", - "\n", - "\n", - "#for part (b):\n", - "SmaxT=R2/sqrt(R1_eq**2+(X1_eq+X2)**2) #slip at max torque\n", - "n_max=(1-SmaxT)*ns\n", - "Tmax=(1/ws)*(0.5*nph*abs(V1_eq)**2)/(R1_eq+sqrt(R1_eq**2+(X1_eq+X2)**2))\n", - "\n", - "#for part (c):\n", - "s1=1 #Slip at starting of motor\n", - "I2_start=abs(V1_eq)/sqrt((R1_eq+R2)**2+(X1_eq+X2)**2)\n", - "Tstart=nph*I2_start**2*R2/ws\n", - "\n", - "\n", - "#Results:\n", - "print \"(a) Load component I2 of stator current:\",round(I2,1),\"A\"\n", - "print \" Electromechanical torque, Tmech :\",round(Tmech,1),\"Nm\"\n", - "print \" Electromechanical power, Pmech :\",round(Pmech,0),\"W\"\n", - "\n", - "print \"(b) Maximum electromechanical torque :\",round(Tmax,0),\"Nm\"\n", - "print \" Speed :\",round(n_max,0),\"rpm\"\n", - "\n", - "print \"(c) Electromechanical starting torque Tstart:\",round(Tstart,1),\"Nm\"\n", - "print \" Stator load current, I2_start :\",round(I2_start,0),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Load component I2 of stator current: 23.9 A\n", - " Electromechanical torque, Tmech : 65.4 Nm\n", - " Electromechanical power, Pmech : 7979.0 W\n", - "(b) Maximum electromechanical torque : 175.0 Nm\n", - " Speed : 970.0 rpm\n", - "(c) Electromechanical starting torque Tstart: 77.6 Nm\n", - " Stator load current, I2_start : 150.0 A\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.4, Page number: 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "import cmath\n", - "from math import *\n", - "from matplotlib import *\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "V=230 #line to line voltage(V)\n", - "R1=0.095 #Resistance of stator(ohm)\n", - "X1=0.680 #Reactance of stator(ohm)\n", - "X2=0.672 #Reactance of rotor referred to stator(ohm)\n", - "Xm=18.7 #Leakage reactance(ohm)\n", - "f=60 #frequency(Hz)\n", - "p=4 #No. of poles\n", - "nph=3 #No. of phases\n", - "\n", - "\n", - "#Calculations and Results:\n", - "V1=V/sqrt(3)\n", - "omega=4*pi*f/p\n", - "ns=120*f/p\n", - "Z1eq=1j*Xm*(R1+1j*X1)/(R1+1j*(X1+Xm)) #Stator thevenin equivalent\n", - "R1eq=Z1eq.real\n", - "X1eq=Z1eq.imag\n", - "V1eq=abs(V1*1j*Xm/(R1+1j*(X1+Xm)))\n", - "\n", - "print \"Hence, the required plot is shown below:\"\n", - "for m in range(1,6,1): #Loop over rotor resistance\n", - " if m==1:\n", - " R2=0.1\n", - " elif m==2:\n", - " R2=0.2\n", - " elif m==3:\n", - " R2=0.5\n", - " elif m==4:\n", - " R2=1.0\n", - " else:\n", - " R2=1.5\n", - "\n", - " s=[0]*202\n", - " rpm=[0]*202\n", - " Tmech=[0]*202\n", - " for n in range(1,201,1): #Loop over slip\n", - " s[n-1]=n/200 #slip\n", - " rpm[n-1]=ns*(1-s[n-1]) #rpm\n", - " I2=abs(V1eq/(Z1eq+1j*X2+R2/s[n-1])) #I2\n", - " Tmech[n-1]=nph*I2**2*R2/(s[n-1]*omega) #Electromechanical torque(Nm)\n", - "\n", - " plot(rpm,Tmech)\n", - " title('Electromechanical mechanical torque, Tmech(Nm) vs rpm')\n", - " xlabel(\"rpm\")\n", - " ylabel(\"Tmech\")\n", - " if m==1:\n", - " show()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hence, the required plot is shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEVCAYAAAARjMm4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AA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0sC1zJBWUt4eLgP\n1xpKHWK6fft2l+7du8fINr3kO65NmzYt45rOTp8+PbiyslJb1TFNnDjxqLW19VNtbe1KW1vb9P37\n9898nRi4Zo7t2rVLWrhw4XZFxrRv375ZTk5Oj+zt7VO5a33evHk/qDIm2bh0dHQquHMlu93R0fGJ\nbNNZVZ4r2ZgqKyu1p06detDd3f1e165d/758+bKIz89v//79M2NiYrp7e3tHdenS5XbPnj0jb926\n5amMmAQMozZFpgAAoKbUts4CAADUB5IFAADIhWQBAAByIVkA1APDMAKpVIrvCzRbuPgBapGSkuLg\n4uLy0M/PL7hTp073tLS0qpcsWfKNu7v7/YEDB17Kzc01JyISiUThS5Ys+cbLyyumQ4cO8TExMV6j\nR4/+n7Ozc+Lq1avX8/0+ABQByQKgDklJSU7z58/fef/+fXcitiPW/fv33X18fK5wvYsFAgGjq6tb\nERMT4zVv3rxdI0eOPP3jjz/OvX//vntQUNCMgoICE37fBcCbQ7IAqEObNm1Svb29o4mINDQ0pBMm\nTDhORDR16tRDf/31V1/uedyEXe7u7vfd3d3vC4VCsY6OTmXbtm2fpKWl2fMTPYDiIFkA1EFfX/95\nTesZhhHIjuukq6tbQcQmFO537rFEItFUfqQAyoVkAVBPUqlU4+TJk+OIiI4cOTK5X79+1/iOCUBV\neJ9WFUCdyd496OvrP4+Ojvb+6quvPhcKheLjx49PqOn56jSSLICiYLgPgHoyMDAoKSkpMeA7DgA+\noBgKoJ5wxwDNGe4sAABALtxZAACAXEgWAAAgF5IFAADIhWQBAAByIVkAAIBcSBYAACDX/wHSCgdC\n0qktCAAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEVCAYAAAARjMm4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYVEcXh39L771KR5ogiF2sxIodSyxYsH8ak2g0xhZj\niyXRaIrGFkHsE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FIYSQWlGyIIQQUitKFoQQQmr1/0ZwGmquOtPsAAAAAElFTkSu\nQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.5, Page number: 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "nph=3 #No. of phases\n", - "k=0.429 #reactance ratio(X1/X2) from table 6.1,for class C motor\n", - "p=4 #No.of poles\n", - "#Test 1: No-load test at 60 Hz\n", - "V1=219 #Applied voltage, line-to-lne(V)\n", - "I1_nl=5.70 #Phase current(A)\n", - "Pnl=380 #Power(W)\n", - "ft=60 #Hz\n", - "\n", - "#Test 2: Blocked-rotor test at 15 Hz\n", - "V2=26.5 #Applie voltage, line-to-line(V)\n", - "I1_bl=18.57 #Phase current(A)\n", - "Pbl=675 #Power(W)\n", - "fbl=15 #Hz\n", - "\n", - "#Test 3:\n", - "R1=0.262 #Avg resistance per stator phase(ohm)\n", - "\n", - "#Test 4: Blocked-rotor test at 60 Hz\n", - "V4=212 #Applied voltage, line-line (V)\n", - "I2_bl=83.3 #Avg phase current(A)\n", - "Pbl_4=20.1*10**3 #Power(W)\n", - "Tstart=74.2 ##starting torque(Nm)\n", - "\n", - "\n", - "#Calculations:\n", - "#For part (a):\n", - "Prot=Pnl-nph*I1_nl**2*R1\n", - "V1_nl=V1/sqrt(3) #from test 1\n", - "Qnl=sqrt((nph*V1_nl*I1_nl)**2-Pnl**2)\n", - "Xnl=Qnl/(nph*I1_nl**2)\n", - "V1_bl=V2/sqrt(3) #from test 2\n", - "Qbl=sqrt((nph*V1_bl*I1_bl)**2-Pbl**2)\n", - "Xbl=(ft/fbl)*(Qbl/(nph*I1_bl**2))\n", - "X2=symbols('X2')\n", - "fx=k**2*X2**2+(Xbl*(1-k)-Xnl*(1+k))*X2+Xnl*Xbl\n", - "x=solve(fx,X2)\n", - "X2=round(x[0],2) #since X2 must be less than X1\n", - "X1=k*X2\n", - "Xm=Xnl-X1\n", - "Rbl=Pbl/(nph*I1_bl**2)\n", - "R2=(Rbl-R1)*((X2+Xm)/Xm)**2\n", - "\n", - "#for part (b):\n", - "Pg=Pbl_4-nph*I2_bl**2*R1\n", - "ws=4*math.pi*ft/p\n", - "Tstart=Pg/ws\n", - "\n", - "\n", - "#Results:\n", - "print \"(a) N-load rotational loss:\",round(Prot,0),\"W\"\n", - "print \"\\n Equivalent ckt parameters:\\n\"\n", - "print\" R1=\",round(R1,3),\"ohm\",\" R2=\",round(R2,3),\"ohm\"\n", - "print\" X1=\",round(X1,3),\"ohm\",\" X2=\",round(X2,3),\"ohm\",\" Xm=\",round(Xm,2),\"ohm\"\n", - "print \"\\n(b) Starting torque:\",round(Tstart,2),\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) N-load rotational loss: 354.0 W\n", - "\n", - " Equivalent ckt parameters:\n", - "\n", - " R1= 0.262 ohm R2= 0.447 ohm\n", - " X1= 0.635 ohm X2= 1.48 ohm Xm= 21.2 ohm\n", - "\n", - "(b) Starting torque: 77.7 Nm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.6, Page number: 338" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Xnl=21.8 #ohm\n", - "Xbl=2.01 #ohm\n", - "R_1=0.26 #ohm\n", - "Rbl=0.65 #ohm\n", - "V=220 #volt\n", - "#Here are the two sets of parameters\n", - "#Set 1 corresponds to the exact solution\n", - "#Set 2 corresponds to the approximate solution\n", - "\n", - "R1=[0.262, 0.262] #ohm\n", - "R2=[0.447, 0.444] #ohm\n", - "X1=[0.633, 0.603] #H\n", - "X2=[1.47, 1.41] #H\n", - "Xm=[21.2, 21.2] #H\n", - "nph=3 #No. of phases\n", - "p=4 #No. of poles\n", - "Prot=354 #Rotational losses(Watts)\n", - "\n", - "#Calculations:\n", - "X_1=0.3*Xbl #(ohm) from table 6.1 and X1+X2=Xbl\n", - "X_2=Xbl-X_1 #ohm\n", - "X_m=Xnl-X_1\n", - "R_2=(Rbl-R_1)*((X_2+X_m)/X_m)**2\n", - "\n", - "#Results for part (a):\n", - "print \"(a) The parameters:\\n\"\n", - "print\" R1=\",round(R_1,3),\"ohm\",\" R2=\",round(R_2,3),\"ohm\"\n", - "print\" X1=\",round(X_1,3),\"ohm\",\" X2=\",round(X_2,2),\"ohm\"\n", - "print\" Xm=\",round(X_m,3),\"ohm\"\n", - "\n", - "#Calculations & Results for part (b):\n", - "print \"\\n\\n(b)\"\n", - "#Here is the operating condition\n", - "V1=220/sqrt(3)\n", - "fe=60 #Hz\n", - "rpm=1746\n", - "#Calculate the synchronous speed:\n", - "ns=120*fe/p\n", - "ws=4*pi*fe/p\n", - "s=(ns-rpm)/ns\n", - "wm=ws*(1-s)\n", - "Zgap=[0]*2\n", - "Zin=[0]*2\n", - "Pmech=[0]*2\n", - "I1=[0]*2\n", - "I2=[0]*2\n", - "Tmech=[0]*2\n", - "\n", - "#Calculate stator Thevenin equivalent:\n", - "#Loop over the two motors\n", - "for m in range(0,2,1):\n", - " Zgap = 1j*Xm[m]*(1j*X2[m] + R2[m]/s)/(R2[m]/s + 1j*(Xm[m] + X2[m]))\n", - " Zin=R1[m]+1j*X1[m]+Zgap\n", - " I1=V1/Zin\n", - " I2=I1*(1j*Xm[m])/(R2[m]/s+1j*(Xm[m]+X2[m]))\n", - " Tmech=nph*abs(I2)**2*R2[m]/(s*ws) #Electromechanical torque\n", - " Pmech=wm*Tmech #Electromechanical power\n", - " Pshaft=Pmech - Prot\n", - " if (m==0):\n", - " print \"Exact Solution:\"\n", - " else:\n", - " print \"\\nApproximate Solution:\"\n", - "\n", - "\n", - "\n", - " \n", - " print \"\\tPmech=\",round(Pmech,1),\"W\",\"\\tPshaft =\",round(Pshaft,1), \"W\"\n", - " print \"\\tI1=\", round(abs(I1),1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The parameters:\n", - "\n", - " R1= 0.26 ohm R2= 0.443 ohm\n", - " X1= 0.603 ohm X2= 1.41 ohm\n", - " Xm= 21.197 ohm\n", - "\n", - "\n", - "(b)\n", - "Exact Solution:\n", - "\tPmech= 2820.7 W \tPshaft = 2466.7 W\n", - "\tI1= 10.3 A\n", - "\n", - "Approximate Solution:\n", - "\tPmech= 2850.5 W \tPshaft = 2496.5 W\n", - "\tI1= 10.4 A\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter7.ipynb b/ELECTRIC_MACHINERY/chapter7.ipynb deleted file mode 100755 index c5e8eebf..00000000 --- a/ELECTRIC_MACHINERY/chapter7.ipynb +++ /dev/null @@ -1,473 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7: DC Machines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.1, Page number: 371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "Vt=[128, 124] #Terminal voltage(V)\n", - "Ea=125 #Generated emf(V)\n", - "Ra=0.02 #Armature resistance(ohm)\n", - "n=3000 #rpm\n", - "\n", - "\n", - "#Calculations:\n", - "#For 128 V\n", - "Ia1=(Vt[0]-Ea)/Ra\n", - "Pin1=Vt[0]*Ia1\n", - "Pe1=Ea*Ia1\n", - "wm=3000*2*pi/60\n", - "Tmech1=Ea*Ia1/wm\n", - "\n", - "#for 124 V\n", - "Ia2=(-Vt[1]+Ea)/Ra\n", - "Pin2=Vt[1]*Ia2\n", - "Pe2=Ea*Ia2\n", - "Tmech2=Ea*Ia2/wm\n", - "\n", - "\n", - "\n", - "#Results:\n", - "print \"(a) Armature current:\",Ia1,\"A\",\"\\n Terminal power:\",Pin1/10**3,\"kW\"\n", - "print \" Electromagnetic power:\",round(Pe1/10**3,2),\"kW\"\n", - "print \" Torque:\",round(Tmech1,1),\"Nm\"\n", - "\n", - "print \"(b) Armature current:\",Ia2,\"A\",\"\\n Terminal power:\",Pin2/10**3,\"kW\"\n", - "print \" Electromagnetic power:\",round(Pe2/10**3,2),\"kW\",\n", - "print \"\\n Torque:\",round(Tmech2,1),\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Armature current: 150.0 A \n", - " Terminal power: 19.2 kW\n", - " Electromagnetic power: 18.75 kW\n", - " Torque: 59.7 Nm\n", - "(b) Armature current: 50.0 A \n", - " Terminal power: 6.2 kW\n", - " Electromagnetic power: 6.25 kW \n", - " Torque: 19.9 Nm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.2, Page number: 372" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Vt=123 #terminal voltage(V)\n", - "Pt=21.9 #Terminal power(kW)\n", - "Ra=0.02 #ohm\n", - "Eao=125 #generated voltage(V) at 3000rpm\n", - "no=3000 #rpm\n", - "\n", - "\n", - "#calculations:\n", - "Ia=Pt*10**3/Vt\n", - "Ea=Vt-Ia*Ra\n", - "n=(Ea/Eao)*no\n", - "\n", - "#Results:\n", - "print \"Speed of motor:\",round(n,0),\"rpm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed of motor: 2867.0 rpm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.3, Page number: 376" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Il=400 #Armature current(A)\n", - "If=4.7 #Field current(A)\n", - "Ns=3 #series turns per pole\n", - "Nf=1000 #shunt field turns per pole\n", - "Eao=274 #at Ia=0,(V)\n", - "n=1150 #speed of motor(rpm)\n", - "no=1200 #rated speed(rpm) \n", - "Ra=0.025 #armature resistance(ohm)\n", - "Rs=0.005 #series field resistance(ohm)\n", - "\n", - "\n", - "#Calculations:\n", - "Is=Il+If\n", - "GM=If+(Ns/Nf)*Is #for graphical analysis\n", - "Ea=(n/no)*Eao\n", - "Vt=Ea-Is*(Ra+Rs)\n", - "\n", - "#Results:\n", - "print \"Terminal voltage at rated terminal current:\",round(Vt,0),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminal voltage at rated terminal current: 250.0 V\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.4, Page number: 377" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Il=400 #Armature current(A)\n", - "If=4.7 #Field current(A)\n", - "Ns=3 #series turns per pole\n", - "Nf=1000 #shunt field turns per pole\n", - "Eao=261 #at Ia=400 A,(V)\n", - "n=1150 #speed of motor(rpm)\n", - "no=1200 #rated speed(rpm) \n", - "Ra=0.025 #armature resistance(ohm)\n", - "Rs=0.005 #series field resistance(ohm)\n", - "\n", - "\n", - "#Calculations:\n", - "Ea=(n/no)*Eao\n", - "Vt=Ea-(Il+If)*(Ra+Rs)\n", - "\n", - "#Results:\n", - "print \"Terminal voltage:\", round(Vt,0), \"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminal voltage: 238.0 V\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.5, Page number: 378" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Il=400 #Armature current(A)\n", - "If=4.7 #Field current(A)\n", - "Ns=3 #series turns per pole\n", - "Nf=1000 #shunt field turns per pole\n", - "Eao=269 #at Ia=400 A,(V)\n", - "n=1150 #speed of motor(rpm)\n", - "no=1200 #rated speed(rpm) \n", - "Ra=0.025 #armature resistance(ohm)\n", - "Rs=0.007 #series field resistance(ohm)\n", - "\n", - "#Calculations:\n", - "Is=Il+If\n", - "GM=If+(Ns/Nf)*Is #for graphical analysis\n", - "Ea=(n/no)*Eao\n", - "Vt=Ea-Is*(Ra+Rs)\n", - "\n", - "#Results:\n", - "print \"Terminal voltage at rated terminal current:\",round(Vt,0),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminal voltage at rated terminal current: 245.0 V\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.6, Page number: 381" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "Ns=4 #Series field turns\n", - "Nf=1000 #Shunt field turns\n", - "Vt=250 #Full load voltage(V)\n", - "#for part (a):\n", - "Ia=400 #Armature current(A)\n", - "Ra=0.025 #Armature resistance(ohm)\n", - "\n", - "#for part (b):\n", - "Rs=0.005 #Added sries resistance(ohm)\n", - "Vo=250 #No load voltage(V)\n", - "If=5 #field current at full load(A)\n", - "\n", - "\n", - "#Calculations & Results:\n", - "\n", - "#for part (a)\n", - "V1=Ia*Ra\n", - "\n", - "#for part (b):\n", - "Ia1=Ia+If\n", - "Rs,Rd=symbols('Rs Rd') #Rd= diverter resistance(ohm)\n", - "Rp=Rs*Rd/(Rs+Rd) # -------(i)\n", - "Is=Ia1*(Rd/(Rs+Rd))\n", - "Inet=If+(Ns/Nf)*Is\n", - "Ea=Vt+Ia*(Ra+Rp) # -------(ii)\n", - "\n", - "#from equation (ii)\n", - "Rp=Rs(Inet-5.0)/1.62 \n", - "R_d=0.0082 #R_d=Rd(say), using (i)\n", - "print \"(a) The operating terminal voltage = 205 V\", Inet\n", - "print \"(b) Rd =\", R_d,\"ohm\"\n", - "print \"\\tHence, by this process, resistance across the series field\" \n", - "print \"\\t(referred to as a series-field diverter) can be adjusted \"\n", - "print \"\\tto produce the desired performance. \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The operating terminal voltage = 205 V 1.62*Rd/(Rd + Rs) + 5\n", - "(b) Rd = 0.0082 ohm\n", - "\tHence, by this process, resistance across the series field\n", - "\t(referred to as a series-field diverter) can be adjusted \n", - "\tto produce the desired performance. \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.7, Page number: 383" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - " \n", - "#Variable declaration:\n", - "Ia=400 #Armature current(A)\n", - "n1=1200 #rpm\n", - "n2=1100 #rpm\n", - "Ra=0.025 #armature resistance(ohm) \n", - "Eo=250 #no load armature voltage(V)\n", - "del_n=1.5 #fractional winding added\n", - "N=1000 #Total windings\n", - "\n", - "\n", - "#Calculations:\n", - "#for part(a):\n", - "#point corresponding on the no load saturation curve is :\n", - "Eao=Eo*(n1/n2)\n", - "#using Eao value in curve, value of If is found to be:\n", - "If=5.90 #Field current(A)\n", - "Ea=Eo-Ia*Ra\n", - "#From Fig. 7.14\n", - "Ea1=261\n", - "n=n1*(Ea/Ea1)\n", - "Pe=Ea*Ia\n", - "Pl=2000 #No load Rotational loss(W)\n", - "Po=(Pe-Pl)/(1+0.01)\n", - "\n", - "#for part (b):\n", - "If1=If+del_n/N\n", - "#From Fig. 7.14 the corresponding value of Ea at 1200 r/min would be 271 V.\n", - "Ea2=271 #volts\n", - "n22=n1*(Ea/Ea2)\n", - "\n", - "\n", - "#Results:\n", - "print \"Part(a):\"\n", - "print \"Required speed =\",round(n),\"r/min\"\n", - "print \"Output power =\", round((Po/746),1),\"hp\"\n", - "print \"\\nPart (b):\"\n", - "print \"Required speed =\",round(n22),\"r/min\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part(a):\n", - "Required speed = 1103.0 r/min\n", - "Output power = 124.8 hp\n", - "\n", - "Part (b):\n", - "Required speed = 1063.0 r/min\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.9, Page number: 389" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from math import *\n", - "\n", - "#Variable declaration:\n", - "V1=50 #terminal voltage(V)\n", - "Ia=1.25 #Armature current(A)\n", - "Ra=1.03 #Armature resistance(ohm)\n", - "n1=2100 #speed at 50V(rpm)\n", - "V2=48 #terminal voltage at 1700 rpm (V)\n", - "n2=1700 #speed at 48 V(rpm)\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "#for (a):\n", - "Ea1=V1-Ia*Ra\n", - "wm1=n1*2*pi/60\n", - "Km=round(Ea1/wm1,2)\n", - "\n", - "#for part(b):\n", - "Prot=Ea1*Ia\n", - "\n", - "#for part(c:)\n", - "wm2=n2*2*pi/60\n", - "Ea2=Km*wm2\n", - "Ia2=(V2-Ea2)/Ra\n", - "Pmech=Ea2*Ia2\n", - "Pshaft=Pmech-Prot\n", - "\n", - "#Results:\n", - "print \"(a) Torque constant:\",round(Km,2),\"V/(rad/s)\"\n", - "print \"(b) No-load rotational losses of the motor:\",round(Prot,0),\"W\"\n", - "print \"(c) The power output of the motor:\",round(Pshaft,2),\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Torque constant: 0.22 V/(rad/s)\n", - "(b) No-load rotational losses of the motor: 61.0 W\n", - "(c) The power output of the motor: 275.05 W\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter8.ipynb b/ELECTRIC_MACHINERY/chapter8.ipynb deleted file mode 100755 index d938905f..00000000 --- a/ELECTRIC_MACHINERY/chapter8.ipynb +++ /dev/null @@ -1,392 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c0cec23fbe397fb7ebb6d2fd4aa3f54866d7506eaba8e21d17c10d01c93413cd" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8: Variable-Reluctance Machines and Stepping Motors" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.1, Page number: 411" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from numpy import *\n", - "from math import *\n", - "from matplotlib import *\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "R=0.038 #m\n", - "a=b=pi/3 #rad\n", - "g=2.54*10**-4 #m\n", - "D=0.13 #m\n", - "N=100 #turns in both poles\n", - "uo=4*pi*10**-7 #permeability of free space()\n", - "i1=5 #coil current (A)\n", - "\n", - "\n", - "#Calculation:\n", - "Lm=N**2*uo*a*R*D/(2*g)\n", - "#x=symbols('x')\n", - "subplot(2,1,1)\n", - "x=linspace(-180,-120,100)\n", - "L=-(Lm/60)*x-2*Lm\n", - "plot(x,L,'b')\n", - "#grid()\n", - "\n", - "x=linspace(-60,0,100)\n", - "L=(Lm/60)*x+Lm\n", - "plot(x,L,'b')\n", - "grid()\n", - "\n", - "x=linspace(0,60,100)\n", - "L=-(Lm/60)*x+Lm\n", - "plot(x,L,'b')\n", - "grid()\n", - "\n", - "\n", - "x=linspace(120,180,100)\n", - "L=(Lm/60)*x-2*Lm\n", - "plot(x,L)\n", - "annotate('Lm=0.128 H',xy=(-150,0.10))\n", - "annotate('Lmax',xy=(0,Lm+0.005))\n", - "ylabel('L11(theta)')\n", - "xlabel('theta')\n", - "grid()\n", - "\n", - "#part(b)\n", - "subplot(2,1,2)\n", - "x1=linspace(-180,-120,100)\n", - "x2=linspace(-150,-90,100)\n", - "i1=5\n", - "i2=4\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,-Tm1*np.array(dll),'g')\n", - "plot(x2,Tm2*np.array(dll),'b--')\n", - "\n", - "x1=linspace(-60,0,100)\n", - "x2=linspace(-90,-30,100)\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,Tm1*np.array(dll),'g')\n", - "plot(x2,-Tm2*np.array(dll),'b--')\n", - "\n", - "x1=linspace(0,60,100)\n", - "x2=linspace(30,90,100)\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,-Tm1*np.array(dll),'g')\n", - "plot(x2,Tm2*np.array(dll),'b--')\n", - "\n", - "x1=linspace(120,180,100)\n", - "x2=linspace(90,150,100)\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,Tm1*np.array(dll),'g')\n", - "plot(x2,-Tm2*np.array(dll),'b--')\n", - "grid()\n", - "ylim(-3,3)\n", - "annotate('___ i1=I1, i2=0', xy=(110,2.6))\n", - "annotate('---- i1=0, i2=I2', xy=(110,2.2))\n", - "ylabel('Torque [N.m]')\n", - "xlabel('thetam [degrees]')\n", - "\n", - "#Results:\n", - "print \"Lm =\",Lm,\"H\"\n", - "print \"(c)The peak torque =\",round(Tm1,2),\"N.m\"\n", - "print \"\\t(i) The net torque, (at thetam=0) =\", 0, \"N.m\"\n", - "print \"\\t(ii) The net torque, (at thetam=45 deg.) =\", 0, \"N.m\"\n", - "print \"\\t(iii)The net torque, (at thetam=75 deg) =\", round(Tm1,2), \"N.m\"\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lm = 0.127968099059 H\n", - "(c)The peak torque = 1.53 N.m\n", - "\t(i) The net torque, (at thetam=0) = 0 N.m\n", - "\t(ii) The net torque, (at thetam=45 deg.) = 0 N.m\n", - "\t(iii)The net torque, (at thetam=75 deg) = 1.53 N.m\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEMCAYAAADTfFGvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdcFEf/xz9H0ygqaqQI6CkgvSNoYsEoEVBRo4maqGAw\n4adBY2KPSezE+qiRWGJUsJtoVDSALZ5dkGYBVFTuERCMBQzYgLv5/bGez4mUO27vdhfn/XrtK5kt\ns29nF4ad8h0RIQQUCoVCoaiKHtcCFAqFQhEWtOKgUCgUilrQioNCoVAoakErDgqFQqGoBa04KBQK\nhaIWtOKgUCgUilpoteJITEwMdHBwuGZnZ5ezePHi6VWPX7t2zaFr167nGzdu/Hz58uWTqx6XyWT6\nnp6e6QMGDDioTU8KhUKhqI7WKg6ZTKYfGRkZnZiYGJiVleW0c+fOEdnZ2Y7K57Ru3frh6tWrJ0yZ\nMmVZdXmsWrXqaycnpyyRSEQnm1AEhbGxcRnXDhSKttBaxZGcnOxra2t7UywWSw0NDSuGDx++68CB\nAwOVz2nTps19Hx+fFENDw4qq1+fn51vFx8cHjx079jdCiE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5e3vW8vLzry60bIBQKF1pbWw+aTCbz1NRUPMMwUSdOnPg0LS3NWVxcfMlgMDTGxMTM9fb2\nvnHs2LEvFArFQFJS0oRGo7EtN+5/WadCKpX+SdM0TVFU38aNGx9zj5UAAMxms8loNNarVCoHwzBR\nWVlZ3Q0NDWVVVVXVhYWF316+fLmIoqi+pKSkCa7QhY+fk5Pzs8vlklMU1QewWAybm5sPy+Vy1+nT\npz/S6XQWlmX5QqFwoaGhoSw6Ojpw9OjRr1iW5QMAnDt3rjKSa0FoKQw5RGiVPM2M6J8Eg8GXBAJB\nSCAQhPr6+iij0Vi/1rMDmqZpsVg8U15e/slajoOeL/ioCqFVEhcXN73SC4BPw+12y/bs2fNrZmbm\n3ePHj9dyy7uulYqKiporV668JxKJZtdyHPT8wRkHQgihiOCMAyGEUESwcCCEEIoIFg6EEEIRwcKB\nEEIoIlg4EEIIRQQLB0IIoYj8DRLhonoh4yhPAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.3, Page number: 424" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from sympy import *\n", - "from math import *\n", - "from matplotlib.pyplot import *\n", - "\n", - "#Variable declaration:\n", - "n1=4000 #r/min\n", - "R=0.038 #m\n", - "a=b=pi/3 #rad\n", - "g=2.54*10**-4 #m\n", - "D=0.13 #m\n", - "N=100 #turns in both poles\n", - "uo=4*pi*10**-7 #permeability of free space(H/m)\n", - "Ll=0.005 #H\n", - "Vo=100 #phase voltage applied to phase 1.(V)\n", - "\n", - "\n", - "#Calculation:\n", - "wm=n1*pi/30\n", - "Lm=N**2*uo*a*R*D/(2*g)\n", - "thetam=symbols('thetam')\n", - "t=symbols('t')\n", - "#for part (a):\n", - "#for -60<=thetam<=0deg,\n", - "L11=Ll+(Lm/(pi/3))*(thetam+pi/3)\n", - "L111=diff(L11,thetam)\n", - "R1=L111*wm\n", - "#which is nuch greater than resistance R=1.5 ohm\n", - "thetam=-pi/3+wm*t\n", - "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", - "\n", - "#for part (b):\n", - "V2=-200 #applied voltage(V)\n", - "thetam2=symbols('thetam2')\n", - "L12=Ll+(Lm/(pi/3))*(pi/3-thetam2)\n", - "L112=diff(L12,thetam2)\n", - "to=2.5*10**-3 #ms\n", - "thetam2=float(-pi/3+wm*to)\n", - "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", - "i2=(0.25-200*(t-to))/(0.005+51.1*(5*10**-3-t))\n", - "\n", - "\n", - "#Results:\n", - "print \"i1 =\",i1,\"\\t, (where round(16.2934044186179*pi,2) = 51.1 )\"\n", - "print \"\\ni2 =\",i2,\"\\n\"\n", - "\n", - "\n", - "#Calculations & Results:\n", - "#for part (c):\n", - "Lleak=0.005\n", - "Posintegral=0\n", - "integral=0\n", - "N1=500\n", - "tmax=3.75*10**-3\n", - "t=[0]*503\n", - "thet=[0]*503\n", - "Torque=[0]*503\n", - "deltat = tmax/N1\n", - "thetm=[0]*503\n", - "i=[0]*503\n", - "for n in range(1,N1+2,1):\n", - " t[n-1]=tmax*(n-1)/N1\n", - " thetm[n-1]=-(pi/3)+(400*pi/3)*t[n-1]\n", - " if (thetm[n-1]<=0):\n", - " i[n-1]=100*t[n-1]/(0.005+51.1*t[n-1])\n", - " dld1d1theta = 0.122\n", - " Torque[n-1]=0.5*i[n-1]**2*dld1d1theta\n", - " Posintegral=Posintegral+Torque[n-1]*deltat\n", - " integral=Posintegral\n", - " else:\n", - " i[n-1]=(0.25-200*(t[n-1]-2.5*10**-3))/(0.005+51.1*(5*10**-3-t[n-1]))\n", - " dld11dtheta = -0.122\n", - " Torque[n-1] = 0.5*i[n-1]**2*dld11dtheta\n", - " integral = integral + Torque[n-1]*deltat\n", - "\n", - "print \"\\nPositve torque integral =\",Posintegral, \"[N-m-sec]\"\n", - "print \"\\nTorque integral=\",integral,\"[N-m-sec]\\n\"\n", - "\n", - "plot(1000*np.array(t),i)\n", - "xlabel('time [msec]')\n", - "ylabel('Phase current [A]')\n", - "title('(a) phase-1 current profile')\n", - "grid()\n", - "show()\n", - "plot(1000*np.array(t),Torque)\n", - "xlabel('time [msec]')\n", - "ylabel('Torque [N-m]')\n", - "title('(b) torque profile')\n", - "grid()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i1 = 100*t/(51.1872396234976*t + 0.005) \t, (where round(16.2934044186179*pi,2) = 51.1 )\n", - "\n", - "i2 = (-200*t + 0.75)/(-51.1*t + 0.2605) \n", - "\n", - "\n", - "Positve torque integral = 0.000456384094483 [N-m-sec]\n", - "\n", - "Torque integral= 0.000335463884625 [N-m-sec]\n", - "\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEXCAYAAACpuuMDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYFdX/B/D3ZRHZNwWVRSw0AdkU9wXMFQTErbRwyxTt\nq5hLaS6JuZSllmYZmrlRWi4lKuLKxRVRBMXcUEEBEUF2UNb5/TG/W2gsF5i5MwOf1/PMwx3u3Jk3\np5xz55wzZ2QMw4AQQghRUBM6ACGEEHGhioEQQsgrqGIghBDyCqoYCCGEvIIqBkIIIa+gioEQQsgr\nqGIg//jss8++3LBhw2xlth09evT+8PDwofU91qRJk3YsXbp0RX0/T4R14cKF3u3bt08wMDDIO3To\n0HAvL6+w3bt3jweAHTt2TOrbt+85oTOS+qOKgQAAMjIyWu7evXv89OnTf1Jm+wULFqxZsmTJyvoe\nTyaTMTKZTNCbaJ4+fdrK19c31MLCIlVNTa3i8ePH1kLmqS+5XO5hZWWVrMpjfv75518EBgZuz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dRTIlB\nSEMxtcyL379//whdXd1CXV3dQiMjoxwfH5/DAODo6Bh/48YNp8LCQt2LFy/2qtwvUVJS0qy248pk\nMsbT0/OYurp6eadOnW5WVFSoDRky5Lhi30lJSTbe3t5Hmjdv/nLKlCnbvL29j3h7ex8BgFOnTg28\nffu2nWJf+fn5+oWFhbqnT58e8Pvvv7+r+L2RkVFO3UuEkPqjioE0CVpaWsWK12pqahWKdTU1tYqy\nsjKNiooKNWNj4+zY2FjXuu67WbNmJYp9aWpqllY+TllZmYa6unp5dHR0t9OnTw/Yv3//6E2bNs08\nffr0AIZhZJcvX+6u+HxltVV0hPCJ+hhIo6Cvr5+fn5+vX9fPKU7A+vr6+e3atUvcv3//aMXvb9y4\n4cRFtsLCQt2cnBwjT0/PY+vXr597/fp1ZwAYPHjwiY0bNwYqtlP8ftCgQSd/+OGH/yl+n5OTY8RF\nDkKURRUDaRRMTU2f9+7d+4Kjo2P8ggUL1shkMkYxeqfya8V65deK9V9//fX9bdu2TXFxcYnr1KnT\nzdDQUF9ljl3dvhXr+fn5+j4+PoednZ2v9+3b99y33347BwA2btwYePXqVTdnZ+frDg4OfytmxFyy\nZMnK7OxsY0dHx3gXF5e4qh5kQwifaHZVQupg+fLly/T09ArmzZu3Tojj9+/fP2LdunXzOnfufE2I\n45Omga4YCKkDPT29gi1btkwT6ga3xMTEdpX7MQjhA10xEEIIeQVdMRBCCHkFVQyEEEJeQRUDIYSQ\nV1DFQAgh5BVUMRBCCHnF/wGN24SgosJe8AAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEXCAYAAABRWhj0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcFPX/B/DXIiAKGKCICOiieODFigqZX3NREfEguzy+\nqWB4ZZaapliaVlpommmaV2ao5ZGm4kUqsmoe4IWa4oWs3IQCBigCu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Wm/1qxrv9as//TT\nT29t2rQpUiaTJXfq1OmP2NjYMEOOrW/fmvXi4mLHoUOHHvDz87vau3fv0ytWrJgBAKtWrXr/4sWL\n3f38/K527NjxhubupPPmzVtUWFjo3Llz5+symSxZ10OKCDEXusstIRz69NNPFzg4OJTMnDlzOR/H\nDwoKSli+fPlMf3//y3wcn9R+NNIghEMODg4lGzZsmMjXxX1paWne2nUTQrhGIw1CCCEGo5EGIYQQ\ng1GnQQghxGDUaRBCCDEYdRqEEEIMRp0GIYQQg/0f5kV5JRSR0IsAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.4, Page number: 433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", -<<<<<<< HEAD - "from matplotlib.pyplot import *\n", -======= ->>>>>>> 0ee873700378b995b441b1be6652178f741aea5b - "\n", - "#Variavle declaration:\n", - "rpm=2500 #rpm of motor\n", - "\n", - "\n", - "#Calculations & Results:\n", - "#For part (a):\n", - "theta=[0]*12\n", - "i=[0]*102\n", - "lambda1=[0]*102\n", - "for m in range(1,11,1):\n", - " theta[m-1]=10*(m-1)\n", - " for n in range(1,102,1):\n", - " i[n-1]=30*(n-1)/100\n", - " lambda1[n-1]=i[n-1]*(0.005+0.09*((90-theta[m-1])/90))*(8/(i[n-1]+8))\n", - "\n", - " \n", - " plot(i,lambda1,'.')\n", - " \n", - " if m==1:\n", - " hold(True)\n", - " \n", - "xlabel('current [A]')\n", - "ylabel('Lambda [Wb]')\n", - "title('Family of lambda-i curves as theta_m varies from 0 to 90 degrees') \n", - "annotate('theta_m=0 deg',xy=(6,0.03))\n", - "annotate('theta_m=0 deg',xy=(8,0.5))\n", - "\n", - "\n", - "#for part (b):\n", - "lambdamax=25*(0.005+0.09*(8/(25+8)))\n", - "AreaWnet=0\n", - "AreaWrec=0\n", - "deli=0.25\n", - "for n in range(1,102,1):\n", - " i[n-1]=25*(n-1)/100\n", - " AreaWnet=AreaWnet + deli*i[n-1]*(0.09)*(8/(i[n-1]+8))\n", - " AreaWrec=AreaWrec + deli*(lambdamax-i[n-1]*(0.005+0.09*(8/(i[n-1]+8))))\n", - "\n", - "Ratio=(AreaWnet+AreaWrec)/AreaWnet\n", - "print \"part (b): Ratio =\", round(Ratio,2)\n", - "\n", - "#for part(b):\n", - "rps=rpm/60\n", - "T=1/rps\n", - "Pphase=2*AreaWnet/T\n", - "Ptot=2*Pphase\n", - "print \"part (c): AreaWnet =\", round(AreaWnet,2),\"Joules\"\n", - "print \"Pphase =\",round(Pphase),\"W\",\"\\tPtot =\",round(Ptot),\"W\\n\"\n", - "plot(AreaWrec=0.7,AreaWnet=25)\n", - "grid()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part (b): Ratio = 1.55\n", - "part (c): AreaWnet = 9.91 Joules\n", - "Pphase = 825.0 W \tPtot = 1651.0 W\n", - "\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZ4AAAEXCAYAAACdwyIfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXlYE9f6x98EUEEiYQkiyKKiEVChKi5YC221LShi9cYF\nFa1LvPXa1tat3i7a+mtdqrW7V7xtUTGiVquixQVLrBUBN/AiFRQNIkpBCUskQgjz+yNOGIbMZAhZ\nJuF8nicPM2Rmck5m+eZdzns4GIYBAoFAIBDmgmvpBiAQCASic4GEB4FAIBBmBQkPAoFAIMwKEh4E\nAoFAmBUkPAgEAoEwK0h4EAgEAmFWWCU8PB6vTiaTBQAAzJs3L+mjjz5ab+zPuHDhwpj+/fvf4vF4\ndceOHZtEfj8gIEB29uzZl439uVKpNMrX17eU6fZJSUnzxo4de96Qz7p3754fj8erwzCMY8j+nYV1\n69atmzN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QmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter9.ipynb b/ELECTRIC_MACHINERY/chapter9.ipynb deleted file mode 100755 index 3cdb1b6c..00000000 --- a/ELECTRIC_MACHINERY/chapter9.ipynb +++ /dev/null @@ -1,390 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:934a14335227a49c83c2d399431a59d2d79025dde47942572f3e87ac684c8499" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9: Single- and Two-Phase Motors" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.1, Page number: 459" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Zmain=4.5+3.7j #main winding impedance(ohm)\n", - "Zaux=9.5+3.5j #auxilliary winding impedance(ohm)\n", - "f=60 #frequency(Hz)\n", - "\n", - "\n", - "#Calculations:\n", - "phy_main=math.degrees(math.atan(Zmain.imag/Zmain.real))\n", - "phy=phy_main-90\n", - "w=2*pi*60\n", - "Xc=symbols('Xc')\n", - "a=solve((3.5+Xc)/9.5-math.tan(math.radians(float(phy))), Xc)\n", - "C=-1/(w*a[0])\n", - "\n", - "\n", - "#Results:\n", - "print \"The starting capacitance:\",round(float(C)*10**6,0), \"uF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The starting capacitance: 176.0 uF\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.2, Page number: 467" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "from math import *\n", - "\n", - "\n", - "#Variable Declaration:\n", - "R1_m=2.02 #resistance of main winding(ohm)\n", - "X1_m=2.79 #resistance of main\n", - "R2_m= 4.12 #Rotor resistance ref. to stator(ohm)\n", - "X2_m=2.12 #Rotor reactance ref. to stator(ohm)\n", - "Xm=66.8 #Magnetising reactance(ohm)\n", - "s=0.05 #slip\n", - "Pcu=24 #copper loss(W)\n", - "Pw=13 #friction & windage loss(W)\n", - "V=110 #line-to-line voltage(V)\n", - "p=4 #no.of poles\n", - "fc=60 #frequency(Hz)\n", - "\n", - "#Calculations:\n", - "X22=X2_m+Xm\n", - "Q2_m=X22/R2_m\n", - "Rf=(Xm**2/X22)*(1/(s*Q2_m+1/(s*Q2_m)))\n", - "Xf=(X2_m*Xm/X22)+Rf/(s*Q2_m)\n", - "Zf=Rf+1j*Xf #forward field impedance(ohm)\n", - "\n", - "Rb=R2_m*(Xm/X22)**2/(2-s)\n", - "Xb=(X2_m*Xm/X22)+Rb/((2-s)*Q2_m)\n", - "Zb=Rb+1j*Xb #bachward field impedance\n", - "Zt=0.5*(Zf+Zb)+R1_m+1j*X1_m\n", - "I=V/abs(Zt) #Stator current(A)\n", - "pf=cos(cmath.phase(Zt)) #power factor\n", - "Pin=V*I*pf\n", - "Pg_f=I**2*0.5*Rf #power absorbed by forward field(W)\n", - "Pg_b=I**2*0.5*Rb #power absorbed by backward field(W)\n", - "Pmech=(1-s)*(Pg_f-Pg_b)\n", - "Pshaft=Pmech-(Pcu+Pw)\n", - "ws=(2/p)*120*pi\n", - "ns=(120/p)*fc\n", - "n=(1-s)*ns #Rotor speed(rpm)\n", - "wm=(1-s)*ws\n", - "Tshaft=Pshaft/wm #shaft torque(Nm)\n", - "eff=Pshaft/Pin\n", - "\n", - "#Results:\n", - "print \"Stator current:\",round(I),\"A\", \"\\nPower factor:\",round(pf,3)\n", - "print \"Power output:\",round(Pshaft),\"W\", \"\\nSpeed:\",n,\"rpm\"\n", - "print \"Shaft torque:\",round(Tshaft,3),\"Nm\",\"Efficiency\",round(eff*100),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Stator current: 4.0 A \n", - "Power factor: 0.621\n", - "Power output: 147.0 W \n", - "Speed: 1710.0 rpm\n", - "Shaft torque: 0.823 Nm Efficiency 60.0 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.3, Page number: 474" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import cmath\n", - "\n", - "\n", - "#Variable declaration:\n", - "f=60 #freq(Hz)\n", - "omeag=2*pi*f\n", - "s=0.05 #slip\n", - "R1=0.534 #resistance of main winding(ohm)\n", - "X1=2.45\n", - "Xm=70.1\n", - "R2=0.956\n", - "X2=2.96\n", - "Valpha=230\n", - "Vbeta=210*cmath.exp(1j*80*pi/180)\n", - "\n", - "#Calculations:\n", - "Vf = 0.5*(Valpha - 1j*Vbeta)\n", - "Vb = 0.5*(Valpha + 1j*Vbeta)\n", - "Zf=R1+1j*X1+1j*Xm*(R2/s+1j*X2)/(R2/s+1j*(X2+Xm))\n", - "If=Vf/Zf\n", - "Zb=R1+1j*X1+1j*Xm*(R2/(2-s)+1j*X2)/(R2/(2-s)+1j*(X2+Xm))\n", - "Ib = Vb/Zb\n", - "Ialpha=If+Ib\n", - "Ibeta=1j*(If-Ib)\n", - "Pgf=2*((Vf*(If.conjugate())).real-R1*abs(If)**2)\n", - "Pgb=2*((Vb*(Ib.conjugate())).real-R1*abs(Ib)**2)\n", - "Pmech=(1-s)*(Pgf-Pgb)\n", - "\n", - "\n", - "#Results:\n", - "print \"(a) Positive seq components:\", round(Vf.real,1)+1j*round(Vf.imag,1),\"V\"\n", - "print\" Negative seq. components:\", round(Vb.real,1)+1j*round(Vb.imag,1),\"V\"\n", - "\n", - "print\"\\n(b) Positive stator currents:\",round(If.real,1)+1j*round(If.imag,1),\"A\"\n", - "print\" Negative stator currnets:\",round(Ib.real,1)+1j*round(Ib.imag,1),\"A\"\n", - "\n", - "print\"\\n(c) Positive currents:\",round(Ialpha.real,1)+1j*round(Ialpha.imag,1),\"A\"\n", - "print\" Negative currnets:\",round(Ibeta.real,1)+1j*round(Ibeta.imag,1),\"A\"\n", - "\n", - "print \"\\n(d) Power to forward field:\",round(Pgf,0),\"W\"\n", - "print \" Power to backward field:\",round(Pgb,0),\"W\"\n", - "print \" Pmech:\",round(Pmech,0),\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Positive seq components: (218.4-18.2j) V\n", - " Negative seq. components: (11.6+18.2j) V\n", - "\n", - "(b) Positive stator currents: (9.3-6.3j) A\n", - " Negative stator currnets: (3.7-1.5j) A\n", - "\n", - "(c) Positive currents: (13-7.8j) A\n", - " Negative currnets: (4.8+5.6j) A\n", - "\n", - "(d) Power to forward field: 4149.0 W\n", - " Power to backward field: 15.0 W\n", - " Pmech: 3928.0 W\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.5, Page number: 483" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "import cmath\n", - "from math import *\n", - "from matplotlib.pyplot import *\n", - "\n", - "#Variable declaration:\n", - "Lmain=0.0806 #main winding inductance(H)\n", - "Rmain = 0.58 #main winding resistance(ohm)\n", - "Laux = 0.196 #auxilliary winding inductance(H)\n", - "Raux = 3.37 #auxilliary winding resistance(ohm)\n", - "Lr=4.7*10**-6 #rotor inductance(H)\n", - "Rr=37.6*10**-6 #rotor resistance(ohm)\n", - "Lmain_r=0.588*10**-3 #main inductance ref. to rotor(H)\n", - "Laux_r = 0.909*10**-3 #aux inductance ref. to rotor(H)\n", - "p=2 #poles\n", - "Vo=230 #terminal voltage(V)\n", - "w=120*pi #angular frequency(Hz)\n", - "C=35*10**-6\n", - "Prot=40 #Windage losses(W)\n", - "Pcore=105 #Core loss(W)\n", - "n=3500 #rpm\n", - "\n", - "\n", - "#calculations and Results:\n", - "Xc=-1/(w*C)\n", - "speed=[0]*102\n", - "for cal in range(1,3,1):\n", - " if cal==1:\n", - " mmax=2\n", - " else:\n", - " mmax=102\n", - " for m in range(1,mmax,2):\n", - " if cal==1:\n", - " speed[m-1]=3500\n", - " else:\n", - " speed[m-1]=3599*(m-1)/100\n", - " \n", - " ns=(2/p)*3600\n", - " s=(ns-speed[m-1])/ns\n", - "\n", - "#for part (a):\n", - " Kplus=s*w/(2*(Rr+1j*s*w*Lr))\n", - " Kminus=(2-s)*w/(2*(Rr+1j*(2-s)*w*Lr))\n", - " A1=Lmain-1j*Lmain_r**2*(Kplus+Kminus)\n", - " A2=Lmain_r*Laux_r*(Kplus-Kminus)\n", - " A3=Laux-1j*Laux_r**2*(Kplus+Kminus)\n", - " M=[[0]*2,[0]*2]\n", - " M[0][0]=Rmain + 1j*w*A1\n", - " M[0][1] = 1j*w*A2;\n", - " M[1][0] = -1j*w*A2;\n", - " M[1][1] = Raux + 1j*Xc+ 1j*w*A3\n", - " V=[[Vo],[-Vo]]\n", - " M1=inv(M)\n", - " I=dot(M1,V)\n", - " Imain=I[0][0]\n", - " Iaux=I[1][0]\n", - " Is=Imain-Iaux\n", - " magImain=abs(Imain)\n", - " angleImain=math.degrees(cmath.phase(Imain))\n", - " magIaux=abs (Iaux)\n", - " angleIaux=math.degrees(cmath.phase(Iaux))\n", - " magIs=abs(Is)\n", - " angleIs=math.degrees(cmath.phase(Is))\n", - " Vcap=Iaux*Xc\n", - " magVcap=abs(Vcap)\n", - " \n", - " #for part (b):\n", - " Tmech=[0]*102\n", - " Pshaft=[0]*102\n", - " Tmechl = (Kplus-Kminus).conjugate()\n", - " Tmechl=Tmechl*(Lmain_r**2*Imain*((Imain).conjugate())+Laux_r**2*Iaux*((Iaux).conjugate()))\n", - " Tmech2 = 1j*Lmain_r*Laux_r*((Kplus+Kminus).conjugate())\n", - " Tmech2 = Tmech2*((Imain).conjugate()*Iaux-Imain*((Iaux).conjugate()));\n", - " Tmech[m-1] = (p/2)*(Tmechl+Tmech2).real\n", - " Pshaft=((2/p)*(1-s)*w*Tmech[m-1])-Prot\n", - " \n", - " #for part (c):\n", - " Pmech=[0]*102\n", - " Pmain = (Vo*(Imain.conjugate())).real\n", - " Paux = (-Vo*(Iaux.conjugate())).real\n", - " Pin = Pmain+Paux+Pcore\n", - " eta = Pshaft/Pin;\n", - " if cal==1:\n", - " print \"part (a):\"\n", - " print \"\\nImain=\",round(magImain,1),\"A at an angle\",round(angleImain,1),\"degrees\"\n", - " print \"\\nImain=\",round(magIaux,1),\"A at an angle\",round(angleIaux,1),\"degrees\"\n", - " print \"\\nImain=\",round(magIs,1),\"A at an angle\",round(angleIs,1),\"degrees\"\n", - " print \"\\nVcap=\",round(magVcap,0),\"V\"\n", - " print \"\\npart (b):\"\n", - " print \"\\nTmech=\",round(Tmech[0],2),\"Nm\"\n", - " print \"\\nPshaft=\",round(Pshaft),\"W\"\n", - " print \"\\npart (c):\"\n", - " print \"\\nPmain=\",round(Pmain,0),\"W\"\n", - " print \"\\nPaux=\",round(Paux,0),\"W\"\n", - " print \"\\nPin=\",round(Pin,0),\"W\"\n", - " print \"\\nEfficiency=\",round(eta*100,1),\"%\"\n", - " else:\n", - " \n", - " plot(speed,Tmech,'g.')\n", - " xlabel('speed (rpm)')\n", - " ylabel('Tmech (Nm)')\n", - " title('Electromagnetic torque vs speed')\n", - " show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part (a):\n", - "\n", - "Imain= 15.9 A at an angle -37.6 degrees\n", - "\n", - "Imain= 5.2 A at an angle -150.8 degrees\n", - "\n", - "Imain= 18.5 A at an angle -22.7 degrees\n", - "\n", - "Vcap= 394.0 V\n", - "\n", - "part (b):\n", - "\n", - "Tmech= 9.75 Nm\n", - "\n", - "Pshaft= 3532.0 W\n", - "\n", - "part (c):\n", - "\n", - "Pmain= 2893.0 W\n", - "\n", - "Paux= 1043.0 W\n", - "\n", - "Pin= 4041.0 W\n", - "\n", - "Efficiency= 87.4 %\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEXCAYAAABGeIg9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVNX7B/BzBwYRGWQRRgRhWJUdXMBcxxTD3CVUTCRE\n6WupuaZWJmYqmWZq+s0dtXCrVCxB00TNBUJBBFQEGRAdERGUfZm5vz/8Xn8Tw+7s83m/Xvclc+4s\nzxyEh3Oec+5QNE0TAAAASSxlBwAAAKoHyQEAAKQgOQAAgBQkBwAAkILkAAAAUpAcAABACpKDBoiO\njv5g0KBBl5Udhzp79913Tx88eDBE2XFAy/D/XTGQHNQEj8cTGBgYVHI4nDLmmDdv3hZZPb9AIOCx\nWCyxWCzW+P8TkZGRkSEhIQcl206fPv1uw7bWYLFY4gcPHtjLLjoA1aCr7ACgdSiKon///ffRb7/9\n9l/yfB2apqmmzolEIh0dHR2RPF9fHTXXZ82pr6/X1dXVrZd1PACyoPF/JWqju3fv9vT39//TzMys\nuGfPnnePHTsWxJyrqqrquGjRoo08Hk9gbGxcOnjw4EvV1dX6gwcPvkQIIcbGxqVGRkYvr1+/3i86\nOvqDAQMGXFm4cOF3Xbp0ebZq1aqVL1++NJo+ffoBCwuLpzweT7BmzZrPmV+Okvc3MTEpcXR0zL56\n9Wr/ffv2hdnY2ORzudzCAwcOTGdi+eOPP0b5+PikdO7c+YWNjU3+qlWrVkq+jwMHDky3tbXN69Kl\ny7Ovv/76Cx6PJ/jrr7/eJuTVX/+TJk06Ghoaut/IyOilu7t7+o0bN3ozj338+HG3wMDAXy0sLJ7a\n29s/2Lp161xCCImPjw9Yt27d8iNHjkzmcDhlPj4+KYQQwufzE/bs2RPOPH7Xrl2zXF1dM42MjF66\nubll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mtrWWbmZk9o2mamJubP2V2\nFnt7e6dYW1s/LC8v79S7d+9kd3f320y7ra2t4M6dOz3Hjx9//MKFC3zmeXv16nWjseTg4uKSKXkJ\nC11d3TrJy6Y0Fc8HH3ywLyYmJpimaZKTk2Pv5OSUxTxm+vTp+0+cODGOud2vX79rd+7c6ansPseh\nXYfCPyYUQBacnJzup6Sk+Pzxxx+jvvjii6+HDRt2fsWKFasb3o+pE9A0TSUmJvrp6enVNrzPb7/9\nNtHJyel+w3a6iatgNnc/fX396tZeqZeJhcViiTt06FDDtLNYLHF9ff3rn02apilVuIopaBfUHEAt\nCYVCS319/er333//58WLF29ISUnxYc4dOXJkMvNv//79rxJCyIgRI85u2bJlHnOfW7dueRFCyDvv\nvHNGsp15nsGDB1+KiYmZSggh6enp7mlpaZ6NxWFra5snFAotm4u1sXjaorCwkKvsKxSD9sHIAdTS\n7du3PZYsWfIti8USs9nsuh9//PE/zLmSkhITLy+vW/r6+tWHDh0KJoSQLVu2zPv444+3eXl53aqv\nr9cdMmTIxe3bt3+0YsWK1fPnz//e09MzTSwWs+zt7R/ExsaOnT179n/DwsL2ubq6Zrq4uNzp06dP\ncmNxDBw48O/k5OQ+vXv3vkFI45/h0Vg8De/b8HHM7SdPnnQ1MzMr7tSpU8Wb9hlAW+DCe6BR7Ozs\ncm/cuNHb1NT0uSJe78GDB/Zz587d+scff4ySRzw7d+6MqKio6LRgwYJNbxYpQNtgWgk0iqLn5u3t\n7R9wOJyypjbBvWk8R44cmTxr1qxdb/IcAO2BkQMAAEjByAEAAKQgOQAAgBQkBwAAkILkAAAAUpAc\nAABACpIDAABI+T9crBvDDQoKmwAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY/screenshots/capture1.png b/ELECTRIC_MACHINERY/screenshots/capture1.png deleted file mode 100755 index 1196a40b..00000000 Binary files a/ELECTRIC_MACHINERY/screenshots/capture1.png and /dev/null differ diff --git a/ELECTRIC_MACHINERY/screenshots/capture2.png b/ELECTRIC_MACHINERY/screenshots/capture2.png deleted file mode 100755 index 56b278d5..00000000 Binary files a/ELECTRIC_MACHINERY/screenshots/capture2.png and /dev/null differ diff --git a/ELECTRIC_MACHINERY/screenshots/capture3.png b/ELECTRIC_MACHINERY/screenshots/capture3.png deleted file mode 100755 index a8df3c9e..00000000 Binary files a/ELECTRIC_MACHINERY/screenshots/capture3.png and /dev/null differ diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter10-checkpoint.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter10-checkpoint.ipynb new file mode 100755 index 00000000..de5013c9 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter10-checkpoint.ipynb @@ -0,0 +1,364 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Introduction to Power Electronics" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.5, Page number: 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from pylab import *\n", + "import numpy as np\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "w=2*pi*60 #frequency of voltage(Hz)\n", + "R=10 #ohm\n", + "C=0.01 #F\n", + "Vo=120*sqrt(2) #maximum voltage(V)\n", + "Nmax=800\n", + "tau=R*C #time constant(s)\n", + "\n", + "#Calculations:\n", + "# diode = 1 when rectifier bridge is conducting\n", + "\n", + "diode=1\n", + "t=[0]*801\n", + "vs=[0]*801\n", + "vrect=[0]*801\n", + "vR=[0]*801\n", + "iB=[0]*801\n", + "\n", + "t=[0]*801\n", + "for n in range(1,Nmax+2,1):\n", + " t[n-1] = (2.5*pi/w)*(n-1)/Nmax\n", + " vs[n-1]=Vo*math.cos(w*t[n-1])\n", + " vrect[n-1]=abs(vs[n-1])\n", + "#if the rectifier bridge is ON:\n", + " if diode==1:\n", + " vR[n-1]=vrect[n-1]\n", + " if (w*t[n-1])<=(pi/2):\n", + " iB[n-1]=vR[n-1]-Vo*C*w*math.sin(w*t[n-1])\n", + " elif (w*t[n-1])<=3*pi/2:\n", + " iB[n-1]=vR[n-1]/R+Vo*C*w*math.sin(w*t[n-1])\n", + " else:\n", + " iB[n-1]=vR[n-1]/R-Vo*C*w*math.sin(w*t[n-1])\n", + " if iB[n-1]<0:\n", + " diode=0\n", + " toff=t[n-1]\n", + " Voff=vrect[n-1]\n", + " else:\n", + " vR[n-1]=Voff*exp(-(t[n-1]-toff/tau))\n", + " iB[n-1]=0\n", + " if (vrect[n-1]-vR[n-1])>0:\n", + " diode=1\n", + "\n", + "\n", + "\n", + "#Results:\n", + "iR=(1/R)*np.array(vR)\n", + "plot(1000*np.array(t),vR)\n", + "xlabel('time [msec]')\n", + "ylabel('voltage [V]')\n", + "xlim(0,22)\n", + "ylim(0,180)\n", + "plot(1000*np.array(t),vrect,'--')\n", + "grid()\n", + "print \"The required plots are shown below:\"\n", + "show()\n", + "plot(1000*np.array(t),iR)\n", + "xlabel('time [msec]')\n", + "ylabel('source current [A]')\n", + "xlim(0 ,22)\n", + "ylim(-50,250) \n", + "plot(1000*np.array(t),1.5*np.array(iB),'--')\n", + "grid()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "The required plots are shown below:" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhki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erHx/cXGx8u+DBg0iiYmJzS0T\nxxFCCDGg3YQ4Tt1II9NhDR48GCYmJjAxMYGpqalyJkdPT0+kpKTgwYMHSEpKqnMe4cmTJ41uVyKR\nICgoCBKJBB4eHlAoFBg+fLhy3VlZWTA3N4ehoSFmz56NkJAQjB49GgBw5MgRZGRkKNdVUVGBR48e\n4ejRo9i7d6/ydVbnpOc0F28CnM4xNjZW/l1PT0+5rKenB4VCAUIILC0tkZycrPK6jYyMlOsyNDSs\nsx2FQgF9fX2cP38eR48exZ49e7BhwwYcO3YMEokECQkJMDB48T/Jxpoax7UEPyfAaZ1WrVopn6eg\nitoPWwsLC1haWuLAgQPK1+s7J6Cq0tJSlJSUIDg4GJGRkUhKSgIADBs2DN9//73yfbXbGz58ODZt\n2qR8/dGjR2rJwXG1eBPgtI61tTW8vb3h5uaGJUuWKJ9+BaDO32uXn/177fLOnTsRGRkJqVQKDw+P\nJp+QrW/dtcuPHj1CUFAQfHx8EBgYiDVr1gAAvv/+e/z555/w9PSEh4cH1q5dCwD44osvcPfuXbi5\nucHb2xtHjx5tRkU4rn78eQIc10yfffYZ2rZti/fff5/K9gcPHozIyEj07NmTyvY57cCPBDiumdq2\nbYsffviB2s1iGRkZdc47cFxz8CMBjuM4HcaPBDiO43QYbwIcx3E6jDcBjuM4HcabAMdxnA7jTYDj\nOE6H/T8o9Q6nwzgdWAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEPCAYAAACgFqixAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVOW+P/DPDHJTGLzglfFIsUvljrfK1MRSEz2paWk7\nPF4qtTK3sml32afE+pVHzZ3urZ3cW819DtVGy3YZSJaKph3FVFKzixkUgwkoilyEAeb5/cGeSQSG\nWcDMetbM5/168ZI1lzVfP+J8Wc9azzM6IYQAERF5NL3aBRAR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nQgghpk6dKrZv3y4KCwtFRESE7Tnl5eW2+w8ePCiEEOKnn34SYWFhQgghFi9eLJKTk22PLy0ttX0/\nevRocezYsdbGRCSEEKKD2s2IyFlEC8tuxcfHw8/PD35+fujcubNt5cioqCjk5OTg0qVLOH78eIPz\nDNeuXWvxdXU6He69917odDpERkbCYrFg7Nixtn3n5+ejW7du8Pb2xiOPPIKEhAT8+7//OwDgs88+\nQ25urm1f1dXVuHr1Kvbs2YMPP/zQdrusa+KTdrEZkMfy9fW1fa/X623ber0eFosFQgh0794dJ06c\nULxvHx8f2768vb0bvI7FYoGXlxeOHDmCPXv24P3338eGDRuwd+9e6HQ6HD16FB06NP6v2VJzI2oL\nnjMgt+Xv72/7PAclrG+6wcHB6N69Oz7++GPb7c2dM1CqoqICZWVlmDBhAtasWYPjx48DAO655x68\n+eabtsdZX2/s2LHYuHGj7farV6+2Sx1EVmwG5LZ69uyJ2NhYhIeH45lnnrF9GheABt9bt6//3rqd\nlpaGNWvWIDo6GpGRkQ6fuG1u39btq1ev4t5770VcXBxGjhyJ119/HQDw5ptv4tNPP0VUVBQiIyOx\nbt06AMDLL7+Mn3/+GeHh4YiNjcWePXtakQhR8/h5BkRttHz5cgQEBOD3v/+9Kq8fHx+PNWvWYNCg\nQaq8PrkHHhkQtVFAQAD++te/qjbpLDc3t8F5CaLW4JEBERHxyICIiNgMiIgIbAZERAQ2AyIiApsB\nEREB+P84YbaUtpWtuAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.6, Page number: 522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "w=2*pi*60 #Angular freq of voltage(rad/sec)\n", + "Vo=230*sqrt(2) #volt\n", + "R=5.6 #Resistance(ohm)\n", + "\n", + "#Calculations:\n", + "Ls=[0]*101\n", + "tc=[0]*101\n", + "Idc=[0]*101\n", + "for n in range(1,101,1):\n", + " Ls[n-1]=n*10**-3\n", + " Idc[n-1]=2*Vo/(pi*R+2*w*Ls[n-1])\n", + " tc[n-1]=(1/w)*acos(1-(2*Idc[n-1]*w*Ls[n-1])/Vo)\n", + "\n", + "#Results:\n", + "plot(1000*np.array(Ls),Idc,'g.')\n", + "xlabel('Commutating inductance Ls [mH]')\n", + "ylabel('Idc [A]')\n", + "title('Load current,Idc vs Commutating inductance,Ls')\n", + "show()\n", + "plot(1000*np.array(Ls),1000*np.array(tc),'g.')\n", + "xlabel('Commutating inductance L [mH]')\n", + "ylabel('tc [msec]')\n", + "title('Commutating Inductance,Ls vs time,tc')\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['fmod', 'sinh', 'trunc', 'tan', 'gamma', 'cosh', 'radians', 'modf', 'expm1', 'ldexp', 'linalg', 'random', 'frexp', 'ceil', 'isnan', 'copysign', 'cos', 'degrees', 'tanh', 'fabs', 'sqrt', 'hypot', 'power', 'log', 'log10', 'info', 'log1p', 'floor', 'fft', 'pi', 'exp', 'isinf', 'e', 'sin']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVOX+B/DPIKAog8CwCIJAGMoquKUFOgaGLJq54YaS\nll1LK7XlVr8EtCSXMrtlqZndQhJKK/cydRTFLVPR6pqaGGiyiorIIjy/P5TTsAyCMszAfN6vly9n\nhjnP+Z5nlu882zkyIYQAEREZPCNdB0BERPqBCYGIiAAwIRA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SXB398f+/btw5tvvoknnngCDz30EBQKhVSupvoPCAjAnDlz0K9fPwQEBOD5558HAHzyySfY\nsWMHfH194ePjgw8++KDO49y5cyecnZ3h7OyMLl264MSJE1KMQUFBWLp0qca6bWyd3W070j88/TW1\nWmVlZTA2NoaRkREOHDiAp556Cr/++quuw2px4uPjYW5ujjlz5jRpuRkZGRg6dChOnjzZpOXSvTPW\ndQBE2nLhwgWMGTNG+kX/6aef6jqkFsnc3BwrV67E9evXG70WQZPU1FQ899xzsLW1bZLyqGmwhUBE\nRAA4hkBERHcwIRAREQAmBCIiuoMJgYiIADAhEBHRHUwIREQEAPh//r/1KyU0gnEAAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUVEe+B/BvsxiRZlcQBEVxAQQB1+iAdkaMijqJC24x\nER0fGY1mRo3RIRpRRx2XxKcvzyROHM2iSYw5ZqIG4opx17gvmbhEHNC4gRCQHX7vDx5XQGgaoemG\n+/2cw7Fv9+2q6mr8dlH33mqNiAiIiEg1LEzdACIiqlsMfiIilWHwExGpDIOfiEhlGPxERCrD4Cci\nUhkGP9Wa//znP7Czs4O5nSGckJAALy8vUzdDdQ4ePAhfX19TN4MqwOA3gs2bN6Nr166wt7eHk5MT\nwsPDsX//flM3S6/ExERYWFigqKjI4Od4e3tj3759ynbLli2RkZEBjUZT6+2LiorCvHnzar3c6tDp\ndFi/fr1J21CeOX2oWVhY4JdfflG2w8LC8O9//9skdZN+DP5a9u677+KNN97AkiVLkJ6ejgcPHmD6\n9OmIj483ddMMUp3RukajqbPRvUajMcoHSnXbQPqZ8q89c/tL06wJ1Zq0tDTRarUSFxdX6T7Z2dky\nadIkcXJyEmdnZ4mOjpacnBwREdm/f7+0aNFCli9fLm5ubuLu7i7bt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CwEJs2bap0P0P06tVLOQ6w\nd+9ePHz48Kna3rRpUzRp0gTHjh0DAHz55ZfKY56enjh79ixEBLdu3cKJEyeg0WgQFhaGffv2Kd9+\nVPJl2DY2NsjKylKen5OTg+bNmwOAcnwFqDg4NRoN+vbtiy1btiA9PR0AlH/Dw8PxwQcfKPuWHOcg\nqgqDv4GytLREfHw8vv32WwQEBCAoKAhvvPEG3NzcMGrUKPj4+MDf3x+hoaFYunQpPDw8oNFoKh1h\nl3+sstulLV26FP3790dYWBjc3d2V+0eNGoWFCxcqB20XLFiALl26ICwsTJkyqmi/ypRu26JFi7Bt\n2zYEBwdjy5YtcHNzQ+PGjSt8TmXtL9nesGEDJk6ciO7du6OgoEC5/7nnnoOHhwc6dOiAP//5z8q0\nlpubG9auXYsBAwYgJCQEkZGRAIAhQ4Zg8+bNCA4OxqFDhzBv3jwMHToUPXr0gIuLi1JuZf0fEhKC\nmTNn4tlnn0VISAhef/11AMAHH3yA3bt3IzAwEAEBAVizZk2Fr3Pv3r3w8vJSfo4fP15pX+rrW319\nWNW+ZF64LDM1KHl5ebCysoKFhQWOHj2KSZMm4dKlS6Zulll77rnnsHLlyiqPy1TXxo0bcerUKfzP\n//xPrZZLNccRPzUoN2/eRJcuXRAYGIhXX30VH330kambZPacnZ0RFRVV7Qu49Fm1ahX+/ve/w8HB\nodbKpNrDET8RkcpwxE9EpDIMfiIilWHwExGpDIOfiEhlGPxERCrD4CciUpn/A229Zlz8j32nAAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.7, Page number: 528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "R=12.5*10**-3 #ohm\n", + "L=1.2 #H\n", + "Vo=15 #volt\n", + "w=120*pi #angular freq(Hz)\n", + "Idc=35 #DC current(A)\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "theta=[0]*1301\n", + "t=[0]*1301\n", + "vL=[0]*1301\n", + "vs=[0]*1301\n", + "\n", + "Vdc_a=R*Idc #Dc voltage(V)\n", + "P=Vdc_a*Idc #Power\n", + "alpha_da = acos(pi*R*Idc/(2*Vo)) ; #delay angle\n", + "for n in range(1,1301,1): #loop for calculating load voltage\n", + " theta[n-1]=2*pi*(n-1)/1000\n", + " t[n-1]=theta[n-1]/w\n", + " vs[n-1]=Vo*sin(theta[n-1])\n", + " if theta[n-1]" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a):\n", + "\n", + " Vdc_a= 437.5 mV\n", + "\n", + " Power= 15.0 W\n", + "\n", + " alpha_d= 87.4 degrees\n", + "\n", + " part (b):\n", + "\n", + " alpha_d= 162.0 degrees\n", + "\n", + " Vdc_b= -9.1 V\n", + "\n", + " Current will reach zero at 4.5 sec\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEPCAYAAAC3NDh4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8U2W+P/BP0oUWC54utEhb0lrASGnayiIDBYpQgSqo\nMy5sKsv9FeaqgIrDeGfmZQszI4zyErxFwY3eO6gjXJaZsnQEtRUGQehCUe6tLC1SEChd2Fra0J7f\nHzUnOSdJ0ywnZ/u+Xy9e5jltkofHQ755nu+z6FiWZUEIIYQ4oJe6AoQQQuSLggQhhBCnKEgQQghx\nioIEIYQQpyhIEEIIcYqCBCGEEKckDRLz5s1DTEwMUlJSuGu5ubmIi4tDeno60tPTUVRUJGENCSFE\n2yQNEnPnzrULAjqdDi+99BLKy8tRXl6OyZMnS1Q7QgghkgaJMWPGIDw83O46re8jhBB5kGVOYt26\ndbj33nsxe/ZsNDQ0SF0dQgjRLNkFieeeew6nT5/GiRMnkJSUhEWLFkldJUII0axAqS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DddhxNrU2UV5IxChIKp9U54MJvo4MiB2m2LRyxtIXwcKEHEh6Qxfh/eIg1L9HW\n3ibqkBPdF96hIEEUycAYeNt0lJwtoZ1hHRCujdj85GYJa2NVvqCcV953Zh/1JmSKgoTCaXm8Vbhp\n3NBXh0pYG3mx3Be2vYiI0AhZ9CIA++3fxVwzoeV/I75AQYIolnDIidZM8Am34fDXjq/dRWsmlIHW\nSRBFE66ZyB6QjV2zdklYI/mwXRuhhx71y+pl05MA7NdMBOuDcemVS7Kqo9rQOgmiOV1t06FlctiG\nwxWptukg7qEgoXBaH2/lrZmopiEni//a8V+8slTbcLjijyEnrf8b8RYFCaJotDOsY23tbdzjiNAI\n \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter3-checkpoint.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter3-checkpoint.ipynb new file mode 100755 index 00000000..22fca9a1 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter3-checkpoint.ipynb @@ -0,0 +1,460 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Electromechanical-Energy-Conversion-Principles " + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.1, Page number: 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "I=10 #current in the coil(A)\n", + "Bo=0.02 #magnetic field (T)\n", + "R=0.05 #radius of the rotor(m)\n", + "l=0.3 #rotor length(m)\n", + "\n", + "\n", + "#Calculations:\n", + "q=symbols('q') #Direction of torque\n", + "F1=-2*I*l*Bo*sin(q) #Force on the coil(N)\n", + "T=F1*R #Torque scting in theta direction(Nm)\n", + "\n", + "\n", + "#Results:\n", + "print \"Force per unit length:\",T,\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force per unit length: -0.006*sin(q) Nm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.2, Page number: 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "\n", + "#Variable declaration\n", + "N=1000 #No of winding turns\n", + "g=2 #Air gap width(mm)\n", + "d=0.15 #Magnetic core width,d (m)\n", + "l=0.1 #thickness of core(0.1)\n", + "x,d=symbols('x d') #where h is height of plunger(m) \n", + " #Lx is inductance as a function of x(H)\n", + "i=10 #Current in the winding(A)\n", + "uo=4*3.14*10**-7 #permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "Lx=(uo*N**2*l*d)/(2*g*10**-3)*(1-x/d)\n", + "Wfld=(1./2)*Lx*i**2\n", + "\n", + "\n", + "#Results:\n", + "print \"The magnetic energy stored, Wfld:\",\"236*(1-x/d) J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnetic energy stored, Wfld: 236*(1-x/d) J\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.3, Page number: 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "#Variable declaration:\n", + "xdata=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0] #(cm)\n", + "Ldata=[2.8, 2.26, 1.78, 1.52, 1.34, 1.26, 1.20, 1.16, 1.13, 1.11, 1.10] #(mH)\n", + "I = 0.75 #(A)\n", + "\n", + "\n", + "#Calculations:\n", + "x=0.01*np.array(xdata)\n", + "L=0.001*np.array(Ldata)\n", + "length=len(x)\n", + "xmax=x[length-1]\n", + "a=polyfit(x,L,4)\n", + "xfit=[0]*102\n", + "Lfit=[0]*102\n", + "for n in range(1,102,1):\n", + " xfit[n-1]=xmax*(n-1)/100\n", + " Lfit[n-1]=a[0]*xfit[n-1]**4+a[1]*xfit[n-1]**3+a[2]*xfit[n-1]**2+a[3]*xfit[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(xdata,Ldata,'o')\n", + "plot(100*np.array(xfit),1000*np.array(Lfit),'g.')\n", + "xlabel('x [cm] ')\n", + "ylabel('L [mH] ')\n", + "title('Inductance,L vs length,l')\n", + "grid()\n", + "print \"The required plots are shown below:\"\n", + "show()\n", + "\n", + "#set current to 0.75 A\n", + "I=0.75\n", + "F=[0]*102\n", + "for n in range(1,102,1):\n", + " xfit[n-1]=0.002+0.016*(n-1)/100\n", + " F[n-1]=4*a[0]*xfit[n-1]**3+3*a[1]*xfit[n-1]**2+2*a[2]*xfit[n-1]**1+a[3]\n", + " F[n-1]=(I**2/2)*F[n-1]\n", + "plot(100*np.array(xfit),F,'b.')\n", + "xlabel('x [cm]')\n", + "ylabel('Force [N]')\n", + "title('Force, F vs length,l')\n", + "grid()\n", + "\n", + "#Results:\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "The required plots are shown below:" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['Polygon', 'poly', 'sign', 'flatten', 'conjugate', 'diff', 'tan', 'Circle', 'roots', 'plot', 'eye', 'trace', 'floor', 'diag', 'invert', 'nan', 'sqrt', 'source', 'add', 'zeros', 'take', 'var', 'pi', 'plotting', 'product', 'seterr', 'power', 'multinomial', 'transpose', 'test', 'beta', 'ones', 'sinh', 'vectorize', 'cosh', 'trunc', 'cos', 'prod', 'tanh', 'mod', 'det', 'sin', 'binomial', 'solve', 'log', 'exp', 'reshape', 'gamma', 'interactive']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1YVHX+N/D3gA5ggIMPYAKFmWk8KSP+6jZEvNhEIYMW\nWRNDIV1Y+612WZvdJT50ZbXZuura1i23pq2Bm+G1rYYPkDFoZqmAqHlvFokw+jPFQB5iEGLuP4hp\nhuFhGL7DnJl5v67LaznMmcOXz57mw/fz+Z5zZFqtVgsiIqJfOFl7AEREJC1MDEREZICJgYiIDDAx\nEBGRASYGIiIywMRAREQGmBjI4tatW4eUlBRrD8MupKamYvXq1Vb52QEBATh69KhJ+/L/c9vGxEAm\n6cuHQmcymUzIGJycnPD9998LOZYoA/0BKJPJhMWzJ10loL787IEYI1kOEwOZZKA+kHojtesxrRET\nqcWgK7YwRuoeEwP12a5duxAREYEXXngBw4cPh6+vL/7973/rXv/mm28wZcoUeHp6YubMmaiurta9\nplKp4O/vb3A8/dlIa2srVq1aBV9fX3h4eECpVEKtViMyMhIAMHHiRHh4eOCjjz5CbW0tYmJiMGLE\nCHh4eOA3v/kNrly5ojtuVFQU1qxZg2nTpsHd3R2RkZG4efOm7vX8/HwolUp4eHjA19cX7733HgCg\nqakJS5cuhbe3N7y8vLBo0SI0NTV1GQtTPwCXLl2KF154weB78fHx2Lx5M4D2mYePjw88PDwwbtw4\nk2dnH374ISZMmABPT08olUqcPn1a91pAQAA2btyIsLAw3HXXXUhISDD4PdatW4dhw4bhnnvuwfbt\n2+Hk5ITy8nJkZWUhJycHGzZsgIeH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KpqQkp\nKSkIDAzs8T0lJSXYuHEjzpw5A09PT9TV1QFov51xXV0dPv/8c+zfvx+PP/44Tp06hfHjx2PKlCk4\nc+YMwsPDB+LXIjIbEwMRgDVr1iA8PBxubm7YunVrr/sfPXoU8+bNg6enJwDo/hcA4uLiAADBwcEY\nNWoUJkyYAAAICgpCVVUVEwNJHktJRGi/1XNjYyMaGhrQ1NTU6/4ymazbx0/K5XIAgJOTE1xcXHTf\nd3JyQltbm5gBE1kQEwMR2m9PvH79eiQnJ+PFF1/sdf/o6Gjs3bsXt2/fBgDd/xLZA5aSyOH94x//\ngIuLC5588km0tbVh6tSpUKlUiIqK6vY9YWFheP755/Hwww/D1dUVoaGheP/99wEYPjax86ojrkIi\nW8DnMRCZoKKiAnPmzMH58+eFHXPGjBnYuHGjsGsjiERhKYnIBIMGDcLt27eFXuB2+fJlDB48WMjx\niETijIGIiAxwxkBERAaYGIiIyAATAxERGWBiICIiA0wMRERk4P8Dh4QQJ+0nzZ8AAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEZCAYAAACw69OmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9YVHW+B/D3CCoa2iiEGEOi3J6b/BJIumqa7BrRDNtq\nsS7pyoZ50Ut7+x2P6yMbuQutkJtpezO9t5UnUbsT3d1KZFrdmLAs7QpKVFfXX8WACIioFeAo3/sH\nOyPjDDIMZ+acGd6v5+GR75nvzHzn43nmw/l+zvcclRBCgIiIaJCGyT0AIiLyDUwoREQkCSYUIiKS\nBBMKERFJggmFiIgkwYRCRESSYEIh8hLDhg3DyZMnPf6+RqMR4eHhTvePiIjA3/72NzeOiJSKCYUU\nKyIiAqNHj8aYMWMwZswYjB07Fk1NTXIPy2rYsGEIDAy0jm/8+PFyD0kSg01cKpUKKpVKwhGRt/CX\newBEfVGpVNi1axd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EVpbWxEeHo41a9bAbDYD4L45UP3F\nkvvlwHzyyScoLS1FXFwcEhISAAAvvvgivv32WwCu7Z9c2EhERJJg+iYiIkkwoRARkSSYUIiISBJM\nKEREJAkmFCIikgQTChERSYIJhYiIJMGEQuQBfn5+SExMxJkzZwb9Wr/4xS8QFBSEd955R4KREUnH\n61fKE3mD0aNHo7q6WpLX2r59O5YuXcqLSJLi8AiFaIA+//xzTJs2DV1dXfj+++8RExODr776akCv\n8Ze//MV6yYt58+YBAF544QU88sgj+NGPfoSIiAj8z//8D5577jnExcVh3rx56OrqsnkNXuSClIZH\nKEQDlJSUhJ/+9KfIy8tDR0cHMjMzERUV5fTzz5w5g5ycHPzv//4vwsLCcPHiRetjp0+fhtFoxBdf\nfIEZM2bg3Xffxbp16/DQQw/h/fffx89+9jN3fCQiSTChELng+eefx/Tp0zFq1Ci8+uqrA3ruxx9/\njHvvvdd61daxY8cC6LnPxP333w+VSoWYmBh0d3cjJSUFABAbG2tzGXEiJeKUF5ELWltb8f333+O7\n775DR0fHgJ6rUqn6nK4aMWIEAGDYsGEYPny4dfuwYcPQ3d3t+oCJPIAJhcgFK1asQEFBARYvXoyV\nK1cO6LmzZ8/Ghx9+aL2Vant7uzuGSORxnPIiGqA333wTI0eOxMMPP4zu7m7MmjULRqMRycnJTj0/\nNDQUr732Gu6//34MHz4cwcHB2LNnDwDb26tefxYXz+oipeP9UIg8YMyYMbh06ZJkr5eVlYUHHngA\n6enpkr0m0WBxyovIA8aOHSvpwsZ9+/Zh1KhREoyMSDo8QiEiIknwCIWIiCTBhEJERJJgQiEiIkkw\noRARkSSYUIiISBL/D5upbph/P2HSAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.4, Page number: 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "Lo=10.6*10**-3 #Initial inductance(H)\n", + "L2=2.7*10**-3 #H\n", + "\n", + "\n", + "#Calculations:\n", + "theta,i=symbols('theta i')\n", + "L=Lo+L2*cos(2*theta)\n", + "i=2 #Coil current,A\n", + "def T(theta):\n", + " return i**2*diff(L,theta)/2\n", + " \n", + "\n", + "#Results:\n", + "print \"Torque,Tfld =\",T(theta),\" N.m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque,Tfld = -0.0108*sin(2*theta) N.m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.6, Page number: 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "r1=2.5*10**-2 #radius of rotor(m)\n", + "h=1.8*10**-2 #Axial length(m)\n", + "g=3*10**-3 #Air gap length(m)\n", + "Bag=1.65 #Magnetic field(T)\n", + "uo=4*pi*10**-7 #permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "H=Bag/uo\n", + "Ni=2*g*H\n", + "T=uo*(Ni)**2*h*(r1+0.5*g)/(4*g)\n", + "\n", + "#Results:\n", + "print \"The maximum torque:\", round(T,2),\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum torque: 3.1 Nm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.7, Page number: 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from matplotlib import *\n", + "\n", + "#Variable declaration:\n", + "i1=0.8\n", + "i2=0.01\n", + "\n", + "\n", + "#Calculations & Results:\n", + "def df(f,x,h=0.1e-10):\n", + " return ( f(x+h/2) - f(x-h/2) )/h\n", + "\n", + "\n", + "\n", + "def l11(x):\n", + " return (3+cos(2*x))/1000.0\n", + "\n", + "def l12(x):\n", + " return (0.3*cos(x))\n", + "\n", + "def l22(x):\n", + " return (30+10*cos(2*x))\n", + "\n", + "def g(x):\n", + " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x) + (i1*i2)*df(l12,x)\n", + "\n", + "def r(x):\n", + " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x)\n", + "def s(x):\n", + " return (i1*i2)*df(l12,x)\n", + "\n", + "x=linspace(-pi,pi,100000)\n", + "\n", + "\n", + "plot(x,r(x))\n", + "plot(x,s(x))\n", + "plot(x,g(x))\n", + "grid()\n", + "annotate(\"Total torque\",xy=(-0.5,0.003))\n", + "annotate(\"Reluctance torque\",xy=(-2,-0.0015))\n", + "annotate(\"Mutual Interaction torque\",xy=(1.6,-0.0026))\n", + "xlabel(\"Theta [radians]\")\n", + "ylabel(\"Torque [N.m]\")\n", + "xlim(-pi,pi)\n", + "\n", + "\n", + "#Results\n", + "print \"Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)\"\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['vectorize', 'prod', 'plotting', 'Circle', 'diag', 'sinh', 'trunc', 'plot', 'eye', 'det', 'tan', 'product', 'gamma', 'roots', 'sin', 'zeros', 'cosh', 'interactive', 'conjugate', 'take', 'trace', 'beta', 'exp', 'ones', 'multinomial', 'cos', 'transpose', 'solve', 'diff', 'invert', 'pi', 'tanh', 'Polygon', 'reshape', 'sqrt', 'floor', 'source', 'add', 'poly', 'mod', 'sign', 'power', 'binomial', 'log', 'var', 'seterr', 'flatten', 'nan', 'test']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAcAAAAEPCAYAAADVmxQSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYFOcTx7+AvUfBioolFo4udiVgxII9UbFG0diVqCnm\np0aNLRE1doMt2CMIKipIROUUGypFBWtEkQMLiJ12cPP745UL6B0ccHe7LPt5Hh7dvbfM3O7t7Ftm\nxoCICCIiIiIiIqUMQ64FEBERERER4QLRAIqIiIiIlEpEAygiIiIiUioRDaCIiIiISKlENIAiIiIi\nIqUS0QCKiIiIiJRKODWAQUFBsLS0hLm5OVasWKGyjLu7OyQSCezs7BAZGalx3dWrV8PQ0BApKSk6\nk19EREREpOTCmQHMyMjAlClTEBQUhBs3bsDX1zePgQMAPz8/PH78GDExMdixYwfc3Nw0qhsfH4/g\n4GA0btxYrzqJiIiIiJQcODOAYWFhkEgkaNCgAcqUKQNXV1cEBATkKRMYGIjRo0cDAGxtbZGVlQWZ\nTFZg3dmzZ8PDw0Ov+oiIiIiIlCw4M4AymQwNGzZUHpuamkImk2lUJiEhQW1df39/mJqawsrKSsca\niIiIiIiUZMpw1bGBgYFG5TSJ1JZTJi0tDcuXL0dwcHCh6ouIiIiIlD44M4CmpqaIj49XHsfHx+cZ\n1eUu0759ewD/jQjlcnmeujnnHzx4gEePHsHa2lp5vk2bNrhy5Qpq166dp+3mzZvjwYMHulJPRERE\nRHBYW1sjKiqKazG0B3FEWloaNW7cmGQyGWVmZpK9vT2Fh4fnKePr60sDBw4kIqLw8HCysrLSuC4R\nkZmZGb148UJl//mpvnDhwiJqxV+EqBORMPUSdSo5CFGv/HTi0GToBM5GgBUqVMCff/6Jnj17QqFQ\nYPTo0bCzs8OWLVsAAJMmTcLXX3+NkJAQSCQSlC9fHl5eXvnW/RhNp1k/5tGjR0XWi68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o6KisKqVasglUohFovVDdGkSZOwdOlS9SCY0NBQODg4wMXFBdbW1pXOp0kMfn5+\n2LRpExwcHJCRkQEjIyN1Xd27d4eVlRWmTZuGAQMGVDqPVCqFRCJBnz594O3tDWdn51rrXLlyJaRS\nKWQyGVq2bAlPT0+NYiakqaL9AAnhSWhoKIyMjPDxxx/zHUqtjI2NaVQoERzqARLCEyMjI2zcuLHB\nE+F16dlE+K5du/IdCiFaRz1AQgghzRL1AAkhhDRL1AASQghplqgBJIQQ0ixRA0gIIaRZogaQEEJI\ns/T/jVWB3070t1UAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.9, Page number: 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable declaration:\n", + "W=4.0*10**-2 #width of plunger lower arm(m)\n", + "W1=4.5*10**-2 #width of plunger upper arm(m)\n", + "D=3.5*10**-2 #depth of plunger (m)\n", + "d=8*10**-3 #length of magnet(m)\n", + "go=1*10**-3 #air gap length(m)\n", + "uo=4*pi*10**-7 #Permeability of free space(A.turns/m)\n", + "ur=1.06*uo #Relativity permeability\n", + "Hc1=-940 #Magnetising force(kA/m)\n", + "Bt=1.25 #Magnetic field induction(T)\n", + "N=1500 #No of turns\n", + "x=3*10**-3 #Position of plunger(m)\n", + "\n", + "#Calculation:\n", + "Ni=-Hc1*d*10**3\n", + "Rx=x/(uo*W1*D)\n", + "Ro=go/(uo*W*D)\n", + "Rm=d/(ur*W*D)\n", + "f=-((Ni)**2)/(uo*W1*D*(Rx+Ro+Rm)**2)\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"The x-directed force:\",round(f,1),\"N\"\n", + "print \"Current in the excitation winding:\",round(Ni/N,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The x-directed force: -703.3 N\n", + "Current in the excitation winding: 5.01 A\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter5-checkpoint.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter5-checkpoint.ipynb new file mode 100755 index 00000000..3f99f735 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter5-checkpoint.ipynb @@ -0,0 +1,609 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Synchronous Machines" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.1, Page number: 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import cmath\n", + "\n", + "#Varaible Declaration:\n", + "pf=0.95 #Lagging power factor\n", + "Vl=460 #Terminal voltage(V)\n", + "I=120 #Terminal current(A)\n", + "If=47 #Field current(A)\n", + "X=1.68j #Line syncchronous reactance(ohm)\n", + "\n", + "\n", + "#Calculation:\n", + "#Choosing motor reference direction:\n", + "Va=Vl/math.sqrt(3)\n", + "theta=math.acos(0.95)\n", + "Ia=I*cmath.exp(-theta*1j)\n", + "Eaf=Va-X*Ia\n", + "wc=120*math.pi\n", + "Laf=math.sqrt(2)*abs(Eaf)/(wc*If)\n", + "P=3*Va*Ia*pf\n", + "\n", + "#Results:\n", + "print \"Generated emf:\",round(abs(Eaf),1),\"V line to line\"\n", + "print \"Fied to armature mutual inductance:\",round(Laf*1000,1),\"mH\"\n", + "print \"Three phase power:\",round(abs(P/1000),1),\"kW or\",round(abs(P)/746),\"hp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated emf: 278.8 V line to line\n", + "Fied to armature mutual inductance: 22.3 mH\n", + "Three phase power: 90.8 kW or 122.0 hp\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2, Page number: 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath \n", + "from math import *\n", + "\n", + "#Variable Declaration:\n", + "Pin=90.6*10**3 #Input power(kW)\n", + "Va=265.6 #Terninal voltage(V)\n", + "X=1.68j #Synchronous reactance(ohm)\n", + "Laf=22.3*10**-3 #Mutual inductance(H)\n", + "wc=120*pi #Angular frequency(rad/sec)\n", + "\n", + "\n", + "#Calculations:\n", + "Ia=Pin/(3*Va)\n", + "Eaf=Va-X*Ia\n", + "delta=degrees(cmath.phase(Eaf))\n", + "I=sqrt(2)*Eaf/(wc*Laf)\n", + "\n", + "\n", + "#Results:\n", + "print\"The phase angle,delta:\",round(delta,1),\"degrees\"\n", + "print\"Required field current:\",round(abs(I),2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase angle,delta: -35.7 degrees\n", + "Required field current: 55.04 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.3, Page number: 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Eafl=13.8*10**3 #Open circuit voltage(V)\n", + "If1=318 #Field current(A)\n", + "If2=263 #Field current after extrapolation(A)\n", + "wc=120*pi #Angular frequency(Hz)\n", + "\n", + "#Calculations:\n", + "Eaf=Eafl/sqrt(3)\n", + "La1=sqrt(2)*Eaf/(wc*If1)\n", + "La2=sqrt(2)*Eaf/(wc*If2)\n", + "\n", + "#Results:\n", + "print \"Saturated Laf1:\",round(La1*1000,0),\"mH\" \n", + "print \"Unsaturated Laf1:\",round(La2*1000,0),\"mH\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Saturated Laf1: 94.0 mH\n", + "Unsaturated Laf1: 114.0 mH\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.4, Page number: 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Ia=[118, 152] #Armature current from SC Characteristics(A)\n", + "If=[2.20, 2.84] #Field current from SC Characteristics(A)\n", + "Vll=220 #Line-to-line Voltage(V)\n", + "V=202 #Line-to-line air voltage(V) \n", + "P=45*10**3 #Power roted to motor(W) \n", + "Is_sc=1 #per unit rated current(A)\n", + "\n", + "#Calculations:\n", + "Va_ag=V/sqrt(3) #At field current of 2.20A,at air gap,(V)\n", + "Ia_ag=Ia[0]\n", + "Xs_u=Va_ag/Ia_ag\n", + "Ia_rated=P/(sqrt(3)*Vll)\n", + "Xa_g=Va_ag/1\n", + "Xs_u_pu=Va_ag/Is_sc\n", + "Xs=Vll/(Ia[1]*sqrt(3))\n", + "Ia_pu=Ia[1]/Ia[0]\n", + "SCR=If[1]/If[0]\n", + "Xs=1/SCR\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"'All quantities are in per unit values'\"\n", + "print\"Unsaturated value of synchronous reactance:\",round(Xs_u,3),\"ohm\"\n", + "print \"Satureted value of synchronous reactance: \",round(Xs,3),\"ohm\"\n", + "print\"Short circuit ratio:\",round(SCR,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "'All quantities are in per unit values'\n", + "Unsaturated value of synchronous reactance: 0.988 ohm\n", + "Satureted value of synchronous reactance: 0.775 ohm\n", + "Short circuit ratio: 1.291\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.5, Page number: 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "P_rated=45*10**3 #Rated power(KV)\n", + "Pl=1.80*10**3 #Short circuit load loss(W)\n", + "Ia_pu=1 #Per unit armature current\n", + "Ia=118 #rated armature current(A)\n", + "Ra_dc=0.0335 #Dc resistance(ohm/phase)\n", + "\n", + "\n", + "#Calculations:\n", + "Pl_pu=Pl/P_rated \n", + "Ra_eff1=Pl_pu/Ia_pu**2 #in per unit basis\n", + "Ra_eff2=Pl/(3*(Ia)**2)\n", + "\n", + "#Results:\n", + "print \"Armature resistance in per unit:\",round(Ra_eff1,3),\"per unit\" \n", + "print \"Armature resistance in ohms/phase:\", round(Ra_eff2,3),\"ohms/phase\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature resistance in per unit: 0.04 per unit\n", + "Armature resistance in ohms/phase: 0.043 ohms/phase\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.6, Page number: 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "import cmath\n", + "import math\n", + "\n", + "\n", + "#Variable declaration:\n", + "Veq=1.0 #Externalsupply(p.u) \n", + "Eaf=1.0 #Internal voltage(p.u)\n", + "Xeq=0.23 #Eqv.resistance of external system(p.u)\n", + "Xs=1.35 #Saturated synchronous reactance(p.u)\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "P_max=Eaf*Veq/(Xs+Xeq)\n", + "\n", + "\n", + "#for part (b):\n", + "delta=[0]*500\n", + "Ia=[0]*500\n", + "Va=[0]*500\n", + "degree=[0]*500\n", + "for n in range(1,101,1):\n", + " delta[n-1]=(pi/2)*(n-1)/100\n", + " Ia[n-1] = (Eaf *exp(1j*delta[n-1]) - Veq)/(1j*(Xs + Xeq))\n", + " Va[n-1] = abs(Veq + 1j*Xeq*Ia[n-1])\n", + " degree[n-1]=180*delta[n-1]/pi\n", + "plot(degree,Va,'r.')\n", + "xlabel('Power angle,delta(degrees)')\n", + "ylabel('Terminal voltage(per unit)')\n", + "title('Terminal voltage vs. power angle for part (b)')\n", + "show()\n", + "#for part (c):\n", + "Vterm=1.0\n", + "P=[0]*500\n", + "deltat=[0]*500\n", + "Ia=[0]*500\n", + "Eaf=[0]*500\n", + "\n", + "for n in range(1,101,1):\n", + " P[n-1]=(n-1)/100\n", + " deltat[n-1]=math.asin(P[n-1]*Xeq/(Vterm*Veq))\n", + " Ia[n-1]=(Vterm*exp(1j*deltat[n-1])-Veq)/(1j*Xeq)\n", + " Eaf[n-1]=abs(Vterm+1j*(Xs+Xeq)*Ia[n-1])\n", + "plot(P,Eaf,'r.')\n", + "xlabel('Power [per unit]')\n", + "ylabel('Eaf [per unit]')\n", + "title('Eaf vs. power for part (c)')\n", + "show()\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"(a) Maximum power supplied to external system:\",round(P_max,2),\"p.u\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['prod', 'Circle', 'power', 'diag', 'sinh', 'trunc', 'binomial', 'plot', 'eye', 'det', 'tan', 'product', 'roots', 'vectorize', 'sin', 'plotting', 'zeros', 'cosh', 'conjugate', 'linalg', 'take', 'solve', 'trace', 'beta', 'draw_if_interactive', 'random', 'ones', 'transpose', 'cos', 'interactive', 'diff', 'invert', 'tanh', 'Polygon', 'reshape', 'sqrt', 'floor', 'source', 'add', 'multinomial', 'test', 'poly', 'mod', 'sign', 'fft', 'gamma', 'log', 'var', 'info', 'seterr', 'flatten', 'nan', 'pi', 'exp']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4TPf+B/D3RGRBEtllIwQJkZUgBFE0qPCrhqC0pUpz\ndbnVS91eWy9arvZ2uW2JW8ttLa2lC0WqJLFEBRVVqrGGJASxJWSffH5/RE6NLJOJzEyk79fz5DFn\n5pwzn3NmnPec7/csKhEREBHRn56JsQsgIqL6gYFAREQAGAhERHQPA4GIiAAwEIiI6B4GAhERAWAg\n1HsxMTGYP3/+Q88nLS0NJiYmKC0trYOq/jB37lyMGzeuTudJ9cPDfGfUajXGjBkDKysrdO/eXQ/V\nGca1a9fQoUMHFBYWAgDCw8OxfPnySse9cuUKOnbsiKKiIkOWWKcYCDXUrFkzWFlZwcrKCiYmJmjS\npIkyvG7dOr2975IlSzBz5ky9zf9hqVQq5bG+QocePbt378bevXtx7do1HDhwwNjlVMrExATnzp2r\ndpyFCxdi/PjxMDc3B1D2fb//O38/Z2dn9O3bF8uWLavzWg2FgVBDd+7cQW5uLnJzc9GqVSt8//33\nyvDo0aNrNI+SkhI9V2l4lZ3XyHMd9UNEHpl1m5GRAU9PT1hYWOg8rb7/n6jVauVxdeuzsLAQn3/+\nOcaOHVvjeT/99NOIjY19qPqMiYHwkEpLSzFr1iy4ubnBxsYGQ4cORXZ2NoA/fjGvWLECrVu3Rv/+\n/fG///0PPXv2xNSpU2FnZ4e2bdti//79WLlyJTw9PWFra4v//ve/yvyfe+45zJo1CwCQmJgId3d3\n/Pvf/4aLiwscHBywdOlSZdwtW7bA398f1tbWcHZ2xowZM2q0DIsWLcKIESM0nnv11Vfx6quvKssx\nYMAAWFlZwd3dHR9++KHGuOW/mHr37g0AaN68OaysrJCcnIyzZ8+iV69esLOzg42NDZ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EiIsPQWyCoVKoajSciNZtOpSr7IyIi/RA92bNnjzzxxBPK\n8L/+9S+ZP3++xjgTJkyQDRs2KMO+vr6SkZFRYV5egIB//OMf//in05+Xl5dO221T6ElISAiOHz+O\nzMxMODk5Yf369YiNjdUYZ/DgwVi9ejWioqJw5MgRNGrUCG5ubhXmdeaBvQgiIqp7egsECwsLLFmy\nBBERESgtLcW4ceMQHByshMLkyZPx1FNPISEhAb6+vjA3N8fKlSv1VQ4REWmhEuHPbyIiqudnKtfk\nxDZDmDBhApydneHn56c8d+PGDQwYMAD+/v6IiIjArVu3DFpTeno6evfuDT8/P3h7e+Nf//qX0esq\nKChASEgIgoKC0L59e7z22mtGr6mcWq1GUFAQIiMj60VNnp6e8Pf3R1BQELp27VovagKAW7duYcSI\nEQgICECHDh1w4MABo9aVmpqKoKAg5c/GxgYfffSR0dfVnDlz0L59e/j4+CAqKgp5eXlGr2nhwoVo\n3749OnXqhA8//BBALb5TOvU4GFBBQYF4enpKRkaGFBcXS5cuXeTIkSNGqWXPnj1y5MgR6dSpk/Lc\nSy+9JO+//76IiLz//vvyyiuvGLSmrKws+fXXX0VEJDc3V9q1aydHjx41el15eXkiIlJcXCzdunWT\n+Ph4o9ckIvLee+/JmDFjJDIyUkSM//l5enrK9evXNZ4zdk0iIlFRUbJ27VoREVGr1XL79u16UVd5\nPS1atJCLFy8atabTp09L69atpbCwUERERo4cKZ999plRazp8+LD4+vpKfn6+lJSUSP/+/eXYsWM6\n11RvA2H37t0aRyktXrxY5s2bZ7R6zp8/rxEIbdq0kezsbBERuXbtms69+XXtqaeekq1bt9abuu7e\nvStdunSR48ePG72m9PR06devn8THx8uQIUNExPifn6enp/L+5YxdU3Z2trRt27bC88auq9wPP/wg\nYWFhRq/p+vXr0r59e7lx44YUFxfLkCFDZMeOHUatac2aNfL8888rw/PmzZP58+frXFO9bTKq7yet\nXbt2Dfb29gAABwcHXL161Wi1pKWl4dChQwgLCzN6XaWlpQgMDISzszP69u0LX19fo9f02muvY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ERHdw0AgIiIADAQiIrqHgUBERACA/wct+bjT\na/B03gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVHX+B/D3IIogKKCCwuAlbEMIBDQNBZ3S1HDRvP0I\nFVf4WcTmtj219dNKhbYs3a19tmxdyKweuyiJ5oWkX6mD4GPoTy7mZbVMk4voYvaAIreZ7+8P1iMH\nmGGAOXOB9+t5ePacOd8585ljez7zvZ2vSgghQERE9B8O1g6AiIhsCxMDERHJMDEQEZEMEwMREckw\nMRARkQwTAxERyTAxkCJOnTqF0aNHw9XVFRs3brR2ODbj5s2bmD59OlxdXREbG2vtcDrtzJkzeOCB\nB9ott3fvXjz++OMWiIjMiYmBDBoxYgRcXFzg5uYm/T3zzDMmvXfDhg2Ijo7GzZs3sWLFCoUjtR8Z\nGRmoqqpCVVUVtm/fbu1wWrl06RIcHByg1+uNllu9ejVeeOGFds8XExOD06dP4/vvvzdXiGQBTAxk\nkEqlwr59+1BdXS39vfPOOya9t7S0FIGBgQpHaNt0Ol2r10pLS3HvvffCwaHj/9drbGw0R1gmnd/Y\nvNcrV65Aq9XiscceM+m8cXFxSE9P73J8ZDlMDNQpFy5cQFRUFDw9PTFgwADMnz8fN27cAAA8/PDD\nOHz4MFasWIH+/fvjxx9/lL13+/btrZoh/va3v2HOnDkAgC+//BL33nsvXF1d4ePjgw0bNpgU07Jl\ny/DUU09hxowZ6N+/PyZMmCD77AMHDuD++++Hm5sbgoODcfDgQQDAoUOHEBISIpV75JFHMH78eGk/\nKioKe/bsAdD0izo6Ohru7u4YOnQo1q9fL5VLSUnBggULEB8fDw8PD3z88cey+NauXYvXX38d27dv\nh5ubGz788EMIIbBq1Sp4e3vD3d0dCxculK7jnV/vW7ZswciRI/HII4+0+s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9+A6Cps7q8vByRkZEAgKeffhq+vr4ICgrC\nmDFjkJCQgIaGBqnN3lT9+vXD0aNHERYWhn379uHVV18F0JQk3nrrLYSEhOD+++/HF198YfR7AIBG\no4GPjw/uu+8+/PGPf8TYsWPbfE/zGJtvx8fHIyEhoVXnM1Fn8LHbRCZyc3OTzZ9ouW9rli1bhpiY\nGMyfP9/aoZCdYY2ByET9+/dHeHg4KioqANh2m/7ixYuRm5sLZ2dna4dCdog1BiIikmGNgYiIZJgY\niIhIhomBiIhkmBiIiEiGiYGIiGSYGIiISOb/AYya6qOulzG5AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Maximum power supplied to external system: 0.63 p.u\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.7, Page number: 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "P_rated=2000*746/3 #per phase rated power of motor(W)\n", + "Xsm=1.95 #Synchronous reactance(ohm)\n", + "Vl=2300 #Line to line voltage(V)\n", + "f=60 #Angular frequency(Hz)\n", + "p=30 #No. of poles\n", + "Xsg=2.65 #Synchronous reactance of generator(ohm)\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "Vp=2300/sqrt(3)\n", + "Ip=P_rated/Vp\n", + "Eafm=sqrt(Vp**2+(Ip*Xsm)**2)\n", + "Pm=3*Vp*Eafm/Xsm #Max power delivered to motor(W)\n", + "ws=2*2*pi*f/p\n", + "Tmax=Pm/ws #MAx torque of motor(Nm)\n", + "\n", + "\n", + "#for part (b):\n", + "Eafg=sqrt(Vp**2+(Ip*Xsg)**2)\n", + "Pm2=3*Eafm*Eafg/(Xsg+Xsm) #Max power delivered to motor(W)\n", + "Tmax2=Pm2/ws #Max torque(Nm)\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print\"(a) Max power :\",round(Pm/1000,0),\"kW,3-ph\"\n", + "print\" Max torque :\",round(Tmax/1000,1),\"kNm\"\n", + "print \"(b) Max power :\", round(Pm2/1000,0),\"kW,3-ph\"\n", + "print \" Max torque:\", round(Tmax2/1000,1),\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Max power : 3096.0 kW,3-ph\n", + " Max torque : 123.2 kNm\n", + "(b) Max power : 1639.0 kW,3-ph\n", + " Max torque: 65.2 Nm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.8, Page number: 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "\n", + "#Variable declaration:\n", + "P=45 #Power rated(KVA)\n", + "Va=220 #Terminal voltage(V)\n", + "Pin=45 #Power input to the armature(KVA)\n", + "If=5.50 #field current(A)\n", + "Rf=35.5 #Field winding resistance(ohm)\n", + "Ra=0.0399 #Armature dc resistance(ohm/phase)\n", + "Xal=0.215 #Leakage reactance of motor(ohm)\n", + "pf=0.80 #Lagging power factor \n", + "Pc=1.8 #Core loss(kW)\n", + "Pw=0.91 #Friction & windage losses(kW)\n", + "Ps=0.37 #Stray load loss(kW)\n", + "\n", + "\n", + "#Calculations:\n", + "Ia=P*10**3/(sqrt(3)*Va)\n", + "P1=If**2*Rf/10**3 #Loss in field winding(kW)\n", + "P2=3*Ia**2*Ra/10**3 #Loss in armature(kW)\n", + "Pl=(Pc+Pw+Ps+P1+P2)\n", + "Pi=Pin*pf+P1\n", + "Po=Pi-Pl\n", + "eff=(Po/Pi)*100\n", + "\n", + "#Results:\n", + "print \"Efficiency of the synchronous machine:\",round(eff,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of the synchronous machine: 84.3 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.9, Page number: 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import cmath\n", + "\n", + "#Variable declaration:\n", + "Xd=1 #Direct axis synchronus reactance(p.u)\n", + "Xq=0.60 #Quadrature axis synchronous reactance(p.u)\n", + "Va=1 #Terminal voltage(p.u)\n", + "pf=0.8 #Lagging power factor\n", + "Ia=0.8-1j*math.sin(math.acos(0.8)) #Line current(p.u)\n", + "\n", + "\n", + "#Calculations:\n", + "phy=-math.acos(pf)\n", + "E=Va+1j*Xq*Ia\n", + "delta=cmath.phase(E)\n", + "Id=abs(Ia)*math.sin(delta-phy)*cmath.exp(1j*(-pi/2+delta))\n", + "Iq=abs(Ia)*math.cos(delta-phy)*cmath.exp(1j*delta)\n", + "Eaf=Va+Xd*Id*1j+Xq*Iq*1j\n", + "\n", + "\n", + "#Results:\n", + "print \"Generated voltage:\",round(abs(Eaf),2),\"p.u Volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated voltage: 1.78 p.u Volt\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.11, Page number: 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from pylab import *\n", + "import cmath\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "P_rated=2000*746 #Rated power of motor(W)\n", + "Xs=1.95 #Synchronous reactance(ohm/phase)\n", + "Xd=1.95 #Direct axis synchronous reactance(ohm/ph)\n", + "Xq=1.40 #Quadrature axis synchronous reactance(ohm/ph)\n", + "pf=1 #Power factor of the machine\n", + "Vl=2300 #Line to line voltage(V)\n", + "\n", + "#Calculatons:\n", + "Va=float(Vl/sqrt(3)) #volt\n", + "Ia=float(P_rated/(Va*3)) #ampere\n", + "E1=Va-1j*Ia*Xq #From phasor diagram\n", + "delta=cmath.phase(E1) #power angle\n", + "Id=Ia*sin(abs(delta)) #direct axis current(A)\n", + "Eaf=abs(E1)+Id*(Xd-Xq)\n", + "r=symbols('r')\n", + "def P(r): #Process for finding maximum power\n", + " return Eaf*Va*sin(r)/Xd + Va**2*(Xd-Xq)*sin(2*r)/(2*Xd*Xq)\n", + "P1=diff(P(r),r)\n", + "#On differentiation,\n", + "#P1 = 1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1)\n", + "l = solve(1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1),r)\n", + "P_max = (P(round(l[0],5)))\n", + "\n", + "\n", + "#Results:\n", + "print \"Maximum mechanical power:\",math.ceil(3*P_max/10**3),\"kW,3-phase\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum mechanical power: 3236.0 kW,3-phase\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/README.txt b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/README.txt new file mode 100755 index 00000000..4b574a6d --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/README.txt @@ -0,0 +1,10 @@ +Contributed By: SANTOSH BARNWAL +Course: be +College/Institute/Organization: BIRLA INSTITUTE OF TECHNOLOGY MESRA +Department/Designation: ELECTRICAL & ELECTRONICS +Book Title: ELECTRIC MACHINERY +Author: A. E. Fitzgerald, Charles Kingsley, Jr., Stephen D. Umans +Publisher: McGraw-Hill, New York +Year of publication: 2003 +Isbn: 0-07-112193-5 +Edition: Sixth Edition \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter1.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter1.ipynb new file mode 100755 index 00000000..3eaa70a1 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter1.ipynb @@ -0,0 +1,560 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:29b5ec9b20f222bcfeb31d6e80f55e5d32272a4cce1e9227a6328e93313e209d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter 1:Introduction to Magnetic Circuits

" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.1, Page number: 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "#Variable declaration:\n", + "Ac=9 #Cross-sectional area of the core(cm**2)\n", + "Ag=9 #Cross-sectional area of the air-gap(cm**2)\n", + "g=0.050 #Air-gap length(cm) \n", + "lc=30 #Mean Length of the core(cm)\n", + "N=500 #No. of windings\n", + "ur=70000 #Relative permeability of the core material\n", + "Bc=1.0 # Magnetic Flux Density of the core(T)\n", + "uo=4*pi*10**-7 #Permeability of free space\n", + "\n", + "#Calculation\n", + "Rc=lc*10**-2/((ur*uo*Ac)*10**-4)\n", + "Rg=g*10**-2/((uo*Ag)*10**-4)\n", + "Q=Bc*Ac*10**-4\n", + "i=Q*(Rc+Rg)/N\n", + "\n", + "#Results\n", + "print \"a.Reluctance of the core,Rc:\",round(Rc,2), \"A.turns/Wb\" \n", + "print \" Reluctance of the air-gap,Rg:\", round(Rg,2), \"A.turns/Wb\"\n", + "print \"b.The flux, Q:\", round(Q,4), \"Wb\"\n", + "print \"c.The current,i:\", round(i,2), \"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a.Reluctance of the core,Rc: 3789.4 A.turns/Wb\n", + " Reluctance of the air-gap,Rg: 442097.06 A.turns/Wb\n", + "b.The flux, Q: 0.0009 Wb\n", + "c.The current,i: 0.8 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.2, Page number: 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "#Variable declaration:\n", + "I=10 #Current in the coil(A)\n", + "N=1000 #No of turns in the rotor\n", + "g=1 #Air gap length(cm)\n", + "Ag=2000 #Cross-section of the air-gap(cm**2)\n", + "uo=4*pi*10**-7 #Permeability of free space\n", + "\n", + "#Calculation:\n", + "Q=(N*I*uo*Ag*10**-4)/(2*g*10**-2)\n", + "Bg=round(Q,2)/(Ag*10**-4)\n", + "\n", + "#Results\n", + "print \"The air-gap flux, Q:\", round(Q,2), \"Wb\"\n", + "print \"The flux density, Bg:\", round(Bg,4), \"T\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The air-gap flux, Q: 0.13 Wb\n", + "The flux density, Bg: 0.65 T\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.4, Page number: 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "#Variable declaration\n", + "lc=0.3 #length of the core(cm)\n", + "ur1=72300 #Relative permeablity for case(a)\n", + "ur2=2900 #Relative permeablity for case(b)\n", + "Ac=9 #Cross-section of the core(cm**2)\n", + "Rg=4.42*10**5 #Reluctance of the air-gap(A.turns/Wb)\n", + "N=500 #No of coil turns\n", + "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "Rt1=(lc/(ur1*uo*Ac*10**-4))+Rg\n", + "L1=N**2/Rt1\n", + "Rt2=(lc/(ur2*uo*Ac*10**-4))+Rg\n", + "L2=N**2/Rt2\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"(a)Inductance,L:\",round(L1,2),\"H\"\n", + "print \"(b)Inductance,L:\",round(L2,2),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Inductance,L: 0.56 H\n", + "(b)Inductance,L: 0.47 H\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.5, Page number: 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from pylab import *\n", + "from matplotlib import *\n", + "from math import *\n", + "%matplotlib inline\n", + "#Variable declaration:\n", + "Ac=9e-4 #Cross-section of the core(m)\n", + "Ag=9e-4 #Cross-section of the air-gap(m)\n", + "g=5e-4 #Air-gap length(m)\n", + "lc=0.3 #Mean length of the core(m)\n", + "N=500 #No. of turns of the core(m)\n", + "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "Rg=g/(uo*Ag) #Reluctance of the air-gap(A.turns/Wb)\n", + "ur=[0]*200 #Initialising array\n", + "L=[0]*200\n", + "\n", + "for n in range(1,101,1):\n", + " ur[n-1]=100+(10000-100)*(n-1)/100\n", + " Rc=lc/(ur[n-1]*uo*Ac) #Reluctance of the core(A.turns/Wb)\n", + " Rtot=Rg+Rc\n", + " L[n-1]=(N**2)/Rtot #Inductance(H)\n", + " \n", + "\n", + "#Results:\n", + "print \"The reqired plot is shown below:\"\n", + "plot(ur, L,'g.')\n", + "xlabel('Core relative permeability, ur')\n", + "ylabel('Inductance,L (H) ')\n", + "title('plot of inductance vs. relative permeability for Example 1.5.')\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reqired plot is shown below:\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEXCAYAAABRWhj0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcE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nR09Kzhw4dfGTJkyI2r\nV68Oe/LkiRUhb84MZLm6rLEzIgaDQTW17hUVFZo6OjplvXv3rnv48KHdjRs3htDTicVihZMnT/oQ\nQkh4eHiA5BlZcxqrq3nz5h357rvvljMYDMrOzu4hHcOYMWNSpKc3MjJ6/uLFC8PS0lLd169f94qP\nj58sy3Khe0PSgGadPXt2WkpKyhhra+tsR0fHe2vXrv3axMSkcNq0aWednJzuODs7/z169Og/du7c\nudLQ0PCF9PP9Fy1a9LODg0PmoEGD0vv373936dKl++kEIklymrFjx/4eEBAQ7uHhcd3JyemOj4/P\nyaqqKnXJcrNnzz5x69YtFycnpzvHjh0LtLe3f0AIIXp6eiXDhg272r9//7urVq3aIR3PzJkzT0VF\nRfnOmjUrmv5u/fr1mxsaGphOTk53HB0d723YsGFjY/G5urreXLZs2V4HB4fMPn36PJ02bdpZfX39\nl0eOHJnn7+8f4ezs/PfQoUOvPXr0yLaxupSMQzou+rP0us+aNSu6qqpKffz48YlCoVDJwcEhc82a\nNds8PDyu09OqqalVp6WlufXv3/8uj8fjfvXVV5ta/p/937oihBBDQ8MXDg4OmfPnz/+FLldYWGii\npLHZU3wAAACpSURBVKQklJ6eyWQ2fPXVV5vc3NzSxo0bl+zg4JApy3Khe8MDCwFkwOPxuLt3714R\nFxc3pbNjkaeamhpVJyenOxkZGQPpF4Lt27fvQwsLi9zJkyfHd3Z80PnQpwEgg57wdriUlJQxixYt\n+vmzzz77VvINkh9++OG+zowLuhacaQAAgMzQpwEAADJD0gAAAJkhaQAAgMyQNAAAQGZIGgAAIDMk\nDQAAkNn/ASu6P4PfImgPAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.6, Page number: 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "Bc=1.0 #Magnetic field induction in the core\n", + "w=377 #Angular frequency of magnetic field(rad/s)\n", + "Rc=3791.33 #Reluctance of the core(A.turns/Wb)\n", + "Rg=442321.3 #Reluctance of the air-gap(A.turns/Wb)\n", + "N=500 #No. of windings\n", + "i=0.80 #Current in the coil\n", + "Ac=9*10**-4 #Cross-section of the core\n", + "\n", + "\n", + "#Calculations:\n", + "L=N**2/(Rc+Rg)\n", + "W=(1./2)*L*i**2\n", + "t = symbols('t')\n", + "Bc = 1.0*sin(w*t)\n", + "e=N*Ac*diff(Bc,t)\n", + "\n", + "#Results:\n", + "print \"The Inductance, L:\", round(L,2), \"H\"\n", + "print \"The magntic stored energy, W:\", round(W,2), \"J\"\n", + "print \"Induced voltage, e:\",e,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Inductance, L: 0.56 H\n", + "The magntic stored energy, W: 0.18 J\n", + "Induced voltage, e: 169.65*cos(377*t) V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.7, Page number: 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "#Variable declaration:\n", + "Bc=1 #Magnetic field in the core\n", + "Hc=11 #Magnetising force(A.turns/m)\n", + "lc=0.3 #length of the core(m)\n", + "N=500 #No of windings\n", + "g=0.050 #Air-gap length(cm)\n", + "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", + "\n", + "\n", + "#Calculation:\n", + "Fc=Hc*lc #mmf drop for the core path(A.turns)\n", + "Fg=Bc*g*10**-2/uo #mmf drop across the air gap(A.turns)\n", + "i=(Fc+Fg)/N\n", + "\n", + "\n", + "#Results:\n", + "print \"The required current,i:\" ,round(i,2) ,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required current,i: 0.8 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.8, Page number: 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "N=200 #No. of turns\n", + "Ac=4 #Cross-section of the core(in**2)\n", + "w=377 #Angular frequency of the magnetic field(rad/s)\n", + "Hm=36 #Max value magnetising force(A.turns/m)\n", + "Pc=1.2 #Core loss density(W/kg)\n", + "\n", + "\n", + "#Calculations:\n", + "t=symbols('t')\n", + "Bc=1.5*sin(w*t)\n", + "e=(round(N*Ac*0.94/(39.4**2),2)*diff(Bc,t))\n", + "Erms=275*0.707\n", + "lc=(6+6+8+8)/39.4 #Mean length of the core(m)\n", + "I=Hm*lc/N\n", + "Vc=4*0.94*28 #Core volume(m**3)\n", + "Wc=105.5*(2.54**3)*7.65*10**-3 #Core weight(kg)\n", + "Pa=1.5*13.2 #Watts per Kg\n", + "Irms=Pa/Erms #Current (A)\n", + "Pct=Pc*Wc #Total core loss(W)\n", + "\n", + "\n", + "#Results:\n", + "print \"The applied voltage,e:\", e, \"V\"\n", + "print \"The peak current,I:\", round(I,2), \"A\"\n", + "print \"The total rms current. Irms:\", round(Irms,2), \"A\"\n", + "print \"Total Core loss, Pct:\",round(Pct,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The applied voltage,e: 271.44*cos(377*t) V\n", + "The peak current,I: 0.13 A\n", + "The total rms current. Irms: 0.1 A\n", + "Total Core loss, Pct: 15.87 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.9, Page number: 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable Declaration:\n", + "g=0.2 #air-gap length(cm)\n", + "lm=1.0 #length of magnetic section(cm)\n", + "Am=4 #Cross-section of the core(cm**2)\n", + "Ag=4 #Cross-section of the air-gap(cm**2)\n", + "\n", + "#Constants used:\n", + "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "Hm=symbols('Hm')\n", + "def Bg(Hm):\n", + " return -uo*Ag*lm*Hm/(Am*g) \n", + "\n", + "Hm1=-49*10**3 #Coercivity of ALNICO 5 (A/m)\n", + "Hm2=-6 #Coercivity of M-5 electrical steel (A/m) \n", + "\n", + "\n", + "#Results:\n", + "print \"Flux Density of air gap:\", round(Bg(Hm1),2),\"T\"\n", + "print \"\\nFlux Density of air gap:\", round(Bg(Hm2*10**4),2),\"gauss\"\n", + "print \"\\nwhere value of Hm for different material.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux Density of air gap: 0.31 T\n", + "\n", + "Flux Density of air gap: 0.38 gauss\n", + "\n", + "where value of Hm for different material.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.10, Page number: 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Ag=2 #Cross-section of air-gap(cm**2) \n", + "Bg=0.8 #Air-gap flux density(t)\n", + "Bm=1.0 #Core-flux density(T)\n", + "Hm=-40 #Magnetising force in the core(kA/m)\n", + "uo=4*pi*10**-7 #permeability of free space(H/m)\n", + "g=0.2 #Air-gap length(cm)\n", + "\n", + "#Calculations:\n", + "Am=Ag*Bg/Bm\n", + "lm=-g*Bg/(Hm*uo*10**3)\n", + "Vm=Am*lm\n", + "\n", + "\n", + "#Results:\n", + "print \"The minimum magnet volume,Vm:\",round(Vm,2),\"cm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum magnet volume,Vm: 5.09 cm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.11, Page number: 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable Declaration:\n", + "Am = 2 #magnetic material cros-section(cm^2)\n", + "g=0.2 #air gap length(cm)\n", + "uo=4*pi*10**-7 #permeability of free space(H/m)\n", + "N=100 #No. of windings\n", + "\n", + "#Calculations and results:\n", + "#for part (a)\n", + "Bma = 1.0 #Tesla\n", + "Hma = - 4 #kA/m\n", + "Ag1 = 2 #cm**2\n", + "Ag2 = 4 #cm**2\n", + "\n", + "lm=g*(Am/Ag1)*(Bma/(-uo*Hma*10**4))\n", + "print \"(a) The Requied magnet length = \",round(lm,2),\"cm\"\n", + "\n", + "\n", + "#for part (b):\n", + "i,Hm=symbols('i Hm')\n", + "Bm=-uo*(Ag1/Am)*(lm/g)*Hm+(uo*N/g)*(Ag1/Am)*i\n", + "H_max=200 #kA/m\n", + "B_max=2.1 #Tesla\n", + "i_max=(B_max+2.50*10**-5*H_max)/(6.28*10**-2)\n", + "\n", + "print \"(b) Thus with the air-gap area set to 2 cm^2,\"\n", + "print \" increasing the current to i_max = 45.2 A and then reducing\"\n", + "print \" it to zero will achieve the desired magnetization.\"\n", + "\n", + "#for part (c):\n", + "Bm1=1.00 #Tesla\n", + "Bm2=1.08 #Tesla\n", + "Bg1=(Am/Ag1)*Bm1\n", + "Bg2=(Am/Ag2)*Bm2\n", + "print \"(c) The flux densities when plunger moves at two extremes are:\"\n", + "print \" Bg1 =\",Bg1,\"T and Bg2 =\",Bg2,\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Requied magnet length = 3.98 cm\n", + "(b) Thus with the air-gap area set to 2 cm^2,\n", + " increasing the current to i_max = 45.2 A and then reducing\n", + " it to zero will achieve the desired magnetization.\n", + "(c) The flux densities when plunger moves at two extremes are:\n", + " Bg1 = 1.0 T and Bg2 = 0.54 T\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter10.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter10.ipynb new file mode 100755 index 00000000..2bcd2ccb --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter10.ipynb @@ -0,0 +1,538 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:603160d56b04457665b7cf5381387c06e4c52903d6f85f1c61a983bdc3c14ebc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Introduction to Power Electronics" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.5, Page number: 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from pylab import *\n", + "import numpy as np\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "w=2*pi*60 #frequency of voltage(Hz)\n", + "R=10 #ohm\n", + "C=0.01 #F\n", + "Vo=120*sqrt(2) #maximum voltage(V)\n", + "Nmax=800\n", + "tau=R*C #time constant(s)\n", + "\n", + "#Calculations:\n", + "# diode = 1 when rectifier bridge is conducting\n", + "\n", + "diode=1\n", + "t=[0]*801\n", + "vs=[0]*801\n", + "vrect=[0]*801\n", + "vR=[0]*801\n", + "iB=[0]*801\n", + "\n", + "t=[0]*801\n", + "for n in range(1,Nmax+2,1):\n", + " t[n-1] = (2.5*pi/w)*(n-1)/Nmax\n", + " vs[n-1]=Vo*math.cos(w*t[n-1])\n", + " vrect[n-1]=abs(vs[n-1])\n", + "#if the rectifier bridge is ON:\n", + " if diode==1:\n", + " vR[n-1]=vrect[n-1]\n", + " if (w*t[n-1])<=(pi/2):\n", + " iB[n-1]=vR[n-1]-Vo*C*w*math.sin(w*t[n-1])\n", + " elif (w*t[n-1])<=3*pi/2:\n", + " iB[n-1]=vR[n-1]/R+Vo*C*w*math.sin(w*t[n-1])\n", + " else:\n", + " iB[n-1]=vR[n-1]/R-Vo*C*w*math.sin(w*t[n-1])\n", + " if iB[n-1]<0:\n", + " diode=0\n", + " toff=t[n-1]\n", + " Voff=vrect[n-1]\n", + " else:\n", + " vR[n-1]=Voff*exp(-(t[n-1]-toff/tau))\n", + " iB[n-1]=0\n", + " if (vrect[n-1]-vR[n-1])>0:\n", + " diode=1\n", + "\n", + "\n", + "\n", + "#Results:\n", + "iR=(1/R)*np.array(vR)\n", + "plot(1000*np.array(t),vR)\n", + "xlabel('time [msec]')\n", + "ylabel('voltage [V]')\n", + "xlim(0,22)\n", + "ylim(0,180)\n", + "plot(1000*np.array(t),vrect,'--')\n", + "grid()\n", + "print \"The required plots are shown below:\"\n", + "show()\n", + "plot(1000*np.array(t),iR)\n", + "xlabel('time [msec]')\n", + "ylabel('source current [A]')\n", + "xlim(0 ,22)\n", + "ylim(-50,250) \n", + "plot(1000*np.array(t),1.5*np.array(iB),'--')\n", + "grid()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required plots are shown below:\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEMCAYAAAAidwoiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcFGf+B/DPUkXALKgsVRcpSu9IVBQLWIPGGGNLwBKT\nqLHE7u9y8S5FjC3WnIlRiCaW2LsoRTQWOqKooC7SV5EqSt35/WHWEKWt7M4zu/u8X6953c2WmY/f\nm9sv80zjMQwDiqIoSj1pkA5AURRFkUObAEVRlBqjTYCiKEqN0SZAURSlxm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KOrV9axcufKrtWvXLpTOf/XVVyv9/f3j6uvrNdPS0lz19PSenT17dijDMHj33XcPHz16dHRxcXHn\nnj173pF+p7y8vBPDMJg4ceLvly9f7sswDB4+fNjNwcEhg2EYLFmyZPWCBQvWSz/f+ArTgICAmKSk\nJE/S9aaTck+cebwkRckL08o97gcOHBijr69fpa+vX8Xn88veeeedEwDg4uKSfuPGDdeqqir9K1eu\n9Gl8HKG2tlantfXyeDxm+PDhZzQ1NRucnZ1vSiQSjaFDh56TLjs7O1s4atSokx06dKiePn36L6NG\njTo5atSokwBw4cKFIbdv33aQLquystKwqqpKPyoqavD+/fs/kL7O5/PLZK8IRTWPNgFK7ejq6tZI\n/7uGhoZEOq+hoSGpr6/XkkgkGkZGRqUpKSkesi5bR0enVrosbW3tusbrqa+v19LU1GyIj4/3jYqK\nGnzw4MFxW7ZsmRMVFTWYYRje9evXe0u/31hrTY2i2oMeE6BUjqGhYaX0LqqykP7YGhoaVlpbW4sO\nHjw4Tvr6jRs3XOWRraqqSr+srIw/fPjwM+vXr/8iLS3NDQCCgoIiN23aNFf6OenrgYGB57du3Tpb\n+jp9cAslb7QJUCqnc+fOT/r27funi4tL+tKlS1c3fnjHqw/yePW/S+d/++23yb/88st0d3f3VGdn\n55vHjx8Pbsu6m1u2dL6ystLwnXfeOeHm5pbm7+9/acOGDQsAYNOmTXMTExO93dzc0pycnG5t3779\nEwD417/+9U1paamRi4tLuru7e2psbGxAO0pDUa+hdxGlqDf0n//85ysDA4OnpJ6oNXDgwJh169Yt\n9PT0TCaxfko10D0BinpDBgYGT3/66aeZpC4WE4lE1o2PO1DUm6B7AhRFUWqM7glQFEWpMdoEKIqi\n1BhtAhRFUWqMNgGKoig1RpsARVGUGvt/5i5yreN7pjkAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEMCAYAAAAmgtofAAAABHNCSVQICAgIfAhkiAAAAAlw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AQkRUVF\nvaXdT7vd39//1BdffPGGdjs+QAbpGxYDxFnPPPPMQ29v7wtubm7XVqxYsb7xQ0SaPlCk6d+1699+\n++2re/bsCZPL5RkDBw78KyEhIVCXc7d0bO26SqUSTZw48Xt3d/crPj4+57ds2bIEACAqKuqttLQ0\nT3d39ysDBgz4e+fOnQsAAN5///2PS0pKbN3c3K7J5fKM5OTk0R1IDUJPwVlLEeqgNWvWrBYKheVM\nPeHL19f37KZNm5YNHjz4TybOj7gBrwwQ6iChUFi+a9eu+UwNOlMqlU6N+yUQag+8MkAIIYRXBggh\nhLAYIIQQAiwGCCGEAIsBQgghwGKAEEIIAP4fpbFEnCBosTAAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.6, Page number: 522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "w=2*pi*60 #Angular freq of voltage(rad/sec)\n", + "Vo=230*sqrt(2) #volt\n", + "R=5.6 #Resistance(ohm)\n", + "\n", + "#Calculations:\n", + "Ls=[0]*101\n", + "tc=[0]*101\n", + "Idc=[0]*101\n", + "for n in range(1,101,1):\n", + " Ls[n-1]=n*10**-3\n", + " Idc[n-1]=2*Vo/(pi*R+2*w*Ls[n-1])\n", + " tc[n-1]=(1/w)*acos(1-(2*Idc[n-1]*w*Ls[n-1])/Vo)\n", + "\n", + "#Results:\n", + "plot(1000*np.array(Ls),Idc,'g.')\n", + "xlabel('Commutating inductance Ls [mH]')\n", + "ylabel('Idc [A]')\n", + "title('Load current,Idc vs Commutating inductance,Ls')\n", + "show()\n", + "plot(1000*np.array(Ls),1000*np.array(tc),'g.')\n", + "xlabel('Commutating inductance L [mH]')\n", + "ylabel('tc [msec]')\n", + "title('Commutating Inductance,Ls vs time,tc')\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEXCAYAAACtTzM+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUE1f7B/AbNgVZAgIJCBjEogRBNnEpShQRF7DggmKL\n4EbfWmtdfm6tllhbxVrrWvuqL1W0RaVuVRQFlYC7RUFUqhYlgJiwrwKyZH5/6LQxBUQlJJDv55w5\nJ5PM3HnmJpknc++dCYOiKAIAAKCm6AAAAEA5ICEAAAAhBAkBAABeQkIAAABCCBICAAC8hIQAAACE\nECQEueLz+fzg4OD9io6jve3duzd06NChFxUdhypat27dijlz5uyWR9l6enqVQqGQ8zbr8ng8QWRk\n5Kw2DgnamMomBA6HIzx//ryXPLfBYDA65EUeoaGhe1etWrWmudeFQiFHTU1NIpFIlPLzU1FRob9g\nwYLNPXv2zNbT06vs3bt35sKFCzcVFxd3V3RsLXnTHxACgYBnaWmZK/3cihUr1u3evXtO20dHSGVl\npR6HwxG+zboMBoN61+9DU/urDDpTslPKL3R7aIsPqDJoaGjQkH2usbFRXRGxKIO6ujotLy+v83/+\n+afd2bNnfSorK/WuXr062NjYuOjGjRvuio4POp/OciwhhBBCUZRKThwOJ+v8+fMjZJ+vra3t8vnn\nn282NzfPMzc3z1uwYMGm58+fa1EURUpLS5njxo2LNTExKTA0NCzx9fU9+eTJkx70uo8fP7YeNmxY\nkp6eXoW3t3f8vHnztn300Uf7m4vh+PHjH/Tv3z9NX1+/3MbGJvPs2bOjKIoiPXv2FJ47d86LXi48\nPJxPl5OVlcVhMBiSyMjImVZWVtnDhg1L2rt3b8iQIUMuL1y48Ifu3bsXrVq16uvnz59rLV68+Hsr\nK6tsFosl/s9//vNTTU1NV4qiSGJiIq9Hjx5PNm7cuMjU1DTfzMzs6Z49e0IpiiI7d+4M09TUrNPS\n0nquq6tbOX78+N9l46ZjaGxsVKMoihQVFXX38/M7oa+vX+7u7n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PjRzk4ONw5fPjw\nJDabLZb9f4nXxU/P79mzZ8ann376o7Ozc6r08x4eHpesra2zuFxuxueff77F1dX1JiGEGBsbF+3a\ntStswoQJR52cnNKCgoIOEEKIn5/fyWPHjgXQncp8Pp8/efLk39zc3FJMTEwK6XKbq38ul5vx5Zdf\nfuvp6Znk5OSUtnjx4o2EELJ169b5KSkpbv37979tb29/b9euXWFN7ef58+e9LC0tcy0tLXOtrKxy\n7ty54+Dn53eyf//+t4cOHXpx06ZNC5ur2zets9etB8oHN7eDTquurk5LXV29UV1dvfHq1auDP/30\n0x9v3brloui4OprVq1eH6+rqVtHJp60IhUKOn5/fyTt37ji0Zbnw9tCpDJ1WTk6OVWBgYIxEIlHT\n0tKqk24yg9bT1dWt2rVrV1hlZaXem16L0JyLFy8O/fTTT380MTEpbIvyoG3gDAEAAAgh6EMAAICX\nkBAAAIAQgoQAAAAvISEAAAAhBAkBAABeQkIAAABCCCH/D1IYMYHMZAvtAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEXCAYAAACqIS9uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcU1f/B/ATAsoIIyAIyAiCgymIoDjjYFTFalF/OECx\nytM66qpVWy1YLWJdRfvYp/hYnGgddaCCiBInTkAUaxUkMgRlDxFZ9/eHz7UphRAgIYH7eb9e9/Xi\nJjfnnHsC3xy+99wTFkVRBAAAmENJ3g0AAID2hcAPAMAwCPwAAAyDwA8AwDAI/AAADIPADwDAMAj8\nIBWZmZlmmpqa5RRFseTdFlECgYBvamqaJe92MM21a9eG9e3b94m82wGNQ+CXssjIyOkDBgy4p6mp\nWW5sbPxy7Nix52/cuDFE3u0SRygU8pSUlOrr6+sl/n3g8XjCy5cvj6L3zczMMsvLyzVZLJbUbwyZ\nPXv23rVr166XdrktwefzBXv27PlUnm1oSJE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dq0w4QQ4u3tHXXy5MlJ9MXd4ODg4ClTphwb\nMGDAPX19/Xy63Kb638bG5vE333zz/YgRI644OjomL1++fCshhOzYseOLe/fuDejXr98DW1vb1PDw\n8MDGzvPSpUujTU1Ns+jt9u3bA5vqS3F9K64PmzsWFA8WaYNOo7q6ugubza5js9l1CQkJbgsWLPh3\nYmJif3m3S5GNHDkyfsuWLV/SH2DSsnfv3tn37993Fp2dBIoDI37oNDIzM81cXFzuOjo6Ji9evDhM\nNNUFjdPV1S2aPXv23pbewCXO9u3bl4aGhq7S1tYulVaZIF0Y8QMAMAxG/AAADIPADwDAMAj8AAAM\ng8APAMAwCPwAAAyDwA8AwDD/DxR4tH4eP493AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.7, Page number: 528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "R=12.5*10**-3 #ohm\n", + "L=1.2 #H\n", + "Vo=15 #volt\n", + "w=120*pi #angular freq(Hz)\n", + "Idc=35 #DC current(A)\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "theta=[0]*1301\n", + "t=[0]*1301\n", + "vL=[0]*1301\n", + "vs=[0]*1301\n", + "\n", + "Vdc_a=R*Idc #Dc voltage(V)\n", + "P=Vdc_a*Idc #Power\n", + "alpha_da = acos(pi*R*Idc/(2*Vo)) ; #delay angle\n", + "for n in range(1,1301,1): #loop for calculating load voltage\n", + " theta[n-1]=2*pi*(n-1)/1000\n", + " t[n-1]=theta[n-1]/w\n", + " vs[n-1]=Vo*sin(theta[n-1])\n", + " if theta[n-1]" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a):\n", + "\n", + " Vdc_a= 437.5 mV\n", + "\n", + " Power= 15.0 W\n", + "\n", + " alpha_d= 87.4 degrees\n", + "\n", + " part (b):\n", + "\n", + " alpha_d= 162.0 degrees\n", + "\n", + " Vdc_b= -9.1 V\n", + "\n", + " Current will reach zero at 4.5 sec\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEMCAYAAAAxoErWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVOX6APBn2GTVAygjCDIoKoHDJhmlKC4gmJrmcl0q\nIY2sm1mp2e3ePmF2u3rL0qTFqyZ01W6SYmFBojkmeY2fLEKRisoQKowIjNcFZJvfH3RmOcw4MHPm\nrM/385lP8x6Gmde3wzznvM+7SDQaDSCEEELG2LFdAYQQQtyFQQIhhJBJGCQQQgiZhEECIYSQSRgk\nEEIImYRBAiGEkEmsBYmnn376M6lUqpLL5RXksfT09HR/f/8rUVFRpVFRUaX5+flJbNUPIYQQi0Ei\nNTV1NzUISCQSzSuvvPJ+aWlpVGlpaVRSUlI+W/VDCCHEYpCIi4s76enp2Uw9rtFoJGzUByGEUE8O\nbFeAatu2bSs///zzp2JiYs5s3rx5NUEQav2fSyQSnCKOEEIWsOQiXMLmshxKpVI2c+bM3IqKCjkA\nwPXr130GDRrUAADwxhtvbKirq/PdtWvXMv3fkUgkGr4uJZKWmwY7S3aCBqyrvwQkcHbFWTjwyQFI\nT0+np3I8l56ejm3xB2wLHWwLHYlEYlGQ4NSdhI+Pz3Xy+fLly3fOnDkzl8360CkkIwTON56n5b00\noIHwT8NhavlUWt5PCJRKJdtV4AxsCx1sC+txKkjU1dX5+vr61gEA5OTkzNEf+cRnxEYCbt67afRn\nXi5eUJJWAoFEoNGf//T7TzB+93ijPztafRQe3vkw5D2RB4QzQVt9EUKIxFp306JFi744ceLExBs3\nbgyUSqWq9evXv6lQKOLLysoiJRKJJigoqHr79u3PSqVSlUGFedbdZCpAEM4ElD1bZjI4UBkNFkoA\nkAF4OXvBpVWXRB0oFAoFxMfH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ebm5u9pTL5RWRkZFlCoUi3oqmQajXcBVYhKy0fv36\nN93d3W+ztQPcpEmTjm/evHl1dHR0CRufj4QN7yQQspK7u/vtf/3rX2lsTaarrq4O0s97IEQnvJNA\nCCFkEt5JIIQQMgmDBEIIIZMwSCCEEDIJgwRCCCGTMEgghBAy6f8BJtZuNmMtR4gAAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.8, Page number: 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "f=60 #Hz\n", + "Vrms=35 #rms voltage of waveform\n", + "Ra=3.5 #Armature resistance(ohm)\n", + "La=0.175 #H\n", + "no=8000 #No load speed(r/min)\n", + "Va=50 #armature voltage(V)\n", + "\n", + "#Calculations:\n", + "Edc,alphad=symbols('Edc alphad')\n", + "Vdc=Edc #at no load, Vdc=Edc\n", + "Edc=round(float(2*sqrt(2)*(Vrms/math.pi)),2)*cos(alphad)\n", + "n=Edc*float(no/50)\n", + "\n", + "#Results:\n", + "print \"Speed at no-load =\",n,\" r/min (where 0 <= alphad <= pi/2)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed at no-load = 5041.6*cos(alphad) r/min (where 0 <= alphad <= pi/2)\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.9, Page number: 537" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Vll_rms=460 #rms voltage,line-to-line(V)\n", + "R=68 #resistance of load\n", + "Im=2.5 #magnet current(A)\n", + "\n", + "#Calculations:\n", + "Vdc_max=3*sqrt(2)*Vll_rms/pi\n", + "Idc_max=Vdc_max/R\n", + "Vdc=Im*R\n", + "alpha=acos(pi*Vdc/(3*sqrt(3)*Vll_rms))\n", + "\n", + "#Results:\n", + "print \"(a) Maximum dc voltage:\",round(Vdc_max),\"V\"\n", + "print \"\\n Maximum dc current:\",round(Idc_max,1),\"V\"\n", + "print \"\\n(b) Delay angle alpha:\",round(math.degrees(round(alpha,1)),1),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Maximum dc voltage: 621.0 V\n", + "\n", + " Maximum dc current: 9.1 V\n", + "\n", + "(b) Delay angle alpha: 74.5 degrees\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.10, Page number: 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "T=20*10**-3 #Time period(sec) \n", + "p=4 #no. of poles\n", + "delta=0.44 #ON- time fraction\n", + "Vo=125 #DC supply voltage(V)\n", + "\n", + "\n", + "#Calculation:\n", + "fc=1/T\n", + "ns=(120*fc/p)\n", + "Va_peak=(4*Vo*sin(delta*pi))/pi\n", + "Vll_rms=sqrt(3/2)*Va_peak\n", + "\n", + "#Results:\n", + "print \"(a) Frequency:\",fc,\"Hz\"\n", + "print \"\\n Synchronous speed:\",ns,\"r/min\"\n", + "print \"\\n(b) Rms amplitude of line-to-line voltage:\",round(Vll_rms,0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Frequency: 50.0 Hz\n", + "\n", + " Synchronous speed: 1500.0 r/min\n", + "\n", + "(b) Rms amplitude of line-to-line voltage: 191.0 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.13, Page number: 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Vo=48 #Load voltage(V)\n", + "R=3.7 #Resistance of load(ohm)\n", + "L=.32 #Inductance of laad(H)\n", + "D=0.8 #Duty cycle\n", + "f=1000 #Hz\n", + "\n", + "#Calculations:\n", + "iL_avg=(2*D-1)*Vo/R\n", + "T=1/f\n", + "tau=L/R\n", + "iL_min=((-Vo/R)*(1-2*exp(-T*(1-D)/tau)+exp(-T/tau)))/(1-exp(-T/tau))\n", + "iL_max=(Vo/R)*(1-2*exp(-D*T/tau)+exp(-T/tau))/(1-exp(-T/tau))\n", + "\n", + "#since T/tau << 1, so using 10.32 in e.g. given.\n", + "del_iL=(2*Vo)*T*D*(1-D)/(R*tau)\n", + "\n", + "\n", + "#Results:\n", + "print \"Avg load current:\",round(iL_avg,2),\"A\"\n", + "print \"Minimum load current:\",round(iL_min,2),\"A\"\n", + "print \"Maximum load current\",round(iL_max,2),\"A\"\n", + "print \"Current ripple:\",round(del_iL,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avg load current: 7.78 A\n", + "Minimum load current: 7.76 A\n", + "Maximum load current 7.81 A\n", + "Current ripple: 0.05 A\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter11.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter11.ipynb new file mode 100755 index 00000000..308afbf5 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter11.ipynb @@ -0,0 +1,975 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4aa0be3787a5262658b58d5130a82adad92353bb1944b3902dc15e9d5045fa75" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Speed and Torque Control" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.1, Page number: 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "Vdc=240 #DC supply (V)\n", + "D=0.75 #Duty cycle\n", + "Rf=187 #field resistance(ohm)\n", + "Lf=4.2 #field winding inductance(H)\n", + "T=1 #switching period(msec)\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "If=D*(Vdc/Rf)\n", + "tau=Lf/Rf #time constant(msec)\n", + "del_if=(2*Vdc/Rf)*(T/tau)*D*(1-D)\n", + "\n", + "\n", + "#Results:\n", + "print \"Avg field current:\",round(If,2),\"A\"\n", + "print \"Magnitude of currnet ripple:\",round(del_if,1),\"mA\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avg field current: 0.96 A\n", + "Magnitude of currnet ripple: 21.4 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.2, Page number: 563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "n1=1800 #r/min\n", + "n2=3600 #r/min\n", + "Va=240 #terminal voltage(V)\n", + "Ifo=0.34 #No-load field current(A)\n", + "Ra=0.05 #Armature resistance(ohm)\n", + "Rsh=187 #Shunt field resistance(ohm)\n", + "\n", + "#Calculations:\n", + "wm=symbols('wm')\n", + "wm1=float(2*pi*n1/60)\n", + "wm2=float(2*pi*n2/60)\n", + "def Pload(wm):\n", + " return (22.4*(120*pi)**-3)*(wm)**3\n", + "\n", + "T1=Pload(wm1)*1000/wm1\n", + "T2=Pload(wm2)*1000/wm2\n", + "\n", + "Kf=Va/(Ifo*wm2)\n", + "def If(T,wm):\n", + " return (Va/(2*Kf*wm))*(1+sqrt(1-(4*wm*T*Ra)/Va**2))\n", + "\n", + "Rf1tot=round(Va/float(If(T1,wm1)))\n", + "Rf2tot=round(Va/float(If(T2,wm2)))\n", + "Rrh1=Rf1tot-Rsh\n", + "Rrh2=Rf2tot-Rsh\n", + "\n", + "\n", + "#Results:\n", + "print \"----------------------------------------------------------------\"\n", + "print \"r/min Tload[N.m] If[A] R(f)tot[ohm] Rrheostat[ohm]\"\n", + "print \"----------------------------------------------------------------\"\n", + "print n1,\"\\t \",round(float(T1),1),\"\\t\\t \",round(float(If(T1,wm1)),3),\"\\t\",Rf1tot,\"\\t \",Rrh1\n", + "print n2,\"\\t \",round(float(T2),1),\"\\t\\t \",round(float(If(T2,wm2)),3),\"\\t\",Rf2tot,\"\\t \",Rrh2\n", + "print \"----------------------------------------------------------------\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "----------------------------------------------------------------\n", + "r/min Tload[N.m] If[A] R(f)tot[ohm] Rrheostat[ohm]\n", + "----------------------------------------------------------------\n", + "1800 \t 14.9 \t\t 0.678 \t354.0 \t 167.0\n", + "3600 \t 59.4 \t\t 0.333 \t720.0 \t 533.0\n", + "----------------------------------------------------------------\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.3, Page number: 567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from math import *\n", + "from pylab import *\n", + "\n", + "#Variable declaration:\n", + "Rf=109 #Field resistance(ohm)\n", + "Vf=300 #Rated field voltage(V)\n", + "Ra=0.084 #Armature resistance(ohm)\n", + "Kf=0.694 #Geometric constant(A.rad/sec)\n", + "\n", + "\n", + "#Calculations:\n", + "If=Vf/Rf #Resulting field current(A)\n", + "w_rated=2500*(pi/30) #Rated speed(rad/sec)\n", + "P_rated=100*746 #Watts\n", + "T_rated=P_rated/w_rated #Nm\n", + "Va=[0]*102\n", + "NoLoadRPM=[0]*102\n", + "FullLoadRPM=[0]*102 \n", + "for n in range(1,102,1):\n", + " Va[n-1]=250*(1+(n-1)/100)\n", + " T=0 #Zero torque\n", + " w=(Va[n-1]-T*Ra/(Kf*If))/(Kf*If)\n", + " NoLoadRPM[n-1]=w*30/pi\n", + " T=T_rated\n", + " w=(Va[n-1]-T*Ra/(Kf*If))/(Kf*If)\n", + " FullLoadRPM[n-1]=w*30/pi\n", + "\n", + "print\"The plot is as shown:\"\n", + "plot(Va,NoLoadRPM)\n", + "plot(Va[20] ,NoLoadRPM[20] ,'r+')\n", + "plot (Va[50] , NoLoadRPM[50] , 'r+')\n", + "plot (Va[80] ,NoLoadRPM[80] , 'r+')\n", + "plot (Va, FullLoadRPM,'.')\n", + "plot (Va[20] ,FullLoadRPM[20] ,'o')\n", + "plot (Va[50] , FullLoadRPM[50] , ' o' )\n", + "plot (Va[80] , FullLoadRPM[80] ,'o' )\n", + "title('Speed vs Armature voltage')\n", + "xlabel('Armature voltage [V] ')\n", + "ylabel('Speed [r/min] ')\n", + "annotate('+ = Zero torque',xy=(270,2300))\n", + "annotate('o = Full load torque',xy=(270,2100))\n", + "ylim(1000,2500)\n", + "xlim(250,500)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The plot is as shown:\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEXCAYAAACDChKsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYU2f7B/BvgOBCBBdogqCAYiQMR0ArEgcWfStQKShU\ncL6+1VaxttTRIbbu1Yot/upbtwVFUdC+grhQahUq4kQFFJSEUQcKKLJyfn/EgxEZIRDm/bmuczV5\nznpyGnNzzv0MDsMwIIQQQmpLo7ErQAghpHmiAEIIIUQlFEAIIYSohAIIIYQQlVAAIYQQohIKIIQQ\nQlRCAYQ0C2KxOGb79u0zG7seBEhPTzfR0NCQyWQy+v1o5egLQKr1559/Dh82bNhfenp6z7p06fJk\n+PDhf16+fHlwQ9eDw+EwHA5H7Z2WCgoKdHR0dArGjx9/XN3nqsjExCT9zJkzoxr6vHVFwb31ogBC\nqpSXl6f7wQcf/OHn57c5NzdXXyqV8pYtW7a8TZs2RY1dN3UJCwtz79Wr18OYmBhxTk6OQVXblZaW\natX3uTkcDsMwDEfV/cvKyjTrsz7KaojATpoohmFooaXS5e+//x6sp6eXW9X6nTt3Ths2bNiFzz77\nbEunTp2eWVhY3D59+vQodv2zZ886zZgxY3uPHj0yeTye5JtvvvmhrKxMg12/ffv2Gf3790/S19d/\n+v7770c9ePCgF7suOjraqV+/fnc6der07LPPPtvi6OgY89tvv82sWAepVNqzXbt2L58+farPll25\ncsW2a9euj0pLSzVTUlLMRowYca5Tp07Punbt+mjSpEn7q/vMI0eOPLNx48aFY8aMOblhw4YvFNcZ\nGxunr1279iuhUHi9bdu2hampqaYcDke2c+fOaUZGRg87d+78ZOvWrZ/Ex8cPEQqF1/X09HI/++yz\nLez+qamppiNHjjzTpUuXx127dn308ccf73v27FknhmEwZcqUvRoaGmXt2rV7qaOjk79+/fovz549\nK+bz+RkV68Be42XLlgW4u7sfmjJlyl5dXd3n27dvn1HTNVf2upWVlWn88MMP3xgbG6d37949x9fX\nd/fz5891GYZBWlqaCYfDkZWWlmouXbp0paamZmnbtm0LdXR08ufNmxfIMAzmz5+/2cjI6KGuru7z\nQYMGXY6NjR3Onufly5ftfH19d+vr6z/t379/0tq1a79S/JxSqbTnxIkTw7p16/ZP79697wcGBs5r\n7H8LtFS+NHoFaGm6S15eXscuXbo8njp16q7IyEhnxR8bhpEHEC0trZKffvrJr7S0VPPAgQOenTp1\nepabm6vHMAzc3NyOfPLJJ1tfvnzZ7p9//ukmEonifv3119kMwyA8PNzVzMws5c6dO/3Kyso0VqxY\n8fWwYcMuMAyDR48ede3Ys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8n0lVarpYeHh78KBAJ55L07CO0GAwh640xMTLQrFApL/DmlUnmFpmlt4rsL9nqXQfw1o9Fo\nVKvVUydOnPg1Nzc3SM63tLRcs1gsimPHjv1mt9uru7u7v7fZbPVisfiOw+GoJJPopDyy39XV9YNQ\nKHRLJJLbpaWlzp6enrHdns4SCoXux48ff5Sfn/8nuc2mUCgsZWVl98rLy+82NDTcHBwcPEeW0yZ1\nyGQyq9vtFpJJ9PPnz39z4cKFryUSyW0yIgMA0Ov1o8FgMFckEt03GAwXRSLR/QMHDvybk5Pzt8lk\n0mm1Wrq8vPxuVVXVrWQfh25sbPzZ7/cf0mg05mTSo/cXLqaI0FssFotxotHovrS0tKcrKytH5HL5\nnMfjOcrlcp8lk18mk1mHhob6jx8/vpxMep1OZ2ppabmmVCqvvF7L0bsARyAIvcUikUh6TU3Nolgs\nvtPa2jo9NjbWk2zwAADIzs7e1Ol0ppmZmeaXpT1z5syPCwsLtTwe78nrtRq9K3AEghBCKCU4AkEI\nIZQSDCAIIYRSggEEIYRQSjCAIIQQSgkGEIQQQinBAIIQQigl/wFG1ZEINLtYhQAAAABJRU5ErkJg\ngg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.4, Page number: 571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Rf=109 #Field resistance(ohm)\n", + "Vf=300 #Rated field voltage(V)\n", + "n1=2000 #rpm\n", + "T_rated=285 #Rated torque(Nm)\n", + "n2=1975 #Dropped rpm\n", + "Kf=0.694 #Geometric constant(A.rad/sec\n", + "Ra=0.084 #Armature resistance(ohm)\n", + "\n", + "#Calculations:\n", + "If=Vf/Rf #Resulting field current(A)\n", + "wm1=2*pi*n1/60\n", + "w_ref=wm1\n", + "Vao=Kf*If*wm1\n", + "Ia=T_rated/(Kf*If)\n", + "wm2=2*pi*n2/60\n", + "Ea=Kf*If*wm2\n", + "Va=Ea+Ia*Ra\n", + "G=symbols('G')\n", + "x=solve(Vao-round(Va)+G*(w_ref-wm2),G)\n", + "\n", + "\n", + "#Results:\n", + "print \"Armature voltage,Vao:\",round(Va,0),\"V\"\n", + "print \"Multiplicative constant,G:\",float(round(x[0],2)),\"A.sec/rad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature voltage,Vao: 408.0 V\n", + "Multiplicative constant,G: 3.04 A.sec/rad\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.5, Page number: 573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "from sympy import *\n", + "\n", + "#Variable Declaration:\n", + "Km=0.22 #torque constant(V/(rad/sec))\n", + "Ra=1.03 #ohm\n", + "Pl=100 #Power load(W)\n", + "Va1=40 #Armature voltage(V)\n", + "Va2=50 # \" \" \"\n", + "\n", + "\n", + "#Calculations:\n", + "wm1=(Va1/(2*Km))*(1+sqrt(1-(4*Pl*Ra/Va1**2)))\n", + "wm2=(Va2/(2*Km))*(1+sqrt(1-(4*Pl*Ra/Va2**2)))\n", + "\n", + "#Results:\n", + "print \"for Va=40 V, wm=\",round(wm1,1),\"rad/sec\"\n", + "print \"for Va=50 V, wm=\",round(wm2,1),\"rad/sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for Va=40 V, wm= 169.2 rad/sec\n", + "for Va=50 V, wm= 217.5 rad/sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.6, Page number: 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "\n", + "Rf=109 #Field resistance(ohm)\n", + "Vf=300 #Rated field voltage(V)\n", + "Ra=0.084 #Armature resistance(ohm)\n", + "Kf=0.694 #Geometric constant(A.rad/sec)\n", + "Tfl=285 #Full load torque(Nm)\n", + "nf=2500 #Speed at full load(r/min)\n", + "#wm=2500 #rated r/min\n", + "\n", + "#for part (1):\n", + "n1=2000 #r/min\n", + "n2=2500 #r/min\n", + "\n", + "\n", + "#Calculations:\n", + "#part (a):\n", + "If=Vf/Rf\n", + "w1=n1*2*pi/60\n", + "w2=n2*2*pi/60\n", + "Ea1=Kf*If*w1 #Avg Amature voltage(V)\n", + "Ea2=Kf*If*w2\n", + "Ia1=n1*Tfl/(nf*Kf*If)\n", + "Ia2=n2*Tfl/(nf*Kf*If)\n", + "Va1 = Ea1 + Ia1*Ra\n", + "Va2 = Ea2 + Ia2*Ra\n", + "Tl1=(n1/nf)*Tfl\n", + "Tl2=(n2/nf)*Tfl\n", + "\n", + "#part (b):\n", + "\n", + "# The dynamic equation governing the speed of the motor is\n", + "\n", + "# J*(dwm/dt)=Tmech-Tload\n", + "# wm=(pi/30)*n & wr=(pi/30)*nf\n", + "# Tload= (Tfl/wf)*wm\n", + "# Tmech = Kf*If*Ia=Kf*If*(Va-Ea)/Ra #Under armature-voltage control\n", + "\n", + "# Thus the governing differential equation is\n", + "# d(wm)/dt + 48.4*wm - 24.7*Va = 0\n", + " \n", + "# wm = wf + (wi-wf)*exp(-t/tau) #tau=1/48.4=20.7 msec\n", + "# n = 2500- 50*exp( -t/tau )\n", + "\n", + "# The armature current will decrease exponentially with the \n", + "# same 20.7 msec time constant from an initial value of \n", + "# (Vf - Vi)/Ra = 1190 A to its final value of 149 A.\n", + "\n", + "# Ia = 149 + 1041*exp(-t/tau)\n", + "\n", + "#part (c):\n", + "# J*d(wm)/dt = Tmech-Tload = Tf-(Tf/wm)*wm\n", + "# or d(wm)/dt + 1.18*wm - 310 = 0\n", + "\n", + "#In this case, the speed will rise exponentially to wm=wf=262 rad/sec as\n", + "# wm = 262-53*exp(-t/tau) #tau=1/1.18=845 msec\n", + "\n", + "#Results:\n", + "print \"part(a):\\n\"\n", + "print \"-------------------------------------------------\"\n", + "print \"r/min\\tw[rad/s]\\tVa(V)\\tIa(A)\\tTload[Nm]\"\n", + "print \"-------------------------------------------------\"\n", + "print n1,\"\\t\",round(w1),\"\\t\\t\",round(Va1),\"\\t\",round(Ia1),\"\\t\",Tl1,\"Nm\"\n", + "print n2,\"\\t\",round(w2),\"\\t\\t\",round(Va2),\"\\t\",round(Ia2),\"\\t\",Tl2,\"Nm\"\n", + "print \"-------------------------------------------------\"\n", + "print \"\\npart (b):\"\n", + "print \" The resultant motor speed, n = 2500 - 50*exp(-t/tau) where tau=20.7 msec\"\n", + "\n", + "print \"\\npart (c):\"\n", + "print \" The resultant motor speed, wm = 262 - 53*exp(-t/tau) where tau=845 msec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part(a):\n", + "\n", + "-------------------------------------------------\n", + "r/min\tw[rad/s]\tVa(V)\tIa(A)\tTload[Nm]\n", + "-------------------------------------------------\n", + "2000 \t209.0 \t\t410.0 \t119.0 \t228.0 Nm\n", + "2500 \t262.0 \t\t513.0 \t149.0 \t285.0 Nm\n", + "-------------------------------------------------\n", + "\n", + "part (b):\n", + " The resultant motor speed, n = 2500 - 50*exp(-t/tau) where tau=20.7 msec\n", + "\n", + "part (c):\n", + " The resultant motor speed, wm = 262 - 53*exp(-t/tau) where tau=845 msec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.7, Page number: 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "#Variable Calculations:\n", + "f1=60 #Initial frequency(Hz)\n", + "f2=50 #Changed frequency(Hz)\n", + "Xs=0.836 #Saturated synch reactance(ohm)\n", + "Va=1+0j #Armature voltage(V p.u)\n", + "Ia=1+0j #Armature current(A p.u)\n", + "If_rated=2.84 #Rated field current(A)\n", + "p=6 #No. of poles\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "ns1=120*f1/p\n", + "ns2=120*f2/p\n", + "Eaf=Va-1j*Xs*Ia*exp(1j*0) #field voltage(V)\n", + "Ifo=abs(Eaf)*If_rated #motor field current(A)\n", + "\n", + "#for part(b):\n", + "#Eaf= (wm/wmo)*(If/Ifo)*Eafo\n", + "If=Ifo\n", + "\n", + "#Results:\n", + "print \"part(a):\"\n", + "print \"(i) The motor speed:\",ns1,\"r/min\"\n", + "print \"(ii) The motor field current:\",round(Ifo,2),\"A\"\n", + "print \"part(b):\"\n", + "print \"(i) The changed speed:\",ns2,\"A\"\n", + "print \"(ii) The mototr field current:\",round(If,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part(a):\n", + "(i) The motor speed: 1200.0 r/min\n", + "(ii) The motor field current: 3.7 A\n", + "part(b):\n", + "(i) The changed speed: 1000.0 A\n", + "(ii) The mototr field current: 3.7 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.8, Page number: 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "iF=2.84 #rated field current(A)\n", + "Vbase=220 #base voltage(V)\n", + "Eaf=220/sqrt(3) #Rms voltage line-to-neutral(V)\n", + "f=60 #Hz\n", + "p=6 #poles\n", + "P_rated=45*10**3 #rated power(W)\n", + "Xs_pu=0.836 #per unit synchronous reactance(ohm)\n", + "\n", + "#Calculations:\n", + "we=2*pi*f\n", + "Laf=sqrt(2)*Eaf/(we*iF) #Armature field reactance(H)\n", + "T_rated=P_rated/(we*2/p)\n", + "#setting rated values to reference values.\n", + "Tref=T_rated\n", + "iFref=iF\n", + "iQ=round((2/3)*(2/p)*Tref/(Laf*iFref),2)\n", + "iD=0\n", + "\n", + "#since theta_me=wc*t, iD=0,we have,\n", + "t=symbols('t')\n", + "wc=120*pi\n", + "def ia(t):\n", + " return iD*cos(wc*t)-iQ*sin(wc*t)\n", + "def ib(t):\n", + " return iD*cos(wc*t-2*pi/3)-iQ*sin(wc*t-2*pi/3)\n", + "def ic(t):\n", + " return iD*cos(wc*t+2*pi/3)-iQ*sin(wc*t+2*pi/3)\n", + "Ibase=P_rated/(sqrt(3)*Eaf)\n", + "Imax=round(ia((pi/(2*wc))))\n", + "Ia=1j*abs(round(Imax/sqrt(2)))\n", + "Eaf=1j*we*Laf*iF/sqrt(2)\n", + "Zbase=Vbase**2/P_rated\n", + "Xs=Xs_pu*Zbase\n", + "Va=1j*Xs*Ia+Eaf #line-to-neutral voltage\n", + "Vt=abs(sqrt(3)*Va)/Vbase #p.u terminal voltage(line-to-line)(V)\n", + "\n", + "#Results:\n", + "print \"part(a):\"\n", + "print \"\\tia(t)=\",ia(t),\"A\"\n", + "print \"\\tib(t)=\",ib(t),\"A\"\n", + "print \"\\tic(t)=\",ic(t),\"A\"\n", + "print \"part(b):\"\n", + "print \"\\tTerminal voltage:\",round(float(Vt),2),\"per unit\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part(a):\n", + "\tia(t)= -167.01*sin(120*pi*t) A\n", + "\tib(t)= 167.01*sin(120*pi*t + pi/3) A\n", + "\tic(t)= -167.01*cos(120*pi*t + pi/6) A\n", + "part(b):\n", + "\tTerminal voltage: 1.3 per unit\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.9, Page number: 591" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "iF=2.84 #rated field current(A)\n", + "Vrated=220 #rated terminal voltage,l-l(V)\n", + "Ibase=118 #base current(A)\n", + "Eaf=220/sqrt(3) #Rms voltage, line-to-neutral(V)\n", + "f=60 #Hz\n", + "p=6 #poles\n", + "P_rated=45*10**3 #rated power(W)\n", + "Xs=0.899 #Synchronous reactance(ohm)\n", + "Xs_pu=0.836 #per unit synchronous reactance(ohm)\n", + "Tref=358 #Reference torque(Nm) (from Ex11.8)\n", + "\n", + "#Calculations:\n", + "Va=Vrated/sqrt(3) #base voltage, line to neutral(V)\n", + "we=2*pi*f\n", + "wm=(2/p)*we\n", + "Laf=sqrt(2)*Eaf/(we*iF) #Armature field reactance(H)\n", + "Ia=Tref*wm/(3*Va)\n", + "Ls=Xs/we #Synchronous inductance(mH)\n", + "delta=-atan(we*Ls*Ia/Va)\n", + "iQ_ref=sqrt(2)*Ia*cos(delta)\n", + "iD_ref=sqrt(2)*Ia*sin(delta)\n", + "iF_ref=(2./3)*(2/p)*Tref/(Laf*iQ_ref)\n", + "\n", + "#since motor is running at rated voltage, base voltage and rated voltage \n", + "# are assumed to be same.\n", + "Va_pu=Va/Va \n", + "Ia_pu=Ia/Ibase\n", + "\n", + "\n", + "#Results:\n", + "print \"The reqd motor field current:\",round(iF_ref,2),\"A\"\n", + "print \"Per unit voltage:\",Va_pu,\"p.u\"\n", + "print \"Per unit current:\",round(Ia_pu),\"p.u\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The reqd motor field current: 3.7 A\n", + "Per unit voltage: 1.0 p.u\n", + "Per unit current: 1.0 p.u\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.10, Page number: 593" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "ns=4000 #rated speed(rpm)\n", + "Va=220 #rated voltage(V)\n", + "Ls=1.75*10**-3 #synchronous inductance(H)\n", + "Prated=25000 #Watts\n", + "n=3200 #rated OC speed(rpm)\n", + "p=2 #No. of poles\n", + "\n", + "#Calculations:\n", + "#for part(a):\n", + "Eaf=Va/sqrt(3)\n", + "wm=ns*pi/30 #rad/sec\n", + "Trated=Prated/wm\n", + "we=(p/2)*n*pi/30\n", + "lambdaPM=sqrt(2)*Eaf/we #flux linked wth permanent magnet(Wb) \n", + "Tref=Trated*0.65 #since motor is operated at 65% of Trated\n", + "iQref=(2./3)*(2/p)*(Tref/lambdaPM)\n", + "\n", + "#for part(b:)\n", + "lambdaD=lambdaPM #since iD=0\n", + "lambdaQ=Ls*iQref\n", + "lambdaa=sqrt((lambdaD**2+lambdaQ**2)/2) #rms line-to-neutral armature flux(Wb)\n", + "lambdaa_base=Eaf/wm\n", + "lambda_pu=lambdaa/lambdaa_base\n", + "\n", + "#for part(c)\n", + "lambdaD=sqrt(2*(lambdaa_base)**2-lambdaQ**2)\n", + "iDref=(lambdaD-lambdaPM)/Ls\n", + "Ia=sqrt((iDref**2+iQref**2)/2) #rms armature current(A)\n", + "Ibase=Prated/(sqrt(3)*Va)\n", + "I_pu=Ia/Ibase\n", + "\n", + "#Results:\n", + "print \"(a) Required quadrature-axis current:\",round(iQref,1),\"A\"\n", + "print \"(b) Resultant armature flux linkage\",round(lambda_pu,2),\"p.u\"\n", + "print \"(c) iD:\",round(iDref,1),\"A\"\n", + "print \" Rms value of armature current:\",round(Ia),\"A\"\n", + "print \" Per unit value of armature current:\",round(I_pu,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Required quadrature-axis current: 48.2 A\n", + "(b) Resultant armature flux linkage 1.27 p.u\n", + "(c) iD: -66.1 A\n", + " Rms value of armature current: 58.0 A\n", + " Per unit value of armature current: 0.88 A\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.11, Page number: 600" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "V10=230/sqrt(3)\n", + "Nph=3\n", + "p=4\n", + "fe0=60\n", + "R1=0.095 #Armature resistance(ohm)\n", + "R2=0.2 #Rotor resistance(ohm)\n", + "X10=0.680 #Armature leakage reactance(ohm)\n", + "X20=0.672 #Rotor leakage reactance(ohm)\n", + "Xm0=18.7 #Inductice reactance(ohm)\n", + "\n", + "\n", + "#Calculations:\n", + "#taking two frequency values:\n", + "fe1=40\n", + "fe2=60\n", + "\n", + "for m in range(1,3,1):\n", + " if m==1:\n", + " fe=fe1\n", + " else:\n", + " fe=fe2\n", + " X1=X10*(fe/fe0)\n", + " X2=X20*(fe/fe0)\n", + " Xm=Xm0*(fe/fe0)\n", + " V1=V10*(fe/fe0)\n", + " \n", + " ws=4*pi*fe/p\n", + " ns=120*fe/p\n", + " V1eq=abs(V1*1j*Xm/(R1+1j*(X1+Xm)))\n", + " Z1eq=1j*Xm*(R1+1j*X1)/(R1+1j*(X1+Xm))\n", + " R1eq=Z1eq.real\n", + " X1eq=Z1eq.imag\n", + " \n", + "#Search over the slip until the Pload = Pmech \n", + " s=0 #slip initialised to 0\n", + " error=1\n", + " \n", + " while error >=0:\n", + " s=s+0.00001\n", + " rpm=ns*(1-s)\n", + " wm=ws*(1-s)\n", + " Tmech=(1/ws)*Nph*V1eq**2*(R2/s)\n", + " Tmech = Tmech/((R1+R2/s)**2 + (X1+X2)**2)\n", + " Pmech=Tmech*wm\n", + " Pload=10.5*10**3*(rpm/1800)**3\n", + " error=Pload-Pmech\n", + " \n", + " print \"\\nFor fe =\",fe,\"Hz :\"\n", + " print \"\\tTerminal voltage=\",round(V1*sqrt(3)),\"V l-l\"\n", + " print \"\\trpm =\",round(rpm)\n", + " print \"\\tslip =\",round(100*s,1),\"%\"\n", + " print \"\\tPload =\",round(Pload/1000,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "For fe = 40 Hz :\n", + "\tTerminal voltage= 153.0 V l-l\n", + "\trpm = 1166.0\n", + "\tslip = 2.8 %\n", + "\tPload = 2.86 kW\n", + "\n", + "For fe = 60 Hz :\n", + "\tTerminal voltage= 230.0 V l-l\n", + "\trpm = 1721.0\n", + "\tslip = 4.4 %\n", + "\tPload = 9.17 kW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.12, Page number: 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "V10=230/sqrt(3)\n", + "Nph=3\n", + "p=4\n", + "fe0=60\n", + "R1=0.095 #Armature resistance(ohm)\n", + "R2=0.2 #Rotor resistance(ohm)\n", + "X10=0.680 #Armature leakage reactance(ohm)\n", + "X20=0.672 #Rotor leakage reactance(ohm)\n", + "Xm0=18.7 #Inductice reactance(ohm)\n", + "n=1680 #rpm\n", + "Pmech=9.7*10**3 #Electromagnetic power(W)\n", + "\n", + "\n", + "#Calculations:\n", + "we0=2*pi*fe0\n", + "Lm=Xm0/we0\n", + "LS=Lm+X10/we0\n", + "LR=Lm+X20/we0\n", + "Ra=R1\n", + "RaR=R2\n", + "lambda_rated=sqrt(2)*V10/we0\n", + "lambdaDR=lambda_rated\n", + "#for specified operating condition\n", + "wm=n*(pi/30)\n", + "Tmech=Pmech/wm\n", + "iQ=(2/3)*(2/p)*(LR/Lm)*(Tmech/lambdaDR)\n", + "iD=lambdaDR/Lm\n", + "Ia=sqrt((iD**2+iQ**2)/2)\n", + "wme=(p/2)*wm\n", + "we=wme+(RaR/LR)*(iQ/iD)\n", + "fe=we/(2*pi)\n", + "Va=sqrt(((Ra*iD-we*(LS-Lm**2/LR)*iQ)**2 + (Ra*iQ+we*LS*iD)**2)/2)\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"Rms amplitude of the armature current:\",round(Ia,1),\"A\"\n", + "print \"The electrical frequency:\",round(fe,1),\"Hz\"\n", + "print \"Rms terminal voltage:\",round(sqrt(3)*Va,1),\"V line-line\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms amplitude of the armature current: 27.9 A\n", + "The electrical frequency: 58.4 Hz\n", + "Rms terminal voltage: 243.6 V line-line\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.13, Page number: 610" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from math import *\n", + "from pylab import *\n", + "\n", + "#Variable declaration:\n", + "P_rated = 12*10**3 #Watts\n", + "V_rated = 230 #Rated line-line voltage(v)\n", + "Va_rated = 230/sqrt(3) #Rated line to neutral(V)\n", + "fe_rated = 60 #Hz\n", + "we_rated = 2*pi*fe_rated #rad/sec\n", + "lambda_rated = sqrt(2)*Va_rated/we_rated #Wb\n", + "I_rated = P_rated/(sqrt(3)*V_rated) #A\n", + "Ipeak_base = sqrt(2)*I_rated #A\n", + "p = 4 #poles\n", + "\n", + "V10=V_rated/sqrt(3)\n", + "R1=0.095 #Armature resistance(ohm)\n", + "R2=0.2 #Rotor resistance(ohm)\n", + "X10=0.680 #Armature leakage reactance(ohm)\n", + "X20=0.672 #Rotor leakage reactance(ohm)\n", + "Xm0=18.7 #Inductice reactance(ohm)\n", + "\n", + "#Calculations:\n", + "Lm = Xm0/we_rated;\n", + "LS = Lm + X10/we_rated;\n", + "LR = Lm + X20/we_rated;\n", + "Ra = R1\n", + "RaR = R2\n", + "#operating point:\n", + "n = 1680 #rpm\n", + "lambdaDR=lambda_rated\n", + "wm = n*pi/30\n", + "wme = (p/2)*wm\n", + "Pmech = 9.7*10**3\n", + "Tmech = Pmech/wm\n", + "lambda_DRpu=[0]*42\n", + "iDpu=[0]*42\n", + "Iapu=[0]*42\n", + "fe=[0]*42\n", + "Vapu=[0]*42\n", + "\n", + "for n in range(1,43,1):\n", + " lambdaDR = (0.8+(n-1)*0.4/40)*lambda_rated\n", + " lambda_DRpu[n-1]=lambdaDR/lambda_rated\n", + " iQ=(2/3)*(2/p)*(LR/Lm)*(Tmech/lambdaDR)\n", + " iD=(lambdaDR/Lm)\n", + " iDpu[n-1]=iD/Ipeak_base\n", + " iQR=-(Lm/LR)**iQ\n", + " Ia=sqrt((iD**2+iQ**2)/2)\n", + " Iapu[n-1]=Ia/I_rated\n", + " we=wme-(RaR/LR)*(iQ/iD)\n", + " fe[n-1]=we/(2*pi)\n", + " Va_rms=sqrt(((Ra*iD-we*(LS-Lm**2/LR)*iQ)**2 +(Ra*iQ+ we*LS*iD)**2)/2)\n", + " Vapu[n-1]=Va_rms/Va_rated\n", + "\n", + "#Results:\n", + "print \"The required plot is as shown:\"\n", + "plot(iDpu,Iapu)\n", + "plot(iDpu,Vapu,':')\n", + "xlabel('i_D [per unit] ')\n", + "ylabel('per unit')\n", + "annotate('Ia',xy=(0.21,1.05))\n", + "annotate('Va',xy=(0.21,0.85))\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required plot is as shown:\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAENCAYAAAD34uk0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlPXaB/DvMIyKLAKKiAw5CAgoMIAIapK4oZKiqKWo\naaJGdazs1RY7502xsigtLc/JJdfUpExFC9BMR3FFBJVECITBAUUB2RFme94/nsaXOCKMzPAMw/25\nrueKmWeZ+5c6N7+dxzAMCCGEEG2YcB0AIYSQjoeSByGEEK1R8iCEEKI1Sh6EEEK0RsmDEEKI1ih5\nEEII0ZrekkdUVNR2e3v7e97e3hmPO7937945YrH4mo+Pz/Vnn3323PXr130055KSki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RsmDEEKI1ih5EEII0Rol\nD0IIIVr7PxA8wzUjE2EJAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter2.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter2.ipynb new file mode 100755 index 00000000..855c3bd6 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter2.ipynb @@ -0,0 +1,761 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Transformers" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.1, Page number: 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Pc=16 #Core loss at Bmax=1.5 T\n", + "VIrms=20 #Voltamperess for the core\n", + "Vrms=194 #Rms induced voltage(V)\n", + "\n", + "\n", + "#Calculation:\n", + "pf=Pc/VIrms\n", + "a=math.acos(pf)\n", + "I=VIrms/Vrms\n", + "Ic=I*pf\n", + "Im=I*math.fabs(math.sin(a))\n", + "\n", + "#Results:\n", + "print \"Power factor = \", round(pf,1),\"lagging\"\n", + "print \"The core-loss current,Ic =\", round(Ic,3), \"A rms\"\n", + "print \"The magnetising current,Im =\", round(Im,2),\"A rms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power factor = 0.8 lagging\n", + "The core-loss current,Ic = 0.082 A rms\n", + "The magnetising current,Im = 0.06 A rms\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.2, Page number: 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declarations:\n", + "k=5 #turns ratio,N1/N2\n", + "Z2=1+4j #Impedance of secondary side(ohm)\n", + "Vp=120 #primary voltage(V)\n", + "\n", + "#Calculations:\n", + "Z2p=k**2*(Z2)\n", + "I=Vp/Z2p\n", + "Is=k*I\n", + "\n", + "#Results:\n", + "print \"Primary current:\",complex(round(I.real,2),round(I.imag,2)), \"A rms\"\n", + "print \"Current in the short:\",round(Is.real,2)+1j*round(Is.imag,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current: (0.28-1.13j) A rms\n", + "Current in the short: (1.41-5.65j) A\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.4, Page number: 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "\n", + "#Variable declaration:\n", + "R1=0.72 #Resistance at high voltage side(ohm)\n", + "R2=0.70 #Resistance at low voltage side(ohm)\n", + "X1=0.92 #Reactance at high voltage side(ohm)\n", + "X2=0.90 #Reactance at low voltage side(ohm)\n", + "Zq=632+4370j #Impedance of exciting circuit(ohm)\n", + "\n", + "#Calculations:\n", + "Req=R1+R2\n", + "Xeq=X1+X2 \n", + "Vcd=2400*Zq/(Zq+complex(R1,X1))\n", + "V=complex(round(Vcd.real,2),round(Vcd.imag,3))\n", + "\n", + "#Results:\n", + "print \"Req:\",Req,\"ohm\",\" and Xeq:\",Xeq,\"ohm\"\n", + "print \"Voltage at low voltage terminal:\",V,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Req: 1.42 ohm and Xeq: 1.82 ohm\n", + "Voltage at low voltage terminal: (2399.45+0.316j) V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.5, Page number: 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "Zf=0.30+.160j #Impedance of feeder(ohm)\n", + "Zeq=1.42+3.42j #Equiv.impedance of transformer refd. to primary(ohm)\n", + "k=2400/240 #turns ratio\n", + "P=50000 #power rating of the transformer(VA)\n", + "Vs=2400 #sending end vltage of feeder(V)\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "I=P/2400 #Rated current(A)\n", + "theta=math.acos(0.80)\n", + "Zt=Zf+Zeq #combned impedance of feeder & transformer(ohm)\n", + "R=Zt.real\n", + "X=Zt.imag\n", + "bc=I*X*math.cos(theta)-I*R*math.sin(theta)\n", + "ab=I*R*math.cos(theta)+I*X*math.sin(theta)\n", + "Ob=(Vs**2-bc**2)**0.5\n", + "V2=Ob-ab\n", + "\n", + "\n", + "#Results:\n", + "print \"The voltage at the secondary terminals:\",round(V2/10,0),\"V\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage at the secondary terminals: 233.0 V\n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.6, Page number: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "#short ckt test readings:\n", + "Vsc=48 #voltage(V)\n", + "Isc=20.8 #current(A)\n", + "Psc=617 #power(W)\n", + " \n", + "#Open ckt test readings:\n", + "Vs=240 #Voltage(V)\n", + "I=5.41 #current(A)\n", + "P=186 #power(W)\n", + "V2ph=2400 #voltage at full load at high voltage side(V)\n", + "pf=0.8 #lagging power factor at full load\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "theta=math.acos(pf)\n", + "Zeqh=Vsc/Isc #subscript h refers to high voltage side\n", + "Reqh=Psc/Isc**2\n", + "Xeqh=math.sqrt(Zeqh**2-Reqh**2)\n", + "Ih=50000/V2ph\n", + "Pout=50000*pf\n", + "Pwind=Ih**2*Reqh\n", + "Ptloss=P+Pwind\n", + "e=(1-Ptloss/(Ptloss+Pout))*100\n", + "Iph=(50000/2400)*complex(math.cos(theta),math.sin(-theta))\n", + "V1ph=V2ph+Iph*complex(Reqh,Xeqh)\n", + "r=(round(abs(V1ph),2)-2400)*100/V2ph\n", + "\n", + "\n", + "#Results:\n", + "print \"The efficiency of the transformer:\",round(e,0),\"%\"\n", + "print \"Volatge Regulation:\",round(r,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the transformer: 98.0 %\n", + "Volatge Regulation: 1.94 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.7, Page number: 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Varaible declaration:\n", + "Vx=2400 #Voltage at low voltage side(V)\n", + "Vbc=2400 #Voltage across branch bc(V)\n", + "Vab=240 #Voltage induced in winding ab(V)\n", + "Pl=803 #transformer losses(W)\n", + "pf=0.8 #Power factor of the transformer\n", + "\n", + "#Calculations:\n", + "Vh=Vab+Vbc\n", + "Ih=50000/Vab\n", + "KVA=Vh*Ih/1000 #Kva rating\n", + "P=pf*550000\n", + "e=(1-Pl/(P+Pl))*100\n", + "\n", + "\n", + "#Results:\n", + "print \"Voltage ratings, Vh:\",Vh,\"V \", \"& Vx:\",Vx,\"V\"\n", + "print \"KVA rating as an autotransformer:\",KVA,\"KVA\"\n", + "print \"full-load efficiency:\", round(e,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage ratings, Vh: 2640 V & Vx: 2400 V\n", + "KVA rating as an autotransformer: 550.0 KVA\n", + "full-load efficiency: 99.82 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.8, Page number: 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "Vl1=4160 #line-to-line voltage at feeder's sending end(V)\n", + "Zf=0.30+.160j #Impedance of feeder(ohm)\n", + "Zeq=1.42+3.42j #Equiv.impedance of transformer refd. to primary(ohm)\n", + "k=2400/240 #turns ratio\n", + "P=50000 #power rating of the transformer(VA)\n", + "Vs=2400 #sending end vltage of feeder(V)\n", + "\n", + "\n", + "\n", + "#Calculation:\n", + "#this problem can be treated on a single phase basis,\n", + "#and whole problem is similar to Ex 2.5.\n", + "\n", + "I=P/2400 #Rated current(A)\n", + "theta=math.acos(0.80)\n", + "Zt=Zf+Zeq #combned impedance of feeder & transformer(ohm)\n", + "R=Zt.real\n", + "X=Zt.imag\n", + "bc=I*X*math.cos(theta)-I*R*math.sin(theta)\n", + "ab=I*R*math.cos(theta)+I*X*math.sin(theta)\n", + "Ob=(Vs**2-bc**2)**0.5\n", + "V2=Ob-ab\n", + "Vload=V2/k\n", + "\n", + "#Results:\n", + "print \"The line to line voltage:\",round(Vload,0),\"V line-to-line\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The line to line voltage: 233.0 V line-to-line\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.9, Page number: 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import cmath\n", + "\n", + "#Variable decclaration:\n", + "#All resistances, reactances, & impedances are on per phase basis\n", + "Req=1.42 #Series resist. of del-del transformer referred to 2400v side(ohm)\n", + "Xeq=1.82 #Series react. of del-del transformer referred to 2400v side(ohm)\n", + "Zs=0.17+0.92j #Equiv impedance of sending end transformer(ohm)\n", + "Xf=0.8j #Reactance of the feeder(ohm)\n", + "Vf=2400 #Voltage of the feeder(V)\n", + "k=10 #turns ratio(Vp/Vs)\n", + "\n", + "\n", + "#Calculations:\n", + "Zt=(complex(Req,Xeq)/3)+Zs+Xf\n", + "Ztot=complex(round(Zt.real,2),round(Zt.imag,2))\n", + "If=math.floor(Vf/(math.sqrt(3))/round(abs(Ztot),2))\n", + "I1=If/math.sqrt(3)\n", + "I2=I1*k\n", + "Ic=I2*math.sqrt(3)\n", + "\n", + "\n", + "#Results:\n", + "print \"Short circuit current in the 2400 feeder, per phase wires:\",round(Ic,1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Short circuit current in the 2400 feeder, per phase wires: 5720.0 A\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.10, Page number: 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "X1=143 #Reactance of primary(ohm)\n", + "X21=164 #Reactance of secondary ref. to primary(ohm)\n", + "Xm=163*10**3 #Reactance of magnetising ckt(ohm)\n", + "R1=128 #Resistance of primary(ohm)\n", + "R21=141 #Resistane of secondary ref. to primary(ohm)\n", + "k=20 #turns ratio(2400/120)\n", + "V1=2400 #primary voltage(V)\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "V2=(V1/k)*complex(0,Xm)/complex(R1,X1+Xm)\n", + "mag=abs(V2)\n", + "ph=degrees(cmath.phase(V2))\n", + "\n", + "\n", + "#Results:\n", + "print \"Magnitude of V2:\",round(mag,2),\"V\"\n", + "print \"Phase of V2:\",round(ph,3),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of V2: 119.89 V\n", + "Phase of V2: 0.045 degrees\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.11, Page number: 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "\n", + "\n", + "#variable declaration:\n", + "X1=44.8*10**-6 #Reactance of the primary(ohm)\n", + "R1=10.3*10**-6 #Resistance of the primary(ohm)\n", + "X21=54.3*10**-6 #Reactance of the secondary refd. to primary(ohm)\n", + "R21=9.6*10**-6 #Resistance of secondary ref. to primary(ohm)\n", + "Xm=17.7*10**-3 #Reactance of the magnetising ckt(ohm)\n", + "k=5/800 #turms ratio(I2/I1)\n", + "Zl=2.5+0j #Impedance ofthe load(ohm)\n", + "I1=800 #primary current(A)\n", + "\n", + "#Calculations:\n", + "Zp=k**2*Zl\n", + "I2=I1*k*Xm*1j/(Zp+R21+(X21+Xm)*1j)\n", + "phase=cmath.phase(I2)\n", + "\n", + "\n", + "#Results:\n", + "print \"Magnitude of current:\",round(abs(I2),2),\"A\"\n", + "print \"Phase of the current:\",round(math.degrees(phase),3),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of current: 4.98 A\n", + "Phase of the current: 0.346 degrees\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.12, Page number: 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "XL=0.040 #Reactance at l.v side(ohm)\n", + "XH=3.75 #Reactance at h.v side(ohm)\n", + "Xm=114 #Magnetising reactance(ohm)\n", + "RL=0.76*10**-3 #Resistance at l.v.side(ohm)\n", + "RH=0.085 #Resistance at l.v.side(ohm)\n", + "VA_base=100*10**6 #base VA\n", + "V_base=7.97*10**3 #base voltage(V)\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "#for l.v side\n", + "VA_base=100*10**6 #base VA\n", + "V_base=7.97*10**3 #base voltage(V)\n", + "Rbase1=Xbase1=V_base**2/VA_base\n", + "\n", + "#for h.v side:\n", + "VA_base=100*10**6 #base VA\n", + "V_base=79.7*10**3 #base voltage(V)\n", + "Rbase2=Xbase2=V_base**2/VA_base\n", + "\n", + "XL_pu=XL/Xbase1\n", + "XH_pu=XH/Xbase2\n", + "Xm_pu=Xm/Xbase1\n", + "RL_pu=RL/Rbase1\n", + "RH_pu=RH/Rbase2\n", + "K_pu=1 #per unit utrns ratio\n", + "\n", + "#Results:\n", + "print \"The per unit parameters are:\"\n", + "print \"XL_pu =\",round(XL_pu,3),\"p.u\"\n", + "print \"XH_pu =\",round(XH_pu,4),\"p.u\"\n", + "print \"Xm_pu =\",math.ceil(Xm_pu),\"p.u\"\n", + "print \"RL_pu =\",round(RL_pu,4),\"p.u\"\n", + "print \"XL_pu =\",round(RH_pu,4),\"p.u\"\n", + "print \"Turns ratio =\",K_pu,\"p.u\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The per unit parameters are:\n", + "XL_pu = 0.063 p.u\n", + "XH_pu = 0.059 p.u\n", + "Xm_pu = 180.0 p.u\n", + "RL_pu = 0.0012 p.u\n", + "XL_pu = 0.0013 p.u\n", + "Turns ratio = 1 p.u\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.13, Page number: 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "\n", + "\n", + "#Variable declaration:\n", + "Ic=5.41 #Exciting current ref. to low volt. side(A)\n", + "k=10 #turns ratio(N1/N2=2400/240)\n", + "Vbh=2400 #base voltage at primary side(V)\n", + "Vbl=240 #base voltage at secondary side(V)\n", + "Ibh=20.8 #base current at primary side(A)\n", + "Ibl=208 #base current at secondary side(A)\n", + "Z=1.42+1.82j #Equiv.impedance ref.to high voltage side(ohm)\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "Zbh=Vbh/Ibh\n", + "Zbl=Vbl/Ibl\n", + "Icl=Ic/Ibl\n", + "Ich=Ic/(Ibh*k)\n", + "Zl=Z/(k**2*Zbl)\n", + "Zh=Z/Zbh\n", + "\n", + "\n", + "#Results:\n", + "print \"Per unit exciting current on low volt. sides:\",round(Icl,3,),\"A\" \n", + "print \"Per unit exciting current on high volt. sides:\",round(Ich,3),\"A\"\n", + "print \"per unit equiv.impedance at low volt. sides:\",round(Zl.real,4)+round(Zl.imag,4)*1j,\"ohm\"\n", + "print \"per unit equiv.impedance at high voltage sides:\",round(Zh.real,4)+round(Zh.imag,4)*1j,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Per unit exciting current on low volt. sides: 0.026 A\n", + "Per unit exciting current on high volt. sides: 0.026 A\n", + "per unit equiv.impedance at low volt. sides: (0.0123+0.0158j) ohm\n", + "per unit equiv.impedance at high voltage sides: (0.0123+0.0158j) ohm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.14, Page number: 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "\n", + "#Variable declaration:\n", + "Vb=24000 #Base voltage of secondary of sending end transformer(V) \n", + "Z=0.17+0.92j #Impedance of sending end transformer ref. to 2400V side(ohm)\n", + "P=150 #Power rating of the transformer(KVA)\n", + "V=2400 #Primary voltage of sending end transformer(v)\n", + "Ztot=0.64+2.33j #Total series impedance(ohm)\n", + "\n", + "#Calculations:\n", + "Zb=V**2/(P*10**3)\n", + "Ztotb=Ztot/Zb\n", + "Vsb=1 #Vs in terms of per unit values\n", + "Isc=Vsb/abs(Ztotb) #Short current in per unit values(A)\n", + "Ib1=P*10**3/(sqrt(3)*2400) #base current of the feeder at 2400V side(A)\n", + "If=Ib1*Isc\n", + "Ib2=P*10**3/(sqrt(3)*240)\n", + "Iscs=Isc*Ib2 #short ckt current at 2400V afeeder side (A)\n", + "\n", + "#Results:\n", + "print \"Short circuit current in 2400 feeder:\",round(Iscs/10**3,2),\"KA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Short circuit current in 2400 feeder: 5.73 KA\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.15, Page number: 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "P=250*10**3 #power rating of transformer(KVA)\n", + "Vp=2400 #primary volatge(V)\n", + "Vs=460 #secondary voltage(V)\n", + "Pb=100*10**3 #new base power of transformer(KVA)\n", + "Vb=460 #new base voltage(V)\n", + "Z=0.026+0.12j #series impedance on its own base(ohm)\n", + "Vl=438 #load voltage(V)\n", + "Pl=95*10**3 #power drawn by the load(kW)\n", + "\n", + "#Calculations:\n", + "Zbo=Vs**2/P #base impedance for the transformer(ohm)\n", + "Zbn=Vb**2/Pb #base impedance for the transformer at 100KVA base(ohm)\n", + "Zpn=Z*Zbo/Zbn #base impedance at 100KVA base(ohm)\n", + "Vpl=Vl/Vb #per unit load voltage(V)\n", + "Ppl=Pl/Pb #per unit load power\n", + "Ipl=Ppl/Vpl #per unit load current(A)\n", + "Vpp=Vpl+Ipl*Zpn #high side voltage of the transformer(V) \n", + "\n", + "\n", + "#Results:\n", + "print \"The high side voltage:\",round(abs(Vpp*Vp),0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The high side voltage: 2313.0 V\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter3.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter3.ipynb new file mode 100755 index 00000000..411be995 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter3.ipynb @@ -0,0 +1,430 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3da4e1bbe19be5f3a05399c95840acc2f1758f76d57c3a0e757cbfa9a562b633" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Electromechanical-Energy-Conversion-Principles " + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.1, Page number: 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "I=10 #current in the coil(A)\n", + "Bo=0.02 #magnetic field (T)\n", + "R=0.05 #radius of the rotor(m)\n", + "l=0.3 #rotor length(m)\n", + "\n", + "\n", + "#Calculations:\n", + "q=symbols('q') #Direction of torque\n", + "F1=-2*I*l*Bo*sin(q) #Force on the coil(N)\n", + "T=F1*R #Torque scting in theta direction(Nm)\n", + "\n", + "\n", + "#Results:\n", + "print \"Force per unit length:\",T,\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force per unit length: -0.006*sin(q) Nm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.2, Page number: 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "\n", + "#Variable declaration\n", + "N=1000 #No of winding turns\n", + "g=2 #Air gap width(mm)\n", + "d=0.15 #Magnetic core width,d (m)\n", + "l=0.1 #thickness of core(0.1)\n", + "x,d=symbols('x d') #where h is height of plunger(m) \n", + " #Lx is inductance as a function of x(H)\n", + "i=10 #Current in the winding(A)\n", + "uo=4*3.14*10**-7 #permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "Lx=(uo*N**2*l*d)/(2*g*10**-3)*(1-x/d)\n", + "Wfld=(1./2)*Lx*i**2\n", + "\n", + "\n", + "#Results:\n", + "print \"The magnetic energy stored, Wfld:\",\"236*(1-x/d) J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnetic energy stored, Wfld: 236*(1-x/d) J\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.3, Page number: 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "import numpy as np\n", + "from pylab import *\n", + "\n", + "#Variable declaration:\n", + "xdata=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0] #(cm)\n", + "Ldata=[2.8, 2.26, 1.78, 1.52, 1.34, 1.26, 1.20, 1.16, 1.13, 1.11, 1.10] #(mH)\n", + "I = 0.75 #(A)\n", + "\n", + "\n", + "#Calculations:\n", + "x=0.01*np.array(xdata)\n", + "L=0.001*np.array(Ldata)\n", + "length=len(x)\n", + "xmax=x[length-1]\n", + "a=polyfit(x,L,4)\n", + "xfit=[0]*102\n", + "Lfit=[0]*102\n", + "for n in range(1,102,1):\n", + " xfit[n-1]=xmax*(n-1)/100\n", + " Lfit[n-1]=a[0]*xfit[n-1]**4+a[1]*xfit[n-1]**3+a[2]*xfit[n-1]**2+a[3]*xfit[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(xdata,Ldata,'o')\n", + "plot(100*np.array(xfit),1000*np.array(Lfit),'g.')\n", + "xlabel('x [cm] ')\n", + "ylabel('L [mH] ')\n", + "title('Inductance,L vs length,l')\n", + "grid()\n", + "print \"The required plots are shown below:\"\n", + "show()\n", + "\n", + "#set current to 0.75 A\n", + "I=0.75\n", + "F=[0]*102\n", + "for n in range(1,102,1):\n", + " xfit[n-1]=0.002+0.016*(n-1)/100\n", + " F[n-1]=4*a[0]*xfit[n-1]**3+3*a[1]*xfit[n-1]**2+2*a[2]*xfit[n-1]**1+a[3]\n", + " F[n-1]=(I**2/2)*F[n-1]\n", + "plot(100*np.array(xfit),F,'b.')\n", + "xlabel('x [cm]')\n", + "ylabel('Force [N]')\n", + "title('Force, F vs length,l')\n", + "grid()\n", + "\n", + "#Results:\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required plots are shown below:\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEXCAYAAABCjVgAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX6B/BnWARGloFUUAYcE0zGhUUJMxWsFIFAb4Rb\nKpgGP/spebNdTczl3rpabjfDvIlmSIZZKEtaMqgpkopLYj+EGmWQSIFRdhDO7w+auePEMgxnmDMz\nn/frNa+Xh3Nm+PI4r3nmPM/5fg+PYRgCAAAgIjLT9wAAAIA7kBQAAEAJSQEAAJSQFAAAQAlJAQAA\nlJAUAABACUkBdCohISFh/vz5n+t7HMYgJiYmafXq1ev08btFIpH0hx9+eFqTY/F/btiQFKBL3flA\nUMfj8ViZCGNmZtb666+/PsrGa7Gltz/8eDwew1Y8O9Ne8unO7+6NMYLuIClAl3rrw6grDMPw9D0G\nVfqICddi0B5DGCN0DEkBuiUpKSlmwoQJp19//fV/OTk5VT766KO/ZmVlTVPs/+2334YEBgbm2Nvb\n3586deqxu3fv9lPsk0gkQW5ubiWqr6d6FtLS0mK+cePGdzw8PIrs7e3v+/v7/ySTyYSTJk06SUTk\n7e192c7Orvqrr76KksvlgmefffbogAED/nBycqoMDw8/Ulpa6qp43aCgIMm777773oQJE07b29vf\nDw4O/q6iouIRxf7Tp09PGD9+/BlHR8cqd3f3W3v37o0mImpsbLR67bXXNg0ePPimi4vL70uWLNnZ\n0NBg3V4sNP3wW7Jkyc7XX3/9X6o/mz59+rdbtmxZTkT0/vvvvykUCmX29vb3hw8f/suJEyee0uR1\njx49+qyPj88lR0fHqieffPLHq1evjlKN6+bNm1d4e3tfFggE8tmzZ6c0NjZaKfZ/8MEHbwwaNOi2\nUCiU7d69e7GZmVlrcXHx0F27dsUmJyfP/eCDD96ws7Ornj59+reK5+Tn5/t29HpgRBiGwQOPTh8i\nkei3H3744SmGYWjPnj0xlpaWTbt3717U2trK27lz5/8MGjSoVHHsuHHjzq5YsWJTU1OT5cmTJyfa\n2dndnz9//j6GYSg7OztIKBSWdPTaH3zwweujRo26UlhY6MkwDF2+fHl0RUWFE8MwxOPxWouLix9V\nPK+iosLp66+//lt9fb11dXW1bVRU1MEZM2YcVuwPDAyUeHh43Lhx44ZHfX29dVBQUPZbb731D4Zh\nSCqVDrazs7ufkpIy68GDB+YVFRVOly5d8mYYhpYvX/7R9OnTv6mqqhJUV1fbhoeHp7399tsb24vL\nmjVrEubNm/d5V/E7efLkRDc3t1uK7crKSkcbG5u6srIyl19++eUxNze3W2VlZS4Mw9DNmzfdVf9O\n1UdMTMyeVatWrWMYhi5evOg7YMCA8ry8PP/W1lbe3r17F4hEot+amposFXENCAjILSsrc6msrHT0\n8vIq+OSTT+IYhqHMzMxpLi4uZQUFBV51dXU2L7zwwn7V+MbExOxZvXr1e6q/e/DgwdKOXk/buODB\nzQfOFKDbBg8efHPRokX/4fF4zIIFC/aVlZUN/OOPPwbcunXL/fz582PXrVu32tLSsnnixImnwsPD\nj2j6urt37168YcOGlZ6enjeIiEaPHn3Fycmpsr1jnZycKv/2t78dtra2brC1ta155513Nubk5AQq\n9vN4PGbhwoV7PDw8iqyt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QAAUPp/47lOQdthO6gAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEXCAYAAACK4bLWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUU2f6B/AnbK0IGFEJStAoIYBVFgvSX6dWfqUBoTWi\n1ood2+i4nU5pp+2o0Kl1bOsSHDu/tjrtUacVqiPiUoUZEY1K1KkjaMGlBQtYU0MkUVlcqpXt/v5g\nrk1TlgA35CZ8P+fcU9+bN8mb56R5uO9z33sFDMMQAABATznZegAAAOAYkFAAAIATSCgAAMAJJBQA\nAOAEEgoAAHACCQUAADiBhAJgJ5ycnFq+//77Ub39vhqNJsbf319naX+JRKI9cuRIrDXHBPyEhAK8\nJZFItO7u7nc9PT1ve3p63vby8rplMBh8bT0ulpOTU4uHh8cddnze3t61th4TF3qauAQCASMQCLDA\nrQ9ysfUAANojEAiYf/3rX88+9dRTR7v7Gk1NTS4uLi5NXI7L1Pnz50NHjRr1vbVe31YYhhHYegxg\nf3CEAnbn/v37D73++usf+vn56f38/PRvvPHG/zU0NLgRtU7PiMXiqrVr1y4dOnRo9bx58z5raWlx\nWr169Z+kUmmll5fXrcjIyDNVVVViIqKLFy8Gy+Vy9aBBg2qCg4Mv7tq1awbXYxUKhfXffvvtI+y+\n69evD3F3d79748aNwTdu3Bj87LPP/mvgwIF1gwYNqnnyySePW/Jjfv/+/YcWL168bsSIET/4+voa\nXn755U9/+umnh01j8Ne//vVNkUhkHDZs2NWMjIw57HNramoGTZ48+Z8DBgy4OX78+KJly5atnDBh\nwgkioieffPI4EVFYWNg5T0/P26bxaO/1AFhIKMBrbf24rlq16u2ioqLx586dCzt37lxYUVHR+JUr\nVy5jHzcajaK6urqBV65cGb5x48ZFH3zwwR937NiRfODAgYRbt255bdmyZa67u/vdH3/8sb9cLlfP\nnj172/Xr14fs2LEj+fe///0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KjEu1tM2SeHp6et52d3e/S0SUkJBwoLGx0bW2tta7t8fqCPDd\n5Ba+m13T2NjoOn369D2zZ8/e1tbSje58P+06oXS0VoWlUChyv/jii5eIiE6dOvWYUCisF4lERtuM\nmN8siafRaBSxf7UUFRWNZxhG4O3tXWubEds3fDe5he+m5RiGEcybN++z0aNHl77++usfttWnO99P\nu57ycnFxadqwYUNKfHz8webmZud58+Z9FhISUrZx48ZFRESLFi3amJiYmJeXl5colUor+/fv/+OW\nLVvm2nrcfGVJPHfv3v3cp59++rKLi0uTu7v73R07diTbetx8NWvWrKxjx45NvHHjxmB/f3/du+++\n++fGxkZXInw3u6OzeOK7abmvvvrqN9u2bZsdGhp6PiIiooSIaPXq1X+6cuXKcKLufz8d9p7yAADQ\nu+x6ygsAAPgDCQUAADiBhAIAAJxAQgEAAE4goQAAACeQUAB6gbOzc/O4ceOKq6urh/b0tX7729/+\nY9CgQTV79uyZzsXYALhi1+tQAOyFu7v73eLi4nFcvNY//vGP386dO3cLLtMCfIMjFIAuOn36dFRY\nWNi5+/fvP/Tjjz/2HzNmzDddvRBhfn7+pEcfffTr8PDws3K5XE1EtGLFihVKpTLzySefPC6RSLRf\nfvnltMWLF68LDQ09n5CQcKCpqekXfwDiyrrANzhCAeiiqKio0wqFInfZsmUr79271+/FF1/cOnr0\n6FJLn3/9+vUhCxcu3HTixIkJI0aM+KG+vl7IPnb58uWRBQUF//vtt98+8thjj53au3fv1HXr1i2e\nNm3al/v3739mypQpOdb5VAA9h4QC0A3Lly9/LzIy8ky/fv3urV+//tWuPPfUqVOPTZw48diIESN+\nICISCoX1RK1Xck1ISDjg7OzcPGbMmG9aWlqc4uPjDxIRjR079oJWq5Vw/kEAOIQpL4BuuHHjxuAf\nf/yx/507dzzu3bvXryvPFQgETHvTVW5ubg1ERE5OTi2urq6N7H4nJ6cW8ykvAL5BQgHohkWLFm1c\nuXLlshdeeGF7ampqeleeGx0dXXj8+PEn2SMOXGIdHAX+4gHooi+++OKlhx566H5ycvKOlpYWp8cf\nf/ykRqOJiYmJ0Vjy/CFDhlzftGnTwmnTpn3Z0tLiJBKJjAcPHown+uUNjMzP4sJZXcB3uNowQC/w\n9PS8ffv2bU+uXm/OnDkZkydP/uf06dP3cPWaAD2FKS+AXuDl5XWLy4WNJ06cmNCvX797XIwNgCs4\nQgEAAE7gCAUAADiBhAIAAJxAQgEAAE4goQAAACeQUAAAgBP/Dy3G3mtzwdUhAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.4, Page number: 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "Lo=10.6*10**-3 #Initial inductance(H)\n", + "L2=2.7*10**-3 #H\n", + "\n", + "\n", + "#Calculations:\n", + "theta,i=symbols('theta i')\n", + "L=Lo+L2*cos(2*theta)\n", + "i=2 #Coil current,A\n", + "def T(theta):\n", + " return i**2*diff(L,theta)/2\n", + " \n", + "\n", + "#Results:\n", + "print \"Torque,Tfld =\",T(theta),\" N.m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque,Tfld = -0.0108*sin(2*theta) N.m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.6, Page number: 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "r1=2.5*10**-2 #radius of rotor(m)\n", + "h=1.8*10**-2 #Axial length(m)\n", + "g=3*10**-3 #Air gap length(m)\n", + "Bag=1.65 #Magnetic field(T)\n", + "uo=4*pi*10**-7 #permeability of free space(H/m)\n", + "\n", + "#Calculations:\n", + "H=Bag/uo\n", + "Ni=2*g*H\n", + "T=uo*(Ni)**2*h*(r1+0.5*g)/(4*g)\n", + "\n", + "#Results:\n", + "print \"The maximum torque:\", round(T,2),\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum torque: 3.1 Nm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.7, Page number: 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from matplotlib import *\n", + "\n", + "#Variable declaration:\n", + "i1=0.8\n", + "i2=0.01\n", + "\n", + "\n", + "#Calculations & Results:\n", + "def df(f,x,h=0.1e-10):\n", + " return ( f(x+h/2) - f(x-h/2) )/h\n", + "\n", + "\n", + "\n", + "def l11(x):\n", + " return (3+cos(2*x))/1000.0\n", + "\n", + "def l12(x):\n", + " return (0.3*cos(x))\n", + "\n", + "def l22(x):\n", + " return (30+10*cos(2*x))\n", + "\n", + "def g(x):\n", + " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x) + (i1*i2)*df(l12,x)\n", + "\n", + "def r(x):\n", + " return ((i1**2)/2)*df(l11,x) + ((i2**2)/2)*df(l22,x)\n", + "def s(x):\n", + " return (i1*i2)*df(l12,x)\n", + "\n", + "x=linspace(-pi,pi,100000)\n", + "\n", + "\n", + "plot(x,r(x))\n", + "plot(x,s(x))\n", + "plot(x,g(x))\n", + "grid()\n", + "annotate(\"Total torque\",xy=(-0.5,0.003))\n", + "annotate(\"Reluctance torque\",xy=(-2,-0.0015))\n", + "annotate(\"Mutual Interaction torque\",xy=(1.6,-0.0026))\n", + "xlabel(\"Theta [radians]\")\n", + "ylabel(\"Torque [N.m]\")\n", + "xlim(-pi,pi)\n", + "\n", + "\n", + "#Results\n", + "print \"Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)\"\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tfld = -1.64*10**-3*sin(2*x)- 2.4*10**-3*sin(x)\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAcAAAAEMCAYAAABTD2a8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdUFNcXx7+IGo2N2EABRUHBQlexxaDIT1TEqLHEhgW7\nxsQSY2Jijd1YY7Ci2Asq2BtgB6VYIqCgoHQVQXrZ3fv747kEcWEpuzvLMJ9z5hxm95V7md29M+/d\nokFEEBAQEBAQqGxU4VoAAQEBAQEBLhAMoICAgIBApUQwgAICAgIClRLBAAoICAgIVEoEAyggICAg\nUCkRDKCAgICAQKWEUwN46dIlBxMTk7BWrVqFr1mzZoGsNj/88MOWVq1ahZubmz8KDg62LGnfDRs2\nzK1SpYrk/fv39ZWpg4CAgIBABYWIODlEIpGmoaFhRGRkpEFubm41c3PzhyEhIW0Ktjl//ny/vn37\nXiAi+Pn52djY2PiVpO/r16/1+/Tpc8nAwCAyKSmpPlc6CodwCIdwCIf6Hpw9Ad6/f7+TkZFRhIGB\nQVS1atXyRowYcdTT03NgwTZeXl5Ozs7O+wHAxsbGPyUlRSshIUFHXt85c+b8tXbt2p9VrZOAgICA\nQMWhKlcTx8bG6urr60dLz/X09GL8/f1t5LWJjY3VjYuLa1pUX09Pz4F6enoxZmZmj4uaW0NDQ0h/\nIyAgIFBKiEiDaxkUCWdPgCU1QqX5h2dlZdVcuXLlr0uXLl0sr39Rj8SLFy/m/LFc0QcfdeKrXoJO\nFefgo17F6cRHOHsC1NXVjY2OjtaXnkdHR+vr6enFFNcmJiZGT09PLyYvL6+arL4vXrwwjIqKMjA3\nN38kbW9tbR14//79To0bN35TErmioqLKrZu6wUedAH7qJehUceCjXnzUqTg4ewLs0KFDQHh4eKuo\nqCiD3Nzc6seOHRvu5OTkVbCNk5OTl7u7+1gA8PPz66ylpZWira2dWFTf9u3b/5uYmKgdGR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ikZ9AIEhMTk42lSVcHTNmzDFjY+MUCwuLJD8/P9GgQYOuVO2Hz+ffFgqF\nYjMzs4dTpkw5OHjw4Et1jblx48b/WVtb3+Xz+bfV1NRKRowYEVUfmSmU1gzNBkGhsMDXX3+9Ql1d\nvfCzzz5bz7YsdaGhoVFQUFCgwbYcFIq8oTNACoUF1NXVC3fu3Dm7qY7wikTmCC9biqVQuAadAVIo\nFAqlTUJngBQKhUJpk1ADSKFQKJQ2CTWAFAqFQmmTUANIoVAolDYJNYAUCoVCaZP8PyE+5ELWm4dH\nAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.9, Page number: 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable declaration:\n", + "W=4.0*10**-2 #width of plunger lower arm(m)\n", + "W1=4.5*10**-2 #width of plunger upper arm(m)\n", + "D=3.5*10**-2 #depth of plunger (m)\n", + "d=8*10**-3 #length of magnet(m)\n", + "go=1*10**-3 #air gap length(m)\n", + "uo=4*pi*10**-7 #Permeability of free space(A.turns/m)\n", + "ur=1.06*uo #Relativity permeability\n", + "Hc1=-940 #Magnetising force(kA/m)\n", + "Bt=1.25 #Magnetic field induction(T)\n", + "N=1500 #No of turns\n", + "x=3*10**-3 #Position of plunger(m)\n", + "\n", + "#Calculation:\n", + "Ni=-Hc1*d*10**3\n", + "Rx=x/(uo*W1*D)\n", + "Ro=go/(uo*W*D)\n", + "Rm=d/(ur*W*D)\n", + "f=-((Ni)**2)/(uo*W1*D*(Rx+Ro+Rm)**2)\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"The x-directed force:\",round(f,1),\"N\"\n", + "print \"Current in the excitation winding:\",round(Ni/N,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The x-directed force: -703.3 N\n", + "Current in the excitation winding: 5.01 A\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter4.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter4.ipynb new file mode 100755 index 00000000..aef0df05 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter4.ipynb @@ -0,0 +1,277 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Introduction to Rotating Machines" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.2, Page number: 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "uo=4*pi*10**-7 #Permeabolity of free space(H/m)\n", + "g=0.7*10**-3 #Length of air gap(m)\n", + "p=4 #no. of poles\n", + "Ba=1.6 #Magnetic flux density(T)\n", + "Kr=0.935 #Winding constant\n", + "N=263 #No. of turns\n", + "\n", + "#Calculations:\n", + "Ir=(pi*g*p/(4*uo*Kr*N))*1.6\n", + "\n", + "\n", + "#Results:\n", + "print \"Rotor winding current:\",round(Ir,1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rotor winding current: 11.4 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.3, Page number: 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "fc=60 #frequency of the current(Hz)\n", + "p=[2, 4, 6] #matrix of no. of poles\n", + "\n", + "#Calculations:\n", + "ns=[0]*3\n", + "ws=[0]*3\n", + "wc=2*pi*fc\n", + "for n in range(0,3,1):\n", + " ws[n]=round((2/p[n])*wc,0)\n", + " \n", + "for i in range(0,3,1):\n", + " ns[i]=round(120*fc/p[i],0)\n", + "\n", + "\n", + "#Results:\n", + "print \"The synchronous angular velocities:\",ws, \"rad/sec\"\n", + "print \"The speed of the rotor:\",ns,\"r/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The synchronous angular velocities: [377.0, 188.0, 126.0] rad/sec\n", + "The speed of the rotor: [3600.0, 1800.0, 1200.0] r/min\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.5, Page number: 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Nf=68 #Field winding\n", + "Na=18 #Armature winding\n", + "r=0.53 #mean air gap radius(m)\n", + "l=3.8 #Armature winding length(m)\n", + "Kf=0.945 #Winding factor of field winding\n", + "Ka=0.933 #Winding factor of armature winding\n", + "g=4.5*10**-2 #Air gap length(m)\n", + "p=2 #No. of poles\n", + "If=720 #field current(A)\n", + "uo=4*pi*10**-7 #Permeability of free space(H/m)\n", + "f=60 #Frequency curent(Hz)\n", + "\n", + "#Calculations:\n", + "Fag1_peak=4*Kf*Nf*If/(pi*p)\n", + "Bag1_peak=uo*Fag1_peak/g\n", + "Qp=2*Bag1_peak*l*r\n", + "Erms=sqrt(3)*sqrt(2)*pi*f*Ka*Na*Qp\n", + "\n", + "\n", + "#Results:\n", + "print \"The peak fundamental mmf,Fag1_peak: \",round(Fag1_peak/10000,2),\"* 10^4 A.turns/pole\"\n", + "print \"\\nThe flux density in the air gap,Bag1_peak: \",round(Bag1_peak,2),\"T\"\n", + "print \"\\nThe fundamental flux per pole, Qp:\" ,round(Qp,2),\"Wb\"\n", + "print \"\\nThe rms value of open circuit voltage,Erms: \",round(Erms/1000,1),\"KV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The peak fundamental mmf,Fag1_peak: 2.95 * 10^4 A.turns/pole\n", + "\n", + "The flux density in the air gap,Bag1_peak: 0.82 T\n", + "\n", + "The fundamental flux per pole, Qp: 3.31 Wb\n", + "\n", + "The rms value of open circuit voltage,Erms: 25.7 KV\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.8, Page number: 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable Declaration:\n", + "ns=1800 #Speed of rotor(rpm)\n", + "f=60 #Frequency(Hz)\n", + "g=1.2*10**-3 #Air gap length(m)\n", + "D=0.27 #Avg diameter of the gap(m)\n", + "Kr=0.976 #Winding factor\n", + "l=0.32 #Axial length(m)\n", + "I=18 #Rotor current(A)\n", + "p=4 #No of poles\n", + "Nr=786 #Rotor windings\n", + "B_max=1.5 #Max. flux densiity(T)\n", + "\n", + "\n", + "#Calculations:\n", + "Fr_max=4*Kr*Nr*I/(pi*p)\n", + "T_max=p*pi*D*l*B_max*Fr_max/4\n", + "wm=ns*pi/30\n", + "P=wm*T_max\n", + "\n", + "\n", + "#Results:\n", + "print \"Maximum torque, T_max:\",round(T_max,0),\"Nm\"\n", + "print \"Maximum power,P:\",round(P/1000,0),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum torque, T_max: 1790.0 Nm\n", + "Maximum power,P: 337.0 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.9, Page number: 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable Declaration:\n", + "b=0.5 #Wavelength of wnding(m)\n", + "l=1.5 #Winding length(m)\n", + "I=700 #Currents in windings(A)\n", + "N=45 #No. of turns\n", + "K=0.92 #winding factor\n", + "p=3 #No. of phases\n", + "uo=4*pi*10**-7\n", + "g=0.01 #Air gap flux(m)\n", + "f=25 #Frequency of the exciting current(A)\n", + "\n", + "#Calculations:\n", + "F_peak=(3*4*K*N*700)/round(4*pi*p,-1)\n", + "B=uo*F_peak/g\n", + "v=f*b\n", + "\n", + "#Results:\n", + "print \"Amplitude of the resultant mmf wave:\",round(F_peak/1000,1),\"kA/m\"\n", + "print \"Peak air gap flux:\",round(B,1),\"T\"\n", + "print \"Velocity of the travelling wave:\",v,\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplitude of the resultant mmf wave: 8.7 kA/m\n", + "Peak air gap flux: 1.1 T\n", + "Velocity of the travelling wave: 12.5 m/s\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter5.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter5.ipynb new file mode 100755 index 00000000..e0897bf4 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter5.ipynb @@ -0,0 +1,596 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fdfb62ac44329d8ca6f9c44e55b110ca6276a0bf982882f2c43000518ecc6bb3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Synchronous Machines" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.1, Page number: 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import cmath\n", + "\n", + "#Varaible Declaration:\n", + "pf=0.95 #Lagging power factor\n", + "Vl=460 #Terminal voltage(V)\n", + "I=120 #Terminal current(A)\n", + "If=47 #Field current(A)\n", + "X=1.68j #Line syncchronous reactance(ohm)\n", + "\n", + "\n", + "#Calculation:\n", + "#Choosing motor reference direction:\n", + "Va=Vl/math.sqrt(3)\n", + "theta=math.acos(0.95)\n", + "Ia=I*cmath.exp(-theta*1j)\n", + "Eaf=Va-X*Ia\n", + "wc=120*math.pi\n", + "Laf=math.sqrt(2)*abs(Eaf)/(wc*If)\n", + "P=3*Va*Ia*pf\n", + "\n", + "#Results:\n", + "print \"Generated emf:\",round(abs(Eaf),1),\"V line to line\"\n", + "print \"Fied to armature mutual inductance:\",round(Laf*1000,1),\"mH\"\n", + "print \"Three phase power:\",round(abs(P/1000),1),\"kW or\",round(abs(P)/746),\"hp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated emf: 278.8 V line to line\n", + "Fied to armature mutual inductance: 22.3 mH\n", + "Three phase power: 90.8 kW or 122.0 hp\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2, Page number: 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath \n", + "from math import *\n", + "\n", + "#Variable Declaration:\n", + "Pin=90.6*10**3 #Input power(kW)\n", + "Va=265.6 #Terninal voltage(V)\n", + "X=1.68j #Synchronous reactance(ohm)\n", + "Laf=22.3*10**-3 #Mutual inductance(H)\n", + "wc=120*pi #Angular frequency(rad/sec)\n", + "\n", + "\n", + "#Calculations:\n", + "Ia=Pin/(3*Va)\n", + "Eaf=Va-X*Ia\n", + "delta=degrees(cmath.phase(Eaf))\n", + "I=sqrt(2)*Eaf/(wc*Laf)\n", + "\n", + "\n", + "#Results:\n", + "print\"The phase angle,delta:\",round(delta,1),\"degrees\"\n", + "print\"Required field current:\",round(abs(I),2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase angle,delta: -35.7 degrees\n", + "Required field current: 55.04 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.3, Page number: 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Eafl=13.8*10**3 #Open circuit voltage(V)\n", + "If1=318 #Field current(A)\n", + "If2=263 #Field current after extrapolation(A)\n", + "wc=120*pi #Angular frequency(Hz)\n", + "\n", + "#Calculations:\n", + "Eaf=Eafl/sqrt(3)\n", + "La1=sqrt(2)*Eaf/(wc*If1)\n", + "La2=sqrt(2)*Eaf/(wc*If2)\n", + "\n", + "#Results:\n", + "print \"Saturated Laf1:\",round(La1*1000,0),\"mH\" \n", + "print \"Unsaturated Laf1:\",round(La2*1000,0),\"mH\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Saturated Laf1: 94.0 mH\n", + "Unsaturated Laf1: 114.0 mH\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.4, Page number: 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Ia=[118, 152] #Armature current from SC Characteristics(A)\n", + "If=[2.20, 2.84] #Field current from SC Characteristics(A)\n", + "Vll=220 #Line-to-line Voltage(V)\n", + "V=202 #Line-to-line air voltage(V) \n", + "P=45*10**3 #Power roted to motor(W) \n", + "Is_sc=1 #per unit rated current(A)\n", + "\n", + "#Calculations:\n", + "Va_ag=V/sqrt(3) #At field current of 2.20A,at air gap,(V)\n", + "Ia_ag=Ia[0]\n", + "Xs_u=Va_ag/Ia_ag\n", + "Ia_rated=P/(sqrt(3)*Vll)\n", + "Xa_g=Va_ag/1\n", + "Xs_u_pu=Va_ag/Is_sc\n", + "Xs=Vll/(Ia[1]*sqrt(3))\n", + "Ia_pu=Ia[1]/Ia[0]\n", + "SCR=If[1]/If[0]\n", + "Xs=1/SCR\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"'All quantities are in per unit values'\"\n", + "print\"Unsaturated value of synchronous reactance:\",round(Xs_u,3),\"ohm\"\n", + "print \"Satureted value of synchronous reactance: \",round(Xs,3),\"ohm\"\n", + "print\"Short circuit ratio:\",round(SCR,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "'All quantities are in per unit values'\n", + "Unsaturated value of synchronous reactance: 0.988 ohm\n", + "Satureted value of synchronous reactance: 0.775 ohm\n", + "Short circuit ratio: 1.291\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.5, Page number: 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "P_rated=45*10**3 #Rated power(KV)\n", + "Pl=1.80*10**3 #Short circuit load loss(W)\n", + "Ia_pu=1 #Per unit armature current\n", + "Ia=118 #rated armature current(A)\n", + "Ra_dc=0.0335 #Dc resistance(ohm/phase)\n", + "\n", + "\n", + "#Calculations:\n", + "Pl_pu=Pl/P_rated \n", + "Ra_eff1=Pl_pu/Ia_pu**2 #in per unit basis\n", + "Ra_eff2=Pl/(3*(Ia)**2)\n", + "\n", + "#Results:\n", + "print \"Armature resistance in per unit:\",round(Ra_eff1,3),\"per unit\" \n", + "print \"Armature resistance in ohms/phase:\", round(Ra_eff2,3),\"ohms/phase\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature resistance in per unit: 0.04 per unit\n", + "Armature resistance in ohms/phase: 0.043 ohms/phase\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.6, Page number: 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "import cmath\n", + "import math\n", + "from pylab import *\n", + "\n", + "\n", + "#Variable declaration:\n", + "Veq=1.0 #Externalsupply(p.u) \n", + "Eaf=1.0 #Internal voltage(p.u)\n", + "Xeq=0.23 #Eqv.resistance of external system(p.u)\n", + "Xs=1.35 #Saturated synchronous reactance(p.u)\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "P_max=Eaf*Veq/(Xs+Xeq)\n", + "\n", + "\n", + "#for part (b):\n", + "delta=[0]*500\n", + "Ia=[0]*500\n", + "Va=[0]*500\n", + "degree=[0]*500\n", + "for n in range(1,101,1):\n", + " delta[n-1]=(pi/2)*(n-1)/100\n", + " Ia[n-1] = (Eaf *exp(1j*delta[n-1]) - Veq)/(1j*(Xs + Xeq))\n", + " Va[n-1] = abs(Veq + 1j*Xeq*Ia[n-1])\n", + " degree[n-1]=180*delta[n-1]/pi\n", + "plot(degree,Va,'r.')\n", + "xlabel('Power angle,delta(degrees)')\n", + "ylabel('Terminal voltage(per unit)')\n", + "title('Terminal voltage vs. power angle for part (b)')\n", + "show()\n", + "#for part (c):\n", + "Vterm=1.0\n", + "P=[0]*500\n", + "deltat=[0]*500\n", + "Ia=[0]*500\n", + "Eaf=[0]*500\n", + "\n", + "for n in range(1,101,1):\n", + " P[n-1]=(n-1)/100\n", + " deltat[n-1]=math.asin(P[n-1]*Xeq/(Vterm*Veq))\n", + " Ia[n-1]=(Vterm*exp(1j*deltat[n-1])-Veq)/(1j*Xeq)\n", + " Eaf[n-1]=abs(Vterm+1j*(Xs+Xeq)*Ia[n-1])\n", + "plot(P,Eaf,'r.')\n", + "xlabel('Power [per unit]')\n", + "ylabel('Eaf [per unit]')\n", + "title('Eaf vs. power for part (c)')\n", + "show()\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"(a) Maximum power supplied to external system:\",round(P_max,2),\"p.u\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEXCAYAAACtTzM+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdUFNfbB/C7VAHpIgJLUYpUAaWIKMWCaBQrCsYCYk1s\nSV5jYjSSGI3GmBhDrEFQY0WNYiOIUhQVLKggFlCWDoL0zu7e9w+c/DaEtsiyaL6fc+awM3P3zjOz\nyz47996ZZVFKCQAAgIS4AwAAgJ4BCQEAAAghSAgAAPAGEgIAABBCkBAAAOANJAQAACCEICH0eEuX\nLt393XffrXvbejgcjoGEhASfz+d36WseGBgYOGfOnMNdWSf0DG/7nvH39w9RU1MrGTp06O2ujq27\nFBUVaZiZmT2pr6+XJYQQNze3mODg4ICWyhYWFmqam5unNjQ0yHRvlF0HCaGDevfuXaWoqFipqKhY\nKSEhwZeXl69h5o8dO+Yrqu3u3r176bp1674TVf1vi8Vi/X0hi6iSDrx7rl+/PiIqKmp0Xl6e9u3b\nt4eKO56WSEhI8F++fDmgrTJbtmz5wt/fP0RWVraekKb3u+B7XpCmpmahu7t79L59+xaJIt7ugH/c\nDqqqqupdWVmpWFlZqaivr5954cKFCcy8r6/vsY7UweVypUQdZ3ejlLI6sgzeHqWU9a4c28zMTH0D\nAwNOr1696oR9rqj/TwTrb+t41tfXyx46dGju7Nmz/+ho3R9++OGRvXv3Ln7bGMUFCeEt8fl8iS1b\ntnxhZGSU3qdPn+KZM2eeKC0tVSXkf9+YDxw4MF9fXz9z1KhRVw8ePDjP2dk5/tNPP/1JVVW11MjI\nKP3mzZvDQkJC/PX09LI0NTULDx06NJep38/PL3T9+vUbCSEkJibGjc1m5/z000+fampqFmpra+eF\nhob6MWUvXrz4ga2tbZKysnK5np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jwTh8fHyOL1y4cP+vv/66PCwszHvjxo3rHR0dEzQ0NIocHR0TmA/X4cOH3wgKClrG1B0S\nEuI/f/78AywWi3p4eEQy9bV0/M6ePTt52rRpp69evTrK3Nw8VVdXN3vw4MH3lZWVy5sfIw0NjaLQ\n0FA/X1/fY/X19bKEELJp06avjI2N006dOjV9xYoVO8vLy5W5XK7UJ5988rOJicnzOXPmHC4vL1em\nlLJWrlz5i5KSUgUhhCQmJjpMnDjxfOvvHHgniLsTAxMmUU/19fUyXC5XktKmn2a1tbW939HnpqSk\nWHz22Wc/dme8fD6fZWNjk1RfXy/T2TqqqqoUKKWkuLhY3dDQML2wsLCvqOLl8XgS1tbWDxobG6XE\n/VpjersJdzuF9156errRjBkzTvL5fAkZGZmG3bt3Lx0yZMg9ccfVll27dn0kJydX6+/vH9KZ57u7\nu0eXlZWpNDQ0yKxZs2br3LlzD3V1jIzw8HCvR48eDVq3bt13otoGdA8kBAAAIISgUxkAAN5AQgAA\nAEIIEgIAALyBhAAAAIQQJAQAAHgDCQEAAAghhPw/7SeFqF8U6+wAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEXCAYAAACpuuMDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYE+faB+A3QKjsICDVJBIEqiCbCCIqELeKKGhFK7iL\nRdpTra21xx7bU6ELra3tOVW+nqJ1aRVQq7a4ILaoQVQWFVlcimABAyiKgoBBCWG+P+jUJBIImCEB\nf/d1zdVM5s3Mk5HOk3ebYVEURQAAAGg6mg4AAAC0CxIDAADIQWIAAAA5SAwAACAHiQEAAOQgMQAA\ngBwkBlC7oqKioR4eHnmmpqb1cXFxKzQdj7ZoamoyCA4OPmxubl43d+7cvZqOp7uuXr3q7O3tfb6z\ncocPHw4OCwvb0xMxgZpRFIUFy1OLra1tmYGBgdjY2LiBXl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FotqbW3VsbCwqG0vVkLa+inae19PT6+ltbX179r7o0eP+tGv2Wy2\nhH6to6PT2l7/ByF9807DoDloSoJeyc/PLyMhIWE+IW0XdWtr67vGxsaNXC63oqamxqqkpMTBzs6u\ndNy4cWc2bty4hk4MU6ZMOf7dd9/9g77AXr9+/SWxWGzY1eO3trbq/Pzzz3MIaXtAjp+fX4aJiUmD\nnZ1dKV0boSiKVVBQ4NbZvvh8flleXp4HRVEskUjEy8nJGdXZZyiZW4ybmJg00A+lAVAH1BhA67X3\nazg6Ojo6IiJiu7u7e76RkdHDH3/8cTG9bfTo0Vn0L/Bx48adWbduXey4cePOEELIa6+99kNZWRnf\n09Mzl6Io1oABA+788ssvr9Bt9qrGZGRk9DAnJ2fUp59++qGNjU313r175xLSNiLojTfe+N+nn376\noUQiYYeHhye5ubkVKPsehLT1i9jZ2ZU6OztfdXJyujZy5MiL7X132RhlX9Md24aGhuLMzExf9DPA\ns8JN9ABUYGJi0tDQ0GCibF3bLFmyZGdwcPDh0NDQA5qOBXofNCUBqMDU1LTe09Mz9/bt2y8Sot1t\n+vPnz0/IyMjwMzAwaNJ0LNA7ocYAAAByUGMAAAA5SAwAACAHiQEAAOQgMQAAgBwkBgAAkIPEAAAA\ncv4f7PGByn7cLZQAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Maximum power supplied to external system: 0.63 p.u\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.7, Page number: 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "P_rated=2000*746/3 #per phase rated power of motor(W)\n", + "Xsm=1.95 #Synchronous reactance(ohm)\n", + "Vl=2300 #Line to line voltage(V)\n", + "f=60 #Angular frequency(Hz)\n", + "p=30 #No. of poles\n", + "Xsg=2.65 #Synchronous reactance of generator(ohm)\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "Vp=2300/sqrt(3)\n", + "Ip=P_rated/Vp\n", + "Eafm=sqrt(Vp**2+(Ip*Xsm)**2)\n", + "Pm=3*Vp*Eafm/Xsm #Max power delivered to motor(W)\n", + "ws=2*2*pi*f/p\n", + "Tmax=Pm/ws #MAx torque of motor(Nm)\n", + "\n", + "\n", + "#for part (b):\n", + "Eafg=sqrt(Vp**2+(Ip*Xsg)**2)\n", + "Pm2=3*Eafm*Eafg/(Xsg+Xsm) #Max power delivered to motor(W)\n", + "Tmax2=Pm2/ws #Max torque(Nm)\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print\"(a) Max power :\",round(Pm/1000,0),\"kW,3-ph\"\n", + "print\" Max torque :\",round(Tmax/1000,1),\"kNm\"\n", + "print \"(b) Max power :\", round(Pm2/1000,0),\"kW,3-ph\"\n", + "print \" Max torque:\", round(Tmax2/1000,1),\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Max power : 3096.0 kW,3-ph\n", + " Max torque : 123.2 kNm\n", + "(b) Max power : 1639.0 kW,3-ph\n", + " Max torque: 65.2 Nm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.8, Page number: 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "\n", + "#Variable declaration:\n", + "P=45 #Power rated(KVA)\n", + "Va=220 #Terminal voltage(V)\n", + "Pin=45 #Power input to the armature(KVA)\n", + "If=5.50 #field current(A)\n", + "Rf=35.5 #Field winding resistance(ohm)\n", + "Ra=0.0399 #Armature dc resistance(ohm/phase)\n", + "Xal=0.215 #Leakage reactance of motor(ohm)\n", + "pf=0.80 #Lagging power factor \n", + "Pc=1.8 #Core loss(kW)\n", + "Pw=0.91 #Friction & windage losses(kW)\n", + "Ps=0.37 #Stray load loss(kW)\n", + "\n", + "\n", + "#Calculations:\n", + "Ia=P*10**3/(sqrt(3)*Va)\n", + "P1=If**2*Rf/10**3 #Loss in field winding(kW)\n", + "P2=3*Ia**2*Ra/10**3 #Loss in armature(kW)\n", + "Pl=(Pc+Pw+Ps+P1+P2)\n", + "Pi=Pin*pf+P1\n", + "Po=Pi-Pl\n", + "eff=(Po/Pi)*100\n", + "\n", + "#Results:\n", + "print \"Efficiency of the synchronous machine:\",round(eff,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of the synchronous machine: 84.3 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.9, Page number: 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import cmath\n", + "\n", + "#Variable declaration:\n", + "Xd=1 #Direct axis synchronus reactance(p.u)\n", + "Xq=0.60 #Quadrature axis synchronous reactance(p.u)\n", + "Va=1 #Terminal voltage(p.u)\n", + "pf=0.8 #Lagging power factor\n", + "Ia=0.8-1j*math.sin(math.acos(0.8)) #Line current(p.u)\n", + "\n", + "\n", + "#Calculations:\n", + "phy=-math.acos(pf)\n", + "E=Va+1j*Xq*Ia\n", + "delta=cmath.phase(E)\n", + "Id=abs(Ia)*math.sin(delta-phy)*cmath.exp(1j*(-pi/2+delta))\n", + "Iq=abs(Ia)*math.cos(delta-phy)*cmath.exp(1j*delta)\n", + "Eaf=Va+Xd*Id*1j+Xq*Iq*1j\n", + "\n", + "\n", + "#Results:\n", + "print \"Generated voltage:\",round(abs(Eaf),2),\"p.u Volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated voltage: 1.78 p.u Volt\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.11, Page number: 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from pylab import *\n", + "import cmath\n", + "from sympy import *\n", + "\n", + "#Variable declaration:\n", + "P_rated=2000*746 #Rated power of motor(W)\n", + "Xs=1.95 #Synchronous reactance(ohm/phase)\n", + "Xd=1.95 #Direct axis synchronous reactance(ohm/ph)\n", + "Xq=1.40 #Quadrature axis synchronous reactance(ohm/ph)\n", + "pf=1 #Power factor of the machine\n", + "Vl=2300 #Line to line voltage(V)\n", + "\n", + "#Calculatons:\n", + "Va=float(Vl/sqrt(3)) #volt\n", + "Ia=float(P_rated/(Va*3)) #ampere\n", + "E1=Va-1j*Ia*Xq #From phasor diagram\n", + "delta=cmath.phase(E1) #power angle\n", + "Id=Ia*sin(abs(delta)) #direct axis current(A)\n", + "Eaf=abs(E1)+Id*(Xd-Xq)\n", + "r=symbols('r')\n", + "def P(r): #Process for finding maximum power\n", + " return Eaf*Va*sin(r)/Xd + Va**2*(Xd-Xq)*sin(2*r)/(2*Xd*Xq)\n", + "P1=diff(P(r),r)\n", + "#On differentiation,\n", + "#P1 = 1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1)\n", + "l = solve(1023732.58489791*cos(r) + 355250.305250306*(2*(cos(r))**2-1),r)\n", + "P_max = (P(round(l[0],5)))\n", + "\n", + "\n", + "#Results:\n", + "print \"Maximum mechanical power:\",math.ceil(3*P_max/10**3),\"kW,3-phase\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum mechanical power: 3236.0 kW,3-phase\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter6.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter6.ipynb new file mode 100755 index 00000000..1e8c7e97 --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter6.ipynb @@ -0,0 +1,534 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:543f6585f8a1e6c2c290bd192837a35d6ff750409ce379696635948315dd7dcf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Polyphase Induction Machines" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.1, Page number: 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "n=3502 #Speed of motor(rpm)\n", + "Pin=15.7 #Input power(kW)\n", + "Ia=22.6 #Terminal current(A)\n", + "R=0.2 #Stator winding resistance(ohm/ph)\n", + "f=60 #frequency(Hz)\n", + "p=2 #No. of poles\n", + "\n", + "#Calculations:\n", + "Ps=3*Ia**2*R/10**3 #Power dissipated in stator winding(kW)\n", + "Pg=Pin-Ps #Air-gap power(kW)\n", + "ns=120*f/p\n", + "s=(ns-n)/ns\n", + "Pr=s*Pg #Power dissipated in stator(kW)\n", + "\n", + "\n", + "#Results:\n", + "print \"Power dissipated in stator:\",round(Pr*10**3,0),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipated in stator: 419.0 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.2, Page number: 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "import math\n", + "\n", + "\n", + "#Variable declaration:\n", + "R1=0.294 #Resistance of stator(ohm)\n", + "R2=0.144 #Rotor resistance referred to stator(ohm)\n", + "X1=0.503 #Reactance of stator(ohm)\n", + "X2=0.209 #Reactance of rotor referred to stator(ohm)\n", + "Xm=13.25 #Leakage reactance(ohm)\n", + "s=0.02 #slip\n", + "Prot=403 #Friction, windage and core losses(W)\n", + "V=220 #Line-to-line voltage(V) \n", + "p=6 #No. of poles\n", + "fc=60 #frequency(Hz)\n", + "nph=3 #No. of phase\n", + "\n", + "#Calculations:\n", + "Zf=((R2/s+1j*X2)*1j*Xm)/(R2/s+1j*X2+1j*Xm)\n", + "Zin=R1+1j*X1+Zf\n", + "V1=V/math.sqrt(3)\n", + "I1=V1/Zin\n", + "a=cmath.phase(I1)\n", + "pf=math.cos(a)\n", + "ns=120*fc/p\n", + "ws=4*math.pi*fc/p\n", + "n=(1-s)*ns\n", + "wm=(1-s)*ws\n", + "Pg=nph*abs(I1)**2*(Zf.real)\n", + "Psh=(1-s)*Pg-Prot\n", + "Tsh=Psh/wm\n", + "Pin=nph*(V1*I1).real\n", + "eff=Psh/Pin\n", + "\n", + "\n", + "#Results:\n", + "print \"Rotor speed: \",n,\"rpm\"\n", + "print \"Output torque: \",round(Tsh,2),\"Nm\"\n", + "print \"Output power: \",round(Psh,2),\"W\"\n", + "print \"Stator current: \",round(abs(I1),1),\"A\"\n", + "print \"Power factor: \",round(pf,3),\"lagging\"\n", + "print \"Efficiency of motor:\",round(eff*100,0),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rotor speed: 1176.0 rpm\n", + "Output torque: 42.4 Nm\n", + "Output power: 5221.6 W\n", + "Stator current: 18.8 A\n", + "Power factor: 0.846 lagging\n", + "Efficiency of motor: 86.0 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.3, Page number: 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "from math import *\n", + "\n", + "\n", + "#Variable declaration:\n", + "R1=0.294 #Resistance of stator(ohm)\n", + "R2=0.144 #Rotor resistance referred to stator(ohm)\n", + "X1=0.503 #Reactance of stator(ohm)\n", + "X2=0.209 #Reactance of rotor referred to stator(ohm)\n", + "Xm=13.25 #Leakage reactance(ohm)\n", + "s=0.03 #slip\n", + "V=220 #Line-to-line voltage(V) \n", + "p=6 #No. of poles\n", + "fc=60 #frequency(Hz)\n", + "nph=3 #No. of phase\n", + "\n", + "\n", + "#Calculations:\n", + "#for part (a):\n", + "Zf=((R2/s+1j*X2)*1j*Xm)/(R2/s+1j*X2+1j*Xm) #Impedance referred to stator(ohm) \n", + "Zin=R1+1j*X1+Zf #Total input impedance(ohm)\n", + "Z1_eq=1j*Xm*(R1+1j*X1)/(R1+1j*(X1+Xm)) #Total equiv. impedance(ohm)\n", + "R1_eq=Z1_eq.real\n", + "X1_eq=Z1_eq.imag\n", + "V1=V/sqrt(3)\n", + "V1_eq=V1*(1j*Xm/(R1+1j*(X1+Xm)))\n", + "I2=abs(V1_eq)/sqrt((R1_eq+R2/s)**2+(X1_eq+X2)**2)\n", + "ws=4*pi*fc/p\n", + "ns=120*fc/p\n", + "Tmech=nph*I2**2*(R2/s)/ws\n", + "Pmech=nph*round(I2,1)**2*(R2/s)*(1-s)\n", + "\n", + "\n", + "#for part (b):\n", + "SmaxT=R2/sqrt(R1_eq**2+(X1_eq+X2)**2) #slip at max torque\n", + "n_max=(1-SmaxT)*ns\n", + "Tmax=(1/ws)*(0.5*nph*abs(V1_eq)**2)/(R1_eq+sqrt(R1_eq**2+(X1_eq+X2)**2))\n", + "\n", + "#for part (c):\n", + "s1=1 #Slip at starting of motor\n", + "I2_start=abs(V1_eq)/sqrt((R1_eq+R2)**2+(X1_eq+X2)**2)\n", + "Tstart=nph*I2_start**2*R2/ws\n", + "\n", + "\n", + "#Results:\n", + "print \"(a) Load component I2 of stator current:\",round(I2,1),\"A\"\n", + "print \" Electromechanical torque, Tmech :\",round(Tmech,1),\"Nm\"\n", + "print \" Electromechanical power, Pmech :\",round(Pmech,0),\"W\"\n", + "\n", + "print \"(b) Maximum electromechanical torque :\",round(Tmax,0),\"Nm\"\n", + "print \" Speed :\",round(n_max,0),\"rpm\"\n", + "\n", + "print \"(c) Electromechanical starting torque Tstart:\",round(Tstart,1),\"Nm\"\n", + "print \" Stator load current, I2_start :\",round(I2_start,0),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Load component I2 of stator current: 23.9 A\n", + " Electromechanical torque, Tmech : 65.4 Nm\n", + " Electromechanical power, Pmech : 7979.0 W\n", + "(b) Maximum electromechanical torque : 175.0 Nm\n", + " Speed : 970.0 rpm\n", + "(c) Electromechanical starting torque Tstart: 77.6 Nm\n", + " Stator load current, I2_start : 150.0 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.4, Page number: 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "import cmath\n", + "from math import *\n", + "from matplotlib import *\n", + "from pylab import *\n", + "\n", + "#Variable declaration:\n", + "V=230 #line to line voltage(V)\n", + "R1=0.095 #Resistance of stator(ohm)\n", + "X1=0.680 #Reactance of stator(ohm)\n", + "X2=0.672 #Reactance of rotor referred to stator(ohm)\n", + "Xm=18.7 #Leakage reactance(ohm)\n", + "f=60 #frequency(Hz)\n", + "p=4 #No. of poles\n", + "nph=3 #No. of phases\n", + "\n", + "\n", + "#Calculations and Results:\n", + "V1=V/sqrt(3)\n", + "omega=4*pi*f/p\n", + "ns=120*f/p\n", + "Z1eq=1j*Xm*(R1+1j*X1)/(R1+1j*(X1+Xm)) #Stator thevenin equivalent\n", + "R1eq=Z1eq.real\n", + "X1eq=Z1eq.imag\n", + "V1eq=abs(V1*1j*Xm/(R1+1j*(X1+Xm)))\n", + "\n", + "print \"Hence, the required plot is shown below:\"\n", + "for m in range(1,6,1): #Loop over rotor resistance\n", + " if m==1:\n", + " R2=0.1\n", + " elif m==2:\n", + " R2=0.2\n", + " elif m==3:\n", + " R2=0.5\n", + " elif m==4:\n", + " R2=1.0\n", + " else:\n", + " R2=1.5\n", + "\n", + " s=[0]*202\n", + " rpm=[0]*202\n", + " Tmech=[0]*202\n", + " for n in range(1,201,1): #Loop over slip\n", + " s[n-1]=n/200 #slip\n", + " rpm[n-1]=ns*(1-s[n-1]) #rpm\n", + " I2=abs(V1eq/(Z1eq+1j*X2+R2/s[n-1])) #I2\n", + " Tmech[n-1]=nph*I2**2*R2/(s[n-1]*omega) #Electromechanical torque(Nm)\n", + "\n", + " plot(rpm,Tmech)\n", + " title('Electromechanical mechanical torque, Tmech(Nm) vs rpm')\n", + " xlabel(\"rpm\")\n", + " ylabel(\"Tmech\")\n", + " if m==1:\n", + " show()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence, the required plot is shown below:\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEVCAYAAAARjMm4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdcE/f/B/B3mCKyR0CGoAiIqKCCu6Qqaq3bugeO2mod\ntbYqaq1aK+Joa63WWhfUrW2/ilapWkStIGDFCYgoW4jsIbKS+/1xv6upBQKa5AK8no/HPSB3yd07\nlwtv7jMFDMMQAABAXTT4DgAAANQfkgUAAMiFZAEAAHIhWQAAgFxIFgAAIBeSBQAAyNVokkVQUNCM\nfv36XeM7DlURiUTh+/btm62MfRsYGJSkpKQ4vMk+ZsyYEbR69er1CgrpteAcNV/1+Xuwe/fuDz/5\n5JNvlRXDjh07Fvj7+wcqa//qRq2ShYODQ0rLli3LDAwMSrhl0aJF2xW1/5SUFAcNDQ2pVCpVq/dd\nE4FAwAgEAqV0gikpKTFwcHBIeZN9KDM+dYhB2eeosf7zExAQsJL7burp6b3Q0tKq5h536tTpHt/x\ncSorK3U2bNiwatmyZZuJXn7333333d9lnzd16tRD69atW/M6x5gzZ86ew4cPT8nJybFQRMzqTq3+\naAoEAubs2bPDSkpKDLhl+/btixR9HIZhBLVtk0gkmoo+XlNV13kElrLOEV/X6cqVKwO47+aPP/44\nt3fv3hHc43v37nXiI6aanD59emSHDh3ira2ts2TXR0dHe0dGRvbiHr/JPxy6uroV77zzzvmff/55\n+pvG2xB8/bOrVsmiIRISElx9fX0vmpmZ5bm6uiacPHlyHLftxYsXep9++unXDg4OKcbGxoVvvfXW\n1fLy8hZvvfXWVSIiY2PjQkNDw+IbN270DAoKmtGnT5/rS5Ys+cbc3Dx33bp1a4qLiw2nT5/+s6Wl\n5TMHB4eUDRs2rOK+9LLPNzExKXByckqKiIjofeDAgZn29vZpQqFQLHvxVFRU6H722Wdb27Rpk2pl\nZZU9b968XeXl5S247adPnx7p4eFx28jIqMjJySnpwoULg7htKSkpDn379v3L0NCwePDgwX/k5eWZ\ncdvGjRt30traOsvY2LjQx8fnSlxcnBu3bcaMGUHz58/fOWzYsLOGhobFPXv2vPHkyZO23HYNDQ0p\n9/jVc9WvX79rFRUVuvKOUReco7rFx8d3mDdv3q7IyMheBgYGJaampvlEREVFRUb1ue646zQ/P990\nxIgRIUZGRkU9evSIWr169XrubqWmu+hXi+32798/y83NLc7U1DR/yJAhoWlpafb1+Xw5DMMIakqG\nGhoa0l27ds1r3779I0NDw+Ivvvjiy8ePH7fr1atXpLGxceHEiROPVVVVaXPPP3v27DAPD4/bJiYm\nBX369Lkum3TS09PtxowZ85ulpeUzc3Pz3IULF34ve6ylS5duMTU1zW/btu2T0NDQIdz68+fPv+Pj\n43Pl1diWLVu2edWqVRtqej/h4eEiW1vbjC1btiy1tLR81rp166enTp0ade7cuaHOzs6JZmZmeYGB\ngf6yrxGJROG///77uzXtb968ebuWLl26RXbdyJEjT2/btm0xEdGmTZuW29raZhgaGha7uromhIWF\n9a9pPzNmzAiaN2/erqFDh55r1apV6eXLl9+eMWNG0Ny5c38cNGjQBUNDw2KRSBQu+/k19DOoF4Zh\n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P3jjz/OvX//vntQUNCMgoICE37fBcCbQ7IAqEObNm1Svb29o4mINDQ0pBMm\nTDhORDR16tRDf/31V1/uedyEXe7u7vfd3d3vC4VCsY6OTmXbtm2fpKWl2fMTPYDiIFkA1EFfX/95\nTesZhhHIjuukq6tbQcQmFO537rFEItFUfqQAyoVkAVBPUqlU4+TJk+OIiI4cOTK5X79+1/iOCUBV\neJ9WFUCdyd496OvrP4+Ojvb+6quvPhcKheLjx49PqOn56jSSLICiYLgPgHoyMDAoKSkpMeA7DgA+\noBgKoJ5wxwDNGe4sAABALtxZAACAXEgWAAAgF5IFAADIhWQBAAByIVkAAIBcSBYAACDX/wHSCgdC\n0qktCAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEVCAYAAAARjMm4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYVEcXh39L771KR5ogiF2sxIodSyxYsH8ak2g0xhZj\niyXRaIrGFkHsEmPXoGLBLhYQkI4UQXpf2i678/0x2YQYlbYNnfd55tlyd2fO3nv3njtzGocQAgaD\nwWAw3oWCrAVgMBgMhvzDlAWDwWAw6oUpCwaDwWDUC1MWDAaDwagXpiwYDAaDUS9MWTAYDAajXlqM\nsjhw4MC0Xr163Za1HNLC29v75v79+2dKom9tbe3ytLQ02+b0MW3atAOrVq1aLyaRmgTbRx8uDbke\n7Nmz539ffPHFdknJsGPHjk+XLVu2WVL9yxtypSxsbW3TNDQ0KrW1tctF7fPPP/9ZXP2npaXZKigo\nCIVCoVz97jfB4XAIh8ORSBBMeXm5tq2tbVpz+pCkfPIgg6T3UUu9+dm4ceMK0X9TXV29SklJqVb0\n2t3dPVrW8ong8XgqGzZsWPnVV199D/zz3x86dOjFup+bPHny4bVr165uyhizZ8/ed+TIkUn5+fnG\n4pBZ3pGriyaHwyEXLlwYVl5eri1qP//88+fi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80VaaEEEIaqUbbZkEIIaTxoGRB\nCCGkVpQsCCGE1IqSBSEq4HmeUygU9H4hLy168RNSjYyMDLGjo+OVyZMnb3Fzc0vQ1dUtnzdv3kqZ\nTJbYt2/fE3fu3DEFAF9f34h58+at9Pb2vujs7Jxy8eJF7xEjRuyVSqVXP/7448+F/n8Qog6ULAip\nQVpamsM777zzTWJiogxgA7ESExNlvXr1Oq0cXcxxHG9gYPD44sWL3jNmzPhu2LBh+zds2DA9MTFR\ntnnz5ilFRUWthf1fENJwlCwIqUGHDh1u+Pj4RAGASCRSjB07dgcATJw48ZezZ8++qjxOuWCXTCZL\nlMlkiebm5vn6+vql9vb21zMzM22FiZ4Q9aFkQUgNjIyMHla1n+d5rvK8TgYGBo8BllCU/1Y+rqio\n0NF8pIRoFiULQlSkUChEu3btGgMA27Ztm9CjR48/hY6JEG0RfFlVQhqzyncPRkZGD6Oiony++OKL\nj8zNzfN37NgxtqrjG9NMsoSoC033QYiKWrZs+eDBgwcthY6DECFQNRQhKqI7BvIyozsLQgghtaI7\nC0IIIbWiZEEIIaRWlCwIIYTUipIFIYSQWlGyIIQQUitKFoQQQmr1/0ZwGmquOtPsAAAAAElFTkSu\nQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.5, Page number: 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import *\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "nph=3 #No. of phases\n", + "k=0.429 #reactance ratio(X1/X2) from table 6.1,for class C motor\n", + "p=4 #No.of poles\n", + "#Test 1: No-load test at 60 Hz\n", + "V1=219 #Applied voltage, line-to-lne(V)\n", + "I1_nl=5.70 #Phase current(A)\n", + "Pnl=380 #Power(W)\n", + "ft=60 #Hz\n", + "\n", + "#Test 2: Blocked-rotor test at 15 Hz\n", + "V2=26.5 #Applie voltage, line-to-line(V)\n", + "I1_bl=18.57 #Phase current(A)\n", + "Pbl=675 #Power(W)\n", + "fbl=15 #Hz\n", + "\n", + "#Test 3:\n", + "R1=0.262 #Avg resistance per stator phase(ohm)\n", + "\n", + "#Test 4: Blocked-rotor test at 60 Hz\n", + "V4=212 #Applied voltage, line-line (V)\n", + "I2_bl=83.3 #Avg phase current(A)\n", + "Pbl_4=20.1*10**3 #Power(W)\n", + "Tstart=74.2 ##starting torque(Nm)\n", + "\n", + "\n", + "#Calculations:\n", + "#For part (a):\n", + "Prot=Pnl-nph*I1_nl**2*R1\n", + "V1_nl=V1/sqrt(3) #from test 1\n", + "Qnl=sqrt((nph*V1_nl*I1_nl)**2-Pnl**2)\n", + "Xnl=Qnl/(nph*I1_nl**2)\n", + "V1_bl=V2/sqrt(3) #from test 2\n", + "Qbl=sqrt((nph*V1_bl*I1_bl)**2-Pbl**2)\n", + "Xbl=(ft/fbl)*(Qbl/(nph*I1_bl**2))\n", + "X2=symbols('X2')\n", + "fx=k**2*X2**2+(Xbl*(1-k)-Xnl*(1+k))*X2+Xnl*Xbl\n", + "x=solve(fx,X2)\n", + "X2=round(x[0],2) #since X2 must be less than X1\n", + "X1=k*X2\n", + "Xm=Xnl-X1\n", + "Rbl=Pbl/(nph*I1_bl**2)\n", + "R2=(Rbl-R1)*((X2+Xm)/Xm)**2\n", + "\n", + "#for part (b):\n", + "Pg=Pbl_4-nph*I2_bl**2*R1\n", + "ws=4*math.pi*ft/p\n", + "Tstart=Pg/ws\n", + "\n", + "\n", + "#Results:\n", + "print \"(a) N-load rotational loss:\",round(Prot,0),\"W\"\n", + "print \"\\n Equivalent ckt parameters:\\n\"\n", + "print\" R1=\",round(R1,3),\"ohm\",\" R2=\",round(R2,3),\"ohm\"\n", + "print\" X1=\",round(X1,3),\"ohm\",\" X2=\",round(X2,3),\"ohm\",\" Xm=\",round(Xm,2),\"ohm\"\n", + "print \"\\n(b) Starting torque:\",round(Tstart,2),\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) N-load rotational loss: 354.0 W\n", + "\n", + " Equivalent ckt parameters:\n", + "\n", + " R1= 0.262 ohm R2= 0.447 ohm\n", + " X1= 0.635 ohm X2= 1.48 ohm Xm= 21.2 ohm\n", + "\n", + "(b) Starting torque: 77.7 Nm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.6, Page number: 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Xnl=21.8 #ohm\n", + "Xbl=2.01 #ohm\n", + "R_1=0.26 #ohm\n", + "Rbl=0.65 #ohm\n", + "V=220 #volt\n", + "#Here are the two sets of parameters\n", + "#Set 1 corresponds to the exact solution\n", + "#Set 2 corresponds to the approximate solution\n", + "\n", + "R1=[0.262, 0.262] #ohm\n", + "R2=[0.447, 0.444] #ohm\n", + "X1=[0.633, 0.603] #H\n", + "X2=[1.47, 1.41] #H\n", + "Xm=[21.2, 21.2] #H\n", + "nph=3 #No. of phases\n", + "p=4 #No. of poles\n", + "Prot=354 #Rotational losses(Watts)\n", + "\n", + "#Calculations:\n", + "X_1=0.3*Xbl #(ohm) from table 6.1 and X1+X2=Xbl\n", + "X_2=Xbl-X_1 #ohm\n", + "X_m=Xnl-X_1\n", + "R_2=(Rbl-R_1)*((X_2+X_m)/X_m)**2\n", + "\n", + "#Results for part (a):\n", + "print \"(a) The parameters:\\n\"\n", + "print\" R1=\",round(R_1,3),\"ohm\",\" R2=\",round(R_2,3),\"ohm\"\n", + "print\" X1=\",round(X_1,3),\"ohm\",\" X2=\",round(X_2,2),\"ohm\"\n", + "print\" Xm=\",round(X_m,3),\"ohm\"\n", + "\n", + "#Calculations & Results for part (b):\n", + "print \"\\n\\n(b)\"\n", + "#Here is the operating condition\n", + "V1=220/sqrt(3)\n", + "fe=60 #Hz\n", + "rpm=1746\n", + "#Calculate the synchronous speed:\n", + "ns=120*fe/p\n", + "ws=4*pi*fe/p\n", + "s=(ns-rpm)/ns\n", + "wm=ws*(1-s)\n", + "Zgap=[0]*2\n", + "Zin=[0]*2\n", + "Pmech=[0]*2\n", + "I1=[0]*2\n", + "I2=[0]*2\n", + "Tmech=[0]*2\n", + "\n", + "#Calculate stator Thevenin equivalent:\n", + "#Loop over the two motors\n", + "for m in range(0,2,1):\n", + " Zgap = 1j*Xm[m]*(1j*X2[m] + R2[m]/s)/(R2[m]/s + 1j*(Xm[m] + X2[m]))\n", + " Zin=R1[m]+1j*X1[m]+Zgap\n", + " I1=V1/Zin\n", + " I2=I1*(1j*Xm[m])/(R2[m]/s+1j*(Xm[m]+X2[m]))\n", + " Tmech=nph*abs(I2)**2*R2[m]/(s*ws) #Electromechanical torque\n", + " Pmech=wm*Tmech #Electromechanical power\n", + " Pshaft=Pmech - Prot\n", + " if (m==0):\n", + " print \"Exact Solution:\"\n", + " else:\n", + " print \"\\nApproximate Solution:\"\n", + "\n", + "\n", + "\n", + " \n", + " print \"\\tPmech=\",round(Pmech,1),\"W\",\"\\tPshaft =\",round(Pshaft,1), \"W\"\n", + " print \"\\tI1=\", round(abs(I1),1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The parameters:\n", + "\n", + " R1= 0.26 ohm R2= 0.443 ohm\n", + " X1= 0.603 ohm X2= 1.41 ohm\n", + " Xm= 21.197 ohm\n", + "\n", + "\n", + "(b)\n", + "Exact Solution:\n", + "\tPmech= 2820.7 W \tPshaft = 2466.7 W\n", + "\tI1= 10.3 A\n", + "\n", + "Approximate Solution:\n", + "\tPmech= 2850.5 W \tPshaft = 2496.5 W\n", + "\tI1= 10.4 A\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter7.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter7.ipynb new file mode 100755 index 00000000..c5e8eebf --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter7.ipynb @@ -0,0 +1,473 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: DC Machines" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.1, Page number: 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "Vt=[128, 124] #Terminal voltage(V)\n", + "Ea=125 #Generated emf(V)\n", + "Ra=0.02 #Armature resistance(ohm)\n", + "n=3000 #rpm\n", + "\n", + "\n", + "#Calculations:\n", + "#For 128 V\n", + "Ia1=(Vt[0]-Ea)/Ra\n", + "Pin1=Vt[0]*Ia1\n", + "Pe1=Ea*Ia1\n", + "wm=3000*2*pi/60\n", + "Tmech1=Ea*Ia1/wm\n", + "\n", + "#for 124 V\n", + "Ia2=(-Vt[1]+Ea)/Ra\n", + "Pin2=Vt[1]*Ia2\n", + "Pe2=Ea*Ia2\n", + "Tmech2=Ea*Ia2/wm\n", + "\n", + "\n", + "\n", + "#Results:\n", + "print \"(a) Armature current:\",Ia1,\"A\",\"\\n Terminal power:\",Pin1/10**3,\"kW\"\n", + "print \" Electromagnetic power:\",round(Pe1/10**3,2),\"kW\"\n", + "print \" Torque:\",round(Tmech1,1),\"Nm\"\n", + "\n", + "print \"(b) Armature current:\",Ia2,\"A\",\"\\n Terminal power:\",Pin2/10**3,\"kW\"\n", + "print \" Electromagnetic power:\",round(Pe2/10**3,2),\"kW\",\n", + "print \"\\n Torque:\",round(Tmech2,1),\"Nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Armature current: 150.0 A \n", + " Terminal power: 19.2 kW\n", + " Electromagnetic power: 18.75 kW\n", + " Torque: 59.7 Nm\n", + "(b) Armature current: 50.0 A \n", + " Terminal power: 6.2 kW\n", + " Electromagnetic power: 6.25 kW \n", + " Torque: 19.9 Nm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.2, Page number: 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "Vt=123 #terminal voltage(V)\n", + "Pt=21.9 #Terminal power(kW)\n", + "Ra=0.02 #ohm\n", + "Eao=125 #generated voltage(V) at 3000rpm\n", + "no=3000 #rpm\n", + "\n", + "\n", + "#calculations:\n", + "Ia=Pt*10**3/Vt\n", + "Ea=Vt-Ia*Ra\n", + "n=(Ea/Eao)*no\n", + "\n", + "#Results:\n", + "print \"Speed of motor:\",round(n,0),\"rpm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of motor: 2867.0 rpm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.3, Page number: 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "Il=400 #Armature current(A)\n", + "If=4.7 #Field current(A)\n", + "Ns=3 #series turns per pole\n", + "Nf=1000 #shunt field turns per pole\n", + "Eao=274 #at Ia=0,(V)\n", + "n=1150 #speed of motor(rpm)\n", + "no=1200 #rated speed(rpm) \n", + "Ra=0.025 #armature resistance(ohm)\n", + "Rs=0.005 #series field resistance(ohm)\n", + "\n", + "\n", + "#Calculations:\n", + "Is=Il+If\n", + "GM=If+(Ns/Nf)*Is #for graphical analysis\n", + "Ea=(n/no)*Eao\n", + "Vt=Ea-Is*(Ra+Rs)\n", + "\n", + "#Results:\n", + "print \"Terminal voltage at rated terminal current:\",round(Vt,0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Terminal voltage at rated terminal current: 250.0 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.4, Page number: 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "Il=400 #Armature current(A)\n", + "If=4.7 #Field current(A)\n", + "Ns=3 #series turns per pole\n", + "Nf=1000 #shunt field turns per pole\n", + "Eao=261 #at Ia=400 A,(V)\n", + "n=1150 #speed of motor(rpm)\n", + "no=1200 #rated speed(rpm) \n", + "Ra=0.025 #armature resistance(ohm)\n", + "Rs=0.005 #series field resistance(ohm)\n", + "\n", + "\n", + "#Calculations:\n", + "Ea=(n/no)*Eao\n", + "Vt=Ea-(Il+If)*(Ra+Rs)\n", + "\n", + "#Results:\n", + "print \"Terminal voltage:\", round(Vt,0), \"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Terminal voltage: 238.0 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.5, Page number: 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable declaration:\n", + "Il=400 #Armature current(A)\n", + "If=4.7 #Field current(A)\n", + "Ns=3 #series turns per pole\n", + "Nf=1000 #shunt field turns per pole\n", + "Eao=269 #at Ia=400 A,(V)\n", + "n=1150 #speed of motor(rpm)\n", + "no=1200 #rated speed(rpm) \n", + "Ra=0.025 #armature resistance(ohm)\n", + "Rs=0.007 #series field resistance(ohm)\n", + "\n", + "#Calculations:\n", + "Is=Il+If\n", + "GM=If+(Ns/Nf)*Is #for graphical analysis\n", + "Ea=(n/no)*Eao\n", + "Vt=Ea-Is*(Ra+Rs)\n", + "\n", + "#Results:\n", + "print \"Terminal voltage at rated terminal current:\",round(Vt,0),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Terminal voltage at rated terminal current: 245.0 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.6, Page number: 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "\n", + "#Variable declaration:\n", + "Ns=4 #Series field turns\n", + "Nf=1000 #Shunt field turns\n", + "Vt=250 #Full load voltage(V)\n", + "#for part (a):\n", + "Ia=400 #Armature current(A)\n", + "Ra=0.025 #Armature resistance(ohm)\n", + "\n", + "#for part (b):\n", + "Rs=0.005 #Added sries resistance(ohm)\n", + "Vo=250 #No load voltage(V)\n", + "If=5 #field current at full load(A)\n", + "\n", + "\n", + "#Calculations & Results:\n", + "\n", + "#for part (a)\n", + "V1=Ia*Ra\n", + "\n", + "#for part (b):\n", + "Ia1=Ia+If\n", + "Rs,Rd=symbols('Rs Rd') #Rd= diverter resistance(ohm)\n", + "Rp=Rs*Rd/(Rs+Rd) # -------(i)\n", + "Is=Ia1*(Rd/(Rs+Rd))\n", + "Inet=If+(Ns/Nf)*Is\n", + "Ea=Vt+Ia*(Ra+Rp) # -------(ii)\n", + "\n", + "#from equation (ii)\n", + "Rp=Rs(Inet-5.0)/1.62 \n", + "R_d=0.0082 #R_d=Rd(say), using (i)\n", + "print \"(a) The operating terminal voltage = 205 V\", Inet\n", + "print \"(b) Rd =\", R_d,\"ohm\"\n", + "print \"\\tHence, by this process, resistance across the series field\" \n", + "print \"\\t(referred to as a series-field diverter) can be adjusted \"\n", + "print \"\\tto produce the desired performance. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The operating terminal voltage = 205 V 1.62*Rd/(Rd + Rs) + 5\n", + "(b) Rd = 0.0082 ohm\n", + "\tHence, by this process, resistance across the series field\n", + "\t(referred to as a series-field diverter) can be adjusted \n", + "\tto produce the desired performance. \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.7, Page number: 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable declaration:\n", + "Ia=400 #Armature current(A)\n", + "n1=1200 #rpm\n", + "n2=1100 #rpm\n", + "Ra=0.025 #armature resistance(ohm) \n", + "Eo=250 #no load armature voltage(V)\n", + "del_n=1.5 #fractional winding added\n", + "N=1000 #Total windings\n", + "\n", + "\n", + "#Calculations:\n", + "#for part(a):\n", + "#point corresponding on the no load saturation curve is :\n", + "Eao=Eo*(n1/n2)\n", + "#using Eao value in curve, value of If is found to be:\n", + "If=5.90 #Field current(A)\n", + "Ea=Eo-Ia*Ra\n", + "#From Fig. 7.14\n", + "Ea1=261\n", + "n=n1*(Ea/Ea1)\n", + "Pe=Ea*Ia\n", + "Pl=2000 #No load Rotational loss(W)\n", + "Po=(Pe-Pl)/(1+0.01)\n", + "\n", + "#for part (b):\n", + "If1=If+del_n/N\n", + "#From Fig. 7.14 the corresponding value of Ea at 1200 r/min would be 271 V.\n", + "Ea2=271 #volts\n", + "n22=n1*(Ea/Ea2)\n", + "\n", + "\n", + "#Results:\n", + "print \"Part(a):\"\n", + "print \"Required speed =\",round(n),\"r/min\"\n", + "print \"Output power =\", round((Po/746),1),\"hp\"\n", + "print \"\\nPart (b):\"\n", + "print \"Required speed =\",round(n22),\"r/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a):\n", + "Required speed = 1103.0 r/min\n", + "Output power = 124.8 hp\n", + "\n", + "Part (b):\n", + "Required speed = 1063.0 r/min\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.9, Page number: 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "V1=50 #terminal voltage(V)\n", + "Ia=1.25 #Armature current(A)\n", + "Ra=1.03 #Armature resistance(ohm)\n", + "n1=2100 #speed at 50V(rpm)\n", + "V2=48 #terminal voltage at 1700 rpm (V)\n", + "n2=1700 #speed at 48 V(rpm)\n", + "\n", + "\n", + "\n", + "#Calculations:\n", + "#for (a):\n", + "Ea1=V1-Ia*Ra\n", + "wm1=n1*2*pi/60\n", + "Km=round(Ea1/wm1,2)\n", + "\n", + "#for part(b):\n", + "Prot=Ea1*Ia\n", + "\n", + "#for part(c:)\n", + "wm2=n2*2*pi/60\n", + "Ea2=Km*wm2\n", + "Ia2=(V2-Ea2)/Ra\n", + "Pmech=Ea2*Ia2\n", + "Pshaft=Pmech-Prot\n", + "\n", + "#Results:\n", + "print \"(a) Torque constant:\",round(Km,2),\"V/(rad/s)\"\n", + "print \"(b) No-load rotational losses of the motor:\",round(Prot,0),\"W\"\n", + "print \"(c) The power output of the motor:\",round(Pshaft,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Torque constant: 0.22 V/(rad/s)\n", + "(b) No-load rotational losses of the motor: 61.0 W\n", + "(c) The power output of the motor: 275.05 W\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb new file mode 100755 index 00000000..785bba7e --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb @@ -0,0 +1,427 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Variable-Reluctance Machines and Stepping Motors" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.1, Page number: 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from numpy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "R=0.038 #m\n", + "a=b=pi/3 #rad\n", + "g=2.54*10**-4 #m\n", + "D=0.13 #m\n", + "N=100 #turns in both poles\n", + "uo=4*pi*10**-7 #permeability of free space()\n", + "i1=5 #coil current (A)\n", + "\n", + "\n", + "#Calculation:\n", + "Lm=N**2*uo*a*R*D/(2*g)\n", + "#x=symbols('x')\n", + "subplot(2,1,1)\n", + "x=linspace(-180,-120,100)\n", + "L=-(Lm/60)*x-2*Lm\n", + "plot(x,L,'b')\n", + "#grid()\n", + "\n", + "x=linspace(-60,0,100)\n", + "L=(Lm/60)*x+Lm\n", + "plot(x,L,'b')\n", + "grid()\n", + "\n", + "x=linspace(0,60,100)\n", + "L=-(Lm/60)*x+Lm\n", + "plot(x,L,'b')\n", + "grid()\n", + "\n", + "\n", + "x=linspace(120,180,100)\n", + "L=(Lm/60)*x-2*Lm\n", + "plot(x,L)\n", + "annotate('Lm=0.128 H',xy=(-150,0.10))\n", + "annotate('Lmax',xy=(0,Lm+0.005))\n", + "ylabel('L11(theta)')\n", + "xlabel('theta')\n", + "grid()\n", + "\n", + "#part(b)\n", + "subplot(2,1,2)\n", + "x1=linspace(-180,-120,100)\n", + "x2=linspace(-150,-90,100)\n", + "i1=5\n", + "i2=4\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,-Tm1*np.array(dll),'g')\n", + "plot(x2,Tm2*np.array(dll),'b--')\n", + "\n", + "x1=linspace(-60,0,100)\n", + "x2=linspace(-90,-30,100)\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,Tm1*np.array(dll),'g')\n", + "plot(x2,-Tm2*np.array(dll),'b--')\n", + "\n", + "x1=linspace(0,60,100)\n", + "x2=linspace(30,90,100)\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,-Tm1*np.array(dll),'g')\n", + "plot(x2,Tm2*np.array(dll),'b--')\n", + "\n", + "x1=linspace(120,180,100)\n", + "x2=linspace(90,150,100)\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,Tm1*np.array(dll),'g')\n", + "plot(x2,-Tm2*np.array(dll),'b--')\n", + "grid()\n", + "ylim(-3,3)\n", + "annotate('___ i1=I1, i2=0', xy=(110,2.6))\n", + "annotate('---- i1=0, i2=I2', xy=(110,2.2))\n", + "ylabel('Torque [N.m]')\n", + "xlabel('thetam [degrees]')\n", + "\n", + "#Results:\n", + "print \"Lm =\",Lm,\"H\"\n", + "print \"(c)The peak torque =\",round(Tm1,2),\"N.m\"\n", + "print \"\\t(i) The net torque, (at thetam=0) =\", 0, \"N.m\"\n", + "print \"\\t(ii) The net torque, (at thetam=45 deg.) =\", 0, \"N.m\"\n", + "print \"\\t(iii)The net torque, (at thetam=75 deg) =\", round(Tm1,2), \"N.m\"\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Lm =" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 0.127968099059 H\n", + "(c)The peak torque = 1.53 N.m\n", + "\t(i) The net torque, (at thetam=0) = 0 N.m\n", + "\t(ii) The net torque, (at thetam=45 deg.) = 0 N.m\n", + "\t(iii)The net torque, (at thetam=75 deg) = 1.53 N.m\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEPCAYAAABV6CMBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlcFPX/B/DXonmFWiqiAoopciwLLKGGB2FfT9T065Hm\nUaiVqXmkeWUplppn6tfKtCz9epS35sVPS1Y80pDjq3jkibCYeSt4ILDv3x8jG8cu7LKzOzP4fj4e\nPHJmZ2ZfzG77YT+fz7xHRUQExhhjzEJOUgdgjDGmLNxwMMYYswo3HIwxxqzCDQdjjDGrcMPBGGPM\nKtxwMMYYs4pdG47o6GhoNBr4+flhzpw5RR4/e/YsQkNDUalSJSxYsKDI47m5udBqtejatas9YzLG\nGLNCeXsdOCsrC8OGDcOhQ4fg6uqK0NBQtG/fHlqt1rhNzZo1sWTJEmzbts3kMRYvXgw/Pz9kZGTY\nKyZjjDEr2e0bx7Fjx6BWq+Hm5oby5cujT58+2LVrV4FtXFxcEBISgueee67I/nq9Hrt378Y777wD\nvkaRKZGzs7PUERizC7s1HHq9Hh4eHsZld3d36PV6i/f/8MMPMW/ePDg58TAMUyaVSiV1BMbswm6f\nyrb8T7Nz507Url0bWq2Wv22wMiUyMhLDhw9Hq1at0KhRI+h0OgwaNAg+Pj7o16+fcbv3338fTZs2\nRZMmTTBp0iQAwL179+Dj44Nz584BAN58802sWLFCkt+DPePITmJjY6lz587G5blz59KMGTNMbhsV\nFUXz5883Lk+ePJnc3d3J09OT6tSpQ1WqVKGBAwcW2a9mzZoEgH/4h3/4h3+s+GnUqJFNn+92azge\nPXpEDRo0IL1eT0+ePKGQkBCKj483ue20adMKNBz56XQ66tKli8nHALvFF9Xbb78tdQSLcE5xlS9f\nvsi6yMhIWrduHRERXbx4kby8vIyPvfXWW7RlyxY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Nzczw9PeG6LvPz88RiMTKZDNlslkgkwtnZGdlslr6+Pnp7\ne7Ftu2lcy7J87+zX09PD8vIyiUSC7u5u4vG4V+Y4Drlcjq2tLV5fX0kmk2xvb7O+vk46nWZvbw/b\ntolGo7S1tVGr1Rrip1IpLi4uSCQSBINBQqEQBwcHDA4OsrS0xMjICIFAAGMMjuMQCoWYmpry6m9s\nbPgai8iftKy6SIuEw2Hq9fo/139+fvYe+OVymVwu9+lbDK+urhIOh1lYWPjUOPK96FWVSItEIpF3\nfwD8G1dXVwwPDxOPx5mdnaVQKLS4h40WFxfZ39+ns7PzU+PI96MZh4iI+KIZh4iI+KLEISIivihx\niIiIL0ocIiLiixKHiIj4osQhIiK+/ADYIdwwaPRWXQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.3, Page number: 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "n1=4000 #r/min\n", + "R=0.038 #m\n", + "a=b=pi/3 #rad\n", + "g=2.54*10**-4 #m\n", + "D=0.13 #m\n", + "N=100 #turns in both poles\n", + "uo=4*pi*10**-7 #permeability of free space(H/m)\n", + "Ll=0.005 #H\n", + "Vo=100 #phase voltage applied to phase 1.(V)\n", + "\n", + "\n", + "#Calculation:\n", + "wm=n1*pi/30\n", + "Lm=N**2*uo*a*R*D/(2*g)\n", + "thetam=symbols('thetam')\n", + "t=symbols('t')\n", + "#for part (a):\n", + "#for -60<=thetam<=0deg,\n", + "L11=Ll+(Lm/(pi/3))*(thetam+pi/3)\n", + "L111=diff(L11,thetam)\n", + "R1=L111*wm\n", + "#which is nuch greater than resistance R=1.5 ohm\n", + "thetam=-pi/3+wm*t\n", + "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", + "\n", + "#for part (b):\n", + "V2=-200 #applied voltage(V)\n", + "thetam2=symbols('thetam2')\n", + "L12=Ll+(Lm/(pi/3))*(pi/3-thetam2)\n", + "L112=diff(L12,thetam2)\n", + "to=2.5*10**-3 #ms\n", + "thetam2=float(-pi/3+wm*to)\n", + "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", + "i2=(0.25-200*(t-to))/(0.005+51.1*(5*10**-3-t))\n", + "\n", + "\n", + "#Results:\n", + "print \"i1 =\",i1,\"\\t, (where round(16.2934044186179*pi,2) = 51.1 )\"\n", + "print \"\\ni2 =\",i2,\"\\n\"\n", + "\n", + "\n", + "#Calculations & Results:\n", + "#for part (c):\n", + "from __future__ import division\n", + "from pylab import *\n", + "\n", + "Lleak=0.005\n", + "Posintegral=0\n", + "integral=0\n", + "N1=500\n", + "tmax=3.75*10**-3\n", + "t=[0]*503\n", + "thet=[0]*503\n", + "Torque=[0]*503\n", + "deltat = tmax/N1\n", + "thetm=[0]*503\n", + "i=[0]*503\n", + "for n in range(1,N1+2,1):\n", + " t[n-1]=tmax*(n-1)/N1\n", + " thetm[n-1]=-(pi/3)+(400*pi/3)*t[n-1]\n", + " if (thetm[n-1]<=0):\n", + " i[n-1]=100*t[n-1]/(0.005+51.1*t[n-1])\n", + " dld1d1theta = 0.122\n", + " Torque[n-1]=0.5*i[n-1]**2*dld1d1theta\n", + " Posintegral=Posintegral+Torque[n-1]*deltat\n", + " integral=Posintegral\n", + " else:\n", + " i[n-1]=(0.25-200*(t[n-1]-2.5*10**-3))/(0.005+51.1*(5*10**-3-t[n-1]))\n", + " dld11dtheta = -0.122\n", + " Torque[n-1] = 0.5*i[n-1]**2*dld11dtheta\n", + " integral = integral + Torque[n-1]*deltat\n", + "\n", + "print \"\\nPositve torque integral =\",Posintegral, \"[N-m-sec]\"\n", + "print \"\\nTorque integral=\",integral,\"[N-m-sec]\\n\"\n", + "\n", + "plot(1000*np.array(t),i)\n", + "xlabel('time [msec]')\n", + "ylabel('Phase current [A]')\n", + "title('(a) phase-1 current profile')\n", + "grid()\n", + "show()\n", + "plot(1000*np.array(t),Torque)\n", + "xlabel('time [msec]')\n", + "ylabel('Torque [N-m]')\n", + "title('(b) torque profile')\n", + "grid()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "i1 =" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 100*t/(51.1872396234976*t + 0.005) \t, (where round(16.2934044186179*pi,2) = 51.1 )\n", + "\n", + "i2 = (-200*t + 0.75)/(-51.1*t + 0.2605) \n", + "\n", + "\n", + "Positve torque integral = 0.000456384094483 [N-m-sec]\n", + "\n", + "Torque integral= 0.000335463884625 [N-m-sec]\n", + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['fmod', 'cosh', 'sinh', 'trunc', 'tan', 'gamma', 'degrees', 'radians', 'sin', 'expm1', 'ldexp', 'isnan', 'frexp', 'ceil', 'copysign', 'cos', 'tanh', 'fabs', 'sqrt', 'hypot', 'log', 'log10', 'pi', 'log1p', 'floor', 'modf', 'exp', 'isinf', 'e']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVmX+//HXDSqYLKImGlgumQuCgKa2kJiailGOWpa5\n22hOo2U6NtlmX3VmyqVsbLHfmK3uVpqWmQpmWo6j4DblFqhgpogKIsh2/f44w523bDdwn/ucA5/n\n43E/5OY+nPPmUu/Pfa7rXNexKaUUQgghxP94GB1ACCGEuUhhEEII4UAKgxBCCAdSGIQQQjiQw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IgIQPsPefLkSXtWM7SpMznN0KanT59mxIgRKKXIyclh6NCh9O/f31T/153NaYb2vFZR\nF1FV21ImuAkhhHBgmq4kIYQQ5iCFQQghhAMpDEIIIRxIYRBCCOFACoMQQggHUhiEEEI4kMIghBDC\ngRQGUW1cunSJd955x/789OnTPPTQQy4/zowZMwgODmbGjBku33d5evToga+vL3tcdSd6IUoghUFU\nGxcuXODtt9+2P7/ppptYtWqVy49js9l45plnDCkMcXFxdO7c2ZSLHorqQwqDqDb++te/cvz4cSIi\nInj22Wc5ceKEfW2bDz74gAEDBtCvXz9atGjBwoULmTt3Lp07dyYyMtK+5s3hw4fp0aMHHTt2pGvX\nrhw6dKjEY127YMCMGTMYOXIkPXr0oHnz5nz22WdMnTqVsLAwevbsydWrVwH4y1/+QkhICOHh4Tzz\nzDMAnDlzhvvvv5+OHTsSHh7Otm3bAMjMzOSRRx4hJCSEjh07snr1at3aTYhiqnrnICHMIjk52eFu\ncElJSfbnS5YsUbfeeqvKzs5W586dU35+fupf//qXUkqpyZMnqzlz5iillLrzzjvV0aNHlVJK/fjj\nj+quu+4qdpwZM2aouXPn2p+//PLL6p577lGFhYVq3759qm7dumrTpk1KKaX+8Ic/qFWrVqnffvtN\nhYSE2H/m8uXL9te///57pZRSJ06cUK1atVJKKTVp0iQ1depU+/aXLl2yfx0dHa327NlT2WYSolym\nWURPiKpS5Sz71aNHD7y9vfH29qZ+/frExMQAEBoaSmJiIufPn2fv3r0O4xLZ2dnlHtdms9G3b19s\nNhsdOnSgsLCQ3r172/d96tQpGjZsSO3atRk7diwxMTH2e/Nu3rzZYf3+q1evkpGRwZYtW1i7dq39\n+35+fs43hBBVJIVB1BheXl72rz08POzPPTw8KCwsRCnFjTfeWKkbz9epU8e+r9q1azscp7CwEE9P\nT3bt2sWWLVtYs2YNb731Flu3bsVms7F7925q1Sr+X7G8QieEXmSMQVQbdevW5cqVKxX+uaI34EaN\nGnHjjTeyfv16+/dLG2OoqKysLDIzM+nXrx/z5s1j7969APTq1Yt3333Xvl3R8Xr37m1fOhkgIyPD\nJTmEcIYUBlFtBAYGEh4eTvv27Xn22Wex2Wz2q3eu/bro+bVfFz1fsWIF8+bNIywsjA4dOjg96Fva\nvoueZ2Rk0LdvXyIiIoiKiuL1118H4N1337XfAKZDhw4sWLAAgJkzZ3Ly5Enat29PeHg4W7ZsqUSL\nCFE5cj8GISrolVdewcfHhylTphhy/B49ejBv3jwiIyMNOb6o/uSMQYgK8vHx4b333jNsgltSUpLD\nOIYQriZnDEIIIRzIGYMQQggHUhiEEEI4kMIghBDCgRQGIYQQDqQwCCGEcPD/ATnLc2SOfyyJAAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEZCAYAAABrUHmEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X18T/X/x/HHmauJzVwOm29E5WvMtlAUDUmby0KLb0Mh\n1a0U6UcUEl24Kn2TiC4JQ0nmu69cfBRlKXPVBWJjszCGzdXs4vz+ON992myzz+fjfD7nnO11v90+\nt33O53N2znPv8Xnt/X6fC0VVVRUhhBDCAV5GBxBCCGEdUjSEEEI4TIqGEEIIh0nREEII4TApGkII\nIRwmRUMIIYTDpGgI03rppZeYO3cuADabjUaNGpW47tixY/nggw88Fc1y5syZQ61atfD19SU9PR0f\nHx+SkpIAGDp0KK+88oqxAYVlVDQ6gBDFSUtL4/PPP+fw4cMOrT927FjatWvHsGHDqFSpUpH3k5KS\nuOWWW8jJycHLq3z9rXT58mUmTJjAzz//TMuWLQHIzMy0v68oCoqiGBVPWEz5+t8jLOOTTz6hR48e\nVKlSxaH169evT/PmzVm7du1113P1XNacnByXvs8TSst26tQprl69yj//+c8S15FzfIWjpGgIU4qL\ni+Pee+8t8vobb7yBv78/9evXZ/HixYXeCw8PJzY2ttjtderUCQA/Pz98fHyIj49HVVVeeukl/P39\n8f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rnTt3xtvbG29vb/z8\n/IiMjASgVatW7N69mzNnzrBr165C8yCXL18udb+KovDAAw+gKAotW7YkLy+Pbt262bednJxM7dq1\nqVSpEsOGDSMyMtJ+H+eNGzcWuv9CVlYWGRkZbNq0ia+//tr+uq+vr+MNIcQNkqIhBFClShX7cy8v\nL/uyl5cXeXl5qKpK3bp1SUhIcHrblStXtm+rUqVKhfaTl5dHhQoViI+PZ9OmTaxevZp58+axefNm\nFEVh586dVKxY9L9paUVQCHeROQ1RLlStWpVLly45/X35H8516tShbt26rFu3zv56SXMazrp48SKZ\nmZlEREQwe/Zsdu3aBcB9993HBx98YF8vf3/dunWzX9oaICMjQ5ccQjhCioYoF/z9/QkJCaFFixaM\nGzcORVHsRxkVfJ6/XPB5/vKKFSuYPXs2wcHBtGzZ0uEJ6JK2nb+ckZHBAw88QGhoKB07duTtt98G\n4IMPPrDf3Kdly5bMnTsXgNdee41jx47RokULQkJC2LRpkwstIoRr5H4aQujo1VdfpXr16rzwwguG\n7L9z587Mnj2bsLAwQ/Yvyj7paQiho+rVq7Nw4ULDTu5LTEwsNG8ihN6kpyGEEMJh0tMQQgjhMCka\nQgghHCZFQwghhMOkaAghhHCYFA0hhBAO+3+uUuMJ2ejlWAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.4, Page number: 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "\n", + "#Variavle declaration:\n", + "rpm=2500 #rpm of motor\n", + "\n", + "\n", + "#Calculations & Results:\n", + "#For part (a):\n", + "theta=[0]*12\n", + "i=[0]*102\n", + "lambda1=[0]*102\n", + "for m in range(1,11,1):\n", + " theta[m-1]=10*(m-1)\n", + " for n in range(1,102,1):\n", + " i[n-1]=30*(n-1)/100\n", + " lambda1[n-1]=i[n-1]*(0.005+0.09*((90-theta[m-1])/90))*(8/(i[n-1]+8))\n", + "\n", + " \n", + " plot(i,lambda1,'.')\n", + " \n", + " if m==1:\n", + " hold(True)\n", + " \n", + "xlabel('current [A]')\n", + "ylabel('Lambda [Wb]')\n", + "title('Family of lambda-i curves as theta_m varies from 0 to 90 degrees') \n", + "annotate('theta_m=0 deg',xy=(6,0.03))\n", + "annotate('theta_m=0 deg',xy=(8,0.5))\n", + "\n", + "\n", + "#for part (b):\n", + "lambdamax=25*(0.005+0.09*(8/(25+8)))\n", + "AreaWnet=0\n", + "AreaWrec=0\n", + "deli=0.25\n", + "for n in range(1,102,1):\n", + " i[n-1]=25*(n-1)/100\n", + " AreaWnet=AreaWnet + deli*i[n-1]*(0.09)*(8/(i[n-1]+8))\n", + " AreaWrec=AreaWrec + deli*(lambdamax-i[n-1]*(0.005+0.09*(8/(i[n-1]+8))))\n", + "\n", + "Ratio=(AreaWnet+AreaWrec)/AreaWnet\n", + "print \"part (b): Ratio =\", round(Ratio,2)\n", + "\n", + "#for part(b):\n", + "rps=rpm/60\n", + "T=1/rps\n", + "Pphase=2*AreaWnet/T\n", + "Ptot=2*Pphase\n", + "print \"part (c): AreaWnet =\", round(AreaWnet,2),\"Joules\"\n", + "print \"Pphase =\",round(Pphase),\"W\",\"\\tPtot =\",round(Ptot),\"W\\n\"\n", + "plot(AreaWrec=0.7,AreaWnet=25)\n", + "grid()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "part (b): Ratio =" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1.55\n", + "part (c): AreaWnet = 9.91 Joules\n", + "Pphase = 825.0 W \tPtot = 1651.0 W\n", + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['power', 'random', 'fft', 'linalg', 'info']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata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QAjBsWPHcPDgQQDmgaG2tpb5jPb2drS3tzNt2LFjh9MDsaPk5OTg\nrbfeQllZGbKzs5m/O3P/WpDq+vHBPvczZ87EDz/8gM8++wwAsGnTJhw6dMgq9drZcUSr1aKzsxNr\n1qwBAKxZswYdHR249dZb7R4/cOBAqx9mt9xyC7q6uvD222+DEIK9e/di06ZNuPfee+2+v7q6Gleu\nXEFXVxc2btyILVu2MGK7I20JDg4WHBOysrJQWVmJjRs3Ml76oUOHcOzYMea9zz//PNrb23HixAkU\nFRUJGuyFCxdi5cqVOHToEADzD/ZvvvkGTU1NPT4LYp9BCy4bnscffxyXLl1CeHg4brrpJtx22202\nX8jetzdHhvs637FBQUGYPXs2Tp48idmzZ/O2adasWViyZAluu+02hIeH49ChQ/j000+d6t+KFStQ\nVFSEsLAwLFiwAPfccw9ve8X0YfDgwQgJCcGQIUNw11134Y033mAykFavXo3a2lpERETgvvvuQ15e\nHvO+O++8E7feeitGjhyJuLg4+Pn5WYUT7cF34fv06YPi4mLs378fkZGRGDx4MP7v//4PAJCRkYHM\nzEwkJCRgwoQJmDFjhuD1spCTk4MdO3YgOzvbavB57733EB4ejjFjxiAsLAxpaWmoqqoCYA4D3XLL\nLejfvz8mTpyIBx54gDFabHrq+xdffIH4+Hj0798fDz/8MNauXYv+/fvbfE5SUhLuuusuxMbGYuDA\ngUxWG1//+vbti23btmHHjh0YNGgQ1Go1cnNzmQcsOzsbLS0tGDBgADQaDcLDw7FixQrMnj0bAwcO\nxL///W/MnDnT7jXgIuYcCzF37lx89913uO2225iwDuD6/SvF9eOD/T0xMTH49NNP8dxzz0GlUmHp\n0qX4/PPPrbwKR8YRNgEBAdi0aRNWr14NlUqF1atXY9OmTejbt6/d4x944AF8//33CAsLw+zZsxEY\nGIjNmzdDr9cjLCwM9913H1atWoWUlBS77//qq68QFxcHtVqNd955B19//TUThejXr59DbREaEwYO\nHIivv/4aq1atwsCBAxEREYHHH3+ciaisXr0aNTU1GDhwIObOnYu5c+daPZvc83X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MGQ/ewHg+D\nwWAwJhXW42EwGAzGpMIcD4PBYDAmFeZ4GAwGgzGpMMfDYDAYjEmFOR4Gg8FgTCr/D5eEOnUTMe26\nAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter9.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter9.ipynb new file mode 100755 index 00000000..3cdb1b6c --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter9.ipynb @@ -0,0 +1,390 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:934a14335227a49c83c2d399431a59d2d79025dde47942572f3e87ac684c8499" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Single- and Two-Phase Motors" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.1, Page number: 459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "import math\n", + "\n", + "#Variable declaration:\n", + "Zmain=4.5+3.7j #main winding impedance(ohm)\n", + "Zaux=9.5+3.5j #auxilliary winding impedance(ohm)\n", + "f=60 #frequency(Hz)\n", + "\n", + "\n", + "#Calculations:\n", + "phy_main=math.degrees(math.atan(Zmain.imag/Zmain.real))\n", + "phy=phy_main-90\n", + "w=2*pi*60\n", + "Xc=symbols('Xc')\n", + "a=solve((3.5+Xc)/9.5-math.tan(math.radians(float(phy))), Xc)\n", + "C=-1/(w*a[0])\n", + "\n", + "\n", + "#Results:\n", + "print \"The starting capacitance:\",round(float(C)*10**6,0), \"uF\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The starting capacitance: 176.0 uF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.2, Page number: 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath\n", + "from math import *\n", + "\n", + "\n", + "#Variable Declaration:\n", + "R1_m=2.02 #resistance of main winding(ohm)\n", + "X1_m=2.79 #resistance of main\n", + "R2_m= 4.12 #Rotor resistance ref. to stator(ohm)\n", + "X2_m=2.12 #Rotor reactance ref. to stator(ohm)\n", + "Xm=66.8 #Magnetising reactance(ohm)\n", + "s=0.05 #slip\n", + "Pcu=24 #copper loss(W)\n", + "Pw=13 #friction & windage loss(W)\n", + "V=110 #line-to-line voltage(V)\n", + "p=4 #no.of poles\n", + "fc=60 #frequency(Hz)\n", + "\n", + "#Calculations:\n", + "X22=X2_m+Xm\n", + "Q2_m=X22/R2_m\n", + "Rf=(Xm**2/X22)*(1/(s*Q2_m+1/(s*Q2_m)))\n", + "Xf=(X2_m*Xm/X22)+Rf/(s*Q2_m)\n", + "Zf=Rf+1j*Xf #forward field impedance(ohm)\n", + "\n", + "Rb=R2_m*(Xm/X22)**2/(2-s)\n", + "Xb=(X2_m*Xm/X22)+Rb/((2-s)*Q2_m)\n", + "Zb=Rb+1j*Xb #bachward field impedance\n", + "Zt=0.5*(Zf+Zb)+R1_m+1j*X1_m\n", + "I=V/abs(Zt) #Stator current(A)\n", + "pf=cos(cmath.phase(Zt)) #power factor\n", + "Pin=V*I*pf\n", + "Pg_f=I**2*0.5*Rf #power absorbed by forward field(W)\n", + "Pg_b=I**2*0.5*Rb #power absorbed by backward field(W)\n", + "Pmech=(1-s)*(Pg_f-Pg_b)\n", + "Pshaft=Pmech-(Pcu+Pw)\n", + "ws=(2/p)*120*pi\n", + "ns=(120/p)*fc\n", + "n=(1-s)*ns #Rotor speed(rpm)\n", + "wm=(1-s)*ws\n", + "Tshaft=Pshaft/wm #shaft torque(Nm)\n", + "eff=Pshaft/Pin\n", + "\n", + "#Results:\n", + "print \"Stator current:\",round(I),\"A\", \"\\nPower factor:\",round(pf,3)\n", + "print \"Power output:\",round(Pshaft),\"W\", \"\\nSpeed:\",n,\"rpm\"\n", + "print \"Shaft torque:\",round(Tshaft,3),\"Nm\",\"Efficiency\",round(eff*100),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stator current: 4.0 A \n", + "Power factor: 0.621\n", + "Power output: 147.0 W \n", + "Speed: 1710.0 rpm\n", + "Shaft torque: 0.823 Nm Efficiency 60.0 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.3, Page number: 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import cmath\n", + "\n", + "\n", + "#Variable declaration:\n", + "f=60 #freq(Hz)\n", + "omeag=2*pi*f\n", + "s=0.05 #slip\n", + "R1=0.534 #resistance of main winding(ohm)\n", + "X1=2.45\n", + "Xm=70.1\n", + "R2=0.956\n", + "X2=2.96\n", + "Valpha=230\n", + "Vbeta=210*cmath.exp(1j*80*pi/180)\n", + "\n", + "#Calculations:\n", + "Vf = 0.5*(Valpha - 1j*Vbeta)\n", + "Vb = 0.5*(Valpha + 1j*Vbeta)\n", + "Zf=R1+1j*X1+1j*Xm*(R2/s+1j*X2)/(R2/s+1j*(X2+Xm))\n", + "If=Vf/Zf\n", + "Zb=R1+1j*X1+1j*Xm*(R2/(2-s)+1j*X2)/(R2/(2-s)+1j*(X2+Xm))\n", + "Ib = Vb/Zb\n", + "Ialpha=If+Ib\n", + "Ibeta=1j*(If-Ib)\n", + "Pgf=2*((Vf*(If.conjugate())).real-R1*abs(If)**2)\n", + "Pgb=2*((Vb*(Ib.conjugate())).real-R1*abs(Ib)**2)\n", + "Pmech=(1-s)*(Pgf-Pgb)\n", + "\n", + "\n", + "#Results:\n", + "print \"(a) Positive seq components:\", round(Vf.real,1)+1j*round(Vf.imag,1),\"V\"\n", + "print\" Negative seq. components:\", round(Vb.real,1)+1j*round(Vb.imag,1),\"V\"\n", + "\n", + "print\"\\n(b) Positive stator currents:\",round(If.real,1)+1j*round(If.imag,1),\"A\"\n", + "print\" Negative stator currnets:\",round(Ib.real,1)+1j*round(Ib.imag,1),\"A\"\n", + "\n", + "print\"\\n(c) Positive currents:\",round(Ialpha.real,1)+1j*round(Ialpha.imag,1),\"A\"\n", + "print\" Negative currnets:\",round(Ibeta.real,1)+1j*round(Ibeta.imag,1),\"A\"\n", + "\n", + "print \"\\n(d) Power to forward field:\",round(Pgf,0),\"W\"\n", + "print \" Power to backward field:\",round(Pgb,0),\"W\"\n", + "print \" Pmech:\",round(Pmech,0),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Positive seq components: (218.4-18.2j) V\n", + " Negative seq. components: (11.6+18.2j) V\n", + "\n", + "(b) Positive stator currents: (9.3-6.3j) A\n", + " Negative stator currnets: (3.7-1.5j) A\n", + "\n", + "(c) Positive currents: (13-7.8j) A\n", + " Negative currnets: (4.8+5.6j) A\n", + "\n", + "(d) Power to forward field: 4149.0 W\n", + " Power to backward field: 15.0 W\n", + " Pmech: 3928.0 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.5, Page number: 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "import cmath\n", + "from math import *\n", + "from matplotlib.pyplot import *\n", + "\n", + "#Variable declaration:\n", + "Lmain=0.0806 #main winding inductance(H)\n", + "Rmain = 0.58 #main winding resistance(ohm)\n", + "Laux = 0.196 #auxilliary winding inductance(H)\n", + "Raux = 3.37 #auxilliary winding resistance(ohm)\n", + "Lr=4.7*10**-6 #rotor inductance(H)\n", + "Rr=37.6*10**-6 #rotor resistance(ohm)\n", + "Lmain_r=0.588*10**-3 #main inductance ref. to rotor(H)\n", + "Laux_r = 0.909*10**-3 #aux inductance ref. to rotor(H)\n", + "p=2 #poles\n", + "Vo=230 #terminal voltage(V)\n", + "w=120*pi #angular frequency(Hz)\n", + "C=35*10**-6\n", + "Prot=40 #Windage losses(W)\n", + "Pcore=105 #Core loss(W)\n", + "n=3500 #rpm\n", + "\n", + "\n", + "#calculations and Results:\n", + "Xc=-1/(w*C)\n", + "speed=[0]*102\n", + "for cal in range(1,3,1):\n", + " if cal==1:\n", + " mmax=2\n", + " else:\n", + " mmax=102\n", + " for m in range(1,mmax,2):\n", + " if cal==1:\n", + " speed[m-1]=3500\n", + " else:\n", + " speed[m-1]=3599*(m-1)/100\n", + " \n", + " ns=(2/p)*3600\n", + " s=(ns-speed[m-1])/ns\n", + "\n", + "#for part (a):\n", + " Kplus=s*w/(2*(Rr+1j*s*w*Lr))\n", + " Kminus=(2-s)*w/(2*(Rr+1j*(2-s)*w*Lr))\n", + " A1=Lmain-1j*Lmain_r**2*(Kplus+Kminus)\n", + " A2=Lmain_r*Laux_r*(Kplus-Kminus)\n", + " A3=Laux-1j*Laux_r**2*(Kplus+Kminus)\n", + " M=[[0]*2,[0]*2]\n", + " M[0][0]=Rmain + 1j*w*A1\n", + " M[0][1] = 1j*w*A2;\n", + " M[1][0] = -1j*w*A2;\n", + " M[1][1] = Raux + 1j*Xc+ 1j*w*A3\n", + " V=[[Vo],[-Vo]]\n", + " M1=inv(M)\n", + " I=dot(M1,V)\n", + " Imain=I[0][0]\n", + " Iaux=I[1][0]\n", + " Is=Imain-Iaux\n", + " magImain=abs(Imain)\n", + " angleImain=math.degrees(cmath.phase(Imain))\n", + " magIaux=abs (Iaux)\n", + " angleIaux=math.degrees(cmath.phase(Iaux))\n", + " magIs=abs(Is)\n", + " angleIs=math.degrees(cmath.phase(Is))\n", + " Vcap=Iaux*Xc\n", + " magVcap=abs(Vcap)\n", + " \n", + " #for part (b):\n", + " Tmech=[0]*102\n", + " Pshaft=[0]*102\n", + " Tmechl = (Kplus-Kminus).conjugate()\n", + " Tmechl=Tmechl*(Lmain_r**2*Imain*((Imain).conjugate())+Laux_r**2*Iaux*((Iaux).conjugate()))\n", + " Tmech2 = 1j*Lmain_r*Laux_r*((Kplus+Kminus).conjugate())\n", + " Tmech2 = Tmech2*((Imain).conjugate()*Iaux-Imain*((Iaux).conjugate()));\n", + " Tmech[m-1] = (p/2)*(Tmechl+Tmech2).real\n", + " Pshaft=((2/p)*(1-s)*w*Tmech[m-1])-Prot\n", + " \n", + " #for part (c):\n", + " Pmech=[0]*102\n", + " Pmain = (Vo*(Imain.conjugate())).real\n", + " Paux = (-Vo*(Iaux.conjugate())).real\n", + " Pin = Pmain+Paux+Pcore\n", + " eta = Pshaft/Pin;\n", + " if cal==1:\n", + " print \"part (a):\"\n", + " print \"\\nImain=\",round(magImain,1),\"A at an angle\",round(angleImain,1),\"degrees\"\n", + " print \"\\nImain=\",round(magIaux,1),\"A at an angle\",round(angleIaux,1),\"degrees\"\n", + " print \"\\nImain=\",round(magIs,1),\"A at an angle\",round(angleIs,1),\"degrees\"\n", + " print \"\\nVcap=\",round(magVcap,0),\"V\"\n", + " print \"\\npart (b):\"\n", + " print \"\\nTmech=\",round(Tmech[0],2),\"Nm\"\n", + " print \"\\nPshaft=\",round(Pshaft),\"W\"\n", + " print \"\\npart (c):\"\n", + " print \"\\nPmain=\",round(Pmain,0),\"W\"\n", + " print \"\\nPaux=\",round(Paux,0),\"W\"\n", + " print \"\\nPin=\",round(Pin,0),\"W\"\n", + " print \"\\nEfficiency=\",round(eta*100,1),\"%\"\n", + " else:\n", + " \n", + " plot(speed,Tmech,'g.')\n", + " xlabel('speed (rpm)')\n", + " ylabel('Tmech (Nm)')\n", + " title('Electromagnetic torque vs speed')\n", + " show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a):\n", + "\n", + "Imain= 15.9 A at an angle -37.6 degrees\n", + "\n", + "Imain= 5.2 A at an angle -150.8 degrees\n", + "\n", + "Imain= 18.5 A at an angle -22.7 degrees\n", + "\n", + "Vcap= 394.0 V\n", + "\n", + "part (b):\n", + "\n", + "Tmech= 9.75 Nm\n", + "\n", + "Pshaft= 3532.0 W\n", + "\n", + "part (c):\n", + "\n", + "Pmain= 2893.0 W\n", + "\n", + "Paux= 1043.0 W\n", + "\n", + "Pin= 4041.0 W\n", + "\n", + "Efficiency= 87.4 %\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEXCAYAAABGeIg9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVNX7B/BzBwYRGWQRRgRhWJUdXMBcxxTD3CVUTCRE\n6WupuaZWJmYqmWZq+s0dtXCrVCxB00TNBUJBBFQEGRAdERGUfZm5vz/8Xn8Tw+7s83m/Xvclc+4s\nzxyEh3Oec+5QNE0TAAAASSxlBwAAAKoHyQEAAKQgOQAAgBQkBwAAkILkAAAAUpAcAABACpKDBoiO\njv5g0KBBl5Udhzp79913Tx88eDBE2XFAy/D/XTGQHNQEj8cTGBgYVHI4nDLmmDdv3hZZPb9AIOCx\nWCyxWCzW+P8TkZGRkSEhIQcl206fPv1uw7bWYLFY4gcPHtjLLjoA1aCr7ACgdSiKon///ffRb7/9\n9l/yfB2apqmmzolEIh0dHR2RPF9fHTXXZ82pr6/X1dXVrZd1PACyoPF/JWqju3fv9vT39//TzMys\nuGfPnnePHTsWxJyrqqrquGjRoo08Hk9gbGxcOnjw4EvV1dX6gwcPvkQIIcbGxqVGRkYvr1+/3i86\nOvqDAQMGXFm4cOF3Xbp0ebZq1aqVL1++NJo+ffoBCwuLpzweT7BmzZrPmV+Okvc3MTEpcXR0zL56\n9Wr/ffv2hdnY2ORzudzCAwcOTGdi+eOPP0b5+PikdO7c+YWNjU3+qlWrVkq+jwMH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\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture1.png b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture1.png new file mode 100755 index 00000000..1196a40b Binary files /dev/null and b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture1.png differ diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture2.png b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture2.png new file mode 100755 index 00000000..56b278d5 Binary files /dev/null and b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture2.png differ diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture3.png b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture3.png new file mode 100755 index 00000000..a8df3c9e Binary files /dev/null and b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture3.png differ diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png old mode 100644 new mode 100755 diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png old mode 100644 new mode 100755 diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png old mode 100644 new mode 100755 diff --git a/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt b/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png old mode 100644 new mode 100755 diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt new file mode 100755 index 00000000..4053b71e --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt @@ -0,0 +1,10 @@ +Contributed By: Amit Raval +Course: bscit +College/Institute/Organization: Saurashtra University +Department/Designation: Bsc. IT +Book Title: Electronic Communications: Principles and Systems +Author: W. D. Stanley & J. M. Jeffords +Publisher: Cengage Learning, New Delhi +Year of publication: 2009 +Isbn: 9788131503546 +Edition: 2 \ No newline at end of file diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png old mode 100644 new mode 100755 diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/1.png b/Electronic_Devices_by_K._C._Nandi/screenshots/1.png old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/2.png b/Electronic_Devices_by_K._C._Nandi/screenshots/2.png old mode 100644 new mode 100755 diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/5.png b/Electronic_Devices_by_K._C._Nandi/screenshots/5.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png old mode 100644 new mode 100755 diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png old mode 100644 new mode 100755 diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png old mode 100644 new mode 100755 diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png old mode 100644 new mode 100755 diff --git a/Engineering_Economics/Chapter1.ipynb b/Engineering_Economics/Chapter1.ipynb deleted file mode 100755 index 64198a89..00000000 --- a/Engineering_Economics/Chapter1.ipynb +++ /dev/null @@ -1,83 +0,0 @@ -{ - "metadata": { - "name": "EE-1" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": "Introduction" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 1.1 Page 10" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initialisation of Variable\nFC=2000000.0;#in Rs\nv=100.0;#in Rs\ns=200.0;#in Rs\nQ=60000.0;#in units\n\n#Part a \n# calculation\nBEQ=FC/(s-v);#in units\n\n#result\nprint \"Break even quantity in units : \",round(BEQ,3)\n\n#Part b \n#calculation\nBES=FC*s/(s-v);#in Rs\n\nprint \"Break even sales in Rs. : \",round(BES,3)\n\n#Part c \n#calculation\nCon=s*Q-v*Q;#in Rs\nMos=Q*s-BES;#in Rs\n\n#result\nprint \"Contribution in units : \",round(Con,3)\nprint \"Margin of safety in Rs. : \",round(Mos,3)", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Break even quantity in units : 20000.0\nBreak even sales in Rs. : 4000000.0\nContribution in units : 6000000.0\nMargin of safety in Rs. : 8000000.0\n" - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 1.2,Page 12" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initialisation of variable\nFC=25000.0;#in Rs\nv=45000.0;#in Rs\ns=120000.0;#in Rs\n\n#Part a \n#calculation\nCon=s-v;#in Rs\n\n#result\nprint \"Contribution in Rs \",round(Con,3)\n\n#Part b \n#calculation\nProf=Con-FC;#in Rs\n\n#result\nprint \"Profit in Rs \",round(Prof,3);\n\n#Part c \n#calculation\nPVratio=Con*100.0/s;#in %\nBEP=FC*100.0/PVratio;#in Rs\n\n#result\nprint \"BEP in Rs \", round(BEP,3)\n\n#Part d \n#calculoation\nMS=Prof*100/PVratio;#in Rs\n\n#result\nprint\"M.S. in Rs \", round(MS,3)", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Contribution in Rs 75000.0\nProfit in Rs 50000.0\nBEP in Rs 40000.0\nM.S. in Rs 80000.0\n" - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 1.3 Page 13" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initialisation of variable\nFC=15000.0;#in Rs\nv=35000.0;#in Rs\ns=80000.0;#in Rs\n\n#Part a \n#calculation\nCon=s-v;#in Rs\n\n#result\nprint \"Contribution in Rs\", round(Con,3);\n\n#Part b \n#calcualtion\nProf=Con-FC;#in Rs\n\n#result\nprint \"Profit in Rs \", round(Prof,3)\n\n#Part c \n#calculation\nPVratio=Con*100/s;\nBEP=FC*100/PVratio;#in Rs\n\n#result\nprint \"BEP in Rs \",round(BEP,3)\n\n#Part d \n#calculation\nMS=Prof*100/PVratio;#in Rs\n\nprint \"M.S. in Rs\",round(MS,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Contribution in Rs 45000.0\nProfit in Rs 30000.0\nBEP in Rs 26666.667\nM.S. in Rs 53333.333\n" - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter10.ipynb b/Engineering_Economics/Chapter10.ipynb deleted file mode 100755 index bc34bb84..00000000 --- a/Engineering_Economics/Chapter10.ipynb +++ /dev/null @@ -1,357 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:28b0077be1a0d41b0cc471c0e34331f1edde6c138991b53632e2c3b3cb0de57c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Evaluation of Public Alternatives" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1 Page 138" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "Ii=4000000.0;#in Rs.\n", - "AM=150000.0;#in Rs.\n", - "AFS=600000.0;#in Rs.\n", - "Einc=50000.0;#in Rs.\n", - "i=12.0;#in % per annum\n", - "n=15.0;#in years\n", - "\n", - "#calculation\n", - "Cp=AM*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n", - "TPW=Ii+Cp;#in RS\n", - "\n", - "#result\n", - "print \"Total present worth of costs in RS. : \",round(TPW,3);\n", - "\n", - "#Total present worth of fuel savings:\n", - "AI=600000.0;#in Rs.\n", - "G=50000.0;#in Rs.\n", - "i=12.0;#in % per annum\n", - "n=15.0;#in years\n", - "\n", - "#calculation\n", - "A=AI+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100);#in RS\n", - "Bp=A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs.\n", - "BCratio=Bp/(Ii+Cp);#unitless\n", - "\n", - "#result\n", - "print \"Present worth of fuel savings in Rs. : \",round(Bp,3);\n", - "print \"BCratio : \",round(BCratio,3);\n", - "print\"Since BC ratio is more than 1, the construction of the bridge across the river is justified.\";\n", - "print\"answers are slightly different from the book due to approximation\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total present worth of costs in RS. : 5021629.673\n", - "Present worth of fuel savings in Rs. : 5782527.265\n", - "BCratio : 1.152\n", - "Since BC ratio is more than 1, the construction of the bridge across the river is justified.\n", - "answers are slightly different from the book due to approximation\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2 Page 139" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "Ic=80000000.0;#in Rs.\n", - "Aps=6000000.0;#in Rs.\n", - "Afs=3000000.0;#in Rs.\n", - "Aib=5000000.0;#in Rs.\n", - "Arb=2000000.0;#in Rs.\n", - "Amc=3000000.0;#in Rs.\n", - "i=12.0;#in % per annum\n", - "n=50.0;#in years\n", - "\n", - "#calculation\n", - "TAB=Afs+Aib+Arb;#in Rs.\n", - "PW_B=TAB*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n", - "\n", - "#result\n", - "print \"Total present worth of benefits in RS. : \",round(PW_B,3);\n", - "\n", - "#Present worth of costs:\n", - "PW_C=Ic+Amc*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)-Aps*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "BCratio=PW_B/PW_C;#unitless\n", - "\n", - "#result\n", - "print \"Present worth of costs in Rs. : \",round(PW_C,3);\n", - "print \"BCratio : \",round(BCratio,3);\n", - "print \"Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total present worth of benefits in RS. : 83044984.884\n", - "Present worth of costs in Rs. : 55086504.535\n", - "BCratio : 1.508\n", - "Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.3 Page 140" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#alternative 1\n", - "P=3000000.0;#in Rs.\n", - "B=900000.0;#in Rs.\n", - "i=10.0;#in % per annum\n", - "n=5.0;#in years\n", - "\n", - "#calculation\n", - "AE1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n", - "BCratio=B/AE1;#unitless\n", - "\n", - "#result\n", - "print \"Annual equivalent of initial cost in Rs. : \",round(AE1,3);\n", - "print \"BCratio : \",round(BCratio,3);\n", - "\n", - "#Alternative A2 : \n", - "P=6000000.0;#in Rs.\n", - "B=1500000.0;#in Rs.\n", - "i=10.0;#in % per annum\n", - "n=7.0;#in years\n", - "\n", - "#calculation\n", - "AE2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n", - "BCratio=B/AE2;#unitless\n", - "\n", - "#result\n", - "print \"Annual equivalent of initial cost in Rs. : \",round(AE2,3);\n", - "print \"BCratio : \",round(BCratio,3);\n", - "print \"The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual equivalent of initial cost in Rs. : 791392.442\n", - "BCratio : 1.137\n", - "Annual equivalent of initial cost in Rs. : 1232432.998\n", - "BCratio : 1.217\n", - "The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4 Page 141" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#cost of the state\n", - "n=20.0;#in years\n", - "P=2500000000.0;#in Rs.\n", - "Agt=10000000.0;#in Rs.\n", - "Ai=1000000.0;#in Rs.\n", - "Com=48000.0;#in Rs./year/employee\n", - "C1=Com*300;#in Rs.\n", - "i=10.0;#in % per annum\n", - "\n", - "#calculation\n", - "C2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n", - "CA=C2+C1;#in Rs\n", - "\n", - "#result\n", - "print \"Annual equivalent initial cost in Rs. : \",round(C2,3);\n", - "print \"Total Annual equivalent cost of the project in Rs. : \",round(CA,3);\n", - "\n", - "#Benefit to the state : \n", - "W=30000000.0;#in Rs.\n", - "A1=W*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs.\n", - "Agpy=10000000.0;#in ton/year\n", - "A2=Agpy*(30-10);#in Rs.\n", - "AvgAI=1000000.0;#in tons Km.\n", - "G=20000000.0;#in Rs.\n", - "\n", - "#calculation\n", - "A3=A2+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in Rs.\n", - "BA=A1+A3;#in Rs\n", - "BCratio=BA/CA;#unitless\n", - "print \"Annual equivalent average of transport cost saving in Rs. : \",round(A3,3);\n", - "print \"Total annual equivalent benefits to the state : \",round(BA,3);\n", - "print \"BCratio : \",round(BCratio,3);\n", - "print \"The benefit cost ratio is more than 1,the project is justified.\";\n", - "print \"the slight error in the answer of the book is due to approximation error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual equivalent initial cost in Rs. : 293649061.931\n", - "Total Annual equivalent cost of the project in Rs. : 308049061.931\n", - "Annual equivalent average of transport cost saving in Rs. : 330161500.91\n", - "Total annual equivalent benefits to the state : 333685289.653\n", - "BCratio : 1.083\n", - "The benefit cost ratio is more than 1,the project is justified.\n", - "the slight error in the answer of the book is due to approximation error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5 Page 143" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#project A\n", - "i=9.0;#% per annum\n", - "n=50.0;#in years\n", - "P_A=150000000.0;#in RS.\n", - "Fcs_A=2500000;#in Rs.\n", - "Ib_A=3500000;#in Rs.\n", - "Rb_A=1000000;#in RS.\n", - "OMC_A=2000000.0;#in Rs.\n", - "Psy_A=10000000.0;#in Rs.\n", - "\n", - "#calculation\n", - "AE_A=P_A*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n", - "Cpy_A=AE_A+OMC_A-Psy_A;#in Rs.\n", - "Bpy_A=Fcs_A+Ib_A+Rb_A;#in Rs.\n", - "BCratio_A=Bpy_A/Cpy_A;#unitless\n", - "\n", - "#result\n", - "print \"Costs/year : \",round(Cpy_A,3);\n", - "print \"Benefits/year : \",round(Bpy_A,3);\n", - "print \"BC Ratio of project A : \",round(BCratio_A,3)\n", - "\n", - "\n", - "#Project B : \n", - "P_B=250000000.0;#in Rs.\n", - "\n", - "OMC_B=2500000.0;#in Rs.\n", - "Psy_B=12000000.0;#in Rs.\n", - "Fcs_B=3500000.0;#in Rs.\n", - "Ib_B=4500000.0;#in Rs.\n", - "Rb_B=2000000.0;#in RS.\n", - "AE_B=P_B*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n", - "Cpy_B=AE_B+OMC_B-Psy_B;#in Rs.\n", - "Bpy_B=Fcs_B+Ib_B+Rb_B;#in Rs.\n", - "BCratio_B=Bpy_B/Cpy_B;#unitless\n", - "\n", - "#result\n", - "print \"Costs/year : \",round(Cpy_B,3);\n", - "print \"Benefits/year : \",round(Bpy_B,3);\n", - "print \"BC Ratio of project B : \",round(BCratio_B,3)\n", - "\n", - "#Project C : \n", - "P_C=400000000.0;#in Rs.\n", - "OMC_C=3500000.0;#in Rs.\n", - "Psy_C=18000000.0;#in Rs.\n", - "Fcs_C=5000000.0;#in Rs.\n", - "Ib_C=6000000.0;#in Rs.\n", - "Rb_C=3500000.0;#in RS.\n", - "AE_C=P_C*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n", - "Bpy_C=Fcs_C+Ib_C+Rb_C;#in Rs.\n", - "Cpy_C=AE_C+OMC_C-Psy_C;#in Rs.\n", - "BCratio_C=Bpy_C/Cpy_C;#unitless\n", - "\n", - "#result\n", - "print \"Costs/year : \",round(Cpy_C,3);\n", - "print \"Benefits/year : \",round(Bpy_C,3);\n", - "print \"BC Ratio of project C : \",round(BCratio_C,3)\n", - "print\"From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Costs/year : 5684030.212\n", - "Benefits/year : 7000000.0\n", - "BC Ratio of project A : 1.232\n", - "Costs/year : 13306717.021\n", - "Benefits/year : 10000000.0\n", - "BC Ratio of project B : 0.752\n", - "Costs/year : 21990747.233\n", - "Benefits/year : 14500000.0\n", - "BC Ratio of project C : 0.659\n", - "From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter11.ipynb b/Engineering_Economics/Chapter11.ipynb deleted file mode 100755 index 55cbf9b2..00000000 --- a/Engineering_Economics/Chapter11.ipynb +++ /dev/null @@ -1,306 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:72b2e09b74af58b464a4895e1776dc966d9cb12318da78fc7aa16f78becf8696" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Inflation Adjusted Decisions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1 Page 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "print \"Few steps are as follows : \";\n", - "print \"Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\";\n", - "print \"Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\";\n", - "print \"Formula : P*(1+IR)^n\";\n", - "P=24000.0;#in Rs.\n", - "IR=9.0;#in % per year\n", - "Age=61.0;#in years\n", - "for n in range(21,31) :\n", - " IV=P*(1+IR/100)**n;#in Rs\n", - " print \"Age in years : \",Age,\". \"\"Inflated value of Rs. 24000 at end of year : \",n,\" in Rs. \",round(IV);\n", - " Age=Age+1;#in Years\n", - "\n", - "PW=0;#For initialising\n", - "n=21.0;#in years\n", - "for m in range(10) :\n", - " A=P*(1+IR/100)**n;#in Rs\n", - " n=n+1;\n", - " i=15.0;#in % per year\n", - " PW=PW+A/(1+i/100)**(m+1);\n", - "\n", - "#result\n", - "print \"Present equivalent of withdrawls in Rs. : \",round(PW,3);\n", - "\n", - "#The annual equivalent amount :\n", - "i=15.0;#in % per year\n", - "n=20.0;#in years\n", - "#Formula : (A/F,i,n) : (i/100)/(((1+i/100)^n)-1) \n", - "A=PW*(i/100)/(((1+i/100)**n)-1);#in Rs.\n", - "print \"The annual equivalent amount in Rs. : \",round(A,3);\n", - "print\"RECOMMENDATION : The person has to invest an amount of Rs. \",round(A,3),\" at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\"; \n", - "print \"slight erorr in the answer is due to approximation error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Few steps are as follows : \n", - "Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\n", - "Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\n", - "Formula : P*(1+IR)^n\n", - "Age in years : 61.0 . Inflated value of Rs. 24000 at end of year : 21 in Rs. 146611.0\n", - "Age in years : 62.0 . Inflated value of Rs. 24000 at end of year : 22 in Rs. 159806.0\n", - "Age in years : 63.0 . Inflated value of Rs. 24000 at end of year : 23 in Rs. 174189.0\n", - "Age in years : 64.0 . Inflated value of Rs. 24000 at end of year : 24 in Rs. 189866.0\n", - "Age in years : 65.0 . Inflated value of Rs. 24000 at end of year : 25 in Rs. 206954.0\n", - "Age in years : 66.0 . Inflated value of Rs. 24000 at end of year : 26 in Rs. 225580.0\n", - "Age in years : 67.0 . Inflated value of Rs. 24000 at end of year : 27 in Rs. 245882.0\n", - "Age in years : 68.0 . Inflated value of Rs. 24000 at end of year : 28 in Rs. 268011.0\n", - "Age in years : 69.0 . Inflated value of Rs. 24000 at end of year : 29 in Rs. 292132.0\n", - "Age in years : 70.0 . Inflated value of Rs. 24000 at end of year : 30 in Rs. 318424.0\n", - "Present equivalent of withdrawls in Rs. : 1013631.794\n", - "The annual equivalent amount in Rs. : 9894.537\n", - "RECOMMENDATION : The person has to invest an amount of Rs. 9894.537 at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\n", - "slight erorr in the answer is due to approximation error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2 Page 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "print\"The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\";\n", - "print\"End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\";\n", - "i=20.0;#in per year\n", - "Cum=0.0;#initialising\n", - "Op_cost=40000.0;#in RS.\n", - "Main_cost=60000.0;#in Rs.\n", - "OpMain=Op_cost+Main_cost;#in Rs.\n", - "S=400000.0;#in Rs.\n", - "for n in range (1,16) :\n", - " PF=1/((1+i/100)**n);\n", - " PW=OpMain*PF;#in Rs.\n", - " Cum=Cum+PW\n", - " PW_S=PF*S;#in RS.\n", - " TPW=500000.0+Cum-PW_S;#in Rs.\n", - " AP=((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n", - " AEM=TPW*AP;#in RS\n", - " print \" \",n,\" \",Op_cost,\" \",Main_cost,\" \",OpMain,\" \",PF,\" \",PW,\" \",Cum,\" \",S,\" \",PW_S,\" \",TPW,\" \",AP,\" \",AEM;\n", - " Op_cost=Op_cost+5000.0;#in Rs.\n", - " Main_cost=Main_cost+6000.0;#in Rs.\n", - " S=S-50000.0;#in Rs.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\n", - "End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\n", - " 1 40000.0 60000.0 100000.0 0.833333333333 83333.3333333 83333.3333333 400000.0 333333.333333 250000.0 1.2 300000.0\n", - " 2 45000.0 66000.0 100000.0 0.694444444444 69444.4444444 152777.777778 350000.0 243055.555556 409722.222222 0.654545454545 268181.818182\n", - " 3 50000.0 72000.0 100000.0 0.578703703704 57870.3703704 210648.148148 300000.0 173611.111111 537037.037037 0.474725274725 254945.054945\n", - " 4 55000.0 78000.0 100000.0 0.48225308642 48225.308642 258873.45679 250000.0 120563.271605 638310.185185 0.386289120715 246572.280179\n", - " 5 60000.0 84000.0 100000.0 0.401877572016 40187.7572016 299061.213992 200000.0 80375.5144033 718685.699588 0.33437970329 240313.910987\n", - " 6 65000.0 90000.0 100000.0 0.33489797668 33489.797668 332551.01166 150000.0 50234.6965021 782316.315158 0.300705745867 235247.011053\n", - " 7 70000.0 96000.0 100000.0 0.279081647234 27908.1647234 360459.176383 100000.0 27908.1647234 832551.01166 0.277423926347 230969.570539\n", - " 8 75000.0 102000.0 100000.0 0.232568039361 23256.8039361 383715.980319 50000.0 11628.4019681 872087.578351 0.260609422409 227274.240084\n", - " 9 80000.0 108000.0 100000.0 0.193806699468 19380.6699468 403096.650266 0.0 0.0 903096.650266 0.248079461672 224039.730836\n", - " 10 85000.0 114000.0 100000.0 0.16150558289 16150.558289 419247.208555 -50000.0 -8075.27914449 927322.4877 0.238522756883 221187.516286\n", - " 11 90000.0 120000.0 100000.0 0.134587985742 13458.7985742 432706.007129 -100000.0 -13458.7985742 946164.805703 0.231103794152 218662.276491\n", - " 12 95000.0 126000.0 100000.0 0.112156654785 11215.6654785 443921.672608 -150000.0 -16823.4982177 960745.170825 0.225264964904 216422.227187\n", - " 13 100000.0 132000.0 100000.0 0.0934638789872 9346.38789872 453268.060506 -200000.0 -18692.7757974 971960.836304 0.220620001083 214434.000758\n", - " 14 105000.0 138000.0 100000.0 0.0778865658226 7788.65658226 461056.717089 -250000.0 -19471.6414557 980528.358544 0.216893055222 212669.791417\n", - " 15 110000.0 144000.0 100000.0 0.0649054715189 6490.54715189 467547.264241 -300000.0 -19471.6414557 987018.905696 0.213882119838 211105.69587\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3 Page 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "IR=5.0;#in % per year\n", - "i=15.0;#in % per year\n", - "#Machine X :\n", - "Ppx=1500000.0;#in Rs.\n", - "n=7.0;#in years\n", - "S=200000.0;#in Rs.\n", - "AMC=300000.0;#in Rs.\n", - "print \"End of year AMC InflationFactor InflatedAmount P/F PW\";\n", - "Pw=0;#For initialising\n", - "for n in range (1,8) :\n", - " FP=(1+IR/100)**n\n", - " IA=AMC*FP;#in Rs.\n", - " PF=1/((1+i/100)**n);\n", - " PW=IA*PF;#in Rs.\n", - " Pw=Pw+PW;#in Rs.\n", - " print\" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n", - "\n", - "print \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\n", - "PWX=Ppx+Pw-S*1/((1+i/100)**n);\n", - "print \"Present worth of machine X in Rs. : \",round(PWX,3);\n", - "\n", - "#Machine Y\n", - "\n", - "Ppy=2000000.0;#in Rs.\n", - "n=7.0;#in years\n", - "S=300000.0;#in Rs.\n", - "AMC=250000.0;#in Rs.\n", - "print \"End of year AMC InflationFactor InflatedAmount P/F PW\";\n", - "Pw=0;#For initialising\n", - "for n in range (1,8) :\n", - " FP=(1+IR/100)**n\n", - " IA=AMC*FP;#in Rs.\n", - " PF=1/((1+i/100)**n);\n", - " PW=IA*PF;#in Rs.\n", - " Pw=Pw+PW;#in Rs.\n", - " print \" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n", - "\n", - "PWY=Ppy+Pw-S*1/((1+i/100)**n);\n", - "\n", - "#result\n", - "print \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\n", - "print \"Present worth of machine Y in Rs. : \",round(PWY,3);\n", - "print \"Since the present worth of Machine X is less than Machine Y, select Machine X\"\n", - "print \" Calculations are not accurate in the book\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "End of year AMC InflationFactor InflatedAmount P/F PW\n", - " 1 300000.0 1.05 315000.0 0.869565217391 273913.043478\n", - " 2 300000.0 1.1025 330750.0 0.756143667297 250094.517958\n", - " 3 300000.0 1.157625 347287.5 0.657516232432 228347.168571\n", - " 4 300000.0 1.21550625 364651.875 0.571753245593 208490.893043\n", - " 5 300000.0 1.2762815625 382884.46875 0.497176735298 190361.25017\n", - " 6 300000.0 1.34009564063 402028.692188 0.432327595912 173808.097981\n", - " 7 300000.0 1.40710042266 422130.126797 0.375937039923 158694.35033\n", - "Present worth of inflated annual operating and maintenance cost in Rs. : 1483709.322\n", - "Present worth of machine X in Rs. : 2908521.914\n", - "End of year AMC InflationFactor InflatedAmount P/F PW\n", - " 1 250000.0 1.05 262500.0 0.869565217391 228260.869565\n", - " 2 250000.0 1.1025 275625.0 0.756143667297 208412.098299\n", - " 3 250000.0 1.157625 289406.25 0.657516232432 190289.307142\n", - " 4 250000.0 1.21550625 303876.5625 0.571753245593 173742.410869\n", - " 5 250000.0 1.2762815625 319070.390625 0.497176735298 158634.375141\n", - " 6 250000.0 1.34009564063 335023.910156 0.432327595912 144840.081651\n", - " 7 250000.0 1.40710042266 351775.105664 0.375937039923 132245.291942\n", - "Present worth of inflated annual operating and maintenance cost in Rs. : 1236424.435\n", - "Present worth of machine Y in Rs. : 3123643.323\n", - "Since the present worth of Machine X is less than Machine Y, select Machine X\n", - " Calculations are not accurate in the book\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.4 Page 156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "IR=6.0;#in % per year\n", - "i=18.0;#in % per year\n", - "AFR=5000000.0;#in Rs.\n", - "n=7.0;#in years\n", - "AI=500000.0;#in Rs.\n", - "print\"End of year AFR InflationFactor InflatedAmount P/F PW\";\n", - "TPW=0;#Initialising\n", - "\n", - "for n in range (1,6) :\n", - " IF=(1+IR/100)**n;\n", - " IA=IF*AFR;#in Rs.\n", - " PF=1/((1+i/100)**n);\n", - " PW=PF*IA;#in Rs.\n", - " TPW=PW+TPW;#in Rs.\n", - " print\" \",round(n),\" \",round(AFR,3),\" \",round(IF,3),\" \",round(IA,3),\" \",round(PF,3),\" \",round(PW,3);\n", - " AFR=AFR+AI;#in Rs.\n", - "\n", - " \n", - "#result\n", - "print \"The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : \",round(TPW,3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "End of year AFR InflationFactor InflatedAmount P/F PW\n", - " 1.0 5000000.0 1.06 5300000.0 0.847 4491525.424\n", - " 2.0 5500000.0 1.124 6179800.0 0.718 4438236.139\n", - " 3.0 6000000.0 1.191 7146096.0 0.609 4349334.645\n", - " 4.0 6500000.0 1.262 8206100.24 0.516 4232615.212\n", - " 5.0 7000000.0 1.338 9367579.043 0.437 4094655.134\n", - "The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : 21606366.553\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter12.ipynb b/Engineering_Economics/Chapter12.ipynb deleted file mode 100755 index 75f40350..00000000 --- a/Engineering_Economics/Chapter12.ipynb +++ /dev/null @@ -1,104 +0,0 @@ -{ - "metadata": { - "name": "EE-12" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": "Inventory Control" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 12.1 Page 160" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nfrom math import sqrt\nD=24000.0;#in units/year\nCo=150.0;#in Rs./order\nPprice=75.0;#Rs./unit\nCpupy=18.0;#in % of Pprice/unit\n\n#calculation\nCc=Pprice*Cpupy/100;#in Rs.\nEOQ=sqrt((2*Co*D)/Cc);#in units\nn=D/round(EOQ);#no. of orders/year\nT=round(EOQ)/D;# time between successive orders in year\nT=T*12;#in months\nT=T*30;#in Days\n\n#result\nprint \"Economic order quantity in units : \",round(EOQ);\nprint \"No. of orders/year : \",round(n,2);\nprint \"Time between successive orders in days : \",round(T);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Economic order quantity in units : 730.0\nNo. of orders/year : 32.88\nTime between successive orders in days : 11.0\n" - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 12.2 Page 162" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=24000.0;#in units/year\nCo=175.0;#in Rs./setup\nCc=15.0;#in Rs./unit/year\n\n#calclation\nEOQ=sqrt((2*Co*r)/(Cc*(1-r/k)));#in units\nQ=round(EOQ);#units\nt1=Q/k;#in year\nt1=t1*12*30;#in days\nt2=(Q/r)*(1-r/k);#in year\nt2=t2*12*30;#in days\n\n#result\nprint \"Economic order quantity in units : \",round(Q,3);\nprint \"Cycle time in days :\",round(t1+t2);\nprint \"No. of setups/year : \",round(r/Q,3)", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Economic order quantity in units : 748.0\nCycle time in days : 22.0\nNo. of setups/year : 16.043\n" - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 12.3 Page 164" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#iniatiation of variable\nfrom math import sqrt\nD=30000.0;#in units/year\nCc=2.0;#in Rs./unit/year\nCo=100.0;#in Rs./orde\nCs=12.0;#in units/year\n\n#calculation\nEOQ=sqrt(2*Co*D*(Cs+Cc)/(Cc*Cs));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*D*Cs/(Cc*(Cs+Cc)));#in units\nt=Q/D;#in year\nt=t*365;#in days\nt1=Q1/D;#in year\nt1=t1*365;#in days\nt2=t-t1;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q-Q1);\nprint \"Cycle time in days: \",round(t);\nprint \"Inventory period(t1) in days : \",round(t1);\nprint \"Shortage period(t2) in days : \",round(t2);\nprint \"No. of Orders/year : \",round(D/Q,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Ordering quantity in units : 1871.0\nMaximum Inventory in units : 1604.0\nMaximum shortage quantity in units : 267.0\nCycle time in days: 23.0\nInventory period(t1) in days : 20.0\nShortage period(t2) in days : 3.0\nNo. of Orders/year : 16.034\n" - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 12.4 Page 166" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=2000.0*12;#in units/year\nCo=400.0;#in Rs./setup\nCc=0.20*12;#in Rs./year\nCs=15.0;#in Rs./unit/year\n\n#calculation\nEOQ=sqrt((2*Co*k*r*(Cc+Cs)/(Cc*(k-r)*Cs)));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*Cc*r*(k-r)/(Cs*(Cc+Cs)*k));#in units\nQ2=(Q*(k-r)/k)-Q1;#in Units\nt=Q/r;#in year\nt=t*365.0;#in days\nt1=(Q2/r)*365.0;#in days\nt2=(Q2/(k-r))*365.0;#in days\nt3=(Q1/(k-r))*365.0;#in days\nt4=(Q1/r)*365.0;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q2);\nprint \"Cycle time in days: \",round(t);\nprint \"Period of shortage in days : \",round(t1);\nprint \"Period of production satisfying back order in days : \",round(t2);\nprint \"Period of production satisfying period requirement in days : \",round(t3);\nprint \"Period of consumption only in days : \",round(t4);\n", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Ordering quantity in units : 3046.0\nMaximum Inventory in units : 210.0\nMaximum shortage quantity in units : 1313.0\nCycle time in days: 93.0\nPeriod of shortage in days : 40.0\nPeriod of production satisfying back order in days : 40.0\nPeriod of production satisfying period requirement in days : 6.0\nPeriod of consumption only in days : 6.0\n" - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter13.ipynb b/Engineering_Economics/Chapter13.ipynb deleted file mode 100755 index af23fcbb..00000000 --- a/Engineering_Economics/Chapter13.ipynb +++ /dev/null @@ -1,104 +0,0 @@ -{ - "metadata": { - "name": "EE-13" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": "Make or Buy Decision" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 13.1 Page 168" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nmaterial=300.0;#in Rs.\nlabour=250.0;#in Rs.\noverhead=100.0;#in Rs.\n\n#calculation\nVC=material+labour+overhead;#in Rs.\ndemand=5000.0;#in units\nTVC=demand*VC;#in Rs.\nFC=1000000;#in Rs.\nTC=FC+TVC;#in Rs.\n\n#result\nprint \"Total cost in Rs. : \",round(TC,3);\n\n#Cost to buy :\nPcost=900*demand;#in Rs.\nFC=1000000.0;#in Rs.\nTC=FC+Pcost;#in Rs.\n\n#result\nprint \"Total cost in Rs. : \",round(TC,3);\nprint \"The cost of making fixtures is less than the cost of buying fixtures from outside. Therefore, the organisation should make the fixtures.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Total cost in Rs. : 4250000.0\nTotal cost in Rs. : 5500000.0\nThe cost of making fixtures is less than the cost of buying fixtures from outside. Therefore, the organisation should make the fixtures.\n" - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 13.2 Page 171" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nfrom math import sqrt\nPbuy=8.0;#in Rs/unit\nD=2000.0;#in units/year\nCo=120.0;#in Rs./order\nCc=1.60;#in Rs./units/year\n\n#calculation\nQ1=sqrt(2*Co*D/Cc);#in units\nTC=D*Pbuy+D*Co/Q1+Q1*Cc/2;#in Rs.\nprint \"Total cost of buying in Rs. : \",round(TC,3)\n\n#Make Option :\nPmake=5.0;#in Rs/unit\nCo=60.0;#in Rs./setup\nCc=1.0;#in Re1/units/year\nr=2000.0;#in units/year\nk=8000.0;#in units/year\n\n#calculation\nQ2=sqrt(2*Co*r/(Cc*(1-r/k)));#in units\nTC=D*Pmake+D*Co/Q2+Q2*Cc*(k-r)/(2*k);#in Rs.\n\n#result\nprint \"Total cost of making in Rs. : \",round(TC,3)\nprint\"The cost of making is less than the cost of buying . Therefore, the firm should go in for making option.\";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Total cost of buying in Rs. : 16876.356\nTotal cost of making in Rs. : 10424.264\nThe cost of making is less than the cost of buying . Therefore, the firm should go in for making option.\n" - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 13.3 Page 173" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nSP=500.0;#in Rs.\nVC=300.0;#in Rs.\nFC=400000.0;#in RS.\n\n#calculation\nBEP=FC/(SP-VC);#in units\n\n#results\nprint \"BEP in units : \",round(BEP,3);\nprint\"Since the demand(1500units) is less than the break even quantity, the company should buy the cabinets for its TV production.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "BEP in units : 2000.0\nSince the demand(1500units) is less than the break even quantity, the company should buy the cabinets for its TV production.\n" - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 13.4 Page 173" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nvolume=8000;#in units\n#Process A :\nFC=500000.0;#in RS.\nVC=175.0;#in Rs.\n\n#calculation\nAC=FC+VC*volume;#in Rs.\n\n#result\nprint \"Annual Cost of Process A in Rs. :\",round(AC,3);\n\n#Process B :\nFC=600000.0;#in RS.\nVC=150;#in Rs.\n\n#calculation\nAC=FC+VC*volume;#in Rs.\n\n#result\nprint \"Annual Cost of Process A in Rs. :\",round(AC,3);\n\n#Buy option:\nPprice=125.0;#in RS./Unit\nVC=175.0;#in Rs.\nAC=Pprice*volume;#in Rs\n\n#result.\nprint \"Annual Cost of Buy in Rs. :\",round(AC,3);\nprint\"Since the annual cost of buy option is the minimum among all the alternatives, the company should buy the product.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Annual Cost of Process A in Rs. : 1900000.0\nAnnual Cost of Process A in Rs. : 1800000.0\nAnnual Cost of Buy in Rs. : 1000000.0\nSince the annual cost of buy option is the minimum among all the alternatives, the company should buy the product.\n" - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter16.ipynb b/Engineering_Economics/Chapter16.ipynb deleted file mode 100755 index 25b11449..00000000 --- a/Engineering_Economics/Chapter16.ipynb +++ /dev/null @@ -1,297 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2e3de312e11632c16b5c14fdb6f5e083c4b44aeeb327466acbfc97c2f088ee01" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Linear Progrmming" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.1 Page 200" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#result\n", - "print\"The data of the problem are summarized below : \";\n", - "print\"Machine Products Limit on \";\n", - "print\" P1 P2 machine hours\";\n", - "print\"Lathe 5 10 60\";\n", - "print\"Milling 4 4 40\";\n", - "print\"Profit/unit 6 8\";\n", - "print\"Let X1 be the production volume of the product.P1, and\";\n", - "print\"X2 be the production volume of the product,P2.\";\n", - "print\"The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \";\n", - "print\"maximize Z = 6*X1 + 8*X2\";\n", - "print\"subject to\";\n", - "print\"5*X1+10*X2 <= 60\"\n", - "print\"4*X1+4*X2 <= 40\"\n", - "print\"X1,X2 >= 0\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The data of the problem are summarized below : \n", - "Machine Products Limit on \n", - " P1 P2 machine hours\n", - "Lathe 5 10 60\n", - "Milling 4 4 40\n", - "Profit/unit 6 8\n", - "Let X1 be the production volume of the product.P1, and\n", - "X2 be the production volume of the product,P2.\n", - "The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \n", - "maximize Z = 6*X1 + 8*X2\n", - "subject to\n", - "5*X1+10*X2 <= 60\n", - "4*X1+4*X2 <= 40\n", - "X1,X2 >= 0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.2 Page 200" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "print\"Let X1 be the No. of packets of food type1 suggested for babies, and\";\n", - "print\"X2 be the No. of packets of food type1 suggested for babies.\";\n", - "print\"The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \";\n", - "print\"maximize Z = 2*X1 + 3*X2\";\n", - "print\"subject to\";\n", - "print\"X1+X2 >= 6\"\n", - "print\"7*X1+X2 >= 14\";\n", - "print\"X1,X2 >= 0\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Let X1 be the No. of packets of food type1 suggested for babies, and\n", - "X2 be the No. of packets of food type1 suggested for babies.\n", - "The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \n", - "maximize Z = 2*X1 + 3*X2\n", - "subject to\n", - "X1+X2 >= 6\n", - "7*X1+X2 >= 14\n", - "X1,X2 >= 0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.3 Page201" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "%pylab inline\n", - "import matplotlib.pyplot as plt\n", - "print\"Given the following LP model :\"\n", - "print\"maximize Z = 6*X1 + 8*X2\";\n", - "print\"subject to\";\n", - "print\"5*X1+10*X2 <= 60\";\n", - "print\"4*X1+4*X2 <= 40\";\n", - "print\"X1,X2 >= 0\";\n", - "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n", - "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n", - "print\"5*X1+10*X2 <= 60\";\n", - "print\"When X1=0 : X2=6\";\n", - "print\"When X2=0 : X1=12\";\n", - "plt.plot([0,12],[6,0],'r')\n", - "plt.plot([10,0],[0,10])\n", - "plt.title('Graphical Plot')\n", - "plt.show()\n", - "print \"Consider the 2nd constraint in the form : in blue \";\n", - "print \"4*X1+4*X2 <= 40\";\n", - "print \"When X1=0 : X2=10\";\n", - "print \"When X2=0 : X1=10\";\n", - "print \"The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\";\n", - "ZA=6*0+8*0;\n", - "ZB=6*10+8*0;\n", - "ZC=6*8+8*2;\n", - "ZD=6*0+8*6;\n", - "print \"Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \";\n", - "print \"X1 = 8 X2 = 2 and Z(Optimum) is\",ZC;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Given the following LP model :\n", - "maximize Z = 6*X1 + 8*X2\n", - "subject to\n", - "5*X1+10*X2 <= 60\n", - "4*X1+4*X2 <= 40\n", - "X1,X2 >= 0\n", - "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n", - "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n", - "5*X1+10*X2 <= 60\n", - "When X1=0 : X2=6\n", - "When X2=0 : X1=12\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEKCAYAAADkYmWmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGzlJREFUeJzt3Xtw1PW5x/HPImCRSAgISXMbSiAl4ZbYCJUOkMq1TIlc\nFZBCCeBR9FTQ4TRlqglSIRGl2qnSc4jhIhboZQoUkKlg12IRQYNAUaRQUgKBdCgkIQYSCXv+SAkG\nNrfNb/d32fdrJjPmsrvfdfTh4Z29uDwej0cAAFtqZfYBAAC+Y4gDgI0xxAHAxhjiAGBjDHEAsDGG\nOADYGEMcjpCVlaUf/OAH9X6/T58++stf/uLX26hPQUGBWrVqpevXr7fo9gFvGOLwi40bN2rgwIEK\nCQlReHi4vv3tb2vlypV+uz2Xy9Xg9//2t79pyJAhfrsNt9utVq1a6e6771aHDh3Uq1cvrVmzptm3\n4esfFAheDHEY7uWXX9b8+fP14x//WMXFxSouLtavfvUr/fWvf1VVVZXXy7R0Sw3Ec9Yau42oqChd\nvnxZZWVlysnJ0dy5c3Xs2DG/nwvBjSEOQ5WWliozM1MrV67UhAkT1L59e0lSUlKS1q9fr7Zt20qS\nfvjDH+rxxx/XmDFjFBISIrfbre3btys5OVmhoaGKjY3V4sWLa6/3RpJYtWqVoqKiFBkZqZdffrn2\n+y6XS1VVVZo5c6Y6dOigPn366OOPP679frdu3bR7925JUnV1tZYuXaoePXqoQ4cOSklJ0dmzZyVJ\nTz31lGJjYxUaGqqUlBS9//77Pv17ePDBBxUWFqZPP/30tu8VFRUpLS1NnTt3Vs+ePZWbmytJ2rlz\np5YtW6ZNmzbp7rvvVnJysk+3jeDCEIehPvjgA1VWVurBBx9s9Gc3bNigZ599VuXl5frOd76jkJAQ\nrV+/XqWlpdq+fbtWrlypLVu21LmM2+3WiRMn9Kc//Uk5OTm1g9nj8Wjr1q2aOnWqSktLlZaWpief\nfLL2ci6XqzaHrFixQhs3btTbb7+tsrIyrV69Wu3atZMkDRgwQIcOHdKlS5c0bdo0TZ48ud6/PdTn\n+vXr+sMf/qCSkhL17dv3tu9PmTJFsbGxOnfunH73u99p0aJF+vOf/6zRo0dr0aJFmjJlii5fvqyD\nBw8263YRnBjiMNSFCxd0zz33qFWrm/9pDRo0SGFhYbrrrrvqbLbjxo3T/fffL0m68847NXToUPXu\n3VuS1LdvX02ZMkXvvfdenevPzMxUu3bt1KdPH82aNUsbNmyo/d7gwYM1evRouVwuTZ8+XYcOHfJ6\nxtzcXL3wwgvq2bNn7W116tRJkvTII48oLCxMrVq10tNPP63Kykp9/vnnTbrvRUVFCgsLU5cuXbRk\nyRKtX7++9jZuKCws1N69e5WTk6O2bduqf//+mjNnjtatWyep5g8jXs4IzdHa7APAWTp37qwLFy7o\n+vXrtYN87969kqSYmJja9u1yuRQdHV3nsh9++KEyMjJ09OhRVVVVqbKyUg899FCdn4mJian959jY\nWB05cqT28/Dw8Np/vuuuu3T16tU657jhzJkziouL83r+l156SXl5eSoqKpLL5VJZWZkuXLjQpPse\nGRmpwsLCBn+mqKhInTp1qs1MN+7HRx991KTbAG7FJg5D3X///brzzju1efPmZl922rRpGjdunM6c\nOaOSkhI99thjt/3C8/Tp03X+OSoqqtm3ExMToxMnTtz29T179mj58uX67W9/q5KSEl26dEmhoaGG\nbsaRkZG6ePGiysvLa792+vTp2j/QGnuUDXArhjgM1bFjR2VmZmrevHn6/e9/r8uXL+v69ev65JNP\n9MUXX9T+nLfBWF5errCwMLVt21b79+/Xr3/969uG2s9+9jNduXJFR48e1Zo1a/Twww83+4xz5szR\ns88+qxMnTsjj8ejw4cO1g7V169a65557VFVVpeeff15lZWXN/5fQgJiYGA0aNEg/+clPVFlZqcOH\nDysvL0/Tp0+XJEVERKigoICkgiZjiMNwCxcu1IoVK/Tiiy8qIiJCEREReuyxx/Tiiy/WNvCv/qLx\nhtdff13PPfecOnTooCVLlngd0EOHDlWPHj00fPhwLVy4U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55RbGysIiMj1bFjRw0fPtzsYxmuuLhY4eHhkqTw\n8HAVFxebfCL/ycvL05gxYxr8GcP/T3XiX8G9KS8v16RJk/Tqq68qJCTE7OMYYtu2beratauSk5Md\nt4VLNQ+Nzc/P17x585Sfn6/27dvb+q/itzp58qReeeUVFRQUqKioSOXl5XrrrbfMPpZfuVwux86c\nF154QW3bttW0adMa/DnDh3hUVJQKCwtrPy8sLFR0dLTRN2OqL7/8UhMnTtT06dM1btw4s49jmL17\n92rr1q36xje+oalTp+rdd9/VjBkzzD6WYaKjoxUdHa377rtPkjRp0iTl5+ebfCrjfPTRRxo0aJA6\nd+6s1q1ba8KECdq7d6/ZxzJceHi4zp8/L0k6d+6cunbtavKJjLdmzRrt2LGjSX8IGz7EU1JS9Pe/\n/10FBQWqqqrSpk2blJaWZvTNmMbj8Wj27NlKTEzU/PnzzT6OoZYuXarCwkKdOnVKGzdu1AMPPKB1\n69aZfSzDREREKCYmRsePH5ck7dq1S7179zb5VMbp1auX9u3bpytXrsjj8WjXrl1KTEw0+1iGS0tL\n09q1ayVJa9euddQiJdU8um/58uXasmWLvva1rzV+AV+edt+YHTt2eOLj4z1xcXGepUuX+uMmTLNn\nzx6Py+Xy9O/f35OUlORJSkryvP3222Yfy3But9szduxYs49huE8++cSTkpLi6devn2f8+PGekpIS\ns49kqJycHE9iYqKnT58+nhkzZniqqqrMPlKLTJkyxfP1r3/d06ZNG090dLQnLy/P8+9//9szbNgw\nT8+ePT0jRozwXLp0yexj+uzW+/fGG294evTo4YmNja2dL48//niD18GTfQDAxpz3EAQACCIMcQCw\nMYY4ANgYQxwAbIwhDgA2xhAHABtjiAOAjTHEAcDG/h92IUTgGfYhtAAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Consider the 2nd constraint in the form : in blue \n", - "4*X1+4*X2 <= 40\n", - "When X1=0 : X2=10\n", - "When X2=0 : X1=10\n", - "The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\n", - "Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \n", - "X1 = 8 X2 = 2 and Z(Optimum) is 64\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.4 Page 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "%pylab inline\n", - "import matplotlib.pyplot as plt\n", - "print\"Given the following LP model :\"\n", - "print \"minimize Z = 2*X1 + 3*X2\";\n", - "print\"subject to\";\n", - "print\"X1+X2 >= 6\";\n", - "print\"7*X1+X2 >= 14\";\n", - "print\"X1,X2 >= 0\";\n", - "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n", - "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n", - "print\"X1+X2 = 6\";\n", - "print\"When X1=0 : X2=6\";\n", - "print\"When X2=0 : X1=6\";\n", - "plt.plot([0,6],[6,0],'r')\n", - "plt.plot([2,0],[0,14])\n", - "plt.title('Graphical Plot')\n", - "plt.show()\n", - "print\"Consider the 2nd constraint in the form (in blue):\";\n", - "print\"7*X1+X2 = 14\";\n", - "print\"When X1=0 : X2=14\";\n", - "print\"When X2=0 : X1=2\";\n", - "print\"The Optimum solution will be in any one of the corners A, B and C\";\n", - "print\"The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\"\n", - "ZA=2*0+3*14;\n", - "ZB=2*(4.0/3)+3*(14.0/3);\n", - "ZC=2*6+3*0;\n", - "\n", - "#result\n", - "print\"Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \";\n", - "print \"X1 = 6 X2 = 0 and Z(Optimum) =\",ZC" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Given the following LP model :\n", - "minimize Z = 2*X1 + 3*X2\n", - "subject to\n", - "X1+X2 >= 6\n", - "7*X1+X2 >= 14\n", - "X1,X2 >= 0\n", - "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n", - "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n", - "X1+X2 = 6\n", - "When X1=0 : X2=6\n", - "When X2=0 : X1=6\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGwVJREFUeJzt3Xlw1PX9x/HXpoiAkRAQNs3VtAHKHaJRig6yyBVtgcgl\nl9AgcayjLdJhRKeWwwoE1JZSpTNQUaQF2vKrUMCMgXYDipQhIFKoxYOMiRydoAlHhEiyvz8iKyHZ\nZHfz/e7u97vPx8zOJHt8v59VfPPsd7/frcPj8XgEALCMmHAvAAAQGAY3AFgMgxsALIbBDQAWw+AG\nAIthcAOAxTC4YQsLFizQgw8+6PPxPn36aPfu3abuw5eSkhLFxMSotra2RfsHrmJwwxQbN27UgAED\nFBsbK6fTqR/84AdatWqVaftzOBxNPv7vf/9bd999t2n7cLvdiomJ0c0336z27durR48eevXVVwPe\nR7B/OSC6MLhhuBdeeEGzZ8/Wk08+qTNnzujMmTP6/e9/r3feeUfV1dWNvqalNRqK68ia20dSUpLO\nnz+vc+fOKT8/X3l5efrggw9MXxeiD4MbhqqsrNT8+fO1atUqjR07VjfddJMkqX///lq/fr1at24t\nSfrxj3+sn/zkJ7rvvvsUGxsrt9ut7du3KzMzU3FxcUpNTdXChQu92716uGH16tVKSkpSYmKiXnjh\nBe/jDodD1dXVmjFjhtq3b68+ffqouLjY+3haWpp27dolSaqpqdHixYvVtWt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XLlxQfHy8Wrdurf379+tPf/pTg0H2q1/9Sl9++aWOHj2qV199VQ888EDAa5w1a5aeeeYZ\nffTRR/J4PHr//fe9w7RVq1a65ZZbVF1drUWLFuncuXOB/0NoQkpKiu6880499dRTunz5st5//329\n8sormjZtmiQpISFBJSUlHC5BkxjcMNzcuXP14osvatmyZUpISFBCQoIeeeQRLVu2zHtM+9oPC696\n+eWX9ctf/lLt27fXs88+2+hQHjx4sLp27aphw4Zp7ty5GjZsmM/t+arXOXPmaOLEiRoxYoTi4uKU\nl5enS5cuaeTIkcrOzlb37t2Vlpamtm3bKjU1td72mipifx/bsGGDSkpKlJiYqLFjx2rRokW65557\nJEkTJkyQVHfIKSsry+f2EN0cTf0fKcycOVPbt29Xly5d6h1LlOrO1Z07d67Ky8u9H+wAZikpKdH3\nvvc9XblypcExayDaNPlfQG5urgoKChrcX1paqsLCQn3nO98xbWEAgMY1ObgHDRqk+Pj4BvfPmTNH\ny5YtM21RQGP44A6oE/DpgFu2bFFycrL69etnxnqARqWlpammpibcywAiQkCDu6qqSosXL1ZhYaH3\nPj79BoDQCmhwf/zxxyopKVFGRoakugsZbrvtNu3fv19dunSp99xvfaurams/Nm6lABAF0tPTG73O\noB5PM06cOOHp06dPo4+lpaV5zp492+hjkjyjRjW3deuaP39+uJdgKt6fddn5vXk89n9/foxlT5Mf\nTk6ePFl33nmnjh8/rpSUFK1du7be4819WFRcXHcDABinyUMl136BT2M++eSTJh+fN09auFDaujXw\nhQEAGmfqlQx5efatbpfLFe4lmIr3Z112fm+S/d+fP5q8crJFG3Y45PF4tHKlVFhIdQOAP67Oziaf\nY/bgvnRJSk+vG9y33WbGngDAPvwZ3KZ/6UObNt8c6wYAtJzpxS2J6gYAP0VEcUtUNwAYKSTFLVHd\nAOCPiCluieoGAKOErLglqhsAmhNRxS1R3QBghJAWt0R1A0BTIq64JaobAFoq5MUtUd0A4EtEFrdE\ndQNAS4SluCWqGwAaE7HFLVHdABCssBW3RHUDwPUiurglqhsAghHW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wQ0AFsPgBgCLYXADgMUwuAHAYhjcAGAxDG4AsJj/B8cOct+Nyla5AAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Consider the 2nd constraint in the form (in blue):\n", - "7*X1+X2 = 14\n", - "When X1=0 : X2=14\n", - "When X2=0 : X1=2\n", - "The Optimum solution will be in any one of the corners A, B and C\n", - "The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\n", - "Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \n", - "X1 = 6 X2 = 0 and Z(Optimum) = 12\n" - ] - } - ], - "prompt_number": 15 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter2.ipynb b/Engineering_Economics/Chapter2.ipynb deleted file mode 100755 index e29c54c2..00000000 --- a/Engineering_Economics/Chapter2.ipynb +++ /dev/null @@ -1,372 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:579288a5e0685252a970b36dc99c069cd7fb91e6e042c88d50d8eb0615ccf38d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Elementary Economic Analysis" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 Page 16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#Part a \n", - "w1=1.2;#in Kg\n", - "c1=80.0;#cost of making aluminium casting in Rs/Kg\n", - "c2=150.0;#ost of machining aluminium casting per unit in Rs\n", - "\n", - "#calculation\n", - "Tc1=c1*w1+c2;#Total cost of jet engine part made of aluminium per unit in Rs\n", - "\n", - "#result\n", - "print \"Total cost of jet engine part made of aluminium per unit in Rs \",round(Tc1,3)\n", - "\n", - "#Part b \n", - "w2=1.35;#in Kg\n", - "c1=35.0;#in Rs/Kg\n", - "c2=170.0;#in Rs\n", - "c3=1300.0;#in Rs/Kg\n", - "\n", - "#calculation\n", - "Tc2=c1*w2+c2+c3*(w2-w1);#in Rs\n", - "\n", - "#result\n", - "print \"Total cost of jet engine part made of steel per unit in Rs : \",round(Tc2,3);\n", - "print \"DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs \",round(Tc2-Tc1,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total cost of jet engine part made of aluminium per unit in Rs 246.0\n", - "Total cost of jet engine part made of steel per unit in Rs : 412.25\n", - "DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs 166.25\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2, Page 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#Part a \n", - "wood=0.1;#in m^3\n", - "WoodCost=12000.0;#in Rs/m^3\n", - "Table=1;#in units\n", - "TableTopCost=3000.0;#in Rs/unit\n", - "LegBushes=4.0;#units\n", - "LegBushesCost=10.0;#Rs/units\n", - "Nails=100.0;#in grams\n", - "NailsCost=300.0;#in Rs/Kg\n", - "TotalLabour=15.0;#in Hours\n", - "TotalLabourCost=50.0;#in Rs/Hours\n", - "\n", - "#calcualtion\n", - "WoodCostframelegs=WoodCost*wood;#in Rs\n", - "WoodTopCost=3000.0;#in Rs\n", - "BushesCost=LegBushesCost*LegBushes;#in Rs\n", - "NailsCost=Nails*NailsCost/1000;#in Rs\n", - "LabourCost=TotalLabourCost*TotalLabour;#in Rs\n", - "TotalCost1=WoodCostframelegs+WoodTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n", - "\n", - "#result\n", - "print \"Cost of Table with wooden top in Rs \",round(TotalCost1,3)\n", - "\n", - "#given data for table with granite top\n", - "#Part b \n", - "wood=0.15;#in m^3\n", - "WoodCost=12000.0;#in Rs/m^3\n", - "Granite=1.62;#in m^2\n", - "GraniteCost=800.0;#in Rs/m^2\n", - "LegBushes=4.0;#units\n", - "LegBushesCost=25.0;#Rs/units\n", - "Nails=50.0;#in grams\n", - "NailsCost=300.0;#in Rs/Kg\n", - "TotalLabour=8.0;#in Hours\n", - "TotalLabourCost=50.0;#in Rs/Hours\n", - "\n", - "\n", - "WoodCostframelegs=WoodCost*wood;#in Rs\n", - "GraniteTopCost=Granite*GraniteCost;#in Rs\n", - "BushesCost=LegBushesCost*LegBushes;#in Rs\n", - "NailsCost=Nails*NailsCost/1000;#in Rs\n", - "LabourCost=TotalLabourCost*TotalLabour;#in Rs\n", - "TotalCost2=WoodCostframelegs+GraniteTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n", - "\n", - "#result\n", - "print \"Cost of Table with Granite top in Rs \",round(TotalCost2,3);\n", - "print \"Economic advantage of table with granite top in Rs \",round(TotalCost1-TotalCost2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cost of Table with wooden top in Rs 5020.0\n", - "Cost of Table with Granite top in Rs 3611.0\n", - "Economic advantage of table with granite top in Rs 1409.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 Page 19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#design A\n", - "LatheCost=200.0;#in Rs/hour\n", - "grinderCost=150.0;#in Rs/hour\n", - "HoursOfLathe=16.0;#in hours/1000Unit\n", - "HoursOfGrinder=4.5;#in hours/1000Unit\n", - "\n", - "#calcualtion\n", - "TotalCostA=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n", - "\n", - "#result\n", - "print \"Total cost of design A per 100,000 units \",round(TotalCostA*100000.0/1000,3);\n", - "\n", - "# Design B\n", - "HoursOfLathe=7.0;#in hours/1000Unit\n", - "HoursOfGrinder=12.0;#in hours/1000Unit\n", - "TotalCostB=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n", - "\n", - "#result\n", - "print \"Total cost of design A per 100,000 units\",round(TotalCostB*100000.0/1000,3);\n", - "print \"Economic advantage of design B over design A per 100,000 units in Rs \",round(TotalCostA-TotalCostB,3)*100;" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total cost of design A per 100,000 units 387500.0\n", - "Total cost of design A per 100,000 units 320000.0\n", - "Economic advantage of design B over design A per 100,000 units in Rs 67500.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4,Page 20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "from math import pi\n", - "Tanks=4.0;#units\n", - "TankDia=5.2;#in meter\n", - "\n", - "#calcualtion\n", - "TankRad=TankDia/2;#in meters\n", - "TankHeight=7;#in meters\n", - "HeightDiaRatio=TankHeight/TankDia;#unitless\n", - "VolPerTank=(22/7)*TankRad**2*TankHeight;#in m^3\n", - "h=VolPerTank/(pi)*64;#in meters\n", - "r=h/8;#in meters\n", - "d=2*r;#in meters\n", - "CostNewDesign=900000*(100.0/111);#in Rs\n", - "\n", - "#result\n", - "print \"Expected savings by redesign in Rs \",round(900000-CostNewDesign,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Expected savings by redesign in Rs 89189.189\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5,Page 21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#steel frame\n", - "distance=2500.0;#in Km\n", - "TransCost=1.0;#in Rs/Kg/100Km\n", - "SteelFramePrice=1000.0;#in Rs/Unit\n", - "SteelFrameWeight=75.0;#in Kg/Unit\n", - "\n", - "#calculation\n", - "TotalCost1=SteelFramePrice+TransCost*SteelFrameWeight*distance/100;#in Rs\n", - "\n", - "#result\n", - "print \"Total cost of steel window frame per unit in Rs \",round(TotalCost1,3);\n", - "\n", - "# Aluminium window frame\n", - "AlumilniumFramePrice=1500.0;#in Rs/Unit\n", - "AlumilniumFrameWeight=28.0;#in Kg/Unit\n", - "\n", - "#calculation\n", - "TotalCost2=AlumilniumFramePrice+TransCost*AlumilniumFrameWeight*distance/100;#in Rs\n", - "\n", - "#result\n", - "print \"Total cost of Alumilnium window frame per unit in Rs \",round(TotalCost2,3);\n", - "print \"DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs \",round(TotalCost1-TotalCost2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total cost of steel window frame per unit in Rs 2875.0\n", - "Total cost of Alumilnium window frame per unit in Rs 2200.0\n", - "DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs 675.0\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6,Page 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#Cost of component using process sequence 1\n", - "print\"The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\" ;\n", - "print \"Calculations are summarized in form of table below : \";\n", - "print \"Operation Operation Time Machine Hour rate Cost\";\n", - "print \" No. Min Hour Rs. Rs.\";\n", - "print \" 1 Turning 5 0.083 200 16.60\";\n", - "print \" 2 Milling 8 0.133 400 53.20\";\n", - "print \" 3 Shapiing 10 0.167 350 58.45\";\n", - "print \" 4 Drilling 3 0.050 300 15.00\";\n", - "print \" Total 143.25\";\n", - "\n", - "#Cost of component using process sequence 2\n", - "print \"The process sequence 2 of the component is as follows : Turning - Milling - Drilling\" ;\n", - "print \"Calculations are summarized in form of table below : \";\n", - "print \"Operation Operation Time Machine Hour rate Cost\";\n", - "print \" No. Min Hour Rs. Rs.\";\n", - "print \" 1 Turning 5 0.083 200 16.60\";\n", - "print \" 2 Milling 14 0.233 400 93.20\";\n", - "print \" 4 Drilling 3 0.050 300 15.00\";\n", - "print \" Total 124.80\";\n", - "\n", - "#Cost of component using process sequence 3\n", - "print \"The process sequence 3 of the component is as follows : Only CNC operations\" ;\n", - "print \"Calculations are summarized in form of table below : \";\n", - "print \"Operation Operation Time Machine Hour rate Cost\";\n", - "print \" No. Min Hour Rs. Rs.\";\n", - "print \" 1 CNC 8 0.133 1000 133\";\n", - "\n", - "print \"The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\n", - "Calculations are summarized in form of table below : \n", - "Operation Operation Time Machine Hour rate Cost\n", - " No. Min Hour Rs. Rs.\n", - " 1 Turning 5 0.083 200 16.60\n", - " 2 Milling 8 0.133 400 53.20\n", - " 3 Shapiing 10 0.167 350 58.45\n", - " 4 Drilling 3 0.050 300 15.00\n", - " Total 143.25\n", - "The process sequence 2 of the component is as follows : Turning - Milling - Drilling\n", - "Calculations are summarized in form of table below : \n", - "Operation Operation Time Machine Hour rate Cost\n", - " No. Min Hour Rs. Rs.\n", - " 1 Turning 5 0.083 200 16.60\n", - " 2 Milling 14 0.233 400 93.20\n", - " 4 Drilling 3 0.050 300 15.00\n", - " Total 124.80\n", - "The process sequence 3 of the component is as follows : Only CNC operations\n", - "Calculations are summarized in form of table below : \n", - "Operation Operation Time Machine Hour rate Cost\n", - " No. Min Hour Rs. Rs.\n", - " 1 CNC 8 0.133 1000 133\n", - "The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter3.ipynb b/Engineering_Economics/Chapter3.ipynb deleted file mode 100755 index b94c5fa1..00000000 --- a/Engineering_Economics/Chapter3.ipynb +++ /dev/null @@ -1,360 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:5b530b225e354d5204b6b04a92931fcee5b92fa42094bc3f03e4022169e39d78" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Interest Formulas and their Application" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1 Page 29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "P=20000.0;#in rupees\n", - "n=10.0;#in years\n", - "i=18.0;#% per annum\n", - "\n", - "#calculation\n", - "F=P*(1+i/100)**n;\n", - "\n", - "#result\n", - "print \"Maturity value after 18 years is \", round(F,3),\" Rupees.\";\n", - "print \" Ans in the book is not correct\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maturity value after 18 years is : 104676.711 Rupees.\n", - " Ans in the book is not correct\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2 Page 30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "F=100000.0;#in rupees\n", - "n=10.0;#in years\n", - "i=15.0;#% per annum\n", - "\n", - "#calculation\n", - "P=F/((1.0+i/100.0)**n);\n", - "\n", - "#result\n", - "print \"The person has to invest \", round(P,3),\" Rupees.\";\n", - "print \" Ans in the book is not correct\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The person has to invest 24718.471 Rupees.\n", - " Ans in the book is not correct\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3 Page 31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "A=10000.0;#in rupees\n", - "n=25.0;#in years\n", - "i=20.0;#% per annum\n", - "\n", - "#calculation\n", - "F=A*(((1+i/100)**n-1)/(i/100));\n", - "\n", - "#result\n", - "print \"The future sum of the annual equal payment after 25 years is \",round(F,3),\" Rupees.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The future sum of the annual equal payment after 25 years is 4719810.832 Rupees.\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4 Page 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "F=500000.0;#in rupees\n", - "n=15.0;#in years\n", - "i=18.0;#% per annum\n", - "\n", - "#calculation\n", - "A=F*((i/100)/((1+i/100)**n-1));\n", - "\n", - "#result\n", - "print \"The annual equal ammount which must be deposited for 15 years is \",round(A,3),\" Rupees.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equal ammount which must be deposited for 15 years is 8201.391 Rupees.\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5 Page 33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiasation of variable\n", - "A=1000000.0;#in rupees\n", - "n=20.0;#in years\n", - "i=15.0;#% per annum\n", - "\n", - "#calculation\n", - "P=A*(((1+i/100)**n-1)/((i/100)*(1+i/100)**n));\n", - "\n", - "#result\n", - "print \"The amount of reserve which must be setup now is : \",round(P,3),\" Rupees\";\n", - "print \" Ans in the book is not correct\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amount of reserve which must be setup now is : 6259331.474 Rupees\n", - " Ans in the book is not correct\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6 Page 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "P=1000000.0;#in rupees\n", - "n=15.0;#in years\n", - "i=18.0;#% per annum\n", - "\n", - "#calculation\n", - "A=P*(((i/100)*(1+i/100)**n)/((1+i/100)**n-1));\n", - "\n", - "#result\n", - "print \"The annual equivalent installment to be paid by the company to the bank is \",round(A),\" Rupees.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equivalent installment to be paid by the company to the bank is : 196403.0 Rupees.\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7 Page 35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "A1=4000.0;#in rupees\n", - "G=500.0;#in rupees\n", - "n=10.0;#in years\n", - "i=15.0;#% per annum\n", - "\n", - "#calculation\n", - "A=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\n", - "F=A*(((1+i/100)**n-1)/(i/100));\n", - "\n", - "#result\n", - "print \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "At the end of 10th year, the compound amountr of all his payments will be : 115560.6 Rupees.\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8 Page 36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "A1=8500.0;#in rupees\n", - "G=-500.0;#in rupees\n", - "n=10.0;#in years\n", - "i=15.0;#% per annum\n", - "\n", - "#calculation\n", - "A=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\n", - "F=A*(((1+i/100)**n-1)/(i/100));\n", - "\n", - "#result\n", - "print \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "At the end of 10th year, the compound amountr of all his payments will be : 138235.878 Rupees.\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9 Page 38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "P=5000.0;#in rupees\n", - "n=10.0;#in years\n", - "i=12.0;#% per annum\n", - "m=4.0;#no. of interest periods per year for quarterly\n", - "\n", - "#calculation\n", - "N=n*m;\n", - "r=i/m;\n", - "F=P*(1+r/100)**N;\n", - "\n", - "#result\n", - "print\"Maturity value after 10 years is \",round(F,3),\" Rupees.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maturity value after 10 years is : 16310.189 Rupees.\n" - ] - } - ], - "prompt_number": 18 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter4.ipynb b/Engineering_Economics/Chapter4.ipynb deleted file mode 100755 index 2b2d10b2..00000000 --- a/Engineering_Economics/Chapter4.ipynb +++ /dev/null @@ -1,388 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:aed8a204f6a6b9aa286380e07fd82210fb76cb7818bcaa10c4f627aee9d0c52a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Present Worth Method of Comparision" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1 Page 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#technology 1\n", - "P=1200000.0;#in Rs\n", - "A=400000.0;#in Rs\n", - "i=20.0;#in % per annum\n", - "n=10.0;#in years\n", - "\n", - "#calculation\n", - "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth for this technology in RS. \",round(PW,3);\n", - "\n", - "#technology 2\n", - "P=2000000.0;#in Rs\n", - "A=600000.0;#in Rs\n", - "i=20.0;#in % per annum\n", - "n=10.0;#in years\n", - "\n", - "#calculation\n", - "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth for this technology in RS. \",round(PW,3);\n", - "\n", - "#technology 3\n", - "P=1800000.0;#in Rs\n", - "A=500000.0;#in Rs\n", - "i=20.0;#in % per annum\n", - "n=10.0;#in years\n", - "\n", - "#calculation\n", - "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth for this technology in RS. \",round(PW,3);\n", - "print \"It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\";\n", - "print \"the answer is differnt due to approximation error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth for this technology in RS. 476988.834\n", - "The present worth for this technology in RS. 515483.251\n", - "The present worth for this technology in RS. 296236.043\n", - "It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\n", - "the answer is differnt due to approximation error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2 Page 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#bid 1\n", - "P=450000.0;#in Rs\n", - "A=27000.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=15.0;#in years\n", - "\n", - "#calculation\n", - "PW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth for this bid in RS. \",round(PW,3)\n", - "\n", - "#bid 2\n", - "P=540000.0;#in Rs\n", - "A=28500.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=15.0;#in years\n", - "\n", - "#calculation\n", - "PW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth for this bid in RS. \",round(PW,3)\n", - "print \"The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth for this bid in RS. 607878.993\n", - "The present worth for this bid in RS. 706650.048\n", - "The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3 Page 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#investment proposal A\n", - "P1=-10000.0;#in Rs\n", - "P2=3000.0;#in Rs\n", - "P3=3000.0;#in Rs\n", - "P4=7000.0;#in Rs\n", - "P5=6000.0;#in Rs\n", - "i=18.0;#in % per annum\n", - "\n", - "#calculation\n", - "PW_A=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of A in RS. \",round(PW_A,3);\n", - "\n", - "#investment proposal B\n", - "P1=-10000.0;#in Rs\n", - "P2=6000.0;#in Rs\n", - "P3=6000.0;#in Rs\n", - "P4=3000.0;#in Rs\n", - "P5=3000.0;#in Rs\n", - "i=18.0;#in % per annum\n", - "\n", - "#calculation\n", - "PW_B=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of B in RS. \",round(PW_B,3);\n", - "print\"At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth of A in RS. 2052.076\n", - "The present worth of B in RS. 2767.112\n", - "At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4 Page 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "P0=400000.0;#in Rs\n", - "P=200000.0;#in Rs\n", - "i=18.0;#in % per annum\n", - "n=10.0;#in years\n", - "\n", - "#calcualtion\n", - "PW=P0+P*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of alternative 2 in RS. \",round(PW,3);\n", - "print \"The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth of alternative 2 in RS. 1298817.259\n", - "The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5 Page 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#plan 1\n", - "P0=-1000.0;#in Rs\n", - "P=12000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=15.0;#in years\n", - "\n", - "#calculation\n", - "PW1=P0+P*1/((1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of Plan-1 in RS. \",round(PW1,3);\n", - "\n", - "#plan 2\n", - "P0=-1000.0;#in Rs\n", - "P=4000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n1=10.0;#in years\n", - "n2=15.0;#in years\n", - "\n", - "#calculation\n", - "PW2=P0+P*1/((1+i/100)**n1)++P*1/((1+i/100)**n2);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of Plan-2 in RS.\",round(PW2,3);\n", - "print \"The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth of Plan-1 in RS. 1192.355\n", - "The present worth of Plan-2 in RS. 1018.678\n", - "The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6,Page 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#plan 1\n", - "P0=-10000.0;#in Rs\n", - "P=800000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=20.0;#in years\n", - "\n", - "#calcualtion\n", - "PW1=P0*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)+P*1/((1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of Plan-1 in RS. \",round(PW1,3);\n", - "\n", - "#plan 2\n", - "P0=-10000.0;#in Rs\n", - "P=1500000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n1=20.0;#in years\n", - "n2=25.0;#in years\n", - "\n", - "#calcualtion\n", - "PW2=P0*(((1+i/100)**n1)-1)/((i/100)*(1+i/100)**n1)+P*1/((1+i/100)**n2);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of Plan-2 in RS. \",round(PW2,3);\n", - "print \"The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\";\n", - "print \"answer is bit different due to approximation error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth of Plan-1 in RS. 8238.976\n", - "The present worth of Plan-2 in RS. 13540.524\n", - "The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\n", - "answer is bit different due to approximation error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7 Page 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "P=12000.0;#in Rs\n", - "A1=10000.0;#in Rs\n", - "G=1000.0;#in Rs\n", - "i=18.0;#in % per annum\n", - "n=10.0;#in years\n", - "\n", - "#calculation\n", - "PW=-P+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n", - "\n", - "#result\n", - "print \"The present worth of the small business in RS. \",round(PW,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The present worth of the small business in RS. 47293.316\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter5.ipynb b/Engineering_Economics/Chapter5.ipynb deleted file mode 100755 index 398e418d..00000000 --- a/Engineering_Economics/Chapter5.ipynb +++ /dev/null @@ -1,352 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e388f34dd67bfe5948d20d52a601f7e8e53b92aa882e9a754ed91176569417c0" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Future Worth Method" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1,Page 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#alternate A\n", - "P=5000000.0;#in Rs\n", - "A=2000000.0;#in Rs\n", - "i=18.0;#in % per annum\n", - "n=4.0;#in years\n", - "\n", - "#calculation\n", - "FW_A=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative A in RS. \",round(FW_A,3);\n", - "\n", - "#alternate B\n", - "P=4500000.0;#in Rs\n", - "A=1800000.0;#in Rs\n", - "i=18.0;#in % per annum\n", - "n=4.0;#in years\n", - "\n", - "#calculation\n", - "FW_B=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n", - "print \"The future worth amount of alternative B in RS. \", round(FW_B,3);\n", - "print \"The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\";\n", - "print \" Calculation in the book is not accurate.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The future worth amount of alternative A in RS. 736975.2\n", - "The future worth amount of alternative B in RS. 663277.68\n", - "The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\n", - " Calculation in the book is not accurate.\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2,Page 58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#alternate 1\n", - "FC=2000000.0;#in Rs\n", - "AI=800000.0;#in Rs\n", - "ATax=80000.0;#in Rs\n", - "NetAI=AI-ATax;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=20.0;#in years\n", - "\n", - "#calculation\n", - "FW_1=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative 1 in RS. : \", round(FW_1,3)\n", - "\n", - "#alternative2\n", - "FC=3600000.0;#in Rs\n", - "AI=980000.0;#in Rs\n", - "ATax=150000.0;#in Rs\n", - "NetAI=AI-ATax;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=20.0;#in years\n", - "\n", - "#calculation\n", - "FW_2=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative 2 in RS.\",round(FW_2,3)\n", - "print\"The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\";\n", - "print \" Calculation in the book is not accurate.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The future worth amount of alternative 1 in RS. : 32585172.373\n", - "The future worth amount of alternative 2 in RS. 25076872.093\n", - "The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\n", - " Calculation in the book is not accurate.\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3,Page 59" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#part a\n", - "#alternative 1\n", - "P=500000.0;#in Rs\n", - "A1=50000.0;#in Rs\n", - "G=50000.0;#in Rs\n", - "i=8.0;#in % per annum\n", - "n=6.0;#in years\n", - "\n", - "#calculation\n", - "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n", - "\n", - "#alternative 2\n", - "P=700000.0;#in Rs\n", - "A1=70000.0;#in Rs\n", - "G=70000.0;#in Rs\n", - "i=8.0;#in % per annum\n", - "n=6.0;#in years\n", - "\n", - "#calculation\n", - "FW_2=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative 2 in RS. \", round(FW_2,3);\n", - "print \"The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\";\n", - "\n", - "\n", - "#part b\n", - "#alternative a\n", - "P=500000.0;#in Rs\n", - "A1=50000.0;#in Rs\n", - "G=50000.0;#in Rs\n", - "i=9.0;#in % per annum\n", - "n=6.0;#in years\n", - "\n", - "#calculation\n", - "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n", - "\n", - "#altenative 2\n", - "P=700000.0;#in Rs\n", - "A1=70000.0;#in Rs\n", - "G=70000.0;#in Rs\n", - "i=9.0;#in % per annum\n", - "n=6.0;#in years\n", - "\n", - "#calculation\n", - "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of alternative 2 in RS.\", round(FW_1,3);\n", - "print \"The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \";\n", - "print \" Calculation in the book is not accurate.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The future worth amount of alternative 1 in RS. 408314.938\n", - "The future worth amount of alternative 2 in RS. 571640.914\n", - "The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\n", - "The future worth amount of alternative 1 in RS. 383913.653\n", - "The future worth amount of alternative 2 in RS. 537479.115\n", - "The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \n", - " Calculation in the book is not accurate.\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4 Page 62" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#alternative 1\n", - "P=8000000.0;#in Rs\n", - "A=800000.0;#in Rs\n", - "i=20.0;#in % per annum\n", - "n=12.0;#in years\n", - "Salvage=500000;#in Rs\n", - "\n", - "#calcualtion\n", - "FW1=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n", - "\n", - "#result\n", - "print \"The future worth for this alternative in RS.\",round(FW1,3)\n", - "\n", - "#alternative 2\n", - "P=7000000.0;#in Rs\n", - "A=900000.0;#in Rs\n", - "i=20.0;#in % per annum\n", - "n=12.0;#in years\n", - "Salvage=400000;#in Rs\n", - "\n", - "#calculation\n", - "FW2=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n", - "\n", - "#result\n", - "print \"The future worth for this alternative in RS.\",round(FW2,3);\n", - "\n", - "#alternative 3\n", - "P=9000000.0;#in Rs\n", - "A=850000.0;#in Rs\n", - "i=20.0;#in % per annum\n", - "n=12.0;#in years\n", - "Salvage=700000;#in Rs\n", - "\n", - "#calculation\n", - "FW3=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n", - "\n", - "print \"The future worth for this alternative in RS. \",round(FW3,3)\n", - "print \"The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\";\n", - "print \" Calculation in the book is not accurate.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The future worth for this alternative in RS. 102493205.379\n", - "The future worth for this alternative in RS. 97635155.155\n", - "The future worth for this alternative in RS. 113188330.939\n", - "The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\n", - " Calculation in the book is not accurate.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5 Page 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initialisation of variable\n", - "#Machine A\n", - "P=400000.0;#in Rs\n", - "A=40000.0;#in Rs\n", - "S=200000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=4.0#in years\n", - "\n", - "#calculation\n", - "FW_A=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of Machine A in RS. \",round(FW_A,3);\n", - "\n", - "#Machine B\n", - "P=800000.0;#in Rs\n", - "A=0.0;#in Rs\n", - "S=550000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=4.0#in years\n", - "\n", - "#calculation\n", - "FW_B=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n", - "\n", - "#result\n", - "print \"The future worth amount of Machine B in RS. \",round(FW_B,3);\n", - "print \"The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\";\n", - "print \" Calculation in the book is not accurate\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The future worth amount of Machine A in RS. 620580.864\n", - "The future worth amount of Machine B in RS. 708815.488\n", - "The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\n", - " Calculation in the book is not accurate\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter6.ipynb b/Engineering_Economics/Chapter6.ipynb deleted file mode 100755 index c0d35ab9..00000000 --- a/Engineering_Economics/Chapter6.ipynb +++ /dev/null @@ -1,230 +0,0 @@ -{ - "metadata": { - "name": "EE-6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": "Annual Equivalent Method" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.1 Page 70" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nrun=20000.0; #km\nkmperlitre=9; #kmpl\ncost=21;\nG=2222.20;#in Rs.\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\ncon=run/kmperlitre;#consumption\nA1=con*cost;\nA=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;\n\n#result\nprint \"Annual equal amount spending for petrol in Rs. : \",round(A,3);\nprint \"This amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. \";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Annual equal amount spending for petrol in Rs. : 49543.741\nThis amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. \n" - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.2 Page 71" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternative 1\nP=500000.0;#in Rs\nA=200000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calcultion\nAE_1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 1 in RS. : \",round(AE_1,3);\n\n#alternative 2\nP=400000.0;#in Rs\nA=300000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nAE_2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 2 in RS. : \",round(AE_2,3);\n\n#alternative 3\nP=600000.0;#in Rs\nA=150000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nAE_3=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 3 in RS. : \",round(AE_3,3);\nprint\"The annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. \";\nprint \" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Annual equivalent cost of alternative 1 in RS. : 306941.06\nThe Annual equivalent cost of alternative 2 in RS. : 385552.848\nThe Annual equivalent cost of alternative 3 in RS. : 278329.272\nThe annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. \n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.3 Page 73" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternative a\nP=150000.0;#in Rs\nA=60000.0;#in Rs\nS=15000.0;#in Rs\ni=25.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE_A=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent revenue of alternative A in RS. : \",round(AE_A,3)\n\n#alternative b\nP=175000.0;#in Rs\nA=70000.0;#in Rs\nS=35000.0;#in Rs\ni=25.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE_B=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent revenue of alternative B in RS. : \",round(AE_B,3)\nprint \"The annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A\";\nprint \" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Annual equivalent revenue of alternative A in RS. : 6050.69\nThe Annual equivalent revenue of alternative B in RS. : 9191.456\nThe annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A\n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.4 Page 75" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#machine X\nP=150000.0;#in Rs\nA=0.0;#in Rs\nS=0.0;#in Rs\ni=15.0;#in % per annum\nn=12.0;#in years\n\n#calcualtion\nAE_X=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. : \",round(AE_X,3);\n\n#machine Y\nP=240000.0;#in Rs\nA=4500.0;#in Rs\nS=60000.0;#in Rs\ni=15.0;#in % per annum\nn=12.0;#in years\n\n#calcualtion\nAE_Y=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine Y in RS. : \",round(AE_Y,3);\nprint \"The annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. \";\nprint\" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Annual equivalent cost of machine X in RS. : 27672.116\nThe Annual equivalent cost of machine Y in RS. : 44275.386\nThe annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. \n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.5 Page 76" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initialisation of variable\n#alternative 1\nFC=15*150000.0;#in Rs\nMC=15*6000.0;#in Rs\nPL=15*15000.0;#in Rs\n\n#calculation\nMCPL=MC+PL;#in Rs\nS=15*90000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\nAE1=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE1,3);\n\n#alternative 2\nFC=5*750000.0;#in Rs\nMC=5*12000.0;#in Rs\nPL=5*15000.0;#in Rs\nMCPL=MC+PL;#in Rs\nS=5*150000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calcualtion\nAE2=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.\";\nprint \" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Annual equivalent cost for this alternative in RS. 671415.347\nThe Annual equivalent cost for this alternative in RS. 760551.158\nThe annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.\n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.6 Page 78" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternative 1\nVC=390000.0;#in Rs\nLpY=60000.0/30;#in litres\nFcY=2000.0*8;#in Rs\nAllExp=FcY+9000.0+15000.0;#in Rs\nS=60000.0;#in Rs\ni=20.0;#in % per annum\nn=4.0;#in years\n\n#calcualtion\nAE1=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE1,3);\n\n#alternative 2\nVC=360000.0;#in Rs\nLpY=60000.0/20;#in litres\nFcY=3000.0*20;#in Rs\nAllExp=FcY+6000.0+15000.0;#in Rs\nS=90000.0;#in Rs\ni=20.0;#in % per annum\nn=3.0;#in years\n\n#calculation\nAE2=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);# in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.\";\nprint \" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Annual equivalent cost for this alternative in RS. 179475.41\nThe Annual equivalent cost for this alternative in RS. 227175.824\nThe annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.\n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.7 Page 79" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternative 1\nPprice=390000.0;#in Rs\nn=3.0;#in years\nn=n*12;#in months\nS=120000.0;#in Rs\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nME1=Pprice*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Monthly equivalent cost for this alternative in RS. \",round(ME1,3);\n\n#Alternative 2 \nLeaseAmount=10500.0;#in Rs\n\n#calcualtion\nMonthlyEquiCost=LeaseAmount;#in Rs.\n\n#result\nprint\"The Monthly equivalent cost for this alternative in RS. \",round(MonthlyEquiCost,3);\nprint\"The monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Monthly equivalent cost for this alternative in RS. 10167.864\nThe Monthly equivalent cost for this alternative in RS. 10500.0\nThe monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash.\n" - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.8 Page 81" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#machine A\nIC=300000.0;#in Rs\nn=4.0;#in years\nS=200000.0;#in Rs\nAM=30000.0;#in Rs\ni=15.0;#in % per annum\n\n#calcualtion\nAE_A=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. \",round(AE_A,3);\n\n#Machine B :\nIC=600000.0;#in Rs\nn=4.0;#in years\nS=300000.0;#in Rs\nAM=0.0;#in Rs\ni=15.0;#in % per annum\n\n#calcualtion\nAE_B=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. \",round(AE_B,3);\nprint \"The annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A \";\nprint \" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The Annual equivalent cost of machine X in RS. 95026.535\nThe Annual equivalent cost of machine X in RS. 150079.605\nThe annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A \n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.9 Page 83" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternative 1\nDP=60000.0;#in Rs\nP1=15000.0;#in Rs\nn=1.0;#in years\ni=12.0;#in % Compounded anually\n\n#calculation\nPW1=DP+P1*1/((1+i/100)**n);#in RS\nn=4.0;#in years\nAE1=PW1*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)\n\n#result\nprint \"The annual equivalent for this alternative in RS. \",round(PW1,3);\nprint \"The annual equivalent for this alternative in RS.\",round(AE1,3);\n\n#alternative 2\nP4y=90000.0;#in Rs\nAE2=P4y*(i/100)/(((1+i/100)**n)-1);#in Rs.\n\n#result\nprint \"The annual equivalent for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.\";\nprint \" Calculation in the book is not accurate.\"", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The annual equivalent for this alternative in RS. 73392.857\nThe annual equivalent for this alternative in RS. 24163.456\nThe annual equivalent for this alternative in RS. 18831.099\nThe annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.\n Calculation in the book is not accurate.\n" - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 6.10 Page 85" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initation of variable\n#Brand C : \nw=12.0;#in months\nP=1200.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand C : \nw=24.0;#in months\nP=1800.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand C : \nw=36.0;#in months\nP=2100.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand D : \nw=48.0;#in months\nP=2700.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_D=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_D,3);\nprint \"Here common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.\";\nprint \"The annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.\";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The annual equivalent for this brand in RS. 106.619\nThe annual equivalent for this brand in RS. 84.732\nThe annual equivalent for this brand in RS. 69.75\nThe annual equivalent for this brand in RS. 71.101\nHere common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.\nThe annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.\n" - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter7.ipynb b/Engineering_Economics/Chapter7.ipynb deleted file mode 100755 index 827a806e..00000000 --- a/Engineering_Economics/Chapter7.ipynb +++ /dev/null @@ -1,125 +0,0 @@ -{ - "metadata": { - "name": "EE-7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": "Rate of Return Method" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 7.1 Page 89" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of vriable\nIi=100000.0;#in Rs\nAr=30000.0;#in Rs\nn=5.0;#in years\ni1=10.0;#in % per annum\n\n#calcualton\nPW1=-Ii+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\n\n#calcualtion\ni2=15.0;#in % per annum\nPW2=-Ii+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\n\n#result\nprint \"The present worth for i=15% in RS. \",round(PW2,3);\n\n#calculation\ni3=18.0;#in % per annum\nPW3=-Ii+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni=15+(PW2-0)*(i3-i2)/(PW2-PW3);#in Rs\n\n#result\nprint \"The present worth for i=18% in RS. \",round(PW3,3)\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return for the new business in % per annum \",round(i,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The present worth for i=10% in RS. 13723.603\nThe present worth for i=15% in RS. 564.653\nThe present worth for i=18% in RS. -6184.869\nPresent worth for i=15% is suitable.\nTherefore, the rate of return for the new business in % per annum 15.251\n" - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 7.2 Page 90" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nIo=2000000.0;#in Rs\nANP=350000.0;#in Rs\nS=0.0;#in Rs\nn=10.0;#in years\ni1=10.0;#in % per annum\n\n#calcualtion\nPW1=-Io+ANP*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\n\n#calculation\ni2=12.0;#in % per annum\nPW2=-Io+ANP*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=10+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=15% in RS. \",round(PW2,3);\nprint \"Present worth for i=10% is suitable.\";\nprint \"Therefore, the rate of return for the new business in % per annum \",round(i,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The present worth for i=10% in RS. 150598.487\nThe present worth for i=15% in RS. -22421.94\nPresent worth for i=10% is suitable.\nTherefore, the rate of return for the new business in % per annum 11.741\n" - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 7.3 Page 91" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternate 1\nIo=150000.0;#in Rs\nAp=45570.0;#in Rs\nn=5.0;#in years\n\n#calculation\ni1=10.0;#in % per annum\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=12.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni3=15.0;#in % per annum\nPW3=-Io+Ap*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=18.0;#in % per annum\nPW4=-Io+Ap*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\nprint \"The present worth for i=12% in RS. \",round(PW2,3);\nprint \"The present worth for i=15% in RS. \",round(PW3,3);\nprint \"The present worth for i=18% in RS. \",round(PW4,3);\nprint\"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\n\n#alternative 2\nIo=210000.0;#in Rs\nAp=58260.0;#in Rs\nn=5.0;#in years\ni1=12.0;#in % per annum\n\n#calcualtion\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=13.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=12% in RS. \",round(PW1,3);\nprint \"The present worth for i=13% in RS. \",round(PW2,3);\nprint\"Present worth for i=12% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\n\n#Alternative 3:\nIo=255000.0;#in Rs\nAp=69000.0;#in Rs\nn=5.0;#in years\ni1=11.0;#in % per annum\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=12.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=11% in RS. \",round(PW1,3);\nprint \"The present worth for i=12% in RS. \",round(PW2,3);\nprint\"Present worth for i=12% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\nprint\"It is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. \";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The present worth for i=10% in RS. 22746.153\nThe present worth for i=12% in RS. 14269.652\nThe present worth for i=15% in RS. 2757.708\nThe present worth for i=18% in RS. -7494.817\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative in % per annum : 15.807\nThe present worth for i=12% in RS. 14.262\nThe present worth for i=13% in RS. -5086.107\nPresent worth for i=12% is suitable.\nTherefore, the rate of return of alternative in % per annum : 12.003\nThe present worth for i=11% in RS. 16.894\nThe present worth for i=12% in RS. -6270.442\nPresent worth for i=12% is suitable.\nTherefore, the rate of return of alternative in % per annum : 11.003\nIt is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. \n" - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 7.4 Page 94" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nA0=-1275.0;#in Rs\nA1=150.0;#in Rs\nG=150.0;#in Rs\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#calcualtion\nA=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in RS\ni1=10.0;#in % per annum\nPW1=A0+(A1+G*(((1+i1/100)**n)-i1*n/100-1)/(((i1/100)*(1+i1/100)**n)-i1/100))*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#i1n Rs.\ni2=12.0;#i2n % per annum\nPW2=A0+(A1+G*(((1+i2/100)**n)-i2*n/100-1)/(((i2/100)*(1+i2/100)**n)-i2/100))*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#i2n Rs.\ni3=15.0;#i3n % per annum\nPW3=A0+(A1+G*(((1+i3/100)**n)-i3*n/100-1)/(((i3/100)*(1+i3/100)**n)-i3/100))*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#i3n Rs.\ni4=18.0;#in % per annum\nPW4=A0+(A1+G*(((1+i4/100)**n)-i4*n/100-1)/(((i4/100)*(1+i4/100)**n)-i4/100))*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in Rs.\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The annual equivalent of the positive cash flows in RS. : \",round(A,3);\nprint \"PW(10)\",round(PW1,3);\nprint \"PW(12)\",round(PW2,3);\nprint \"PW(15)\",round(PW3,3);\nprint \"PW(18)\",round(PW1,4);\nprint\"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return for the given cash flow in % per annum :\",round(i,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The annual equivalent of the positive cash flows in RS. : 421.519\nPW(10) 322.888\nPW(12) 225.269\nPW(15) 94.095\nPW(18) 322.8882\nPresent worth for i=15% is suitable.\nTherefore, the rate of return for the given cash flow in % per annum : 17.448\n" - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 7.5 Page 95" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\n#alternative 1\nIo=500000.0;#in Rs\nAr=170000.0;#in Rs\nn=5.0;#in years\ni1=15.0;#in % per annum\n\n#calculation\nPW1=-Io+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=17.0;#in % per annum\nPW2=-Io+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni3=20.0;#in % per annum\nPW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=22.0;#in % per annum\nPW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth(PW(15%)) for i=10% in RS. \",round(PW1,3);\nprint \"The present worth(PW(17%)) for i=10% in RS. \",round(PW2,3);\nprint \"The present worth(PW(20%)) for i=10% in RS. \",round(PW3,3);\nprint \"The present worth(PW(22%)) for i=10% in RS. \",round(PW4,3);\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative 1 in % per annum \",round(i,3);\n\n#altenative 2\nIo=800000.0;#in Rs\nAr=270000.0;#in Rs\nn=5.0;#in years\ni3=20.0;#in % per annum\n\n#calculation\nPW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=22.0;#in % per annum\nPW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth(PW(20%)) for i=10% in RS. \",round(PW3,3);\nprint \"The present worth(PW(22%)) for i=10% in RS. \",round(PW4,3);\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative 2 in % per annum \",round(i,3);\nprint \"Since the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. \";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "The present worth(PW(15%)) for i=10% in RS. 69866.367\nThe present worth(PW(17%)) for i=10% in RS. 43888.848\nThe present worth(PW(20%)) for i=10% in RS. 8404.064\nThe present worth(PW(22%)) for i=10% in RS. -13181.241\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative 1 in % per annum 20.779\nThe present worth(PW(20%)) for i=10% in RS. 7465.278\nThe present worth(PW(22%)) for i=10% in RS. -26817.264\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative 2 in % per annum 20.436\nSince the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. \n" - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter8.ipynb b/Engineering_Economics/Chapter8.ipynb deleted file mode 100755 index de307e62..00000000 --- a/Engineering_Economics/Chapter8.ipynb +++ /dev/null @@ -1,619 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:44663c03d7c23760034bea6db3765d8b79a48144d6b54769443d3f295fd0b9f3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Replacement and Maintenance Analysis" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1 Page 103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "FC=4000.0;#in Rs.\n", - "i=0.0;#in % per annum\n", - "MC1=0;#in Rs.\n", - "print \"Tabulation to determine economic life : \";\n", - "print\"End of Maintenance Summation of Avg cost of Avg FC if Avg total\";\n", - "print\" year cost at end maintenance maintenance replaced at cost through\";\n", - "print\" of year costs through year year given year given\";\n", - "print\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\";\n", - "print\" 1 0 0 0 4000 4000\";\n", - "print\" 2 200 200 100 2000 2100\";\n", - "print\" 3 400 600 200 1333.33 1533.33\";\n", - "print\" 4 600 1200 300 1000 1300\";\n", - "print\" 5 800 2000 400 800 1200\";\n", - "print\" 6 1000 3000 500 666.67 1166.67\";\n", - "print\" 7 1200 4200 600 571.43 1171.43\";\n", - "print\"Economic life of the machine : 6 years\";\n", - "print\"Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\";\n", - "\n", - "#When i=12%\n", - "i=12.0;#in % per annum\n", - "FC=4000.0;#in Rs.\n", - "print\"Tabulation to determine economic life : \";\n", - "print\"End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\";\n", - "print\" year cost at end 12% of year of PW of cumulative 12% total cost\";\n", - "print\" of year n maintenance maintenance maintenance n of year\";\n", - "print\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\";\n", - "print\" 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\";\n", - "print\" 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\";\n", - "print\" 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\";\n", - "print\" 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\";\n", - "print\" 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\";\n", - "print\" 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\";\n", - "print\" 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\";\n", - "print\" 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\";\n", - "print\" 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\";\n", - "print\" 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\";\n", - "print\"Economic life of the machine : 7 years\";\n", - "print\"For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\";\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Tabulation to determine economic life : \n", - "End of Maintenance Summation of Avg cost of Avg FC if Avg total\n", - " year cost at end maintenance maintenance replaced at cost through\n", - " of year costs through year year given year given\n", - " A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\n", - " 1 0 0 0 4000 4000\n", - " 2 200 200 100 2000 2100\n", - " 3 400 600 200 1333.33 1533.33\n", - " 4 600 1200 300 1000 1300\n", - " 5 800 2000 400 800 1200\n", - " 6 1000 3000 500 666.67 1166.67\n", - " 7 1200 4200 600 571.43 1171.43\n", - "Economic life of the machine : 6 years\n", - "Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\n", - "Tabulation to determine economic life : \n", - "End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\n", - " year cost at end 12% of year of PW of cumulative 12% total cost\n", - " of year n maintenance maintenance maintenance n of year\n", - " A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\n", - " 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\n", - " 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\n", - " 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\n", - " 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\n", - " 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\n", - " 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\n", - " 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\n", - " 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\n", - " 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\n", - " 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\n", - "Economic life of the machine : 7 years\n", - "For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2 Page 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "FC=20000.0;#in Rs.\n", - "i=15.0;#in % per annum\n", - "\n", - "#result\n", - "print \"The other details are summarized in Table 8.3. It can be seen from the book.\";\n", - "print \"Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\";\n", - "print \"In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The other details are summarized in Table 8.3. It can be seen from the book.\n", - "Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\n", - "In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3 Page 107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "FC=20000.0;#in Rs.\n", - "i=15.0;#in % per annum\n", - "\n", - "#result\n", - "print \"The details are summarized in Table 8.4. It can be seen from the book.\";\n", - "print\"Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\";\n", - "print\"(column E + Rs. 6000)* Column G\";\n", - "print \"Column F * Column G\";\n", - "print \"In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \";\n", - "print \"RESULT : Min annual equivalent cost for machine A : Rs. 2780\";\n", - "print \"Min annual equivalent cost for machine B : Rs. 3672.30\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The details are summarized in Table 8.4. It can be seen from the book.\n", - "Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\n", - "(column E + Rs. 6000)* Column G\n", - "Column F * Column G\n", - "In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \n", - "RESULT : Min annual equivalent cost for machine A : Rs. 2780\n", - "Min annual equivalent cost for machine B : Rs. 3672.30\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4 Page 109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#alternative 1\n", - "Pprice=200000.0;#in Rs\n", - "P=120000.0;#in Rs\n", - "F=25000.0;#in Rs\n", - "A=25000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=6.0;#in years\n", - "\n", - "#calculation\n", - "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE1,3);\n", - "\n", - "#Alternative 2\n", - "P=150000.0;#in Rs\n", - "F=20000.0;#in Rs\n", - "A=14000.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=6.0;#in years\n", - "\n", - "#calcualion\n", - "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE2,3);\n", - "print \"Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\";\n", - "print \"answer is bit different due to approximation error\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equivalent cost(AE(12%)) of this alternative in RS. 51106.443\n", - "The annual equivalent cost(AE(12%)) of this alternative in RS. 48019.343\n", - "Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\n", - "answer is bit different due to approximation error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5 Page 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initation of variable\n", - "#alternative 1\n", - "Pprice=50000.0;#in Rs\n", - "P=15000.0;#in Rs\n", - "F=8000.0;#in Rs\n", - "A=14000.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=5.0;#in years\n", - "\n", - "#calcualtion\n", - "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(15%)) of this alternative in RS. \",round(AE1,3);\n", - "\n", - "#Alternative 2\n", - "P=65000.0;#in Rs\n", - "F=13000.0;#in Rs\n", - "A=9000.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=20.0;#in years\n", - "\n", - "#calculation\n", - "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(15%)) of this alternative in RS. : \",round(AE2,3);\n", - "print \"Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equivalent cost(AE(15%)) of this alternative in RS. 17288.209\n", - "The annual equivalent cost(AE(15%)) of this alternative in RS. : 19257.596\n", - "Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6 Page 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#intiation of variable\n", - "P=660000.0;#in Rs\n", - "F=400000.0;#in Rs\n", - "A=96000.0;#in Rs\n", - "i=10.0;#in % per annum\n", - "n=5.0;#in years\n", - "\n", - "#caculation\n", - "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE1,3);\n", - "\n", - "#Alternative 2\n", - "P=150000.0;#in Rs\n", - "X=420000.0;#in Rs\n", - "i=10.0;#in % per annum\n", - "n=40.0;#in years\n", - "\n", - "#calcualtion\n", - "AE2=(P-X)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE2,3);\n", - "print \"Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\";\n", - "print \" calculations in the book is not accurate.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equivalent cost(AE(10%)) of this alternative in RS. : 204587.345\n", - "The annual equivalent cost(AE(10%)) of this alternative in RS. : 108389.958\n", - "Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\n", - " calculations in the book is not accurate.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7 Page 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "#alternative 1\n", - "P=10000.0;#in Rs\n", - "F=1500.0;#in Rs\n", - "A=1600.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=7.0;#in years\n", - "\n", - "#calcualtion\n", - "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : \",round(AE1,3);\n", - "\n", - "#alternative 1 part 2\n", - "P=10000;#in Rs\n", - "F=800.0;#in Rs\n", - "A=1000.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=7.0;#in years\n", - "\n", - "#calcualtion\n", - "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "#result\n", - "print \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. \",round(AE2,3);\n", - "print \"Total annual equivalent cost of alternative in Rs. : \",round(AE1+AE2,3);\n", - "\n", - "\n", - "#Alternative 2\n", - "P=35000.0;#in Rs\n", - "F=4000.0;#in Rs\n", - "A=500.0;#in Rs\n", - "i=15.0;#in % per annum\n", - "n=7.0;#in years\n", - "\n", - "#calcualtion\n", - "AE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "\n", - "print \"The annual equivalent cost of alternative 2 in RS.\",round(AE,3);\n", - "print\"Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\";\n", - "print \" calculations in the book is not accurate\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : 3868.063\n", - "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. 3331.315\n", - "Total annual equivalent cost of alternative in Rs. : 7199.378\n", - "The annual equivalent cost of alternative 2 in RS. 8551.171\n", - "Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\n", - " calculations in the book is not accurate\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.8 Page 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "P=10000.0;#in Rs\n", - "F=4000.0;#in Rs\n", - "A=500.0;#in Rs\n", - "i=12.0;#in % per annum\n", - "n=4.0;#in years\n", - "\n", - "#calcualtion\n", - "AE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n", - "X= (AE-1000*i/100-750)/0.3292+1000;\n", - "#result\n", - "print \"The annual equivalent cost(AE(15%)) of n in RSew machine : \",round(AE,3);\n", - "print \"The comparative use value of old machine is Rs.\", round(X,3), \"which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \";\n", - "print\"Therefore, it is advisable to replace the old machine with the new one.\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual equivalent cost(AE(15%)) of n in RSew machine : 2955.407\n", - "The comparative use value of old machine is Rs. 7334.771 which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \n", - "Therefore, it is advisable to replace the old machine with the new one.\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9 Page 117" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Intiation of Variable\n", - "p1=0.07;#unitless\n", - "p2=0.11;#unitless\n", - "p3=0.12;#unitless\n", - "p4=0.18;#unitless\n", - "p5=0.21;#unitless\n", - "p6=0.20;#unitless\n", - "p7=0.11;#unitless\n", - "N0=100.0;#no. of transistors\n", - "\n", - "#calcualtion\n", - "N1=N0*p1;#no. of transistors\n", - "N2=N0*p2;#no. of transistors\n", - "N3=N0*p3;#no. of transistors\n", - "N4=N0*p4;#no. of transistors\n", - "N5=N0*p5;#no. of transistors\n", - "N6=N0*p6;#no. of transistors\n", - "N7=N0*p7;#no. of transistors\n", - "Life=0;#in weeks\n", - "p=[p1, p2, p3, p4, p5, p6, p7];#Unitless\n", - "for i in range (7): \n", - " Life=Life+(i+1)*p[i];\n", - "\n", - "#result\n", - "print \"Expected life of each transistor in weeks : \",round(Life,3)\n", - "print \"Average No. of failures/week : \",round(100/Life);\n", - "\n", - "#result of group replacement cost \n", - "print \"Cost of transistor when replaced simultaneously = Rs. 3\";\n", - "print \"Cost of transistor when replaced individually = Rs. 9\";\n", - "print \"The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\";\n", - "print \"From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\";\n", - "print \"Individual replacement cost/week = Rs. 207\";\n", - "print \"Minimum group replacement ost/week = Rs. 196.50\";\n", - "print \"Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Expected life of each transistor in weeks : 4.39\n", - "Average No. of failures/week : 23.0\n", - "Cost of transistor when replaced simultaneously = Rs. 3\n", - "Cost of transistor when replaced individually = Rs. 9\n", - "The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\n", - "From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\n", - "Individual replacement cost/week = Rs. 207\n", - "Minimum group replacement ost/week = Rs. 196.50\n", - "Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.10 Page 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#initiation of variable\n", - "p1=(100.0-96)/100;#unitless\n", - "p2=(96.0-89)/100;#unitless\n", - "p3=(89.0-68)/100;#unitless\n", - "p4=(68.0-37)/100;#unitless\n", - "p5=(37.0-13)/100;#unitless\n", - "p6=(13.0-0)/100;#unitless\n", - "N0=1000.0;#no. of resistors\n", - "\n", - "#calculation\n", - "N1=N0*p1;#no. of resistors\n", - "N2=N0*p2+N1*p1;#no. of resistors\n", - "N3=N0*p3+N1*p2+N2*p1;#no. of resistors\n", - "N4=N0*p4+N1*p3+N2*p2+N3*p1;#no. of resistors\n", - "N5=N0*p5+N1*p4+N2*p3+N3*p2+N4*p1;#no. of resistors\n", - "N6=N0*p6+N1*p5+N2*p4+N3*p3+N4*p2+N5*p1 ;#no. of resistors\n", - "\n", - "Life=0;#in months\n", - "p=[p1, p2, p3, p4, p5, p6];#Unitless\n", - "for i in range (6): \n", - " Life=Life+(i+1)*p[i];\n", - "\n", - "#result\n", - "print \"Expected life of each transistor in weeks : \",round(Life,3)\n", - "print \"Average No. of failures/week : \",round(1000/Life);\n", - "\n", - "#result of group replacement cost\n", - "print \"Cost/transistor when replaced simultaneously = Rs. 4\";\n", - "print \"Cost/transistor when replaced individually = Rs. 10\";\n", - "print \"The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\";\n", - "print \"From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\";\n", - "print \"Individual replacement cost/month = Rs. 2480\";\n", - "print \"Minimum group replacement ost/month = Rs. 2426.67\";\n", - "print \"Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Expected life of each transistor in weeks : 4.03\n", - "Average No. of failures/week : 248.0\n", - "Cost/transistor when replaced simultaneously = Rs. 4\n", - "Cost/transistor when replaced individually = Rs. 10\n", - "The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\n", - "From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\n", - "Individual replacement cost/month = Rs. 2480\n", - "Minimum group replacement ost/month = Rs. 2426.67\n", - "Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/Chapter9.ipynb b/Engineering_Economics/Chapter9.ipynb deleted file mode 100755 index 6221daa0..00000000 --- a/Engineering_Economics/Chapter9.ipynb +++ /dev/null @@ -1,209 +0,0 @@ -{ - "metadata": { - "name": "EE-9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": "Depreciation" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.1 Page 127" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=100000;#book vakue\n\n#calcualtion\nDt=(P-F)/n;#in Rs.\n\n#result\nprint \"End of year Depreciation Book value\";\nfor i in range (8):\n B=Bt-i*Dt;\n print eoy[i],\" \",Dt,\" \", B,\" \";\n \n \n ", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "End of year Depreciation Book value\n0 10000.0 100000.0 \n1 10000.0 90000.0 \n2 10000.0 80000.0 \n3 10000.0 70000.0 \n4 10000.0 60000.0 \n5 10000.0 50000.0 \n6 10000.0 40000.0 \n7 10000.0 30000.0 \n" - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.2 Page 127" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\n\n#calculation\nD5=(P-F)/n;#in Rs.\nt=5;#in years\nBt=P-t*(P-F)/n;#in Rs\n\n#result\nprint \"D5 in Rs. : \",round(D5,3);\nprint \"(This is independent of the time period)\";\nprint \"B5 in Rs. : \",round(Bt,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "D5 in Rs. : 10000.0\n(This is independent of the time period)\nB5 in Rs. : 50000.0\n" - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.3 Page 129" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.2\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\n\n#result\nprint \"End of year Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n Dt[i]=k*Bt[i-1];\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",Dt[i],\" \", Bt[i],\" \";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "End of year Depreciation Book value\n0 0 100000\n1 20000.0 80000.0 \n2 16000.0 64000.0 \n3 12800.0 51200.0 \n4 10240.0 40960.0 \n5 8192.0 32768.0 \n6 6553.6 26214.4 \n7 5242.88 20971.52 \n8 4194.304 16777.216 \n" - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.4 Page 128" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.2\nt=5.0;#in years\n\n#calculation\nDt=k*(1-k)**(t-1)*P;#in Rs.\nBt=((1-k)**t)*P;#in Rs.\n\n#result\nprint \"D5 in Rs. : \",round(Dt,3);\nprint \"B5 in Rs. : \",round(Bt,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "D5 in Rs. : 8192.0\nB5 in Rs. : 32768.0\n" - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.5 Page 129" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nSum=n*(n+1)/2;#sum of the years\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\nrate=[0.0,0,0,0,0,0,0,0,0];\n\n#result\nprint \"End of year Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n rate[i]=(8-i+1)/36.0;\n Dt[i]=rate[i]*(P-F);\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",Dt[i],\" \", Bt[i],\" \";", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "End of year Depreciation Book value\n0 0 100000\n1 17777.7777778 82222.2222222 \n2 15555.5555556 66666.6666667 \n3 13333.3333333 53333.3333333 \n4 11111.1111111 42222.2222222 \n5 8888.88888889 33333.3333333 \n6 6666.66666667 26666.6666667 \n7 4444.44444444 22222.2222222 \n8 2222.22222222 20000.0 \n" - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.6 Page 131" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nt=5.0;#in years\n\n#cacualtion\nDt=(n-t+1)*(P-F)/(n*(n+1)/2);#in Rs.\nBt=(P-F)*((n-t)/n)*((n-t+1)/(n+1))+F;#in Rs.\n\n#result\nprint \"D5 in Rs. : \",round(Dt,3);\nprint \"B5 in Rs. : \",round(Bt,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "D5 in Rs. : 8888.889\nB5 in Rs. : 33333.333\n" - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.7 Page 132" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.12;\ni=12.0;#in % per annum\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\nrate=[0.0,0,0,0,0,0,0,0,0];\nSUM=0;\n\n#calculation\nA=(P-F)*(i/100)/(((1+i/100)**n)-1);\n\n#result\nprint \"End of year Net Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n Dt[i]=k*SUM+A;\n SUM=SUM+Dt[i]\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",round(Dt[i],3),\" \", round(Bt[i],3),\" \";\n \nprint \"fixed deprececiation which is constant in Rs\",round(A,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "End of year Net Depreciation Book value\n0 0 100000\n1 6504.227 93495.773 \n2 7284.735 86211.038 \n3 8158.903 78052.135 \n4 9137.971 68914.164 \n5 10234.528 58679.637 \n6 11462.671 47216.966 \n7 12838.191 34378.774 \n8 14378.774 20000.0 \nfixed deprececiation which is constant in Rs 6504.227\n" - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.8 Page 133" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\ni=12.0;#in % per annum\nt=5.0;#in Years\n\n#calculation\nDt=(P-F)*(i/100)/(((1+i/100)**n)-1)*(1+i/100)**(t-1);#in Rs.\nt=7;#in Years\nBt=P-(P-F)*(i/100)/(((1+i/100)**n)-1)*(((1+i/100)**t)-1)/(i/100);#in Rs.\n\n#result\nprint \"D7 in Rs. : \",round(Dt,3);\nprint \"B7 in Rs. : \",round(Bt,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "D7 in Rs. : 10234.528\nB7 in Rs. : 34378.774\n" - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": "Example 9.9 Page 134" - }, - { - "cell_type": "code", - "collapsed": false, - "input": "#initiation of variable\nP=8000000.0;#in Rs\nF=50000.0;#in Rs\nX=75000.0;#in Km\nx=2000.0;#in Km\nn=8.0;#in years\ni=12.0;#in % per annum\n\n#calcualtion\nD=(P-F)*x/X;#in Rs.\n\n#result\nprint \"Depreciation for year 3 in Rs. : \",round(D,3);", - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": "Depreciation for year 3 in Rs. : 212000.0\n" - } - ], - "prompt_number": 32 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Engineering_Economics/README.txt b/Engineering_Economics/README.txt deleted file mode 100755 index 27bb08be..00000000 --- a/Engineering_Economics/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Tarun Kumar Das -Course: btech -College/Institute/Organization: College of Engineering -Department/Designation: Industrial Engineering -Book Title: Engineering Economics -Author: R. Panneerselvam -Publisher: Phi Learning, Delhi -Year of publication: 2010 -Isbn: 978-81-203-1743-7 -Edition: 1 \ No newline at end of file diff --git a/Engineering_Economics/screenshots/Depriciation_and_Book_value.png b/Engineering_Economics/screenshots/Depriciation_and_Book_value.png deleted file mode 100755 index 3c2c419d..00000000 Binary files a/Engineering_Economics/screenshots/Depriciation_and_Book_value.png and /dev/null differ diff --git a/Engineering_Economics/screenshots/Economic_order_and_Time.png b/Engineering_Economics/screenshots/Economic_order_and_Time.png deleted file mode 100755 index 623d5718..00000000 Binary files a/Engineering_Economics/screenshots/Economic_order_and_Time.png and /dev/null differ diff --git a/Engineering_Economics/screenshots/Expected_Saving.png b/Engineering_Economics/screenshots/Expected_Saving.png deleted file mode 100755 index 6970da10..00000000 Binary files a/Engineering_Economics/screenshots/Expected_Saving.png and /dev/null differ diff --git a/Engineering_Economics/screenshots/Present_Worth.png b/Engineering_Economics/screenshots/Present_Worth.png deleted file mode 100755 index c5295c6e..00000000 Binary files a/Engineering_Economics/screenshots/Present_Worth.png and /dev/null differ diff --git a/Engineering_Economics/screenshots/future_sum.png b/Engineering_Economics/screenshots/future_sum.png deleted file mode 100755 index 50e1aa00..00000000 Binary files a/Engineering_Economics/screenshots/future_sum.png and /dev/null differ diff --git a/Engineering_Economics/screenshots/maturity_value.png b/Engineering_Economics/screenshots/maturity_value.png deleted file mode 100755 index 72bd0ac4..00000000 Binary files a/Engineering_Economics/screenshots/maturity_value.png and /dev/null differ diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb new file mode 100755 index 00000000..8a14db85 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "EE-10" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Evaluation of Public Alternatives" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.1 Page 138" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIi=4000000.0;#in Rs.\nAM=150000.0;#in Rs.\nAFS=600000.0;#in Rs.\nEinc=50000.0;#in Rs.\ni=12.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nCp=AM*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\nTPW=Ii+Cp;#in RS\n\n#result\nprint \"Total present worth of costs in RS. : \",round(TPW,3);\n\n#Total present worth of fuel savings:\nAI=600000.0;#in Rs.\nG=50000.0;#in Rs.\ni=12.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nA=AI+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100);#in RS\nBp=A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs.\nBCratio=Bp/(Ii+Cp);#unitless\n\n#result\nprint \"Present worth of fuel savings in Rs. : \",round(Bp,3);\nprint \"BCratio : \",round(BCratio,3);\nprint\"Since BC ratio is more than 1, the construction of the bridge across the river is justified.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total present worth of costs in RS. : 5021629.673\nPresent worth of fuel savings in Rs. : 5782527.265\nBCratio : 1.152\nSince BC ratio is more than 1, the construction of the bridge across the river is justified.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.2 Page 139" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIc=80000000.0;#in Rs.\nAps=6000000.0;#in Rs.\nAfs=3000000.0;#in Rs.\nAib=5000000.0;#in Rs.\nArb=2000000.0;#in Rs.\nAmc=3000000.0;#in Rs.\ni=12.0;#in % per annum\nn=50.0;#in years\n\n#calculation\nTAB=Afs+Aib+Arb;#in Rs.\nPW_B=TAB*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n\n#result\nprint \"Total present worth of benefits in RS. : \",round(PW_B,3);\n\n#Present worth of costs:\nPW_C=Ic+Amc*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)-Aps*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\nBCratio=PW_B/PW_C;#unitless\n\n#result\nprint \"Present worth of costs in Rs. : \",round(PW_C,3);\nprint \"BCratio : \",round(BCratio,3);\nprint \"Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total present worth of benefits in RS. : 83044984.884\nPresent worth of costs in Rs. : 55086504.535\nBCratio : 1.508\nSince BC ratio is more than 1, the state govt. can implement the hydroelectric project.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 10.3 Page 140" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nP=3000000.0;#in Rs.\nB=900000.0;#in Rs.\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\nBCratio=B/AE1;#unitless\n\n#result\nprint \"Annual equivalent of initial cost in Rs. : \",round(AE1,3);\nprint \"BCratio : \",round(BCratio,3);\n\n#Alternative A2 : \nP=6000000.0;#in Rs.\nB=1500000.0;#in Rs.\ni=10.0;#in % per annum\nn=7.0;#in years\n\n#calculation\nAE2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\nBCratio=B/AE2;#unitless\n\n#result\nprint \"Annual equivalent of initial cost in Rs. : \",round(AE2,3);\nprint \"BCratio : \",round(BCratio,3);\nprint \"The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual equivalent of initial cost in Rs. : 791392.442\nBCratio : 1.137\nAnnual equivalent of initial cost in Rs. : 1232432.998\nBCratio : 1.217\nThe benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.4 Page 141" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#cost of the state\nn=20.0;#in years\nP=2500000000.0;#in Rs.\nAgt=10000000.0;#in Rs.\nAi=1000000.0;#in Rs.\nCom=48000.0;#in Rs./year/employee\nC1=Com*300;#in Rs.\ni=10.0;#in % per annum\n\n#calculation\nC2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\nCA=C2+C1;#in Rs\n\n#result\nprint \"Annual equivalent initial cost in Rs. : \",round(C2,3);\nprint \"Total Annual equivalent cost of the project in Rs. : \",round(CA,3);\n\n#Benefit to the state : \nW=30000000.0;#in Rs.\nA1=W*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs.\nAgpy=10000000.0;#in ton/year\nA2=Agpy*(30-10);#in Rs.\nAvgAI=1000000.0;#in tons Km.\nG=20000000.0;#in Rs.\n\n#calculation\nA3=A2+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in Rs.\nBA=A1+A3;#in Rs\nBCratio=BA/CA;#unitless\nprint \"Annual equivalent average of transport cost saving in Rs. : \",round(A3,3);\nprint \"Total annual equivalent benefits to the state : \",round(BA,3);\nprint \"BCratio : \",round(BCratio,3);\nprint \"The benefit cost ratio is more than 1,the project is justified.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual equivalent initial cost in Rs. : 293649061.931\nTotal Annual equivalent cost of the project in Rs. : 308049061.931\nAnnual equivalent average of transport cost saving in Rs. : 330161500.91\nTotal annual equivalent benefits to the state : 333685289.653\nBCratio : 1.083\nThe benefit cost ratio is more than 1,the project is justified.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.5 Page 143" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#project A\ni=9.0;#% per annum\nn=50.0;#in years\nP_A=150000000.0;#in RS.\nFcs_A=2500000;#in Rs.\nIb_A=3500000;#in Rs.\nRb_A=1000000;#in RS.\nOMC_A=2000000.0;#in Rs.\nPsy_A=10000000.0;#in Rs.\n\n#calculation\nAE_A=P_A*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\nCpy_A=AE_A+OMC_A-Psy_A;#in Rs.\nBpy_A=Fcs_A+Ib_A+Rb_A;#in Rs.\nBCratio_A=Bpy_A/Cpy_A;#unitless\n\n#result\nprint \"Costs/year : \",round(Cpy_A,3);\nprint \"Benefits/year : \",round(Bpy_A,3);\nprint \"BC Ratio of project A : \",round(BCratio_A,3)\n\n\n#Project B : \nP_B=250000000.0;#in Rs.\n\nOMC_B=2500000.0;#in Rs.\nPsy_B=12000000.0;#in Rs.\nFcs_B=3500000.0;#in Rs.\nIb_B=4500000.0;#in Rs.\nRb_B=2000000.0;#in RS.\nAE_B=P_B*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\nCpy_B=AE_B+OMC_B-Psy_B;#in Rs.\nBpy_B=Fcs_B+Ib_B+Rb_B;#in Rs.\nBCratio_B=Bpy_B/Cpy_B;#unitless\n\n#result\nprint \"Costs/year : \",round(Cpy_B,3);\nprint \"Benefits/year : \",round(Bpy_B,3);\nprint \"BC Ratio of project B : \",round(BCratio_B,3)\n\n#Project C : \nP_C=400000000.0;#in Rs.\nOMC_C=3500000.0;#in Rs.\nPsy_C=18000000.0;#in Rs.\nFcs_C=5000000.0;#in Rs.\nIb_C=6000000.0;#in Rs.\nRb_C=3500000.0;#in RS.\nAE_C=P_C*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\nBpy_C=Fcs_C+Ib_C+Rb_C;#in Rs.\nCpy_C=AE_C+OMC_C-Psy_C;#in Rs.\nBCratio_C=Bpy_C/Cpy_C;#unitless\n\n#result\nprint \"Costs/year : \",round(Cpy_C,3);\nprint \"Benefits/year : \",round(Bpy_C,3);\nprint \"BC Ratio of project C : \",round(BCratio_C,3)\nprint\"From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Costs/year : 5684030.212\nBenefits/year : 7000000.0\nBC Ratio of project A : 1.232\nCosts/year : 13306717.021\nBenefits/year : 10000000.0\nBC Ratio of project B : 0.752\nCosts/year : 21990747.233\nBenefits/year : 14500000.0\nBC Ratio of project C : 0.659\nFrom the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\n" + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb new file mode 100755 index 00000000..6eb51dc1 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "EE-11" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Inflation Adjusted Decisions" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.1 Page 148" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nprint \"Few steps are as follows : \";\nprint \"Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\";\nprint \"Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\";\nprint \"Formula : P*(1+IR)^n\";\nP=24000.0;#in Rs.\nIR=9.0;#in % per year\nAge=61.0;#in years\nfor n in range(21,31) :\n IV=P*(1+IR/100)**n;#in Rs\n print \"Age in years : \",Age,\". \"\"Inflated value of Rs. 24000 at end of year : \",n,\" in Rs. \",round(IV);\n Age=Age+1;#in Years\n\nPW=0;#For initialising\nn=21.0;#in years\nfor m in range(10) :\n A=P*(1+IR/100)**n;#in Rs\n n=n+1;\n i=15.0;#in % per year\n PW=PW+A/(1+i/100)**(m+1);\n\n#result\nprint \"Present equivalent of withdrawls in Rs. : \",round(PW,3);\n\n#The annual equivalent amount :\ni=15.0;#in % per year\nn=20.0;#in years\n#Formula : (A/F,i,n) : (i/100)/(((1+i/100)^n)-1) \nA=PW*(i/100)/(((1+i/100)**n)-1);#in Rs.\nprint \"The annual equivalent amount in Rs. : \",round(A,3);\nprint\"RECOMMENDATION : The person has to invest an amount of Rs. \",round(A,3),\" at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\"; ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Few steps are as follows : \nStep 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\nStep 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\nFormula : P*(1+IR)^n\nAge in years : 61.0 . Inflated value of Rs. 24000 at end of year : 21 in Rs. 146611.0\nAge in years : 62.0 . Inflated value of Rs. 24000 at end of year : 22 in Rs. 159806.0\nAge in years : 63.0 . Inflated value of Rs. 24000 at end of year : 23 in Rs. 174189.0\nAge in years : 64.0 . Inflated value of Rs. 24000 at end of year : 24 in Rs. 189866.0\nAge in years : 65.0 . Inflated value of Rs. 24000 at end of year : 25 in Rs. 206954.0\nAge in years : 66.0 . Inflated value of Rs. 24000 at end of year : 26 in Rs. 225580.0\nAge in years : 67.0 . Inflated value of Rs. 24000 at end of year : 27 in Rs. 245882.0\nAge in years : 68.0 . Inflated value of Rs. 24000 at end of year : 28 in Rs. 268011.0\nAge in years : 69.0 . Inflated value of Rs. 24000 at end of year : 29 in Rs. 292132.0\nAge in years : 70.0 . Inflated value of Rs. 24000 at end of year : 30 in Rs. 318424.0\nPresent equivalent of withdrawls in Rs. : 1013631.794\nThe annual equivalent amount in Rs. : 9894.537\nRECOMMENDATION : The person has to invest an amount of Rs. 9894.537 at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.2 Page 150" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nprint\"The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\";\nprint\"End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\";\ni=20.0;#in per year\nCum=0.0;#initialising\nOp_cost=40000.0;#in RS.\nMain_cost=60000.0;#in Rs.\nOpMain=Op_cost+Main_cost;#in Rs.\nS=400000.0;#in Rs.\nfor n in range (1,16) :\n PF=1/((1+i/100)**n);\n PW=OpMain*PF;#in Rs.\n Cum=Cum+PW\n PW_S=PF*S;#in RS.\n TPW=500000.0+Cum-PW_S;#in Rs.\n AP=((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n AEM=TPW*AP;#in RS\n print \" \",n,\" \",Op_cost,\" \",Main_cost,\" \",OpMain,\" \",PF,\" \",PW,\" \",Cum,\" \",S,\" \",PW_S,\" \",TPW,\" \",AP,\" \",AEM;\n Op_cost=Op_cost+5000.0;#in Rs.\n Main_cost=Main_cost+6000.0;#in Rs.\n S=S-50000.0;#in Rs.\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\nEnd of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\n 1 40000.0 60000.0 100000.0 0.833333333333 83333.3333333 83333.3333333 400000.0 333333.333333 250000.0 1.2 300000.0\n 2 45000.0 66000.0 100000.0 0.694444444444 69444.4444444 152777.777778 350000.0 243055.555556 409722.222222 0.654545454545 268181.818182\n 3 50000.0 72000.0 100000.0 0.578703703704 57870.3703704 210648.148148 300000.0 173611.111111 537037.037037 0.474725274725 254945.054945\n 4 55000.0 78000.0 100000.0 0.48225308642 48225.308642 258873.45679 250000.0 120563.271605 638310.185185 0.386289120715 246572.280179\n 5 60000.0 84000.0 100000.0 0.401877572016 40187.7572016 299061.213992 200000.0 80375.5144033 718685.699588 0.33437970329 240313.910987\n 6 65000.0 90000.0 100000.0 0.33489797668 33489.797668 332551.01166 150000.0 50234.6965021 782316.315158 0.300705745867 235247.011053\n 7 70000.0 96000.0 100000.0 0.279081647234 27908.1647234 360459.176383 100000.0 27908.1647234 832551.01166 0.277423926347 230969.570539\n 8 75000.0 102000.0 100000.0 0.232568039361 23256.8039361 383715.980319 50000.0 11628.4019681 872087.578351 0.260609422409 227274.240084\n 9 80000.0 108000.0 100000.0 0.193806699468 19380.6699468 403096.650266 0.0 0.0 903096.650266 0.248079461672 224039.730836\n 10 85000.0 114000.0 100000.0 0.16150558289 16150.558289 419247.208555 -50000.0 -8075.27914449 927322.4877 0.238522756883 221187.516286\n 11 90000.0 120000.0 100000.0 0.134587985742 13458.7985742 432706.007129 -100000.0 -13458.7985742 946164.805703 0.231103794152 218662.276491\n 12 95000.0 126000.0 100000.0 0.112156654785 11215.6654785 443921.672608 -150000.0 -16823.4982177 960745.170825 0.225264964904 216422.227187\n 13 100000.0 132000.0 100000.0 0.0934638789872 9346.38789872 453268.060506 -200000.0 -18692.7757974 971960.836304 0.220620001083 214434.000758\n 14 105000.0 138000.0 100000.0 0.0778865658226 7788.65658226 461056.717089 -250000.0 -19471.6414557 980528.358544 0.216893055222 212669.791417\n 15 110000.0 144000.0 100000.0 0.0649054715189 6490.54715189 467547.264241 -300000.0 -19471.6414557 987018.905696 0.213882119838 211105.69587\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.3 Page 152" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIR=5.0;#in % per year\ni=15.0;#in % per year\n#Machine X :\nPpx=1500000.0;#in Rs.\nn=7.0;#in years\nS=200000.0;#in Rs.\nAMC=300000.0;#in Rs.\nprint \"End of year AMC InflationFactor InflatedAmount P/F PW\";\nPw=0;#For initialising\nfor n in range (1,8) :\n FP=(1+IR/100)**n\n IA=AMC*FP;#in Rs.\n PF=1/((1+i/100)**n);\n PW=IA*PF;#in Rs.\n Pw=Pw+PW;#in Rs.\n print\" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n\nprint \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\nPWX=Ppx+Pw-S*1/((1+i/100)**n);\nprint \"Present worth of machine X in Rs. : \",round(PWX,3);\n\n#Machine Y\n\nPpy=2000000.0;#in Rs.\nn=7.0;#in years\nS=300000.0;#in Rs.\nAMC=250000.0;#in Rs.\nprint \"End of year AMC InflationFactor InflatedAmount P/F PW\";\nPw=0;#For initialising\nfor n in range (1,8) :\n FP=(1+IR/100)**n\n IA=AMC*FP;#in Rs.\n PF=1/((1+i/100)**n);\n PW=IA*PF;#in Rs.\n Pw=Pw+PW;#in Rs.\n print \" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n\nPWY=Ppy+Pw-S*1/((1+i/100)**n);\n\n#result\nprint \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\nprint \"Present worth of machine Y in Rs. : \",round(PWY,3);\nprint \"Since the present worth of Machine X is less than Machine Y, select Machine X\"\nprint \" Calculations are not accurate in the book\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year AMC InflationFactor InflatedAmount P/F PW\n 1 300000.0 1.05 315000.0 0.869565217391 273913.043478\n 2 300000.0 1.1025 330750.0 0.756143667297 250094.517958\n 3 300000.0 1.157625 347287.5 0.657516232432 228347.168571\n 4 300000.0 1.21550625 364651.875 0.571753245593 208490.893043\n 5 300000.0 1.2762815625 382884.46875 0.497176735298 190361.25017\n 6 300000.0 1.34009564063 402028.692188 0.432327595912 173808.097981\n 7 300000.0 1.40710042266 422130.126797 0.375937039923 158694.35033\nPresent worth of inflated annual operating and maintenance cost in Rs. : 1483709.322\nPresent worth of machine X in Rs. : 2908521.914\nEnd of year AMC InflationFactor InflatedAmount P/F PW\n 1 250000.0 1.05 262500.0 0.869565217391 228260.869565\n 2 250000.0 1.1025 275625.0 0.756143667297 208412.098299\n 3 250000.0 1.157625 289406.25 0.657516232432 190289.307142\n 4 250000.0 1.21550625 303876.5625 0.571753245593 173742.410869\n 5 250000.0 1.2762815625 319070.390625 0.497176735298 158634.375141\n 6 250000.0 1.34009564063 335023.910156 0.432327595912 144840.081651\n 7 250000.0 1.40710042266 351775.105664 0.375937039923 132245.291942\nPresent worth of inflated annual operating and maintenance cost in Rs. : 1236424.435\nPresent worth of machine Y in Rs. : 3123643.323\nSince the present worth of Machine X is less than Machine Y, select Machine X\n Calculations are not accurate in the book\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.4 Page 156" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIR=6.0;#in % per year\ni=18.0;#in % per year\nAFR=5000000.0;#in Rs.\nn=7.0;#in years\nAI=500000.0;#in Rs.\nprint\"End of year AFR InflationFactor InflatedAmount P/F PW\";\nTPW=0;#Initialising\n\nfor n in range (1,6) :\n IF=(1+IR/100)**n;\n IA=IF*AFR;#in Rs.\n PF=1/((1+i/100)**n);\n PW=PF*IA;#in Rs.\n TPW=PW+TPW;#in Rs.\n print\" \",round(n),\" \",round(AFR,3),\" \",round(IF,3),\" \",round(IA,3),\" \",round(PF,3),\" \",round(PW,3);\n AFR=AFR+AI;#in Rs.\n\n \n#result\nprint \"The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : \",round(TPW,3)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year AFR InflationFactor InflatedAmount P/F PW\n 1.0 5000000.0 1.06 5300000.0 0.847 4491525.424\n 2.0 5500000.0 1.124 6179800.0 0.718 4438236.139\n 3.0 6000000.0 1.191 7146096.0 0.609 4349334.645\n 4.0 6500000.0 1.262 8206100.24 0.516 4232615.212\n 5.0 7000000.0 1.338 9367579.043 0.437 4094655.134\nThe value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : 21606366.553\n" + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb new file mode 100755 index 00000000..75f40350 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "EE-12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Inventory Control" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.1 Page 160" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nD=24000.0;#in units/year\nCo=150.0;#in Rs./order\nPprice=75.0;#Rs./unit\nCpupy=18.0;#in % of Pprice/unit\n\n#calculation\nCc=Pprice*Cpupy/100;#in Rs.\nEOQ=sqrt((2*Co*D)/Cc);#in units\nn=D/round(EOQ);#no. of orders/year\nT=round(EOQ)/D;# time between successive orders in year\nT=T*12;#in months\nT=T*30;#in Days\n\n#result\nprint \"Economic order quantity in units : \",round(EOQ);\nprint \"No. of orders/year : \",round(n,2);\nprint \"Time between successive orders in days : \",round(T);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Economic order quantity in units : 730.0\nNo. of orders/year : 32.88\nTime between successive orders in days : 11.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.2 Page 162" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=24000.0;#in units/year\nCo=175.0;#in Rs./setup\nCc=15.0;#in Rs./unit/year\n\n#calclation\nEOQ=sqrt((2*Co*r)/(Cc*(1-r/k)));#in units\nQ=round(EOQ);#units\nt1=Q/k;#in year\nt1=t1*12*30;#in days\nt2=(Q/r)*(1-r/k);#in year\nt2=t2*12*30;#in days\n\n#result\nprint \"Economic order quantity in units : \",round(Q,3);\nprint \"Cycle time in days :\",round(t1+t2);\nprint \"No. of setups/year : \",round(r/Q,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Economic order quantity in units : 748.0\nCycle time in days : 22.0\nNo. of setups/year : 16.043\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.3 Page 164" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#iniatiation of variable\nfrom math import sqrt\nD=30000.0;#in units/year\nCc=2.0;#in Rs./unit/year\nCo=100.0;#in Rs./orde\nCs=12.0;#in units/year\n\n#calculation\nEOQ=sqrt(2*Co*D*(Cs+Cc)/(Cc*Cs));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*D*Cs/(Cc*(Cs+Cc)));#in units\nt=Q/D;#in year\nt=t*365;#in days\nt1=Q1/D;#in year\nt1=t1*365;#in days\nt2=t-t1;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q-Q1);\nprint \"Cycle time in days: \",round(t);\nprint \"Inventory period(t1) in days : \",round(t1);\nprint \"Shortage period(t2) in days : \",round(t2);\nprint \"No. of Orders/year : \",round(D/Q,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ordering quantity in units : 1871.0\nMaximum Inventory in units : 1604.0\nMaximum shortage quantity in units : 267.0\nCycle time in days: 23.0\nInventory period(t1) in days : 20.0\nShortage period(t2) in days : 3.0\nNo. of Orders/year : 16.034\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.4 Page 166" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=2000.0*12;#in units/year\nCo=400.0;#in Rs./setup\nCc=0.20*12;#in Rs./year\nCs=15.0;#in Rs./unit/year\n\n#calculation\nEOQ=sqrt((2*Co*k*r*(Cc+Cs)/(Cc*(k-r)*Cs)));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*Cc*r*(k-r)/(Cs*(Cc+Cs)*k));#in units\nQ2=(Q*(k-r)/k)-Q1;#in Units\nt=Q/r;#in year\nt=t*365.0;#in days\nt1=(Q2/r)*365.0;#in days\nt2=(Q2/(k-r))*365.0;#in days\nt3=(Q1/(k-r))*365.0;#in days\nt4=(Q1/r)*365.0;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q2);\nprint \"Cycle time in days: \",round(t);\nprint \"Period of shortage in days : \",round(t1);\nprint \"Period of production satisfying back order in days : \",round(t2);\nprint \"Period of production satisfying period requirement in days : \",round(t3);\nprint \"Period of consumption only in days : \",round(t4);\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ordering quantity in units : 3046.0\nMaximum Inventory in units : 210.0\nMaximum shortage quantity in units : 1313.0\nCycle time in days: 93.0\nPeriod of shortage in days : 40.0\nPeriod of production satisfying back order in days : 40.0\nPeriod of production satisfying period requirement in days : 6.0\nPeriod of consumption only in days : 6.0\n" + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter13_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter13_1.ipynb new file mode 100755 index 00000000..af23fcbb --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter13_1.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "EE-13" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Make or Buy Decision" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.1 Page 168" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nmaterial=300.0;#in Rs.\nlabour=250.0;#in Rs.\noverhead=100.0;#in Rs.\n\n#calculation\nVC=material+labour+overhead;#in Rs.\ndemand=5000.0;#in units\nTVC=demand*VC;#in Rs.\nFC=1000000;#in Rs.\nTC=FC+TVC;#in Rs.\n\n#result\nprint \"Total cost in Rs. : \",round(TC,3);\n\n#Cost to buy :\nPcost=900*demand;#in Rs.\nFC=1000000.0;#in Rs.\nTC=FC+Pcost;#in Rs.\n\n#result\nprint \"Total cost in Rs. : \",round(TC,3);\nprint \"The cost of making fixtures is less than the cost of buying fixtures from outside. Therefore, the organisation should make the fixtures.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost in Rs. : 4250000.0\nTotal cost in Rs. : 5500000.0\nThe cost of making fixtures is less than the cost of buying fixtures from outside. Therefore, the organisation should make the fixtures.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.2 Page 171" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nPbuy=8.0;#in Rs/unit\nD=2000.0;#in units/year\nCo=120.0;#in Rs./order\nCc=1.60;#in Rs./units/year\n\n#calculation\nQ1=sqrt(2*Co*D/Cc);#in units\nTC=D*Pbuy+D*Co/Q1+Q1*Cc/2;#in Rs.\nprint \"Total cost of buying in Rs. : \",round(TC,3)\n\n#Make Option :\nPmake=5.0;#in Rs/unit\nCo=60.0;#in Rs./setup\nCc=1.0;#in Re1/units/year\nr=2000.0;#in units/year\nk=8000.0;#in units/year\n\n#calculation\nQ2=sqrt(2*Co*r/(Cc*(1-r/k)));#in units\nTC=D*Pmake+D*Co/Q2+Q2*Cc*(k-r)/(2*k);#in Rs.\n\n#result\nprint \"Total cost of making in Rs. : \",round(TC,3)\nprint\"The cost of making is less than the cost of buying . Therefore, the firm should go in for making option.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of buying in Rs. : 16876.356\nTotal cost of making in Rs. : 10424.264\nThe cost of making is less than the cost of buying . Therefore, the firm should go in for making option.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.3 Page 173" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nSP=500.0;#in Rs.\nVC=300.0;#in Rs.\nFC=400000.0;#in RS.\n\n#calculation\nBEP=FC/(SP-VC);#in units\n\n#results\nprint \"BEP in units : \",round(BEP,3);\nprint\"Since the demand(1500units) is less than the break even quantity, the company should buy the cabinets for its TV production.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "BEP in units : 2000.0\nSince the demand(1500units) is less than the break even quantity, the company should buy the cabinets for its TV production.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.4 Page 173" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nvolume=8000;#in units\n#Process A :\nFC=500000.0;#in RS.\nVC=175.0;#in Rs.\n\n#calculation\nAC=FC+VC*volume;#in Rs.\n\n#result\nprint \"Annual Cost of Process A in Rs. :\",round(AC,3);\n\n#Process B :\nFC=600000.0;#in RS.\nVC=150;#in Rs.\n\n#calculation\nAC=FC+VC*volume;#in Rs.\n\n#result\nprint \"Annual Cost of Process A in Rs. :\",round(AC,3);\n\n#Buy option:\nPprice=125.0;#in RS./Unit\nVC=175.0;#in Rs.\nAC=Pprice*volume;#in Rs\n\n#result.\nprint \"Annual Cost of Buy in Rs. :\",round(AC,3);\nprint\"Since the annual cost of buy option is the minimum among all the alternatives, the company should buy the product.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual Cost of Process A in Rs. : 1900000.0\nAnnual Cost of Process A in Rs. : 1800000.0\nAnnual Cost of Buy in Rs. : 1000000.0\nSince the annual cost of buy option is the minimum among all the alternatives, the company should buy the product.\n" + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter16_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter16_1.ipynb new file mode 100755 index 00000000..86e57be5 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter16_1.ipynb @@ -0,0 +1,134 @@ +{ + "metadata": { + "name": "Untitled2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Linear Progrmming" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.1 Page 200" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#result\nprint\"The data of the problem are summarized below : \";\nprint\"Machine Products Limit on \";\nprint\" P1 P2 machine hours\";\nprint\"Lathe 5 10 60\";\nprint\"Milling 4 4 40\";\nprint\"Profit/unit 6 8\";\nprint\"Let X1 be the production volume of the product.P1, and\";\nprint\"X2 be the production volume of the product,P2.\";\nprint\"The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \";\nprint\"maximize Z = 6*X1 + 8*X2\";\nprint\"subject to\";\nprint\"5*X1+10*X2 <= 60\"\nprint\"4*X1+4*X2 <= 40\"\nprint\"X1,X2 >= 0\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The data of the problem are summarized below : \nMachine Products Limit on \n P1 P2 machine hours\nLathe 5 10 60\nMilling 4 4 40\nProfit/unit 6 8\nLet X1 be the production volume of the product.P1, and\nX2 be the production volume of the product,P2.\nThe corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \nmaximize Z = 6*X1 + 8*X2\nsubject to\n5*X1+10*X2 <= 60\n4*X1+4*X2 <= 40\nX1,X2 >= 0\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.2 Page 200" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nprint\"Let X1 be the No. of packets of food type1 suggested for babies, and\";\nprint\"X2 be the No. of packets of food type1 suggested for babies.\";\nprint\"The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \";\nprint\"maximize Z = 2*X1 + 3*X2\";\nprint\"subject to\";\nprint\"X1+X2 >= 6\"\nprint\"7*X1+X2 >= 14\";\nprint\"X1,X2 >= 0\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Let X1 be the No. of packets of food type1 suggested for babies, and\nX2 be the No. of packets of food type1 suggested for babies.\nThe corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \nmaximize Z = 2*X1 + 3*X2\nsubject to\nX1+X2 >= 6\n7*X1+X2 >= 14\nX1,X2 >= 0\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.3 Page201" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n%pylab inline\nimport matplotlib.pyplot as plt\nprint\"Given the following LP model :\"\nprint\"maximize Z = 6*X1 + 8*X2\";\nprint\"subject to\";\nprint\"5*X1+10*X2 <= 60\";\nprint\"4*X1+4*X2 <= 40\";\nprint\"X1,X2 >= 0\";\nprint\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\nprint\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\nprint\"5*X1+10*X2 <= 60\";\nprint\"When X1=0 : X2=6\";\nprint\"When X2=0 : X1=12\";\nplt.plot([0,12],[6,0],'r')\nplt.plot([10,0],[0,10])\nplt.title('Graphical Plot')\nplt.show()\nprint \"Consider the 2nd constraint in the form : in blue \";\nprint \"4*X1+4*X2 <= 40\";\nprint \"When X1=0 : X2=10\";\nprint \"When X2=0 : X1=10\";\nprint \"The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\";\nZA=6*0+8*0;\nZB=6*10+8*0;\nZC=6*8+8*2;\nZD=6*0+8*6;\nprint \"Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \";\nprint \"X1 = 8 X2 = 2 and Z(Optimum) is\",ZC;", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Populating the interactive namespace from numpy and matplotlib\nGiven the following LP model :\nmaximize Z = 6*X1 + 8*X2\nsubject to\n5*X1+10*X2 <= 60\n4*X1+4*X2 <= 40\nX1,X2 >= 0\nThe introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\nCompute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n5*X1+10*X2 <= 60\nWhen X1=0 : X2=6\nWhen X2=0 : X1=12\n" + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEKCAYAAADkYmWmAAAABHNCS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u99p0aJF+vOf/6zRo0dr0aJFmjJlii5fvqyD\nBw8263YRnBjiMNSFCxd0zz33qFWrm/9pDRo0SGFhYbrrrrvqbLbjxo3T/fffL0m68847NXToUPXu\n3VuS1LdvX02ZMkXvvfdenevPzMxUu3bt1KdPH82aNUsbNmyo/d7gwYM1evRouVwuTZ8+XYcOHfJ6\nxtzcXL3wwgvq2bNn7W116tRJkvTII48oLCxMrVq10tNPP63Kykp9/vnnTbrvRUVFCgsLU5cuXbRk\nyRKtX7++9jZuKCws1N69e5WTk6O2bduqf//+mjNnjtatWyep5g8jXs4IzdHa7APAWTp37qwLFy7o\n+vXrtYN87969kqSYmJja9u1yuRQdHV3nsh9++KEyMjJ09OhRVVVVqbKyUg899FCdn4mJian959jY\nWB05cqT28/Dw8Np/vuuuu3T16tU657jhzJkziouL83r+l156SXl5eSoqKpLL5VJZWZkuXLjQpPse\nGRmpwsLCBn+mqKhInTp1qs1MN+7HRx991KTbAG7FJg5D3X///brzzju1efPmZl922rRpGjdunM6c\nOaOSkhI99thjt/3C8/Tp03X+OSoqqtm3ExMToxMnTtz29T179mj58uX67W9/q5KSEl26dEmhoaGG\nbsaRkZG6ePGiysvLa792+vTp2j/QGnuUDXArhjgM1bFjR2VmZmrevHn6/e9/r8uXL+v69ev65JNP\n9MUXX9T+nLfBWF5errCwMLVt21b79+/Xr3/969uG2s9+9jNduXJFR48e1Zo1a/Twww83+4xz5szR\ns88+qxMnTsjj8ejw4cO1g7V169a65557VFVVpeeff15lZWXN/5fQgJiYGA0aNEg/+clPVFlZqcOH\nDysvL0/Tp0+XJEVERKigoICkgiZjiMNwCxcu1IoVK/Tiiy8qIiJCEREReuyxx/Tiiy/WNvCv/qLx\nhtdff13PPfecOnTooCVLlngd0EOHDlWPHj00fPhwLVy4UMOHD6/3+urbap9++mk99NBDGjlypEJD\nQzV37lxdvXpVo0aN0ujRoxUfH69u3bqpXbt2io2NrXN9DW3KTf3ehg0bVFBQoMjISE2YMEHPP/+8\nHnjgAU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md\nt4VLNQ+Nzc/P17x585Sfn6/27dvb+q/itzp58qReeeUVFRQUqKioSOXl5XrrrbfMPpZfuVwux86c\nF154QW3bttW0adMa/DnDh3hUVJQKCwtrPy8sLFR0dLTRN2OqL7/8UhMnTtT06dM1btw4s49jmL17\n92rr1q36xje+oalTp+rdd9/VjBkzzD6WYaKjoxUdHa377rtPkjRp0iTl5+ebfCrjfPTRRxo0aJA6\nd+6s1q1ba8KECdq7d6/ZxzJceHi4zp8/L0k6d+6cunbtavKJjLdmzRrt2LGjSX8IGz7EU1JS9Pe/\n/10FBQWqqqrSpk2blJaWZvTNmMbj8Wj27NlKTEzU/PnzzT6OoZYuXarCwkKdOnVKGzdu1AMPPKB1\n69aZfSzDREREKCYmRsePH5ck7dq1S7179zb5VMbp1auX9u3bpytXrsjj8WjXrl1KTEw0+1iGS0tL\n09q1ayVJa9euddQiJdU8um/58uXasmWLvva1rzV+AV+edt+YHTt2eOLj4z1xcXGepUuX+uMmTLNn\nzx6Py+Xy9O/f35OUlORJSkryvP3222Yfy3But9szduxYs49huE8++cSTkpLi6devn2f8+PGekpIS\ns49kqJycHE9iYqKnT58+nhkzZniqqqrMPlKLTJkyxfP1r3/d06ZNG090dLQnLy/P8+9//9szbNgw\nT8+ePT0jRozwXLp0yexj+uzW+/fGG294evTo4YmNja2dL48//niD18GTfQDAxpz3EAQACCIMcQCw\nMYY4ANgYQxwAbIwhDgA2xhAHABtjiAOAjTHEAcDG/h92IUTgGfYhtAAAAABJRU5ErkJggg==\n", + "text": "" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Consider the 2nd constraint in the form : in blue \n4*X1+4*X2 <= 40\nWhen X1=0 : X2=10\nWhen X2=0 : X1=10\nThe closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\nSince the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \nX1 = 8 X2 = 2 and Z(Optimum) is 64\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.4 Page 203" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n%pylab inline\nimport matplotlib.pyplot as plt\nprint\"Given the following LP model :\"\nprint \"minimize Z = 2*X1 + 3*X2\";\nprint\"subject to\";\nprint\"X1+X2 >= 6\";\nprint\"7*X1+X2 >= 14\";\nprint\"X1,X2 >= 0\";\nprint\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\nprint\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\nprint\"X1+X2 = 6\";\nprint\"When X1=0 : X2=6\";\nprint\"When X2=0 : X1=6\";\nplt.plot([0,6],[6,0],'r')\nplt.plot([2,0],[0,14])\nplt.title('Graphical Plot')\nplt.show()\nprint\"Consider the 2nd constraint in the form (in blue):\";\nprint\"7*X1+X2 = 14\";\nprint\"When X1=0 : X2=14\";\nprint\"When X2=0 : X1=2\";\nprint\"The Optimum solution will be in any one of the corners A, B and C\";\nprint\"The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\"\nZA=2*0+3*14;\nZB=2*(4.0/3)+3*(14.0/3);\nZC=2*6+3*0;\n\n#result\nprint\"Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \";\nprint \"X1 = 6 X2 = 0 and Z(Optimum) =\",ZC", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Populating the interactive namespace from numpy and matplotlib\nGiven the following LP model :\nminimize Z = 2*X1 + 3*X2\nsubject to\nX1+X2 >= 6\n7*X1+X2 >= 14\nX1,X2 >= 0\nThe introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\nCompute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \nX1+X2 = 6\nWhen X1=0 : X2=6\nWhen X2=0 : X1=6\n" + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGwVJREFUeJzt3Xlw1PX9x/HXpoiAkRAQNs3VtAHKHaJRig6yyBVtgcgl\nl9AgcayjLdJhRKeWwwoE1JZSpTNQUaQF2vKrUMCMgXYDipQhIFKoxYOMiRydoAlHhEiyvz8iKyHZ\nZHfz/e7u97vPx8zOJHt8v59VfPPsd7/frcPj8XgEALCMmHAvAAAQGAY3AFgMgxsALIbBDQAWw+AG\nAIthcAOAxTC4YQsLFizQgw8+6PPxPn36aPfu3abuw5eSkhLFxMSotra2RfsHrmJwwxQbN27UgAED\nFBsbK6fTqR/84AdatWqVaftzOBxNPv7vf/9bd999t2n7cLvdiomJ0c0336z27durR48eevXVVwPe\nR7B/OSC6MLhhuBdeeEGzZ8/Wk08+qTNnzujMmTP6/e9/r3feeUfV1dWNvqalNRqK68ia20dSUpLO\nnz+vc+fOKT8/X3l5efrggw9MXxeiD4MbhqqsrNT8+fO1atUqjR07VjfddJMkqX///lq/fr1at24t\nSfrxj3+sn/zkJ7rvvvsUGxsrt9ut7du3KzMzU3FxcUpNTdXChQu92716uGH16tVKSkpSYmKiXnjh\nBe/jDodD1dXVmjFjhtq3b68+ffqouLjY+3haWpp27dolSaqpqdHixYvVtWtXtW/fXllZWfrss88k\nST/72c+UmpqquLg4ZWVl6e233w7qn8OYMWMUHx+vY8eONXjs5MmTGj16tDp16qRu3bppzZo1kqSC\nggItWbJEmzZt0s0336zMzMyg9g37Y3DDUO+++64uX76sMWPGNPvcDRs26JlnntGFCxd01113KTY2\nVuvXr1dlZaW2b9+uVatWacuWLfVe43a79dFHH+mtt95Sfn6+dxh7PB5t3bpVkydPVmVlpUaPHq3H\nHnvM+zqHw+E91PHiiy9q48aNevPN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+arXOXPmaOLEiRoxYoTi4uKU\nl5enS5cuaeTIkcrOzlb37t2Vlpamtm3bKjU1td72mipifx/bsGGDSkpKlJiYqLFjx2rRokW65557\nJEkTJkyQVHfIKSsry+f2EN0cTf0fKcycOVPbt29Xly5d6h1LlOrO1Z07d67Ky8u9H+wAZikpKdH3\nvvc9XblypcExayDaNPlfQG5urgoKChrcX1paqsLCQn3nO98xbWEAgMY1ObgHDRqk+Pj4BvfPmTNH\ny5YtM21RQGP44A6oE/DpgFu2bFFycrL69etnxnqARqWlpammpibcywAiQkCDu6qqSosXL1ZhYaH3\nPj79BoDQCmhwf/zxxyopKVFGRoakugsZbrvtNu3fv19dunSp99xvfaurams/Nm6lABAF0tPTG73O\noB5PM06cOOHp06dPo4+lpaV5zp492+hjkjyjRjW3deuaP39+uJdgKt6fddn5vXk89n9/foxlT5Mf\nTk6ePFl33nmnjh8/rpSUFK1du7be4819WFRcXHcDABinyUMl136BT2M++eSTJh+fN09auFDaujXw\nhQEAGmfqlQx5efatbpfLFe4lmIr3Z112fm+S/d+fP5q8crJFG3Y45PF4tHKlVFhIdQOAP67Oziaf\nY/bgvnRJSk+vG9y33WbGngDAPvwZ3KZ/6UObNt8c6wYAtJzpxS2J6gYAP0VEcUtUNwAYKSTFLVHd\nAOCPiCluieoGAKOErLglqhsAmhNRxS1R3QBghJAWt0R1A0BTIq64JaobAFoq5MUtUd0A4EtEFrdE\ndQNAS4SluCWqGwAaE7HFLVHdABCssBW3RHUDwPUiurglqhsAghHW4paobgC4VsQXt0R1A0Cgwl7c\nEtUNAFdZorglqhsAAhERxS1R3QAgGVTcM2fOlNPpVN++fb33zZ07Vz179lRGRobGjh2rysrKFi+W\n6gYA/zQ7uHNzc1VQUFDvvhEjRujo0aM6fPiwunfvriVLlhiymLw8qbi47gYAaFyzg3vQoEGKj4+v\nd9/w4cMVE1P30gEDBqisrMyQxVDdANC8Fn84+corr+i+++4zYi2SqG4AaE6rlrz4ueeeU+vWrTVl\nypRGH1+wYI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wIBwL8VQtbW16t+/v5xOp4YMGaJevXqFe0mG\neuKJJ7R8+XLFxJhyFDTsHA6Hhg0bpqysLK1evTrcyzHMiRMn1LlzZ+Xm5urWW29VXl6eqpq4qtLw\nf7tcnGN9Fy5c0Pjx47VixQrFxsaGezmGiomJ0XvvvaeysjLt3r078i+fDsC2bdvUpUsXZWZm2rJK\nJemdd97RoUOH9Oabb+qll17Snj17wr0kQ1y5ckUHDx7Uo48+qoMHD+qmm27S0qVLfT7f8MGdlJSk\n0tJS7++lpaVKTk42ejcwyVdffaVx48Zp2rRpysnJCfdyTBMXF6cf/vCHOnDgQLiXYpi9e/dq69at\n+u53v6vJkyfrH//4h6ZPnx7uZRnq29/+tiSpc+fOuv/++7V///4wr8gYycnJSk5O1u233y5JGj9+\nvA4ePOjz+YYP7qysLH344YcqKSlRdXW1Nm3apNGjRxu9G5jA4/HooYceUq9evTR79uxwL8dw5eXl\nqqiokCR9+eWXKiwsVGZmZphXZZzFixertLRUJ06c0MaNG3XPPfdo3bp14V6WYaqqqnT+/HlJ0sWL\nF/XWW2/Z5uyuhIQEpaSk6Pjx45KknTt3qnfv3j6fH9QFOE2x+8U5kydPVlFRkc6ePauUlBQtWrRI\nubm54V6WId555x2tX7/ee7qVJC1ZskTZ2dlhXpkxTp06pRkzZqi2tla1tbV68MEHNXTo0HAvyzR2\nO2x55swZ3X///ZLqDi1MnTpVI0aMCPOqjLNy5UpNnTpV1dXVSk9P19q1a30+lwtwAMBi7PnRMwDY\nGIMbACyGwQ0AFsPgBgCLYXADgMUwuAHAYhjcAGAxDG4AsJj/B8cOct+Nyla5AAAAAElFTkSuQmCC\n", + "text": "" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Consider the 2nd constraint in the form (in blue):\n7*X1+X2 = 14\nWhen X1=0 : X2=14\nWhen X2=0 : X1=2\nThe Optimum solution will be in any one of the corners A, B and C\nThe objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\nSince the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \nX1 = 6 X2 = 0 and Z(Optimum) = 12\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "Example 16.5 Page", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter1_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter1_1.ipynb new file mode 100755 index 00000000..64198a89 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter1_1.ipynb @@ -0,0 +1,83 @@ +{ + "metadata": { + "name": "EE-1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Introduction" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1.1 Page 10" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of Variable\nFC=2000000.0;#in Rs\nv=100.0;#in Rs\ns=200.0;#in Rs\nQ=60000.0;#in units\n\n#Part a \n# calculation\nBEQ=FC/(s-v);#in units\n\n#result\nprint \"Break even quantity in units : \",round(BEQ,3)\n\n#Part b \n#calculation\nBES=FC*s/(s-v);#in Rs\n\nprint \"Break even sales in Rs. : \",round(BES,3)\n\n#Part c \n#calculation\nCon=s*Q-v*Q;#in Rs\nMos=Q*s-BES;#in Rs\n\n#result\nprint \"Contribution in units : \",round(Con,3)\nprint \"Margin of safety in Rs. : \",round(Mos,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Break even quantity in units : 20000.0\nBreak even sales in Rs. : 4000000.0\nContribution in units : 6000000.0\nMargin of safety in Rs. : 8000000.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1.2,Page 12" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nFC=25000.0;#in Rs\nv=45000.0;#in Rs\ns=120000.0;#in Rs\n\n#Part a \n#calculation\nCon=s-v;#in Rs\n\n#result\nprint \"Contribution in Rs \",round(Con,3)\n\n#Part b \n#calculation\nProf=Con-FC;#in Rs\n\n#result\nprint \"Profit in Rs \",round(Prof,3);\n\n#Part c \n#calculation\nPVratio=Con*100.0/s;#in %\nBEP=FC*100.0/PVratio;#in Rs\n\n#result\nprint \"BEP in Rs \", round(BEP,3)\n\n#Part d \n#calculoation\nMS=Prof*100/PVratio;#in Rs\n\n#result\nprint\"M.S. in Rs \", round(MS,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Contribution in Rs 75000.0\nProfit in Rs 50000.0\nBEP in Rs 40000.0\nM.S. in Rs 80000.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1.3 Page 13" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nFC=15000.0;#in Rs\nv=35000.0;#in Rs\ns=80000.0;#in Rs\n\n#Part a \n#calculation\nCon=s-v;#in Rs\n\n#result\nprint \"Contribution in Rs\", round(Con,3);\n\n#Part b \n#calcualtion\nProf=Con-FC;#in Rs\n\n#result\nprint \"Profit in Rs \", round(Prof,3)\n\n#Part c \n#calculation\nPVratio=Con*100/s;\nBEP=FC*100/PVratio;#in Rs\n\n#result\nprint \"BEP in Rs \",round(BEP,3)\n\n#Part d \n#calculation\nMS=Prof*100/PVratio;#in Rs\n\nprint \"M.S. in Rs\",round(MS,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Contribution in Rs 45000.0\nProfit in Rs 30000.0\nBEP in Rs 26666.667\nM.S. in Rs 53333.333\n" + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb new file mode 100755 index 00000000..d848674b --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb @@ -0,0 +1,146 @@ +{ + "metadata": { + "name": "EE-2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Elementary Economic Analysis" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.1 Page 16" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Part a \nw1=1.2;#in Kg\nc1=80.0;#cost of making aluminium casting in Rs/Kg\nc2=150.0;#ost of machining aluminium casting per unit in Rs\n\n#calculation\nTc1=c1*w1+c2;#Total cost of jet engine part made of aluminium per unit in Rs\n\n#result\nprint \"Total cost of jet engine part made of aluminium per unit in Rs \",round(Tc1,3)\n\n#Part b \nw2=1.35;#in Kg\nc1=35.0;#in Rs/Kg\nc2=170.0;#in Rs\nc3=1300.0;#in Rs/Kg\n\n#calculation\nTc2=c1*w2+c2+c3*(w2-w1);#in Rs\n\n#result\nprint \"Total cost of jet engine part made of steel per unit in Rs : \",round(Tc2,3);\nprint \"DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs \",round(Tc2-Tc1,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of jet engine part made of aluminium per unit in Rs 246.0\nTotal cost of jet engine part made of steel per unit in Rs : 412.25\nDECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs 166.25\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.2, Page 17" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Part a \nwood=0.1;#in m^3\nWoodCost=12000.0;#in Rs/m^3\nTable=1;#in units\nTableTopCost=3000.0;#in Rs/unit\nLegBushes=4.0;#units\nLegBushesCost=10.0;#Rs/units\nNails=100.0;#in grams\nNailsCost=300.0;#in Rs/Kg\nTotalLabour=15.0;#in Hours\nTotalLabourCost=50.0;#in Rs/Hours\n\n#calcualtion\nWoodCostframelegs=WoodCost*wood;#in Rs\nWoodTopCost=3000.0;#in Rs\nBushesCost=LegBushesCost*LegBushes;#in Rs\nNailsCost=Nails*NailsCost/1000;#in Rs\nLabourCost=TotalLabourCost*TotalLabour;#in Rs\nTotalCost1=WoodCostframelegs+WoodTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n\n#result\nprint \"Cost of Table with wooden top in Rs \",round(TotalCost1,3)\n\n#given data for table with granite top\n#Part b \nwood=0.15;#in m^3\nWoodCost=12000.0;#in Rs/m^3\nGranite=1.62;#in m^2\nGraniteCost=800.0;#in Rs/m^2\nLegBushes=4.0;#units\nLegBushesCost=25.0;#Rs/units\nNails=50.0;#in grams\nNailsCost=300.0;#in Rs/Kg\nTotalLabour=8.0;#in Hours\nTotalLabourCost=50.0;#in Rs/Hours\n\n\nWoodCostframelegs=WoodCost*wood;#in Rs\nGraniteTopCost=Granite*GraniteCost;#in Rs\nBushesCost=LegBushesCost*LegBushes;#in Rs\nNailsCost=Nails*NailsCost/1000;#in Rs\nLabourCost=TotalLabourCost*TotalLabour;#in Rs\nTotalCost2=WoodCostframelegs+GraniteTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n\n#result\nprint \"Cost of Table with Granite top in Rs \",round(TotalCost2,3);\nprint \"Economic advantage of table with granite top in Rs \",round(TotalCost1-TotalCost2,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Cost of Table with wooden top in Rs 5020.0\nCost of Table with Granite top in Rs 3611.0\nEconomic advantage of table with granite top in Rs 1409.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.3 Page 19" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#design A\nLatheCost=200.0;#in Rs/hour\ngrinderCost=150.0;#in Rs/hour\nHoursOfLathe=16.0;#in hours/1000Unit\nHoursOfGrinder=4.5;#in hours/1000Unit\n\n#calcualtion\nTotalCostA=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n\n#result\nprint \"Total cost of design A per 100,000 units \",round(TotalCostA*100000.0/1000,3);\n\n# Design B\nHoursOfLathe=7.0;#in hours/1000Unit\nHoursOfGrinder=12.0;#in hours/1000Unit\nTotalCostB=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n\n#result\nprint \"Total cost of design A per 100,000 units\",round(TotalCostB*100000.0/1000,3);\nprint \"Economic advantage of design B over design A per 100,000 units in Rs \",round(TotalCostA-TotalCostB,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of design A per 100,000 units 387500.0\nTotal cost of design A per 100,000 units 320000.0\nEconomic advantage of design B over design A per 100,000 units in Rs 675.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.4,Page 20" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nfrom math import pi\nTanks=4.0;#units\nTankDia=5.2;#in meter\n\n#calcualtion\nTankRad=TankDia/2;#in meters\nTankHeight=7;#in meters\nHeightDiaRatio=TankHeight/TankDia;#unitless\nVolPerTank=(22/7)*TankRad**2*TankHeight;#in m^3\nh=VolPerTank/(pi)*64;#in meters\nr=h/8;#in meters\nd=2*r;#in meters\nCostNewDesign=900000*(100.0/111);#in Rs\n\n#result\nprint \"Expected savings by redesign in Rs \",round(900000-CostNewDesign,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Expected savings by redesign in Rs 89189.189\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.5,Page 21" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#steel frame\ndistance=2500.0;#in Km\nTransCost=1.0;#in Rs/Kg/100Km\nSteelFramePrice=1000.0;#in Rs/Unit\nSteelFrameWeight=75.0;#in Kg/Unit\n\n#calculation\nTotalCost1=SteelFramePrice+TransCost*SteelFrameWeight*distance/100;#in Rs\n\n#result\nprint \"Total cost of steel window frame per unit in Rs \",round(TotalCost1,3);\n\n# Aluminium window frame\nAlumilniumFramePrice=1500.0;#in Rs/Unit\nAlumilniumFrameWeight=28.0;#in Kg/Unit\n\n#calculation\nTotalCost2=AlumilniumFramePrice+TransCost*AlumilniumFrameWeight*distance/100;#in Rs\n\n#result\nprint \"Total cost of Alumilnium window frame per unit in Rs \",round(TotalCost2,3);\nprint \"DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs \",round(TotalCost1-TotalCost2,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of steel window frame per unit in Rs 2875.0\nTotal cost of Alumilnium window frame per unit in Rs 2200.0\nDECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs 675.0\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.6,Page 23" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Cost of component using process sequence 1\nprint\"The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\" ;\nprint \"Calculations are summarized in form of table below : \";\nprint \"Operation Operation Time Machine Hour rate Cost\";\nprint \" No. Min Hour Rs. Rs.\";\nprint \" 1 Turning 5 0.083 200 16.60\";\nprint \" 2 Milling 8 0.133 400 53.20\";\nprint \" 3 Shapiing 10 0.167 350 58.45\";\nprint \" 4 Drilling 3 0.050 300 15.00\";\nprint \" Total 143.25\";\n\n#Cost of component using process sequence 2\nprint \"The process sequence 2 of the component is as follows : Turning - Milling - Drilling\" ;\nprint \"Calculations are summarized in form of table below : \";\nprint \"Operation Operation Time Machine Hour rate Cost\";\nprint \" No. Min Hour Rs. Rs.\";\nprint \" 1 Turning 5 0.083 200 16.60\";\nprint \" 2 Milling 14 0.233 400 93.20\";\nprint \" 4 Drilling 3 0.050 300 15.00\";\nprint \" Total 124.80\";\n\n#Cost of component using process sequence 3\nprint \"The process sequence 3 of the component is as follows : Only CNC operations\" ;\nprint \"Calculations are summarized in form of table below : \";\nprint \"Operation Operation Time Machine Hour rate Cost\";\nprint \" No. Min Hour Rs. Rs.\";\nprint \" 1 CNC 8 0.133 1000 133\";\n\nprint \"The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\nCalculations are summarized in form of table below : \nOperation Operation Time Machine Hour rate Cost\n No. Min Hour Rs. Rs.\n 1 Turning 5 0.083 200 16.60\n 2 Milling 8 0.133 400 53.20\n 3 Shapiing 10 0.167 350 58.45\n 4 Drilling 3 0.050 300 15.00\n Total 143.25\nThe process sequence 2 of the component is as follows : Turning - Milling - Drilling\nCalculations are summarized in form of table below : \nOperation Operation Time Machine Hour rate Cost\n No. Min Hour Rs. Rs.\n 1 Turning 5 0.083 200 16.60\n 2 Milling 14 0.233 400 93.20\n 4 Drilling 3 0.050 300 15.00\n Total 124.80\nThe process sequence 3 of the component is as follows : Only CNC operations\nCalculations are summarized in form of table below : \nOperation Operation Time Machine Hour rate Cost\n No. Min Hour Rs. Rs.\n 1 CNC 8 0.133 1000 133\nThe process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\n" + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb new file mode 100755 index 00000000..12f9a0ae --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "EE-3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Interest Formulas and their Application" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.1 Page 29" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nP=20000.0;#in rupees\nn=10.0;#in years\ni=18.0;#% per annum\n\n#calculation\nF=P*(1+i/100)**n;\n\n#result\nprint \"Maturity value after 18 years is \", round(F,3),\" Rupees.\";\nprint \" Ans in the book is not correct\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Maturity value after 18 years is : 104676.711 Rupees.\n Ans in the book is not correct\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.2 Page 30" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nF=100000.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nP=F/((1.0+i/100.0)**n);\n\n#result\nprint \"The person has to invest \", round(P,3),\" Rupees.\";\nprint \" Ans in the book is not correct\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The person has to invest 24718.471 Rupees.\n Ans in the book is not correct\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 3.3 Page 31" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nA=10000.0;#in rupees\nn=25.0;#in years\ni=20.0;#% per annum\n\n#calculation\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"The future sum of the annual equal payment after 25 years is \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future sum of the annual equal payment after 25 years is 4719810.832 Rupees.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.4 Page 32" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nF=500000.0;#in rupees\nn=15.0;#in years\ni=18.0;#% per annum\n\n#calculation\nA=F*((i/100)/((1+i/100)**n-1));\n\n#result\nprint \"The annual equal ammount which must be deposited for 15 years is \",round(A,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equal ammount which must be deposited for 15 years is 8201.391 Rupees.\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 3.5 Page 33" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiasation of variable\nA=1000000.0;#in rupees\nn=20.0;#in years\ni=15.0;#% per annum\n\n#calculation\nP=A*(((1+i/100)**n-1)/((i/100)*(1+i/100)**n));\n\n#result\nprint \"The amount of reserve which must be setup now is : \",round(P,3),\" Rupees\";\nprint \" Ans in the book is not correct\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The amount of reserve which must be setup now is : 6259331.474 Rupees\n Ans in the book is not correct\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.6 Page 34" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nP=1000000.0;#in rupees\nn=15.0;#in years\ni=18.0;#% per annum\n\n#calculation\nA=P*(((i/100)*(1+i/100)**n)/((1+i/100)**n-1));\n\n#result\nprint \"The annual equivalent installment to be paid by the company to the bank is \",round(A),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent installment to be paid by the company to the bank is : 196403.0 Rupees.\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.7 Page 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nA1=4000.0;#in rupees\nG=500.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nA=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "At the end of 10th year, the compound amountr of all his payments will be : 115560.6 Rupees.\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.8 Page 36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nA1=8500.0;#in rupees\nG=-500.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nA=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "At the end of 10th year, the compound amountr of all his payments will be : 138235.878 Rupees.\n" + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.9 Page 38" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=5000.0;#in rupees\nn=10.0;#in years\ni=12.0;#% per annum\nm=4.0;#no. of interest periods per year for quarterly\n\n#calculation\nN=n*m;\nr=i/m;\nF=P*(1+r/100)**N;\n\n#result\nprint\"Maturity value after 10 years is \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Maturity value after 10 years is : 16310.189 Rupees.\n" + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb new file mode 100755 index 00000000..fc61fff4 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb @@ -0,0 +1,167 @@ +{ + "metadata": { + "name": "EE-4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Present Worth Method of Comparision" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.1 Page 44" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#technology 1\nP=1200000.0;#in Rs\nA=400000.0;#in Rs\ni=20.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this technology in RS. \",round(PW,3);\n\n#technology 2\nP=2000000.0;#in Rs\nA=600000.0;#in Rs\ni=20.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this technology in RS. \",round(PW,3);\n\n#technology 3\nP=1800000.0;#in Rs\nA=500000.0;#in Rs\ni=20.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this technology in RS. \",round(PW,3);\nprint \"It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for this technology in RS. 476988.834\nThe present worth for this technology in RS. 515483.251\nThe present worth for this technology in RS. 296236.043\nIt is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.2 Page 46" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#bid 1\nP=450000.0;#in Rs\nA=27000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nPW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this bid in RS. \",round(PW,3)\n\n#bid 2\nP=540000.0;#in Rs\nA=28500.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nPW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this bid in RS. \",round(PW,3)\nprint \"The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for this bid in RS. 607878.993\nThe present worth for this bid in RS. 706650.048\nThe total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.3 Page 47" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#investment proposal A\nP1=-10000.0;#in Rs\nP2=3000.0;#in Rs\nP3=3000.0;#in Rs\nP4=7000.0;#in Rs\nP5=6000.0;#in Rs\ni=18.0;#in % per annum\n\n#calculation\nPW_A=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n\n#result\nprint \"The present worth of A in RS. \",round(PW_A,3);\n\n#investment proposal B\nP1=-10000.0;#in Rs\nP2=6000.0;#in Rs\nP3=6000.0;#in Rs\nP4=3000.0;#in Rs\nP5=3000.0;#in Rs\ni=18.0;#in % per annum\n\n#calculation\nPW_B=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n\n#result\nprint \"The present worth of B in RS. \",round(PW_B,3);\nprint\"At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of A in RS. 2052.076\nThe present worth of B in RS. 2767.112\nAt i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.4 Page 48" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP0=400000.0;#in Rs\nP=200000.0;#in Rs\ni=18.0;#in % per annum\nn=10.0;#in years\n\n#calcualtion\nPW=P0+P*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of alternative 2 in RS. \",round(PW,3);\nprint \"The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\";\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of alternative 2 in RS. 1298817.259\nThe present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.5 Page 49" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#plan 1\nP0=-1000.0;#in Rs\nP=12000.0;#in Rs\ni=12.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nPW1=P0+P*1/((1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of Plan-1 in RS. \",round(PW1,3);\n\n#plan 2\nP0=-1000.0;#in Rs\nP=4000.0;#in Rs\ni=12.0;#in % per annum\nn1=10.0;#in years\nn2=15.0;#in years\n\n#calculation\nPW2=P0+P*1/((1+i/100)**n1)++P*1/((1+i/100)**n2);#in RS\n\n#result\nprint \"The present worth of Plan-2 in RS.\",round(PW2,3);\nprint \"The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of Plan-1 in RS. 1192.355\nThe present worth of Plan-2 in RS. 1018.678\nThe present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.6,Page 50" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#plan 1\nP0=-10000.0;#in Rs\nP=800000.0;#in Rs\ni=12.0;#in % per annum\nn=20.0;#in years\n\n#calcualtion\nPW1=P0*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)+P*1/((1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of Plan-1 in RS. \",round(PW1,3);\n\n#plan 2\nP0=-10000.0;#in Rs\nP=1500000.0;#in Rs\ni=12.0;#in % per annum\nn1=20.0;#in years\nn2=25.0;#in years\n\n#calcualtion\nPW2=P0*(((1+i/100)**n1)-1)/((i/100)*(1+i/100)**n1)+P*1/((1+i/100)**n2);#in RS\n\n#result\nprint \"The present worth of Plan-2 in RS. \",round(PW2,3);\nprint \"The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of Plan-1 in RS. 8238.976\nThe present worth of Plan-2 in RS. 13540.524\nThe present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.7 Page 50" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=12000.0;#in Rs\nA1=10000.0;#in Rs\nG=1000.0;#in Rs\ni=18.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of the small business in RS. \",round(PW,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of the small business in RS. 47293.316\n" + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb new file mode 100755 index 00000000..37880d17 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "EE-5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Future Worth Method" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.1,Page 54" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternate A\nP=5000000.0;#in Rs\nA=2000000.0;#in Rs\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\nFW_A=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n\n#result\nprint \"The future worth amount of alternative A in RS. \",round(FW_A,3);\n\n#alternate B\nP=4500000.0;#in Rs\nA=1800000.0;#in Rs\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\nFW_B=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\nprint \"The future worth amount of alternative B in RS. \", round(FW_B,3);\nprint \"The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of alternative A in RS. 736975.2\nThe future worth amount of alternative B in RS. 663277.68\nThe future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 5.2,Page 58" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternate 1\nFC=2000000.0;#in Rs\nAI=800000.0;#in Rs\nATax=80000.0;#in Rs\nNetAI=AI-ATax;#in Rs\ni=12.0;#in % per annum\nn=20.0;#in years\n\n#calculation\nFW_1=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n\n#result\nprint \"The future worth amount of alternative 1 in RS. : \", round(FW_1,3)\n\n#alternative2\nFC=3600000.0;#in Rs\nAI=980000.0;#in Rs\nATax=150000.0;#in Rs\nNetAI=AI-ATax;#in Rs\ni=12.0;#in % per annum\nn=20.0;#in years\n\n#calculation\nFW_2=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n\n#result\nprint \"The future worth amount of alternative 2 in RS.\",round(FW_2,3)\nprint\"The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of alternative 1 in RS. : 32585172.373\nThe future worth amount of alternative 2 in RS. 25076872.093\nThe future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.3,Page 59" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#part a\n#alternative 1\nP=500000.0;#in Rs\nA1=50000.0;#in Rs\nG=50000.0;#in Rs\ni=8.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n\n#alternative 2\nP=700000.0;#in Rs\nA1=70000.0;#in Rs\nG=70000.0;#in Rs\ni=8.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_2=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 2 in RS. \", round(FW_2,3);\nprint \"The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\";\n\n\n#part b\n#alternative a\nP=500000.0;#in Rs\nA1=50000.0;#in Rs\nG=50000.0;#in Rs\ni=9.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n\n#altenative 2\nP=700000.0;#in Rs\nA1=70000.0;#in Rs\nG=70000.0;#in Rs\ni=9.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 2 in RS.\", round(FW_1,3);\nprint \"The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of alternative 1 in RS. 408314.938\nThe future worth amount of alternative 2 in RS. 571640.914\nThe future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\nThe future worth amount of alternative 1 in RS. 383913.653\nThe future worth amount of alternative 2 in RS. 537479.115\nThe negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.4 Page 62" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternative 1\nP=8000000.0;#in Rs\nA=800000.0;#in Rs\ni=20.0;#in % per annum\nn=12.0;#in years\nSalvage=500000;#in Rs\n\n#calcualtion\nFW1=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n\n#result\nprint \"The future worth for this alternative in RS.\",round(FW1,3)\n\n#alternative 2\nP=7000000.0;#in Rs\nA=900000.0;#in Rs\ni=20.0;#in % per annum\nn=12.0;#in years\nSalvage=400000;#in Rs\n\n#calculation\nFW2=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n\n#result\nprint \"The future worth for this alternative in RS.\",round(FW2,3);\n\n#alternative 3\nP=9000000.0;#in Rs\nA=850000.0;#in Rs\ni=20.0;#in % per annum\nn=12.0;#in years\nSalvage=700000;#in Rs\n\n#calculation\nFW3=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n\nprint \"The future worth for this alternative in RS. \",round(FW3,3)\nprint \"The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth for this alternative in RS. 102493205.379\nThe future worth for this alternative in RS. 97635155.155\nThe future worth for this alternative in RS. 113188330.939\nThe future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.5 Page 64" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Machine A\nP=400000.0;#in Rs\nA=40000.0;#in Rs\nS=200000.0;#in Rs\ni=12.0;#in % per annum\nn=4.0#in years\n\n#calculation\nFW_A=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n\n#result\nprint \"The future worth amount of Machine A in RS. \",round(FW_A,3);\n\n#Machine B\nP=800000.0;#in Rs\nA=0.0;#in Rs\nS=550000.0;#in Rs\ni=12.0;#in % per annum\nn=4.0#in years\n\n#calculation\nFW_B=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n\n#result\nprint \"The future worth amount of Machine B in RS. \",round(FW_B,3);\nprint \"The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\";\nprint \" Calculation in the book is not accurate\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of Machine A in RS. 620580.864\nThe future worth amount of Machine B in RS. 708815.488\nThe future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\n Calculation in the book is not accurate\n" + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter6_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter6_1.ipynb new file mode 100755 index 00000000..c0d35ab9 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter6_1.ipynb @@ -0,0 +1,230 @@ +{ + "metadata": { + "name": "EE-6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Annual Equivalent Method" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.1 Page 70" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nrun=20000.0; #km\nkmperlitre=9; #kmpl\ncost=21;\nG=2222.20;#in Rs.\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\ncon=run/kmperlitre;#consumption\nA1=con*cost;\nA=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;\n\n#result\nprint \"Annual equal amount spending for petrol in Rs. : \",round(A,3);\nprint \"This amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual equal amount spending for petrol in Rs. : 49543.741\nThis amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. \n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.2 Page 71" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nP=500000.0;#in Rs\nA=200000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calcultion\nAE_1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 1 in RS. : \",round(AE_1,3);\n\n#alternative 2\nP=400000.0;#in Rs\nA=300000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nAE_2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 2 in RS. : \",round(AE_2,3);\n\n#alternative 3\nP=600000.0;#in Rs\nA=150000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nAE_3=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 3 in RS. : \",round(AE_3,3);\nprint\"The annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. \";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost of alternative 1 in RS. : 306941.06\nThe Annual equivalent cost of alternative 2 in RS. : 385552.848\nThe Annual equivalent cost of alternative 3 in RS. : 278329.272\nThe annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.3 Page 73" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative a\nP=150000.0;#in Rs\nA=60000.0;#in Rs\nS=15000.0;#in Rs\ni=25.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE_A=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent revenue of alternative A in RS. : \",round(AE_A,3)\n\n#alternative b\nP=175000.0;#in Rs\nA=70000.0;#in Rs\nS=35000.0;#in Rs\ni=25.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE_B=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent revenue of alternative B in RS. : \",round(AE_B,3)\nprint \"The annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent revenue of alternative A in RS. : 6050.69\nThe Annual equivalent revenue of alternative B in RS. : 9191.456\nThe annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.4 Page 75" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#machine X\nP=150000.0;#in Rs\nA=0.0;#in Rs\nS=0.0;#in Rs\ni=15.0;#in % per annum\nn=12.0;#in years\n\n#calcualtion\nAE_X=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. : \",round(AE_X,3);\n\n#machine Y\nP=240000.0;#in Rs\nA=4500.0;#in Rs\nS=60000.0;#in Rs\ni=15.0;#in % per annum\nn=12.0;#in years\n\n#calcualtion\nAE_Y=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine Y in RS. : \",round(AE_Y,3);\nprint \"The annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. \";\nprint\" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost of machine X in RS. : 27672.116\nThe Annual equivalent cost of machine Y in RS. : 44275.386\nThe annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.5 Page 76" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternative 1\nFC=15*150000.0;#in Rs\nMC=15*6000.0;#in Rs\nPL=15*15000.0;#in Rs\n\n#calculation\nMCPL=MC+PL;#in Rs\nS=15*90000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\nAE1=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE1,3);\n\n#alternative 2\nFC=5*750000.0;#in Rs\nMC=5*12000.0;#in Rs\nPL=5*15000.0;#in Rs\nMCPL=MC+PL;#in Rs\nS=5*150000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calcualtion\nAE2=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost for this alternative in RS. 671415.347\nThe Annual equivalent cost for this alternative in RS. 760551.158\nThe annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.6 Page 78" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nVC=390000.0;#in Rs\nLpY=60000.0/30;#in litres\nFcY=2000.0*8;#in Rs\nAllExp=FcY+9000.0+15000.0;#in Rs\nS=60000.0;#in Rs\ni=20.0;#in % per annum\nn=4.0;#in years\n\n#calcualtion\nAE1=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE1,3);\n\n#alternative 2\nVC=360000.0;#in Rs\nLpY=60000.0/20;#in litres\nFcY=3000.0*20;#in Rs\nAllExp=FcY+6000.0+15000.0;#in Rs\nS=90000.0;#in Rs\ni=20.0;#in % per annum\nn=3.0;#in years\n\n#calculation\nAE2=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);# in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost for this alternative in RS. 179475.41\nThe Annual equivalent cost for this alternative in RS. 227175.824\nThe annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.7 Page 79" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nPprice=390000.0;#in Rs\nn=3.0;#in years\nn=n*12;#in months\nS=120000.0;#in Rs\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nME1=Pprice*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Monthly equivalent cost for this alternative in RS. \",round(ME1,3);\n\n#Alternative 2 \nLeaseAmount=10500.0;#in Rs\n\n#calcualtion\nMonthlyEquiCost=LeaseAmount;#in Rs.\n\n#result\nprint\"The Monthly equivalent cost for this alternative in RS. \",round(MonthlyEquiCost,3);\nprint\"The monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Monthly equivalent cost for this alternative in RS. 10167.864\nThe Monthly equivalent cost for this alternative in RS. 10500.0\nThe monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.8 Page 81" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#machine A\nIC=300000.0;#in Rs\nn=4.0;#in years\nS=200000.0;#in Rs\nAM=30000.0;#in Rs\ni=15.0;#in % per annum\n\n#calcualtion\nAE_A=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. \",round(AE_A,3);\n\n#Machine B :\nIC=600000.0;#in Rs\nn=4.0;#in years\nS=300000.0;#in Rs\nAM=0.0;#in Rs\ni=15.0;#in % per annum\n\n#calcualtion\nAE_B=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. \",round(AE_B,3);\nprint \"The annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A \";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost of machine X in RS. 95026.535\nThe Annual equivalent cost of machine X in RS. 150079.605\nThe annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.9 Page 83" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nDP=60000.0;#in Rs\nP1=15000.0;#in Rs\nn=1.0;#in years\ni=12.0;#in % Compounded anually\n\n#calculation\nPW1=DP+P1*1/((1+i/100)**n);#in RS\nn=4.0;#in years\nAE1=PW1*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)\n\n#result\nprint \"The annual equivalent for this alternative in RS. \",round(PW1,3);\nprint \"The annual equivalent for this alternative in RS.\",round(AE1,3);\n\n#alternative 2\nP4y=90000.0;#in Rs\nAE2=P4y*(i/100)/(((1+i/100)**n)-1);#in Rs.\n\n#result\nprint \"The annual equivalent for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent for this alternative in RS. 73392.857\nThe annual equivalent for this alternative in RS. 24163.456\nThe annual equivalent for this alternative in RS. 18831.099\nThe annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.10 Page 85" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initation of variable\n#Brand C : \nw=12.0;#in months\nP=1200.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand C : \nw=24.0;#in months\nP=1800.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand C : \nw=36.0;#in months\nP=2100.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand D : \nw=48.0;#in months\nP=2700.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_D=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_D,3);\nprint \"Here common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.\";\nprint \"The annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent for this brand in RS. 106.619\nThe annual equivalent for this brand in RS. 84.732\nThe annual equivalent for this brand in RS. 69.75\nThe annual equivalent for this brand in RS. 71.101\nHere common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.\nThe annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.\n" + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter7_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter7_1.ipynb new file mode 100755 index 00000000..827a806e --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter7_1.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "EE-7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Rate of Return Method" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.1 Page 89" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of vriable\nIi=100000.0;#in Rs\nAr=30000.0;#in Rs\nn=5.0;#in years\ni1=10.0;#in % per annum\n\n#calcualton\nPW1=-Ii+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\n\n#calcualtion\ni2=15.0;#in % per annum\nPW2=-Ii+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\n\n#result\nprint \"The present worth for i=15% in RS. \",round(PW2,3);\n\n#calculation\ni3=18.0;#in % per annum\nPW3=-Ii+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni=15+(PW2-0)*(i3-i2)/(PW2-PW3);#in Rs\n\n#result\nprint \"The present worth for i=18% in RS. \",round(PW3,3)\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return for the new business in % per annum \",round(i,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for i=10% in RS. 13723.603\nThe present worth for i=15% in RS. 564.653\nThe present worth for i=18% in RS. -6184.869\nPresent worth for i=15% is suitable.\nTherefore, the rate of return for the new business in % per annum 15.251\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.2 Page 90" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIo=2000000.0;#in Rs\nANP=350000.0;#in Rs\nS=0.0;#in Rs\nn=10.0;#in years\ni1=10.0;#in % per annum\n\n#calcualtion\nPW1=-Io+ANP*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\n\n#calculation\ni2=12.0;#in % per annum\nPW2=-Io+ANP*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=10+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=15% in RS. \",round(PW2,3);\nprint \"Present worth for i=10% is suitable.\";\nprint \"Therefore, the rate of return for the new business in % per annum \",round(i,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for i=10% in RS. 150598.487\nThe present worth for i=15% in RS. -22421.94\nPresent worth for i=10% is suitable.\nTherefore, the rate of return for the new business in % per annum 11.741\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.3 Page 91" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternate 1\nIo=150000.0;#in Rs\nAp=45570.0;#in Rs\nn=5.0;#in years\n\n#calculation\ni1=10.0;#in % per annum\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=12.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni3=15.0;#in % per annum\nPW3=-Io+Ap*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=18.0;#in % per annum\nPW4=-Io+Ap*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\nprint \"The present worth for i=12% in RS. \",round(PW2,3);\nprint \"The present worth for i=15% in RS. \",round(PW3,3);\nprint \"The present worth for i=18% in RS. \",round(PW4,3);\nprint\"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\n\n#alternative 2\nIo=210000.0;#in Rs\nAp=58260.0;#in Rs\nn=5.0;#in years\ni1=12.0;#in % per annum\n\n#calcualtion\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=13.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=12% in RS. \",round(PW1,3);\nprint \"The present worth for i=13% in RS. \",round(PW2,3);\nprint\"Present worth for i=12% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\n\n#Alternative 3:\nIo=255000.0;#in Rs\nAp=69000.0;#in Rs\nn=5.0;#in years\ni1=11.0;#in % per annum\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=12.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=11% in RS. \",round(PW1,3);\nprint \"The present worth for i=12% in RS. \",round(PW2,3);\nprint\"Present worth for i=12% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\nprint\"It is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for i=10% in RS. 22746.153\nThe present worth for i=12% in RS. 14269.652\nThe present worth for i=15% in RS. 2757.708\nThe present worth for i=18% in RS. -7494.817\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative in % per annum : 15.807\nThe present worth for i=12% in RS. 14.262\nThe present worth for i=13% in RS. -5086.107\nPresent worth for i=12% is suitable.\nTherefore, the rate of return of alternative in % per annum : 12.003\nThe present worth for i=11% in RS. 16.894\nThe present worth for i=12% in RS. -6270.442\nPresent worth for i=12% is suitable.\nTherefore, the rate of return of alternative in % per annum : 11.003\nIt is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. \n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.4 Page 94" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nA0=-1275.0;#in Rs\nA1=150.0;#in Rs\nG=150.0;#in Rs\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#calcualtion\nA=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in RS\ni1=10.0;#in % per annum\nPW1=A0+(A1+G*(((1+i1/100)**n)-i1*n/100-1)/(((i1/100)*(1+i1/100)**n)-i1/100))*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#i1n Rs.\ni2=12.0;#i2n % per annum\nPW2=A0+(A1+G*(((1+i2/100)**n)-i2*n/100-1)/(((i2/100)*(1+i2/100)**n)-i2/100))*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#i2n Rs.\ni3=15.0;#i3n % per annum\nPW3=A0+(A1+G*(((1+i3/100)**n)-i3*n/100-1)/(((i3/100)*(1+i3/100)**n)-i3/100))*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#i3n Rs.\ni4=18.0;#in % per annum\nPW4=A0+(A1+G*(((1+i4/100)**n)-i4*n/100-1)/(((i4/100)*(1+i4/100)**n)-i4/100))*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in Rs.\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The annual equivalent of the positive cash flows in RS. : \",round(A,3);\nprint \"PW(10)\",round(PW1,3);\nprint \"PW(12)\",round(PW2,3);\nprint \"PW(15)\",round(PW3,3);\nprint \"PW(18)\",round(PW1,4);\nprint\"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return for the given cash flow in % per annum :\",round(i,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent of the positive cash flows in RS. : 421.519\nPW(10) 322.888\nPW(12) 225.269\nPW(15) 94.095\nPW(18) 322.8882\nPresent worth for i=15% is suitable.\nTherefore, the rate of return for the given cash flow in % per annum : 17.448\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.5 Page 95" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nIo=500000.0;#in Rs\nAr=170000.0;#in Rs\nn=5.0;#in years\ni1=15.0;#in % per annum\n\n#calculation\nPW1=-Io+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=17.0;#in % per annum\nPW2=-Io+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni3=20.0;#in % per annum\nPW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=22.0;#in % per annum\nPW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth(PW(15%)) for i=10% in RS. \",round(PW1,3);\nprint \"The present worth(PW(17%)) for i=10% in RS. \",round(PW2,3);\nprint \"The present worth(PW(20%)) for i=10% in RS. \",round(PW3,3);\nprint \"The present worth(PW(22%)) for i=10% in RS. \",round(PW4,3);\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative 1 in % per annum \",round(i,3);\n\n#altenative 2\nIo=800000.0;#in Rs\nAr=270000.0;#in Rs\nn=5.0;#in years\ni3=20.0;#in % per annum\n\n#calculation\nPW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=22.0;#in % per annum\nPW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth(PW(20%)) for i=10% in RS. \",round(PW3,3);\nprint \"The present worth(PW(22%)) for i=10% in RS. \",round(PW4,3);\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative 2 in % per annum \",round(i,3);\nprint \"Since the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth(PW(15%)) for i=10% in RS. 69866.367\nThe present worth(PW(17%)) for i=10% in RS. 43888.848\nThe present worth(PW(20%)) for i=10% in RS. 8404.064\nThe present worth(PW(22%)) for i=10% in RS. -13181.241\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative 1 in % per annum 20.779\nThe present worth(PW(20%)) for i=10% in RS. 7465.278\nThe present worth(PW(22%)) for i=10% in RS. -26817.264\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative 2 in % per annum 20.436\nSince the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. \n" + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb new file mode 100755 index 00000000..a226c6dc --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb @@ -0,0 +1,230 @@ +{ + "metadata": { + "name": "EE-8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Replacement and Maintenance Analysis" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.1 Page 103" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nFC=4000.0;#in Rs.\ni=0.0;#in % per annum\nMC1=0;#in Rs.\nprint \"Tabulation to determine economic life : \";\nprint\"End of Maintenance Summation of Avg cost of Avg FC if Avg total\";\nprint\" year cost at end maintenance maintenance replaced at cost through\";\nprint\" of year costs through year year given year given\";\nprint\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\";\nprint\" 1 0 0 0 4000 4000\";\nprint\" 2 200 200 100 2000 2100\";\nprint\" 3 400 600 200 1333.33 1533.33\";\nprint\" 4 600 1200 300 1000 1300\";\nprint\" 5 800 2000 400 800 1200\";\nprint\" 6 1000 3000 500 666.67 1166.67\";\nprint\" 7 1200 4200 600 571.43 1171.43\";\nprint\"Economic life of the machine : 6 years\";\nprint\"Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\";\n\n#When i=12%\ni=12.0;#in % per annum\nFC=4000.0;#in Rs.\nprint\"Tabulation to determine economic life : \";\nprint\"End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\";\nprint\" year cost at end 12% of year of PW of cumulative 12% total cost\";\nprint\" of year n maintenance maintenance maintenance n of year\";\nprint\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\";\nprint\" 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\";\nprint\" 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\";\nprint\" 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\";\nprint\" 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\";\nprint\" 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\";\nprint\" 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\";\nprint\" 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\";\nprint\" 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\";\nprint\" 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\";\nprint\" 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\";\nprint\"Economic life of the machine : 7 years\";\nprint\"For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\";\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Tabulation to determine economic life : \nEnd of Maintenance Summation of Avg cost of Avg FC if Avg total\n year cost at end maintenance maintenance replaced at cost through\n of year costs through year year given year given\n A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\n 1 0 0 0 4000 4000\n 2 200 200 100 2000 2100\n 3 400 600 200 1333.33 1533.33\n 4 600 1200 300 1000 1300\n 5 800 2000 400 800 1200\n 6 1000 3000 500 666.67 1166.67\n 7 1200 4200 600 571.43 1171.43\nEconomic life of the machine : 6 years\nColumn C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\nTabulation to determine economic life : \nEnd of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\n year cost at end 12% of year of PW of cumulative 12% total cost\n of year n maintenance maintenance maintenance n of year\n A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\n 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\n 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\n 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\n 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\n 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\n 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\n 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\n 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\n 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\n 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\nEconomic life of the machine : 7 years\nFor this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.2 Page 105" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nFC=20000.0;#in Rs.\ni=15.0;#in % per annum\n\n#result\nprint \"The other details are summarized in Table 8.3. It can be seen from the book.\";\nprint \"Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\";\nprint \"In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The other details are summarized in Table 8.3. It can be seen from the book.\nTotal annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\nIn column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.3 Page 107" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nFC=20000.0;#in Rs.\ni=15.0;#in % per annum\n\n#result\nprint \"The details are summarized in Table 8.4. It can be seen from the book.\";\nprint\"Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\";\nprint\"(column E + Rs. 6000)* Column G\";\nprint \"Column F * Column G\";\nprint \"In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \";\nprint \"RESULT : Min annual equivalent cost for machine A : Rs. 2780\";\nprint \"Min annual equivalent cost for machine B : Rs. 3672.30\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The details are summarized in Table 8.4. It can be seen from the book.\nTotal annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\n(column E + Rs. 6000)* Column G\nColumn F * Column G\nIn column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \nRESULT : Min annual equivalent cost for machine A : Rs. 2780\nMin annual equivalent cost for machine B : Rs. 3672.30\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.4 Page 109" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nPprice=200000.0;#in Rs\nP=120000.0;#in Rs\nF=25000.0;#in Rs\nA=25000.0;#in Rs\ni=12.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE1,3);\n\n#Alternative 2\nP=150000.0;#in Rs\nF=20000.0;#in Rs\nA=14000.0;#in Rs\ni=12.0;#in % per annum\nn=6.0;#in years\n\n#calcualion\nAE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE2,3);\nprint \"Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(12%)) of this alternative in RS. 51106.443\nThe annual equivalent cost(AE(12%)) of this alternative in RS. 48019.343\nSince, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.5 Page 111" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initation of variable\n#alternative 1\nPprice=50000.0;#in Rs\nP=15000.0;#in Rs\nF=8000.0;#in Rs\nA=14000.0;#in Rs\ni=15.0;#in % per annum\nn=5.0;#in years\n\n#calcualtion\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(15%)) of this alternative in RS. \",round(AE1,3);\n\n#Alternative 2\nP=65000.0;#in Rs\nF=13000.0;#in Rs\nA=9000.0;#in Rs\ni=15.0;#in % per annum\nn=20.0;#in years\n\n#calculation\nAE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(15%)) of this alternative in RS. : \",round(AE2,3);\nprint \"Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(15%)) of this alternative in RS. 17288.209\nThe annual equivalent cost(AE(15%)) of this alternative in RS. : 19257.596\nSince, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.6 Page 113" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#intiation of variable\nP=660000.0;#in Rs\nF=400000.0;#in Rs\nA=96000.0;#in Rs\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#caculation\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE1,3);\n\n#Alternative 2\nP=150000.0;#in Rs\nX=420000.0;#in Rs\ni=10.0;#in % per annum\nn=40.0;#in years\n\n#calcualtion\nAE2=(P-X)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE2,3);\nprint \"Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\";\nprint \" calculations in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(10%)) of this alternative in RS. : 204587.345\nThe annual equivalent cost(AE(10%)) of this alternative in RS. : 108389.958\nSince, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\n calculations in the book is not accurate.\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.7 Page 113" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nP=10000.0;#in Rs\nF=1500.0;#in Rs\nA=1600.0;#in Rs\ni=15.0;#in % per annum\nn=7.0;#in years\n\n#calcualtion\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : \",round(AE1,3);\n\n#alternative 1 part 2\nP=10000;#in Rs\nF=800.0;#in Rs\nA=1000.0;#in Rs\ni=15.0;#in % per annum\nn=7.0;#in years\n\n#calcualtion\nAE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. \",round(AE2,3);\nprint \"Total annual equivalent cost of alternative in Rs. : \",round(AE1+AE2,3);\n\n\n#Alternative 2\nP=35000.0;#in Rs\nF=4000.0;#in Rs\nA=500.0;#in Rs\ni=15.0;#in % per annum\nn=7.0;#in years\n\n#calcualtion\nAE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\nprint \"The annual equivalent cost of alternative 2 in RS.\",round(AE,3);\nprint\"Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\";\nprint \" calculations in the book is not accurate\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : 3868.063\nThe annual equivalent cost(AE(10%)) of 10 hp motor in RS. 3331.315\nTotal annual equivalent cost of alternative in Rs. : 7199.378\nThe annual equivalent cost of alternative 2 in RS. 8551.171\nSince, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\n calculations in the book is not accurate\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.8 Page 115" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=10000.0;#in Rs\nF=4000.0;#in Rs\nA=500.0;#in Rs\ni=12.0;#in % per annum\nn=4.0;#in years\n\n#calcualtion\nAE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\nX= (AE-1000*i/100-750)/0.3292+1000;\n#result\nprint \"The annual equivalent cost(AE(15%)) of n in RSew machine : \",round(AE,3);\nprint \"The comparative use value of old machine is Rs.\", round(X,3), \"which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \";\nprint\"Therefore, it is advisable to replace the old machine with the new one.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(15%)) of n in RSew machine : 2955.407\nThe comparative use value of old machine is Rs. 7334.771 which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \nTherefore, it is advisable to replace the old machine with the new one.\n" + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.9 Page 117" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Intiation of Variable\np1=0.07;#unitless\np2=0.11;#unitless\np3=0.12;#unitless\np4=0.18;#unitless\np5=0.21;#unitless\np6=0.20;#unitless\np7=0.11;#unitless\nN0=100.0;#no. of transistors\n\n#calcualtion\nN1=N0*p1;#no. of transistors\nN2=N0*p2;#no. of transistors\nN3=N0*p3;#no. of transistors\nN4=N0*p4;#no. of transistors\nN5=N0*p5;#no. of transistors\nN6=N0*p6;#no. of transistors\nN7=N0*p7;#no. of transistors\nLife=0;#in weeks\np=[p1, p2, p3, p4, p5, p6, p7];#Unitless\nfor i in range (7): \n Life=Life+(i+1)*p[i];\n\n#result\nprint \"Expected life of each transistor in weeks : \",round(Life,3)\nprint \"Average No. of failures/week : \",round(100/Life);\n\n#result of group replacement cost \nprint \"Cost of transistor when replaced simultaneously = Rs. 3\";\nprint \"Cost of transistor when replaced individually = Rs. 9\";\nprint \"The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\";\nprint \"From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\";\nprint \"Individual replacement cost/week = Rs. 207\";\nprint \"Minimum group replacement ost/week = Rs. 196.50\";\nprint \"Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Expected life of each transistor in weeks : 4.39\nAverage No. of failures/week : 23.0\nCost of transistor when replaced simultaneously = Rs. 3\nCost of transistor when replaced individually = Rs. 9\nThe cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\nFrom table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\nIndividual replacement cost/week = Rs. 207\nMinimum group replacement ost/week = Rs. 196.50\nSince the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\n" + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.10 Page 119" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\np1=(100.0-96)/100;#unitless\np2=(96.0-89)/100;#unitless\np3=(89-68)/100;#unitless\np4=(68.0-37)/100;#unitless\np5=(37.0-13)/100;#unitless\np6=(13.0-0)/100;#unitless\nN0=1000.0;#no. of resistors\n\n#calculation\nN1=N0*p1;#no. of resistors\nN2=N0*p2+N1*p1;#no. of resistors\nN3=N0*p3+N1*p2+N2*p1;#no. of resistors\nN4=N0*p4+N1*p3+N2*p2+N3*p1;#no. of resistors\nN5=N0*p5+N1*p4+N2*p3+N3*p2+N4*p1;#no. of resistors\nN6=N0*p6+N1*p5+N2*p4+N3*p3+N4*p2+N5*p1 ;#no. of resistors\n\nLife=0;#in months\np=[p1, p2, p3, p4, p5, p6, p7];#Unitless\nfor i in range (7): \n Life=Life+(i+1)*p[i];\n\n#result\nprint \"Expected life of each transistor in weeks : \",round(Life,3)\nprint \"Average No. of failures/week : \",round(100/Life);\n\n#result of group replacement cost\nprint \"Cost/transistor when replaced simultaneously = Rs. 4\";\nprint \"Cost/transistor when replaced individually = Rs. 10\";\nprint \"The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\";\nprint \"From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\";\nprint \"Individual replacement cost/month = Rs. 2480\";\nprint \"Minimum group replacement ost/month = Rs. 2426.67\";\nprint \"Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Expected life of each transistor in weeks : 4.17\nAverage No. of failures/week : 24.0\nCost/transistor when replaced simultaneously = Rs. 4\nCost/transistor when replaced individually = Rs. 10\nThe cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\nFrom table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\nIndividual replacement cost/month = Rs. 2480\nMinimum group replacement ost/month = Rs. 2426.67\nSince the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\n" + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter9_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter9_1.ipynb new file mode 100755 index 00000000..6221daa0 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter9_1.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "EE-9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Depreciation" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.1 Page 127" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=100000;#book vakue\n\n#calcualtion\nDt=(P-F)/n;#in Rs.\n\n#result\nprint \"End of year Depreciation Book value\";\nfor i in range (8):\n B=Bt-i*Dt;\n print eoy[i],\" \",Dt,\" \", B,\" \";\n \n \n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Depreciation Book value\n0 10000.0 100000.0 \n1 10000.0 90000.0 \n2 10000.0 80000.0 \n3 10000.0 70000.0 \n4 10000.0 60000.0 \n5 10000.0 50000.0 \n6 10000.0 40000.0 \n7 10000.0 30000.0 \n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.2 Page 127" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\n\n#calculation\nD5=(P-F)/n;#in Rs.\nt=5;#in years\nBt=P-t*(P-F)/n;#in Rs\n\n#result\nprint \"D5 in Rs. : \",round(D5,3);\nprint \"(This is independent of the time period)\";\nprint \"B5 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D5 in Rs. : 10000.0\n(This is independent of the time period)\nB5 in Rs. : 50000.0\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.3 Page 129" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.2\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\n\n#result\nprint \"End of year Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n Dt[i]=k*Bt[i-1];\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",Dt[i],\" \", Bt[i],\" \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Depreciation Book value\n0 0 100000\n1 20000.0 80000.0 \n2 16000.0 64000.0 \n3 12800.0 51200.0 \n4 10240.0 40960.0 \n5 8192.0 32768.0 \n6 6553.6 26214.4 \n7 5242.88 20971.52 \n8 4194.304 16777.216 \n" + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.4 Page 128" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.2\nt=5.0;#in years\n\n#calculation\nDt=k*(1-k)**(t-1)*P;#in Rs.\nBt=((1-k)**t)*P;#in Rs.\n\n#result\nprint \"D5 in Rs. : \",round(Dt,3);\nprint \"B5 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D5 in Rs. : 8192.0\nB5 in Rs. : 32768.0\n" + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.5 Page 129" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nSum=n*(n+1)/2;#sum of the years\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\nrate=[0.0,0,0,0,0,0,0,0,0];\n\n#result\nprint \"End of year Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n rate[i]=(8-i+1)/36.0;\n Dt[i]=rate[i]*(P-F);\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",Dt[i],\" \", Bt[i],\" \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Depreciation Book value\n0 0 100000\n1 17777.7777778 82222.2222222 \n2 15555.5555556 66666.6666667 \n3 13333.3333333 53333.3333333 \n4 11111.1111111 42222.2222222 \n5 8888.88888889 33333.3333333 \n6 6666.66666667 26666.6666667 \n7 4444.44444444 22222.2222222 \n8 2222.22222222 20000.0 \n" + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.6 Page 131" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nt=5.0;#in years\n\n#cacualtion\nDt=(n-t+1)*(P-F)/(n*(n+1)/2);#in Rs.\nBt=(P-F)*((n-t)/n)*((n-t+1)/(n+1))+F;#in Rs.\n\n#result\nprint \"D5 in Rs. : \",round(Dt,3);\nprint \"B5 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D5 in Rs. : 8888.889\nB5 in Rs. : 33333.333\n" + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.7 Page 132" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.12;\ni=12.0;#in % per annum\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\nrate=[0.0,0,0,0,0,0,0,0,0];\nSUM=0;\n\n#calculation\nA=(P-F)*(i/100)/(((1+i/100)**n)-1);\n\n#result\nprint \"End of year Net Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n Dt[i]=k*SUM+A;\n SUM=SUM+Dt[i]\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",round(Dt[i],3),\" \", round(Bt[i],3),\" \";\n \nprint \"fixed deprececiation which is constant in Rs\",round(A,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Net Depreciation Book value\n0 0 100000\n1 6504.227 93495.773 \n2 7284.735 86211.038 \n3 8158.903 78052.135 \n4 9137.971 68914.164 \n5 10234.528 58679.637 \n6 11462.671 47216.966 \n7 12838.191 34378.774 \n8 14378.774 20000.0 \nfixed deprececiation which is constant in Rs 6504.227\n" + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.8 Page 133" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\ni=12.0;#in % per annum\nt=5.0;#in Years\n\n#calculation\nDt=(P-F)*(i/100)/(((1+i/100)**n)-1)*(1+i/100)**(t-1);#in Rs.\nt=7;#in Years\nBt=P-(P-F)*(i/100)/(((1+i/100)**n)-1)*(((1+i/100)**t)-1)/(i/100);#in Rs.\n\n#result\nprint \"D7 in Rs. : \",round(Dt,3);\nprint \"B7 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D7 in Rs. : 10234.528\nB7 in Rs. : 34378.774\n" + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.9 Page 134" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=8000000.0;#in Rs\nF=50000.0;#in Rs\nX=75000.0;#in Km\nx=2000.0;#in Km\nn=8.0;#in years\ni=12.0;#in % per annum\n\n#calcualtion\nD=(P-F)*x/X;#in Rs.\n\n#result\nprint \"Depreciation for year 3 in Rs. : \",round(D,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Depreciation for year 3 in Rs. : 212000.0\n" + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/README.txt b/Engineering_Economics_by_R_Panneerselvam/README.txt new file mode 100755 index 00000000..27bb08be --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/README.txt @@ -0,0 +1,10 @@ +Contributed By: Tarun Kumar Das +Course: btech +College/Institute/Organization: College of Engineering +Department/Designation: Industrial Engineering +Book Title: Engineering Economics +Author: R. Panneerselvam +Publisher: Phi Learning, Delhi +Year of publication: 2010 +Isbn: 978-81-203-1743-7 +Edition: 1 \ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/screenshots/Depriciation_and_Book_value.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Depriciation_and_Book_value.png new file mode 100755 index 00000000..3c2c419d Binary files /dev/null and b/Engineering_Economics_by_R_Panneerselvam/screenshots/Depriciation_and_Book_value.png differ diff --git a/Engineering_Economics_by_R_Panneerselvam/screenshots/Economic_order_and_Time.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Economic_order_and_Time.png new file mode 100755 index 00000000..623d5718 Binary files /dev/null and b/Engineering_Economics_by_R_Panneerselvam/screenshots/Economic_order_and_Time.png differ diff --git a/Engineering_Economics_by_R_Panneerselvam/screenshots/Expected_Saving.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Expected_Saving.png new file mode 100755 index 00000000..6970da10 Binary files /dev/null and b/Engineering_Economics_by_R_Panneerselvam/screenshots/Expected_Saving.png differ diff --git a/Engineering_Economics_by_R_Panneerselvam/screenshots/Present_Worth.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Present_Worth.png new file mode 100755 index 00000000..c5295c6e Binary files /dev/null and b/Engineering_Economics_by_R_Panneerselvam/screenshots/Present_Worth.png differ diff --git a/Engineering_Economics_by_R_Panneerselvam/screenshots/future_sum.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/future_sum.png new file mode 100755 index 00000000..50e1aa00 Binary files /dev/null and b/Engineering_Economics_by_R_Panneerselvam/screenshots/future_sum.png differ diff --git a/Engineering_Economics_by_R_Panneerselvam/screenshots/maturity_value.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/maturity_value.png new file mode 100755 index 00000000..72bd0ac4 Binary files /dev/null and b/Engineering_Economics_by_R_Panneerselvam/screenshots/maturity_value.png differ diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png b/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png old mode 100644 new mode 100755 diff --git a/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/README.txt b/Engineering_Physics_by_G._Vijayakumari/README.txt old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_P.K.Palanisamy/README.txt b/Engineering_Physics_by_P.K.Palanisamy/README.txt old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/README.txt b/Engineering_Physics_by_S._Mani_Naidu/README.txt old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png old mode 100644 new mode 100755 diff --git a/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb b/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb new file mode 100755 index 00000000..0efc0c8d --- /dev/null +++ b/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb @@ -0,0 +1,287 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0e9faaea32136a2f476b53b6ab2d5d2eb5330fb68ebd80aaad9bbe7ed1328c93" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "12: Radioactivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 12.1, Page number 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M7Li3=7.018232; #mass of 7li3(amu)\n", + "Malpha=4.003874; #mass of alpha particle(amu)\n", + "Mpr=1.008145; #mass of proton(amu)\n", + "Ey=9.15; #K.E energy of product nucleus\n", + "\n", + "#Calculation\n", + "#xMy -> x-mass no., M-element, y-atomic no.\n", + "#reaction:- 7li3 + 1H1-> 4He2 + 4He2\n", + "deltaM=M7Li3+Mpr-2*Malpha; #mass defect(amu)\n", + "Q=deltaM*931; #mass defect(MeV)\n", + "Ex=2*Ey-Q; #K.E of incident particle(MeV)\n", + "\n", + "#Result\n", + "print \"kinetic energy of incident proton is\",round(Ex,4),\"MeV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kinetic energy of incident proton is 0.9564 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 12.2, Page number 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M235U=235; #atomic mass of 235U\n", + "m=10**-3; #mass of fissions(gm)\n", + "N=6.023*10**23; #avagadro number\n", + "Eperfi=200*10**6; #energy per fission(eV)\n", + "T=10**-6; #time(s)\n", + "\n", + "#Calculation\n", + "E=Eperfi*1.6*10**-19; #energy per fission(J)\n", + "A=M235U; \n", + "P=((m*N)/A)*(E/T); #power explosion(Watt)\n", + "\n", + "#Result\n", + "print \"power of explosion is\",P,\"Watt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power of explosion is 8.20153191489e+13 Watt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 12.4, Page number 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=0.4; #efficiency\n", + "N=6.06*10**26; #avagadro number\n", + "Eperfi=200*10**6; #energy per fission(eV)\n", + "P=100*10**6; #electric power(W)\n", + "A=235;\n", + "\n", + "#Calculation\n", + "E=Eperfi*1.6*10**-19; #energy per fission(J)\n", + "T=24*60*60; #time(sec)\n", + "N235=P*T/(E*n); #number of atoms in 235 kg of U235\n", + "m=(A*N235)/N; #mass of 235U consumed/day(kg)\n", + "\n", + "#Result\n", + "print \"mass of 235U consumed/day is\",int(m*10**3),\"g\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of 235U consumed/day is 261 g\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 12.5, Page number 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M2H1=2.01474; #mass of M2H1(amu)\n", + "M3H1=3.01700; #mass of M3H1(amu)\n", + "M1n0=1.008986; #mass of M1n0(amu)\n", + "M4He2=4.003880; #mass of M4He2(amu)\n", + "\n", + "#Calculation\n", + "#thermonuclear reaction in hydrogen bomb explosion \n", + "#2H1 + 3H1 -> 4He2 + 1n0\n", + "Mreac=M2H1+M3H1; #mass of reactants(amu)\n", + "Mprod=M4He2+M1n0; #mass of products(amu)\n", + "Q=Mreac-Mprod; #amount of energy released per reaction(J)\n", + "Q=Q*931; #amount of energy released per reaction(MeV)\n", + "\n", + "#Result\n", + "print \"amount of energy released per reaction is\",round(Q,3),\"MeV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "amount of energy released per reaction is 17.572 MeV\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 12.6, Page number 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M7Li3=7.01818; #mass of Li atom(amu)\n", + "M1H1=1.0081; #mass of H atom(amu)\n", + "M1n0=1.009; #mass of neutron(amu)\n", + "\n", + "#Calculation\n", + "BEpernu=(1/7)*((3*M1H1)+(4*M1n0)-M7Li3); #binding energy per nucleon(J)\n", + "BEpernu=BEpernu*931; #binding energy per nucleon(MeV)\n", + "\n", + "#Result\n", + "print \"binding energy per nucleon is\",BEpernu,\"MeV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "binding energy per nucleon is 5.60196 MeV\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 12.7, Page number 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=10*10**3; #mass of U235(gm)\n", + "N=6.02*10**23; #avagadro number\n", + "Eperfi=200*10**6; #energy per fission(eV)\n", + "A=235;\n", + "\n", + "#Calculation\n", + "E=Eperfi*1.6*10**-19; #energy(J)\n", + "T=24*60*60; #time(s)\n", + "P=((m*N)/A)*(E/T); #power output(Watt)\n", + "\n", + "#Result\n", + "print \"power output is\",round(P/10**9,3),\"*10**9 Watt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power output is 9.488 *10**9 Watt\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb.bkup b/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb.bkup deleted file mode 100755 index 0efc0c8d..00000000 --- a/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb.bkup +++ /dev/null @@ -1,287 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0e9faaea32136a2f476b53b6ab2d5d2eb5330fb68ebd80aaad9bbe7ed1328c93" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "12: Radioactivity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 12.1, Page number 351" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "M7Li3=7.018232; #mass of 7li3(amu)\n", - "Malpha=4.003874; #mass of alpha particle(amu)\n", - "Mpr=1.008145; #mass of proton(amu)\n", - "Ey=9.15; #K.E energy of product nucleus\n", - "\n", - "#Calculation\n", - "#xMy -> x-mass no., M-element, y-atomic no.\n", - "#reaction:- 7li3 + 1H1-> 4He2 + 4He2\n", - "deltaM=M7Li3+Mpr-2*Malpha; #mass defect(amu)\n", - "Q=deltaM*931; #mass defect(MeV)\n", - "Ex=2*Ey-Q; #K.E of incident particle(MeV)\n", - "\n", - "#Result\n", - "print \"kinetic energy of incident proton is\",round(Ex,4),\"MeV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "kinetic energy of incident proton is 0.9564 MeV\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 12.2, Page number 351" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "M235U=235; #atomic mass of 235U\n", - "m=10**-3; #mass of fissions(gm)\n", - "N=6.023*10**23; #avagadro number\n", - "Eperfi=200*10**6; #energy per fission(eV)\n", - "T=10**-6; #time(s)\n", - "\n", - "#Calculation\n", - "E=Eperfi*1.6*10**-19; #energy per fission(J)\n", - "A=M235U; \n", - "P=((m*N)/A)*(E/T); #power explosion(Watt)\n", - "\n", - "#Result\n", - "print \"power of explosion is\",P,\"Watt\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "power of explosion is 8.20153191489e+13 Watt\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 12.4, Page number 352" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "n=0.4; #efficiency\n", - "N=6.06*10**26; #avagadro number\n", - "Eperfi=200*10**6; #energy per fission(eV)\n", - "P=100*10**6; #electric power(W)\n", - "A=235;\n", - "\n", - "#Calculation\n", - "E=Eperfi*1.6*10**-19; #energy per fission(J)\n", - "T=24*60*60; #time(sec)\n", - "N235=P*T/(E*n); #number of atoms in 235 kg of U235\n", - "m=(A*N235)/N; #mass of 235U consumed/day(kg)\n", - "\n", - "#Result\n", - "print \"mass of 235U consumed/day is\",int(m*10**3),\"g\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of 235U consumed/day is 261 g\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 12.5, Page number 352" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "M2H1=2.01474; #mass of M2H1(amu)\n", - "M3H1=3.01700; #mass of M3H1(amu)\n", - "M1n0=1.008986; #mass of M1n0(amu)\n", - "M4He2=4.003880; #mass of M4He2(amu)\n", - "\n", - "#Calculation\n", - "#thermonuclear reaction in hydrogen bomb explosion \n", - "#2H1 + 3H1 -> 4He2 + 1n0\n", - "Mreac=M2H1+M3H1; #mass of reactants(amu)\n", - "Mprod=M4He2+M1n0; #mass of products(amu)\n", - "Q=Mreac-Mprod; #amount of energy released per reaction(J)\n", - "Q=Q*931; #amount of energy released per reaction(MeV)\n", - "\n", - "#Result\n", - "print \"amount of energy released per reaction is\",round(Q,3),\"MeV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "amount of energy released per reaction is 17.572 MeV\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 12.6, Page number 353" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "M7Li3=7.01818; #mass of Li atom(amu)\n", - "M1H1=1.0081; #mass of H atom(amu)\n", - "M1n0=1.009; #mass of neutron(amu)\n", - "\n", - "#Calculation\n", - "BEpernu=(1/7)*((3*M1H1)+(4*M1n0)-M7Li3); #binding energy per nucleon(J)\n", - "BEpernu=BEpernu*931; #binding energy per nucleon(MeV)\n", - "\n", - "#Result\n", - "print \"binding energy per nucleon is\",BEpernu,\"MeV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "binding energy per nucleon is 5.60196 MeV\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 12.7, Page number 353" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#importing modules\n", - "import math\n", - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "m=10*10**3; #mass of U235(gm)\n", - "N=6.02*10**23; #avagadro number\n", - "Eperfi=200*10**6; #energy per fission(eV)\n", - "A=235;\n", - "\n", - "#Calculation\n", - "E=Eperfi*1.6*10**-19; #energy(J)\n", - "T=24*60*60; #time(s)\n", - "P=((m*N)/A)*(E/T); #power output(Watt)\n", - "\n", - "#Result\n", - "print \"power output is\",round(P/10**9,3),\"*10**9 Watt\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "power output is 9.488 *10**9 Watt\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png old mode 100644 new mode 100755 diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png old mode 100644 new mode 100755 diff --git a/Fluid_Mechanics/Chapter_1.ipynb b/Fluid_Mechanics/Chapter_1.ipynb deleted file mode 100755 index a2dd3e26..00000000 --- a/Fluid_Mechanics/Chapter_1.ipynb +++ /dev/null @@ -1,61 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4a6f98ae985b8e1b6e034e8590a04939cfd519f9354fb6a0851df17e977d9e9f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1: Fluid and their Properties" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.1, Page 14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - " #Initialization of Variable\n", - "sigma = 72.7*10**-3; #Surface Tension\n", - "r = 1 *10**-3; #Radius of Bubble\n", - "\n", - " #Calculations\n", - "P = 2*sigma/r;\n", - "print \"Excess Pressure(N/m2) :\",P\n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Excess Pressure(N/m2) : 145.4\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_10.ipynb b/Fluid_Mechanics/Chapter_10.ipynb deleted file mode 100755 index 510f6bab..00000000 --- a/Fluid_Mechanics/Chapter_10.ipynb +++ /dev/null @@ -1,341 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:03b40b6d5c44ff714aac13480905f296c46afa917e2740a687e8aa66bb21b428" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10: Laminar and Turbulent Flows in Bounded System" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1, Page 329" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import symbols,diff,solve\n", - "\n", - " #Initializing the variables\n", - "mu = 0.9;\n", - "rho = 1260;\n", - "g = 9.81;\n", - "x = 45; #theta in degrees\n", - "P1 = 250 * 10**3;\n", - "P2 = 80* 10**3;\n", - "Z1 = 1;\n", - "Z2 = 0; # datum\n", - "U = -1.5;\n", - "Y = 0.01;\n", - "\n", - " #Calculations\n", - "gradP1 = P1+ rho*g*Z1;\n", - "gradP2 = P2+ rho*g*Z2;\n", - "DPstar = (gradP1-gradP2)*math.sin(math.radians(x))/(Z1-Z2);\n", - "A = U/Y; # Coefficient U/Y for equation 10.6\n", - "B = DPstar/(2*mu) # Coefficient dp*/dx X(1/2mu) for equation 10.6\n", - "y = symbols('y')\n", - "v = round((A + B*Y),1)*y -round(B)*y**2\n", - "duBYdy = diff(v,y);\n", - "tau = 0.9*duBYdy;\n", - "stagPnts = solve(duBYdy,y)\n", - "ymax=stagPnts[0] #value of y where derivative vanishes.;\n", - "umax = (A + B*Y)*ymax + B*ymax**2; # Check the value there is slight mistake in books answer\n", - "def u(y):\n", - " z = (A + B*Y)*y -B*y**2;\n", - " return diff(z,y)\n", - "def dif(y):\n", - " return round((A + B*Y)) -2*round(B)*y\n", - "\n", - "taumax=abs(mu*dif(Y))\n", - "\n", - "print \"velocity distribution :\",v\n", - "print \"shear stress distribution :\",mu*dif(y)\n", - "print \"maximum flow velocity (m/s) :\",round(umax,2)\n", - "print \"Maximum Shear Stress (kN/m^2):\",(round(taumax)/1000)\n", - " \n", - "\n", - "print " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "velocity distribution : -71638.0*y**2 + 566.4*y\n", - "shear stress distribution : -128948.4*y + 509.4\n", - "maximum flow velocity (m/s) : 3.36\n", - "Maximum Shear Stress (kN/m^2): 0.78\n", - "\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2, Page 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "mu = 0.9;\n", - "rho = 1260;\n", - "d = 0.01;\n", - "Q = 1.8/60*10**-3; #Flow in m**3 per second\n", - "l = 6.5;\n", - "ReCrit = 2000;\n", - " #Calculations\n", - "A = (math.pi*d**2)/4;\n", - "MeanVel = Q/A;\n", - "Re = rho*MeanVel*d/mu/10; # Check properly the answer in book there is something wrong\n", - "Dp = 128*mu*l*Q/(math.pi*d**4)\n", - "Qcrit = Q*ReCrit/Re*10**3;\n", - "\n", - "print \"Pressure Loss (kN/m2) :\",round(Dp/1000,0)\n", - "print \"Maximum Flow rate (litres/s) :\",round(Qcrit,0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure Loss (kN/m2) : 715.0\n", - "Maximum Flow rate (litres/s) : 112.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.3, Page 341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "mu = 1.14*10**-3;\n", - "rho = 1000;\n", - "d = 0.04;\n", - "Q = 4*10**-3/60; #Flow in m**3 per second\n", - "l = 750;\n", - "ReCrit = 2000;\n", - "g = 9.81;\n", - "k = 0.00008; # Absolute Roughness\n", - "\n", - " #Calculations\n", - "A = (math.pi*d**2)/4;\n", - "MeanVel = Q/A;\n", - "Re = rho*MeanVel*d/mu;\n", - "Dp = 128*mu*l*Q/(math.pi*d**4);\n", - "hL = Dp/(rho*g);\n", - "f = 16/Re;\n", - "hlDa = 4*f*l*MeanVel**2/(2*d*g); # By Darcy Equation\n", - "Pa = rho*g*hlDa*Q;\n", - "\n", - " #Part(b)\n", - "Q = 30*10**-3/60; #Flow in m**3 per second\n", - "MeanVel = Q/A;\n", - "Re = rho*MeanVel*d/mu;\n", - "RR = k/d; # relative roughness\n", - "f = 0.008 #by Moody diagram for Re = 1.4 x 10**4 and relative roughness = 0.002\n", - "hlDb = 4*f*l*MeanVel**2/(2*d*g); # By Darcy Equation\n", - "Pb = rho*g*hlDb*Q;\n", - "\n", - "\n", - "print \"!---- Case (a) ----!\\n\",\"Head Loss(mm) :\",round(hlDa*1000,1)\n", - "print \"Power Required (W) :\",round(Pa,4)\n", - "print \"\\n!---- Case (b) ----!\\n\",\"Head Loss(m) :\",round(hlDb,2)\n", - "print \"Power Required (W) :\",round(Pb,0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "!---- Case (a) ----!\n", - "Head Loss(mm) : 92.5\n", - "Power Required (W) : 0.0605\n", - "\n", - "!---- Case (b) ----!\n", - "Head Loss(m) : 4.84\n", - "Power Required (W) : 24.0\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4, Page 343" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "w = 4.5;\n", - "d = 1.2 ;\n", - "C = 49;\n", - "i = 1/800;\n", - "\n", - " #Calculations\n", - "A = d*w;\n", - "P = 2*d + w;\n", - "m = A/P;\n", - "v = C*(m*i)**0.5;\n", - "Q = v*A;\n", - "\n", - "print \"Mean Velocity (m/s):\",round(v,2)\n", - "print \"Discharge (m3/s) :\",round(Q,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean Velocity (m/s): 1.53\n", - "Discharge (m3/s) : 8.28\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5, Page 348" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import sympy\n", - "from sympy import symbols\n", - "\n", - " #Initializing the variables\n", - "r,R = symbols('r R')\n", - "\n", - "#Calculations\n", - "rbyR=round((1-(49/60)**7),3)\n", - "r = (rbyR)*R \n", - "\n", - "#Result\n", - "print \"radius at which actual velocity is equal to mean velocity is\",r" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "radius at which actual velocity is equal to mean velocity is 0.758*R\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.7, Page 355" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "d1 = 0.140;\n", - "d2 = 0.250;\n", - "DpF_DpR = 0.6; #Difference in head loss when in forward and in reverse direction\n", - "K = 0.33 #From table\n", - "g = 9.81;\n", - " #Calculations\n", - "ratA = (d1/d2)**2;\n", - "v =(DpF_DpR*2*g/((1-ratA)**2-K))**0.5;\n", - "\n", - "print \"Velocity (m/s):\",round(v,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity (m/s): 9.13\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_11.ipynb b/Fluid_Mechanics/Chapter_11.ipynb deleted file mode 100755 index ac453318..00000000 --- a/Fluid_Mechanics/Chapter_11.ipynb +++ /dev/null @@ -1,120 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8adfc21cf4552e14b563ca7c0f2e56ece56cd7f1691cf9486f2cfbd789df7be1" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11: Boundary Layer" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1, Page 383" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "rho = 860;\n", - "v = 10**-5;\n", - "Us = 3;\n", - "b = 1.25;\n", - "l = 2;\n", - "\n", - " #Calculations\n", - "x = 1; # At x =1 \n", - "Rex = Us*x/v;\n", - "ReL = Us*l/v ;\n", - "mu = rho*v;\n", - "T0 = 0.332*mu*Us/x*Rex**0.5;\n", - "Cf = 1.33*ReL**-0.5;\n", - "F = rho*Us**2*l*b*Cf ;\n", - "print \"shear stress (N/m^2) :\" ,round(T0,1)\n", - "print \"Total, double-sided resistance of the plate (N) :\",round(F,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "shear stress (N/m^2) : 4.7\n", - "Total, double-sided resistance of the plate (N) : 33.224\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2, Page 387" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Us = 6;\n", - "b = 3;\n", - "l = 30;\n", - "rho = 1000;\n", - "mu = 10**-3;\n", - "T = 20+273; # Temperature in Kelvin\n", - "\n", - " #Calculations\n", - " \n", - "ReL = rho*Us*l/mu; \n", - "Cf = 0.455*math.log10(ReL)**-2.58 ;\n", - "\n", - "F = rho*Us**2*l*b*Cf ;\n", - "Lt = 10**5*mu/(rho*Us); # Assuming transition at Rel = 10**5\n", - "\n", - "print \"Drag Force (kN) :\", round(F/1000,2)\n", - "print \"Transition length (m) :\",round(Lt,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Drag Force (kN) : 6.36\n", - "Transition length (m) : 0.0167\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_12.ipynb b/Fluid_Mechanics/Chapter_12.ipynb deleted file mode 100755 index 745a2241..00000000 --- a/Fluid_Mechanics/Chapter_12.ipynb +++ /dev/null @@ -1,319 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:24438326f2aac267ced1e2e3aa21e094819eefb50d5f8862608b62208400992d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12: Incompressible Flow around a Body" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1, Page 399" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "x =35;\n", - "T = 50;\n", - "m = 1;\n", - "g =9.81;\n", - "rho = 1.2;\n", - "A = 1.2;\n", - "U0 = 40*1000/3600; # Velocity in m/s\n", - "\n", - " #Calculations\n", - "L = T*math.sin(math.radians(x))+m*g;\n", - "D =T*math.cos(math.radians(x));\n", - "Cl = 2*L/(rho*U0**2*A);\n", - "Cd = 2*D/(rho*U0**2*A); \n", - "\n", - "print \"Lift Coefficient :\",round(Cl,3)\n", - "print \"Drag Coefficient :\",round(Cd,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lift Coefficient : 0.433\n", - "Drag Coefficient : 0.461\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2, Page 406" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Vp =12;\n", - "lp = 40;\n", - "lm = 1;\n", - "As = 2500;\n", - "Dm = 32;\n", - "rhoP = 1025;\n", - "rhoM = 1000;\n", - "Ap = As;\n", - "\n", - " #Calculations\n", - "Am = As/40**2;\n", - "Vm = round(Vp*(lm/lp)**0.5,2);\n", - "Dfm = round(3.7*Vm**1.95*Am,1);\n", - "Rm = Dm - Dfm;\n", - "Rp = Rm *(rhoP/rhoM)*(lp/lm)**2*(Vp/Vm)**2;\n", - "Dfp = 2.9*Vp**1.8*Ap;\n", - "Dp = Rp + Dfp;\n", - "\n", - "print \"Expected total resistance (kN) :\",round(Dp/1000,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Expected total resistance (kN) : 1407.07\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.3, Page 410" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "U0 = 80*1000/3600;\n", - "d = 0.02;\n", - "rho =1.2;\n", - "mu = 1.7*10**-5;\n", - "A = 0.02*500; # Projected area of wire\n", - "N = 20; # No of cables\n", - "\n", - " #Calculations\n", - "Re = rho*U0*d/mu;\n", - "Cd = 1.2 # From figure 12.10 for given Re; \n", - "D = 0.5*rho*Cd*A*U0**2\n", - "F = N*D; \n", - "f = 0.198*(U0/d)*(1-19.7/Re);\n", - "\n", - "print \"Total force on tower (kN) :\",round(F/1000,2)\n", - "print \"Frequency (Hz) :\",round(f,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total force on tower (kN) : 71.11\n", - "Frequency (Hz) : 219.9\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.4, Page 415" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "mu = 0.03;\n", - "d = 10**-3;\n", - "rhoP = 1.1*10**3;\n", - "g = 9.81;\n", - "rho0 = 0.9*10**3;\n", - " #Calculations\n", - "B = 18*mu/(d**2*rhoP);\n", - "t = round(4.60/B,4);\n", - "Vt = round(d**2*(rhoP - rho0)*g/(18*mu),5);\n", - "Re = rho0*Vt*d/mu;\n", - "\n", - "print \"Time taken by the particle take to reach 99 per cent of its terminal velocity (s):\",t\n", - "print \"\\nReynolds No corrosponding to the velocity :\",Re" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time taken by the particle take to reach 99 per cent of its terminal velocity (s): 0.0094\n", - "\n", - "Reynolds No corrosponding to the velocity : 0.1089\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5, Page 417" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "muO = 0.0027;\n", - "Vt = 3*10**-3;\n", - "rhoW = 1000;\n", - "rhoP = 2.4*rhoW;\n", - "rhoO = 0.9*rhoW;\n", - "g = 9.81;\n", - "muA = 1.7*10**-5;\n", - "rhoA = 1.3;\n", - "\n", - " #Calculations\n", - "d = (18*muO*Vt/(rhoP-rhoO)/g)**0.5;\n", - "Re = Vt*d*rhoO/muO;\n", - "\n", - " #Movement of particle in upward direction\n", - "if(Re < 1):\n", - " v = 0.5;\n", - " \n", - " Re=5; # from fig 12.15\n", - " vt = muA*Re/(rhoA*d);\n", - " u = vt+v;\n", - " print \"Velocity of air stream blowing vertically up (m/s) :\",round(u,3) \n", - "else:\n", - " print \"strokes law is not valid\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity of air stream blowing vertically up (m/s) : 1.157\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.6, Page 429" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "c = 2;\n", - "s = 10;\n", - "rho = 5.33;\n", - "rho_ellip = 1.2;\n", - "D = 400;\n", - "L = 45000;\n", - "scale = 20;\n", - "U_windTunnel = 500;\n", - "U_proto = 400*1000/3600;\n", - "\n", - " #Calculations\n", - "A = c*s;\n", - "U_model = U_windTunnel/scale;\n", - "Cd = D/(0.5*rho*U_model**2*A);\n", - "Cl = L/(0.5*rho_ellip*U_proto**2*A); # Considering elliptical Lift model\n", - "Cdi = Cl**2/(math.pi*s/c); # Aspect Ratio = s/c \n", - "Cdt = Cd + Cdi;\n", - "Dw = 0.5*Cdt*rho_ellip*U_proto**2*A;\n", - "print \"Total drag on full sized wing (kN) :\",round(Dw/1000,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total drag on full sized wing (kN) : 2.65\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_13.ipynb b/Fluid_Mechanics/Chapter_13.ipynb deleted file mode 100755 index 664b4abf..00000000 --- a/Fluid_Mechanics/Chapter_13.ipynb +++ /dev/null @@ -1,142 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1f446f61d8838d40d2e31fd72ef3a0bc1e1a7f291c54a48c1366aef232ac3797" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13: Compressible Flow around a Body" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.1, Page 444" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "rho0 = 1.8;\n", - "R = 287;\n", - "T = 75+273; # Temperature in kelvin \n", - "gma = 1.4; \n", - "Ma = 0.7;\n", - "\n", - " #Calculations\n", - "P0 = rho0*R*T;\n", - "c = (gma*R*T)**0.5;\n", - "V0 = Ma*c;\n", - "Pt = (P0**((gma-1)/gma) + rho0*((gma-1)/gma)*(V0**2/(2*P0**(1/gma))))**(gma/(gma-1));\n", - "rhoT = rho0*(Pt/P0)**(1/gma);\n", - "Tt = Pt/(R*rhoT)-273;\n", - "\n", - "print \"Staganation Pressure (kN/m2 ) :\",round(Pt/1000,1)\n", - "print \"Temperature (Degree Celcius) :\",round(Tt,1)\n", - "print \"Density of airstream (kg/m3) :\",round(rhoT,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Staganation Pressure (kN/m2 ) : 249.4\n", - "Temperature (Degree Celcius) : 109.1\n", - "Density of airstream (kg/m3) : 2.274\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.2, Page 454" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "R = 287;\n", - "T = 28+273;\n", - "gma = 1.4;\n", - "P = 1.02*10**5;\n", - "rhoHg = 13.6*10**3;\n", - "g = 9.81;\n", - "\n", - " #Calculations\n", - " #Case(a)\n", - "U0 = 50;\n", - "c = (gma*R*T)**0.5;\n", - "Ma = U0/c;\n", - "rho = P/(R*T);\n", - "DelP = 0.5*rho*U0**2; #Pt-P\n", - "ha = DelP/(rhoHg*g);\n", - "\n", - " #Case(b)\n", - "U0 = 250;\n", - "Ma = U0/c;\n", - "Pt = P*(1+(gma-1)*Ma**2/2)**(gma/(gma-1)); \n", - "DelP = Pt-P\n", - "hb = DelP/(rhoHg*g);\n", - "\n", - " #Case (c)\n", - "U0 = 420;\n", - "Ma1 =U0/c;\n", - "P2 = P*((2*gma/(gma+1))*Ma1**2 - ((gma-1)/(gma+1)));\n", - "N = Ma1**2 +2/(gma-1); # Numerator\n", - "D = 2*gma*Ma1**2/(gma-1)-1;\n", - "Ma2 = (N/D)**0.5;\n", - "Pt2 = P2*(1+(gma-1)*Ma2**2/2)**(gma/(gma-1));\n", - "hc = (Pt2-P2)/(rhoHg*g) ; \n", - "\n", - "print \"Difference in height of mercury column in case (a) in mm :\",round(ha*1000,2)\n", - "print \"Difference in height of mercury column in case (b) in mm :\",round(hb*1000,1)\n", - "print \"Difference in height of mercury column in case (c) in mm :\",round(hc*1000,0)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Difference in height of mercury column in case (a) in mm : 11.06\n", - "Difference in height of mercury column in case (b) in mm : 314.2\n", - "Difference in height of mercury column in case (c) in mm : 684.0\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_14.ipynb b/Fluid_Mechanics/Chapter_14.ipynb deleted file mode 100755 index 2e55c7c8..00000000 --- a/Fluid_Mechanics/Chapter_14.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:75785fe7e68940de5df81a115443b8d5c78793053ae837735e58f86a072c05cc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14: Steady Incompressible Flow in Pipe and Duct System" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.1, Page 468" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "L1 = 5;\n", - "L2 = 10;\n", - "d = 0.1;\n", - "f = 0.08;\n", - "Za_Zc = 4; #difference in height between A and C \n", - "g = 9.81 ;\n", - "Pa = 0;\n", - "Va = 0; \n", - "Za_Zb = -1.5;\n", - "V = 1.26;\n", - "rho = 1000;\n", - "\n", - " #Calculations\n", - "D = 1.5 + 4*f*(L1+L2)/d ; # Denominator in case of v**2 \n", - "v = (2*g*Za_Zc/D)**0.5;\n", - "Pb = rho*g*Za_Zb - rho*V**2/2*(1.5+4*f*L1/d);\n", - "print \"Pressure in the pipe at B (kN/m2):\",round(Pb/1000,2)\n", - "print \"Mean Velocity at C (m/s) :\",round(v,2)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure in the pipe at B (kN/m2): -28.61\n", - "Mean Velocity at C (m/s) : 1.26\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.3, Page 473" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import symbols,solve\n", - "import sympy\n", - "\n", - "\n", - " #Initializing the variables\n", - "Za_Zb = 10;\n", - "f = 0.008;\n", - "L = 100;\n", - "d1 = 0.05;\n", - "g = 9.81;\n", - "d2 = 0.1;\n", - "\n", - " #Calculations\n", - "\n", - "def flowRate(d):\n", - " D = 1.5 + 4*f*L/d ; # Denominator in case of v1**2\n", - " A = math.pi*d**2/4;\n", - " v = (2*g*Za_Zb/D)**0.5;\n", - " z = A*v;\n", - " return z \n", - "Q1 = flowRate(d1);\n", - "Q2 = flowRate(d2);\n", - "Q=round(Q1+Q2,4)\n", - "\n", - "\n", - "D=symbols('D')\n", - "roots=solve(241212*D**5 -3.2, D)\n", - "dia=roots[0]\n", - "\n", - "print \"Rate flow for pipe 1 (m^3/s) :\",round(Q1,4)\n", - "print \"Rate flow for pipe 2 (m^3/s) :\",round(Q2,4)\n", - "print \"Combined Rate flow (m^3/s) :\",round(Q,4)\n", - "print \"Diameter of single equivalent pipe (mm) :\",round(dia,3)*1000\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rate flow for pipe 1 (m^3/s) : 0.0034\n", - "Rate flow for pipe 2 (m^3/s) : 0.019\n", - "Combined Rate flow (m^3/s) : 0.0224\n", - "Diameter of single equivalent pipe (mm) : 106.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.4, Page 476" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import solve,symbols\n", - "\n", - " #Initializing the variables\n", - "Za_Zb = 16;\n", - "Za_Zc = 24;\n", - "f = 0.01;\n", - "l1 = 120;\n", - "l2 = 60;\n", - "l3 = 40;\n", - "d1 = 0.12;\n", - "d2 = 0.075;\n", - "d3 = 0.060;\n", - "g = 9.81;\n", - " #Calculations\n", - "\n", - "v1=symbols('v1')\n", - "ash=solve(v1-0.3906*(g-1.25*v1**2)**0.5-0.25*(17.657-1.5*v1**2)**0.5,v1)\n", - "v1=round(abs(ash[0]),2)\n", - "Q1=math.pi/4*d1**2*v1\n", - "\n", - "v2=(g-1.25*v1**2)**0.5\n", - "Q2=math.pi/4*d2**2*v2\n", - "\n", - "v3=(17.657-1.5*v1**2)**0.5\n", - "Q3=math.pi/4*d3**2*v3\n", - "\n", - "print \"Flow rate in pipe 1 (m^3/s):\",round(Q1,4)\n", - "print \"Flow rate in pipe 2 (m^3/s):\",round(Q2,4)\n", - "print \"Flow rate in pipe 3 (m^3/s):\",round(Q3,4)\n", - "print \"continuity condition satisfied as Q1=Q2+Q3\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flow rate in pipe 1 (m^3/s): 0.0206\n", - "Flow rate in pipe 2 (m^3/s): 0.0105\n", - "Flow rate in pipe 3 (m^3/s): 0.0101\n", - "continuity condition satisfied as Q1=Q2+Q3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.5, Page 480" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "D = 0.3;\n", - "Q = 0.8;\n", - "rho = 1.2;\n", - "f = 0.008;\n", - "L_entry = 10;\n", - "L_exit = 30;\n", - "Lt = 20*D #Transition may be represented by a separation loss equivalent length of 20 * the approach duct diameter\n", - "K_entry = 4;\n", - "K_exit = 10\n", - "l = 0.4; # length of cross section\n", - "b = 0.2; # width of cross section\n", - "\n", - " #Calculations\n", - "A = math.pi*D**2/4;\n", - "Dp1 = 0.5*rho*Q**2/A**2*(K_entry + 4*f*(L_entry+Lt)/D);\n", - "area = l*b;\n", - "perimeter =2*(l+b);\n", - "m = area/perimeter;\n", - "Dp2 = 0.5*rho*Q**2/area**2*(K_exit + f*L_exit/m);\n", - "Dfan = Dp1+Dp2;\n", - "\n", - "print \"fan Pressure input (N/m2) :\",round(Dfan,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fan Pressure input (N/m2) : 1254.6\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.6, Page 482" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "D = [0.15 , 0.3];\n", - "rho = 1.2;\n", - "f = 0.008;\n", - "L_entry = 10;\n", - "L_exit = 20;\n", - "Lt = 20*D[1] \n", - "K = 4;\n", - "Q1 = 0.2;\n", - "\n", - " #Calculations\n", - "Q2 = 4*Q1;\n", - "A=[0.0,0.0]\n", - "A[0] = math.pi*D[0]**2/4;\n", - "A[1] = math.pi*D[1]**2/4;\n", - "Dp1 = 0.5*rho*Q1**2/A[0]**2*(K + 4*f*L_entry/D[0]);\n", - "Dp2 = 0.5*rho*Q2**2/A[1]**2*(4*f*(L_exit + Lt)/D[1]);\n", - "Dfan = Dp1+Dp2;\n", - "\n", - "print \"fan Pressure input (N/m2) :\",round(Dfan,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fan Pressure input (N/m2) : 684.51\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.7, Page 487" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from scipy.optimize import fsolve\n", - " \n", - " \n", - " \n", - " #Initializing the variables\n", - "d = [0.1 , 0.125, 0.15, 0.1, 0.1 ]; # Corrosponding to AA1B AA2B BC CD CF\n", - "l = [30 , 30 , 60, 15, 30]; # Corrosponding to AA1B AA2B BC CD CF\n", - "rho = 1.2;\n", - "f = 0.006;\n", - "Ha = 100;\n", - "Hf = 60;\n", - "He = 40;\n", - "K = [0.0, 0.0, 0.0, 0.0, 0.0]\n", - " #Calculations\n", - "for i in range(0,len(l)):\n", - " K[i] = f*l[i]/(3*d[i]**5);\n", - "\n", - "\n", - "K_ab = K[0]*K[1]/((K[0])**0.5+(K[1])**0.5)**2;\n", - "K_ac = K_ab + K[2];\n", - "Hc = (K_ac*Hf +K[4]*Ha/4)/(K_ac+K[4]/4);\n", - "Q = ((Ha - Hc)/K_ac)**0.5;\n", - "\n", - "def f(n):\n", - " z = He - Hc + (0.5*Q)**2 *(K[3]+(4000/n)**2);\n", - " return z\n", - "\n", - "n = fsolve(f,1);\n", - "\n", - "print \"total Volume flow rate (m3/s):\",round(Q, 4)\n", - "print \"Head at C (m) :\",round(Hc,2) \n", - "print \"Percentage valve opening (%) :\",round(n,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "total Volume flow rate (m3/s): 0.1016\n", - "Head at C (m) : 75.48\n", - "Percentage valve opening (%) : 38.58\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_15.ipynb b/Fluid_Mechanics/Chapter_15.ipynb deleted file mode 100755 index 95bd78ec..00000000 --- a/Fluid_Mechanics/Chapter_15.ipynb +++ /dev/null @@ -1,114 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4f421cc7413696fe7c281427d95aff4b53c3ab081abe9cd6d31d1e2df1133e5a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - " Chapter 15: Uniform Flows in Open Channels" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 15.1, Page 516" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "B =4;\n", - "D = 1.2;\n", - "C = 7.6;\n", - "n = 0.025;\n", - "s = 1/1800;\n", - "\n", - " #Calculations\n", - "W = B + 2*1.5*D;\n", - "A = D*(B+C)/2; # Area of parallelogram formed\n", - "P = B +2*1.2*(D**2+(1.5)**2)**0.5;\n", - "m =A/P;\n", - "i=s;\n", - "C = (23+0.00155/i+1/n)/(1+(23+0.00155/i)*n/(m)**0.5); # By Kutter formula\n", - "Q1 = C*A*(m*i)**0.5;\n", - "Q2 = A*(1/n)*m**(2/3)*(i)**0.5;\n", - "\n", - "print \"Q using Chezy formula with C determined from the Kutter formula (m^3/s) :\",round(Q1,2)\n", - "print \"Q using the Manning formula (m^3/s) :\",round(Q2,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Q using Chezy formula with C determined from the Kutter formula (m^3/s) : 5.65\n", - "Q using the Manning formula (m^3/s) : 5.69\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 15.2, Page 518" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables\n", - "Q = 0.5;\n", - "C = 80;\n", - "i = 1/2000;\n", - "\n", - " #Calculations\n", - "\n", - "# A = D**2+(3/4)*D**2 = (7/4)*D**2\n", - "D = ((4/7)*(Q/C)*(2/i)**0.5)**(2/5)\n", - "\n", - "#Result\n", - "print \"Optimum depth = Optimum Width (in metres):\",round(D,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Optimum depth = Optimum Width (in metres): 0.552\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_16.ipynb b/Fluid_Mechanics/Chapter_16.ipynb deleted file mode 100755 index 73f04778..00000000 --- a/Fluid_Mechanics/Chapter_16.ipynb +++ /dev/null @@ -1,144 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:130e6e124bfc557e016f12e2356b74f1d97ea210c47b1944be1ebda3297e63a8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 16: Non-Uniform Flow in Open Channels" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.2, Page 541" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "B = [1.4 ,0.9];\n", - "D = [0.6 ,0.32];\n", - "g = 9.81;\n", - "h = 0.03;\n", - "Z = 0.25; \n", - "\n", - " #Calculations\n", - "Q1 = B[1]*D[1]*(2*g*h/(1-(B[1]*D[1]/B[0]*D[0])**2))**0.5\n", - "E = D[0]-Z;\n", - "Q2 = 1.705*B[1]*E**1.5;\n", - "\n", - "print \"Volume flow rate (m3/s) :\",round(Q2,4) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Volume flow rate (m3/s) : 0.3177\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.3, Page 546" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "a =0.5;\n", - "b = 0.5;\n", - "Dn = 1.2;\n", - "s = 1/1000;\n", - "C = 55;\n", - "g = 9.81;\n", - "\n", - " #Calculations\n", - "c = (1+a)/b; \n", - "QbyB = Dn*C*(Dn*s)**0.5;\n", - "q = QbyB;\n", - "Dc = (q**2/g)**(1/3);\n", - "\n", - "header = \"Mean Depth(Dm) Numenator Denominator\\t L\"\n", - "unit = \" (m) \\t \\t \\t \\t(m)\"\n", - "\n", - "m=[]\n", - "Dm=[]\n", - "N=[]\n", - "D=[]\n", - "Lm=[]\n", - "total=0\n", - "for c in range(7): \n", - " m.append(2.4-0.15*c);\n", - " Dm.append((m[c]+m[c]-0.15)/2); \n", - " N.append(1 - (Dc/Dm[c])**3) ; # Numerator\n", - " D.append(1 - (Dn/Dm[c])**3); # Denominator\n", - " Lm.append(150*(N[c]/D[c]));\n", - " total = total +Lm[c];\n", - "\n", - "print header\n", - "print unit\n", - "for c in range(7):\n", - " mm=str(Dm[c])+'\\t '+str(round(N[c],4))+' '+str(round(D[c],4))+' \\t'+str(round(Lm[c],2))\n", - " print mm\n", - " \n", - "print \"\\ndistance upstream covered (approx in m):\",round(total)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean Depth(Dm) Numenator Denominator\t L\n", - " (m) \t \t \t \t(m)\n", - "2.325\t 0.9576 0.8625 \t166.54\n", - "2.175\t 0.9482 0.8321 \t170.94\n", - "2.025\t 0.9358 0.7919 \t177.26\n", - "1.875\t 0.9192 0.7379 \t186.86\n", - "1.725\t 0.8962 0.6634 \t202.65\n", - "1.575\t 0.8636 0.5577 \t232.27\n", - "1.425\t 0.8159 0.4028 \t303.8\n", - "\n", - "distance upstream covered (approx in m): 1440.0\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_17.ipynb b/Fluid_Mechanics/Chapter_17.ipynb deleted file mode 100755 index 2791e2c2..00000000 --- a/Fluid_Mechanics/Chapter_17.ipynb +++ /dev/null @@ -1,274 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c21785277c0a99c3eb4c310a9e20c477f6ab2a0a22da1b2d3844df1699a78d21" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 17: Compressible Flow in Pipes" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.1, Page 566" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import solve,symbols\n", - "\n", - " #Initializing the variables\n", - "g = 9.81;\n", - "rho = 1000;\n", - "rhoHg = 13.6*rho;\n", - "d1 = 0.075;\n", - "d2 = 0.025;\n", - "Pi = 0.250;\n", - "Pt = 0.150;\n", - "P_Hg = 0.760;\n", - "rho1 = 1.6;\n", - "gma = 1.4;\n", - "\n", - " #Calculations\n", - "P1 = (Pi+P_Hg)*rhoHg*g;\n", - "P2 = (Pt+P_Hg)*rhoHg*g;\n", - "rho2 = rho1*(P2/P1)**(1/gma);\n", - "V0=symbols('V0')\n", - "V1=symbols('V1')\n", - "Velo = solve([d2**2*V1*rho2-d1**2*V0*rho1,0.5*(V1**2 - V0**2)*((gma-1)/gma)*(rho2*rho1/(rho2*P1-rho1*P2))-1],[V0,V1])\n", - "s=(Velo[1])[0]\n", - "Flow = math.pi*d1**2/4*s;\n", - "\n", - "print \"Volume of flow (m3/s):\",round(Flow,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Volume of flow (m3/s): 0.06\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.2, Page 571" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Ma = 4;\n", - "gma = 1.4;\n", - "At = 500; # in mm\n", - "\n", - " #Calculations\n", - "N = 1 + (gma-1)*Ma**2/2;\n", - "D = (gma+1)/2 ;\n", - "#ratio of A/At ==R\n", - "R = round( (N/D)**((gma+1)/(2*(gma-1)))/Ma,2);\n", - "A=At*R\n", - "print \"Area of test section (mm^2):\",A" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Area of test section (mm^2): 5360.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.3, Page 575" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Ma1 = 2;\n", - "gma = 1.4;\n", - "T1 = 15+273; # In kelvin\n", - "P1 = 105; \n", - "\n", - " #Calculations\n", - "Ma2 = (((gma-1)*Ma1**2 +2)/(2*gma*Ma1**2-gma+1))**0.5;\n", - "P2 = P1*(1+gma*Ma1**2)/(1+gma*Ma2**2);\n", - "T2 = T1*(1 +(gma-1)/2*Ma1**2)/(1 +(gma-1)/2*Ma2**2);\n", - "\n", - "\n", - "print \"Mach No downstream shock wave :\",round(Ma2,3)\n", - "print \"Pressure (bar) of downstream shock wave :\",round(P2)\n", - "print \"Temperature (Degree C) of downstream shock wave :\",T2 - 273" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mach No downstream shock wave : 0.577\n", - "Pressure (bar) of downstream shock wave : 473.0\n", - "Temperature (Degree C) of downstream shock wave : 213.0\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.4, Page 581" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "gma = 1.4;\n", - "f = 0.00375;\n", - "d = 0.05;\n", - "\n", - " #Calculations\n", - "m = d/4;\n", - "def x(Ma):\n", - " A =(1 -Ma**2 )/(gma*Ma**2);\n", - " B = (gma+1)*Ma**2/(2+(gma-1)*Ma**2); \n", - " y = m/f*(A+ (gma+1)*math.log(B)/(2*gma));\n", - " return y\n", - "\n", - "X1 = x(0.2); # At entrance Ma = 0.2;\n", - "X06_X1 =x(0.6); # Section(b) Ma = 0.6;\n", - "\n", - "X06 = X1-X06_X1;\n", - "\n", - "print \"The Distance X1 at which the Mach number is unity (m) :\",round(X1,2)\n", - "print \"Distance from the entrance (m) :\",round(X06,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Distance X1 at which the Mach number is unity (m) : 48.44\n", - "Distance from the entrance (m) : 46.81\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.5, Page 585" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - " #Initializing the variables\n", - "gma = 1.4;\n", - "Q = 28/60; # m3/s\n", - "d = 0.1;\n", - "p1 = 200*10**3;\n", - "f = 0.004;\n", - "x_x1 = 60;\n", - "R = 287;\n", - "T = 15+273;\n", - "\n", - " #Calculations\n", - "A = math.pi*d**2/4;\n", - "m = d/4;\n", - "v1 = Q/A;\n", - "pa = p1*(1-f*(x_x1)*v1**2/(m*R*T))**0.5;\n", - "\n", - "def g(p):\n", - " A = (v1*p1)**2/(R*T)\n", - " B = f*A*x_x1/(2*m);\n", - " y = (p**2 - p1**2)/2 -A*math.log(p/p1) +B;\n", - " return y\n", - " \n", - "pb=fsolve(g,pa) # Guessing solution around pa\n", - "pb=pb[0]\n", - "print \"Pressure at the outlet, neglecting velocity changes (kN/m2) :\",round(pa/1000,1)\n", - "print \"Pressure at the outlet, allowing for velocity changes (kN/m2) :\",round(pb/1000,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure at the outlet, neglecting velocity changes (kN/m2) : 153.6\n", - "Pressure at the outlet, allowing for velocity changes (kN/m2) : 150.4\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_2.ipynb b/Fluid_Mechanics/Chapter_2.ipynb deleted file mode 100755 index 835909e1..00000000 --- a/Fluid_Mechanics/Chapter_2.ipynb +++ /dev/null @@ -1,493 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56204579c9dff23fd133fce17f3b8e6b8ac01dae9f7f133693b953a21d5ed34c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2: Pressure and Head" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, Page 30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables\n", - "z1 = 0; #Taking Ground as reference\n", - "z2 = -30 #Depth\n", - "rho = 1025 #Density\n", - "g = 9.81 #Acceleration due to gravity\n", - "\n", - " #Calculation\n", - "pressureIncrease = -rho*g*(z2-z1);\n", - "\n", - "print \"Increase in Pressure (KN/m2):\",round(pressureIncrease/1000,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Increase in Pressure (KN/m2): 301.7\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2, Page 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables\n", - "p1 = 22.4*10**3 #Initial Pressure\n", - "z1 = 11000 #Initial Height\n", - "z2 = 15000 #final Height\n", - "g = 9.81 #Acceleration due to gravity\n", - "R = 287; #Gas Constant\n", - "T = 273-56.6 #Temperature \n", - "\n", - " #Calculations\n", - "p2 = p1*math.exp(-g*(z2-z1)/(R*T));\n", - "rho2=p2/(R*T);\n", - " \n", - "print \"Final Pressure (kN/m2):\",round(p2/1000,2)\n", - "print \"Final Density (kg/m3):\",round(rho2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final Pressure (kN/m2): 11.91\n", - "Final Density (kg/m3): 0.192\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3, Page 37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "p1 = 101*10**3 #Initial Pressure\n", - "z1 = 0 #Initial Height\n", - "z2 = 1200 #Final Height\n", - "T1 = 15+273 #Initial Temperature\n", - "g = 9.81 #Acceleration due to gravity\n", - "gamma = 1.4 #Heat capacity ratio\n", - "R = 287 #Gas Constant\n", - "\n", - " #Calculations\n", - "p2 = p1*(1-g*(z2-z1)*(gamma-1)/(gamma*R*T1))**(gamma/(gamma-1));\n", - "dT_dZ = -(g/R)*((gamma-1)/gamma);\n", - "T2 = T1 + dT_dZ*(z2-z1);\n", - "rho2 = p2/(R*T2);\n", - "\n", - "print \"Final Pressure (kN/m2) :\",round(p2/1000,2)\n", - "print \"Temprature (in degree celcius):\",round(T2-273,1)\n", - "print \"Density (kg/m^3) :\",round(rho2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final Pressure (kN/m2) : 87.33\n", - "Temprature (in degree celcius): 3.3\n", - "Density (kg/m^3) : 1.101\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4, Page 39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables\n", - "p1 = 101*10**3 #Initial Pressure\n", - "z1 = 0 #Initial Height\n", - "z2 = 7000 #Final Height\n", - "T1 = 15+273 #Initial Temperature\n", - "g = 9.81 #Acceleration due to gravity\n", - "R = 287 #Gas Constant\n", - "dT = 6.5/1000 #Rate of Variation of Temperature\n", - "\n", - " #Calculations\n", - "p2 = p1*(1-dT*(z2-z1)/T1)**(g/(R*dT));\n", - "T2 = T1 - dT*(z2-z1);\n", - "rho2 = p2/(R*T2);\n", - "\n", - "\n", - "print \"Final Pressure (kN/m^2) :\",round(p2/1000,2)\n", - "print \"Final Density (kg/m^3 ):\",round(rho2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final Pressure (kN/m^2) : 40.89\n", - "Final Density (kg/m^3 ): 0.588\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5, Page 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "p = 350*10**3; #Gauge Pressure\n", - "pAtm = 101.3*10**3; #Atmospheric Pressure \n", - "rhoW = 1000; #Density of Water\n", - "sigma = 13.6; #Relative Density of Mercury\n", - "g = 9.81 #Acceleration due to gravity\n", - "\n", - " #Calculations\n", - "def Head(rho):\n", - " head = p/(rho*g);\n", - " return head\n", - "rhoM = sigma*rhoW;\n", - "pAbs = p + pAtm;\n", - "\n", - "print \"\\nPart(a)- Equivalent head of water (m) :\",round(Head(rhoW),2)\n", - "print \"\\nPart(b)- Equivalent head of water (m) :\",round(Head(rhoM),2)\n", - "print \"\\nAbsolute pressure (kN/m^2) :\",pAbs/1000" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Part(a)- Equivalent head of water (m) : 35.68\n", - "\n", - "Part(b)- Equivalent head of water (m) : 2.62\n", - "\n", - "Absolute pressure (kN/m^2) : 451.3\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6, Page 45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " \n", - "\n", - " #Initializing the variables\n", - "rho = 10**3; #Density of water\n", - "h = 2; #Height\n", - "g = 9.81; #Acceleration due to gravity\n", - "\n", - " #Calculations\n", - "p=rho*h*g; \n", - "\n", - "print \"Gauge pressure (k/m2) :\",p/1000" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Gauge pressure (k/m2) : 19.62\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7, Page 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables\n", - "rho = 0.8*10**3; #Density of fluid\n", - "rhoM = 13.6*10**3; #Density of manometer liquid\n", - "g = 9.81 #Acceleration due to gravity\n", - "\n", - " #Calculations\n", - "def fluidPressure(h1,h2):\n", - " P = rhoM*g*h2-rho*g*h1;\n", - " return P\n", - "\n", - "p1=fluidPressure(0.5,0.9)/1000\n", - "p2=fluidPressure(0.1,-0.2)/1000\n", - "\n", - "print \"!-----Part (a)-----! \\nGauge pressure (kN/m2) :\",round(p1,2)\n", - "print \"\\n!-----Part (b)-----! \\nGauge pressure (kN/m2) :\",round(p2,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "!-----Part (a)-----! \n", - "Gauge pressure (kN/m2) : 116.15\n", - "\n", - "!-----Part (b)-----! \n", - "Gauge pressure (kN/m2) : -27.47\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8, Page 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables\n", - "rho = 10**3; #Density of fluid\n", - "rhoM = 13.6*10**3; #Density of manometer liquid\n", - "g = 9.81; #Acceleration due to gravity\n", - "H = 0.3; # Differnce in height = b-a as in text\n", - "h = 0.7;\n", - "\n", - " #Calculations\n", - "result = rho*g*H + h*g*(rhoM-rho);\n", - "\n", - "print \"Pressure difference (kN/m^2):\", round(result/1000,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure difference (kN/m^2): 89.467\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9, Page 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables\n", - "rho = 10**3; #Density of fluid\n", - "rhoM = 0.8*10**3; #Density of manometer liquid\n", - "g = 9.81; #Acceleration due to gravity\n", - "a = 0.25;\n", - "b = 0.15;\n", - "h = 0.3;\n", - " #Calculations\n", - "def PressureDiff(a,b,h,rho,rhoM):\n", - " P = rho*g*(b-a) + h*g*(rho-rhoM);\n", - " return P\n", - "print \"The presure difference,if the top of the manometer is filled with\"\n", - "print \"(a) air :\",PressureDiff(a,b,h,rho,0)/1000, \" N/m^2\"\n", - "print \"(b) oil of relative density 0.8. :\",PressureDiff(a,b,h,rho,rhoM), \"N/m^2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The presure difference,if the top of the manometer is filled with\n", - "(a) air : 1.962 N/m^2\n", - "(b) oil of relative density 0.8. : -392.4 N/m^2\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.10, Page 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables\n", - "phi = 30; #30 degree\n", - "h = 1.2 ; # Height of tank\n", - "l = 2; # Length of tank\n", - "\n", - " #Calculations\n", - "def SurfaceAngle(a,phi):\n", - " g=9.81; # m/s**2 \n", - " Theta = math.atan(-a*math.cos(math.radians(phi))/(g+a*math.sin(math.radians(phi)))); \n", - " return Theta\n", - "\n", - " #case (a) a = 4\n", - "\n", - "print \"ThetaA (degree) :\",round(180 + 180/math.pi*SurfaceAngle(4,phi),2)\n", - "\n", - " #Case (b) a = - 4.5\n", - "tanThetaR = math.tan((SurfaceAngle(-4.5,phi)));\n", - "\n", - "print \"\\nThetaR (degree) :\",round(SurfaceAngle(-4.5,phi)*180/math.pi,2)\n", - "\n", - "Depth = h - l*tanThetaR/2;\n", - "print \"\\nMaximum Depth of tank (m) :\",round(Depth,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "ThetaA (degree) : 163.65\n", - "\n", - "ThetaR (degree) : 27.27\n", - "\n", - "Maximum Depth of tank (m) : 0.6845\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_20.ipynb b/Fluid_Mechanics/Chapter_20.ipynb deleted file mode 100755 index f24f7af6..00000000 --- a/Fluid_Mechanics/Chapter_20.ipynb +++ /dev/null @@ -1,115 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:042171008edad2dcea90c81036564026ff0ecc789ee16d3a2ccb0122fde141e9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 20: Pressure Transient Theory and Surge Control" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.3, Page 692" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "c = 1250;\n", - "Dt = 0.02;\n", - "Dv = 0.5;\n", - "rho = 1000;\n", - "v =0.5;\n", - "\n", - " #Calculations\n", - "cDt = c*Dt;\n", - "Dp = rho*c*Dv;\n", - "DOv_DOt = Dv/Dt;\n", - "vDOv_DOt = v*Dv/cDt;\n", - "DOp_DOt = Dp/Dt;\n", - "vDOp_DOx = v*Dp/cDt;\n", - "Error = [vDOv_DOt*100/DOv_DOt ,vDOp_DOx*100/DOp_DOt];\n", - "print \"The percentage errors are :\",Error,\"\\nThese are very small hence can be neglected\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The percentage errors are : [0.04, 0.04] \n", - "These are very small hence can be neglected\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 20.5, Page 705" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "f = 0;\n", - "Atunnel = 1.227;\n", - "Ashaft = 12.57;\n", - "Q =2;\n", - "L = 200;\n", - "g = 9.81; \n", - "\n", - " #Calculations\n", - "Zmax = (Q/Ashaft)*(Ashaft*L/(Atunnel*g))**0.5;\n", - "T = 2*math.pi*(Ashaft*L/(Atunnel*g))**0.5;\n", - "\n", - "print \"Peak water level (m) :\",round(Zmax,3)\n", - "print \"Mass Oscillation Period (s) :\",round(T,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak water level (m) : 2.299\n", - "Mass Oscillation Period (s) : 90.8\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_22.ipynb b/Fluid_Mechanics/Chapter_22.ipynb deleted file mode 100755 index 2c113fed..00000000 --- a/Fluid_Mechanics/Chapter_22.ipynb +++ /dev/null @@ -1,191 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:783af12fd7d104e85c7e13e105c7550ca4a0a63a41968e5a9b0312d6fedb23a2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 22: Theory of Rotodynamic Machine" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 22.1, Page 779" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables\n", - "Q = 5;\n", - "R1 = 1.5/2;\n", - "R2 = 2/2; \n", - "w = 18;\n", - "rho = 1000;\n", - "rhoA = 1.2;\n", - "Hth = 0.017;\n", - "g=9.81;\n", - "\n", - " #Calculations\n", - "A = math.pi*(R2**2-R1**2);\n", - "Vf = Q/A;\n", - "Ut = w*R2;\n", - "Uh = w*R1;\n", - "B1t = math.atan(Vf/Ut);\n", - "B1h = math.atan(Vf/Uh);\n", - "E = Hth*rho/rhoA;\n", - "def Beta(u):\n", - " y = math.atan(Vf/(u-E*g/u));\n", - " return y\n", - "B2t = Beta(Ut);\n", - "B2h = Beta(Uh);\n", - "\n", - "print \"!----Blade Inlet Angles----!\"\n", - "print \"At tip (in degrees) :\",round(B1t*180/math.pi,1),\"\\nAt Hub (in degrees) :\",round(B1h*180/math.pi,1)\n", - "print \"\\n!----Blade Outlet Angles (Degrees)----!\"\n", - "print \"At tip (in degrees):\",round(B2t*180/math.pi,1),\"\\nAt Hub(in degrees) :\",round(B2h*180/math.pi,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "!----Blade Inlet Angles----!\n", - "At tip (in degrees) : 11.4 \n", - "At Hub (in degrees) : 15.1\n", - "\n", - "!----Blade Outlet Angles (Degrees)----!\n", - "At tip (in degrees): 19.5 \n", - "At Hub(in degrees) : 48.6\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 22.2, Page 793" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "D = 0.1;\n", - "t = 15*10**-3;\n", - "Q = 8.5/3600;\n", - "N = 750/60;\n", - "B2 = 25*math.pi/180; # Beta 2 ind degrees\n", - "g = 9.81;\n", - "z = 16;\n", - "\n", - " #Calculations\n", - "A = round(math.pi*D*t,5);\n", - "V_f2 = round(Q/A,3);\n", - "U2 = round(math.pi*N*D,3);\n", - "V_w2 = round(U2 - V_f2/math.tan(B2),1);\n", - "Hth = round(U2*V_w2/g,2);\n", - "Sf = round(1 - math.pi*math.sin(B2)/(z*(1-(V_f2/U2)/math.tan(B2))),3);\n", - "H = round(Sf*Hth,2);\n", - "\n", - "print \"Part (a) - Head developed (m): \",Hth\n", - "print \"Part (b) - Head developed (m): \",H" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part (a) - Head developed (m): 1.16\n", - "Part (b) - Head developed (m): 1.03\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 22.3, Page 797" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Ma = 0.6;\n", - "Cl = 0.6;\n", - "tByC = 0.035; # Thickness to chord ratio\n", - "cByC = 0.015; # Camber to chord ratio\n", - "x = 3; # Angle of incidence\n", - "\n", - " #Calculations\n", - "lamda = 1/(1-Ma**2)**0.5;\n", - "Cl# = lamda*Cl;\n", - "tByC1 = tByC*lamda;\n", - "cByC1 = cByC*lamda;\n", - "Cl1 = Cl*lamda**2;\n", - "Ae = x*lamda;\n", - "print \"____Geometric Characterstics____\\n\"\n", - "print \"Thickness to chord ratio :\",tByC1\n", - "print \"Camber to chord ratio :\",cByC1\n", - "print \"Lift Coefficient :\",Cl1\n", - "print \"angle of incidence (Degrees) :\",Ae" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "____Geometric Characterstics____\n", - "\n", - "Thickness to chord ratio : 0.04375\n", - "Camber to chord ratio : 0.01875\n", - "Lift Coefficient : 0.9375\n", - "angle of incidence (Degrees) : 3.75\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_23.ipynb b/Fluid_Mechanics/Chapter_23.ipynb deleted file mode 100755 index 8cb510fa..00000000 --- a/Fluid_Mechanics/Chapter_23.ipynb +++ /dev/null @@ -1,302 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ef9e21b794b8d045cd677d625f05028772e4370ff57190a11a0021b5fe3769e2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 23: Performance of Rotodynamic Machines" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.1, Page 814" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from pylab import *\n", - "%matplotlib inline\n", - "\n", - " #Initializing the variables\n", - "Q = []\n", - "for c in range(9):\n", - " Q.append(7*c)\n", - "H = [40, 40.6, 40.4, 39.3, 38, 33.6, 25.6, 14.5, 0];\n", - "n = [0, 41, 60, 74, 83, 83, 74, 51, 0];\n", - "N1 = 750;\n", - "N2 = 1450;\n", - "D1 = 0.5;\n", - "D2 = 0.35;\n", - "\n", - " #Calculations\n", - "Q2=[]\n", - "H2=[]\n", - "for c in range(9):\n", - " Q2.append(Q[c]*(N2/N1)*(D2/D1)**3);\n", - " H2.append(H[c]*(N2/N1)**2*(D2/D1)**2);\n", - " \n", - "plot(Q,H,label='H1')\n", - "plot(Q,n,label='n1')\n", - "plot(Q2,H2,'--',label='H2')\n", - "plot(Q2,n,'--',label='n2')\n", - "legend( loc='upper right', numpoints = 1 )\n", - "xlabel(\"Q (m3/s)\");\n", - "ylabel(\"H (m of water) and n(percent)\")\n", - "grid(True)\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEMCAYAAAAidwoiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYFFcXxt+lCChdYUFFV5EmIsWCXRRBjRGwBEsUbNHk\nM7HFlqqJScSuUdMUBWuCEpUYjVhYxYIiIqAIKFJUYEF6Z9m93x8bDCqwhZ2d3WV+zzNPMrN37rxn\nB+fs3HPvOSxCCBgYGBgY2iYadAtgYGBgYKAPxgkwMDAwtGEYJ8DAwMDQhmGcAAMDA0MbhnECDAwM\nDG0YxgkwMDAwtGEodQK7du1a6uTklNSnT58Hu3btWgoARUVFpl5eXhdtbW3TvL29I0tKSoyp1MDA\nwMDA0DyUOYEHDx702b9//4LY2NgBCQkJzmfPnn03PT3dOigoaK2Xl9fFtLQ0W09Pz8tBQUFrqdLA\nwMDAwNAylDmBlJQUe3d399u6uro1mpqagpEjR14NDw+fEhER4RMYGBgKAIGBgaGnT5/2o0oDAwMD\nA0PLaFHVcZ8+fR588cUX3xcVFZnq6urWnDt37p3+/fvf5fF4bDabzQMANpvN4/F47DfPZbFYzDJm\nBgYGBhkghLCkaU/Zm4C9vX3KmjVrNnl7e0eOHz/+vIuLy31NTU1B4zYsFos098AnhKjttm7dOto1\nMLYx9jH2qd8mC5QGhufNm3fg7t27/a9evTrSxMSk2NbWNo3NZvPy8vIsACA3N9fS3Nw8n0oNykhm\nZibdEihDnW0DGPtUHXW3TxYodQL5+fnmAJCdnd3tzz//nDxz5sxjPj4+EaGhoYEAEBoaGujn53ea\nSg0MDAwMDM1DWUwAAKZOnXqysLCwo7a2Nv+nn376n5GRUenatWuD/P39w4KDg+dzOJzMsLAwfyo1\nKCNz5syhWwJlqLNtAGO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fPvyTjY1Npb6+\nfqe+vn5ndna215IlS06fP38+YMGCBSnK99TFbJYE3YcEAQIr8fPz+6WlpWWEYtVNV1eX3scff7xn\n5cqV3/N4PHlv15mbm9c2NzeP7O/97t+/P1nx+sKFCwvd3NzyAXooyN/fPxmgk5jJZDIzf3//5L17\n936kvIKourra0tbWtry/9yUQBgsJAgTWcubMmUWnT59e4uDgUGJubl7b2Nho8sUXX/z3667R09Pr\nEgqFBffu3XMEXp+TXfm9r7/+eoNQKCxwd3fPO3jw4Afx8fERAJCamjpf8Yu/qanJODAw8GeRSHTb\n29v7mmIuAQCys7O9vL29r6lKO4HQZ7S9PIkYMU1YVlbWdIFAUNCXmtXx8fGrY2Jitg32nm1tbUZ9\nWfrZ0NBg4uHhcVPbfyNiQ9NIFlEC4RXa29sN586dm3716lUfTYzTHzhwYNPo0aPrQkNDj6n7XgTC\nq5AgQCAQCEMYMidAIBAIQxgSBAgEAmEIQ4IAgUAgDGFIECAQCIQhDAkCBAKBMIQhQYBAIBCGMP8P\nIK1PDnOiPzgAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.2, Page 831" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "n = 0.9;\n", - "g = 9.81;\n", - "D = 1.45;\n", - "N = 375/60;\n", - "H = 200; # Real height\n", - "x = 165; # Theta\n", - "P = 3750*10**3;\n", - "rho = 1000;\n", - "\n", - " #Calculations\n", - "h = n*H; #Effective Head\n", - "v1 = (2*g*h)**0.5;\n", - "u = math.pi*D*N;\n", - "\n", - "n_a = (2*u/v1**2)*(v1-u)*(1-n*math.cos(math.radians(x)));\n", - "\n", - "P_b = P/n_a;\n", - "ppj = P_b/2; # Power per jet\n", - "d = (8*ppj/(rho*math.pi*v1**3))**0.5 ;\n", - "print \"the efficiency of runner :\",round(n_a,3)\n", - "print \"Diameter of Jet (m) :\",round(d,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the efficiency of runner : 0.933\n", - "Diameter of Jet (m) : 0.156\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.3, Page 834" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " #Example 23.3 \n", - "\n", - " #Initializing the variables\n", - "g = 9.81;\n", - "H = 12;\n", - "n = 0.8;\n", - "w = 300*2*math.pi/60;\n", - "Q = 0.28;\n", - "\n", - " #Calculations\n", - "V_f1 = 0.15*(2*g*H)**0.5;\n", - "V_f2 =V_f1;\n", - "V_w1 = (n*g*H)**0.5;\n", - "u1 = V_w1;\n", - "theta = math.atan(V_f1/u1);\n", - "u2 =0.5*u1;\n", - "B2 = math.atan(V_f2/u2);\n", - "r1 = u1/w;\n", - "b1 = Q/(V_f2*0.9*2*math.pi*r1); # vanes occupy 10 per cent of the circumference hence 0.9\n", - "b2 = 2*b1;\n", - "\n", - "print \"Guide vane angle (degree) :\",round(theta*180/math.pi,2)\n", - "print \"Vane angle at exit (degree) :\",round(B2*180/math.pi,2)\n", - "print \"Width of runner at inlet (mm) :\",round(b1*1000,1) \n", - "print \"Width of runner at exit (mm) :\",round(b2*1000,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Guide vane angle (degree) : 13.34\n", - "Vane angle at exit (degree) : 25.38\n", - "Width of runner at inlet (mm) : 69.6\n", - "Width of runner at exit (mm) : 139.3\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.4, Page 838" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import solve,symbols\n", - "\n", - " #Initializing the variables\n", - "H = 35;\n", - "g = 9.81;\n", - "D = 2;\n", - "N = 145/60;\n", - "z = 30*math.pi/180; # angle between vanes and direction of runner rotation\n", - "y = 28*math.pi/180; # angle between runner blades at the outlet.\n", - "\n", - " #Calculations\n", - "H_net = 0.93*H ; # since 7% head is lost\n", - "v1 = (2*g*H_net)**0.5;\n", - "u = math.pi*N*D;\n", - "\n", - " # from inlet velocity triangle\n", - "V_r1=14.3\n", - "## ash = cos(beta1+z)\n", - "ash = (V_r1**2+v1**2-u**2)/(2*V_r1*v1)\n", - "beta1=(z+math.acos(ash))*180/math.pi # in degrees\n", - "\n", - "V_r2=(1-8/100)*V_r1 #8 % loss due to friction\n", - "V_w1= u + V_r1*math.cos(math.radians(beta1))\n", - "V_w2= u - V_r2*math.cos(y)\n", - "\n", - "E = (u/g)*(V_w1 - V_w2);\n", - "n = E/H;\n", - "print \"Blade angle at inlet :\",round(beta1,1)\n", - "print \"Efficiency (%) :\",round(n*100)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Blade angle at inlet : 62.1\n", - "Efficiency (%) : 81.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 23.5, Page 844" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "s = 0.03;\n", - "P = 185*10**3;\n", - "rho = 0.86*10**3;\n", - "A = 2.8*10**-2;\n", - "N = 2250/60;\n", - "D = 0.46;\n", - "\n", - " #Calculations\n", - "R0 = 0.46/2;\n", - "Ws_Wp = 1-s;\n", - "n = Ws_Wp;\n", - "Pf = s*P;\n", - "Q = (2*Pf*A**2/(3.5*rho))**(1/3);\n", - "Wp = 2*math.pi*N; \n", - "Ri = ((1/Ws_Wp)*(R0**2 -P/(rho*Q*Wp**2)))**0.5;# Modified equation for power transmission.\n", - "Di = 2*Ri;\n", - "T = P/(rho*Wp**3 *D**5);\n", - " \n", - "print \"Mean diameter (mm) :\",round(Di*1000)\n", - "print \"Torque Coefficient :\",round(T,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean diameter (mm) : 326.0\n", - "Torque Coefficient : 0.0008\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_24.ipynb b/Fluid_Mechanics/Chapter_24.ipynb deleted file mode 100755 index ef4fb925..00000000 --- a/Fluid_Mechanics/Chapter_24.ipynb +++ /dev/null @@ -1,183 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0997b77d100b3345365d77881e9dcf23833d271e3f7741c8fb4ad6c260c5ffc6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 24: Positive Displacement Machines" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 24.1, Page 860" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables\n", - "H_at = 10.3;\n", - "Hs = 1.5;\n", - "Hd = 4.5;\n", - "Ls = 2;\n", - "Ld = 15;\n", - "g = 9.81;\n", - "Ds = 0.4; # Diameter of stroke\n", - "Db = 0.15; # Diameter of bore\n", - "Dd = 0.05; # Diameter of discharge and suction pipe\n", - "nu = 0.2;\n", - "f = 0.01;\n", - "abs_pump_pressure = 2.4;\n", - "\n", - " #Calculations\n", - "A = math.pi*(Db)**2/4;\n", - "a = math.pi*(Dd)**2/4;\n", - "r = Ds/2;\n", - "W = 2*math.pi*nu;\n", - "Hsf = 0; \n", - "def H_suck(n):\n", - " y = H_at - Hs +(-1)**n*(L/g)*(A/a)*W**2*r; \n", - " return y\n", - "\n", - "def H(n,DischargeOrSuction):\n", - " if(DischargeOrSuction == 1):\n", - " y = H_at - Hs +(-1)**n*(Ls/g)*(A/a)*W**2*r;\n", - " elif(DischargeOrSuction == 2):\n", - " y = H_at + Hd +(-1)**n*(Ld/g)*(A/a)*W**2*r;\n", - " else:\n", - " print \"There is something wrong :\"\n", - " return y\n", - "\n", - "def H_mid(DischargeOrSuction,uA):\n", - " if(DischargeOrSuction == 1):\n", - " Hsf = 4*f*Ls/(2*Dd*g)*(uA/a)**2;\n", - " y = H_at - Hs - Hsf;\n", - " elif(DischargeOrSuction == 2):\n", - " Hsf = 4*f*Ld/(2*Dd*g)*(uA/a)**2;\n", - " y = H_at + Hd + Hsf;\n", - " else:\n", - " print \"There is something wrong :\"\n", - " return y\n", - "\n", - "Hs_start = H(1,1); # Inertia head negative hence n = 1\n", - "Hs_end = H(2,1); # Inertia head positive hence n = 2\n", - "Hd_start = H(1,2);\n", - "Hd_end = H(2,2);\n", - "u = W*r;\n", - "Hs_mid = H_mid(1,u*A);\n", - "slip = 0.04;\n", - "Hd_mid = H_mid(2,u*A);\n", - "suction = [Hs_start, Hs_end, Hs_mid];\n", - "discharge = [Hd_start, Hd_end, Hd_mid];\n", - "suction1=[0,0,0]\n", - "discharge1=[0,0,0]\n", - "for c in range(3):\n", - " suction1[c] =round(suction[c],2)\n", - " discharge1[c] =round(discharge[c],2)\n", - "W_max = (abs((abs_pump_pressure - H_at + Hs)*(g/Ls)*(a/A)*(1/r)))**0.5;\n", - "W_max_rev = W_max/(2*math.pi)*60; # maximum rotation speed in rev/min\n", - "\n", - "header = \"Start End Mid\";\n", - "\n", - "print \"\\n!----Part(a)----! Head at \\n\",header\n", - "print suction1\n", - "print \"\\n!----Part(b)----! Head at \\n\",header\n", - "print discharge1\n", - "print \"\\n!----Part(c)----1 \\nDrive speed for s eperation (rev/min) :\",round(W_max_rev)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "!----Part(a)----! Head at \n", - "Start End Mid\n", - "[8.22, 9.38, 8.38]\n", - "\n", - "!----Part(b)----! Head at \n", - "Start End Mid\n", - "[10.45, 19.15, 17.93]\n", - "\n", - "!----Part(c)----1 \n", - "Drive speed for s eperation (rev/min) : 40.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 24.2, Page 863" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Example 24.2 \n", - "\n", - " #Initializing the variables\n", - "H_friction = 2.4;\n", - "H_at = 10.3;\n", - "Hs = 1.5;\n", - "L =2;\n", - "f = 0.01;\n", - "d = 0.05;\n", - "g = 9.81; # Diameter of stroke\n", - "Db = 0.15; # Diameter of bore\n", - "r = 0.2;\n", - "\n", - " #Calculations\n", - "A = math.pi*(Db)**2/4;\n", - "a = math.pi*(d)**2/4;\n", - "W= (((H_at - Hs - H_friction )*(2*d*g/(4*f*L)))**0.5)*(a/A)*(math.pi/r); # in rad/s\n", - "W_rev = W/(2*math.pi)*60; # maximum rotation speed in rev/min\n", - "# IMPORTANT : In book conversion from rad/s to rev/min is wrong, so answer will be diffrent from book\n", - " \n", - "print \"speed in (rad/s) :\",round(W,2)\n", - "print \"Increase in speed (rev/min):\",round(W_rev-40,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "speed in (rad/s) : 15.46\n", - "Increase in speed (rev/min): 107.65\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_25.ipynb b/Fluid_Mechanics/Chapter_25.ipynb deleted file mode 100755 index 9b08e6f3..00000000 --- a/Fluid_Mechanics/Chapter_25.ipynb +++ /dev/null @@ -1,328 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2bebadfad4a18ede042a136ada8984e181f57290a23ad4ed8003a1f83445a447" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 25: Machine\u2013Network Interactions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.4, Page 893" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables\n", - "Pa_P1 = -200; # From previous Question\n", - "Q = 1.4311 ; # From previous questions.\n", - "\n", - " #Calculations\n", - "DpSys = Pa_P1 + 98.9*Q**2;\n", - "print \"System Operating point (m^3/s):\",round(DpSys,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "System Operating point (m^3/s): 2.55\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.7, Page 906" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import solve,symbols\n", - " \n", - "\n", - " #Initializing the variables\n", - "Vo = 25.3; #Outlet velocity\n", - "D = 10 ; # Mean hydraulic diameter\n", - "f = 0.008; # friction factor\n", - "X = 1000; # Length of road\n", - "P = 12600; # Absorbing power\n", - "Va = 300; # Tunnel air flow\n", - "K1 = 0.96;\n", - "K2 = 0.9;\n", - "T = 590; #Thrust\n", - "rho = 1.2; # Air density \n", - "\n", - " #Calculations\n", - "alpha = (1/D)**2;\n", - "A = math.pi*D**2/4; # Area of tunnel\n", - "Vt = Va/A;\n", - "W = Vo/Vt; #Omega\n", - "E = (1-alpha*W);\n", - "C = (1-alpha*W)*(1-E)**2 + E**2 - 1;\n", - " # Manipulating equation 25.20;\n", - "LHS = f*X*(E+1)**2/D + C + 1 ;\n", - "\n", - "n1 = symbols('n1')\n", - "result=solve(K1*(2*((alpha*W**2 + (1-alpha)*E**2-1)+(n1-1)*(alpha*W*(W-1)-C/2)))-LHS)\n", - "\n", - "n=result[0]\n", - "\n", - "\n", - " # Alternative approach using equation 25.22\n", - "n2 = (rho*((4*f*X*Vt**2)/(2*D) + 1.5*Vt**2/2))*A/(K1*K2*T); \n", - "Pt = round(n2)*P;\n", - "\n", - "print \"Number of fans required :\",round(n2)\n", - "print \"Total power consumed (KW) :\",Pt/1000" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of fans required : 6.0\n", - "Total power consumed (KW) : 75.6\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.8, Page 907" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import solve,symbols\n", - " #Initializing the variables\n", - "f = 0.008;\n", - "T = 290;\n", - "L = 750;\n", - "Dt = 9; # Diameter Tunnel\n", - "Df = 0.63; # Diameter fan\n", - "K1 = 0.98;\n", - "K2 = 0.92;\n", - "Vo = 27.9;\n", - "n = 10;\n", - "A=math.pi*Dt**2/4\n", - "rho=1.2\n", - "X=750\n", - " #Calculations\n", - "alpha = (Df/Dt)**2;\n", - " # equation 25.20 becomes when E = 1 nad C = 0\n", - "W=symbols('W')\n", - "omega = solve(2*K1* (alpha*W**2 +(n-1)*alpha*W*(W-1)) - 4*f*L/Dt -1)\n", - " \n", - "\n", - "for i in range(1,len(omega)): # since omega is always positive and real\n", - " if omega[i]>0:\n", - " w = round(omega[i],1);\n", - "Vt = Vo/w;\n", - "\n", - "# by equation 25.22\n", - "VT=(n*(K1*K2*T)/(A*(rho*((4*f*X)/(2*Dt) + 1.5/2))))**0.5\n", - "print \"Tunnel Velocity (m/s) :\",round(VT,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Tunnel Velocity (m/s) : 4.05\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.9, Page 914" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Ws = 0.45;\n", - "Ks = 3.2;\n", - "H = 152;\n", - "h = 0;\n", - "Hatm = 10.3;\n", - "Pv = 350; #vapour pressure\n", - "g = 9.81;\n", - "rho = 1000;\n", - " \n", - " #Calculations\n", - "Ht1 = 152*(Ws/Ks)**(4/3); # the value of Ht1 is 11.12 and in book it is taken as 11.2 so there will be a difference in final answer\n", - "Hvap = round(Pv/(rho*g),3);\n", - "Z = Hatm -h -Hvap -Ht1;\n", - "print \"Elevation of pump (m):\",round(Z,3)\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elevation of pump (m): -0.851\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 25.11, Page 927" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import symbols,solve\n", - "import numpy as np\n", - " \n", - "\n", - " #Initializing the variables\n", - "Co = 0;\n", - "Qc = 0.0024;\n", - "V = 5400;\n", - "c = 10;\n", - " #Calculations\n", - "#####--------------------PART(A)-----------------#######\n", - "n1=symbols('n1')\n", - "def partA(n1):\n", - " Ci = 10;\n", - " # t = infinity so e^(-nt) = 0\n", - " Q=10000*Qc/(c-Co)\n", - " n1 = Q*3600/V; \n", - " return n1\n", - "ans=partA(n1)\n", - "\n", - "print \"Part(A) : number of air changes per hour if the garage is in continuous use and the maximum permissible concentration of carbon monoxide is 0.1 per cent. :\",ans,\"\\n\"\n", - "\n", - "#####--------------------PART(B)-----------------#######\n", - "n=symbols('n')\n", - "def partB(n):\n", - " Ci = 0; \n", - " n=[1.5,1.2,0.9,1.0] \n", - " t=1 # time in hours\n", - " error=[]\n", - " mini=100\n", - " ans=0\n", - " for i in range(4): \n", - " Q = V/3600; \n", - " A = 10000*Qc/Q; # as Co=0 \n", - " error.append(abs((A*(1-math.e**(-n[i]*t))/c)-n[i]));\n", - " if(error[i]" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean velocity (m/s): 23.36\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2, Page 106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from pylab import *\n", - "import numpy as np\n", - "\n", - " #Initializing the variables all unknowns are assigned 0\n", - "\n", - "d = [0.0, 0.05, 0.075, 0, 0.030];\n", - "Q = [0, 0, 0, 0, 0];\n", - "V = [0, 0, 2, 1.5, 0];\n", - "A = [0, 0, 0, 0, 0]\n", - " #Calculations\n", - "A2 = math.pi*d[2]**2/4;\n", - "Q[2] =A2*V[2];\n", - "Q = [0,Q[2], Q[2], Q[2]/1.5 , 0.5*Q[2]/1.5];\n", - "d[3] = (Q[3]*4/(V[3]*math.pi))**0.5;\n", - "for i in range(0,5):\n", - " A[i] = math.pi*d[i]**2/4;\n", - "V[1] = V[2]*(A[2]/A[1]);\n", - "V[4]=Q[4]/A[4];\n", - "\n", - "\n", - "header = \"Diameter(mm) Area(m2)\\t Flow Rate(m3/s) Velocity(m/s)\"\n", - "print header\n", - "for c in range(1,5):\n", - " mm=str(round(d[c]*1000,1))+'\\t '+str(round(A[c],6))+' \\t '+str(round(Q[c],6))+' \\t'+str(round(V[c],2))\n", - " print mm" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter(mm) Area(m2)\t Flow Rate(m3/s) Velocity(m/s)\n", - "50.0\t 0.001963 \t 0.008836 \t4.5\n", - "75.0\t 0.004418 \t 0.008836 \t2.0\n", - "70.7\t 0.003927 \t 0.00589 \t1.5\n", - "30.0\t 0.000707 \t 0.002945 \t4.17\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3, Page 108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "import sympy\n", - "from sympy import diff, Symbol\n", - "\n", - "\n", - "#Initializing the variables \n", - "'''\n", - "def df(x, h=0.1e-5):\n", - " return ( f(x+h/2) - f(x-h/2) )/h\n", - " return df\n", - "\n", - "print df(2*x,h)\n", - "'''\n", - "x = Symbol('x') \n", - "vx = 3-x\n", - "vy = 4+2*x\n", - "vz = 2-x \n", - "\n", - " #Calculations\n", - "delVx = vx.diff(x); \n", - "delVy = vx.diff(x);\n", - "delVz = vx.diff(x); \n", - "\n", - "result = delVx+delVy+delVz;#requirement of continuity equation (result = 0)\n", - "print \"Satisfy requirement of continuity \"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Satisfy requirement of continuity \n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_5.ipynb b/Fluid_Mechanics/Chapter_5.ipynb deleted file mode 100755 index b12249f7..00000000 --- a/Fluid_Mechanics/Chapter_5.ipynb +++ /dev/null @@ -1,517 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:04c1d9ce4358772aaf36727d98b4d1c000b18de791fe80fc4e6e1ac3cabc0050" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5: The Momentum Equation and its Applications" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1, Page 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables \n", - "\n", - "l = 60 ; #Length of pipeline\n", - "rho = 1000; # Density of liquid\n", - "a = 0.02; #Acceleration of fluid\n", - "\n", - " #Calculations\n", - "delP = rho*l*a; #Change in pressure\n", - "print \"Increase of pressure difference required (kN/m2):\",delP/1000" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Increase of pressure difference required (kN/m2): 1.2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2, Page 121" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables \n", - "v = 5; #Velocity of jet \n", - "rho = 1000; #density of water\n", - "d = 0.025; #Diameter of fixed nozzle\n", - "\n", - " #Calculations\n", - " #--Part(a) Variation of force exerted normal to the plate with plate angle--//\n", - "header = \"Theta\\t vcos(x)\\t pAv\\t Force\"\n", - "unit = \"deg\\t m/s\\t kg/s\\t N\"\n", - "\n", - "A = math.pi*d**2/4;\n", - "x = range(0,91,15);\n", - "for c in range(len(x)):\n", - " x[c]=1.0*x[c]\n", - "m = round(rho*A*v,2);\n", - "ma = [m,m,m,m,m,m,m];\n", - "vcomp=[]\n", - "force=[]\n", - "for c in x:\n", - " vcomp.append(round(v*math.cos(math.radians(c)),2))\n", - " force.append(round((rho*A*v**2)*math.cos(math.radians(c)),2))\n", - "\n", - "print header\n", - "print unit\n", - "for c in range(len(x)):\n", - " mm=str(x[c])+' \\t '+str(vcomp[c])+' \\t'+str(ma[c])+' \\t'+str(force[c])\n", - " print mm\n", - "##value = [x,vcomp,ma,force]\n", - "##print value,unit, header\n", - "\n", - " #--Part(b) Variation of force exerted normal to the plate with plate velocity--// \n", - "header =\"Theta\\t v\\t u\\t v-u\\t pA(v-u)\\t Force\\t\"\n", - "unit =\"deg\\t m/s\\t m/s\\t m/s\\t kg/s\\t N\\t\"\n", - "x = [0,0,0,0,0]\n", - "v = [5,5,5,5,5]\n", - "u = range(2,-3,-1);\n", - "D=[]\n", - "Prod=[]\n", - "Force=[]\n", - "for c in range(5):\n", - " D.append(v[c]-u[c])\n", - " Prod.append(round((rho*A*D[c]),2))\n", - " Force.append(round((rho*A*D[c]**2),2))\n", - " \n", - "print '\\n',\"(b)\",\"\\n\",header\n", - "print unit\n", - "for c in range(len(x)):\n", - " mm=str(x[c])+' \\t '+str(v[c])+' \\t '+str(u[c])+' \\t '+str(D[c])+' \\t '+str(Prod[c])+' \\t '+str(Force[c])\n", - " print mm\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Theta\t vcos(x)\t pAv\t Force\n", - "deg\t m/s\t kg/s\t N\n", - "0.0 \t 5.0 \t2.45 \t12.27\n", - "15.0 \t 4.83 \t2.45 \t11.85\n", - "30.0 \t 4.33 \t2.45 \t10.63\n", - "45.0 \t 3.54 \t2.45 \t8.68\n", - "60.0 \t 2.5 \t2.45 \t6.14\n", - "75.0 \t 1.29 \t2.45 \t3.18\n", - "90.0 \t 0.0 \t2.45 \t0.0\n", - "\n", - "(b) \n", - "Theta\t v\t u\t v-u\t pA(v-u)\t Force\t\n", - "deg\t m/s\t m/s\t m/s\t kg/s\t N\t\n", - "0 \t 5 \t 2 \t 3 \t 1.47 \t 4.42\n", - "0 \t 5 \t 1 \t 4 \t 1.96 \t 7.85\n", - "0 \t 5 \t 0 \t 5 \t 2.45 \t 12.27\n", - "0 \t 5 \t -1 \t 6 \t 2.95 \t 17.67\n", - "0 \t 5 \t -2 \t 7 \t 3.44 \t 24.05\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3, Page 123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " \n", - "\n", - " #Initializing the variables \n", - "x = 60; #Angle of deflection theta\n", - "rho = 1000; # Density of liquid\n", - "V1 = 30; #Acceleration of fluid\n", - "V2 = 25;\n", - "m = .8; #Discharge through A\n", - "\n", - " #Calculations\n", - "def Reaction(Vin , Vout):\n", - " R = m*(Vin -Vout) ;\n", - " return R\n", - "Rx = Reaction(V1,V2*math.cos(math.radians(x)));\n", - "Ry = -Reaction(0,V2*math.sin(math.radians(x)));\n", - "print \"Reaction in X-direction (N) :\",Rx\n", - "print \"Reaction in Y-direction (N) :\",round(Ry,2)\n", - "print \"Net Reaction (N) :\",round((Rx**2 +Ry**2)**0.5,2)\n", - "print \"Inclination of Resultant Force with x-direction (Degrees):\",round(180/math.pi*math.atan(Ry/Rx),2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reaction in X-direction (N) : 14.0\n", - "Reaction in Y-direction (N) : 17.32\n", - "Net Reaction (N) : 22.27\n", - "Inclination of Resultant Force with x-direction (Degrees): 51.05\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4, Page 125" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables \n", - "v1 = 36 ; #Exit velocity\n", - "u = 15; #Velocity of vane\\\n", - "x = 30; # Angle between vanes and flow\n", - "rho = 1000; # Density of water\n", - "d = .1; # Diameter of jet\n", - "\n", - " #Calculations\n", - "alp = (180/math.pi)*math.atan((v1*math.sin(math.radians(x))/(v1*math.cos(math.radians(x))-u)));\n", - "v2 = 0.85*v1*math.sin(math.radians(x));\n", - "bta = (180/math.pi)*math.acos((u*math.sin(math.radians(alp))/v2));\n", - "m = (rho*math.pi*v1*d**2)/4;\n", - "Vin = v1*math.cos(math.radians(x));\n", - "Vout = v2*math.cos(math.radians(90));\n", - "Rx = m*(Vin-Vout);\n", - "\n", - "\n", - "print \"Inlet Angle (Degrees) :\", round(alp,2)\n", - "print \"Outlet Angle (Degrees) :\", round(bta,2)\n", - "print \"Force exerted by vanes (N) :\", round(Rx) \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Inlet Angle (Degrees) : 48.05\n", - "Outlet Angle (Degrees) : 43.18\n", - "Force exerted by vanes (N) : 8815.0\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5, Page 127" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables \n", - "rho = 850 ; # Density of liquid\n", - "a = 0.02 #Acceleration of fluid\n", - "x = 45 ;\n", - "d1 = .5 ;\n", - "d2 = .25;\n", - "p1 = 40*10**3;\n", - "p2 = 23*10**3;\n", - "Q = .45;\n", - " \n", - " #Calculations\n", - "A1 = (math.pi*d1**2)/4;\n", - "A2 = (math.pi*d2**2)/4;\n", - "v1 = Q/A1;\n", - "v2 = Q/A2;\n", - "\n", - "Rx = p1*A1 - p2*A2*math.cos(math.radians(x)) - rho*Q*(v2*math.cos(math.radians(x))-v1);\n", - "Ry = p2*A2*math.sin(math.radians(x)) + rho*Q*v2*math.sin(math.radians(x));\n", - "\n", - "print \"Resultant force on the bend (kN) :\",round((Rx**2 +Ry**2)**0.5/1000,3)\n", - "print \"Inclination of Resultant Force with x-direction (Degrees):\",round(math.atan(Ry/Rx)*180/math.pi)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resultant force on the bend (kN) : 6.362\n", - "Inclination of Resultant Force with x-direction (Degrees): 31.0\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6, Page 129" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "\n", - " #Initializing the variables \n", - "v = 4.9; #Velocity of Jet\n", - "rho = 1000; # Density of water\n", - "d = 0.05;\n", - "u = 1.2 # Velocity of tank\n", - " #Calculations\n", - "Vout = v;\n", - "Vin = 0;\n", - "m = rho*math.pi*d**2*v/4;\n", - "R = m*(Vout-Vin);\n", - "print \"Reaction of jet on tank (N) :\",round(R,2)\n", - "print \"Work done per second (W) :\",round(R*u,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reaction of jet on tank (N) : 47.14\n", - "Work done per second (W) : 56.57\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7, Page 130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from scipy import integrate\n", - " \n", - " \n", - "\n", - " #Initializing the variables \n", - "Vj = 5*10**6; # Velocity of Jet\n", - "Mr = 150000; # Mass of Rocket\n", - "Mf0 = 300000; # Mass of initial fuel\n", - "Vr = 3000; # Velocity of jet relative to rocket\n", - "g = 9.81; # Acceleration due to gravity\n", - "\n", - " #Calculations\n", - "m = Vj/Vr; #Rate of fuel consumption\n", - "T = Mf0/m; # Burning time\n", - "\n", - "def f(t,m,Vr,Mr,Mf0,g):\n", - " return m*Vr /(Mr + Mf0 - m*t) - g;\n", - " \n", - "args = (5000/3,3000,150000,300000,9.81)\n", - "Vt = integrate.quad(f, 0.0, 180, args)\n", - "\n", - "def h(t,Vr,g):\n", - " return -g*t - Vr*math.log(1 - t/269.95);\n", - " \n", - "args = (3000,9.81)\n", - "Z1 = integrate.quad(h, 0.0, 180, args)\n", - "Z2 = Vt[0]**2/(2*g);\n", - "\n", - "print \"(a)Burning time (s) :\",T\n", - "print \"(b)Speed of rocket when all fuel is burned (m/s):\",round(Vt[0],2)\n", - "print \"(c)Maximum height reached (km) :\",round((Z2+Z1[0])/1000,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a)Burning time (s) : 180.0\n", - "(b)Speed of rocket when all fuel is burned (m/s): 1530.04\n", - "(c)Maximum height reached (km) : 203.8\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8, Page 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "V = 200; #Velocity in still air\n", - "Vr = 700; #velocity of gas relative to engine\n", - "mf = 1.1; # Fuel Consumption\n", - "r = 1/40 ; \n", - "P1 =0;\n", - "P2 = 0;\n", - "\n", - " #Calculations\n", - "m1 = mf/r;\n", - "T = m1*((1+r)*Vr -V);\n", - "print \"(a)Thrust (kN) :\",T/1000\n", - "\n", - "W = T*V;\n", - "print \"(b)Work done per second (kW) :\",W/1000\n", - "\n", - "Loss = 0.5*m1*(1+r)*(Vr-V)**2;\n", - "print \"(c)Efficiency (%) :\",round(W/(W+Loss)*100,1) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a)Thrust (kN) : 22.77\n", - "(b)Work done per second (kW) : 4554.0\n", - "(c)Efficiency (%) : 44.7\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10, Page 140" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables \n", - "rho = 1000; # Density of water\n", - "Q = 10; #Acceleration of fluid\n", - "r2 = 1.6;\n", - "r1 = 1.2;\n", - "V1 = 2.3;\n", - "V2 = 0.2;\n", - "rot = 240; \n", - "\n", - " #Calculations\n", - "Tf = rho*Q*(V2*r2 - V1*r1);\n", - "T = -Tf;\n", - "n = rot / 60;\n", - "P = 2*round(math.pi,3)*n*T;\n", - "\n", - "print \"Torque exerted by fluid (N.m):\",T\n", - "print \"Theoretical power output (kW) :\",round(P/1000,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Torque exerted by fluid (N.m): 24400.0\n", - "Theoretical power output (kW) : 613.32\n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_6.ipynb b/Fluid_Mechanics/Chapter_6.ipynb deleted file mode 100755 index 5cde4008..00000000 --- a/Fluid_Mechanics/Chapter_6.ipynb +++ /dev/null @@ -1,504 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:df3153eb902c7efba51ed445ceefd3e3c02fa6ed938e4ef53fe06333d531bf11" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6: The Energy Equation and its Applications" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1, Page 170" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "Pc = 0; # Atmospheric Pressure\n", - "Z3 = 30+2; #height of nozzle\n", - "Ep = 50 ; #Energy per unit weight supplied by pump\n", - "d1 = 0.150; #Diameter of sump\n", - "d2 = 0.100; #Diameter of delivery pipe\n", - "d3 = 0.075 ; #Diameter of nozzle\n", - "g = 9.81; # Acceleration due to gravity\n", - "Z2 = 2; #Height of pump\n", - "rho = 1000; # Density of water\n", - "\n", - " #Calculations\n", - "U3 = (2*g*(Ep-Z3)/(1+5*(d3/d1)**4 + 12*(d3/d2)**4))**0.5;\n", - "U1 = U3/4;\n", - "Pb = rho*g*Z2 + 3*rho*U1**2;\n", - "print \"Velocity of Jet through nozzle (m/s) :\",round(U3,3)\n", - "print \"Pressure in the suction pipe at the inlet to the pump at B (kN/m^2) :\",round(Pb/1000,3) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity of Jet through nozzle (m/s) : 8.314\n", - "Pressure in the suction pipe at the inlet to the pump at B (kN/m^2) : 32.58\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.2, Page 183" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - " #Initializing the variables \n", - "x = 45; # Inclination of pipe\n", - "l = 2; #Length of pipe under consideration\n", - "Ep = 50 ; #Energy per unit weight supplied by pump\n", - "d1 = 0.2; #Diameter of sump\n", - "d2 = 0.1; #Diameter of delivery pipe\n", - "g = 9.81; # Acceleration due to gravity\n", - "rho = 1000; # Density of water\n", - "V1 = 2;\n", - "RD_oil = 0.9; # relative density of oil\n", - "RD_Merc = 13.6; # Relative density of Mercury\n", - "\n", - " #Calculations\n", - "V2 = V1*(d1/d2)**2;\n", - "dZ = round(l*math.sin(math.radians(x)),3); # it is used in book as 1.414,by rounding so here also\n", - "rho_Oil = RD_oil*rho;\n", - "rho_Man = RD_Merc*rho;\n", - "dP = 0.5*rho_Oil*(V2**2-V1**2) + rho_Oil*g*dZ;\n", - "h = rho_Oil *( dP/(rho_Oil*g)- dZ)/(rho_Man - rho_Oil);\n", - "\n", - "print \"Pressure Difference(N/m2) : \",round(dP,0)\n", - "print \"Difference in the level of mercury (m):\",round(h,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure Difference(N/m2) : 39484.0\n", - "Difference in the level of mercury (m): 0.217\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3, Page 187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "d1 = 0.25; #Pipeline diameter\n", - "d2 = 0.10; #Throat diameter\n", - "h =0.63; #Difference in height\n", - "rho = 1000; #Density of water\n", - "g = 9.81 #Acceleration due to gravity\n", - "\n", - " #Calculations\n", - "rho_Hg = 13.6*rho;\n", - "rho_Oil = 0.9*rho;\n", - "A1 = (math.pi*d1**2)/4; # Area at entry\n", - "m = (d1/d2)**2; #Area ratio\n", - "Q = (A1/(m**2-1)**0.5)*(2*g*h*(rho_Hg/rho_Oil -1))**0.5;\n", - "\n", - "print \"Thepretical Volume flow rate (m3/s ):\",round(Q,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thepretical Volume flow rate (m3/s ): 0.105\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4, Page 190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "\n", - "x = 1.5;\n", - "y =0.5;\n", - "H = 1.2;\n", - "A = 650*10**-6;\n", - "Q =0.117;\n", - "g = 9.81;\n", - "\n", - " #Calculations\n", - "Cv =(x**2/(4*y*H))**0.5;\n", - "Cd = Q / (60*A*(2*g*H)**0.5);\n", - "Cc = Cd/Cv;\n", - "\n", - "\n", - "print \"Coefficient of velocity :\",round(Cv,3)\n", - "print \"Coefficient of Discharge :\",round(Cd,3)\n", - "print \"Coefficient of contraction :\",round(Cc,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Coefficient of velocity : 0.968\n", - "Coefficient of Discharge : 0.618\n", - "Coefficient of contraction : 0.639\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5, Page 192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "B = 0.7;\n", - "H1 = 0.4;\n", - "H2 = 1.9;\n", - "g =9.81;\n", - "z = 1.5 ; # height of opening\n", - "\n", - " #Calculations\n", - "Q_Th = 2/3 *B*(2*g)**0.5*(H2**1.5 - H1**1.5);\n", - "A = z*B;\n", - "h = 0.5*(H1+H2);\n", - "Q = A*(2*g*h)**0.5;\n", - "\n", - "print \"Percentage error in discharge (%):\",round((Q-Q_Th)*100/Q_Th,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error in discharge (%): 1.98\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6, Page 195" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "Cd = 0.6; #Coefficient of discharge\n", - "Q = 0.28;\n", - "x = 90; #Theta\n", - "g = 9.81;\n", - "dH = 0.0015;\n", - "\n", - " #Calculations\n", - "H = (Q*(15/8)/(Cd*(2*g)**0.5*math.tan(math.radians(x/2))))**(2/5)\n", - "Frac_Q = 5/2 *( dH/H);\n", - "\n", - "print \"Percentage error in discharge(%)\",round(Frac_Q*100,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error in discharge(%) 0.72\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7, Page 196" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "B = 0.9;\n", - "H = 0.25;\n", - "alpha = 1.1;\n", - "g = 9.81; \n", - "\n", - " #Calculations\n", - "Q = 1.84 * B * H**(3/2);\n", - "print \"Q(m3/s) :\",Q\n", - "\n", - "i = 1;\n", - "while(i <= 3):\n", - " v = Q /(1.2* (H+0.2));\n", - " print \"V(m/s) :\",round(v,4)\n", - " k = ((1 + alpha*v**2/(2*g*H))**1.5 -(alpha*v**2/(2*g*H))**1.5 );\n", - " Q = k* 1.84 * B * H**(3/2);\n", - " print \"Q(m3/s) :\",round(Q,4)\n", - " i = i+1;\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Q(m3/s) : 0.207\n", - "V(m/s) : 0.3833\n", - "Q(m3/s) : 0.2161\n", - "V(m/s) : 0.4001\n", - "Q(m3/s) : 0.2168\n", - "V(m/s) : 0.4016\n", - "Q(m3/s) : 0.2169\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8, Page 197" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "rho = 1000;\n", - "v = 66 ;\n", - "Q = 0.13;\n", - "g = 9.81; \n", - "z =240;\n", - "\n", - " #Calculations\n", - "P_Jet = 0.5*rho*v**2*Q;\n", - "P_Supp = rho*g*Q*z;\n", - "P_Lost = P_Supp -P_Jet;\n", - "h = P_Lost/(rho*g*Q);\n", - "eff = P_Jet/P_Supp;\n", - "\n", - "print \"Part(a) - power of the jet(kW): \",round(P_Jet/1000,2)\n", - "print \"Part(b) - power supplied from the reservoir (kW):\",round(P_Supp/1000,2) \n", - "print \"Part(C) - head used to overcome losses (m): \",round(h,2)\n", - "print \"Part(d) - Efficiency(%) : \",round(eff*100,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part(a) - power of the jet(kW): 283.14\n", - "Part(b) - power supplied from the reservoir (kW): 306.07\n", - "Part(C) - head used to overcome losses (m): 17.98\n", - "Part(d) - Efficiency(%) : 92.5\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9, Page 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from scipy import integrate\n", - "\n", - " #Initializing the variables \n", - "r1 = 0.2;\n", - "Z1 = 0.500;\n", - "Z2 = 0.340;\n", - "g = 9.81;\n", - "rho = 0.9*1000 ;\n", - "\n", - " #Calculations\n", - "r0 = r1*((2-2*Z2/Z1)**0.5);\n", - "omega = round((2*g*Z1/r0**2)**0.5,1)\n", - "\n", - "def G(r):\n", - " out =r**3 - r*r0**2;\n", - " return out\n", - " \n", - "results = integrate.quad(G, r0, r1)\n", - "\n", - "F = rho*omega**2*math.pi*results[0];\n", - "\n", - "print r0,r1\n", - "print \"Part(a) Speed of rotation (rad/s ):\",round(omega,1)\n", - "print \"Part(b) Upward force on the cover (N): \",round(F,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.16 0.2\n", - "Part(a) Speed of rotation (rad/s ): 19.6\n", - "Part(b) Upward force on the cover (N): 56.3\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10, Page 206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "Ra = 0.2;\n", - "Rb = 0.1;\n", - "H = 0.18;\n", - "Za = 0.125;\n", - "\n", - " #Calculations\n", - "Y = Ra**2*(H-Za);\n", - "Zb = H - Y/Rb**2;\n", - "\n", - "print \"Height above datum of a point B on the free surface at a radius of 100 mm (mm):\",Zb*1000" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Height above datum of a point B on the free surface at a radius of 100 mm (mm): -40.0\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_7.ipynb b/Fluid_Mechanics/Chapter_7.ipynb deleted file mode 100755 index 95848de2..00000000 --- a/Fluid_Mechanics/Chapter_7.ipynb +++ /dev/null @@ -1,221 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:58b7373e6785b57ec4db0eaf49754884e3dad15de9e9489fc1c2bb500d413f82" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7: Two-Dimentional Idea Flow" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2, Page 235" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables \n", - "x = 120; #Theta\n", - "r = 1;\n", - "v0 = 0.5;\n", - "q = 2;\n", - "theta =120;\n", - "\n", - " #Calculations\n", - "Vr = v0*r*math.cos(math.radians(theta)) +q/(2*math.pi)\n", - "Vth = -v0*math.sin(math.radians(theta))\n", - "V = (Vr**2+Vth**2)**0.5;\n", - "alpha = math.atan(abs(Vth/Vr));\n", - "bet = x-alpha*180/math.pi;\n", - "\n", - "\n", - "print \"Fluid Velocity(m/s) :\",round(V,3)\n", - "print \"Beta (Degree) :\",round(bet,2)\n", - "print \"Alpha (Degree) :\",round(alpha*180/math.pi,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fluid Velocity(m/s) : 0.438\n", - "Beta (Degree) : 38.96\n", - "Alpha (Degree) : 81.04\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3, Page 239" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "import sympy\n", - "from sympy import RootOf, I, Symbol\n", - " #Initializing the variables \n", - "q = 10;\n", - "def shi(x,y):\n", - " Z = (q/2/math.pi)*(math.atan(y/(x-1))-math.atan(y/(x+1))) - 25*y;\n", - " return Z\n", - "h = 0.0000001;\n", - "Vinf = 25;\n", - "x=Symbol('x')\n", - " #Calculations\n", - "#f = lambda x : x**2 - 2/(5*math.pi) -1\n", - "result = [RootOf(x**2- 2/(5*math.pi) -1,i) for i in (0,1)] \n", - "\n", - "root1=round(result[0],3)\n", - "root2=round(result[1],3)\n", - "l = abs(abs(root1)+abs(root2));\n", - "Ymax = 0.047;\n", - "width = 2*Ymax;\n", - "Vx = (shi(1-h,1)-shi(1-h,1-h))/h; # At x=1 the function atan is not defined hence taking x a little smaller.\n", - "Vy = -1*(shi(1-2*h,1)-shi(1-h,1))/h; # At x=1 the function atan is not defined hence taking x a little smaller.\n", - "\n", - "V = (Vx**2+Vy**2)**0.5;\n", - "rho = Symbol('rho')\n", - "dP = rho/2*round((V**2 - Vinf**2),2); #difference in pressure\n", - "\n", - "print \"Pressure Difference (N/m2) :\",dP\n", - "print \"Velocity (m/s) :\",round(V,2)\n", - "print \"Length of Rankine Body(m) :\",l\n", - "print \"Width of Rankine Body (m) :\",width" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure Difference (N/m2) : 16.93*rho\n", - "Velocity (m/s) : 25.67\n", - "Length of Rankine Body(m) : 2.124\n", - "Width of Rankine Body (m) : 0.094\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4, Page 242" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math #Example 7.4\n", - "\n", - " #Initializing the variables\n", - "a = 0.02;\n", - "r = 0.05;\n", - "V0 = 1;\n", - "x = 135; # Theta\n", - "def shi(r,x):\n", - " Z = V0*math.sin(math.radians(x))*(r-((a**2)/r));\n", - " return Z\n", - "h = 0.0001;\n", - "\n", - " #Calculations\n", - "Vr = 57*(shi(r,x+h)-shi(r,x))/(r*h);\n", - "Vx = -1*(shi(r+h,x)-shi(r,x))/h;\n", - "\n", - "print \"Radial Velocity (m/s) :\",round(Vr,3)\n", - "print \"Normal component of velocity (m/s):\",round(Vx,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radial Velocity (m/s) : -0.591\n", - "Normal component of velocity (m/s): -0.82\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5, Page 246" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "rho = 1000;\n", - "r = 2;\n", - "psi = 2*math.log(r);\n", - "\n", - " #Calculations\n", - "y = psi/math.log(r); # y = GammaC / 2*pi\n", - "v = y/r;\n", - "dPbydr = rho*v**2/r;\n", - "print \"Pressuer Gradient (N/m3 ) :\",dPbydr" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressuer Gradient (N/m3 ) : 500.0\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_8.ipynb b/Fluid_Mechanics/Chapter_8.ipynb deleted file mode 100755 index cd940a0c..00000000 --- a/Fluid_Mechanics/Chapter_8.ipynb +++ /dev/null @@ -1,73 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b0713ad3f7c2f18448b69f687926b2d86e094144766f7b44f7fc20525a516074" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8: Dimensional Analysis" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1, Page 268" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "P1 = 57; #Power in SI\n", - "M = 1/14.6; #Ratio of mass in SI/British\n", - "L = 1/0.3048; #Ratio of length in SI/British\n", - "T = 1; #Ratio of time in SI/British\n", - "\n", - "#Calculations\n", - "'''\n", - "n1 is the horsepower and N1 is the corresponding number of British units (ft*lbf/second),\n", - "then N1 = 550*n1.\n", - "Similarly, for the SI system, n2 in kW,\n", - " N2 = 1000*n2\n", - "''' \n", - "N = (T**3)/(M*L**2) # N2/N1\n", - "n = N*550/1000 #n2/n1 \n", - "P2 = n*P1 ; #Power in kW\n", - "\n", - "print \"Power in kW :\",round(P2,1)\n", - "print \"Conversion Factor :\",round(n,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power in kW : 42.5\n", - "Conversion Factor : 0.746\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter_9.ipynb b/Fluid_Mechanics/Chapter_9.ipynb deleted file mode 100755 index 5d9fe9d6..00000000 --- a/Fluid_Mechanics/Chapter_9.ipynb +++ /dev/null @@ -1,337 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:38d704564aa6536fc6da296a78f2a33e8cb9eb20a3ce0fa8f700546de7fd07b5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9: Similarity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1, Page 291" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - " #Initializing the variables\n", - "Vp = 10;\n", - "LpByLm = 20;\n", - "rhoPbyRhoM = 1;\n", - "muPbymuM = 1;\n", - " #Calculations\n", - "Vm = Vp*LpByLm*rhoPbyRhoM*muPbymuM;\n", - " \n", - "print \"Mean water tunnel flow velocity (m/s) :\",Vm" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean water tunnel flow velocity (m/s) : 200\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2, Page 292" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - "\n", - " #Initializing the variables\n", - "Vp = 3;\n", - "LpByLm = 30;\n", - "rhoPbyRhoM = 1;\n", - "muPbymuM = 1;\n", - "\n", - " #Calculations\n", - "Vm = Vp*LpByLm*rhoPbyRhoM*muPbymuM;\n", - " \n", - "print \"Mean water tunnel flow velocity (m/s):\",Vm" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean water tunnel flow velocity (m/s): 90\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3, Page 293" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - "\n", - " #Initializing the variables\n", - "Vp = 100;\n", - "cP = 340;\n", - "cM = 295;\n", - "rhoM = 7.7;\n", - "rhoP = 1.2;\n", - "muM = 1.8*10**-5;\n", - "muP = 1.2*10**-5;\n", - "\n", - " #Calculations\n", - "Vm = Vp*(cM/cP);\n", - "LmByLp = 1/((Vm/Vp)*(muM/muP)*(rhoM/rhoP));\n", - "FmByFp = (rhoM/rhoP)*(Vm/Vp)**2*(LmByLp)**2;\n", - "\n", - "print 'Mean wind tunnel flow velocity(m/s) :',round(Vm,2)\n", - "print \"Percentage ratio of forces (%) :\",round(FmByFp*100,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean wind tunnel flow velocity(m/s) : 86.76\n", - "Percentage ratio of forces (%) : 6.93\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4, Page 295" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - "\n", - " #Initializing the variables\n", - "def pLossRatio(RatRho,RatMu,RatL):\n", - " Z = RatRho*RatMu**2*RatL**2;\n", - " return Z\n", - "\n", - " #Calculations\n", - " #Case (a) : water is used\n", - "RatRho = 1;\n", - "RatMu = 1;\n", - "RatL = 10;\n", - "print \"(a)Ratio of pressure losses between the model and the prototype if water is used :\",pLossRatio(RatRho,RatMu,RatL)\n", - "\n", - "# Case (b) : air is used\n", - "RatRho = 1000/1.23;\n", - "RatMu = 1.8*10**-5/10**-3;\n", - "\n", - "print \"(b)Ratio of pressure losses between the model and the prototype if air is used :\",round(pLossRatio(RatRho,RatMu,RatL),2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a)Ratio of pressure losses between the model and the prototype if water is used : 100\n", - "(b)Ratio of pressure losses between the model and the prototype if air is used : 26.34\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5, Page 296" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - " #Initializing the variables\n", - "scale = 1/50;\n", - "ratArea = scale**2;\n", - "Qp = 1200;\n", - "\n", - " #Calculations\n", - "LmByLp = (ratArea)**0.5;\n", - "VmByVp = (LmByLp)**0.5;\n", - "Qm = Qp*ratArea*VmByVp;\n", - "\n", - "print \"Water flow rate (m3/s ):\",round(Qm,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Water flow rate (m3/s ): 0.068\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6, Page 298" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - " #Initializing the variables\n", - "Qa = 2;\n", - "Na = 1400;\n", - "rhoA = 0.92;\n", - "rhoS = 1.3;\n", - "DaByDs = 1;\n", - "dPa = 200;\n", - "\n", - " #Calculations\n", - "Ns = Na*(rhoA/rhoS)*(DaByDs);\n", - "Qs = Qa*(Ns/Na);\n", - "dPs = dPa *(rhoS/rhoA)*(Ns/Na)**2*(1/DaByDs)**2;\n", - "\n", - "print \"Fan test speed (rev/s):\",round(Ns,1)\n", - "print \"Flow rate (m3/s) :\",round(Qs,3)\n", - "print \"Pressure rise (N/m2 ) :\",round(dPs,1) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fan test speed (rev/s): 990.8\n", - "Flow rate (m3/s) : 1.415\n", - "Pressure rise (N/m2 ) : 141.5\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8, Page 304" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - " \n", - "\n", - " #Initializing the variables\n", - "V = 300 # Volume rate\n", - "w = 3;\n", - "d = 65;\n", - "l = 30;\n", - "scaleH = 30/1000/18;\n", - "scaleV = 1/60;\n", - "ZmByZr = 1/60;\n", - "LmByLr = 1/600;\n", - "rho = 1000;\n", - "mu = 1.14*10**-3;\n", - "\n", - " #Calculations\n", - "Vr = V/(w*d); \n", - "Vm =Vr*(ZmByZr)**0.5;\n", - "m = (w*d*scaleH*scaleV)/(d*scaleH + 2*w*scaleV);\n", - "Rem = rho*Vm*m/mu;\n", - "TmByTr = LmByLr*(1/ZmByZr)**0.5;\n", - "Tm = 12.4*60*TmByTr;\n", - "\n", - "\n", - "\n", - "print \"Tidal Period (minutes):\",round(Tm,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Tidal Period (minutes): 9.6\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_Mechanics/README.txt b/Fluid_Mechanics/README.txt deleted file mode 100755 index d96dbe87..00000000 --- a/Fluid_Mechanics/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Ashish Kumar -Course: btech -College/Institute/Organization: IITB -Department/Designation: Aerospace Engg. -Book Title: Fluid Mechanics -Author: John F. Douglas -Publisher: Pearson Education -Year of publication: 2005 -Isbn: 978-0-13-129293-2 -Edition: 5th \ No newline at end of file diff --git a/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png b/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png deleted file mode 100755 index 03ac1d9d..00000000 Binary files a/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/ch11.png b/Fluid_Mechanics/screenshots/ch11.png deleted file mode 100755 index 7f1e98ab..00000000 Binary files a/Fluid_Mechanics/screenshots/ch11.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/ch3.png b/Fluid_Mechanics/screenshots/ch3.png deleted file mode 100755 index 1b4c7079..00000000 Binary files a/Fluid_Mechanics/screenshots/ch3.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/ch5.png b/Fluid_Mechanics/screenshots/ch5.png deleted file mode 100755 index 66f3995c..00000000 Binary files a/Fluid_Mechanics/screenshots/ch5.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/incresepressure.png b/Fluid_Mechanics/screenshots/incresepressure.png deleted file mode 100755 index aaeed6e9..00000000 Binary files a/Fluid_Mechanics/screenshots/incresepressure.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/plot1.png b/Fluid_Mechanics/screenshots/plot1.png deleted file mode 100755 index caf0a78f..00000000 Binary files a/Fluid_Mechanics/screenshots/plot1.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/plot2.png b/Fluid_Mechanics/screenshots/plot2.png deleted file mode 100755 index 35633e7f..00000000 Binary files a/Fluid_Mechanics/screenshots/plot2.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/veldistrtn.png b/Fluid_Mechanics/screenshots/veldistrtn.png deleted file mode 100755 index 1b513465..00000000 Binary files a/Fluid_Mechanics/screenshots/veldistrtn.png and /dev/null differ diff --git a/Fluid_Mechanics/screenshots/veldistrtn_1.png b/Fluid_Mechanics/screenshots/veldistrtn_1.png deleted file mode 100755 index 359a0fa5..00000000 Binary files a/Fluid_Mechanics/screenshots/veldistrtn_1.png and /dev/null differ diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt old mode 100644 new mode 100755 diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch11.png b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch11.png new file mode 100755 index 00000000..7f1e98ab Binary files /dev/null and b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch11.png differ diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch3.png b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch3.png new file mode 100755 index 00000000..1b4c7079 Binary files /dev/null and b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch3.png differ diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch5.png b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch5.png new file mode 100755 index 00000000..66f3995c Binary files /dev/null and b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch5.png differ diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb new file mode 100755 index 00000000..561385dd --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb @@ -0,0 +1,609 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 1 : Fluid Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.1 Page no 8" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Desnity of air at 20 deg C and 50 psia = 4.1 kg/m**3" + ] + } + ], + "source": [ + "# Density of air\n", + "\n", + "#Given \n", + "\n", + "Mw = 29.0 # Molecular weight of air\n", + "\n", + "R = 8323/Mw # Universal gas constant\n", + "\n", + "T = 273 + 20 # temperature in K\n", + "\n", + "p = 50*144*47.88 # Pressure in N/m**2\n", + "\n", + "# Solution\n", + "\n", + "rho = p/(R*T) # from the state law\n", + "\n", + "print \"Desnity of air at 20 deg C and 50 psia = \",round(rho,2),\"kg/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.2 Page no 12" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reduction in volume = 0.045 %\n" + ] + } + ], + "source": [ + "# Reduction in volume\n", + "\n", + "# Given\n", + "\n", + "dP = 10**6 # Pressure drop in N/m**2\n", + "\n", + "V = 1 # Volume in m**3\n", + "\n", + "bta = 2.2*10**9 # Bulk modulus of elasticity in N/m**2\n", + "\n", + "# Solution\n", + "\n", + "dV = -dP*V/bta # Change in volume in m**3\n", + "\n", + "v = -dV*100\n", + "\n", + "print \"Reduction in volume = \",round(v,3),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.3 Page no 13" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volume reduction = -3.57e-06 m**3\n", + "Negative sign indicates the volume has reduced" + ] + } + ], + "source": [ + "# Volume reduction\n", + "\n", + "# Given\n", + "\n", + "bta1 = 2.28*10**9 # Bulk modulus of elasticity at 20 deg C and 103.4 N/m**2\n", + "\n", + "bta2 = 2.94*10**9 # Bulk modulus of elasticity at 20 deg C and 1034 N/m**2\n", + "\n", + "p1 = 103.4 # Pressure in N/m**2\n", + "\n", + "p2 = 1034 # Pressure in N/m**2\n", + "\n", + "# Solution \n", + "\n", + "bavg = (bta1+bta2)/2 # bulk modulus average in N/m**2\n", + "\n", + "dP = p2-p1 # pressure drop in N/m**2\n", + "\n", + "V = 10 # Volume in m**3\n", + "\n", + "dV = dP*V/bavg # Change in volume in m**3\n", + "\n", + "v = -dV\n", + "\n", + "print \"Volume reduction = \",round(v,8),\"m**3\"\n", + "\n", + "print \"Negative sign indicates the volume has reduced\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.4 Page no 14" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "An increase in pressure by 2 psia will result in a volume reduction of -0.0173 ft**3\n" + ] + } + ], + "source": [ + "# Volume reduction \n", + "\n", + "# Given\n", + "\n", + "patm = 14.6 # Atmospheric pressure in psia\n", + "\n", + "p1 = 100 # gauge pressure at point 1 in psia\n", + "\n", + "p2 = 102 # gauge pressure at point 2 in psia\n", + "\n", + "V = 1 # volume in m**3\n", + "# solution\n", + "\n", + "p = p1+patm # absolute pressure in psia\n", + "\n", + "b = p # for isothermal air\n", + "\n", + "p1 = p2+patm # absolute pressure in psia\n", + "\n", + "b1 = p1 # for isothermal air\n", + "\n", + "dP = p1 - p # change in pressure\n", + "\n", + "bavg = (b1+b)/2 # average bulk modulus of elasticity in N/m**2\n", + "\n", + "dV = dP*V/bavg\n", + "\n", + "v = -dV\n", + "\n", + "print \"An increase in pressure by 2 psia will result in a volume reduction of\",round(v,4),\"ft**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.5 Page no 14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sonic velocity in air at 68 deg F = 1126.0 ft/s\n" + ] + } + ], + "source": [ + "# Sonic velocity of air\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "R = 1716 # Universal gas constant in ft.lb/slug^oR\n", + "\n", + "T = 68+460 # temperature in *oR\n", + "\n", + "# solution\n", + "\n", + "c = sqrt(k*R*T)\n", + "\n", + "print \"Sonic velocity in air at 68 deg F = \",round(c,0),\"ft/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.6 Page no 19" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required to move the piston by 1 m/s = 2.83 N\n" + ] + } + ], + "source": [ + "# Force required to move the piston\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d = 0.05 # diameter of cylinder 1 in m\n", + "\n", + "l = 0.2 # length of the cylinder in meters\n", + "\n", + "d1 = 0.052 # diameter of cylinder in m\n", + "\n", + "mu = 0.09 # Viscosity of oil in Ns/m**2\n", + "\n", + "U = 1 # velocity in m/s\n", + "\n", + "Y = (d1-d)/2 # clearance between the two cylinders in m\n", + "\n", + "A = pi*l*d # area in m**2\n", + "\n", + "# Solution \n", + "\n", + "tau = mu*U/Y # Shear stress in N/m**2\n", + "\n", + "F = tau*A # Shear foce in N\n", + "\n", + "print \"Force required to move the piston by 1 m/s = \",round(F,2),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.7 Page no 20" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) Distance between the walls = 1.0 cm\n", + " (b) Shear stress = 0.0001005 N/m**2\n", + " (c) Shear Stress at 20 um from the plate = 0.000100098 N/m**2\n", + " (d) Location of maximum velocity = 0.005 m\n", + "Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate \n", + "This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\n" + ] + } + ], + "source": [ + "# Distance between the walls; Shear Stress; Location of maximum velocity\n", + "\n", + "from math import *\n", + "\n", + "from sympy import *\n", + "\n", + "# Given\n", + "\n", + "mu = 1.005*10**-3 # Viscosity of water in Ns/m**2\n", + "\n", + "# Solution \n", + "\n", + "# Part a\n", + "\n", + "# Velocity is given by the formula u = 10*(0.01*y-y**2)\n", + "\n", + "# two boundary conditions must be satisfied\n", + "\n", + "# at y=0;u=0 at the bottom of the plate\n", + "\n", + "# at y=Y ; u = 0 at top of the plate\n", + "\n", + "Y = 0.01 # Distance between the walls\n", + "\n", + "Y1 = Y*100\n", + "\n", + "print \" (a) Distance between the walls = \",round(Y1,1),\"cm\"\n", + "\n", + "# Part b\n", + "\n", + "# tau = mu*du/dy # Newtons law of viscosity\n", + "\n", + "# differentiate u wrt y\n", + "\n", + "y = Symbol('y')\n", + "\n", + "u = 10*(0.01*y-y**2)\n", + "\n", + "uprime = u.diff(y)\n", + "\n", + "y = 0\n", + "\n", + "U = uprime\n", + "\n", + "#print U\n", + "# for y =0 at the bottom plate we get \n", + "\n", + "U1 = 0.01 # from U\n", + "\n", + "tau = mu*10*U1 # shear stress in N/m**2\n", + "\n", + "print \" (b) Shear stress = \",round(tau,9),\"N/m**2\"\n", + "\n", + "# Part c\n", + "\n", + "# Shaer stress at 20um from the wall\n", + "\n", + "tau1 = mu*10*(0.01-2*20*10**-6) # using the equation of U and y = 20*10**-6 calc shear stress in N/m**2\n", + "\n", + "print \" (c) Shear Stress at 20 um from the plate = \",round(tau1,9),\"N/m**2\"\n", + "\n", + "# Part D\n", + "\n", + "# Distance at which shaer stress is zero can be found from the location of maximum velocity \n", + "\n", + "# equating uprime = 0\n", + "\n", + "y1 = 0.01/2 # shear stress location\n", + "\n", + "print \" (d) Location of maximum velocity = \",round(y1,3),\"m\"\n", + "\n", + "print \"Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate\",\"\\n\",\"This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.8 Page 24" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) For linear distribution of velocity , shaft torque = 10.86 m.N\n", + " (b) For non-linear distribution of velocity , shaft torque = 10.86 m.N\n" + ] + } + ], + "source": [ + "# Shaft torque for linear and non linear distribution of velocity \n", + "from math import *\n", + "# Given\n", + "\n", + "d = 0.1 # diameter of shaft in m\n", + "\n", + "l = 0.2 # length of the shaft in m\n", + "\n", + "t = 0.00002 # thickness in m\n", + "\n", + "N = 30 # RPM of shaft\n", + "\n", + "U = pi*d*30/60 # velocity in m/s\n", + "\n", + "r1 = d/2\n", + "\n", + "r2 = r1 + t # radius of bearing in m\n", + "\n", + "mu = 0.44 # Viscosity of SAE-30 oil in Ns/m**2\n", + "\n", + "# Solution\n", + "\n", + "# part a\n", + "\n", + "F = 2*pi*r1*l*mu*U/t\n", + "\n", + "T =F*r1\n", + "\n", + "print \" (a) For linear distribution of velocity , shaft torque = \",round(T,2),\"m.N\"\n", + "\n", + "# part b\n", + "\n", + "F1 = 2*pi*l*mu*U/log(r2/r1)\n", + "\n", + "\n", + "T1 =F1*r1\n", + "\n", + "print \" (b) For non-linear distribution of velocity , shaft torque = \",round(T1,2),\"m.N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.9 Page 26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Watts of energy lost in overcoming friction at 300 RPM = 1108.0 Watts\n" + ] + } + ], + "source": [ + "# Watts of energy lost to overcome friction\n", + "from math import *\n", + "# Given\n", + "\n", + "mu = 0.44 # viscosity of the oil in Ns/m**2\n", + "\n", + "N = 300 # RPM of the shaft\n", + "\n", + "t = 0.00025 # thickness of the film oil in m\n", + "\n", + "r1 = 0.15 # radius in m\n", + "\n", + "r2 = 0.1 # radius in m\n", + "\n", + "T = pi**2*mu*N*(r1**4-r2**4)/(60*t)\n", + "\n", + "P = T*2*pi*N/60\n", + "\n", + "print \"Watts of energy lost in overcoming friction at 300 RPM = \",round(P,0),\"Watts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.10 Page no 28" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Excessive pressure inside the droplet = 29.2 N" + ] + } + ], + "source": [ + "# Excessive pressure inside droplet\n", + "\n", + "# Given\n", + "\n", + "d = 0.01 # diameter in m\n", + "\n", + "sigma = 0.073 # surface tension in N/m\n", + "\n", + "# Solution \n", + "\n", + "dP = 4*sigma/d # pressure excessive\n", + "\n", + "print \"Excessive pressure inside the droplet = \",round(dP,2),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.11 Page no 31" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The alcohol will rise to a height of 5.7 mm in the glass tube" + ] + } + ], + "source": [ + "# Height to which alcohol will rise\n", + "\n", + "# Given\n", + "\n", + "sigma = 0.022 # surface tension in N/m\n", + "\n", + "gma = 9789 # specific weight\n", + "\n", + "S = 0.79 # specific gravity\n", + "\n", + "d = 0.002 # diameter in m\n", + "\n", + "# Solution \n", + "\n", + "\n", + "h =4*sigma*1000/(gma*S*d) # capillary height in m\n", + "\n", + "print \"The alcohol will rise to a height of\",round(h,1),\"mm in the glass tube\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb new file mode 100755 index 00000000..d207e652 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb @@ -0,0 +1,451 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 10 : Open Channel Flow " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.1 Page no 363" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Top width = 5.0 m\n", + "Area of flow = 8.0 m**2\n", + "Wetted perimeter = 7.472 m\n", + "Hydraulic radius = 1.07 m\n", + "Hydraulic depth = 1.6 m\n", + "Secton Factor = 10.12 m**2\n" + ] + } + ], + "source": [ + "# Top width, area of lfow, hydraulic radius\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "b = 3 # base of the channel\n", + "\n", + "z = 0.5 # slope of the channel\n", + "\n", + "y = 2 # depth of the channel\n", + "\n", + "# Solution\n", + "\n", + "T = b + 2*z*y\n", + "\n", + "print \"Top width =\",round(T,0),\"m\"\n", + "\n", + "A = (b+z*y)*y\n", + "\n", + "print \"Area of flow =\",round(A,0),\"m**2\"\n", + "\n", + "P = b + 2*y*sqrt(1+z**2)\n", + "\n", + "print \"Wetted perimeter =\",round(P,3),\"m\"\n", + "\n", + "R = A/P\n", + "\n", + "print \"Hydraulic radius =\",round(R,2),\"m\"\n", + "\n", + "D = A/T\n", + "\n", + "print \"Hydraulic depth =\",round(D,2),\"m\"\n", + "\n", + "Z = A*sqrt(D)\n", + "\n", + "print \"Secton Factor =\",round(Z,2),\"m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.2 Page no 366" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge for the channel = 16.1 m**3/s\n" + ] + } + ], + "source": [ + "# Discharge for the trapezoidal channel\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "z = 1.0 # slide slope\n", + "\n", + "b = 3.0 # base width\n", + "\n", + "y = 1.5 # depth\n", + "\n", + "S = 0.0009\n", + "\n", + "n = 0.012 # for concrete\n", + "\n", + "# Solution\n", + "\n", + "A = (b+z*y)*y\n", + "\n", + "P = P = b + 2*y*sqrt(1+z**2)\n", + "\n", + "R = A/P\n", + "\n", + "# from mannings eqquation\n", + "\n", + "Q = A*(1/n)*(R**(2/3)*S**(1/2))\n", + "\n", + "print \"Discharge for the channel =\",round(Q,2),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.4 Page no 373" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "depth(y) = 5.05 ft\n", + "base width(b) = 4.18 ft\n" + ] + } + ], + "source": [ + "# Determine cross sectional area\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "z = 1\n", + "\n", + "Q = 10000/60 # discharge of water in ft**#/s\n", + "\n", + "# Solution\n", + "\n", + "y = (Q/(1.828*2.25*sqrt(0.5)))**(2/5)\n", + "\n", + "print \"depth(y) =\",round(y,2),\"ft\"\n", + "\n", + "b = 0.828*y\n", + "\n", + "print \"base width(b) =\",round(b,2),\"ft\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.5 Page no 378" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Critical depth = 3.44 m\n" + ] + } + ], + "source": [ + "# Calculate criticcal depth\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "y = 2.5 # depth\n", + "\n", + "V = 8 # velocity in m/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "Yc = (20**2/g)**(1/3)\n", + "\n", + "print \"Critical depth =\",round(Yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.6 Page no 380" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a )Normal Depth = 2.22 m\n", + "b )F = 0.31 Since the Froude number is less than 1, the flow is subcritical\n", + "c )Critical depth is = 1.08 m\n" + ] + } + ], + "source": [ + "# determine normal depth, flow regine, critical depth\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "Q = 15 # flow rate in m**3/s\n", + "\n", + "w = 4.0 # bottom width\n", + "\n", + "S = 0.0008 # bed slope\n", + "\n", + "n = 0.025 # manning constant\n", + "\n", + "z = 0.5 # slope\n", + "\n", + "# Solution\n", + "\n", + "# We use a trial and error method here to find the value of y i.e. normal depth\n", + "\n", + "y = 2.22 # we take the value of y as 2.2 m\n", + "\n", + "Q = ((4+0.5*y)*(y/(n))*(((4+0.5*y)*y)/(4+2.236*y))**(0.667)*(S)**(0.5))\n", + "\n", + "print \"a )Normal Depth =\",round(y,2),\"m\"\n", + "\n", + "A = (4+0.5*y)*y\n", + "\n", + "T = (w+2*z*y)\n", + "\n", + "D = A/T\n", + "\n", + "V = (Q/A)\n", + "\n", + "F =V/(sqrt(9.81*D)) \n", + "\n", + "print \"b )F = \",round(F,2),\" Since the Froude number is less than 1, the flow is subcritical\"\n", + "\n", + "# we use trail and error to find the value of yc for critical depth\n", + "\n", + "yc = 1.08\n", + "\n", + "Q1 = (4+z*yc)*yc*sqrt((9.81*(4+0.5*yc)*yc)/(4+2*z*yc)) \n", + "\n", + "print \"c )Critical depth is = \",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.8 Page no 390" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since F1 = 1.86 It is a weak jump\n", + "Length of the jump = 23.0 ft\n", + "Total energy loss = 133.7 HP\n" + ] + } + ], + "source": [ + "# Height, type and length of jump and loss of energy\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "b = 60 # base width in ft\n", + "\n", + "y1 = 2.5 # base depth in ft\n", + "\n", + "Q = 2500 # discharge in ft**3/s\n", + "\n", + "g = 32.2\n", + "\n", + "# Solution\n", + "\n", + "V1 = Q/(b*y1)\n", + "\n", + "F1 = V1/sqrt(g*y1)\n", + "\n", + "y2 = y1*0.5*(sqrt(1+8*F1**2)-1)\n", + "\n", + "V2 = Q/(b*y2)\n", + "\n", + "print \"Since F1 =\",round(F1,2),\" It is a weak jump\"\n", + "\n", + "L = y2*4.25\n", + "\n", + "print \"Length of the jump =\",round(L,0),\"ft\"\n", + "\n", + "E1 = y1+(V1**2/(2*g))\n", + "\n", + "E2 = y2+(V2**2/(2*g))\n", + "\n", + "El = E1-E2\n", + "\n", + "Te = El*62.4*Q/543\n", + "\n", + "print \"Total energy loss =\",round(Te,2),\"HP\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.12 Page no 409" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge = 503.0 cfs\n" + ] + } + ], + "source": [ + "# Determine flow rate\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 6 # depth of the channel\n", + "\n", + "w= 12 # width of the channel\n", + "\n", + "h = 1.0 # height of the channel\n", + "\n", + "p = 9 # pressure drop in m\n", + "\n", + "g = 32.2\n", + "\n", + "# Solution\n", + "\n", + "y2 = y1 - h - 0.75\n", + "\n", + "V1 = sqrt(2*g*0.75/((1.41)**2-1))\n", + "\n", + "Q = w*b*V1/10\n", + "\n", + "print \"Discharge =\",round(Q,0),\"cfs\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb new file mode 100755 index 00000000..3d434d74 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb @@ -0,0 +1,333 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Chapter 11: Compressible Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.1 Page no 420" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total change in enthalpy for 10 kg air = 180.0 kcal\n" + ] + } + ], + "source": [ + "# Example 11.1\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "T1 = 273 + 15 # temperature in K\n", + "\n", + "T2 = 273 + 90 # temperature in K\n", + "\n", + "Cp = 0.24 # cp for air in kcal/kgK\n", + "\n", + "# Solution\n", + "\n", + "dh = Cp*(T2-T1) # enthalpy per kg of air\n", + "\n", + "H = 10*dh # total enthallpy of 10 kg air\n", + "\n", + "print \"Total change in enthalpy for 10 kg air = \",round(H,0),\"kcal\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.2 Page no 420" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total change in enthalpy of 10 Kg of air = -0.255 kcal/K\n" + ] + } + ], + "source": [ + "# Example 11.2\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "T1 = 273 + 15 # temperature in K\n", + "\n", + "T2 = 273 + 90 # temperature in K\n", + "\n", + "P1 = 40 + 101.3 # pressure in abs\n", + "\n", + "P2 = 360 + 101.3 # presure in abs\n", + "\n", + "Cv = 0.171 # Specific volume Coefficient of air\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "# solution\n", + "\n", + "dS = Cv*log((T2/T1)**k*(P2/P1)**(1-k))\n", + "\n", + "S = 10*dS\n", + "\n", + "print \"Total change in enthalpy of 10 Kg of air =\",round(S,3),\"kcal/K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.3 Page no 421" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature if air = 320.2 F\n", + "Total work done on 10 slugs = 330.0 Btu\n" + ] + } + ], + "source": [ + "# Example 11.3\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "P1 = 10 # pressure in psia\n", + "\n", + "P2 = 30 # pressure in psia\n", + "\n", + "T1 = 460+110 # temperature in R\n", + "\n", + "k =1.4 # gas constant\n", + "\n", + "T2 = T1*(P2/P1)**((k-1)/k)\n", + "\n", + "t2 = T2-460 # final temperature of air\n", + "\n", + "print \"Final temperature if air = \",round(t2,1),\"F\"\n", + "\n", + "Cv = 0.157 # coefficient of air \n", + "\n", + "W = Cv*(T2-T1) # work done per unit mass of oxygen\n", + "\n", + "Tw = 10*W # total work done on 10 slugs\n", + "\n", + "print \"Total work done on 10 slugs = \",round(Tw,0),\"Btu\" \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.4 Page no 426" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Speed of sound in water = 1483.0 m/s\n", + "Speed of sound in ethly alcohol = 1238.0 m/s\n", + "Speed of sound in Air = 343.0 m/s\n" + ] + } + ], + "source": [ + "# Example 11.4\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "# for water\n", + "\n", + "S =1 # specific gravity\n", + "\n", + "rho = S*1000 # density in kg/m**3\n", + "\n", + "bta = 2.2*10**9 # Bulk modulus of elasticity\n", + "\n", + "# ethly alcohol\n", + "\n", + "S1 =0.79 # specific gravity\n", + "\n", + "rho2 = S1*1000 # density in kg/m**3\n", + "\n", + "bta2 = 1.21*10**9 # Bulk modulus of elasticity\n", + "\n", + "# for air\n", + "\n", + "k = 1.4 # gas constant for air\n", + "\n", + "R = 287 # universal gas constant\n", + "\n", + "T = 273+20 # temperature in K\n", + "\n", + "# Solution\n", + "\n", + "C1 = sqrt(bta/rho)\n", + "\n", + "C2 = sqrt(bta2/rho2)\n", + "\n", + "print \"Speed of sound in water =\",round(C1,0),\"m/s\"\n", + "\n", + "print \"Speed of sound in ethly alcohol =\",round(C2,0),\"m/s\"\n", + "\n", + "C3 = sqrt(k*R*T)\n", + "\n", + "print \"Speed of sound in Air =\",round(C3,0),\"m/s\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.5 Page no 431" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.753305702898\n", + "Pressure at downstream = 3.03 psia\n", + "Temperature at downstream = 157.3 F\n", + "Velocity downstream = 463.02 ft/s\n" + ] + } + ], + "source": [ + "# Example 11.5\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "P1 = 1.5 # pressure in psia\n", + "\n", + "T1 = 40 + 460 # temperature in R\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "R = 1716 # universal gas constant in ft.lb/slug R\n", + "\n", + "V1 = 1500 # velocity in ft/s\n", + "\n", + "# Solution\n", + "\n", + "c1 = sqrt(k*R*T1)\n", + "\n", + "M1 = V1/c1\n", + "\n", + "M2 = sqrt((2+(k-1)*M1**2)/(2*k*M1**2-(k-1)))\n", + "print M2\n", + "\n", + "P2 = P1*((1+k*M1**2)/(1+k*M2**2))\n", + "\n", + "print \"Pressure at downstream = \",round(P2,2),\"psia\"\n", + "\n", + "T2 = T1*((1+0.5*(k-1)*M1**2)/(1+0.5*(k-1)*M2**2))\n", + "\n", + "t2 = T2-460\n", + "\n", + "print \"Temperature at downstream = \",round(t2,1),\"F\"\n", + "V2 = M2*sqrt(k*R*t2)\n", + "\n", + "print \"Velocity downstream = \",round(V2,2),\"ft/s\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb new file mode 100755 index 00000000..009a616c --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb @@ -0,0 +1,365 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 12: Turbomachines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.1 Page no 443" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of th pump = 74.0 %\n" + ] + } + ], + "source": [ + "# Example 12.1\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "Q = 0.25 # discharge from the pump in m**3/s\n", + "\n", + "gma= 0.8*9810 # specific weight in kg/m**3\n", + "\n", + "H=25 # elevation head in m\n", + "\n", + "T = 350 # Torque to drive the shaft in Nm\n", + "\n", + "N = 1800 # Speed in RPM\n", + "\n", + "w = 2*pi*N/60 # angular velocity\n", + "\n", + "# Solution\n", + "\n", + "Eff = gma*Q*H*100/(T*w) # efficiency\n", + "\n", + "print \"Efficiency of th pump =\",round(Eff,0),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.2 Page no 447" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a)\n", + "Radial velocity at exit = 10.6 m/s\n", + "Whirl velocity = 25.3 m/s\n", + "Relative velocity = 12.25 m/s\n", + "Actual velocity = 27.43 m/s\n", + "(b)\n", + "Head added for no inlet whirl = 81.0 m\n", + "(c)\n", + "Power required = 317.8 kW\n" + ] + } + ], + "source": [ + "# Example 12.2\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.4 # diameter of the pump in m\n", + "\n", + "b = 0.03 # width in m\n", + "\n", + "theta = pi/3 # blade angle\n", + "\n", + "N = 1500 # speed in RPM\n", + "\n", + "Q = 0.4 # flow rate in m**3/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "w = 2*pi*N/60 # anggular velocity in rad/s\n", + "\n", + "u2 = (d/2)*w # blade velocity in m/s\n", + "\n", + "V2r = Q/(2*pi*(d/2)*b) # relative velocity in m/s\n", + "\n", + "print \"(a)\"\n", + "\n", + "print \"Radial velocity at exit =\",round(V2r,1),\"m/s\"\n", + "\n", + "V2t = u2 - V2r*(cos(theta)/sin(theta))\n", + "\n", + "print \"Whirl velocity = \",round(V2t,1),\"m/s\"\n", + "\n", + "v2 = V2r/sin(theta)\n", + "\n", + "print \"Relative velocity = \",round(v2,2),\"m/s\"\n", + "\n", + "V2 = sqrt(V2t**2+V2r**2)\n", + "\n", + "print \"Actual velocity =\",round(V2,2),\"m/s\"\n", + "\n", + "print \"(b)\"\n", + "\n", + "H = u2*V2t/g\n", + "\n", + "print\"Head added for no inlet whirl =\",round(H,0),\"m\"\n", + "\n", + "print \"(c)\"\n", + "\n", + "P = g*Q*H\n", + "\n", + "print \"Power required =\",round(P,1),\"kW\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.3 Page no 450" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Impeller size = 38.45 cm\n", + "Speed of the pump = 1500.0 RPM\n" + ] + } + ], + "source": [ + "# Example 12.3\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.36 # diameter of the impeller of pump\n", + "\n", + "N = 1500 # Speed of impeller in RPM\n", + "\n", + "# Solution\n", + "\n", + "# For best efficiency\n", + "\n", + "Q1 = 82 # discharge in l/s\n", + "\n", + "H1 = 17.5 # Head in m\n", + "\n", + "Eta = 0.8 # efficiency \n", + "\n", + "Q2 = 100 # discharge in l/s\n", + "\n", + "H2 = 20 # head in m\n", + "\n", + "# Solving the simulataneous equation we get\n", + "\n", + "D2 = 38.45\n", + "\n", + "print \"Impeller size =\",round(D2,2),\"cm\"\n", + "\n", + "N2 = 1500 \n", + "\n", + "print \"Speed of the pump =\",round(N2,0),\"RPM\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.4 Page no 454 " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge, Q = 1.11 ft**3/s\n", + "Dynamic head of the pump, H = 122.1 m\n", + "Specific speed of the pump, Ns = 1096.0 RPM\n" + ] + } + ], + "source": [ + "# Example 12.4\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "q = 500 # discharge in cgm\n", + "\n", + "Q = 500/449 # discharge in ft**3/s\n", + "\n", + "D = 0.667 # diameter in ft\n", + "\n", + "A = pi*D**2/4\n", + "\n", + "V = Q/A # velocity in ft/s\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "N = 1800 # speed in RPM\n", + "\n", + "# Solution\n", + "\n", + "# for water at 65 deg C\n", + "\n", + "nu = 1.134*10**-5 # viscosity in ft**2/s\n", + "\n", + "e = 0.00085 # epssilon in ft\n", + "\n", + "r = 0.001275 \n", + "\n", + "R = V*D/nu # reynolds no\n", + "\n", + "f = 0.022 # from moody's diagram\n", + "\n", + "Hl = V**2*(12.1+(f*224.9))/64.4\n", + "\n", + "hs = 119.4 + Hl\n", + "\n", + "print \"Discharge, Q = \",round(Q,2),\"ft**3/s\"\n", + "print \"Dynamic head of the pump, H =\",round(hs,1),\"m\"\n", + "\n", + "Ns = N*sqrt(q)/(hs)**(3/4)\n", + "\n", + "print \"Specific speed of the pump, Ns =\",round(Ns,0),\"RPM\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.5 Page no 457" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum value of static suction lift = 4.02 m\n" + ] + } + ], + "source": [ + "# Example 12.5 \n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "H = 60 # height in m\n", + "\n", + "Pb = 98*10**3 # barometric pressure in N/m**2\n", + "\n", + "Hl = 1 # head in m\n", + "\n", + "Pv = 1707 # vapour pressure \n", + "\n", + "sigma = 0.08\n", + "\n", + "w = 9810 # specific weight\n", + "\n", + "# Solution\n", + "\n", + "Npsh_m = sigma*60 # minimum NPSH\n", + "\n", + "Hsm = (Pb/w)-(Pv/w)-Npsh_m-Hl\n", + "\n", + "print \"Minimum value of static suction lift = \",round(Hsm,2),\"m\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb new file mode 100755 index 00000000..e25d6ea0 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb @@ -0,0 +1,970 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 : Fluid Statics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1 Page no 44" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using the pascal's law a weight of 1000N can be lifted by applying a force only of 10.0 N\n" + ] + } + ], + "source": [ + "# Force applied on the piston\n", + "\n", + "from math import *\n", + "\n", + "# Given \n", + "\n", + "d = 10 # diameter of hydraulic press in meters\n", + "\n", + "d1 = 1 # diameter of piston in meters\n", + "\n", + "W = 1000 # weight in Newtons\n", + "\n", + "Ap = math.pi*d1**2/4 # Area of piston in m**2\n", + "\n", + "Ar = math.pi*d**2/4 # Area of rram in m**2\n", + "\n", + "# Solution \n", + "\n", + "p = W/Ar # pressure to be supplied by the oil in N/cm**2\n", + "\n", + "F = p*Ap # Force applied on the piston\n", + "\n", + "print \"Using the pascal's law a weight of 1000N can be lifted by applying a force only of \",round(F,1),\"N\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.2 Page no 53" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure = 10070.0 kN/m**2\n" + ] + } + ], + "source": [ + "# Pressure in kN/m**2\n", + "\n", + "# Given\n", + "\n", + "h = 1 # ocean depth below the surface in km\n", + "\n", + "gma = 10070 # Specific weight of sea water\n", + "\n", + "# Solution\n", + "\n", + "P =gma*h # Pressure in kN/m**2\n", + "\n", + "print \"Pressure = \",round(P),\"kN/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.3 Page no 53" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure at the bottom of the tank is 176.3 kN/m**3" + ] + } + ], + "source": [ + "# Pressure at the bottom of the tank\n", + "\n", + "# Given\n", + "\n", + "p1 = 150*10**3 # Pressure at point 1 in kN/m**2\n", + "\n", + "Sg = 0.85 # Specific gravity of oil\n", + "\n", + "h = 0.8 # height of oil 2 i tank in meters \n", + "\n", + "g = 9810 # specific gravity \n", + "\n", + "h1 = 2.0 # height of oil 3 in tank\n", + "\n", + "# Solution \n", + "\n", + "p2 = (p1 + Sg*h*g)\n", + "\n", + "p3 = (p2 + g*h1)/1000\n", + "\n", + "print \"Pressure at the bottom of the tank is\",round(p3,1),\"kN/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.4 Page no 54" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Height of the mountain is 2208.0 m\n" + ] + } + ], + "source": [ + "# Height of the mountain\n", + "\n", + "# Given\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "Po = 570 # mercury barometer reading in mm\n", + "\n", + "T = 273 -5 # temperature in K\n", + "\n", + "p = 750 # mercury barometer reading in mm\n", + "\n", + "n = 1.2345 # for polytropic atmosphere\n", + "\n", + "R =287 # univerasl gas constant in J/Kg-K\n", + "\n", + "g = 9.81 \n", + "\n", + "r = p/Po\n", + "\n", + "# Solution\n", + "\n", + "y = -(R*T/(g*0.19))*(1 - (r)**((n-1)/n))\n", + "\n", + "print \"Height of the mountain is\",round(y,0),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.5 Page no 57" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure in the pipe = 9.074 kPa\n" + ] + } + ], + "source": [ + "# Pressure in the pipe\n", + "\n", + "# Given\n", + "\n", + "h1 = 500 # height in mm\n", + "\n", + "h2 = 950 # height in mm\n", + "\n", + "S1 = 1 # specific gravity fo water\n", + "\n", + "S2 = 1.5 # specific gravity of liquid 2\n", + "\n", + "w = 9810 # specific weight of water\n", + "\n", + "# Solution\n", + "\n", + "ha = ((h2*S2)-(h1*S1))/1000\n", + "\n", + "Pa = w*ha/1000 # Pressure in kPa\n", + "\n", + "print \"Pressure in the pipe = \",round(Pa,3),\"kPa\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.6 Page no 66" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnitude of the force required to open the gate = 21659.0 N\n" + ] + } + ], + "source": [ + "# Force required to open the gate\n", + "\n", + "# Given\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "d = 1 # diameter of the gate in m\n", + "\n", + "w = 9810 # specific weight in N/m**3\n", + "\n", + "A = pi*d**2/4 # area of the gate\n", + "\n", + "Ig = pi*d**4/64 # mamm moment of inertia\n", + "\n", + "theta = pi/2\n", + "\n", + "y1= 5+0.5\n", + "\n", + "# Solution\n", + "\n", + "F = w*round(A,3)*(y1) # the answer will come out to be different as they have used the value of Area as 0.78 \n", + "\n", + "# depth of the COP\n", + "\n", + "h1 = y1 + (Ig*math.sin(theta)*math.sin(theta)/(A*y1))\n", + "\n", + "# moment about hinge A\n", + "\n", + "F1 = (F*(h1 - 5))/d\n", + "\n", + "print \"Magnitude of the force required to open the gate = \",round(F1,0),\"N\" \n", + "#The area calculated in the book is 0.785 and that calculated from code is 0.78. \n", + "#This difference of 0.005 is causing the answer to change from the original\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.7 Page no 67" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Total force = 31.71 kN\n", + "(b) Position of center of pressure = 1.616 m\n" + ] + } + ], + "source": [ + "# total force ; position of the center of pressure \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "l =2 # length of the plate in m\n", + "\n", + "b =1 # width of the plate\n", + "\n", + "theta = pi/3\n", + "\n", + "h = 0.75 # depth of the plate\n", + "\n", + "w = 9810 # specific weight of water\n", + "\n", + "# Solution\n", + "\n", + "A = 1*2\n", + "\n", + "y1 = h + 1*sin(theta)\n", + "\n", + "F = w*A*y1/1000\n", + "\n", + "print \"(a) Total force = \",round(F,2),\"kN\"\n", + "\n", + "Ig = (b*l**3)/12\n", + "\n", + "h1 = y1 + (Ig*sin(theta)*sin(theta)/(2*y1))\n", + "\n", + "print \"(b) Position of center of pressure = \",round(h1,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.8 Page no 68" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total hydrostatic force = 40783.0 lbs\n", + "point of location on the center plate = 13.52 ft\n", + " OR point of location on the center plate from method 2 = 13.5 ft\n" + ] + } + ], + "source": [ + "# Hydrostatic force and point of location \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d = 6 # diameter of the gate in ft\n", + "\n", + "A =pi*d**2/4 # area of the gate\n", + "\n", + "p1 = 600 # pressure on top in psia\n", + "\n", + "y1 = 10 +2 + 3*sin(pi/6)\n", + "\n", + "F = 62.4*A*y1\n", + "\n", + "F1 = p1*A\n", + "\n", + "# Solution\n", + "\n", + "Tf = F+F1\n", + "\n", + "print \"Total hydrostatic force =\",round(Tf,0),\"lbs\"\n", + "\n", + "Ig = pi*d**4/64\n", + "\n", + "h1 = y1 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y1))\n", + "\n", + "H = ((F*h1)+(F1*y1))/Tf\n", + "\n", + "print \"point of location on the center plate = \",round(H,2),\"ft\"\n", + "\n", + "# method 2\n", + "\n", + "Hf = p1/62.4 # equivalent fluid height\n", + "\n", + "y2 = Hf+y1\n", + "\n", + "Tf1 = 62.4*A*y2\n", + "\n", + "h2 = y2 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y2))\n", + "\n", + "H1 = y2-Hf\n", + "\n", + "print \" OR point of location on the center plate from method 2 = \",round(H1,2),\"ft\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.10 Page no 74" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Horizontal component acting on the plate = 998.4 lbs\n", + "Vertical component acting on the plate = 1283.34 lbs\n", + "location of Xv = 1.82 ft\n" + ] + } + ], + "source": [ + "# Horizontal and Vertical components\n", + "\n", + "import math\n", + "\n", + "# Given\n", + "\n", + "R = 4 # radius of the gate in ft\n", + "\n", + "w = 1 # width of the gate in ft\n", + "\n", + "gma =62.4 # specific weight of water\n", + "\n", + "y1 = 4 # distance of center of the gate\n", + "\n", + "xv1 = 2 # distance in ft\n", + "\n", + "xv2 = 1.7 # distance in ft\n", + "\n", + "# Solution \n", + "\n", + "Fh = R*y1*gma\n", + "\n", + "Ig = w*R**3/12\n", + "\n", + "yh = y1 + (Ig/(R*y1))\n", + "\n", + "Fv1 = R*2*gma\n", + "\n", + "Fv2 = pi*R**2*gma/4\n", + "\n", + "Fv = Fv1 + Fv2\n", + "\n", + "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n", + "\n", + "print \"Horizontal component acting on the plate = \",round(Fh,2),\"lbs\"\n", + "\n", + "print \"Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n", + "\n", + "print \"location of Xv =\",round(Xv,2),\"ft\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.11 Page no 77" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Horizontal component acting on the plate = 29923.0 lbs\n", + "(b) Vertical component acting on the plate = 30208.14 lbs\n", + "location of vertical component Xv = 1.99 ft from the left wall\n" + ] + } + ], + "source": [ + "# Vertical and Horizontal components\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "p = 50 # pressure in psia\n", + "\n", + "gma = 62.4 # specific weight in ft\n", + "\n", + "h1 = p*144/gma # equivalent height of water surface in ft\n", + "\n", + "R = 4 # radius of gate in ft\n", + "\n", + "w = 1 # width of the gate in ft\n", + "\n", + "A = R*w\n", + "\n", + "y1 = h1 + 2.5 + 2 # center of pressure\n", + "\n", + "xv1 = 2 # center of pressure1 for x direction force\n", + "\n", + "xv2 = 1.7 # center of pressure2 for x direction force\n", + "\n", + "# Solution\n", + "\n", + "Fh = gma*A*y1 # hiorizontal force\n", + "\n", + "Ig = 5.33 # moment of inertia\n", + "\n", + "yh = y1 + (Ig/(A*y1)) # location of horizontal component\n", + "\n", + "y2 = h1+2.5\n", + "\n", + "Fv1 = gma*(R*y2) # vertical force component 1\n", + "\n", + "Fv2 = gma*(pi*R**2/4) # vrtical force component 2\n", + "\n", + "Fv = Fv1 + Fv2 # vertical force component\n", + "\n", + "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n", + "\n", + "print \"(a) Horizontal component acting on the plate = \",round(Fh,0),\"lbs\" # The answer for horizontal force in the book is wrong\n", + "\n", + "print \"(b) Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n", + "\n", + "print \"location of vertical component Xv =\",round(Xv,2),\"ft from the left wall\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.13 Page no 84" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Depth to which water would rise = 0.25 m\n" + ] + } + ], + "source": [ + "# Depth to which water would rise\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "l = 3 # length in m\n", + "\n", + "b = 4 # breadth in m\n", + "\n", + "h = 15 # height in m\n", + "\n", + "S = 0.9 # specific gravity of barge\n", + "\n", + "Sw = 1.09 # specific gravity of water\n", + "\n", + "Wd = 150*10**3 # addditional weight in kN\n", + "\n", + "V = l*b*h # volume in m**3\n", + "\n", + "Wb = gma*S*V # weight of barge\n", + "\n", + "Tw = Wb + Wd # total weight in kN\n", + "\n", + "gma = 9810 # specific density \n", + "\n", + "# Solution\n", + "\n", + "Fb = Tw # since barge is floating\n", + "\n", + "V1 = Fb/((gma/1000)*Sw) # volume in m**3\n", + "\n", + "\n", + "d = (V1/(h*b))/1000\n", + "\n", + "print \"Depth to which water would rise = \",round(d,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.14 Page no 85 " + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X = 3.12 cm\n", + "Y = 3.25 cm\n", + "The bottom of the solid cylinder will be 4.88 cm above the bottom\n" + ] + } + ], + "source": [ + "# Level at which cylinder will float\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "W = 0.4 * 9.81 # weight of the solid cylinder in N\n", + "\n", + "# Solution\n", + "\n", + "A = np.array([(1,-0.96),(1,1)])\n", + "\n", + "b = np.array([0,6.37])\n", + "\n", + "x = np.linalg.solve(A,b)\n", + "\n", + "X = x[0]\n", + "\n", + "Y = x[1]\n", + "\n", + "print \"X = \",round(X,2),\"cm\"\n", + "\n", + "print \"Y = \",round(Y,2),\"cm\"\n", + "\n", + "b = 8 -x[0]\n", + "\n", + "print \"The bottom of the solid cylinder will be \",round(b,2),\"cm above the bottom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.15 Page no 86" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight of the pan = 37.7 N\n", + "Magnitude of right momentum = 123.4 N.cm\n" + ] + } + ], + "source": [ + "# Weight of the pan and the magnitude of righting moment\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "l =100 # length of the pan in cm\n", + "\n", + "w = 20 # width of the pan in cm\n", + "\n", + "d = 4 # depth of the pan in cm\n", + "\n", + "L = 1.5 # load in N/m\n", + "\n", + "gma = 9810 # sepcific weight\n", + "\n", + "# Solution\n", + "\n", + "Fb = gma*(d*w*l/(2*l**3)) # weight on the pan\n", + "\n", + "W = Fb-L # weight of the pan\n", + "\n", + "X1 = w/3\n", + "\n", + "X2 = w/2\n", + "\n", + "theta = math.atan(d/w)*180/pi\n", + "\n", + "x = ((X2-X1)*cos(theta*pi/180))\n", + "\n", + "# momentum equation \n", + "\n", + "M = W*x\n", + "\n", + "print \"Weight of the pan =\",round(W,1),\"N\"\n", + "print \"Magnitude of right momentum = \",round(M,1),\"N.cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 2.16 Page no 90" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Metacentric height = 0.347 m\n", + "(b) Righting moment = 63.1 kN.m\n" + ] + } + ], + "source": [ + "# Metacentric height and rightning moment \n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Continued from example 2.15\n", + "\n", + "# Given\n", + "\n", + "Io = 15*4**3/12 # moment of inertia in m**4\n", + "\n", + "V = 15*4*2.71 # Volume in m**3\n", + "\n", + "Gb = ((3/2)-(2.71/2)) \n", + "\n", + "W = 1739.2 # weight of the barge from the previous example in kN\n", + "# Solution\n", + "\n", + "Mg = (Io/V)-Gb # metacentric height in m\n", + "\n", + "print \"(a) Metacentric height = \", round(Mg,3),\"m\"\n", + "\n", + "M = W*Mg*sin(pi*6/180)\n", + "\n", + "print \"(b) Righting moment =\",round(M,1),\"kN.m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 2.17 Page no 92" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amximum pressure occurs at the bottom of the tank = 24768.9 N\n" + ] + } + ], + "source": [ + "# Maximum pressure in the tank\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "l=6 # length of the tank\n", + "\n", + "w =2 # width of the tank\n", + "\n", + "d = 3 # depth of the tank\n", + "\n", + "a = 3 # acceleration in m/s**2\n", + "\n", + "theta = pi/6\n", + "\n", + "W = 9810 # specific weight\n", + "\n", + "X = 0\n", + "\n", + "po=0 # pressure at the origin\n", + "\n", + "# Solution\n", + "\n", + "A = np.array([(1,-1),(1,1)])\n", + "\n", + "b = np.array([-1.38,3.0])\n", + "\n", + "x = np.linalg.solve(A,b)\n", + "\n", + "Y1 = x[0]\n", + "\n", + "Y2 = x[1]\n", + "\n", + "# AMximum pressure at the bottom of the tank\n", + "\n", + "P = po - W*(2.61*X/9.81) - W*(1+(1.5/9.81))*(-Y2)\n", + "\n", + "print\"Amximum pressure occurs at the bottom of the tank =\",round(P,3),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.18 Page no 98" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Height of paraboliod revolution of base = 1.48 ft\n", + "(b) Maximum pressure corresponding to maximum height = 92.3 lbs/ft**2\n", + "(c) Pressure = 26.4 lbs/ft**2\n" + ] + } + ], + "source": [ + "# Height of the paraboloid revolution; maxm=imum pressure and location ; pressure at the point 0.2 from the center\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 1 # diamter of the jar in ft\n", + "\n", + "h =2 # height of the jar in ft\n", + "\n", + "H = 1 # height of water in the jar in ft\n", + "\n", + "N = 150 # RPM\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# Solution\n", + "\n", + "w = 2*pi*N/60\n", + "\n", + "ho = H+((w**2*(d/2)**2)/(4*g))\n", + "print \"(a) Height of paraboliod revolution of base = \", round(ho,2),\"ft\"\n", + "\n", + "Pmax = 62.4*ho\n", + "\n", + "print \"(b) Maximum pressure corresponding to maximum height = \",round(Pmax,1),\"lbs/ft**2\"\n", + "\n", + "z = H - ((w**2*(d/2)**2)/(4*g))\n", + "\n", + "r = 0.2 # distance from center\n", + "\n", + "y = -(0.52-0.25)\n", + "\n", + "P = po + (62.4*w**2*r**2/(2*g))-(62.4*y)\n", + "\n", + "print \"(c) Pressure =\",round(P,1),\"lbs/ft**2\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb new file mode 100755 index 00000000..fa74673c --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb @@ -0,0 +1,541 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 3: Fluid Kinematics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.1 Page no 117" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) u = 4*X; v = -4*Y \n", + "(b) u= 4.0 m/s and v= -8.0 m/s\n", + "(c) Magnitude of velocity = 8.94 m/s and angle of resultant velocity = -63.4 deg\n" + ] + } + ], + "source": [ + "# Dimension of flow field ; velocity components at (1,2) ; magnitude and direction of velocity \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# V = 4*Xi-4Yj\n", + "\n", + "x=1 # x co-ordinate\n", + "\n", + "y=2 # y co-ordinate\n", + "\n", + "# Solution\n", + "\n", + "print \"(a) u = 4*X; v = -4*Y \"\n", + "\n", + "u = 4*x\n", + "\n", + "v=- 4*y\n", + "\n", + "print \"(b) u=\",round(u,0),\"m/s and v=\",round(v,0),\"m/s\"\n", + "\n", + "R =sqrt(u**2+v**2)\n", + "\n", + "ang = atan(v/u)*180/pi\n", + "\n", + "print \"(c) Magnitude of velocity =\",round(R,2),\"m/s and angle of resultant velocity = \",round(ang,1),\"deg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.2 Page no 119" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Discharge = 1.06 m**3/s\n", + "(b) Mass flow rate = 1057.21 kg/s\n" + ] + } + ], + "source": [ + "# Discharge and mass flow rate\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.3 # diameter of pipe in m\n", + "\n", + "v = 15 # velocity in m/s\n", + "\n", + "rho = 997.1 # density in kg/m**3\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "# Solution\n", + "\n", + "Q=A*v\n", + "\n", + "print \"(a) Discharge =\",round(Q,2),\"m**3/s\"\n", + "\n", + "mdot = rho*Q\n", + "\n", + "print \"(b) Mass flow rate = \",round(mdot,2),\"kg/s\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.3 Page no 120 " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean velocity of the flow = 5.0 m/s\n" + ] + } + ], + "source": [ + "# Mean Velocity\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from scipy import integrate\n", + "\n", + "# Given\n", + "\n", + "Vo = 10 # velocity in m/s\n", + "\n", + "r1 = 0\n", + "\n", + "ro = 0.1 # radius in m\n", + "\n", + "N = 1\n", + "\n", + "# Solution\n", + "\n", + "R = lambda r: (10*r-1000*r**3)\n", + "\n", + "R1,err=integrate.quad(R,r1,ro)\n", + "\n", + "Q = R1*2*pi\n", + "\n", + "A = pi*(0.1)**2\n", + "\n", + "V = Q/A\n", + "\n", + "print \"Mean velocity of the flow =\",round(V,0),\"m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.4 Page no 126" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2*x - 2*y**2\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAETCAYAAAA8rh0/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAA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OGzZsiNjYWDx8+BAPHz6EpaUlwsLChL8Z9unTB35+fgCAO3fuIDMzE+bm5kIz1alTB2fP\nngUA+Pn5oV69enl/ky6uAH+Mr68vq1evHqtduzZbunRpUR76o86fP88UCgVr3Lgxs7e3Z/b29uz4\n8eOiY+UICAiQzCqaiIgI5ujoyBo1asT69u0rfBUNY4wtX76c2draMjs7OzZ8+PCcVQ9FzdXVlVWp\nUoWVKFGCWVpast9//529fv2adejQgdWtW5d16tSJxcfHC820ZcsWVqdOHVa9evWc3/WJEycKyWRo\naJjzOr3L2tq6yFfRfChTZmYmGzp0KLOzs2NNmjRh/v7+QjK9+/sUEhLCmjdvzho3bsxatmzJwsLC\n8nwerTcbI4QQIg3SWKJBCCFE66jAE0KInqICTwgheooKPCGE6Ckq8IQACAkJQePGjZGRkYGUlBTY\n2dkhMjJSdCxCCoVW0RDyj3nz5iE9PR1paWmwsrIq8g6ChGgbFXhC/pGVlQVHR0eULl0aQUFBkmot\nQEhB0BQNIf949eoVUlJSkJycjLS0NNFxCCk0GsET8o9evXrBzc0NDx48wLNnz7Bx40bRkQgpFK1v\n2UeIHO3YsQMlS5aEq6sr1Go1WrdujYCAACiVStHRCCkwGsETQoieojl4QgjRU1TgCSFET1GBJ4QQ\nPUUFnhBC9BQVeEII0VNU4AkhRE/9Py1qsfLmAYBpAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Sketch the stream lines in the first quadrant\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "import numpy as np\n", + "\n", + "from sympy import *\n", + "\n", + "#init_printing(use_unicode=False, warp_line=False, no_global=True)\n", + "\n", + "# Given\n", + "\n", + "# V = 4*y(m)i+2(m)j\n", + "\n", + "x = Symbol('x')\n", + "U = integrate(2,x)\n", + "\n", + "#print u\n", + "\n", + "y = Symbol('y')\n", + "\n", + "V = integrate(-4*y,y)\n", + "\n", + "#print V\n", + "\n", + "Zhi = U + V\n", + "\n", + "print Zhi # for x and y =0 we get C = 0\n", + "\n", + "X = [5,6,7,8,9,10,11,12,13,14,15,16,17]\n", + "Y = [0,1.414,2,2.449,2.828,3.16,3.46,3.741,4,4.242,4.472,4.69,4.898]\n", + "\n", + "b1=plt.plot(X,Y)\n", + "\n", + "\n", + "X1 = [2.5,3,4,5,6,7,8,9,10,11,12,13,14,15]\n", + "Y1 = [0,1,1.732,2.23,2.645,3,3.31,3.60,3.87,4.123,4.35889,4.5825,4.795,5]\n", + "\n", + "b2=plt.plot(X1,Y1)\n", + "\n", + "\n", + "X2 = [0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5,14.5,15.5]\n", + "Y2 = [0,1.414,2,2.449,2.828,3.162,3.462,3.741,4,4.242,4.472,4.69,4.898,5.099,5.29,5.4772]\n", + "\n", + "b3=plt.plot(X2,Y2)\n", + "\n", + "plt.xlabel(\"x\")\n", + "\n", + "plt.ylabel(\"y\")\n", + "\n", + "plt.title(\"Streamline plot\")\n", + "\n", + "plt.legend([\"zhi=10\",\"zhi=5\",\"zhi=1\"])\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.5 PAge no 127" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resutant velocity magnitude = 17.89 m/s\n", + "Angle = 63.4 deg with the X-axis in the 4th quadrant\n" + ] + } + ], + "source": [ + "# magnitude and direction of flow field\n", + "\n", + "from math import *\n", + "\n", + "from sympy import *\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "x = 2 # X co-ordinate\n", + "\n", + "Y = 4 # Y co-ordiante\n", + "\n", + "# Solution\n", + "y = Symbol('y')\n", + "\n", + "zhi = 4*x*y\n", + "\n", + "zhiprime = zhi.diff(y)\n", + "\n", + "u = zhiprime\n", + "\n", + "x = Symbol('x')\n", + "\n", + "zhi = 4*x*Y\n", + "\n", + "zhiprime = zhi.diff(x)\n", + "\n", + "v = zhiprime\n", + "\n", + "R=sqrt(u**2+v**2)\n", + "\n", + "theta = atan(v/u)*180/pi\n", + "\n", + "print \"Resutant velocity magnitude = \",round(R,2),\"m/s\"\n", + "\n", + "print \"Angle =\",round(theta,1),\"deg with the X-axis in the 4th quadrant\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.6 Page no 130" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Velocity = 5.1 m/s\n", + "(b) Convective acceleration = 0.46 m**2/s\n" + ] + } + ], + "source": [ + "# Determine velocity ; convective accleration\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from sympy import *\n", + "\n", + "import numpy as np\n", + "\n", + "from scipy import integrate\n", + "\n", + "# Given\n", + "\n", + "d1 = 0.09 # diameter in cm\n", + "\n", + "d2 = 0.025 # diameter in cm\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "mdot = 25 # mass flow rate in kg/s\n", + "\n", + "# Solution\n", + "\n", + "x = Symbol('x')\n", + "\n", + "A1 = pi*d1**2/4\n", + "\n", + "A2 = pi*d2**2/4\n", + "\n", + "AA = A1 - ((A1-A2)/40)*10 # from figure\n", + "\n", + "V = mdot/(rho*AA)\n", + "\n", + "print \"(a) Velocity =\",round(V,1),\"m/s\"\n", + "\n", + "AX = (A1 - ((A1-AA)/40)*x)\n", + "\n", + "v = 25*10**4/(rho*AX)\n", + "\n", + "vprime = v.diff(x)\n", + "\n", + "V1 = vprime\n", + "\n", + "# at x = 0.1 m we get dv/dx = 0..09\n", + "\n", + "VPrime = 0.09\n", + "\n", + "Acx = V*VPrime\n", + "\n", + "print \"(b) Convective acceleration =\",round(Acx,3),\"m**2/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.8 Page no 143 " + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "z = -25.0\n", + "Hence the flow is rotational\n" + ] + } + ], + "source": [ + "# Is the flow irrotational\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# w = (16y-12x)i +(12y-9x)j\n", + "\n", + "# Solution\n", + "\n", + "y = Symbol('y')\n", + "\n", + "U = 16*y-12*x\n", + "\n", + "zhiprime = U.diff(y)\n", + "\n", + "u = zhiprime\n", + "\n", + "\n", + "x = Symbol('x')\n", + "\n", + "V = 12*y-9*x\n", + "\n", + "zhiprime1 = V.diff(x)\n", + "\n", + "v = zhiprime1\n", + "\n", + "#Vx = -9 # differentiate V wrt x\n", + "\n", + "#Vx = -9 # differentiate V wrt x\n", + "#Uy = 16 # differentiate U wrt y\n", + "\n", + "z = v-u\n", + "\n", + "print \"z = \",round(z,0)\n", + "\n", + "print \"Hence the flow is rotational\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.10 Page no 148" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity at the larger cross section = 3.33 m/s\n" + ] + } + ], + "source": [ + "# Velocity in larger section\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d1 = 0.1 # diameter in m\n", + "\n", + "d2 = 0.3 # diameter in m\n", + "\n", + "V1 = 30 # velocity in m/s\n", + "\n", + "# Solution\n", + "\n", + "V2 = (d1**2/d2**2)*V1\n", + "\n", + "print \"Velocity at the larger cross section = \",round(V2,2),\"m/s\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb new file mode 100755 index 00000000..5a1c879b --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb @@ -0,0 +1,558 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 4 : Fluid Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.1 Page no 159" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in pressure in section 1 and 2 = 1157.0 kN/m**2\n" + ] + } + ], + "source": [ + "# Difference in pressure at top and bottom\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d1 = 0.1 # diameter in m\n", + "\n", + "d2 = 0.05 # diameter in m\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "A1 = pi*d1**2/4\n", + "\n", + "A2 = pi*d2**2/4\n", + "\n", + "gma =9810 # specific weight\n", + "\n", + "z= 6 # difference in the height\n", + "\n", + "g = 9.81\n", + "\n", + "# Solution\n", + "\n", + "V1 = Q/A1 # velocity at section 1\n", + "\n", + "V2 = Q/A2 # velocity at section 2\n", + "\n", + "dP = gma*((V2**2/(2*g))-(V1**2/(2*g))-z)/1000\n", + "\n", + "print \"Difference in pressure in section 1 and 2 = \",round(dP,1),\"kN/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.2 Page no 160" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Actual discharge = 2.0 l/s\n" + ] + } + ], + "source": [ + "# Actual discharge\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 2.5 # diameter in cm\n", + "\n", + "h =200 # head in cm\n", + "\n", + "Cd = 0.65 # coefficient of discharge\n", + "\n", + "A =pi*d**2/4\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2 \n", + "\n", + "# Solution\n", + "\n", + "Q = Cd*A*sqrt(2*g*h)/100\n", + "\n", + "print \"Actual discharge =\",round(Q,2),\"l/s\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.3 Page no 162" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge through the orifice = 2.69 m**3/s\n" + ] + } + ], + "source": [ + "# Discharge through the orifice\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "H1 = 3 # height in m\n", + "\n", + "H2 = 4 # height in m\n", + "\n", + "b = 0.5 # width in m\n", + "\n", + "Cd = 0.65 # co-efficient of discharge \n", + "\n", + "g = 9.81 # acceleration due to grvity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "q = lambda h: h**(1/2)\n", + " \n", + "Q,err = integrate.quad(q, H1, H2)\n", + "\n", + "Qt = Cd*b*sqrt(2*g)*Q\n", + "\n", + "print \"Discharge through the orifice =\",round(Qt,2),\"m**3/s\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.4 Page no 163" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Discharge = 1.95 m**3/s\n" + ] + } + ], + "source": [ + "# discharge through orifice\n", + " \n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "from __future__ import division\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "b = 1 # bredth of the tank\n", + "\n", + "d = 0.5 # depth of the tank\n", + "\n", + "h1 = 0.2 # height of the orifice in m\n", + "\n", + "Cd = 0.6 # coefficient of discharge\n", + "\n", + "H1 = 2 # height in m\n", + "\n", + "H2 = 2+h1 # height in m\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "A = 1*0.3 # area of submerged section in m**2\n", + "\n", + "# Solution\n", + "\n", + "q = lambda h: h**(1/2)\n", + " \n", + "Q,err = integrate.quad(q, H1, H2)\n", + "\n", + "Q1 = Cd*b*sqrt(2*g)*(Q) # Flow through area 1\n", + "\n", + "Q2 = Cd*sqrt(2*g*H2)*A\n", + "\n", + "Td = Q1+Q2\n", + "\n", + "print \"Total Discharge =\",round(Td,2),\"m**3/s\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.5 Page no 165" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Actual discharge = 0.000454 m**3/s\n" + ] + } + ], + "source": [ + "# Determine flow rate of water\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d1 = 2 # radius of pipe\n", + "\n", + "d2 = 1 # radius of throat\n", + "\n", + "D1 = 40\n", + "\n", + "D2 = 20\n", + "\n", + "A1 = pi*D1**2/4\n", + "\n", + "A2 = pi*D2**2/4\n", + "\n", + "Cd = 0.95\n", + "\n", + "# Solution\n", + "\n", + "V2 = sqrt(21582/0.9375)\n", + "\n", + "Q = 1.52*pi*(d1/100)**2/4\n", + "\n", + "Qa = Q*Cd\n", + "\n", + "print \"Actual discharge =\",round(Qa,6),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.6 Page no 166" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity at the dept of 1 ft = 5.67 ft/s\n" + ] + } + ], + "source": [ + "# Velocity of stream point at the point of insertion\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "dx = 0.5 # in ft\n", + "\n", + "K = 1 # constant\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# solution\n", + "\n", + "V = sqrt(2*g*dx)\n", + "\n", + "print \"velocity at the dept of 1 ft =\",round(V,2),\"ft/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 4.7 Page no 172" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge throught the system = 190.0 l/s\n" + ] + } + ], + "source": [ + "# Discharge throught the system\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "gma= 0.8 # specific weight\n", + "\n", + "V2 = 40 # velocity in m/s\n", + "\n", + "z1 =25 # height at point 1\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "d = 15 # diameter of the nozzle in cm\n", + "\n", + "# Solution\n", + "\n", + "V2 = sqrt(2*g*z1/4.25)\n", + "\n", + "A = pi*(d/100)**2/4\n", + "\n", + "Q = A*V2*1000\n", + "\n", + "print \"Discharge throught the system =\",round(Q,0),\"l/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.8 Page no 174" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power input = 32.5 kW\n" + ] + } + ], + "source": [ + "# Power input to the pump\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "# Given\n", + "\n", + "Eff = 0.8 # pump efficiency\n", + "\n", + "Hl = 30 # head loss in m\n", + "\n", + "D1 =6 # diameter in cm\n", + "\n", + "D2 = 2 # diameter in cm\n", + "\n", + "gma = 9810 # specific weight in N/m**3\n", + "\n", + "V2 = 40 # velocity in m/s\n", + "\n", + "P1 = -50 # pressure at point 1 in N/m**2\n", + "\n", + "z2 = 100 # height at point 2\n", + "\n", + "g = 9.8 # acceleration due to gravity in m/s**2\n", + "\n", + "z1 = 30 # height in m\n", + "\n", + "# Solution\n", + "\n", + "V1=(2/6)**2*V2\n", + "\n", + "Q = (pi*6**2/4)*V1*10**-4\n", + "\n", + "Hs = z2 + (V2**2/(2*g)) + z1 + (50/gma) -(V1**2/(2*g))\n", + "\n", + "P = gma*Q*Hs\n", + "\n", + "Pi = (P/Eff)/1000\n", + "\n", + "print \"Power input = \",round(Pi,1),\"kW\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.9 Page no 176" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elevation at height A = 492.39 m\n", + "Elevation at height B = 576.23 m\n" + ] + } + ], + "source": [ + "# Pressure head at A and B\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.2 # discharge in m**3/s\n", + "\n", + "d1 = 0.25 # diameter of the pipe in m\n", + "\n", + "A = pi*d1**2/4 # area of the pipe\n", + "\n", + "za = 480 # height in m\n", + "\n", + "z1 = 500 # height in m\n", + "\n", + "z3 = 550 # elevation in m\n", + "\n", + "gma =9810 # specific weight in N/m**2\n", + "\n", + "g =9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "V=Q/A # Velocity of in m/s\n", + "\n", + "Hl1 = (0.02*100*V**2/(0.25*2*9.81))\n", + "\n", + "# pressure head at A\n", + "\n", + "Pa =(z1-za-(V**2/(2*g))-Hl1)\n", + "\n", + "El = za+Pa\n", + "\n", + "print \"Elevation at height A =\",round(El,2),\"m\"\n", + "\n", + "# pressure head at B\n", + "\n", + "hs = z3 - z1 + (0.02*(500/0.25)*(V**2/(2*g))) \n", + "\n", + "El2 = El+hs\n", + "\n", + "print \"Elevation at height B =\",round(El2,2),\"m\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb new file mode 100755 index 00000000..f7f93457 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb @@ -0,0 +1,578 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 5 : Fluid Momentum" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.1 Page no 192" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resultant force on the elbow = 9800.58 N\n", + "Angle of resultant force = 34.8516 deg\n" + ] + } + ], + "source": [ + "# Resultant force on the elbow\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.3 # Water flow rate in m**3/s\n", + "\n", + "d1 = 0.3 # diameter at inlet in meters\n", + "\n", + "A1 = pi*d1**2/4 # inlet area in m**2\n", + "\n", + "d2 = 0.15 # diameter at outlet in m\n", + "\n", + "A2 = pi*d2**2/4 # area at outlet in m**2\n", + "\n", + "P1 = 175*10**3 # inlet pressure in kN/m**2\n", + "\n", + "P2 = 160*10**3 # Pressure at outlet in kN/m**2\n", + "\n", + "F1 = P1*A1 # Force at inlet\n", + "\n", + "F2 = P2*A2 # Force at outlet\n", + "\n", + "rho = 1000 # density of water in kg/m**3\n", + "\n", + "V1 = Q/A1 # inlet velocity in m/s\n", + "\n", + "V2 = Q/A2 # Velocity at outlet in m/s\n", + "\n", + "theta = 45*pi/180 # angle in deg\n", + "\n", + "# Soultion\n", + "\n", + "# Applying the X momentum equation we get\n", + "\n", + "Rx = F1 - F2*cos(theta)-rho*Q*(V2*cos(theta)-V1)\n", + "\n", + "# Applying the Y momentum equation\n", + "\n", + "Ry = F2*sin(theta)+rho*Q*(V2*sin(theta)-0)\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "print \"Resultant force on the elbow = \",round(R,2),\"N\"\n", + "\n", + "a = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Angle of resultant force = \",round(a,4),\"deg\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.2 Page no 194" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resultant force = 1232.0 lbs\n", + "Angle of resultant force = 59.2396 deg\n" + ] + } + ], + "source": [ + "# Force exerted by the jet on the vane\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "V1 = 80 # Velocity in ft/s\n", + "\n", + "A1 = 0.1 # area in ft**2\n", + "\n", + "g = 32.2 # Acceleration due to gravity in ft/s**2\n", + "\n", + "rho = 1.94 # density in lb/ft**3\n", + "\n", + "a = pi/3 # angle of pipe bend\n", + "\n", + "# Solution\n", + "\n", + "Q = A1*V1 # Total discharge in m**3\n", + "\n", + "# Applying bernoullis at point 1 and 2\n", + "\n", + "V2 = sqrt((2*g*V1**2/(2*32.2))-3*2*g)\n", + "\n", + "# Pressure at the end of the section are atmospheric and hence 0\n", + "\n", + "# momentum equation in X direction\n", + "\n", + "Rx = -(rho*Q*(V2*cos(a)-80))\n", + "\n", + "# momentum equation in Y direction\n", + "\n", + "Ry = (rho*Q*(V2*sin(a)-0))\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "print \"Resultant force = \",round(R,0),\"lbs\"\n", + "\n", + "ang = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Angle of resultant force = \",round(ang,4),\"deg\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 5.3 Page no 195 " + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resultant Force = 12489.0 N\n", + "Angle with horizontal = 69.2 deg with horizontal\n" + ] + } + ], + "source": [ + "# Force needed to hold the Y position \n", + "\n", + "# Given\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "Q1 = 0.5 # discharge from pipe 1 in m**3/s\n", + "\n", + "Q2 = 0.3 # discharge from pipe 2 in m**3/s\n", + "\n", + "Q3 = 0.2 # discharge from pipe 3 in m**3/s\n", + "\n", + "d1 = 0.45 # diameter of pipe 1 in m\n", + "\n", + "d2 = 0.3 # diameter of pipe 2 in m\n", + "\n", + "d3 = 0.15 # diameter of pipe 3 in m\n", + "\n", + "A1 = pi*d1**2/4 # area in m**2\n", + "\n", + "A2 = pi*d2**2/4 # area in m**2\n", + "\n", + "A3 = pi*d3**2/4 # area in m**2\n", + "\n", + "P1 = 60*10**3 # Pressure at point 1 in kPa\n", + "\n", + "gma = 9810\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "# Solution\n", + "\n", + "V1 = Q1/A1\n", + "\n", + "V2 = Q2/A2\n", + "\n", + "V3 = Q3/A3\n", + "\n", + "P2 = gma*((P1/gma) + V1**2/(2*g) - V2**2/(2*g))\n", + "\n", + "P3 = gma*((P1/gma) + V1**2/(2*g) - V3**2/(2*g))\n", + "\n", + "F1 = P1*A1\n", + "\n", + "F2 = P2*A2\n", + "\n", + "F3 = P3*A3\n", + "\n", + "Rx = rho*(Q2*V2*cos(pi/6)-Q3*V3*cos(pi/9)-0)+F3*cos(pi/9)-F2*cos(pi/6)\n", + "\n", + "Ry = rho*((Q2*V2*sin(pi/6)+Q3*V3*sin(pi/9)-Q1*V1))+F3*sin(pi/9)-F2*sin(pi/6)-F1\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "a = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Resultant Force = \",round(R,0),\"N\"\n", + "\n", + "print \"Angle with horizontal = \",round(a,1),\"deg with horizontal\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.4 Page no 199" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Normal force on the plate = 423.0 lbs\n" + ] + } + ], + "source": [ + "# Normal force on the plate\n", + "\n", + "# Given\n", + "from math import *\n", + "\n", + "d = 2 # diameter in inches\n", + "\n", + "A = pi*d**2/(4*144) # Area of jet\n", + "\n", + "V = 100 # velocity of jet in ft/s\n", + "\n", + "Q = A*V # dischargge in ft**3/s\n", + "\n", + "gma = 62.4 # mass\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# Solution\n", + "\n", + "Rx = (gma*Q*V)/g # horizontal force required to keep plate in position\n", + "\n", + "print \"Normal force on the plate = \",round(Rx,0),\"lbs\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.5 Page no 202" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force on the plate = 331.34 N\n", + "Work done per second = 3313.4 N.m/s\n", + "Efficiency = 44.4 %\n" + ] + } + ], + "source": [ + "# Force on the plate ; work doen per second; efficiency\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "D = 0.075 # diameter in m\n", + "\n", + "A =pi*D**2/4 # area of jet\n", + "\n", + "V =15 # velocity of jet in m/s\n", + "\n", + "w = 9810 # specific weight\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s^2\n", + "\n", + "# Solution\n", + "\n", + "Q =A*V # Discharge in m**3/s\n", + "\n", + "Vp = 10 # velocity of plate in m/s\n", + "\n", + "Rx = w*Q*(V-Vp)/g # force in X direction\n", + "\n", + "print \"Force on the plate = \",round(Rx,2),\"N\"\n", + "\n", + "W = Rx*Vp\n", + "\n", + "print \"Work done per second = \",round(W,1),\"N.m/s\"\n", + "\n", + "Eff = 2*(V-Vp)*Vp/V**2\n", + "\n", + "E = 100*Eff\n", + "\n", + "print \"Efficiency = \",round(E,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.6 Page no 204" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force exerted in X direction = 273.8 lbs\n", + "Force exerted in Y direction = 0.0 lbs\n" + ] + } + ], + "source": [ + "# Force exerted on the plate\n", + "\n", + "# Given\n", + "from math import *\n", + "\n", + "d = 3 # diameter in inches\n", + "\n", + "A = pi*d**2/(4*144) # Area of jet\n", + "\n", + "Q = 2 # discharge in ft**3/s\n", + "\n", + "rho = 1.94 # density in lbs/ft**3\n", + "\n", + "# Solution\n", + "\n", + "V = Q/A # velocity in ft/s\n", + "\n", + "alpha = pi/6 # inlet vane angle\n", + "\n", + "bta = pi/6 # outlet vane angle\n", + "\n", + "Rx = rho*Q*(V*cos(bta)+V*cos(alpha)) # force in X direction\n", + "\n", + "Ry = rho*Q*(V*sin(bta)-V*sin(alpha)) # force in Y direction\n", + "\n", + "print \"Force exerted in X direction = \",round(Rx,1),\"lbs\"\n", + "\n", + "print \"Force exerted in Y direction = \",round(Ry,1),\"lbs\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.7 Page no 207" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\n", + "b ) Work done per N of fluid per second = 80.31 N.m\n", + "c ) Efficiency = 98.4 %\n" + ] + } + ], + "source": [ + "# Angle of blade tips at inlet and exit ; work done on the vane; efficiency of the vane\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "V1 =40 # velocity in m/s\n", + "\n", + "Vp = 20 # velocity of the plate in m/s\n", + "\n", + "alpha = pi/6 # inlet vane angle\n", + "\n", + "bta = pi/9 # outlet vane angle\n", + "\n", + "g = 9.81\n", + "\n", + "# Solution\n", + "\n", + "V1x = V1*cos(alpha)\n", + "\n", + "Vw1 = V1x;\n", + "\n", + "V1y = V1*sin(alpha)\n", + "\n", + "dV = V1x - Vp\n", + "\n", + "theta = atan(V1y/dV)*180/pi\n", + "\n", + "Vr1 = V1y/sin(theta*pi/180)\n", + "\n", + "Vr2 = Vr1\n", + "\n", + "# from trial and error we get the blade tip angle at inlet and outlet\n", + "\n", + "print \"a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\"\n", + "\n", + "phi = 4*pi/180 \n", + "\n", + "V2 = Vr2*sin(phi)/sin(bta)\n", + "\n", + "V2w = V2*cos(bta)\n", + "\n", + "W = (V2w+V1x)*Vp/g\n", + "\n", + "print \"b ) Work done per N of fluid per second = \",round(W,2),\"N.m\"\n", + "\n", + "Eff = (1 - (V2/V1)**2)*100\n", + "\n", + "print \"c ) Efficiency = \",round(Eff,2),\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.8 Page no 211" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a - Thrust on the plane = 5372.2 lbs\n", + "b - Theoretical efficiency = 76.0 %\n", + "c - Theoretical horsepower required = 4560.0 hp\n", + "d - Pressure difference across blades = 190.0 lbs/ft**3\n" + ] + } + ], + "source": [ + "# Thrust on the plane; propeller efficiency ; theoretical horsepower ; pressure difference acros the blades\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "v = 220 # velocity in ft/s\n", + "\n", + "d = 6 # diameter of the propeller\n", + "\n", + "Q = 12000 # discharge in ft**3/s\n", + "\n", + "mf = 0.0022 # mass flow rate in slugs/ft**3\n", + "\n", + "# Solution\n", + "\n", + "V1 = v*5280/3600 # velocity in ft/s\n", + "\n", + "V = Q/(pi*d**2/4) # velocity in ft/s\n", + "\n", + "V4 = 2*V-V1\n", + "\n", + "F = mf*Q*(V4-V1) # thrust on the plane\n", + "\n", + "print \"a - Thrust on the plane = \",round(F,1),\"lbs\"\n", + "\n", + "Eff = V1/V # efficiency \n", + "\n", + "E = Eff*100\n", + "\n", + "print \"b - Theoretical efficiency = \",round(E,0),\"%\"\n", + "\n", + "Thp = F*V1/(500*Eff)\n", + "\n", + "print \"c - Theoretical horsepower required = \",round(Thp,0),\"hp\"\n", + "\n", + "dP = mf*(V4**2-V1**2)/2\n", + "\n", + "print \"d - Pressure difference across blades = \",round(dP,2),\"lbs/ft**3\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb new file mode 100755 index 00000000..3cff1efa --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 6 : Dimensional Analysis and Dynamic Similitude" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.2 Page no 233" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence the model should be tested at a velocity of 2.7 m/s. This velocity in the model is called corresponding velocity\n" + ] + } + ], + "source": [ + "# Velocity of the flow\n", + "\n", + "# Given\n", + "\n", + "L = 10 # length scale lp/l\n", + "\n", + "# crue oil at 20 deg C\n", + "\n", + "rhop = 0.86*998.2 # density inn kg/m**3\n", + "\n", + "mup = 8*10**-3 # viscosity in Ns/m**2\n", + "\n", + "Vp = 2.5 # Velocity in m/s\n", + "\n", + "# water at 20 deg C\n", + "\n", + "rhom = 998.2 # density in kg/m**3\n", + "\n", + "mum = 1.005*10**-3 # viscosity in Ns/m**2\n", + "\n", + "# Solution\n", + "\n", + "Vm = Vp*L*(rhop/rhom)*(mum/mup) # velocity in m/s\n", + "\n", + "print \"Hence the model should be tested at a velocity of \",round(Vm,2),\"m/s. This velocity in the model is called corresponding velocity\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.3 Page no 233" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum discharge, Qm = 5.65685425 cfs\n", + "Maximum head over crest = 4.74 ft\n" + ] + } + ], + "source": [ + "# Mximum head on the crest and corresponding discharge for dynamically similar conditions\n", + "\n", + "# Given\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "l = 300 # length in ft\n", + "\n", + "Q = 100000 # discharge in cfs\n", + "\n", + "Cd = 3.8 # coefficient of discharge\n", + "\n", + "L = (1/50) # length scale\n", + "\n", + "# Solution\n", + "\n", + "Qm = 100000*(L)**(5/2) # model discharge in cfs\n", + "\n", + "print \"Maximum discharge, Qm = \",round(Qm,8),\"cfs\"\n", + "\n", + "H = (Q/(Cd*l))**(2/3) # height over spill way\n", + "\n", + "h = H*L*12 # head over spill model\n", + "\n", + "print \"Maximum head over crest = \",round(h,2),\"ft\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb new file mode 100755 index 00000000..a8fa6c1f --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb @@ -0,0 +1,428 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 7 : Fluid Resistance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.1 Page no 245" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reynolds number for water = 7463.0\n", + "R > 2000 the flow is turbulent for water\n", + "\n", + "\n", + "Reynolds number for glycerine = 8.7\n", + "R < 2000 the flow is laminar for glycerine\n" + ] + } + ], + "source": [ + "# Is the flow laminar or turbulent\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "nu1 = 0.804*10**-6 # viscosity in m**2/s\n", + "\n", + "V = 0.3 # velocity in m/s\n", + "\n", + "D = 0.02 # diameter in m/s\n", + "\n", + "# for water \n", + "\n", + "rho = 995.7 # density in kg/m**3\n", + "\n", + "# for gylcerine\n", + "\n", + "mu = 8620*10**-4 # viscosity in Ns/m**2\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "nu2 = mu/(S*rho) # viscosity of glycerine in Ns/m**2\n", + "\n", + "# Solution\n", + "\n", + "R1 = V*D/nu1\n", + "\n", + "print \"Reynolds number for water =\",round(R1,0)\n", + "\n", + "print \"R > 2000 the flow is turbulent for water\"\n", + "\n", + "print \"\\n\"\n", + "R2 = V*D/nu2\n", + "\n", + "print \"Reynolds number for glycerine =\",round(R2,1)\n", + "\n", + "print \"R < 2000 the flow is laminar for glycerine\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.2 Page no 248" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.7/y\n", + "Turbulence constant = 0.46\n", + "Mixing length = 13.8 cm\n", + "Eddy viscosity = 44.1 Nm/s**2\n" + ] + } + ], + "source": [ + "# Eddy Viscosity; mixing length ; turbulence constant\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from scipy import *\n", + "\n", + "import numpy as np\n", + "\n", + "from sympy import *\n", + "\n", + "y = Symbol('y')\n", + "\n", + "d = 0.0175 # diameter in m\n", + "\n", + "s = 0.3 # shear stress at a distance in m\n", + "\n", + "tau = 103 # shear stress in Pa\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "#y = 0.3\n", + "\n", + "# solution\n", + "\n", + "Up = diff(8.5+0.7*log(y),y)\n", + "\n", + "print Up\n", + "\n", + "Up = (0.7/0.3) # for y = 0.3\n", + "\n", + "k = sqrt(tau/(rho*s**2*Up**2))\n", + "\n", + "print \"Turbulence constant = \",round(k,2)\n", + "\n", + "Ml = k*s*100 # mixing length\n", + "\n", + "print \"Mixing length = \",round(Ml,1),\"cm\"\n", + "\n", + "Eta = rho*(Ml/100)**2*Up\n", + "\n", + "print \"Eddy viscosity =\",round(Eta,1),\"Nm/s**2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.3 Page no 256" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEICAYAAABS0fM3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4jOfeB/DvIFQkJIKIpUlatWQjEdI6lvHaKY21cQ6i\nHMfh7eoQVRzROkRRb9HFabXoYqmtWpU6WhN7I5EQseS0miAmSCUkksgyz/vHTWTImGQyzzyzfD/X\nNZfMZPI8v5lr3L957uV3qyRJkkBERA6rltIBEBGRspgIiIgcHBMBEZGDYyIgInJwTARERA6OiYCI\nyMHJlgiKiooQFhaGTp06wc/PD3PmzAEAREdHo1WrVggODkZwcDBiY2PlCoGIiKpAJec6goKCAjg7\nO6O0tBTdu3fH8uXL8dNPP8HV1RUzZsyQ67RERFQNsnYNOTs7AwCKi4tRVlYGd3d3AADXsBERWRFJ\nRmVlZVLHjh0lFxcXadasWZIkSVJ0dLTk7e0tBQUFSZMmTZJycnL0/gYAb7zxxhtvJtxMJesVQa1a\ntZCcnIwrV67g4MGD0Gg0mDZtGn7//XckJyfDy8sL//jHPx75O0mSeDPTbcGCBYrHYE83vp98P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Hi\n4vLI76vzGVXsiqAq6wkefs6VK1fQsmVLi8VoK6ryXrq6usLZ2RmAGKwvKSnBzZs3LRqnveDn0rz4\n2ay+kpISjBw5EuPGjUN4ePgjv6/uZ1SxRFCV9QTDhg3Dxo0bAQDHjx+Hm5sbPD09lQjXqlXlvbx2\n7Vr5N4T4+HhIkoTGjRsrEa7N4+fSvPjZrB5JkjB58mT4+fnh9ddfr/Q51f2MKtY1ZGg9wdq1awEA\nU6dOxeDBg/HDDz+gTZs2aNCgAT7//HOlwrVqVXkvt23bho8++gh16tSBs7MzNm/erHDU1mvs2LGI\ni4tDdnY2WrdujYULF6KkpAQAP5emMPZ+8rNZPUeOHMGXX36JoKAgBAcHAwAWL16MS5cuATDtM2p1\nW1USEZFlWfcOZUREJDsmAiIiB8dEQETk4JgIiIgcHBMBURWcOHECHTt2xN27d3Hnzh0EBARwBSzZ\nDc4aIqqi+fPno6ioCIWFhWjdujVmz56tdEhEZsFEQFRFJSUlCA0NRf369XHs2DGWlSC7wa4hoirK\nzs7GnTt3kJ+fj8LCQqXDITIbXhEQVdGwYcPw5z//GRcvXoRWq8Xq1auVDonILBQrMUFkSzZu3Ih6\n9eohIiICOp0O3bp1g0ajgVqtVjo0ohrjFQERkYPjGAERkYNjIiAicnBMBEREDo6JgIjIwTEREBE5\nOCYCIiIH9/84dLhcBD/ZrQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# PLot boundary layer distribution and total drag on the plate\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from pylab import plt\n", + "\n", + "from numpy import *\n", + "\n", + "from scipy import *\n", + "\n", + "from sympy import *\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "# Given\n", + "\n", + "# for glycerine\n", + "\n", + "S = 1.26 # specific gravity \n", + "\n", + "mu = 0.862 # dynamic viscosity in Ns/m**2\n", + "\n", + "rho = S *1000 # density in kg/m**3\n", + "\n", + "K2 = 0.332\n", + "\n", + "V=1 # velocity in m/s\n", + "\n", + "# Solution\n", + "\n", + "# from blasius equation\n", + "\n", + "x = [0,0.1,0.5,1.0,2.0];\n", + "\n", + "d = 0.1307*np.sqrt(x)*100\n", + "\n", + "tauo = K2*rho*V**2/(sqrt(1462)*np.sqrt(x))\n", + "\n", + "#plt.figure()\n", + "plt.plot(x, d, 'r')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm),tauo(N/m**2)')\n", + "#plt.title('delta v/s x')\n", + "#plt.legend('d')\n", + "\n", + "plt.plot(x, tauo, 'b')\n", + "plt.xlabel('x')\n", + "#plt.ylabel('tauo(N/m**2)')\n", + "#plt.title('tauo v/s x(m)')\n", + "plt.legend('d''t')\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.4 page no 260" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEXCAYAAACpuuMDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVVX+x/E3ApV4xUuNAkUJAd5RsLA0HFMTlSzK0MnU\nMYeanElrsotNYaOmpU5jNqX9SjNH1OkipoKFxWRewNRRR0vxgiFpimJeSLm4f3/sPIqoHJDNOZzz\neT0Pz8PmbPb5nv3o/rDW3mstD8MwDERERH5Vy9EFiIiIc1EwiIhIKQoGEREpRcEgIiKlKBhERKQU\nBYOIiJSiYBCXNHToUP7617/atW9gYCArV660uCKRmkPBIC7Jw8MDDw+PCu+bmJjI4MGDrSyNV199\nlbFjx1r6HiJXQ8EgLstZx24uX76cPn36OLoMkctSMIhL2LRpEx06dKB+/frEx8dz+vTpUq8vXbqU\n9u3b4+vryx133MHWrVvLHCM1NZVXX32VhQsXUq9ePcLDwwGYPXs2LVu2pH79+rRo0YJZs2Zdso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WczUsvvURERAS1a9fmzTffJDMzk2bN\nmtle9/DwoFu3btSpU4c6derQsGFD+vXrB0CbNm3YsmWLbd/mzZuTnZ1d3R9BpNIUDCKXkJeXx6lT\npygpKeGXX34Bys5See2119q+r1Wrlm27Vq1aFBcX214zDMMlZwIW16WuJJFLSEhIYPz48QwaNIhn\nn32WwMBADh48aHv9SjPJXPzagQMHCAwMtKpUkSqnFoPIRebOncu1115LfHw8Z8+epXPnzmzfvp3i\n4mIKCgrw8fHBw8OjVCvg4u8v3N60aRPTp0+v1s8gcjU0iZ6InRITEwkLC+Ohhx6y+3d27tzJX/7y\nF5YsWWJhZSJVS11JInZ64okn+OCDDyr0O++88w5jxoyxqCIRa6jFICIipajFICIipSgYRESkFAWD\niIiUomAQEZFSFAwiIlKKgkFEREr5f1iGZ/dHpXkqAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEXCAYAAACgUUN5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdYFNf+BvB3KQFBMICKiCjYoihVihrL2g2WoCYWropR\nFNSoUWNM4o0hiS3XFkuMUSNqYsmNFQEbwVWsgAIqqCQqVhQRUGlSdn5/eN2fRBAEdoZl38/z8Dy7\nO7MzL8d1v5wzM2dkgiAIICIiraUjdQAiIpIWCwERkZZjISAi0nIsBEREWo6FgIhIy7EQEBFpORYC\nqhHGjBmDr776qlzr2tra4s8//1RzIiLNwUJANYJMJoNMJnvjdQMDAzFq1Ch1RsPChQsxZ84cte6D\nqDJYCKjGqK7XRoaFhaFfv35SxyAqFQsBaaTY2Fi4urrC1NQUw4cPR15eXrHlISEhcHZ2hpmZGd59\n911cvHjxlW0cPHgQCxcuxO+//w4TExO4uLgAAIKCgmBvbw9TU1M0a9YM69atKzHDs2fP8PbbbyMh\nIUH12sOHD2FkZIS0tDQ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aBAAoLCwEP/617/Qu3fvSreTpJPOERGR9HiHMiIiLcdCQESk5VgIiIi0HAsBEZGWYyEgKkVq\nair69ev3Ru+ZMWMGIiMj1ZSISD1YCIhKsXr1aowZM+aN3jNx4kQsXrxYPYGI1ISFgLRedHQ0nJyc\n8OzZM2RnZ6Nt27ZISEjAzp07VT2CTZs2wdvbG71794adnR1Wr16NJUuWwNXVFR06dEBGRgYAoEWL\nFkhOTkZmZqaUvxLRG2EhIK3n7u6OgQMH4t///jdmz56NUaNGoW7dutDV1VVNHwAACQkJ2LNnD6Kj\nozFnzhyYmpri/Pnz6NChA7Zs2aJaz8XFBadPn5biVyGqEMluXk9UncydOxdubm6oVasWVq1ahaio\nKNWcLsDzq0q7desGY2NjGBsb4+2331bdqMTBwQEXLlxQrduwYUMkJyeL/SsQVRgLARGAtLQ0ZGdn\no6ioCLm5uQBencHRwMBA9VhHR0f1XEdHB4WFhaplgiBIPist0Zvg0BARns/RMm/ePPj4+GD27Nmw\ntbXF/fv3VctfNxPLP5elpKTA1tZWXVGJqhx7BKT1tmzZAgMDAwwfPhxKpRIdO3ZEYmIiCgsLkZOT\nAyMjI8hksmJ/5f/z8cvPY2NjS72PM1F1xEnniEoRGBiI1q1bY9iwYeV+T1JSEj799FMEBwerMRlR\n1eLQEFEpJk+ejM2bN7/Re9auXYvPPvtMTYmI1IM9AiIiLcceARGRlmMhICLSciwERERajoWAiEjL\nsRAQEWk5FgIiIi33f5w+Vkc37U5LAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Drag = 0.595 N\n" + ] + } + ], + "source": [ + "# Sketch the boundary layer and drag on the plate\n", + "\n", + "import numpy as np\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from numpy import sqrt\n", + "\n", + "# Given\n", + "\n", + "rho = 1.197 # air density in kg/m**3\n", + "\n", + "mu = 18.22*10**-6 # viscosity in Ns/m**2\n", + "\n", + "l = 5 # length of the plate\n", + "\n", + "V = 8 # velocity in m/s\n", + "\n", + "Rec = 5*10**5 # crictical reynolds number\n", + "\n", + "l1 = 0.951 # length from 0 to 0.951\n", + "\n", + "l2 = 5.0 # length from 0 to 5\n", + "\n", + "l3 = 0.951 # length from 0 to 0.951\n", + "\n", + "# Solution\n", + "\n", + "X = Rec/525576\n", + "\n", + "x = [0,0.1,0.3,0.6,0.951];\n", + "\n", + "d = 0.0069*np.sqrt(x)*100\n", + "\n", + "plt.figure()\n", + "plt.plot(x, d, 'r')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm)')\n", + "plt.title('delta v/s x')\n", + "plt.legend('L')\n", + "plt.show()\n", + "\n", + "X1 = [0.951,1.5,2.0,2.5,3.0,4.0,5.0]\n", + "\n", + "Dt = 0.0265*np.power(X1,(4/5))*100\n", + "\n", + "plt.figure()\n", + "plt.plot(X1, Dt, 'g')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm)')\n", + "plt.title('delta v/s x')\n", + "plt.legend('T')\n", + "plt.show()\n", + "\n", + "Td = 0.664*sqrt(mu*rho*V**3*l1)+0.036*rho*V**2*l2*(mu/(rho*V*l2))**0.2-0.036*rho*V**2*l3*(mu/(rho*V*l3))**0.2\n", + "\n", + "print \"Total Drag = \",round(Td,3),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.5 Page no 270" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drag on the sphere = 0.0043 N\n" + ] + } + ], + "source": [ + "# Determine drag on the sphere\n", + "\n", + "from math import *\n", + "\n", + "from pylab import plt\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.01 # doameter of sphere in m\n", + "\n", + "v = 0.05 # velocity in m/s\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "mu = 0.826 # kinematic viscosity in Ns/m**2\n", + "\n", + "rho = S*1000 # density\n", + "\n", + "# Solution\n", + "\n", + "R = rho*v*d/mu\n", + "\n", + "# for the above rho\n", + "\n", + "Cd = 35\n", + "\n", + "Fd = 0.5*Cd*rho*v**2*pi*d**2/4\n", + "\n", + "print \"Drag on the sphere = \",round(Fd,4),\"N\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb new file mode 100755 index 00000000..f81b0b54 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb @@ -0,0 +1,396 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 8 : Laminar Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.1 Page no 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Maximum shear stress = 1.232 N/m**2\n", + "(b) Maximum velocity = 0.645 m/s\n", + "(c) Discharge = 4.1e-06 m**3/s\n", + "Reynolds number = 547.0 is less than 2000, the flow is laminar and the calculations are valid\n" + ] + } + ], + "source": [ + "# Determine maximum velocity and shear stress\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "P1 = 200 # Pressure at inlet in kPa\n", + "\n", + "P2 = 260 # Pressure at outlet in kPa\n", + "\n", + "d = 0.004 # diameter in m\n", + "\n", + "L = 8 # length of pipe in meters\n", + "\n", + "z = 6 # height of the pipe from the ground\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# properties of kerosene\n", + "\n", + "mu = 19.1*10**-4 # viscosity of kerosene at 20 deg C\n", + "\n", + "S = 0.81 # specific gravity of kerosene\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "# Solution\n", + "\n", + "# calculating direction of flow\n", + "\n", + "p1 = (P1+g*z*S)*1000 # point 1\n", + "\n", + "p2 = (P2)*1000 # point 2\n", + "\n", + "# direction of flow is from point 1-2\n", + "\n", + "# shear stress\n", + "\n", + "Sp = -((p1-p2)/sqrt(L**2+z**2))\n", + "\n", + "r = d/2\n", + "\n", + "Tau_max = r*Sp/2\n", + "\n", + "print \"(a) Maximum shear stress =\",round(Tau_max,3),\"N/m**2\"\n", + "\n", + "# maximum velocity\n", + "\n", + "Vmax = r**2*Sp/(4*mu)\n", + "\n", + "print \"(b) Maximum velocity =\",round(Vmax,3),\"m/s\"\n", + "\n", + "# discharge\n", + "\n", + "Q = pi*r**4*Sp/(8*mu)\n", + "\n", + "print \"(c) Discharge = \",round(Q,7),\"m**3/s\"\n", + "\n", + "# calculate reynolds number\n", + "\n", + "V = Vmax/2\n", + "\n", + "R = rho*V*d*S/mu\n", + "\n", + "print \"Reynolds number =\",round(R,0),\"is less than 2000, the flow is laminar and the calculations are valid\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 8.2 Page no 289" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R = 1299.0 is lesss than 2000 , the flow is laminar\n", + "Head loss = 3.77 cm of water\n" + ] + } + ], + "source": [ + "# Determine the head loss\n", + "\n", + "# Given\n", + "\n", + "d = 0.02 # diameter of the pipe in m\n", + "\n", + "l = 30 # length of the pipe in m\n", + "\n", + "v = 0.1 # velocity in m/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# for water at 5 deg C\n", + "\n", + "nu = 1.54*10**-6 # kinematic viscosity of water in m**2/s\n", + "\n", + "# Solution\n", + "\n", + "R = v*d/nu\n", + "\n", + "print \"R = \",round(R,0),\"is lesss than 2000 , the flow is laminar\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = f*l*v**2/(2*g*d) # head loss due to friction\n", + "\n", + "H=Hf*100\n", + "\n", + "print \"Head loss = \",round(H,2),\"cm of water\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.3 Page no 290" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R = 40.07 is less than 2000 and hence flow is laminar\n", + "Horse power required to pump the oil = 10.6\n" + ] + } + ], + "source": [ + "# Horsepower required to pump 50 tons of oil\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "# oil properties\n", + "\n", + "S = 0.92 # specific gravity\n", + "\n", + "gma = S*62.4 # density in lbs/ft**3\n", + "\n", + "nu=0.0205 # viscosity in ft**2/s\n", + "\n", + "W = 50 # weight of oil\n", + "\n", + "d = 9 # diameter of the pipe in inches\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# Solution\n", + "\n", + "Q = W*2000/(gma*3600) # discharge in ft**3/s\n", + "\n", + "A = pi*d**2/(4*144) # area of pipe\n", + "\n", + "V = Q*1000/(A) # velocity in ft/s\n", + "\n", + "R = V*0.75/(nu*1000) # Reynolds number\n", + "\n", + "print \"R =\",round(R,2),\"is less than 2000 and hence flow is laminar\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = (f*5280*(V/1000)**2)/(2*g*0.75)\n", + "\n", + "Hp = gma*Q*Hf/(550)\n", + "\n", + "print \"Horse power required to pump the oil = \",round(Hp,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.4 Page no 291" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Viscosity of the liquid = 0.0182 poise\n" + ] + } + ], + "source": [ + "# Viscosity of the liquid in poise\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "V = 50 # Volume in m**3\n", + "\n", + "d = 5 # diameter in m\n", + "\n", + "d1 = 0.1 # diameter of bore\n", + "\n", + "l = 10 # length of the tube\n", + "\n", + "t = 20*60 # time in seconds\n", + "\n", + "rho = 0.88 # density in g/cm**3\n", + "\n", + "H1 = 5 # height from the base in m\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "a = pi*d1**2/4\n", + "\n", + "# Solution\n", + "\n", + "# From derivation we obtain a equation for T\n", + "\n", + "H2 = H1-(V/A)\n", + "\n", + "mu = t*rho*a*(0.1)*98.1/(32*A*10*log(H1/H2))\n", + "\n", + "print \"Viscosity of the liquid =\",round(mu,4),\"poise\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.5 Page no 297" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge q = 0.013 per unit ft of the plate\n", + "Shear stress on the plate = 0.086 lbs/ft**2 and resisting the motion of the plate\n" + ] + } + ], + "source": [ + "# Velocity distribution; Discharge ; shear on the upper plate\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "# properties of kerosene oil at 20 deg C\n", + "\n", + "S = 0.81 # specific gravity of oil\n", + "\n", + "mu = 4*10**-5 # viscosity of oil in lb.s/ft**2\n", + "\n", + "gma = 62.4*S # density in lbs/ft**3\n", + "\n", + "p1 = 6.51 # pressure at point 1 in psia\n", + "\n", + "p2 = 8 # pressure at point 2 in psia\n", + "\n", + "h = 0.006 # distance between the plate in ft\n", + "\n", + "l = 4 # length of the plate in ft\n", + "\n", + "theta = pi/6 # angle of inclination\n", + "\n", + "# Solution\n", + "\n", + "# point 1\n", + "\n", + "P1 = p1*144 + gma*l*sin(theta)\n", + "\n", + "# point 2\n", + "\n", + "P2 = p2*144\n", + "\n", + "# flow is taking from poont 2-1\n", + "\n", + "Sp = (P2-P1)/4\n", + "\n", + "# equation for u = 2154.75*y-359125*y**2\n", + "\n", + "y = h\n", + "\n", + "# discharge per ft width\n", + "\n", + "q = (2154.75*y**2/2) - (359125*y**3/3)\n", + "\n", + "print \"Discharge q = \",round(q,3),\"per unit ft of the plate\"\n", + "\n", + "# to find shear at the top of the plate take du/dy = 0\n", + "\n", + "dV = 2154.75 - 718250*h\n", + "\n", + "# shear stress\n", + "\n", + "T = -mu*dV\n", + "\n", + "print \"Shear stress on the plate = \",round(T,3),\"lbs/ft**2 and resisting the motion of the plate\"\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb new file mode 100755 index 00000000..279e480a --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb @@ -0,0 +1,847 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 9 : Turbulent flow in Pipes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.1 Page no 308" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It is a laminar flow\n", + "(a) Head loss due to flow for glycerine = 17.1 m \n", + "The flow is turbulent\n", + "(a) Head loss due to flow for water = 5.42 m \n" + ] + } + ], + "source": [ + "# Determine Head loss\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "mu = 0.826 # kinematic viscosity in Ns/m**2\n", + "\n", + "# for water\n", + "\n", + "rho = 998 # density of water in kg/m**3\n", + "\n", + "mu1 = 1.005*10**-3 # viscosity in Ns/m**2\n", + "\n", + "# for glycerine\n", + "\n", + "rho1 = S*rho # density of glycerine in kg/m**3\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "d1 = 0.2 # diameter in m\n", + "\n", + "A = pi*d1**2/4 # area in m**2\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "l =100 # length of the pipe\n", + "\n", + "# Solution\n", + "\n", + "V = Q/A\n", + "\n", + "R = rho1*V*d1/mu\n", + "\n", + "print \"It is a laminar flow\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = f*l*V**2/(2*g*d1) # head loss due to friction\n", + "\n", + "print \"(a) Head loss due to flow for glycerine =\",round(Hf,1),\"m \"\n", + "\n", + "R1 = rho*V*d1/mu1\n", + "\n", + "print \"The flow is turbulent\"\n", + "\n", + "e = 0.025\n", + "\n", + "r = e/(d1*100)\n", + "\n", + "f = 0.021\n", + "\n", + "hf = f*l*V**2/(2*g*d1)\n", + "\n", + "print \"(a) Head loss due to flow for water =\",round(hf,2),\"m \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.2 Page no 311" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.1853324563\n", + "Discharge = 0.1 m**3/s\n" + ] + } + ], + "source": [ + "# Discharge of water\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# for water\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # for cast iron in cm\n", + "\n", + "L = 100 # length of the pipe in m\n", + "\n", + "D = 0.2 # diameter in m\n", + "\n", + "hf = 5.43 # head loss due to friction\n", + "\n", + "r = e/(D*100)\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "A = sqrt(2*g*D*hf/L)\n", + "\n", + "B = D/nu\n", + "\n", + "f = 0.021 # from moodys diagram\n", + "\n", + "V = A/sqrt(f)\n", + "\n", + "print V\n", + "\n", + "R = B*f\n", + "\n", + "A = pi*D**2/4\n", + "\n", + "Q = A*V\n", + "\n", + "print \"Discharge =\",round(Q,2),\"m**3/s\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.3 Page no 314" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence the convergence is attained, D= 0.2 m\n" + ] + } + ], + "source": [ + "# Size of the case iron\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q =0.1 # discharge in m**3/s\n", + "\n", + "hf = 5.43 # friction loss head in m\n", + "\n", + "L = 100 # length of pipe\n", + "\n", + "nu = 1.00*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # for cast iron in cm\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "A = 8*L*Q**2/(hf*g*pi**2)\n", + "\n", + "B = 4*Q/(pi*nu)\n", + "\n", + "# for D = 0.172 ; f=0.01\n", + "D = 0.172\n", + "\n", + "r = e/D\n", + "\n", + "Re = B/D\n", + "\n", + "f = 0.022 # for Re and r\n", + "\n", + "# for D1=0.199 ; f=0.021\n", + "\n", + "D1 = 0.199\n", + "\n", + "r1 = e/D1\n", + "\n", + "R = B/D1\n", + "\n", + "f = 0.021 # for R and r\n", + "\n", + "print \"Hence the convergence is attained, D=\",round(D1,1),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.4 Page no 318" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Head loss = 2.0 ft\n" + ] + } + ], + "source": [ + "# Head loss \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "L = 500 # length of the pipe in ft\n", + "\n", + "D= 9*2.54/100 # diameter in cm\n", + "\n", + "C = 100 # constant\n", + "\n", + "S = 0.004\n", + "\n", + "# Solution\n", + "\n", + "Hf = S*L\n", + "\n", + "print \"Head loss =\",round(Hf,0),\"ft\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.5 Page no 319" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Head loss of water = 3.2 m\n" + ] + } + ], + "source": [ + "# Head loss of water\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.1 # water flow rate in m**3/s\n", + "\n", + "d = 30 # diameter in m\n", + "\n", + "l = 500 # length in m\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "r = log(d/e,10)\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.3)**(2.5)\n", + " \n", + "S = (Q/K)**2\n", + "\n", + "hf = S*l\n", + "\n", + "print \"Head loss of water =\",round(hf,1),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.6 Page no 319" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Head loss of water = 0.1 m**3/s\n" + ] + } + ], + "source": [ + "# Head loss by conveyance method\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.1 # water flow rate in m**3/s\n", + "\n", + "d = 20 # diameter in cm\n", + "\n", + "l = 500 # length in m\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "S = 5.43 \n", + "\n", + "# Solution\n", + "\n", + "r = log(d/e,10)\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.2)**2.5\n", + "\n", + "Q=K*sqrt(S/100)\n", + "\n", + "print \"Head loss of water =\",round(Q,2),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.7 Page no 320" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "K = 0.432 from trial and error\n" + ] + } + ], + "source": [ + "# Solve using the conveyence method\n", + "\n", + "from math import *\n", + "\n", + "# given\n", + "\n", + "eps = 0.025*10**-2 # for cast iron epsilon = 0.0025 cm\n", + "\n", + "# we get the value of K = 0.432 m**2/s\n", + "# we need to do trial and error to find the value of D\n", + "\n", + "# we use the value of D = 0.2 m\n", + "\n", + "D = 0.2 # value in m\n", + "\n", + "g = 9.81\n", + "\n", + "# Solution\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*log10(D/(eps))+1.14)*D**(2.5)\n", + "\n", + "print \"K = \",round(K,3),\" from trial and error\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.8 Page no 326" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total head loss = 83.7 m\n" + ] + } + ], + "source": [ + "# Determine head loss\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d = 0.1 # diameter of the pipe\n", + "\n", + "Q= 0.075 # discharge in m**3/s\n", + "\n", + "L = 30 # length in m\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# for water\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025\n", + "\n", + "r = e/(10*d)\n", + "\n", + "# Solution\n", + "\n", + "V = Q/A\n", + "\n", + "Re = V*d/nu\n", + "\n", + "f = 0.025 # firction factor from moodys diagram\n", + "\n", + "hf = f*L*V**2/(2*g*d) \n", + "\n", + "K= 0.5 # contraction constant\n", + "\n", + "hc = K*V**2/(2*g) \n", + "\n", + "K1 =10 # loss of the globe valve\n", + "\n", + "hg = K1*V**2/(2*g)\n", + "\n", + "Th = hf+hc+hg\n", + "\n", + "print \"Total head loss =\",round(Th,1),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.9 Page no 328" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge through the pipe = 0.067 m**3/s\n" + ] + } + ], + "source": [ + "# discharge through the pipe\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# for water\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "d1 = 0.3 # diameter of pipe 1 in m\n", + "\n", + "d2 = 0.15 # diameter of pipe 2 in m\n", + "\n", + "d3 = 0.08 # diameter of pipe 3 in m\n", + "\n", + "g = 9.81 # acclelration due to gravity in m/s**2\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "f1 = 0.019 # foe e/d1\n", + "\n", + "f2 = 0.022 # foe e/d2\n", + "\n", + "# Solution\n", + "\n", + "V3 = sqrt(2*g*100/((8.4*(f1)+268.85*(f2)+4.85)))\n", + "\n", + "V1 = (d3/d1)**2*V3\n", + "\n", + "V2 = (d3/d2)**2*V3\n", + "\n", + "# reynolds number for pipe BC\n", + "\n", + "R1 = V1*d1/nu\n", + "\n", + "R2 = V2*d2/nu\n", + "\n", + "Q = V3*pi*d3**2/4\n", + "\n", + "print \"Discharge through the pipe =\",round(Q,3),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.10 Page no 332" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Replacement of the flow system = 94.3 m\n" + ] + } + ], + "source": [ + "# Replace the flow system\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "D = 0.2 # diameter of pipe 1\n", + "\n", + "D1 = 0.15 # diameter of pipe 2\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # e for cast iron\n", + "\n", + "r = e/(100*D) \n", + "\n", + "# Solution\n", + "\n", + "V = Q/(pi*(0.2)**2/4)\n", + "\n", + "R = V*D/nu\n", + "\n", + "f = 0.021 # from moodys law\n", + "\n", + "r2 = e/D1\n", + "\n", + "V1 = Q/(pi*D1**2/4)\n", + "\n", + "R1 = V*D1/nu\n", + "\n", + "f2 = 0.023 # from moodys law\n", + "\n", + "L2 = 28562*D1**5/f2\n", + "\n", + "print \"Replacement of the flow system =\",round(L2,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.11 Page no 335" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge through branch 1 = 1.35 m**3/s\n", + "Discharge through branch 2 = 0.566 m**3/s\n", + "Discharge through branch 3 = 0.082 m**3/s\n", + "It is found that hf1=hf2=hf3 = 43.5 The distribution od discharge is correct\n" + ] + } + ], + "source": [ + "# Discharge through each branch\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "e = 0.025 # in cm\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "Q1 = 0.5 # discharge in m**3/s\n", + "\n", + "D1 = 50\n", + "\n", + "L1 = 500 # length in m\n", + "\n", + "g = 9.81\n", + "\n", + "# Pipe 1\n", + "\n", + "r1 = e/D # r1 for pipe 1\n", + "\n", + "V1 = Q1/(pi*(0.5)**2/4)\n", + "\n", + "R = V*(0.5)/nu\n", + "\n", + "f1 = 0.018 # for the reynolds no\n", + "\n", + "hf1 = f*L1*V1**2/(2*g*D1)\n", + "\n", + "# pipe 2\n", + "\n", + "hf2 = hf1\n", + "\n", + "L2 =200 # length in m\n", + "\n", + "D2 = 0.3 # diameter in m\n", + "\n", + "r2 = e/D2\n", + "\n", + "f2 = 0.02 \n", + "\n", + "V2 = 0.419/sqrt(f2) \n", + "\n", + "R2 = V2*D2/nu\n", + "\n", + "Q2 = V2*(pi*D2**2/4)\n", + "\n", + "#pipe 3\n", + "\n", + "hf3=hf1\n", + "\n", + "L3 = 300 # length of pipe 3 in m\n", + "\n", + "D3 =0.15 # diameter of pipe 3 in m\n", + "\n", + "r3 = e/D3 \n", + "\n", + "f = 0.022 # from moody's law\n", + "\n", + "V3 = 0.242/sqrt(f2)\n", + "\n", + "R3 = V3*D3/nu\n", + "\n", + "Q3 = V3*(pi*D3**2/4)\n", + "\n", + "Td = Q1+Q2+Q3\n", + "\n", + "q1 = Q1*(2.0/Td)\n", + "\n", + "q2 = Q2*(2.0/Td)\n", + "\n", + "q3 = Q3*(2.0/Td)\n", + "\n", + "print \"Discharge through branch 1 =\",round(q1,2),\"m**3/s\"\n", + "\n", + "print \"Discharge through branch 2 =\",round(q2,3),\"m**3/s\"\n", + "\n", + "print \"Discharge through branch 3 =\",round(q3,3),\"m**3/s\"\n", + "\n", + "# Actual head loss\n", + "\n", + "d = 0.5\n", + "\n", + "v1 = q1/(pi*(d)**2/4)\n", + "\n", + "R4 = v1*d/nu\n", + "\n", + "r4 = 0.0005 # ratio of e/D\n", + "\n", + "f = 0.018\n", + "\n", + "Hf1 = f*L1*v1**2/(2*g*d)\n", + "\n", + "print \"It is found that hf1=hf2=hf3 =\",round(Hf1,1),\"The distribution od discharge is correct\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.14 Page no 349" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum depth = 17.6 ft\n" + ] + } + ], + "source": [ + "# Find minimum depth below the ridge\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "e = 0.00015 # from moody's chart\n", + "\n", + "D = 2 # depth in ft\n", + "\n", + "r = e/D\n", + "\n", + "z1 = 100 # elevation in ft\n", + "\n", + "mu = 1.084*10**-5 # viscosity in Ns/ft**2\n", + "\n", + "p1 = 34 # pressure head in ft\n", + "\n", + "p2 = 10 # pressure head in ft\n", + "\n", + "g = 32.2 # acclelration due to gravity in ft/s**2\n", + "\n", + "L = 1000 # length in ft\n", + "\n", + "# Solution\n", + "\n", + "f = 0.011 # assume\n", + "\n", + "V = sqrt(100/(10000/(2*2*g)))/sqrt(f)\n", + "\n", + "R = V*D/mu\n", + "\n", + "V1 = 10.15\n", + "\n", + "f1 = 0.0125\n", + "\n", + "Q = V1*pi*D**2/4\n", + "\n", + "x = p1-p2-(V1**2/(2*g))-(f1*L*V1**2/(2*g*D))\n", + "\n", + "Dp = 30 - x\n", + "\n", + "print \"Minimum depth =\",round(Dp,2),\"ft\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot1.png b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot1.png new file mode 100755 index 00000000..caf0a78f Binary files /dev/null and b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot1.png differ diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot2.png b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot2.png new file mode 100755 index 00000000..35633e7f Binary files /dev/null and b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot2.png differ diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot3.png b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot3.png new file mode 100755 index 00000000..03ac1d9d Binary files /dev/null and b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot3.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb new file mode 100755 index 00000000..a2dd3e26 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb @@ -0,0 +1,61 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4a6f98ae985b8e1b6e034e8590a04939cfd519f9354fb6a0851df17e977d9e9f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Fluid and their Properties" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + " #Initialization of Variable\n", + "sigma = 72.7*10**-3; #Surface Tension\n", + "r = 1 *10**-3; #Radius of Bubble\n", + "\n", + " #Calculations\n", + "P = 2*sigma/r;\n", + "print \"Excess Pressure(N/m2) :\",P\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excess Pressure(N/m2) : 145.4\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb new file mode 100755 index 00000000..510f6bab --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb @@ -0,0 +1,341 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:03b40b6d5c44ff714aac13480905f296c46afa917e2740a687e8aa66bb21b428" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Laminar and Turbulent Flows in Bounded System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1, Page 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import symbols,diff,solve\n", + "\n", + " #Initializing the variables\n", + "mu = 0.9;\n", + "rho = 1260;\n", + "g = 9.81;\n", + "x = 45; #theta in degrees\n", + "P1 = 250 * 10**3;\n", + "P2 = 80* 10**3;\n", + "Z1 = 1;\n", + "Z2 = 0; # datum\n", + "U = -1.5;\n", + "Y = 0.01;\n", + "\n", + " #Calculations\n", + "gradP1 = P1+ rho*g*Z1;\n", + "gradP2 = P2+ rho*g*Z2;\n", + "DPstar = (gradP1-gradP2)*math.sin(math.radians(x))/(Z1-Z2);\n", + "A = U/Y; # Coefficient U/Y for equation 10.6\n", + "B = DPstar/(2*mu) # Coefficient dp*/dx X(1/2mu) for equation 10.6\n", + "y = symbols('y')\n", + "v = round((A + B*Y),1)*y -round(B)*y**2\n", + "duBYdy = diff(v,y);\n", + "tau = 0.9*duBYdy;\n", + "stagPnts = solve(duBYdy,y)\n", + "ymax=stagPnts[0] #value of y where derivative vanishes.;\n", + "umax = (A + B*Y)*ymax + B*ymax**2; # Check the value there is slight mistake in books answer\n", + "def u(y):\n", + " z = (A + B*Y)*y -B*y**2;\n", + " return diff(z,y)\n", + "def dif(y):\n", + " return round((A + B*Y)) -2*round(B)*y\n", + "\n", + "taumax=abs(mu*dif(Y))\n", + "\n", + "print \"velocity distribution :\",v\n", + "print \"shear stress distribution :\",mu*dif(y)\n", + "print \"maximum flow velocity (m/s) :\",round(umax,2)\n", + "print \"Maximum Shear Stress (kN/m^2):\",(round(taumax)/1000)\n", + " \n", + "\n", + "print " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "velocity distribution : -71638.0*y**2 + 566.4*y\n", + "shear stress distribution : -128948.4*y + 509.4\n", + "maximum flow velocity (m/s) : 3.36\n", + "Maximum Shear Stress (kN/m^2): 0.78\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "mu = 0.9;\n", + "rho = 1260;\n", + "d = 0.01;\n", + "Q = 1.8/60*10**-3; #Flow in m**3 per second\n", + "l = 6.5;\n", + "ReCrit = 2000;\n", + " #Calculations\n", + "A = (math.pi*d**2)/4;\n", + "MeanVel = Q/A;\n", + "Re = rho*MeanVel*d/mu/10; # Check properly the answer in book there is something wrong\n", + "Dp = 128*mu*l*Q/(math.pi*d**4)\n", + "Qcrit = Q*ReCrit/Re*10**3;\n", + "\n", + "print \"Pressure Loss (kN/m2) :\",round(Dp/1000,0)\n", + "print \"Maximum Flow rate (litres/s) :\",round(Qcrit,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Loss (kN/m2) : 715.0\n", + "Maximum Flow rate (litres/s) : 112.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "mu = 1.14*10**-3;\n", + "rho = 1000;\n", + "d = 0.04;\n", + "Q = 4*10**-3/60; #Flow in m**3 per second\n", + "l = 750;\n", + "ReCrit = 2000;\n", + "g = 9.81;\n", + "k = 0.00008; # Absolute Roughness\n", + "\n", + " #Calculations\n", + "A = (math.pi*d**2)/4;\n", + "MeanVel = Q/A;\n", + "Re = rho*MeanVel*d/mu;\n", + "Dp = 128*mu*l*Q/(math.pi*d**4);\n", + "hL = Dp/(rho*g);\n", + "f = 16/Re;\n", + "hlDa = 4*f*l*MeanVel**2/(2*d*g); # By Darcy Equation\n", + "Pa = rho*g*hlDa*Q;\n", + "\n", + " #Part(b)\n", + "Q = 30*10**-3/60; #Flow in m**3 per second\n", + "MeanVel = Q/A;\n", + "Re = rho*MeanVel*d/mu;\n", + "RR = k/d; # relative roughness\n", + "f = 0.008 #by Moody diagram for Re = 1.4 x 10**4 and relative roughness = 0.002\n", + "hlDb = 4*f*l*MeanVel**2/(2*d*g); # By Darcy Equation\n", + "Pb = rho*g*hlDb*Q;\n", + "\n", + "\n", + "print \"!---- Case (a) ----!\\n\",\"Head Loss(mm) :\",round(hlDa*1000,1)\n", + "print \"Power Required (W) :\",round(Pa,4)\n", + "print \"\\n!---- Case (b) ----!\\n\",\"Head Loss(m) :\",round(hlDb,2)\n", + "print \"Power Required (W) :\",round(Pb,0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "!---- Case (a) ----!\n", + "Head Loss(mm) : 92.5\n", + "Power Required (W) : 0.0605\n", + "\n", + "!---- Case (b) ----!\n", + "Head Loss(m) : 4.84\n", + "Power Required (W) : 24.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "w = 4.5;\n", + "d = 1.2 ;\n", + "C = 49;\n", + "i = 1/800;\n", + "\n", + " #Calculations\n", + "A = d*w;\n", + "P = 2*d + w;\n", + "m = A/P;\n", + "v = C*(m*i)**0.5;\n", + "Q = v*A;\n", + "\n", + "print \"Mean Velocity (m/s):\",round(v,2)\n", + "print \"Discharge (m3/s) :\",round(Q,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean Velocity (m/s): 1.53\n", + "Discharge (m3/s) : 8.28\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5, Page 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import sympy\n", + "from sympy import symbols\n", + "\n", + " #Initializing the variables\n", + "r,R = symbols('r R')\n", + "\n", + "#Calculations\n", + "rbyR=round((1-(49/60)**7),3)\n", + "r = (rbyR)*R \n", + "\n", + "#Result\n", + "print \"radius at which actual velocity is equal to mean velocity is\",r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radius at which actual velocity is equal to mean velocity is 0.758*R\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page 355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "d1 = 0.140;\n", + "d2 = 0.250;\n", + "DpF_DpR = 0.6; #Difference in head loss when in forward and in reverse direction\n", + "K = 0.33 #From table\n", + "g = 9.81;\n", + " #Calculations\n", + "ratA = (d1/d2)**2;\n", + "v =(DpF_DpR*2*g/((1-ratA)**2-K))**0.5;\n", + "\n", + "print \"Velocity (m/s):\",round(v,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity (m/s): 9.13\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb new file mode 100755 index 00000000..ac453318 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb @@ -0,0 +1,120 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8adfc21cf4552e14b563ca7c0f2e56ece56cd7f1691cf9486f2cfbd789df7be1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Boundary Layer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "rho = 860;\n", + "v = 10**-5;\n", + "Us = 3;\n", + "b = 1.25;\n", + "l = 2;\n", + "\n", + " #Calculations\n", + "x = 1; # At x =1 \n", + "Rex = Us*x/v;\n", + "ReL = Us*l/v ;\n", + "mu = rho*v;\n", + "T0 = 0.332*mu*Us/x*Rex**0.5;\n", + "Cf = 1.33*ReL**-0.5;\n", + "F = rho*Us**2*l*b*Cf ;\n", + "print \"shear stress (N/m^2) :\" ,round(T0,1)\n", + "print \"Total, double-sided resistance of the plate (N) :\",round(F,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shear stress (N/m^2) : 4.7\n", + "Total, double-sided resistance of the plate (N) : 33.224\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Us = 6;\n", + "b = 3;\n", + "l = 30;\n", + "rho = 1000;\n", + "mu = 10**-3;\n", + "T = 20+273; # Temperature in Kelvin\n", + "\n", + " #Calculations\n", + " \n", + "ReL = rho*Us*l/mu; \n", + "Cf = 0.455*math.log10(ReL)**-2.58 ;\n", + "\n", + "F = rho*Us**2*l*b*Cf ;\n", + "Lt = 10**5*mu/(rho*Us); # Assuming transition at Rel = 10**5\n", + "\n", + "print \"Drag Force (kN) :\", round(F/1000,2)\n", + "print \"Transition length (m) :\",round(Lt,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drag Force (kN) : 6.36\n", + "Transition length (m) : 0.0167\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb new file mode 100755 index 00000000..745a2241 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb @@ -0,0 +1,319 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:24438326f2aac267ced1e2e3aa21e094819eefb50d5f8862608b62208400992d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Incompressible Flow around a Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "x =35;\n", + "T = 50;\n", + "m = 1;\n", + "g =9.81;\n", + "rho = 1.2;\n", + "A = 1.2;\n", + "U0 = 40*1000/3600; # Velocity in m/s\n", + "\n", + " #Calculations\n", + "L = T*math.sin(math.radians(x))+m*g;\n", + "D =T*math.cos(math.radians(x));\n", + "Cl = 2*L/(rho*U0**2*A);\n", + "Cd = 2*D/(rho*U0**2*A); \n", + "\n", + "print \"Lift Coefficient :\",round(Cl,3)\n", + "print \"Drag Coefficient :\",round(Cd,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lift Coefficient : 0.433\n", + "Drag Coefficient : 0.461\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, Page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Vp =12;\n", + "lp = 40;\n", + "lm = 1;\n", + "As = 2500;\n", + "Dm = 32;\n", + "rhoP = 1025;\n", + "rhoM = 1000;\n", + "Ap = As;\n", + "\n", + " #Calculations\n", + "Am = As/40**2;\n", + "Vm = round(Vp*(lm/lp)**0.5,2);\n", + "Dfm = round(3.7*Vm**1.95*Am,1);\n", + "Rm = Dm - Dfm;\n", + "Rp = Rm *(rhoP/rhoM)*(lp/lm)**2*(Vp/Vm)**2;\n", + "Dfp = 2.9*Vp**1.8*Ap;\n", + "Dp = Rp + Dfp;\n", + "\n", + "print \"Expected total resistance (kN) :\",round(Dp/1000,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Expected total resistance (kN) : 1407.07\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3, Page 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "U0 = 80*1000/3600;\n", + "d = 0.02;\n", + "rho =1.2;\n", + "mu = 1.7*10**-5;\n", + "A = 0.02*500; # Projected area of wire\n", + "N = 20; # No of cables\n", + "\n", + " #Calculations\n", + "Re = rho*U0*d/mu;\n", + "Cd = 1.2 # From figure 12.10 for given Re; \n", + "D = 0.5*rho*Cd*A*U0**2\n", + "F = N*D; \n", + "f = 0.198*(U0/d)*(1-19.7/Re);\n", + "\n", + "print \"Total force on tower (kN) :\",round(F/1000,2)\n", + "print \"Frequency (Hz) :\",round(f,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total force on tower (kN) : 71.11\n", + "Frequency (Hz) : 219.9\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4, Page 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "mu = 0.03;\n", + "d = 10**-3;\n", + "rhoP = 1.1*10**3;\n", + "g = 9.81;\n", + "rho0 = 0.9*10**3;\n", + " #Calculations\n", + "B = 18*mu/(d**2*rhoP);\n", + "t = round(4.60/B,4);\n", + "Vt = round(d**2*(rhoP - rho0)*g/(18*mu),5);\n", + "Re = rho0*Vt*d/mu;\n", + "\n", + "print \"Time taken by the particle take to reach 99 per cent of its terminal velocity (s):\",t\n", + "print \"\\nReynolds No corrosponding to the velocity :\",Re" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken by the particle take to reach 99 per cent of its terminal velocity (s): 0.0094\n", + "\n", + "Reynolds No corrosponding to the velocity : 0.1089\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5, Page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "muO = 0.0027;\n", + "Vt = 3*10**-3;\n", + "rhoW = 1000;\n", + "rhoP = 2.4*rhoW;\n", + "rhoO = 0.9*rhoW;\n", + "g = 9.81;\n", + "muA = 1.7*10**-5;\n", + "rhoA = 1.3;\n", + "\n", + " #Calculations\n", + "d = (18*muO*Vt/(rhoP-rhoO)/g)**0.5;\n", + "Re = Vt*d*rhoO/muO;\n", + "\n", + " #Movement of particle in upward direction\n", + "if(Re < 1):\n", + " v = 0.5;\n", + " \n", + " Re=5; # from fig 12.15\n", + " vt = muA*Re/(rhoA*d);\n", + " u = vt+v;\n", + " print \"Velocity of air stream blowing vertically up (m/s) :\",round(u,3) \n", + "else:\n", + " print \"strokes law is not valid\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of air stream blowing vertically up (m/s) : 1.157\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6, Page 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "c = 2;\n", + "s = 10;\n", + "rho = 5.33;\n", + "rho_ellip = 1.2;\n", + "D = 400;\n", + "L = 45000;\n", + "scale = 20;\n", + "U_windTunnel = 500;\n", + "U_proto = 400*1000/3600;\n", + "\n", + " #Calculations\n", + "A = c*s;\n", + "U_model = U_windTunnel/scale;\n", + "Cd = D/(0.5*rho*U_model**2*A);\n", + "Cl = L/(0.5*rho_ellip*U_proto**2*A); # Considering elliptical Lift model\n", + "Cdi = Cl**2/(math.pi*s/c); # Aspect Ratio = s/c \n", + "Cdt = Cd + Cdi;\n", + "Dw = 0.5*Cdt*rho_ellip*U_proto**2*A;\n", + "print \"Total drag on full sized wing (kN) :\",round(Dw/1000,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total drag on full sized wing (kN) : 2.65\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb new file mode 100755 index 00000000..664b4abf --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1f446f61d8838d40d2e31fd72ef3a0bc1e1a7f291c54a48c1366aef232ac3797" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Compressible Flow around a Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "rho0 = 1.8;\n", + "R = 287;\n", + "T = 75+273; # Temperature in kelvin \n", + "gma = 1.4; \n", + "Ma = 0.7;\n", + "\n", + " #Calculations\n", + "P0 = rho0*R*T;\n", + "c = (gma*R*T)**0.5;\n", + "V0 = Ma*c;\n", + "Pt = (P0**((gma-1)/gma) + rho0*((gma-1)/gma)*(V0**2/(2*P0**(1/gma))))**(gma/(gma-1));\n", + "rhoT = rho0*(Pt/P0)**(1/gma);\n", + "Tt = Pt/(R*rhoT)-273;\n", + "\n", + "print \"Staganation Pressure (kN/m2 ) :\",round(Pt/1000,1)\n", + "print \"Temperature (Degree Celcius) :\",round(Tt,1)\n", + "print \"Density of airstream (kg/m3) :\",round(rhoT,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Staganation Pressure (kN/m2 ) : 249.4\n", + "Temperature (Degree Celcius) : 109.1\n", + "Density of airstream (kg/m3) : 2.274\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page 454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "R = 287;\n", + "T = 28+273;\n", + "gma = 1.4;\n", + "P = 1.02*10**5;\n", + "rhoHg = 13.6*10**3;\n", + "g = 9.81;\n", + "\n", + " #Calculations\n", + " #Case(a)\n", + "U0 = 50;\n", + "c = (gma*R*T)**0.5;\n", + "Ma = U0/c;\n", + "rho = P/(R*T);\n", + "DelP = 0.5*rho*U0**2; #Pt-P\n", + "ha = DelP/(rhoHg*g);\n", + "\n", + " #Case(b)\n", + "U0 = 250;\n", + "Ma = U0/c;\n", + "Pt = P*(1+(gma-1)*Ma**2/2)**(gma/(gma-1)); \n", + "DelP = Pt-P\n", + "hb = DelP/(rhoHg*g);\n", + "\n", + " #Case (c)\n", + "U0 = 420;\n", + "Ma1 =U0/c;\n", + "P2 = P*((2*gma/(gma+1))*Ma1**2 - ((gma-1)/(gma+1)));\n", + "N = Ma1**2 +2/(gma-1); # Numerator\n", + "D = 2*gma*Ma1**2/(gma-1)-1;\n", + "Ma2 = (N/D)**0.5;\n", + "Pt2 = P2*(1+(gma-1)*Ma2**2/2)**(gma/(gma-1));\n", + "hc = (Pt2-P2)/(rhoHg*g) ; \n", + "\n", + "print \"Difference in height of mercury column in case (a) in mm :\",round(ha*1000,2)\n", + "print \"Difference in height of mercury column in case (b) in mm :\",round(hb*1000,1)\n", + "print \"Difference in height of mercury column in case (c) in mm :\",round(hc*1000,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in height of mercury column in case (a) in mm : 11.06\n", + "Difference in height of mercury column in case (b) in mm : 314.2\n", + "Difference in height of mercury column in case (c) in mm : 684.0\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb new file mode 100755 index 00000000..2e55c7c8 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb @@ -0,0 +1,365 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:75785fe7e68940de5df81a115443b8d5c78793053ae837735e58f86a072c05cc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Steady Incompressible Flow in Pipe and Duct System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1, Page 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "L1 = 5;\n", + "L2 = 10;\n", + "d = 0.1;\n", + "f = 0.08;\n", + "Za_Zc = 4; #difference in height between A and C \n", + "g = 9.81 ;\n", + "Pa = 0;\n", + "Va = 0; \n", + "Za_Zb = -1.5;\n", + "V = 1.26;\n", + "rho = 1000;\n", + "\n", + " #Calculations\n", + "D = 1.5 + 4*f*(L1+L2)/d ; # Denominator in case of v**2 \n", + "v = (2*g*Za_Zc/D)**0.5;\n", + "Pb = rho*g*Za_Zb - rho*V**2/2*(1.5+4*f*L1/d);\n", + "print \"Pressure in the pipe at B (kN/m2):\",round(Pb/1000,2)\n", + "print \"Mean Velocity at C (m/s) :\",round(v,2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in the pipe at B (kN/m2): -28.61\n", + "Mean Velocity at C (m/s) : 1.26\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3, Page 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import symbols,solve\n", + "import sympy\n", + "\n", + "\n", + " #Initializing the variables\n", + "Za_Zb = 10;\n", + "f = 0.008;\n", + "L = 100;\n", + "d1 = 0.05;\n", + "g = 9.81;\n", + "d2 = 0.1;\n", + "\n", + " #Calculations\n", + "\n", + "def flowRate(d):\n", + " D = 1.5 + 4*f*L/d ; # Denominator in case of v1**2\n", + " A = math.pi*d**2/4;\n", + " v = (2*g*Za_Zb/D)**0.5;\n", + " z = A*v;\n", + " return z \n", + "Q1 = flowRate(d1);\n", + "Q2 = flowRate(d2);\n", + "Q=round(Q1+Q2,4)\n", + "\n", + "\n", + "D=symbols('D')\n", + "roots=solve(241212*D**5 -3.2, D)\n", + "dia=roots[0]\n", + "\n", + "print \"Rate flow for pipe 1 (m^3/s) :\",round(Q1,4)\n", + "print \"Rate flow for pipe 2 (m^3/s) :\",round(Q2,4)\n", + "print \"Combined Rate flow (m^3/s) :\",round(Q,4)\n", + "print \"Diameter of single equivalent pipe (mm) :\",round(dia,3)*1000\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate flow for pipe 1 (m^3/s) : 0.0034\n", + "Rate flow for pipe 2 (m^3/s) : 0.019\n", + "Combined Rate flow (m^3/s) : 0.0224\n", + "Diameter of single equivalent pipe (mm) : 106.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4, Page 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import solve,symbols\n", + "\n", + " #Initializing the variables\n", + "Za_Zb = 16;\n", + "Za_Zc = 24;\n", + "f = 0.01;\n", + "l1 = 120;\n", + "l2 = 60;\n", + "l3 = 40;\n", + "d1 = 0.12;\n", + "d2 = 0.075;\n", + "d3 = 0.060;\n", + "g = 9.81;\n", + " #Calculations\n", + "\n", + "v1=symbols('v1')\n", + "ash=solve(v1-0.3906*(g-1.25*v1**2)**0.5-0.25*(17.657-1.5*v1**2)**0.5,v1)\n", + "v1=round(abs(ash[0]),2)\n", + "Q1=math.pi/4*d1**2*v1\n", + "\n", + "v2=(g-1.25*v1**2)**0.5\n", + "Q2=math.pi/4*d2**2*v2\n", + "\n", + "v3=(17.657-1.5*v1**2)**0.5\n", + "Q3=math.pi/4*d3**2*v3\n", + "\n", + "print \"Flow rate in pipe 1 (m^3/s):\",round(Q1,4)\n", + "print \"Flow rate in pipe 2 (m^3/s):\",round(Q2,4)\n", + "print \"Flow rate in pipe 3 (m^3/s):\",round(Q3,4)\n", + "print \"continuity condition satisfied as Q1=Q2+Q3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate in pipe 1 (m^3/s): 0.0206\n", + "Flow rate in pipe 2 (m^3/s): 0.0105\n", + "Flow rate in pipe 3 (m^3/s): 0.0101\n", + "continuity condition satisfied as Q1=Q2+Q3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5, Page 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "D = 0.3;\n", + "Q = 0.8;\n", + "rho = 1.2;\n", + "f = 0.008;\n", + "L_entry = 10;\n", + "L_exit = 30;\n", + "Lt = 20*D #Transition may be represented by a separation loss equivalent length of 20 * the approach duct diameter\n", + "K_entry = 4;\n", + "K_exit = 10\n", + "l = 0.4; # length of cross section\n", + "b = 0.2; # width of cross section\n", + "\n", + " #Calculations\n", + "A = math.pi*D**2/4;\n", + "Dp1 = 0.5*rho*Q**2/A**2*(K_entry + 4*f*(L_entry+Lt)/D);\n", + "area = l*b;\n", + "perimeter =2*(l+b);\n", + "m = area/perimeter;\n", + "Dp2 = 0.5*rho*Q**2/area**2*(K_exit + f*L_exit/m);\n", + "Dfan = Dp1+Dp2;\n", + "\n", + "print \"fan Pressure input (N/m2) :\",round(Dfan,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fan Pressure input (N/m2) : 1254.6\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.6, Page 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "D = [0.15 , 0.3];\n", + "rho = 1.2;\n", + "f = 0.008;\n", + "L_entry = 10;\n", + "L_exit = 20;\n", + "Lt = 20*D[1] \n", + "K = 4;\n", + "Q1 = 0.2;\n", + "\n", + " #Calculations\n", + "Q2 = 4*Q1;\n", + "A=[0.0,0.0]\n", + "A[0] = math.pi*D[0]**2/4;\n", + "A[1] = math.pi*D[1]**2/4;\n", + "Dp1 = 0.5*rho*Q1**2/A[0]**2*(K + 4*f*L_entry/D[0]);\n", + "Dp2 = 0.5*rho*Q2**2/A[1]**2*(4*f*(L_exit + Lt)/D[1]);\n", + "Dfan = Dp1+Dp2;\n", + "\n", + "print \"fan Pressure input (N/m2) :\",round(Dfan,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fan Pressure input (N/m2) : 684.51\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.7, Page 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from scipy.optimize import fsolve\n", + " \n", + " \n", + " \n", + " #Initializing the variables\n", + "d = [0.1 , 0.125, 0.15, 0.1, 0.1 ]; # Corrosponding to AA1B AA2B BC CD CF\n", + "l = [30 , 30 , 60, 15, 30]; # Corrosponding to AA1B AA2B BC CD CF\n", + "rho = 1.2;\n", + "f = 0.006;\n", + "Ha = 100;\n", + "Hf = 60;\n", + "He = 40;\n", + "K = [0.0, 0.0, 0.0, 0.0, 0.0]\n", + " #Calculations\n", + "for i in range(0,len(l)):\n", + " K[i] = f*l[i]/(3*d[i]**5);\n", + "\n", + "\n", + "K_ab = K[0]*K[1]/((K[0])**0.5+(K[1])**0.5)**2;\n", + "K_ac = K_ab + K[2];\n", + "Hc = (K_ac*Hf +K[4]*Ha/4)/(K_ac+K[4]/4);\n", + "Q = ((Ha - Hc)/K_ac)**0.5;\n", + "\n", + "def f(n):\n", + " z = He - Hc + (0.5*Q)**2 *(K[3]+(4000/n)**2);\n", + " return z\n", + "\n", + "n = fsolve(f,1);\n", + "\n", + "print \"total Volume flow rate (m3/s):\",round(Q, 4)\n", + "print \"Head at C (m) :\",round(Hc,2) \n", + "print \"Percentage valve opening (%) :\",round(n,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total Volume flow rate (m3/s): 0.1016\n", + "Head at C (m) : 75.48\n", + "Percentage valve opening (%) : 38.58\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb new file mode 100755 index 00000000..95bd78ec --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb @@ -0,0 +1,114 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4f421cc7413696fe7c281427d95aff4b53c3ab081abe9cd6d31d1e2df1133e5a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + " Chapter 15: Uniform Flows in Open Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1, Page 516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "B =4;\n", + "D = 1.2;\n", + "C = 7.6;\n", + "n = 0.025;\n", + "s = 1/1800;\n", + "\n", + " #Calculations\n", + "W = B + 2*1.5*D;\n", + "A = D*(B+C)/2; # Area of parallelogram formed\n", + "P = B +2*1.2*(D**2+(1.5)**2)**0.5;\n", + "m =A/P;\n", + "i=s;\n", + "C = (23+0.00155/i+1/n)/(1+(23+0.00155/i)*n/(m)**0.5); # By Kutter formula\n", + "Q1 = C*A*(m*i)**0.5;\n", + "Q2 = A*(1/n)*m**(2/3)*(i)**0.5;\n", + "\n", + "print \"Q using Chezy formula with C determined from the Kutter formula (m^3/s) :\",round(Q1,2)\n", + "print \"Q using the Manning formula (m^3/s) :\",round(Q2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q using Chezy formula with C determined from the Kutter formula (m^3/s) : 5.65\n", + "Q using the Manning formula (m^3/s) : 5.69\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2, Page 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables\n", + "Q = 0.5;\n", + "C = 80;\n", + "i = 1/2000;\n", + "\n", + " #Calculations\n", + "\n", + "# A = D**2+(3/4)*D**2 = (7/4)*D**2\n", + "D = ((4/7)*(Q/C)*(2/i)**0.5)**(2/5)\n", + "\n", + "#Result\n", + "print \"Optimum depth = Optimum Width (in metres):\",round(D,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optimum depth = Optimum Width (in metres): 0.552\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb new file mode 100755 index 00000000..73f04778 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb @@ -0,0 +1,144 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:130e6e124bfc557e016f12e2356b74f1d97ea210c47b1944be1ebda3297e63a8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Non-Uniform Flow in Open Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2, Page 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "B = [1.4 ,0.9];\n", + "D = [0.6 ,0.32];\n", + "g = 9.81;\n", + "h = 0.03;\n", + "Z = 0.25; \n", + "\n", + " #Calculations\n", + "Q1 = B[1]*D[1]*(2*g*h/(1-(B[1]*D[1]/B[0]*D[0])**2))**0.5\n", + "E = D[0]-Z;\n", + "Q2 = 1.705*B[1]*E**1.5;\n", + "\n", + "print \"Volume flow rate (m3/s) :\",round(Q2,4) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume flow rate (m3/s) : 0.3177\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3, Page 546" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "a =0.5;\n", + "b = 0.5;\n", + "Dn = 1.2;\n", + "s = 1/1000;\n", + "C = 55;\n", + "g = 9.81;\n", + "\n", + " #Calculations\n", + "c = (1+a)/b; \n", + "QbyB = Dn*C*(Dn*s)**0.5;\n", + "q = QbyB;\n", + "Dc = (q**2/g)**(1/3);\n", + "\n", + "header = \"Mean Depth(Dm) Numenator Denominator\\t L\"\n", + "unit = \" (m) \\t \\t \\t \\t(m)\"\n", + "\n", + "m=[]\n", + "Dm=[]\n", + "N=[]\n", + "D=[]\n", + "Lm=[]\n", + "total=0\n", + "for c in range(7): \n", + " m.append(2.4-0.15*c);\n", + " Dm.append((m[c]+m[c]-0.15)/2); \n", + " N.append(1 - (Dc/Dm[c])**3) ; # Numerator\n", + " D.append(1 - (Dn/Dm[c])**3); # Denominator\n", + " Lm.append(150*(N[c]/D[c]));\n", + " total = total +Lm[c];\n", + "\n", + "print header\n", + "print unit\n", + "for c in range(7):\n", + " mm=str(Dm[c])+'\\t '+str(round(N[c],4))+' '+str(round(D[c],4))+' \\t'+str(round(Lm[c],2))\n", + " print mm\n", + " \n", + "print \"\\ndistance upstream covered (approx in m):\",round(total)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean Depth(Dm) Numenator Denominator\t L\n", + " (m) \t \t \t \t(m)\n", + "2.325\t 0.9576 0.8625 \t166.54\n", + "2.175\t 0.9482 0.8321 \t170.94\n", + "2.025\t 0.9358 0.7919 \t177.26\n", + "1.875\t 0.9192 0.7379 \t186.86\n", + "1.725\t 0.8962 0.6634 \t202.65\n", + "1.575\t 0.8636 0.5577 \t232.27\n", + "1.425\t 0.8159 0.4028 \t303.8\n", + "\n", + "distance upstream covered (approx in m): 1440.0\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb new file mode 100755 index 00000000..2791e2c2 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb @@ -0,0 +1,274 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c21785277c0a99c3eb4c310a9e20c477f6ab2a0a22da1b2d3844df1699a78d21" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Compressible Flow in Pipes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1, Page 566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import solve,symbols\n", + "\n", + " #Initializing the variables\n", + "g = 9.81;\n", + "rho = 1000;\n", + "rhoHg = 13.6*rho;\n", + "d1 = 0.075;\n", + "d2 = 0.025;\n", + "Pi = 0.250;\n", + "Pt = 0.150;\n", + "P_Hg = 0.760;\n", + "rho1 = 1.6;\n", + "gma = 1.4;\n", + "\n", + " #Calculations\n", + "P1 = (Pi+P_Hg)*rhoHg*g;\n", + "P2 = (Pt+P_Hg)*rhoHg*g;\n", + "rho2 = rho1*(P2/P1)**(1/gma);\n", + "V0=symbols('V0')\n", + "V1=symbols('V1')\n", + "Velo = solve([d2**2*V1*rho2-d1**2*V0*rho1,0.5*(V1**2 - V0**2)*((gma-1)/gma)*(rho2*rho1/(rho2*P1-rho1*P2))-1],[V0,V1])\n", + "s=(Velo[1])[0]\n", + "Flow = math.pi*d1**2/4*s;\n", + "\n", + "print \"Volume of flow (m3/s):\",round(Flow,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume of flow (m3/s): 0.06\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2, Page 571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Ma = 4;\n", + "gma = 1.4;\n", + "At = 500; # in mm\n", + "\n", + " #Calculations\n", + "N = 1 + (gma-1)*Ma**2/2;\n", + "D = (gma+1)/2 ;\n", + "#ratio of A/At ==R\n", + "R = round( (N/D)**((gma+1)/(2*(gma-1)))/Ma,2);\n", + "A=At*R\n", + "print \"Area of test section (mm^2):\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of test section (mm^2): 5360.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3, Page 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Ma1 = 2;\n", + "gma = 1.4;\n", + "T1 = 15+273; # In kelvin\n", + "P1 = 105; \n", + "\n", + " #Calculations\n", + "Ma2 = (((gma-1)*Ma1**2 +2)/(2*gma*Ma1**2-gma+1))**0.5;\n", + "P2 = P1*(1+gma*Ma1**2)/(1+gma*Ma2**2);\n", + "T2 = T1*(1 +(gma-1)/2*Ma1**2)/(1 +(gma-1)/2*Ma2**2);\n", + "\n", + "\n", + "print \"Mach No downstream shock wave :\",round(Ma2,3)\n", + "print \"Pressure (bar) of downstream shock wave :\",round(P2)\n", + "print \"Temperature (Degree C) of downstream shock wave :\",T2 - 273" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mach No downstream shock wave : 0.577\n", + "Pressure (bar) of downstream shock wave : 473.0\n", + "Temperature (Degree C) of downstream shock wave : 213.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4, Page 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "gma = 1.4;\n", + "f = 0.00375;\n", + "d = 0.05;\n", + "\n", + " #Calculations\n", + "m = d/4;\n", + "def x(Ma):\n", + " A =(1 -Ma**2 )/(gma*Ma**2);\n", + " B = (gma+1)*Ma**2/(2+(gma-1)*Ma**2); \n", + " y = m/f*(A+ (gma+1)*math.log(B)/(2*gma));\n", + " return y\n", + "\n", + "X1 = x(0.2); # At entrance Ma = 0.2;\n", + "X06_X1 =x(0.6); # Section(b) Ma = 0.6;\n", + "\n", + "X06 = X1-X06_X1;\n", + "\n", + "print \"The Distance X1 at which the Mach number is unity (m) :\",round(X1,2)\n", + "print \"Distance from the entrance (m) :\",round(X06,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Distance X1 at which the Mach number is unity (m) : 48.44\n", + "Distance from the entrance (m) : 46.81\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.5, Page 585" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "\n", + " #Initializing the variables\n", + "gma = 1.4;\n", + "Q = 28/60; # m3/s\n", + "d = 0.1;\n", + "p1 = 200*10**3;\n", + "f = 0.004;\n", + "x_x1 = 60;\n", + "R = 287;\n", + "T = 15+273;\n", + "\n", + " #Calculations\n", + "A = math.pi*d**2/4;\n", + "m = d/4;\n", + "v1 = Q/A;\n", + "pa = p1*(1-f*(x_x1)*v1**2/(m*R*T))**0.5;\n", + "\n", + "def g(p):\n", + " A = (v1*p1)**2/(R*T)\n", + " B = f*A*x_x1/(2*m);\n", + " y = (p**2 - p1**2)/2 -A*math.log(p/p1) +B;\n", + " return y\n", + " \n", + "pb=fsolve(g,pa) # Guessing solution around pa\n", + "pb=pb[0]\n", + "print \"Pressure at the outlet, neglecting velocity changes (kN/m2) :\",round(pa/1000,1)\n", + "print \"Pressure at the outlet, allowing for velocity changes (kN/m2) :\",round(pb/1000,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the outlet, neglecting velocity changes (kN/m2) : 153.6\n", + "Pressure at the outlet, allowing for velocity changes (kN/m2) : 150.4\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb new file mode 100755 index 00000000..835909e1 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb @@ -0,0 +1,493 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:56204579c9dff23fd133fce17f3b8e6b8ac01dae9f7f133693b953a21d5ed34c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Pressure and Head" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables\n", + "z1 = 0; #Taking Ground as reference\n", + "z2 = -30 #Depth\n", + "rho = 1025 #Density\n", + "g = 9.81 #Acceleration due to gravity\n", + "\n", + " #Calculation\n", + "pressureIncrease = -rho*g*(z2-z1);\n", + "\n", + "print \"Increase in Pressure (KN/m2):\",round(pressureIncrease/1000,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in Pressure (KN/m2): 301.7\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables\n", + "p1 = 22.4*10**3 #Initial Pressure\n", + "z1 = 11000 #Initial Height\n", + "z2 = 15000 #final Height\n", + "g = 9.81 #Acceleration due to gravity\n", + "R = 287; #Gas Constant\n", + "T = 273-56.6 #Temperature \n", + "\n", + " #Calculations\n", + "p2 = p1*math.exp(-g*(z2-z1)/(R*T));\n", + "rho2=p2/(R*T);\n", + " \n", + "print \"Final Pressure (kN/m2):\",round(p2/1000,2)\n", + "print \"Final Density (kg/m3):\",round(rho2,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Pressure (kN/m2): 11.91\n", + "Final Density (kg/m3): 0.192\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, Page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "p1 = 101*10**3 #Initial Pressure\n", + "z1 = 0 #Initial Height\n", + "z2 = 1200 #Final Height\n", + "T1 = 15+273 #Initial Temperature\n", + "g = 9.81 #Acceleration due to gravity\n", + "gamma = 1.4 #Heat capacity ratio\n", + "R = 287 #Gas Constant\n", + "\n", + " #Calculations\n", + "p2 = p1*(1-g*(z2-z1)*(gamma-1)/(gamma*R*T1))**(gamma/(gamma-1));\n", + "dT_dZ = -(g/R)*((gamma-1)/gamma);\n", + "T2 = T1 + dT_dZ*(z2-z1);\n", + "rho2 = p2/(R*T2);\n", + "\n", + "print \"Final Pressure (kN/m2) :\",round(p2/1000,2)\n", + "print \"Temprature (in degree celcius):\",round(T2-273,1)\n", + "print \"Density (kg/m^3) :\",round(rho2,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Pressure (kN/m2) : 87.33\n", + "Temprature (in degree celcius): 3.3\n", + "Density (kg/m^3) : 1.101\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, Page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables\n", + "p1 = 101*10**3 #Initial Pressure\n", + "z1 = 0 #Initial Height\n", + "z2 = 7000 #Final Height\n", + "T1 = 15+273 #Initial Temperature\n", + "g = 9.81 #Acceleration due to gravity\n", + "R = 287 #Gas Constant\n", + "dT = 6.5/1000 #Rate of Variation of Temperature\n", + "\n", + " #Calculations\n", + "p2 = p1*(1-dT*(z2-z1)/T1)**(g/(R*dT));\n", + "T2 = T1 - dT*(z2-z1);\n", + "rho2 = p2/(R*T2);\n", + "\n", + "\n", + "print \"Final Pressure (kN/m^2) :\",round(p2/1000,2)\n", + "print \"Final Density (kg/m^3 ):\",round(rho2,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Pressure (kN/m^2) : 40.89\n", + "Final Density (kg/m^3 ): 0.588\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5, Page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "p = 350*10**3; #Gauge Pressure\n", + "pAtm = 101.3*10**3; #Atmospheric Pressure \n", + "rhoW = 1000; #Density of Water\n", + "sigma = 13.6; #Relative Density of Mercury\n", + "g = 9.81 #Acceleration due to gravity\n", + "\n", + " #Calculations\n", + "def Head(rho):\n", + " head = p/(rho*g);\n", + " return head\n", + "rhoM = sigma*rhoW;\n", + "pAbs = p + pAtm;\n", + "\n", + "print \"\\nPart(a)- Equivalent head of water (m) :\",round(Head(rhoW),2)\n", + "print \"\\nPart(b)- Equivalent head of water (m) :\",round(Head(rhoM),2)\n", + "print \"\\nAbsolute pressure (kN/m^2) :\",pAbs/1000" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Part(a)- Equivalent head of water (m) : 35.68\n", + "\n", + "Part(b)- Equivalent head of water (m) : 2.62\n", + "\n", + "Absolute pressure (kN/m^2) : 451.3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, Page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " \n", + "\n", + " #Initializing the variables\n", + "rho = 10**3; #Density of water\n", + "h = 2; #Height\n", + "g = 9.81; #Acceleration due to gravity\n", + "\n", + " #Calculations\n", + "p=rho*h*g; \n", + "\n", + "print \"Gauge pressure (k/m2) :\",p/1000" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gauge pressure (k/m2) : 19.62\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7, Page 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables\n", + "rho = 0.8*10**3; #Density of fluid\n", + "rhoM = 13.6*10**3; #Density of manometer liquid\n", + "g = 9.81 #Acceleration due to gravity\n", + "\n", + " #Calculations\n", + "def fluidPressure(h1,h2):\n", + " P = rhoM*g*h2-rho*g*h1;\n", + " return P\n", + "\n", + "p1=fluidPressure(0.5,0.9)/1000\n", + "p2=fluidPressure(0.1,-0.2)/1000\n", + "\n", + "print \"!-----Part (a)-----! \\nGauge pressure (kN/m2) :\",round(p1,2)\n", + "print \"\\n!-----Part (b)-----! \\nGauge pressure (kN/m2) :\",round(p2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "!-----Part (a)-----! \n", + "Gauge pressure (kN/m2) : 116.15\n", + "\n", + "!-----Part (b)-----! \n", + "Gauge pressure (kN/m2) : -27.47\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8, Page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables\n", + "rho = 10**3; #Density of fluid\n", + "rhoM = 13.6*10**3; #Density of manometer liquid\n", + "g = 9.81; #Acceleration due to gravity\n", + "H = 0.3; # Differnce in height = b-a as in text\n", + "h = 0.7;\n", + "\n", + " #Calculations\n", + "result = rho*g*H + h*g*(rhoM-rho);\n", + "\n", + "print \"Pressure difference (kN/m^2):\", round(result/1000,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference (kN/m^2): 89.467\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9, Page 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables\n", + "rho = 10**3; #Density of fluid\n", + "rhoM = 0.8*10**3; #Density of manometer liquid\n", + "g = 9.81; #Acceleration due to gravity\n", + "a = 0.25;\n", + "b = 0.15;\n", + "h = 0.3;\n", + " #Calculations\n", + "def PressureDiff(a,b,h,rho,rhoM):\n", + " P = rho*g*(b-a) + h*g*(rho-rhoM);\n", + " return P\n", + "print \"The presure difference,if the top of the manometer is filled with\"\n", + "print \"(a) air :\",PressureDiff(a,b,h,rho,0)/1000, \" N/m^2\"\n", + "print \"(b) oil of relative density 0.8. :\",PressureDiff(a,b,h,rho,rhoM), \"N/m^2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The presure difference,if the top of the manometer is filled with\n", + "(a) air : 1.962 N/m^2\n", + "(b) oil of relative density 0.8. : -392.4 N/m^2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, Page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables\n", + "phi = 30; #30 degree\n", + "h = 1.2 ; # Height of tank\n", + "l = 2; # Length of tank\n", + "\n", + " #Calculations\n", + "def SurfaceAngle(a,phi):\n", + " g=9.81; # m/s**2 \n", + " Theta = math.atan(-a*math.cos(math.radians(phi))/(g+a*math.sin(math.radians(phi)))); \n", + " return Theta\n", + "\n", + " #case (a) a = 4\n", + "\n", + "print \"ThetaA (degree) :\",round(180 + 180/math.pi*SurfaceAngle(4,phi),2)\n", + "\n", + " #Case (b) a = - 4.5\n", + "tanThetaR = math.tan((SurfaceAngle(-4.5,phi)));\n", + "\n", + "print \"\\nThetaR (degree) :\",round(SurfaceAngle(-4.5,phi)*180/math.pi,2)\n", + "\n", + "Depth = h - l*tanThetaR/2;\n", + "print \"\\nMaximum Depth of tank (m) :\",round(Depth,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ThetaA (degree) : 163.65\n", + "\n", + "ThetaR (degree) : 27.27\n", + "\n", + "Maximum Depth of tank (m) : 0.6845\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb new file mode 100755 index 00000000..f24f7af6 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb @@ -0,0 +1,115 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:042171008edad2dcea90c81036564026ff0ecc789ee16d3a2ccb0122fde141e9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Pressure Transient Theory and Surge Control" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3, Page 692" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "c = 1250;\n", + "Dt = 0.02;\n", + "Dv = 0.5;\n", + "rho = 1000;\n", + "v =0.5;\n", + "\n", + " #Calculations\n", + "cDt = c*Dt;\n", + "Dp = rho*c*Dv;\n", + "DOv_DOt = Dv/Dt;\n", + "vDOv_DOt = v*Dv/cDt;\n", + "DOp_DOt = Dp/Dt;\n", + "vDOp_DOx = v*Dp/cDt;\n", + "Error = [vDOv_DOt*100/DOv_DOt ,vDOp_DOx*100/DOp_DOt];\n", + "print \"The percentage errors are :\",Error,\"\\nThese are very small hence can be neglected\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage errors are : [0.04, 0.04] \n", + "These are very small hence can be neglected\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.5, Page 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "f = 0;\n", + "Atunnel = 1.227;\n", + "Ashaft = 12.57;\n", + "Q =2;\n", + "L = 200;\n", + "g = 9.81; \n", + "\n", + " #Calculations\n", + "Zmax = (Q/Ashaft)*(Ashaft*L/(Atunnel*g))**0.5;\n", + "T = 2*math.pi*(Ashaft*L/(Atunnel*g))**0.5;\n", + "\n", + "print \"Peak water level (m) :\",round(Zmax,3)\n", + "print \"Mass Oscillation Period (s) :\",round(T,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak water level (m) : 2.299\n", + "Mass Oscillation Period (s) : 90.8\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb new file mode 100755 index 00000000..2c113fed --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb @@ -0,0 +1,191 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:783af12fd7d104e85c7e13e105c7550ca4a0a63a41968e5a9b0312d6fedb23a2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Theory of Rotodynamic Machine" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.1, Page 779" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables\n", + "Q = 5;\n", + "R1 = 1.5/2;\n", + "R2 = 2/2; \n", + "w = 18;\n", + "rho = 1000;\n", + "rhoA = 1.2;\n", + "Hth = 0.017;\n", + "g=9.81;\n", + "\n", + " #Calculations\n", + "A = math.pi*(R2**2-R1**2);\n", + "Vf = Q/A;\n", + "Ut = w*R2;\n", + "Uh = w*R1;\n", + "B1t = math.atan(Vf/Ut);\n", + "B1h = math.atan(Vf/Uh);\n", + "E = Hth*rho/rhoA;\n", + "def Beta(u):\n", + " y = math.atan(Vf/(u-E*g/u));\n", + " return y\n", + "B2t = Beta(Ut);\n", + "B2h = Beta(Uh);\n", + "\n", + "print \"!----Blade Inlet Angles----!\"\n", + "print \"At tip (in degrees) :\",round(B1t*180/math.pi,1),\"\\nAt Hub (in degrees) :\",round(B1h*180/math.pi,1)\n", + "print \"\\n!----Blade Outlet Angles (Degrees)----!\"\n", + "print \"At tip (in degrees):\",round(B2t*180/math.pi,1),\"\\nAt Hub(in degrees) :\",round(B2h*180/math.pi,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "!----Blade Inlet Angles----!\n", + "At tip (in degrees) : 11.4 \n", + "At Hub (in degrees) : 15.1\n", + "\n", + "!----Blade Outlet Angles (Degrees)----!\n", + "At tip (in degrees): 19.5 \n", + "At Hub(in degrees) : 48.6\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.2, Page 793" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "D = 0.1;\n", + "t = 15*10**-3;\n", + "Q = 8.5/3600;\n", + "N = 750/60;\n", + "B2 = 25*math.pi/180; # Beta 2 ind degrees\n", + "g = 9.81;\n", + "z = 16;\n", + "\n", + " #Calculations\n", + "A = round(math.pi*D*t,5);\n", + "V_f2 = round(Q/A,3);\n", + "U2 = round(math.pi*N*D,3);\n", + "V_w2 = round(U2 - V_f2/math.tan(B2),1);\n", + "Hth = round(U2*V_w2/g,2);\n", + "Sf = round(1 - math.pi*math.sin(B2)/(z*(1-(V_f2/U2)/math.tan(B2))),3);\n", + "H = round(Sf*Hth,2);\n", + "\n", + "print \"Part (a) - Head developed (m): \",Hth\n", + "print \"Part (b) - Head developed (m): \",H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) - Head developed (m): 1.16\n", + "Part (b) - Head developed (m): 1.03\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.3, Page 797" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Ma = 0.6;\n", + "Cl = 0.6;\n", + "tByC = 0.035; # Thickness to chord ratio\n", + "cByC = 0.015; # Camber to chord ratio\n", + "x = 3; # Angle of incidence\n", + "\n", + " #Calculations\n", + "lamda = 1/(1-Ma**2)**0.5;\n", + "Cl# = lamda*Cl;\n", + "tByC1 = tByC*lamda;\n", + "cByC1 = cByC*lamda;\n", + "Cl1 = Cl*lamda**2;\n", + "Ae = x*lamda;\n", + "print \"____Geometric Characterstics____\\n\"\n", + "print \"Thickness to chord ratio :\",tByC1\n", + "print \"Camber to chord ratio :\",cByC1\n", + "print \"Lift Coefficient :\",Cl1\n", + "print \"angle of incidence (Degrees) :\",Ae" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "____Geometric Characterstics____\n", + "\n", + "Thickness to chord ratio : 0.04375\n", + "Camber to chord ratio : 0.01875\n", + "Lift Coefficient : 0.9375\n", + "angle of incidence (Degrees) : 3.75\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb new file mode 100755 index 00000000..8cb510fa --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb @@ -0,0 +1,302 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ef9e21b794b8d045cd677d625f05028772e4370ff57190a11a0021b5fe3769e2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Performance of Rotodynamic Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.1, Page 814" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from pylab import *\n", + "%matplotlib inline\n", + "\n", + " #Initializing the variables\n", + "Q = []\n", + "for c in range(9):\n", + " Q.append(7*c)\n", + "H = [40, 40.6, 40.4, 39.3, 38, 33.6, 25.6, 14.5, 0];\n", + "n = [0, 41, 60, 74, 83, 83, 74, 51, 0];\n", + "N1 = 750;\n", + "N2 = 1450;\n", + "D1 = 0.5;\n", + "D2 = 0.35;\n", + "\n", + " #Calculations\n", + "Q2=[]\n", + "H2=[]\n", + "for c in range(9):\n", + " Q2.append(Q[c]*(N2/N1)*(D2/D1)**3);\n", + " H2.append(H[c]*(N2/N1)**2*(D2/D1)**2);\n", + " \n", + "plot(Q,H,label='H1')\n", + "plot(Q,n,label='n1')\n", + "plot(Q2,H2,'--',label='H2')\n", + "plot(Q2,n,'--',label='n2')\n", + "legend( loc='upper right', numpoints = 1 )\n", + "xlabel(\"Q (m3/s)\");\n", + "ylabel(\"H (m of water) and n(percent)\")\n", + "grid(True)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEMCAYAAAAidwoiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYFFcXxt+lCChdYUFFV5EmIsWCXRRBjRGwBEsUbNHk\nM7HFlqqJScSuUdMUBWuCEpUYjVhYxYIiIqAIKFJUYEF6Z9m93x8bDCqwhZ2d3WV+zzNPMrN37rxn\nB+fs3HPvOSxCCBgYGBgY2iYadAtgYGBgYKAPxgkwMDAwtGEYJ8DAwMDQhmGcAAMDA0MbhnECDAwM\nDG0YxgkwMDAwtGEodQK7du1a6uTklNSnT58Hu3btWgoARUVFpl5eXhdtbW3TvL29I0tKSoyp1MDA\nwMDA0DyUOYEHDx702b9//4LY2NgBCQkJzmfPnn03PT3dOigoaK2Xl9fFtLQ0W09Pz8tBQUFrqdLA\nwMDAwNAylDmB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+ }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.2, Page 831" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "n = 0.9;\n", + "g = 9.81;\n", + "D = 1.45;\n", + "N = 375/60;\n", + "H = 200; # Real height\n", + "x = 165; # Theta\n", + "P = 3750*10**3;\n", + "rho = 1000;\n", + "\n", + " #Calculations\n", + "h = n*H; #Effective Head\n", + "v1 = (2*g*h)**0.5;\n", + "u = math.pi*D*N;\n", + "\n", + "n_a = (2*u/v1**2)*(v1-u)*(1-n*math.cos(math.radians(x)));\n", + "\n", + "P_b = P/n_a;\n", + "ppj = P_b/2; # Power per jet\n", + "d = (8*ppj/(rho*math.pi*v1**3))**0.5 ;\n", + "print \"the efficiency of runner :\",round(n_a,3)\n", + "print \"Diameter of Jet (m) :\",round(d,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the efficiency of runner : 0.933\n", + "Diameter of Jet (m) : 0.156\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.3, Page 834" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " #Example 23.3 \n", + "\n", + " #Initializing the variables\n", + "g = 9.81;\n", + "H = 12;\n", + "n = 0.8;\n", + "w = 300*2*math.pi/60;\n", + "Q = 0.28;\n", + "\n", + " #Calculations\n", + "V_f1 = 0.15*(2*g*H)**0.5;\n", + "V_f2 =V_f1;\n", + "V_w1 = (n*g*H)**0.5;\n", + "u1 = V_w1;\n", + "theta = math.atan(V_f1/u1);\n", + "u2 =0.5*u1;\n", + "B2 = math.atan(V_f2/u2);\n", + "r1 = u1/w;\n", + "b1 = Q/(V_f2*0.9*2*math.pi*r1); # vanes occupy 10 per cent of the circumference hence 0.9\n", + "b2 = 2*b1;\n", + "\n", + "print \"Guide vane angle (degree) :\",round(theta*180/math.pi,2)\n", + "print \"Vane angle at exit (degree) :\",round(B2*180/math.pi,2)\n", + "print \"Width of runner at inlet (mm) :\",round(b1*1000,1) \n", + "print \"Width of runner at exit (mm) :\",round(b2*1000,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Guide vane angle (degree) : 13.34\n", + "Vane angle at exit (degree) : 25.38\n", + "Width of runner at inlet (mm) : 69.6\n", + "Width of runner at exit (mm) : 139.3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.4, Page 838" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import solve,symbols\n", + "\n", + " #Initializing the variables\n", + "H = 35;\n", + "g = 9.81;\n", + "D = 2;\n", + "N = 145/60;\n", + "z = 30*math.pi/180; # angle between vanes and direction of runner rotation\n", + "y = 28*math.pi/180; # angle between runner blades at the outlet.\n", + "\n", + " #Calculations\n", + "H_net = 0.93*H ; # since 7% head is lost\n", + "v1 = (2*g*H_net)**0.5;\n", + "u = math.pi*N*D;\n", + "\n", + " # from inlet velocity triangle\n", + "V_r1=14.3\n", + "## ash = cos(beta1+z)\n", + "ash = (V_r1**2+v1**2-u**2)/(2*V_r1*v1)\n", + "beta1=(z+math.acos(ash))*180/math.pi # in degrees\n", + "\n", + "V_r2=(1-8/100)*V_r1 #8 % loss due to friction\n", + "V_w1= u + V_r1*math.cos(math.radians(beta1))\n", + "V_w2= u - V_r2*math.cos(y)\n", + "\n", + "E = (u/g)*(V_w1 - V_w2);\n", + "n = E/H;\n", + "print \"Blade angle at inlet :\",round(beta1,1)\n", + "print \"Efficiency (%) :\",round(n*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Blade angle at inlet : 62.1\n", + "Efficiency (%) : 81.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.5, Page 844" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "s = 0.03;\n", + "P = 185*10**3;\n", + "rho = 0.86*10**3;\n", + "A = 2.8*10**-2;\n", + "N = 2250/60;\n", + "D = 0.46;\n", + "\n", + " #Calculations\n", + "R0 = 0.46/2;\n", + "Ws_Wp = 1-s;\n", + "n = Ws_Wp;\n", + "Pf = s*P;\n", + "Q = (2*Pf*A**2/(3.5*rho))**(1/3);\n", + "Wp = 2*math.pi*N; \n", + "Ri = ((1/Ws_Wp)*(R0**2 -P/(rho*Q*Wp**2)))**0.5;# Modified equation for power transmission.\n", + "Di = 2*Ri;\n", + "T = P/(rho*Wp**3 *D**5);\n", + " \n", + "print \"Mean diameter (mm) :\",round(Di*1000)\n", + "print \"Torque Coefficient :\",round(T,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean diameter (mm) : 326.0\n", + "Torque Coefficient : 0.0008\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb new file mode 100755 index 00000000..ef4fb925 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb @@ -0,0 +1,183 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0997b77d100b3345365d77881e9dcf23833d271e3f7741c8fb4ad6c260c5ffc6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Positive Displacement Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.1, Page 860" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables\n", + "H_at = 10.3;\n", + "Hs = 1.5;\n", + "Hd = 4.5;\n", + "Ls = 2;\n", + "Ld = 15;\n", + "g = 9.81;\n", + "Ds = 0.4; # Diameter of stroke\n", + "Db = 0.15; # Diameter of bore\n", + "Dd = 0.05; # Diameter of discharge and suction pipe\n", + "nu = 0.2;\n", + "f = 0.01;\n", + "abs_pump_pressure = 2.4;\n", + "\n", + " #Calculations\n", + "A = math.pi*(Db)**2/4;\n", + "a = math.pi*(Dd)**2/4;\n", + "r = Ds/2;\n", + "W = 2*math.pi*nu;\n", + "Hsf = 0; \n", + "def H_suck(n):\n", + " y = H_at - Hs +(-1)**n*(L/g)*(A/a)*W**2*r; \n", + " return y\n", + "\n", + "def H(n,DischargeOrSuction):\n", + " if(DischargeOrSuction == 1):\n", + " y = H_at - Hs +(-1)**n*(Ls/g)*(A/a)*W**2*r;\n", + " elif(DischargeOrSuction == 2):\n", + " y = H_at + Hd +(-1)**n*(Ld/g)*(A/a)*W**2*r;\n", + " else:\n", + " print \"There is something wrong :\"\n", + " return y\n", + "\n", + "def H_mid(DischargeOrSuction,uA):\n", + " if(DischargeOrSuction == 1):\n", + " Hsf = 4*f*Ls/(2*Dd*g)*(uA/a)**2;\n", + " y = H_at - Hs - Hsf;\n", + " elif(DischargeOrSuction == 2):\n", + " Hsf = 4*f*Ld/(2*Dd*g)*(uA/a)**2;\n", + " y = H_at + Hd + Hsf;\n", + " else:\n", + " print \"There is something wrong :\"\n", + " return y\n", + "\n", + "Hs_start = H(1,1); # Inertia head negative hence n = 1\n", + "Hs_end = H(2,1); # Inertia head positive hence n = 2\n", + "Hd_start = H(1,2);\n", + "Hd_end = H(2,2);\n", + "u = W*r;\n", + "Hs_mid = H_mid(1,u*A);\n", + "slip = 0.04;\n", + "Hd_mid = H_mid(2,u*A);\n", + "suction = [Hs_start, Hs_end, Hs_mid];\n", + "discharge = [Hd_start, Hd_end, Hd_mid];\n", + "suction1=[0,0,0]\n", + "discharge1=[0,0,0]\n", + "for c in range(3):\n", + " suction1[c] =round(suction[c],2)\n", + " discharge1[c] =round(discharge[c],2)\n", + "W_max = (abs((abs_pump_pressure - H_at + Hs)*(g/Ls)*(a/A)*(1/r)))**0.5;\n", + "W_max_rev = W_max/(2*math.pi)*60; # maximum rotation speed in rev/min\n", + "\n", + "header = \"Start End Mid\";\n", + "\n", + "print \"\\n!----Part(a)----! Head at \\n\",header\n", + "print suction1\n", + "print \"\\n!----Part(b)----! Head at \\n\",header\n", + "print discharge1\n", + "print \"\\n!----Part(c)----1 \\nDrive speed for s eperation (rev/min) :\",round(W_max_rev)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "!----Part(a)----! Head at \n", + "Start End Mid\n", + "[8.22, 9.38, 8.38]\n", + "\n", + "!----Part(b)----! Head at \n", + "Start End Mid\n", + "[10.45, 19.15, 17.93]\n", + "\n", + "!----Part(c)----1 \n", + "Drive speed for s eperation (rev/min) : 40.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.2, Page 863" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Example 24.2 \n", + "\n", + " #Initializing the variables\n", + "H_friction = 2.4;\n", + "H_at = 10.3;\n", + "Hs = 1.5;\n", + "L =2;\n", + "f = 0.01;\n", + "d = 0.05;\n", + "g = 9.81; # Diameter of stroke\n", + "Db = 0.15; # Diameter of bore\n", + "r = 0.2;\n", + "\n", + " #Calculations\n", + "A = math.pi*(Db)**2/4;\n", + "a = math.pi*(d)**2/4;\n", + "W= (((H_at - Hs - H_friction )*(2*d*g/(4*f*L)))**0.5)*(a/A)*(math.pi/r); # in rad/s\n", + "W_rev = W/(2*math.pi)*60; # maximum rotation speed in rev/min\n", + "# IMPORTANT : In book conversion from rad/s to rev/min is wrong, so answer will be diffrent from book\n", + " \n", + "print \"speed in (rad/s) :\",round(W,2)\n", + "print \"Increase in speed (rev/min):\",round(W_rev-40,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed in (rad/s) : 15.46\n", + "Increase in speed (rev/min): 107.65\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb new file mode 100755 index 00000000..9b08e6f3 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb @@ -0,0 +1,328 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2bebadfad4a18ede042a136ada8984e181f57290a23ad4ed8003a1f83445a447" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25: Machine\u2013Network Interactions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.4, Page 893" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables\n", + "Pa_P1 = -200; # From previous Question\n", + "Q = 1.4311 ; # From previous questions.\n", + "\n", + " #Calculations\n", + "DpSys = Pa_P1 + 98.9*Q**2;\n", + "print \"System Operating point (m^3/s):\",round(DpSys,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "System Operating point (m^3/s): 2.55\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.7, Page 906" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import solve,symbols\n", + " \n", + "\n", + " #Initializing the variables\n", + "Vo = 25.3; #Outlet velocity\n", + "D = 10 ; # Mean hydraulic diameter\n", + "f = 0.008; # friction factor\n", + "X = 1000; # Length of road\n", + "P = 12600; # Absorbing power\n", + "Va = 300; # Tunnel air flow\n", + "K1 = 0.96;\n", + "K2 = 0.9;\n", + "T = 590; #Thrust\n", + "rho = 1.2; # Air density \n", + "\n", + " #Calculations\n", + "alpha = (1/D)**2;\n", + "A = math.pi*D**2/4; # Area of tunnel\n", + "Vt = Va/A;\n", + "W = Vo/Vt; #Omega\n", + "E = (1-alpha*W);\n", + "C = (1-alpha*W)*(1-E)**2 + E**2 - 1;\n", + " # Manipulating equation 25.20;\n", + "LHS = f*X*(E+1)**2/D + C + 1 ;\n", + "\n", + "n1 = symbols('n1')\n", + "result=solve(K1*(2*((alpha*W**2 + (1-alpha)*E**2-1)+(n1-1)*(alpha*W*(W-1)-C/2)))-LHS)\n", + "\n", + "n=result[0]\n", + "\n", + "\n", + " # Alternative approach using equation 25.22\n", + "n2 = (rho*((4*f*X*Vt**2)/(2*D) + 1.5*Vt**2/2))*A/(K1*K2*T); \n", + "Pt = round(n2)*P;\n", + "\n", + "print \"Number of fans required :\",round(n2)\n", + "print \"Total power consumed (KW) :\",Pt/1000" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of fans required : 6.0\n", + "Total power consumed (KW) : 75.6\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.8, Page 907" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import solve,symbols\n", + " #Initializing the variables\n", + "f = 0.008;\n", + "T = 290;\n", + "L = 750;\n", + "Dt = 9; # Diameter Tunnel\n", + "Df = 0.63; # Diameter fan\n", + "K1 = 0.98;\n", + "K2 = 0.92;\n", + "Vo = 27.9;\n", + "n = 10;\n", + "A=math.pi*Dt**2/4\n", + "rho=1.2\n", + "X=750\n", + " #Calculations\n", + "alpha = (Df/Dt)**2;\n", + " # equation 25.20 becomes when E = 1 nad C = 0\n", + "W=symbols('W')\n", + "omega = solve(2*K1* (alpha*W**2 +(n-1)*alpha*W*(W-1)) - 4*f*L/Dt -1)\n", + " \n", + "\n", + "for i in range(1,len(omega)): # since omega is always positive and real\n", + " if omega[i]>0:\n", + " w = round(omega[i],1);\n", + "Vt = Vo/w;\n", + "\n", + "# by equation 25.22\n", + "VT=(n*(K1*K2*T)/(A*(rho*((4*f*X)/(2*Dt) + 1.5/2))))**0.5\n", + "print \"Tunnel Velocity (m/s) :\",round(VT,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tunnel Velocity (m/s) : 4.05\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.9, Page 914" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Ws = 0.45;\n", + "Ks = 3.2;\n", + "H = 152;\n", + "h = 0;\n", + "Hatm = 10.3;\n", + "Pv = 350; #vapour pressure\n", + "g = 9.81;\n", + "rho = 1000;\n", + " \n", + " #Calculations\n", + "Ht1 = 152*(Ws/Ks)**(4/3); # the value of Ht1 is 11.12 and in book it is taken as 11.2 so there will be a difference in final answer\n", + "Hvap = round(Pv/(rho*g),3);\n", + "Z = Hatm -h -Hvap -Ht1;\n", + "print \"Elevation of pump (m):\",round(Z,3)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elevation of pump (m): -0.851\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.11, Page 927" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import symbols,solve\n", + "import numpy as np\n", + " \n", + "\n", + " #Initializing the variables\n", + "Co = 0;\n", + "Qc = 0.0024;\n", + "V = 5400;\n", + "c = 10;\n", + " #Calculations\n", + "#####--------------------PART(A)-----------------#######\n", + "n1=symbols('n1')\n", + "def partA(n1):\n", + " Ci = 10;\n", + " # t = infinity so e^(-nt) = 0\n", + " Q=10000*Qc/(c-Co)\n", + " n1 = Q*3600/V; \n", + " return n1\n", + "ans=partA(n1)\n", + "\n", + "print \"Part(A) : number of air changes per hour if the garage is in continuous use and the maximum permissible concentration of carbon monoxide is 0.1 per cent. :\",ans,\"\\n\"\n", + "\n", + "#####--------------------PART(B)-----------------#######\n", + "n=symbols('n')\n", + "def partB(n):\n", + " Ci = 0; \n", + " n=[1.5,1.2,0.9,1.0] \n", + " t=1 # time in hours\n", + " error=[]\n", + " mini=100\n", + " ans=0\n", + " for i in range(4): \n", + " Q = V/3600; \n", + " A = 10000*Qc/Q; # as Co=0 \n", + " error.append(abs((A*(1-math.e**(-n[i]*t))/c)-n[i]));\n", + " if(error[i]" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean velocity (m/s): 23.36\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2, Page 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from pylab import *\n", + "import numpy as np\n", + "\n", + " #Initializing the variables all unknowns are assigned 0\n", + "\n", + "d = [0.0, 0.05, 0.075, 0, 0.030];\n", + "Q = [0, 0, 0, 0, 0];\n", + "V = [0, 0, 2, 1.5, 0];\n", + "A = [0, 0, 0, 0, 0]\n", + " #Calculations\n", + "A2 = math.pi*d[2]**2/4;\n", + "Q[2] =A2*V[2];\n", + "Q = [0,Q[2], Q[2], Q[2]/1.5 , 0.5*Q[2]/1.5];\n", + "d[3] = (Q[3]*4/(V[3]*math.pi))**0.5;\n", + "for i in range(0,5):\n", + " A[i] = math.pi*d[i]**2/4;\n", + "V[1] = V[2]*(A[2]/A[1]);\n", + "V[4]=Q[4]/A[4];\n", + "\n", + "\n", + "header = \"Diameter(mm) Area(m2)\\t Flow Rate(m3/s) Velocity(m/s)\"\n", + "print header\n", + "for c in range(1,5):\n", + " mm=str(round(d[c]*1000,1))+'\\t '+str(round(A[c],6))+' \\t '+str(round(Q[c],6))+' \\t'+str(round(V[c],2))\n", + " print mm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter(mm) Area(m2)\t Flow Rate(m3/s) Velocity(m/s)\n", + "50.0\t 0.001963 \t 0.008836 \t4.5\n", + "75.0\t 0.004418 \t 0.008836 \t2.0\n", + "70.7\t 0.003927 \t 0.00589 \t1.5\n", + "30.0\t 0.000707 \t 0.002945 \t4.17\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "import sympy\n", + "from sympy import diff, Symbol\n", + "\n", + "\n", + "#Initializing the variables \n", + "'''\n", + "def df(x, h=0.1e-5):\n", + " return ( f(x+h/2) - f(x-h/2) )/h\n", + " return df\n", + "\n", + "print df(2*x,h)\n", + "'''\n", + "x = Symbol('x') \n", + "vx = 3-x\n", + "vy = 4+2*x\n", + "vz = 2-x \n", + "\n", + " #Calculations\n", + "delVx = vx.diff(x); \n", + "delVy = vx.diff(x);\n", + "delVz = vx.diff(x); \n", + "\n", + "result = delVx+delVy+delVz;#requirement of continuity equation (result = 0)\n", + "print \"Satisfy requirement of continuity \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Satisfy requirement of continuity \n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb new file mode 100755 index 00000000..b12249f7 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb @@ -0,0 +1,517 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:04c1d9ce4358772aaf36727d98b4d1c000b18de791fe80fc4e6e1ac3cabc0050" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: The Momentum Equation and its Applications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables \n", + "\n", + "l = 60 ; #Length of pipeline\n", + "rho = 1000; # Density of liquid\n", + "a = 0.02; #Acceleration of fluid\n", + "\n", + " #Calculations\n", + "delP = rho*l*a; #Change in pressure\n", + "print \"Increase of pressure difference required (kN/m2):\",delP/1000" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase of pressure difference required (kN/m2): 1.2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables \n", + "v = 5; #Velocity of jet \n", + "rho = 1000; #density of water\n", + "d = 0.025; #Diameter of fixed nozzle\n", + "\n", + " #Calculations\n", + " #--Part(a) Variation of force exerted normal to the plate with plate angle--//\n", + "header = \"Theta\\t vcos(x)\\t pAv\\t Force\"\n", + "unit = \"deg\\t m/s\\t kg/s\\t N\"\n", + "\n", + "A = math.pi*d**2/4;\n", + "x = range(0,91,15);\n", + "for c in range(len(x)):\n", + " x[c]=1.0*x[c]\n", + "m = round(rho*A*v,2);\n", + "ma = [m,m,m,m,m,m,m];\n", + "vcomp=[]\n", + "force=[]\n", + "for c in x:\n", + " vcomp.append(round(v*math.cos(math.radians(c)),2))\n", + " force.append(round((rho*A*v**2)*math.cos(math.radians(c)),2))\n", + "\n", + "print header\n", + "print unit\n", + "for c in range(len(x)):\n", + " mm=str(x[c])+' \\t '+str(vcomp[c])+' \\t'+str(ma[c])+' \\t'+str(force[c])\n", + " print mm\n", + "##value = [x,vcomp,ma,force]\n", + "##print value,unit, header\n", + "\n", + " #--Part(b) Variation of force exerted normal to the plate with plate velocity--// \n", + "header =\"Theta\\t v\\t u\\t v-u\\t pA(v-u)\\t Force\\t\"\n", + "unit =\"deg\\t m/s\\t m/s\\t m/s\\t kg/s\\t N\\t\"\n", + "x = [0,0,0,0,0]\n", + "v = [5,5,5,5,5]\n", + "u = range(2,-3,-1);\n", + "D=[]\n", + "Prod=[]\n", + "Force=[]\n", + "for c in range(5):\n", + " D.append(v[c]-u[c])\n", + " Prod.append(round((rho*A*D[c]),2))\n", + " Force.append(round((rho*A*D[c]**2),2))\n", + " \n", + "print '\\n',\"(b)\",\"\\n\",header\n", + "print unit\n", + "for c in range(len(x)):\n", + " mm=str(x[c])+' \\t '+str(v[c])+' \\t '+str(u[c])+' \\t '+str(D[c])+' \\t '+str(Prod[c])+' \\t '+str(Force[c])\n", + " print mm\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theta\t vcos(x)\t pAv\t Force\n", + "deg\t m/s\t kg/s\t N\n", + "0.0 \t 5.0 \t2.45 \t12.27\n", + "15.0 \t 4.83 \t2.45 \t11.85\n", + "30.0 \t 4.33 \t2.45 \t10.63\n", + "45.0 \t 3.54 \t2.45 \t8.68\n", + "60.0 \t 2.5 \t2.45 \t6.14\n", + "75.0 \t 1.29 \t2.45 \t3.18\n", + "90.0 \t 0.0 \t2.45 \t0.0\n", + "\n", + "(b) \n", + "Theta\t v\t u\t v-u\t pA(v-u)\t Force\t\n", + "deg\t m/s\t m/s\t m/s\t kg/s\t N\t\n", + "0 \t 5 \t 2 \t 3 \t 1.47 \t 4.42\n", + "0 \t 5 \t 1 \t 4 \t 1.96 \t 7.85\n", + "0 \t 5 \t 0 \t 5 \t 2.45 \t 12.27\n", + "0 \t 5 \t -1 \t 6 \t 2.95 \t 17.67\n", + "0 \t 5 \t -2 \t 7 \t 3.44 \t 24.05\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " \n", + "\n", + " #Initializing the variables \n", + "x = 60; #Angle of deflection theta\n", + "rho = 1000; # Density of liquid\n", + "V1 = 30; #Acceleration of fluid\n", + "V2 = 25;\n", + "m = .8; #Discharge through A\n", + "\n", + " #Calculations\n", + "def Reaction(Vin , Vout):\n", + " R = m*(Vin -Vout) ;\n", + " return R\n", + "Rx = Reaction(V1,V2*math.cos(math.radians(x)));\n", + "Ry = -Reaction(0,V2*math.sin(math.radians(x)));\n", + "print \"Reaction in X-direction (N) :\",Rx\n", + "print \"Reaction in Y-direction (N) :\",round(Ry,2)\n", + "print \"Net Reaction (N) :\",round((Rx**2 +Ry**2)**0.5,2)\n", + "print \"Inclination of Resultant Force with x-direction (Degrees):\",round(180/math.pi*math.atan(Ry/Rx),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reaction in X-direction (N) : 14.0\n", + "Reaction in Y-direction (N) : 17.32\n", + "Net Reaction (N) : 22.27\n", + "Inclination of Resultant Force with x-direction (Degrees): 51.05\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables \n", + "v1 = 36 ; #Exit velocity\n", + "u = 15; #Velocity of vane\\\n", + "x = 30; # Angle between vanes and flow\n", + "rho = 1000; # Density of water\n", + "d = .1; # Diameter of jet\n", + "\n", + " #Calculations\n", + "alp = (180/math.pi)*math.atan((v1*math.sin(math.radians(x))/(v1*math.cos(math.radians(x))-u)));\n", + "v2 = 0.85*v1*math.sin(math.radians(x));\n", + "bta = (180/math.pi)*math.acos((u*math.sin(math.radians(alp))/v2));\n", + "m = (rho*math.pi*v1*d**2)/4;\n", + "Vin = v1*math.cos(math.radians(x));\n", + "Vout = v2*math.cos(math.radians(90));\n", + "Rx = m*(Vin-Vout);\n", + "\n", + "\n", + "print \"Inlet Angle (Degrees) :\", round(alp,2)\n", + "print \"Outlet Angle (Degrees) :\", round(bta,2)\n", + "print \"Force exerted by vanes (N) :\", round(Rx) \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inlet Angle (Degrees) : 48.05\n", + "Outlet Angle (Degrees) : 43.18\n", + "Force exerted by vanes (N) : 8815.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables \n", + "rho = 850 ; # Density of liquid\n", + "a = 0.02 #Acceleration of fluid\n", + "x = 45 ;\n", + "d1 = .5 ;\n", + "d2 = .25;\n", + "p1 = 40*10**3;\n", + "p2 = 23*10**3;\n", + "Q = .45;\n", + " \n", + " #Calculations\n", + "A1 = (math.pi*d1**2)/4;\n", + "A2 = (math.pi*d2**2)/4;\n", + "v1 = Q/A1;\n", + "v2 = Q/A2;\n", + "\n", + "Rx = p1*A1 - p2*A2*math.cos(math.radians(x)) - rho*Q*(v2*math.cos(math.radians(x))-v1);\n", + "Ry = p2*A2*math.sin(math.radians(x)) + rho*Q*v2*math.sin(math.radians(x));\n", + "\n", + "print \"Resultant force on the bend (kN) :\",round((Rx**2 +Ry**2)**0.5/1000,3)\n", + "print \"Inclination of Resultant Force with x-direction (Degrees):\",round(math.atan(Ry/Rx)*180/math.pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force on the bend (kN) : 6.362\n", + "Inclination of Resultant Force with x-direction (Degrees): 31.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6, Page 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + "\n", + " #Initializing the variables \n", + "v = 4.9; #Velocity of Jet\n", + "rho = 1000; # Density of water\n", + "d = 0.05;\n", + "u = 1.2 # Velocity of tank\n", + " #Calculations\n", + "Vout = v;\n", + "Vin = 0;\n", + "m = rho*math.pi*d**2*v/4;\n", + "R = m*(Vout-Vin);\n", + "print \"Reaction of jet on tank (N) :\",round(R,2)\n", + "print \"Work done per second (W) :\",round(R*u,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reaction of jet on tank (N) : 47.14\n", + "Work done per second (W) : 56.57\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from scipy import integrate\n", + " \n", + " \n", + "\n", + " #Initializing the variables \n", + "Vj = 5*10**6; # Velocity of Jet\n", + "Mr = 150000; # Mass of Rocket\n", + "Mf0 = 300000; # Mass of initial fuel\n", + "Vr = 3000; # Velocity of jet relative to rocket\n", + "g = 9.81; # Acceleration due to gravity\n", + "\n", + " #Calculations\n", + "m = Vj/Vr; #Rate of fuel consumption\n", + "T = Mf0/m; # Burning time\n", + "\n", + "def f(t,m,Vr,Mr,Mf0,g):\n", + " return m*Vr /(Mr + Mf0 - m*t) - g;\n", + " \n", + "args = (5000/3,3000,150000,300000,9.81)\n", + "Vt = integrate.quad(f, 0.0, 180, args)\n", + "\n", + "def h(t,Vr,g):\n", + " return -g*t - Vr*math.log(1 - t/269.95);\n", + " \n", + "args = (3000,9.81)\n", + "Z1 = integrate.quad(h, 0.0, 180, args)\n", + "Z2 = Vt[0]**2/(2*g);\n", + "\n", + "print \"(a)Burning time (s) :\",T\n", + "print \"(b)Speed of rocket when all fuel is burned (m/s):\",round(Vt[0],2)\n", + "print \"(c)Maximum height reached (km) :\",round((Z2+Z1[0])/1000,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Burning time (s) : 180.0\n", + "(b)Speed of rocket when all fuel is burned (m/s): 1530.04\n", + "(c)Maximum height reached (km) : 203.8\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8, Page 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "V = 200; #Velocity in still air\n", + "Vr = 700; #velocity of gas relative to engine\n", + "mf = 1.1; # Fuel Consumption\n", + "r = 1/40 ; \n", + "P1 =0;\n", + "P2 = 0;\n", + "\n", + " #Calculations\n", + "m1 = mf/r;\n", + "T = m1*((1+r)*Vr -V);\n", + "print \"(a)Thrust (kN) :\",T/1000\n", + "\n", + "W = T*V;\n", + "print \"(b)Work done per second (kW) :\",W/1000\n", + "\n", + "Loss = 0.5*m1*(1+r)*(Vr-V)**2;\n", + "print \"(c)Efficiency (%) :\",round(W/(W+Loss)*100,1) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Thrust (kN) : 22.77\n", + "(b)Work done per second (kW) : 4554.0\n", + "(c)Efficiency (%) : 44.7\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10, Page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables \n", + "rho = 1000; # Density of water\n", + "Q = 10; #Acceleration of fluid\n", + "r2 = 1.6;\n", + "r1 = 1.2;\n", + "V1 = 2.3;\n", + "V2 = 0.2;\n", + "rot = 240; \n", + "\n", + " #Calculations\n", + "Tf = rho*Q*(V2*r2 - V1*r1);\n", + "T = -Tf;\n", + "n = rot / 60;\n", + "P = 2*round(math.pi,3)*n*T;\n", + "\n", + "print \"Torque exerted by fluid (N.m):\",T\n", + "print \"Theoretical power output (kW) :\",round(P/1000,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque exerted by fluid (N.m): 24400.0\n", + "Theoretical power output (kW) : 613.32\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb new file mode 100755 index 00000000..5cde4008 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb @@ -0,0 +1,504 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:df3153eb902c7efba51ed445ceefd3e3c02fa6ed938e4ef53fe06333d531bf11" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: The Energy Equation and its Applications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "Pc = 0; # Atmospheric Pressure\n", + "Z3 = 30+2; #height of nozzle\n", + "Ep = 50 ; #Energy per unit weight supplied by pump\n", + "d1 = 0.150; #Diameter of sump\n", + "d2 = 0.100; #Diameter of delivery pipe\n", + "d3 = 0.075 ; #Diameter of nozzle\n", + "g = 9.81; # Acceleration due to gravity\n", + "Z2 = 2; #Height of pump\n", + "rho = 1000; # Density of water\n", + "\n", + " #Calculations\n", + "U3 = (2*g*(Ep-Z3)/(1+5*(d3/d1)**4 + 12*(d3/d2)**4))**0.5;\n", + "U1 = U3/4;\n", + "Pb = rho*g*Z2 + 3*rho*U1**2;\n", + "print \"Velocity of Jet through nozzle (m/s) :\",round(U3,3)\n", + "print \"Pressure in the suction pipe at the inlet to the pump at B (kN/m^2) :\",round(Pb/1000,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of Jet through nozzle (m/s) : 8.314\n", + "Pressure in the suction pipe at the inlet to the pump at B (kN/m^2) : 32.58\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2, Page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + " #Initializing the variables \n", + "x = 45; # Inclination of pipe\n", + "l = 2; #Length of pipe under consideration\n", + "Ep = 50 ; #Energy per unit weight supplied by pump\n", + "d1 = 0.2; #Diameter of sump\n", + "d2 = 0.1; #Diameter of delivery pipe\n", + "g = 9.81; # Acceleration due to gravity\n", + "rho = 1000; # Density of water\n", + "V1 = 2;\n", + "RD_oil = 0.9; # relative density of oil\n", + "RD_Merc = 13.6; # Relative density of Mercury\n", + "\n", + " #Calculations\n", + "V2 = V1*(d1/d2)**2;\n", + "dZ = round(l*math.sin(math.radians(x)),3); # it is used in book as 1.414,by rounding so here also\n", + "rho_Oil = RD_oil*rho;\n", + "rho_Man = RD_Merc*rho;\n", + "dP = 0.5*rho_Oil*(V2**2-V1**2) + rho_Oil*g*dZ;\n", + "h = rho_Oil *( dP/(rho_Oil*g)- dZ)/(rho_Man - rho_Oil);\n", + "\n", + "print \"Pressure Difference(N/m2) : \",round(dP,0)\n", + "print \"Difference in the level of mercury (m):\",round(h,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Difference(N/m2) : 39484.0\n", + "Difference in the level of mercury (m): 0.217\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3, Page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "d1 = 0.25; #Pipeline diameter\n", + "d2 = 0.10; #Throat diameter\n", + "h =0.63; #Difference in height\n", + "rho = 1000; #Density of water\n", + "g = 9.81 #Acceleration due to gravity\n", + "\n", + " #Calculations\n", + "rho_Hg = 13.6*rho;\n", + "rho_Oil = 0.9*rho;\n", + "A1 = (math.pi*d1**2)/4; # Area at entry\n", + "m = (d1/d2)**2; #Area ratio\n", + "Q = (A1/(m**2-1)**0.5)*(2*g*h*(rho_Hg/rho_Oil -1))**0.5;\n", + "\n", + "print \"Thepretical Volume flow rate (m3/s ):\",round(Q,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thepretical Volume flow rate (m3/s ): 0.105\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "\n", + "x = 1.5;\n", + "y =0.5;\n", + "H = 1.2;\n", + "A = 650*10**-6;\n", + "Q =0.117;\n", + "g = 9.81;\n", + "\n", + " #Calculations\n", + "Cv =(x**2/(4*y*H))**0.5;\n", + "Cd = Q / (60*A*(2*g*H)**0.5);\n", + "Cc = Cd/Cv;\n", + "\n", + "\n", + "print \"Coefficient of velocity :\",round(Cv,3)\n", + "print \"Coefficient of Discharge :\",round(Cd,3)\n", + "print \"Coefficient of contraction :\",round(Cc,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of velocity : 0.968\n", + "Coefficient of Discharge : 0.618\n", + "Coefficient of contraction : 0.639\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "B = 0.7;\n", + "H1 = 0.4;\n", + "H2 = 1.9;\n", + "g =9.81;\n", + "z = 1.5 ; # height of opening\n", + "\n", + " #Calculations\n", + "Q_Th = 2/3 *B*(2*g)**0.5*(H2**1.5 - H1**1.5);\n", + "A = z*B;\n", + "h = 0.5*(H1+H2);\n", + "Q = A*(2*g*h)**0.5;\n", + "\n", + "print \"Percentage error in discharge (%):\",round((Q-Q_Th)*100/Q_Th,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage error in discharge (%): 1.98\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "Cd = 0.6; #Coefficient of discharge\n", + "Q = 0.28;\n", + "x = 90; #Theta\n", + "g = 9.81;\n", + "dH = 0.0015;\n", + "\n", + " #Calculations\n", + "H = (Q*(15/8)/(Cd*(2*g)**0.5*math.tan(math.radians(x/2))))**(2/5)\n", + "Frac_Q = 5/2 *( dH/H);\n", + "\n", + "print \"Percentage error in discharge(%)\",round(Frac_Q*100,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage error in discharge(%) 0.72\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "B = 0.9;\n", + "H = 0.25;\n", + "alpha = 1.1;\n", + "g = 9.81; \n", + "\n", + " #Calculations\n", + "Q = 1.84 * B * H**(3/2);\n", + "print \"Q(m3/s) :\",Q\n", + "\n", + "i = 1;\n", + "while(i <= 3):\n", + " v = Q /(1.2* (H+0.2));\n", + " print \"V(m/s) :\",round(v,4)\n", + " k = ((1 + alpha*v**2/(2*g*H))**1.5 -(alpha*v**2/(2*g*H))**1.5 );\n", + " Q = k* 1.84 * B * H**(3/2);\n", + " print \"Q(m3/s) :\",round(Q,4)\n", + " i = i+1;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q(m3/s) : 0.207\n", + "V(m/s) : 0.3833\n", + "Q(m3/s) : 0.2161\n", + "V(m/s) : 0.4001\n", + "Q(m3/s) : 0.2168\n", + "V(m/s) : 0.4016\n", + "Q(m3/s) : 0.2169\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8, Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "rho = 1000;\n", + "v = 66 ;\n", + "Q = 0.13;\n", + "g = 9.81; \n", + "z =240;\n", + "\n", + " #Calculations\n", + "P_Jet = 0.5*rho*v**2*Q;\n", + "P_Supp = rho*g*Q*z;\n", + "P_Lost = P_Supp -P_Jet;\n", + "h = P_Lost/(rho*g*Q);\n", + "eff = P_Jet/P_Supp;\n", + "\n", + "print \"Part(a) - power of the jet(kW): \",round(P_Jet/1000,2)\n", + "print \"Part(b) - power supplied from the reservoir (kW):\",round(P_Supp/1000,2) \n", + "print \"Part(C) - head used to overcome losses (m): \",round(h,2)\n", + "print \"Part(d) - Efficiency(%) : \",round(eff*100,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) - power of the jet(kW): 283.14\n", + "Part(b) - power supplied from the reservoir (kW): 306.07\n", + "Part(C) - head used to overcome losses (m): 17.98\n", + "Part(d) - Efficiency(%) : 92.5\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9, Page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from scipy import integrate\n", + "\n", + " #Initializing the variables \n", + "r1 = 0.2;\n", + "Z1 = 0.500;\n", + "Z2 = 0.340;\n", + "g = 9.81;\n", + "rho = 0.9*1000 ;\n", + "\n", + " #Calculations\n", + "r0 = r1*((2-2*Z2/Z1)**0.5);\n", + "omega = round((2*g*Z1/r0**2)**0.5,1)\n", + "\n", + "def G(r):\n", + " out =r**3 - r*r0**2;\n", + " return out\n", + " \n", + "results = integrate.quad(G, r0, r1)\n", + "\n", + "F = rho*omega**2*math.pi*results[0];\n", + "\n", + "print r0,r1\n", + "print \"Part(a) Speed of rotation (rad/s ):\",round(omega,1)\n", + "print \"Part(b) Upward force on the cover (N): \",round(F,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.16 0.2\n", + "Part(a) Speed of rotation (rad/s ): 19.6\n", + "Part(b) Upward force on the cover (N): 56.3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10, Page 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "Ra = 0.2;\n", + "Rb = 0.1;\n", + "H = 0.18;\n", + "Za = 0.125;\n", + "\n", + " #Calculations\n", + "Y = Ra**2*(H-Za);\n", + "Zb = H - Y/Rb**2;\n", + "\n", + "print \"Height above datum of a point B on the free surface at a radius of 100 mm (mm):\",Zb*1000" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height above datum of a point B on the free surface at a radius of 100 mm (mm): -40.0\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb new file mode 100755 index 00000000..95848de2 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb @@ -0,0 +1,221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:58b7373e6785b57ec4db0eaf49754884e3dad15de9e9489fc1c2bb500d413f82" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Two-Dimentional Idea Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables \n", + "x = 120; #Theta\n", + "r = 1;\n", + "v0 = 0.5;\n", + "q = 2;\n", + "theta =120;\n", + "\n", + " #Calculations\n", + "Vr = v0*r*math.cos(math.radians(theta)) +q/(2*math.pi)\n", + "Vth = -v0*math.sin(math.radians(theta))\n", + "V = (Vr**2+Vth**2)**0.5;\n", + "alpha = math.atan(abs(Vth/Vr));\n", + "bet = x-alpha*180/math.pi;\n", + "\n", + "\n", + "print \"Fluid Velocity(m/s) :\",round(V,3)\n", + "print \"Beta (Degree) :\",round(bet,2)\n", + "print \"Alpha (Degree) :\",round(alpha*180/math.pi,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fluid Velocity(m/s) : 0.438\n", + "Beta (Degree) : 38.96\n", + "Alpha (Degree) : 81.04\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "import sympy\n", + "from sympy import RootOf, I, Symbol\n", + " #Initializing the variables \n", + "q = 10;\n", + "def shi(x,y):\n", + " Z = (q/2/math.pi)*(math.atan(y/(x-1))-math.atan(y/(x+1))) - 25*y;\n", + " return Z\n", + "h = 0.0000001;\n", + "Vinf = 25;\n", + "x=Symbol('x')\n", + " #Calculations\n", + "#f = lambda x : x**2 - 2/(5*math.pi) -1\n", + "result = [RootOf(x**2- 2/(5*math.pi) -1,i) for i in (0,1)] \n", + "\n", + "root1=round(result[0],3)\n", + "root2=round(result[1],3)\n", + "l = abs(abs(root1)+abs(root2));\n", + "Ymax = 0.047;\n", + "width = 2*Ymax;\n", + "Vx = (shi(1-h,1)-shi(1-h,1-h))/h; # At x=1 the function atan is not defined hence taking x a little smaller.\n", + "Vy = -1*(shi(1-2*h,1)-shi(1-h,1))/h; # At x=1 the function atan is not defined hence taking x a little smaller.\n", + "\n", + "V = (Vx**2+Vy**2)**0.5;\n", + "rho = Symbol('rho')\n", + "dP = rho/2*round((V**2 - Vinf**2),2); #difference in pressure\n", + "\n", + "print \"Pressure Difference (N/m2) :\",dP\n", + "print \"Velocity (m/s) :\",round(V,2)\n", + "print \"Length of Rankine Body(m) :\",l\n", + "print \"Width of Rankine Body (m) :\",width" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Difference (N/m2) : 16.93*rho\n", + "Velocity (m/s) : 25.67\n", + "Length of Rankine Body(m) : 2.124\n", + "Width of Rankine Body (m) : 0.094\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4, Page 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math #Example 7.4\n", + "\n", + " #Initializing the variables\n", + "a = 0.02;\n", + "r = 0.05;\n", + "V0 = 1;\n", + "x = 135; # Theta\n", + "def shi(r,x):\n", + " Z = V0*math.sin(math.radians(x))*(r-((a**2)/r));\n", + " return Z\n", + "h = 0.0001;\n", + "\n", + " #Calculations\n", + "Vr = 57*(shi(r,x+h)-shi(r,x))/(r*h);\n", + "Vx = -1*(shi(r+h,x)-shi(r,x))/h;\n", + "\n", + "print \"Radial Velocity (m/s) :\",round(Vr,3)\n", + "print \"Normal component of velocity (m/s):\",round(Vx,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radial Velocity (m/s) : -0.591\n", + "Normal component of velocity (m/s): -0.82\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "rho = 1000;\n", + "r = 2;\n", + "psi = 2*math.log(r);\n", + "\n", + " #Calculations\n", + "y = psi/math.log(r); # y = GammaC / 2*pi\n", + "v = y/r;\n", + "dPbydr = rho*v**2/r;\n", + "print \"Pressuer Gradient (N/m3 ) :\",dPbydr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressuer Gradient (N/m3 ) : 500.0\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb new file mode 100755 index 00000000..cd940a0c --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb @@ -0,0 +1,73 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b0713ad3f7c2f18448b69f687926b2d86e094144766f7b44f7fc20525a516074" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Dimensional Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "P1 = 57; #Power in SI\n", + "M = 1/14.6; #Ratio of mass in SI/British\n", + "L = 1/0.3048; #Ratio of length in SI/British\n", + "T = 1; #Ratio of time in SI/British\n", + "\n", + "#Calculations\n", + "'''\n", + "n1 is the horsepower and N1 is the corresponding number of British units (ft*lbf/second),\n", + "then N1 = 550*n1.\n", + "Similarly, for the SI system, n2 in kW,\n", + " N2 = 1000*n2\n", + "''' \n", + "N = (T**3)/(M*L**2) # N2/N1\n", + "n = N*550/1000 #n2/n1 \n", + "P2 = n*P1 ; #Power in kW\n", + "\n", + "print \"Power in kW :\",round(P2,1)\n", + "print \"Conversion Factor :\",round(n,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power in kW : 42.5\n", + "Conversion Factor : 0.746\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb new file mode 100755 index 00000000..5d9fe9d6 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb @@ -0,0 +1,337 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38d704564aa6536fc6da296a78f2a33e8cb9eb20a3ce0fa8f700546de7fd07b5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Similarity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "\n", + "\n", + " #Initializing the variables\n", + "Vp = 10;\n", + "LpByLm = 20;\n", + "rhoPbyRhoM = 1;\n", + "muPbymuM = 1;\n", + " #Calculations\n", + "Vm = Vp*LpByLm*rhoPbyRhoM*muPbymuM;\n", + " \n", + "print \"Mean water tunnel flow velocity (m/s) :\",Vm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean water tunnel flow velocity (m/s) : 200\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + "\n", + " #Initializing the variables\n", + "Vp = 3;\n", + "LpByLm = 30;\n", + "rhoPbyRhoM = 1;\n", + "muPbymuM = 1;\n", + "\n", + " #Calculations\n", + "Vm = Vp*LpByLm*rhoPbyRhoM*muPbymuM;\n", + " \n", + "print \"Mean water tunnel flow velocity (m/s):\",Vm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean water tunnel flow velocity (m/s): 90\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + "\n", + " #Initializing the variables\n", + "Vp = 100;\n", + "cP = 340;\n", + "cM = 295;\n", + "rhoM = 7.7;\n", + "rhoP = 1.2;\n", + "muM = 1.8*10**-5;\n", + "muP = 1.2*10**-5;\n", + "\n", + " #Calculations\n", + "Vm = Vp*(cM/cP);\n", + "LmByLp = 1/((Vm/Vp)*(muM/muP)*(rhoM/rhoP));\n", + "FmByFp = (rhoM/rhoP)*(Vm/Vp)**2*(LmByLp)**2;\n", + "\n", + "print 'Mean wind tunnel flow velocity(m/s) :',round(Vm,2)\n", + "print \"Percentage ratio of forces (%) :\",round(FmByFp*100,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean wind tunnel flow velocity(m/s) : 86.76\n", + "Percentage ratio of forces (%) : 6.93\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + "\n", + " #Initializing the variables\n", + "def pLossRatio(RatRho,RatMu,RatL):\n", + " Z = RatRho*RatMu**2*RatL**2;\n", + " return Z\n", + "\n", + " #Calculations\n", + " #Case (a) : water is used\n", + "RatRho = 1;\n", + "RatMu = 1;\n", + "RatL = 10;\n", + "print \"(a)Ratio of pressure losses between the model and the prototype if water is used :\",pLossRatio(RatRho,RatMu,RatL)\n", + "\n", + "# Case (b) : air is used\n", + "RatRho = 1000/1.23;\n", + "RatMu = 1.8*10**-5/10**-3;\n", + "\n", + "print \"(b)Ratio of pressure losses between the model and the prototype if air is used :\",round(pLossRatio(RatRho,RatMu,RatL),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Ratio of pressure losses between the model and the prototype if water is used : 100\n", + "(b)Ratio of pressure losses between the model and the prototype if air is used : 26.34\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5, Page 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + " #Initializing the variables\n", + "scale = 1/50;\n", + "ratArea = scale**2;\n", + "Qp = 1200;\n", + "\n", + " #Calculations\n", + "LmByLp = (ratArea)**0.5;\n", + "VmByVp = (LmByLp)**0.5;\n", + "Qm = Qp*ratArea*VmByVp;\n", + "\n", + "print \"Water flow rate (m3/s ):\",round(Qm,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Water flow rate (m3/s ): 0.068\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6, Page 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + " #Initializing the variables\n", + "Qa = 2;\n", + "Na = 1400;\n", + "rhoA = 0.92;\n", + "rhoS = 1.3;\n", + "DaByDs = 1;\n", + "dPa = 200;\n", + "\n", + " #Calculations\n", + "Ns = Na*(rhoA/rhoS)*(DaByDs);\n", + "Qs = Qa*(Ns/Na);\n", + "dPs = dPa *(rhoS/rhoA)*(Ns/Na)**2*(1/DaByDs)**2;\n", + "\n", + "print \"Fan test speed (rev/s):\",round(Ns,1)\n", + "print \"Flow rate (m3/s) :\",round(Qs,3)\n", + "print \"Pressure rise (N/m2 ) :\",round(dPs,1) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fan test speed (rev/s): 990.8\n", + "Flow rate (m3/s) : 1.415\n", + "Pressure rise (N/m2 ) : 141.5\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + " \n", + "\n", + " #Initializing the variables\n", + "V = 300 # Volume rate\n", + "w = 3;\n", + "d = 65;\n", + "l = 30;\n", + "scaleH = 30/1000/18;\n", + "scaleV = 1/60;\n", + "ZmByZr = 1/60;\n", + "LmByLr = 1/600;\n", + "rho = 1000;\n", + "mu = 1.14*10**-3;\n", + "\n", + " #Calculations\n", + "Vr = V/(w*d); \n", + "Vm =Vr*(ZmByZr)**0.5;\n", + "m = (w*d*scaleH*scaleV)/(d*scaleH + 2*w*scaleV);\n", + "Rem = rho*Vm*m/mu;\n", + "TmByTr = LmByLr*(1/ZmByZr)**0.5;\n", + "Tm = 12.4*60*TmByTr;\n", + "\n", + "\n", + "\n", + "print \"Tidal Period (minutes):\",round(Tm,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tidal Period (minutes): 9.6\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/README.txt b/Fluid_Mechanics_by_John_F_Douglas/README.txt new file mode 100755 index 00000000..d96dbe87 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ashish Kumar +Course: btech +College/Institute/Organization: IITB +Department/Designation: Aerospace Engg. +Book Title: Fluid Mechanics +Author: John F. Douglas +Publisher: Pearson Education +Year of publication: 2005 +Isbn: 978-0-13-129293-2 +Edition: 5th \ No newline at end of file diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png new file mode 100755 index 00000000..03ac1d9d Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png new file mode 100755 index 00000000..7f1e98ab Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png new file mode 100755 index 00000000..1b4c7079 Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png new file mode 100755 index 00000000..66f3995c Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/incresepressure.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/incresepressure.png new file mode 100755 index 00000000..aaeed6e9 Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/incresepressure.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png new file mode 100755 index 00000000..caf0a78f Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png new file mode 100755 index 00000000..35633e7f Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn.png new file mode 100755 index 00000000..1b513465 Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn.png differ diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn_1.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn_1.png new file mode 100755 index 00000000..359a0fa5 Binary files /dev/null and b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn_1.png differ diff --git a/Fluid_Power_With_Applications_by_A._Esposito/README.txt b/Fluid_Power_With_Applications_by_A._Esposito/README.txt old mode 100644 new mode 100755 diff --git a/Fluid_mechanics/Chapter_10.ipynb b/Fluid_mechanics/Chapter_10.ipynb deleted file mode 100755 index bdfb09f7..00000000 --- a/Fluid_mechanics/Chapter_10.ipynb +++ /dev/null @@ -1,234 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8ebaaa4d9fc694c6b4303418dc1faf3eef2d83f1637b122e018c6c5eac0aba66" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 - Dynamic lift" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2a - Pg 427" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the max. theoretical propulsive force\n", - "#Initialization of variables\n", - "import math\n", - "vel=50. #mph\n", - "w=240. #rpm\n", - "r0=3. #ft\n", - "L=30. #ft\n", - "rho=0.00230 #slug/ft^2\n", - "theta=30*math.pi/180. #radians\n", - "#calculations\n", - "V=vel*5280./3600.\n", - "T=2*math.pi*r0*r0 *w*2*math.pi/60.\n", - "Fl=rho*V*T*L\n", - "F=r0*Fl*math.cos(theta)\n", - "#results\n", - "print '%s %d %s' %(\"Max. theoretical porpulsive force =\",F,\"lb\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Max. theoretical porpulsive force = 18683 lb\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2b - Pg 428" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the force required for the operation\n", - "#Initialization of variables\n", - "import math\n", - "vel=50. #mph\n", - "w=240. #rpm\n", - "r0=3. #ft\n", - "L=30. #ft\n", - "rho=0.00230 #slug/ft^2\n", - "theta=30*math.pi/180. #radians\n", - "Cl=2\n", - "Cd=1\n", - "#calculations\n", - "vc=r0*w\n", - "V=vel*5280./3600.\n", - "vr=vc/V\n", - "A=2*r0*L\n", - "Fl=Cl*A*0.5*rho*V*V \n", - "Fd=Cd*A*0.5*rho*V*V\n", - "F=r0*(Fl*math.cos(theta) + Fd*math.sin(theta))\n", - "#results\n", - "print '%s %d %s' %(\"Force required =\",F,\"lb\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Force required = 7454 lb\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3a - Pg 432" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the boundary circulation\n", - "#Initialization of variables\n", - "W=7500 #pounds\n", - "rho=0.00230\n", - "V=175*5280/3600 #ft/s\n", - "B=50\n", - "#calculations\n", - "T=W/(rho*V*B)\n", - "#results\n", - "print '%s %d %s' %(\"Boundary circulation =\",T,\"ft^2/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Boundary circulation = 254 ft^2/s\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3b - Pg 433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horsepower required for the operation\n", - "#Initialization of variables\n", - "W=7500. #pounds\n", - "rho=0.00230\n", - "V=175*5280./3600. #ft/s\n", - "B=50.\n", - "A=350. #ft^2\n", - "#calculations\n", - "Cl=W/(A*0.5*rho*V*V)\n", - "Cd=0.03\n", - "Fd=Cd*A*0.5*rho*V*V \n", - "hp=Fd*V/550.\n", - "#results\n", - "print '%s %d %s' %(\"Horsepower required =\",hp,\"hp\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horsepower required = 371 hp\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 437" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horsepower required for the operation\n", - "#Initialization of variables\n", - "import math\n", - "Fl=7500. #pounds\n", - "rho=0.00230\n", - "V=175*5280./3600. #ft/s\n", - "B=50\n", - "A=350 #ft^2\n", - "#calculations\n", - "Vi=2*Fl/(math.pi*rho*V*B*B)\n", - "Cl=Fl/(A*0.5*rho*V*V)\n", - "Cdi=Cl*Vi/(V)\n", - "Fdi=Cdi*A*0.5*rho*V*V\n", - "hp=Fdi*V/550\n", - "#results\n", - "print '%s %.1f %s' %(\"Horsepower required =\",hp,\"hp\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horsepower required = 44.1 hp\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_11.ipynb b/Fluid_mechanics/Chapter_11.ipynb deleted file mode 100755 index ec13c1a6..00000000 --- a/Fluid_mechanics/Chapter_11.ipynb +++ /dev/null @@ -1,485 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:525b51e826bc42c9a4490de8234c350df60c3a09744a8e35af1f480f12f531bc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 - Flow of liquids in open channels" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1a - Pg 454" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge using darcy equation\n", - "#Initialization of variables\n", - "import math\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #lb-sec/ft^2\n", - "y=5 #ft\n", - "T=25 #ft\n", - "d=10 #ft\n", - "slope=3./2. \n", - "g=32.2 #ft/s^2\n", - "S=0.001\n", - "#calculations\n", - "A=y*d+ 2*0.5*y*(slope*y)\n", - "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", - "R=A/WP\n", - "e=0.01 #ft\n", - "rr=2*R/e\n", - "f=0.019\n", - "C=math.sqrt(8*g/f)\n", - "V=C*math.sqrt(R*S)\n", - "Q=V*A\n", - "#results\n", - "print '%s %.1f %s' %(\"Discharge using Darcy equation =\",Q,\"ft^3/s\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge using Darcy equation = 569.3 ft^3/s\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1b - Pg 453" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge using kutter ganguillet method\n", - "#Initialization of variables\n", - "import math\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #lb-sec/ft^2\n", - "y=5 #ft\n", - "T=25 #ft\n", - "d=10 #ft\n", - "slope=3./2. \n", - "g=32.2 #ft/s^2\n", - "S=0.001\n", - "n=0.017\n", - "#calculations\n", - "A=y*d+ 2*0.5*y*(slope*y)\n", - "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", - "R=A/WP\n", - "e=0.01 #ft\n", - "rr=2*R/e\n", - "f=0.019\n", - "C=(41.65 + 0.00281/S + 1.811/n)/(1+( 41.65 + 0.00281/S)*n/math.sqrt(R))\n", - "V=C*math.sqrt(R*S)\n", - "Q=V*A\n", - "#results\n", - "print '%s %.1f %s' %(\"Discharge using kutter ganguillet formula =\",Q,\" ft^3/s\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge using kutter ganguillet formula = 517.0 ft^3/s\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1c - Pg 455" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge using bazin formula\n", - "#Initialization of variables\n", - "import math\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #lb-sec/ft^2\n", - "y=5. #ft\n", - "T=25. #ft\n", - "d=10. #ft\n", - "slope=3./2.\n", - "g=32.2 #ft/s^2\n", - "S=0.001\n", - "m=0.21\n", - "#calculations\n", - "A=y*d+ 2*0.5*y*(slope*y)\n", - "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", - "R=A/WP\n", - "e=0.01 #ft\n", - "rr=2*R/e\n", - "f=0.019\n", - "C=157.6 /(1+ m/math.sqrt(R))\n", - "V=C*math.sqrt(R*S)\n", - "Q=V*A\n", - "#results\n", - "print '%s %.1f %s' %(\"Discharge using bazin formula =\",Q,\" ft^3/s\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge using bazin formula = 688.7 ft^3/s\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1d - Pg 456" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge using darcy equation\n", - "#Initialization of variables\n", - "import math\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #lb-sec/ft^2\n", - "y=5. #ft\n", - "T=25. #ft\n", - "d=10. #ft\n", - "slope=3./2. \n", - "g=32.2 #ft/s^2\n", - "S=0.001\n", - "n=0.017\n", - "#calculations\n", - "A=y*d+ 2*0.5*y*(slope*y)\n", - "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", - "R=A/WP\n", - "e=0.01 #ft\n", - "rr=2*R/e\n", - "f=0.019\n", - "C=1.486*math.pow(R,(1./6.)) /n\n", - "V=C*math.sqrt(R*S)\n", - "Q=V*A\n", - "#results\n", - "print '%s %.1f %s' %(\"Discharge using Darcy equation =\",Q,\"ft^3/s\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge using Darcy equation = 516.6 ft^3/s\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1e - Pg 456" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the froude number\n", - "#Initialization of variables\n", - "import math\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #lb-sec/ft^2\n", - "y=5. #ft\n", - "T=25. #ft\n", - "d=10. #ft\n", - "slope=3./2. \n", - "g=32.2 #ft/s^2\n", - "S=0.001\n", - "n=0.017\n", - "#calculations\n", - "A=y*d+ 2*0.5*y*(slope*y)\n", - "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", - "R=A/WP\n", - "e=0.01 #ft\n", - "rr=2*R/e\n", - "f=0.019\n", - "C=(41.65 + 0.00281/S + 1.811/n)/(1+( 41.65 + 0.00281/S)*n/math.sqrt(R))\n", - "V=C*math.sqrt(R*S)\n", - "T=d+ 2*(slope*y)\n", - "yh=A/T\n", - "Nf=V/(math.sqrt(g*yh))\n", - "#results\n", - "print '%s %.2f' %(\"froude number = \",Nf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "froude number = 0.56\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1f - Pg 456" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the critical depth\n", - "#Initialization of variables\n", - "import math\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #lb-sec/ft^2\n", - "y=5. #ft\n", - "T=25. #ft\n", - "d=10. #ft\n", - "slope=3./2. \n", - "g=32.2 #ft/s^2\n", - "S=0.001\n", - "n=0.017\n", - "#calculations\n", - "A=y*d+ 2*0.5*y*(slope*y)\n", - "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", - "R=A/WP\n", - "e=0.01 #ft\n", - "rr=2*R/e\n", - "f=0.019\n", - "C=(41.65 + 0.00281/S + 1.811/n)/(1+( 41.65 + 0.00281/S)*n/math.sqrt(R))\n", - "V=C*math.sqrt(R*S)\n", - "Q=V*A\n", - "T=d+ 2*(slope*y)\n", - "yh=A/T\n", - "yc=2.88 #ft\n", - "#results\n", - "print '%s' %(\"yc is obtained using trial and error method\")\n", - "print '%s %.2f %s' %(\"Critical depth =\",yc,\"ft\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "yc is obtained using trial and error method\n", - "Critical depth = 2.88 ft\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 459" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the minimum scale ratio\n", - "#Initialization of variables\n", - "import math\n", - "Re=4000.\n", - "rho=1.94 #slugs/ft^3\n", - "vm=5.91 #ft/s\n", - "mu=3.24e-5 #ft-lb/s^2\n", - "Rm=3.12 #ft\n", - "#calculations\n", - "lam3=Re*mu/(vm*4*Rm*rho)\n", - "lam=math.pow(lam3,(2./3.))\n", - "#results\n", - "print '%s %.2e' %(\"Minimum scale ratio = \",lam)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum scale ratio = 9.36e-03\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 462" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge, depth of the channel, froude numbers and also the force applied\n", - "#Initialization of variables\n", - "import math\n", - "yc=2. #ft\n", - "g=32.2 #ft/s^2\n", - "d=10. #ft\n", - "gam=62.4\n", - "rho=1.94\n", - "B=10. #ft\n", - "#calculations\n", - "Vc=math.sqrt(g*yc)\n", - "Ac=yc*d\n", - "Q=Vc*Ac\n", - "y1=5.88 #ft\n", - "y2=0.88 #ft\n", - "V1=2.73 #ft/s\n", - "V2=18.25 #ft/s\n", - "Nf1=0.198\n", - "Nf2=3.43\n", - "F= 0.5*gam*y1*y1 *B - 0.5*gam*y2*y2 *B - Q*rho*V2 +Q*rho*V1\n", - "#results\n", - "print '%s %.1f %s' %(\"Discharge in the channel =\",Q,\"ft^3/s\")\n", - "print '%s %.2f %s %.2f %s' %(\"\\n Depth of the channel at upstream and downstream =\",y1,\"ft and\",y2, \"ft\")\n", - "print '%s %.3f %s %.3f' %(\"\\n froude numbers at upstream and downstream =\",Nf1,\" and \",Nf2)\n", - "print '%s %d %s' %(\"\\n Force applied =\",F,\"lb\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge in the channel = 160.5 ft^3/s\n", - "\n", - " Depth of the channel at upstream and downstream = 5.88 ft and 0.88 ft\n", - "\n", - " froude numbers at upstream and downstream = 0.198 and 3.430\n", - "\n", - " Force applied = 5713 lb\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 470" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the distance from vena contracta and also the total distance\n", - "#Initialization of variables\n", - "import math\n", - "S0=0.0009\n", - "n=0.018\n", - "w=20 #ft\n", - "d=0.5 #ft\n", - "Q=400 #ft^3/s\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "y2=4 #ft\n", - "V2=Q/(w*y2)\n", - "Nf2=V2/math.sqrt(g*y2)\n", - "yr=0.5*(math.sqrt(1+ 8*Nf2*Nf2) -1)\n", - "y1=yr*y2\n", - "L1=32.5\n", - "L2=37.1 \n", - "L3=51.4\n", - "L=L1+L2+L3\n", - "#results\n", - "print '%s %.1f %s %.2f %s' %(\"distance from vena contracta =\",y2,\"ft and\",y1,\"ft\")\n", - "print '%s %.1f %s' %(\"\\n Total distance =\",L,\" ft\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "distance from vena contracta = 4.0 ft and 1.20 ft\n", - "\n", - " Total distance = 121.0 ft\n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_2.ipynb b/Fluid_mechanics/Chapter_2.ipynb deleted file mode 100755 index f518cad4..00000000 --- a/Fluid_mechanics/Chapter_2.ipynb +++ /dev/null @@ -1,406 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8249f270a6314fb49f84df63266820d87dfa51fe64fed0b9dd11afa539cb500b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Fluid Statics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the final pressure and specific weight of the gas\n", - "#Initialization of variables\n", - "import math\n", - "gam=0.0765 #lb/ft^3\n", - "p=14.7 #psia\n", - "dz=10560. #ft\n", - "#calculations\n", - "pg=p*144./gam\n", - "p2=p*math.exp(-dz/pg)\n", - "gam2=p2/p*gam\n", - "#results\n", - "print '%s %.2f %s' %(\"Final pressure =\",p2,\"psia\")\n", - "print '%s %.4f %s' %(\"\\n Final specific weight =\",gam2,\"lb/ft^3\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final pressure = 10.04 psia\n", - "\n", - " Final specific weight = 0.0522 lb/ft^3\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the final pressure and specific weight\n", - "#Initialization of variables\n", - "import math\n", - "gam=0.0765 #lb/ft^3\n", - "p=14.7 #psia\n", - "dz=10560. #ft\n", - "n=1.235\n", - "#calculations\n", - "pg=p*144./gam\n", - "p2=p*math.pow((1- dz/pg *(n-1)/n),(n/(n-1)))\n", - "gam2=math.pow((p2/p),(1/n)) *gam\n", - "#results\n", - "print '%s %.2f %s' %(\"Final pressure =\",p2,\"psia\")\n", - "print '%s %.4f %s' %(\"\\n Final specific weight =\",gam2,\"lb/ft^3\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final pressure = 9.89 psia\n", - "\n", - " Final specific weight = 0.0555 lb/ft^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the absolute pressure\n", - "#Initialization of variables\n", - "pb=28.5 #in mercury\n", - "d=13.6 #g/cc\n", - "gam=62.4\n", - "pobs=-4. #psi\n", - "#calculations\n", - "patm=pb/12. *gam*d/144.\n", - "pabs=patm+pobs\n", - "P=pabs*144./gam\n", - "#results\n", - "print '%s %.1f %s' %(\"Absolute pressure =\",pabs,\"psia\")\n", - "print '%s %.1f %s' %(\"\\n Absolute pressure in feet of water =\",P,\"ft of water\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Absolute pressure = 10.0 psia\n", - "\n", - " Absolute pressure in feet of water = 23.1 ft of water\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure gauge at B and also the absolute pressure of air\n", - "#Initialization of variables\n", - "pb=28. #in mercury\n", - "d=13.6 #g/cc\n", - "gam=62.4\n", - "xm=15. #in\n", - "xw=10. #in\n", - "patm=28. #in\n", - "#calculations\n", - "pB=-xm/12 *gam/144 *d + xw*gam/144\n", - "pair=patm/12 *gam/144 *d - xm/12 *gam/144 *d\n", - "#results\n", - "print '%s %.2f %s' %(\"The pressure gauge at B indicates a reading of\",-pB,\"psi vacuum\")\n", - "print '%s %.2f %s' %(\"\\n Absolute pressure of Air =\",pair,\"psia\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The pressure gauge at B indicates a reading of 3.03 psi vacuum\n", - "\n", - " Absolute pressure of Air = 6.38 psia\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure difference and also compare the pressures at A and B\n", - "#Initialization of variables\n", - "pb=28.5 #in mercury\n", - "d=13.6 #g/cc\n", - "gam=62.4\n", - "xm=10. #in\n", - "xw=2. #ft\n", - "#calculations\n", - "dp= xw*gam/144 - xm/12 *gam/144 + xm/12 *gam/144 *d\n", - "#results\n", - "print '%s %.2f %s' %(\"Pressure difference =\",dp,\"psi\")\n", - "if dp>0:\n", - " print '%s' %(\"\\n Pressure at A is greater than that at B\")\n", - "elif dp==0:\n", - " print '%s' %(\"\\n Pressure at both A and B are equal\")\n", - "else:\n", - " print '%s' %(\"\\n Pressure at A is less than that at B\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure difference = 5.42 psi\n", - "\n", - " Pressure at A is greater than that at B\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the magnitude of total force, vertical and horiontal locations of the total force.\n", - "#Initialization of variables\n", - "import math\n", - "import scipy\n", - "from scipy import integrate\n", - "gam=62.4\n", - "x1=4. #ft\n", - "x2=6. #ft\n", - "y1=6. #ft\n", - "z=8. #ft\n", - "dy=1. #ft\n", - "angle=60.*math.pi/180. #radians\n", - "#calculations\n", - "A1=x1*x2\n", - "A2=1/2. *y1*y1\n", - "yc = (A1*(x1+x2+dy) + A2*(x1+x2))/(A1+A2)\n", - "hc=yc*math.sin(angle)\n", - "F=hc*gam*(A1+A2)\n", - "ic1=1/12. *x1*y1*y1*y1\n", - "ic2=1/36. *y1*x2*x2*x2\n", - "ad1=A1*(x1+x2+dy-yc)*(x1+x2+dy-yc)\n", - "ad2=A2*(x1+x2-yc)*(x1+x2-yc)\n", - "It=ic1+ic2+ad1+ad2\n", - "ydc=It/(yc*(A1+A2))\n", - "def momen(u):\n", - " m= gam*math.sin(angle) *(2*x1+u)*0.5*(x2-u)*(y1-u)\n", - " return m;\n", - "\n", - "MED, err =scipy.integrate.quad( momen,0,y1)\n", - "FEDC=gam*math.sin(angle) *A2*(x1+x2)\n", - "xed=MED/FEDC\n", - "xp= (A1*2*(x1+x2+dy) + (x1+x2)*(A2)*(x1+xed))/(A1*(x1+x2+dy) + A2*(x1+x2))\n", - "#results\n", - "print '%s %d %s' %(\"Magnitude of total force =\",F,\"lb\")\n", - "print '%s %.3f %s' %(\"\\n Vertical location of force =\",ydc,\"ft\")\n", - "print '%s %.2f %s' %(\"\\n Horizontal location of force =\",xp,\"ft from AB\")\n", - "print '%s' %(\"\\n Direction of force is perpendicular to the plane surface\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of total force = 23993 lb\n", - "\n", - " Vertical location of force = 0.266 ft\n", - "\n", - " Horizontal location of force = 3.58 ft from AB\n", - "\n", - " Direction of force is perpendicular to the plane surface\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the magnitude of force and the horizontal distance from line of action of Fv\n", - "#Initialization of variables\n", - "import math\n", - "gam=62.4\n", - "z=10. #ft\n", - "z2=5. #ft\n", - "z3=4.25 #ft\n", - "p=2. #psig\n", - "#calculations\n", - "h=p*144./gam\n", - "Av=z*z\n", - "Fh=gam*(z+h)*Av\n", - "hpc=1/12. *z*z*z*z /((h+z)*z*z)\n", - "Fv=gam*(z2+h) *z*z + gam*math.pi/4. *z*z *z\n", - "xp= (gam*(z2+h) *z*z *z2 + gam*math.pi/4. *z*z *z*z3)/(Fv)\n", - "F=math.sqrt(Fh*Fh + Fv*Fv)\n", - "#results\n", - "print '%s %d %s' %(\"Magnitude of force =\",F,\"lb\")\n", - "print '%s %.2f %s' %(\"\\n horizontal distance from line of action of Fv =\",xp,\"ft from AG\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of force = 142127 lb\n", - "\n", - " horizontal distance from line of action of Fv = 4.66 ft from AG\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate whether the barge is stable and also find the location of the metacenter\n", - "#Initialization of variables\n", - "import math\n", - "gam=0.0765 #lb/ft^3\n", - "l=40. #ft\n", - "w=16. #ft\n", - "d=8. #ft\n", - "z=6. #ft\n", - "BG=1. #ft\n", - "#calculations\n", - "I=1/12. *l*w*w*w\n", - "V=l*w*z\n", - "IVG=I/V - BG\n", - "MB=I/V\n", - "#results\n", - "print '%s %.2f %s' %(\"I/V -BG =\",IVG,\"ft \")\n", - "if IVG >0:\n", - " print '%s' %(\"\\n Barge is stable\")\n", - "else:\n", - " print '%s' %(\"\\n The barge is unstable\")\n", - "\n", - "print '%s %.2f %s' %(\"\\n Location of metacenter =\",MB,\"ft above the center of buoyancy \")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "I/V -BG = 2.56 ft \n", - "\n", - " Barge is stable\n", - "\n", - " Location of metacenter = 3.56 ft above the center of buoyancy \n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_3.ipynb b/Fluid_mechanics/Chapter_3.ipynb deleted file mode 100755 index 8d368fbf..00000000 --- a/Fluid_mechanics/Chapter_3.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dee9d655eeb9028db41fd96e05f9acf5955fd88886936fffc7d4e9aa14bb4a71" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3 - Fluid Kinematics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the mean velocity of flow at both the sections\n", - "#Initialization of variables\n", - "import math\n", - "gam=0.0765 #lb/ft^3\n", - "Q=100. #ft^3/sec\n", - "d1=2.5 #ft\n", - "d2=9. #in\n", - "l=12. #ft\n", - "#calculations\n", - "A1=math.pi/4. *d1*d1\n", - "V1=Q/A1\n", - "A2=math.pi*l*d2/12.\n", - "V2=Q/A2\n", - "#results\n", - "print '%s %.1f %s' %(\"Mean velocity of flow at section 1 =\",V1,\"ft/sec\")\n", - "print '%s %.2f %s' %(\"\\n Mean velocity of flow at section 2 =\",V2,\"ft/sec\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mean velocity of flow at section 1 = 20.4 ft/sec\n", - "\n", - " Mean velocity of flow at section 2 = 3.54 ft/sec\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horizontal and vertical components of velocity\n", - "#Initialization of variables\n", - "x=3. \n", - "y=1.\n", - "#calculations\n", - "u=-3*y*y\n", - "v=-6*x\n", - "#results\n", - "print '%s %d' %(\"Horizontal component of velocity = \",u)\n", - "print '%s %d' %(\"\\n vertical component of velocity = \",v)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horizontal component of velocity = -3\n", - "\n", - " vertical component of velocity = -18\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_4.ipynb b/Fluid_mechanics/Chapter_4.ipynb deleted file mode 100755 index 49f2ce7e..00000000 --- a/Fluid_mechanics/Chapter_4.ipynb +++ /dev/null @@ -1,777 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:bf4ed226827aaf378bd6d43d8ae5845adf36d75f20c124d2087db252462cf40c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4 - Fluid Dynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate dp/ds at both upper and lower ends\n", - "#Initialization of variables\n", - "rho=1.5 #g/cc\n", - "g=32.2 #ft/s^2\n", - "dzds=-0.5\n", - "x1=0\n", - "x2=3\n", - "#calculations\n", - "def func(s):\n", - " dpds=-rho*g*dzds - rho*(3+9*s)*9\n", - " return dpds\n", - "\n", - "r1=func(x1)\n", - "r2=func(x2)\n", - "#results\n", - "print '%s %.1f %s' %(\"At the upper end, dp/ds =\",r1,\"lb/ft^2 per foot\")\n", - "print '%s %.1f %s' %(\"\\n At the lower end, dp/ds =\",r2,\"lb/ft^2 per foot\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "At the upper end, dp/ds = -16.3 lb/ft^2 per foot\n", - "\n", - " At the lower end, dp/ds = -380.9 lb/ft^2 per foot\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure difference between the two points\n", - "#Initialization of variables\n", - "g=32.2 #ft/s^2\n", - "v1=3. #ft/s\n", - "z1=1.5 #ft\n", - "rho=1.5 #g/cc\n", - "z2=0\n", - "v2=30. #ft/s\n", - "#calculations\n", - "dp= rho*(v2*v2 /2. - g*z1 +g*z2 - v1*v1 /2.)\n", - "#results\n", - "print '%s %.1f %s' %(\"pressure difference =\",dp,\"lb/ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pressure difference = 595.8 lb/ft^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 85" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the net power transferred\n", - "#Initialization of variables\n", - "pd=15. #psia\n", - "rhod=0.005#slug/ft^3\n", - "pi=150. #psia\n", - "rhoi=0.03 #slug/ft^3\n", - "dz=-25. #ft\n", - "vd=1000. #ft/s\n", - "vi=100. #ft/s\n", - "ud=200. #Btu/slug\n", - "ui=250. #Btu/slug\n", - "g=32.2 #ft/s^2\n", - "J=778.\n", - "uff=5. #ft/s\n", - "Q=50. #Btu/sec\n", - "#calculations\n", - "pr=pd/rhod*144. - pi/rhoi *144.\n", - "zr=g*(dz)\n", - "vr=(vd*vd -vi*vi)/2.\n", - "ur=(ud-ui)*J\n", - "jeh=J*Q*g/uff\n", - "gem=pr+zr+vr+ur+jeh\n", - "power=gem*uff/g\n", - "#results\n", - "print '%s %d %s' %(\"Power transferred =\",power,\"ft-lb/sec\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power transferred = 64877 ft-lb/sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the kinetic energy correction factor\n", - "#Initialization of variables\n", - "import math\n", - "import scipy\n", - "from scipy import integrate\n", - "r0=1. \n", - "ri=0.\n", - "#calculations\n", - "def func1(y):\n", - " v= 2*math.pow(y,(1./7.)) *(y-1)\n", - " return v\n", - "\n", - "V,err=scipy.integrate.quad(func1,ri,r0)\n", - "def func2(y):\n", - " alpha= 1/ (math.pi*V*V*V) *2*math.pi *math.pow((y),(3./7.)) *(y-1) \n", - " return alpha\n", - "\n", - "a2,err2=scipy.integrate.quad(func2,ri,r0)\n", - "#results\n", - "print '%s %.2f' %(\"Kinetic energy correction factor = \",a2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Kinetic energy correction factor = 1.06\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5a - Pg 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure at the lower end if friction is neglected\n", - "#Initialization of variables\n", - "gam=62.4\n", - "pu=40. #psia\n", - "zu=25. #ft\n", - "vu=8. #ft/s\n", - "g=32.2 #ft/s^2\n", - "vl=8. #ft/s\n", - "zl=0 #ft\n", - "#calculations\n", - "pl= gam*(pu*144. /gam +zu-zl+ (vu*vu -vl*vl)/(2*g))/144.\n", - "#results\n", - "print '%s %.2f %s' %(\"Pressure at the lower end if friction is neglected =\",pl,\"psig\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure at the lower end if friction is neglected = 50.83 psig\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5b - Pg 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure at the lower end if friction is not neglected\n", - "#Initialization of variables\n", - "hl=5.\n", - "gam=62.4\n", - "pu=40. #psia\n", - "zu=25. #ft\n", - "vu=8. #ft/s\n", - "g=32.2 #ft/s^2\n", - "vl=8. #ft/s\n", - "zl=0 #ft\n", - "#calculations\n", - "pl= gam*(pu*144. /gam +zu-zl-hl+ (vu*vu -vl*vl)/(2*g))/144.\n", - "#results\n", - "print '%s %.2f %s' %(\"Pressure at the lower end if friction is neglected =\",pl,\"psig\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure at the lower end if friction is neglected = 48.67 psig\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6a - Pg 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge flow rate.\n", - "#Initialization of variables\n", - "import math\n", - "gam=62.4\n", - "pa=0\n", - "za=15. #ft\n", - "va=0\n", - "pg=0\n", - "zg=0\n", - "g=32.2 #ft/s^2\n", - "dg=2. #in\n", - "#calculations\n", - "vg= math.sqrt(2*g*(pa/gam +za+va*va /(2*g) -pg/gam - zg))\n", - "Ag=math.pi/4. *(dg/12.)*(dg/12.)\n", - "Q=Ag*vg\n", - "#results\n", - "print '%s %.2f %s' %(\"discharge =\",Q,\"ft^3/sec\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "discharge = 0.68 ft^3/sec\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6b - Pg 95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure at the points C,D,E and F\n", - "#Initialization of variables\n", - "import math\n", - "gam=62.4\n", - "pa=0\n", - "za=15. #ft\n", - "va=0\n", - "pg=0\n", - "zg=0\n", - "g=32.2 #ft/s^2\n", - "d=4. #in\n", - "dg=2. #in\n", - "zd=25. #ft\n", - "#calculations\n", - "vg= math.sqrt(2*g*(pa/gam +za+va*va /(2*g) -pg/gam - zg))\n", - "Ag=math.pi/4. *(dg/12.)*(dg/12.)\n", - "Q=Ag*vg\n", - "A=math.pi/4. *(d/12.)*(d/12.)\n", - "v4=Q/A\n", - "pc=-v4*v4 *gam/(2*g*144.)\n", - "pgd= za-zd - v4*v4 /(2*g)\n", - "pd=pgd*gam/144.\n", - "pe=-v4*v4 *gam/(2*g*144.)\n", - "pfg= za- v4*v4 /(2*g)\n", - "pf=pfg*gam/144.\n", - "#results\n", - "print '%s %.2f %s' %(\"Pressure at C =\",pc,\" psig\")\n", - "print '%s %.2f %s' %(\"\\n Pressure at D =\",pd,\" psig\")\n", - "print '%s %.2f %s' %(\"\\n Pressure at E =\",pe,\" psig\")\n", - "print '%s %.2f %s' %(\"\\n Pressure at F =\",pf,\" psig\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure at C = -0.41 psig\n", - "\n", - " Pressure at D = -4.74 psig\n", - "\n", - " Pressure at E = -0.41 psig\n", - "\n", - " Pressure at F = 6.09 psig\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the time required\n", - "#Initialization of variables\n", - "import math\n", - "import scipy\n", - "from scipy import integrate\n", - "d1=6. #ft\n", - "d2=3. #in\n", - "pa=2. #ft\n", - "d=13.6 \n", - "sg=0.75\n", - "h1=5. #sec\n", - "h2=3. #sec\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "pag=pa/12. *d/sg\n", - "def func(h):\n", - " time= -d1*d1 /(d2/12.)/(d2/12.) /(math.sqrt(2*g)) *math.pow((pag+h),(-0.5))\n", - " return time\n", - "ti,err=scipy.integrate.quad(func,h1,h2)\n", - "#results\n", - "print '%s %.1f %s' %(\"Time required =\",ti,\" sec\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time required = 54.3 sec\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the rate of flow \n", - "#Initialization of variables\n", - "import math\n", - "x=12. #ft\n", - "angle=30.*math.pi/180. #degrees\n", - "g=32.2 #ft/s^2\n", - "z=-2. #ft\n", - "d=2. #in\n", - "#calculations\n", - "vj= x/math.cos(angle) *math.sqrt(g/(2*(x*math.tan(angle) -z)))\n", - "Q=math.pi/4. *(d/12.)*(d/12.) *vj\n", - "#results\n", - "print '%s %.2f %s' %(\"Rate of flow =\",Q,\" ft^3/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rate of flow = 0.41 ft^3/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the net discharge\n", - "#Initialization of variables\n", - "import math\n", - "x=10. #in of mercury\n", - "sg=13.6 #g/cc\n", - "d1=8. #in\n", - "d2=4. #in\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "vdiff=x/12. *sg- x/12.\n", - "Vts=vdiff/(1-math.pow((d2/d1),4))\n", - "Vt=math.sqrt(2*g*Vts)\n", - "Q=Vt*math.pi/4. *(d2/12.)*(d2/12.)\n", - "#results\n", - "print '%s %.2f %s' %(\"Discharge =\",Q,\"ft^3/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge = 2.34 ft^3/s\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11 - Pg 107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horsepower input of the test pump\n", - "#Initialization of variables\n", - "import math\n", - "gam=62.4\n", - "ds=12. #in\n", - "dd=10. #in\n", - "Q=4. #ft^3/s\n", - "pd=40. #psia\n", - "ps=-6. #psia\n", - "zd=5. #ft\n", - "zs=0\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "vs=Q/(math.pi/4. *math.pow((ds/12.),2))\n", - "vd=Q/(math.pi/4. *math.pow((dd/12.),2))\n", - "emp = (pd-ps)*144./gam + zd-zs + (vd*vd - vs*vs)/(2*g)\n", - "hpp=emp*Q*gam/550.\n", - "#results\n", - "print '%s %.1f %s' %(\"Horsepower input of the test pump =\",hpp,\"hp\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horsepower input of the test pump = 50.6 hp\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12 - Pg 117" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horizontal and vertical components of force\n", - "#Initialization of variables\n", - "import math\n", - "d1=12. #in\n", - "d2=8. #in\n", - "v1=15. #ft/s\n", - "p1=12. #psig\n", - "p2=5.85 #psig\n", - "rho=1.94 #ft^3/slug\n", - "angle=60.*math.pi/180. #degrees\n", - "#calculations\n", - "Q=math.pi/4. *(d1/12.)*(d1/12.) *v1\n", - "v2=Q/(math.pi/4. *(d2/12.)*(d2/12.))\n", - "pa1=p1*math.pi/4. *(d1)*(d1)\n", - "pa2=p2*math.pi/4. *(d2)*(d2)\n", - "qv1=rho*Q*v1\n", - "qv2=rho*Q*v2\n", - "Fx=pa1+qv1+ math.cos(angle)*(pa2+qv2)\n", - "Fy=math.sin(angle)*(pa2+qv2)\n", - "#results\n", - "print '%s %d %s' %(\"Horizontal component of force =\",Fx,\"lb\")\n", - "print '%s %d %s' %(\"\\n Vertical component of force =\",Fy,\"lb\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horizontal component of force = 2232 lb\n", - "\n", - " Vertical component of force = 922 lb\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14a - Pg 127" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the exit velocity of the pump\n", - "#Initialization of variables\n", - "import math\n", - "de=4. #in\n", - "T=1000. #lb\n", - "g=32.2 #ft/s^2\n", - "vele=8.5 #lb/s\n", - "pe=16.5 #psia\n", - "pa=14.7 #psia\n", - "#calculations\n", - "Ae=math.pi/4. *de*de\n", - "Ve= (T-(pe-pa)*Ae)*g/vele\n", - "#results\n", - "print '%s %d %s' %(\"Exit velocity =\",Ve,\"ft/s\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Exit velocity = 3702 ft/s\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14b - Pg 127" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the thrust in the pipe\n", - "#Initialization of variables\n", - "import math\n", - "de=4. #in\n", - "T=1000. #lb\n", - "g=32.2 #ft/s^2\n", - "vele=8.5 #lb/s\n", - "pe=16.5 #psia\n", - "pa=14.7 #psia\n", - "pa2=1 #psia\n", - "#calculations\n", - "Ae=math.pi/4 *de*de\n", - "Ve= (T-(pe-pa)*Ae)*g/vele\n", - "T2=vele/g *Ve + (pe-pa2)*Ae\n", - "#results\n", - "print '%s %d %s' %(\"Thrust =\",T2,\"lb\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thrust = 1172 lb\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16 - Pg 133" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the downstream depth and horsepower dissipation\n", - "#Initialization of variables\n", - "q=240. #ft^3/sec/ft\n", - "v1=60. #ft/s\n", - "gam=62.4 \n", - "rho=1.94 #slug/ft^3\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "y1=q/v1\n", - "v2=8.6 #ft/s\n", - "y2=28. #ft\n", - "hl= (y1+ v1*v1 /(2*g)) - (y2+ v2*v2 /(2*g))\n", - "hpp=hl*q*gam/550.\n", - "#results\n", - "print '%s %.1f %s' %(\"Downstream depth =\",y2,\"ft\")\n", - "print '%s %d %s' %(\"\\n Horsepower dissipation =\",hpp,\"hp per foot width\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Downstream depth = 28.0 ft\n", - "\n", - " Horsepower dissipation = 837 hp per foot width\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17 - Pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the acceleration required\n", - "#Initialization of variables\n", - "dh=3. #in\n", - "L=12. #in\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "a=dh/L *g\n", - "#results\n", - "print '%s %.2f %s' %(\"Acceleration =\",a,\" ft/s^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Acceleration = 8.05 ft/s^2\n" - ] - } - ], - "prompt_number": 18 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_5.ipynb b/Fluid_mechanics/Chapter_5.ipynb deleted file mode 100755 index 3591a061..00000000 --- a/Fluid_mechanics/Chapter_5.ipynb +++ /dev/null @@ -1,244 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0e0637dca57f500478b778450aaaee0067016f8da4c67cbada5f889a38068276" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5 - Fluid viscosity and flow of real fluids" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the viscosity of oil\n", - "#Initialization of variables\n", - "import math\n", - "m=1155. #lb\n", - "gam=62.4\n", - "spg=0.93\n", - "t=3*60. #sec\n", - "d=1./6. #in\n", - "L=20. #ft\n", - "dp=2.5 #psi\n", - "#calculations\n", - "Q=m/(t*spg*gam)\n", - "A=math.pi/4. *d*d\n", - "V=Q/A\n", - "mu=dp*d*d *144./(32.*V*L)\n", - "#results\n", - "print '%s %.4f %s' %(\"Viscosity of oil =\",mu,\"lb-sec/ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Viscosity of oil = 0.0031 lb-sec/ft^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the values of alpha and beta\n", - "#Initialization of variables\n", - "import math\n", - "import scipy\n", - "from scipy import integrate\n", - "g=32.2\n", - "gam=62.4\n", - "r0=1.\n", - "#calculations\n", - "def func1(r):\n", - " al=8./math.pow(r0,8) *math.pow((r0*r0-r*r),3) *(2*r)\n", - " return al\n", - "alpha,err=scipy.integrate.quad(func1,0,r0)\n", - "def func2(r):\n", - " a2=4/math.pow(r0,6) *math.pow((r0*r0 -r*r),2) *(2*r)\n", - " return a2\n", - "bet,err2=scipy.integrate.quad(func2,0,r0)\n", - "#results\n", - "print '%s %d' %(\"Alpha = \",alpha)\n", - "print '%s %.2f' %(\"\\n beta = \",bet)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Alpha = 2\n", - "\n", - " beta = 1.33\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example 5a - Pg 188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the direction of flow and the loss of energy\n", - "#Initialization of variables\n", - "spg=0.93\n", - "mu=3.1e-3 #lb-sec/ft^2\n", - "gam=62.4\n", - "z=50. #m\n", - "p1=60. #psia\n", - "p2=25. #psia\n", - "#calculations\n", - "p1g=144.*p1\n", - "p2g=144.*p2 + spg*gam*z\n", - "dp=p1g-p2g\n", - "#results\n", - "if p1g>p2g:\n", - " print '%s' %(\"The flow is in upward direction\")\n", - "else:\n", - " print '%s' %(\"The flow is in downward direction\")\n", - "\n", - "print '%s %d %s' %(\"\\n Energy loss=\",dp,\"ft-lb/ft^3\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The flow is in upward direction\n", - "\n", - " Energy loss= 2138 ft-lb/ft^3\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5b - Pg 189" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the flow rate\n", - "#Initialization of variables\n", - "import math\n", - "hl=2140. #ft-lb/ft^3\n", - "spg=0.93\n", - "mu=3.1e-3 #lb-sec/ft^2\n", - "gam=62.4\n", - "z=50. #m\n", - "p1=60. #psia\n", - "p2=25. #psia\n", - "d=1. #in\n", - "#calculations\n", - "V= hl*(d/12.)*(d/12.) /(32*mu*z)\n", - "Q=V*math.pi/4. *(d/12.)*(d/12.)\n", - "Q2=Q*7.48*60.\n", - "#results\n", - "print '%s %.2f %s' %(\"Flow rate =\",Q2,\"gal/min\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flow rate = 7.33 gal/min\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 194" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the flow in model\n", - "#Initialization of variables\n", - "muw=2.04e-5 #lb-sec/ft^2\n", - "rhow=1.94 #slugs/ft^3\n", - "mua=3.74e-7 #lb-sec/ft^2\n", - "rhoa=0.00237 #slug/ft^3\n", - "Qw=200. #gal/min\n", - "Lr=5.\n", - "#calculations\n", - "Qa=Qw*Lr *(rhow/rhoa)*(mua/muw)\n", - "#results\n", - "print '%s %d %s' %(\"Flow in model =\",Qa,\"gal/min\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flow in model = 15007 gal/min\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_6.ipynb b/Fluid_mechanics/Chapter_6.ipynb deleted file mode 100755 index 424aea7a..00000000 --- a/Fluid_mechanics/Chapter_6.ipynb +++ /dev/null @@ -1,118 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:27148bed2cbad8357ddcdc8e0ee434be3797107d2f692797bdf3a1e36c7e8d1a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6 - Dimensional analysis and model similitude" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 230" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the flow rate of water and pressure drop\n", - "#Initialization of variables\n", - "dg=0.5 #in\n", - "dw=12. #in\n", - "rhog=0.022 #slug/ft^3\n", - "rhow=1.94 #slug/ft^3\n", - "muw=2.34e-5 #lb-sec/ft^2\n", - "mug=3.50e-7 #lb-sec/ft^2\n", - "Qg=0.15 #ft^3/s\n", - "dpg=100. #lb/ft^2\n", - "#calculations\n", - "Vr=dg/dw *rhog/rhow *muw/mug\n", - "Qr=Vr*dw*dw /dg/dg\n", - "Qw=Qr*Qg\n", - "dpr=rhow/rhog *(Vr)*Vr\n", - "dpw=dpr*dpg\n", - "#results\n", - "print '%s %.2f %s' %(\"Flow rate of water =\",Qw,\"ft^3/s\")\n", - "print '%s %.1f %s' %(\"\\n Pressure drop =\",dpw,\"lb/ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flow rate of water = 2.73 ft^3/s\n", - "\n", - " Pressure drop = 8.8 lb/ft^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 231" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity ratio, time ratio, acceleration ratio and force ratio.\n", - "#Initialization of variables\n", - "import math\n", - "Lr=1./10.\n", - "rhom=2.\n", - "rhop=1.94\n", - "#calculations\n", - "Vr=math.sqrt(Lr)\n", - "Tr=Lr/Vr\n", - "ar=Vr/Tr\n", - "Fr=rhom/rhop *ar*Lr*Lr*Lr\n", - "#results\n", - "print '%s %.4f' %(\"Velocity ratio = \",Vr)\n", - "print '%s %.4f' %(\"\\n Time ratio = \",Tr)\n", - "print '%s %d' %(\"\\n Acceleration ratio = \",ar)\n", - "print '%s %.6f' %(\"\\n Force ratio = \",Fr)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity ratio = 0.3162\n", - "\n", - " Time ratio = 0.3162\n", - "\n", - " Acceleration ratio = 1\n", - "\n", - " Force ratio = 0.001031\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_7.ipynb b/Fluid_mechanics/Chapter_7.ipynb deleted file mode 100755 index 26326ec8..00000000 --- a/Fluid_mechanics/Chapter_7.ipynb +++ /dev/null @@ -1,874 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a67e8661ab863efba6ffe8486e33132e755624949690c50df8ae76d2d928ed8b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7 - Flow of incompressible fluids in closed conduits" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1a - Pg 241" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the reynolds number of the flow\n", - "#Initialization of variables\n", - "import math\n", - "z1=2. #ft\n", - "Q=0.1 #gal/min\n", - "alpha=2.\n", - "g=32.2 #ft/s^2\n", - "L=4. #ft\n", - "D=1./96. #ft\n", - "#calculations\n", - "v2=Q/(7.48*60* math.pi/4. *D*D)\n", - "hl=z1-alpha*v2*v2 /(2*g)\n", - "Nr=64./hl *L/D *v2*v2 /(2*g)\n", - "#results\n", - "print '%s %d %s' %(\"Reynolds number is\",Nr,\".Hence the flow is laminar\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reynolds number is 1459 .Hence the flow is laminar\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1b - Pg 242" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the kinematic viscosity\n", - "#Initialization of variables\n", - "import math\n", - "z1=2 #ft\n", - "Q=0.1 #gal/min\n", - "alpha=2.\n", - "g=32.2 #ft/s^2\n", - "L=4. #ft\n", - "D=1./96. #ft\n", - "#calculations\n", - "v2=Q/(7.48*60* math.pi/4. *D*D)\n", - "hl=z1-alpha*v2*v2/(2*g)\n", - "Nr=64./hl *L/D *v2*v2 /(2*g)\n", - "mu=v2*D/Nr\n", - "#results\n", - "print '%s %.2e %s' %(\"Kinematic viscosity =\",mu,\"ft^2/s\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Kinematic viscosity = 1.87e-05 ft^2/s\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exaple 1c - Pg 242" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the theoretical entrance transistion length\n", - "#Initialization of variables\n", - "import math\n", - "z1=2. #ft\n", - "Q=0.1 #gal/min\n", - "alpha=2.\n", - "g=32.2 #ft/s^2\n", - "L=4. #ft\n", - "D=1./96. #ft\n", - "#calculations\n", - "v2=Q/(7.48*60* math.pi/4. *D*D)\n", - "hl=z1-alpha*v2*v2 /(2*g)\n", - "Nr=64./hl *L/D *v2*v2 /(2*g)\n", - "Ld=0.058*Nr*D\n", - "#results\n", - "print '%s %.3f %s' %(\"Theoretical entrance transistion length =\",Ld,\"ft\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Theoretical entrance transistion length = 0.882 ft\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 246" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horsepower required for the motor\n", - "#Initialization of variables\n", - "import math\n", - "Q=350. #gal/min\n", - "D=6. #in\n", - "rho=0.84\n", - "gam=62.4\n", - "g=32.2 #ft/s^2\n", - "mu=9.2e-5 #lb-sec/ft^2\n", - "L=5280. #ft\n", - "#calculations\n", - "V=Q/(7.48*60*math.pi/4. *math.pow((D/12),2))\n", - "Nr=V*D/12 *rho*gam/g /mu\n", - "f=0.3164/math.pow((Nr),0.25)\n", - "hl=f*L*12/D *V*V /(2*g)\n", - "hp=hl*gam*Q*rho/(550*7.48*60.)\n", - "#results\n", - "print '%s %.2f %s' %(\"Horsepower required =\",hp,\"hp/mile\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horsepower required = 4.44 hp/mile\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 250" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the values of the coefficients alpha and beta\n", - "#Initialization of variables\n", - "n=7.\n", - "import math\n", - "#calculations\n", - "alpha= math.pow((n+1),3) *math.pow((2*n+1),3) /(4*math.pow(n,4) *(n+3)*(2*n+3))\n", - "bet=math.pow((n+1),2) *math.pow((2*n+1),2) /(2*n*n *(n+2)*(2*n+2))\n", - "#results\n", - "print '%s %.2f' %(\"alpha = \",alpha)\n", - "print '%s %.2f' %(\"\\n beta = \",bet)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "alpha = 1.06\n", - "\n", - " beta = 1.02\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 252" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the mass flow rate and horsepower input of the fan\n", - "#Initialization of variables\n", - "import math\n", - "spg=0.84\n", - "z=1. #in\n", - "gam=62.4\n", - "patm=14.7 #psia\n", - "T=459.6+85 #R\n", - "R=53.3\n", - "g=32.2 #ft/s^2\n", - "D=3. #ft\n", - "mu=3.88e-7 #lb-sec/ft^2\n", - "#calculations\n", - "dp=spg*z/12. *gam\n", - "rho=patm*144. /(R*T*g)\n", - "umax=math.sqrt(2*dp/rho)\n", - "V=0.8*umax\n", - "Nr=V*D*rho/mu\n", - "V2=0.875*umax\n", - "mass=rho*math.pi/4. *D*D *V2\n", - "emf=V2*V2 /(2*g)\n", - "hp=emf*mass*g/550.\n", - "#results\n", - "print '%s %.2f %s' %(\"Mass flow rate =\",mass,\"slug/sec\")\n", - "print '%s %.2f %s' %(\"\\n Horsepower input of the fan =\",hp,\"hp\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass flow rate = 0.87 slug/sec\n", - "\n", - " Horsepower input of the fan = 2.34 hp\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7a - Pg 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity using several equations listed above\n", - "#Initialization of variables\n", - "import math\n", - "D=36. #in\n", - "rho=0.00226 #slug/ft^3\n", - "mu=3.88e-7 #lb-sec/ft^2\n", - "umax=62.2 #ft/s\n", - "V=54.5 #ft/s\n", - "Nr=9.5e5\n", - "r0=18. #in\n", - "r=12. #in\n", - "n=8.8\n", - "k=0.4\n", - "#calculations\n", - "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", - "Vs=math.sqrt(f/8) *V\n", - "y=r0-r\n", - "u1=umax*math.pow((y/r0),(1/n))\n", - "u2=umax+ 2.5*Vs*math.log(y/r0)\n", - "u3=umax+ Vs/k *(math.sqrt(1-y/r0) + math.log(1-math.sqrt(1-y/r0)))\n", - "u4=Vs*(5.5+ 5.75*math.log10(Vs*y/12 *rho/mu))\n", - "#results\n", - "print '%s %.1f %s' %(\"Using equation 7-13, velocity =\",u1,\" ft/s\")\n", - "print '%s %.1f %s' %(\"\\n Using equation 7-18, velocity =\",u2,\" ft/s\")\n", - "print '%s %.1f %s' %(\"\\n Using equation 7-25, velocity =\",u3,\" ft/s\")\n", - "print '%s %.1f %s' %(\"\\n Using equation 7-34a, velocity =\",u4,\" ft/s\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Using equation 7-13, velocity = 54.9 ft/s\n", - "\n", - " Using equation 7-18, velocity = 56.5 ft/s\n", - "\n", - " Using equation 7-25, velocity = 57.6 ft/s\n", - "\n", - " Using equation 7-34a, velocity = 56.7 ft/s\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7b - Pg 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the outer edge buffer zone distance and also its thickness\n", - "#Initialization of variables\n", - "import math\n", - "D=36. #in\n", - "rho=0.00226 #slug/ft^3\n", - "mu=3.88e-7 #lb-sec/ft^2\n", - "umax=62.2 #ft/s\n", - "V=54.5 #ft/s\n", - "Nr=9.5e5\n", - "r0=18. #in\n", - "r=12. #in\n", - "n=8.8\n", - "k=0.4\n", - "#calculations\n", - "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", - "Vs=math.sqrt(f/8.) *V\n", - "y=r0-r\n", - "delta1=D*5*math.sqrt(8) /(Nr*math.sqrt(f))\n", - "vss=70.\n", - "thick=13*delta1\n", - "#results\n", - "print '%s %d' %(\"Outer edge of buffer zone is at \",vss)\n", - "print '%s %.4f %s' %(\"\\n Thickness of buffer zone =\",thick,\"in\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Outer edge of buffer zone is at 70\n", - "\n", - " Thickness of buffer zone = 0.0645 in\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7c - Pg 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity using the given equations\n", - "#Initialization of variables\n", - "import math\n", - "D=36. #in\n", - "rho=0.00226 #slug/ft^3\n", - "mu=3.88e-7 #lb-sec/ft^2\n", - "umax=62.2 #ft/s\n", - "V=54.5 #ft/s\n", - "Nr=9.5e5\n", - "r0=18. #in\n", - "r=12. #in\n", - "n=8.8\n", - "k=0.4\n", - "#calculations\n", - "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", - "Vs=math.sqrt(f/8) *V\n", - "delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))\n", - "y=delta1\n", - "u2=Vs*Vs *delta1/12. *rho/mu\n", - "u1=62.2 *math.pow((delta1/18.),(1/n))\n", - "#results\n", - "print '%s %.1f %s' %(\"using equation 7-13, velocity =\",u1,\"ft/s\")\n", - "print '%s %.1f %s' %(\"\\n using equation 7-30, velocity =\",u2,\"ft/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "using equation 7-13, velocity = 24.5 ft/s\n", - "\n", - " using equation 7-30, velocity = 10.4 ft/s\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7d - Pg 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity using the listed equations\n", - "#Initialization of variables\n", - "import math\n", - "D=36. #in\n", - "rho=0.00226 #slug/ft^3\n", - "mu=3.88e-7 #lb-sec/ft^2\n", - "umax=62.2 #ft/s\n", - "V=54.5 #ft/s\n", - "Nr=9.5e5\n", - "r0=18. #in\n", - "r=12. #in\n", - "n=8.8\n", - "k=0.4\n", - "#calculations\n", - "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", - "Vs=math.sqrt(f/8.) *V\n", - "delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))\n", - "y=14*delta1\n", - "u2=62.2*math.pow((y/18.),(1/n))\n", - "u3=Vs*(5.50 + 5.75*math.log10(Vs*y/12 *rho/mu))\n", - "#results\n", - "print '%s %.1f %s' %(\"Using equation 7-13, velocity =\",u2,\"ft/s\")\n", - "print '%s %.1f %s' %(\"\\n using equation 7-34a, velocity =\",u3,\"ft/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Using equation 7-13, velocity = 33.1 ft/s\n", - "\n", - " using equation 7-34a, velocity = 33.5 ft/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7e - Pg 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the shearing stress using both the equations\n", - "#Initialization of variables\n", - "import math\n", - "D=36. #in\n", - "rho=0.00226 #slug/ft^3\n", - "mu=3.88e-7 #lb-sec/ft^2\n", - "umax=62.2 #ft/s\n", - "V=54.5 #ft/s\n", - "Nr=9.5e+5\n", - "r0=18. #in\n", - "r=12. #in\n", - "n=8.8\n", - "k=0.4\n", - "#calculations\n", - "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", - "Vs=math.sqrt(f/8.) *V\n", - "delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))\n", - "u2=Vs*Vs *delta1/12. *rho/mu\n", - "T0=rho*Vs*Vs\n", - "T02=mu*u2/delta1 *12.\n", - "#results\n", - "print '%s %.5f %s' %(\"Using equation 7-9a, shearing stress =\",T0,\"lb/ft^2\")\n", - "print '%s %.5f %s' %(\"\\n Using equation 7-28, shearing stress =\",T02,\"lb/ft^2\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Using equation 7-9a, shearing stress = 0.00979 lb/ft^2\n", - "\n", - " Using equation 7-28, shearing stress = 0.00979 lb/ft^2\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the required velocity\n", - "#Initialization of variables\n", - "import math\n", - "umax=62.2 #ft/s\n", - "r0=18. #in\n", - "e=0.0696 #in\n", - "r=6. #in\n", - "#calculations\n", - "Vs=umax/(8.5 + 5.75*math.log10(r0/e))\n", - "u=Vs*(8.5 + 5.75*math.log10(r/e))\n", - "#results\n", - "print '%s %.1f %s' %(\"Velocity =\",u,\"ft/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity = 54.6 ft/s\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the flow rate and roughness factor\n", - "#Initialization of variables\n", - "import math\n", - "d=8. #in\n", - "V=3.65 #ft/s\n", - "u1=4.75 #ft/s\n", - "r0=4. #in\n", - "#calculations\n", - "f=0.0449\n", - "Q=V*math.pi/4. *math.pow((d/12),2)\n", - "Vs=(u1-V)/3.75\n", - "r0e=math.pow(10,((u1/Vs - 8.5)/5.75))\n", - "e=r0/r0e\n", - "#results\n", - "print '%s %.2f %s' %(\"Flow rate =\",Q,\"ft^3/s\")\n", - "print '%s %.3f %s' %(\"\\n roughness factor =\",e,\"in\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flow rate = 1.27 ft^3/s\n", - "\n", - " roughness factor = 0.184 in\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 285" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure difference per foot of horizontal pipe\n", - "#Initialization of variables\n", - "import math\n", - "e0=0.00085 #ft\n", - "alpha=0.25 #/year\n", - "t=15. #years\n", - "r0=3. #in\n", - "Q=500. #gal/min\n", - "d=6. #in\n", - "mu=2.04e-5 #lb-sec/ft^2\n", - "rho=1.94 #slugs/ft^3\n", - "g=32.2 #ft/s^2\n", - "L=1. #ft\n", - "gam=62.4\n", - "#calculations\n", - "e15=e0*(1+ alpha*t)\n", - "ratio=r0/(12.*e15)\n", - "V=Q/(7.48*60*math.pi/4. *math.pow((d/12),2))\n", - "Nr=V*d*rho/(mu*12)\n", - "f=0.036\n", - "hl=f*L/(d/12.) *V*V /(2*g)\n", - "dp=gam*hl\n", - "#results\n", - "print '%s %.2f %s' %(\"Pressure difference =\",dp,\"lb/ft^2 per foot of horizontal pipe\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure difference = 2.25 lb/ft^2 per foot of horizontal pipe\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11 - Pg 289" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horsepower required\n", - "#Initialization of variables\n", - "import math\n", - "d2=4. #in\n", - "d1=3. #in\n", - "e=0.0005 #ft\n", - "mu=3.75e-5 #lb-sec/ft^2\n", - "rho=1.94 #slugs/ft^3\n", - "Q=100. #gal/min\n", - "L=100. #ft\n", - "g=32.2 #ft/s^2\n", - "gam=62.4\n", - "#calculations\n", - "A=math.pi/4. *(math.pow((d2/12),2) -math.pow((d1/12),2))\n", - "WP=math.pi*(d1+d2)/12.\n", - "R=A/WP\n", - "RR= 2*R/e\n", - "V= Q/(7.48*60*A)\n", - "Nr=V*4*R*rho/mu\n", - "f=0.035\n", - "hl=f*L/(4*R) *V*V /(2*g)\n", - "hp=hl*Q/(7.48*60) *gam/550.\n", - "#results\n", - "print '%s %.2f %s' %(\"horsepower required =\",hp,\" hp/100 ft\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "horsepower required = 0.56 hp/100 ft\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12 - Pg 296" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge flow\n", - "#Initialization of variables\n", - "import math\n", - "p1=25. #psig\n", - "p2=20. #psig\n", - "d1=18. #in\n", - "d2=12. #in\n", - "Cl=0.25\n", - "gam=62.4\n", - "g=32.2 #ft/s^2\n", - "#calculations\n", - "Vr=(d2/d1)*(d2/d1)\n", - "xv=(p2-p1)*144/gam\n", - "V22=xv/(-1-Cl+Vr*Vr) *2*g\n", - "V2=math.sqrt(V22)\n", - "Q=V2*math.pi/4. *(d2/12.)*(d2/12.)\n", - "#results\n", - "print '%s %.1f %s' %(\"Discharge =\",Q,\"ft^3/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge = 20.9 ft^3/s\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13 - Pg 300" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the discharge flow rate\n", - "#Initialization of variables\n", - "import math\n", - "V61=10.8 #ft/s\n", - "V81=6.05 #ft/s\n", - "r0=3 #in\n", - "e=0.00015\n", - "d1=6. #in\n", - "rho=1.94 #slugs/ft^3\n", - "mu=2.34e-5 #ft-lb/s^2\n", - "#calculations\n", - "roe=r0/(12*e)\n", - "Nr1=V61*(d1/12.)*rho/mu\n", - "f6=0.0165\n", - "V6=11.6 #ft/s\n", - "V8=6.52 #ft/s\n", - "Q=V6*math.pi/4 *(d1/12.)*(d1/12.)\n", - "#results\n", - "print '%s %.2f %s' %(\"Discharge =\",Q,\"ft^3/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Discharge = 2.28 ft^3/s\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14 - Pg 302" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the diameter of steel pipe\n", - "#Initialization of variables\n", - "import math\n", - "L=1000. #ft\n", - "Q=2000/(7.48*60) #ft63/s\n", - "g=32.2 #ft/s^2\n", - "p=5. #psi/1000 ft\n", - "gam=62.4\n", - "sp=0.7\n", - "f=0.02\n", - "r0=0.904/2.\n", - "e=0.00015\n", - "mu=7e-6 #lb-ft/s^2\n", - "L=1000. #ft\n", - "#calculations\n", - "hl=p*144/(sp*gam)\n", - "D5=f*8*L*Q*Q /(math.pi*math.pi *g*hl)\n", - "D=math.pow(D5,(1./5.))\n", - "Nr=4*Q*sp*gam/(g*(math.pi*D*mu))\n", - "f2=0.0145\n", - "D5=f2*8*L*Q*Q /(math.pi*math.pi *g*hl)\n", - "D1=math.pow(D5,(1./5.))\n", - "#results\n", - "print '%s %.3f %s' %(\"Diameter of steel pipe =\",D1,\" ft\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter of steel pipe = 0.848 ft\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_8.ipynb b/Fluid_mechanics/Chapter_8.ipynb deleted file mode 100755 index 76c114d3..00000000 --- a/Fluid_mechanics/Chapter_8.ipynb +++ /dev/null @@ -1,802 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f292d23876c88421bcfc8b761169402a2885837db02032e303215ae83f2c5cf5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8 - Fluid compressibility and incompressible flow" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 323" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the initial and final volumes. Also, calculate the final temperature of the gas\n", - "#Initialization of variables\n", - "import math\n", - "pi=14.7 #psia\n", - "pf=50. #psia\n", - "cp=0.240 #Btu/lb R\n", - "cv=0.170 #Btu/lb R\n", - "J=778\n", - "T=60+459.6 #R\n", - "#calculations\n", - "R=J*(cp-cv)\n", - "k=cp/cv\n", - "gam=pi*144./(R*T)\n", - "V=1/gam\n", - "Vf=V*math.pow((pi/pf),(1/k))\n", - "Tf=T*(pf*Vf/(pi*V))\n", - "#results\n", - "print '%s %.2f %s' %(\"Initial volume =\",V,\"ft^3\")\n", - "print '%s %.2f %s' %(\"\\n Final volume =\",Vf,\"cu ft\")\n", - "print '%s %.1f %s' %(\"\\n Final temperature =\",Tf,\" R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Initial volume = 13.37 ft^3\n", - "\n", - " Final volume = 5.62 cu ft\n", - "\n", - " Final temperature = 742.6 R\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 325" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure difference across the pipe\n", - "#Initialization of variables\n", - "import math\n", - "ratio=0.99\n", - "E=3.19e5 #lb/in^2\n", - "#calculations\n", - "pd=-E*math.log(ratio)\n", - "#ersults\n", - "print '%s %d %s' %(\"Pressure difference =\",pd,\"psi\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure difference = 3206 psi\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 329" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the speed of test plane\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "g=32.2 #ft/s^2\n", - "R=53.3 #ft-lb/lb R\n", - "T=389.9 #R\n", - "Nm=2\n", - "#calculations\n", - "c=math.sqrt(k*g*R*T)\n", - "V=Nm*c*3600/5280.\n", - "#results\n", - "print '%s %.1f %s' %(\"Speed of test plane =\",V,\"mph\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed of test plane = 1319.9 mph\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4a - Pg 337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity at section 2\n", - "#Initialization of variables\n", - "import math\n", - "T1=584.6 #R\n", - "g=32.2 #ft/s^2\n", - "k=1.4\n", - "R=53.3 #ft-lb/lb R\n", - "V1=600 #ft/s\n", - "T2=519.6 #R\n", - "#calculations\n", - "Nm1=V1/(math.sqrt(k*g*R*T1))\n", - "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", - "Nm2=math.sqrt(Nm22)\n", - "V2=Nm2*math.sqrt(k*g*R*T2)\n", - "#results\n", - "print '%s %d %s' %(\"Velocity at section 2 =\",V2,\"ft/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity at section 2 = 1068 ft/s\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4b - Pg 337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure difference between two stations\n", - "#Initialization of variables\n", - "import math\n", - "T1=584.6 #R\n", - "g=32.2 #ft/s^2\n", - "k=1.4\n", - "R=53.3 #ft-lb/lb R\n", - "V1=600 #ft/s\n", - "T2=519.6 #R\n", - "pa=14.7 #psi\n", - "p1=50 #psia\n", - "#calculations\n", - "Nm1=V1/(math.sqrt(k*g*R*T1))\n", - "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", - "Nm2=math.sqrt(Nm22)\n", - "pr=math.pow(((1+ (k-1)/2 *Nm1*Nm1)/(1+ (k-1)/2 *Nm2*Nm2)),(k/(k-1)))\n", - "p2=pr*(p1+pa)\n", - "dp=p1+pa-p2\n", - "#results\n", - "print '%s %.1f %s' %(\"Pressure difference between two stations =\",dp,\"psi\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure difference between two stations = 21.9 psi\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4c - Pg 338" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the area ratio\n", - "#Initialization of variables\n", - "import math\n", - "T1=584.6 #R\n", - "g=32.2 #ft/s^2\n", - "k=1.4\n", - "R=53.3 #ft-lb/lb R\n", - "V1=600 #ft/s\n", - "T2=519.6 #R\n", - "#calculations\n", - "Nm1=V1/(math.sqrt(k*g*R*T1))\n", - "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", - "Nm2=math.sqrt(Nm22)\n", - "Ar= Nm1/Nm2 *math.pow(((1+ (k-1)/2 *Nm2*Nm2)/(1+ (k-1)/2 *Nm1*Nm1)),((k+1)/(2*(k-1))))\n", - "#results\n", - "print '%s %.3f' %(\"Area ratio = \",Ar)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Area ratio = 0.754\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4d - Pg 338" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the density of air at both the stations\n", - "#Initialization of variables\n", - "import math\n", - "T1=584.6 #R\n", - "g=32.2 #ft/s^2\n", - "k=1.4\n", - "R=53.3 #ft-lb/lb R\n", - "V1=600 #ft/s\n", - "T2=519.6 #R\n", - "pa=14.7 #psi\n", - "p1=50 #psia\n", - "#calculations\n", - "Nm1=V1/(math.sqrt(k*g*R*T1))\n", - "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", - "Nm2=math.sqrt(Nm22)\n", - "pr=math.pow(((1+ (k-1)/2 *Nm1*Nm1)/(1+ (k-1)/2 *Nm2*Nm2)),(k/(k-1)))\n", - "p2=pr*(p1+pa)\n", - "rho1=(p1+pa)*144./(g*R*T1)\n", - "rho2=p2*144./(g*R*T2)\n", - "#results\n", - "print '%s %.5f %s' %(\"Density of air at station 1 =\",rho1,\"slug/ft^3\")\n", - "print '%s %.5f %s' %(\"\\n Density of air at station 2 =\",rho2,\"slug/ft^3\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Density of air at station 1 = 0.00929 slug/ft^3\n", - "\n", - " Density of air at station 2 = 0.00692 slug/ft^3\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 345" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the mass rate of air flow\n", - "#Initialization of variables\n", - "import math\n", - "p0=19.7 #psia\n", - "R=53.3 #lb-ft/lb-R\n", - "T0=539.6 #R\n", - "g=32.2 #ft/s^2\n", - "pa=14.7 #psia\n", - "d=1 #in\n", - "k=1.4\n", - "#calculations\n", - "rho0=p0*144/(g*R*T0)\n", - "pr=pa/p0\n", - "G=math.pi/4 *(d/12.)*(d/12.) *math.pow((2*k/(k-1) *p0*144*rho0),(0.5)) *math.pow((pr),(1/k)) *math.pow((1-math.pow(pr,((k-1)/k))),0.5)\n", - "#results\n", - "print '%s %.5f %s' %(\"Mass rate of air flow =\",G,\"slug/sec\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass rate of air flow = 0.00978 slug/sec\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 346" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the mass rate of air flow\n", - "#Initialization of variables\n", - "import math\n", - "p0=64.7 #psia\n", - "R=53.3 #lb-ft/lb-R\n", - "T0=539.6 #R\n", - "g=32.2 #ft/s^2\n", - "pa=14.7 #psia\n", - "d=1. #in\n", - "k=1.4\n", - "#calculations\n", - "rho0=p0*144/(g*R*T0)\n", - "pr=pa/p0\n", - "G=math.pi/4 *(d/12)*d/12. *math.pow((k*p0*144*rho0),(0.5)) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", - "#results\n", - "print '%s %.5f %s' %(\"Mass rate of air flow =\",G,\"slug/sec\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass rate of air flow = 0.03616 slug/sec\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7a - Pg 347" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the weight of air flow through the nozzle\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "pe=14.7 #psia\n", - "p0=114.7 #psia\n", - "T0=524.6 #R\n", - "g=32.2 #ft/s^2\n", - "d=0.5 #in\n", - "#calculations\n", - "pr=pe/p0\n", - "prcr=0.528\n", - "pr=prcr*p0\n", - "rho0= p0*144/(g*R*T0)\n", - "G=math.pi/4 *(d/12)*d/12. *math.pow((k*p0*144*rho0),(0.5)) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", - "Wt=G*g\n", - "#results\n", - "print '%s %.4f %s' %(\"weight of air flow through the nozzle =\",Wt,\"lb/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "weight of air flow through the nozzle = 0.5233 lb/s\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7b - Pg 348" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the exit Mach number, exit velocity and the exit area\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "pe=14.7 #psia\n", - "p0=114.7 #psia\n", - "T0=524.6 #R\n", - "g=32.2 #ft/s^2\n", - "d=0.5 #in\n", - "Nm1=1.\n", - "#calculations\n", - "pr=pe/p0\n", - "Nme=math.sqrt(2/(k-1) *(math.pow(1./pr,(k-1)/k) -1))\n", - "Te=T0/(1+ (k-1)/2 *Nme*Nme)\n", - "Ve=Nme*math.sqrt(k*g*R*Te)\n", - "At=math.pi/4. *(d)*d\n", - "Ae=Nm1/Nme *math.pow(((1+ (k-1)/2 *Nme*Nme)/(1+ (k-1)/2 *Nm1*Nm1)),((k+1)/(2*(k-1)))) *At\n", - "#results\n", - "print '%s %.2f' %(\"Mach number exit = \",Nme)\n", - "print '%s %d %s' %(\"\\n Exit velocity =\",Ve,\"ft/s\")\n", - "print '%s %.3f %s' %(\"\\n Exit area =\",Ae,\" in^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mach number exit = 2.00\n", - "\n", - " Exit velocity = 1672 ft/s\n", - "\n", - " Exit area = 0.331 in^2\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8a - Pg 349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the exit mass flow rate, pressure, temperature, velocity and mach number\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "p0=100. #psia\n", - "T0=534.6 #R\n", - "g=32.2 #ft/s^2\n", - "d=0.5 #in\n", - "Nm1=1.\n", - "A=2./144. #ft^2\n", - "#calculations\n", - "print '%s' %(\"Exit mach number is found using trial and error\")\n", - "Nme=2.44\n", - "rho0=p0*144/(g*R*T0)\n", - "G= A*math.sqrt(k*p0*144*rho0) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", - "pe=p0*math.pow((1/(1+(k-1)/2 *Nme*Nme)),(k/(k-1)))\n", - "Te=T0/(1+ (k-1)/2 *Nme*Nme)\n", - "Ve=Nme*(math.sqrt(k*g*R*Te))\n", - "#results\n", - "print '%s %.3f %s' %(\"\\n Exit mass flow rate =\",G,\"slug/s\")\n", - "print '%s %.2f %s' %(\"\\n Exit pressure =\",pe,\"psia\")\n", - "print '%s %.1f %s' %(\"\\n Exit temperature =\",Te,\" R\")\n", - "print '%s %d %s' %(\"\\n Exit velocity =\",Ve,\"ft/s\")\n", - "print '%s %.2f' %(\"\\n Exit mach number = \",Nme)\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Exit mach number is found using trial and error\n", - "\n", - " Exit mass flow rate = 0.143 slug/s\n", - "\n", - " Exit pressure = 6.43 psia\n", - "\n", - " Exit temperature = 244.0 R\n", - "\n", - " Exit velocity = 1868 ft/s\n", - "\n", - " Exit mach number = 2.44\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8b - Pg 350" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the exit mass flow rate, pressure, temperature,velocity and mach number\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "p0=100. #psia\n", - "T0=534.6 #R\n", - "g=32.2 #ft/s^2\n", - "d=0.5 #in\n", - "Nm1=1.\n", - "A=2./144. #ft^2\n", - "#calculations\n", - "print '%s' %(\"Exit mach number is found using trial and error\")\n", - "Nme=0.24\n", - "rho0=p0*144/(g*R*T0)\n", - "G= A*math.sqrt(k*p0*144*rho0) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", - "pe=p0*math.pow((1/(1+(k-1)/2 *Nme*Nme)),(k/(k-1)))\n", - "Te=T0/(1+ (k-1)/2 *Nme*Nme)\n", - "Ve=Nme*(math.sqrt(k*g*R*Te))\n", - "#results\n", - "print '%s %.3f %s' %(\"\\n Exit mass flow rate =\",G,\"slug/s\")\n", - "print '%s %.2f %s' %(\"\\n Exit pressure =\",pe,\"psia\")\n", - "print '%s %.1f %s' %(\"\\n Exit temperature =\",Te,\" R\")\n", - "print '%s %d %s' %(\"\\n Exit velocity =\",Ve,\"ft/s\")\n", - "print '%s %.2f' %(\"\\n Exit mach number = \",Nme)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Exit mach number is found using trial and error\n", - "\n", - " Exit mass flow rate = 0.143 slug/s\n", - "\n", - " Exit pressure = 96.07 psia\n", - "\n", - " Exit temperature = 528.5 R\n", - "\n", - " Exit velocity = 270 ft/s\n", - "\n", - " Exit mach number = 0.24\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 355" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the upstream Mach number, pressure, Temperature\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "pu=6.43 #psia\n", - "Tu=244. #R\n", - "Nmu=2.44\n", - "#calculations\n", - "Nmd = math.sqrt(((k-1)*Nmu*Nmu +2)/(2*k*Nmu*Nmu - (k-1)))\n", - "pd=pu*(2*k*Nmu*Nmu - (k-1))/(k+1)\n", - "Td=Tu*(2*k*Nmu*Nmu - (k-1))/(k+1) *((k-1)*Nmu*Nmu +2)/((k+1)*Nmu*Nmu)\n", - "#results\n", - "print '%s %.3f' %(\"Mach number upstream = \",Nmd)\n", - "print '%s %.1f %s' %(\"\\n Pressure upstream =\",pd,\"psia\")\n", - "print '%s %.1f %s' %(\"\\n Temperature upstream =\",Td,\"R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mach number upstream = 0.519\n", - "\n", - " Pressure upstream = 43.6 psia\n", - "\n", - " Temperature upstream = 507.2 R\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 359" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure and temperature at section 1\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "e=0.0005 #ft\n", - "mu=3.77e-7 #lb-sec/ft^2\n", - "pe=14.7 #psia\n", - "Te=524.6 #R\n", - "g=32.2 #ft/s^2\n", - "Vi=12.5 #ft/s\n", - "l=6. #in\n", - "b=8. #in\n", - "L=100. #ft\n", - "#calculations\n", - "rhoe=pe*144/(R*g*Te)\n", - "Ve=Vi/(g*rhoe*(l*b/144.))\n", - "Nme=Ve/(math.sqrt(k*g*R*Te))\n", - "Rd=l*b/(2*(l+b)) /12.\n", - "rr=2*R/e\n", - "Nr=Ve*4*Rd*rhoe/mu\n", - "f=0.019\n", - "f2=1/(2*k) *(1/Nme*Nme -1) - (k+1)/(4*k) *math.log((1+ (k-1)/2 *Nme*Nme)/(Nme*Nme *(1+(k-1)/2)))\n", - "ff=f*L/(8*Rd) +f2\n", - "Nm1=0.305\n", - "Tr2=(1+ (k-1)/2 *Nm1*Nm1)/(1+ (k-1/2))\n", - "Tre=(1+ (k-1)/2 *Nme*Nme)/(1+ (k-1/2))\n", - "pr2=Nm1*math.pow((1+ (k-1)/2 *Nm1*Nm1),(0.5)) /math.pow((1+(k-1)/2),0.5)\n", - "pre=Nme*math.pow((1+ (k-1)/2 *Nme*Nme),(0.5)) /math.pow((1+(k-1)/2),0.5)\n", - "p1=pe/pr2 *pre\n", - "T1=Te/Tr2 *Tre\n", - "#results\n", - "print '%s %.1f %s' %(\"Pressure at section 1 =\",p1,\"psia\")\n", - "print '%s %.1f %s' %(\"\\n Tempreature at section 1 =\",T1,\"R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure at section 1 = 21.5 psia\n", - "\n", - " Tempreature at section 1 = 535.1 R\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11 - Pg 364" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the limiting pressure and distance in both adiabatic and non-adiabatic cases\n", - "#Initialization of variables\n", - "import math\n", - "k=1.4\n", - "R=53.3 #lb-ft/lb R\n", - "g=32.2 #ft/s^2\n", - "T1=534.6 #R\n", - "V1=400. #ft/s\n", - "p1=350. #psia\n", - "f=0.02\n", - "D=6./12. #ft\n", - "#calculations\n", - "Nm1=V1/math.sqrt(k*g*R*T1)\n", - "Nm2= 1. /math.sqrt(k)\n", - "p2=p1*(Nm1)/Nm2\n", - "fl= math.log(Nm1/Nm2) + 1./(2.*k*Nm1*Nm1) *(1- Nm1*Nm1/Nm2*Nm2)\n", - "L12=fl*2*D/f\n", - "ps=p1*Nm1*math.pow((1+ (k-1)/2 *Nm1*Nm1),0.5) /math.pow((1+(k-1)/2),0.5)\n", - "Nm2=1.\n", - "fl2= -(k+1)/(4*k) *math.log((1+ (k-1)/2 *Nm1*Nm1)/(Nm1*Nm1 *(1+ (k-1)/2.))) + 1/(2*k*Nm1*Nm1) *(1- Nm1*Nm1 /Nm2*Nm2)\n", - "L2=fl2*2*D/f\n", - "#results\n", - "print '%s %.1f %s' %(\"Limiting pressure =\",p2,\" psia\")\n", - "print '%s %.1f %s' %(\"\\n Distance =\",L12,\" ft\")\n", - "print '%s %.1f %s' %(\"\\n Limiting pressure in adiabatic case =\",ps,\" psia\")\n", - "print '%s %.1f %s' %(\"\\n Distance required =\",L2,\"ft\")\n", - "print '%s' %(\"the answer is a bit different due to rounding of error in textbook\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting pressure = 146.2 psia\n", - "\n", - " Distance = 81.8 ft\n", - "\n", - " Limiting pressure in adiabatic case = 114.2 psia\n", - "\n", - " Distance required = 84.2 ft\n", - "the answer is a bit different due to rounding of error in textbook\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/Chapter_9.ipynb b/Fluid_mechanics/Chapter_9.ipynb deleted file mode 100755 index f131ead9..00000000 --- a/Fluid_mechanics/Chapter_9.ipynb +++ /dev/null @@ -1,450 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6e08f75972be45750168908e0258e415f396bd3e7aae6981e62e0a4fd06177dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9 - Fluid flow about immersed bodies" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1a - Pg 389" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the values of Fd\n", - "#Initialization of variables\n", - "import math\n", - "import numpy\n", - "rho=2.45 #slugs/ft^3\n", - "mu=9.2e-3 #lb-sec/ft^2\n", - "x=3.\n", - "v=3. #ft/s\n", - "B=6./12. #ft\n", - "L=36./12. #ft\n", - "#calculatons\n", - "Nr=v*x*rho/mu\n", - "y=([1.32, 1.46, 1.328])\n", - "Cd = numpy.zeros(len(y))\n", - "for i in range (0, len(y)):\n", - "\tCd[i]=y[i]*math.pow(Nr,(-0.5))\n", - "Fd = numpy.zeros(len(Cd))\n", - "for i in range (0, len(y)):\n", - "\tFd[i]=2*Cd[i]*B*L*(0.5*rho*v*v)\n", - "\n", - "#results\n", - "print '%s' %(\"Drag on the plates using different formulae blasius, parabola and pohlhauser in order\")\n", - "print '%.3f %.3f %.3f' %(Fd[0],Fd[1],Fd[2])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Drag on the plates using different formulae blasius, parabola and pohlhauser in order\n", - "0.892 0.986 0.897\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1b - Pg 390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calcualte the boundary layer thickness and the shearing thickness\n", - "#Initialization of variables\n", - "import math\n", - "import numpy\n", - "x=36./12.\n", - "rho=2.45 #slugs/ft^3\n", - "mu=9.2e-3 #lb-sec/ft^2\n", - "v=3. #ft/s\n", - "#calculatons\n", - "Nr=v*x*rho/mu\n", - "z=([4.91, 5.48, 4.65])\n", - "x=36./12.\n", - "delta = numpy.zeros(len(z))\n", - "for i in range (0, len(z)):\n", - "\tdelta[i]=z[i] /math.sqrt(Nr) *x\n", - "\n", - "\n", - "f=([0.332, 0.365, 0.322])\n", - "T=numpy.zeros(len(f))\n", - "for i in range (0,len(f)):\n", - "\tT[i]=f[i]*mu*v/x *math.sqrt(Nr)\n", - "\n", - "#results\n", - "print '%s' %(\"Boundary layer thickness = \")\n", - "print '%s' %(\"In order of Blasius, parabola and pohlhauser\")\n", - "print '%.3f %.3f %.3f' %(delta[0],delta[1],delta[2])\n", - "print '%s' %(\"Shearing stress = \")\n", - "print '%s' %(\"In order of Blasius, parabola and pohlhauser\")\n", - "print '%.3f %.3f %.3f' %(T[0],T[1],T[2])\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Boundary layer thickness = \n", - "In order of Blasius, parabola and pohlhauser\n", - "0.301 0.336 0.285\n", - "Shearing stress = \n", - "In order of Blasius, parabola and pohlhauser\n", - "0.150 0.164 0.145\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2a - Pg 398" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the total frictional drag and horsepower required\n", - "#Initialization of variables\n", - "import math\n", - "e=0.01 #ft\n", - "rho=2 #slugs/ft^3\n", - "mu=2.6e-5 #lb sec/ft^2\n", - "speed=10. #knots\n", - "L=250. #ft\n", - "A=30000. #ft^2\n", - "#calculations\n", - "V=speed*1.69\n", - "Nrl=V*L*rho/mu\n", - "Cdf=1.32 /math.sqrt(Nrl)\n", - "Fd=Cdf*A*0.5*rho*V*V\n", - "hp=Fd*V/550.\n", - "#results\n", - "print '%s %d %s' %(\"Total frictional drag =\",Fd,\"lb\")\n", - "print '%s %.1f %s' %(\"\\n Horsepower required =\",hp,\"hp\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total frictional drag = 627 lb\n", - "\n", - " Horsepower required = 19.3 hp\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2b - Pg 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the total frictional drag and horsepower required\n", - "#Initialization of variables\n", - "import math\n", - "e=0.01 #ft\n", - "rho=2 #slugs/ft^3\n", - "mu=2.6e-5 #lb sec/ft^2\n", - "speed=10 #knots\n", - "L=250. #ft\n", - "A=30000. #ft^2\n", - "#calculations\n", - "V=speed*1.69\n", - "Nrl=V*L*rho/mu\n", - "Cdf=0.074/math.pow(Nrl,0.2) -1700./Nrl\n", - "Fd=Cdf*A*0.5*rho*V*V\n", - "hp=Fd*V/550.\n", - "#results\n", - "print '%s %d %s' %(\"Total frictional drag =\",Fd,\"lb\")\n", - "print '%s %.1f %s' %(\"\\n Horsepower required =\",hp,\"hp\")\n", - "print '%s' %(\"The answer given in textbook is wrong. please use a calculator\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total frictional drag = 12537 lb\n", - "\n", - " Horsepower required = 385.2 hp\n", - "The answer given in textbook is wrong. please use a calculator\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2c - Pg 398" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the total frictional drag and horsepower required\n", - "#Initialization of variables\n", - "import math\n", - "e=0.01 #ft\n", - "rho=2. #slugs/ft^3\n", - "mu=2.6e-5 #lb sec/ft^2\n", - "speed=10. #knots\n", - "L=250. #ft\n", - "A=30000. #ft^2\n", - "#calculations\n", - "V=speed*1.69\n", - "Nrl=V*L*rho/mu\n", - "Cdf=1/math.pow((1.89 + 1.62*math.log10(L/e)),(2.5))\n", - "Fd=Cdf*A*0.5*rho*V*V\n", - "hp=Fd*V/550.\n", - "#results\n", - "print '%s %d %s' %(\"Total frictional drag =\",Fd,\"lb\")\n", - "print '%s %.1f %s' %(\"\\n Horsepower required =\",hp,\"hp\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total frictional drag = 35117 lb\n", - "\n", - " Horsepower required = 1079.1 hp\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 398" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the drag on the model\n", - "#Initialization of variables\n", - "import math\n", - "V=200. #ft/s\n", - "L=5. #ft\n", - "B=2. #ft\n", - "rho=0.00232 #slug/ft^3\n", - "mu=3.82e-7 #lb-sec/ft^2\n", - "p2=14.815 #psia\n", - "pa=14.7 #psia\n", - "#calculations\n", - "Nr=V*L*rho/mu\n", - "Cdf=0.0032\n", - "Fdf=Cdf*math.pi*L*B*0.5*rho*V*V\n", - "Fd=(p2-pa)*math.pi/4. *(B*12)*(B*12) -Fdf\n", - "#results\n", - "print '%s %.2f %s' %(\"Drag on the model =\",Fd,\"lb\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Drag on the model = 47.36 lb\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 405" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity of the flow\n", - "#Initialization of variables\n", - "import math\n", - "p1=14.7 #psia\n", - "z1=3 #ft\n", - "gam=62.4\n", - "rho=1.94 #slug/ft^3\n", - "pa=0.4 #psia\n", - "za=1 #ft\n", - "#calculations\n", - "v3=(pa-p1)*144 + (za-z1)*gam\n", - "V=math.sqrt(-v3*2/(3*rho))\n", - "#results\n", - "print '%s %.1f %s' %(\"Velocity of flow =\",V,\" ft/s\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity of flow = 27.4 ft/s\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 410" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the horsepower required\n", - "#Initialization of variables\n", - "import math\n", - "rpm=60. \n", - "rho=2. #slugs/ft^3\n", - "mu=3.5e-5 #lb-sec/ft^2\n", - "D=4./12. #ft\n", - "r=2. #ft\n", - "#calcualtions\n", - "V=rpm*2*math.pi/60. *2\n", - "Nr=V*D*rho/mu\n", - "Cd=1.1\n", - "Fd=Cd*math.pi/4. *(D)*D *0.5*rho*V*V\n", - "T=2*Fd*r\n", - "w=rpm*2*math.pi/60.\n", - "hp=T*w/550.\n", - "#results\n", - "print '%s %.2f %s' %(\"Horsepower required =\",hp,\" hp\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Horsepower required = 0.69 hp\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the terminal velocity\n", - "#Initialization of variables\n", - "import math\n", - "g=32.2 #ft/s^2\n", - "h=60000. #ft\n", - "F=2000. #;b\n", - "d=3. #ft\n", - "rho=0.00231\n", - "#calculations\n", - "V=math.sqrt(2*g*h)\n", - "print '%s' %(\"By trail and error\")\n", - "Cd=0.25\n", - "Nm=0.87\n", - "A=math.pi/4. *d*d\n", - "Vt=math.sqrt(2*F/(Cd*A*rho))\n", - "#results \n", - "print '%s %.1f %s' %(\"terminal velocity =\",Vt,\" ft/s\")\n", - "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "By trail and error\n", - "terminal velocity = 989.9 ft/s\n", - "The answers are a bit different from textbook due to rounding off error\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluid_mechanics/README.txt b/Fluid_mechanics/README.txt deleted file mode 100755 index fe81edb3..00000000 --- a/Fluid_mechanics/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Jaya Pratyusha Kothuri -Course: btech -College/Institute/Organization: Sri Mittapalli College of Engineering -Department/Designation: Computer Science and Engineering -Book Title: Fluid mechanics -Author: Pao, Richard H F -Publisher: John Wiley, New York -Year of publication: 1961 -Isbn: 0486683567 -Edition: 1 \ No newline at end of file diff --git a/Fluid_mechanics/screenshots/chap2.png b/Fluid_mechanics/screenshots/chap2.png deleted file mode 100755 index c7186e17..00000000 Binary files a/Fluid_mechanics/screenshots/chap2.png and /dev/null differ diff --git a/Fluid_mechanics/screenshots/chap3.png b/Fluid_mechanics/screenshots/chap3.png deleted file mode 100755 index ea5bf942..00000000 Binary files a/Fluid_mechanics/screenshots/chap3.png and /dev/null differ diff --git a/Fluid_mechanics/screenshots/chap4.png b/Fluid_mechanics/screenshots/chap4.png deleted file mode 100755 index 440b52f2..00000000 Binary files a/Fluid_mechanics/screenshots/chap4.png and /dev/null differ diff --git a/Fluid_mechanics_by_Pao/Chapter_10.ipynb b/Fluid_mechanics_by_Pao/Chapter_10.ipynb new file mode 100755 index 00000000..bdfb09f7 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_10.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8ebaaa4d9fc694c6b4303418dc1faf3eef2d83f1637b122e018c6c5eac0aba66" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 - Dynamic lift" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2a - Pg 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the max. theoretical propulsive force\n", + "#Initialization of variables\n", + "import math\n", + "vel=50. #mph\n", + "w=240. #rpm\n", + "r0=3. #ft\n", + "L=30. #ft\n", + "rho=0.00230 #slug/ft^2\n", + "theta=30*math.pi/180. #radians\n", + "#calculations\n", + "V=vel*5280./3600.\n", + "T=2*math.pi*r0*r0 *w*2*math.pi/60.\n", + "Fl=rho*V*T*L\n", + "F=r0*Fl*math.cos(theta)\n", + "#results\n", + "print '%s %d %s' %(\"Max. theoretical porpulsive force =\",F,\"lb\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max. theoretical porpulsive force = 18683 lb\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2b - Pg 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the force required for the operation\n", + "#Initialization of variables\n", + "import math\n", + "vel=50. #mph\n", + "w=240. #rpm\n", + "r0=3. #ft\n", + "L=30. #ft\n", + "rho=0.00230 #slug/ft^2\n", + "theta=30*math.pi/180. #radians\n", + "Cl=2\n", + "Cd=1\n", + "#calculations\n", + "vc=r0*w\n", + "V=vel*5280./3600.\n", + "vr=vc/V\n", + "A=2*r0*L\n", + "Fl=Cl*A*0.5*rho*V*V \n", + "Fd=Cd*A*0.5*rho*V*V\n", + "F=r0*(Fl*math.cos(theta) + Fd*math.sin(theta))\n", + "#results\n", + "print '%s %d %s' %(\"Force required =\",F,\"lb\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force required = 7454 lb\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3a - Pg 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the boundary circulation\n", + "#Initialization of variables\n", + "W=7500 #pounds\n", + "rho=0.00230\n", + "V=175*5280/3600 #ft/s\n", + "B=50\n", + "#calculations\n", + "T=W/(rho*V*B)\n", + "#results\n", + "print '%s %d %s' %(\"Boundary circulation =\",T,\"ft^2/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boundary circulation = 254 ft^2/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3b - Pg 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horsepower required for the operation\n", + "#Initialization of variables\n", + "W=7500. #pounds\n", + "rho=0.00230\n", + "V=175*5280./3600. #ft/s\n", + "B=50.\n", + "A=350. #ft^2\n", + "#calculations\n", + "Cl=W/(A*0.5*rho*V*V)\n", + "Cd=0.03\n", + "Fd=Cd*A*0.5*rho*V*V \n", + "hp=Fd*V/550.\n", + "#results\n", + "print '%s %d %s' %(\"Horsepower required =\",hp,\"hp\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horsepower required = 371 hp\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horsepower required for the operation\n", + "#Initialization of variables\n", + "import math\n", + "Fl=7500. #pounds\n", + "rho=0.00230\n", + "V=175*5280./3600. #ft/s\n", + "B=50\n", + "A=350 #ft^2\n", + "#calculations\n", + "Vi=2*Fl/(math.pi*rho*V*B*B)\n", + "Cl=Fl/(A*0.5*rho*V*V)\n", + "Cdi=Cl*Vi/(V)\n", + "Fdi=Cdi*A*0.5*rho*V*V\n", + "hp=Fdi*V/550\n", + "#results\n", + "print '%s %.1f %s' %(\"Horsepower required =\",hp,\"hp\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horsepower required = 44.1 hp\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_11.ipynb b/Fluid_mechanics_by_Pao/Chapter_11.ipynb new file mode 100755 index 00000000..ec13c1a6 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_11.ipynb @@ -0,0 +1,485 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:525b51e826bc42c9a4490de8234c350df60c3a09744a8e35af1f480f12f531bc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 - Flow of liquids in open channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1a - Pg 454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge using darcy equation\n", + "#Initialization of variables\n", + "import math\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #lb-sec/ft^2\n", + "y=5 #ft\n", + "T=25 #ft\n", + "d=10 #ft\n", + "slope=3./2. \n", + "g=32.2 #ft/s^2\n", + "S=0.001\n", + "#calculations\n", + "A=y*d+ 2*0.5*y*(slope*y)\n", + "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", + "R=A/WP\n", + "e=0.01 #ft\n", + "rr=2*R/e\n", + "f=0.019\n", + "C=math.sqrt(8*g/f)\n", + "V=C*math.sqrt(R*S)\n", + "Q=V*A\n", + "#results\n", + "print '%s %.1f %s' %(\"Discharge using Darcy equation =\",Q,\"ft^3/s\")\n", + "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge using Darcy equation = 569.3 ft^3/s\n", + "The answer is a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1b - Pg 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge using kutter ganguillet method\n", + "#Initialization of variables\n", + "import math\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #lb-sec/ft^2\n", + "y=5 #ft\n", + "T=25 #ft\n", + "d=10 #ft\n", + "slope=3./2. \n", + "g=32.2 #ft/s^2\n", + "S=0.001\n", + "n=0.017\n", + "#calculations\n", + "A=y*d+ 2*0.5*y*(slope*y)\n", + "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", + "R=A/WP\n", + "e=0.01 #ft\n", + "rr=2*R/e\n", + "f=0.019\n", + "C=(41.65 + 0.00281/S + 1.811/n)/(1+( 41.65 + 0.00281/S)*n/math.sqrt(R))\n", + "V=C*math.sqrt(R*S)\n", + "Q=V*A\n", + "#results\n", + "print '%s %.1f %s' %(\"Discharge using kutter ganguillet formula =\",Q,\" ft^3/s\")\n", + "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge using kutter ganguillet formula = 517.0 ft^3/s\n", + "The answer is a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1c - Pg 455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge using bazin formula\n", + "#Initialization of variables\n", + "import math\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #lb-sec/ft^2\n", + "y=5. #ft\n", + "T=25. #ft\n", + "d=10. #ft\n", + "slope=3./2.\n", + "g=32.2 #ft/s^2\n", + "S=0.001\n", + "m=0.21\n", + "#calculations\n", + "A=y*d+ 2*0.5*y*(slope*y)\n", + "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", + "R=A/WP\n", + "e=0.01 #ft\n", + "rr=2*R/e\n", + "f=0.019\n", + "C=157.6 /(1+ m/math.sqrt(R))\n", + "V=C*math.sqrt(R*S)\n", + "Q=V*A\n", + "#results\n", + "print '%s %.1f %s' %(\"Discharge using bazin formula =\",Q,\" ft^3/s\")\n", + "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge using bazin formula = 688.7 ft^3/s\n", + "The answer is a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1d - Pg 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge using darcy equation\n", + "#Initialization of variables\n", + "import math\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #lb-sec/ft^2\n", + "y=5. #ft\n", + "T=25. #ft\n", + "d=10. #ft\n", + "slope=3./2. \n", + "g=32.2 #ft/s^2\n", + "S=0.001\n", + "n=0.017\n", + "#calculations\n", + "A=y*d+ 2*0.5*y*(slope*y)\n", + "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", + "R=A/WP\n", + "e=0.01 #ft\n", + "rr=2*R/e\n", + "f=0.019\n", + "C=1.486*math.pow(R,(1./6.)) /n\n", + "V=C*math.sqrt(R*S)\n", + "Q=V*A\n", + "#results\n", + "print '%s %.1f %s' %(\"Discharge using Darcy equation =\",Q,\"ft^3/s\")\n", + "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge using Darcy equation = 516.6 ft^3/s\n", + "The answer is a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1e - Pg 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the froude number\n", + "#Initialization of variables\n", + "import math\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #lb-sec/ft^2\n", + "y=5. #ft\n", + "T=25. #ft\n", + "d=10. #ft\n", + "slope=3./2. \n", + "g=32.2 #ft/s^2\n", + "S=0.001\n", + "n=0.017\n", + "#calculations\n", + "A=y*d+ 2*0.5*y*(slope*y)\n", + "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", + "R=A/WP\n", + "e=0.01 #ft\n", + "rr=2*R/e\n", + "f=0.019\n", + "C=(41.65 + 0.00281/S + 1.811/n)/(1+( 41.65 + 0.00281/S)*n/math.sqrt(R))\n", + "V=C*math.sqrt(R*S)\n", + "T=d+ 2*(slope*y)\n", + "yh=A/T\n", + "Nf=V/(math.sqrt(g*yh))\n", + "#results\n", + "print '%s %.2f' %(\"froude number = \",Nf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "froude number = 0.56\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1f - Pg 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the critical depth\n", + "#Initialization of variables\n", + "import math\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #lb-sec/ft^2\n", + "y=5. #ft\n", + "T=25. #ft\n", + "d=10. #ft\n", + "slope=3./2. \n", + "g=32.2 #ft/s^2\n", + "S=0.001\n", + "n=0.017\n", + "#calculations\n", + "A=y*d+ 2*0.5*y*(slope*y)\n", + "WP=d+ 2*math.sqrt(3*3 +2*2) /2 *y\n", + "R=A/WP\n", + "e=0.01 #ft\n", + "rr=2*R/e\n", + "f=0.019\n", + "C=(41.65 + 0.00281/S + 1.811/n)/(1+( 41.65 + 0.00281/S)*n/math.sqrt(R))\n", + "V=C*math.sqrt(R*S)\n", + "Q=V*A\n", + "T=d+ 2*(slope*y)\n", + "yh=A/T\n", + "yc=2.88 #ft\n", + "#results\n", + "print '%s' %(\"yc is obtained using trial and error method\")\n", + "print '%s %.2f %s' %(\"Critical depth =\",yc,\"ft\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "yc is obtained using trial and error method\n", + "Critical depth = 2.88 ft\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2 - Pg 459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the minimum scale ratio\n", + "#Initialization of variables\n", + "import math\n", + "Re=4000.\n", + "rho=1.94 #slugs/ft^3\n", + "vm=5.91 #ft/s\n", + "mu=3.24e-5 #ft-lb/s^2\n", + "Rm=3.12 #ft\n", + "#calculations\n", + "lam3=Re*mu/(vm*4*Rm*rho)\n", + "lam=math.pow(lam3,(2./3.))\n", + "#results\n", + "print '%s %.2e' %(\"Minimum scale ratio = \",lam)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum scale ratio = 9.36e-03\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge, depth of the channel, froude numbers and also the force applied\n", + "#Initialization of variables\n", + "import math\n", + "yc=2. #ft\n", + "g=32.2 #ft/s^2\n", + "d=10. #ft\n", + "gam=62.4\n", + "rho=1.94\n", + "B=10. #ft\n", + "#calculations\n", + "Vc=math.sqrt(g*yc)\n", + "Ac=yc*d\n", + "Q=Vc*Ac\n", + "y1=5.88 #ft\n", + "y2=0.88 #ft\n", + "V1=2.73 #ft/s\n", + "V2=18.25 #ft/s\n", + "Nf1=0.198\n", + "Nf2=3.43\n", + "F= 0.5*gam*y1*y1 *B - 0.5*gam*y2*y2 *B - Q*rho*V2 +Q*rho*V1\n", + "#results\n", + "print '%s %.1f %s' %(\"Discharge in the channel =\",Q,\"ft^3/s\")\n", + "print '%s %.2f %s %.2f %s' %(\"\\n Depth of the channel at upstream and downstream =\",y1,\"ft and\",y2, \"ft\")\n", + "print '%s %.3f %s %.3f' %(\"\\n froude numbers at upstream and downstream =\",Nf1,\" and \",Nf2)\n", + "print '%s %d %s' %(\"\\n Force applied =\",F,\"lb\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in the channel = 160.5 ft^3/s\n", + "\n", + " Depth of the channel at upstream and downstream = 5.88 ft and 0.88 ft\n", + "\n", + " froude numbers at upstream and downstream = 0.198 and 3.430\n", + "\n", + " Force applied = 5713 lb\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the distance from vena contracta and also the total distance\n", + "#Initialization of variables\n", + "import math\n", + "S0=0.0009\n", + "n=0.018\n", + "w=20 #ft\n", + "d=0.5 #ft\n", + "Q=400 #ft^3/s\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "y2=4 #ft\n", + "V2=Q/(w*y2)\n", + "Nf2=V2/math.sqrt(g*y2)\n", + "yr=0.5*(math.sqrt(1+ 8*Nf2*Nf2) -1)\n", + "y1=yr*y2\n", + "L1=32.5\n", + "L2=37.1 \n", + "L3=51.4\n", + "L=L1+L2+L3\n", + "#results\n", + "print '%s %.1f %s %.2f %s' %(\"distance from vena contracta =\",y2,\"ft and\",y1,\"ft\")\n", + "print '%s %.1f %s' %(\"\\n Total distance =\",L,\" ft\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance from vena contracta = 4.0 ft and 1.20 ft\n", + "\n", + " Total distance = 121.0 ft\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_2.ipynb b/Fluid_mechanics_by_Pao/Chapter_2.ipynb new file mode 100755 index 00000000..f518cad4 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_2.ipynb @@ -0,0 +1,406 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8249f270a6314fb49f84df63266820d87dfa51fe64fed0b9dd11afa539cb500b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Fluid Statics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1 - Pg 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the final pressure and specific weight of the gas\n", + "#Initialization of variables\n", + "import math\n", + "gam=0.0765 #lb/ft^3\n", + "p=14.7 #psia\n", + "dz=10560. #ft\n", + "#calculations\n", + "pg=p*144./gam\n", + "p2=p*math.exp(-dz/pg)\n", + "gam2=p2/p*gam\n", + "#results\n", + "print '%s %.2f %s' %(\"Final pressure =\",p2,\"psia\")\n", + "print '%s %.4f %s' %(\"\\n Final specific weight =\",gam2,\"lb/ft^3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure = 10.04 psia\n", + "\n", + " Final specific weight = 0.0522 lb/ft^3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2 - Pg 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the final pressure and specific weight\n", + "#Initialization of variables\n", + "import math\n", + "gam=0.0765 #lb/ft^3\n", + "p=14.7 #psia\n", + "dz=10560. #ft\n", + "n=1.235\n", + "#calculations\n", + "pg=p*144./gam\n", + "p2=p*math.pow((1- dz/pg *(n-1)/n),(n/(n-1)))\n", + "gam2=math.pow((p2/p),(1/n)) *gam\n", + "#results\n", + "print '%s %.2f %s' %(\"Final pressure =\",p2,\"psia\")\n", + "print '%s %.4f %s' %(\"\\n Final specific weight =\",gam2,\"lb/ft^3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure = 9.89 psia\n", + "\n", + " Final specific weight = 0.0555 lb/ft^3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the absolute pressure\n", + "#Initialization of variables\n", + "pb=28.5 #in mercury\n", + "d=13.6 #g/cc\n", + "gam=62.4\n", + "pobs=-4. #psi\n", + "#calculations\n", + "patm=pb/12. *gam*d/144.\n", + "pabs=patm+pobs\n", + "P=pabs*144./gam\n", + "#results\n", + "print '%s %.1f %s' %(\"Absolute pressure =\",pabs,\"psia\")\n", + "print '%s %.1f %s' %(\"\\n Absolute pressure in feet of water =\",P,\"ft of water\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure = 10.0 psia\n", + "\n", + " Absolute pressure in feet of water = 23.1 ft of water\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure gauge at B and also the absolute pressure of air\n", + "#Initialization of variables\n", + "pb=28. #in mercury\n", + "d=13.6 #g/cc\n", + "gam=62.4\n", + "xm=15. #in\n", + "xw=10. #in\n", + "patm=28. #in\n", + "#calculations\n", + "pB=-xm/12 *gam/144 *d + xw*gam/144\n", + "pair=patm/12 *gam/144 *d - xm/12 *gam/144 *d\n", + "#results\n", + "print '%s %.2f %s' %(\"The pressure gauge at B indicates a reading of\",-pB,\"psi vacuum\")\n", + "print '%s %.2f %s' %(\"\\n Absolute pressure of Air =\",pair,\"psia\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure gauge at B indicates a reading of 3.03 psi vacuum\n", + "\n", + " Absolute pressure of Air = 6.38 psia\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5 - Pg 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure difference and also compare the pressures at A and B\n", + "#Initialization of variables\n", + "pb=28.5 #in mercury\n", + "d=13.6 #g/cc\n", + "gam=62.4\n", + "xm=10. #in\n", + "xw=2. #ft\n", + "#calculations\n", + "dp= xw*gam/144 - xm/12 *gam/144 + xm/12 *gam/144 *d\n", + "#results\n", + "print '%s %.2f %s' %(\"Pressure difference =\",dp,\"psi\")\n", + "if dp>0:\n", + " print '%s' %(\"\\n Pressure at A is greater than that at B\")\n", + "elif dp==0:\n", + " print '%s' %(\"\\n Pressure at both A and B are equal\")\n", + "else:\n", + " print '%s' %(\"\\n Pressure at A is less than that at B\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference = 5.42 psi\n", + "\n", + " Pressure at A is greater than that at B\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6 - Pg 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the magnitude of total force, vertical and horiontal locations of the total force.\n", + "#Initialization of variables\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "gam=62.4\n", + "x1=4. #ft\n", + "x2=6. #ft\n", + "y1=6. #ft\n", + "z=8. #ft\n", + "dy=1. #ft\n", + "angle=60.*math.pi/180. #radians\n", + "#calculations\n", + "A1=x1*x2\n", + "A2=1/2. *y1*y1\n", + "yc = (A1*(x1+x2+dy) + A2*(x1+x2))/(A1+A2)\n", + "hc=yc*math.sin(angle)\n", + "F=hc*gam*(A1+A2)\n", + "ic1=1/12. *x1*y1*y1*y1\n", + "ic2=1/36. *y1*x2*x2*x2\n", + "ad1=A1*(x1+x2+dy-yc)*(x1+x2+dy-yc)\n", + "ad2=A2*(x1+x2-yc)*(x1+x2-yc)\n", + "It=ic1+ic2+ad1+ad2\n", + "ydc=It/(yc*(A1+A2))\n", + "def momen(u):\n", + " m= gam*math.sin(angle) *(2*x1+u)*0.5*(x2-u)*(y1-u)\n", + " return m;\n", + "\n", + "MED, err =scipy.integrate.quad( momen,0,y1)\n", + "FEDC=gam*math.sin(angle) *A2*(x1+x2)\n", + "xed=MED/FEDC\n", + "xp= (A1*2*(x1+x2+dy) + (x1+x2)*(A2)*(x1+xed))/(A1*(x1+x2+dy) + A2*(x1+x2))\n", + "#results\n", + "print '%s %d %s' %(\"Magnitude of total force =\",F,\"lb\")\n", + "print '%s %.3f %s' %(\"\\n Vertical location of force =\",ydc,\"ft\")\n", + "print '%s %.2f %s' %(\"\\n Horizontal location of force =\",xp,\"ft from AB\")\n", + "print '%s' %(\"\\n Direction of force is perpendicular to the plane surface\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of total force = 23993 lb\n", + "\n", + " Vertical location of force = 0.266 ft\n", + "\n", + " Horizontal location of force = 3.58 ft from AB\n", + "\n", + " Direction of force is perpendicular to the plane surface\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7 - Pg 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the magnitude of force and the horizontal distance from line of action of Fv\n", + "#Initialization of variables\n", + "import math\n", + "gam=62.4\n", + "z=10. #ft\n", + "z2=5. #ft\n", + "z3=4.25 #ft\n", + "p=2. #psig\n", + "#calculations\n", + "h=p*144./gam\n", + "Av=z*z\n", + "Fh=gam*(z+h)*Av\n", + "hpc=1/12. *z*z*z*z /((h+z)*z*z)\n", + "Fv=gam*(z2+h) *z*z + gam*math.pi/4. *z*z *z\n", + "xp= (gam*(z2+h) *z*z *z2 + gam*math.pi/4. *z*z *z*z3)/(Fv)\n", + "F=math.sqrt(Fh*Fh + Fv*Fv)\n", + "#results\n", + "print '%s %d %s' %(\"Magnitude of force =\",F,\"lb\")\n", + "print '%s %.2f %s' %(\"\\n horizontal distance from line of action of Fv =\",xp,\"ft from AG\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of force = 142127 lb\n", + "\n", + " horizontal distance from line of action of Fv = 4.66 ft from AG\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8 - Pg 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate whether the barge is stable and also find the location of the metacenter\n", + "#Initialization of variables\n", + "import math\n", + "gam=0.0765 #lb/ft^3\n", + "l=40. #ft\n", + "w=16. #ft\n", + "d=8. #ft\n", + "z=6. #ft\n", + "BG=1. #ft\n", + "#calculations\n", + "I=1/12. *l*w*w*w\n", + "V=l*w*z\n", + "IVG=I/V - BG\n", + "MB=I/V\n", + "#results\n", + "print '%s %.2f %s' %(\"I/V -BG =\",IVG,\"ft \")\n", + "if IVG >0:\n", + " print '%s' %(\"\\n Barge is stable\")\n", + "else:\n", + " print '%s' %(\"\\n The barge is unstable\")\n", + "\n", + "print '%s %.2f %s' %(\"\\n Location of metacenter =\",MB,\"ft above the center of buoyancy \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I/V -BG = 2.56 ft \n", + "\n", + " Barge is stable\n", + "\n", + " Location of metacenter = 3.56 ft above the center of buoyancy \n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_3.ipynb b/Fluid_mechanics_by_Pao/Chapter_3.ipynb new file mode 100755 index 00000000..8d368fbf --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_3.ipynb @@ -0,0 +1,105 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dee9d655eeb9028db41fd96e05f9acf5955fd88886936fffc7d4e9aa14bb4a71" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 - Fluid Kinematics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1 - Pg 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the mean velocity of flow at both the sections\n", + "#Initialization of variables\n", + "import math\n", + "gam=0.0765 #lb/ft^3\n", + "Q=100. #ft^3/sec\n", + "d1=2.5 #ft\n", + "d2=9. #in\n", + "l=12. #ft\n", + "#calculations\n", + "A1=math.pi/4. *d1*d1\n", + "V1=Q/A1\n", + "A2=math.pi*l*d2/12.\n", + "V2=Q/A2\n", + "#results\n", + "print '%s %.1f %s' %(\"Mean velocity of flow at section 1 =\",V1,\"ft/sec\")\n", + "print '%s %.2f %s' %(\"\\n Mean velocity of flow at section 2 =\",V2,\"ft/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean velocity of flow at section 1 = 20.4 ft/sec\n", + "\n", + " Mean velocity of flow at section 2 = 3.54 ft/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5 - Pg 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horizontal and vertical components of velocity\n", + "#Initialization of variables\n", + "x=3. \n", + "y=1.\n", + "#calculations\n", + "u=-3*y*y\n", + "v=-6*x\n", + "#results\n", + "print '%s %d' %(\"Horizontal component of velocity = \",u)\n", + "print '%s %d' %(\"\\n vertical component of velocity = \",v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of velocity = -3\n", + "\n", + " vertical component of velocity = -18\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_4.ipynb b/Fluid_mechanics_by_Pao/Chapter_4.ipynb new file mode 100755 index 00000000..49f2ce7e --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_4.ipynb @@ -0,0 +1,777 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bf4ed226827aaf378bd6d43d8ae5845adf36d75f20c124d2087db252462cf40c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Fluid Dynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1 - Pg 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate dp/ds at both upper and lower ends\n", + "#Initialization of variables\n", + "rho=1.5 #g/cc\n", + "g=32.2 #ft/s^2\n", + "dzds=-0.5\n", + "x1=0\n", + "x2=3\n", + "#calculations\n", + "def func(s):\n", + " dpds=-rho*g*dzds - rho*(3+9*s)*9\n", + " return dpds\n", + "\n", + "r1=func(x1)\n", + "r2=func(x2)\n", + "#results\n", + "print '%s %.1f %s' %(\"At the upper end, dp/ds =\",r1,\"lb/ft^2 per foot\")\n", + "print '%s %.1f %s' %(\"\\n At the lower end, dp/ds =\",r2,\"lb/ft^2 per foot\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At the upper end, dp/ds = -16.3 lb/ft^2 per foot\n", + "\n", + " At the lower end, dp/ds = -380.9 lb/ft^2 per foot\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2 - Pg 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure difference between the two points\n", + "#Initialization of variables\n", + "g=32.2 #ft/s^2\n", + "v1=3. #ft/s\n", + "z1=1.5 #ft\n", + "rho=1.5 #g/cc\n", + "z2=0\n", + "v2=30. #ft/s\n", + "#calculations\n", + "dp= rho*(v2*v2 /2. - g*z1 +g*z2 - v1*v1 /2.)\n", + "#results\n", + "print '%s %.1f %s' %(\"pressure difference =\",dp,\"lb/ft^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure difference = 595.8 lb/ft^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the net power transferred\n", + "#Initialization of variables\n", + "pd=15. #psia\n", + "rhod=0.005#slug/ft^3\n", + "pi=150. #psia\n", + "rhoi=0.03 #slug/ft^3\n", + "dz=-25. #ft\n", + "vd=1000. #ft/s\n", + "vi=100. #ft/s\n", + "ud=200. #Btu/slug\n", + "ui=250. #Btu/slug\n", + "g=32.2 #ft/s^2\n", + "J=778.\n", + "uff=5. #ft/s\n", + "Q=50. #Btu/sec\n", + "#calculations\n", + "pr=pd/rhod*144. - pi/rhoi *144.\n", + "zr=g*(dz)\n", + "vr=(vd*vd -vi*vi)/2.\n", + "ur=(ud-ui)*J\n", + "jeh=J*Q*g/uff\n", + "gem=pr+zr+vr+ur+jeh\n", + "power=gem*uff/g\n", + "#results\n", + "print '%s %d %s' %(\"Power transferred =\",power,\"ft-lb/sec\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power transferred = 64877 ft-lb/sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the kinetic energy correction factor\n", + "#Initialization of variables\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "r0=1. \n", + "ri=0.\n", + "#calculations\n", + "def func1(y):\n", + " v= 2*math.pow(y,(1./7.)) *(y-1)\n", + " return v\n", + "\n", + "V,err=scipy.integrate.quad(func1,ri,r0)\n", + "def func2(y):\n", + " alpha= 1/ (math.pi*V*V*V) *2*math.pi *math.pow((y),(3./7.)) *(y-1) \n", + " return alpha\n", + "\n", + "a2,err2=scipy.integrate.quad(func2,ri,r0)\n", + "#results\n", + "print '%s %.2f' %(\"Kinetic energy correction factor = \",a2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy correction factor = 1.06\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5a - Pg 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure at the lower end if friction is neglected\n", + "#Initialization of variables\n", + "gam=62.4\n", + "pu=40. #psia\n", + "zu=25. #ft\n", + "vu=8. #ft/s\n", + "g=32.2 #ft/s^2\n", + "vl=8. #ft/s\n", + "zl=0 #ft\n", + "#calculations\n", + "pl= gam*(pu*144. /gam +zu-zl+ (vu*vu -vl*vl)/(2*g))/144.\n", + "#results\n", + "print '%s %.2f %s' %(\"Pressure at the lower end if friction is neglected =\",pl,\"psig\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the lower end if friction is neglected = 50.83 psig\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5b - Pg 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure at the lower end if friction is not neglected\n", + "#Initialization of variables\n", + "hl=5.\n", + "gam=62.4\n", + "pu=40. #psia\n", + "zu=25. #ft\n", + "vu=8. #ft/s\n", + "g=32.2 #ft/s^2\n", + "vl=8. #ft/s\n", + "zl=0 #ft\n", + "#calculations\n", + "pl= gam*(pu*144. /gam +zu-zl-hl+ (vu*vu -vl*vl)/(2*g))/144.\n", + "#results\n", + "print '%s %.2f %s' %(\"Pressure at the lower end if friction is neglected =\",pl,\"psig\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the lower end if friction is neglected = 48.67 psig\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6a - Pg 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge flow rate.\n", + "#Initialization of variables\n", + "import math\n", + "gam=62.4\n", + "pa=0\n", + "za=15. #ft\n", + "va=0\n", + "pg=0\n", + "zg=0\n", + "g=32.2 #ft/s^2\n", + "dg=2. #in\n", + "#calculations\n", + "vg= math.sqrt(2*g*(pa/gam +za+va*va /(2*g) -pg/gam - zg))\n", + "Ag=math.pi/4. *(dg/12.)*(dg/12.)\n", + "Q=Ag*vg\n", + "#results\n", + "print '%s %.2f %s' %(\"discharge =\",Q,\"ft^3/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge = 0.68 ft^3/sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6b - Pg 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure at the points C,D,E and F\n", + "#Initialization of variables\n", + "import math\n", + "gam=62.4\n", + "pa=0\n", + "za=15. #ft\n", + "va=0\n", + "pg=0\n", + "zg=0\n", + "g=32.2 #ft/s^2\n", + "d=4. #in\n", + "dg=2. #in\n", + "zd=25. #ft\n", + "#calculations\n", + "vg= math.sqrt(2*g*(pa/gam +za+va*va /(2*g) -pg/gam - zg))\n", + "Ag=math.pi/4. *(dg/12.)*(dg/12.)\n", + "Q=Ag*vg\n", + "A=math.pi/4. *(d/12.)*(d/12.)\n", + "v4=Q/A\n", + "pc=-v4*v4 *gam/(2*g*144.)\n", + "pgd= za-zd - v4*v4 /(2*g)\n", + "pd=pgd*gam/144.\n", + "pe=-v4*v4 *gam/(2*g*144.)\n", + "pfg= za- v4*v4 /(2*g)\n", + "pf=pfg*gam/144.\n", + "#results\n", + "print '%s %.2f %s' %(\"Pressure at C =\",pc,\" psig\")\n", + "print '%s %.2f %s' %(\"\\n Pressure at D =\",pd,\" psig\")\n", + "print '%s %.2f %s' %(\"\\n Pressure at E =\",pe,\" psig\")\n", + "print '%s %.2f %s' %(\"\\n Pressure at F =\",pf,\" psig\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at C = -0.41 psig\n", + "\n", + " Pressure at D = -4.74 psig\n", + "\n", + " Pressure at E = -0.41 psig\n", + "\n", + " Pressure at F = 6.09 psig\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7 - Pg 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the time required\n", + "#Initialization of variables\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "d1=6. #ft\n", + "d2=3. #in\n", + "pa=2. #ft\n", + "d=13.6 \n", + "sg=0.75\n", + "h1=5. #sec\n", + "h2=3. #sec\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "pag=pa/12. *d/sg\n", + "def func(h):\n", + " time= -d1*d1 /(d2/12.)/(d2/12.) /(math.sqrt(2*g)) *math.pow((pag+h),(-0.5))\n", + " return time\n", + "ti,err=scipy.integrate.quad(func,h1,h2)\n", + "#results\n", + "print '%s %.1f %s' %(\"Time required =\",ti,\" sec\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required = 54.3 sec\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8 - Pg 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the rate of flow \n", + "#Initialization of variables\n", + "import math\n", + "x=12. #ft\n", + "angle=30.*math.pi/180. #degrees\n", + "g=32.2 #ft/s^2\n", + "z=-2. #ft\n", + "d=2. #in\n", + "#calculations\n", + "vj= x/math.cos(angle) *math.sqrt(g/(2*(x*math.tan(angle) -z)))\n", + "Q=math.pi/4. *(d/12.)*(d/12.) *vj\n", + "#results\n", + "print '%s %.2f %s' %(\"Rate of flow =\",Q,\" ft^3/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of flow = 0.41 ft^3/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9 - Pg 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the net discharge\n", + "#Initialization of variables\n", + "import math\n", + "x=10. #in of mercury\n", + "sg=13.6 #g/cc\n", + "d1=8. #in\n", + "d2=4. #in\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "vdiff=x/12. *sg- x/12.\n", + "Vts=vdiff/(1-math.pow((d2/d1),4))\n", + "Vt=math.sqrt(2*g*Vts)\n", + "Q=Vt*math.pi/4. *(d2/12.)*(d2/12.)\n", + "#results\n", + "print '%s %.2f %s' %(\"Discharge =\",Q,\"ft^3/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 2.34 ft^3/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11 - Pg 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horsepower input of the test pump\n", + "#Initialization of variables\n", + "import math\n", + "gam=62.4\n", + "ds=12. #in\n", + "dd=10. #in\n", + "Q=4. #ft^3/s\n", + "pd=40. #psia\n", + "ps=-6. #psia\n", + "zd=5. #ft\n", + "zs=0\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "vs=Q/(math.pi/4. *math.pow((ds/12.),2))\n", + "vd=Q/(math.pi/4. *math.pow((dd/12.),2))\n", + "emp = (pd-ps)*144./gam + zd-zs + (vd*vd - vs*vs)/(2*g)\n", + "hpp=emp*Q*gam/550.\n", + "#results\n", + "print '%s %.1f %s' %(\"Horsepower input of the test pump =\",hpp,\"hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horsepower input of the test pump = 50.6 hp\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12 - Pg 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horizontal and vertical components of force\n", + "#Initialization of variables\n", + "import math\n", + "d1=12. #in\n", + "d2=8. #in\n", + "v1=15. #ft/s\n", + "p1=12. #psig\n", + "p2=5.85 #psig\n", + "rho=1.94 #ft^3/slug\n", + "angle=60.*math.pi/180. #degrees\n", + "#calculations\n", + "Q=math.pi/4. *(d1/12.)*(d1/12.) *v1\n", + "v2=Q/(math.pi/4. *(d2/12.)*(d2/12.))\n", + "pa1=p1*math.pi/4. *(d1)*(d1)\n", + "pa2=p2*math.pi/4. *(d2)*(d2)\n", + "qv1=rho*Q*v1\n", + "qv2=rho*Q*v2\n", + "Fx=pa1+qv1+ math.cos(angle)*(pa2+qv2)\n", + "Fy=math.sin(angle)*(pa2+qv2)\n", + "#results\n", + "print '%s %d %s' %(\"Horizontal component of force =\",Fx,\"lb\")\n", + "print '%s %d %s' %(\"\\n Vertical component of force =\",Fy,\"lb\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of force = 2232 lb\n", + "\n", + " Vertical component of force = 922 lb\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14a - Pg 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the exit velocity of the pump\n", + "#Initialization of variables\n", + "import math\n", + "de=4. #in\n", + "T=1000. #lb\n", + "g=32.2 #ft/s^2\n", + "vele=8.5 #lb/s\n", + "pe=16.5 #psia\n", + "pa=14.7 #psia\n", + "#calculations\n", + "Ae=math.pi/4. *de*de\n", + "Ve= (T-(pe-pa)*Ae)*g/vele\n", + "#results\n", + "print '%s %d %s' %(\"Exit velocity =\",Ve,\"ft/s\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit velocity = 3702 ft/s\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14b - Pg 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the thrust in the pipe\n", + "#Initialization of variables\n", + "import math\n", + "de=4. #in\n", + "T=1000. #lb\n", + "g=32.2 #ft/s^2\n", + "vele=8.5 #lb/s\n", + "pe=16.5 #psia\n", + "pa=14.7 #psia\n", + "pa2=1 #psia\n", + "#calculations\n", + "Ae=math.pi/4 *de*de\n", + "Ve= (T-(pe-pa)*Ae)*g/vele\n", + "T2=vele/g *Ve + (pe-pa2)*Ae\n", + "#results\n", + "print '%s %d %s' %(\"Thrust =\",T2,\"lb\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thrust = 1172 lb\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16 - Pg 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the downstream depth and horsepower dissipation\n", + "#Initialization of variables\n", + "q=240. #ft^3/sec/ft\n", + "v1=60. #ft/s\n", + "gam=62.4 \n", + "rho=1.94 #slug/ft^3\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "y1=q/v1\n", + "v2=8.6 #ft/s\n", + "y2=28. #ft\n", + "hl= (y1+ v1*v1 /(2*g)) - (y2+ v2*v2 /(2*g))\n", + "hpp=hl*q*gam/550.\n", + "#results\n", + "print '%s %.1f %s' %(\"Downstream depth =\",y2,\"ft\")\n", + "print '%s %d %s' %(\"\\n Horsepower dissipation =\",hpp,\"hp per foot width\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Downstream depth = 28.0 ft\n", + "\n", + " Horsepower dissipation = 837 hp per foot width\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17 - Pg 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the acceleration required\n", + "#Initialization of variables\n", + "dh=3. #in\n", + "L=12. #in\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "a=dh/L *g\n", + "#results\n", + "print '%s %.2f %s' %(\"Acceleration =\",a,\" ft/s^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceleration = 8.05 ft/s^2\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_5.ipynb b/Fluid_mechanics_by_Pao/Chapter_5.ipynb new file mode 100755 index 00000000..3591a061 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_5.ipynb @@ -0,0 +1,244 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0e0637dca57f500478b778450aaaee0067016f8da4c67cbada5f889a38068276" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 - Fluid viscosity and flow of real fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the viscosity of oil\n", + "#Initialization of variables\n", + "import math\n", + "m=1155. #lb\n", + "gam=62.4\n", + "spg=0.93\n", + "t=3*60. #sec\n", + "d=1./6. #in\n", + "L=20. #ft\n", + "dp=2.5 #psi\n", + "#calculations\n", + "Q=m/(t*spg*gam)\n", + "A=math.pi/4. *d*d\n", + "V=Q/A\n", + "mu=dp*d*d *144./(32.*V*L)\n", + "#results\n", + "print '%s %.4f %s' %(\"Viscosity of oil =\",mu,\"lb-sec/ft^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Viscosity of oil = 0.0031 lb-sec/ft^2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the values of alpha and beta\n", + "#Initialization of variables\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "g=32.2\n", + "gam=62.4\n", + "r0=1.\n", + "#calculations\n", + "def func1(r):\n", + " al=8./math.pow(r0,8) *math.pow((r0*r0-r*r),3) *(2*r)\n", + " return al\n", + "alpha,err=scipy.integrate.quad(func1,0,r0)\n", + "def func2(r):\n", + " a2=4/math.pow(r0,6) *math.pow((r0*r0 -r*r),2) *(2*r)\n", + " return a2\n", + "bet,err2=scipy.integrate.quad(func2,0,r0)\n", + "#results\n", + "print '%s %d' %(\"Alpha = \",alpha)\n", + "print '%s %.2f' %(\"\\n beta = \",bet)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Alpha = 2\n", + "\n", + " beta = 1.33\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 5a - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the direction of flow and the loss of energy\n", + "#Initialization of variables\n", + "spg=0.93\n", + "mu=3.1e-3 #lb-sec/ft^2\n", + "gam=62.4\n", + "z=50. #m\n", + "p1=60. #psia\n", + "p2=25. #psia\n", + "#calculations\n", + "p1g=144.*p1\n", + "p2g=144.*p2 + spg*gam*z\n", + "dp=p1g-p2g\n", + "#results\n", + "if p1g>p2g:\n", + " print '%s' %(\"The flow is in upward direction\")\n", + "else:\n", + " print '%s' %(\"The flow is in downward direction\")\n", + "\n", + "print '%s %d %s' %(\"\\n Energy loss=\",dp,\"ft-lb/ft^3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The flow is in upward direction\n", + "\n", + " Energy loss= 2138 ft-lb/ft^3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5b - Pg 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the flow rate\n", + "#Initialization of variables\n", + "import math\n", + "hl=2140. #ft-lb/ft^3\n", + "spg=0.93\n", + "mu=3.1e-3 #lb-sec/ft^2\n", + "gam=62.4\n", + "z=50. #m\n", + "p1=60. #psia\n", + "p2=25. #psia\n", + "d=1. #in\n", + "#calculations\n", + "V= hl*(d/12.)*(d/12.) /(32*mu*z)\n", + "Q=V*math.pi/4. *(d/12.)*(d/12.)\n", + "Q2=Q*7.48*60.\n", + "#results\n", + "print '%s %.2f %s' %(\"Flow rate =\",Q2,\"gal/min\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 7.33 gal/min\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7 - Pg 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the flow in model\n", + "#Initialization of variables\n", + "muw=2.04e-5 #lb-sec/ft^2\n", + "rhow=1.94 #slugs/ft^3\n", + "mua=3.74e-7 #lb-sec/ft^2\n", + "rhoa=0.00237 #slug/ft^3\n", + "Qw=200. #gal/min\n", + "Lr=5.\n", + "#calculations\n", + "Qa=Qw*Lr *(rhow/rhoa)*(mua/muw)\n", + "#results\n", + "print '%s %d %s' %(\"Flow in model =\",Qa,\"gal/min\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow in model = 15007 gal/min\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_6.ipynb b/Fluid_mechanics_by_Pao/Chapter_6.ipynb new file mode 100755 index 00000000..424aea7a --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_6.ipynb @@ -0,0 +1,118 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:27148bed2cbad8357ddcdc8e0ee434be3797107d2f692797bdf3a1e36c7e8d1a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 - Dimensional analysis and model similitude" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the flow rate of water and pressure drop\n", + "#Initialization of variables\n", + "dg=0.5 #in\n", + "dw=12. #in\n", + "rhog=0.022 #slug/ft^3\n", + "rhow=1.94 #slug/ft^3\n", + "muw=2.34e-5 #lb-sec/ft^2\n", + "mug=3.50e-7 #lb-sec/ft^2\n", + "Qg=0.15 #ft^3/s\n", + "dpg=100. #lb/ft^2\n", + "#calculations\n", + "Vr=dg/dw *rhog/rhow *muw/mug\n", + "Qr=Vr*dw*dw /dg/dg\n", + "Qw=Qr*Qg\n", + "dpr=rhow/rhog *(Vr)*Vr\n", + "dpw=dpr*dpg\n", + "#results\n", + "print '%s %.2f %s' %(\"Flow rate of water =\",Qw,\"ft^3/s\")\n", + "print '%s %.1f %s' %(\"\\n Pressure drop =\",dpw,\"lb/ft^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate of water = 2.73 ft^3/s\n", + "\n", + " Pressure drop = 8.8 lb/ft^2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the velocity ratio, time ratio, acceleration ratio and force ratio.\n", + "#Initialization of variables\n", + "import math\n", + "Lr=1./10.\n", + "rhom=2.\n", + "rhop=1.94\n", + "#calculations\n", + "Vr=math.sqrt(Lr)\n", + "Tr=Lr/Vr\n", + "ar=Vr/Tr\n", + "Fr=rhom/rhop *ar*Lr*Lr*Lr\n", + "#results\n", + "print '%s %.4f' %(\"Velocity ratio = \",Vr)\n", + "print '%s %.4f' %(\"\\n Time ratio = \",Tr)\n", + "print '%s %d' %(\"\\n Acceleration ratio = \",ar)\n", + "print '%s %.6f' %(\"\\n Force ratio = \",Fr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity ratio = 0.3162\n", + "\n", + " Time ratio = 0.3162\n", + "\n", + " Acceleration ratio = 1\n", + "\n", + " Force ratio = 0.001031\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_7.ipynb b/Fluid_mechanics_by_Pao/Chapter_7.ipynb new file mode 100755 index 00000000..26326ec8 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_7.ipynb @@ -0,0 +1,874 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a67e8661ab863efba6ffe8486e33132e755624949690c50df8ae76d2d928ed8b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 - Flow of incompressible fluids in closed conduits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1a - Pg 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the reynolds number of the flow\n", + "#Initialization of variables\n", + "import math\n", + "z1=2. #ft\n", + "Q=0.1 #gal/min\n", + "alpha=2.\n", + "g=32.2 #ft/s^2\n", + "L=4. #ft\n", + "D=1./96. #ft\n", + "#calculations\n", + "v2=Q/(7.48*60* math.pi/4. *D*D)\n", + "hl=z1-alpha*v2*v2 /(2*g)\n", + "Nr=64./hl *L/D *v2*v2 /(2*g)\n", + "#results\n", + "print '%s %d %s' %(\"Reynolds number is\",Nr,\".Hence the flow is laminar\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reynolds number is 1459 .Hence the flow is laminar\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1b - Pg 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the kinematic viscosity\n", + "#Initialization of variables\n", + "import math\n", + "z1=2 #ft\n", + "Q=0.1 #gal/min\n", + "alpha=2.\n", + "g=32.2 #ft/s^2\n", + "L=4. #ft\n", + "D=1./96. #ft\n", + "#calculations\n", + "v2=Q/(7.48*60* math.pi/4. *D*D)\n", + "hl=z1-alpha*v2*v2/(2*g)\n", + "Nr=64./hl *L/D *v2*v2 /(2*g)\n", + "mu=v2*D/Nr\n", + "#results\n", + "print '%s %.2e %s' %(\"Kinematic viscosity =\",mu,\"ft^2/s\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinematic viscosity = 1.87e-05 ft^2/s\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exaple 1c - Pg 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the theoretical entrance transistion length\n", + "#Initialization of variables\n", + "import math\n", + "z1=2. #ft\n", + "Q=0.1 #gal/min\n", + "alpha=2.\n", + "g=32.2 #ft/s^2\n", + "L=4. #ft\n", + "D=1./96. #ft\n", + "#calculations\n", + "v2=Q/(7.48*60* math.pi/4. *D*D)\n", + "hl=z1-alpha*v2*v2 /(2*g)\n", + "Nr=64./hl *L/D *v2*v2 /(2*g)\n", + "Ld=0.058*Nr*D\n", + "#results\n", + "print '%s %.3f %s' %(\"Theoretical entrance transistion length =\",Ld,\"ft\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical entrance transistion length = 0.882 ft\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horsepower required for the motor\n", + "#Initialization of variables\n", + "import math\n", + "Q=350. #gal/min\n", + "D=6. #in\n", + "rho=0.84\n", + "gam=62.4\n", + "g=32.2 #ft/s^2\n", + "mu=9.2e-5 #lb-sec/ft^2\n", + "L=5280. #ft\n", + "#calculations\n", + "V=Q/(7.48*60*math.pi/4. *math.pow((D/12),2))\n", + "Nr=V*D/12 *rho*gam/g /mu\n", + "f=0.3164/math.pow((Nr),0.25)\n", + "hl=f*L*12/D *V*V /(2*g)\n", + "hp=hl*gam*Q*rho/(550*7.48*60.)\n", + "#results\n", + "print '%s %.2f %s' %(\"Horsepower required =\",hp,\"hp/mile\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horsepower required = 4.44 hp/mile\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the values of the coefficients alpha and beta\n", + "#Initialization of variables\n", + "n=7.\n", + "import math\n", + "#calculations\n", + "alpha= math.pow((n+1),3) *math.pow((2*n+1),3) /(4*math.pow(n,4) *(n+3)*(2*n+3))\n", + "bet=math.pow((n+1),2) *math.pow((2*n+1),2) /(2*n*n *(n+2)*(2*n+2))\n", + "#results\n", + "print '%s %.2f' %(\"alpha = \",alpha)\n", + "print '%s %.2f' %(\"\\n beta = \",bet)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha = 1.06\n", + "\n", + " beta = 1.02\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5 - Pg 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the mass flow rate and horsepower input of the fan\n", + "#Initialization of variables\n", + "import math\n", + "spg=0.84\n", + "z=1. #in\n", + "gam=62.4\n", + "patm=14.7 #psia\n", + "T=459.6+85 #R\n", + "R=53.3\n", + "g=32.2 #ft/s^2\n", + "D=3. #ft\n", + "mu=3.88e-7 #lb-sec/ft^2\n", + "#calculations\n", + "dp=spg*z/12. *gam\n", + "rho=patm*144. /(R*T*g)\n", + "umax=math.sqrt(2*dp/rho)\n", + "V=0.8*umax\n", + "Nr=V*D*rho/mu\n", + "V2=0.875*umax\n", + "mass=rho*math.pi/4. *D*D *V2\n", + "emf=V2*V2 /(2*g)\n", + "hp=emf*mass*g/550.\n", + "#results\n", + "print '%s %.2f %s' %(\"Mass flow rate =\",mass,\"slug/sec\")\n", + "print '%s %.2f %s' %(\"\\n Horsepower input of the fan =\",hp,\"hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate = 0.87 slug/sec\n", + "\n", + " Horsepower input of the fan = 2.34 hp\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7a - Pg 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the velocity using several equations listed above\n", + "#Initialization of variables\n", + "import math\n", + "D=36. #in\n", + "rho=0.00226 #slug/ft^3\n", + "mu=3.88e-7 #lb-sec/ft^2\n", + "umax=62.2 #ft/s\n", + "V=54.5 #ft/s\n", + "Nr=9.5e5\n", + "r0=18. #in\n", + "r=12. #in\n", + "n=8.8\n", + "k=0.4\n", + "#calculations\n", + "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", + "Vs=math.sqrt(f/8) *V\n", + "y=r0-r\n", + "u1=umax*math.pow((y/r0),(1/n))\n", + "u2=umax+ 2.5*Vs*math.log(y/r0)\n", + "u3=umax+ Vs/k *(math.sqrt(1-y/r0) + math.log(1-math.sqrt(1-y/r0)))\n", + "u4=Vs*(5.5+ 5.75*math.log10(Vs*y/12 *rho/mu))\n", + "#results\n", + "print '%s %.1f %s' %(\"Using equation 7-13, velocity =\",u1,\" ft/s\")\n", + "print '%s %.1f %s' %(\"\\n Using equation 7-18, velocity =\",u2,\" ft/s\")\n", + "print '%s %.1f %s' %(\"\\n Using equation 7-25, velocity =\",u3,\" ft/s\")\n", + "print '%s %.1f %s' %(\"\\n Using equation 7-34a, velocity =\",u4,\" ft/s\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using equation 7-13, velocity = 54.9 ft/s\n", + "\n", + " Using equation 7-18, velocity = 56.5 ft/s\n", + "\n", + " Using equation 7-25, velocity = 57.6 ft/s\n", + "\n", + " Using equation 7-34a, velocity = 56.7 ft/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7b - Pg 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the outer edge buffer zone distance and also its thickness\n", + "#Initialization of variables\n", + "import math\n", + "D=36. #in\n", + "rho=0.00226 #slug/ft^3\n", + "mu=3.88e-7 #lb-sec/ft^2\n", + "umax=62.2 #ft/s\n", + "V=54.5 #ft/s\n", + "Nr=9.5e5\n", + "r0=18. #in\n", + "r=12. #in\n", + "n=8.8\n", + "k=0.4\n", + "#calculations\n", + "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", + "Vs=math.sqrt(f/8.) *V\n", + "y=r0-r\n", + "delta1=D*5*math.sqrt(8) /(Nr*math.sqrt(f))\n", + "vss=70.\n", + "thick=13*delta1\n", + "#results\n", + "print '%s %d' %(\"Outer edge of buffer zone is at \",vss)\n", + "print '%s %.4f %s' %(\"\\n Thickness of buffer zone =\",thick,\"in\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Outer edge of buffer zone is at 70\n", + "\n", + " Thickness of buffer zone = 0.0645 in\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7c - Pg 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the velocity using the given equations\n", + "#Initialization of variables\n", + "import math\n", + "D=36. #in\n", + "rho=0.00226 #slug/ft^3\n", + "mu=3.88e-7 #lb-sec/ft^2\n", + "umax=62.2 #ft/s\n", + "V=54.5 #ft/s\n", + "Nr=9.5e5\n", + "r0=18. #in\n", + "r=12. #in\n", + "n=8.8\n", + "k=0.4\n", + "#calculations\n", + "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", + "Vs=math.sqrt(f/8) *V\n", + "delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))\n", + "y=delta1\n", + "u2=Vs*Vs *delta1/12. *rho/mu\n", + "u1=62.2 *math.pow((delta1/18.),(1/n))\n", + "#results\n", + "print '%s %.1f %s' %(\"using equation 7-13, velocity =\",u1,\"ft/s\")\n", + "print '%s %.1f %s' %(\"\\n using equation 7-30, velocity =\",u2,\"ft/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "using equation 7-13, velocity = 24.5 ft/s\n", + "\n", + " using equation 7-30, velocity = 10.4 ft/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7d - Pg 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the velocity using the listed equations\n", + "#Initialization of variables\n", + "import math\n", + "D=36. #in\n", + "rho=0.00226 #slug/ft^3\n", + "mu=3.88e-7 #lb-sec/ft^2\n", + "umax=62.2 #ft/s\n", + "V=54.5 #ft/s\n", + "Nr=9.5e5\n", + "r0=18. #in\n", + "r=12. #in\n", + "n=8.8\n", + "k=0.4\n", + "#calculations\n", + "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", + "Vs=math.sqrt(f/8.) *V\n", + "delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))\n", + "y=14*delta1\n", + "u2=62.2*math.pow((y/18.),(1/n))\n", + "u3=Vs*(5.50 + 5.75*math.log10(Vs*y/12 *rho/mu))\n", + "#results\n", + "print '%s %.1f %s' %(\"Using equation 7-13, velocity =\",u2,\"ft/s\")\n", + "print '%s %.1f %s' %(\"\\n using equation 7-34a, velocity =\",u3,\"ft/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using equation 7-13, velocity = 33.1 ft/s\n", + "\n", + " using equation 7-34a, velocity = 33.5 ft/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7e - Pg 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the shearing stress using both the equations\n", + "#Initialization of variables\n", + "import math\n", + "D=36. #in\n", + "rho=0.00226 #slug/ft^3\n", + "mu=3.88e-7 #lb-sec/ft^2\n", + "umax=62.2 #ft/s\n", + "V=54.5 #ft/s\n", + "Nr=9.5e+5\n", + "r0=18. #in\n", + "r=12. #in\n", + "n=8.8\n", + "k=0.4\n", + "#calculations\n", + "f=0.0032 + 0.221/(math.pow(Nr,0.237))\n", + "Vs=math.sqrt(f/8.) *V\n", + "delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))\n", + "u2=Vs*Vs *delta1/12. *rho/mu\n", + "T0=rho*Vs*Vs\n", + "T02=mu*u2/delta1 *12.\n", + "#results\n", + "print '%s %.5f %s' %(\"Using equation 7-9a, shearing stress =\",T0,\"lb/ft^2\")\n", + "print '%s %.5f %s' %(\"\\n Using equation 7-28, shearing stress =\",T02,\"lb/ft^2\")\n", + "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using equation 7-9a, shearing stress = 0.00979 lb/ft^2\n", + "\n", + " Using equation 7-28, shearing stress = 0.00979 lb/ft^2\n", + "The answers are a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8 - Pg 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the required velocity\n", + "#Initialization of variables\n", + "import math\n", + "umax=62.2 #ft/s\n", + "r0=18. #in\n", + "e=0.0696 #in\n", + "r=6. #in\n", + "#calculations\n", + "Vs=umax/(8.5 + 5.75*math.log10(r0/e))\n", + "u=Vs*(8.5 + 5.75*math.log10(r/e))\n", + "#results\n", + "print '%s %.1f %s' %(\"Velocity =\",u,\"ft/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 54.6 ft/s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9 - Pg 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the flow rate and roughness factor\n", + "#Initialization of variables\n", + "import math\n", + "d=8. #in\n", + "V=3.65 #ft/s\n", + "u1=4.75 #ft/s\n", + "r0=4. #in\n", + "#calculations\n", + "f=0.0449\n", + "Q=V*math.pi/4. *math.pow((d/12),2)\n", + "Vs=(u1-V)/3.75\n", + "r0e=math.pow(10,((u1/Vs - 8.5)/5.75))\n", + "e=r0/r0e\n", + "#results\n", + "print '%s %.2f %s' %(\"Flow rate =\",Q,\"ft^3/s\")\n", + "print '%s %.3f %s' %(\"\\n roughness factor =\",e,\"in\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 1.27 ft^3/s\n", + "\n", + " roughness factor = 0.184 in\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10 - Pg 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure difference per foot of horizontal pipe\n", + "#Initialization of variables\n", + "import math\n", + "e0=0.00085 #ft\n", + "alpha=0.25 #/year\n", + "t=15. #years\n", + "r0=3. #in\n", + "Q=500. #gal/min\n", + "d=6. #in\n", + "mu=2.04e-5 #lb-sec/ft^2\n", + "rho=1.94 #slugs/ft^3\n", + "g=32.2 #ft/s^2\n", + "L=1. #ft\n", + "gam=62.4\n", + "#calculations\n", + "e15=e0*(1+ alpha*t)\n", + "ratio=r0/(12.*e15)\n", + "V=Q/(7.48*60*math.pi/4. *math.pow((d/12),2))\n", + "Nr=V*d*rho/(mu*12)\n", + "f=0.036\n", + "hl=f*L/(d/12.) *V*V /(2*g)\n", + "dp=gam*hl\n", + "#results\n", + "print '%s %.2f %s' %(\"Pressure difference =\",dp,\"lb/ft^2 per foot of horizontal pipe\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference = 2.25 lb/ft^2 per foot of horizontal pipe\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11 - Pg 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horsepower required\n", + "#Initialization of variables\n", + "import math\n", + "d2=4. #in\n", + "d1=3. #in\n", + "e=0.0005 #ft\n", + "mu=3.75e-5 #lb-sec/ft^2\n", + "rho=1.94 #slugs/ft^3\n", + "Q=100. #gal/min\n", + "L=100. #ft\n", + "g=32.2 #ft/s^2\n", + "gam=62.4\n", + "#calculations\n", + "A=math.pi/4. *(math.pow((d2/12),2) -math.pow((d1/12),2))\n", + "WP=math.pi*(d1+d2)/12.\n", + "R=A/WP\n", + "RR= 2*R/e\n", + "V= Q/(7.48*60*A)\n", + "Nr=V*4*R*rho/mu\n", + "f=0.035\n", + "hl=f*L/(4*R) *V*V /(2*g)\n", + "hp=hl*Q/(7.48*60) *gam/550.\n", + "#results\n", + "print '%s %.2f %s' %(\"horsepower required =\",hp,\" hp/100 ft\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "horsepower required = 0.56 hp/100 ft\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12 - Pg 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge flow\n", + "#Initialization of variables\n", + "import math\n", + "p1=25. #psig\n", + "p2=20. #psig\n", + "d1=18. #in\n", + "d2=12. #in\n", + "Cl=0.25\n", + "gam=62.4\n", + "g=32.2 #ft/s^2\n", + "#calculations\n", + "Vr=(d2/d1)*(d2/d1)\n", + "xv=(p2-p1)*144/gam\n", + "V22=xv/(-1-Cl+Vr*Vr) *2*g\n", + "V2=math.sqrt(V22)\n", + "Q=V2*math.pi/4. *(d2/12.)*(d2/12.)\n", + "#results\n", + "print '%s %.1f %s' %(\"Discharge =\",Q,\"ft^3/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 20.9 ft^3/s\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13 - Pg 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the discharge flow rate\n", + "#Initialization of variables\n", + "import math\n", + "V61=10.8 #ft/s\n", + "V81=6.05 #ft/s\n", + "r0=3 #in\n", + "e=0.00015\n", + "d1=6. #in\n", + "rho=1.94 #slugs/ft^3\n", + "mu=2.34e-5 #ft-lb/s^2\n", + "#calculations\n", + "roe=r0/(12*e)\n", + "Nr1=V61*(d1/12.)*rho/mu\n", + "f6=0.0165\n", + "V6=11.6 #ft/s\n", + "V8=6.52 #ft/s\n", + "Q=V6*math.pi/4 *(d1/12.)*(d1/12.)\n", + "#results\n", + "print '%s %.2f %s' %(\"Discharge =\",Q,\"ft^3/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 2.28 ft^3/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14 - Pg 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the diameter of steel pipe\n", + "#Initialization of variables\n", + "import math\n", + "L=1000. #ft\n", + "Q=2000/(7.48*60) #ft63/s\n", + "g=32.2 #ft/s^2\n", + "p=5. #psi/1000 ft\n", + "gam=62.4\n", + "sp=0.7\n", + "f=0.02\n", + "r0=0.904/2.\n", + "e=0.00015\n", + "mu=7e-6 #lb-ft/s^2\n", + "L=1000. #ft\n", + "#calculations\n", + "hl=p*144/(sp*gam)\n", + "D5=f*8*L*Q*Q /(math.pi*math.pi *g*hl)\n", + "D=math.pow(D5,(1./5.))\n", + "Nr=4*Q*sp*gam/(g*(math.pi*D*mu))\n", + "f2=0.0145\n", + "D5=f2*8*L*Q*Q /(math.pi*math.pi *g*hl)\n", + "D1=math.pow(D5,(1./5.))\n", + "#results\n", + "print '%s %.3f %s' %(\"Diameter of steel pipe =\",D1,\" ft\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of steel pipe = 0.848 ft\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_8.ipynb b/Fluid_mechanics_by_Pao/Chapter_8.ipynb new file mode 100755 index 00000000..76c114d3 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_8.ipynb @@ -0,0 +1,802 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f292d23876c88421bcfc8b761169402a2885837db02032e303215ae83f2c5cf5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 - Fluid compressibility and incompressible flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1 - Pg 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the initial and final volumes. Also, calculate the final temperature of the gas\n", + "#Initialization of variables\n", + "import math\n", + "pi=14.7 #psia\n", + "pf=50. #psia\n", + "cp=0.240 #Btu/lb R\n", + "cv=0.170 #Btu/lb R\n", + "J=778\n", + "T=60+459.6 #R\n", + "#calculations\n", + "R=J*(cp-cv)\n", + "k=cp/cv\n", + "gam=pi*144./(R*T)\n", + "V=1/gam\n", + "Vf=V*math.pow((pi/pf),(1/k))\n", + "Tf=T*(pf*Vf/(pi*V))\n", + "#results\n", + "print '%s %.2f %s' %(\"Initial volume =\",V,\"ft^3\")\n", + "print '%s %.2f %s' %(\"\\n Final volume =\",Vf,\"cu ft\")\n", + "print '%s %.1f %s' %(\"\\n Final temperature =\",Tf,\" R\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial volume = 13.37 ft^3\n", + "\n", + " Final volume = 5.62 cu ft\n", + "\n", + " Final temperature = 742.6 R\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2 - Pg 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure difference across the pipe\n", + "#Initialization of variables\n", + "import math\n", + "ratio=0.99\n", + "E=3.19e5 #lb/in^2\n", + "#calculations\n", + "pd=-E*math.log(ratio)\n", + "#ersults\n", + "print '%s %d %s' %(\"Pressure difference =\",pd,\"psi\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference = 3206 psi\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the speed of test plane\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "g=32.2 #ft/s^2\n", + "R=53.3 #ft-lb/lb R\n", + "T=389.9 #R\n", + "Nm=2\n", + "#calculations\n", + "c=math.sqrt(k*g*R*T)\n", + "V=Nm*c*3600/5280.\n", + "#results\n", + "print '%s %.1f %s' %(\"Speed of test plane =\",V,\"mph\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of test plane = 1319.9 mph\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4a - Pg 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the velocity at section 2\n", + "#Initialization of variables\n", + "import math\n", + "T1=584.6 #R\n", + "g=32.2 #ft/s^2\n", + "k=1.4\n", + "R=53.3 #ft-lb/lb R\n", + "V1=600 #ft/s\n", + "T2=519.6 #R\n", + "#calculations\n", + "Nm1=V1/(math.sqrt(k*g*R*T1))\n", + "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", + "Nm2=math.sqrt(Nm22)\n", + "V2=Nm2*math.sqrt(k*g*R*T2)\n", + "#results\n", + "print '%s %d %s' %(\"Velocity at section 2 =\",V2,\"ft/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity at section 2 = 1068 ft/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4b - Pg 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure difference between two stations\n", + "#Initialization of variables\n", + "import math\n", + "T1=584.6 #R\n", + "g=32.2 #ft/s^2\n", + "k=1.4\n", + "R=53.3 #ft-lb/lb R\n", + "V1=600 #ft/s\n", + "T2=519.6 #R\n", + "pa=14.7 #psi\n", + "p1=50 #psia\n", + "#calculations\n", + "Nm1=V1/(math.sqrt(k*g*R*T1))\n", + "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", + "Nm2=math.sqrt(Nm22)\n", + "pr=math.pow(((1+ (k-1)/2 *Nm1*Nm1)/(1+ (k-1)/2 *Nm2*Nm2)),(k/(k-1)))\n", + "p2=pr*(p1+pa)\n", + "dp=p1+pa-p2\n", + "#results\n", + "print '%s %.1f %s' %(\"Pressure difference between two stations =\",dp,\"psi\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between two stations = 21.9 psi\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4c - Pg 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the area ratio\n", + "#Initialization of variables\n", + "import math\n", + "T1=584.6 #R\n", + "g=32.2 #ft/s^2\n", + "k=1.4\n", + "R=53.3 #ft-lb/lb R\n", + "V1=600 #ft/s\n", + "T2=519.6 #R\n", + "#calculations\n", + "Nm1=V1/(math.sqrt(k*g*R*T1))\n", + "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", + "Nm2=math.sqrt(Nm22)\n", + "Ar= Nm1/Nm2 *math.pow(((1+ (k-1)/2 *Nm2*Nm2)/(1+ (k-1)/2 *Nm1*Nm1)),((k+1)/(2*(k-1))))\n", + "#results\n", + "print '%s %.3f' %(\"Area ratio = \",Ar)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area ratio = 0.754\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4d - Pg 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the density of air at both the stations\n", + "#Initialization of variables\n", + "import math\n", + "T1=584.6 #R\n", + "g=32.2 #ft/s^2\n", + "k=1.4\n", + "R=53.3 #ft-lb/lb R\n", + "V1=600 #ft/s\n", + "T2=519.6 #R\n", + "pa=14.7 #psi\n", + "p1=50 #psia\n", + "#calculations\n", + "Nm1=V1/(math.sqrt(k*g*R*T1))\n", + "Nm22= ((1+ (k-1)/2 *Nm1*Nm1)/(T2/T1) -1)*(2/(k-1))\n", + "Nm2=math.sqrt(Nm22)\n", + "pr=math.pow(((1+ (k-1)/2 *Nm1*Nm1)/(1+ (k-1)/2 *Nm2*Nm2)),(k/(k-1)))\n", + "p2=pr*(p1+pa)\n", + "rho1=(p1+pa)*144./(g*R*T1)\n", + "rho2=p2*144./(g*R*T2)\n", + "#results\n", + "print '%s %.5f %s' %(\"Density of air at station 1 =\",rho1,\"slug/ft^3\")\n", + "print '%s %.5f %s' %(\"\\n Density of air at station 2 =\",rho2,\"slug/ft^3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of air at station 1 = 0.00929 slug/ft^3\n", + "\n", + " Density of air at station 2 = 0.00692 slug/ft^3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5 - Pg 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the mass rate of air flow\n", + "#Initialization of variables\n", + "import math\n", + "p0=19.7 #psia\n", + "R=53.3 #lb-ft/lb-R\n", + "T0=539.6 #R\n", + "g=32.2 #ft/s^2\n", + "pa=14.7 #psia\n", + "d=1 #in\n", + "k=1.4\n", + "#calculations\n", + "rho0=p0*144/(g*R*T0)\n", + "pr=pa/p0\n", + "G=math.pi/4 *(d/12.)*(d/12.) *math.pow((2*k/(k-1) *p0*144*rho0),(0.5)) *math.pow((pr),(1/k)) *math.pow((1-math.pow(pr,((k-1)/k))),0.5)\n", + "#results\n", + "print '%s %.5f %s' %(\"Mass rate of air flow =\",G,\"slug/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass rate of air flow = 0.00978 slug/sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6 - Pg 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the mass rate of air flow\n", + "#Initialization of variables\n", + "import math\n", + "p0=64.7 #psia\n", + "R=53.3 #lb-ft/lb-R\n", + "T0=539.6 #R\n", + "g=32.2 #ft/s^2\n", + "pa=14.7 #psia\n", + "d=1. #in\n", + "k=1.4\n", + "#calculations\n", + "rho0=p0*144/(g*R*T0)\n", + "pr=pa/p0\n", + "G=math.pi/4 *(d/12)*d/12. *math.pow((k*p0*144*rho0),(0.5)) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", + "#results\n", + "print '%s %.5f %s' %(\"Mass rate of air flow =\",G,\"slug/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass rate of air flow = 0.03616 slug/sec\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7a - Pg 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the weight of air flow through the nozzle\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "pe=14.7 #psia\n", + "p0=114.7 #psia\n", + "T0=524.6 #R\n", + "g=32.2 #ft/s^2\n", + "d=0.5 #in\n", + "#calculations\n", + "pr=pe/p0\n", + "prcr=0.528\n", + "pr=prcr*p0\n", + "rho0= p0*144/(g*R*T0)\n", + "G=math.pi/4 *(d/12)*d/12. *math.pow((k*p0*144*rho0),(0.5)) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", + "Wt=G*g\n", + "#results\n", + "print '%s %.4f %s' %(\"weight of air flow through the nozzle =\",Wt,\"lb/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "weight of air flow through the nozzle = 0.5233 lb/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7b - Pg 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the exit Mach number, exit velocity and the exit area\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "pe=14.7 #psia\n", + "p0=114.7 #psia\n", + "T0=524.6 #R\n", + "g=32.2 #ft/s^2\n", + "d=0.5 #in\n", + "Nm1=1.\n", + "#calculations\n", + "pr=pe/p0\n", + "Nme=math.sqrt(2/(k-1) *(math.pow(1./pr,(k-1)/k) -1))\n", + "Te=T0/(1+ (k-1)/2 *Nme*Nme)\n", + "Ve=Nme*math.sqrt(k*g*R*Te)\n", + "At=math.pi/4. *(d)*d\n", + "Ae=Nm1/Nme *math.pow(((1+ (k-1)/2 *Nme*Nme)/(1+ (k-1)/2 *Nm1*Nm1)),((k+1)/(2*(k-1)))) *At\n", + "#results\n", + "print '%s %.2f' %(\"Mach number exit = \",Nme)\n", + "print '%s %d %s' %(\"\\n Exit velocity =\",Ve,\"ft/s\")\n", + "print '%s %.3f %s' %(\"\\n Exit area =\",Ae,\" in^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mach number exit = 2.00\n", + "\n", + " Exit velocity = 1672 ft/s\n", + "\n", + " Exit area = 0.331 in^2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8a - Pg 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the exit mass flow rate, pressure, temperature, velocity and mach number\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "p0=100. #psia\n", + "T0=534.6 #R\n", + "g=32.2 #ft/s^2\n", + "d=0.5 #in\n", + "Nm1=1.\n", + "A=2./144. #ft^2\n", + "#calculations\n", + "print '%s' %(\"Exit mach number is found using trial and error\")\n", + "Nme=2.44\n", + "rho0=p0*144/(g*R*T0)\n", + "G= A*math.sqrt(k*p0*144*rho0) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", + "pe=p0*math.pow((1/(1+(k-1)/2 *Nme*Nme)),(k/(k-1)))\n", + "Te=T0/(1+ (k-1)/2 *Nme*Nme)\n", + "Ve=Nme*(math.sqrt(k*g*R*Te))\n", + "#results\n", + "print '%s %.3f %s' %(\"\\n Exit mass flow rate =\",G,\"slug/s\")\n", + "print '%s %.2f %s' %(\"\\n Exit pressure =\",pe,\"psia\")\n", + "print '%s %.1f %s' %(\"\\n Exit temperature =\",Te,\" R\")\n", + "print '%s %d %s' %(\"\\n Exit velocity =\",Ve,\"ft/s\")\n", + "print '%s %.2f' %(\"\\n Exit mach number = \",Nme)\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit mach number is found using trial and error\n", + "\n", + " Exit mass flow rate = 0.143 slug/s\n", + "\n", + " Exit pressure = 6.43 psia\n", + "\n", + " Exit temperature = 244.0 R\n", + "\n", + " Exit velocity = 1868 ft/s\n", + "\n", + " Exit mach number = 2.44\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8b - Pg 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the exit mass flow rate, pressure, temperature,velocity and mach number\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "p0=100. #psia\n", + "T0=534.6 #R\n", + "g=32.2 #ft/s^2\n", + "d=0.5 #in\n", + "Nm1=1.\n", + "A=2./144. #ft^2\n", + "#calculations\n", + "print '%s' %(\"Exit mach number is found using trial and error\")\n", + "Nme=0.24\n", + "rho0=p0*144/(g*R*T0)\n", + "G= A*math.sqrt(k*p0*144*rho0) *math.pow((2/(k+1)),((k+1)/(2*(k-1))))\n", + "pe=p0*math.pow((1/(1+(k-1)/2 *Nme*Nme)),(k/(k-1)))\n", + "Te=T0/(1+ (k-1)/2 *Nme*Nme)\n", + "Ve=Nme*(math.sqrt(k*g*R*Te))\n", + "#results\n", + "print '%s %.3f %s' %(\"\\n Exit mass flow rate =\",G,\"slug/s\")\n", + "print '%s %.2f %s' %(\"\\n Exit pressure =\",pe,\"psia\")\n", + "print '%s %.1f %s' %(\"\\n Exit temperature =\",Te,\" R\")\n", + "print '%s %d %s' %(\"\\n Exit velocity =\",Ve,\"ft/s\")\n", + "print '%s %.2f' %(\"\\n Exit mach number = \",Nme)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit mach number is found using trial and error\n", + "\n", + " Exit mass flow rate = 0.143 slug/s\n", + "\n", + " Exit pressure = 96.07 psia\n", + "\n", + " Exit temperature = 528.5 R\n", + "\n", + " Exit velocity = 270 ft/s\n", + "\n", + " Exit mach number = 0.24\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9 - Pg 355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the upstream Mach number, pressure, Temperature\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "pu=6.43 #psia\n", + "Tu=244. #R\n", + "Nmu=2.44\n", + "#calculations\n", + "Nmd = math.sqrt(((k-1)*Nmu*Nmu +2)/(2*k*Nmu*Nmu - (k-1)))\n", + "pd=pu*(2*k*Nmu*Nmu - (k-1))/(k+1)\n", + "Td=Tu*(2*k*Nmu*Nmu - (k-1))/(k+1) *((k-1)*Nmu*Nmu +2)/((k+1)*Nmu*Nmu)\n", + "#results\n", + "print '%s %.3f' %(\"Mach number upstream = \",Nmd)\n", + "print '%s %.1f %s' %(\"\\n Pressure upstream =\",pd,\"psia\")\n", + "print '%s %.1f %s' %(\"\\n Temperature upstream =\",Td,\"R\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mach number upstream = 0.519\n", + "\n", + " Pressure upstream = 43.6 psia\n", + "\n", + " Temperature upstream = 507.2 R\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10 - Pg 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the pressure and temperature at section 1\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "e=0.0005 #ft\n", + "mu=3.77e-7 #lb-sec/ft^2\n", + "pe=14.7 #psia\n", + "Te=524.6 #R\n", + "g=32.2 #ft/s^2\n", + "Vi=12.5 #ft/s\n", + "l=6. #in\n", + "b=8. #in\n", + "L=100. #ft\n", + "#calculations\n", + "rhoe=pe*144/(R*g*Te)\n", + "Ve=Vi/(g*rhoe*(l*b/144.))\n", + "Nme=Ve/(math.sqrt(k*g*R*Te))\n", + "Rd=l*b/(2*(l+b)) /12.\n", + "rr=2*R/e\n", + "Nr=Ve*4*Rd*rhoe/mu\n", + "f=0.019\n", + "f2=1/(2*k) *(1/Nme*Nme -1) - (k+1)/(4*k) *math.log((1+ (k-1)/2 *Nme*Nme)/(Nme*Nme *(1+(k-1)/2)))\n", + "ff=f*L/(8*Rd) +f2\n", + "Nm1=0.305\n", + "Tr2=(1+ (k-1)/2 *Nm1*Nm1)/(1+ (k-1/2))\n", + "Tre=(1+ (k-1)/2 *Nme*Nme)/(1+ (k-1/2))\n", + "pr2=Nm1*math.pow((1+ (k-1)/2 *Nm1*Nm1),(0.5)) /math.pow((1+(k-1)/2),0.5)\n", + "pre=Nme*math.pow((1+ (k-1)/2 *Nme*Nme),(0.5)) /math.pow((1+(k-1)/2),0.5)\n", + "p1=pe/pr2 *pre\n", + "T1=Te/Tr2 *Tre\n", + "#results\n", + "print '%s %.1f %s' %(\"Pressure at section 1 =\",p1,\"psia\")\n", + "print '%s %.1f %s' %(\"\\n Tempreature at section 1 =\",T1,\"R\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at section 1 = 21.5 psia\n", + "\n", + " Tempreature at section 1 = 535.1 R\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11 - Pg 364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the limiting pressure and distance in both adiabatic and non-adiabatic cases\n", + "#Initialization of variables\n", + "import math\n", + "k=1.4\n", + "R=53.3 #lb-ft/lb R\n", + "g=32.2 #ft/s^2\n", + "T1=534.6 #R\n", + "V1=400. #ft/s\n", + "p1=350. #psia\n", + "f=0.02\n", + "D=6./12. #ft\n", + "#calculations\n", + "Nm1=V1/math.sqrt(k*g*R*T1)\n", + "Nm2= 1. /math.sqrt(k)\n", + "p2=p1*(Nm1)/Nm2\n", + "fl= math.log(Nm1/Nm2) + 1./(2.*k*Nm1*Nm1) *(1- Nm1*Nm1/Nm2*Nm2)\n", + "L12=fl*2*D/f\n", + "ps=p1*Nm1*math.pow((1+ (k-1)/2 *Nm1*Nm1),0.5) /math.pow((1+(k-1)/2),0.5)\n", + "Nm2=1.\n", + "fl2= -(k+1)/(4*k) *math.log((1+ (k-1)/2 *Nm1*Nm1)/(Nm1*Nm1 *(1+ (k-1)/2.))) + 1/(2*k*Nm1*Nm1) *(1- Nm1*Nm1 /Nm2*Nm2)\n", + "L2=fl2*2*D/f\n", + "#results\n", + "print '%s %.1f %s' %(\"Limiting pressure =\",p2,\" psia\")\n", + "print '%s %.1f %s' %(\"\\n Distance =\",L12,\" ft\")\n", + "print '%s %.1f %s' %(\"\\n Limiting pressure in adiabatic case =\",ps,\" psia\")\n", + "print '%s %.1f %s' %(\"\\n Distance required =\",L2,\"ft\")\n", + "print '%s' %(\"the answer is a bit different due to rounding of error in textbook\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limiting pressure = 146.2 psia\n", + "\n", + " Distance = 81.8 ft\n", + "\n", + " Limiting pressure in adiabatic case = 114.2 psia\n", + "\n", + " Distance required = 84.2 ft\n", + "the answer is a bit different due to rounding of error in textbook\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/Chapter_9.ipynb b/Fluid_mechanics_by_Pao/Chapter_9.ipynb new file mode 100755 index 00000000..f131ead9 --- /dev/null +++ b/Fluid_mechanics_by_Pao/Chapter_9.ipynb @@ -0,0 +1,450 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6e08f75972be45750168908e0258e415f396bd3e7aae6981e62e0a4fd06177dc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 - Fluid flow about immersed bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1a - Pg 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the values of Fd\n", + "#Initialization of variables\n", + "import math\n", + "import numpy\n", + "rho=2.45 #slugs/ft^3\n", + "mu=9.2e-3 #lb-sec/ft^2\n", + "x=3.\n", + "v=3. #ft/s\n", + "B=6./12. #ft\n", + "L=36./12. #ft\n", + "#calculatons\n", + "Nr=v*x*rho/mu\n", + "y=([1.32, 1.46, 1.328])\n", + "Cd = numpy.zeros(len(y))\n", + "for i in range (0, len(y)):\n", + "\tCd[i]=y[i]*math.pow(Nr,(-0.5))\n", + "Fd = numpy.zeros(len(Cd))\n", + "for i in range (0, len(y)):\n", + "\tFd[i]=2*Cd[i]*B*L*(0.5*rho*v*v)\n", + "\n", + "#results\n", + "print '%s' %(\"Drag on the plates using different formulae blasius, parabola and pohlhauser in order\")\n", + "print '%.3f %.3f %.3f' %(Fd[0],Fd[1],Fd[2])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drag on the plates using different formulae blasius, parabola and pohlhauser in order\n", + "0.892 0.986 0.897\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1b - Pg 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calcualte the boundary layer thickness and the shearing thickness\n", + "#Initialization of variables\n", + "import math\n", + "import numpy\n", + "x=36./12.\n", + "rho=2.45 #slugs/ft^3\n", + "mu=9.2e-3 #lb-sec/ft^2\n", + "v=3. #ft/s\n", + "#calculatons\n", + "Nr=v*x*rho/mu\n", + "z=([4.91, 5.48, 4.65])\n", + "x=36./12.\n", + "delta = numpy.zeros(len(z))\n", + "for i in range (0, len(z)):\n", + "\tdelta[i]=z[i] /math.sqrt(Nr) *x\n", + "\n", + "\n", + "f=([0.332, 0.365, 0.322])\n", + "T=numpy.zeros(len(f))\n", + "for i in range (0,len(f)):\n", + "\tT[i]=f[i]*mu*v/x *math.sqrt(Nr)\n", + "\n", + "#results\n", + "print '%s' %(\"Boundary layer thickness = \")\n", + "print '%s' %(\"In order of Blasius, parabola and pohlhauser\")\n", + "print '%.3f %.3f %.3f' %(delta[0],delta[1],delta[2])\n", + "print '%s' %(\"Shearing stress = \")\n", + "print '%s' %(\"In order of Blasius, parabola and pohlhauser\")\n", + "print '%.3f %.3f %.3f' %(T[0],T[1],T[2])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boundary layer thickness = \n", + "In order of Blasius, parabola and pohlhauser\n", + "0.301 0.336 0.285\n", + "Shearing stress = \n", + "In order of Blasius, parabola and pohlhauser\n", + "0.150 0.164 0.145\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2a - Pg 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total frictional drag and horsepower required\n", + "#Initialization of variables\n", + "import math\n", + "e=0.01 #ft\n", + "rho=2 #slugs/ft^3\n", + "mu=2.6e-5 #lb sec/ft^2\n", + "speed=10. #knots\n", + "L=250. #ft\n", + "A=30000. #ft^2\n", + "#calculations\n", + "V=speed*1.69\n", + "Nrl=V*L*rho/mu\n", + "Cdf=1.32 /math.sqrt(Nrl)\n", + "Fd=Cdf*A*0.5*rho*V*V\n", + "hp=Fd*V/550.\n", + "#results\n", + "print '%s %d %s' %(\"Total frictional drag =\",Fd,\"lb\")\n", + "print '%s %.1f %s' %(\"\\n Horsepower required =\",hp,\"hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total frictional drag = 627 lb\n", + "\n", + " Horsepower required = 19.3 hp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2b - Pg 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total frictional drag and horsepower required\n", + "#Initialization of variables\n", + "import math\n", + "e=0.01 #ft\n", + "rho=2 #slugs/ft^3\n", + "mu=2.6e-5 #lb sec/ft^2\n", + "speed=10 #knots\n", + "L=250. #ft\n", + "A=30000. #ft^2\n", + "#calculations\n", + "V=speed*1.69\n", + "Nrl=V*L*rho/mu\n", + "Cdf=0.074/math.pow(Nrl,0.2) -1700./Nrl\n", + "Fd=Cdf*A*0.5*rho*V*V\n", + "hp=Fd*V/550.\n", + "#results\n", + "print '%s %d %s' %(\"Total frictional drag =\",Fd,\"lb\")\n", + "print '%s %.1f %s' %(\"\\n Horsepower required =\",hp,\"hp\")\n", + "print '%s' %(\"The answer given in textbook is wrong. please use a calculator\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total frictional drag = 12537 lb\n", + "\n", + " Horsepower required = 385.2 hp\n", + "The answer given in textbook is wrong. please use a calculator\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2c - Pg 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total frictional drag and horsepower required\n", + "#Initialization of variables\n", + "import math\n", + "e=0.01 #ft\n", + "rho=2. #slugs/ft^3\n", + "mu=2.6e-5 #lb sec/ft^2\n", + "speed=10. #knots\n", + "L=250. #ft\n", + "A=30000. #ft^2\n", + "#calculations\n", + "V=speed*1.69\n", + "Nrl=V*L*rho/mu\n", + "Cdf=1/math.pow((1.89 + 1.62*math.log10(L/e)),(2.5))\n", + "Fd=Cdf*A*0.5*rho*V*V\n", + "hp=Fd*V/550.\n", + "#results\n", + "print '%s %d %s' %(\"Total frictional drag =\",Fd,\"lb\")\n", + "print '%s %.1f %s' %(\"\\n Horsepower required =\",hp,\"hp\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total frictional drag = 35117 lb\n", + "\n", + " Horsepower required = 1079.1 hp\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3 - Pg 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the drag on the model\n", + "#Initialization of variables\n", + "import math\n", + "V=200. #ft/s\n", + "L=5. #ft\n", + "B=2. #ft\n", + "rho=0.00232 #slug/ft^3\n", + "mu=3.82e-7 #lb-sec/ft^2\n", + "p2=14.815 #psia\n", + "pa=14.7 #psia\n", + "#calculations\n", + "Nr=V*L*rho/mu\n", + "Cdf=0.0032\n", + "Fdf=Cdf*math.pi*L*B*0.5*rho*V*V\n", + "Fd=(p2-pa)*math.pi/4. *(B*12)*(B*12) -Fdf\n", + "#results\n", + "print '%s %.2f %s' %(\"Drag on the model =\",Fd,\"lb\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drag on the model = 47.36 lb\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4 - Pg 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the velocity of the flow\n", + "#Initialization of variables\n", + "import math\n", + "p1=14.7 #psia\n", + "z1=3 #ft\n", + "gam=62.4\n", + "rho=1.94 #slug/ft^3\n", + "pa=0.4 #psia\n", + "za=1 #ft\n", + "#calculations\n", + "v3=(pa-p1)*144 + (za-z1)*gam\n", + "V=math.sqrt(-v3*2/(3*rho))\n", + "#results\n", + "print '%s %.1f %s' %(\"Velocity of flow =\",V,\" ft/s\")\n", + "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow = 27.4 ft/s\n", + "The answer is a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5 - Pg 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the horsepower required\n", + "#Initialization of variables\n", + "import math\n", + "rpm=60. \n", + "rho=2. #slugs/ft^3\n", + "mu=3.5e-5 #lb-sec/ft^2\n", + "D=4./12. #ft\n", + "r=2. #ft\n", + "#calcualtions\n", + "V=rpm*2*math.pi/60. *2\n", + "Nr=V*D*rho/mu\n", + "Cd=1.1\n", + "Fd=Cd*math.pi/4. *(D)*D *0.5*rho*V*V\n", + "T=2*Fd*r\n", + "w=rpm*2*math.pi/60.\n", + "hp=T*w/550.\n", + "#results\n", + "print '%s %.2f %s' %(\"Horsepower required =\",hp,\" hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horsepower required = 0.69 hp\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6 - Pg 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the terminal velocity\n", + "#Initialization of variables\n", + "import math\n", + "g=32.2 #ft/s^2\n", + "h=60000. #ft\n", + "F=2000. #;b\n", + "d=3. #ft\n", + "rho=0.00231\n", + "#calculations\n", + "V=math.sqrt(2*g*h)\n", + "print '%s' %(\"By trail and error\")\n", + "Cd=0.25\n", + "Nm=0.87\n", + "A=math.pi/4. *d*d\n", + "Vt=math.sqrt(2*F/(Cd*A*rho))\n", + "#results \n", + "print '%s %.1f %s' %(\"terminal velocity =\",Vt,\" ft/s\")\n", + "print '%s' %(\"The answers are a bit different from textbook due to rounding off error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "By trail and error\n", + "terminal velocity = 989.9 ft/s\n", + "The answers are a bit different from textbook due to rounding off error\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/README.txt b/Fluid_mechanics_by_Pao/README.txt new file mode 100755 index 00000000..fe81edb3 --- /dev/null +++ b/Fluid_mechanics_by_Pao/README.txt @@ -0,0 +1,10 @@ +Contributed By: Jaya Pratyusha Kothuri +Course: btech +College/Institute/Organization: Sri Mittapalli College of Engineering +Department/Designation: Computer Science and Engineering +Book Title: Fluid mechanics +Author: Pao, Richard H F +Publisher: John Wiley, New York +Year of publication: 1961 +Isbn: 0486683567 +Edition: 1 \ No newline at end of file diff --git a/Fluid_mechanics_by_Pao/screenshots/chap2.png b/Fluid_mechanics_by_Pao/screenshots/chap2.png new file mode 100755 index 00000000..c7186e17 Binary files /dev/null and b/Fluid_mechanics_by_Pao/screenshots/chap2.png differ diff --git a/Fluid_mechanics_by_Pao/screenshots/chap3.png b/Fluid_mechanics_by_Pao/screenshots/chap3.png new file mode 100755 index 00000000..ea5bf942 Binary files /dev/null and b/Fluid_mechanics_by_Pao/screenshots/chap3.png differ diff --git a/Fluid_mechanics_by_Pao/screenshots/chap4.png b/Fluid_mechanics_by_Pao/screenshots/chap4.png new file mode 100755 index 00000000..440b52f2 Binary files /dev/null and b/Fluid_mechanics_by_Pao/screenshots/chap4.png differ diff --git a/Fluidization_Engineering/README.txt b/Fluidization_Engineering/README.txt deleted file mode 100755 index a043f776..00000000 --- a/Fluidization_Engineering/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Dolar Khachariya -Course: mtech -College/Institute/Organization: Indian Institute of Engineering Bombay -Department/Designation: Electrical engineering -Book Title: Fluidization Engineering -Author: K. Daizo And O. Levenspiel -Publisher: Butterworth-Heinemann, Massachusetts -Year of publication: 1991 -Isbn: 8131200353 -Edition: 2nd \ No newline at end of file diff --git a/Fluidization_Engineering/ch10.ipynb b/Fluidization_Engineering/ch10.ipynb deleted file mode 100755 index e44d1ebe..00000000 --- a/Fluidization_Engineering/ch10.ipynb +++ /dev/null @@ -1,304 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:89c91579d721ed0f833b399593203d4eb19421ab1695bc830f1be612e46bd826" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 : Gas Dispersion and Gas Interchange in Bubbling Beds" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "%matplotlib inline" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].\n", - "For more information, type 'help(pylab)'.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1, Page 253\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from numpy import *\n", - "%matplotlib inline\n", - "#Variable declaration\n", - "umf=[0.01,0.045]; #Velocity at minimum fluidization condition in m/s\n", - "ephsilonmf=[0.5,0.5]; #Void fraction at minimum fluidization condition\n", - "D=[2E-5,7E-5]; #Diffusion coefficient of gas in m**2/s\n", - "g=9.81; #Acceleration due to gravity in m/s**2\n", - "\n", - "#CALCULATION\n", - "db=[5.,10.,15.,20.];\n", - "n=len(umf);\n", - "m=len(db)\n", - "Kbc = zeros((n,m))\n", - "Kce = zeros((n,m))\n", - "Kbe = zeros((n,m))\n", - " \n", - "for i in range(n):\n", - " for j in range(m):\n", - " Kbc[i][j]=4.5*(umf[i]/db[j])+5.85*((D[i]**0.5*g**0.25)/db[j]**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(27)\n", - " Kce[i][j]=6.77*((D[i]*ephsilonmf[i]*0.711*(g*db[j])**0.5)/db[j]**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(34)\n", - " Kbe[i][j]=(Kbc[i][j]*Kce[i][j])/(Kbc[i][j]+Kce[i][j]);#Gas interchange coefficient between bubble and emulsion from Eqn.(14)\n", - "\n", - "#OUTPUT\n", - "i=0;\n", - "j=0;\n", - "k=0;\n", - "while k" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2, Page 267" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from scipy.optimize import fsolve \n", - "import math \n", - "\n", - "#INPUT\n", - "umf=0.12 #Velocity at minimum fluidization condition in cm/s\n", - "uo=40.; #Superficial gas velocity in cm/s\n", - "ub=120; #Velocity of the bubble in cm/s\n", - "D=0.7; #Diffusion coefficient of gas in cm**2/s\n", - "abkbe1=1.; #Bubble-emuslion interchange coefficient for non absorbing particles(m=0)\n", - "abkbe2=18.; #Bubble-emuslion interchange coefficient for highly absorbing particles(m=infinity)\n", - "g=980.; #Acceleration due to gravity in square cm/s**2\n", - "\n", - "#CALCULATION\n", - "#For non absorbing particles m=0,etad=0\n", - "Kbc=(ub/uo)*(abkbe1);\n", - "dbguess=2;#Guess value of db\n", - "def solver_func(db): #Function defined for solving the system\n", - " return abkbe1-(uo/ub)*(4.5*(umf/db)+5.85*(D**0.5*g**0.25)/(db**(5/4.)));#Eqn.(10.27)\n", - "\n", - "d=fsolve(solver_func,dbguess)\n", - "#For highly absorbing particles m=infinity, etad=1\n", - "M=abkbe2-(uo/ub)*Kbc;\n", - "#For intermediate condition\n", - "alpha=100.;\n", - "m=10.;\n", - "etad=1./(1+(alpha/m));#Fitted adsorption efficiency factor from Eqn.(23)\n", - "abkbe3=M*etad+(uo/ub)*Kbc;\n", - "\n", - "#OUTPUT\n", - "print 'For non absorbing particles:\\tDiameter of bubble=%fcm\\tBubble-cloud interchange coefficient=%fs**-1'%(d,Kbc);\n", - "print 'For highly absorbing partilces:\\tM=%f'%(M);\n", - "print 'For intermediate condition:\\tFitted adsorption efficiency factor:%f\\tBubble-emuslion interchange coefficient:%fs**-1'%(etad,abkbe3);\n", - "\n", - "#====================================END OF PROGRAM ======================================================" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For non absorbing particles:\tDiameter of bubble=6.010032cm\tBubble-cloud interchange coefficient=3.000000s**-1\n", - "For highly absorbing partilces:\tM=17.000000\n", - "For intermediate condition:\tFitted adsorption efficiency factor:0.090909\tBubble-emuslion interchange coefficient:2.545455s**-1\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3, Page 273\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "rhos=1.3; #Density of solids in g/cc\n", - "phis=0.806; #Sphericity of solids\n", - "gammab=0.001; #Ratio of volume of dispersed solids to that of bubble phase\n", - "rhog=1.18E-3; #Density of air in g/cc\n", - "Pr=0.69; #Prandtl number\n", - "myu=1.8E-4; #Viscosity of gas in g/cm s\n", - "Cpg=1.00; #Specific heat capacity of gas in J/g K\n", - "ephsilonmf=0.45; #Void fraction at minimum fluidization condition\n", - "kg=2.61E-4; #Thermal concuctivity of gas in W/cm k\n", - "dp=0.036; #Particle size in cm\n", - "umf=6.5; #Velocity at minimum fluidization condition in cm/s\n", - "ut=150.; #Terminal velocity in cm/s\n", - "db=0.4; #Equilibrium bubble size in cm\n", - "etah=1; #Efficiency of heat transfer\n", - "uo=[10.,20.,30.,40.,50.];#Superficial gas velocity in cm/s\n", - "g=980.; #Acceleration due to gravity in square cm/s**2\n", - "\n", - "#CALCULATION\n", - "Nustar=2+(((dp*ut*rhog)/myu)**0.5*Pr**(1./3));#Nusselt no. from Eqn.(25)\n", - "Hbc=4.5*(umf*rhog*Cpg/db)+5.85*((kg*rhog*Cpg)**0.5*g**0.25/db**(5./4));#Total heat interchange across the bubble-cloud boundary from Eqn.(32)\n", - "ubr=0.711*(g*db)**0.5;#Rise velocity of the bubble from Eqn.(6.7)\n", - "n=len(uo);\n", - "i=0;\n", - "x = [0,0,0,0,0]\n", - "Nubed = [0,0,0,0,0]\n", - "Rep = [0,0,0,0,0]\n", - "\n", - "while i" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4, Page 274\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "rhog=1.2; #Density of air in kg/m**3\n", - "myu=1.8E-5; #Viscosity of gas in kg/m s\n", - "kg=2.6E-2; #Thermal concuctivity of gas in W/m k\n", - "dp=1E-4; #Particle size in m\n", - "rhos=8920; #Density of solids in kg/m**3\n", - "Cps=390; #Specific heat capacity of the solid in J/kg K\n", - "ephsilonf=0.5; #Void fraction of the fluidized bed\n", - "umf=0.1; #Velocity at minimum fluidization condition in m/s\n", - "uo=0.1; #Superficial gas velocity in m/s\n", - "pi=3.14\n", - "\n", - "#CALCULATION\n", - "to=0; #Initial temperature of the bed\n", - "T=100; #Temperature of the bed\n", - "t=0.99*T; #Particle temperature i.e. when it approaches 1% of the bed temperature\n", - "mp=(pi/6)*dp**3*rhos; #Mass of the particle\n", - "A=pi*dp**2; #Surface area of the particle\n", - "Rep=(dp*uo*rhog)/myu; #Reynold's no. of the particle\n", - "Nubed=0.0178; #Nusselt no. from Fig.(6)\n", - "hbed1=(Nubed*kg)/dp; #Heat transfer coefficient of the bed\n", - "t1=(mp*Cps/(hbed1*A))*math.log((T-to)/(T-t));#Time needed for the particle approach 1 percentage of the bed temperature in case(a)\n", - "hbed2=140*hbed1;#Since from Fig.(6) Nup is 140 times Nubed\n", - "t2=(mp*Cps/(hbed2*A))*math.log((T-to)/(T-t));#Time needed for the particle approach 1 percentage of the bed temperature in case(b)\n", - "\n", - "#OUTPUT\n", - "print 'Case(a):Using the whole bed coefficient from Fig.(6)'\n", - "print '\\tTime needed for the particle approach 1 percentage of the bed temperature is %.0fs'%t1\n", - "print 'Case(b):Uisng the single-particle coefficient of Eqn.(25),also shown in Fig.(6)'\n", - "print '\\tTime needed for the particle approach 1 percentage of the bed temperature is %.2fs'%t2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Case(a):Using the whole bed coefficient from Fig.(6)\n", - "\tTime needed for the particle approach 1 percentage of the bed temperature is 58s\n", - "Case(b):Uisng the single-particle coefficient of Eqn.(25),also shown in Fig.(6)\n", - "\tTime needed for the particle approach 1 percentage of the bed temperature is 0.41s\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluidization_Engineering/ch12.ipynb b/Fluidization_Engineering/ch12.ipynb deleted file mode 100755 index 1fc80a09..00000000 --- a/Fluidization_Engineering/ch12.ipynb +++ /dev/null @@ -1,396 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3cabb972e9b40cc3c2621280c95233b4046eb8d671e52d74d499a7e149a3d9aa" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 : Conversion of Gas in Catalytic Reactions" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1, Page 293\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Kr=10.; #rate constant in m**3 gas/m**3 cat s\n", - "D=2E-5; #Diffusion coefficient of gas in m**2/s\n", - "dpbar=68.; #Average partilce size in micrometers\n", - "ephsilonm=0.5; #Void fraction of fixed bed\n", - "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", - "ephsilonmf=0.55; #Void fraction at minimum fluidization condition\n", - "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", - "db=0.04; #Equilibrium bubble size in m\n", - "Lm=0.7; #Length of the bed in m\n", - "uo=0.1; #Superficial gas velocity in m/s\n", - "dbed=0.26; #Diameter of the bed in m\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "\n", - "#CALCULATION\n", - "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", - "ub=uo-umf+ubr;#Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", - "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5./4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", - "Kce=6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", - "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", - "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", - "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", - "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", - "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", - "Lf=(1-ephsilonm)*Lm/(1-ephsilonf);#Length of fixed bed from Eqn.(6.19)\n", - "Krtou=Kr*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", - "Kf=gammab*Kr+1/((1/Kbc)+(1/(gammac*Kr+1/((1/Kce)+(1/(gammae*Kr))))));#Raction rate for fluidized bed from Eqn.(14)\n", - "XA=math.exp(-1*Kf*Lf/ub);#Conversion from Eqn.(16)\n", - "\n", - "#OUTPUT\n", - "print 'The dimnesionless reaction rate group: %f'%Krtou\n", - "print 'The reaction rate for fluidized bed: %fs**-1'%Kf\n", - "print 'Conversion: %f'%XA\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dimnesionless reaction rate group: 35.000000\n", - "The reaction rate for fluidized bed: 1.979872s**-1\n", - "Conversion: 0.030056\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2, Page 298\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "umf=0.005; #Velocity at minimum fluidization condition in m/s\n", - "ephsilonm=0.52; #Void fraction of fixed bed\n", - "ephsilonmf=0.57; #Void fraction at minimum fluidization condition\n", - "DA=8.1E-6; #Diffusion coefficient of gas in m**2/s\n", - "DR=8.4E-6; #Diffusion coefficient of gas in m**2/s\n", - "Lm=5; #Length of the bed in m\n", - "dte=1; #Diameter of tube in m\n", - "Kr1=1.5; #rate constant in m**3 gas/m**3 cat s\n", - "Kr3=0.01; #rate constant in m**3 gas/m**3 cat s\n", - "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", - "uo=0.45; #Superficial gas velocity in m/s\n", - "db=0.05; #Equilibrium bubble size in m from Fig.(6.8)\n", - "ub=1.5; #Velocity of bubbles in bubbling bed in m/s from Fig.(6.11(a))\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "\n", - "#CALCULATION\n", - "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", - "KbcA=4.5*(umf/db)+5.85*((DA**0.5*g**0.25)/db**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", - "KceA=6.77*((DA*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", - "KbcR=4.5*(umf/db)+5.85*((DR**0.5*g**0.25)/db**(5./4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", - "KceR=6.77*((DR*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", - "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", - "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", - "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", - "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", - "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", - "Lf=(1-ephsilonm)*Lm/(1-ephsilonf);#Length of fixed bed from Eqn.(6.19)\n", - "Krtou=Kr1*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", - "Kr12=Kr1;#Since the reactions are a special case of Denbigh scheme\n", - "Kr34=Kr3;\n", - "Kf1=(gammab*Kr12+1/((1/KbcA)+(1/(gammac*Kr12+1/((1/KceA)+(1/(gammae*Kr12)))))))*(delta/(1-ephsilonf));#Rate of reaction 1 for fluidized bed from Eqn.(14)\n", - "Kf3=(gammab*Kr34+1/((1/KbcR)+(1/(gammac*Kr34+1/((1/KceR)+(1/(gammae*Kr34)))))))*(delta/(1-ephsilonf));#Rate of reaction 2 for fluidized bed from Eqn.(14)\n", - "Kf12=Kf1;\n", - "Kf34=Kf3;\n", - "KfA=((KbcR*KceA/gammac**2+(Kr12+KceA/gammac+KceA/gammae)* \\\n", - " (Kr34+KceR/gammac+KceR/gammae))*delta*KbcA*Kr12*Kr34/ \\\n", - " (1-ephsilonf))/(((Kr12+KbcA/gammac)*(Kr12+KceA/gammae)+Kr12*KceA/gammac) \\\n", - " *((Kr34+KbcR/gammac)*(Kr34+KceR/gammae)+Kr34*KceR/gammac));\n", - " #Rate of raection with respect to A from Eqn.(35)\n", - "KfAR=Kr1/Kr12*Kf12-KfA;#Rate of reaction from Eqn.(34)\n", - "tou=Lf*(1-ephsilonf)/uo;#Residence time from Eqn.(5)\n", - "XA=1-math.exp(-Kf1*tou);#Conversion of A from Eqn.(26)\n", - "XR=1-((KfAR/(Kf12-Kf34))*(math.exp(-Kf34*tou)-math.exp(-Kf12*tou)));#Conversion of R from Eqn.(27)\n", - "SR=(1-XR)/XA;#Selectivity of R\n", - "\n", - "#OUTPUT\n", - "\n", - "print 'Rate of reaction 1 for fluidized bed:%.4f'%Kf1\n", - "print 'Rate of reaction 2 for fluidized bed:%.4f'%Kf3\n", - "print 'Rate of reaction 1 with respect to A:%.4f'%KfA\n", - "print 'The Conversion of Napthalene:%.0f percentage'%(XA*100);\n", - "print 'The selectivity of Phthalic anhydride:%.0f percentage'%(SR*100);\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rate of reaction 1 for fluidized bed:0.6007\n", - "Rate of reaction 2 for fluidized bed:0.0099\n", - "Rate of reaction 1 with respect to A:0.0058\n", - "The Conversion of Napthalene:96 percentage\n", - "The selectivity of Phthalic anhydride:95 percentage\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3, Page 302\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Kr=3.; #rate constant in m**3 gas/m**3 cat s\n", - "db=0.12; #Equilibrium bubble size in m\n", - "D=9E-5; #Diffusion coefficient of gas in m**2/s\n", - "dpbar=68; #Average partilce size in micrometers\n", - "ephsilonm=0.42; #Void fraction of fixed bed\n", - "uo=0.4; #Superficial gas velocity in m/s\n", - "Lm=0.8; #Length of the bed in m\n", - "ephsilonmf=0.45; #Void fraction at minimum fluidization condition\n", - "umf=0.21; #Velocity at minimum fluidization condition in m/s\n", - "gammab=0; #Ratio of volume of dispersed solids to that of bubble phase\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "\n", - "#CALCULATION\n", - "ubr=0.711*(g*db)**0.5; #Rise velocity of bubble from Eqn.(6.7)\n", - "ub=uo-umf+ubr; #Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", - "ubstar=ub+3*umf; #Rise velocity of the bubble gas from Eqn.(45)\n", - "delta=(uo-umf)/(ub+umf);#Fraction of bed in bubbles from Eqn.(6.46)\n", - "Kbe=4.5*(umf/db); #Interchange coefficient between bubble and emulsion from Eqn.(47)\n", - "Lf=Lm*(1-ephsilonm)/((1-delta)*(1-ephsilonmf));#Length of fixed bed\n", - "phi=((Kr/Kbe)**2*((1-ephsilonmf)-gammab*(umf/ubstar))**2+ \\\n", - " ((delta/(1-delta))+umf/ubstar)**2+2*(Kr/Kbe)*((1-ephsilonmf) \\\n", - " -gammab*(umf/ubstar))*((delta/(1-delta))-umf/ubstar))**0.5;\n", - " #From Eqn.(52)\n", - " \n", - "q1=0.5*Kr/umf*((1-ephsilonmf)+gammab*(umf/ubstar))+0.5*Kbe/umf* \\\n", - " (((delta/(1-delta))+umf/ubstar)-phi);#From Eqn.(50)\n", - "q2=0.5*Kr/umf*((1-ephsilonmf)+gammab*(umf/ubstar))+0.5*Kbe/umf* \\\n", - " (((delta/(1-delta))+umf/ubstar)+phi);#From Eqn.(50)\n", - " \n", - "si1=0.5-0.5*((1-delta)/delta)*(umf/ubstar-Kr/Kbe*((1-ephsilonmf)- \\\n", - " gammab*(umf/ubstar))-phi);#From Eqn.(51)\n", - "si2=0.5-0.5*((1-delta)/delta)*(umf/ubstar-Kr/Kbe*((1-ephsilonmf)- \\\n", - " gammab*(umf/ubstar))+phi);#From Eqn.(51)\n", - "XA=1-(delta/(1-delta))*(1/(uo*phi))*((1-si2)*(si1*delta*ubstar+ \\\n", - " (1-delta)*umf)*math.exp(-q1*Lf)+(si1-1)* \\\n", - " (si2*delta*ubstar+(1-delta)*umf)*math.exp(-q2*Lf));\n", - " #Conversion from Eqn.(49)\n", - " \n", - "Krtou=Kr*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", - "\n", - "#OUTPUT\n", - "print 'COmparing the values of 1-XA = %f and Krtou = %f with Fig.(6), \\\n", - "we can conlcude that this operating condition is shown as point \\\n", - "A in Fig.(3)'%(1-XA,Krtou);\n", - "print 'Line 2 gives the locus of conversions for different values of the \\\n", - "reaction rate group for this fluidized contacting'\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COmparing the values of 1-XA = 0.113843 and Krtou = 3.480000 with Fig.(6), we can conlcude that this operating condition is shown as point A in Fig.(3)\n", - "Line 2 gives the locus of conversions for different values of the reaction rate group for this fluidized contacting\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4, Page 305\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "uo=0.25; #Superficial gas velocity in m/s\n", - "db=0.025; #Equilibrium bubble size in m\n", - "Kr=1.5; #rate constant in m**3 gas/m**3 cat s\n", - "umf=0.21; #Velocity at minimum fluidization condition in m/s\n", - "Lm=0.8; #Length of the bed in m\n", - "ephsilonm=0.42; #Void fraction of fixed bed\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "\n", - "#CALCULATION\n", - "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", - "ub=uo-umf+ubr;#Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", - "delta=(uo-umf)/(ub+2*umf);#Fraction of bed in bubbles from Eqn.(55) since ub/umf<<1 \n", - "XA=1-math.exp(-Kr*Lm*((1-ephsilonm)/uo)*(umf/uo)*(1-delta));#Conversion from Eqn.(57)\n", - "Krtou=Kr*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", - "\n", - "\n", - "#OUTPUT\n", - "print 'Comparing the values of 1-XA = %f and Krtou = %f with Fig.(6), \\\n", - "we can conlcude that this operating condition is shown \\\n", - "as point B in Fig.(3)'%(1-XA,Krtou);\n", - "print 'Line 3 gives the locus of conversions for different values \\\n", - "of the reaction rate group for this fluidized contacting'\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Comparing the values of 1-XA = 0.108243 and Krtou = 2.784000 with Fig.(6), we can conlcude that this operating condition is shown as point B in Fig.(3)\n", - "Line 3 gives the locus of conversions for different values of the reaction rate group for this fluidized contacting\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5, Page 307\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "uo=0.3; #Superficial gas velocity in m/s\n", - "Lf=1.1; #Length of fixed bed in m\n", - "Hf=1.2; #Length of freeboard in m\n", - "db=0.04; #Equilibrium bubble size in m\n", - "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", - "ephsilonmf=0.55; #Void fraction at minimum fluidization condition\n", - "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", - "Kr=10.; #rate constant in m**3 gas/m**3 cat s\n", - "D=2E-5; #Diffusion coefficient of gas in m**2/s\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "\n", - "#CALCULATION\n", - "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", - "ub=uo-umf+ubr;#Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", - "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5./4));\n", - "#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", - "\n", - "Kce=6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;\n", - "#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", - "\n", - "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", - "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", - "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", - "gammac=(1-ephsilonmf)*((3.0/(ubr*ephsilonmf/umf-1))+fw);\n", - "#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", - "\n", - "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;\n", - "#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", - "\n", - "Kf=(gammab*Kr)+1.0/((1.0/Kbc)+(1.0/(gammac*Kr+1.0/((1.0/Kce)+(1.0/(gammae*Kr))))));\n", - "#Raction rate for fluidized bed from Eqn.(14)\n", - "\n", - "XA=1-math.exp(-1*Kf*Lf/ub);#Conversion at the top of dense bed from Eqn.(16)\n", - "etabed=(Kf*delta)/(Kr*(1-ephsilonf));#Reactor efficiency from Eqn.(22)\n", - "a=0.6/uo #Since uoa = 0.6s**-1 from Fig.(5)\n", - "adash=6.62; #From Fig.(5)\n", - "XA1=1-1.0/(math.exp(((1-ephsilonf)*Kr/(uo*a))*((1-math.exp(-a*Hf))- \\\n", - " ((1-etabed)/(1+(adash/a)))*(1-math.exp(-(a+adash)*Hf)))));#Conversion from Eqn.(64)\n", - "XA2=1-(1.0-XA1)*(1.0-XA);#Conversion at the exit from Eqn.(64)\n", - "\n", - "#OUTPUT\n", - "print 'The conversion:'\n", - "print '\\tAt the top pf the dense bed: %d percentage'%(XA1*100)\n", - "print '\\tAt the reactor exit: %d percentage'%(XA2*100);\n", - "\n", - "#Disclaimer: The value of kf deviate from the one given in textbook, where as it is close to the value obtained by manual calculation. \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conversion:\n", - "\tAt the top pf the dense bed: 96 percentage\n", - "\tAt the reactor exit: 99 percentage\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fluidization_Engineering/ch13.ipynb b/Fluidization_Engineering/ch13.ipynb deleted file mode 100755 index 18536015..00000000 --- a/Fluidization_Engineering/ch13.ipynb +++ /dev/null @@ -1,308 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a97460b196d7b42e945dcfefc11684cc1c39c5847f8b0bdc9e3f6cdcd94bfcc3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter 13 : Heat Transfer between Fluidized Beds and Surfaces" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 1, Page 331\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "dp=57.0; #Particle size in micrometer\n", - "rhos=940.0; #Density of solids in kg/m**3\n", - "Cps=828.0; #Specific heat capacity of the solid in J/kg K\n", - "ks=0.20; #Thermal conductivity of solids in W/m k\n", - "kg=0.035; #Thermal concuctivity of gas in W/m k\n", - "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", - "ephsilonmf=0.476;#Void fraction at minimum fluidization condition\n", - "do1=0.0254; #Outside diameter of tube in m\n", - "L=1;\n", - "uo=[0.05,0.1,0.2,0.35];#Superficial gas velocity in m/s\n", - "nw=[2.,3.1,3.4,3.5]; #Bubble frequency in s**-1\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "\n", - "\n", - "#CALCULATION\n", - "dte=4.*do1*L/2.*L; #Hydraulic diameter from Eqn.(6.13)\n", - "db=(1+1.5)*0.5*dte; #Rise velocity of the bubble\n", - "ubr=0.711*(g*db)**0.5; #Rise velocity of bubble from Eqn.(6.7)\n", - "phib=0.19;#From Fig.(15) for ks/kg=5.7\n", - "ke=ephsilonmf*kg+(1-ephsilonmf)*ks*(1/((phib*(ks/kg))+(2/3.0)))\n", - " #Effective thermal conductivity of bed from Eqn.(3) \n", - " \n", - "n=len(uo);\n", - "i=0;\n", - "ub = [0,0,0,0]\n", - "delta = [0,0,0,0]\n", - "h = [0,0,0,0]\n", - "while ix2min:\n", - " excess_air[i]=(x2[i]-x2min)/x2min; #Excess air used\n", - " else:\n", - " excess_air[i]=0;\n", - " i=i+1;\n", - "\n", - "#OUTPUT \n", - "print 'T4(degree celcius)',\n", - "print '\\tFs/F1',\n", - "print '\\t\\tF2/F1',\n", - "print '\\t\\tExcess air(percentage)'\n", - "i=0;\n", - "while idte:\n", - " li=(pi/4*dte*do1+pi/4*do1**2)**0.5;#Pitch if we add dummy tubes\n", - "import math\n", - "f=li**2-pi/4*do1**2;#Fraction of bed cross section taken up by tubes\n", - "dt1=math.sqrt(4/pi*At/(1-f));#Reactor diameter including all its tubes\n", - "\n", - "#OUTPUT\n", - "print 'Superficial gas velocity=%fm/s'%uo\n", - "print 'No. of %1.0fm tubes required=%1.0f'%(L,Nt);\n", - "print 'Reactor diameter=%fm'%dt1\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Superficial gas velocity=0.460000m/s\n", - "No. of 7m tubes required=295\n", - "Reactor diameter=7.173176m\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3, Page 444\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "db=0.08; #Estimated bubble size in m\n", - "dte=2; #Equivalent diameter in m\n", - "F1=55.6; #Feed rate of oil in kg/s\n", - "XA=0.63; #Conversion\n", - "uo=0.6; #Superficial gas velocity in m/s\n", - "T1=500.0; #Temperature of reactor in degree C\n", - "T2=580.0; #Temperature of regenerator in degree C\n", - "Fs=F1*23.3; #Solid circulation rate from Ex.(15.2)\n", - "rhos=1200.0; #Density of catalyst in kg/m**3\n", - "dpbar=60.0; #Average particle size in micrometer\n", - "ephsilonm=0.50;#Void fraction of fixed bed\n", - "ephsilonmf=0.55;#Void fraction at minimum fluidized condition\n", - "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", - "dt=8.0; #Diameter of reactor in m\n", - "D=2E-5; #Diffusion coefficient of gas in m**2/s\n", - "Kr=8.6; #Rate constant for reaction at 500 degree C in s**-1\n", - "Ka1=0.06; #Rate constant for deactivatiion at 500 degree C in s**-1\n", - "Ka2=0.012; #Rate constant for regeneration at 580 degree C in s**-1\n", - "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", - "g=9.81; #Acceleration due to gravity in square m/s**2\n", - "pi=3.14;\n", - "\n", - "#CALCULATION\n", - "#Parameters for the fluidized reactor\n", - "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", - "ub=1.55*((uo-umf)+14.1*(db+0.005))*dte**0.32+ubr;#Bubble velocity for Geldart A particles from Equation from Eqn.(6.11)\n", - "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", - "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", - "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", - "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", - "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", - "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", - "Kce=6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", - "import math\n", - "#Bed height versus catalyst activity in reactor\n", - "a1bar=0.07;#Guess value for average activity in reactor\n", - "x=Kr*a1bar;#Value of Kra1 to be used in the following equation\n", - "Kf=(gammab*x+1/((1/Kbc)+(1/(gammac*x+1/((1/Kce)+(1/(gammae*x)))))))*(delta/(1-ephsilonf));#Effective rate constant from Eqn.(12.14)\n", - "tou=-math.log(1-XA)/Kf;#Space time from Eqn.(12.16)\n", - "Lm=tou*uo/(1-ephsilonm);#Length of fixed bed for guess value of a1bar\n", - "a1bar1=[0.0233,0.0465,0.0698,0.0930,0.116,0.140];#Various activity values to find Lm\n", - "x1 = [0,0,0,0,0,0]\n", - "Kf1 = [0,0,0,0,0,0]\n", - "tou1 = [0,0,0,0,0,0]\n", - "Lm1 = [0,0,0,0,0,0]\n", - "\n", - "n=len(a1bar1);\n", - "i=0;\n", - "while i=3000:\n", - " Cd=0.60;\n", - "elif Ret>=2000:\n", - " Cd=0.61;\n", - "elif Ret>=1000:\n", - " Cd=0.64;\n", - "elif Ret>=500:\n", - " Cd=0.68;\n", - "elif Ret>=300:\n", - " Cd=0.70;\n", - "elif Ret>=100:\n", - " Cd=0.68;\n", - "\n", - "#Computation of gas velocity through orifice\n", - "uor=Cd*((2*deltapd)/rhog)**0.5; #Calculation of gas velocity through orifice by using Eqn.(12)\n", - "f=(uo/uor)*100; #Calculation of fraction of open area in the perforated plate \n", - "\n", - "\n", - "#Computation of number of orifices per unit area of distributor\n", - "dor=[0.001,0.002,0.004]; #Different orifice diameters in m\n", - "n=len(dor);\n", - "i=0;\n", - "Nor = [0.,0.,0.]\n", - "while iuf:\n", - " Dshc.append((3/16.0)*(delta[k]/(1-delta[k]))*((alpha**2*db[j]*ubr[k]*((((ubr[k]+2*uf)/(ubr[k]-uf))**(1.0/3))-1))));\n", - " #Horizontal Distribution coeff. from Eqn.(14)\n", - " else:\n", - " Dsh.append((3.0/16)*(delta/(1-delta))*(alpha**2*umf*db/ephsilonmf))\n", - " #Horizontal Distribution coeff. from Eqn.(15)\n", - " Dshc.append((3/16.0)*(delta[k]/(1-delta[k]))*((alpha**2*db[j]*ubr[k]*((((ubr[k]+2*uf)/(ubr[k]-uf))**(1/3.0))-1))));#Horizontal Distribution coeff. from Eqn.(14)\n", - " k=k+1;\n", - "i=0;\n", - "j=0;\n", - "k=0;\n", - "while k>uf=%fm/s we use Eqn.(14).'%(ub[k],uf)\n", - " print 'Gas Velocity(m/s)'\n", - " print '\\tHorizontal Drift Coefficient Calculated(m**2/s)'\n", - " print '\\tHorizontal Drift Coefficient from Experiment(m**2/s)'\n", - " while j>uf=0.404762m/s we use Eqn.(14).\n", - "Gas Velocity(m/s)\n", - "\tHorizontal Drift Coefficient Calculated(m**2/s)\n", - "\tHorizontal Drift Coefficient from Experiment(m**2/s)\n", - "db=0.100000m\n", - "0.370000 \t\t0.001283 \t\t\t\t\t0.001200\n", - "0.470000 \t\t0.001283 \t\t\t\t\t0.001800\n", - "0.570000 \t\t0.001924 \t\t\t\t\t0.002100\n", - "0.670000 \t\t0.001924 \t\t\t\t\t0.002500\n", - "db=0.140000m\n", - "0.370000 \t\t0.002566 \t\t\t\t\t0.001200\n", - "0.470000 \t\t0.002566 \t\t\t\t\t0.001800\n", - "0.570000 \t\t0.003207 \t\t\t\t\t0.002100\n", - "0.670000 \t\t0.003207 \t\t\t\t\t0.002500\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3, Page 232\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Gsup=1.5; #Solid interchange rate in kg/m**2plate s\n", - "dor=19.1; #Orifice diameter in mm\n", - "dp=210; #Particle size in micrometer\n", - "uo=0.4; #Superficial gas velocity in m/s\n", - "fopen=[0.12,0.17,0.26]; #Open area fraction \n", - "pi=3.14;\n", - "\n", - "#CALCULATION\n", - "n=len(fopen);\n", - "uor = []\n", - "ls1 = []\n", - "i=0\n", - "while i" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2, Page 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#INPUT\n", + "umf=0.12 #Velocity at minimum fluidization condition in cm/s\n", + "uo=40.; #Superficial gas velocity in cm/s\n", + "ub=120; #Velocity of the bubble in cm/s\n", + "D=0.7; #Diffusion coefficient of gas in cm**2/s\n", + "abkbe1=1.; #Bubble-emuslion interchange coefficient for non absorbing particles(m=0)\n", + "abkbe2=18.; #Bubble-emuslion interchange coefficient for highly absorbing particles(m=infinity)\n", + "g=980.; #Acceleration due to gravity in square cm/s**2\n", + "\n", + "#CALCULATION\n", + "#For non absorbing particles m=0,etad=0\n", + "Kbc=(ub/uo)*(abkbe1);\n", + "dbguess=2;#Guess value of db\n", + "def solver_func(db): #Function defined for solving the system\n", + " return abkbe1-(uo/ub)*(4.5*(umf/db)+5.85*(D**0.5*g**0.25)/(db**(5/4.)));#Eqn.(10.27)\n", + "\n", + "d=fsolve(solver_func,dbguess)\n", + "#For highly absorbing particles m=infinity, etad=1\n", + "M=abkbe2-(uo/ub)*Kbc;\n", + "#For intermediate condition\n", + "alpha=100.;\n", + "m=10.;\n", + "etad=1./(1+(alpha/m));#Fitted adsorption efficiency factor from Eqn.(23)\n", + "abkbe3=M*etad+(uo/ub)*Kbc;\n", + "\n", + "#OUTPUT\n", + "print 'For non absorbing particles:\\tDiameter of bubble=%fcm\\tBubble-cloud interchange coefficient=%fs**-1'%(d,Kbc);\n", + "print 'For highly absorbing partilces:\\tM=%f'%(M);\n", + "print 'For intermediate condition:\\tFitted adsorption efficiency factor:%f\\tBubble-emuslion interchange coefficient:%fs**-1'%(etad,abkbe3);\n", + "\n", + "#====================================END OF PROGRAM ======================================================" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For non absorbing particles:\tDiameter of bubble=6.010032cm\tBubble-cloud interchange coefficient=3.000000s**-1\n", + "For highly absorbing partilces:\tM=17.000000\n", + "For intermediate condition:\tFitted adsorption efficiency factor:0.090909\tBubble-emuslion interchange coefficient:2.545455s**-1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3, Page 273\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "rhos=1.3; #Density of solids in g/cc\n", + "phis=0.806; #Sphericity of solids\n", + "gammab=0.001; #Ratio of volume of dispersed solids to that of bubble phase\n", + "rhog=1.18E-3; #Density of air in g/cc\n", + "Pr=0.69; #Prandtl number\n", + "myu=1.8E-4; #Viscosity of gas in g/cm s\n", + "Cpg=1.00; #Specific heat capacity of gas in J/g K\n", + "ephsilonmf=0.45; #Void fraction at minimum fluidization condition\n", + "kg=2.61E-4; #Thermal concuctivity of gas in W/cm k\n", + "dp=0.036; #Particle size in cm\n", + "umf=6.5; #Velocity at minimum fluidization condition in cm/s\n", + "ut=150.; #Terminal velocity in cm/s\n", + "db=0.4; #Equilibrium bubble size in cm\n", + "etah=1; #Efficiency of heat transfer\n", + "uo=[10.,20.,30.,40.,50.];#Superficial gas velocity in cm/s\n", + "g=980.; #Acceleration due to gravity in square cm/s**2\n", + "\n", + "#CALCULATION\n", + "Nustar=2+(((dp*ut*rhog)/myu)**0.5*Pr**(1./3));#Nusselt no. from Eqn.(25)\n", + "Hbc=4.5*(umf*rhog*Cpg/db)+5.85*((kg*rhog*Cpg)**0.5*g**0.25/db**(5./4));#Total heat interchange across the bubble-cloud boundary from Eqn.(32)\n", + "ubr=0.711*(g*db)**0.5;#Rise velocity of the bubble from Eqn.(6.7)\n", + "n=len(uo);\n", + "i=0;\n", + "x = [0,0,0,0,0]\n", + "Nubed = [0,0,0,0,0]\n", + "Rep = [0,0,0,0,0]\n", + "\n", + "while i" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4, Page 274\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "rhog=1.2; #Density of air in kg/m**3\n", + "myu=1.8E-5; #Viscosity of gas in kg/m s\n", + "kg=2.6E-2; #Thermal concuctivity of gas in W/m k\n", + "dp=1E-4; #Particle size in m\n", + "rhos=8920; #Density of solids in kg/m**3\n", + "Cps=390; #Specific heat capacity of the solid in J/kg K\n", + "ephsilonf=0.5; #Void fraction of the fluidized bed\n", + "umf=0.1; #Velocity at minimum fluidization condition in m/s\n", + "uo=0.1; #Superficial gas velocity in m/s\n", + "pi=3.14\n", + "\n", + "#CALCULATION\n", + "to=0; #Initial temperature of the bed\n", + "T=100; #Temperature of the bed\n", + "t=0.99*T; #Particle temperature i.e. when it approaches 1% of the bed temperature\n", + "mp=(pi/6)*dp**3*rhos; #Mass of the particle\n", + "A=pi*dp**2; #Surface area of the particle\n", + "Rep=(dp*uo*rhog)/myu; #Reynold's no. of the particle\n", + "Nubed=0.0178; #Nusselt no. from Fig.(6)\n", + "hbed1=(Nubed*kg)/dp; #Heat transfer coefficient of the bed\n", + "t1=(mp*Cps/(hbed1*A))*math.log((T-to)/(T-t));#Time needed for the particle approach 1 percentage of the bed temperature in case(a)\n", + "hbed2=140*hbed1;#Since from Fig.(6) Nup is 140 times Nubed\n", + "t2=(mp*Cps/(hbed2*A))*math.log((T-to)/(T-t));#Time needed for the particle approach 1 percentage of the bed temperature in case(b)\n", + "\n", + "#OUTPUT\n", + "print 'Case(a):Using the whole bed coefficient from Fig.(6)'\n", + "print '\\tTime needed for the particle approach 1 percentage of the bed temperature is %.0fs'%t1\n", + "print 'Case(b):Uisng the single-particle coefficient of Eqn.(25),also shown in Fig.(6)'\n", + "print '\\tTime needed for the particle approach 1 percentage of the bed temperature is %.2fs'%t2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Case(a):Using the whole bed coefficient from Fig.(6)\n", + "\tTime needed for the particle approach 1 percentage of the bed temperature is 58s\n", + "Case(b):Uisng the single-particle coefficient of Eqn.(25),also shown in Fig.(6)\n", + "\tTime needed for the particle approach 1 percentage of the bed temperature is 0.41s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch12.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch12.ipynb new file mode 100755 index 00000000..1fc80a09 --- /dev/null +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch12.ipynb @@ -0,0 +1,396 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3cabb972e9b40cc3c2621280c95233b4046eb8d671e52d74d499a7e149a3d9aa" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Conversion of Gas in Catalytic Reactions" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1, Page 293\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Kr=10.; #rate constant in m**3 gas/m**3 cat s\n", + "D=2E-5; #Diffusion coefficient of gas in m**2/s\n", + "dpbar=68.; #Average partilce size in micrometers\n", + "ephsilonm=0.5; #Void fraction of fixed bed\n", + "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", + "ephsilonmf=0.55; #Void fraction at minimum fluidization condition\n", + "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", + "db=0.04; #Equilibrium bubble size in m\n", + "Lm=0.7; #Length of the bed in m\n", + "uo=0.1; #Superficial gas velocity in m/s\n", + "dbed=0.26; #Diameter of the bed in m\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "\n", + "#CALCULATION\n", + "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", + "ub=uo-umf+ubr;#Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", + "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5./4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", + "Kce=6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", + "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", + "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", + "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", + "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", + "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", + "Lf=(1-ephsilonm)*Lm/(1-ephsilonf);#Length of fixed bed from Eqn.(6.19)\n", + "Krtou=Kr*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", + "Kf=gammab*Kr+1/((1/Kbc)+(1/(gammac*Kr+1/((1/Kce)+(1/(gammae*Kr))))));#Raction rate for fluidized bed from Eqn.(14)\n", + "XA=math.exp(-1*Kf*Lf/ub);#Conversion from Eqn.(16)\n", + "\n", + "#OUTPUT\n", + "print 'The dimnesionless reaction rate group: %f'%Krtou\n", + "print 'The reaction rate for fluidized bed: %fs**-1'%Kf\n", + "print 'Conversion: %f'%XA\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dimnesionless reaction rate group: 35.000000\n", + "The reaction rate for fluidized bed: 1.979872s**-1\n", + "Conversion: 0.030056\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2, Page 298\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "umf=0.005; #Velocity at minimum fluidization condition in m/s\n", + "ephsilonm=0.52; #Void fraction of fixed bed\n", + "ephsilonmf=0.57; #Void fraction at minimum fluidization condition\n", + "DA=8.1E-6; #Diffusion coefficient of gas in m**2/s\n", + "DR=8.4E-6; #Diffusion coefficient of gas in m**2/s\n", + "Lm=5; #Length of the bed in m\n", + "dte=1; #Diameter of tube in m\n", + "Kr1=1.5; #rate constant in m**3 gas/m**3 cat s\n", + "Kr3=0.01; #rate constant in m**3 gas/m**3 cat s\n", + "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", + "uo=0.45; #Superficial gas velocity in m/s\n", + "db=0.05; #Equilibrium bubble size in m from Fig.(6.8)\n", + "ub=1.5; #Velocity of bubbles in bubbling bed in m/s from Fig.(6.11(a))\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "\n", + "#CALCULATION\n", + "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", + "KbcA=4.5*(umf/db)+5.85*((DA**0.5*g**0.25)/db**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", + "KceA=6.77*((DA*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", + "KbcR=4.5*(umf/db)+5.85*((DR**0.5*g**0.25)/db**(5./4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", + "KceR=6.77*((DR*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", + "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", + "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", + "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", + "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", + "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", + "Lf=(1-ephsilonm)*Lm/(1-ephsilonf);#Length of fixed bed from Eqn.(6.19)\n", + "Krtou=Kr1*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", + "Kr12=Kr1;#Since the reactions are a special case of Denbigh scheme\n", + "Kr34=Kr3;\n", + "Kf1=(gammab*Kr12+1/((1/KbcA)+(1/(gammac*Kr12+1/((1/KceA)+(1/(gammae*Kr12)))))))*(delta/(1-ephsilonf));#Rate of reaction 1 for fluidized bed from Eqn.(14)\n", + "Kf3=(gammab*Kr34+1/((1/KbcR)+(1/(gammac*Kr34+1/((1/KceR)+(1/(gammae*Kr34)))))))*(delta/(1-ephsilonf));#Rate of reaction 2 for fluidized bed from Eqn.(14)\n", + "Kf12=Kf1;\n", + "Kf34=Kf3;\n", + "KfA=((KbcR*KceA/gammac**2+(Kr12+KceA/gammac+KceA/gammae)* \\\n", + " (Kr34+KceR/gammac+KceR/gammae))*delta*KbcA*Kr12*Kr34/ \\\n", + " (1-ephsilonf))/(((Kr12+KbcA/gammac)*(Kr12+KceA/gammae)+Kr12*KceA/gammac) \\\n", + " *((Kr34+KbcR/gammac)*(Kr34+KceR/gammae)+Kr34*KceR/gammac));\n", + " #Rate of raection with respect to A from Eqn.(35)\n", + "KfAR=Kr1/Kr12*Kf12-KfA;#Rate of reaction from Eqn.(34)\n", + "tou=Lf*(1-ephsilonf)/uo;#Residence time from Eqn.(5)\n", + "XA=1-math.exp(-Kf1*tou);#Conversion of A from Eqn.(26)\n", + "XR=1-((KfAR/(Kf12-Kf34))*(math.exp(-Kf34*tou)-math.exp(-Kf12*tou)));#Conversion of R from Eqn.(27)\n", + "SR=(1-XR)/XA;#Selectivity of R\n", + "\n", + "#OUTPUT\n", + "\n", + "print 'Rate of reaction 1 for fluidized bed:%.4f'%Kf1\n", + "print 'Rate of reaction 2 for fluidized bed:%.4f'%Kf3\n", + "print 'Rate of reaction 1 with respect to A:%.4f'%KfA\n", + "print 'The Conversion of Napthalene:%.0f percentage'%(XA*100);\n", + "print 'The selectivity of Phthalic anhydride:%.0f percentage'%(SR*100);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of reaction 1 for fluidized bed:0.6007\n", + "Rate of reaction 2 for fluidized bed:0.0099\n", + "Rate of reaction 1 with respect to A:0.0058\n", + "The Conversion of Napthalene:96 percentage\n", + "The selectivity of Phthalic anhydride:95 percentage\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3, Page 302\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Kr=3.; #rate constant in m**3 gas/m**3 cat s\n", + "db=0.12; #Equilibrium bubble size in m\n", + "D=9E-5; #Diffusion coefficient of gas in m**2/s\n", + "dpbar=68; #Average partilce size in micrometers\n", + "ephsilonm=0.42; #Void fraction of fixed bed\n", + "uo=0.4; #Superficial gas velocity in m/s\n", + "Lm=0.8; #Length of the bed in m\n", + "ephsilonmf=0.45; #Void fraction at minimum fluidization condition\n", + "umf=0.21; #Velocity at minimum fluidization condition in m/s\n", + "gammab=0; #Ratio of volume of dispersed solids to that of bubble phase\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "\n", + "#CALCULATION\n", + "ubr=0.711*(g*db)**0.5; #Rise velocity of bubble from Eqn.(6.7)\n", + "ub=uo-umf+ubr; #Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", + "ubstar=ub+3*umf; #Rise velocity of the bubble gas from Eqn.(45)\n", + "delta=(uo-umf)/(ub+umf);#Fraction of bed in bubbles from Eqn.(6.46)\n", + "Kbe=4.5*(umf/db); #Interchange coefficient between bubble and emulsion from Eqn.(47)\n", + "Lf=Lm*(1-ephsilonm)/((1-delta)*(1-ephsilonmf));#Length of fixed bed\n", + "phi=((Kr/Kbe)**2*((1-ephsilonmf)-gammab*(umf/ubstar))**2+ \\\n", + " ((delta/(1-delta))+umf/ubstar)**2+2*(Kr/Kbe)*((1-ephsilonmf) \\\n", + " -gammab*(umf/ubstar))*((delta/(1-delta))-umf/ubstar))**0.5;\n", + " #From Eqn.(52)\n", + " \n", + "q1=0.5*Kr/umf*((1-ephsilonmf)+gammab*(umf/ubstar))+0.5*Kbe/umf* \\\n", + " (((delta/(1-delta))+umf/ubstar)-phi);#From Eqn.(50)\n", + "q2=0.5*Kr/umf*((1-ephsilonmf)+gammab*(umf/ubstar))+0.5*Kbe/umf* \\\n", + " (((delta/(1-delta))+umf/ubstar)+phi);#From Eqn.(50)\n", + " \n", + "si1=0.5-0.5*((1-delta)/delta)*(umf/ubstar-Kr/Kbe*((1-ephsilonmf)- \\\n", + " gammab*(umf/ubstar))-phi);#From Eqn.(51)\n", + "si2=0.5-0.5*((1-delta)/delta)*(umf/ubstar-Kr/Kbe*((1-ephsilonmf)- \\\n", + " gammab*(umf/ubstar))+phi);#From Eqn.(51)\n", + "XA=1-(delta/(1-delta))*(1/(uo*phi))*((1-si2)*(si1*delta*ubstar+ \\\n", + " (1-delta)*umf)*math.exp(-q1*Lf)+(si1-1)* \\\n", + " (si2*delta*ubstar+(1-delta)*umf)*math.exp(-q2*Lf));\n", + " #Conversion from Eqn.(49)\n", + " \n", + "Krtou=Kr*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", + "\n", + "#OUTPUT\n", + "print 'COmparing the values of 1-XA = %f and Krtou = %f with Fig.(6), \\\n", + "we can conlcude that this operating condition is shown as point \\\n", + "A in Fig.(3)'%(1-XA,Krtou);\n", + "print 'Line 2 gives the locus of conversions for different values of the \\\n", + "reaction rate group for this fluidized contacting'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COmparing the values of 1-XA = 0.113843 and Krtou = 3.480000 with Fig.(6), we can conlcude that this operating condition is shown as point A in Fig.(3)\n", + "Line 2 gives the locus of conversions for different values of the reaction rate group for this fluidized contacting\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4, Page 305\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "uo=0.25; #Superficial gas velocity in m/s\n", + "db=0.025; #Equilibrium bubble size in m\n", + "Kr=1.5; #rate constant in m**3 gas/m**3 cat s\n", + "umf=0.21; #Velocity at minimum fluidization condition in m/s\n", + "Lm=0.8; #Length of the bed in m\n", + "ephsilonm=0.42; #Void fraction of fixed bed\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "\n", + "#CALCULATION\n", + "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", + "ub=uo-umf+ubr;#Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", + "delta=(uo-umf)/(ub+2*umf);#Fraction of bed in bubbles from Eqn.(55) since ub/umf<<1 \n", + "XA=1-math.exp(-Kr*Lm*((1-ephsilonm)/uo)*(umf/uo)*(1-delta));#Conversion from Eqn.(57)\n", + "Krtou=Kr*Lm*(1-ephsilonm)/uo;#Dimensionless reaction rate group from Eqn.(5)\n", + "\n", + "\n", + "#OUTPUT\n", + "print 'Comparing the values of 1-XA = %f and Krtou = %f with Fig.(6), \\\n", + "we can conlcude that this operating condition is shown \\\n", + "as point B in Fig.(3)'%(1-XA,Krtou);\n", + "print 'Line 3 gives the locus of conversions for different values \\\n", + "of the reaction rate group for this fluidized contacting'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Comparing the values of 1-XA = 0.108243 and Krtou = 2.784000 with Fig.(6), we can conlcude that this operating condition is shown as point B in Fig.(3)\n", + "Line 3 gives the locus of conversions for different values of the reaction rate group for this fluidized contacting\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5, Page 307\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "uo=0.3; #Superficial gas velocity in m/s\n", + "Lf=1.1; #Length of fixed bed in m\n", + "Hf=1.2; #Length of freeboard in m\n", + "db=0.04; #Equilibrium bubble size in m\n", + "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", + "ephsilonmf=0.55; #Void fraction at minimum fluidization condition\n", + "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", + "Kr=10.; #rate constant in m**3 gas/m**3 cat s\n", + "D=2E-5; #Diffusion coefficient of gas in m**2/s\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "\n", + "#CALCULATION\n", + "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", + "ub=uo-umf+ubr;#Velocity of bubbles in bubbling beds in Eqn.(6.8)\n", + "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5./4));\n", + "#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", + "\n", + "Kce=6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;\n", + "#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", + "\n", + "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", + "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", + "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", + "gammac=(1-ephsilonmf)*((3.0/(ubr*ephsilonmf/umf-1))+fw);\n", + "#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", + "\n", + "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;\n", + "#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", + "\n", + "Kf=(gammab*Kr)+1.0/((1.0/Kbc)+(1.0/(gammac*Kr+1.0/((1.0/Kce)+(1.0/(gammae*Kr))))));\n", + "#Raction rate for fluidized bed from Eqn.(14)\n", + "\n", + "XA=1-math.exp(-1*Kf*Lf/ub);#Conversion at the top of dense bed from Eqn.(16)\n", + "etabed=(Kf*delta)/(Kr*(1-ephsilonf));#Reactor efficiency from Eqn.(22)\n", + "a=0.6/uo #Since uoa = 0.6s**-1 from Fig.(5)\n", + "adash=6.62; #From Fig.(5)\n", + "XA1=1-1.0/(math.exp(((1-ephsilonf)*Kr/(uo*a))*((1-math.exp(-a*Hf))- \\\n", + " ((1-etabed)/(1+(adash/a)))*(1-math.exp(-(a+adash)*Hf)))));#Conversion from Eqn.(64)\n", + "XA2=1-(1.0-XA1)*(1.0-XA);#Conversion at the exit from Eqn.(64)\n", + "\n", + "#OUTPUT\n", + "print 'The conversion:'\n", + "print '\\tAt the top pf the dense bed: %d percentage'%(XA1*100)\n", + "print '\\tAt the reactor exit: %d percentage'%(XA2*100);\n", + "\n", + "#Disclaimer: The value of kf deviate from the one given in textbook, where as it is close to the value obtained by manual calculation. \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conversion:\n", + "\tAt the top pf the dense bed: 96 percentage\n", + "\tAt the reactor exit: 99 percentage\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch13.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch13.ipynb new file mode 100755 index 00000000..18536015 --- /dev/null +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch13.ipynb @@ -0,0 +1,308 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a97460b196d7b42e945dcfefc11684cc1c39c5847f8b0bdc9e3f6cdcd94bfcc3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 13 : Heat Transfer between Fluidized Beds and Surfaces" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1, Page 331\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "dp=57.0; #Particle size in micrometer\n", + "rhos=940.0; #Density of solids in kg/m**3\n", + "Cps=828.0; #Specific heat capacity of the solid in J/kg K\n", + "ks=0.20; #Thermal conductivity of solids in W/m k\n", + "kg=0.035; #Thermal concuctivity of gas in W/m k\n", + "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", + "ephsilonmf=0.476;#Void fraction at minimum fluidization condition\n", + "do1=0.0254; #Outside diameter of tube in m\n", + "L=1;\n", + "uo=[0.05,0.1,0.2,0.35];#Superficial gas velocity in m/s\n", + "nw=[2.,3.1,3.4,3.5]; #Bubble frequency in s**-1\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "\n", + "\n", + "#CALCULATION\n", + "dte=4.*do1*L/2.*L; #Hydraulic diameter from Eqn.(6.13)\n", + "db=(1+1.5)*0.5*dte; #Rise velocity of the bubble\n", + "ubr=0.711*(g*db)**0.5; #Rise velocity of bubble from Eqn.(6.7)\n", + "phib=0.19;#From Fig.(15) for ks/kg=5.7\n", + "ke=ephsilonmf*kg+(1-ephsilonmf)*ks*(1/((phib*(ks/kg))+(2/3.0)))\n", + " #Effective thermal conductivity of bed from Eqn.(3) \n", + " \n", + "n=len(uo);\n", + "i=0;\n", + "ub = [0,0,0,0]\n", + "delta = [0,0,0,0]\n", + "h = [0,0,0,0]\n", + "while ix2min:\n", + " excess_air[i]=(x2[i]-x2min)/x2min; #Excess air used\n", + " else:\n", + " excess_air[i]=0;\n", + " i=i+1;\n", + "\n", + "#OUTPUT \n", + "print 'T4(degree celcius)',\n", + "print '\\tFs/F1',\n", + "print '\\t\\tF2/F1',\n", + "print '\\t\\tExcess air(percentage)'\n", + "i=0;\n", + "while idte:\n", + " li=(pi/4*dte*do1+pi/4*do1**2)**0.5;#Pitch if we add dummy tubes\n", + "import math\n", + "f=li**2-pi/4*do1**2;#Fraction of bed cross section taken up by tubes\n", + "dt1=math.sqrt(4/pi*At/(1-f));#Reactor diameter including all its tubes\n", + "\n", + "#OUTPUT\n", + "print 'Superficial gas velocity=%fm/s'%uo\n", + "print 'No. of %1.0fm tubes required=%1.0f'%(L,Nt);\n", + "print 'Reactor diameter=%fm'%dt1\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Superficial gas velocity=0.460000m/s\n", + "No. of 7m tubes required=295\n", + "Reactor diameter=7.173176m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, Page 444\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "db=0.08; #Estimated bubble size in m\n", + "dte=2; #Equivalent diameter in m\n", + "F1=55.6; #Feed rate of oil in kg/s\n", + "XA=0.63; #Conversion\n", + "uo=0.6; #Superficial gas velocity in m/s\n", + "T1=500.0; #Temperature of reactor in degree C\n", + "T2=580.0; #Temperature of regenerator in degree C\n", + "Fs=F1*23.3; #Solid circulation rate from Ex.(15.2)\n", + "rhos=1200.0; #Density of catalyst in kg/m**3\n", + "dpbar=60.0; #Average particle size in micrometer\n", + "ephsilonm=0.50;#Void fraction of fixed bed\n", + "ephsilonmf=0.55;#Void fraction at minimum fluidized condition\n", + "umf=0.006; #Velocity at minimum fluidization condition in m/s\n", + "dt=8.0; #Diameter of reactor in m\n", + "D=2E-5; #Diffusion coefficient of gas in m**2/s\n", + "Kr=8.6; #Rate constant for reaction at 500 degree C in s**-1\n", + "Ka1=0.06; #Rate constant for deactivatiion at 500 degree C in s**-1\n", + "Ka2=0.012; #Rate constant for regeneration at 580 degree C in s**-1\n", + "gammab=0.005; #Ratio of volume of dispersed solids to that of bubble phase\n", + "g=9.81; #Acceleration due to gravity in square m/s**2\n", + "pi=3.14;\n", + "\n", + "#CALCULATION\n", + "#Parameters for the fluidized reactor\n", + "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n", + "ub=1.55*((uo-umf)+14.1*(db+0.005))*dte**0.32+ubr;#Bubble velocity for Geldart A particles from Equation from Eqn.(6.11)\n", + "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n", + "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n", + "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n", + "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n", + "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n", + "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n", + "Kce=6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)\n", + "import math\n", + "#Bed height versus catalyst activity in reactor\n", + "a1bar=0.07;#Guess value for average activity in reactor\n", + "x=Kr*a1bar;#Value of Kra1 to be used in the following equation\n", + "Kf=(gammab*x+1/((1/Kbc)+(1/(gammac*x+1/((1/Kce)+(1/(gammae*x)))))))*(delta/(1-ephsilonf));#Effective rate constant from Eqn.(12.14)\n", + "tou=-math.log(1-XA)/Kf;#Space time from Eqn.(12.16)\n", + "Lm=tou*uo/(1-ephsilonm);#Length of fixed bed for guess value of a1bar\n", + "a1bar1=[0.0233,0.0465,0.0698,0.0930,0.116,0.140];#Various activity values to find Lm\n", + "x1 = [0,0,0,0,0,0]\n", + "Kf1 = [0,0,0,0,0,0]\n", + "tou1 = [0,0,0,0,0,0]\n", + "Lm1 = [0,0,0,0,0,0]\n", + "\n", + "n=len(a1bar1);\n", + "i=0;\n", + "while i=3000:\n", + " Cd=0.60;\n", + "elif Ret>=2000:\n", + " Cd=0.61;\n", + "elif Ret>=1000:\n", + " Cd=0.64;\n", + "elif Ret>=500:\n", + " Cd=0.68;\n", + "elif Ret>=300:\n", + " Cd=0.70;\n", + "elif Ret>=100:\n", + " Cd=0.68;\n", + "\n", + "#Computation of gas velocity through orifice\n", + "uor=Cd*((2*deltapd)/rhog)**0.5; #Calculation of gas velocity through orifice by using Eqn.(12)\n", + "f=(uo/uor)*100; #Calculation of fraction of open area in the perforated plate \n", + "\n", + "\n", + "#Computation of number of orifices per unit area of distributor\n", + "dor=[0.001,0.002,0.004]; #Different orifice diameters in m\n", + "n=len(dor);\n", + "i=0;\n", + "Nor = [0.,0.,0.]\n", + "while iuf:\n", + " Dshc.append((3/16.0)*(delta[k]/(1-delta[k]))*((alpha**2*db[j]*ubr[k]*((((ubr[k]+2*uf)/(ubr[k]-uf))**(1.0/3))-1))));\n", + " #Horizontal Distribution coeff. from Eqn.(14)\n", + " else:\n", + " Dsh.append((3.0/16)*(delta/(1-delta))*(alpha**2*umf*db/ephsilonmf))\n", + " #Horizontal Distribution coeff. from Eqn.(15)\n", + " Dshc.append((3/16.0)*(delta[k]/(1-delta[k]))*((alpha**2*db[j]*ubr[k]*((((ubr[k]+2*uf)/(ubr[k]-uf))**(1/3.0))-1))));#Horizontal Distribution coeff. from Eqn.(14)\n", + " k=k+1;\n", + "i=0;\n", + "j=0;\n", + "k=0;\n", + "while k>uf=%fm/s we use Eqn.(14).'%(ub[k],uf)\n", + " print 'Gas Velocity(m/s)'\n", + " print '\\tHorizontal Drift Coefficient Calculated(m**2/s)'\n", + " print '\\tHorizontal Drift Coefficient from Experiment(m**2/s)'\n", + " while j>uf=0.404762m/s we use Eqn.(14).\n", + "Gas Velocity(m/s)\n", + "\tHorizontal Drift Coefficient Calculated(m**2/s)\n", + "\tHorizontal Drift Coefficient from Experiment(m**2/s)\n", + "db=0.100000m\n", + "0.370000 \t\t0.001283 \t\t\t\t\t0.001200\n", + "0.470000 \t\t0.001283 \t\t\t\t\t0.001800\n", + "0.570000 \t\t0.001924 \t\t\t\t\t0.002100\n", + "0.670000 \t\t0.001924 \t\t\t\t\t0.002500\n", + "db=0.140000m\n", + "0.370000 \t\t0.002566 \t\t\t\t\t0.001200\n", + "0.470000 \t\t0.002566 \t\t\t\t\t0.001800\n", + "0.570000 \t\t0.003207 \t\t\t\t\t0.002100\n", + "0.670000 \t\t0.003207 \t\t\t\t\t0.002500\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3, Page 232\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Gsup=1.5; #Solid interchange rate in kg/m**2plate s\n", + "dor=19.1; #Orifice diameter in mm\n", + "dp=210; #Particle size in micrometer\n", + "uo=0.4; #Superficial gas velocity in m/s\n", + "fopen=[0.12,0.17,0.26]; #Open area fraction \n", + "pi=3.14;\n", + "\n", + "#CALCULATION\n", + "n=len(fopen);\n", + "uor = []\n", + "ls1 = []\n", + "i=0\n", + "while i=,<= are assignment operator\n", - "\n", - "print \"Condition : Return values\"\n", - "print \" 5!=5 : %5d\"%(5!=5) \n", - "print \" 5==5 : %5d\"%(5==5)\n", - "print \" 5>=5 : %5d\"%(5>=5)\n", - "print \" 5<=5 : %5d\"%(5<=50)\n", - "print \" 5!=3 : %5d\"%(5!=3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Condition : Return values\n", - " 5!=5 : 0\n", - " 5==5 : 1\n", - " 5>=5 : 1\n", - " 5<=5 : 1\n", - " 5!=3 : 1\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5: Page No.:4.39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Demonstrate of logical operator\n", - "\n", - "#Variable Declaration\n", - "c1=c2=c3=0\n", - "\n", - "#USer Input\n", - "c1,c2,c3=input(\"Enter Values of C1, C2 and C3: \")\n", - "print \"\\n\"\n", - "\n", - "if (c10): #Checking whether the character is alphabet\n", - " print ch,\"is a alphabet\"\n", - " \n", - "elif(ch.isdigit()>0): #Checking whether the character is digit\n", - " print ch,\"is a digit\"\n", - " \n", - "else: #else print alphanumeric\n", - " print ch,\"is a alphanumeric\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give any Character as a input: a\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a is a alphabet\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2, Page No 4.57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Convert Uppercase to Lowercase and Viceversa\n", - "\n", - "#Variable Declaration\n", - "\n", - "ch=''\n", - "\n", - "\n", - "#User Input\n", - "ch= raw_input(\"Give the input in lower case or upper case: \")\n", - "\n", - "if(ch.islower()): #Converting lowercase if input is uppercase\n", - " print ch.upper(), \"is a upper case character\"\n", - " \n", - "else: #else print lowercase\n", - " print ch.lower(), \"is a lower case character\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the input in lower case or upper case: s\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "S is a upper case character\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3, Page No 4.58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using input function\n", - "\n", - "scientist=''\n", - "\n", - "scientist = raw_input(\"Enter Name: \")\n", - "print \"Print the name: \", scientist\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name: Abdul kalam\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Print the name: Abdul kalam\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4, Page No 4.62" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Count numbers of entered numbers\n", - "\n", - "#Variable declaration\n", - "i=0\n", - "j=10\n", - "k=0\n", - "\n", - "#getting input from user \n", - "j=int(raw_input(\"Give input for j \"))\n", - "k=int(raw_input(\"Give input for k \"))\n", - "i=int(raw_input(\"Give input for i \"))\n", - "\n", - "i= i, j, k #assigning the user input in to a variable\n", - "\n", - "#Result\n", - "print \"No. of given input values:\", len(i) #counting length of the given input\n", - "print \"The Value of j and k is \", j, k #printing the values of input" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give input for j 56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give input for k 32\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give input for i 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "No. of given input values: 3\n", - "The Value of j and k is 56 32\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5, Page No 4.65" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print a statement using print\n", - "\n", - "print \"VRB Publishers\" #Printing statement" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "VRB Publishers\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6, Page No 4.65" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Adding two numbers\n", - "\n", - "#variable declaration\n", - "\n", - "a=6\n", - "b=8\n", - "c= a+b #Adding a, b and stores in c \n", - "\n", - "#Result\n", - "print \"Addition of two numbers is : \", c" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Addition of two numbers is : 14\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7, Page No 4.66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Reading and Displaying Details of a student\n", - "\n", - "#Variable Declaration\n", - "\n", - "sno=m1=m2=m3=0\n", - "name=['20']\n", - "total=0\n", - "avg=0.0\n", - "\n", - "#User Inputs\n", - "sno=int(raw_input(\"Give Student serial no. \"))\n", - "name=raw_input(\"Student Name : \")\n", - "m1=int(raw_input(\"Student Mark 1: \"))\n", - "m2=int(raw_input(\"Student Mark 2: \"))\n", - "m3=int(raw_input(\"Student Mark 3: \"))\n", - "\n", - "total=float(m1+m2+m3) #Calculation of marks\n", - "\n", - "avg=\"%.2f\"%float(total/3.0) #Average\n", - "\n", - "#Result\n", - "print '\\n'\"Student serial No.:\", sno\n", - "print \"Student Name:\", name\n", - "print \"Student's Marks:\", m1, m2, m3\n", - "print \"Total:\", total\n", - "print \"Average:\", avg " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give Student serial no. 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Student Name : Raja\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Student Mark 1: 90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Student Mark 2: 95\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Student Mark 3: 98\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Studnt serial No.: 1\n", - "Student Name: Raja\n", - "Student's Marks: 90 95 98\n", - "Total: 283.0\n", - "Average: 94.33\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8, Page No:4.71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display quotient and reminder of given input\n", - "\n", - "#variable declaration\n", - "\n", - "a=b=q=r=0\n", - "\n", - "#User input\n", - "a=int(raw_input(\"Give input for a: \"))\n", - "b=int(raw_input(\"Give input for b: \"))\n", - "\n", - "q=float(a/b) #Calculation for Quotient\n", - "\n", - "r=float(a-q*b) #Calculation for Reminder\n", - "\n", - "#Result\n", - "print \"Quotient of a and b is :\",q\n", - "print \"Reminder of a and b is :\",r" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give input for a: 39\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give input for b: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quotient of a and b is : 5.0\n", - "Reminder of a and b is : 4.0\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9, Page No:4.73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Slope and Midpoint of a line\n", - "\n", - "#Variable declaration\n", - "\n", - "x=x1=y1=x2=y2=slope=0.0\n", - "\n", - "#User input1\n", - "\n", - "x1=int(raw_input(\"Give point X1: \"))\n", - "y1=int(raw_input(\"Give point Y1: \"))\n", - "\n", - "\n", - "#User input2\n", - "\n", - "x2=int(raw_input('\\n'\"Give point X2: \"))\n", - "y2=int(raw_input(\"Give point Y2: \"))\n", - "\n", - "slope =(y2-y1)/(x2-x1) #Calculation for Slope\n", - "\n", - "#Calculation for Midpoints\n", - "x=float(x1+x2)/2.0\n", - "y=float(y1+y2)/2.0\n", - "\n", - "#Result\n", - "print '\\n' \"Slope of a line is :\", slope\n", - "print \"Midpoint of a line is :\", x,y" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give point X1: 10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give point Y1: 20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Give point X2: 30\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give point Y2: 40\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Slope of a line is : 1\n", - "Midpoint of a line is : 20.0 30.0\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10, Page No:4.73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Average of Given N Numbers\n", - "\n", - "#Variable Declaration\n", - "n=0.0\n", - "x=0\n", - "total=0\n", - "avg=0.0\n", - "\n", - "#UserInput\n", - "\n", - "n=int(raw_input(\"Give total number of input: \"))\n", - "\n", - "print \"Give those\",n ,\"Numbers\"\n", - "\n", - "for i in range(n): #Looping values of n\n", - " i=1\n", - " x=input() #Values for n\n", - " total+=x # Adding given numbers\n", - " \n", - "avg=float(total/n) #Calculating an average of given numbers\n", - "\n", - "#Result\n", - "print \"Sum of given numbers is \", total\n", - "print \"Average is \", avg\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give total number of input: 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give those 5 Numbers\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "17\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "76\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of given numbers is 112\n", - "Average is 22.0\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11, Page No:4.75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Temperature Conversion (Fahrenheit to Celsius)\n", - "\n", - "#Variable Declaration\n", - "\n", - "F_MIN =0\n", - "F_MAX=500\n", - "INC=50\n", - "fh= F_MIN\n", - "\n", - "print \"Fahrenheit\" '\\t' \"Celsius\"\n", - "while(fh<=F_MAX):\n", - " cel =\"%.2f\"%float((fh-(32.0))/1.8) #Calculating Celsius value\n", - " print fh,'\\t''\\t', cel\n", - " fh=fh+INC #Calculating Fahrenheit value\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fahrenheit\tCelsius\n", - "0 \t\t-17.78\n", - "50 \t\t10.00\n", - "100 \t\t37.78\n", - "150 \t\t65.56\n", - "200 \t\t93.33\n", - "250 \t\t121.11\n", - "300 \t\t148.89\n", - "350 \t\t176.67\n", - "400 \t\t204.44\n", - "450 \t\t232.22\n", - "500 \t\t260.00\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12, Page No:4.76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Area of Triangle\n", - "\n", - "#Variable Declaration\n", - "\n", - "a=b=c=s=area=0.0\n", - "\n", - "#User input\n", - "\n", - "a=int(raw_input(\"First side of Triangle is \"))\n", - "b=int(raw_input(\"Second side of Triangle is \"))\n", - "c=int(raw_input(\"Third side of Triangle is \"))\n", - "\n", - "s=(a+b+c)/2.0 #Calculating Size of triangle\n", - "\n", - "area=\"%.3f\"%float((s*(s-a)*(s-b)*(s-c)) ** 0.5) #Calculating Area of triangle\n", - "\n", - "#Result\n", - "print '\\n',\"Area of Triangle is\",area" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "First side of Triangle is 10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Second side of Triangle is 10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Third side of Triangle is 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Area of Triangle is 43.301\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter03.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter03.ipynb deleted file mode 100755 index 34a44d60..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter03.ipynb +++ /dev/null @@ -1,440 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:92464c4be2e3e810ccda180a900c5ec8bb15a9537c93387b95c317c7709c7b7c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 03 : Decision Making" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1, Page No.:4.79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using if with multiple statements\n", - "\n", - "\n", - "#Variable Declaration\n", - "i=0\n", - "\n", - "#User Input\n", - "\n", - "i =int(raw_input(\"Give the numbers less than 10\"'\\n'))\n", - "\n", - "if i<=10: #Checking the given value\n", - "\n", - "#Result \n", - " print \"The given value of\", i , \"less than 10\"\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the numbers less than 10\n", - "5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the given value of 5 less than 10\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.: 4.79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "##Program for interchange two values using if statement\n", - "\n", - "#Variable Declaration\n", - "\n", - "a=m=n=0\n", - "\n", - "#User Input\n", - "\n", - "m=int(raw_input(\"Give the value of m\" '\\t'))\n", - "n=int(raw_input(\"Give the value of n\" '\\t'))\n", - "\n", - "if m>=n : #Checking the Given Values\n", - " \n", - " a=m # method for swapping \n", - " m=n\n", - " n=a\n", - "\n", - "#Result\n", - "\n", - "print \"The Swapped Values of m and n are \", m,a" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of m\t34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of n\t28\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Swapped Values of m and n are 28 34\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No. 4.81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#determine the given number is odd or even. \n", - "\n", - "#Variable Declaration\n", - "num=rem=0\n", - "\n", - "#User Input\n", - "num=input(\"Enter the value: \")\n", - "rem=num%2 \n", - "if rem==0 : #Checking condition\n", - "\n", - "#Result 1\n", - " print \"The given number is Even\"\n", - "else :\n", - " \n", - "#Result 2\n", - " print \"The given number is Odd\"\n", - " \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the value: 80\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The given number is Even\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page No.:4.81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Find floating point input using if-else statement\n", - "\n", - "#Variable Declaration\n", - "\n", - "years=seconds=0.0\n", - "life=0\n", - "\n", - "years=float(raw_input(\"Give your Age in years: \"))\n", - "life=years\n", - "if life==0:\n", - " print \"The given age is not floating value\"\n", - " \n", - "else :\n", - " seconds=\"%f\"%float(years*365*24*60*60)\n", - " print \"You have lived for\", seconds, \"seconds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give your Age in years: 24\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have lived for 756864000.000000 seconds\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 5, Page No. :4.82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# find biggest among two numbers \n", - "\n", - "#Variable Declaration\n", - "\n", - "i=j=big=0\n", - "i,j=input(\"Give two values: \")\n", - "\n", - "big=i\n", - "\n", - "if big10) & (i<20):\n", - " print \"The given value is in between 10 and 20\"\n", - "\n", - "else :\n", - " print \"The given value is greater than 20 and less than 10\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number: 15\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The given value is in between 10 and 20\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 8, Page No. :4.86" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# display the types of characterusing if-else statement\n", - "\n", - "#User Input\n", - "\n", - "chr= raw_input(\"Enter a Single Character: \")\n", - "\n", - "if( ((chr>='a') & (chr<='z')) | ((chr>='A') & (chr<='Z'))):\n", - " print \"Given charactered is an Alphabetic\"\n", - " \n", - "elif ((chr>='0') & (chr <='9')):\n", - " print \"Given Character is a digit\"\n", - " \n", - "else:\n", - " print \"Entered Character is a special character\"\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Single Character: M\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Given charactered is an Alphabetic\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter04.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter04.ipynb deleted file mode 100755 index a58b3c75..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter04.ipynb +++ /dev/null @@ -1,1337 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:cbd54959e18d38695240f376809cd86bcdd3f9c461e014b42a620c0846ec3cbf" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 04 : Branching and Looping" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1: Page No.:4.88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# addition of numbers using while loop.\n", - "\n", - "#Varibale Declaration\n", - "\n", - "i=1\n", - "sum=0\n", - "while i<=10: #Checking while loop\n", - " sum+=i\n", - " i+=1 #Increment of i\n", - " \n", - " #Result \n", - "print \"The Sum of the numbers upto is \",sum" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Sum of the numbers upto is 55\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2: Page No.: 4.89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "#Variable Declaration\n", - "\n", - "i=1\n", - "j=0\n", - "\n", - " \n", - "print \"The maximum value of integer is\", sys.maxsize\n", - "print \"The Value of integer after overflow is\", sys.maxint-1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The maximum value of integer is 2147483647\n", - "The Value of integer after overflow is 2147483646\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3: Page No.: 4.89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Reverse the given number using while loop\n", - "\n", - "#Variable Declaration\n", - "\n", - "number=digit=rev=0\n", - "\n", - "number=input(\"Give the Value: \")\n", - "\n", - "while(number!=0):\n", - " digit=number%10\n", - " rev=rev*10+digit\n", - " number= number/10\n", - " \n", - "print \"The reversible value of given number is\", rev\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the Value: 7896\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The reversible value of given number is 6987\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4: Page No.: 4.90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Simple interest using while loop.\n", - "\n", - "#Variable Declaration\n", - "\n", - "p=1\n", - "n=1\n", - "count=1\n", - "\n", - "r=si=0.0\n", - "\n", - "while(count<=3):\n", - " p=input(\"Give the value of P\" '\\t')\n", - " n=input(\"Give the value of N\"'\\t')\n", - " r=float(input(\"Give the value of R\"'\\t'))\n", - " \n", - " si=\"%.3f\"%float((p*n*r)/100)\n", - " \n", - " print \"Simple Interest of SI\", si\n", - " count=count+1\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of P\t2000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of N\t3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of R\t5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Simple Interest of SI 300.000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of P\t3500\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of N\t6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of R\t1.5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Simple Interest of SI 315.000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of P\t6000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of N\t2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of R\t3.5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Simple Interest of SI 420.000\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5: Page No.:4.92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Numbers upto 10 by using the do..while loop\n", - "\n", - "#Variable Declaration\n", - "\n", - "i=1\n", - "sum=0\n", - "\n", - "while True:\n", - "\tsum+=i\n", - "\ti+=1\n", - "\tif(i>10):\n", - "\t\tbreak\n", - "print \"Sum of the numbers upto 10 is\", sum \n", - " \n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of the numbers upto 10 is 55\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6: Page No.: 4.92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#print n numbers using do...while loop\n", - "\n", - "i=0\n", - "\n", - "n=input(\"Enter the number: \")\n", - "\n", - "while True:\n", - " print \"The numbers are: \",i\n", - " i=i+1\n", - " if(i>=n):\n", - " break\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number: 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numbers are: 0\n", - "The numbers are: 1\n", - "The numbers are: 2\n", - "The numbers are: 3\n", - "The numbers are: 4\n", - "The numbers are: 5\n" - ] - } - ], - "prompt_number": 73 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7: page no.: 4.95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Addition of number upto 10 using for loop\n", - "\n", - "i=sum=0\n", - "\n", - "for i in range (0,11):\n", - "\tsum+=i\n", - "\ti+=1\n", - "\n", - "print \"The addition of given numbers\",sum\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The addition of given numbers 55\n" - ] - } - ], - "prompt_number": 75 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8: Page No.:4.96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#print n numbers using for...loop structure\n", - "\n", - "n=int(raw_input(\"Give Values of n: \"))\n", - "i=0\n", - "for i in range(0,n):\n", - " print \"The Given numbers are: \",i\n", - "\n", - "\t" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give Values of n: 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Given numbers are: 0\n", - "The Given numbers are: 1\n", - "The Given numbers are: 2\n", - "The Given numbers are: 3\n", - "The Given numbers are: 4\n" - ] - } - ], - "prompt_number": 82 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9: Page No.:4.97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#student marks and average using for loop..\n", - "\n", - "a=b=c=d=e=total=0\n", - "\n", - "avg=0.0\n", - "\n", - "m=input(\"Enter the number of Students:\")\n", - "\n", - "print \"Enter the marks of the five subjects: \"'\\n'\n", - "\n", - "for i in range (m): \n", - " i+=1\n", - " print \"\\nStudent:\",i,\"\\n\"\n", - " \n", - " a,b,c,d,e=input(\"Enter the Student mark1: \") \n", - " \n", - " if ((a,b,c,d,e)!=0) :\n", - " total=a+b+c+d+e\n", - " avg=\"%.3f\"%float(total/5)\n", - " print \"Total marks of the student:\", total\n", - " print \"Average marks of the students: \",avg\n", - " \n", - " else :\n", - " print \"Entered data is invalid\"\n", - " \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of Students:3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the marks of the five subjects: \n", - "\n", - "\n", - "Student: 1 \n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student mark1: 78,56,90,59,87\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total marks of the student: 370\n", - "Average marks of the students: 74.000\n", - "\n", - "Student: 2 \n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student mark1: 49,87,60,57,93\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total marks of the student: 346\n", - "Average marks of the students: 69.000\n", - "\n", - "Student: 3 \n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student mark1: 89,100,80,97,65\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total marks of the student: 431\n", - "Average marks of the students: 86.000\n" - ] - } - ], - "prompt_number": 89 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10: Page No.:4.98" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Nested for loop\n", - "\n", - "for i in range(1,4):\n", - " for j in range(1,4):\n", - " print \"%d\"%(j),\n", - " print \"\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 2 3 \n", - "\n", - "1 2 3 \n", - "\n", - "1 2 3 \n", - "\n" - ] - } - ], - "prompt_number": 112 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11: Page No.:4.99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#student details using nested for loop..\n", - "\n", - "FIRST=300\n", - "SECOND=200\n", - "rollno=marks=total=0\n", - "\n", - "n=input(\"Enter the number of Students: \")\n", - "m=input(\"Enter the number of subjects: \")\n", - "\n", - "for i in range(n):\n", - " i+=(+1)\n", - " rollno=int(raw_input(\"Enter the student roll number: \"))\n", - " total=0\n", - " print \"Enter marks of\",m, \"subjects for Roll no: \",rollno\n", - " for j in range(m):\n", - " marks=int(raw_input(\"Give marks: \"))\n", - " total= total+marks\n", - " \n", - " print \"total marks\", total\n", - " if(total>=FIRST):\n", - " print \"(First Class)\"'\\n'\n", - " elif(total>=SECOND):\n", - " print \"(Second Class)\"'\\n'\n", - " else:\n", - " print \"Fail\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of Students: 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of subjects: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student roll number: 201\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of 5 subjects for Roll no: 201\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 68\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 89\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "total marks 415\n", - "(First Class)\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student roll number: 202\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of 5 subjects for Roll no: 202\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 40\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 50\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 49\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 39\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give marks: 47\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "total marks 225\n", - "(Second Class)\n", - "\n" - ] - } - ], - "prompt_number": 85 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12: Page No.: 4.103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Demonstrate switch case\n", - "\n", - "a=1\n", - "if a==1:\n", - " print \"I am in case 1\"'\\n'\n", - "elif a==2:\n", - " print \"I am in case2\"'\\n'\n", - "else:\n", - " print \"I am in case default\"'\\n'" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "I am in case 1\n", - "\n" - ] - } - ], - "prompt_number": 115 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13: Page No.:4.104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to use the computer as calculator\n", - "\n", - "a=b=c=0\n", - "\n", - "op=raw_input(\"Give the option for calculation like +(ADD), -(SUB), *(MUL), /(DIV): \")\n", - "a=input(\"Enter the value of a \")\n", - "b=input(\"Enter the value of b \")\n", - "\n", - "#Calculation\n", - "if (op=='+'):\n", - " c=a+b\n", - " print \"Result of C\", c \n", - "elif(op=='-'):\n", - " c=a-b\n", - " print \"Result of C\", c\n", - "elif(op=='*'):\n", - " c=a*b\n", - " print \"Result of C\", c\n", - "else:\n", - " c=a/b\n", - " print \"Result of C\", c\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the option for calculation like +(ADD), -(SUB), *(MUL), /(DIV): +\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the value of a 20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the value of b 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Result of C 30\n" - ] - } - ], - "prompt_number": 118 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14: Page No.:4.105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find even or odd numbers \n", - "\n", - "#USer Input\n", - "a=input(\"Enter a number: \")\n", - "\n", - "if a%2==0 : \n", - " print \" The number is even. \"\n", - "else :\n", - " print \"The number is odd.\" \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 89\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The number is odd.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 15: Page No.:4.106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to count number of 0s, 1s, blank spaces and other characters\n", - "\n", - "\n", - "txt=[30]\n", - "count =0 \n", - "txt=raw_input(\"Enter Numbers\")\n", - "\n", - "print \"Total Spaces : %d\"%txt.count(' ')\n", - "print \"Total of 1's : %d\"%txt.count('1')\n", - "print \"Total of 0's : %d\"%txt.count('0')\n", - "print \"String Length : %d\"%len(txt)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Numbers120010 09100110\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total Spaces : 2\n", - "Total of 1's : 5\n", - "Total of 0's : 7\n", - "String Length : 16\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16: Page No.: 4.108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print the number upto 5 using break statement\n", - "\n", - "for i in range(1,10):\n", - " if i==6:\n", - " break\n", - " print i," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 2 3 4 5\n" - ] - } - ], - "prompt_number": 120 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17: Page No.: 4.109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to calculate the sum of the given positive numbers\n", - "\n", - "i=n=sum=0\n", - "\n", - "for i in range(0,5):\n", - " n=int(raw_input(\"Give any value of n \"))\n", - " if n<0:\n", - " continue\n", - " else:\n", - " sum+=n\n", - " \n", - "print \"\\nSum is\", sum" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give any value of n 10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give any value of n 15\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give any value of n 25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give any value of n -10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give any value of n 50\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Sum is 100\n" - ] - } - ], - "prompt_number": 124 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 18: Page No.:4.113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using goto statement\n", - "\n", - "a=input(\"Give the Value of a \")\n", - "b=input(\"Give the value of b \")\n", - "\n", - "if a==b:\n", - " print \"A and B are equal\"\n", - "else:\n", - " print \"A and B are not equal\"\n", - " exit(0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the Value of a 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of b 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "A and B are equal\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 1: Page No.: 4.112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Prime or not\n", - "\n", - "n=input(\"Enter the Positive value of n \")\n", - "i=2\n", - "\n", - "#Calculation\n", - "while n>i:\n", - " if n%i==0 & i!=n:\n", - " #r=n%i\n", - " #if r==0:\n", - " print \"The Given value of \",n,\" is not a prime\"\n", - " break\n", - " i+=1\n", - "else:\n", - " print \"The Given Value\",n, \"is Prime\"\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Positive value of n 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Given Value 3 is Prime\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 2: Page No.: 4.113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Find the Greatest Common Division\n", - "\n", - "i=int(input(\"Give the Value of i \"))\n", - "j=int(input(\"Give the value of j \"))\n", - " \n", - "def gcd(i,j):\n", - " if i > j:\n", - " k = i%j\n", - " if k == 0:\n", - " return j\n", - " else:\n", - " return gcd(j, k)\n", - " if i < j:\n", - " i = j\n", - " j = i\n", - " return gcd(i, j)\n", - "print \"The value of gcd\", gcd(i,j) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the Value of i 54\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the value of j 36\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of gcd 18\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 3: Page No.: 4.115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to which reads in a Temperature and print the temperature in opposite scale\n", - "\n", - "\n", - "print \"1.Fahrenheit to Celcius\\n2.Celcius to Fahrenheit\\n\"\n", - "code=input(\"Choose Option to find Temperature: \")\n", - "\n", - "while code!=0:\n", - " if code==1:\n", - " f=float(input(\"Give the Value for Fahrenheit Temperature \"))\n", - " c=(f-32.0)*5.0/9.0\n", - " break\n", - " elif code==2:\n", - " c=float(input(\"Give the Value for Celcius Temperature \"))\n", - " f=9.0*c/5.0+32.0\n", - " break\n", - " else:\n", - " print \"Give proper Code Value for Temperature Calculation\"\n", - " break\n", - "print \"C=\", \"%.3f\"%float(c)\n", - "print \"F=\",f " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.Fahrenheit to Celcius\n", - "2.Celcius to Fahrenheit\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Choose Option to find Temperature: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give the Value for Fahrenheit Temperature 100\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "C= 37.778\n", - "F= 100.0\n" - ] - } - ], - "prompt_number": 17 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter05.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter05.ipynb deleted file mode 100755 index fa4db685..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter05.ipynb +++ /dev/null @@ -1,987 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8b48219cd7d973f69d80d4d491de4bdba5cb9c73135095697b1625a862f6bc97" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 05 : Defining and Processing of Arrays" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page Number: 5.5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to read 5 data items from input and store them in an array and display their sum\n", - "\n", - "#Local definitions\n", - "a = []\n", - "sum = 0\n", - "\n", - "for i in range(0,5):\n", - " a.append(0)\n", - "print \"Enter 5 integer numbers\" \n", - "for i in range(0,5):\n", - " a[i] = eval(raw_input())\n", - " \n", - "for i in range(0,5): \n", - " sum = sum + a[i] \n", - " \n", - "print \"The sum of given numbers is : %d\\n\" %sum" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter 5 integer numbers\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "120\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "69\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "390\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "45\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sum of given numbers is : 669\n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2 Page No. 5.7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to accept 5 numbers and print whether the number is even or not\n", - "\n", - "#Local Variable\n", - "a=[]\n", - "\n", - "for i in range(5):\n", - " a.append(0)\n", - "for i in range(0,5):\n", - " i+1\n", - " a[i]=eval(raw_input(\"Enter the %d number: \"%(i+1))) \n", - " print \"\\n\"\n", - "for i in range (0,5):\n", - " if a[i]%2==0:\n", - " print \"%d Number is Even\"%a[i]\n", - " else:\n", - " print \"%d Number is Odd\"%a[i]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 1 number: 17\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 2 number: 38\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 3 number: 79\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 4 number: 80\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 5 number: 76\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "17 Number is Odd\n", - "38 Number is Even\n", - "79 Number is Odd\n", - "80 Number is Even\n", - "76 Number is Even\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3 Page No. 5.8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to illustrate how a character array can be used.\n", - "\n", - "#Local definition\n", - "word=['F', 'R', 'I', 'E', 'N', 'D', 'S']\n", - "\n", - "for i in range(0,7):\n", - " word.append(0)\n", - "for i in range(0,7):\n", - " print word[i]," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "F R I E N D S\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page Number: 5.8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to sort the given strings alphabetically\n", - "\n", - "b = raw_input(\"Enter the text to sort : \")\n", - "print \"Sorted Text are : \",''.join(sorted(b, key=lambda v: (v.upper(), v[0].islower())))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the text to sort : VRBPublishers\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorted Text are : BbehilPRrssuV\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 5, Page Number: 5.10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using two dimension array\n", - "\n", - "#Local definition \n", - "stud = [[0 for i in xrange(0,4)] for i in xrange(0,4)] #stud is a array name with 4 rows and 2 columns\n", - "\n", - "for i in range(0,4):\n", - " print \"Enter the %d Student roll no and Mark:\" %i\n", - " stud[i][1], stud[i][2] = input()\n", - " \n", - "for i in range(0,4):\n", - " print \"%d Student roll no %d mark %d\" %(i, stud[i][1], stud[i][2])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 0 Student roll no and Mark:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3977,80\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 1 Student roll no and Mark:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "17776,95\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 2 Student roll no and Mark:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6682,82\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the 3 Student roll no and Mark:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6683,85\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0 Student roll no 3977 mark 80\n", - "1 Student roll no 17776 mark 95\n", - "2 Student roll no 6682 mark 82\n", - "3 Student roll no 6683 mark 85\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 6, Page Number: 5.12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to illustrate Matrix Multiplication\n", - "\n", - "a = [[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", - "b = [[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", - "c = [[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", - "\n", - "while True:\n", - " r1, c1 = input(\"Enter the size of the matrix A....\")\n", - " r2, c2 = input(\"Enter the size of the matrix B....\")\n", - " if c1 == r2:\n", - " print \"Enter matrix A elements...\"\n", - " for i in range (0,r1):\n", - " for j in range (0,c1):\n", - " a[i][j] = input()\n", - " \n", - " print \"Enter matrix B elements...\"\n", - " for i in range (0,r2):\n", - " for j in range (0,c2):\n", - " b[i][j] = input()\n", - " \n", - " for i in range(0,r1):\n", - " for j in range(0,c1):\n", - " c[i][j] = 0\n", - " for k in range(0,c1):\n", - " c[i][j] += a[i][k] * b[k][j]\n", - " \n", - " print \"The resultant matrix is....\"\n", - " for i in range(0,r1):\n", - " for j in range(0,c1):\n", - " print \"%d\\t\" %c[i][j],\n", - " print \"\\n\"\n", - " break \n", - " else:\n", - " print \"Multiplication is not possible\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the size of the matrix A....3,3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the size of the matrix B....2,2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplication is not possible\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the size of the matrix A....3,3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the size of the matrix B....3,3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter matrix A elements...\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter matrix B elements...\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resultant matrix is....\n", - "18\t18\t18\t\n", - "\n", - "18\t18\t18\t\n", - "\n", - "18\t18\t18\t\n", - "\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 7, Page Number: 5.13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print two dimensional array by row by row\n", - "\n", - "arr = [[0 for i in xrange(0,4)] for i in xrange(0,4)]\n", - "\n", - "for i in range(0,3):\n", - " for j in range(0,4):\n", - " arr[i][j] = (i * 4) + j + 1\n", - " \n", - " \n", - "print \"Printing array contents :\"\n", - "for i in range(0,3):\n", - " for j in range(0,4):\n", - " print \"%3d\" %arr[i][j],\n", - " print \"\\n\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Printing array contents :\n", - " 1 2 3 4 \n", - "\n", - " 5 6 7 8 \n", - "\n", - " 9 10 11 12 \n", - "\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 8, Page Number: 5.14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to add and display the results of 5 nos\n", - "\n", - "#Function definition \n", - "def add(x,ar):\n", - " sum = 0\n", - " for i in range(0,5):\n", - " sum += ar[i]\n", - " print \"Sum is ... %d\" %sum \n", - " \n", - "a = []\n", - "n = 5\n", - "for i in range(0,5):\n", - " a.append(0)\n", - "print \"Enter 5 values\"\n", - "for i in range(0,5):\n", - " a[i] = input()\n", - "add(n,a) #function call" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter 5 values\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "30\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "40\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "50\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum is ... 150\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 9, Page Number: 5.15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for capture and store n values into array and print them\n", - "\n", - "#Function definition \n", - "def arr(a = []):\n", - " for i in range(0,5):\n", - " print \"Value in array %d\\n\" %a[i]\n", - " \n", - "a = []\n", - "for i in range(0,5):\n", - " a.append(0)\n", - "for i in range(0,5):\n", - " a[i] = i\n", - "arr(a) #Function call" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Value in array 0\n", - "\n", - "Value in array 1\n", - "\n", - "Value in array 2\n", - "\n", - "Value in array 3\n", - "\n", - "Value in array 4\n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 10, Page Number: 5.16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print the character string from the array\n", - "\n", - "name = \"LAK\"\n", - "print \"%s\" %name" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "LAK\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 11, Page Number: 5.17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for explaining the working of 4 dimensional array\n", - "\n", - "#Local definition\n", - "array_4d = [[[[0 for i in xrange(0,3)] for i in xrange(0,3)]for i in xrange(0,3)] for i in xrange(0,3)]\n", - "\n", - "#looping statements \n", - "for a in range(0,3):\n", - " for b in range(0,3):\n", - " for c in range(0,3):\n", - " for d in range(0,3):\n", - " array_4d[a][b][c][d] = a + b + c + d\n", - "#Result \n", - "for a in range(0,3) :\n", - " print \"\\n\"\n", - " for b in range(0,3):\n", - " for c in range(0,3):\n", - " for d in range(0,3):\n", - " print \"%3d\" %array_4d[a][b][c][d],\n", - " print \"\\n\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - " 0 1 2 \n", - "\n", - " 1 2 3 \n", - "\n", - " 2 3 4 \n", - "\n", - " 1 2 3 \n", - "\n", - " 2 3 4 \n", - "\n", - " 3 4 5 \n", - "\n", - " 2 3 4 \n", - "\n", - " 3 4 5 \n", - "\n", - " 4 5 6 \n", - "\n", - "\n", - "\n", - " 1 2 3 \n", - "\n", - " 2 3 4 \n", - "\n", - " 3 4 5 \n", - "\n", - " 2 3 4 \n", - "\n", - " 3 4 5 \n", - "\n", - " 4 5 6 \n", - "\n", - " 3 4 5 \n", - "\n", - " 4 5 6 \n", - "\n", - " 5 6 7 \n", - "\n", - "\n", - "\n", - " 2 3 4 \n", - "\n", - " 3 4 5 \n", - "\n", - " 4 5 6 \n", - "\n", - " 3 4 5 \n", - "\n", - " 4 5 6 \n", - "\n", - " 5 6 7 \n", - "\n", - " 4 5 6 \n", - "\n", - " 5 6 7 \n", - "\n", - " 6 7 8 \n", - "\n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter06.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter06.ipynb deleted file mode 100755 index 09f324b0..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter06.ipynb +++ /dev/null @@ -1,1424 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d7231c68ebf3352357e97f096d7bb05469f2e0aae52fa150a1a57a7e75ef01fb" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 06 : Handling Of Character Strings" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page Number: 5.19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for reading a line of text\n", - "\n", - "n = 0\n", - "print \"Enter text press RETRUN to end\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter text press RETRUN to end\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page Number: 5.20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#String function\n", - "\n", - "s1= \"Hello\"\n", - "s2='H''e''l''l''o'\n", - "\n", - "print s1\n", - "print s2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hello\n", - "Hello\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page Number: 5.22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using strlen() function\n", - "\n", - "name = \"MUNI\"\n", - "len1 = len(name)\n", - "len2 = len(\"LAK\")\n", - "print \"String length of %s is %d\" %(name,len1)\n", - "print \"String length of %s is %d\" %(\"LAK\",len2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String length of MUNI is 4\n", - "String length of LAK is 3\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page Number: 5.23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using strcpy() function\n", - "def strcpy(cstring1):\n", - " import copy\n", - " cstring2=copy.copy(cstring1)\n", - " return cstring2 \n", - "\n", - "source = \"MUNI\"\n", - "target = strcpy(source)\n", - "print \"Source string is %s\" %source\n", - "print \"Target string is %s\" %target" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Source string is MUNI\n", - "Target string is MUNI\n" - ] - } - ], - "prompt_number": 64 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 5, Page Number:5.24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Strcat function\n", - "\n", - "str1=\"MUNI\"\n", - "str2=\"LAK\"\n", - "print str1+str2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "MUNILAK\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 6, Page Number: 5.24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using strcat() function\n", - "def strcat(cstring1, cstring2):\n", - " cstring3 = cstring1 + cstring2\n", - " return cstring3\n", - "\n", - "source = \"Ramesh\"\n", - "target = \"Babu\"\n", - "source = strcat(source,target)\n", - "print \"Source string is %s\" %source\n", - "print \"Target string is %s\" %target" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Source string is RameshBabu\n", - "Target string is Babu\n" - ] - } - ], - "prompt_number": 69 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 7, Page Number: 5.25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using strcmp() function\n", - "\n", - "name = \"Kalai\"\n", - "name1 = \"Malai\"\n", - "if name ==\"Kalai\":\n", - " print \"0\",\n", - "if name1!=name:\n", - " print \"1\",\n", - "if name != \"Kalai mani\":\n", - " print \"6\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0 1 6\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 8, Page Number: 5.26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using strrev() function\n", - "def strrev(cstring1):\n", - " cstring2 = ' '\n", - " for i in range(len(cstring1)-1,-1,-1):\n", - " cstring2 = cstring2 + cstring1[i]\n", - " return cstring2\n", - "\n", - "y = raw_input(\"Enter the string \")\n", - "print \"The string reversed is : %s\" %strrev(y)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the string book\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The string reversed is : koob\n" - ] - } - ], - "prompt_number": 85 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 9, Page Number: 5.27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using enumerated data type\n", - "def enum(*sequential, **named):\n", - " enums = dict(zip(sequential, range(len(sequential))), **named)\n", - " return type('Enum', (), enums)\n", - "\n", - "week = enum(' ', 'sun','Mon','Tue','Wed','Thr','Fri','Sat')\n", - "print \"Mon = %d\" %week.Mon\n", - "print \"Tue = %d\" %week.Tue\n", - "print \"Wed= %d\" %week.Wed\n", - "print \"Sat = %d\" %week.Sat" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mon = 2\n", - "Tue = 3\n", - "Wed= 4\n", - "Sat = 7\n" - ] - } - ], - "prompt_number": 125 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 10, Page Number: 5.28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to identify whether the entered character is letter, digit or other symbols\n", - "def enum(*sequential, **named):\n", - " enums = dict(zip(sequential, range(len(sequential))), **named)\n", - " return type('Enum', (), enums)\n", - "\n", - "ctype = enum(' ', 'Letter', 'Digit', 'Other')\n", - "ch = raw_input(\"Enter a any character.\")\n", - "a = ch.isalpha()\n", - "if a != False:\n", - " print \"%c is %d type of symbol.\" %(ch,ctype.Letter)\n", - "else:\n", - " a = ch.isdigit()\n", - " if a != False:\n", - " print \"%c is %d type of symbol.\" %(ch,ctype.Digit)\n", - " else:\n", - " print \"%c is %d type of symbol.\" %(ch,ctype.Other)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a any character.%\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "% is 3 type of symbol.\n" - ] - } - ], - "prompt_number": 143 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 1, Page Number: 5.29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for sorting an array of elements\n", - "\n", - "a = []\n", - "n = input(\"Enter Upper limit....\")\n", - "for i in range(0,n):\n", - " a.append(0)\n", - "print \"Enter elements....\" \n", - "for i in range(0,n):\n", - " a[i]=input()\n", - "for i in range(0,n):\n", - " for j in range(i,n):\n", - " if a[i]>a[j]:\n", - " t = a[i]\n", - " a[i] = a[j]\n", - " a[j] = t\n", - "print \"Numbers in Ascending order\"\n", - "for i in range(0,n):\n", - " print \"%d\" %a[i]," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Upper limit....6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter elements....\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numbers in Ascending order\n", - "1 2 3 4 5 6\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 2, Page Number: 5.31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to fing Median for a given 'n' numbers\n", - "\n", - "arr = []\n", - "n = input(\"Enter Upper limit....\")\n", - "for i in range(0,n):\n", - " arr.append(0)\n", - "print \"Enter..%d..values\" %n \n", - "for i in range(0,n):\n", - " arr[i]=input()\n", - "for i in range(1,n):\n", - " for j in range(1,n-i):\n", - " if arr[j] <= arr[j+1]:\n", - " t = arr[j]\n", - " arr[j] = arr[j+1]\n", - " arr[j+1] = t\n", - " else:\n", - " continue\n", - "if n%2 == 0:\n", - " median = (arr[n/2]+arr[n/2+1])/2.0\n", - "else:\n", - " median = arr[n/2+1]\n", - "print \"Median is....%.f\" %median \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Upper limit....3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter..3..values\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "30\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Median is....20\n" - ] - } - ], - "prompt_number": 162 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 3, Page Number: 5.32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to find standard deviation for the given data\n", - "import math\n", - "\n", - "val = []\n", - "sum = ssqr = n = 0\n", - "for i in range(0,100):\n", - " val.append(0)\n", - "print \"Enter Values -999 to stop....\"\n", - "for i in range(0,100):\n", - " val[i] = float(raw_input())\n", - " if val[i] == -999:\n", - " break\n", - " sum = float(sum) + val[i] \n", - " n = n + 1\n", - "mean = float(sum) / float(n) \n", - "for i in range(0,n):\n", - " dev = val[i] - mean\n", - " ssqr = float(ssqr) + float(dev)*float(dev)\n", - "var = ssqr / float(n) \n", - "sd = math.sqrt(float(var))\n", - "print \"Number of Items.....%d\" %n\n", - "print \"Mean is .....%f\" %mean\n", - "print \"Standard Deviation is .....%f\" %sd" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values -999 to stop....\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "30\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "40\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "50\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "-999\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of Items.....5\n", - "Mean is .....30.000000\n", - "Standard Deviation is .....14.142136\n" - ] - } - ], - "prompt_number": 169 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 4, Page Number: 5.34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Bubble sort using function\n", - "\n", - "def bubble(n, x = []):\n", - " for item in range(0,n-1):\n", - " for i in range(item+1,n):\n", - " if x[i]=0):\n", - " a[k+1] = a[k]\n", - " k = k-1\n", - " a[k+1]=x\n", - " print \"Array after inserting %d:\" %x\n", - " for j in range(0,i):\n", - " print \"%5d\" %a[j]\n", - " x = input(\"Elements to be inserted(-99 to stop)?\")\n", - " i = i+1\n", - "print \"The final sorted array\"\n", - "for j in range(0,i):\n", - " print \"%5d\" %a[j]," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elements to be inserted 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Array after inserting 5:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elements to be inserted(-99 to stop)?3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Array after inserting 3:\n", - " 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elements to be inserted(-99 to stop)?4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Array after inserting 4:\n", - " 3\n", - " 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elements to be inserted(-99 to stop)?2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Array after inserting 2:\n", - " 2\n", - " 3\n", - " 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elements to be inserted(-99 to stop)?1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Array after inserting 1:\n", - " 1\n", - " 2\n", - " 3\n", - " 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Elements to be inserted(-99 to stop)?-99\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The final sorted array\n", - " 1 2 3 4 5\n" - ] - } - ], - "prompt_number": 186 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 6, Page Number: 5.36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to sort an element using selection sort\n", - "\n", - "a = []\n", - "for i in range(0,100):\n", - " a.append(0)\n", - "n = input(\"Enter Number of elements in array...\")\n", - "print \"Enter Elements...\",n\n", - "for i in range(0,n):\n", - " a[i] = input()\n", - "for i in range(0,n-1):\n", - " m = i\n", - " for j in range(i+1,n):\n", - " if a[m]>a[j]:\n", - " m = j\n", - " if i != m:\n", - " k = a[i]\n", - " a[i] = a[m]\n", - " a[m] = k\n", - " \n", - "print \"Sorted Array (Selection Sort) is...\\n\"\n", - "for i in range(0,n):\n", - " print \"%5d\" %a[i]," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Number of elements in array...9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Elements... 9\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "326\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "85\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "42\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "156\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "845\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "66\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "55\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sorted Array (Selection Sort) is...\n", - "\n", - " 1 42 55 56 66 85 156 326 845\n" - ] - } - ], - "prompt_number": 190 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 7, Page Number: 5.38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Quick sort\n", - "\n", - "def quickSort(array):\n", - " quickSortHelper(array,0,len(array)-1)\n", - "\n", - "def quickSortHelper(array,right,left):\n", - " if right= pivotvalue and \\\n", - " end >= begin:\n", - " end = end -1\n", - "\n", - " if end < begin:\n", - " done = True\n", - " else:\n", - " temp = array[begin]\n", - " alist[begin] = array[end]\n", - " alist[end] = temp\n", - "\n", - " temp = array[right]\n", - " array[right] = array[end]\n", - " array[end] = temp\n", - " return end\n", - "\n", - "array = []\n", - "n=input(\"Enter the values in array: \")\n", - "for i in range (0,n):\n", - " array.append(0)\n", - "for i in range (0,n):\n", - " array[i]=input()\n", - " \n", - "quickSort(array)\n", - "print \"Quick Sorted Array is\", array" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the values in array: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Quick Sorted Array is [1, 2, 3, 4, 5]\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 8, Page Number: 5.40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#program to find the specified elements from the array using linear searching\n", - "\n", - "a = [100]\n", - "for i in range(0,100):\n", - " a.append(0)\n", - "c = 'y'\n", - "while (c=='y')or(c=='Y'):\n", - " no = input(\"Enter the size of sorting\")\n", - " print \"Enter the elements of the array\"\n", - " for i in range(0,no):\n", - " a[i]=input()\n", - " k = input(\"Enter the element to be searched\") \n", - " for i in range(0,no):\n", - " if k == a[i]:\n", - " print \"Element %d is in the position %d\" %(k,i+1)\n", - " f=2\n", - " break\n", - " if f==1:\n", - " print \"The entered element is not in the array\"\n", - " ch = raw_input(\"If you want to continue y/n \")\n", - " c = ch\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the size of sorting5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements of the array\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element to be searched4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Element 4 is in the position 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "If you want to continue y/n n\n" - ] - } - ], - "prompt_number": 206 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 9, Page Number: 5.42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to find the specified element from array using Binary search\n", - "\n", - "a = [100]\n", - "for i in range(0,100):\n", - " a.append(0)\n", - "no = input(\"Enter the size of sorting\")\n", - "print \"Enter the elements in ascending order\"\n", - "for i in range(0,no):\n", - " a[i]=input() \n", - "t = input(\"Enter the element to be searched\") \n", - "l=0\n", - "h=no-1\n", - "while l <= h:\n", - " m = (l+h)/2\n", - " if ta[m]:\n", - " l = m+1\n", - " else:\n", - " print \"Entered %d is in position %d\" %(t,m+1)\n", - " f=2\n", - " break\n", - "if f==1:\n", - " print \"Entered element is not in the array\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the size of sorting5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements in ascending order\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element to be searched3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entered 3 is in position 2\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter07.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter07.ipynb deleted file mode 100755 index ee25427a..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter07.ipynb +++ /dev/null @@ -1,254 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:59d989e4d68b99137fb5255fe771e42a62c5ce35100304584930ea0c003ea2ac" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 07 : User Defined Functions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, page no.5.49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate Local and Global Declaration \n", - "\n", - "#variable declaration globally\n", - "i=0 \n", - "print \"Value of i in main\", i\n", - "\n", - " #define function\n", - "def f1(): \n", - " k=0\n", - " i=50\n", - " print \"Value of i after function call\",i\n", - " \n", - "#Function Call\n", - "f1() \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Value of i in main 0\n", - "Value of i after function call 50\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, page no: 5.50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate usage of local and global variable\n", - "\n", - "for i in range(0,3):\n", - " print \"Value of i is:\", i\n", - " \n", - "i=590\n", - "print \"The Value of i is:\", i \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Value of i is: 0\n", - "Value of i is: 1\n", - "Value of i is: 2\n", - "The Value of i is: 590\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page no.5.52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to call function without parameters\n", - "def message():\n", - " print \"Main Message\"\n", - " \n", - "print \"Function Message\"\n", - "\n", - "message()\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Function Message\n", - "Main Message\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page No.5.52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to call function with parameter\n", - "\n", - "#Defining function\n", - "def add(x,y):\n", - " z=0\n", - " z=x+y\n", - " return z\n", - "\n", - "k=add(10,20)\n", - "\n", - "#Result\n", - "print \"The Value of k is \", k" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of k is 30\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 5, page no.5.53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to write prototype of the function\n", - "\n", - "k=0\n", - "\n", - "#Defining in function\n", - "def f1(k):\n", - " k=k+100\n", - " return k\n", - "\n", - "#Result\n", - "print \"The value of i before call: \", k\n", - "\n", - "print \"The Value of i after call: \",(f1(k))\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of i before call: 0\n", - "The Value of i after call: 100\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 6, page no. 5.54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to write prototype definition in main function\n", - "\n", - "def fun(k):\n", - " k=k+10\n", - " return k\n", - "\n", - "i=0\n", - "\n", - "#Result\n", - "print \"The i value before call %d\\n\"%(i)\n", - "print \"The i value after call %d\\n\"%fun(i)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The i value before call 0\n", - "\n", - "The i value after call 10\n", - "\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter08.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter08.ipynb deleted file mode 100755 index e40c1b43..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter08.ipynb +++ /dev/null @@ -1,420 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:5d85b398d61f498d1deba465b9747c5d15996be1754212b25012ca792b193a16" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 08 : Function Prototypes" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Function with no arguments and no return values" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.: 5.55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to addition of two numbers\n", - "\n", - "def add():\n", - " a,b=input(\"Enter two numbers.. \")\n", - " c=a+b\n", - " print \"Sum is ... %d\"%(c)\n", - " \n", - "add() \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter two numbers.. 10,20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum is ... 30\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.:5.56" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print addition, subtraction and multiplication values\n", - "\n", - "def add():\n", - " a=10\n", - " b=5\n", - " print \"The Addition of given value: \",a+b\n", - " \n", - "def sub():\n", - " a=10\n", - " b=5\n", - " print \"The Subtraction of given value:\",a-b\n", - " \n", - "def mul():\n", - " a=10\n", - " b=5\n", - " print \"The Multiplication of given value:\",a*b\n", - " \n", - " \n", - "add()\n", - "sub()\n", - "mul()\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Addition of given value: 15\n", - "The Subtraction of given value: 5\n", - "The Multiplication of given value: 50\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Function with arguments and no return values" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, page No. 5.57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Program for addition of two numbers\n", - "\n", - "def add(x,y):\n", - " z= x+y\n", - " print \"Sum is:\", z\n", - "\n", - "#Main Function\n", - "a, b = input(\"Enter two Values: \")\n", - " \n", - "add(a,b)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter two Values: 10,20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum is: 30\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - " Example: 2, page no. 5.58" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def date(x,y,z):\n", - " print \"Employee Joined date is:%d/%d/%d\" %(x,y,z)\n", - " \n", - "print \"Enter the employee joining date.\"\n", - "\n", - "dd,mm,yy=eval(raw_input(\"Enter date, month, year: \"))\n", - "\n", - "date(dd,mm,yy)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the employee joining date.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter date, month, year: 11,12,1981\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Employee Joined date is:11/12/1981\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Function with arguments and with return value" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, page no.5.59" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for addition of two numbers\n", - "\n", - "def add(x,y):\n", - " z=0\n", - " z=x+y\n", - " return z\n", - "\n", - "#Main Function\n", - "a,b=input(\"Enter the a and b value:\")\n", - "c=add(a,b)\n", - "print \"Result is:\",c" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the a and b value:10,20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Result is: 30\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.:5.60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to send and receives the values from function\n", - "\n", - "def mul(m,n):\n", - " return (m*n)\n", - "\n", - "m=n=sum=0\n", - "m,n=input(\"Enter two values:\")\n", - "sum=mul(m,n)\n", - "\n", - "print \"Multiplication of the entered Values:\",sum" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter two values:30,4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplication of the entered Values: 120\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Function with no arguments and with return value" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, PageNo.:5.61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for addition of two numbers\n", - "\n", - "def add():\n", - " a=b=c=0\n", - " a,b=input(\"Enter the Values of a and b:\")\n", - " c=a+b\n", - " return(c)\n", - "\n", - "c=add()\n", - "print \"The Output of given Values:\",c\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Values of a and b:10,20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Output of given Values: 30\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No. 5.62" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to multiply three numbers using function\n", - "\n", - "\n", - "def mul():\n", - " a,b,c=input(\"Enter the three values for Multiplication: \")\n", - " i=a*b*c\n", - " return(i)\n", - "\n", - "s=mul()\n", - "print \"Multiplication of three numbers is= \",s\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the three values for Multiplication: 4,8,2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplication of three numbers is= 64\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb deleted file mode 100755 index 11735b92..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1a0147da7a94fc5ebe7c66bbf21a563cb0bee33c1452a7bcfcbc21f5395d7aab" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 09 : Parameter Passing Methods" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.: 5.63" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call By Value\n", - "\n", - "def cube(x):\n", - " x=x*x*x\n", - " return(x)\n", - "\n", - "n=5\n", - "print \"Cube of %d is\"%n,cube(n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cube of 5 is 125\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.:5.64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call by reference\n", - "\n", - "def interchange(a,b):\n", - " t=0\n", - " t=a\n", - " a=b\n", - " b=t\n", - " return b,a\n", - "\n", - " \n", - "i=5\n", - "j=10\n", - "print \"i and j values before interchange:\", i, j\n", - "\n", - "i=10\n", - "j=5\n", - "interchange(i,j)\n", - "\n", - "#Result\n", - "print \"i and j values after interchange:\",i,j\n", - "\n", - "print \"i and j avalues after interchange in the function : %d %d \\n\"%interchange(i,j)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i and j values before interchange: 5 10\n", - "i and j values after interchange: 10 5\n", - "i and j avalues after interchange in the function : 10 5 \n", - "\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter10.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter10.ipynb deleted file mode 100755 index 1a017d08..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter10.ipynb +++ /dev/null @@ -1,372 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ea85b38c0942e3b3d3a1243525badd8ffa28ac492392c6aef6c8ea5823294150" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 : Recursion" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.: 5.67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Factorial of an integer number.\n", - "\n", - "def rec(x):\n", - " f=0\n", - " if x==1:\n", - " return (1)\n", - " else:\n", - " f=x*rec(x-1)\n", - " return(f)\n", - "\n", - "a=input(\"Enter the number:\")\n", - "print \"The Factorial value of %d:\"%a,rec(a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number:5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Factorial value of 5: 120\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.:5.67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to read characters and print reversely using recursion.\n", - "\n", - "def reverse(c):\n", - " if len(c)<=0:\n", - " return c\n", - " return reverse(c[1:])+c[0]\n", - "\n", - "c=raw_input(\"Enter the Line of Text...\")\n", - "print reverse(c)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Line of Text...munilak\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "kalinum\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No.:5.68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#concept of recursion\n", - "\n", - "def add(pk, pm):\n", - " if pm==0:\n", - " return pk\n", - " else:\n", - " return(1+add(pk,pm-1))\n", - " \n", - " \n", - "k=70\n", - "m=20\n", - "\n", - "i=add(k,m)\n", - "\n", - "print \"The Value of addition is %d\"%i\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of addition is 90\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page No:5.70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Tower of honoi\n", - "n=int(raw_input(\"How many Disks ...\\n\"))\n", - "\n", - "def honoi(n,fro,to,t):\n", - " if(n>0):\n", - " honoi(n-1,fro,t,to)\n", - " print \"Move disk %d from %c to %c\\n\"%(n,fro,to)\n", - " honoi(n-1,t,to,fro)\n", - " \n", - "fro='L'\n", - "to='R'\n", - "t='C'\n", - " \n", - "honoi(n,fro,to,t)\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many Disks ...\n", - "3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Move disk 1 from L to R\n", - "\n", - "Move disk 2 from L to C\n", - "\n", - "Move disk 1 from R to C\n", - "\n", - "Move disk 3 from L to R\n", - "\n", - "Move disk 1 from C to L\n", - "\n", - "Move disk 2 from C to R\n", - "\n", - "Move disk 1 from L to R\n", - "\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 1, Page No. : 5.76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#user defined function that computes 'x' raised to the power 'y'\n", - "\n", - "import math \n", - "\n", - "x,y=input(\"Enter the Values of X and Y \")\n", - "\n", - "print \"%d to the power of %d is ... \"%(x,y),math.pow(x,y)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Values of X and Y 10,2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10 to the power of 2 is ... 100.0\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 2, page No.5.76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#nesting of function\n", - "\n", - "def ratio(x,y,z):\n", - " \n", - " def diff(m,n):\n", - " if(m!=n):\n", - " return(1)\n", - " else:\n", - " return(0)\n", - " \n", - " diff(y,z)\n", - " if diff(y,z):\n", - " return(x/(y-z))\n", - " else:\n", - " return(0)\n", - " \n", - " \n", - "x,y,z=input(\"Enter the values of X,Y,Z: \")\n", - "\n", - " \n", - "print \"Ratio is..%f\\n\"%ratio(x,y,z)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the values of X,Y,Z: 10,10,5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ratio is..2.000000\n", - "\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 3, Page No. 5.78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Demonstration of Global Variable\n", - "\n", - "a=39 #Global Variable\n", - "print \"A... %d\\n\"%a\n", - "\n", - "def f1():\n", - " global a\n", - " a=a+10\n", - " return a\n", - "\n", - "def f2():\n", - " global a\n", - " a=a+20\n", - " return a\n", - "\n", - "def f3():\n", - " global a\n", - " a=a+30\n", - " return a\n", - "\n", - "\n", - "\n", - "print \"A...%d\\n\"%f1()\n", - "print \"A...%d\\n\"%f2()\n", - "print \"A...%d\\n\"%f3()\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "A... 39\n", - "\n", - "A...49\n", - "\n", - "A...69\n", - "\n", - "A...99\n", - "\n" - ] - } - ], - "prompt_number": 39 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter11.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter11.ipynb deleted file mode 100755 index 0e00f235..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter11.ipynb +++ /dev/null @@ -1,304 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:03a9be4b5720a51a42be3ae01bfa08ccecef76e9a5e17f613e76c0afaff965de" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 : Structures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.: 5.81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print the student number, name and marks through accessing structure elements.\n", - "\n", - "#Defining Structure in class\n", - "class std:\n", - " no=0\n", - " name = ''\n", - " m1 = m2 = m3 =0\n", - "\n", - "#assigning variable to structure class \n", - "s=std()\n", - "\n", - "#UserInput\n", - "s.no=raw_input(\"Give Student Number: \")\n", - "s.name=raw_input(\"Enter the Student Name: \")\n", - "s.m1=input(\"Enter Student Mark1: \")\n", - "s.m2=input(\"Enter Student Mark2: \")\n", - "s.m3=input(\"Enter Student Mark3: \")\n", - "\n", - "total=avg=0.0\n", - "\n", - "total = (s.m1 + s.m2 + s.m3)\n", - "avg='%.2f' %(total / 3)\n", - "\n", - "#Result\n", - "print \"\\nThe Output is.... \\n\",s.no,s.name,total,avg" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give Student Number: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student Name: raja\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark1: 99\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark2: 97\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark3: 95\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The Output is.... \n", - "1 raja 291 97.00\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No. 5.83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#print a value from Structure.\n", - "\n", - "class struct:\n", - " a=b=0\n", - " \n", - "x=struct()\n", - "y=struct()\n", - "\n", - "x.a=29\n", - "y=x\n", - "\n", - "#Result\n", - "print \"The Value of a %d\"%y.a\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of a 29\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No.:5.84" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program for User defined data type \n", - "\n", - "#There is no preprocessor directive in python\n", - "D = 7\n", - "\n", - "#No typedef function in python\n", - "wk = int(raw_input(\"Enter Weeks : \"))\n", - "\n", - "#Result\n", - "print \"\\nNumber of Days = %d\"%(wk*D)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Weeks : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Number of Days = 28\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page.No.:5.85" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to create user defined data type from structure\n", - "\n", - "\n", - "class struct:\n", - " name=''\n", - " sex=''\n", - " age=0\n", - " \n", - "\n", - "\n", - "candidate = [struct() for i in range(0,2)]\n", - "\n", - "for a in range(0,2):\n", - " candidate[a].name= raw_input(\"Name of the Employee: \")\n", - " candidate[a].sex= raw_input(\"Sex: \")\n", - " candidate[a].age= input(\"Age: \")\n", - "\n", - "#Result\n", - "print \"\\n Name\\t Sex\\t Age\\n\"\n", - "\n", - "for a in range(0,2):\n", - " print \" %s\\t\"%(candidate[a].name),\" %s\\t\"%(candidate[a].sex),\" %d\\n\"%(candidate[a].age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name of the Employee: venkat\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sex: m\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Age: 25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name of the Employee: geetha\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sex: f\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Age: 23\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Name\t Sex\t Age\n", - "\n", - " venkat\t m\t 25\n", - "\n", - " geetha\t f\t 23\n", - "\n" - ] - } - ], - "prompt_number": 68 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter12.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter12.ipynb deleted file mode 100755 index 54918fbb..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter12.ipynb +++ /dev/null @@ -1,829 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:13c473411b35212c9727620c7673dc52636d4bf1a83b0d4eeb082d160a75324d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 : Union" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.5.87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#program using union.\n", - "\n", - "class union_name:\n", - " a=0\n", - " b=[0,1]\n", - " \n", - "c=union_name()\n", - "c.a=256\n", - "\n", - "print \"c.a value is %d\\n \"%c.a\n", - "print \"c.b[0] value is %d\\n\"%c.b[0]\n", - "print \"c.b[1] value is %d\\n\"%c.b[1]\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "c.a value is 256\n", - " \n", - "c.b[0] value is 0\n", - "\n", - "c.b[1] value is 1\n", - "\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.:5.87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#program to find size of union and number of bytes\n", - "\n", - "import sys\n", - "\n", - "class union_result:\n", - " marks=0\n", - " grade=''\n", - " \n", - " \n", - "class struct_res:\n", - " name=[15]\n", - " age=0\n", - " sex=''\n", - " address=''\n", - " pincode=0\n", - " perf=union_result()\n", - " \n", - "data=struct_res() \n", - "\n", - "#Result\n", - "print \"Size of Union: %d\\n\"%sys.getsizeof(data.perf)\n", - "print \"Size of Structure: %d\\n\"%sys.getsizeof(data)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Size of Union: 32\n", - "\n", - "Size of Structure: 32\n", - "\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pointer to Unions cannot convert as no pointer in python. Page no. 5.88" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No.:5.89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program that includes of initial values to structure variable\n", - "\n", - "import sys\n", - "\n", - "\n", - "class union_id:\n", - " color='20'\n", - " size=0\n", - " \n", - "\n", - "class struct_clothes:\n", - " manufacturer='30'\n", - " cost=0.0\n", - " description=union_id()\n", - " \n", - " \n", - "shirt=struct_clothes()\n", - "shirt.manufacturer='Indian'\n", - "shirt.cost=35.00\n", - "shirt.description.color='Black'\n", - "\n", - "print \"%d\\n\"%(sys.getsizeof(union_id))\n", - "\n", - "print \"%s %f \"%(shirt.manufacturer,shirt.cost),\"%s %d\\n \"%(shirt.description.color, shirt.description.size)\n", - " \n", - "\n", - "shirt.description.size =12\n", - "\n", - "\n", - "print \"%s %f \"%(shirt.manufacturer, shirt.cost),\"%s %d\\n \"%(shirt.description.color, shirt.description.size)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "48\n", - "\n", - "Indian 35.000000 Black 0\n", - " \n", - "Indian 35.000000 Black 12\n", - " \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page no.: 5.92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to read and write employee and their date of joining using nested structure. \n", - "\n", - "\n", - "class date:\n", - " day=0\n", - " month=\"\"\n", - " year=0\n", - " \n", - "class employee:\n", - " code=0\n", - " name=''\n", - " salary=0.0\n", - " doj=date()\n", - " \n", - " \n", - "emp1=employee()\n", - "\n", - "emp1.code=input(\"Enter Employee Code: \")\n", - "emp1.name=raw_input(\"Enter the Employee Name: \")\n", - "emp1.salary=input(\"Enter the Employee Salary: \")\n", - "\n", - "print \"\\nEnter Date of joining in order\\n\"\n", - "emp1.doj.day=input(\"Enter day: \")\n", - "emp1.doj.month=raw_input(\"Enter month: \")\n", - "emp1.doj.year=input(\"Enter year: \")\n", - "\n", - "print \"\\nThe Employee Code is: %d\"%emp1.code\n", - "print \"\\nThe Employee Name is: %s\"%emp1.name\n", - "print \"\\nThe Employee Name is: %f\"%emp1.salary\n", - "print \"\\nThe Employee DOJ is: %d %s %d\"%(emp1.doj.day,emp1.doj.month,emp1.doj.year)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Employee Code: 200\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Employee Name: VIJI\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Employee Salary: 2000.00\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter Date of joining in order\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter day: 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter month: December\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter year: 2004\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The Employee Code is: 200\n", - "\n", - "The Employee Name is: VIJI\n", - "\n", - "The Employee Name is: 2000.000000\n", - "\n", - "The Employee DOJ is: 12 December 2004\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 5, Page No. 5.93" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to store 3 records in one structure\n", - "\n", - "\n", - "class book:\n", - " name=''\n", - " price=0\n", - " pages=0\n", - " \n", - " \n", - "b=[book() for a in range(0,3)]\n", - "\n", - "for i in range(0,3):\n", - " b[i].name=raw_input(\"Enter the Book Name: \")\n", - " b[i].price=input(\"Enter the Book Price: \")\n", - " b[i].pages=input(\"Enter the Book Pages: \")\n", - " \n", - "print '\\n' \n", - "for i in range(0,3):\n", - " print \"%s\\t\"%(b[i].name),\"%d\\t\"%(b[i].price),\"%d\\n\"%(b[i].pages)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Name: English\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Price: 165\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Pages: 200\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Name: Maths\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Price: 300\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Pages: 450\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Name: Physics\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Price: 250\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book Pages: 370\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "English\t165\t200\n", - "\n", - "Maths\t300\t450\n", - "\n", - "Physics\t250\t370\n", - "\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 6, Page No. 5.95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to copy of entire structure to a function\n", - "\n", - "class std:\n", - " no=0\n", - " avg=0.0\n", - "\n", - "a=std()\n", - "\n", - "a.no=15\n", - "a.avg=90.75\n", - "\n", - "def func(Struct_p):\n", - " print \"Number is.... %d\\n\"%a.no\n", - " print \"Average is... %f\"%a.avg\n", - " \n", - "func(a)\n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number is.... 15\n", - "\n", - "Average is... 90.750000\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 7, Page No.:5.97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Programs shows how the structure can be accessed by a pointer variable.\n", - "\n", - "class student:\n", - " roll_no=0\n", - " name=''\n", - " marks=0.0\n", - "stud1=student()\n", - "\n", - "print \"Enter the student details: \\n\"\n", - "stud1.roll_no=input()\n", - "stud1.name=raw_input()\n", - "stud1.marks=input()\n", - "\n", - "print \"\\nDisplay of structure using structure variable\\n\"\n", - "print \"Roll No\\t Name\\t Marks\"\n", - "print \"\\n-------\\t ----- -------\\n\"\n", - "print \"%d\\t %s\\t %f\"%(stud1.roll_no,stud1.name,stud1.marks)\n", - "\n", - "pt=stud1\n", - "\n", - "print \"\\nDisplay of structure using pointer variable\\n\"\n", - "print \"Roll No\\t Name\\t Marks\"\n", - "print \"\\n-------\\t ----- -------\\n\"\n", - "print \"%d\\t %s\\t %f\"%(pt.roll_no,pt.name,pt.marks)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student details: \n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "39\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Muni\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "77\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Display of structure using structure variable\n", - "\n", - "Roll No\t Name\t Marks\n", - "\n", - "-------\t ----- -------\n", - "\n", - "39\t Muni\t 77.000000\n", - "\n", - "Display of structure using pointer variable\n", - "\n", - "Roll No\t Name\t Marks\n", - "\n", - "-------\t ----- -------\n", - "\n", - "39\t Muni\t 77.000000\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 1, Page No.:5.98" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to transfer a structure to a function by passing the structure address to the function\n", - "\n", - "class struct:\n", - " name=''\n", - " no=0\n", - " age=0\n", - "record=struct()\n", - "std=record\n", - "std.name,std.no,std.age=[\"LAK\",15,25]\n", - "print \"%s\\t%d\\t%d\"%(std.name,std.no,std.age)\n", - "\n", - "def fun(std):\n", - " pt.name=\"Muni\"\n", - " pt.no=16\n", - " pt.age=26\n", - " \n", - "std.name=pt.name\n", - "std.no=pt.no\n", - "std.age=pt.age\n", - "\n", - "print \"%s\\t%d\\t%d\"%(std.name,std.no,std.age)\n", - " \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "LAK\t15\t25\n", - "Muni\t16\t26\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 2, Page No.:5.100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to pass an array of structure to a function, and return a pointer to a structure.\n", - "import sys\n", - "N=3\n", - "NULL=0\n", - "\n", - "class struct:\n", - " sno=0\n", - " name=''\n", - " age=0\n", - " \n", - "record=struct()\n", - "std=record\n", - "\n", - "print \"Student Number Locater\"\n", - "print \"To Exit the program enter '0' for student number\"\n", - "stdno=input(\"Enter the Student Number: \")\n", - "print \"\\n\"\n", - "if stdno ==15:\n", - "\n", - " std.sno,std.name,std.age=[15,\"MUNI\",28]\n", - " print \"Number .... %d \\n\"%(std.sno)\n", - " print \"Name ...... %s\\n\"%(std.name)\n", - " print \"Age ....... %d\\n\"%(std.age)\n", - "if stdno == 16:\n", - " std.sno,std.name,std.age=[16,\"LAK\",27]\n", - " print \"Number .... %d \\n\"%(std.sno)\n", - " print \"Name ...... %s\\n\"%(std.name)\n", - " print \"Age ....... %d\\n\"%(std.age)\n", - " \n", - "if stdno == 17:\n", - " std.sno,std.name,std.age=[17,\"RAJA\",31]\n", - " print \"Number .... %d \\n\"%(std.sno)\n", - " print \"Name ...... %s\\n\"%(std.name)\n", - " print \"Age ....... %d\\n\"%(std.age)\n", - " \n", - "if stdno==0:\n", - " exit\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Student Number Locater\n", - "To Exit the program enter '0' for student number\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student Number: 15\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "Number .... 15 \n", - "\n", - "Name ...... MUNI\n", - "\n", - "Age ....... 28\n", - "\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 3, Page No.: 5.101" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print student name and mark using structure\n", - "\n", - "class student:\n", - " name=''\n", - " marks=0.00\n", - " \n", - "s1=''\n", - "f=0.00\n", - "\n", - "student1=student()\n", - "\n", - "student2=student()\n", - "\n", - "\n", - "student1.name=raw_input(\"Enter Name: \")\n", - "f=input(\"Enter Mark: \")\n", - "\n", - "student2.marks=f\n", - "\n", - "print \"\\nName is %s \\n\"%student1.name\n", - "print \"Marks are %f \\n\"%student2.marks\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name: Venkat\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Mark: 89\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name is Venkat \n", - "\n", - "Marks are 89.000000 \n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 4, Page No.: 5.102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print marks, grade and their address using union\n", - "\n", - "\n", - "\n", - "class union_marks:\n", - " perc=0.00\n", - " grade=''\n", - " \n", - "student1=union_marks()\n", - "\n", - "student1.perc=98.5\n", - "\n", - "print \"Marks are %f \\t address is %8lu\\n\"%(student1.perc, id(student1.perc))\n", - "\n", - "student1.grade='A'\n", - "\n", - "print \"Grade is %c \\t address is %8lu\\n\"%(student1.grade,id(student1.grade))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Marks are 98.500000 \t address is 158368916\n", - "\n", - "Grade is A \t address is 3073485064\n", - "\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter13.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter13.ipynb deleted file mode 100755 index b303ee94..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter13.ipynb +++ /dev/null @@ -1,57 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:bd4e511a3dbdd189491e3271c86cff9ce5fc919ed7457d400a67c288e55ad433" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13 : Pointers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page Number: 5.104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print address and value of variable\n", - "#Local definitions\n", - "sno = 39\n", - "\n", - "#Result\n", - "print \"Address of sno = %u\" %id(sno)\n", - "print \"Value of sno = %d\" %sno" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Address of sno = 20917296\n", - "Value of sno = 39\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter14.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter14.ipynb deleted file mode 100755 index 12a1734c..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter14.ipynb +++ /dev/null @@ -1,234 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:44f5daf77255992c95710d94f062b0f1f1e981b9e6cce07f23ed45a322c4b130" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14 : Accessing Variable through Pointers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page Number: 5.107 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to accessing through variable pointer\n", - "\n", - "from ctypes import c_int\n", - "\n", - "#Local definition\n", - "a = 22\n", - "a = c_int(a) # ctype datatype declaration\n", - "\n", - "b = 2.25\n", - "b = c_float(b) # ctype datatype declaration\n", - "\n", - "#Pointer variables\n", - "a_po=pointer(a)\n", - "b_po=pointer(b)\n", - "\n", - "# 'id' is a address of letter and it represents the address of the variable\n", - "a = id(a)\n", - "b = id(b)\n", - "\n", - "\n", - "#Result\n", - "print \"\\nValue of a = %d\" %a_po[0]\n", - "print \"\\nValue of b = %.2f\" %b_po[0]\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value of a = 22\n", - "\n", - "Value of b = 2.25\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page Number: 5.108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print address and value of variable\n", - "\n", - "from ctypes import c_int\n", - "\n", - "#Local definition\n", - "a = 22\n", - "a = c_int(a) # ctype datatype declaration\n", - "\n", - "#Pointer variables\n", - "a_po=pointer(a)\n", - "\n", - "# 'id' is a address of letter and it represents the address of the variable\n", - "a = id(a)\n", - "\n", - "#Result\n", - "print \"\\n Value of a = %d\" %a_po[0]\n", - "print \"\\n Address of a = %u\" %id(a)\n", - "print \"\\n Value at address %u = %d\" %(id(a),a_po[0])\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Value of a = 22\n", - "\n", - " Address of a = 4344066728\n", - "\n", - " Value at address 4344066728 = 22\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page Number: 5.108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Program to print value and address of variable\n", - "\n", - "from ctypes import c_int\n", - "\n", - "#Local definition\n", - "a = 22\n", - "b = c_int(a) # ctype datatype declaration\n", - "\n", - "#Pointer variable\n", - "b_po=pointer(b)\n", - "\n", - "# 'id' is a address of letter and it represents the address of the variable\n", - "b = id(a)\n", - "\n", - "#Result\n", - "print \"\\n Value of a = %d\" %a\n", - "print \"\\n Value of a = %d\" %(c_int(a).value)\n", - "print \"\\n Value of a = %d\" %b_po[0]\n", - "print \"\\n Address of a = %u\" %id(a)\n", - "print \"\\n Address of a = %u\" %b\n", - "print \"\\n Address of a = %u\" %id(b)\n", - "print \"\\n Value of b = address of a = %u\" %b" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Value of a = 22\n", - "\n", - " Value of a = 22\n", - "\n", - " Value of a = 22\n", - "\n", - " Address of a = 4298180848\n", - "\n", - " Address of a = 4298180848\n", - "\n", - " Address of a = 4344066728\n", - "\n", - " Value of b = address of a = 4298180848\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page Number: 5.109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to illustrate pointer to pointer\n", - "\n", - "from ctypes import c_int\n", - "\n", - "#Local definition\n", - "a = 22\n", - "b = c_int(a) # ctype datatype declaration\n", - "c = c_int(a) # ctype datatype declaration\n", - "\n", - "#Pointer variable\n", - "b_po = pointer(b)\n", - "c_po = pointer(b_po) # c_po is a pointer to another pointer\n", - "\n", - "# 'id' is a address of letter and it represents the address of the variable\n", - "b = id(a)\n", - "c = id(b)\n", - "\n", - "#Result\n", - "print \"\\n Value of a is %d\" %a\n", - "print \"\\n Value of a is %d\" %(c_int(a).value)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Value of a is 22\n", - "\n", - " Value of a is 22\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter15.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter15.ipynb deleted file mode 100755 index 21b14f41..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter15.ipynb +++ /dev/null @@ -1,266 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2bed6e40cd55f716f11e909c76b0c924a863909239fcbbf975814260bb7b4531" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 15 : Pointers and Functions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Call By Value" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page no. 5.112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call by value\n", - "\n", - "def change(x,y):\n", - " x=x+5\n", - " y=y+10\n", - " print \"In the function changes a&b is %d,%d\"%(x,y)\n", - " \n", - "a=10\n", - "b=20\n", - "\n", - "print \"\\nBefore calling the function a&b is %d,%d\"%(a,b)\n", - "\n", - "change(a,b)\n", - "print \"\\nAfter calling a&b is %d,%d\"%(a,b)\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Before calling the function a&b is 10,20\n", - "In the function changes a&b is 15,30\n", - "\n", - "After calling a&b is 10,20\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page no.5.113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#program to swap(interchange) the two given variable.\n", - "\n", - "def swap(x,y):\n", - " \n", - " x=x+y\n", - " y=x-y\n", - " x=x-y\n", - " print \"In swap function x=%d, y=%d\"%(x,y)\n", - " return y,x\n", - "\n", - "a=10\n", - "b=20\n", - "\n", - "print \"Before swap a=%d, b=%d\"%(a,b)\n", - "\n", - "\n", - "print \"\\nAfter the calling the swap function, a=%d,b=%d\"%swap(a,b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Before swap a=10, b=20\n", - "In swap function x=20, y=10\n", - "\n", - "After the calling the swap function, a=10,b=20\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Call By Reference" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page.No.5.114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call By Reference\n", - "\n", - "def change (x,y):\n", - " x=x+5\n", - " y=y+10\n", - " print \"In the function change a&b is %d %d\"%(x,y)\n", - " return x,y\n", - "a=10\n", - "b=20\n", - "print \"\\nBefore calling the function a&b is %d %d\"%(a,b)\n", - "\n", - "\n", - "print \"After calling the function a&b is %d %d\"%change(a,b)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Before calling the function a&b is 10 20\n", - "In the function change a&b is 15 30\n", - "After calling the function a&b is 15 30\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.5.115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to swap(intercahnge) the value of variables.\n", - "\n", - "a=10\n", - "b=20\n", - "\n", - "print \"\\nBefore swap a=%d, b=%d\"%(swap(a,b))\n", - "\n", - "def swap(x,y):\n", - " x=x+y\n", - " y=x-y\n", - " x=x-y\n", - " print\"\\nIn swap function x=%d,y=%d\"%(x,y)\n", - " return y,x\n", - "\n", - "print \"\\nAfter calling swap function a=%d, b=%d\"%(b,a)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In swap function x=20,y=10\n", - "\n", - "Before swap a=10, b=20\n", - "\n", - "After calling swap function a=20, b=10\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page no. 5.115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to interchange the value of variables using call by reference\n", - "def exchange(m,n):\n", - " t=m\n", - " m=n\n", - " n=t\n", - " return n,m\n", - "\n", - "a,b=input(\"Enter two Numbers: \")\n", - "\n", - "print \"Before Exchange a=%d,b=%d\"%(a,b)\n", - "\n", - "\n", - "print \"After Exchange a=%d, b=%d\"%(exchange(b,a))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter two Numbers: 10,20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Before Exchange a=10,b=20\n", - "After Exchange a=20, b=10\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter16.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter16.ipynb deleted file mode 100755 index ab91ce85..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter16.ipynb +++ /dev/null @@ -1,333 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d2add72dea4c498cf89927248000fdbfce0907704975d2bdb6ff1cde1c8f50a7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter 16 : Pointers and Arrays" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.:5.118" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print the value and address of the element\n", - "\n", - "a=[10,20,30,40,50]\n", - "for b in range(0,5):\n", - " print \"The value of a[%d]=%d\"%(b,a[b])\n", - " print \"Address of a[%d]=%u\"%(b,id(a[b]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of a[0]=10\n", - "Address of a[0]=4299197952\n", - "The value of a[1]=20\n", - "Address of a[1]=4299197712\n", - "The value of a[2]=30\n", - "Address of a[2]=4299197472\n", - "The value of a[3]=40\n", - "Address of a[3]=4299199208\n", - "The value of a[4]=50\n", - "Address of a[4]=4299198968\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.: 5.119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print the value and the address of the element using pointer with function\n", - "\n", - "a=[10,20,30,40,50]\n", - "\n", - "for c in range(0,5):\n", - " print \"The Value of a[%d]=%d\"%(c,a[c])\n", - " print \"The address of a[%d]=%u\"%(c,id(b))\n", - "def value(b):\n", - " b=''\n", - " id(b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of a[0]=10\n", - "The address of a[0]=4296527248\n", - "The Value of a[1]=20\n", - "The address of a[1]=4296527248\n", - "The Value of a[2]=30\n", - "The address of a[2]=4296527248\n", - "The Value of a[3]=40\n", - "The address of a[3]=4296527248\n", - "The Value of a[4]=50\n", - "The address of a[4]=4296527248\n" - ] - } - ], - "prompt_number": 58 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example:3, Page No,: 5.120" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to add the sum of number using pointer\n", - "\n", - "a=[10,20,30,40,50]\n", - "\n", - "b=total=0\n", - "c=id(c)\n", - "\n", - "for b in range(0,5):\n", - " print \"Enter the number %d: \"%(b+1)\n", - " a[b]=input()\n", - " \n", - "c=a\n", - "for b in range(0,5):\n", - " total=total+c[b]\n", - " c[b]=c[b]+1\n", - "\n", - "print \"Total= %d\"%(total)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number 1: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number 2: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number 3: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "30\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number 4: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "40\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number 5: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "50\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total= 150\n" - ] - } - ], - "prompt_number": 67 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page No.: 5.121 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to sort a given number using pointer.\n", - "\n", - "arr = []\n", - "n = input(\"Enter the no. of elements: \")\n", - "for i in range(0,n):\n", - " arr.append(0)\n", - "print \"Enter the element: \" \n", - "for i in range(0,n):\n", - " arr[i]=input()\n", - "print \"Before Sorting:\" \n", - "for i in range(0,n):\n", - " print \"%d\"%arr[i],\n", - " \n", - "for i in range(0,n):\n", - " for j in range(i,n):\n", - " if arr[i]>arr[j]:\n", - " t = arr[i]\n", - " arr[i] = arr[j]\n", - " arr[j] = t\n", - "print \"\\nAfter Sorting:\"\n", - "for i in range(0,n):\n", - " print \"%d\" %arr[i]," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the no. of elements: 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Before Sorting:\n", - "8 5 7 4 6 \n", - "After Sorting:\n", - "4 5 6 7 8\n" - ] - } - ], - "prompt_number": 72 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter17.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter17.ipynb deleted file mode 100755 index 7967d054..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter17.ipynb +++ /dev/null @@ -1,310 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:86b94093ee72d30b0a9443a44a1c3905ef6186294337253a1ca56b0318def382" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 17 : Pointers with Multidimensional Array" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.:5.123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print the values and addres of the array elements.\n", - "\n", - "arr=([[5,100],[10,200],[15,300],[20,400]])\n", - "\n", - "for a in range(0,4):\n", - " print \"Address of %d array= %u\"%(a,id(arr[a]))\n", - " for b in range(0,2):\n", - " print \"Value =%d\"%(arr[a][b])\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Address of 0 array= 4336406328\n", - "Value =5\n", - "Value =100\n", - "Address of 1 array= 4336414944\n", - "Value =10\n", - "Value =200\n", - "Address of 2 array= 4336414800\n", - "Value =15\n", - "Value =300\n", - "Address of 3 array= 4366918504\n", - "Value =20\n", - "Value =400\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.: 5.125" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print the value and address of the element using array of pointers\n", - "\n", - "a=[0,1,2]\n", - "b=10\n", - "c=20\n", - "d=30\n", - "a[0]=b\n", - "a[1]=c\n", - "a[2]=d\n", - "for i in range(0,3):\n", - " print \"Address = %u\"%id(a[i])\n", - " print \"Value = %d\" % (a[i])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Address = 4298181184\n", - "Value = 10\n", - "Address = 4298180944\n", - "Value = 20\n", - "Address = 4298180704\n", - "Value = 30\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No.: 5.126 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to sort a list of strings in alphabetical order using array of pointers.\n", - "\n", - "a = []\n", - "n= input(\"Enter the number of strings: \")\n", - "print \"Enter each string on a separate line below.\"\n", - "for i in range(0,n):\n", - " a.append(0)\n", - " \n", - "for i in range(0,n):\n", - " a[i]=raw_input(\"String %d: \" %(i+1))\n", - "for i in range(0,n):\n", - " for j in range(i,n):\n", - " if a[i]>a[j]:\n", - " t = a[i]\n", - " a[i] = a[j]\n", - " a[j] = t\n", - "print \"\\nReordered List of Strings: \"\n", - "for i in range(0,n):\n", - " print \"String %d: %s\" %(i+1,a[i])\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of strings: 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter each string on a separate line below.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 1: venkat\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 2: ramesh\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 3: babu\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 4: muni\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 5: shankar\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "String 6: saravanan\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Reordered List of Strings: \n", - "String 1: babu\n", - "String 2: muni\n", - "String 3: ramesh\n", - "String 4: saravanan\n", - "String 5: shankar\n", - "String 6: venkat\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page No.: 5.128 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to count number of words\n", - "\n", - "str=[]\n", - "ps=raw_input(\"Enter a string: \")\n", - "print len(ps.split()), \"word(s) in the given string\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a string: I am a student.\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4 word(s) in the given string\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 5, Page No.: 5.129" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate on strings and pointers\n", - "\n", - "s1=\"abcd\"\n", - "s2='efgh'\n", - "\n", - "print \"%s %16lu \\n\" % (s1,id(s1))\n", - "print \"%s %16lu \\n\" % (s2,id(s2)) \n", - "\n", - "s1=s2\n", - "print \"%s %16lu \\n\" % (s1,id(s1))\n", - "print \"%s %16lu \\n\" % (s2,id(s2))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "abcd 4363408224 \n", - "\n", - "efgh 4363332704 \n", - "\n", - "efgh 4363332704 \n", - "\n", - "efgh 4363332704 \n", - "\n" - ] - } - ], - "prompt_number": 34 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter18.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter18.ipynb deleted file mode 100755 index c422da50..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter18.ipynb +++ /dev/null @@ -1,490 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0724a7e756186f06943f5403b91daf5f178ee495f014e11c1fad0330aa0d254c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 18 : Pointers and Structures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.: 5.130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print details of person using structure and pointer\n", - "\n", - "class account:\n", - " name=\"\"\n", - " place=\"\"\n", - " acctno=0\n", - " \n", - "m4=account()\n", - "m4.name=\"Venkat\"\n", - "m4.place=\"Arcot\"\n", - "m4.acctno=24201\n", - "\n", - "print \"%s\\t%s\\t%d\\n\"%(m4.name,m4.place,m4.acctno)\n", - "\n", - "contents=m4\n", - "\n", - "print \"%s\\t%s\\t%d\\n\"%(contents.name,contents.place,contents.acctno)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Venkat\tArcot\t24201\n", - "\n", - "Venkat\tArcot\t24201\n", - "\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No.: 5.131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print name, place, and account number using structure and pointer\n", - "\n", - "class account:\n", - " name=\"\"\n", - " place=\"\"\n", - " acctno=0\n", - " \n", - "m4=account()\n", - "m4.name=\"Madhavan\"\n", - "m4.place=\"Chennai\"\n", - "m4.acctno=241\n", - "a=m4\n", - "\n", - "print \"%s\\n%s\\n%d\\n\"%(a.name,a.place,a.acctno)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Madhavan\n", - "Chennai\n", - "241\n", - "\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No.: 5.132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to show how the int_pointers structure can be handled.\n", - "\n", - "\n", - "class int_pointers:\n", - " p1=0\n", - " p2=0\n", - " \n", - "pointers=int_pointers()\n", - "m1= 80\n", - "pointers.p1=m1\n", - "pointers.p2=-40\n", - "m2=pointers.p2\n", - "print \"m1= %i, *pointers.p1 = %i\\n\"% (m1,pointers.p1)\n", - "print \"m2= %i, *pointers.p2 = %i\\n\"% (m2,pointers.p2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1= 80, *pointers.p1 = 80\n", - "\n", - "m2= -40, *pointers.p2 = -40\n", - "\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 1: Page No.5.133" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to interchange the values stored in two variables using function with pointers. \n", - "\n", - "def interchange(a,b):\n", - " t=a\n", - " a=b\n", - " b=t\n", - " return b,a\n", - " \n", - "a=39\n", - "b=77\n", - "\n", - "print \"Before Interchange: a=%d, b=%d\"%(a,b)\n", - "\n", - "\n", - "print \"After Interchange : a=%d, b=%d\"%(interchange(b,a))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Before Interchange: a=39, b=77\n", - "After Interchange : a=77, b=39\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study: 2, Page No.:5.134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate the use of structure pointers\n", - "\n", - "class book:\n", - " bno=0\n", - " bname=''\n", - " cost=0.0\n", - "\n", - "p=[book()for i in range(0,3)]\n", - "print \"Enter the Book details... \"\n", - "print \"Enter Book number, Book Name, Book Costs... \"\n", - "for i in range(0,3):\n", - " p[i].bno=input()\n", - " p[i].bname=raw_input()\n", - " p[i].cost=input()\n", - " \n", - "for i in range(0,3):\n", - " \n", - " print \"\\n%d\\t%s\\t\\t%d\"%(p[i].bno,p[i].bname,p[i].cost)\n", - " \n", - "print \"\\nStructure Output\\n\"\n", - "ptr=p\n", - "\n", - "for i in range(0,3):\n", - " print \"%d\\t%s\\t\\t%d\"%(ptr[i].bno,ptr[i].bname,ptr[i].cost)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Book details... \n", - "Enter Book number, Book Name, Book Costs... \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "101\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Computer Practice_1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "240\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "201\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Computer Practice_2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "250\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "202\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "C++ and JAVA\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "280\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "101\tComputer Practice_1\t240\n", - "\n", - "201\tComputer Practice_2\t250\n", - "\n", - "202\tC++ and JAVA\t280\n", - "\n", - "Structure Output\n", - "\n", - "101\tComputer Practice_1\t240\n", - "201\tComputer Practice_2\t250\n", - "202\tC++ and JAVA\t280\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 3: Page No: 5.136" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to count number of vowels,consonants, digits,spaces and other characters in a line of text.\n", - "\n", - "vowels='aeiou'\n", - "consonants='bcdfghjklmnpqrstvwxyz'\n", - "spaces =' '\n", - "digits='1234567890'\n", - "special_characters='!@#$%^&*()_'\n", - "\n", - "text=raw_input(\"Enter the text in lower case: \")\n", - "\n", - "print \"\\nNumber of vowels: \",dict((v, text.count(v)) for v in text if v in vowels)\n", - "print \"Number of consonants: \",dict((c, text.count(c)) for c in text if c in consonants)\n", - "print \"Number of Spaces: \",dict((s, text.count(s)) for s in text if s in spaces)\n", - "print \"Number of digits: \",dict((d, text.count(d)) for d in text if d in digits)\n", - "print \"Number of special_characters: \",dict((sc, text.count(sc)) for sc in text if sc in special_characters)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the text in lower case: 123 vrb publishers @#$%^&*()\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Number of vowels: {'i': 1, 'e': 1, 'u': 1}\n", - "Number of consonants: {'b': 2, 'h': 1, 'l': 1, 'p': 1, 's': 2, 'r': 2, 'v': 1}\n", - "Number of Spaces: {' ': 3}\n", - "Number of digits: {'1': 1, '3': 1, '2': 1}\n", - "Number of special_characters: {'@': 1, '#': 1, '%': 1, '$': 1, '&': 1, ')': 1, '(': 1, '*': 1, '^': 1}\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 4: Page No.: 5.136" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate malloc() function\n", - "\n", - "NULL=0\n", - "string = ''\n", - "if string==NULL:\n", - " print \"Not Enough memory to allocate buffer\\n\"\n", - "else:\n", - " \n", - " def strcpy(cstring1):\n", - " import copy\n", - " cstring2=copy.copy(cstring1)\n", - " return cstring2 \n", - "string=\"Hello\"\n", - "print \"String is %s\" %string" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String is Hello\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 5: Page No.: 5.137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate calloc() function\n", - "\n", - "string=''\n", - "\n", - "def strcpy(cstring1):\n", - " import copy\n", - " cstring2=copy.copy(cstring1)\n", - " return cstring2 \n", - "stri=\"BHAVANA\"\n", - "string=strcpy(stri)\n", - "print \"String is %s\" %string" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String is BHAVANA\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Case Study 6: Page No.:5.138" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to demonstrate realloc() function\n", - "#Cannot do in python" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 29 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter19.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter19.ipynb deleted file mode 100755 index bbaf1a5b..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter19.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:069422c07d34cc73268583e26cec775bbe1b3930cb154b474b2ff1e109dbe593" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 19 : Command Line Arguments" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.:5.139" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import sys\n", - "argc=0\n", - "if argc!=2:\n", - " print \"Hellow %s\"%(sys.argv)\n", - "else:\n", - " print \"Forgotted to type name\"\n", - " exit(0)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hellow ['-c', '-f', '/home/gayathri/.config/ipython/profile_default/security/kernel-f732916e-2a20-4211-8210-1c4fa7115bd5.json', \"--IPKernelApp.parent_appname='ipython-notebook'\", '--profile-dir', '/home/gayathri/.config/ipython/profile_default', '--parent=1']\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No. 5.139" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "argc='0'\n", - "if argc==2:\n", - " print \"Argument supplied is %s\"%(sys.argv)\n", - "elif argc>2:\n", - " print \"Too many arguments supplied \\n\",(sys.argv)\n", - "else:\n", - " print \"One Argument expected\",(sys.argv)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Too many arguments supplied \n", - "['-c', '-f', '/home/gayathri/.config/ipython/profile_default/security/kernel-f732916e-2a20-4211-8210-1c4fa7115bd5.json', \"--IPKernelApp.parent_appname='ipython-notebook'\", '--profile-dir', '/home/gayathri/.config/ipython/profile_default', '--parent=1']\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No. :5.140" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "\n", - "print \"The Arguments to the program are: \"\n", - "print str(sys.argv)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Arguments to the program are: \n", - "['-c', '-f', '/home/gayathri/.config/ipython/profile_default/security/kernel-f732916e-2a20-4211-8210-1c4fa7115bd5.json', \"--IPKernelApp.parent_appname='ipython-notebook'\", '--profile-dir', '/home/gayathri/.config/ipython/profile_default', '--parent=1']\n" - ] - } - ], - "prompt_number": 30 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb deleted file mode 100755 index adaadc6f..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb +++ /dev/null @@ -1,61 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7f2d14f2c2ae43d8abc01634eb7d39800f8596aa61628d10404d3502e1e30c64" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 20 : Dynamic Memory Allocation" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No. 5.146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Reallocation of memory\n", - "\n", - "p= \"MADRAS\"\n", - "\n", - "print \"Memory contains: %s\\n\"%(p) #There is no reallocation memory in python\n", - "\n", - "p=\"CHENNAI\"\n", - "\n", - "print \"Memory now contains: %s\\n\"%(p)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Memory contains: MADRAS\n", - "\n", - "Memory now contains: CHENNAI\n", - "\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter21.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter21.ipynb deleted file mode 100755 index 2b76d2a2..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter21.ipynb +++ /dev/null @@ -1,174 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2bdca20a49e1bad43f6968c764966fb35bc4580bd54570e770e266797cc3ab0e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 21 : The C Preprocessor" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 1, Page No.5.149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print square and cube Values by using macro substitutions. \n", - "def sq(n):\n", - " return n*n\n", - " \n", - " \n", - "def cube(n):\n", - " return n*n*n\n", - " \n", - "\n", - "a=5\n", - "b=3\n", - "s=c=0\n", - "\n", - "#Function calling\n", - "s=sq(a)\n", - "c=cube(b)\n", - "\n", - "#Result\n", - "print \"Square value of 5 is %d\"%(s)\n", - "print \"Cube value of 3 is %d\"%(c)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Square value of 5 is 25\n", - "Cube value of 3 is 27\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 2, Page No. 5.151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print the Values using macro substitution.\n", - "\n", - "VAL=40\n", - "\n", - "print \"The value is %d\"%VAL\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value is 40\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 3, Page No.:5.151\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print Value and text using preprocessing.\n", - "VAL=35\n", - "\n", - "HELLO=\"HELLO\"\n", - "\n", - "res=VAL-5\n", - "\n", - "print \"Res=VAL-5:Res= %d\"%res\n", - "\n", - "print \"HELLO\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Res=VAL-5:Res= 30\n", - "HELLO\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example: 4, Page No.:5.152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to print the value using preprocessors.\n", - "USD=1\n", - "UKP=1\n", - "\n", - "currency_rate=46\n", - "currency_rate=100\n", - "\n", - "rs=10*currency_rate\n", - "print \"The Value of rs is : %d\"%rs\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Value of rs is : 1000\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter22.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter22.ipynb deleted file mode 100755 index 53a104bf..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter22.ipynb +++ /dev/null @@ -1,2300 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dd103cfe67b47eb61e56816517923337936d461ec4fd4b8f9f87e6c544fd31e3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 22 : Sample C Programs(Lab Exercise)" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 1: Page no.:L.4" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Area of Triangle\n", - "\n", - "import math\n", - "\n", - "#User Inputs\n", - "a,b,c=input(\"Enter three sides: \")\n", - "\n", - "#calculation of semi perimeter\n", - "s=(a+b+c)/2\n", - "\n", - "#Calculation of Area of Triangle\n", - "d=(s*(s-a)*(s-b)*(s-c))\n", - "\n", - "area=math.sqrt(d)\n", - "\n", - "#Result\n", - "print \"Area of triangle = %f sq units \\n\"%area" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter three sides: 5,6,7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Area of triangle = 14.696938 sq units \n", - "\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 2: Page No. L.5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Square root for the given value.\n", - "\n", - "import math\n", - "\n", - "#User Input\n", - "x=input(\"Enter the Value: \")\n", - "\n", - "#Result\n", - "print \"Square root of %.2f is: \"%(x)\n", - "\n", - "print math.sqrt(x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Value: 81\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Square root of 81.00 is: \n", - "9.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 3: Page.No.L.6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Sum of the series 0+1+(1+2)+...+n\n", - "\n", - "#User Input\n", - "n=input(\"Enter the Value of n : \")\n", - "\n", - "#Variable Declaration\n", - "s=term=0\n", - "i=j=0\n", - "\n", - "#Computing Values in loop\n", - "for i in range(n):\n", - " for j in range(n):\n", - " if j<=i:\n", - " term=term+j\n", - " j=j+1 \n", - "s=s+term\n", - "if i<=n:\n", - " i=i+1\n", - " \n", - "#Result\n", - "print \"Sum of the series S= %d\"%(s)\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Value of n :5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of the series S= 20\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 4: Page No.:L.9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Decimal into binary number.\n", - "\n", - "n=input(\"Enter the decimal number: \")\n", - "s=n\n", - "k=[]\n", - "\n", - "#Calculation\n", - "while (s>0):\n", - " a=int(float(s%2))\n", - " k.append(a)\n", - " s=(s-a)/2\n", - "k.append(0)\n", - "bi=\"\"\n", - "\n", - "for j in k[::1]:\n", - " bi=bi+str(j)\n", - "\n", - "#Result\n", - "print('The binary value of %d is %s'%(n, bi))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the decimal number: 14\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The binary value of 14 is 01110\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 5: Page No. L.10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#The given number is armstrong or not.\n", - "\n", - "#Variable declaration\n", - "a=b=c=d=e=0\n", - "\n", - "#User Input\n", - "a=input(\"Enter the Number: \")\n", - "\n", - "#Assigning variable 'a' value to variable 'e'\n", - "e=a\n", - "\n", - "#Calculation for finding Armstrong or not\n", - "while a>0:\n", - " b=a%10\n", - " c=b*b*b\n", - " a=a/10\n", - " d=c+d\n", - " \n", - "#Result\n", - "if e==d:\n", - " print \"%d is an armstrong number. \"%e\n", - " \n", - "else:\n", - " print \"%d is not an armstrong number. \"%e" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Number: 153\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "153 is an armstrong number. \n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 6: Page No.L.12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Centigrade and Farenheit Values.\n", - "\n", - "\n", - "#Variable Declaration\n", - "c=f=cn=fn=0.0\n", - "\n", - "#User Input1 for calculating farenheit\n", - "c=input(\"Enter temperature in centigrade : \")\n", - "\n", - "#Farenheit Calculation\n", - "f=1.8*c+32\n", - "\n", - "#Result1\n", - "print \"Farenheit Equivalent is: %.1f\\n\" %(f)\n", - "\n", - "#User input2 for calculating centigrade\n", - "fn=input(\"Enter temperature in farenheit : \")\n", - "\n", - "#Centigrade Calculation\n", - "cn=(fn-32)/1.8\n", - "\n", - "#Result2\n", - "print \"Centigrade Equivalent is : %.1f\\n\"%(cn)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter temperature in centigrade : 20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Farenheit Equivalent is: 68.0\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter temperature in farenheit : 68\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Centigrade Equivalent is : 20.0\n", - "\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 7: Page .no.L.13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Converting Decimal value to binary number\n", - "\n", - "\n", - "#Variable declaration\n", - "bnum=digit=decimal=bina=base=0\n", - "\n", - "#User input\n", - "bnum=input(\"Enter the binary number: \")\n", - "\n", - "bina=bnum\n", - "\n", - "while(bnum!=0):\n", - " digit=bnum%10\n", - " decimal=decimal+(digit<maxi:\n", - " maxi=y\n", - " if z>maxi:\n", - " maxi=z\n", - " return maxi\n", - " \n", - " \n", - "#User input\n", - "a,b,c=input(\"Enter three integers : \")\n", - "\n", - "#Result\n", - "print \"Maximum is : %d\\n\"%(maximum(a,b,c))\n", - "\n", - "\n", - " \n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter three integers : 2,6,9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum is : 9\n", - "\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 11: Page no.L.19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Factorial of the given number using recursion.\n", - "\n", - "#funtion declaration\n", - "def fact(n):\n", - " if n==0:\n", - " return 1\n", - " else:\n", - " return(n*fact(n-1))\n", - " \n", - "#USer Input\n", - "\n", - "n=input(\"Enter the number whose factorial is to be found: \")\n", - "\n", - "#Result\n", - "print \"The Factorial of %d is : %d \\n\"%(n,fact(n))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number whose factorial is to be found: 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Factorial of 6 is : 720 \n", - "\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 12: Page no.L.20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Palindrome or not.\n", - "\n", - "print \"Enter the String to check palindrome or not \\n\"\n", - "\n", - "#User Input\n", - "\n", - "string = raw_input(\"Enter the String: \")\n", - "\n", - "#reverse the string \n", - "\n", - "rev_string = reversed(string)\n", - "\n", - "#Check if the string is palindrome or not\n", - "\n", - "if list(rev_string) == list(string) :\n", - " print \"\\nThe given string %s is a palindrome\"%(string)\n", - " \n", - "else:\n", - " print \"\\nThe given string %s is not a palindrome\"%(string)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the String to check palindrome or not \n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the String: madam\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The given string madam is a palindrome\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 13: Page No. L.24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Largest and smallest number in array\n", - "\n", - "#User input\n", - "n= input(\"Enter the nth term of an array: \")\n", - "\n", - "for i in range(0,n):\n", - " a[i]=eval(raw_input())\n", - "\n", - "#check if the given array is large or small. \n", - " for i in range(1,n):\n", - " if a[i]>large:\n", - " large=a[i]\n", - " \n", - " else:\n", - " if a[i]a[j]:\n", - " temp=a[i]\n", - " a[i]=a[j]\n", - " a[j]=temp\n", - " \n", - "print \"\\nThe Elements in ascending order\\n\"\n", - "\n", - "for i in range(0,n):\n", - " print \"%.2f\"%a[i]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last term of the array: 6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "23\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "14\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "-90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "-67\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "48\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "01\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The Elements in ascending order\n", - "\n", - "-90.00\n", - "-67.00\n", - "1.00\n", - "14.00\n", - "23.00\n", - "48.00\n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 15: Page No. L.27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Insert element in specified position in an array\n", - "\n", - "import array\n", - "\n", - "#User input\n", - "n=input(\"Enter the last value: \")\n", - "a=[0 for i in range(0,n) ]\n", - "print \"Enter the elements of array: \"\n", - "for i in range(0,n):\n", - " a[i]=eval(raw_input())\n", - " \n", - "#Getting inserting element and position from users\n", - "item=input(\"Enter the element to be inserted: \")\n", - "pos=input(\"Enter the position of insertion: \")\n", - "a.insert(pos,item)\n", - "#Result\n", - "print \"\\nElements after insertion is : \"\n", - "for i in range(0,n+1):\n", - " print \"%.2f\"%a[i]\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last value: 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements of array: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "32\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element to be inserted: 36\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the position of insertion: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Elements after insertion is : \n", - "12.00\n", - "34.00\n", - "56.00\n", - "90.00\n", - "36.00\n", - "32.00\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 16: Page.no.L.29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Transpose of the matrix\n", - "\n", - "#User Input\n", - "\n", - "a=[]\n", - "\n", - "n,m=input(\"Enter the Row and Columns: \")\n", - "print \"Enter the elements of matrix:\"\n", - "for i in range(n):\n", - " a.append([])\n", - " \n", - " for j in range(m):\n", - " element=input()\n", - " a[i].append(element)\n", - "\n", - "#print matrix\n", - "print \"\\nElements in matrix: \"\n", - "for i in range(n):\n", - " for j in range(m):\n", - " print a[i][j],\n", - " print '\\n'\n", - "\n", - "\n", - "#generate transpose\n", - "transpose=[]\n", - "for j in range(m):\n", - " transpose.append([])\n", - " for i in range (n):\n", - " b=a[i][j]\n", - " transpose[j].append(b)\n", - "\n", - "#print transpose\n", - "print \"Transpose of the matrix is: \"\n", - "for i in range (m):\n", - " for j in range (n):\n", - " print transpose[i][j],\n", - " print '\\n'\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns: 3,3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements of matrix:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Elements in matrix: \n", - "1 2 3 \n", - "\n", - "4 5 6 \n", - "\n", - "7 8 9 \n", - "\n", - "Transpose of the matrix is: \n", - "1 4 7 \n", - "\n", - "2 5 8 \n", - "\n", - "3 6 9 \n", - "\n" - ] - } - ], - "prompt_number": 52 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 17: Page no. L.32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to find sum of an array matrix\n", - "#Array Declaration\n", - "\n", - "a=[]\n", - "b=[]\n", - "c=[[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", - "#User Input1\n", - "n,m=input(\"Enter the Row and Columns of A Matrix: \")\n", - "print \"Enter the elements of A matrix:\"\n", - "for i in range(n):\n", - " a.append([])\n", - " \n", - " for j in range(m):\n", - " element=input()\n", - " a[i].append(element)\n", - "\n", - "#print matrix1\n", - "print \"\\nElements in A matrix: \"\n", - "for i in range(n):\n", - " for j in range(m):\n", - " print a[i][j],\n", - " print '\\n'\n", - "\n", - " \n", - "#User Input 2\n", - "p,q=input(\"Enter the Row and Columns of B Matrix: \")\n", - "print \"Enter the elements of B matrix:\"\n", - "for i in range(p):\n", - " b.append([])\n", - " \n", - " for j in range(q):\n", - " element=input()\n", - " b[i].append(element)\n", - "\n", - "#print matrix 2\n", - "print \"\\nElements in B matrix: \"\n", - "for i in range(p):\n", - " for j in range(q):\n", - " print b[i][j],\n", - " print '\\n'\n", - "\n", - "#Addition of array in matrix \n", - "for i in range(n):\n", - " for j in range(m):\n", - " c[i][j] += a[i][j] + b[i][j]\n", - "\n", - "#Result\n", - "print \"\\nThe Sum of A and B matrix: \"\n", - "for i in range(n):\n", - " for j in range(m):\n", - " print \"%5d\"%c[i][j],\n", - " print '\\n'" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns of A Matrix: 3,3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements of A matrix:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Elements in A matrix: \n", - "1 2 3 \n", - "\n", - "4 5 6 \n", - "\n", - "7 8 9 \n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns of B Matrix: 3,3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements of B matrix:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Elements in B matrix: \n", - "1 2 3 \n", - "\n", - "4 5 6 \n", - "\n", - "6 7 4 \n", - "\n", - "\n", - "The Sum of A and B matrix: \n", - " 2 4 6 \n", - "\n", - " 8 10 12 \n", - "\n", - " 13 15 13 \n", - "\n" - ] - } - ], - "prompt_number": 80 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 18: Page No. :L.35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to find Matrix Multiplication \n", - "#Array Declaration\n", - "\n", - "a=[]\n", - "b=[]\n", - "c=[[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", - "\n", - "while True:\n", - "#User Input1\n", - " n,m=input(\"Enter the Row and Columns of A Matrix: \")\n", - " p,q=input(\"Enter the Row and Columns of B Matrix: \")\n", - " if (n==m&p==q):\n", - " print \"Enter the elements of A matrix:\" \n", - " for i in range(n):\n", - " a.append([]) \n", - " for j in range(m):\n", - " element=input()\n", - " a[i].append(element)\n", - "#print matrix1\n", - " print \"\\nElements in A matrix: \"\n", - " for i in range(n):\n", - " for j in range(m):\n", - " print a[i][j],\n", - " print '\\n'\n", - " \n", - "#User Input 2 \n", - " print \"Enter the elements of B matrix:\"\n", - " for i in range(p):\n", - " b.append([])\n", - " for j in range(q):\n", - " element=input()\n", - " b[i].append(element)\n", - "\n", - "#print matrix 2\n", - " print \"\\nElements in B matrix: \"\n", - " for i in range(p):\n", - " for j in range(q):\n", - " print b[i][j],\n", - " print '\\n'\n", - "\n", - "#Multiplication of array in matrix \n", - " for i in range(0,m):\n", - " for j in range(0,n):\n", - " c[i][j] = 0\n", - " for k in range(0,n):\n", - " c[i][j] += a[i][k] * b[k][j]\n", - " \n", - "#Result\n", - " print \"\\nThe Multiplication of A and B matrix: \"\n", - " for i in range(n):\n", - " for j in range(m):\n", - " print \"%5d\"%c[i][j],\n", - " print '\\n'\n", - " break\n", - " else:\n", - " print \"The No. of rows and columns are not equal.\\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns of A Matrix: 3,3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns of B Matrix: 2,2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The No. of rows and columns are not equal.\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns of A Matrix: 3,3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Row and Columns of B Matrix: 3,3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the elements of A matrix:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Elements in A matrix: \n", - "1 2 3 \n", - "\n", - "4 5 6 \n", - "\n", - "7 8 9 \n", - "\n", - "Enter the elements of B matrix:\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Elements in B matrix: \n", - "2 4 1 \n", - "\n", - "6 7 4 \n", - "\n", - "3 5 7 \n", - "\n", - "\n", - "The Multiplication of A and B matrix: \n", - " 23 33 30 \n", - "\n", - " 56 81 66 \n", - "\n", - " 89 129 102 \n", - "\n" - ] - } - ], - "prompt_number": 93 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 19: Page No. L.38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Student grade using structure\n", - "\n", - "#User Input\n", - "n=input(\"Enter the number of students: \")\n", - "\n", - "#Defining Structure\n", - "class std:\n", - " no=0\n", - " name = ''\n", - " m1 = m2 = m3 =0\n", - " total=avg=0.0\n", - " grade= ''\n", - " \n", - "s=[std() for i in range(0,n)]\n", - "\n", - "#User Input\n", - "for i in range(0,n):\n", - " print \"\\nEnter the student %d details\"%(i+1)\n", - " print \"\\n\"\n", - " s[i].no=int(input(\"Give Student Number: \"))\n", - " s[i].name=raw_input(\"Enter the Student Name: \")\n", - " s[i].m1=int(input(\"Enter Student Mark1: \"))\n", - " s[i].m2=int(input(\"Enter Student Mark2: \"))\n", - " s[i].m3=int(input(\"Enter Student Mark3: \"))\n", - "\n", - "\n", - "#Calculation \n", - " s[i].total = (s[i].m1 + s[i].m2 + s[i].m3)\n", - " s[i].avg=(s[i].total / 3)\n", - " if s[i].avg<=40:\n", - " s[i].grade='D'\n", - " elif s[i].avg<60:\n", - " s[i].grade='C'\n", - " elif s[i].avg<80:\n", - " s[i].grade='B'\n", - " else:\n", - " s[i].grade='A'\n", - " \n", - "#Result\n", - "print \"\\tStudent mark details.... \\n\"\n", - "print \"Roll No\\t Name \\t\\tMark1 \\tMark2 \\tMark3 \\tTotal \\tAverage \\tGrade\"\n", - "for i in range(0,n):\n", - " print \"%d\\t\"%(s[i].no),\"%s\\t\\t\"%(s[i].name), \"%d\\t\"%(s[i].m1),\"%d\\t\"%(s[i].m2),\"%d\\t\"%(s[i].m3), \"%.2f\\t\"%(s[i].total), \"%.2f\\t\\t\"%(s[i].avg), \"%s\\t\"%(s[i].grade)\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of students: 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter the student 1 details\n", - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give Student Number: 100\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student Name: Venkat\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark1: 89\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark2: 87\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark3: 76\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter the student 2 details\n", - "\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Give Student Number: 101\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Student Name: Shankar\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark1: 87\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark2: 90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Student Mark3: 67\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\tStudent mark details.... \n", - "\n", - "Roll No\t Name \t\tMark1 \tMark2 \tMark3 \tTotal \tAverage \tGrade\n", - "100\tVenkat\t\t89\t87\t76\t252.00\t84.00\t\tA\t\n", - "101\tShankar\t\t87\t90\t67\t244.00\t81.00\t\tA\t\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 20: Page No. L.40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Employee details using Union\n", - "\n", - "#Defining Union\n", - "\n", - "class union:\n", - " name=\"\"\n", - " idno=0\n", - " salary=0.0\n", - " \n", - "desc=union()\n", - "\n", - "desc.name=\"vinod\"\n", - "\n", - "print \"Employee details:\"\n", - "\n", - "print \"The name is %s\\n\"%(desc.name)\n", - "print \"The idno is %d\\n\"%(desc.idno)\n", - "print \"The salary is %6.2f\\n\"%(desc.salary)\n", - "\n", - "desc.idno=10\n", - "\n", - "print \"Employe details:\"\n", - "\n", - "print \"The name is %s\\n\"%(desc.name)\n", - "print \"The idno is %d\\n\"%(desc.idno)\n", - "print \"The salary is %6.2f\\n\"%(desc.salary)\n", - "\n", - "desc.salary=6500.00\n", - "\n", - "print \"Employee details:\"\n", - "\n", - "print \"The name is %s\\n\"%(desc.name)\n", - "print \"The idno is %d\\n\"%(desc.idno)\n", - "print \"The salary is %6.2f\\n\"%(desc.salary)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Employee details:\n", - "The name is vinod\n", - "\n", - "The idno is 0\n", - "\n", - "The salary is 0.00\n", - "\n", - "Employe details:\n", - "The name is vinod\n", - "\n", - "The idno is 10\n", - "\n", - "The salary is 0.00\n", - "\n", - "Employee details:\n", - "The name is vinod\n", - "\n", - "The idno is 10\n", - "\n", - "The salary is 6500.00\n", - "\n" - ] - } - ], - "prompt_number": 58 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 21: Page No. L.41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Swap the contents of two variable using pointer.\n", - "\n", - "#swapping function.\n", - "\n", - "def interchange(x,y):\n", - " temp=x\n", - " x=y\n", - " y=temp\n", - " return x,y\n", - "\n", - "#User Input\n", - "a,b = input(\"Enter the values of A and B: \")\n", - "#Result before interchanging\n", - "print \"a=%d b=%d\\n\"%(a,b)\n", - "\n", - "\n", - "#Result after interchanging\n", - "print \"After interchanging: \\n\"\n", - "\n", - "print \"a=%d b=%d\\n\"%(interchange(a,b))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the values of A and B: 23,56\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a=23 b=56\n", - "\n", - "After interchanging: \n", - "\n", - "a=56 b=23\n", - "\n" - ] - } - ], - "prompt_number": 66 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 22: Page No.: L.43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Concatenate two strings using Dynamic Memory Allocation \n", - "\n", - "s1= raw_input(\"Enter String One: \")\n", - "s2=raw_input(\"Enter String two: \")\n", - "\n", - "s3=''\n", - "s3=s1+s2 \n", - "#Result\n", - "print \"Concatenated String: \", s1+s2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter String One: venkat\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter String two: raman\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Concatenated String: venkatraman\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 23: Page No. L.44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#program to store and print same data to and from the file.\n", - "\n", - "#open file\n", - "fp=open(\"Text.txt\",\"w\")\n", - "\n", - "#User Input\n", - "c=raw_input(\"Enter the Text: \")\n", - "\n", - "#Store given input into a file \"text.txt\"\n", - "fp.write(c)\n", - "\n", - "#Closing file\n", - "fp.close()\n", - "\n", - "#Again open text.txt\n", - "fp=open(\"Text.txt\", \"r\")\n", - "\n", - "#display the content from the file \"text.txt\"\n", - "print \"Displaying text from file:\\n\",c \n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Text: VRB PUBLISHERS\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Displaying text from file:\n", - "VRB PUBLISHERS\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 24: Page No. L.46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program to count number of characters in a file.\n", - "\n", - "#create a file\n", - "fp=open(\"str.txt\",\"w\")\n", - "c=\"\"\n", - "print \"Enter the Characters:\"\n", - "print \"Press ctrl+z to stop entry\"\n", - "\n", - "#User Input\n", - "c=raw_input()\n", - "#store input into the file\n", - "fp.write(c)\n", - "fp.close()\n", - "\n", - "#Again open the file to read\n", - "fp=open(\"str.txt\",\"r\")\n", - "\n", - "#Result\n", - "print \"\\n%s\"%(c)\n", - "print \"Number of characters in the file: \",len(c)\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the Characters:\n", - "Press ctrl+z to stop entry\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "vrb publishers private limited\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "vrb publishers private limited\n", - "Number of characters in the file: 30\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exercise 25: Page No.: L.48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Program using Memory Allocation function\n", - "\n", - "NULL=0\n", - "buffer_size=10\n", - "\n", - "buffer1 = \"BOMBAY\"\n", - "print \"Buffer of size %d created\"%(buffer_size)\n", - "print \"Buffer contains\", buffer1\n", - " \n", - "\n", - "if buffer_size==NULL:\n", - " print \"Malloc failed\"\n", - " \n", - "else:\n", - " print \"Buffer size modified\"\n", - " print \"Buffer still contains:\", buffer1\n", - " \n", - "buffer1=\"MUMBAI\"\n", - "print \"Buffer now contains:\", buffer1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Buffer of size 10 created\n", - "Buffer contains BOMBAY\n", - "Buffer size modified\n", - "Buffer still contains: BOMBAY\n", - "Buffer now contains: MUMBAI\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/README.txt b/Fundamental_of_Computing_and_Programming_in_C/README.txt deleted file mode 100755 index 9bed1b50..00000000 --- a/Fundamental_of_Computing_and_Programming_in_C/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Lakshmidharan D -Course: msc -College/Institute/Organization: Pachaiyappa's College for Men, Kanchipuram -Department/Designation: Computer Science -Book Title: Fundamental of Computing and Programming in C -Author: V. Ramesh Babu, R. Samyuktha, M. Munirathnam -Publisher: Lakshmidharan D -Year of publication: 2012 -Isbn: 9789381837214 -Edition: August 2012 \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Calculation.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Calculation.png deleted file mode 100755 index 54b0ef8a..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Calculation.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even.png deleted file mode 100755 index ba866766..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_1.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_1.png deleted file mode 100755 index ba866766..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_1.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_2.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_2.png deleted file mode 100755 index ba866766..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_2.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_3.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_3.png deleted file mode 100755 index ba866766..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_3.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line.png deleted file mode 100755 index 19625214..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_1.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_1.png deleted file mode 100755 index 19625214..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_1.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_2.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_2.png deleted file mode 100755 index 19625214..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_2.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_3.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_3.png deleted file mode 100755 index 19625214..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_3.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_4.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_4.png deleted file mode 100755 index 19625214..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_4.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Standard_Deviation.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Standard_Deviation.png deleted file mode 100755 index a448529e..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Standard_Deviation.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi.png deleted file mode 100755 index 88aee856..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi_1.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi_1.png deleted file mode 100755 index 88aee856..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi_1.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers.png deleted file mode 100755 index 05bef403..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers_with_A.png b/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers_with_A.png deleted file mode 100755 index 2c6a1efe..00000000 Binary files a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers_with_A.png and /dev/null differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter01.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter01.ipynb new file mode 100755 index 00000000..8e50e4de --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter01.ipynb @@ -0,0 +1,578 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e61d5eac9962a1b27acd93d08c5b466532db593eb946c997e161cd14ea1acee1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 01 : Operators and Expressions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1: Page No.:4.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Usage of Arithmetic operators\n", + "\n", + "#Variable declaration\n", + "i=10\n", + "j=20\n", + "\n", + "#the sum value of variables i and j stores in k variable \n", + "k=i+j\n", + "\n", + "#Result\n", + "print \"Value of k is %d\"%(k)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of k is 30\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2: Page No.:4.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Demonstrations on arithmetic operators\n", + "\n", + "#User Input\n", + "\n", + "a,b,c,d=input(\"Enter values of a, b, c, d: \")\n", + "\n", + "#Calculation\n", + "a+=(b*c)+d\n", + "\n", + "#Result\n", + "print \"Value of a = %d \"%(a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter values of a, b, c, d ,e: 12,90,56,43\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of a = 5095 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3: Page No.:4.36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find out all arithmetic operation on two given values\n", + "\n", + "#Variable Declaration\n", + "sum=sub=mul=rem=0\n", + "div=0.0\n", + "a=0\n", + "#User Input\n", + "b,c,d=input(\"Enter the values of b, c, d: \")\n", + "\n", + "sum = b + c\n", + "sub = b - c\n", + "mul = b * c\n", + "div = b/c\n", + "rem = b % d\n", + "\n", + "print \"Sum = %d, Sub = %d, Mul = %d, Div = %f\"%(sum,sub,mul,div)\n", + "print \"Remainder of division of b & d is %d\"%(rem)\n", + "print \"a=%d\"%(a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the values of b, c, d: 2,6,45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum = 8, Sub = -4, Mul = 12, Div = 0.000000\n", + "Remainder of division of b & d is 2\n", + "a=0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4: Page No.: 4.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to use various relational operators\n", + "\n", + "#!=,==,>=,<= are assignment operator\n", + "\n", + "print \"Condition : Return values\"\n", + "print \" 5!=5 : %5d\"%(5!=5) \n", + "print \" 5==5 : %5d\"%(5==5)\n", + "print \" 5>=5 : %5d\"%(5>=5)\n", + "print \" 5<=5 : %5d\"%(5<=50)\n", + "print \" 5!=3 : %5d\"%(5!=3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Condition : Return values\n", + " 5!=5 : 0\n", + " 5==5 : 1\n", + " 5>=5 : 1\n", + " 5<=5 : 1\n", + " 5!=3 : 1\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5: Page No.:4.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Demonstrate of logical operator\n", + "\n", + "#Variable Declaration\n", + "c1=c2=c3=0\n", + "\n", + "#USer Input\n", + "c1,c2,c3=input(\"Enter Values of C1, C2 and C3: \")\n", + "print \"\\n\"\n", + "\n", + "if (c10): #Checking whether the character is alphabet\n", + " print ch,\"is a alphabet\"\n", + " \n", + "elif(ch.isdigit()>0): #Checking whether the character is digit\n", + " print ch,\"is a digit\"\n", + " \n", + "else: #else print alphanumeric\n", + " print ch,\"is a alphanumeric\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give any Character as a input: a\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a is a alphabet\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, Page No 4.57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Convert Uppercase to Lowercase and Viceversa\n", + "\n", + "#Variable Declaration\n", + "\n", + "ch=''\n", + "\n", + "\n", + "#User Input\n", + "ch= raw_input(\"Give the input in lower case or upper case: \")\n", + "\n", + "if(ch.islower()): #Converting lowercase if input is uppercase\n", + " print ch.upper(), \"is a upper case character\"\n", + " \n", + "else: #else print lowercase\n", + " print ch.lower(), \"is a lower case character\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the input in lower case or upper case: s\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S is a upper case character\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, Page No 4.58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using input function\n", + "\n", + "scientist=''\n", + "\n", + "scientist = raw_input(\"Enter Name: \")\n", + "print \"Print the name: \", scientist\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Abdul kalam\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Print the name: Abdul kalam\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, Page No 4.62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Count numbers of entered numbers\n", + "\n", + "#Variable declaration\n", + "i=0\n", + "j=10\n", + "k=0\n", + "\n", + "#getting input from user \n", + "j=int(raw_input(\"Give input for j \"))\n", + "k=int(raw_input(\"Give input for k \"))\n", + "i=int(raw_input(\"Give input for i \"))\n", + "\n", + "i= i, j, k #assigning the user input in to a variable\n", + "\n", + "#Result\n", + "print \"No. of given input values:\", len(i) #counting length of the given input\n", + "print \"The Value of j and k is \", j, k #printing the values of input" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give input for j 56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give input for k 32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give input for i 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of given input values: 3\n", + "The Value of j and k is 56 32\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, Page No 4.65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Print a statement using print\n", + "\n", + "print \"VRB Publishers\" #Printing statement" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VRB Publishers\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, Page No 4.65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Adding two numbers\n", + "\n", + "#variable declaration\n", + "\n", + "a=6\n", + "b=8\n", + "c= a+b #Adding a, b and stores in c \n", + "\n", + "#Result\n", + "print \"Addition of two numbers is : \", c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Addition of two numbers is : 14\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, Page No 4.66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Reading and Displaying Details of a student\n", + "\n", + "#Variable Declaration\n", + "\n", + "sno=m1=m2=m3=0\n", + "name=['20']\n", + "total=0\n", + "avg=0.0\n", + "\n", + "#User Inputs\n", + "sno=int(raw_input(\"Give Student serial no. \"))\n", + "name=raw_input(\"Student Name : \")\n", + "m1=int(raw_input(\"Student Mark 1: \"))\n", + "m2=int(raw_input(\"Student Mark 2: \"))\n", + "m3=int(raw_input(\"Student Mark 3: \"))\n", + "\n", + "total=float(m1+m2+m3) #Calculation of marks\n", + "\n", + "avg=\"%.2f\"%float(total/3.0) #Average\n", + "\n", + "#Result\n", + "print '\\n'\"Student serial No.:\", sno\n", + "print \"Student Name:\", name\n", + "print \"Student's Marks:\", m1, m2, m3\n", + "print \"Total:\", total\n", + "print \"Average:\", avg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give Student serial no. 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Name : Raja\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Mark 1: 90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Mark 2: 95\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Mark 3: 98\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Studnt serial No.: 1\n", + "Student Name: Raja\n", + "Student's Marks: 90 95 98\n", + "Total: 283.0\n", + "Average: 94.33\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, Page No:4.71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Display quotient and reminder of given input\n", + "\n", + "#variable declaration\n", + "\n", + "a=b=q=r=0\n", + "\n", + "#User input\n", + "a=int(raw_input(\"Give input for a: \"))\n", + "b=int(raw_input(\"Give input for b: \"))\n", + "\n", + "q=float(a/b) #Calculation for Quotient\n", + "\n", + "r=float(a-q*b) #Calculation for Reminder\n", + "\n", + "#Result\n", + "print \"Quotient of a and b is :\",q\n", + "print \"Reminder of a and b is :\",r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give input for a: 39\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give input for b: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quotient of a and b is : 5.0\n", + "Reminder of a and b is : 4.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, Page No:4.73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Slope and Midpoint of a line\n", + "\n", + "#Variable declaration\n", + "\n", + "x=x1=y1=x2=y2=slope=0.0\n", + "\n", + "#User input1\n", + "\n", + "x1=int(raw_input(\"Give point X1: \"))\n", + "y1=int(raw_input(\"Give point Y1: \"))\n", + "\n", + "\n", + "#User input2\n", + "\n", + "x2=int(raw_input('\\n'\"Give point X2: \"))\n", + "y2=int(raw_input(\"Give point Y2: \"))\n", + "\n", + "slope =(y2-y1)/(x2-x1) #Calculation for Slope\n", + "\n", + "#Calculation for Midpoints\n", + "x=float(x1+x2)/2.0\n", + "y=float(y1+y2)/2.0\n", + "\n", + "#Result\n", + "print '\\n' \"Slope of a line is :\", slope\n", + "print \"Midpoint of a line is :\", x,y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give point X1: 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give point Y1: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Give point X2: 30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give point Y2: 40\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Slope of a line is : 1\n", + "Midpoint of a line is : 20.0 30.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, Page No:4.73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Average of Given N Numbers\n", + "\n", + "#Variable Declaration\n", + "n=0.0\n", + "x=0\n", + "total=0\n", + "avg=0.0\n", + "\n", + "#UserInput\n", + "\n", + "n=int(raw_input(\"Give total number of input: \"))\n", + "\n", + "print \"Give those\",n ,\"Numbers\"\n", + "\n", + "for i in range(n): #Looping values of n\n", + " i=1\n", + " x=input() #Values for n\n", + " total+=x # Adding given numbers\n", + " \n", + "avg=float(total/n) #Calculating an average of given numbers\n", + "\n", + "#Result\n", + "print \"Sum of given numbers is \", total\n", + "print \"Average is \", avg\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give total number of input: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give those 5 Numbers\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "17\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "76\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of given numbers is 112\n", + "Average is 22.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, Page No:4.75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Temperature Conversion (Fahrenheit to Celsius)\n", + "\n", + "#Variable Declaration\n", + "\n", + "F_MIN =0\n", + "F_MAX=500\n", + "INC=50\n", + "fh= F_MIN\n", + "\n", + "print \"Fahrenheit\" '\\t' \"Celsius\"\n", + "while(fh<=F_MAX):\n", + " cel =\"%.2f\"%float((fh-(32.0))/1.8) #Calculating Celsius value\n", + " print fh,'\\t''\\t', cel\n", + " fh=fh+INC #Calculating Fahrenheit value\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fahrenheit\tCelsius\n", + "0 \t\t-17.78\n", + "50 \t\t10.00\n", + "100 \t\t37.78\n", + "150 \t\t65.56\n", + "200 \t\t93.33\n", + "250 \t\t121.11\n", + "300 \t\t148.89\n", + "350 \t\t176.67\n", + "400 \t\t204.44\n", + "450 \t\t232.22\n", + "500 \t\t260.00\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, Page No:4.76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Area of Triangle\n", + "\n", + "#Variable Declaration\n", + "\n", + "a=b=c=s=area=0.0\n", + "\n", + "#User input\n", + "\n", + "a=int(raw_input(\"First side of Triangle is \"))\n", + "b=int(raw_input(\"Second side of Triangle is \"))\n", + "c=int(raw_input(\"Third side of Triangle is \"))\n", + "\n", + "s=(a+b+c)/2.0 #Calculating Size of triangle\n", + "\n", + "area=\"%.3f\"%float((s*(s-a)*(s-b)*(s-c)) ** 0.5) #Calculating Area of triangle\n", + "\n", + "#Result\n", + "print '\\n',\"Area of Triangle is\",area" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "First side of Triangle is 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Second side of Triangle is 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Third side of Triangle is 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Area of Triangle is 43.301\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter03.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter03.ipynb new file mode 100755 index 00000000..34a44d60 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter03.ipynb @@ -0,0 +1,440 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:92464c4be2e3e810ccda180a900c5ec8bb15a9537c93387b95c317c7709c7b7c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 03 : Decision Making" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, Page No.:4.79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using if with multiple statements\n", + "\n", + "\n", + "#Variable Declaration\n", + "i=0\n", + "\n", + "#User Input\n", + "\n", + "i =int(raw_input(\"Give the numbers less than 10\"'\\n'))\n", + "\n", + "if i<=10: #Checking the given value\n", + "\n", + "#Result \n", + " print \"The given value of\", i , \"less than 10\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the numbers less than 10\n", + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the given value of 5 less than 10\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.: 4.79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Program for interchange two values using if statement\n", + "\n", + "#Variable Declaration\n", + "\n", + "a=m=n=0\n", + "\n", + "#User Input\n", + "\n", + "m=int(raw_input(\"Give the value of m\" '\\t'))\n", + "n=int(raw_input(\"Give the value of n\" '\\t'))\n", + "\n", + "if m>=n : #Checking the Given Values\n", + " \n", + " a=m # method for swapping \n", + " m=n\n", + " n=a\n", + "\n", + "#Result\n", + "\n", + "print \"The Swapped Values of m and n are \", m,a" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of m\t34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of n\t28\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Swapped Values of m and n are 28 34\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No. 4.81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#determine the given number is odd or even. \n", + "\n", + "#Variable Declaration\n", + "num=rem=0\n", + "\n", + "#User Input\n", + "num=input(\"Enter the value: \")\n", + "rem=num%2 \n", + "if rem==0 : #Checking condition\n", + "\n", + "#Result 1\n", + " print \"The given number is Even\"\n", + "else :\n", + " \n", + "#Result 2\n", + " print \"The given number is Odd\"\n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value: 80\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The given number is Even\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page No.:4.81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Find floating point input using if-else statement\n", + "\n", + "#Variable Declaration\n", + "\n", + "years=seconds=0.0\n", + "life=0\n", + "\n", + "years=float(raw_input(\"Give your Age in years: \"))\n", + "life=years\n", + "if life==0:\n", + " print \"The given age is not floating value\"\n", + " \n", + "else :\n", + " seconds=\"%f\"%float(years*365*24*60*60)\n", + " print \"You have lived for\", seconds, \"seconds\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give your Age in years: 24\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have lived for 756864000.000000 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 5, Page No. :4.82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# find biggest among two numbers \n", + "\n", + "#Variable Declaration\n", + "\n", + "i=j=big=0\n", + "i,j=input(\"Give two values: \")\n", + "\n", + "big=i\n", + "\n", + "if big10) & (i<20):\n", + " print \"The given value is in between 10 and 20\"\n", + "\n", + "else :\n", + " print \"The given value is greater than 20 and less than 10\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number: 15\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The given value is in between 10 and 20\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 8, Page No. :4.86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# display the types of characterusing if-else statement\n", + "\n", + "#User Input\n", + "\n", + "chr= raw_input(\"Enter a Single Character: \")\n", + "\n", + "if( ((chr>='a') & (chr<='z')) | ((chr>='A') & (chr<='Z'))):\n", + " print \"Given charactered is an Alphabetic\"\n", + " \n", + "elif ((chr>='0') & (chr <='9')):\n", + " print \"Given Character is a digit\"\n", + " \n", + "else:\n", + " print \"Entered Character is a special character\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Single Character: M\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given charactered is an Alphabetic\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter04.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter04.ipynb new file mode 100755 index 00000000..a58b3c75 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter04.ipynb @@ -0,0 +1,1337 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cbd54959e18d38695240f376809cd86bcdd3f9c461e014b42a620c0846ec3cbf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 04 : Branching and Looping" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1: Page No.:4.88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# addition of numbers using while loop.\n", + "\n", + "#Varibale Declaration\n", + "\n", + "i=1\n", + "sum=0\n", + "while i<=10: #Checking while loop\n", + " sum+=i\n", + " i+=1 #Increment of i\n", + " \n", + " #Result \n", + "print \"The Sum of the numbers upto is \",sum" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Sum of the numbers upto is 55\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2: Page No.: 4.89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "#Variable Declaration\n", + "\n", + "i=1\n", + "j=0\n", + "\n", + " \n", + "print \"The maximum value of integer is\", sys.maxsize\n", + "print \"The Value of integer after overflow is\", sys.maxint-1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum value of integer is 2147483647\n", + "The Value of integer after overflow is 2147483646\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3: Page No.: 4.89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Reverse the given number using while loop\n", + "\n", + "#Variable Declaration\n", + "\n", + "number=digit=rev=0\n", + "\n", + "number=input(\"Give the Value: \")\n", + "\n", + "while(number!=0):\n", + " digit=number%10\n", + " rev=rev*10+digit\n", + " number= number/10\n", + " \n", + "print \"The reversible value of given number is\", rev\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the Value: 7896\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reversible value of given number is 6987\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4: Page No.: 4.90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Simple interest using while loop.\n", + "\n", + "#Variable Declaration\n", + "\n", + "p=1\n", + "n=1\n", + "count=1\n", + "\n", + "r=si=0.0\n", + "\n", + "while(count<=3):\n", + " p=input(\"Give the value of P\" '\\t')\n", + " n=input(\"Give the value of N\"'\\t')\n", + " r=float(input(\"Give the value of R\"'\\t'))\n", + " \n", + " si=\"%.3f\"%float((p*n*r)/100)\n", + " \n", + " print \"Simple Interest of SI\", si\n", + " count=count+1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of P\t2000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of N\t3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of R\t5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Simple Interest of SI 300.000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of P\t3500\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of N\t6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of R\t1.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Simple Interest of SI 315.000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of P\t6000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of N\t2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of R\t3.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Simple Interest of SI 420.000\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5: Page No.:4.92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Numbers upto 10 by using the do..while loop\n", + "\n", + "#Variable Declaration\n", + "\n", + "i=1\n", + "sum=0\n", + "\n", + "while True:\n", + "\tsum+=i\n", + "\ti+=1\n", + "\tif(i>10):\n", + "\t\tbreak\n", + "print \"Sum of the numbers upto 10 is\", sum \n", + " \n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of the numbers upto 10 is 55\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6: Page No.: 4.92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#print n numbers using do...while loop\n", + "\n", + "i=0\n", + "\n", + "n=input(\"Enter the number: \")\n", + "\n", + "while True:\n", + " print \"The numbers are: \",i\n", + " i=i+1\n", + " if(i>=n):\n", + " break\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numbers are: 0\n", + "The numbers are: 1\n", + "The numbers are: 2\n", + "The numbers are: 3\n", + "The numbers are: 4\n", + "The numbers are: 5\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7: page no.: 4.95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Addition of number upto 10 using for loop\n", + "\n", + "i=sum=0\n", + "\n", + "for i in range (0,11):\n", + "\tsum+=i\n", + "\ti+=1\n", + "\n", + "print \"The addition of given numbers\",sum\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The addition of given numbers 55\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8: Page No.:4.96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#print n numbers using for...loop structure\n", + "\n", + "n=int(raw_input(\"Give Values of n: \"))\n", + "i=0\n", + "for i in range(0,n):\n", + " print \"The Given numbers are: \",i\n", + "\n", + "\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give Values of n: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Given numbers are: 0\n", + "The Given numbers are: 1\n", + "The Given numbers are: 2\n", + "The Given numbers are: 3\n", + "The Given numbers are: 4\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9: Page No.:4.97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#student marks and average using for loop..\n", + "\n", + "a=b=c=d=e=total=0\n", + "\n", + "avg=0.0\n", + "\n", + "m=input(\"Enter the number of Students:\")\n", + "\n", + "print \"Enter the marks of the five subjects: \"'\\n'\n", + "\n", + "for i in range (m): \n", + " i+=1\n", + " print \"\\nStudent:\",i,\"\\n\"\n", + " \n", + " a,b,c,d,e=input(\"Enter the Student mark1: \") \n", + " \n", + " if ((a,b,c,d,e)!=0) :\n", + " total=a+b+c+d+e\n", + " avg=\"%.3f\"%float(total/5)\n", + " print \"Total marks of the student:\", total\n", + " print \"Average marks of the students: \",avg\n", + " \n", + " else :\n", + " print \"Entered data is invalid\"\n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of Students:3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the marks of the five subjects: \n", + "\n", + "\n", + "Student: 1 \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student mark1: 78,56,90,59,87\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks of the student: 370\n", + "Average marks of the students: 74.000\n", + "\n", + "Student: 2 \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student mark1: 49,87,60,57,93\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks of the student: 346\n", + "Average marks of the students: 69.000\n", + "\n", + "Student: 3 \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student mark1: 89,100,80,97,65\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks of the student: 431\n", + "Average marks of the students: 86.000\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10: Page No.:4.98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Nested for loop\n", + "\n", + "for i in range(1,4):\n", + " for j in range(1,4):\n", + " print \"%d\"%(j),\n", + " print \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 \n", + "\n", + "1 2 3 \n", + "\n", + "1 2 3 \n", + "\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11: Page No.:4.99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#student details using nested for loop..\n", + "\n", + "FIRST=300\n", + "SECOND=200\n", + "rollno=marks=total=0\n", + "\n", + "n=input(\"Enter the number of Students: \")\n", + "m=input(\"Enter the number of subjects: \")\n", + "\n", + "for i in range(n):\n", + " i+=(+1)\n", + " rollno=int(raw_input(\"Enter the student roll number: \"))\n", + " total=0\n", + " print \"Enter marks of\",m, \"subjects for Roll no: \",rollno\n", + " for j in range(m):\n", + " marks=int(raw_input(\"Give marks: \"))\n", + " total= total+marks\n", + " \n", + " print \"total marks\", total\n", + " if(total>=FIRST):\n", + " print \"(First Class)\"'\\n'\n", + " elif(total>=SECOND):\n", + " print \"(Second Class)\"'\\n'\n", + " else:\n", + " print \"Fail\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of Students: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of subjects: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student roll number: 201\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of 5 subjects for Roll no: 201\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 68\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 89\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total marks 415\n", + "(First Class)\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student roll number: 202\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of 5 subjects for Roll no: 202\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 50\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 49\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 39\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give marks: 47\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total marks 225\n", + "(Second Class)\n", + "\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12: Page No.: 4.103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Demonstrate switch case\n", + "\n", + "a=1\n", + "if a==1:\n", + " print \"I am in case 1\"'\\n'\n", + "elif a==2:\n", + " print \"I am in case2\"'\\n'\n", + "else:\n", + " print \"I am in case default\"'\\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I am in case 1\n", + "\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13: Page No.:4.104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to use the computer as calculator\n", + "\n", + "a=b=c=0\n", + "\n", + "op=raw_input(\"Give the option for calculation like +(ADD), -(SUB), *(MUL), /(DIV): \")\n", + "a=input(\"Enter the value of a \")\n", + "b=input(\"Enter the value of b \")\n", + "\n", + "#Calculation\n", + "if (op=='+'):\n", + " c=a+b\n", + " print \"Result of C\", c \n", + "elif(op=='-'):\n", + " c=a-b\n", + " print \"Result of C\", c\n", + "elif(op=='*'):\n", + " c=a*b\n", + " print \"Result of C\", c\n", + "else:\n", + " c=a/b\n", + " print \"Result of C\", c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the option for calculation like +(ADD), -(SUB), *(MUL), /(DIV): +\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of a 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of b 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Result of C 30\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14: Page No.:4.105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find even or odd numbers \n", + "\n", + "#USer Input\n", + "a=input(\"Enter a number: \")\n", + "\n", + "if a%2==0 : \n", + " print \" The number is even. \"\n", + "else :\n", + " print \"The number is odd.\" \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 89\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number is odd.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15: Page No.:4.106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to count number of 0s, 1s, blank spaces and other characters\n", + "\n", + "\n", + "txt=[30]\n", + "count =0 \n", + "txt=raw_input(\"Enter Numbers\")\n", + "\n", + "print \"Total Spaces : %d\"%txt.count(' ')\n", + "print \"Total of 1's : %d\"%txt.count('1')\n", + "print \"Total of 0's : %d\"%txt.count('0')\n", + "print \"String Length : %d\"%len(txt)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Numbers120010 09100110\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Spaces : 2\n", + "Total of 1's : 5\n", + "Total of 0's : 7\n", + "String Length : 16\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16: Page No.: 4.108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Print the number upto 5 using break statement\n", + "\n", + "for i in range(1,10):\n", + " if i==6:\n", + " break\n", + " print i," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 4 5\n" + ] + } + ], + "prompt_number": 120 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17: Page No.: 4.109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to calculate the sum of the given positive numbers\n", + "\n", + "i=n=sum=0\n", + "\n", + "for i in range(0,5):\n", + " n=int(raw_input(\"Give any value of n \"))\n", + " if n<0:\n", + " continue\n", + " else:\n", + " sum+=n\n", + " \n", + "print \"\\nSum is\", sum" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give any value of n 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give any value of n 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give any value of n 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give any value of n -10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give any value of n 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Sum is 100\n" + ] + } + ], + "prompt_number": 124 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18: Page No.:4.113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using goto statement\n", + "\n", + "a=input(\"Give the Value of a \")\n", + "b=input(\"Give the value of b \")\n", + "\n", + "if a==b:\n", + " print \"A and B are equal\"\n", + "else:\n", + " print \"A and B are not equal\"\n", + " exit(0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the Value of a 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of b 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A and B are equal\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 1: Page No.: 4.112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Prime or not\n", + "\n", + "n=input(\"Enter the Positive value of n \")\n", + "i=2\n", + "\n", + "#Calculation\n", + "while n>i:\n", + " if n%i==0 & i!=n:\n", + " #r=n%i\n", + " #if r==0:\n", + " print \"The Given value of \",n,\" is not a prime\"\n", + " break\n", + " i+=1\n", + "else:\n", + " print \"The Given Value\",n, \"is Prime\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Positive value of n 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Given Value 3 is Prime\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 2: Page No.: 4.113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Find the Greatest Common Division\n", + "\n", + "i=int(input(\"Give the Value of i \"))\n", + "j=int(input(\"Give the value of j \"))\n", + " \n", + "def gcd(i,j):\n", + " if i > j:\n", + " k = i%j\n", + " if k == 0:\n", + " return j\n", + " else:\n", + " return gcd(j, k)\n", + " if i < j:\n", + " i = j\n", + " j = i\n", + " return gcd(i, j)\n", + "print \"The value of gcd\", gcd(i,j) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the Value of i 54\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the value of j 36\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of gcd 18\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 3: Page No.: 4.115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to which reads in a Temperature and print the temperature in opposite scale\n", + "\n", + "\n", + "print \"1.Fahrenheit to Celcius\\n2.Celcius to Fahrenheit\\n\"\n", + "code=input(\"Choose Option to find Temperature: \")\n", + "\n", + "while code!=0:\n", + " if code==1:\n", + " f=float(input(\"Give the Value for Fahrenheit Temperature \"))\n", + " c=(f-32.0)*5.0/9.0\n", + " break\n", + " elif code==2:\n", + " c=float(input(\"Give the Value for Celcius Temperature \"))\n", + " f=9.0*c/5.0+32.0\n", + " break\n", + " else:\n", + " print \"Give proper Code Value for Temperature Calculation\"\n", + " break\n", + "print \"C=\", \"%.3f\"%float(c)\n", + "print \"F=\",f " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.Fahrenheit to Celcius\n", + "2.Celcius to Fahrenheit\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Choose Option to find Temperature: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give the Value for Fahrenheit Temperature 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C= 37.778\n", + "F= 100.0\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter05.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter05.ipynb new file mode 100755 index 00000000..fa4db685 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter05.ipynb @@ -0,0 +1,987 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8b48219cd7d973f69d80d4d491de4bdba5cb9c73135095697b1625a862f6bc97" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 05 : Defining and Processing of Arrays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page Number: 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to read 5 data items from input and store them in an array and display their sum\n", + "\n", + "#Local definitions\n", + "a = []\n", + "sum = 0\n", + "\n", + "for i in range(0,5):\n", + " a.append(0)\n", + "print \"Enter 5 integer numbers\" \n", + "for i in range(0,5):\n", + " a[i] = eval(raw_input())\n", + " \n", + "for i in range(0,5): \n", + " sum = sum + a[i] \n", + " \n", + "print \"The sum of given numbers is : %d\\n\" %sum" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter 5 integer numbers\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "120\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "69\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "390\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of given numbers is : 669\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2 Page No. 5.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to accept 5 numbers and print whether the number is even or not\n", + "\n", + "#Local Variable\n", + "a=[]\n", + "\n", + "for i in range(5):\n", + " a.append(0)\n", + "for i in range(0,5):\n", + " i+1\n", + " a[i]=eval(raw_input(\"Enter the %d number: \"%(i+1))) \n", + " print \"\\n\"\n", + "for i in range (0,5):\n", + " if a[i]%2==0:\n", + " print \"%d Number is Even\"%a[i]\n", + " else:\n", + " print \"%d Number is Odd\"%a[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 1 number: 17\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 2 number: 38\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 3 number: 79\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 4 number: 80\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 5 number: 76\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "17 Number is Odd\n", + "38 Number is Even\n", + "79 Number is Odd\n", + "80 Number is Even\n", + "76 Number is Even\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3 Page No. 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to illustrate how a character array can be used.\n", + "\n", + "#Local definition\n", + "word=['F', 'R', 'I', 'E', 'N', 'D', 'S']\n", + "\n", + "for i in range(0,7):\n", + " word.append(0)\n", + "for i in range(0,7):\n", + " print word[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F R I E N D S\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page Number: 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to sort the given strings alphabetically\n", + "\n", + "b = raw_input(\"Enter the text to sort : \")\n", + "print \"Sorted Text are : \",''.join(sorted(b, key=lambda v: (v.upper(), v[0].islower())))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the text to sort : VRBPublishers\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorted Text are : BbehilPRrssuV\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 5, Page Number: 5.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using two dimension array\n", + "\n", + "#Local definition \n", + "stud = [[0 for i in xrange(0,4)] for i in xrange(0,4)] #stud is a array name with 4 rows and 2 columns\n", + "\n", + "for i in range(0,4):\n", + " print \"Enter the %d Student roll no and Mark:\" %i\n", + " stud[i][1], stud[i][2] = input()\n", + " \n", + "for i in range(0,4):\n", + " print \"%d Student roll no %d mark %d\" %(i, stud[i][1], stud[i][2])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 0 Student roll no and Mark:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3977,80\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 1 Student roll no and Mark:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "17776,95\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 2 Student roll no and Mark:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6682,82\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the 3 Student roll no and Mark:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6683,85\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0 Student roll no 3977 mark 80\n", + "1 Student roll no 17776 mark 95\n", + "2 Student roll no 6682 mark 82\n", + "3 Student roll no 6683 mark 85\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 6, Page Number: 5.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to illustrate Matrix Multiplication\n", + "\n", + "a = [[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", + "b = [[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", + "c = [[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", + "\n", + "while True:\n", + " r1, c1 = input(\"Enter the size of the matrix A....\")\n", + " r2, c2 = input(\"Enter the size of the matrix B....\")\n", + " if c1 == r2:\n", + " print \"Enter matrix A elements...\"\n", + " for i in range (0,r1):\n", + " for j in range (0,c1):\n", + " a[i][j] = input()\n", + " \n", + " print \"Enter matrix B elements...\"\n", + " for i in range (0,r2):\n", + " for j in range (0,c2):\n", + " b[i][j] = input()\n", + " \n", + " for i in range(0,r1):\n", + " for j in range(0,c1):\n", + " c[i][j] = 0\n", + " for k in range(0,c1):\n", + " c[i][j] += a[i][k] * b[k][j]\n", + " \n", + " print \"The resultant matrix is....\"\n", + " for i in range(0,r1):\n", + " for j in range(0,c1):\n", + " print \"%d\\t\" %c[i][j],\n", + " print \"\\n\"\n", + " break \n", + " else:\n", + " print \"Multiplication is not possible\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the matrix A....3,3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the matrix B....2,2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication is not possible\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the matrix A....3,3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the matrix B....3,3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter matrix A elements...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter matrix B elements...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant matrix is....\n", + "18\t18\t18\t\n", + "\n", + "18\t18\t18\t\n", + "\n", + "18\t18\t18\t\n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 7, Page Number: 5.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print two dimensional array by row by row\n", + "\n", + "arr = [[0 for i in xrange(0,4)] for i in xrange(0,4)]\n", + "\n", + "for i in range(0,3):\n", + " for j in range(0,4):\n", + " arr[i][j] = (i * 4) + j + 1\n", + " \n", + " \n", + "print \"Printing array contents :\"\n", + "for i in range(0,3):\n", + " for j in range(0,4):\n", + " print \"%3d\" %arr[i][j],\n", + " print \"\\n\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Printing array contents :\n", + " 1 2 3 4 \n", + "\n", + " 5 6 7 8 \n", + "\n", + " 9 10 11 12 \n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 8, Page Number: 5.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to add and display the results of 5 nos\n", + "\n", + "#Function definition \n", + "def add(x,ar):\n", + " sum = 0\n", + " for i in range(0,5):\n", + " sum += ar[i]\n", + " print \"Sum is ... %d\" %sum \n", + " \n", + "a = []\n", + "n = 5\n", + "for i in range(0,5):\n", + " a.append(0)\n", + "print \"Enter 5 values\"\n", + "for i in range(0,5):\n", + " a[i] = input()\n", + "add(n,a) #function call" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter 5 values\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum is ... 150\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 9, Page Number: 5.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for capture and store n values into array and print them\n", + "\n", + "#Function definition \n", + "def arr(a = []):\n", + " for i in range(0,5):\n", + " print \"Value in array %d\\n\" %a[i]\n", + " \n", + "a = []\n", + "for i in range(0,5):\n", + " a.append(0)\n", + "for i in range(0,5):\n", + " a[i] = i\n", + "arr(a) #Function call" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value in array 0\n", + "\n", + "Value in array 1\n", + "\n", + "Value in array 2\n", + "\n", + "Value in array 3\n", + "\n", + "Value in array 4\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 10, Page Number: 5.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print the character string from the array\n", + "\n", + "name = \"LAK\"\n", + "print \"%s\" %name" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LAK\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 11, Page Number: 5.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for explaining the working of 4 dimensional array\n", + "\n", + "#Local definition\n", + "array_4d = [[[[0 for i in xrange(0,3)] for i in xrange(0,3)]for i in xrange(0,3)] for i in xrange(0,3)]\n", + "\n", + "#looping statements \n", + "for a in range(0,3):\n", + " for b in range(0,3):\n", + " for c in range(0,3):\n", + " for d in range(0,3):\n", + " array_4d[a][b][c][d] = a + b + c + d\n", + "#Result \n", + "for a in range(0,3) :\n", + " print \"\\n\"\n", + " for b in range(0,3):\n", + " for c in range(0,3):\n", + " for d in range(0,3):\n", + " print \"%3d\" %array_4d[a][b][c][d],\n", + " print \"\\n\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + " 0 1 2 \n", + "\n", + " 1 2 3 \n", + "\n", + " 2 3 4 \n", + "\n", + " 1 2 3 \n", + "\n", + " 2 3 4 \n", + "\n", + " 3 4 5 \n", + "\n", + " 2 3 4 \n", + "\n", + " 3 4 5 \n", + "\n", + " 4 5 6 \n", + "\n", + "\n", + "\n", + " 1 2 3 \n", + "\n", + " 2 3 4 \n", + "\n", + " 3 4 5 \n", + "\n", + " 2 3 4 \n", + "\n", + " 3 4 5 \n", + "\n", + " 4 5 6 \n", + "\n", + " 3 4 5 \n", + "\n", + " 4 5 6 \n", + "\n", + " 5 6 7 \n", + "\n", + "\n", + "\n", + " 2 3 4 \n", + "\n", + " 3 4 5 \n", + "\n", + " 4 5 6 \n", + "\n", + " 3 4 5 \n", + "\n", + " 4 5 6 \n", + "\n", + " 5 6 7 \n", + "\n", + " 4 5 6 \n", + "\n", + " 5 6 7 \n", + "\n", + " 6 7 8 \n", + "\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter06.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter06.ipynb new file mode 100755 index 00000000..09f324b0 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter06.ipynb @@ -0,0 +1,1424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d7231c68ebf3352357e97f096d7bb05469f2e0aae52fa150a1a57a7e75ef01fb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 06 : Handling Of Character Strings" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page Number: 5.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for reading a line of text\n", + "\n", + "n = 0\n", + "print \"Enter text press RETRUN to end\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter text press RETRUN to end\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page Number: 5.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#String function\n", + "\n", + "s1= \"Hello\"\n", + "s2='H''e''l''l''o'\n", + "\n", + "print s1\n", + "print s2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hello\n", + "Hello\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page Number: 5.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using strlen() function\n", + "\n", + "name = \"MUNI\"\n", + "len1 = len(name)\n", + "len2 = len(\"LAK\")\n", + "print \"String length of %s is %d\" %(name,len1)\n", + "print \"String length of %s is %d\" %(\"LAK\",len2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String length of MUNI is 4\n", + "String length of LAK is 3\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page Number: 5.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using strcpy() function\n", + "def strcpy(cstring1):\n", + " import copy\n", + " cstring2=copy.copy(cstring1)\n", + " return cstring2 \n", + "\n", + "source = \"MUNI\"\n", + "target = strcpy(source)\n", + "print \"Source string is %s\" %source\n", + "print \"Target string is %s\" %target" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source string is MUNI\n", + "Target string is MUNI\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 5, Page Number:5.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Strcat function\n", + "\n", + "str1=\"MUNI\"\n", + "str2=\"LAK\"\n", + "print str1+str2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MUNILAK\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 6, Page Number: 5.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using strcat() function\n", + "def strcat(cstring1, cstring2):\n", + " cstring3 = cstring1 + cstring2\n", + " return cstring3\n", + "\n", + "source = \"Ramesh\"\n", + "target = \"Babu\"\n", + "source = strcat(source,target)\n", + "print \"Source string is %s\" %source\n", + "print \"Target string is %s\" %target" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source string is RameshBabu\n", + "Target string is Babu\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 7, Page Number: 5.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using strcmp() function\n", + "\n", + "name = \"Kalai\"\n", + "name1 = \"Malai\"\n", + "if name ==\"Kalai\":\n", + " print \"0\",\n", + "if name1!=name:\n", + " print \"1\",\n", + "if name != \"Kalai mani\":\n", + " print \"6\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0 1 6\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 8, Page Number: 5.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using strrev() function\n", + "def strrev(cstring1):\n", + " cstring2 = ' '\n", + " for i in range(len(cstring1)-1,-1,-1):\n", + " cstring2 = cstring2 + cstring1[i]\n", + " return cstring2\n", + "\n", + "y = raw_input(\"Enter the string \")\n", + "print \"The string reversed is : %s\" %strrev(y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the string book\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The string reversed is : koob\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 9, Page Number: 5.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using enumerated data type\n", + "def enum(*sequential, **named):\n", + " enums = dict(zip(sequential, range(len(sequential))), **named)\n", + " return type('Enum', (), enums)\n", + "\n", + "week = enum(' ', 'sun','Mon','Tue','Wed','Thr','Fri','Sat')\n", + "print \"Mon = %d\" %week.Mon\n", + "print \"Tue = %d\" %week.Tue\n", + "print \"Wed= %d\" %week.Wed\n", + "print \"Sat = %d\" %week.Sat" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mon = 2\n", + "Tue = 3\n", + "Wed= 4\n", + "Sat = 7\n" + ] + } + ], + "prompt_number": 125 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 10, Page Number: 5.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to identify whether the entered character is letter, digit or other symbols\n", + "def enum(*sequential, **named):\n", + " enums = dict(zip(sequential, range(len(sequential))), **named)\n", + " return type('Enum', (), enums)\n", + "\n", + "ctype = enum(' ', 'Letter', 'Digit', 'Other')\n", + "ch = raw_input(\"Enter a any character.\")\n", + "a = ch.isalpha()\n", + "if a != False:\n", + " print \"%c is %d type of symbol.\" %(ch,ctype.Letter)\n", + "else:\n", + " a = ch.isdigit()\n", + " if a != False:\n", + " print \"%c is %d type of symbol.\" %(ch,ctype.Digit)\n", + " else:\n", + " print \"%c is %d type of symbol.\" %(ch,ctype.Other)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a any character.%\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% is 3 type of symbol.\n" + ] + } + ], + "prompt_number": 143 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 1, Page Number: 5.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for sorting an array of elements\n", + "\n", + "a = []\n", + "n = input(\"Enter Upper limit....\")\n", + "for i in range(0,n):\n", + " a.append(0)\n", + "print \"Enter elements....\" \n", + "for i in range(0,n):\n", + " a[i]=input()\n", + "for i in range(0,n):\n", + " for j in range(i,n):\n", + " if a[i]>a[j]:\n", + " t = a[i]\n", + " a[i] = a[j]\n", + " a[j] = t\n", + "print \"Numbers in Ascending order\"\n", + "for i in range(0,n):\n", + " print \"%d\" %a[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Upper limit....6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter elements....\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numbers in Ascending order\n", + "1 2 3 4 5 6\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 2, Page Number: 5.31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to fing Median for a given 'n' numbers\n", + "\n", + "arr = []\n", + "n = input(\"Enter Upper limit....\")\n", + "for i in range(0,n):\n", + " arr.append(0)\n", + "print \"Enter..%d..values\" %n \n", + "for i in range(0,n):\n", + " arr[i]=input()\n", + "for i in range(1,n):\n", + " for j in range(1,n-i):\n", + " if arr[j] <= arr[j+1]:\n", + " t = arr[j]\n", + " arr[j] = arr[j+1]\n", + " arr[j+1] = t\n", + " else:\n", + " continue\n", + "if n%2 == 0:\n", + " median = (arr[n/2]+arr[n/2+1])/2.0\n", + "else:\n", + " median = arr[n/2+1]\n", + "print \"Median is....%.f\" %median \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Upper limit....3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter..3..values\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Median is....20\n" + ] + } + ], + "prompt_number": 162 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 3, Page Number: 5.32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to find standard deviation for the given data\n", + "import math\n", + "\n", + "val = []\n", + "sum = ssqr = n = 0\n", + "for i in range(0,100):\n", + " val.append(0)\n", + "print \"Enter Values -999 to stop....\"\n", + "for i in range(0,100):\n", + " val[i] = float(raw_input())\n", + " if val[i] == -999:\n", + " break\n", + " sum = float(sum) + val[i] \n", + " n = n + 1\n", + "mean = float(sum) / float(n) \n", + "for i in range(0,n):\n", + " dev = val[i] - mean\n", + " ssqr = float(ssqr) + float(dev)*float(dev)\n", + "var = ssqr / float(n) \n", + "sd = math.sqrt(float(var))\n", + "print \"Number of Items.....%d\" %n\n", + "print \"Mean is .....%f\" %mean\n", + "print \"Standard Deviation is .....%f\" %sd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Values -999 to stop....\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "50\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "-999\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of Items.....5\n", + "Mean is .....30.000000\n", + "Standard Deviation is .....14.142136\n" + ] + } + ], + "prompt_number": 169 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 4, Page Number: 5.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Bubble sort using function\n", + "\n", + "def bubble(n, x = []):\n", + " for item in range(0,n-1):\n", + " for i in range(item+1,n):\n", + " if x[i]=0):\n", + " a[k+1] = a[k]\n", + " k = k-1\n", + " a[k+1]=x\n", + " print \"Array after inserting %d:\" %x\n", + " for j in range(0,i):\n", + " print \"%5d\" %a[j]\n", + " x = input(\"Elements to be inserted(-99 to stop)?\")\n", + " i = i+1\n", + "print \"The final sorted array\"\n", + "for j in range(0,i):\n", + " print \"%5d\" %a[j]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elements to be inserted 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Array after inserting 5:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elements to be inserted(-99 to stop)?3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Array after inserting 3:\n", + " 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elements to be inserted(-99 to stop)?4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Array after inserting 4:\n", + " 3\n", + " 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elements to be inserted(-99 to stop)?2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Array after inserting 2:\n", + " 2\n", + " 3\n", + " 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elements to be inserted(-99 to stop)?1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Array after inserting 1:\n", + " 1\n", + " 2\n", + " 3\n", + " 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elements to be inserted(-99 to stop)?-99\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final sorted array\n", + " 1 2 3 4 5\n" + ] + } + ], + "prompt_number": 186 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 6, Page Number: 5.36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to sort an element using selection sort\n", + "\n", + "a = []\n", + "for i in range(0,100):\n", + " a.append(0)\n", + "n = input(\"Enter Number of elements in array...\")\n", + "print \"Enter Elements...\",n\n", + "for i in range(0,n):\n", + " a[i] = input()\n", + "for i in range(0,n-1):\n", + " m = i\n", + " for j in range(i+1,n):\n", + " if a[m]>a[j]:\n", + " m = j\n", + " if i != m:\n", + " k = a[i]\n", + " a[i] = a[m]\n", + " a[m] = k\n", + " \n", + "print \"Sorted Array (Selection Sort) is...\\n\"\n", + "for i in range(0,n):\n", + " print \"%5d\" %a[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Number of elements in array...9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Elements... 9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "326\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "85\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "42\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "156\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "845\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "66\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "55\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorted Array (Selection Sort) is...\n", + "\n", + " 1 42 55 56 66 85 156 326 845\n" + ] + } + ], + "prompt_number": 190 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 7, Page Number: 5.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Quick sort\n", + "\n", + "def quickSort(array):\n", + " quickSortHelper(array,0,len(array)-1)\n", + "\n", + "def quickSortHelper(array,right,left):\n", + " if right= pivotvalue and \\\n", + " end >= begin:\n", + " end = end -1\n", + "\n", + " if end < begin:\n", + " done = True\n", + " else:\n", + " temp = array[begin]\n", + " alist[begin] = array[end]\n", + " alist[end] = temp\n", + "\n", + " temp = array[right]\n", + " array[right] = array[end]\n", + " array[end] = temp\n", + " return end\n", + "\n", + "array = []\n", + "n=input(\"Enter the values in array: \")\n", + "for i in range (0,n):\n", + " array.append(0)\n", + "for i in range (0,n):\n", + " array[i]=input()\n", + " \n", + "quickSort(array)\n", + "print \"Quick Sorted Array is\", array" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the values in array: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quick Sorted Array is [1, 2, 3, 4, 5]\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 8, Page Number: 5.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#program to find the specified elements from the array using linear searching\n", + "\n", + "a = [100]\n", + "for i in range(0,100):\n", + " a.append(0)\n", + "c = 'y'\n", + "while (c=='y')or(c=='Y'):\n", + " no = input(\"Enter the size of sorting\")\n", + " print \"Enter the elements of the array\"\n", + " for i in range(0,no):\n", + " a[i]=input()\n", + " k = input(\"Enter the element to be searched\") \n", + " for i in range(0,no):\n", + " if k == a[i]:\n", + " print \"Element %d is in the position %d\" %(k,i+1)\n", + " f=2\n", + " break\n", + " if f==1:\n", + " print \"The entered element is not in the array\"\n", + " ch = raw_input(\"If you want to continue y/n \")\n", + " c = ch\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of sorting5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of the array\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the element to be searched4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element 4 is in the position 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "If you want to continue y/n n\n" + ] + } + ], + "prompt_number": 206 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 9, Page Number: 5.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to find the specified element from array using Binary search\n", + "\n", + "a = [100]\n", + "for i in range(0,100):\n", + " a.append(0)\n", + "no = input(\"Enter the size of sorting\")\n", + "print \"Enter the elements in ascending order\"\n", + "for i in range(0,no):\n", + " a[i]=input() \n", + "t = input(\"Enter the element to be searched\") \n", + "l=0\n", + "h=no-1\n", + "while l <= h:\n", + " m = (l+h)/2\n", + " if ta[m]:\n", + " l = m+1\n", + " else:\n", + " print \"Entered %d is in position %d\" %(t,m+1)\n", + " f=2\n", + " break\n", + "if f==1:\n", + " print \"Entered element is not in the array\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of sorting5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements in ascending order\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the element to be searched3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entered 3 is in position 2\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter07.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter07.ipynb new file mode 100755 index 00000000..ee25427a --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter07.ipynb @@ -0,0 +1,254 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:59d989e4d68b99137fb5255fe771e42a62c5ce35100304584930ea0c003ea2ac" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 07 : User Defined Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, page no.5.49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate Local and Global Declaration \n", + "\n", + "#variable declaration globally\n", + "i=0 \n", + "print \"Value of i in main\", i\n", + "\n", + " #define function\n", + "def f1(): \n", + " k=0\n", + " i=50\n", + " print \"Value of i after function call\",i\n", + " \n", + "#Function Call\n", + "f1() \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of i in main 0\n", + "Value of i after function call 50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, page no: 5.50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate usage of local and global variable\n", + "\n", + "for i in range(0,3):\n", + " print \"Value of i is:\", i\n", + " \n", + "i=590\n", + "print \"The Value of i is:\", i \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of i is: 0\n", + "Value of i is: 1\n", + "Value of i is: 2\n", + "The Value of i is: 590\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page no.5.52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to call function without parameters\n", + "def message():\n", + " print \"Main Message\"\n", + " \n", + "print \"Function Message\"\n", + "\n", + "message()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Function Message\n", + "Main Message\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page No.5.52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to call function with parameter\n", + "\n", + "#Defining function\n", + "def add(x,y):\n", + " z=0\n", + " z=x+y\n", + " return z\n", + "\n", + "k=add(10,20)\n", + "\n", + "#Result\n", + "print \"The Value of k is \", k" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of k is 30\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 5, page no.5.53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to write prototype of the function\n", + "\n", + "k=0\n", + "\n", + "#Defining in function\n", + "def f1(k):\n", + " k=k+100\n", + " return k\n", + "\n", + "#Result\n", + "print \"The value of i before call: \", k\n", + "\n", + "print \"The Value of i after call: \",(f1(k))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of i before call: 0\n", + "The Value of i after call: 100\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 6, page no. 5.54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to write prototype definition in main function\n", + "\n", + "def fun(k):\n", + " k=k+10\n", + " return k\n", + "\n", + "i=0\n", + "\n", + "#Result\n", + "print \"The i value before call %d\\n\"%(i)\n", + "print \"The i value after call %d\\n\"%fun(i)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The i value before call 0\n", + "\n", + "The i value after call 10\n", + "\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter08.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter08.ipynb new file mode 100755 index 00000000..e40c1b43 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter08.ipynb @@ -0,0 +1,420 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5d85b398d61f498d1deba465b9747c5d15996be1754212b25012ca792b193a16" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 08 : Function Prototypes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Function with no arguments and no return values" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.: 5.55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to addition of two numbers\n", + "\n", + "def add():\n", + " a,b=input(\"Enter two numbers.. \")\n", + " c=a+b\n", + " print \"Sum is ... %d\"%(c)\n", + " \n", + "add() \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two numbers.. 10,20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum is ... 30\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.:5.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print addition, subtraction and multiplication values\n", + "\n", + "def add():\n", + " a=10\n", + " b=5\n", + " print \"The Addition of given value: \",a+b\n", + " \n", + "def sub():\n", + " a=10\n", + " b=5\n", + " print \"The Subtraction of given value:\",a-b\n", + " \n", + "def mul():\n", + " a=10\n", + " b=5\n", + " print \"The Multiplication of given value:\",a*b\n", + " \n", + " \n", + "add()\n", + "sub()\n", + "mul()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Addition of given value: 15\n", + "The Subtraction of given value: 5\n", + "The Multiplication of given value: 50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Function with arguments and no return values" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, page No. 5.57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Program for addition of two numbers\n", + "\n", + "def add(x,y):\n", + " z= x+y\n", + " print \"Sum is:\", z\n", + "\n", + "#Main Function\n", + "a, b = input(\"Enter two Values: \")\n", + " \n", + "add(a,b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two Values: 10,20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum is: 30\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example: 2, page no. 5.58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def date(x,y,z):\n", + " print \"Employee Joined date is:%d/%d/%d\" %(x,y,z)\n", + " \n", + "print \"Enter the employee joining date.\"\n", + "\n", + "dd,mm,yy=eval(raw_input(\"Enter date, month, year: \"))\n", + "\n", + "date(dd,mm,yy)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the employee joining date.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter date, month, year: 11,12,1981\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Employee Joined date is:11/12/1981\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Function with arguments and with return value" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, page no.5.59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for addition of two numbers\n", + "\n", + "def add(x,y):\n", + " z=0\n", + " z=x+y\n", + " return z\n", + "\n", + "#Main Function\n", + "a,b=input(\"Enter the a and b value:\")\n", + "c=add(a,b)\n", + "print \"Result is:\",c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the a and b value:10,20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Result is: 30\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.:5.60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to send and receives the values from function\n", + "\n", + "def mul(m,n):\n", + " return (m*n)\n", + "\n", + "m=n=sum=0\n", + "m,n=input(\"Enter two values:\")\n", + "sum=mul(m,n)\n", + "\n", + "print \"Multiplication of the entered Values:\",sum" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two values:30,4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication of the entered Values: 120\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Function with no arguments and with return value" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, PageNo.:5.61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for addition of two numbers\n", + "\n", + "def add():\n", + " a=b=c=0\n", + " a,b=input(\"Enter the Values of a and b:\")\n", + " c=a+b\n", + " return(c)\n", + "\n", + "c=add()\n", + "print \"The Output of given Values:\",c\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Values of a and b:10,20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Output of given Values: 30\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No. 5.62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to multiply three numbers using function\n", + "\n", + "\n", + "def mul():\n", + " a,b,c=input(\"Enter the three values for Multiplication: \")\n", + " i=a*b*c\n", + " return(i)\n", + "\n", + "s=mul()\n", + "print \"Multiplication of three numbers is= \",s\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the three values for Multiplication: 4,8,2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication of three numbers is= 64\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter09.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter09.ipynb new file mode 100755 index 00000000..11735b92 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter09.ipynb @@ -0,0 +1,109 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1a0147da7a94fc5ebe7c66bbf21a563cb0bee33c1452a7bcfcbc21f5395d7aab" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 09 : Parameter Passing Methods" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.: 5.63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Call By Value\n", + "\n", + "def cube(x):\n", + " x=x*x*x\n", + " return(x)\n", + "\n", + "n=5\n", + "print \"Cube of %d is\"%n,cube(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cube of 5 is 125\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.:5.64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Call by reference\n", + "\n", + "def interchange(a,b):\n", + " t=0\n", + " t=a\n", + " a=b\n", + " b=t\n", + " return b,a\n", + "\n", + " \n", + "i=5\n", + "j=10\n", + "print \"i and j values before interchange:\", i, j\n", + "\n", + "i=10\n", + "j=5\n", + "interchange(i,j)\n", + "\n", + "#Result\n", + "print \"i and j values after interchange:\",i,j\n", + "\n", + "print \"i and j avalues after interchange in the function : %d %d \\n\"%interchange(i,j)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i and j values before interchange: 5 10\n", + "i and j values after interchange: 10 5\n", + "i and j avalues after interchange in the function : 10 5 \n", + "\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter10.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter10.ipynb new file mode 100755 index 00000000..1a017d08 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter10.ipynb @@ -0,0 +1,372 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ea85b38c0942e3b3d3a1243525badd8ffa28ac492392c6aef6c8ea5823294150" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Recursion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.: 5.67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Factorial of an integer number.\n", + "\n", + "def rec(x):\n", + " f=0\n", + " if x==1:\n", + " return (1)\n", + " else:\n", + " f=x*rec(x-1)\n", + " return(f)\n", + "\n", + "a=input(\"Enter the number:\")\n", + "print \"The Factorial value of %d:\"%a,rec(a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number:5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Factorial value of 5: 120\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.:5.67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to read characters and print reversely using recursion.\n", + "\n", + "def reverse(c):\n", + " if len(c)<=0:\n", + " return c\n", + " return reverse(c[1:])+c[0]\n", + "\n", + "c=raw_input(\"Enter the Line of Text...\")\n", + "print reverse(c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Line of Text...munilak\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kalinum\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No.:5.68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#concept of recursion\n", + "\n", + "def add(pk, pm):\n", + " if pm==0:\n", + " return pk\n", + " else:\n", + " return(1+add(pk,pm-1))\n", + " \n", + " \n", + "k=70\n", + "m=20\n", + "\n", + "i=add(k,m)\n", + "\n", + "print \"The Value of addition is %d\"%i\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of addition is 90\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page No:5.70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Tower of honoi\n", + "n=int(raw_input(\"How many Disks ...\\n\"))\n", + "\n", + "def honoi(n,fro,to,t):\n", + " if(n>0):\n", + " honoi(n-1,fro,t,to)\n", + " print \"Move disk %d from %c to %c\\n\"%(n,fro,to)\n", + " honoi(n-1,t,to,fro)\n", + " \n", + "fro='L'\n", + "to='R'\n", + "t='C'\n", + " \n", + "honoi(n,fro,to,t)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many Disks ...\n", + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Move disk 1 from L to R\n", + "\n", + "Move disk 2 from L to C\n", + "\n", + "Move disk 1 from R to C\n", + "\n", + "Move disk 3 from L to R\n", + "\n", + "Move disk 1 from C to L\n", + "\n", + "Move disk 2 from C to R\n", + "\n", + "Move disk 1 from L to R\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 1, Page No. : 5.76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#user defined function that computes 'x' raised to the power 'y'\n", + "\n", + "import math \n", + "\n", + "x,y=input(\"Enter the Values of X and Y \")\n", + "\n", + "print \"%d to the power of %d is ... \"%(x,y),math.pow(x,y)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Values of X and Y 10,2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10 to the power of 2 is ... 100.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 2, page No.5.76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#nesting of function\n", + "\n", + "def ratio(x,y,z):\n", + " \n", + " def diff(m,n):\n", + " if(m!=n):\n", + " return(1)\n", + " else:\n", + " return(0)\n", + " \n", + " diff(y,z)\n", + " if diff(y,z):\n", + " return(x/(y-z))\n", + " else:\n", + " return(0)\n", + " \n", + " \n", + "x,y,z=input(\"Enter the values of X,Y,Z: \")\n", + "\n", + " \n", + "print \"Ratio is..%f\\n\"%ratio(x,y,z)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the values of X,Y,Z: 10,10,5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio is..2.000000\n", + "\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 3, Page No. 5.78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Demonstration of Global Variable\n", + "\n", + "a=39 #Global Variable\n", + "print \"A... %d\\n\"%a\n", + "\n", + "def f1():\n", + " global a\n", + " a=a+10\n", + " return a\n", + "\n", + "def f2():\n", + " global a\n", + " a=a+20\n", + " return a\n", + "\n", + "def f3():\n", + " global a\n", + " a=a+30\n", + " return a\n", + "\n", + "\n", + "\n", + "print \"A...%d\\n\"%f1()\n", + "print \"A...%d\\n\"%f2()\n", + "print \"A...%d\\n\"%f3()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A... 39\n", + "\n", + "A...49\n", + "\n", + "A...69\n", + "\n", + "A...99\n", + "\n" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter11.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter11.ipynb new file mode 100755 index 00000000..0e00f235 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter11.ipynb @@ -0,0 +1,304 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:03a9be4b5720a51a42be3ae01bfa08ccecef76e9a5e17f613e76c0afaff965de" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Structures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.: 5.81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Print the student number, name and marks through accessing structure elements.\n", + "\n", + "#Defining Structure in class\n", + "class std:\n", + " no=0\n", + " name = ''\n", + " m1 = m2 = m3 =0\n", + "\n", + "#assigning variable to structure class \n", + "s=std()\n", + "\n", + "#UserInput\n", + "s.no=raw_input(\"Give Student Number: \")\n", + "s.name=raw_input(\"Enter the Student Name: \")\n", + "s.m1=input(\"Enter Student Mark1: \")\n", + "s.m2=input(\"Enter Student Mark2: \")\n", + "s.m3=input(\"Enter Student Mark3: \")\n", + "\n", + "total=avg=0.0\n", + "\n", + "total = (s.m1 + s.m2 + s.m3)\n", + "avg='%.2f' %(total / 3)\n", + "\n", + "#Result\n", + "print \"\\nThe Output is.... \\n\",s.no,s.name,total,avg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give Student Number: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student Name: raja\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark1: 99\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark2: 97\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark3: 95\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The Output is.... \n", + "1 raja 291 97.00\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No. 5.83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#print a value from Structure.\n", + "\n", + "class struct:\n", + " a=b=0\n", + " \n", + "x=struct()\n", + "y=struct()\n", + "\n", + "x.a=29\n", + "y=x\n", + "\n", + "#Result\n", + "print \"The Value of a %d\"%y.a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of a 29\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No.:5.84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program for User defined data type \n", + "\n", + "#There is no preprocessor directive in python\n", + "D = 7\n", + "\n", + "#No typedef function in python\n", + "wk = int(raw_input(\"Enter Weeks : \"))\n", + "\n", + "#Result\n", + "print \"\\nNumber of Days = %d\"%(wk*D)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Weeks : 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Number of Days = 28\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page.No.:5.85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to create user defined data type from structure\n", + "\n", + "\n", + "class struct:\n", + " name=''\n", + " sex=''\n", + " age=0\n", + " \n", + "\n", + "\n", + "candidate = [struct() for i in range(0,2)]\n", + "\n", + "for a in range(0,2):\n", + " candidate[a].name= raw_input(\"Name of the Employee: \")\n", + " candidate[a].sex= raw_input(\"Sex: \")\n", + " candidate[a].age= input(\"Age: \")\n", + "\n", + "#Result\n", + "print \"\\n Name\\t Sex\\t Age\\n\"\n", + "\n", + "for a in range(0,2):\n", + " print \" %s\\t\"%(candidate[a].name),\" %s\\t\"%(candidate[a].sex),\" %d\\n\"%(candidate[a].age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name of the Employee: venkat\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sex: m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name of the Employee: geetha\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sex: f\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Name\t Sex\t Age\n", + "\n", + " venkat\t m\t 25\n", + "\n", + " geetha\t f\t 23\n", + "\n" + ] + } + ], + "prompt_number": 68 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter12.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter12.ipynb new file mode 100755 index 00000000..54918fbb --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter12.ipynb @@ -0,0 +1,829 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:13c473411b35212c9727620c7673dc52636d4bf1a83b0d4eeb082d160a75324d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Union" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.5.87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#program using union.\n", + "\n", + "class union_name:\n", + " a=0\n", + " b=[0,1]\n", + " \n", + "c=union_name()\n", + "c.a=256\n", + "\n", + "print \"c.a value is %d\\n \"%c.a\n", + "print \"c.b[0] value is %d\\n\"%c.b[0]\n", + "print \"c.b[1] value is %d\\n\"%c.b[1]\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c.a value is 256\n", + " \n", + "c.b[0] value is 0\n", + "\n", + "c.b[1] value is 1\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.:5.87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#program to find size of union and number of bytes\n", + "\n", + "import sys\n", + "\n", + "class union_result:\n", + " marks=0\n", + " grade=''\n", + " \n", + " \n", + "class struct_res:\n", + " name=[15]\n", + " age=0\n", + " sex=''\n", + " address=''\n", + " pincode=0\n", + " perf=union_result()\n", + " \n", + "data=struct_res() \n", + "\n", + "#Result\n", + "print \"Size of Union: %d\\n\"%sys.getsizeof(data.perf)\n", + "print \"Size of Structure: %d\\n\"%sys.getsizeof(data)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Size of Union: 32\n", + "\n", + "Size of Structure: 32\n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Pointer to Unions cannot convert as no pointer in python. Page no. 5.88" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No.:5.89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program that includes of initial values to structure variable\n", + "\n", + "import sys\n", + "\n", + "\n", + "class union_id:\n", + " color='20'\n", + " size=0\n", + " \n", + "\n", + "class struct_clothes:\n", + " manufacturer='30'\n", + " cost=0.0\n", + " description=union_id()\n", + " \n", + " \n", + "shirt=struct_clothes()\n", + "shirt.manufacturer='Indian'\n", + "shirt.cost=35.00\n", + "shirt.description.color='Black'\n", + "\n", + "print \"%d\\n\"%(sys.getsizeof(union_id))\n", + "\n", + "print \"%s %f \"%(shirt.manufacturer,shirt.cost),\"%s %d\\n \"%(shirt.description.color, shirt.description.size)\n", + " \n", + "\n", + "shirt.description.size =12\n", + "\n", + "\n", + "print \"%s %f \"%(shirt.manufacturer, shirt.cost),\"%s %d\\n \"%(shirt.description.color, shirt.description.size)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "48\n", + "\n", + "Indian 35.000000 Black 0\n", + " \n", + "Indian 35.000000 Black 12\n", + " \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page no.: 5.92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to read and write employee and their date of joining using nested structure. \n", + "\n", + "\n", + "class date:\n", + " day=0\n", + " month=\"\"\n", + " year=0\n", + " \n", + "class employee:\n", + " code=0\n", + " name=''\n", + " salary=0.0\n", + " doj=date()\n", + " \n", + " \n", + "emp1=employee()\n", + "\n", + "emp1.code=input(\"Enter Employee Code: \")\n", + "emp1.name=raw_input(\"Enter the Employee Name: \")\n", + "emp1.salary=input(\"Enter the Employee Salary: \")\n", + "\n", + "print \"\\nEnter Date of joining in order\\n\"\n", + "emp1.doj.day=input(\"Enter day: \")\n", + "emp1.doj.month=raw_input(\"Enter month: \")\n", + "emp1.doj.year=input(\"Enter year: \")\n", + "\n", + "print \"\\nThe Employee Code is: %d\"%emp1.code\n", + "print \"\\nThe Employee Name is: %s\"%emp1.name\n", + "print \"\\nThe Employee Name is: %f\"%emp1.salary\n", + "print \"\\nThe Employee DOJ is: %d %s %d\"%(emp1.doj.day,emp1.doj.month,emp1.doj.year)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Employee Code: 200\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Employee Name: VIJI\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Employee Salary: 2000.00\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Date of joining in order\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day: 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter month: December\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter year: 2004\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The Employee Code is: 200\n", + "\n", + "The Employee Name is: VIJI\n", + "\n", + "The Employee Name is: 2000.000000\n", + "\n", + "The Employee DOJ is: 12 December 2004\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 5, Page No. 5.93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to store 3 records in one structure\n", + "\n", + "\n", + "class book:\n", + " name=''\n", + " price=0\n", + " pages=0\n", + " \n", + " \n", + "b=[book() for a in range(0,3)]\n", + "\n", + "for i in range(0,3):\n", + " b[i].name=raw_input(\"Enter the Book Name: \")\n", + " b[i].price=input(\"Enter the Book Price: \")\n", + " b[i].pages=input(\"Enter the Book Pages: \")\n", + " \n", + "print '\\n' \n", + "for i in range(0,3):\n", + " print \"%s\\t\"%(b[i].name),\"%d\\t\"%(b[i].price),\"%d\\n\"%(b[i].pages)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Name: English\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Price: 165\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Pages: 200\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Name: Maths\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Price: 300\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Pages: 450\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Name: Physics\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Price: 250\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book Pages: 370\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "English\t165\t200\n", + "\n", + "Maths\t300\t450\n", + "\n", + "Physics\t250\t370\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 6, Page No. 5.95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to copy of entire structure to a function\n", + "\n", + "class std:\n", + " no=0\n", + " avg=0.0\n", + "\n", + "a=std()\n", + "\n", + "a.no=15\n", + "a.avg=90.75\n", + "\n", + "def func(Struct_p):\n", + " print \"Number is.... %d\\n\"%a.no\n", + " print \"Average is... %f\"%a.avg\n", + " \n", + "func(a)\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number is.... 15\n", + "\n", + "Average is... 90.750000\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 7, Page No.:5.97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Programs shows how the structure can be accessed by a pointer variable.\n", + "\n", + "class student:\n", + " roll_no=0\n", + " name=''\n", + " marks=0.0\n", + "stud1=student()\n", + "\n", + "print \"Enter the student details: \\n\"\n", + "stud1.roll_no=input()\n", + "stud1.name=raw_input()\n", + "stud1.marks=input()\n", + "\n", + "print \"\\nDisplay of structure using structure variable\\n\"\n", + "print \"Roll No\\t Name\\t Marks\"\n", + "print \"\\n-------\\t ----- -------\\n\"\n", + "print \"%d\\t %s\\t %f\"%(stud1.roll_no,stud1.name,stud1.marks)\n", + "\n", + "pt=stud1\n", + "\n", + "print \"\\nDisplay of structure using pointer variable\\n\"\n", + "print \"Roll No\\t Name\\t Marks\"\n", + "print \"\\n-------\\t ----- -------\\n\"\n", + "print \"%d\\t %s\\t %f\"%(pt.roll_no,pt.name,pt.marks)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student details: \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "39\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Muni\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "77\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Display of structure using structure variable\n", + "\n", + "Roll No\t Name\t Marks\n", + "\n", + "-------\t ----- -------\n", + "\n", + "39\t Muni\t 77.000000\n", + "\n", + "Display of structure using pointer variable\n", + "\n", + "Roll No\t Name\t Marks\n", + "\n", + "-------\t ----- -------\n", + "\n", + "39\t Muni\t 77.000000\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 1, Page No.:5.98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to transfer a structure to a function by passing the structure address to the function\n", + "\n", + "class struct:\n", + " name=''\n", + " no=0\n", + " age=0\n", + "record=struct()\n", + "std=record\n", + "std.name,std.no,std.age=[\"LAK\",15,25]\n", + "print \"%s\\t%d\\t%d\"%(std.name,std.no,std.age)\n", + "\n", + "def fun(std):\n", + " pt.name=\"Muni\"\n", + " pt.no=16\n", + " pt.age=26\n", + " \n", + "std.name=pt.name\n", + "std.no=pt.no\n", + "std.age=pt.age\n", + "\n", + "print \"%s\\t%d\\t%d\"%(std.name,std.no,std.age)\n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LAK\t15\t25\n", + "Muni\t16\t26\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 2, Page No.:5.100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to pass an array of structure to a function, and return a pointer to a structure.\n", + "import sys\n", + "N=3\n", + "NULL=0\n", + "\n", + "class struct:\n", + " sno=0\n", + " name=''\n", + " age=0\n", + " \n", + "record=struct()\n", + "std=record\n", + "\n", + "print \"Student Number Locater\"\n", + "print \"To Exit the program enter '0' for student number\"\n", + "stdno=input(\"Enter the Student Number: \")\n", + "print \"\\n\"\n", + "if stdno ==15:\n", + "\n", + " std.sno,std.name,std.age=[15,\"MUNI\",28]\n", + " print \"Number .... %d \\n\"%(std.sno)\n", + " print \"Name ...... %s\\n\"%(std.name)\n", + " print \"Age ....... %d\\n\"%(std.age)\n", + "if stdno == 16:\n", + " std.sno,std.name,std.age=[16,\"LAK\",27]\n", + " print \"Number .... %d \\n\"%(std.sno)\n", + " print \"Name ...... %s\\n\"%(std.name)\n", + " print \"Age ....... %d\\n\"%(std.age)\n", + " \n", + "if stdno == 17:\n", + " std.sno,std.name,std.age=[17,\"RAJA\",31]\n", + " print \"Number .... %d \\n\"%(std.sno)\n", + " print \"Name ...... %s\\n\"%(std.name)\n", + " print \"Age ....... %d\\n\"%(std.age)\n", + " \n", + "if stdno==0:\n", + " exit\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Number Locater\n", + "To Exit the program enter '0' for student number\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student Number: 15\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Number .... 15 \n", + "\n", + "Name ...... MUNI\n", + "\n", + "Age ....... 28\n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 3, Page No.: 5.101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print student name and mark using structure\n", + "\n", + "class student:\n", + " name=''\n", + " marks=0.00\n", + " \n", + "s1=''\n", + "f=0.00\n", + "\n", + "student1=student()\n", + "\n", + "student2=student()\n", + "\n", + "\n", + "student1.name=raw_input(\"Enter Name: \")\n", + "f=input(\"Enter Mark: \")\n", + "\n", + "student2.marks=f\n", + "\n", + "print \"\\nName is %s \\n\"%student1.name\n", + "print \"Marks are %f \\n\"%student2.marks\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Venkat\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Mark: 89\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Name is Venkat \n", + "\n", + "Marks are 89.000000 \n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 4, Page No.: 5.102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print marks, grade and their address using union\n", + "\n", + "\n", + "\n", + "class union_marks:\n", + " perc=0.00\n", + " grade=''\n", + " \n", + "student1=union_marks()\n", + "\n", + "student1.perc=98.5\n", + "\n", + "print \"Marks are %f \\t address is %8lu\\n\"%(student1.perc, id(student1.perc))\n", + "\n", + "student1.grade='A'\n", + "\n", + "print \"Grade is %c \\t address is %8lu\\n\"%(student1.grade,id(student1.grade))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks are 98.500000 \t address is 158368916\n", + "\n", + "Grade is A \t address is 3073485064\n", + "\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter13.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter13.ipynb new file mode 100755 index 00000000..b303ee94 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter13.ipynb @@ -0,0 +1,57 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bd4e511a3dbdd189491e3271c86cff9ce5fc919ed7457d400a67c288e55ad433" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page Number: 5.104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print address and value of variable\n", + "#Local definitions\n", + "sno = 39\n", + "\n", + "#Result\n", + "print \"Address of sno = %u\" %id(sno)\n", + "print \"Value of sno = %d\" %sno" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address of sno = 20917296\n", + "Value of sno = 39\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter14.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter14.ipynb new file mode 100755 index 00000000..12a1734c --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter14.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:44f5daf77255992c95710d94f062b0f1f1e981b9e6cce07f23ed45a322c4b130" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Accessing Variable through Pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page Number: 5.107 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to accessing through variable pointer\n", + "\n", + "from ctypes import c_int\n", + "\n", + "#Local definition\n", + "a = 22\n", + "a = c_int(a) # ctype datatype declaration\n", + "\n", + "b = 2.25\n", + "b = c_float(b) # ctype datatype declaration\n", + "\n", + "#Pointer variables\n", + "a_po=pointer(a)\n", + "b_po=pointer(b)\n", + "\n", + "# 'id' is a address of letter and it represents the address of the variable\n", + "a = id(a)\n", + "b = id(b)\n", + "\n", + "\n", + "#Result\n", + "print \"\\nValue of a = %d\" %a_po[0]\n", + "print \"\\nValue of b = %.2f\" %b_po[0]\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Value of a = 22\n", + "\n", + "Value of b = 2.25\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page Number: 5.108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print address and value of variable\n", + "\n", + "from ctypes import c_int\n", + "\n", + "#Local definition\n", + "a = 22\n", + "a = c_int(a) # ctype datatype declaration\n", + "\n", + "#Pointer variables\n", + "a_po=pointer(a)\n", + "\n", + "# 'id' is a address of letter and it represents the address of the variable\n", + "a = id(a)\n", + "\n", + "#Result\n", + "print \"\\n Value of a = %d\" %a_po[0]\n", + "print \"\\n Address of a = %u\" %id(a)\n", + "print \"\\n Value at address %u = %d\" %(id(a),a_po[0])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Value of a = 22\n", + "\n", + " Address of a = 4344066728\n", + "\n", + " Value at address 4344066728 = 22\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page Number: 5.108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Program to print value and address of variable\n", + "\n", + "from ctypes import c_int\n", + "\n", + "#Local definition\n", + "a = 22\n", + "b = c_int(a) # ctype datatype declaration\n", + "\n", + "#Pointer variable\n", + "b_po=pointer(b)\n", + "\n", + "# 'id' is a address of letter and it represents the address of the variable\n", + "b = id(a)\n", + "\n", + "#Result\n", + "print \"\\n Value of a = %d\" %a\n", + "print \"\\n Value of a = %d\" %(c_int(a).value)\n", + "print \"\\n Value of a = %d\" %b_po[0]\n", + "print \"\\n Address of a = %u\" %id(a)\n", + "print \"\\n Address of a = %u\" %b\n", + "print \"\\n Address of a = %u\" %id(b)\n", + "print \"\\n Value of b = address of a = %u\" %b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Value of a = 22\n", + "\n", + " Value of a = 22\n", + "\n", + " Value of a = 22\n", + "\n", + " Address of a = 4298180848\n", + "\n", + " Address of a = 4298180848\n", + "\n", + " Address of a = 4344066728\n", + "\n", + " Value of b = address of a = 4298180848\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page Number: 5.109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to illustrate pointer to pointer\n", + "\n", + "from ctypes import c_int\n", + "\n", + "#Local definition\n", + "a = 22\n", + "b = c_int(a) # ctype datatype declaration\n", + "c = c_int(a) # ctype datatype declaration\n", + "\n", + "#Pointer variable\n", + "b_po = pointer(b)\n", + "c_po = pointer(b_po) # c_po is a pointer to another pointer\n", + "\n", + "# 'id' is a address of letter and it represents the address of the variable\n", + "b = id(a)\n", + "c = id(b)\n", + "\n", + "#Result\n", + "print \"\\n Value of a is %d\" %a\n", + "print \"\\n Value of a is %d\" %(c_int(a).value)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Value of a is 22\n", + "\n", + " Value of a is 22\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter15.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter15.ipynb new file mode 100755 index 00000000..21b14f41 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter15.ipynb @@ -0,0 +1,266 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2bed6e40cd55f716f11e909c76b0c924a863909239fcbbf975814260bb7b4531" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Pointers and Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Call By Value" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page no. 5.112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Call by value\n", + "\n", + "def change(x,y):\n", + " x=x+5\n", + " y=y+10\n", + " print \"In the function changes a&b is %d,%d\"%(x,y)\n", + " \n", + "a=10\n", + "b=20\n", + "\n", + "print \"\\nBefore calling the function a&b is %d,%d\"%(a,b)\n", + "\n", + "change(a,b)\n", + "print \"\\nAfter calling a&b is %d,%d\"%(a,b)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Before calling the function a&b is 10,20\n", + "In the function changes a&b is 15,30\n", + "\n", + "After calling a&b is 10,20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page no.5.113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#program to swap(interchange) the two given variable.\n", + "\n", + "def swap(x,y):\n", + " \n", + " x=x+y\n", + " y=x-y\n", + " x=x-y\n", + " print \"In swap function x=%d, y=%d\"%(x,y)\n", + " return y,x\n", + "\n", + "a=10\n", + "b=20\n", + "\n", + "print \"Before swap a=%d, b=%d\"%(a,b)\n", + "\n", + "\n", + "print \"\\nAfter the calling the swap function, a=%d,b=%d\"%swap(a,b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before swap a=10, b=20\n", + "In swap function x=20, y=10\n", + "\n", + "After the calling the swap function, a=10,b=20\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Call By Reference" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page.No.5.114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Call By Reference\n", + "\n", + "def change (x,y):\n", + " x=x+5\n", + " y=y+10\n", + " print \"In the function change a&b is %d %d\"%(x,y)\n", + " return x,y\n", + "a=10\n", + "b=20\n", + "print \"\\nBefore calling the function a&b is %d %d\"%(a,b)\n", + "\n", + "\n", + "print \"After calling the function a&b is %d %d\"%change(a,b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Before calling the function a&b is 10 20\n", + "In the function change a&b is 15 30\n", + "After calling the function a&b is 15 30\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.5.115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to swap(intercahnge) the value of variables.\n", + "\n", + "a=10\n", + "b=20\n", + "\n", + "print \"\\nBefore swap a=%d, b=%d\"%(swap(a,b))\n", + "\n", + "def swap(x,y):\n", + " x=x+y\n", + " y=x-y\n", + " x=x-y\n", + " print\"\\nIn swap function x=%d,y=%d\"%(x,y)\n", + " return y,x\n", + "\n", + "print \"\\nAfter calling swap function a=%d, b=%d\"%(b,a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "In swap function x=20,y=10\n", + "\n", + "Before swap a=10, b=20\n", + "\n", + "After calling swap function a=20, b=10\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page no. 5.115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to interchange the value of variables using call by reference\n", + "def exchange(m,n):\n", + " t=m\n", + " m=n\n", + " n=t\n", + " return n,m\n", + "\n", + "a,b=input(\"Enter two Numbers: \")\n", + "\n", + "print \"Before Exchange a=%d,b=%d\"%(a,b)\n", + "\n", + "\n", + "print \"After Exchange a=%d, b=%d\"%(exchange(b,a))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two Numbers: 10,20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before Exchange a=10,b=20\n", + "After Exchange a=20, b=10\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter16.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter16.ipynb new file mode 100755 index 00000000..ab91ce85 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter16.ipynb @@ -0,0 +1,333 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d2add72dea4c498cf89927248000fdbfce0907704975d2bdb6ff1cde1c8f50a7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 16 : Pointers and Arrays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.:5.118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print the value and address of the element\n", + "\n", + "a=[10,20,30,40,50]\n", + "for b in range(0,5):\n", + " print \"The value of a[%d]=%d\"%(b,a[b])\n", + " print \"Address of a[%d]=%u\"%(b,id(a[b]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a[0]=10\n", + "Address of a[0]=4299197952\n", + "The value of a[1]=20\n", + "Address of a[1]=4299197712\n", + "The value of a[2]=30\n", + "Address of a[2]=4299197472\n", + "The value of a[3]=40\n", + "Address of a[3]=4299199208\n", + "The value of a[4]=50\n", + "Address of a[4]=4299198968\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.: 5.119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print the value and the address of the element using pointer with function\n", + "\n", + "a=[10,20,30,40,50]\n", + "\n", + "for c in range(0,5):\n", + " print \"The Value of a[%d]=%d\"%(c,a[c])\n", + " print \"The address of a[%d]=%u\"%(c,id(b))\n", + "def value(b):\n", + " b=''\n", + " id(b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of a[0]=10\n", + "The address of a[0]=4296527248\n", + "The Value of a[1]=20\n", + "The address of a[1]=4296527248\n", + "The Value of a[2]=30\n", + "The address of a[2]=4296527248\n", + "The Value of a[3]=40\n", + "The address of a[3]=4296527248\n", + "The Value of a[4]=50\n", + "The address of a[4]=4296527248\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example:3, Page No,: 5.120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to add the sum of number using pointer\n", + "\n", + "a=[10,20,30,40,50]\n", + "\n", + "b=total=0\n", + "c=id(c)\n", + "\n", + "for b in range(0,5):\n", + " print \"Enter the number %d: \"%(b+1)\n", + " a[b]=input()\n", + " \n", + "c=a\n", + "for b in range(0,5):\n", + " total=total+c[b]\n", + " c[b]=c[b]+1\n", + "\n", + "print \"Total= %d\"%(total)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number 1: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number 2: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number 3: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number 4: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "40\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number 5: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total= 150\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page No.: 5.121 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to sort a given number using pointer.\n", + "\n", + "arr = []\n", + "n = input(\"Enter the no. of elements: \")\n", + "for i in range(0,n):\n", + " arr.append(0)\n", + "print \"Enter the element: \" \n", + "for i in range(0,n):\n", + " arr[i]=input()\n", + "print \"Before Sorting:\" \n", + "for i in range(0,n):\n", + " print \"%d\"%arr[i],\n", + " \n", + "for i in range(0,n):\n", + " for j in range(i,n):\n", + " if arr[i]>arr[j]:\n", + " t = arr[i]\n", + " arr[i] = arr[j]\n", + " arr[j] = t\n", + "print \"\\nAfter Sorting:\"\n", + "for i in range(0,n):\n", + " print \"%d\" %arr[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the no. of elements: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the element: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before Sorting:\n", + "8 5 7 4 6 \n", + "After Sorting:\n", + "4 5 6 7 8\n" + ] + } + ], + "prompt_number": 72 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter17.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter17.ipynb new file mode 100755 index 00000000..7967d054 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter17.ipynb @@ -0,0 +1,310 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:86b94093ee72d30b0a9443a44a1c3905ef6186294337253a1ca56b0318def382" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : Pointers with Multidimensional Array" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.:5.123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print the values and addres of the array elements.\n", + "\n", + "arr=([[5,100],[10,200],[15,300],[20,400]])\n", + "\n", + "for a in range(0,4):\n", + " print \"Address of %d array= %u\"%(a,id(arr[a]))\n", + " for b in range(0,2):\n", + " print \"Value =%d\"%(arr[a][b])\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address of 0 array= 4336406328\n", + "Value =5\n", + "Value =100\n", + "Address of 1 array= 4336414944\n", + "Value =10\n", + "Value =200\n", + "Address of 2 array= 4336414800\n", + "Value =15\n", + "Value =300\n", + "Address of 3 array= 4366918504\n", + "Value =20\n", + "Value =400\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.: 5.125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print the value and address of the element using array of pointers\n", + "\n", + "a=[0,1,2]\n", + "b=10\n", + "c=20\n", + "d=30\n", + "a[0]=b\n", + "a[1]=c\n", + "a[2]=d\n", + "for i in range(0,3):\n", + " print \"Address = %u\"%id(a[i])\n", + " print \"Value = %d\" % (a[i])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address = 4298181184\n", + "Value = 10\n", + "Address = 4298180944\n", + "Value = 20\n", + "Address = 4298180704\n", + "Value = 30\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No.: 5.126 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to sort a list of strings in alphabetical order using array of pointers.\n", + "\n", + "a = []\n", + "n= input(\"Enter the number of strings: \")\n", + "print \"Enter each string on a separate line below.\"\n", + "for i in range(0,n):\n", + " a.append(0)\n", + " \n", + "for i in range(0,n):\n", + " a[i]=raw_input(\"String %d: \" %(i+1))\n", + "for i in range(0,n):\n", + " for j in range(i,n):\n", + " if a[i]>a[j]:\n", + " t = a[i]\n", + " a[i] = a[j]\n", + " a[j] = t\n", + "print \"\\nReordered List of Strings: \"\n", + "for i in range(0,n):\n", + " print \"String %d: %s\" %(i+1,a[i])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of strings: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter each string on a separate line below.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 1: venkat\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 2: ramesh\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 3: babu\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 4: muni\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 5: shankar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "String 6: saravanan\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Reordered List of Strings: \n", + "String 1: babu\n", + "String 2: muni\n", + "String 3: ramesh\n", + "String 4: saravanan\n", + "String 5: shankar\n", + "String 6: venkat\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page No.: 5.128 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to count number of words\n", + "\n", + "str=[]\n", + "ps=raw_input(\"Enter a string: \")\n", + "print len(ps.split()), \"word(s) in the given string\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: I am a student.\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4 word(s) in the given string\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 5, Page No.: 5.129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate on strings and pointers\n", + "\n", + "s1=\"abcd\"\n", + "s2='efgh'\n", + "\n", + "print \"%s %16lu \\n\" % (s1,id(s1))\n", + "print \"%s %16lu \\n\" % (s2,id(s2)) \n", + "\n", + "s1=s2\n", + "print \"%s %16lu \\n\" % (s1,id(s1))\n", + "print \"%s %16lu \\n\" % (s2,id(s2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "abcd 4363408224 \n", + "\n", + "efgh 4363332704 \n", + "\n", + "efgh 4363332704 \n", + "\n", + "efgh 4363332704 \n", + "\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter18.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter18.ipynb new file mode 100755 index 00000000..c422da50 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter18.ipynb @@ -0,0 +1,490 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0724a7e756186f06943f5403b91daf5f178ee495f014e11c1fad0330aa0d254c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 : Pointers and Structures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.: 5.130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print details of person using structure and pointer\n", + "\n", + "class account:\n", + " name=\"\"\n", + " place=\"\"\n", + " acctno=0\n", + " \n", + "m4=account()\n", + "m4.name=\"Venkat\"\n", + "m4.place=\"Arcot\"\n", + "m4.acctno=24201\n", + "\n", + "print \"%s\\t%s\\t%d\\n\"%(m4.name,m4.place,m4.acctno)\n", + "\n", + "contents=m4\n", + "\n", + "print \"%s\\t%s\\t%d\\n\"%(contents.name,contents.place,contents.acctno)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Venkat\tArcot\t24201\n", + "\n", + "Venkat\tArcot\t24201\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No.: 5.131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print name, place, and account number using structure and pointer\n", + "\n", + "class account:\n", + " name=\"\"\n", + " place=\"\"\n", + " acctno=0\n", + " \n", + "m4=account()\n", + "m4.name=\"Madhavan\"\n", + "m4.place=\"Chennai\"\n", + "m4.acctno=241\n", + "a=m4\n", + "\n", + "print \"%s\\n%s\\n%d\\n\"%(a.name,a.place,a.acctno)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Madhavan\n", + "Chennai\n", + "241\n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No.: 5.132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to show how the int_pointers structure can be handled.\n", + "\n", + "\n", + "class int_pointers:\n", + " p1=0\n", + " p2=0\n", + " \n", + "pointers=int_pointers()\n", + "m1= 80\n", + "pointers.p1=m1\n", + "pointers.p2=-40\n", + "m2=pointers.p2\n", + "print \"m1= %i, *pointers.p1 = %i\\n\"% (m1,pointers.p1)\n", + "print \"m2= %i, *pointers.p2 = %i\\n\"% (m2,pointers.p2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m1= 80, *pointers.p1 = 80\n", + "\n", + "m2= -40, *pointers.p2 = -40\n", + "\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 1: Page No.5.133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to interchange the values stored in two variables using function with pointers. \n", + "\n", + "def interchange(a,b):\n", + " t=a\n", + " a=b\n", + " b=t\n", + " return b,a\n", + " \n", + "a=39\n", + "b=77\n", + "\n", + "print \"Before Interchange: a=%d, b=%d\"%(a,b)\n", + "\n", + "\n", + "print \"After Interchange : a=%d, b=%d\"%(interchange(b,a))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before Interchange: a=39, b=77\n", + "After Interchange : a=77, b=39\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study: 2, Page No.:5.134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate the use of structure pointers\n", + "\n", + "class book:\n", + " bno=0\n", + " bname=''\n", + " cost=0.0\n", + "\n", + "p=[book()for i in range(0,3)]\n", + "print \"Enter the Book details... \"\n", + "print \"Enter Book number, Book Name, Book Costs... \"\n", + "for i in range(0,3):\n", + " p[i].bno=input()\n", + " p[i].bname=raw_input()\n", + " p[i].cost=input()\n", + " \n", + "for i in range(0,3):\n", + " \n", + " print \"\\n%d\\t%s\\t\\t%d\"%(p[i].bno,p[i].bname,p[i].cost)\n", + " \n", + "print \"\\nStructure Output\\n\"\n", + "ptr=p\n", + "\n", + "for i in range(0,3):\n", + " print \"%d\\t%s\\t\\t%d\"%(ptr[i].bno,ptr[i].bname,ptr[i].cost)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Book details... \n", + "Enter Book number, Book Name, Book Costs... \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "101\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Computer Practice_1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "240\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "201\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Computer Practice_2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "250\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "202\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ and JAVA\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "280\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "101\tComputer Practice_1\t240\n", + "\n", + "201\tComputer Practice_2\t250\n", + "\n", + "202\tC++ and JAVA\t280\n", + "\n", + "Structure Output\n", + "\n", + "101\tComputer Practice_1\t240\n", + "201\tComputer Practice_2\t250\n", + "202\tC++ and JAVA\t280\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 3: Page No: 5.136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to count number of vowels,consonants, digits,spaces and other characters in a line of text.\n", + "\n", + "vowels='aeiou'\n", + "consonants='bcdfghjklmnpqrstvwxyz'\n", + "spaces =' '\n", + "digits='1234567890'\n", + "special_characters='!@#$%^&*()_'\n", + "\n", + "text=raw_input(\"Enter the text in lower case: \")\n", + "\n", + "print \"\\nNumber of vowels: \",dict((v, text.count(v)) for v in text if v in vowels)\n", + "print \"Number of consonants: \",dict((c, text.count(c)) for c in text if c in consonants)\n", + "print \"Number of Spaces: \",dict((s, text.count(s)) for s in text if s in spaces)\n", + "print \"Number of digits: \",dict((d, text.count(d)) for d in text if d in digits)\n", + "print \"Number of special_characters: \",dict((sc, text.count(sc)) for sc in text if sc in special_characters)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the text in lower case: 123 vrb publishers @#$%^&*()\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Number of vowels: {'i': 1, 'e': 1, 'u': 1}\n", + "Number of consonants: {'b': 2, 'h': 1, 'l': 1, 'p': 1, 's': 2, 'r': 2, 'v': 1}\n", + "Number of Spaces: {' ': 3}\n", + "Number of digits: {'1': 1, '3': 1, '2': 1}\n", + "Number of special_characters: {'@': 1, '#': 1, '%': 1, '$': 1, '&': 1, ')': 1, '(': 1, '*': 1, '^': 1}\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 4: Page No.: 5.136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate malloc() function\n", + "\n", + "NULL=0\n", + "string = ''\n", + "if string==NULL:\n", + " print \"Not Enough memory to allocate buffer\\n\"\n", + "else:\n", + " \n", + " def strcpy(cstring1):\n", + " import copy\n", + " cstring2=copy.copy(cstring1)\n", + " return cstring2 \n", + "string=\"Hello\"\n", + "print \"String is %s\" %string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String is Hello\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 5: Page No.: 5.137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate calloc() function\n", + "\n", + "string=''\n", + "\n", + "def strcpy(cstring1):\n", + " import copy\n", + " cstring2=copy.copy(cstring1)\n", + " return cstring2 \n", + "stri=\"BHAVANA\"\n", + "string=strcpy(stri)\n", + "print \"String is %s\" %string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "String is BHAVANA\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Case Study 6: Page No.:5.138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to demonstrate realloc() function\n", + "#Cannot do in python" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter19.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter19.ipynb new file mode 100755 index 00000000..bbaf1a5b --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter19.ipynb @@ -0,0 +1,126 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:069422c07d34cc73268583e26cec775bbe1b3930cb154b474b2ff1e109dbe593" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 : Command Line Arguments" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.:5.139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import sys\n", + "argc=0\n", + "if argc!=2:\n", + " print \"Hellow %s\"%(sys.argv)\n", + "else:\n", + " print \"Forgotted to type name\"\n", + " exit(0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hellow ['-c', '-f', '/home/gayathri/.config/ipython/profile_default/security/kernel-f732916e-2a20-4211-8210-1c4fa7115bd5.json', \"--IPKernelApp.parent_appname='ipython-notebook'\", '--profile-dir', '/home/gayathri/.config/ipython/profile_default', '--parent=1']\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No. 5.139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "argc='0'\n", + "if argc==2:\n", + " print \"Argument supplied is %s\"%(sys.argv)\n", + "elif argc>2:\n", + " print \"Too many arguments supplied \\n\",(sys.argv)\n", + "else:\n", + " print \"One Argument expected\",(sys.argv)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Too many arguments supplied \n", + "['-c', '-f', '/home/gayathri/.config/ipython/profile_default/security/kernel-f732916e-2a20-4211-8210-1c4fa7115bd5.json', \"--IPKernelApp.parent_appname='ipython-notebook'\", '--profile-dir', '/home/gayathri/.config/ipython/profile_default', '--parent=1']\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No. :5.140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "\n", + "print \"The Arguments to the program are: \"\n", + "print str(sys.argv)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Arguments to the program are: \n", + "['-c', '-f', '/home/gayathri/.config/ipython/profile_default/security/kernel-f732916e-2a20-4211-8210-1c4fa7115bd5.json', \"--IPKernelApp.parent_appname='ipython-notebook'\", '--profile-dir', '/home/gayathri/.config/ipython/profile_default', '--parent=1']\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter20.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter20.ipynb new file mode 100755 index 00000000..adaadc6f --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter20.ipynb @@ -0,0 +1,61 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7f2d14f2c2ae43d8abc01634eb7d39800f8596aa61628d10404d3502e1e30c64" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20 : Dynamic Memory Allocation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No. 5.146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Reallocation of memory\n", + "\n", + "p= \"MADRAS\"\n", + "\n", + "print \"Memory contains: %s\\n\"%(p) #There is no reallocation memory in python\n", + "\n", + "p=\"CHENNAI\"\n", + "\n", + "print \"Memory now contains: %s\\n\"%(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory contains: MADRAS\n", + "\n", + "Memory now contains: CHENNAI\n", + "\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter21.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter21.ipynb new file mode 100755 index 00000000..2b76d2a2 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter21.ipynb @@ -0,0 +1,174 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2bdca20a49e1bad43f6968c764966fb35bc4580bd54570e770e266797cc3ab0e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 : The C Preprocessor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 1, Page No.5.149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Print square and cube Values by using macro substitutions. \n", + "def sq(n):\n", + " return n*n\n", + " \n", + " \n", + "def cube(n):\n", + " return n*n*n\n", + " \n", + "\n", + "a=5\n", + "b=3\n", + "s=c=0\n", + "\n", + "#Function calling\n", + "s=sq(a)\n", + "c=cube(b)\n", + "\n", + "#Result\n", + "print \"Square value of 5 is %d\"%(s)\n", + "print \"Cube value of 3 is %d\"%(c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Square value of 5 is 25\n", + "Cube value of 3 is 27\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 2, Page No. 5.151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Print the Values using macro substitution.\n", + "\n", + "VAL=40\n", + "\n", + "print \"The value is %d\"%VAL\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value is 40\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 3, Page No.:5.151\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Print Value and text using preprocessing.\n", + "VAL=35\n", + "\n", + "HELLO=\"HELLO\"\n", + "\n", + "res=VAL-5\n", + "\n", + "print \"Res=VAL-5:Res= %d\"%res\n", + "\n", + "print \"HELLO\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Res=VAL-5:Res= 30\n", + "HELLO\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example: 4, Page No.:5.152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to print the value using preprocessors.\n", + "USD=1\n", + "UKP=1\n", + "\n", + "currency_rate=46\n", + "currency_rate=100\n", + "\n", + "rs=10*currency_rate\n", + "print \"The Value of rs is : %d\"%rs\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of rs is : 1000\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter22.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter22.ipynb new file mode 100755 index 00000000..53a104bf --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter22.ipynb @@ -0,0 +1,2300 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dd103cfe67b47eb61e56816517923337936d461ec4fd4b8f9f87e6c544fd31e3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22 : Sample C Programs(Lab Exercise)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 1: Page no.:L.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Area of Triangle\n", + "\n", + "import math\n", + "\n", + "#User Inputs\n", + "a,b,c=input(\"Enter three sides: \")\n", + "\n", + "#calculation of semi perimeter\n", + "s=(a+b+c)/2\n", + "\n", + "#Calculation of Area of Triangle\n", + "d=(s*(s-a)*(s-b)*(s-c))\n", + "\n", + "area=math.sqrt(d)\n", + "\n", + "#Result\n", + "print \"Area of triangle = %f sq units \\n\"%area" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three sides: 5,6,7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of triangle = 14.696938 sq units \n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 2: Page No. L.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Square root for the given value.\n", + "\n", + "import math\n", + "\n", + "#User Input\n", + "x=input(\"Enter the Value: \")\n", + "\n", + "#Result\n", + "print \"Square root of %.2f is: \"%(x)\n", + "\n", + "print math.sqrt(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Value: 81\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Square root of 81.00 is: \n", + "9.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 3: Page.No.L.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Sum of the series 0+1+(1+2)+...+n\n", + "\n", + "#User Input\n", + "n=input(\"Enter the Value of n : \")\n", + "\n", + "#Variable Declaration\n", + "s=term=0\n", + "i=j=0\n", + "\n", + "#Computing Values in loop\n", + "for i in range(n):\n", + " for j in range(n):\n", + " if j<=i:\n", + " term=term+j\n", + " j=j+1 \n", + "s=s+term\n", + "if i<=n:\n", + " i=i+1\n", + " \n", + "#Result\n", + "print \"Sum of the series S= %d\"%(s)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Value of n :5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of the series S= 20\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 4: Page No.:L.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Decimal into binary number.\n", + "\n", + "n=input(\"Enter the decimal number: \")\n", + "s=n\n", + "k=[]\n", + "\n", + "#Calculation\n", + "while (s>0):\n", + " a=int(float(s%2))\n", + " k.append(a)\n", + " s=(s-a)/2\n", + "k.append(0)\n", + "bi=\"\"\n", + "\n", + "for j in k[::1]:\n", + " bi=bi+str(j)\n", + "\n", + "#Result\n", + "print('The binary value of %d is %s'%(n, bi))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the decimal number: 14\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary value of 14 is 01110\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 5: Page No. L.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The given number is armstrong or not.\n", + "\n", + "#Variable declaration\n", + "a=b=c=d=e=0\n", + "\n", + "#User Input\n", + "a=input(\"Enter the Number: \")\n", + "\n", + "#Assigning variable 'a' value to variable 'e'\n", + "e=a\n", + "\n", + "#Calculation for finding Armstrong or not\n", + "while a>0:\n", + " b=a%10\n", + " c=b*b*b\n", + " a=a/10\n", + " d=c+d\n", + " \n", + "#Result\n", + "if e==d:\n", + " print \"%d is an armstrong number. \"%e\n", + " \n", + "else:\n", + " print \"%d is not an armstrong number. \"%e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Number: 153\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "153 is an armstrong number. \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 6: Page No.L.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Centigrade and Farenheit Values.\n", + "\n", + "\n", + "#Variable Declaration\n", + "c=f=cn=fn=0.0\n", + "\n", + "#User Input1 for calculating farenheit\n", + "c=input(\"Enter temperature in centigrade : \")\n", + "\n", + "#Farenheit Calculation\n", + "f=1.8*c+32\n", + "\n", + "#Result1\n", + "print \"Farenheit Equivalent is: %.1f\\n\" %(f)\n", + "\n", + "#User input2 for calculating centigrade\n", + "fn=input(\"Enter temperature in farenheit : \")\n", + "\n", + "#Centigrade Calculation\n", + "cn=(fn-32)/1.8\n", + "\n", + "#Result2\n", + "print \"Centigrade Equivalent is : %.1f\\n\"%(cn)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter temperature in centigrade : 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Farenheit Equivalent is: 68.0\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter temperature in farenheit : 68\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Centigrade Equivalent is : 20.0\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 7: Page .no.L.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Converting Decimal value to binary number\n", + "\n", + "\n", + "#Variable declaration\n", + "bnum=digit=decimal=bina=base=0\n", + "\n", + "#User input\n", + "bnum=input(\"Enter the binary number: \")\n", + "\n", + "bina=bnum\n", + "\n", + "while(bnum!=0):\n", + " digit=bnum%10\n", + " decimal=decimal+(digit<maxi:\n", + " maxi=y\n", + " if z>maxi:\n", + " maxi=z\n", + " return maxi\n", + " \n", + " \n", + "#User input\n", + "a,b,c=input(\"Enter three integers : \")\n", + "\n", + "#Result\n", + "print \"Maximum is : %d\\n\"%(maximum(a,b,c))\n", + "\n", + "\n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three integers : 2,6,9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum is : 9\n", + "\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 11: Page no.L.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Factorial of the given number using recursion.\n", + "\n", + "#funtion declaration\n", + "def fact(n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return(n*fact(n-1))\n", + " \n", + "#USer Input\n", + "\n", + "n=input(\"Enter the number whose factorial is to be found: \")\n", + "\n", + "#Result\n", + "print \"The Factorial of %d is : %d \\n\"%(n,fact(n))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number whose factorial is to be found: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Factorial of 6 is : 720 \n", + "\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 12: Page no.L.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Palindrome or not.\n", + "\n", + "print \"Enter the String to check palindrome or not \\n\"\n", + "\n", + "#User Input\n", + "\n", + "string = raw_input(\"Enter the String: \")\n", + "\n", + "#reverse the string \n", + "\n", + "rev_string = reversed(string)\n", + "\n", + "#Check if the string is palindrome or not\n", + "\n", + "if list(rev_string) == list(string) :\n", + " print \"\\nThe given string %s is a palindrome\"%(string)\n", + " \n", + "else:\n", + " print \"\\nThe given string %s is not a palindrome\"%(string)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the String to check palindrome or not \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the String: madam\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The given string madam is a palindrome\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 13: Page No. L.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Largest and smallest number in array\n", + "\n", + "#User input\n", + "n= input(\"Enter the nth term of an array: \")\n", + "\n", + "for i in range(0,n):\n", + " a[i]=eval(raw_input())\n", + "\n", + "#check if the given array is large or small. \n", + " for i in range(1,n):\n", + " if a[i]>large:\n", + " large=a[i]\n", + " \n", + " else:\n", + " if a[i]a[j]:\n", + " temp=a[i]\n", + " a[i]=a[j]\n", + " a[j]=temp\n", + " \n", + "print \"\\nThe Elements in ascending order\\n\"\n", + "\n", + "for i in range(0,n):\n", + " print \"%.2f\"%a[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last term of the array: 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "14\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "-90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "-67\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "48\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "01\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The Elements in ascending order\n", + "\n", + "-90.00\n", + "-67.00\n", + "1.00\n", + "14.00\n", + "23.00\n", + "48.00\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 15: Page No. L.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Insert element in specified position in an array\n", + "\n", + "import array\n", + "\n", + "#User input\n", + "n=input(\"Enter the last value: \")\n", + "a=[0 for i in range(0,n) ]\n", + "print \"Enter the elements of array: \"\n", + "for i in range(0,n):\n", + " a[i]=eval(raw_input())\n", + " \n", + "#Getting inserting element and position from users\n", + "item=input(\"Enter the element to be inserted: \")\n", + "pos=input(\"Enter the position of insertion: \")\n", + "a.insert(pos,item)\n", + "#Result\n", + "print \"\\nElements after insertion is : \"\n", + "for i in range(0,n+1):\n", + " print \"%.2f\"%a[i]\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last value: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of array: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the element to be inserted: 36\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the position of insertion: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Elements after insertion is : \n", + "12.00\n", + "34.00\n", + "56.00\n", + "90.00\n", + "36.00\n", + "32.00\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 16: Page.no.L.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Transpose of the matrix\n", + "\n", + "#User Input\n", + "\n", + "a=[]\n", + "\n", + "n,m=input(\"Enter the Row and Columns: \")\n", + "print \"Enter the elements of matrix:\"\n", + "for i in range(n):\n", + " a.append([])\n", + " \n", + " for j in range(m):\n", + " element=input()\n", + " a[i].append(element)\n", + "\n", + "#print matrix\n", + "print \"\\nElements in matrix: \"\n", + "for i in range(n):\n", + " for j in range(m):\n", + " print a[i][j],\n", + " print '\\n'\n", + "\n", + "\n", + "#generate transpose\n", + "transpose=[]\n", + "for j in range(m):\n", + " transpose.append([])\n", + " for i in range (n):\n", + " b=a[i][j]\n", + " transpose[j].append(b)\n", + "\n", + "#print transpose\n", + "print \"Transpose of the matrix is: \"\n", + "for i in range (m):\n", + " for j in range (n):\n", + " print transpose[i][j],\n", + " print '\\n'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns: 3,3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of matrix:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Elements in matrix: \n", + "1 2 3 \n", + "\n", + "4 5 6 \n", + "\n", + "7 8 9 \n", + "\n", + "Transpose of the matrix is: \n", + "1 4 7 \n", + "\n", + "2 5 8 \n", + "\n", + "3 6 9 \n", + "\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 17: Page no. L.32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to find sum of an array matrix\n", + "#Array Declaration\n", + "\n", + "a=[]\n", + "b=[]\n", + "c=[[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", + "#User Input1\n", + "n,m=input(\"Enter the Row and Columns of A Matrix: \")\n", + "print \"Enter the elements of A matrix:\"\n", + "for i in range(n):\n", + " a.append([])\n", + " \n", + " for j in range(m):\n", + " element=input()\n", + " a[i].append(element)\n", + "\n", + "#print matrix1\n", + "print \"\\nElements in A matrix: \"\n", + "for i in range(n):\n", + " for j in range(m):\n", + " print a[i][j],\n", + " print '\\n'\n", + "\n", + " \n", + "#User Input 2\n", + "p,q=input(\"Enter the Row and Columns of B Matrix: \")\n", + "print \"Enter the elements of B matrix:\"\n", + "for i in range(p):\n", + " b.append([])\n", + " \n", + " for j in range(q):\n", + " element=input()\n", + " b[i].append(element)\n", + "\n", + "#print matrix 2\n", + "print \"\\nElements in B matrix: \"\n", + "for i in range(p):\n", + " for j in range(q):\n", + " print b[i][j],\n", + " print '\\n'\n", + "\n", + "#Addition of array in matrix \n", + "for i in range(n):\n", + " for j in range(m):\n", + " c[i][j] += a[i][j] + b[i][j]\n", + "\n", + "#Result\n", + "print \"\\nThe Sum of A and B matrix: \"\n", + "for i in range(n):\n", + " for j in range(m):\n", + " print \"%5d\"%c[i][j],\n", + " print '\\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns of A Matrix: 3,3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of A matrix:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Elements in A matrix: \n", + "1 2 3 \n", + "\n", + "4 5 6 \n", + "\n", + "7 8 9 \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns of B Matrix: 3,3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of B matrix:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Elements in B matrix: \n", + "1 2 3 \n", + "\n", + "4 5 6 \n", + "\n", + "6 7 4 \n", + "\n", + "\n", + "The Sum of A and B matrix: \n", + " 2 4 6 \n", + "\n", + " 8 10 12 \n", + "\n", + " 13 15 13 \n", + "\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 18: Page No. :L.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to find Matrix Multiplication \n", + "#Array Declaration\n", + "\n", + "a=[]\n", + "b=[]\n", + "c=[[0 for i in xrange(0,5)] for i in xrange(0,5)]\n", + "\n", + "while True:\n", + "#User Input1\n", + " n,m=input(\"Enter the Row and Columns of A Matrix: \")\n", + " p,q=input(\"Enter the Row and Columns of B Matrix: \")\n", + " if (n==m&p==q):\n", + " print \"Enter the elements of A matrix:\" \n", + " for i in range(n):\n", + " a.append([]) \n", + " for j in range(m):\n", + " element=input()\n", + " a[i].append(element)\n", + "#print matrix1\n", + " print \"\\nElements in A matrix: \"\n", + " for i in range(n):\n", + " for j in range(m):\n", + " print a[i][j],\n", + " print '\\n'\n", + " \n", + "#User Input 2 \n", + " print \"Enter the elements of B matrix:\"\n", + " for i in range(p):\n", + " b.append([])\n", + " for j in range(q):\n", + " element=input()\n", + " b[i].append(element)\n", + "\n", + "#print matrix 2\n", + " print \"\\nElements in B matrix: \"\n", + " for i in range(p):\n", + " for j in range(q):\n", + " print b[i][j],\n", + " print '\\n'\n", + "\n", + "#Multiplication of array in matrix \n", + " for i in range(0,m):\n", + " for j in range(0,n):\n", + " c[i][j] = 0\n", + " for k in range(0,n):\n", + " c[i][j] += a[i][k] * b[k][j]\n", + " \n", + "#Result\n", + " print \"\\nThe Multiplication of A and B matrix: \"\n", + " for i in range(n):\n", + " for j in range(m):\n", + " print \"%5d\"%c[i][j],\n", + " print '\\n'\n", + " break\n", + " else:\n", + " print \"The No. of rows and columns are not equal.\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns of A Matrix: 3,3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns of B Matrix: 2,2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The No. of rows and columns are not equal.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns of A Matrix: 3,3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Row and Columns of B Matrix: 3,3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of A matrix:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Elements in A matrix: \n", + "1 2 3 \n", + "\n", + "4 5 6 \n", + "\n", + "7 8 9 \n", + "\n", + "Enter the elements of B matrix:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Elements in B matrix: \n", + "2 4 1 \n", + "\n", + "6 7 4 \n", + "\n", + "3 5 7 \n", + "\n", + "\n", + "The Multiplication of A and B matrix: \n", + " 23 33 30 \n", + "\n", + " 56 81 66 \n", + "\n", + " 89 129 102 \n", + "\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 19: Page No. L.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Student grade using structure\n", + "\n", + "#User Input\n", + "n=input(\"Enter the number of students: \")\n", + "\n", + "#Defining Structure\n", + "class std:\n", + " no=0\n", + " name = ''\n", + " m1 = m2 = m3 =0\n", + " total=avg=0.0\n", + " grade= ''\n", + " \n", + "s=[std() for i in range(0,n)]\n", + "\n", + "#User Input\n", + "for i in range(0,n):\n", + " print \"\\nEnter the student %d details\"%(i+1)\n", + " print \"\\n\"\n", + " s[i].no=int(input(\"Give Student Number: \"))\n", + " s[i].name=raw_input(\"Enter the Student Name: \")\n", + " s[i].m1=int(input(\"Enter Student Mark1: \"))\n", + " s[i].m2=int(input(\"Enter Student Mark2: \"))\n", + " s[i].m3=int(input(\"Enter Student Mark3: \"))\n", + "\n", + "\n", + "#Calculation \n", + " s[i].total = (s[i].m1 + s[i].m2 + s[i].m3)\n", + " s[i].avg=(s[i].total / 3)\n", + " if s[i].avg<=40:\n", + " s[i].grade='D'\n", + " elif s[i].avg<60:\n", + " s[i].grade='C'\n", + " elif s[i].avg<80:\n", + " s[i].grade='B'\n", + " else:\n", + " s[i].grade='A'\n", + " \n", + "#Result\n", + "print \"\\tStudent mark details.... \\n\"\n", + "print \"Roll No\\t Name \\t\\tMark1 \\tMark2 \\tMark3 \\tTotal \\tAverage \\tGrade\"\n", + "for i in range(0,n):\n", + " print \"%d\\t\"%(s[i].no),\"%s\\t\\t\"%(s[i].name), \"%d\\t\"%(s[i].m1),\"%d\\t\"%(s[i].m2),\"%d\\t\"%(s[i].m3), \"%.2f\\t\"%(s[i].total), \"%.2f\\t\\t\"%(s[i].avg), \"%s\\t\"%(s[i].grade)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of students: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter the student 1 details\n", + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give Student Number: 100\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student Name: Venkat\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark1: 89\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark2: 87\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark3: 76\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter the student 2 details\n", + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Give Student Number: 101\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Student Name: Shankar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark1: 87\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark2: 90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student Mark3: 67\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tStudent mark details.... \n", + "\n", + "Roll No\t Name \t\tMark1 \tMark2 \tMark3 \tTotal \tAverage \tGrade\n", + "100\tVenkat\t\t89\t87\t76\t252.00\t84.00\t\tA\t\n", + "101\tShankar\t\t87\t90\t67\t244.00\t81.00\t\tA\t\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 20: Page No. L.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Employee details using Union\n", + "\n", + "#Defining Union\n", + "\n", + "class union:\n", + " name=\"\"\n", + " idno=0\n", + " salary=0.0\n", + " \n", + "desc=union()\n", + "\n", + "desc.name=\"vinod\"\n", + "\n", + "print \"Employee details:\"\n", + "\n", + "print \"The name is %s\\n\"%(desc.name)\n", + "print \"The idno is %d\\n\"%(desc.idno)\n", + "print \"The salary is %6.2f\\n\"%(desc.salary)\n", + "\n", + "desc.idno=10\n", + "\n", + "print \"Employe details:\"\n", + "\n", + "print \"The name is %s\\n\"%(desc.name)\n", + "print \"The idno is %d\\n\"%(desc.idno)\n", + "print \"The salary is %6.2f\\n\"%(desc.salary)\n", + "\n", + "desc.salary=6500.00\n", + "\n", + "print \"Employee details:\"\n", + "\n", + "print \"The name is %s\\n\"%(desc.name)\n", + "print \"The idno is %d\\n\"%(desc.idno)\n", + "print \"The salary is %6.2f\\n\"%(desc.salary)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Employee details:\n", + "The name is vinod\n", + "\n", + "The idno is 0\n", + "\n", + "The salary is 0.00\n", + "\n", + "Employe details:\n", + "The name is vinod\n", + "\n", + "The idno is 10\n", + "\n", + "The salary is 0.00\n", + "\n", + "Employee details:\n", + "The name is vinod\n", + "\n", + "The idno is 10\n", + "\n", + "The salary is 6500.00\n", + "\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 21: Page No. L.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Swap the contents of two variable using pointer.\n", + "\n", + "#swapping function.\n", + "\n", + "def interchange(x,y):\n", + " temp=x\n", + " x=y\n", + " y=temp\n", + " return x,y\n", + "\n", + "#User Input\n", + "a,b = input(\"Enter the values of A and B: \")\n", + "#Result before interchanging\n", + "print \"a=%d b=%d\\n\"%(a,b)\n", + "\n", + "\n", + "#Result after interchanging\n", + "print \"After interchanging: \\n\"\n", + "\n", + "print \"a=%d b=%d\\n\"%(interchange(a,b))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the values of A and B: 23,56\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a=23 b=56\n", + "\n", + "After interchanging: \n", + "\n", + "a=56 b=23\n", + "\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 22: Page No.: L.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Concatenate two strings using Dynamic Memory Allocation \n", + "\n", + "s1= raw_input(\"Enter String One: \")\n", + "s2=raw_input(\"Enter String two: \")\n", + "\n", + "s3=''\n", + "s3=s1+s2 \n", + "#Result\n", + "print \"Concatenated String: \", s1+s2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter String One: venkat\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter String two: raman\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Concatenated String: venkatraman\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 23: Page No. L.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#program to store and print same data to and from the file.\n", + "\n", + "#open file\n", + "fp=open(\"Text.txt\",\"w\")\n", + "\n", + "#User Input\n", + "c=raw_input(\"Enter the Text: \")\n", + "\n", + "#Store given input into a file \"text.txt\"\n", + "fp.write(c)\n", + "\n", + "#Closing file\n", + "fp.close()\n", + "\n", + "#Again open text.txt\n", + "fp=open(\"Text.txt\", \"r\")\n", + "\n", + "#display the content from the file \"text.txt\"\n", + "print \"Displaying text from file:\\n\",c \n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Text: VRB PUBLISHERS\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displaying text from file:\n", + "VRB PUBLISHERS\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 24: Page No. L.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program to count number of characters in a file.\n", + "\n", + "#create a file\n", + "fp=open(\"str.txt\",\"w\")\n", + "c=\"\"\n", + "print \"Enter the Characters:\"\n", + "print \"Press ctrl+z to stop entry\"\n", + "\n", + "#User Input\n", + "c=raw_input()\n", + "#store input into the file\n", + "fp.write(c)\n", + "fp.close()\n", + "\n", + "#Again open the file to read\n", + "fp=open(\"str.txt\",\"r\")\n", + "\n", + "#Result\n", + "print \"\\n%s\"%(c)\n", + "print \"Number of characters in the file: \",len(c)\n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the Characters:\n", + "Press ctrl+z to stop entry\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "vrb publishers private limited\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "vrb publishers private limited\n", + "Number of characters in the file: 30\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exercise 25: Page No.: L.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Program using Memory Allocation function\n", + "\n", + "NULL=0\n", + "buffer_size=10\n", + "\n", + "buffer1 = \"BOMBAY\"\n", + "print \"Buffer of size %d created\"%(buffer_size)\n", + "print \"Buffer contains\", buffer1\n", + " \n", + "\n", + "if buffer_size==NULL:\n", + " print \"Malloc failed\"\n", + " \n", + "else:\n", + " print \"Buffer size modified\"\n", + " print \"Buffer still contains:\", buffer1\n", + " \n", + "buffer1=\"MUMBAI\"\n", + "print \"Buffer now contains:\", buffer1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Buffer of size 10 created\n", + "Buffer contains BOMBAY\n", + "Buffer size modified\n", + "Buffer still contains: BOMBAY\n", + "Buffer now contains: MUMBAI\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/README.txt b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/README.txt new file mode 100755 index 00000000..9bed1b50 --- /dev/null +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/README.txt @@ -0,0 +1,10 @@ +Contributed By: Lakshmidharan D +Course: msc +College/Institute/Organization: Pachaiyappa's College for Men, Kanchipuram +Department/Designation: Computer Science +Book Title: Fundamental of Computing and Programming in C +Author: V. Ramesh Babu, R. Samyuktha, M. Munirathnam +Publisher: Lakshmidharan D +Year of publication: 2012 +Isbn: 9789381837214 +Edition: August 2012 \ No newline at end of file diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Calculation.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Calculation.png new file mode 100755 index 00000000..54b0ef8a Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Calculation.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even.png new file mode 100755 index 00000000..ba866766 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_1.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_1.png new file mode 100755 index 00000000..ba866766 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_1.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_2.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_2.png new file mode 100755 index 00000000..ba866766 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_2.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_3.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_3.png new file mode 100755 index 00000000..ba866766 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_3.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line.png new file mode 100755 index 00000000..19625214 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_1.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_1.png new file mode 100755 index 00000000..19625214 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_1.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_2.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_2.png new file mode 100755 index 00000000..19625214 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_2.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_3.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_3.png new file mode 100755 index 00000000..19625214 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_3.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_4.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_4.png new file mode 100755 index 00000000..19625214 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_4.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Standard_Deviation.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Standard_Deviation.png new file mode 100755 index 00000000..a448529e Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Standard_Deviation.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi.png new file mode 100755 index 00000000..88aee856 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi_1.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi_1.png new file mode 100755 index 00000000..88aee856 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi_1.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers.png new file mode 100755 index 00000000..05bef403 Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers.png differ diff --git a/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers_with_A.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers_with_A.png new file mode 100755 index 00000000..2c6a1efe Binary files /dev/null and b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers_with_A.png differ diff --git a/Fundamentals_Of_Thermodynamics/Chapter10.ipynb b/Fundamentals_Of_Thermodynamics/Chapter10.ipynb deleted file mode 100755 index 59bbb80a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter10.ipynb +++ /dev/null @@ -1,164 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6310b6690e48041fd88dd8277353623ea538798dfeeeb9a3819409de065b2175" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10:IRREVERSIBILITY AND AVAILABILITY" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.1:pg-386" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#Calculating reversible work\n", - "\n", - "#Form the Steam Tables,the inlet and the exit state properties are \n", - "hi=171.95 #initial specific heat of enthalpy in kJ/kg\n", - "si=0.5705 #initial specific entropy in kJ/kg-K\n", - "se=2.1341 #final specific entropy in kJ/kg-K\n", - "he=765.34 #final specific heat of enthalpy in kJ/kg-K\n", - "m=5 #mass flow rate of feedwater in kg/s\n", - "q1=900/m #heat added by one of the sources in kJ/kg\n", - "q2=he-hi-q1 #second heat transfer in kJ/kg\n", - "To=25+273.3 #Temp. of the surroundings in K\n", - "T1=100+273.2 #temp. of reservoir of one of the source in K\n", - "T2=200+273.2 #temp. of reservoir of second source in K\n", - "wrev=To*(se-si)-(he-hi)+q1*(1-To/T1)+q2*(1-To/T2) #reversible work in kJ/kg\n", - "print\"\\n Hence, the irreversibility is\",round(wrev,1),\"kJ/kg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence, the irreversibility is 62.0 kJ/kg\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.2:pg-387" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#Calculating reversible work\n", - "import math\n", - "#Form the Steam Tables,the inlet and the exit state properties are\n", - "hi=298.6 #initial specific heat of enthalpy in kJ/kg\n", - "si=6.8631 #initial specific entropy in kJ/kg-K\n", - "se=7.4664 #final specific entropy in kJ/kg-K\n", - "he=544.7 #final specific heat of enthalpy in kJ/kg-K\n", - "q=-50 #heat lost to surroundings in kJ/kg\n", - "w=hi-he+q #work in kJ/kg\n", - "To=25+273.2 #Temp. of the surroundings in K\n", - "P1=100 #Pressure of ambient air in kPa\n", - "P2=1000 #Final pressure of air after compression in kPa\n", - "R=0.287 #Universal gas constant in kJ/kg-K\n", - "wrev=To*(se-si-R*math.log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in kJ/kg\n", - "i=wrev-w #irreversibility in kJ/kg\n", - "print\"\\n Hence, the irreversibility is\",round(i,1),\"kJ/kg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence, the irreversibility is 32.8 kJ/kg\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.3:pg-390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#Calculating reversible work and irreversibility\n", - "\n", - "#Form the Steam Tables at state 1\n", - "u1=1243.5 #initial specific internal energy in kJ/kg\n", - "s1=4.4819 #initial specific entropy in kJ/kg-K\n", - "v1=28.895 #initial specific volume in m^3/kg\n", - "v2=2*v1 #final specific volume in kg/m^3\n", - "u2=u1 #initial specific internal energy in kJ/kg\n", - "#These two independent properties, v2 and u2 , fix state 2.The final temp. is calculated by interplotation using the data for T2=5C and v2,x=0/3928 and u=948.5 kJ/kg. For T2=10C and v2, x=0.5433 and u=1317 kJ/kg\n", - "T2=9.1+273.2 #final temp. in K\n", - "x2=0.513 #quality in final state\n", - "s2=4.644 #final specific entropy in kJ/kg\n", - "V1=1 #volume of part of A in m^3\n", - "m=V1/v1 #mass flow rate in kg/s\n", - "To=20+273.2 #Room temperature in K\n", - "Wrev=To*m*(s2-s1) #reversible work in kJ\n", - "I=Wrev #irreversibility of the process\n", - "print\"\\n The irreversibility is \",round(I,3),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " The irreversibility is 1.645 kJ\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter11.ipynb b/Fundamentals_Of_Thermodynamics/Chapter11.ipynb deleted file mode 100755 index f7ce9d5a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter11.ipynb +++ /dev/null @@ -1,424 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:099777bd4d735e894f7949924f63dca34258026e1381262643494860b41717f6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11:Power and Refrigeration Systems\u2014With Phase Change" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.1:Pg-425" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 1\n", - "#To determine the efficiency of Rankine cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=2000;#Exit pressure in kPa\n", - "P1=10;#Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp;#enthalpy in kJ/kg\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for boiler\n", - "h3=2799.5;#Enthalpy in kJ/kg\n", - "#3-Inlet state for turbine\n", - "#4-Exit state for turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=6.3409;#kJ/kg\n", - "sf=0.6493;#Entropy at liquid state in kJ/kg\n", - "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg\n", - "x4=(s4-sf)/sfg;#x-factor\n", - "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n", - "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n", - "\n", - "nth=((h3-h2)-(h4-h1))/(h3-h2);\n", - "print\" Percentage efficiency =\",round(nth*100,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Percentage efficiency = 30.3\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.2:Pg-429" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 2\n", - "#To determine the efficiency of Rankine cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=4000;#Exit pressure in kPa\n", - "P1=10;#Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp;#enthalpy in kJ/kg\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for boiler\n", - "h3=3213.6;#Enthalpy in kJ/kg from table\n", - "#3-Inlet state for turbine\n", - "#4-Exit state for turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=6.7690;#Entropy in kJ/kg from table\n", - "sf=0.6493;#Entropy at liquid state in kJ/kg from table\n", - "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg from table\n", - "x4=(s4-sf)/sfg;#x-factor\n", - "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n", - "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n", - "\n", - "nth=((h3-h2)-(h4-h1))/(h3-h2);\n", - "print\"Percentage efficiency =\",round(nth*100,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage efficiency = 35.3\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.3:Pg-433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 3\n", - "#To determine the efficiency of a cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=4000;#Exit pressure in kPa\n", - "P1=10;#Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp;#enthalpy in kJ/kg\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for Boiler\n", - "h3=3213.6;#Enthalpy in kJ/kg from table\n", - "#3-Inlet state for high pressure turbine\n", - "#4-Exit state for high pressure turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=6.7690;#Entropy in kJ/kg from table\n", - "sf=1.7766;#Entropy at liquid state in kJ/kg from table\n", - "sfg=5.1193;#Entropy difference for vapor and liquid state in kJ/kg from table\n", - "x4=(s4-sf)/sfg;#x-factor\n", - "hf=604.7#Enthalpy of liquid state in kJ/kg\n", - "hfg=2133.8;#Enthalpy difference in kJ/kg for turbine\n", - "h4=hf+x4*hfg;#Enthalpy in kJ/kg\n", - "#5-Inlet state for low pressure turbine\n", - "#6-Exit pressure for low pressure turbine\n", - "sf=0.6493;#Entropy in liquid state in kJ/kg for turbine\n", - "h5=3273.4;#enthalpy in kJ/kg \n", - "s5=7.8985;#Entropy in kJ/kg\n", - "sfg=7.5009;#entropy diff in kJ/kg \n", - "x6=(s5-sf)/sfg;#x-factor\n", - "hfg=2392.8;#enthalpy difference for low pressure turbine in kj/kg\n", - "h6=h1+x6*hfg;#entropy in kg/kg\n", - "wt=(h3-h4)+(h5-h6);#work output in kJ/kg\n", - "qh=(h3-h2)+(h5-h4);\n", - "\n", - "nth=(wt-wp)/qh;\n", - "print\" Percentage efficiency =\",round(nth*100,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Percentage efficiency = 35.9\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.4:Pg-438" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#Efficiency of Refrigeration cycle\n", - "\n", - "#from previous examples\n", - "h1=191.8;#kJ/kg\n", - "h5=3213.6;#kg/kg\n", - "h6=2685.7;#kJ/kg\n", - "h7=2144.1;#kJ/kg\n", - "h3=604.7;#kJ/kg\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=400;#Exit pressure in kPa\n", - "P1=10; #Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp1=v*(P2-P1);#work done for low pressure pump in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp1;#enthalpy in kJ/kg\n", - "#5-Inlet state for turbine\n", - "#6,7-Exit state for turbine\n", - "y=(h3-h2)/(h6-h2);#extraction fraction\n", - "wt=(h5-h6)+(1-y)*(h6-h7);#turbine work in kJ/kg\n", - "#3-Inlet for high pressure pump\n", - "#4-Exit for high pressure pump\n", - "P3=400;#kPa\n", - "P4=4000;#kPa\n", - "v=0.001084;#specific heat for 3-4 process in m^3/kg\n", - "wp2=v*(P4-P3);#work done for high pressure pump\n", - "h4=h3+wp2;#Enthalpy in kJ/kg\n", - "wnet=wt-(1-y)*wp1-wp2;\n", - "qh=h5-h4;#Heat output in kJ/kg\n", - "nth=wnet/qh;\n", - "print\" Refrigerator Efficiency =\",round(nth*100,1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Refrigerator Efficiency = 37.5\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.5:Pg-443" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#To determine thermal efficiency of cycle\n", - "\n", - "#5-Inlet state for turbine\n", - "#6-Exit state for turbine\n", - "#h-Enthalpy at a state \n", - "#s-Entropy at a state\n", - "#from steam table\n", - "h5=3169.1;#kJ/kg\n", - "s5=6.7235;#kJ/kg\n", - "s6s=s5;\n", - "sf=0.6493;#Entropy for liquid state in kJ/kg\n", - "sfg=7.5009;#Entropy difference in kJ/kg\n", - "hf=191.8;#kJ/kg\n", - "hfg=2392.8;#Enthalpy difference in kJ/kg\n", - "x6s=(s6s-sf)/sfg;#x-factor\n", - "h6s=hf+x6s*hfg;#kJ/Kg at state 6s\n", - "nt=0.86;#turbine efficiency given\n", - "wt=nt*(h5-h6s);\n", - "#1-Inlet state for pump\n", - "#2-Exit state for pump\n", - "np=0.80;#pump efficiency given\n", - "v=0.001009;#specific heat in m^3/kg\n", - "P2=5000;#kPa\n", - "P1=10;#kPa\n", - "wp=v*(P2-P1)/np;#Work done in pump in kJ/kg\n", - "wnet=wt-wp;#net work in kJ/kg\n", - "#3-Inlet state for boiler\n", - "#4-Exit state for boiler\n", - "h3=171.8;#in kJ/kg from table\n", - "h4=3213.6;#kJ/kg from table\n", - "qh=h4-h3;\n", - "nth=wnet/qh;\n", - "print \"Cycle Efficiency =\",round(nth*100,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cycle Efficiency = 29.2\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.6:Pg-451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#to determine the rate of refrigeration\n", - "\n", - "# refer to fig 11.21 in book\n", - "mdot=0.03 # mass flow rate in Kg/s\n", - "T1=-20 # temperature in evaporator in celsius\n", - "T3=40 #temperature in evaporator in Celsius\n", - "P2=1017 # saturation pressure in KPa\n", - "\n", - "# from table of R-134a refrigerant\n", - "h1=386.1 # enthalpy at state 1 in kJ/kg,\n", - "S1=1.7395 # entropy at state 1 in kJ/kg.K\n", - "S2=S1 # isentropic process\n", - "T2=47.7# corresponding value to S2 in table of R-134a in degree celsius\n", - "h2=428.4 # corresponding value to S2 in table of R-134a in kJ/kg\n", - "wc=h2-h1 # work done in compressor in kJ/kg\n", - "h4=h3=256.5 #enthalpy at state 4 and 3 in kJ/kg\n", - "qL=h1-h4 #Heat rejected in kJ/kg\n", - "\n", - "B=qL/wc # COP\n", - "\n", - "print\" the COP of the plant is\",round(B,2)\n", - "print\" the refrigeration rate is\",round(mdot*qL,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " the COP of the plant is 3.06\n", - " the refrigeration rate is 3.89\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.7:Pg-454" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#to determine the COP of cycle\n", - "\n", - "P1=125 # pressure at state 1 in kPa\n", - "P2=1.2 # pressure at state 2 in MPa\n", - "P3=1.19 # pressure at state 3 in MPa,\n", - "P4=1.16 # pressure at state 4 in MPa,\n", - "P5=1.15 # pressure at state 5 in MPa,\n", - "P6=P7=140 # pressure at state 6 and 7 in kPa,\n", - "P8=130 # pressure at state 8 in kPa,\n", - "T1=-10 #temperaure at state 1 in \u25e6C\n", - "T2=100 #temperaure at state 2 in \u25e6C\n", - "T3=80 #temperaure at state 3 in \u25e6C\n", - "T4=45 #temperaure at state 4 in \u25e6C\n", - "T5=40 #temperaure at state 5 in \u25e6C\n", - "T8=-20 #temperaure at state 8 in \u25e6C\n", - "q=-4 # heat transfer in kJ/Kg\n", - "\n", - "#x6=x7 quality condition given in question\n", - "\n", - "\n", - "# the following values are taken from table for refrigerant R-134a\n", - "h1=394.9 # enthalpy at state 1 in kJ/kg\n", - "h2=480.9 # enthalpy at state 2 in kJ/kg\n", - "h8=386.6 # enthalpy at state 8 in kJ/kg\n", - "wc=h2-h1-q # from first law\n", - "h5=h6=h7=256.4 # as x6=x7 and from table at state 5 in Kj/Kg\n", - "qL=h8-h7 # from first law \n", - "B=qL/wc # COP\n", - "print\" the COP of the plant is\",round(B,3)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " the COP of the plant is 1.447\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb deleted file mode 100755 index 814dd14b..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb +++ /dev/null @@ -1,529 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a88db765bb23172043955029f8f04edaf8e710f3cbd46a5474827f42fa8a65ec" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11:Power and Refrigeration Systems\u2014With Phase Change" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.1:Pg-425" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 1\n", - "#To determine the efficiency of Rankine cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=2000;#Exit pressure in kPa\n", - "P1=10;#Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp;#enthalpy in kJ/kg\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for boiler\n", - "h3=2799.5;#Enthalpy in kJ/kg\n", - "#3-Inlet state for turbine\n", - "#4-Exit state for turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=6.3409;#kJ/kg\n", - "sf=0.6493;#Entropy at liquid state in kJ/kg\n", - "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg\n", - "x4=(s4-sf)/sfg;#x-factor\n", - "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n", - "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n", - "\n", - "nth=((h3-h2)-(h4-h1))/(h3-h2);\n", - "print\" Percentage efficiency =\",round(nth*100,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Percentage efficiency = 30.3\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.2:Pg-429" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 2\n", - "#To determine the efficiency of Rankine cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=4000;#Exit pressure in kPa\n", - "P1=10;#Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp;#enthalpy in kJ/kg\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for boiler\n", - "h3=3213.6;#Enthalpy in kJ/kg from table\n", - "#3-Inlet state for turbine\n", - "#4-Exit state for turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=6.7690;#Entropy in kJ/kg from table\n", - "sf=0.6493;#Entropy at liquid state in kJ/kg from table\n", - "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg from table\n", - "x4=(s4-sf)/sfg;#x-factor\n", - "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n", - "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n", - "\n", - "nth=((h3-h2)-(h4-h1))/(h3-h2);\n", - "print\"Percentage efficiency =\",round(nth*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage efficiency = 35.3 %\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.2E:Pg-431" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 2\n", - "#To determine the efficiency of Rankine cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=600.0 ;#Exit pressure in lbf/in^2\n", - "P1=1.0;#Inlet pressure in lbf/in^2\n", - "v=0.01614;#specific weight of water in ft^3/lbm\n", - "wp=v*(P2-P1)*(144.0/778.0);#work done in pipe in Btu/lbm\n", - "h1=69.70;#Enthalpy in Btu/lbm from table\n", - "h2=h1+wp;#enthalpy in Btu/lbm\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for boiler\n", - "h3=1407.6;#Enthalpy in Btu/lbm from table\n", - "#3-Inlet state for turbine\n", - "#4-Exit state for turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=1.6343;#Entropy in Btu/lbm from table\n", - "sf=1.9779;#Entropy at liquid state in Btu/lbm from table\n", - "sfg=1.8453;#Entropy difference for vapor and liquid state in Btu/lbm from table\n", - "x4=-(s4-sf)/sfg;#x-factor\n", - "hfg=1036.0;#Enthalpy difference in Btu/lbm for turbine\n", - "h4=1105.8-x4*hfg;#Enthalpy in Btu/lbm\n", - "wt=(h3-h4) #work done in turbine in Btu/lbm\n", - "\n", - "nth=((h3-h4)-wp)/(h3-h2);\n", - "print\"Percentage efficiency =\",round(nth*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage efficiency = 36.9 %\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.3:Pg-433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ques 3\n", - "#To determine the efficiency of a cycle\n", - "\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=4000;#Exit pressure in kPa\n", - "P1=10;#Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp;#enthalpy in kJ/kg\n", - "#2-Inlet state for boiler\n", - "#3-Exit state for Boiler\n", - "h3=3213.6;#Enthalpy in kJ/kg from table\n", - "#3-Inlet state for high pressure turbine\n", - "#4-Exit state for high pressure turbine\n", - "#s3=s4(Entropy remain same)\n", - "s4=6.7690;#Entropy in kJ/kg from table\n", - "sf=1.7766;#Entropy at liquid state in kJ/kg from table\n", - "sfg=5.1193;#Entropy difference for vapor and liquid state in kJ/kg from table\n", - "x4=(s4-sf)/sfg;#x-factor\n", - "hf=604.7#Enthalpy of liquid state in kJ/kg\n", - "hfg=2133.8;#Enthalpy difference in kJ/kg for turbine\n", - "h4=hf+x4*hfg;#Enthalpy in kJ/kg\n", - "#5-Inlet state for low pressure turbine\n", - "#6-Exit pressure for low pressure turbine\n", - "sf=0.6493;#Entropy in liquid state in kJ/kg for turbine\n", - "h5=3273.4;#enthalpy in kJ/kg \n", - "s5=7.8985;#Entropy in kJ/kg\n", - "sfg=7.5009;#entropy diff in kJ/kg \n", - "x6=(s5-sf)/sfg;#x-factor\n", - "hfg=2392.8;#enthalpy difference for low pressure turbine in kj/kg\n", - "h6=h1+x6*hfg;#entropy in kg/kg\n", - "wt=(h3-h4)+(h5-h6);#work output in kJ/kg\n", - "qh=(h3-h2)+(h5-h4);\n", - "\n", - "nth=(wt-wp)/qh;\n", - "print\" Percentage efficiency =\",round(nth*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Percentage efficiency = 35.9 %\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.4:Pg-438" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#Efficiency of Refrigeration cycle\n", - "\n", - "#from previous examples\n", - "h1=191.8;#kJ/kg\n", - "h5=3213.6;#kg/kg\n", - "h6=2685.7;#kJ/kg\n", - "h7=2144.1;#kJ/kg\n", - "h3=604.7;#kJ/kg\n", - "#1-Inlet state of pump\n", - "#2-Exit state of pump\n", - "P2=400;#Exit pressure in kPa\n", - "P1=10; #Inlet pressure in kPa\n", - "v=0.00101;#specific weight of water in m^3/kg\n", - "wp1=v*(P2-P1);#work done for low pressure pump in kJ/kg\n", - "h1=191.8;#Enthalpy in kJ/kg from table\n", - "h2=h1+wp1;#enthalpy in kJ/kg\n", - "#5-Inlet state for turbine\n", - "#6,7-Exit state for turbine\n", - "y=(h3-h2)/(h6-h2);#extraction fraction\n", - "wt=(h5-h6)+(1-y)*(h6-h7);#turbine work in kJ/kg\n", - "#3-Inlet for high pressure pump\n", - "#4-Exit for high pressure pump\n", - "P3=400;#kPa\n", - "P4=4000;#kPa\n", - "v=0.001084;#specific heat for 3-4 process in m^3/kg\n", - "wp2=v*(P4-P3);#work done for high pressure pump\n", - "h4=h3+wp2;#Enthalpy in kJ/kg\n", - "wnet=wt-(1-y)*wp1-wp2;\n", - "qh=h5-h4;#Heat output in kJ/kg\n", - "nth=wnet/qh;\n", - "print\" Refrigerator Efficiency =\",round(nth*100,1),\"%\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Refrigerator Efficiency = 37.5 %\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.5:Pg-443" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#To determine thermal efficiency of cycle\n", - "\n", - "#5-Inlet state for turbine\n", - "#6-Exit state for turbine\n", - "#h-Enthalpy at a state \n", - "#s-Entropy at a state\n", - "#from steam table\n", - "h5=3169.1;#kJ/kg\n", - "s5=6.7235;#kJ/kg\n", - "s6s=s5;\n", - "sf=0.6493;#Entropy for liquid state in kJ/kg\n", - "sfg=7.5009;#Entropy difference in kJ/kg\n", - "hf=191.8;#kJ/kg\n", - "hfg=2392.8;#Enthalpy difference in kJ/kg\n", - "x6s=(s6s-sf)/sfg;#x-factor\n", - "h6s=hf+x6s*hfg;#kJ/Kg at state 6s\n", - "nt=0.86;#turbine efficiency given\n", - "wt=nt*(h5-h6s);\n", - "#1-Inlet state for pump\n", - "#2-Exit state for pump\n", - "np=0.80;#pump efficiency given\n", - "v=0.001009;#specific heat in m^3/kg\n", - "P2=5000;#kPa\n", - "P1=10;#kPa\n", - "wp=v*(P2-P1)/np;#Work done in pump in kJ/kg\n", - "wnet=wt-wp;#net work in kJ/kg\n", - "#3-Inlet state for boiler\n", - "#4-Exit state for boiler\n", - "h3=171.8;#in kJ/kg from table\n", - "h4=3213.6;#kJ/kg from table\n", - "qh=h4-h3;\n", - "nth=wnet/qh;\n", - "print \"Cycle Efficiency =\",round(nth*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cycle Efficiency = 29.2 %\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.5E:Pg-445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#To determine thermal efficiency of cycle\n", - "\n", - "#5-Inlet state for turbine\n", - "#6-Exit state for turbine\n", - "#h-Enthalpy at a state \n", - "#s-Entropy at a state\n", - "#from steam table\n", - "h5=1386.8;#Btu/lbm\n", - "s5=1.6248;#Btu/lbm\n", - "s6s=s5;\n", - "sf=1.9779;#Entropy for liquid state in Btu/lbm\n", - "sfg=1.8453;#Entropy difference in Btu/lbm\n", - "hf=1105.8;# Btu/lbm\n", - "hfg=1036.0;#Enthalpy difference in Btu/lbm\n", - "x6s=(s6s-sf)/sfg;#x-factor\n", - "h6s=hf+x6s*hfg;#Btu/lbm at state 6s\n", - "nt=0.86;#turbine efficiency given\n", - "wt=nt*(h5-h6s);\n", - "#1-Inlet state for pump\n", - "#2-Exit state for pump\n", - "np=0.80;#pump efficiency given\n", - "v=0.016;#specific heat in ft^3/lbm\n", - "P2=800.0;# lbf/in^2\n", - "P1=1.0;# lbf/in^2\n", - "wp=(v*(P2-P1)*144.0)/(np*778.0);#Work done in pump in Btu/lbm\n", - "wnet=wt-wp;#net work in Btu/lbm\n", - "#3-Inlet state for boiler\n", - "#4-Exit state for boiler\n", - "h3=65.1;#in Btu/lbm from table\n", - "h4=1407.6;# Btu/lbm from table\n", - "qh=h4-h3;\n", - "nth=wnet/qh;\n", - "print \"Cycle Efficiency =\",round(nth*100,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cycle Efficiency = 30.48 %\n" - ] - } - ], - "prompt_number": 60 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.6:Pg-451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#to determine the rate of refrigeration\n", - "\n", - "# refer to fig 11.21 in book\n", - "mdot=0.03 # mass flow rate in Kg/s\n", - "T1=-20 # temperature in evaporator in celsius\n", - "T3=40 #temperature in evaporator in Celsius\n", - "P2=1017 # saturation pressure in KPa\n", - "\n", - "# from table of R-134a refrigerant\n", - "h1=386.1 # enthalpy at state 1 in kJ/kg,\n", - "S1=1.7395 # entropy at state 1 in kJ/kg.K\n", - "S2=S1 # isentropic process\n", - "T2=47.7# corresponding value to S2 in table of R-134a in degree celsius\n", - "h2=428.4 # corresponding value to S2 in table of R-134a in kJ/kg\n", - "wc=h2-h1 # work done in compressor in kJ/kg\n", - "h4=h3=256.5 #enthalpy at state 4 and 3 in kJ/kg\n", - "qL=h1-h4 #Heat rejected in kJ/kg\n", - "\n", - "B=qL/wc # COP\n", - "\n", - "print\" the COP of the plant is\",round(B,2)\n", - "print\" the refrigeration rate is\",round(mdot*qL,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " the COP of the plant is 3.06\n", - " the refrigeration rate is 3.89\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.7:Pg-454" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#to determine the COP of cycle\n", - "\n", - "P1=125 # pressure at state 1 in kPa\n", - "P2=1.2 # pressure at state 2 in MPa\n", - "P3=1.19 # pressure at state 3 in MPa,\n", - "P4=1.16 # pressure at state 4 in MPa,\n", - "P5=1.15 # pressure at state 5 in MPa,\n", - "P6=P7=140 # pressure at state 6 and 7 in kPa,\n", - "P8=130 # pressure at state 8 in kPa,\n", - "T1=-10 #temperaure at state 1 in \u25e6C\n", - "T2=100 #temperaure at state 2 in \u25e6C\n", - "T3=80 #temperaure at state 3 in \u25e6C\n", - "T4=45 #temperaure at state 4 in \u25e6C\n", - "T5=40 #temperaure at state 5 in \u25e6C\n", - "T8=-20 #temperaure at state 8 in \u25e6C\n", - "q=-4 # heat transfer in kJ/Kg\n", - "\n", - "#x6=x7 quality condition given in question\n", - "\n", - "\n", - "# the following values are taken from table for refrigerant R-134a\n", - "h1=394.9 # enthalpy at state 1 in kJ/kg\n", - "h2=480.9 # enthalpy at state 2 in kJ/kg\n", - "h8=386.6 # enthalpy at state 8 in kJ/kg\n", - "wc=h2-h1-q # from first law\n", - "h5=h6=h7=256.4 # as x6=x7 and from table at state 5 in Kj/Kg\n", - "qL=h8-h7 # from first law \n", - "B=qL/wc # COP\n", - "print\" the COP of the plant is\",round(B,3)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " the COP of the plant is 1.447\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter12.ipynb b/Fundamentals_Of_Thermodynamics/Chapter12.ipynb deleted file mode 100755 index 75910c56..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter12.ipynb +++ /dev/null @@ -1,486 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e3e9cb7f43080b67fa2a22d273814843783e7598e3258877edb209ca16f99bdc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "CHAPTER13:Gas Mixtures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.1:Pg-480" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#Standard brayton cycle\n", - "\n", - "#1-Inlet for compressor\n", - "#2-Exit for compressor\n", - "#T-Temperature at a state\n", - "#P-Pressure at a state\n", - "T1=288.2;#K\n", - "P2=1000.0;#kPa\n", - "P1=100.0;#kPa\n", - "k=1.4;\n", - "T2=T1*(P2/P1)**(1.0-1/k);#K\n", - "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", - "wc=Cp*(T2-T1);#compressor work in kJ/kg;\n", - "print\" Temperature T2 =\",round(T2,2),\"K\"\n", - "print\" Compressor work =\",round(wc,1),\"kJ/kg\"\n", - "#3-Turbine Inlet\n", - "#4-Turbine Exit\n", - "P4=P1;\n", - "P3=P2;\n", - "T3=1373.2;#K\n", - "T4=T3*(P4/P3)**(1-1/k);#K\n", - "wt=Cp*(T3-T4);\n", - "wnet=wt-wc;\n", - "print\" Temperature T3 =\",round(T3,2),\" K\"\n", - "print\" Temperature T4 =\",round(T4),\"K\"\n", - "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", - "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", - "#2-Also high temperature heat exchanger Inlet\n", - "#3-(-do-) Exit\n", - "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", - "#4-high temp heat exchanger inlet\n", - "#1-(-do-) Exit\n", - "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", - "nth=wnet/qh;\n", - "print\" Thermal Efficiency of cycle =\",round(nth*100,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature T2 = 556.43 K\n", - " Compressor work = 269.3 kJ/kg\n", - " Temperature T3 = 1373.2 K\n", - " Temperature T4 = 711.0 K\n", - " Turbine work = 664.6 kJ/kg\n", - " Net work = 395.3 kJ/kg\n", - " Thermal Efficiency of cycle = 48.21 %\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.2:Pg-481" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Calculation mistake in book\n", - "#ques2\n", - "#Standard brayton cycle\n", - "\n", - "#Calculation mistake in book\n", - "#1-Inlet for compressor\n", - "#2-Exit for compressor\n", - "#T-Temperature at a state\n", - "#P-Pressure at a state\n", - "T1=288.2;#K\n", - "P2=1000.0;#kPa\n", - "P1=100.0;#kPa\n", - "k=1.4;\n", - "T2s=T1*(P2/P1)**(1-1/k);#K\n", - "nc=.80;#Compressor Efficiency\n", - "T2=T1+(T2s-T1)/0.80;\n", - "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", - "wc=Cp*(T2-T1);#compressor work in kJ/kg\n", - "wc=round(wc)\n", - "print\" Temperature T2 =\",round(T2,2),\"K\"\n", - "print\" Compressor work =\",(wc),\"kJ/kg\"\n", - "#3-Turbine Inlet\n", - "#4-Turbine Exit\n", - "P4=P1;\n", - "P3=P2;\n", - "T3=1373.2;#K\n", - "T4s=T3*(P4/P3)**(1-1.0/k);#K\n", - "nt=0.85;#turbine Efficiency\n", - "T4=T3-(T3-T4s)*0.85;\n", - "wt=Cp*(T3-T4);\n", - "wnet=wt-wc;\n", - "print\" Temperature T3 =\",round(T3,1),\"K\"\n", - "print\" Temperature T4 =\",round(T4,1),\"K\"\n", - "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", - "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", - "#2-Also high temperature heat exchanger Inlet\n", - "#3-(-do-) Exit\n", - "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", - "#4-high temp heat exchanger inlet\n", - "#1-(-do-) Exit\n", - "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", - "nth=wnet/qh;\n", - "print\" Thermal Efficiency of cycle =\",round(nth*100),\"percent\"\n", - "#some answers are have acceptable difference beacause of approximization in book but here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature T2 = 623.48 K\n", - " Compressor work = 337.0 kJ/kg\n", - " Temperature T3 = 1373.2 K\n", - " Temperature T4 = 810.5 K\n", - " Turbine work = 564.91 kJ/kg\n", - " Net work = 227.91 kJ/kg\n", - " Thermal Efficiency of cycle = 30.0 percent\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.3:Pg-486" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#efficiency of the cycle\n", - "\n", - "wnet=395.2;#kJ/kg from example no 1\n", - "#Tx=T4\n", - "Tx=710.8;#K from example no 1\n", - "T3=1373.2;#K from example no 1\n", - "Cp=1.004;#specific heat in kJ/kg \n", - "qh=Cp*(T3-Tx);\n", - "nth=wnet/qh;\n", - "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Thermal efficiency = 59.4 percent\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.4:Pg-486" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#Calculation of work in the given cycle\n", - "import math\n", - "R=0.287;#gas constant \n", - "T1=288.2;#compressor temperature K\n", - "T2=1373.2;#K turbine temperature K\n", - "#Pe/Pi=c=10, Pi/Pe=1/c from example 12.1\n", - "c=10.0;\n", - "wc=-R*T1*math.log(c);\n", - "print\" Isothermal work in compressor =\",round(wc,1),\"kJ/kg\"\n", - "wt=-R*T2*math.log(1/c);\n", - "print\" Isothermal work in turbine =\",round(wt,1),\"kJ/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Isothermal work in compressor = -190.5 kJ/kg\n", - " Isothermal work in turbine = 907.5 kJ/kg\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.5:Pg-491" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#air standard cycle for jet repulsion\n", - "import math\n", - "#1-compressor inlet\n", - "#2-Compressor exit\n", - "#P-Pressure at given point\n", - "#T-Temperature at given point\n", - "P1=100;#kPa\n", - "P2=1000;#kPa\n", - "T1=288.2;#K\n", - "T2=556.8;#K\n", - "wc=269.5;#from ex 12.1 work done in compressor in kJ/kg\n", - "#2-Burner inlet\n", - "#3-Burner exit\n", - "P3=1000;#kPa\n", - "T3=1373.2;#K\n", - "#wc=wt\n", - "Cp=1.004;#specific enthalpy of heat at constant pressure in kJ/kg\n", - "k=1.4;\n", - "T4=T3-wc/Cp;\n", - "P4=P3*(T4/T3)**(1-1/k);\n", - "#from s4=s5 and h4=h5+v2/2 we get\n", - "T5=710.8#K, from second law\n", - "v=math.sqrt(2*Cp*1000*(T4-T5));#m/s\n", - "print\" Velocity of air leaving the nozel =\",round(v),\"m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Velocity of air leaving the nozel = 889.0 m/s\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.6:Pg-494" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#air standard refrigeration cycle\n", - "\n", - "#1-compressor inlet\n", - "#2-compressor exit\n", - "P1=100;#kPa\n", - "P2=500;#kPa\n", - "k=1.4;\n", - "rp=P2/P1;\n", - "cop=(rp**(1-1/k)-1)**-1;\n", - "print\" Coefficient of performance =\",round(cop,2)\n", - "#3-Expander inlet\n", - "#4-Expander exit\n", - "P3=P2;\n", - "P4=P1;\n", - "T3=288.23;#K, given and fixed\n", - "T4=T3/(P3/P4)**(1-1/k);\n", - "T1=253.2;#K, given\n", - "Cp=1.004;#Specific heat at cons pressure in kJ/kg\n", - "ql=Cp*(T1-T4);#heat released in kJ/kg\n", - "P=1#power required in kW \n", - "ms=P/ql;#kg/s\n", - "print\" Rate at which the air enter the compressor =\",round(ms,3),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Coefficient of performance = 1.71\n", - " Rate at which the air enter the compressor = 0.014 kg/s\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.7:Pg-498" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#the otto cycle\n", - "\n", - "#1-compressor inlet\n", - "#2-compressor exit\n", - "P1=100.0;#kPa\n", - "T1=288.2;#K\n", - "R=0.287;#gas constant\n", - "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", - "rv=10.0;#compression ratio given\n", - "k=1.4;#constant\n", - "T2=T1*rv**(k-1);#K\n", - "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", - "P2=P1*rv**k;#kPa\n", - "print\" Pressure at compressor exit, P2 =\",round(P2/1000,2),\"MPa\"\n", - "v2=v1/rv;#specific heat at exit in m^3/kg\n", - "#23-heat addition process\n", - "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", - "q23=1800.0;#kJ/kg heat addition, given\n", - "Cv=0.717;#specific heat at constant volume in kJ/kg\n", - "T3=T2+q23/Cv;#K\n", - "print\" Initial Temperature during heat additon process, T3 =\",round(T3,2),\"K\"\n", - "P3=P2*(T3/T2);#kPa\n", - "print\" Initial pressure during heat addition process, P3 =\",round(P3/1000,3),\"MPa\"\n", - "r=10.0;#k=V4/V3=P3/P4\n", - "T4=T3*(1/r)**(k-1);\n", - "print\" Final temperature during heat addition process, T4 =\",round(T4,3),\"K\";\n", - "P4=P3/r**k;#kPa\n", - "print\" Final pressure during heat addition process, P4 =\",round(P4/1000,4),\"MPa\"\n", - "nth=1-1/r**(k-1);#thermal efficiency\n", - "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"\n", - "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", - "wnet=q23+q41;\n", - "mep=wnet/(v1-v2);#effective mean pressure n kPa\n", - "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature at compressor exit, T2 = 723.9 K\n", - " Pressure at compressor exit, P2 = 2.51 MPa\n", - " Initial Temperature during heat additon process, T3 = 3234.39 K\n", - " Initial pressure during heat addition process, P3 = 11.223 MPa\n", - " Final temperature during heat addition process, T4 = 1287.632 K\n", - " Final pressure during heat addition process, P4 = 0.4468 MPa\n", - " Thermal efficiency = 60.2 percent\n", - " Mean effective pressure = 1455.37 kPa\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.8:Pg-501" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques8\n", - "#the diesel cycle\n", - "\n", - "#1-compressor inlet\n", - "#2-compressor exit\n", - "P1=100;#kPa\n", - "T1=288.2;#K\n", - "R=0.287;#gas constant\n", - "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", - "rv=20;#compression ratio given\n", - "k=1.4;#constant\n", - "T2=T1*rv**(k-1);#K\n", - "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", - "P2=P1*rv**k;#kPa\n", - "print\" Pressure at compressor exit, P2 =\",round(P2/1000,3),\" MPa\"\n", - "v2=v1/rv;#specific heat at exit in m^3/kg\n", - "#23-heat addition process\n", - "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", - "q23=1800;#kJ/kg heat addition, given\n", - "Cv=.717;\n", - "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", - "T3=T2+q23/Cp;#K\n", - "print\" Initial Temperature during heat addition process, T3 =\",round(T3,2),\"K\"\n", - "r=T3/T2;#T3/T2=V3/V2=r\n", - "v3=r*v2;\n", - "T4=T3/(v1/v3)**(k-1);\n", - "print\" Final temperature during heat addition process, T4 =\",round(T4),\"K\"\n", - "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", - "wnet=q23+q41;\n", - "mep=wnet/(v1-v2);#effective mean pressure in kPa\n", - "qh=1800;#heat transfer in kJ/kg\n", - "nth=wnet/qh;#thermal efficiency\n", - "\n", - "print\" Thermal efficiency =\",round(nth*100,1),\"percent\"\n", - "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature at compressor exit, T2 = 955.2 K\n", - " Pressure at compressor exit, P2 = 6.629 MPa\n", - " Initial Temperature during heat addition process, T3 = 2748.05 K\n", - " Final temperature during heat addition process, T4 = 1265.0 K\n", - " Thermal efficiency = 61.1 percent\n", - " Mean effective pressure = 1399.18 kPa\n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb deleted file mode 100755 index e2686e4a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb +++ /dev/null @@ -1,478 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:83a0af04c694ab4b0ad1a0fe252ffa0bd8e87abc642c64323f0c2a0d18dd9f5d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "CHAPTER13:Gas Mixtures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.1:Pg-480" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#Standard brayton cycle\n", - "\n", - "#1-Inlet for compressor\n", - "#2-Exit for compressor\n", - "#T-Temperature at a state\n", - "#P-Pressure at a state\n", - "T1=288.2;#K\n", - "P2=1000.0;#kPa\n", - "P1=100.0;#kPa\n", - "k=1.4;\n", - "T2=T1*(P2/P1)**(1.0-1/k);#K\n", - "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", - "wc=Cp*(T2-T1);#compressor work in kJ/kg;\n", - "print\" Temperature T2 =\",round(T2,2),\"K\"\n", - "print\" Compressor work =\",round(wc,1),\"kJ/kg\"\n", - "#3-Turbine Inlet\n", - "#4-Turbine Exit\n", - "P4=P1;\n", - "P3=P2;\n", - "T3=1373.2;#K\n", - "T4=T3*(P4/P3)**(1-1/k);#K\n", - "wt=Cp*(T3-T4);\n", - "wnet=wt-wc;\n", - "print\" Temperature T3 =\",round(T3,2),\" K\"\n", - "print\" Temperature T4 =\",round(T4),\"K\"\n", - "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", - "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", - "#2-Also high temperature heat exchanger Inlet\n", - "#3-(-do-) Exit\n", - "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", - "#4-high temp heat exchanger inlet\n", - "#1-(-do-) Exit\n", - "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", - "nth=wnet/qh;\n", - "print\" Thermal Efficiency of cycle =\",round(nth*100,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature T2 = 556.43 K\n", - " Compressor work = 269.3 kJ/kg\n", - " Temperature T3 = 1373.2 K\n", - " Temperature T4 = 711.0 K\n", - " Turbine work = 664.6 kJ/kg\n", - " Net work = 395.3 kJ/kg\n", - " Thermal Efficiency of cycle = 48.21 %\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.2:Pg-481" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Calculation mistake in book\n", - "#ques2\n", - "#Standard brayton cycle\n", - "\n", - "#Calculation mistake in book\n", - "#1-Inlet for compressor\n", - "#2-Exit for compressor\n", - "#T-Temperature at a state\n", - "#P-Pressure at a state\n", - "T1=288.2;#K\n", - "P2=1000.0;#kPa\n", - "P1=100.0;#kPa\n", - "k=1.4;\n", - "T2s=T1*(P2/P1)**(1-1/k);#K\n", - "nc=.80;#Compressor Efficiency\n", - "T2=T1+(T2s-T1)/0.80;\n", - "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", - "wc=Cp*(T2-T1);#compressor work in kJ/kg\n", - "wc=round(wc)\n", - "print\" Temperature T2 =\",round(T2,2),\"K\"\n", - "print\" Compressor work =\",(wc),\"kJ/kg\"\n", - "#3-Turbine Inlet\n", - "#4-Turbine Exit\n", - "P4=P1;\n", - "P3=P2;\n", - "T3=1373.2;#K\n", - "T4s=T3*(P4/P3)**(1-1.0/k);#K\n", - "nt=0.85;#turbine Efficiency\n", - "T4=T3-(T3-T4s)*0.85;\n", - "wt=Cp*(T3-T4);\n", - "wnet=wt-wc;\n", - "print\" Temperature T3 =\",round(T3,1),\"K\"\n", - "print\" Temperature T4 =\",round(T4,1),\"K\"\n", - "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", - "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", - "#2-Also high temperature heat exchanger Inlet\n", - "#3-(-do-) Exit\n", - "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", - "#4-high temp heat exchanger inlet\n", - "#1-(-do-) Exit\n", - "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", - "nth=wnet/qh;\n", - "print\" Thermal Efficiency of cycle =\",round(nth*100),\"percent\"\n", - "#some answers are have acceptable difference beacause of approximization in book but here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature T2 = 623.48 K\n", - " Compressor work = 337.0 kJ/kg\n", - " Temperature T3 = 1373.2 K\n", - " Temperature T4 = 810.5 K\n", - " Turbine work = 564.91 kJ/kg\n", - " Net work = 227.91 kJ/kg\n", - " Thermal Efficiency of cycle = 30.0 percent\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.3:Pg-486" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#efficiency of the cycle\n", - "\n", - "wnet=395.2;#kJ/kg from example no 1\n", - "#Tx=T4\n", - "Tx=710.8;#K from example no 1\n", - "T3=1373.2;#K from example no 1\n", - "Cp=1.004;#specific heat in kJ/kg \n", - "qh=Cp*(T3-Tx);\n", - "nth=wnet/qh;\n", - "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Thermal efficiency = 59.4 percent\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.4:Pg-486" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#Calculation of work in the given cycle\n", - "import math\n", - "R=0.287;#gas constant \n", - "T1=288.2;#compressor temperature K\n", - "T2=1373.2;#K turbine temperature K\n", - "#Pe/Pi=c=10, Pi/Pe=1/c from example 12.1\n", - "c=10.0;\n", - "wc=-R*T1*math.log(c);\n", - "print\" Isothermal work in compressor =\",round(wc,1),\"kJ/kg\"\n", - "wt=-R*T2*math.log(1/c);\n", - "print\" Isothermal work in turbine =\",round(wt,1),\"kJ/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Isothermal work in compressor = -190.5 kJ/kg\n", - " Isothermal work in turbine = 907.5 kJ/kg\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.5:Pg-491" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#air standard cycle for jet repulsion\n", - "import math\n", - "#1-compressor inlet\n", - "#2-Compressor exit\n", - "#P-Pressure at given point\n", - "#T-Temperature at given point\n", - "P1=100;#kPa\n", - "P2=1000;#kPa\n", - "T1=288.2;#K\n", - "T2=556.8;#K\n", - "wc=269.5;#from ex 12.1 work done in compressor in kJ/kg\n", - "#2-Burner inlet\n", - "#3-Burner exit\n", - "P3=1000;#kPa\n", - "T3=1373.2;#K\n", - "#wc=wt\n", - "Cp=1.004;#specific enthalpy of heat at constant pressure in kJ/kg\n", - "k=1.4;\n", - "T4=T3-wc/Cp;\n", - "P4=P3*(T4/T3)**(1-1/k);\n", - "#from s4=s5 and h4=h5+v2/2 we get\n", - "T5=710.8#K, from second law\n", - "v=math.sqrt(2*Cp*1000*(T4-T5));#m/s\n", - "print\" Velocity of air leaving the nozel =\",round(v),\"m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Velocity of air leaving the nozel = 889.0 m/s\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.6:Pg-494" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#air standard refrigeration cycle\n", - "\n", - "#1-compressor inlet\n", - "#2-compressor exit\n", - "P1=100;#kPa\n", - "P2=500;#kPa\n", - "k=1.4;\n", - "rp=P2/P1;\n", - "cop=(rp**(1-1/k)-1)**-1;\n", - "print\" Coefficient of performance =\",round(cop,2)\n", - "#3-Expander inlet\n", - "#4-Expander exit\n", - "P3=P2;\n", - "P4=P1;\n", - "T3=288.23;#K, given and fixed\n", - "T4=T3/(P3/P4)**(1-1/k);\n", - "T1=253.2;#K, given\n", - "Cp=1.004;#Specific heat at cons pressure in kJ/kg\n", - "ql=Cp*(T1-T4);#heat released in kJ/kg\n", - "P=1#power required in kW \n", - "ms=P/ql;#kg/s\n", - "print\" Rate at which the air enter the compressor =\",round(ms,3),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Coefficient of performance = 1.71\n", - " Rate at which the air enter the compressor = 0.014 kg/s\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.7:Pg-498" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#the otto cycle\n", - "\n", - "#1-compressor inlet\n", - "#2-compressor exit\n", - "P1=100.0;#kPa\n", - "T1=288.2;#K\n", - "R=0.287;#gas constant\n", - "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", - "rv=10.0;#compression ratio given\n", - "k=1.4;#constant\n", - "T2=T1*rv**(k-1);#K\n", - "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", - "P2=P1*rv**k;#kPa\n", - "print\" Pressure at compressor exit, P2 =\",round(P2/1000,2),\"MPa\"\n", - "v2=v1/rv;#specific heat at exit in m^3/kg\n", - "#23-heat addition process\n", - "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", - "q23=1800.0;#kJ/kg heat addition, given\n", - "Cv=0.717;#specific heat at constant volume in kJ/kg\n", - "T3=T2+q23/Cv;#K\n", - "print\" Initial Temperature during heat additon process, T3 =\",round(T3,2),\"K\"\n", - "P3=P2*(T3/T2);#kPa\n", - "print\" Initial pressure during heat addition process, P3 =\",round(P3/1000,3),\"MPa\"\n", - "r=10.0;#k=V4/V3=P3/P4\n", - "T4=T3*(1/r)**(k-1);\n", - "print\" Final temperature during heat addition process, T4 =\",round(T4,3),\"K\";\n", - "P4=P3/r**k;#kPa\n", - "print\" Final pressure during heat addition process, P4 =\",round(P4/1000,4),\"MPa\"\n", - "nth=1-1/r**(k-1);#thermal efficiency\n", - "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"\n", - "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", - "wnet=q23+q41;\n", - "mep=wnet/(v1-v2);#effective mean pressure n kPa\n", - "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature at compressor exit, T2 = 723.9 K\n", - " Pressure at compressor exit, P2 = 2.51 MPa\n", - " Initial Temperature during heat additon process, T3 = 3234.39 K\n", - " Initial pressure during heat addition process, P3 = 11.223 MPa\n", - " Final temperature during heat addition process, T4 = 1287.632 K\n", - " Final pressure during heat addition process, P4 = 0.4468 MPa\n", - " Thermal efficiency = 60.2 percent\n", - " Mean effective pressure = 1455.37 kPa\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.8:Pg-501" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques8\n", - "#the diesel cycle\n", - "\n", - "#1-compressor inlet\n", - "#2-compressor exit\n", - "P1=100;#kPa\n", - "T1=288.2;#K\n", - "R=0.287;#gas constant\n", - "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", - "rv=20;#compression ratio given\n", - "k=1.4;#constant\n", - "T2=T1*rv**(k-1);#K\n", - "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", - "P2=P1*rv**k;#kPa\n", - "print\" Pressure at compressor exit, P2 =\",round(P2/1000,3),\" MPa\"\n", - "v2=v1/rv;#specific heat at exit in m^3/kg\n", - "#23-heat addition process\n", - "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", - "q23=1800;#kJ/kg heat addition, given\n", - "Cv=.717;\n", - "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", - "T3=T2+q23/Cp;#K\n", - "print\" Initial Temperature during heat addition process, T3 =\",round(T3,2),\"K\"\n", - "r=T3/T2;#T3/T2=V3/V2=r\n", - "v3=r*v2;\n", - "T4=T3/(v1/v3)**(k-1);\n", - "print\" Final temperature during heat addition process, T4 =\",round(T4),\"K\"\n", - "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", - "wnet=q23+q41;\n", - "mep=wnet/(v1-v2);#effective mean pressure in kPa\n", - "qh=1800;#heat transfer in kJ/kg\n", - "nth=wnet/qh;#thermal efficiency\n", - "\n", - "print\" Thermal efficiency =\",round(nth*100,1),\"percent\"\n", - "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Temperature at compressor exit, T2 = 955.2 K\n", - " Pressure at compressor exit, P2 = 6.629 MPa\n", - " Initial Temperature during heat addition process, T3 = 2748.05 K\n", - " Final temperature during heat addition process, T4 = 1265.0 K\n", - " Thermal efficiency = 61.1 percent\n", - " Mean effective pressure = 1399.18 kPa\n" - ] - } - ], - "prompt_number": 47 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter13.ipynb b/Fundamentals_Of_Thermodynamics/Chapter13.ipynb deleted file mode 100755 index 95893bd9..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter13.ipynb +++ /dev/null @@ -1,262 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6cc89f09586fc1fc226ee69c300e69ecaeae3fbafe1ae419c1c6cbc4ae7dcf83" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "CHAPTER13:Gas Mixtures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.3:Pg-533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#calculating humidity ratio, dew point,mass of air, mass of vapor\n", - "\n", - "r=0.70;#relative humidity\n", - "Pg=5.628;#saturation pressure in kPa\n", - "Pv=r*Pg;#vapour pressure in kPa\n", - "P=100;#net pressure kPa \n", - "Pa=P-Pv;#Partial pressure of air\n", - "w=0.622*Pv/Pa;#humidity ratio formula\n", - "V=100;#volume in m^3\n", - "Ra=0.287;#gas constant for water vapour\n", - "T=308.2;#Temperature in K\n", - "ma=Pa*V/(Ra*T);#mass in kg\n", - "mv=w*ma;#mass of vapour\n", - "print\" Mass of vapour is\",round(mv,3),\"Kg \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Mass of vapour is 2.77 Kg \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.4:Pg-534" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4 \n", - "#calculating amount of water vapour condensed on cooling\n", - "\n", - "#from example 3\n", - "w1=0.0255;#w1=w, humidity ratio at initial temperature\n", - "ma=108.6;#mass of air in kg\n", - "P=100;#kPa net pressure\n", - "#at 5 C mixture is saturated so Pv2=Pg2\n", - "Pg2=0.8721;\n", - "Pv2=Pg2;\n", - "w2=0.622*Pv2/(P-Pg2);\n", - "mc=ma*(w1-w2);\n", - "print\"Mass of vapour condense is \",round(mc,3),\"kg \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass of vapour condense is 2.175 kg \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.5:Pg-536" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#calculating heat transfer per kilogram of dry air\n", - "\n", - "#1-inlet state\n", - "#2-Exit state\n", - "r1=0.80;#realtive humidity at state 1\n", - "Pg1=4.246;#saturation pressure of vapour in kPa\n", - "P1=105.0;#net pressure at state 1 in kPa\n", - "P2=100.0;#net pressure at state 2 in kPa\n", - "Pv1=r1*Pg1;#partial pressure of vapour in kPa\n", - "w1=0.622*Pv1/(P1-Pv1);#humidity ratio at state 1\n", - "r2=0.95;#relative humidity at state 2\n", - "Pg2=1.7051;#saturation pressure of vapour in kPa\n", - "Pv2=r2*Pg2;#partial pressure of vapour in kPa\n", - "w2=0.622*Pv2/(P2-Pv2);#humidity ratio at state 2\n", - "T1=30.0;#C\n", - "T2=15.0;#C\n", - "Cp=1.004;#specific heat of water vapour in kJ/kg\n", - "hv2=2528.9;#enthalpy of vapourisation of vapour in kJ/kg\n", - "hv1=2556.3;#enthalpy of vapourisation of vapour in kJ/kg\n", - "hl2=62.99;#enthalpy of \n", - "q=Cp*(T2-T1)+w2*hv2-w1*hv1+hl2*(w1-w2);#kJ/kg\n", - "print\" Heat transferred per unit mass =\",round(q,1),\"kJ/kg of dry air\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Heat transferred per unit mass = -41.7 kJ/kg of dry air\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.6:Pg-537" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#calculating heat transferred in gas vapour mixture\n", - "\n", - "#n-Nitrogen\n", - "#v-water vapour\n", - "Pn2=1995;#Pressure of nitrogen in kPa\n", - "V=0.5;#Volume in m^3\n", - "Rn2=0.2968;#Gas constant for nitrogen in kJ/kg.K\n", - "Rv=0.4615;#gas constant for vapour\n", - "T1=323.2;#Temperature in K\n", - "T2=283.2;#Temperature in K\n", - "Pv1=5;#Pressure of water vapour in kPa at state 1\n", - "Pv2=1.2276;#Pressure of water vapour in kPa at state 2\n", - "mn2=Pn2*V/(Rn2*T1);#mass of nitrogen\n", - "mv1=Pv1*V/(Rv*T1);#mass of vapour in kg\n", - "mv2=Pv2*V/(Rv*T2);#mass of vapour in kg\n", - "ml2=mv1-mv2;#mass of liquid condensed n kg\n", - "uv1=2443.1;#specific internal energy of vapour in kJ/kg at state 1\n", - "uv2=2389.2;#specific internal energy of vapour in kJ/kg at state 2\n", - "ul2=42.0;#specific internal energy of liquid water in kJ/kg\n", - "Cv=0.745;#specific heat at constant volume in kJ/kg.K\n", - "Q=mn2*Cv*(T2-T1)+mv2*uv2+ml2*ul2-mv1*uv1;\n", - "print\"Heat transferred =\",round(Q,2),\"kJ \"\n", - "\n", - "#the answer is different in book due to intermediate approximization " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat transferred = -339.1 kJ \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.7:Pg-539" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#calculating humidity ratio and relative humidity \n", - "\n", - "#1-Inlet state\n", - "#2-Exit state\n", - "P=100;#net pressure n kPa \n", - "#it is steady state adiabatic process\n", - "#water vapour leaving is saturated so Pv2=Pg2\n", - "Pg2=2.339;#saturation pressure of vapour in kPa\n", - "Pv2=Pg2;#partial pressure of vapour\n", - "w2=0.622*Pv2/(P-Pg2);\n", - "Cpa=1.004;#specific heat n kJ/kg/K\n", - "T2=20;# final temp in C\n", - "T1=30;# initial temp in C\n", - "Hfg2=2454.1;#specific heat difference at state 2 in kJ/kg\n", - "hv1=2556.3;#enthalpy of water vapour at state 1 in kJ/kg\n", - "hl2=83.96;#enthalpy of liquid water in kJ/kg\n", - "w1=(Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2);\n", - "print \" Relative humidity =\",round(w1,4)\n", - "#also w1=0.622*Pv1/(100-Pv2)\n", - "Pv1=100*w1/(0.622+w1);\n", - "Pg1=4.246;#saturation pressure at state 1 in kPa\n", - "r=Pv1/Pg1;#humidity ratio\n", - "print\" Humidity ratio =\",round(r,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Relative humidity = 0.0107\n", - " Humidity ratio = 0.3993\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb deleted file mode 100755 index 5863fc4c..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb +++ /dev/null @@ -1,385 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:13df1b90ea06630bb54a561fa81d4ebbaaa2d68a225d0631603576a208acfb40" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "CHAPTER13:Gas Mixtures" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.3:Pg-533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#calculating humidity ratio, dew point,mass of air, mass of vapor\n", - "\n", - "r=0.70;#relative humidity\n", - "Pg=5.628;#saturation pressure in kPa\n", - "Pv=r*Pg;#vapour pressure in kPa\n", - "P=100;#net pressure kPa \n", - "Pa=P-Pv;#Partial pressure of air\n", - "w=0.622*Pv/Pa;#humidity ratio formula\n", - "V=100;#volume in m^3\n", - "Ra=0.287;#gas constant for water vapour\n", - "T=308.2;#Temperature in K\n", - "ma=Pa*V/(Ra*T);#mass in kg\n", - "mv=w*ma;#mass of vapour\n", - "print\" Mass of vapour is\",round(mv,3),\"Kg \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Mass of vapour is 2.77 Kg \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.3E:Pg-533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#calculating humidity ratio, dew point,mass of air, mass of vapor\n", - "\n", - "r=0.70;#relative humidity\n", - "Pg=0.6988 ;#saturation pressure in lbf/in^2\n", - "Pv=r*Pg;#vapour pressure in lbf/in^2\n", - "P=14.7;#net pressure in lbf/in^2\n", - "Pa=P-Pv;#Partial pressure of air\n", - "w=0.622*Pv/Pa;#humidity ratio formula\n", - "V=2000;#volume in ft^3\n", - "Ra=53.34;#gas constant for water vapour\n", - "T=70;#Temperature in F\n", - "ma=Pa*V*144/(Ra*(T+480));#mass in lbm\n", - "mv=w*ma;#mass of vapour\n", - "print\" Mass of vapour is\",round(mv,2),\"lbm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Mass of vapour is 2.99 lbm\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.4:Pg-534" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4 \n", - "#calculating amount of water vapour condensed on cooling\n", - "\n", - "#from example 3\n", - "w1=0.0255;#w1=w, humidity ratio at initial temperature\n", - "ma=108.6;#mass of air in kg\n", - "P=100;#kPa net pressure\n", - "#at 5 C mixture is saturated so Pv2=Pg2\n", - "Pg2=0.8721;\n", - "Pv2=Pg2;\n", - "w2=0.622*Pv2/(P-Pg2);\n", - "mc=ma*(w1-w2);\n", - "print\"Mass of vapour condense is \",round(mc,3),\"kg \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass of vapour condense is 2.175 kg \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.4E:Pg-535" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4 \n", - "#calculating amount of water vapour condensed on cooling\n", - "\n", - "#from example 3 \n", - "w1=0.02135;#w1=w, humidity ratio at initial temperature\n", - "ma=139.6;#mass of air in lbm\n", - "P=14.7;#net pressure in lbf/in^2\n", - "#at 40 degree F mixture is saturated so Pv2=Pg2\n", - "Pg2=0.1217 # lbf/in^2\n", - "Pv2=Pg2;\n", - "w2=0.622*Pv2/(P-Pg2);# humidity ratio at final temperature\n", - "mc=ma*(w1-w2); #Mass of vapour condense in lbm\n", - "print\"Mass of vapour condense is \",round(mc,3),\"lbm \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass of vapour condense is 2.256 lbm \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.5:Pg-536" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#calculating heat transfer per kilogram of dry air\n", - "\n", - "#1-inlet state\n", - "#2-Exit state\n", - "r1=0.80;#realtive humidity at state 1\n", - "Pg1=4.246;#saturation pressure of vapour in kPa\n", - "P1=105.0;#net pressure at state 1 in kPa\n", - "P2=100.0;#net pressure at state 2 in kPa\n", - "Pv1=r1*Pg1;#partial pressure of vapour in kPa\n", - "w1=0.622*Pv1/(P1-Pv1);#humidity ratio at state 1\n", - "r2=0.95;#relative humidity at state 2\n", - "Pg2=1.7051;#saturation pressure of vapour in kPa\n", - "Pv2=r2*Pg2;#partial pressure of vapour in kPa\n", - "w2=0.622*Pv2/(P2-Pv2);#humidity ratio at state 2\n", - "T1=30.0;#C\n", - "T2=15.0;#C\n", - "Cp=1.004;#specific heat of water vapour in kJ/kg\n", - "hv2=2528.9;#enthalpy of vapourisation of vapour in kJ/kg\n", - "hv1=2556.3;#enthalpy of vapourisation of vapour in kJ/kg\n", - "hl2=62.99;#enthalpy of \n", - "q=Cp*(T2-T1)+w2*hv2-w1*hv1+hl2*(w1-w2);#kJ/kg\n", - "print\" Heat transferred per unit mass =\",round(q,1),\"kJ/kg of dry air\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Heat transferred per unit mass = -41.7 kJ/kg of dry air\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.6:Pg-537" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#calculating heat transferred in gas vapour mixture\n", - "\n", - "#n-Nitrogen\n", - "#v-water vapour\n", - "Pn2=1995;#Pressure of nitrogen in kPa\n", - "V=0.5;#Volume in m^3\n", - "Rn2=0.2968;#Gas constant for nitrogen in kJ/kg.K\n", - "Rv=0.4615;#gas constant for vapour\n", - "T1=323.2;#Temperature in K\n", - "T2=283.2;#Temperature in K\n", - "Pv1=5;#Pressure of water vapour in kPa at state 1\n", - "Pv2=1.2276;#Pressure of water vapour in kPa at state 2\n", - "mn2=Pn2*V/(Rn2*T1);#mass of nitrogen\n", - "mv1=Pv1*V/(Rv*T1);#mass of vapour in kg\n", - "mv2=Pv2*V/(Rv*T2);#mass of vapour in kg\n", - "ml2=mv1-mv2;#mass of liquid condensed n kg\n", - "uv1=2443.1;#specific internal energy of vapour in kJ/kg at state 1\n", - "uv2=2389.2;#specific internal energy of vapour in kJ/kg at state 2\n", - "ul2=42.0;#specific internal energy of liquid water in kJ/kg\n", - "Cv=0.745;#specific heat at constant volume in kJ/kg.K\n", - "Q=mn2*Cv*(T2-T1)+mv2*uv2+ml2*ul2-mv1*uv1;\n", - "print\"Heat transferred =\",round(Q,2),\"kJ \"\n", - "\n", - "#the answer is different in book due to intermediate approximization " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat transferred = -339.1 kJ \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.7:Pg-539" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#calculating humidity ratio and relative humidity \n", - "\n", - "#1-Inlet state\n", - "#2-Exit state\n", - "P=100;#net pressure in kPa \n", - "#it is steady state adiabatic process\n", - "#water vapour leaving is saturated so Pv2=Pg2\n", - "Pg2=2.339;#saturation pressure of vapour in kPa\n", - "Pv2=Pg2;#partial pressure of vapour\n", - "w2=0.622*Pv2/(P-Pg2);\n", - "Cpa=1.004;#specific heat n kJ/kg/K\n", - "T2=20;# final temp in C\n", - "T1=30;# initial temp in C\n", - "Hfg2=2454.1;#specific heat difference at state 2 in kJ/kg\n", - "hv1=2556.3;#enthalpy of water vapour at state 1 in kJ/kg\n", - "hl2=83.96;#enthalpy of liquid water in kJ/kg\n", - "w1=(Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2);\n", - "print \" Relative humidity =\",round(w1,4)\n", - "#also w1=0.622*Pv1/(100-Pv2)\n", - "Pv1=100*w1/(0.622+w1);\n", - "Pg1=4.246;#saturation pressure at state 1 in kPa\n", - "r=Pv1/Pg1;#humidity ratio\n", - "print\" Humidity ratio =\",round(r,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Relative humidity = 0.0107\n", - " Humidity ratio = 0.3993\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.7E:Pg-540" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#calculating humidity ratio and relative humidity \n", - "\n", - "#1-Inlet state\n", - "#2-Exit state\n", - "P=14.7;#net pressure in lbf/in^2\n", - "#it is steady state adiabatic process\n", - "#water vapour leaving is saturated so Pv2=Pg2\n", - "Pg2=0.3632;#saturation pressure of vapour in lbf/in^2\n", - "Pv2=Pg2;#partial pressure of vapour\n", - "w2=0.622*Pv2/(P-Pg2);\n", - "Cpa=0.24;#specific heat n Btu/lbm/F\n", - "T2=70;# final temp in F\n", - "T1=84;# initial temp in F\n", - "Hfg2=1054.0;#specific heat difference at state 2 in Btu/lbm\n", - "hv1=1098.1;#enthalpy of water vapour at state 1 in Btu/lbm\n", - "hl2=38.1;#enthalpy of liquid water in Btu/lbm\n", - "w1=(Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2);\n", - "print \" Relative humidity =\",round(w1,4)\n", - "#also w1=0.622*Pv1/(100-Pv2)\n", - "Pv1=14.7*w1/(0.622+w1);\n", - "Pg1=0.584;#saturation pressure at state 1 in lbf/in^2\n", - "r=Pv1/Pg1;#humidity ratio\n", - "print\" Humidity ratio =\",round(r,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Relative humidity = 0.0125\n", - " Humidity ratio = 0.4958\n" - ] - } - ], - "prompt_number": 18 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter14.ipynb b/Fundamentals_Of_Thermodynamics/Chapter14.ipynb deleted file mode 100755 index 6654362c..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter14.ipynb +++ /dev/null @@ -1,295 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b6f84d510db3595ba71244d9d44f7e9987d44c62ba0d0520a72da2384551019e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter14:THERMODYNAMIC RELATIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.1:Pg-567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#to determine the sublimation pressure of water\n", - "import math\n", - "#from table in appendix B.1.5\n", - "T1=213.2;#K, Temperature at state 1\n", - "P2=0.0129;#kPa, pressure at state 2\n", - "T2=233.2;#K, Temperature at state 2\n", - "hig=2838.9;#kJ/kg, enthalpy of sublimation \n", - "R=.46152;#Gas constant \n", - "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n", - "P1=P2*math.exp(-hig/R*(1/T1-1/T2));\n", - "print\" Sublimation Pressure \",round(P1,5),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Sublimation Pressure 0.00109 kPa\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.4:Pg-579" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#Volume expansivity, Isothermal and Adiabatic compressibility\n", - "\n", - "#known data\n", - "ap=5*10**-5;#K^-1 Volume expansivity\n", - "bt=8.6*10**-12;#m^2/N, Isothermal compressibility\n", - "v=0.000114;#m^3/kg, specific volume\n", - "P2=100*10**6;#pressure at state 2 in kPa\n", - "P1=100;#pressure at state 1 in kPa\n", - "w=-v*bt*(P2**2-P1**2)/2;#work done in J/kg\n", - "#q=T*ds and ds=-v*ap*(P2-P1)\n", - "#so q=-T*v*ap*(P2-P1)\n", - "T=288.2;#Temperature in K\n", - "q=-T*v*ap*(P2-P1);#heat in J/kg\n", - "du=q-w;#change in internal energy in J/kg\n", - "print\" Change in internal energy =\",round(du,3),\"J/kg\"\n", - "\n", - "#the answer is correct within given limts\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Change in internal energy = -159.372 J/kg\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.5:Pg-586" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#adiabatic steady state processes\n", - "\n", - "#from table A.2\n", - "P1=20;#pressure at state 1 in MPa\n", - "P2=2;#pressure at state 2 in MPa\n", - "T1=203.2;#Temperature at state 1 in K\n", - "Pr1=P1/3.39;#Reduced pressure at state 1\n", - "Pr2=P2/3.39;#Reduced pressure at state 2\n", - "Tr1=T1/126.2;#Reduced temperature\n", - "#from compressibility chart h1*-h1=2.1*R*Tc\n", - "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", - "#h2*-h2=0.5*R*Tc\n", - "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.5*R*Tc\n", - "R=0.2968;#gas constant for given substance\n", - "Tc=126.2;#K, Constant temperature\n", - "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", - "T2=146;#temperature at state 2\n", - "dh=-1.6*R*Tc+Cp*(T1-T2);#\n", - "print\" Enthalpy change =\",round(dh,3),\"kJ/kg \\n\"\n", - "print\" Since Enthalpy change is nearly \",-round(dh),\"kJ/kg so Temperature =\",round(T2,3),\"K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy change = -0.35 kJ/kg \n", - "\n", - " Since Enthalpy change is nearly 0.0 kJ/kg so Temperature = 146.0 K\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.6:Pg-589" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#isothermal steady state processes\n", - "import math\n", - "#from table A.2\n", - "P1=8;#pressure at state 1 in MPa\n", - "P2=0.5;#pressure at state 2 in MPa\n", - "T1=150.0;#Temperature at state 1 in K\n", - "Pr1=P1/3.39;#Reduced pressure at state 1\n", - "Pr2=P2/3.39;#Reduced pressure at state 2\n", - "Tr1=T1/126.2;#Reduced temperature\n", - "T2=125.0;#temperature at state 2\n", - "#from compressibility chart h1*-h1=2.1*R*Tc\n", - "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", - "#h2*-h2=0.5*R*Tc\n", - "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.15*R*Tc\n", - "R=0.2968;#gas constant for given substance\n", - "Tc=126.2;#K, Constant temperature\n", - "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", - "dh=(2.35)*R*Tc+Cp*(T2-T1);#\n", - "print\" Enthalpy change =\",round(dh),\"kJ/kg\"\n", - "#change in entropy \n", - "#ds= -(s2*-s2)+(s2*-s1*)+(s1*-s1)\n", - "#s1*-s1=1.6*R\n", - "#s2*-s2=0.1*R\n", - "#s2*-s1*=Cp*log(T2/T1)-R*log(P2/P1)\n", - "#so\n", - "ds=1.6*R-0.1*R+Cp*math.log(T2/T1)-R*math.log(P2/P1);\n", - "print\" Entropy Change =\",round(ds,3),\"kJ/kg.K \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy change = 62.0 kJ/kg\n", - " Entropy Change = 1.078 kJ/kg.K \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.7:Pg-596" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#percent deviation using specific volume calculated by kays rule and vander waals rule\n", - "import math\n", - "\n", - "#a-denotes C02\n", - "#b-denotes CH4\n", - "T=310.94;#Temperature of mixture K\n", - "P=86.19;#Pressure of mixture in MPa\n", - "#Tc- critical Temperature\n", - "#Pc-critical pressure\n", - "Tca=304.1;#K\n", - "Tcb=190.4;#K\n", - "Pca=7.38;#MPa\n", - "Pcb=4.60;#MPa\n", - "Ra=0.1889;#gas constant for a in kJ/kg.K\n", - "Rb=0.5183;#gas constant for b in kJ/kg.K\n", - "xa=0.8;#fraction of CO2\n", - "xb=0.2;#fraction of CH4\n", - "Rm=xa*Ra+xb*Rb;#mean gas constant in kJ/kg.K\n", - "Ma=44.01;#molecular mass of a\n", - "Mb=16.043;#molecular mass of b\n", - "#1.Kay's rule\n", - "ya=xa/Ma/(xa/Ma+xb/Mb);#mole fraction of a\n", - "yb=xb/Mb/(xa/Ma+xb/Mb);#mole fraction of b\n", - "Tcm=ya*Tca+yb*Tcb;#mean critical temp in K\n", - "Pcm=ya*Pca+yb*Tcb;#mean critical pressure n MPa\n", - "#therefore pseudo reduced property of mixture\n", - "Trm=T/Tcm;\n", - "Prm=P/Pcm;\n", - "Zm=0.7;#Compressiblity from generalised compressibility chart\n", - "vc=Zm*Rm*T/P/1000;#specific volume calculated in m^3/kg\n", - "ve=0.0006757;#experimental specific volume in m^3/kg\n", - "pd1=(ve-vc)/ve*100;#percent deviation\n", - "print\" Percentage deviation in specific volume using Kays rule =\",round(pd1,1),\"percent \\n\"\n", - "\n", - "#2. using vander waals equation\n", - "#values of vander waals constant\n", - "Aa=27*(Ra**2)*(Tca**2)/(64*Pca*1000);\n", - "Ba=Ra*Tca/(8*Pca*1000);\n", - "Ab=27*(Rb**2)*(Tcb**2)/(64*Pcb*1000);\n", - "Bb=Rb*Tcb/(8*Pcb*1000);\n", - "#mean vander waals constant\n", - "Am=(xa*math.sqrt(Aa)+xb*math.sqrt(Ab))**2;\n", - "Bm=(xa*Ba+xb*Bb);\n", - "#using vander waals equation we get cubic equation \n", - "#solving we get\n", - "vc=0.0006326;#calculated specific volume in m^3/kg\n", - "pd2=((ve-vc)/ve)*100;\n", - "print\" Percentage deviation in specific volume using vander waals eqn =\",round(pd2,1),\"percent\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Percentage deviation in specific volume using Kays rule = 4.8 percent \n", - "\n", - " Percentage deviation in specific volume using vander waals eqn = 6.4 percent\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb deleted file mode 100755 index 8c5a5922..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb +++ /dev/null @@ -1,325 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4d90868c7316d94fc2ffdc05c5691234f77f3a832d71da7eb2108eaff0a215bc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter14:THERMODYNAMIC RELATIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.1:Pg-567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#to determine the sublimation pressure of water\n", - "import math\n", - "#from table in appendix B.1.5\n", - "T1=213.2;#K, Temperature at state 1\n", - "P2=0.0129;#kPa, pressure at state 2\n", - "T2=233.2;#K, Temperature at state 2\n", - "hig=2838.9;#kJ/kg, enthalpy of sublimation \n", - "R=.46152;#Gas constant \n", - "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n", - "P1=P2*math.exp(-hig/R*(1/T1-1/T2));\n", - "print\" Sublimation Pressure \",round(P1,5),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Sublimation Pressure 0.00109 kPa\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.1E:Pg-567\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#to determine the sublimation pressure of water\n", - "import math\n", - "#from table in appendix B.1.5\n", - "T1=-70+460.7;# R, Temperature at state 1\n", - "P2=0.0019 # lbf/in^2 pressure at state 2\n", - "T2=-40+460.7;# R, Temperature at state 2\n", - "hig=1218.7;#Btu/lbm, enthalpy of sublimation \n", - "R=85.67;#Gas constant \n", - "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n", - "P1=P2*math.exp(-hig*778/R*(1/T1-1/T2));\n", - "print\" Sublimation Pressure \",round(P1,5),\"lbf/in^2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Sublimation Pressure 0.00025 lbf/in^2\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.4:Pg-579" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#Volume expansivity, Isothermal and Adiabatic compressibility\n", - "\n", - "#known data\n", - "ap=5*10**-5;#K^-1 Volume expansivity\n", - "bt=8.6*10**-12;#m^2/N, Isothermal compressibility\n", - "v=0.000114;#m^3/kg, specific volume\n", - "P2=100*10**6;#pressure at state 2 in kPa\n", - "P1=100;#pressure at state 1 in kPa\n", - "w=-v*bt*(P2**2-P1**2)/2;#work done in J/kg\n", - "#q=T*ds and ds=-v*ap*(P2-P1)\n", - "#so q=-T*v*ap*(P2-P1)\n", - "T=288.2;#Temperature in K\n", - "q=-T*v*ap*(P2-P1);#heat in J/kg\n", - "du=q-w;#change in internal energy in J/kg\n", - "print\" Change in internal energy =\",round(du,3),\"J/kg\"\n", - "\n", - "#the answer is correct within given limts\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Change in internal energy = -159.372 J/kg\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.5:Pg-586" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#adiabatic steady state processes\n", - "\n", - "#from table A.2\n", - "P1=20;#pressure at state 1 in MPa\n", - "P2=2;#pressure at state 2 in MPa\n", - "T1=203.2;#Temperature at state 1 in K\n", - "Pr1=P1/3.39;#Reduced pressure at state 1\n", - "Pr2=P2/3.39;#Reduced pressure at state 2\n", - "Tr1=T1/126.2;#Reduced temperature\n", - "#from compressibility chart h1*-h1=2.1*R*Tc\n", - "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", - "#h2*-h2=0.5*R*Tc\n", - "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.5*R*Tc\n", - "R=0.2968;#gas constant for given substance\n", - "Tc=126.2;#K, Constant temperature\n", - "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", - "T2=146;#temperature at state 2\n", - "dh=-1.6*R*Tc+Cp*(T1-T2);#\n", - "print\" Enthalpy change =\",round(dh,3),\"kJ/kg \\n\"\n", - "print\" Since Enthalpy change is nearly \",-round(dh),\"kJ/kg so Temperature =\",round(T2,3),\"K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy change = -0.35 kJ/kg \n", - "\n", - " Since Enthalpy change is nearly 0.0 kJ/kg so Temperature = 146.0 K\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.6:Pg-589" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#isothermal steady state processes\n", - "import math\n", - "#from table A.2\n", - "P1=8;#pressure at state 1 in MPa\n", - "P2=0.5;#pressure at state 2 in MPa\n", - "T1=150.0;#Temperature at state 1 in K\n", - "Pr1=P1/3.39;#Reduced pressure at state 1\n", - "Pr2=P2/3.39;#Reduced pressure at state 2\n", - "Tr1=T1/126.2;#Reduced temperature\n", - "T2=125.0;#temperature at state 2\n", - "#from compressibility chart h1*-h1=2.1*R*Tc\n", - "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", - "#h2*-h2=0.5*R*Tc\n", - "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.15*R*Tc\n", - "R=0.2968;#gas constant for given substance\n", - "Tc=126.2;#K, Constant temperature\n", - "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", - "dh=(2.35)*R*Tc+Cp*(T2-T1);#\n", - "print\" Enthalpy change =\",round(dh),\"kJ/kg\"\n", - "#change in entropy \n", - "#ds= -(s2*-s2)+(s2*-s1*)+(s1*-s1)\n", - "#s1*-s1=1.6*R\n", - "#s2*-s2=0.1*R\n", - "#s2*-s1*=Cp*log(T2/T1)-R*log(P2/P1)\n", - "#so\n", - "ds=1.6*R-0.1*R+Cp*math.log(T2/T1)-R*math.log(P2/P1);\n", - "print\" Entropy Change =\",round(ds,3),\"kJ/kg.K \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy change = 62.0 kJ/kg\n", - " Entropy Change = 1.078 kJ/kg.K \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.7:Pg-596" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#percent deviation using specific volume calculated by kays rule and vander waals rule\n", - "import math\n", - "\n", - "#a-denotes C02\n", - "#b-denotes CH4\n", - "T=310.94;#Temperature of mixture K\n", - "P=86.19;#Pressure of mixture in MPa\n", - "#Tc- critical Temperature\n", - "#Pc-critical pressure\n", - "Tca=304.1;#K\n", - "Tcb=190.4;#K\n", - "Pca=7.38;#MPa\n", - "Pcb=4.60;#MPa\n", - "Ra=0.1889;#gas constant for a in kJ/kg.K\n", - "Rb=0.5183;#gas constant for b in kJ/kg.K\n", - "xa=0.8;#fraction of CO2\n", - "xb=0.2;#fraction of CH4\n", - "Rm=xa*Ra+xb*Rb;#mean gas constant in kJ/kg.K\n", - "Ma=44.01;#molecular mass of a\n", - "Mb=16.043;#molecular mass of b\n", - "#1.Kay's rule\n", - "ya=xa/Ma/(xa/Ma+xb/Mb);#mole fraction of a\n", - "yb=xb/Mb/(xa/Ma+xb/Mb);#mole fraction of b\n", - "Tcm=ya*Tca+yb*Tcb;#mean critical temp in K\n", - "Pcm=ya*Pca+yb*Tcb;#mean critical pressure n MPa\n", - "#therefore pseudo reduced property of mixture\n", - "Trm=T/Tcm;\n", - "Prm=P/Pcm;\n", - "Zm=0.7;#Compressiblity from generalised compressibility chart\n", - "vc=Zm*Rm*T/P/1000;#specific volume calculated in m^3/kg\n", - "ve=0.0006757;#experimental specific volume in m^3/kg\n", - "pd1=(ve-vc)/ve*100;#percent deviation\n", - "print\" Percentage deviation in specific volume using Kays rule =\",round(pd1,1),\"percent \\n\"\n", - "\n", - "#2. using vander waals equation\n", - "#values of vander waals constant\n", - "Aa=27*(Ra**2)*(Tca**2)/(64*Pca*1000);\n", - "Ba=Ra*Tca/(8*Pca*1000);\n", - "Ab=27*(Rb**2)*(Tcb**2)/(64*Pcb*1000);\n", - "Bb=Rb*Tcb/(8*Pcb*1000);\n", - "#mean vander waals constant\n", - "Am=(xa*math.sqrt(Aa)+xb*math.sqrt(Ab))**2;\n", - "Bm=(xa*Ba+xb*Bb);\n", - "#using vander waals equation we get cubic equation \n", - "#solving we get\n", - "vc=0.0006326;#calculated specific volume in m^3/kg\n", - "pd2=((ve-vc)/ve)*100;\n", - "print\" Percentage deviation in specific volume using vander waals eqn =\",round(pd2,1),\"percent\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Percentage deviation in specific volume using Kays rule = 4.8 percent \n", - "\n", - " Percentage deviation in specific volume using vander waals eqn = 6.4 percent\n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter15.ipynb b/Fundamentals_Of_Thermodynamics/Chapter15.ipynb deleted file mode 100755 index 18f2c842..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter15.ipynb +++ /dev/null @@ -1,248 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:49d323999697626f705831867b32f6c520c5287d76ed00656f7259e6db65356e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter15:CHEMICAL REACTIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.1:Pg-621" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#theoratical air-fuel ratio for combustion of octane\n", - "#combustion equation is\n", - "#C8H18 + 12.5O2 + 12.5(3.76) N2 \u2192 8 CO2 + 9H2O + 47.0N2\n", - "rm=(12.5+47.0)/1;#air fuel ratio on mole basis\n", - "rma=rm*28.97/114.2;#air fuel ratio on mass basis;\n", - "print \"Theoratical air fuel ratio on mass basis is\",round(rma),\"kg air/kg fuel\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Theoratical air fuel ratio on mass basis is 15.0 kg air/kg fuel\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.6:Pg-629" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#determining heat transfer per kilomole of fuel entering combustion chamber\n", - "\n", - "#1-CH4\n", - "#2-CO2\n", - "#3-H2O\n", - "#hf-standard enthalpy of given substance\n", - "hf1=-74.873;#kJ\n", - "hf2=-393.522;#kJ\n", - "hf3=-285.830;#kJ\n", - "Qcv=hf2+2*hf3-hf1;#kJ\n", - "print \"Heat transfer per kilomole of fuel entering combustion chamber is\",round(Qcv,3),\"kJ\"\n", - "#the answers in the book is different as they have not printed the decimals in values" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat transfer per kilomole of fuel entering combustion chamber is -890.309 kJ\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.7:Pg-631" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#calculating enthalpy of water at given pressure and temperature\n", - "\n", - "#1.Assuming steam to be an ideal gas with value of Cp\n", - "T1=298.15;#Initial temperature in K\n", - "T2=573.15;#final temperature in K\n", - "T=(T1+T2)/2;#average temperature in K\n", - "Cp=1.79+0.107*T/1000+0.586*(T/1000)**2-.20*(T/1000)**3;#specific heat at constant pressure in kj/kg.K\n", - "M=18.015;#mass in kg\n", - "dh=M*Cp*(T2-T1);#enthalpy change in kJ/kmol\n", - "ho=-241.826;#enthalpy at standard temperature and pressure in kJ/mol\n", - "htp1=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 1. Enthalpy of water at given pressure and temperature using value of Cp =\",round(htp1,3),\"kJ/kmol\"\n", - "\n", - "#2..Assuming steam to be an ideal gas with value for dh\n", - "dh=9359;#enthalpy change from table A.9 in kJ/mol\n", - "htp2=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 2. Enthalpy of water at given pressure and temperature assuming value od dh =\",round(htp2,3),\"kJ/kmol \"\n", - "\n", - "#3. Using steam table\n", - "dh=M*(2977.5-2547.2);#enthalpy change for gases in kJ/mol\n", - "htp3g=dh/1000+ho;\n", - "dh=M*(2977.5-104.9);#enthalpy change for liquid in kJ/mol\n", - "hl=-285.830;#standard enthalpy for liquid in kJ/kmol\n", - "htp31=hl+dh/1000.0;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp31,3),\"kJ/kmol \"\n", - "print \" 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp3g,3),\"kJ/kmol \"\n", - "#4.using generalised charts\n", - "#htp=ho-(h2*-h2)+(h2*-h1*)+(h1*-h1);\n", - "#h2*-h2=Z*R*Tc,\n", - "#h2*-h1*=9539 kJ/mol, from part 2\n", - "#h1*-h1=0 ,as ideal gas \n", - "Z=0.21;#from chart\n", - "R=8.3145;#gas constant in SI units\n", - "Tc=647.3;#critical temperature in K\n", - "htp4=ho+9539/1000-Z*R*Tc/1000;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = \",round(htp4,3),\"kJ/kmol\"\n", - "#the answers in book are different as they have not printed the decimals in values" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1. Enthalpy of water at given pressure and temperature using value of Cp = -232.258 kJ/kmol\n", - " 2. Enthalpy of water at given pressure and temperature assuming value od dh = -232.826 kJ/kmol \n", - " 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.08 kJ/kmol \n", - " 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.074 kJ/kmol \n", - " 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = -233.956 kJ/kmol\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.15:Pg-649" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques15\n", - "#calculatng reversible elecromotive force \n", - "\n", - "#1-H2O\n", - "#2-H2\n", - "#3-O2\n", - "#hf-standard enthalpy \n", - "#sf-standard entropy\n", - "hf1=-285.830;#kJ\n", - "hf2=0;#kJ\n", - "hf3=0;#kJ\n", - "sf1=69.950;#kJ/K\n", - "sf2=130.678;#kJ/K\n", - "sf3=205.148;#kJ/K\n", - "dH=2*hf1-2*hf2-hf3;#change in enthalpy in kJ\n", - "dS=2*sf1-2*sf2-sf3;#change in entropy in kJ/K\n", - "T=298.15;#temperature in K\n", - "dG=dH-T*dS/1000;#change in gibbs free energy in kJ\n", - "E=-dG*1000/(96485*4);#emf in V\n", - "print\" Reversible electromotive Force =\",round(E,3),\" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Reversible electromotive Force = 1.229 V\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.17:Pg-654" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques17\n", - "#efficiency of generator and plant\n", - "\n", - "q=325000*(3398.3-856.0);#heat transferred to H2O/kg fuel in kJ/kg\n", - "qv=26700.0*33250;#higher heating value in kJ/kg\n", - "nst=q/qv*100;#efficiency of steam generator\n", - "w=81000.0*3600;#net work done in kJ/kg\n", - "nth=w/qv*100.0;#thermal efficiency\n", - "print\" Efficiency of generator =\",round(nst,1),\"percent\\n\"\n", - "print\" Thermal Efficiency =\",round(nth,1),\" percent\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Efficiency of generator = 93.1 percent\n", - "\n", - " Thermal Efficiency = 32.8 percent\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb deleted file mode 100755 index 1c9182a7..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb +++ /dev/null @@ -1,921 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4afaac3b11e3c61840a392c8cec12435d16ae2f3d2cdfe278957aaca509d72f5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter15:CHEMICAL REACTIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.1:Pg-621" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#theoratical air-fuel ratio for combustion of octane\n", - "#combustion equation is\n", - "#C8H18 + 12.5O2 + 12.5(3.76) N2 \u2192 8 CO2 + 9H2O + 47.0N2\n", - "rm=(12.5+47.0)/1;#air fuel ratio on mole basis\n", - "rma=rm*28.97/114.2;#air fuel ratio on mass basis;\n", - "print \"Theoratical air fuel ratio on mass basis is\",round(rma),\"kg air/kg fuel\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Theoratical air fuel ratio on mass basis is 15.0 kg air/kg fuel\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.2:Pg-622" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 2\n", - "# molal analysis of the products of combustion\n", - "# combustion equation is \n", - "# C8H18 + 12.5(2) O2 + 12.5(2)(3.76) N2 \u2192 8 CO2 + 9H2O + 12.5O2 + 94.0N2\n", - "nCO2=8 # number of moles of CO2 \n", - "nH2O=9 # number of moles of H2O\n", - "nO2=12.5 # number of moles of O2\n", - "nN2=94.0 # number of moles of N2\n", - "moles=nCO2+nH2O+nO2+nN2 # total moles\n", - "# molal analysis of products\n", - "xCO2=nCO2*100/moles \n", - "xH2O=nH2O*100/moles\n", - "xO2=nO2*100/moles\n", - "xN2=nN2*100/moles\n", - "print \" CO2 =\",round(xCO2,2)\n", - "print \"\\n H2O=\",round(xH2O,2)\n", - "print \"\\n O2=\",round(xO2,2)\n", - "print \"\\n N2=\",round(xN2,2)\n", - "print \"\\n The dew point temp. corresponding to partial pressure of water i.e \",round(xH2O,2),\"KPa is 39.7 degree C\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " CO2 = 6.48\n", - "\n", - " H2O= 7.29\n", - "\n", - " O2= 10.12\n", - "\n", - " N2= 76.11\n", - "\n", - " The dew point temp. corresponding to partial pressure of water i.e 7.29 KPa is 39.7 degree C\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.2E:Pg-622" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 2\n", - "# molal analysis of the products of combustion\n", - "# combustion equation is \n", - "# C8H18 + 12.5(2) O2 + 12.5(2)(3.76) N2 \u2192 8 CO2 + 9H2O + 12.5O2 + 94.0N2\n", - "pressure=14.7 # in lbf/in^2\n", - "nCO2=8 # number of moles of CO2 \n", - "nH2O=9 # number of moles of H2O\n", - "nO2=12.5 # number of moles of O2\n", - "nN2=94.0 # number of moles of N2\n", - "moles=nCO2+nH2O+nO2+nN2 # total moles\n", - "# molal analysis of products\n", - "xCO2=nCO2*100/moles \n", - "xH2O=nH2O*100/moles\n", - "xO2=nO2*100/moles\n", - "xN2=nN2*100/moles\n", - "print \" CO2 =\",round(xCO2,2)\n", - "print \"\\n H2O=\",round(xH2O,2)\n", - "print \"\\n O2=\",round(xO2,2)\n", - "print \"\\n N2=\",round(xN2,2)\n", - "PressureO2=pressure*xH2O/100 # partial pressure of O2\n", - "print \"\\n The dew point temp. corresponding to partial pressure of water i.e \",round(PressureO2,3),\"lbf/in^2 is 104 F degree C\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " CO2 = 6.48\n", - "\n", - " H2O= 7.29\n", - "\n", - " O2= 10.12\n", - "\n", - " N2= 76.11\n", - "\n", - " The dew point temp. corresponding to partial pressure of water i.e 1.071 lbf/in^2 is 104 F degree C\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.3:Pg-623" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 3\n", - "# to determine the air\u2013fuel ratio on a volumetric basis\n", - "# the combustion equation is\n", - "# 0.14H2+0.27CO+0.03CH4+0.006O2+0.509N2+0.045CO2+0.259O2+0.259(3.76)N2\u21920.20H2O+0.345CO2+1.482 N2\n", - "mH2=2 # molar mass of H2\n", - "mCO=28 # molar mass of CO\n", - "mCH4=16 # molar mass of CH4\n", - "mO2=32 # molar mass of O2\n", - "mN2=28 # molar mass of N2\n", - "mCO2=44 # molar mass of CO2\n", - "\n", - "\n", - "kmolair=0.259 # moles of air in mixture using combustion equation\n", - "kmolfuel=0.21 # moles of fuel in mixture using combustion equation\n", - "ratioth=kmolair/kmolfuel # theoratical ratio\n", - "\n", - "# For 20% excess air\n", - "vratio=ratioth*(1+0.2) # new ratio for excess air on volume basis\n", - "\n", - "print \" The A/F ratio on volumetric basis is \",round(vratio,2)\n", - "mratio=vratio*28.97 /(0.14*mH2+0.27*mCO+0.03*mCH4+0.006*mO2+0.509*mN2+0.045*mCO2)\n", - "print \"\\n The A/F ratio on mass basis is \",round(mratio,2),\"kg air/kg fuel\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The A/F ratio on volumetric basis is 1.48\n", - "\n", - " The A/F ratio on mass basis is 1.73 kg air/kg fuel\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.4:Pg-624" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 4\n", - "# determining the air\u2013fuel ratio and the percent theoretical air\n", - "CO2=10.00 # percentage\n", - "O2=2.37 # percentage\n", - "CO=0.53 # percentage\n", - "N2=87.10 # percentage\n", - "mCH4=16 # molecular mass of CH4\n", - "# using this data the combustion equation is\n", - "# a CH4 + b O2 + c N2 \u2192 10.0 CO2 + 0.53 CO + 2.37 O2 + d H2O + 87.1N2\n", - "# on balancing we get\n", - "# 10.53 CH4 + 23.16 O2 + 87.1N2 \u219210.0 CO2 + 0.53 CO + 2.37 O2 + 21.06 H2O + 87.1N2\n", - "# balanced combustion equation for per Kmole of fuel is:\n", - "# CH4 + 2.2O2 + 8.27 N2 \u2192 0.95 CO2 + 0.05 CO + 2H2O + 0.225 O2 + 8.27 N2\n", - "molesAir=2.2+8.27 # moles of air\n", - "AF= 28.97*molesAir/mCH4 # air fuel ratio on mass basis\n", - "print \"\\n The A/F ratio on mass basis is \",round(AF,2),\"kg air/kg fuel\"\n", - "# Theoritical combustion equation:\n", - "# CH4 + 2O2 + 2(3.76)N2 \u2192 CO2 + 2H2O + 7.52 N2\n", - "molesAirth=2+2*3.76 # moles of air(theoritical)\n", - "AFth= 28.97*molesAirth/mCH4 # air fuel ratio on mass basis (theoritical)\n", - "print \"\\n The A/F ratio (theoritical) on mass basis is \",round(AFth,2),\"kg air/kg fuel\"\n", - "print \"\\n The percent theoretical air is\",round(AF*100/AFth,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " The A/F ratio on mass basis is 18.96 kg air/kg fuel\n", - "\n", - " The A/F ratio (theoritical) on mass basis is 17.24 kg air/kg fuel\n", - "\n", - " The percent theoretical air is 110.0\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.5:Pg-625" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 5\n", - "\n", - "Sulfur=0.6 # percent by mass\n", - "Hydrogen=5.7 # percent by mass\n", - "Carbon=79.2 # percent by mass\n", - "Oxygen=10.0 # percent by mass\n", - "Nitrogen=1.5 # percent by mass\n", - "Ash=3.0 # percent by mass\n", - "mS=32.0 # molecular mass \n", - "mH2=2.0 # molecular mass\n", - "mC=12.0 # molecular mass\n", - "mO2=32.0 # molecular mass\n", - "mN2=28.0 # molecular mass\n", - "# molal composition per 100 Kg of fuel:\n", - "S=Sulfur/mS # molal composition \n", - "H=Hydrogen/mH2 # molal composition\n", - "C=Carbon/mC # molal composition\n", - "O2=Oxygen/mO2 # molal composition\n", - "N2=Nitrogen/mN2 # molal composition\n", - "\n", - "#The combustion equation becomes \n", - "# 0.02 S + 0.02 O2 \u21920.02 SO2\n", - "# 2.85 H2 + 1.42 O2 \u21922.85 H2O\n", - "# 6.60 C + 6.60 O2 \u21926.60 CO2\n", - "\n", - "O2req=0.02+1.42+6.60 # kmol O2 required/100 kg fuel\n", - "O2present=O2req-O2 # kmol O2 from air/100 kg fuel\n", - "AFtheo= (O2present+O2present*3.76)*28.97/100 # AF ration theoritical kg air/kg fuel\n", - "print \"\\n The A/F ratio (theoritical) on mass basis is \",round(AFtheo,2),\"kg air/kg fuel\"\n", - "print \"\\n The A/F ratio for 30% excess air on mass basis is \",round(AFtheo*1.3,2),\"kg air/kg fuel\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " The A/F ratio (theoritical) on mass basis is 10.66 kg air/kg fuel\n", - "\n", - " The A/F ratio for 30% excess air on mass basis is 13.85 kg air/kg fuel\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.6:Pg-629" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "# determining heat transfer per kilomole of fuel entering combustion chamber\n", - "\n", - "#1-CH4\n", - "#2-CO2\n", - "#3-H2O\n", - "#hf-standard enthalpy of given substance\n", - "hf1=-74.873;#kJ\n", - "hf2=-393.522;#kJ\n", - "hf3=-285.830;#kJ\n", - "Qcv=hf2+2*hf3-hf1;#kJ\n", - "print \"Heat transfer per kilomole of fuel entering combustion chamber is\",round(Qcv,3),\"kJ\"\n", - "#the answers in the book is different as they have not printed the decimals in values" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat transfer per kilomole of fuel entering combustion chamber is -890.309 kJ\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.7:Pg-631" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#calculating enthalpy of water at given pressure and temperature\n", - "\n", - "#1.Assuming steam to be an ideal gas with value of Cp\n", - "T1=298.15;#Initial temperature in K\n", - "T2=573.15;#final temperature in K\n", - "T=(T1+T2)/2;#average temperature in K\n", - "Cp=1.79+0.107*T/1000+0.586*(T/1000)**2-.20*(T/1000)**3;#specific heat at constant pressure in kj/kg.K\n", - "M=18.015;#mass in kg\n", - "dh=M*Cp*(T2-T1);#enthalpy change in kJ/kmol\n", - "ho=-241.826;#enthalpy at standard temperature and pressure in kJ/mol\n", - "htp1=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 1. Enthalpy of water at given pressure and temperature using value of Cp =\",round(htp1,3),\"kJ/kmol\"\n", - "\n", - "#2..Assuming steam to be an ideal gas with value for dh\n", - "dh=9359;#enthalpy change from table A.9 in kJ/mol\n", - "htp2=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 2. Enthalpy of water at given pressure and temperature assuming value od dh =\",round(htp2,3),\"kJ/kmol \"\n", - "\n", - "#3. Using steam table\n", - "dh=M*(2977.5-2547.2);#enthalpy change for gases in kJ/mol\n", - "htp3g=dh/1000+ho;\n", - "dh=M*(2977.5-104.9);#enthalpy change for liquid in kJ/mol\n", - "hl=-285.830;#standard enthalpy for liquid in kJ/kmol\n", - "htp31=hl+dh/1000.0;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp31,3),\"kJ/kmol \"\n", - "print \" 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp3g,3),\"kJ/kmol \"\n", - "#4.using generalised charts\n", - "#htp=ho-(h2*-h2)+(h2*-h1*)+(h1*-h1);\n", - "#h2*-h2=Z*R*Tc,\n", - "#h2*-h1*=9539 kJ/mol, from part 2\n", - "#h1*-h1=0 ,as ideal gas \n", - "Z=0.21;#from chart\n", - "R=8.3145;#gas constant in SI units\n", - "Tc=647.3;#critical temperature in K\n", - "htp4=ho+9539/1000-Z*R*Tc/1000;#enthalpy at given temp and pressure in kJ/kmol\n", - "print \" 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = \",round(htp4,3),\"kJ/kmol\"\n", - "#the answers in book are different as they have not printed the decimals in values" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1. Enthalpy of water at given pressure and temperature using value of Cp = -232.258 kJ/kmol\n", - " 2. Enthalpy of water at given pressure and temperature assuming value od dh = -232.826 kJ/kmol \n", - " 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.08 kJ/kmol \n", - " 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.074 kJ/kmol \n", - " 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = -233.956 kJ/kmol\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.8:Pg-632" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 8\n", - "# Determine the heat transfer\n", - "airth=400 # % excess theoritical air\n", - "Ti=25 # Entry temp in degree celsius\n", - "To=900 # Exit temp in Kelvin\n", - "mf=0.25 # specific fuel consumption in kg/s of fuel per megawatt output\n", - "# The combustion equation is:\n", - "# C8H18(l) + 4(12.5)O2 + 4(12.5)(3.76)N2 \u2192 8CO2 + 9H2O + 37.5O2 + 188.0N2\n", - "hfC8H18=-250105 # is the enthalpy of fuel in kJ/kmol \n", - "nCO2=8 # moles\n", - "hfCO2=-393522 # enthalpy in kJ/kmol\n", - "DelhCO2=28030 # enthalpy in kJ/kmol\n", - "mC8H18=114.23 # molecular mass\n", - "nH2O=9 # moles\n", - "hfH2O=-241826 # enthalpy in kJ/kmol\n", - "DelhH2O=21937 # enthalpy in kJ/kmol\n", - "DelhO2=19241 # enthalpy in kJ/kmol\n", - "nO2=37.5 # moles\n", - "DelhN2=18225 # enthalpy in kJ/kmol\n", - "nN2=188.0 # moles\n", - "Eproduct=nCO2*(hfCO2+DelhCO2)+nH2O*(hfH2O+DelhH2O)+nO2*DelhO2+nN2*DelhN2\n", - "\n", - "Wcv=1000*mC8H18/mf # work in kJ/kmol fuel\n", - "print \" The work is \",Wcv,\"kJ/kmol fuel\"\n", - "\n", - "Qcv=Eproduct+Wcv-hfC8H18 # using first law\n", - "print \" The Heat transfer is \",Qcv,\"kJ/kmol fuel\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The work is 456920.0 kJ/kmol fuel\n", - " The Heat transfer is -48074.5 kJ/kmol fuel\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.8E:Pg-633" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 8\n", - "# Determine the heat transfer\n", - "airth=400 # % excess theoritical air\n", - "Ti=77 # Entry temp in F\n", - "To=1100 # Exit temp in F\n", - "mf=1 # specific fuel consumption in lb of fuel per horsepower-hour\n", - "# The combustion equation is:\n", - "# C8H18(l) + 4(12.5)O2 + 4(12.5)(3.76)N2 \u2192 8CO2 + 9H2O + 37.5O2 + 188.0N2\n", - "hfC8H18=-107526 # is the enthalpy of fuel in Btu/lb.mol\n", - "nCO2=8 # moles\n", - "hfCO2=-169184 # enthalpy in Btu/lb.mol\n", - "DelhCO2=11391 # enthalpy in Btu/lb.mol\n", - "mC8H18=114.23 # molecular mass\n", - "nH2O=9 # moles\n", - "hfH2O=-103966 # enthalpy in Btu/lb.mol\n", - "DelhH2O=8867 # enthalpy in Btu/lb.mol\n", - "DelhO2=7784 # enthalpy in Btu/lb.mol\n", - "nO2=37.5 # moles\n", - "DelhN2=7374 # enthalpy in Btu/lb.mol\n", - "nN2=188.0 # moles\n", - "Eproduct=nCO2*(hfCO2+DelhCO2)+nH2O*(hfH2O+DelhH2O)+nO2*DelhO2+nN2*DelhN2\n", - "\n", - "Wcv=2544*mC8H18 # work in kJ/kmol fuel\n", - "print \" The work is \",Wcv,\"Btu/lb.mol fuel\"\n", - "\n", - "Qcv=Eproduct+Wcv-hfC8H18 # using first law\n", - "print \" The Heat transfer is \",Qcv,\"Btu/lb.mol fuel\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The work is 290601.12 Btu/lb.mol fuel\n", - " The Heat transfer is -41895.88 Btu/lb.mol fuel\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.9:Pg-634" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques 9\n", - "\n", - "# The combustion equation is\n", - "# C2H4 + 3O2 \u2192 2 CO2 + 2H2O(g)\n", - "hfC2H4=52467 # enthalpy in KJ/mol\n", - "R=8.314 # gas constant\n", - "T=298.2 # temperature in Kelvin\n", - "hfCO2=-393522 # enthalpy in kJ/kmol\n", - "DelhCO2=12906 # enthalpy in kJ/kmol\n", - "hfH2O=-241826 # enthalpy in kJ/kmol\n", - "DelhH2O=10499 # enthalpy in kJ/kmol\n", - "Ureactant=hfC2H4-4*R*T # energy of reactant in KJ\n", - "Uproduct=2*(hfCO2+DelhCO2)+2*(hfH2O+DelhH2O) # energy of product in KJ\n", - "Q=Uproduct-Ureactant # using first law\n", - "print \"The Heat transfer is \",Q,\"kJ\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Heat transfer is -1266436.0608 kJ\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.10:Pg-638" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques 10\n", - "\n", - "# The combustion equation is\n", - "# C3H8 + 5O2 \u2192 3 CO2 + 4H2O\n", - "hfC3H8g=-103900 # enthalpy of C3H8 in KJ/mol from Table A.10\n", - "hfC3H8l=hfC3H8g-44.097*370 # enthalpy of C3H8 liquid as enthalpy of evaporation is given in question\n", - "hfH2Ol=285830 # enthalpy of water in KJ/mol\n", - "hfH2Og=241826 # enthalpy in KJ/mol\n", - "hfCO2=393522 # enthalpy in KJ/mol\n", - "nO2=5 # moles\n", - "nCO2=3 # moles\n", - "nH2O=4 # moles\n", - "nC3H8=1 # moles\n", - "# part(1) : liquid propane-liquid water\n", - "hrP=(nCO2*hfCO2 + nH2O*hfH2Ol -nC3H8*hfC3H8l)/44.097 # higher heating value of liquid propane \n", - "print \"The higher heating value of liquid propane is\",round(hrP,2),\"KJ/kg\"\n", - "\n", - "# part(2) : Liquid propane\u2013gaseous water\n", - "\n", - "hrP=(nCO2*hfCO2 + nH2O*hfH2Og -nC3H8*hfC3H8l)/44.097 # lower heating value of liquid propane \n", - "print \"The lower heating value of liquid propane is\",round(hrP,2),\"KJ/kg\"\n", - "\n", - "# part(3) :Gaseous propane\u2013liquid water\n", - "hrP=(nCO2*hfCO2 + nH2O*hfH2Ol -nC3H8*hfC3H8g)/44.097 # higher heating value of gaseous propane \n", - "print \"The higher heating value of gaseous propane is\",round(hrP,2),\"KJ/kg\"\n", - "\n", - "# part(4) :Gaseous propane\u2013Gaseous water\n", - "hrP=(nCO2*hfCO2 + nH2O*hfH2Og -nC3H8*hfC3H8g)/44.097 # lower heating value of gaseous propane \n", - "print \"The lower heating value of gaseous propane is\",round(hrP,2),\"KJ/kg\"\n", - "\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The higher heating value of liquid propane is -120215.89 KJ/kg\n", - "The lower heating value of liquid propane is 51434.02 KJ/kg\n", - "The higher heating value of gaseous propane is 55055.58 KJ/kg\n", - "The lower heating value of gaseous propane is 51064.02 KJ/kg\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.11:Pg-638" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques 10\n", - "# The combustion equation is\n", - "# C3H8(g) + 5O2 \u2192 3 CO2 + 4H2O(g)\n", - "hfC3H8=-103900 # enthalpy of C3H8 in KJ/mol from Table A.10\n", - "Cp=2.1 # in KJ/Kg.K\n", - "T1=500 # temp in Kelvin\n", - "T2=298.2 # temp in Kelvin\n", - "DelhO2=6086 # enthalpy of O2 in KJ/mol\n", - "hfCO2=-393522 # enthalpy in KJ/mol\n", - "DelhCO2=8305 # enthalpy of CO2 in KJ/mol\n", - "hfH2O=-241826 # enthalpy of H2O in KJ/mol\n", - "DelhH2O=6922 # enthalpy in KJ/mol\n", - "nO2=5 # moles\n", - "nCO2=3 # moles\n", - "nH2O=4 # moles\n", - "nC3H8=1 # moles\n", - "\n", - "hR500= hfC3H8+Cp*44.097*(T1-T2)+nO2*DelhO2 # in KJ/mol\n", - "hP500= nCO2*(hfCO2+DelhCO2)+ nH2O*(DelhH2O+hfH2O) # in KJ/mol\n", - "hRP500=hP500-hR500 # in KJ/mol\n", - "Hrp500=hRP500/44.097 # KJ/Kg\n", - "\n", - "print \" The enthalpy of combustion of gaseous propane at 500 K \",round(Hrp500)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The enthalpy of combustion of gaseous propane at 500 K -46273.0\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.12:Pg-639" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 12\n", - "# The question is solved by Trial and Error and using the table , no need for Calculation Thus not solved in Python" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.13:Pg-645" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 13\n", - "# The equation for this chemical reaction is\n", - "# C2H4(g) + 3(4) O2 + 3(4)(3.76) N2 \u2192 2 CO2+2H2O(g) + 9O2 + 45.1 N2\n", - "T=25+273.15 # temp in degree kelvin\n", - "P=0.1 # pressure in Mpa\n", - "hfCO2=-393522 # enthalpy in KJ/mol\n", - "hfH2O=-241826 # enthalpy of H2O in KJ/mol\n", - "HfC2H4=52467 # enthalpy of C2H4 in KJ/mol\n", - "hfO2=0 # enthalpy of formation in KJ/mol\n", - "SCO2=213.795 # kJ/kmol fuel\n", - "SH2O=188.243 # kJ/kmol fuel\n", - "SC2H4=219.330 # kJ/kmol fuel\n", - "SO2=205.148 # kJ/kmol fuel\n", - "DelH=2*hfCO2+2*hfH2O-HfC2H4-3*hfO2 # in KJ/mol\n", - "DelS=2*SCO2+2*SH2O-SC2H4-3*SO2 # kJ/kmol fuel\n", - "DelG=DelH-T*(DelS) # Gibbs Energy\n", - "Wrev=-DelG/28.054 # reversible work in kJ/kg\n", - "print \"The reversible work is \",round(Wrev,2),\"kJ/kg \"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The reversible work is 46838.61 kJ/kg \n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.14:Pg-647" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques \n", - "# The question is solved by Trial and Error and using the table , no need for Calculation Thus not solved in Python" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.15:Pg-649" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques15\n", - "#calculatng reversible elecromotive force \n", - "\n", - "#1-H2O\n", - "#2-H2\n", - "#3-O2\n", - "#hf-standard enthalpy \n", - "#sf-standard entropy\n", - "hf1=-285.830;#kJ\n", - "hf2=0;#kJ\n", - "hf3=0;#kJ\n", - "sf1=69.950;#kJ/K\n", - "sf2=130.678;#kJ/K\n", - "sf3=205.148;#kJ/K\n", - "dH=2*hf1-2*hf2-hf3;#change in enthalpy in kJ\n", - "dS=2*sf1-2*sf2-sf3;#change in entropy in kJ/K\n", - "T=298.15;#temperature in K\n", - "dG=dH-T*dS/1000;#change in gibbs free energy in kJ\n", - "E=-dG*1000/(96485*4);#emf in V\n", - "print\" Reversible electromotive Force =\",round(E,3),\" V\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Reversible electromotive Force = 1.229 V\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.16:Pg-654" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 16\n", - "# to Calculate the combustion efficiency\n", - "Tair = 400 # temp in K\n", - "Vair = 100 # velocity in m/s\n", - "Tfuel = 50 # temp of fuel in \u25e6C\n", - "Tproducts = 1100 # temp of product in K\n", - "Vproducts = 150 # velocity of product in m/s\n", - "FAactual = 0.0211 # air fuel ratio kg fuel/kg air\n", - "\n", - "# HR + KER= \u2212243737 + 14892nO2 \n", - "# HP + KEP= \u22125 068 599 + 120 853nO2 \n", - "# using these two equations :\n", - "no2=(-5068599.0 + 243737.0)/(14892.0-120853) # in kmol O2/kmol fuel\n", - "FAideal=114.23/(4.76*no2*28.91) # in kg fuel/kg air\n", - "\n", - "efficomb=FAideal*100/FAactual # Efficiency\n", - "\n", - "print \" The combustion efficiency is \",round(efficomb,2),\"%\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The combustion efficiency is 86.4 %\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex15.17:Pg-654" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques17\n", - "#efficiency of generator and plant\n", - "\n", - "q=325000*(3398.3-856.0);#heat transferred to H2O/kg fuel in kJ/kg\n", - "qv=26700.0*33250;#higher heating value in kJ/kg\n", - "nst=q/qv*100;#efficiency of steam generator\n", - "w=81000.0*3600;#net work done in kJ/kg\n", - "nth=w/qv*100.0;#thermal efficiency\n", - "print\" Efficiency of generator =\",round(nst,1),\"percent\\n\"\n", - "print\" Thermal Efficiency =\",round(nth,1),\" percent\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation while here the answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Efficiency of generator = 93.1 percent\n", - "\n", - " Thermal Efficiency = 32.8 percent\n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter16.ipynb b/Fundamentals_Of_Thermodynamics/Chapter16.ipynb deleted file mode 100755 index 6a07737d..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter16.ipynb +++ /dev/null @@ -1,128 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7c7e50fa2880e870c4aa1630bafd7d049a3cb3c4e646a0d88068a55be4a3d00f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 16:INTRODUCTION TO PHASE AND CHEMICAL EQUILIBRIUM" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.2:PG-681" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques2\n", - "#to determine change in gibbs free energy\n", - "\n", - "#1-H2\n", - "#2-O2\n", - "#3-H2O\n", - "\n", - "#at T=298 K\n", - "T1=298.0;#K\n", - "Hf1=0;#Enthalpy of formation of H2 at 298 K\n", - "Hf2=0;#Enthalpy of formation of O2 at 298 K\n", - "Hf3=-241826;#enthalpy of formation of H2O at 298 K in kJ\n", - "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n", - "Sf1=130.678;#Entropy of H2 at 298 K n kJ/K\n", - "Sf2=205.148;#Entropy of O2 at 298 K in kJ/K\n", - "Sf3=188.834;#entropy of H2O at 298 K in kJ/K\n", - "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n", - "dG1=dH-T1*dS;#change n gibbs free energy in kJ\n", - "print\" Change in gibbs free energy at\",T1,\"kelvin is\",round(dG1),\"kJ \"\n", - "#at T=2000 K\n", - "T2=2000.0;#K\n", - "Hf1=52942-0;#Enthalpy of formation of H2 at 2000 K\n", - "Hf2=59176-0;#Enthalpy of formation of O2 at 2000 K\n", - "Hf3=-241826+72788;#enthalpy of formation of H2O at 2000 K in kJ\n", - "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n", - "Sf1=188.419;#Entropy of H2 at 2000 K n kJ/K\n", - "Sf2=268.748;#Entropy of O2 at 2000 K in kJ/K\n", - "Sf3=264.769;#entropy of H2O at 2000 K in kJ/K\n", - "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n", - "dG2=dH-(T2*dS);#change n gibbs free energy in kJ\n", - "print\" Change in gibbs free energy at\",T2,\"kelvin is\",round(dG2),\" kJ \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Change in gibbs free energy at 298.0 kelvin is 457179.0 kJ \n", - " Change in gibbs free energy at 2000.0 kelvin is 271040.0 kJ \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.3:PG-683" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#calculating equilibrium constant \n", - "\n", - "dG1=-457.166;#change in gibbs free energy at temp 298 K from example2 in kJ\n", - "dG2=-271.040;#change in gibbs free energy at temp 2000 K from example2 n kJ\n", - "T1=298;#K\n", - "T2=2000;#K\n", - "R=8.3145;#gas constant\n", - "K1=dG1*1000/(R*T1);\n", - "K2=dG2*1000/(R*T2);\n", - "print\" Equilibrium constant at \",T1,\"K = \",round(K1,2)\n", - "print\" Equilibrium constant at \",T2,\"K = \",round(K2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Equilibrium constant at 298 K = -184.51\n", - " Equilibrium constant at 2000 K = -16.299\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb deleted file mode 100755 index c155fdc6..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb +++ /dev/null @@ -1,377 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2573953a96bd6739252db580058edb8938919cec53d4f1d76f9484cfa4f2a1d5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 16:INTRODUCTION TO PHASE AND CHEMICAL EQUILIBRIUM" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.1:676" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "# pressure required to make diamonds from graphite\n", - "import math\n", - "T=25 # temp in degree C\n", - "ggrp= 0 # g for fraphite\n", - "gdiamnd=2867.8 # g for diamond in kJ/mol\n", - "vgrp=0.000444 # specific volume of graphite in m^3/kg\n", - "vdiamnd=0.000284 # specific volume of graphite in m^3/kg\n", - "BetaTgrp=0.304e-6 # beta for graphite in 1/MPa\n", - "BetaTdiamnd=0.016e-6 # beta for diamond in 1/MPa\n", - "\n", - "P=-(-2*(vgrp-vdiamnd)+math.sqrt((2*vgrp-2*vdiamnd)**2-4*(vgrp*BetaTgrp-vdiamnd*BetaTdiamnd)*(2*gdiamnd/(12.011*1000))))/(2*(vgrp*BetaTgrp-vdiamnd*BetaTdiamnd))\n", - "print int(P),\" MPa is the pressure at which possibility exists for conversion from graphite to diamonds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1493 MPa is the pressure at which possibility exists for conversion from graphite to diamonds\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.2:PG-681" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques2\n", - "#to determine change in gibbs free energy\n", - "\n", - "#1-H2\n", - "#2-O2\n", - "#3-H2O\n", - "\n", - "#at T=298 K\n", - "T1=298.0;#K\n", - "Hf1=0;#Enthalpy of formation of H2 at 298 K\n", - "Hf2=0;#Enthalpy of formation of O2 at 298 K\n", - "Hf3=-241826;#enthalpy of formation of H2O at 298 K in kJ\n", - "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n", - "Sf1=130.678;#Entropy of H2 at 298 K n kJ/K\n", - "Sf2=205.148;#Entropy of O2 at 298 K in kJ/K\n", - "Sf3=188.834;#entropy of H2O at 298 K in kJ/K\n", - "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n", - "dG1=dH-T1*dS;#change n gibbs free energy in kJ\n", - "print\" Change in gibbs free energy at\",T1,\"kelvin is\",round(dG1),\"kJ \"\n", - "#at T=2000 K\n", - "T2=2000.0;#K\n", - "Hf1=52942-0;#Enthalpy of formation of H2 at 2000 K\n", - "Hf2=59176-0;#Enthalpy of formation of O2 at 2000 K\n", - "Hf3=-241826+72788;#enthalpy of formation of H2O at 2000 K in kJ\n", - "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n", - "Sf1=188.419;#Entropy of H2 at 2000 K n kJ/K\n", - "Sf2=268.748;#Entropy of O2 at 2000 K in kJ/K\n", - "Sf3=264.769;#entropy of H2O at 2000 K in kJ/K\n", - "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n", - "dG2=dH-(T2*dS);#change n gibbs free energy in kJ\n", - "print\" Change in gibbs free energy at\",T2,\"kelvin is\",round(dG2),\" kJ \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Change in gibbs free energy at 298.0 kelvin is 457179.0 kJ \n", - " Change in gibbs free energy at 2000.0 kelvin is 271040.0 kJ \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.3:PG-683" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#calculating equilibrium constant \n", - "\n", - "dG1=-457.166;#change in gibbs free energy at temp 298 K from example2 in kJ\n", - "dG2=-271.040;#change in gibbs free energy at temp 2000 K from example2 n kJ\n", - "T1=298;#K\n", - "T2=2000;#K\n", - "R=8.3145;#gas constant\n", - "K1=dG1*1000/(R*T1);\n", - "K2=dG2*1000/(R*T2);\n", - "print\" Equilibrium constant at \",T1,\"K = \",round(K1,2)\n", - "print\" Equilibrium constant at \",T2,\"K = \",round(K2,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Equilibrium constant at 298 K = -184.51\n", - " Equilibrium constant at 2000 K = -16.299\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.4:Pg-684" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# The example is about proving that Equlibrium constant can be found using table hence doesn't require solution in python " - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.5:Pg-685" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 5\n", - "# To determine Heat Transfer\n", - "# The process is two step as:\n", - "# Combustion: C + O2--->CO2\n", - "# Dissociation reaction: 2CO2---->2CO + O2\n", - "# overall process : C + O2 \u2192 0.5622 CO2 + 0.4378 CO + 0.2189 O2\n", - "nCO2=0.5622 # moles of CO2\n", - "nCO=0.4378 # moles of CO\n", - "nO2=0.2189 # moles of NO2\n", - "\n", - "# from Table A.9:\n", - "hfCO2=0 # enthalpy of formation\n", - "hfC=0 # enthalpy of formation\n", - "hfCO=0 # enthalpy of formation\n", - "hfO2=0 # enthalpy of formation\n", - "hfCO23000=-393522 # enthalpy @ 3000K\n", - "hfCO3000=-110527 # enthalpy @ 3000K\n", - "hfO23000=0 # enthalpy @ 3000K\n", - "hfCO2298=-152853 # enthalpy @ 298K\n", - "hfCO298=-93504 # enthalpy @ 298K\n", - "hfO2298=-98013 # enthalpy @ 298K\n", - "\n", - "Hr=hfC+hfO2 # enthalpy of reactants\n", - "Hp=nCO2*(hfCO2+hfCO23000-hfCO2298)+nCO*(hfCO+hfCO3000-hfCO298)+nO2*(hfO2+hfO23000-hfO2298)\n", - "\n", - "Qcv=Hp-Hr # using first law\n", - "print round(Qcv),\"kJ/kmol C is the heat transfer \"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "-121302.0 kJ/kmol C is the heat transfer \n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.6:Pg-687" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 6\n", - "# to determine the composition\n", - "# the standard equation is C + 2O2 \u2192 CO2 + O2\n", - "# from equilibrium C + 2O2 \u2192 (1 \u2212 2z)CO2 + 2zCO + (1 + z)O2\n", - "T=3000 # temp in K\n", - "P=0.1 # prssure in MPa\n", - "z = 0.1553 # from equilibrium equation using table\n", - "yCO2=(1-2*z)/(2+z) # mole fraction of CO2\n", - "yCO = 2*z/(2+z) # mole fraction of CO\n", - "yO2=(1+z)/(2+z) # mole fraction of O2\n", - "print \"The mole fraction is \",round(yCO2,3),\" for CO2 \\n\"\n", - "print \"The mole fraction is \",round(yCO,3),\" for CO \\n\"\n", - "print \"The mole fraction is \",round(yO2,3),\" for O2 \\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mole fraction is 0.32 for CO2 \n", - "\n", - "The mole fraction is 0.144 for CO \n", - "\n", - "The mole fraction is 0.536 for O2 \n", - "\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.7:Pg-691" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 7\n", - "# to determine the equilibrium composition\n", - "# The reaction equation is:\n", - "# (1): 2.H2O -->2H2 + O2\n", - "# (2): 2 H2O -->H2 + 2OH\n", - "# the equilibrium equation is \n", - "# H2O \u2192 (1 \u2212 2a \u2212 2b)H2O + (2a + b)H2 + aO2 + 2bOH\n", - "P= 0.1 # pressure in MPa\n", - "T=3000 # temp in Kelvin\n", - "a=0.0534 # using value of K from Table A.11 @ 3000k\n", - "b=0.0551 # using value of K from Table A.11 @ 3000k\n", - "nH2O= (1-2*a-b) # moles of H2O\n", - "nH2=2*a+b# moles of H2\n", - "nO2=a# moles of O2\n", - "nOH= 2*b# moles of OH\n", - "X=nH2O+nH2+nO2+nOH\n", - "yH2O=nH2O/X # mole fraction\n", - "yH2=nH2/X # mole fraction\n", - "yO2=nO2/X # mole fraction\n", - "yOH=nOH/X # mole fraction\n", - "print \"The mole fraction of H2O is\",round(yH2O,2),\"\\n\"\n", - "print \"The mole fraction of H2 is\",round(yH2,2),\"\\n\"\n", - "print \"The mole fraction of O2 is\",round(yO2,2),\"\\n\"\n", - "print \"The mole fraction of OH is\",round(yOH,2),\"\\n\"\n", - "# the answers are slightly different due to approximation in textbook while here the answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mole fraction of H2O is 0.72 \n", - "\n", - "The mole fraction of H2 is 0.139 \n", - "\n", - "The mole fraction of O2 is 0.046 \n", - "\n", - "The mole fraction of OH is 0.095 \n", - "\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex16.8:pg-696" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ques 8\n", - "# determine the the equilibrium composition\n", - "P= 1 # pressure in Kpa\n", - "T=10000 # temp in Kelvin\n", - "z=0.2008 # using k from table \n", - "# the chemical equation is Ar -->Ar^(+) + e\u2212\n", - "\n", - "yAr=(1-z)/(1 + z) # mole fraction of Ar\n", - "yArpositive= z/(1+z) # mole fraction of Ar(+)\n", - "yenegative=z/(1+z) # mole fraction of ye-\n", - "print \"The mole fraction of Ar is\",round(yAr,3),\"\\n\"\n", - "print \"The mole fraction of Ar+ is\",round(yArpositive,3),\"\\n\"\n", - "print \"The mole fraction of e- is\",round(yenegative,3),\"\\n\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The mole fraction of Ar is 0.666 \n", - "\n", - "The mole fraction of Ar+ is 0.167 \n", - "\n", - "The mole fraction of e- is 0.167 \n", - "\n" - ] - } - ], - "prompt_number": 32 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter17.ipynb b/Fundamentals_Of_Thermodynamics/Chapter17.ipynb deleted file mode 100755 index 4ae8005b..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter17.ipynb +++ /dev/null @@ -1,434 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:70b7f86a423a7c9685f997491946441e1c53cfe8fe328afd6e5b37a44e4dce11" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 17: COMPRESSIBLE FLOW" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.1:PG-710" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#to determine isentropic stagnation pressure and temperature \n", - "\n", - "T=300;#Temperature of air in K\n", - "P=150;#Pressure of air in kPa\n", - "v=200;#velocity of air flow n m/s\n", - "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", - "To=v**2/(2000*Cp)+T;#stagnation temperature in K\n", - "k=1.4;#constant\n", - "Po=P*(To/T)**(k/(k-1));#stagnation pressure in kPa\n", - "print 'Stagnation Temperature is ',round(To,1),' K \\n'\n", - "print 'Stagnation Pressure is ',round(Po,2),'kPa \\n'" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Stagnation Temperature is 319.9 K \n", - "\n", - "Stagnation Pressure is 187.85 kPa \n", - "\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.2:PG-713" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques2\n", - "#to determine the force\n", - "\n", - "#initializing variables\n", - "mdot=-1 # mass flow rate out of control volume in kg/s\n", - "Vx=-1 # x component of velocity of control volume in m/s\n", - "Vy=10 # y component of velocity of control volume in m/s\n", - "\n", - "Fx=mdot*Vx # Force in X direction\n", - "\n", - "Fy=mdot*Vy # Force in Y direction\n", - "\n", - "print \"the force the man exert on the wheelbarrow\",round(Fx),\"N\"\n", - "print \"the force the floor exerts on the wheelbarrow\",round(Fy),\"N\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the force the man exert on the wheelbarrow 1.0 N\n", - "the force the floor exerts on the wheelbarrow -10.0 N\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.3:PG-715" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#determining the thrust acting on a control surface\n", - "\n", - "#i-inlet\n", - "#e-exit\n", - "#using momentum equation on control surface in x direction\n", - "me=20.4;#mass exiting in kg\n", - "mi=20;#mass entering in kg\n", - "ve=450;#exit velocity in m/s\n", - "vi=100;#inlet velocity in m/s\n", - "Pi=95;#Pressure at inlet in kPa\n", - "Pe=125;#Pressure at exit in kPa\n", - "Po=100;#surrounding pressure in kPa\n", - "Ai=0.2;#inlet area in m^2\n", - "Ae=0.1;#exit area in m^2\n", - "Rx=(me*ve-mi*vi)/1000-(Pi-Po)*Ai+(Pe-Po)*Ae;#thrust in x direction in kN\n", - "\n", - "print \"Thrust acting in x direction is \",round(Rx,2),\"kN\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thrust acting in x direction is 10.68 kN\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.4:PG-717" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#to determine increase in enthalpy\n", - "#initializing variables\n", - "#i-inlet\n", - "#e-exit\n", - "\n", - "T=25+273 # temperature in kelvin\n", - "v=0.001003 # specific volume of water in kg/m^3 at 25 *c from table B.1.1 \n", - "ve=7;#exit velocity in m/s\n", - "vi=30;#inlet velocity in m/s\n", - "Pi=350;#Pressure at inlet in kPa\n", - "Pe=600;#Pressure at exit in kPa\n", - "\n", - "#using momentum equation on control surface \n", - "Pes= (vi**2-ve**2)/(2*v*1000)+Pi # exit pressure for reversible diffuser\n", - "delH=(vi**2-ve**2)/(2*1000.0) # change in enthalpy from first law in kJ/kg\n", - "delU=delH-v*(Pe-Pi) # change in internal energy in kJ/kg\n", - "delS=delU/T # change in entropy in kJ/kg.K\n", - "print\"the exit pressure for reversible diffuser is \",round(Pes),\"kPa\"\n", - "print\"the increase in enthalpy is \",round(delH,5),\"kJ/kg\"\n", - "print\"the increase in internal energy is \",round(delU,5),\"kJ/kg\"\n", - "print\"the increase in entropy is \",round(delS,6),\"kJ/kg.K\"\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the exit pressure for reversible diffuser is 774.0 kPa\n", - "the increase in enthalpy is 0.4255 kJ/kg\n", - "the increase in internal energy is 0.17475 kJ/kg\n", - "the increase in entropy is 0.000586 kJ/kg.K\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.5:PG-720" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#determining velocity of sound in air\n", - "import math\n", - "k=1.4;#constant\n", - "R=0.287;#gas constant\n", - "#at 300K\n", - "T1=300;# temperature in kelvin\n", - "c1=math.sqrt(k*R*T1*1000)\n", - "print \"Speed of sound at 300 K is\",round(c1,1),\" m/s\" \n", - "#at 1000K\n", - "T2=1000;# temperature in kelvin\n", - "c2=math.sqrt(k*R*T2*1000)\n", - "print \"Speed of sound at 1000 K is\",round(c2,1),\" m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed of sound at 300 K is 347.2 m/s\n", - "Speed of sound at 1000 K is 633.9 m/s\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.6:PG-727" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#determining mass flow rate through control volume\n", - "import math\n", - "k=1.4;#constant\n", - "R=0.287;#gas constant\n", - "To=360;#stagnation Temperature in K \n", - "T=To*0.8333;#Temperature of air in K, 0.8333 stagnation ratio from table\n", - "v=math.sqrt(k*R*T*1000);#velocity in m/s\n", - "P=528;#stagnation pressure in kPa\n", - "d=P/(R*T);#stagnation density in kg/m^3\n", - "A=500*10**-6;#area in m^2\n", - "ms=d*A*v;#mass flow rate in kg/s\n", - "print\" Mass flow rate at the throat section is\",round(ms,4),\"kg/s\"\n", - "#e-exit state\n", - "Te=To*0.9381;#exit temperature in K, ratio from table\n", - "ce=math.sqrt(k*R*Te*1000);#exit velocity of sound in m/s\n", - "Me=0.573;#Mach number\n", - "ve=Me*ce;\n", - "Pe=800;#exit pressure in kPa\n", - "de=Pe/R/Te;\n", - "mse=de*A*ve;\n", - "print\" Mass flow rate at the exit section is\",round(mse,4),\" kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Mass flow rate at the throat section is 1.0646 kg/s\n", - " Mass flow rate at the exit section is 0.8711 kg/s\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.7:PG-728" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#determining exit properties in a control volume\n", - "import math\n", - "Po=1000;#stagnation pressure in kPa\n", - "To=360;#stagnation temperature in K\n", - "\n", - "#when diverging section acting as nozzle\n", - "\n", - "Pe1=0.0939*Po;#exit pressure of air in kPa\n", - "Te1=0.5089*To;#exit temperature in K\n", - "k=1.4;#constant\n", - "R=0.287;#gas constant for air\n", - "ce=math.sqrt(k*R*Te1*1000);#velocity of sound in exit section in m/s\n", - "Me=2.197;#mach number from table\n", - "ve1=Me*ce;#velocity of air at exit section in m/s\n", - "print \"When diverging section act as a nozzle :-\"\n", - "print \"Exit pressure is\",round(Pe1,4),\" kPa\"\n", - "print \"Exit Temperature\",round(Te1,1),\" K\"\n", - "print \"Exit velocity is\",round(ve1,1),\" m/s \"\n", - "\n", - "#when diverging section act as diffuser\n", - "\n", - "Me=0.308;\n", - "Pe2=0.0936*Po;#exit pressure of air in kPa\n", - "Te2=0.9812*To;#exit temperature in K\n", - "ce=math.sqrt(k*R*Te2*1000);#velocity of sound in exit section in m/s\n", - "ve2=Me*ce;\n", - "print \"When diverging section act as a diffuser :-\"\n", - "print \"Exit pressure is\",round(Pe2,1),\" kPa\"\n", - "print \"Exit Temperature\",round(Te2,2),\" K\"\n", - "print \"Exit velocity is\",round(ve2,),\" m/s \"\n", - "\n", - "# The value of Exit pressure when diverging section acts as diffuser is wrong\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "When diverging section act as a nozzle :-\n", - "Exit pressure is 93.9 kPa\n", - "Exit Temperature 183.2 K\n", - "Exit velocity is 596.1 m/s \n", - "When diverging section act as a diffuser :-\n", - "Exit pressure is 93.6 kPa\n", - "Exit Temperature 353.23 K\n", - "Exit velocity is 116.0 m/s \n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.9:PG-733" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques9\n", - "#determining exit plane properties in control volume\n", - "\n", - "#x-inlet\n", - "#y-exit\n", - "Mx=1.5;#mach number for inlet\n", - "My=0.7011;#mach number for exit\n", - "Px=272.4;#inlet pressure in kPa\n", - "Tx=248.3;#inlet temperature in K\n", - "Tox=360 # stagnation temperature in Kelvin\n", - "Pox=1000.0;#stagnation pressure for inlet\n", - "Py=2.4583*Px;# Pressure at 1.5 mach in kPa\n", - "Ty=1.320*Tx;# temperature at 1.5 mach in K\n", - "Poy=0.9298*Pox;# pressure at 1.5 mach in kPa\n", - "\n", - "Toy=Tox # constant\n", - "Me=0.339 # from table with A/A*=1.860 and M < 1\n", - "Pe=0.9222*Py;#Exit Pressure in kPa\n", - "Te=0.9771*Toy;#Exit temperature in K\n", - "Poe=0.9222*Poy;#Exit pressure in kPa\n", - "\n", - "print \"Exit Mach no.=\",Me\n", - "print \"Exit temperature =\",round(Te,2),\"K \"\n", - "print \"Exit pressure =\",round(Poe,1),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Exit Mach no.= 0.339\n", - "Exit temperature = 351.76 K \n", - "Exit pressure = 857.5 kPa\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 45 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb deleted file mode 100755 index 11b9507c..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb +++ /dev/null @@ -1,462 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e77c793709c88cc39a2de404e997a6f1eed32d352c214c1580d822fd7a5a83a2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 17: COMPRESSIBLE FLOW" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.1:PG-710" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques1\n", - "#to determine isentropic stagnation pressure and temperature \n", - "\n", - "T=300;#Temperature of air in K\n", - "P=150;#Pressure of air in kPa\n", - "v=200;#velocity of air flow n m/s\n", - "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", - "To=v**2/(2000*Cp)+T;#stagnation temperature in K\n", - "k=1.4;#constant\n", - "Po=P*(To/T)**(k/(k-1));#stagnation pressure in kPa\n", - "print 'Stagnation Temperature is ',round(To,1),' K \\n'\n", - "print 'Stagnation Pressure is ',round(Po,2),'kPa \\n'" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Stagnation Temperature is 319.9 K \n", - "\n", - "Stagnation Pressure is 187.85 kPa \n", - "\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.2:PG-713" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques2\n", - "#to determine the force\n", - "\n", - "#initializing variables\n", - "mdot=-1 # mass flow rate out of control volume in kg/s\n", - "Vx=-1 # x component of velocity of control volume in m/s\n", - "Vy=10 # y component of velocity of control volume in m/s\n", - "\n", - "Fx=mdot*Vx # Force in X direction\n", - "\n", - "Fy=mdot*Vy # Force in Y direction\n", - "\n", - "print \"the force the man exert on the wheelbarrow\",round(Fx),\"N\"\n", - "print \"the force the floor exerts on the wheelbarrow\",round(Fy),\"N\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the force the man exert on the wheelbarrow 1.0 N\n", - "the force the floor exerts on the wheelbarrow -10.0 N\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.3:PG-715" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques3\n", - "#determining the thrust acting on a control surface\n", - "\n", - "#i-inlet\n", - "#e-exit\n", - "#using momentum equation on control surface in x direction\n", - "me=20.4;#mass exiting in kg\n", - "mi=20;#mass entering in kg\n", - "ve=450;#exit velocity in m/s\n", - "vi=100;#inlet velocity in m/s\n", - "Pi=95;#Pressure at inlet in kPa\n", - "Pe=125;#Pressure at exit in kPa\n", - "Po=100;#surrounding pressure in kPa\n", - "Ai=0.2;#inlet area in m^2\n", - "Ae=0.1;#exit area in m^2\n", - "Rx=(me*ve-mi*vi)/1000-(Pi-Po)*Ai+(Pe-Po)*Ae;#thrust in x direction in kN\n", - "\n", - "print \"Thrust acting in x direction is \",round(Rx,2),\"kN\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thrust acting in x direction is 10.68 kN\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.4:PG-717" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques4\n", - "#to determine increase in enthalpy\n", - "#initializing variables\n", - "#i-inlet\n", - "#e-exit\n", - "\n", - "T=25+273 # temperature in kelvin\n", - "v=0.001003 # specific volume of water in kg/m^3 at 25 *c from table B.1.1 \n", - "ve=7;#exit velocity in m/s\n", - "vi=30;#inlet velocity in m/s\n", - "Pi=350;#Pressure at inlet in kPa\n", - "Pe=600;#Pressure at exit in kPa\n", - "\n", - "#using momentum equation on control surface \n", - "Pes= (vi**2-ve**2)/(2*v*1000)+Pi # exit pressure for reversible diffuser\n", - "delH=(vi**2-ve**2)/(2*1000.0) # change in enthalpy from first law in kJ/kg\n", - "delU=delH-v*(Pe-Pi) # change in internal energy in kJ/kg\n", - "delS=delU/T # change in entropy in kJ/kg.K\n", - "print\"the exit pressure for reversible diffuser is \",round(Pes),\"kPa\"\n", - "print\"the increase in enthalpy is \",round(delH,5),\"kJ/kg\"\n", - "print\"the increase in internal energy is \",round(delU,5),\"kJ/kg\"\n", - "print\"the increase in entropy is \",round(delS,6),\"kJ/kg.K\"\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the exit pressure for reversible diffuser is 774.0 kPa\n", - "the increase in enthalpy is 0.4255 kJ/kg\n", - "the increase in internal energy is 0.17475 kJ/kg\n", - "the increase in entropy is 0.000586 kJ/kg.K\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.5:PG-720" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques5\n", - "#determining velocity of sound in air\n", - "import math\n", - "k=1.4;#constant\n", - "R=0.287;#gas constant\n", - "#at 300K\n", - "T1=300;# temperature in kelvin\n", - "c1=math.sqrt(k*R*T1*1000)\n", - "print \"Speed of sound at 300 K is\",round(c1,1),\" m/s\" \n", - "#at 1000K\n", - "T2=1000;# temperature in kelvin\n", - "c2=math.sqrt(k*R*T2*1000)\n", - "print \"Speed of sound at 1000 K is\",round(c2,1),\" m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Speed of sound at 300 K is 347.2 m/s\n", - "Speed of sound at 1000 K is 633.9 m/s\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.6:PG-727" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques6\n", - "#determining mass flow rate through control volume\n", - "import math\n", - "k=1.4;#constant\n", - "R=0.287;#gas constant\n", - "To=360;#stagnation Temperature in K \n", - "T=To*0.8333;#Temperature of air in K, 0.8333 stagnation ratio from table\n", - "v=math.sqrt(k*R*T*1000);#velocity in m/s\n", - "P=528;#stagnation pressure in kPa\n", - "d=P/(R*T);#stagnation density in kg/m^3\n", - "A=500*10**-6;#area in m^2\n", - "ms=d*A*v;#mass flow rate in kg/s\n", - "print\" Mass flow rate at the throat section is\",round(ms,4),\"kg/s\"\n", - "#e-exit state\n", - "Te=To*0.9381;#exit temperature in K, ratio from table\n", - "ce=math.sqrt(k*R*Te*1000);#exit velocity of sound in m/s\n", - "Me=0.573;#Mach number\n", - "ve=Me*ce;\n", - "Pe=800;#exit pressure in kPa\n", - "de=Pe/R/Te;\n", - "mse=de*A*ve;\n", - "print\" Mass flow rate at the exit section is\",round(mse,4),\" kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Mass flow rate at the throat section is 1.0646 kg/s\n", - " Mass flow rate at the exit section is 0.8711 kg/s\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.7:PG-728" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques7\n", - "#determining exit properties in a control volume\n", - "import math\n", - "Po=1000;#stagnation pressure in kPa\n", - "To=360;#stagnation temperature in K\n", - "\n", - "#when diverging section acting as nozzle\n", - "\n", - "Pe1=0.0939*Po;#exit pressure of air in kPa\n", - "Te1=0.5089*To;#exit temperature in K\n", - "k=1.4;#constant\n", - "R=0.287;#gas constant for air\n", - "ce=math.sqrt(k*R*Te1*1000);#velocity of sound in exit section in m/s\n", - "Me=2.197;#mach number from table\n", - "ve1=Me*ce;#velocity of air at exit section in m/s\n", - "print \"When diverging section act as a nozzle :-\"\n", - "print \"Exit pressure is\",round(Pe1,4),\" kPa\"\n", - "print \"Exit Temperature\",round(Te1,1),\" K\"\n", - "print \"Exit velocity is\",round(ve1,1),\" m/s \"\n", - "\n", - "#when diverging section act as diffuser\n", - "\n", - "Me=0.308;\n", - "Pe2=0.0936*Po;#exit pressure of air in kPa\n", - "Te2=0.9812*To;#exit temperature in K\n", - "ce=math.sqrt(k*R*Te2*1000);#velocity of sound in exit section in m/s\n", - "ve2=Me*ce;\n", - "print \"When diverging section act as a diffuser :-\"\n", - "print \"Exit pressure is\",round(Pe2,1),\" kPa\"\n", - "print \"Exit Temperature\",round(Te2,2),\" K\"\n", - "print \"Exit velocity is\",round(ve2,),\" m/s \"\n", - "\n", - "# The value of Exit pressure when diverging section acts as diffuser is wrong\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "When diverging section act as a nozzle :-\n", - "Exit pressure is 93.9 kPa\n", - "Exit Temperature 183.2 K\n", - "Exit velocity is 596.1 m/s \n", - "When diverging section act as a diffuser :-\n", - "Exit pressure is 93.6 kPa\n", - "Exit Temperature 353.23 K\n", - "Exit velocity is 116.0 m/s \n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.8:PG-731" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques8\n", - "#Determine the static pressure and temperature of supersonic nozzle\n", - "#x-inlet\n", - "#y-exit\n", - "# using the data from previous example\n", - "Mx=2.197 # Mach number at x\n", - "Px=93.9 # IN kPa\n", - "Tx=183.2 # IN K\n", - "P0x=1000 # IN kPa\n", - "T0x = 360 # in K\n", - "My=0.547 # Mach number at y From Table A.13\n", - "Py = 5.46*Px # From Table A.13\n", - "Ty = 1.854 * Tx # From Table A.13\n", - "P0y= 0.630 * P0x # From Table A.13\n", - "print \"Exit pressure after shock is\",round(Py,1),\" kPa\"\n", - "print \"Exit Temperature after shock is\",round(Ty,1),\" K\"\n", - "print \"Exit stagnation pressure after shock is\",round(P0y,1),\" kPa\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Exit pressure after shock is 512.7 kPa\n", - "Exit Temperature after shock is 339.7 K\n", - "Exit stagnation pressure after shock is 630.0 kPa\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex17.9:PG-733" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ques9\n", - "#determining exit plane properties in control volume\n", - "\n", - "#x-inlet\n", - "#y-exit\n", - "Mx=1.5;#mach number for inlet\n", - "My=0.7011;#mach number for exit\n", - "Px=272.4;#inlet pressure in kPa\n", - "Tx=248.3;#inlet temperature in K\n", - "Tox=360 # stagnation temperature in Kelvin\n", - "Pox=1000.0;#stagnation pressure for inlet\n", - "Py=2.4583*Px;# Pressure at 1.5 mach in kPa\n", - "Ty=1.320*Tx;# temperature at 1.5 mach in K\n", - "Poy=0.9298*Pox;# pressure at 1.5 mach in kPa\n", - "\n", - "Toy=Tox # constant\n", - "Me=0.339 # from table with A/A*=1.860 and M < 1\n", - "Pe=0.9222*Py;#Exit Pressure in kPa\n", - "Te=0.9771*Toy;#Exit temperature in K\n", - "Poe=0.9222*Poy;#Exit pressure in kPa\n", - "\n", - "print \"Exit Mach no.=\",Me\n", - "print \"Exit temperature =\",round(Te,2),\"K \"\n", - "print \"Exit pressure =\",round(Poe,1),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Exit Mach no.= 0.339\n", - "Exit temperature = 351.76 K \n", - "Exit pressure = 857.5 kPa\n" - ] - } - ], - "prompt_number": 50 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter2.ipynb b/Fundamentals_Of_Thermodynamics/Chapter2.ipynb deleted file mode 100755 index 95850873..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter2.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:eb1b6239947f111d6ea8f1bcaafe0bb84b121b2561bbb9f5f8a8bdec77169fd2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter2:SOME CONCEPTS AND DEFINITIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.1:pg-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#weight of a person\n", - "\n", - "\n", - "m=1 #kg\n", - "g=9.75 #acc.due to gravity in m/s^2\n", - "F=m*g #weight of 1 kg mass in N\n", - "print\"\\n hence,weight of person is\",round(F,2),\" N\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,weight of person is 9.75 N\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.2:pg-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#average volume and density\n", - "\n", - "Vliq=0.2 #volume of liquid in m^3\n", - "dliq=997 #density of liquid in kg/m^3\n", - "Vstone=0.12 #volume of stone in m^3\n", - "Vsand=0.15 #volume of sand in m^3\n", - "Vair=0.53 #vo;ume of air in m^3\n", - "mliq=Vliq*dliq #mass of liquid in kg\n", - "dstone=2750 #density of stone in kg/m^3\n", - "dsand=1500 #density of sand in kg/m^3\n", - "mstone=Vstone*dstone #volume of stone in m^3\n", - "msand=Vsand*dsand #volume of sand in m^3\n", - "Vtot=1 #total volume in m^3\n", - "dair=1.1 #density of air in kg/m^3\n", - "mair=Vair*dair #mass of air\n", - "mtot=mair+msand+mliq+mstone #total mass in kg\n", - "v=Vtot/mtot #specific volume in m^3/kg\n", - "d=1/v #overall density in kg/m^3\n", - "print\"\\n hence,average specific volume is\",round(v,6),\"m^3/kg\" \n", - "print\"\\n and overall density is\", round(d),\"kg/m^3\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,average specific volume is 0.001325 m^3/kg\n", - "\n", - " and overall density is 755.0 kg/m^3\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.3:pg-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#calculating the required force\n", - "import math\n", - "\n", - "Dcyl=0.1 #cylinder diameter in m\n", - "Drod=0.01 #rod diameter in m\n", - "Acyl=math.pi*Dcyl**2/4 #cross sectional area of cylinder in m^2\n", - "Arod=math.pi*Drod**2/4 #cross sectional area of rod in m^2\n", - "Pcyl=250000 #inside hydaulic pressure in Pa\n", - "Po=101000 #outside atmospheric pressure in kPa\n", - "g=9.81 #acc. due to gravity in m/s^2\n", - "mp=25 #mass of (rod+piston) in kg\n", - "F=Pcyl*Acyl-Po*(Acyl-Arod)-mp*g #the force that rod can push within the upward direction in N\n", - "print\"\\n hence,the force that rod can push within the upward direction is\",round(F,1),\" N\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the force that rod can push within the upward direction is 932.9 N\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.4:pg-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#Calculating atmospheric pressure \n", - "\n", - "dm=13534 #density of mercury in kg/m^3\n", - "H=0.750 #height difference between two columns in metres\n", - "g=9.80665 #acc. due to gravity in m/s^2\n", - "Patm=dm*H*g/1000 #atmospheric pressure in kPa\n", - "print\"\\n hence, atmospheric pressure is\",round(Patm,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, atmospheric pressure is 99.54 kPa\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.5:pg-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#pressure inside vessel\n", - "\n", - "dm=13590 #density of mercury in kg/m^3\n", - "H=0.24 #height difference between two columns in metres\n", - "g=9.80665 #acc. due to gravity in m/s^2\n", - "dP=dm*H*g #pressure difference in Pa\n", - "Patm=13590*0.750*9.80665 #Atmospheric Pressure in Pa\n", - "Pvessel=dP+Patm #Absolute Pressure inside vessel in Pa\n", - "Pvessel=Pvessel/101325 #Absolute Pressure inside vessel in atm\n", - "print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,3),\"atm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, the absolute pressure inside vessel is 1.302 atm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.6:pg-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#calculating pressure\n", - "\n", - "dg=750 #density of gaasoline in kg/m^3\n", - "dR=1206 #density of R-134a in kg/m^3\n", - "H=7.5 #height of storage tank in metres\n", - "g=9.807 #acc. due to gravity in m/s^2\n", - "dP1=dg*g*H/1000 #in kPa\n", - "Ptop1=101 #atmospheric pressure in kPa\n", - "P1=dP1+Ptop1\n", - "print\"hence,pressure at the bottom of storage tank if fluid is gasoline is\",round(P1,1),\"kPa\" \n", - "dP2=dR*g*H/1000 #in kPa\n", - "Ptop2=1000 #top surface pressure in kPa\n", - "P2=dP2+Ptop2\n", - "print\"\\n hence, pressure at the bottom of storage tank if liquid is R-134a is\",round(P2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,pressure at the bottom of storage tank if fluid is gasoline is 156.2 kPa\n", - "\n", - " hence, pressure at the bottom of storage tank if liquid is R-134a is 1089.0 kPa\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.7:pg-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#calculating balancing force\n", - "\n", - "Po=100#Outside atmospheric pressure in kPa\n", - "F1=25 #net force on the smallest piston in kN\n", - "A1=0.01 #cross sectional area of lower piston in m^2\n", - "P1=Po+F1/A1 #fluid pressure in kPa\n", - "d=900 #density of fluid in kg/m^3\n", - "g=9.81 #acc. due to gravity in m/s^2\n", - "H=6 #height of second piston in comparison to first one in m\n", - "P2=P1-d*g*H/1000 #pressure at higher elevation on piston 2 in kPa\n", - "A2=0.05 #cross sectional area of higher piston in m^3\n", - "F2=(P2-Po)*A2 #balancing force on second piston in kN\n", - "print\"\\n hence, balancing force on second larger piston is\",round(F2,1),\"N\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, balancing force on second larger piston is 122.4 N\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb deleted file mode 100755 index 08e192fe..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb +++ /dev/null @@ -1,379 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:96f5bd0fa542764d6a8f75d5a1a42e4b79791697476f4029d0fa0fea1de65bed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter2:SOME CONCEPTS AND DEFINITIONS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.1:pg-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#weight of a person\n", - "\n", - "\n", - "m=1 #kg\n", - "g=9.75 #acc.due to gravity in m/s^2\n", - "F=m*g #weight of 1 kg mass in N\n", - "print\"\\n hence,weight of person is\",round(F,2),\" N\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,weight of person is 9.75 N\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.1E:pg-20" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#weight of a person\n", - "\n", - "\n", - "m=1 #lbm\n", - "g=32 #acc.due to gravity in ft/s^2\n", - "F=m*g/32.174 #weight of 1 lbm mass in lbf\n", - "print\"\\n hence,weight of person is\",round(F,4),\" lbf\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,weight of person is 0.9946 lbf\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.2:pg-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#average volume and density\n", - "\n", - "Vliq=0.2 #volume of liquid in m^3\n", - "dliq=997 #density of liquid in kg/m^3\n", - "Vstone=0.12 #volume of stone in m^3\n", - "Vsand=0.15 #volume of sand in m^3\n", - "Vair=0.53 #vo;ume of air in m^3\n", - "mliq=Vliq*dliq #mass of liquid in kg\n", - "dstone=2750 #density of stone in kg/m^3\n", - "dsand=1500 #density of sand in kg/m^3\n", - "mstone=Vstone*dstone #volume of stone in m^3\n", - "msand=Vsand*dsand #volume of sand in m^3\n", - "Vtot=1 #total volume in m^3\n", - "dair=1.1 #density of air in kg/m^3\n", - "mair=Vair*dair #mass of air\n", - "mtot=mair+msand+mliq+mstone #total mass in kg\n", - "v=Vtot/mtot #specific volume in m^3/kg\n", - "d=1/v #overall density in kg/m^3\n", - "print\"\\n hence,average specific volume is\",round(v,6),\"m^3/kg\" \n", - "print\"\\n and overall density is\", round(d),\"kg/m^3\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,average specific volume is 0.001325 m^3/kg\n", - "\n", - " and overall density is 755.0 kg/m^3\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.3:pg-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#calculating the required force\n", - "import math\n", - "\n", - "Dcyl=0.1 #cylinder diameter in m\n", - "Drod=0.01 #rod diameter in m\n", - "Acyl=math.pi*Dcyl**2/4 #cross sectional area of cylinder in m^2\n", - "Arod=math.pi*Drod**2/4 #cross sectional area of rod in m^2\n", - "Pcyl=250000 #inside hydaulic pressure in Pa\n", - "Po=101000 #outside atmospheric pressure in kPa\n", - "g=9.81 #acc. due to gravity in m/s^2\n", - "mp=25 #mass of (rod+piston) in kg\n", - "F=Pcyl*Acyl-Po*(Acyl-Arod)-mp*g #the force that rod can push within the upward direction in N\n", - "print\"\\n hence,the force that rod can push within the upward direction is\",round(F,1),\" N\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the force that rod can push within the upward direction is 932.9 N\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.4:pg-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#Calculating atmospheric pressure \n", - "\n", - "dm=13534 #density of mercury in kg/m^3\n", - "H=0.750 #height difference between two columns in metres\n", - "g=9.80665 #acc. due to gravity in m/s^2\n", - "Patm=dm*H*g/1000 #atmospheric pressure in kPa\n", - "print\"\\n hence, atmospheric pressure is\",round(Patm,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, atmospheric pressure is 99.54 kPa\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.5:pg-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#pressure inside vessel\n", - "\n", - "dm=13590 #density of mercury in kg/m^3\n", - "H=0.24 #height difference between two columns in metres\n", - "g=9.80665 #acc. due to gravity in m/s^2\n", - "dP=dm*H*g #pressure difference in Pa\n", - "Patm=13590*0.750*9.80665 #Atmospheric Pressure in Pa\n", - "Pvessel=dP+Patm #Absolute Pressure inside vessel in Pa\n", - "Pvessel=Pvessel/101325 #Absolute Pressure inside vessel in atm\n", - "print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,3),\"atm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, the absolute pressure inside vessel is 1.302 atm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.5E:pg-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#pressure inside vessel\n", - "\n", - "dm=848 #density of mercury in lbm/ft^3\n", - "H=9.5 #height difference between two columns in inches\n", - "g=32.174 #acc. due to gravity in ft/s^2\n", - "dP=dm*H*g #pressure difference in lbf/in^2\n", - "Patm=848*9.5*32.174/(1728*32.174) #Atmospheric Pressure in lbf/in^2\n", - "Pvessel=dP+Patm #Absolute Pressure inside vessel in lbf/in^2\n", - "Pvessel=848*29.5*32.174/(1728*32.174)+Patm #Absolute Pressure inside vessel in lbf/in^2\n", - "print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,2),\"lbf/in^2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, the absolute pressure inside vessel is 19.14 lbf/in^2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.6:pg-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#calculating pressure\n", - "\n", - "dg=750 #density of gaasoline in kg/m^3\n", - "dR=1206 #density of R-134a in kg/m^3\n", - "H=7.5 #height of storage tank in metres\n", - "g=9.807 #acc. due to gravity in m/s^2\n", - "dP1=dg*g*H/1000 #in kPa\n", - "Ptop1=101 #atmospheric pressure in kPa\n", - "P1=dP1+Ptop1\n", - "print\"hence,pressure at the bottom of storage tank if fluid is gasoline is\",round(P1,1),\"kPa\" \n", - "dP2=dR*g*H/1000 #in kPa\n", - "Ptop2=1000 #top surface pressure in kPa\n", - "P2=dP2+Ptop2\n", - "print\"\\n hence, pressure at the bottom of storage tank if liquid is R-134a is\",round(P2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,pressure at the bottom of storage tank if fluid is gasoline is 156.2 kPa\n", - "\n", - " hence, pressure at the bottom of storage tank if liquid is R-134a is 1089.0 kPa\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.7:pg-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#calculating balancing force\n", - "\n", - "Po=100#Outside atmospheric pressure in kPa\n", - "F1=25 #net force on the smallest piston in kN\n", - "A1=0.01 #cross sectional area of lower piston in m^2\n", - "P1=Po+F1/A1 #fluid pressure in kPa\n", - "d=900 #density of fluid in kg/m^3\n", - "g=9.81 #acc. due to gravity in m/s^2\n", - "H=6 #height of second piston in comparison to first one in m\n", - "P2=P1-d*g*H/1000 #pressure at higher elevation on piston 2 in kPa\n", - "A2=0.05 #cross sectional area of higher piston in m^3\n", - "F2=(P2-Po)*A2 #balancing force on second piston in kN\n", - "print\"\\n hence, balancing force on second larger piston is\",round(F2,1),\"N\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, balancing force on second larger piston is 122.4 N\n" - ] - } - ], - "prompt_number": 19 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter3.ipynb b/Fundamentals_Of_Thermodynamics/Chapter3.ipynb deleted file mode 100755 index 7447d700..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter3.ipynb +++ /dev/null @@ -1,403 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6916c81bc8c1ac256991650a35c94801d5197d3ce593f7738220895278cf5f8b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter3:PROPERTIES OF A PURE SUBSTANCE" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.3:pg-59" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#determining the quality and specific volume\n", - "\n", - "v1=0.5 #given specific volume in m^3/kg\n", - "vf=0.001073 #specific volume when only liquid phase is present in m^3/kg\n", - "vfg=0.60475 #in m^3/kg\n", - "x=(v1-vf)/vfg #quality\n", - "print\"For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is\",round(x,3)\n", - "\n", - "v2=1 #given specific volume in m^3/kg\n", - "\n", - " # using the method of interplotation\n", - "T=((400-300)*(1.0-0.8753))/(1.0315-0.8753)+300 #temperature of the water\n", - "print\"For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is\",round(T,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is 0.825\n", - "For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is 379.8\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.4:pg-60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - " #example 4\n", - "#percentage of vapor \n", - "\n", - "vliq=0.1 #volume of saturated liquid in m^3\n", - "vf=0.000843 #in m^3/kg\n", - "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n", - "vg=0.02671 #in m^3/kg\n", - "mliq=vliq/vf #mass of liquid in kg \n", - "mvap=vvap/vg #mass of vapor in kg\n", - "m=mliq+mvap #total mass in kg\n", - "x=mvap*100/m #percentage of vapor on mass basis\n", - "print\"hence,% vapor on mass basis is\",round(x,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,% vapor on mass basis is 22.1 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.6:pg-61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#Determinig the missing property\n", - "\n", - "T1=273-53.2 #given temperature in K\n", - "P1=600 #given pressure in kPa\n", - "print\"This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\"\n", - "T2=100 #given temp. in K\n", - "v2=0.008 #given specific volume in m^3/kg\n", - "vf=0.001452 #in m^3/kg\n", - "vg=0.0312 #in m^3/kg\n", - "Psat=779.2 #saturation pressure in kPa\n", - "vfg=vg-vf #in m^3/kg\n", - "x=(v2-vf)/vfg #quality\n", - "print\"\\n hence, the pressure is\",round(Psat,1),\"kPa\"\n", - "print\"\\n and quality is\",round(x,4),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\n", - "\n", - " hence, the pressure is 779.2 kPa\n", - "\n", - " and quality is 0.2201 %\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.7:pg-62" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#determining the pressure of water\n", - "\n", - "vg=0.12736 #specific volume in m^3/kg for water at 200C\n", - "v=0.4 #specific volume in m^3/kg\n", - "P1=500 #in kPa\n", - "v1=0.42492 #specific volume at P1 in m^3/kg\n", - "P2=600 #in kPa\n", - "v2=0.35202 #specific volume at P2 in m^3/kg\n", - "P=P1+(P2-P1)*(v-v1)/(v2-v1) #calculating pressure by interplotation\n", - "print \"hence,the pressure of water is\",round(P,1),\" kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " hence,the pressure of water is 534.2 kPa\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.8:pg-66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#calculating mass of air\n", - "\n", - "P=100 #pressure in kPa\n", - "V=6*10*4 #volume of room in m^3\n", - "R=0.287 #in kN-m/kg-K\n", - "T=25 #temperature in Celsius\n", - "m=P*V/(R*(T+273.1)) #mass of air contained in room\n", - "print\"\\n hence, mass of air contained in room is\",round(m,1),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, mass of air contained in room is 280.5 kg\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.9:pg-67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#calculating pressure inside tank\n", - "\n", - "V=0.5 #volumr of tank in m^3\n", - "m=10 #mass of ideal gas in kg\n", - "T=25 #temperature of tank in Celsius\n", - "M=24 #molecular mass of gas in kg/kmol\n", - "Ru=8.3145 #universal gas constant in kN-m/kmol-K\n", - "R=Ru/M #gas constant for given ideal gas in kN-m/kg-K\n", - "P=m*R*(T+273.2)/V #pressure inside tank\n", - "print\"\\n hence,pressure inside tank is\",round(P),\"kpa\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,pressure inside tank is 2066.0 kpa\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.10:pg-67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#mass flow rate\n", - "\n", - "dt=185 #time period in seconds over which there is incrrease in volume \n", - "dV=0.75 #increase in volume in 0.75 in m^3\n", - "V=dV/dt #volume flow rate in m^3/s\n", - "P=105 #pressure inside gas bell kPa\n", - "T=21 #temperature in celsius\n", - "R=0.1889 #ideal gas constant in kJ/kg-K\n", - "m=P*V/(R*(T+273.15)) #mass flow rate of the flow in kg/s\n", - "print\"\\n hence,mass flow rate is\",round(m,5),\"kg/s\"\n", - "print\"\\n and volume flow rate is\",round(V,5),\"m^3/s\"\n", - "#The answer of volume flow rate in the book is wrong." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,mass flow rate is 0.00766 kg/s\n", - "\n", - " and volume flow rate is 0.00405 m^3/s\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.12:pg-71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12\n", - "#determining specific using diffenet laws\n", - "\n", - "T=100.0 #given temp.in 100 celsius\n", - "P=3.0 #given pressure in MPa\n", - "v1=0.0065 #specific volume in m^3/kg using table\n", - "print\"\\n hence,the specific volume for R-134a using R-134a tables is\",round(v1,3),\"m^3/kg\"\n", - "M=102.3 #molecular mass in kg\n", - "R=8.3145 #in kJ/K\n", - "Ru=R/M #in kJ/K-kg\n", - "v2=Ru*(T+273)/(P*1000) #specific volume assuming R-134a to be ideal gas in m^3/kg\n", - "print\"\\n hence,the specific volume for R-134a using R-134a the ideal gas laws is\",round(v2,5),\"m^3/kg\"\n", - "Tr=373.2/374.2 #reduced temperature using generalized chart\n", - "Pr=3.0/4.06 #reduced pressure using generalized chart\n", - "Z=0.67 #compressibility factor \n", - "v3=Z*v2 # specific volume using generalized chart in m^3/kg\n", - "print\"\\n hence,the specific volume for R-134a using the generalized chart is\",round(v3,5),\"m^3/kg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the specific volume for R-134a using R-134a tables is 0.006 m^3/kg\n", - "\n", - " hence,the specific volume for R-134a using R-134a the ideal gas laws is 0.01011 m^3/kg\n", - "\n", - " hence,the specific volume for R-134a using the generalized chart is 0.00677 m^3/kg\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.13:pg-71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13\n", - "#calculating mass of gas\n", - "\n", - "Pc=4250 #critical pressure of propane in kPa\n", - "Tc=369.8 #critical temperature in K\n", - "T=15 #temperature of propane in celsius\n", - "Tr=T/Tc #reduced temperature\n", - "Prsat=0.2 # reduced pressure \n", - "P=Prsat*Pc #pressure in kPa\n", - "x=0.1 #given quality\n", - "Zf=0.035 #from graph\n", - "Zg=0.83 #from graph\n", - "Z=(1-x)*Zf+x*Zg #overall compressibility factor\n", - "V=0.1 #volume of steel bottle in m^3\n", - "R=0.1887 #in kPa-m^3/kg-K\n", - "m=P*V/(Z*R*(T+273)) #total propane mass in kg\n", - "print\"\\n hence,the total propane mass is\",round(m,2),\"kg\"\n", - "print\"\\n and pressure is\",round(P,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the total propane mass is 13.66 kg\n", - "\n", - " and pressure is 850.0 kPa\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb deleted file mode 100755 index 64998280..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb +++ /dev/null @@ -1,571 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b6e51b20af9aaa1b32972245e7dbe7cc42b3ed40e5f3cbf6db8837625a12aebc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter3:PROPERTIES OF A PURE SUBSTANCE" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.1:pg-57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#determinig the phase of water\n", - "\n", - "print\"from the table,we find that at 120C,saturation pressure of water is 198.5 kPa.But here we have pressure of 500 kPa.hence,water exists as a compressed liquid here.\"\n", - "print\"also at 120C,vf=0.00106 kg/m^3 and vg=0.89186 kg/m^3.given v=0.5 m^3/kg i.e. vfvg,so the state is superheated vapor\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from the table,we find that at 30C,saturation pressure of ammonia is 1167 kPa.But here we have pressure of 1000 kPa.hence,ammonia exists in superheated vapor state.\n", - "for R-22 at 200 kPa,vg=0.1119 kg/m^3.given v=0.15 m^3/kg i.e. v>vg,so the state is superheated vapor\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.3:pg-59" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#determining the quality and specific volume\n", - "\n", - "v1=0.5 #given specific volume in m^3/kg\n", - "vf=0.001073 #specific volume when only liquid phase is present in m^3/kg\n", - "vfg=0.60475 #in m^3/kg\n", - "x=(v1-vf)/vfg #quality\n", - "print\"For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is\",round(x,3)\n", - "\n", - "v2=1 #given specific volume in m^3/kg\n", - "\n", - " # using the method of interplotation\n", - "T=((400-300)*(1.0-0.8753))/(1.0315-0.8753)+300 #temperature of the water\n", - "print\"For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is\",round(T,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is 0.825\n", - "For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is 379.8\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.4:pg-60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - " #example 4\n", - "#percentage of vapor \n", - "\n", - "vliq=0.1 #volume of saturated liquid in m^3\n", - "vf=0.000843 #in m^3/kg\n", - "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n", - "vg=0.02671 #in m^3/kg\n", - "mliq=vliq/vf #mass of liquid in kg \n", - "mvap=vvap/vg #mass of vapor in kg\n", - "m=mliq+mvap #total mass in kg\n", - "x=mvap*100/m #percentage of vapor on mass basis\n", - "print\"hence,% vapor on mass basis is\",round(x,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,% vapor on mass basis is 22.1 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.4E:pg-60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - " #example 5\n", - "#percentage of vapor \n", - "\n", - "vliq=0.1 #volume of saturated liquid in ft^3\n", - "vf=0.0136 #in ft^3/lbm\n", - "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n", - "vg=0.4009 #in ft^3/lbm\n", - "mliq=vliq/vf #mass of liquid in lbm \n", - "mvap=vvap/vg #mass of vapor in lbm\n", - "m=mliq+mvap #total mass in lbm\n", - "x=mvap*100/m #percentage of vapor on mass basis\n", - "print\"hence,% vapor on mass basis is\",round(x,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,% vapor on mass basis is 23.4 %\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.5:pg-61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating pressure after heat addition\n", - "\n", - "v1=0.14922 #specific volume of sautrated ammonia in m^3/kg\n", - "print\"Since the volume does not change during the process,the specific volume remains constant.therefore\"\n", - "v2=v1 #in m^3/kg\n", - "print\"Since vg at 40C is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\"\n", - "P2=945 #final pressure in kPa\n", - "print\"hence,the final pressure is 945 kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Since the volume does not change during the process,the specific volume remains constant.therefore\n", - "Since vg at 40C is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\n", - "hence,the final pressure is 945 kPa\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.5E:pg-61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating pressure after heat addition\n", - "\n", - "v1=2.311 #specific volume of sautrated ammonia in ft^3/lbm\n", - "print\"Since the volume does not change during the process,the specific volume remains constant.therefore\"\n", - "v2=v1 #in ft^3/lbm\n", - "print\"Since vg at 120f is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\"\n", - "P2=145 #final pressure in lbf/in^2\n", - "print\"hence,the final pressure is 145 lbf/in^2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Since the volume does not change during the process,the specific volume remains constant.therefore\n", - "Since vg at 120f is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\n", - "hence,the final pressure is 145 lbf/in^2\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.6:pg-61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#Determinig the missing property\n", - "\n", - "T1=273-53.2 #given temperature in K\n", - "P1=600 #given pressure in kPa\n", - "print\"This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\"\n", - "T2=100 #given temp. in K\n", - "v2=0.008 #given specific volume in m^3/kg\n", - "vf=0.001452 #in m^3/kg\n", - "vg=0.0312 #in m^3/kg\n", - "Psat=779.2 #saturation pressure in kPa\n", - "vfg=vg-vf #in m^3/kg\n", - "x=(v2-vf)/vfg #quality\n", - "print\"\\n hence, the pressure is\",round(Psat,1),\"kPa\"\n", - "print\"\\n and quality is\",round(x,4),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\n", - "\n", - " hence, the pressure is 779.2 kPa\n", - "\n", - " and quality is 0.2201 %\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.7:pg-62" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#determining the pressure of water\n", - "\n", - "vg=0.12736 #specific volume in m^3/kg for water at 200C\n", - "v=0.4 #specific volume in m^3/kg\n", - "P1=500 #in kPa\n", - "v1=0.42492 #specific volume at P1 in m^3/kg\n", - "P2=600 #in kPa\n", - "v2=0.35202 #specific volume at P2 in m^3/kg\n", - "P=P1+(P2-P1)*(v-v1)/(v2-v1) #calculating pressure by interplotation\n", - "print \"hence,the pressure of water is\",round(P,1),\" kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " hence,the pressure of water is 534.2 kPa\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.8:pg-66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#calculating mass of air\n", - "\n", - "P=100 #pressure in kPa\n", - "V=6*10*4 #volume of room in m^3\n", - "R=0.287 #in kN-m/kg-K\n", - "T=25 #temperature in Celsius\n", - "m=P*V/(R*(T+273.1)) #mass of air contained in room\n", - "print\"\\n hence, mass of air contained in room is\",round(m,1),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, mass of air contained in room is 280.5 kg\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.9:pg-67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#calculating pressure inside tank\n", - "\n", - "V=0.5 #volumr of tank in m^3\n", - "m=10 #mass of ideal gas in kg\n", - "T=25 #temperature of tank in Celsius\n", - "M=24 #molecular mass of gas in kg/kmol\n", - "Ru=8.3145 #universal gas constant in kN-m/kmol-K\n", - "R=Ru/M #gas constant for given ideal gas in kN-m/kg-K\n", - "P=m*R*(T+273.2)/V #pressure inside tank\n", - "print\"\\n hence,pressure inside tank is\",round(P),\"kpa\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,pressure inside tank is 2066.0 kpa\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.10:pg-67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#mass flow rate\n", - "\n", - "dt=185 #time period in seconds over which there is incrrease in volume \n", - "dV=0.75 #increase in volume in 0.75 in m^3\n", - "V=dV/dt #volume flow rate in m^3/s\n", - "P=105 #pressure inside gas bell kPa\n", - "T=21 #temperature in celsius\n", - "R=0.1889 #ideal gas constant in kJ/kg-K\n", - "m=P*V/(R*(T+273.15)) #mass flow rate of the flow in kg/s\n", - "print\"\\n hence,mass flow rate is\",round(m,5),\"kg/s\"\n", - "print\"\\n and volume flow rate is\",round(V,5),\"m^3/s\"\n", - "#The answer of volume flow rate in the book is wrong." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,mass flow rate is 0.00766 kg/s\n", - "\n", - " and volume flow rate is 0.00405 m^3/s\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.12:pg-71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12\n", - "#determining specific using diffenet laws\n", - "\n", - "T=100.0 #given temp.in 100 celsius\n", - "P=3.0 #given pressure in MPa\n", - "v1=0.0065 #specific volume in m^3/kg using table\n", - "print\"\\n hence,the specific volume for R-134a using R-134a tables is\",round(v1,3),\"m^3/kg\"\n", - "M=102.3 #molecular mass in kg\n", - "R=8.3145 #in kJ/K\n", - "Ru=R/M #in kJ/K-kg\n", - "v2=Ru*(T+273)/(P*1000) #specific volume assuming R-134a to be ideal gas in m^3/kg\n", - "print\"\\n hence,the specific volume for R-134a using R-134a the ideal gas laws is\",round(v2,5),\"m^3/kg\"\n", - "Tr=373.2/374.2 #reduced temperature using generalized chart\n", - "Pr=3.0/4.06 #reduced pressure using generalized chart\n", - "Z=0.67 #compressibility factor \n", - "v3=Z*v2 # specific volume using generalized chart in m^3/kg\n", - "print\"\\n hence,the specific volume for R-134a using the generalized chart is\",round(v3,5),\"m^3/kg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the specific volume for R-134a using R-134a tables is 0.006 m^3/kg\n", - "\n", - " hence,the specific volume for R-134a using R-134a the ideal gas laws is 0.01011 m^3/kg\n", - "\n", - " hence,the specific volume for R-134a using the generalized chart is 0.00677 m^3/kg\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.13:pg-71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13\n", - "#calculating mass of gas\n", - "\n", - "Pc=4250 #critical pressure of propane in kPa\n", - "Tc=369.8 #critical temperature in K\n", - "T=15 #temperature of propane in celsius\n", - "Tr=T/Tc #reduced temperature\n", - "Prsat=0.2 # reduced pressure \n", - "P=Prsat*Pc #pressure in kPa\n", - "x=0.1 #given quality\n", - "Zf=0.035 #from graph\n", - "Zg=0.83 #from graph\n", - "Z=(1-x)*Zf+x*Zg #overall compressibility factor\n", - "V=0.1 #volume of steel bottle in m^3\n", - "R=0.1887 #in kPa-m^3/kg-K\n", - "m=P*V/(Z*R*(T+273)) #total propane mass in kg\n", - "print\"\\n hence,the total propane mass is\",round(m,2),\"kg\"\n", - "print\"\\n and pressure is\",round(P,2),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the total propane mass is 13.66 kg\n", - "\n", - " and pressure is 850.0 kPa\n" - ] - } - ], - "prompt_number": 44 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter4.ipynb b/Fundamentals_Of_Thermodynamics/Chapter4.ipynb deleted file mode 100755 index eed9d20a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter4.ipynb +++ /dev/null @@ -1,198 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:da3557673ab31ece618ad10f5b0d3ef78112ff36bd0b260e508d99211060a1c9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4:WORK AND HEAT" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.1:PG-96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#work done during different processes\n", - "import math\n", - "\n", - "P1=200 #initial pressure inside cylinder in kPa\n", - "V2=0.1 #in m^3\n", - "V1=0.04 #initial volume of gas in m^3\n", - "\n", - "W1=P1*(V2-V1) #work done in isobaric process in kJ\n", - "print\"\\n hence,the work done during the isobaric process is\",round(W1,2),\"kJ. \\n\"\n", - "\n", - "W2=P1*V1*math.log(V2/V1) #work done in isothermal process in kJ\n", - "print\"\\n hence,the work done in isothermal process is\",round(W2,2),\"kJ. \\n\"\n", - "\n", - "P2=P1*(V1/V2)**(1.3) #final pressure according to the given process\n", - "W3=(P2*V2-P1*V1)/(1-1.3)\n", - "print\"\\n hence,the work done during the described process is\",round(W3,2),\"kJ. \\n\"\n", - "\n", - "W4=0 #work done in isochoric process\n", - "print\"\\n hence,the work done in the isochoric process is\",round(W4,3),\"kJ. \\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the work done during the isobaric process is 12.0 kJ. \n", - "\n", - "\n", - " hence,the work done in isothermal process is 7.33 kJ. \n", - "\n", - "\n", - " hence,the work done during the described process is 6.41 kJ. \n", - "\n", - "\n", - " hence,the work done in the isochoric process is 0.0 kJ. \n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.3:PG-99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "\n", - "#work produced\n", - "\n", - "Psat=190.2 #in kPa\n", - "P1=Psat #saturation pressure in state 1\n", - "vf=0.001504 #in m^3/kg\n", - "vfg=0.62184 #in m^3/kg\n", - "x1=0.25 #quality\n", - "v1=vf+x1*vfg #specific volume at state 1 in m^3/kg\n", - "v2=1.41*v1 #specific volume at state 2 in m^3/kg\n", - "P2=600 #pressure in state 2 in kPa from Table B.2.2\n", - "m=0.5 #mass of ammonia in kg\n", - "W=m*(P1+P2)*(v2-v1)/2 #woork produced by ammonia in kJ\n", - "print \"The final pressure is\",round(P2),\"kPa\\n\"\n", - "print \"hence,work produced by ammonia is\",round(W,2),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The final pressure is 600.0 kPa\n", - "\n", - "hence,work produced by ammonia is 12.71 kJ\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.4:PG-100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "\n", - "#calculating work done\n", - "\n", - "v1=0.35411 #specific volume at state 1 in m^3/kg\n", - "v2=v1/2 \n", - "m=0.1 #mass of water in kg\n", - "P1=1000 #pressure inside cylinder in kPa\n", - "W=m*P1*(v2-v1) #in kJ\n", - "print \"the work in the overall process is\",round(W,1),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the work in the overall process is -17.7 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.7:PG-108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#heat transfer\n", - "k=1.4 #conductivity of glass pane in W/m-K\n", - "A=0.5 #total surface area of glass pane\n", - "dx=0.005 #thickness of glasspane in m\n", - "dT1=20-12.1 #temperature difference between room air and outer glass surface temperature in celsius\n", - "Q=-k*A*dT1/dx #conduction through glass slab in W\n", - "h=100 #convective heat transfer coefficient in W/m^2-K \n", - "dT=12.1-(-10) #temperature difference between warm room and colder ambient in celsius\n", - "Q2=h*A*dT #heat transfer in convective layer in W\n", - "#result\n", - "print \"the rate of heat transfer in the glass and convective layer is\",round(Q2),\"kW.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the rate of heat transfer in the glass and convective layer is 1105.0 kW.\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb deleted file mode 100755 index eed9d20a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb +++ /dev/null @@ -1,198 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:da3557673ab31ece618ad10f5b0d3ef78112ff36bd0b260e508d99211060a1c9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4:WORK AND HEAT" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.1:PG-96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#work done during different processes\n", - "import math\n", - "\n", - "P1=200 #initial pressure inside cylinder in kPa\n", - "V2=0.1 #in m^3\n", - "V1=0.04 #initial volume of gas in m^3\n", - "\n", - "W1=P1*(V2-V1) #work done in isobaric process in kJ\n", - "print\"\\n hence,the work done during the isobaric process is\",round(W1,2),\"kJ. \\n\"\n", - "\n", - "W2=P1*V1*math.log(V2/V1) #work done in isothermal process in kJ\n", - "print\"\\n hence,the work done in isothermal process is\",round(W2,2),\"kJ. \\n\"\n", - "\n", - "P2=P1*(V1/V2)**(1.3) #final pressure according to the given process\n", - "W3=(P2*V2-P1*V1)/(1-1.3)\n", - "print\"\\n hence,the work done during the described process is\",round(W3,2),\"kJ. \\n\"\n", - "\n", - "W4=0 #work done in isochoric process\n", - "print\"\\n hence,the work done in the isochoric process is\",round(W4,3),\"kJ. \\n\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the work done during the isobaric process is 12.0 kJ. \n", - "\n", - "\n", - " hence,the work done in isothermal process is 7.33 kJ. \n", - "\n", - "\n", - " hence,the work done during the described process is 6.41 kJ. \n", - "\n", - "\n", - " hence,the work done in the isochoric process is 0.0 kJ. \n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.3:PG-99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "\n", - "#work produced\n", - "\n", - "Psat=190.2 #in kPa\n", - "P1=Psat #saturation pressure in state 1\n", - "vf=0.001504 #in m^3/kg\n", - "vfg=0.62184 #in m^3/kg\n", - "x1=0.25 #quality\n", - "v1=vf+x1*vfg #specific volume at state 1 in m^3/kg\n", - "v2=1.41*v1 #specific volume at state 2 in m^3/kg\n", - "P2=600 #pressure in state 2 in kPa from Table B.2.2\n", - "m=0.5 #mass of ammonia in kg\n", - "W=m*(P1+P2)*(v2-v1)/2 #woork produced by ammonia in kJ\n", - "print \"The final pressure is\",round(P2),\"kPa\\n\"\n", - "print \"hence,work produced by ammonia is\",round(W,2),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The final pressure is 600.0 kPa\n", - "\n", - "hence,work produced by ammonia is 12.71 kJ\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.4:PG-100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "\n", - "#calculating work done\n", - "\n", - "v1=0.35411 #specific volume at state 1 in m^3/kg\n", - "v2=v1/2 \n", - "m=0.1 #mass of water in kg\n", - "P1=1000 #pressure inside cylinder in kPa\n", - "W=m*P1*(v2-v1) #in kJ\n", - "print \"the work in the overall process is\",round(W,1),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the work in the overall process is -17.7 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.7:PG-108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#heat transfer\n", - "k=1.4 #conductivity of glass pane in W/m-K\n", - "A=0.5 #total surface area of glass pane\n", - "dx=0.005 #thickness of glasspane in m\n", - "dT1=20-12.1 #temperature difference between room air and outer glass surface temperature in celsius\n", - "Q=-k*A*dT1/dx #conduction through glass slab in W\n", - "h=100 #convective heat transfer coefficient in W/m^2-K \n", - "dT=12.1-(-10) #temperature difference between warm room and colder ambient in celsius\n", - "Q2=h*A*dT #heat transfer in convective layer in W\n", - "#result\n", - "print \"the rate of heat transfer in the glass and convective layer is\",round(Q2),\"kW.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the rate of heat transfer in the glass and convective layer is 1105.0 kW.\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter5.ipynb b/Fundamentals_Of_Thermodynamics/Chapter5.ipynb deleted file mode 100755 index 24351fdb..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter5.ipynb +++ /dev/null @@ -1,469 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8e29dcea16eab605fcf93b95197200be339c1be6076d5413e7d70418a9a6df29" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5:THE FIRST LAW OF THERMODYNAMICS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.1:pg-131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#calculating height\n", - "\n", - "m=1100 #mass of car in kg\n", - "ke=400 #kinetic energy of car in kJ\n", - "V=(2*ke*1000/m)**0.5 #velocity of car in m/s\n", - "g=9.807 #acc. due to gravity in m/s^2\n", - "H=ke*1000/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", - "print\"hence,the car should be raised to a height is\",round(H,1),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,the car should be raised to a height is 37.1 m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.2:pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#change in internal energy\n", - "\n", - "W=-5090 #work input to paddle wheel in kJ\n", - "Q=-1500 #heat transfer from tank in kJ\n", - "dU=Q-W #change in internal energy in kJ\n", - "print\"hence,change in internal energy is\",round(dU),\"kj\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,change in internal energy is 3590.0 kj\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.3:pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#analysis of energy transfer\n", - "\n", - "g=9.806 #acceleration due to gravity in m/s^2\n", - "m=10 #mass of stone in kg\n", - "H1=10.2 #initial height of stone above water in metres\n", - "H2=0 #final height in metres\n", - "dKE1=-m*g*(H2-H1) #change in kinetic energy when stone enters state 2 in J\n", - "dPE1=-1 #change in potential energy when stone enters state 2 in J\n", - "print\"\\n hence,when stone is \",round(dKE1),\"J\"\n", - "print\"\\n and change in potential energy is \",round(dPE1),\"J\"\n", - "dPE2=0 #change in potential energy when stone enters state 3 in JQ2=0 //no heat transfer when stone enters state 3 in J\n", - "W2=0 #no work done when stone enters state 3 in J\n", - "dKE2=-1 #change in kinetic energy when stone enters state 3\n", - "dU2=-dKE2 #change in internal energy when stone enters state 3 in J\n", - "print\"\\n hence,when stone has just come to rest in the bucket is \",round(dKE2),\"J\" \n", - "print\"\\n and dU is\",round(dU2),\"J\" \n", - "dKE3=0 #change in kinetic energy when stone enters state 4\n", - "dPE=0 #change in potential energy when stone enters state 4 in J\n", - "W3=0 #no work done when stone enters state 4 in J\n", - "dU3=-1 #change in internal energy when stone enters state 4 in J\n", - "Q3=dU3 #heat transfer when stone enters state 4 in J\n", - "print\"\\n hence,when stone has entered state 4 is\",round(dU3),\"J\" \n", - "print\"\\n and Q3 is \",round(Q3),\"J\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,when stone is 1000.0 J\n", - "\n", - " and change in potential energy is -1.0 J\n", - "\n", - " hence,when stone has just come to rest in the bucket is -1.0 J\n", - "\n", - " and dU is 1.0 J\n", - "\n", - " hence,when stone has entered state 4 is -1.0 J\n", - "\n", - " and Q3 is -1.0 J\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.4:pg-136" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#Determinig the missing properties \n", - "\n", - "T1=300 #given temp. in Celsius\n", - "u1=2780 #given specific internal enrgy in kJ/kg\n", - "print\"From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\" #hiven pressure in kPa\n", - "u2=2000 #given specific intrernal energy in kJ/kg\n", - "print\"at P=2000 kPa\"\n", - "uf=906.4 #in kJ/kg\n", - "ug=2600.3 #in kJ/kg \n", - "x2=(u2-906.4)/(ug-uf) \n", - "print\"Also, under the given conditions\"\n", - "vf=0.001177 #in m^3/kg \n", - "vg=0.099627 #in m^3/kg\n", - "v2=vf+x2*(vg-vf)#Specific volume for water in m^3/kg\n", - "print\"\\n hence,specific volume for water is \",round(v2,5),\"m^3/kg\" \n", - "print\"\\n Therefore ,this state is \",round(x2,4),\"N\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\n", - "at P=2000 kPa\n", - "Also, under the given conditions\n", - "\n", - " hence,specific volume for water is 0.06474 m^3/kg\n", - "\n", - " Therefore ,this state is 0.6456 N\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.5:pg-138" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating heat transfer for the given process\n", - "\n", - "Vliq=0.05 #volume of saturated liquid in m^3\n", - "vf=0.001043 #in m^3/kg\n", - "Vvap=4.95 #volume of saturated water vapour in m^3\n", - "vg=1.6940 #in m^3/kg\n", - "m1liq=Vliq/vf #mass of liquid in kg\n", - "m1liq=round(m1liq,2)\n", - "m1vap=Vvap/vg #mass of vapors in kg\n", - "m1vap=round(m1vap,2)\n", - "u1liq=417.36 #specific internal energy of liquid in kJ/kg\n", - "u1vap=2506.1 #specific internal energy of vapors in kJ/kg\n", - "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in kJ\n", - "m=m1liq+m1vap #total mass in kg\n", - "V=5.0 #total volume in m^3\n", - "v2=V/m #final specific volume in m^3/kg\n", - "print\"by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\"\n", - "u2=2600.5 #specific internal energy at final state in kJ/kg\n", - "U2=m*u2 #internal energy at final state in kJ\n", - "Q=U2-U1 #heat transfer for the process in kJ\n", - "print\"\\n hence,heat transfer for the process is\",round(Q),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\n", - "\n", - " hence,heat transfer for the process is 104935.0 kJ\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:pg-143" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#calculating work and heat transfer for the process\n", - "\n", - "V1=0.1 #volume of cylinder in m^3\n", - "m=0.5 #mass of steam in kg\n", - "v1=V1/m #specific volume of steam in m^3/kg\n", - "vf=0.001084 #m^3/kg\n", - "vfg=0.4614 #m^3/kg\n", - "x1=(v1-vf)/vfg #quality\n", - "hf=604.74 #kJ/kg\n", - "hfg=2133.8#kJ/kg\n", - "h2=3066.8 #final specific heat enthalpy in kJ/kg\n", - "h1=hf+x1*hfg #initial specific enthalpy in kJ/kg\n", - "Q=m*(h2-h1) #heat transfer for this process in kJ\n", - "P=400 #pressure inside cylinder in kPa\n", - "v2=0.6548 #specific enthalpy in m^3/kg\n", - "W=m*P*(v2-v1) #work done for the process in kJ\n", - "print\"\\n hence, work done for the process is\",round(W),\"kJ\" \n", - "print\"\\n and heat transfer is \",round(Q,1),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, work done for the process is 91.0 kJ\n", - "\n", - " and heat transfer is 771.1 kJ\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.8:pg-151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#calculating change in enthalpy\n", - "import math\n", - "\n", - "h1=273.2 #specific heat enthalpy for oxygen at 300 K\n", - "h2=1540.2 #specific heat enthalpy for oxygen at 1500 K\n", - "T1=300 #initial temperature in K\n", - "T2=1500 #final temparature in K\n", - "\n", - "dh1=h2-h1 #this change in specific heat enthalpy is calculated using ideal gas tables \n", - "dh3=0.922*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n", - "dh4=1.0767*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n", - "print\"\\n Hence,change in specific heat enthalpy if ideal gas tables are used is \",round(dh1,1),\"kJ/kg\"\n", - "print\"\\n if specific heat is assumed to be constant and using its value at T1 is\",round(dh3,1),\"kJ/kg\"\n", - "print\"\\n if specific heat is assumed to be constant at its value at (T1+T2)/2 is\",round(dh4,1),\"kJ/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence,change in specific heat enthalpy if ideal gas tables are used is 1267.0 kJ/kg\n", - "\n", - " if specific heat is assumed to be constant and using its value at T1 is 1106.4 kJ/kg\n", - "\n", - " if specific heat is assumed to be constant at its value at (T1+T2)/2 is 1292.0 kJ/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.9:pg-152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#determining amount of heat transfer\n", - "\n", - "P=150 #pressure of nitrogen in cylinder in kPa\n", - "V=0.1 #initial volume of cylinder in m^3\n", - "T1=25 #initial temperature of nitrogen in celsius\n", - "T2=150 #final tempareture of nitrogen in celsius\n", - "R=0.2968 #in kJ/kg-K\n", - "m=P*V/(R*(T1+273)) #mass of nitrogen in kg\n", - "Cv=0.745 #constant volume specific heat for nitrogen in kJ/kg-K\n", - "W=-20 #work done on nitrogen gas in kJ\n", - "Q=m*Cv*(T2-T1)+W #heat transfer during the process in kJ\n", - "print\"\\n hence,the heat transfer for the above process is\",round(Q,1),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the heat transfer for the above process is -4.2 kJ\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.10:pg-155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#calculating rate of increase of internal energy\n", - "\n", - "W=-12.8*20 #power consumed in J/s\n", - "Q=-10 #heat transfer rate from battery in J/s\n", - "r=Q-W #rate of increase of internal energy\n", - "print\"\\n hence,the rate of increase of internal energy is\",round(r),\"J/s\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the rate of increase of internal energy is 246.0 J/s\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.11:pg-155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11\n", - "#rate of change of temperature\n", - "\n", - "Q=1500.0 #power produced by burning wood in J/s\n", - "mair=1 #mass of air in kg\n", - "mwood=5 #mass of soft pine wood in kg \n", - "miron=25 #mass of cast iron in kg\n", - "Cvair=0.717 #constant volume specific heat for air in kJ/kg\n", - "Cwood=1.38 #constant volume specific heat for wood in kJ/kg\n", - "Ciron=0.42 #constant volume specific heat for iron in kJ/kg\n", - "dT=75-20 #increase in temperature in Celsius\n", - "T=(Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) #rate of change of temperature in K/s\n", - "dt=(dT/T)/60 #in minutes\n", - "print\" hence,the rate of change of temperature is\",round(T,4),\"k/s\" \n", - "print\" and time taken to reach a temperature of T is\",round(dt),\"min\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " hence,the rate of change of temperature is 0.0828 k/s\n", - " and time taken to reach a temperature of T is 11.0 min\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb deleted file mode 100755 index 5a9734bc..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb +++ /dev/null @@ -1,635 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:bc9fbdf4ecee4bce9770355a576adf487ef4df6d34bad14ada42e8383ea01d91" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5:THE FIRST LAW OF THERMODYNAMICS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.1:pg-131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#calculating height\n", - "\n", - "m=1100 #mass of car in kg\n", - "ke=400 #kinetic energy of car in kJ\n", - "V=(2*ke*1000/m)**0.5 #velocity of car in m/s\n", - "g=9.807 #acc. due to gravity in m/s^2\n", - "H=ke*1000/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", - "print\"hence,the car should be raised to a height is\",round(H,1),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,the car should be raised to a height is 37.1 m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.1E:pg-132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1E\n", - "#calculating height\n", - "\n", - "m=2400 #mass of car in lbm\n", - "ke=400 #kinetic energy of car in Btu\n", - "V=(2*ke*778.17*32.174/m)**0.5 #velocity of car in ft/s\n", - "g=32.174 #acc. due to gravity in ft/s^2\n", - "H=ke*778.17*32.174/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", - "print\"hence,the car should be raised to a height is\",round(H,1),\"ft\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,the car should be raised to a height is 129.7 ft\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.2:pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#change in internal energy\n", - "\n", - "W=-5090 #work input to paddle wheel in kJ\n", - "Q=-1500 #heat transfer from tank in kJ\n", - "dU=Q-W #change in internal energy in kJ\n", - "print\"hence,change in internal energy is\",round(dU),\"kj\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "hence,change in internal energy is 3590.0 kj\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.3:pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#analysis of energy transfer\n", - "\n", - "g=9.806 #acceleration due to gravity in m/s^2\n", - "m=10 #mass of stone in kg\n", - "H1=10.2 #initial height of stone above water in metres\n", - "H2=0 #final height in metres\n", - "dKE1=-m*g*(H2-H1) #change in kinetic energy when stone enters state 2 in J\n", - "dPE1=-1 #change in potential energy when stone enters state 2 in J\n", - "print\"\\n hence,when stone is \",round(dKE1),\"J\"\n", - "print\"\\n and change in potential energy is \",round(dPE1),\"J\"\n", - "dPE2=0 #change in potential energy when stone enters state 3 in JQ2=0 //no heat transfer when stone enters state 3 in J\n", - "W2=0 #no work done when stone enters state 3 in J\n", - "dKE2=-1 #change in kinetic energy when stone enters state 3\n", - "dU2=-dKE2 #change in internal energy when stone enters state 3 in J\n", - "print\"\\n hence,when stone has just come to rest in the bucket is \",round(dKE2),\"J\" \n", - "print\"\\n and dU is\",round(dU2),\"J\" \n", - "dKE3=0 #change in kinetic energy when stone enters state 4\n", - "dPE=0 #change in potential energy when stone enters state 4 in J\n", - "W3=0 #no work done when stone enters state 4 in J\n", - "dU3=-1 #change in internal energy when stone enters state 4 in J\n", - "Q3=dU3 #heat transfer when stone enters state 4 in J\n", - "print\"\\n hence,when stone has entered state 4 is\",round(dU3),\"J\" \n", - "print\"\\n and Q3 is \",round(Q3),\"J\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,when stone is 1000.0 J\n", - "\n", - " and change in potential energy is -1.0 J\n", - "\n", - " hence,when stone has just come to rest in the bucket is -1.0 J\n", - "\n", - " and dU is 1.0 J\n", - "\n", - " hence,when stone has entered state 4 is -1.0 J\n", - "\n", - " and Q3 is -1.0 J\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.4:pg-136" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#Determinig the missing properties \n", - "\n", - "T1=300 #given temp. in Celsius\n", - "u1=2780 #given specific internal enrgy in kJ/kg\n", - "print\"From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\" #hiven pressure in kPa\n", - "u2=2000 #given specific intrernal energy in kJ/kg\n", - "print\"at P=2000 kPa\"\n", - "uf=906.4 #in kJ/kg\n", - "ug=2600.3 #in kJ/kg \n", - "x2=(u2-906.4)/(ug-uf) \n", - "print\"Also, under the given conditions\"\n", - "vf=0.001177 #in m^3/kg \n", - "vg=0.099627 #in m^3/kg\n", - "v2=vf+x2*(vg-vf)#Specific volume for water in m^3/kg\n", - "print\"\\n hence,specific volume for water is \",round(v2,5),\"m^3/kg\" \n", - "print\"\\n Therefore ,this state is \",round(x2,4),\"N\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\n", - "at P=2000 kPa\n", - "Also, under the given conditions\n", - "\n", - " hence,specific volume for water is 0.06474 m^3/kg\n", - "\n", - " Therefore ,this state is 0.6456 N\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.5:pg-138" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating heat transfer for the given process\n", - "\n", - "Vliq=0.05 #volume of saturated liquid in m^3\n", - "vf=0.001043 #in m^3/kg\n", - "Vvap=4.95 #volume of saturated water vapour in m^3\n", - "vg=1.6940 #in m^3/kg\n", - "m1liq=Vliq/vf #mass of liquid in kg\n", - "m1liq=round(m1liq,2)\n", - "m1vap=Vvap/vg #mass of vapors in kg\n", - "m1vap=round(m1vap,2)\n", - "u1liq=417.36 #specific internal energy of liquid in kJ/kg\n", - "u1vap=2506.1 #specific internal energy of vapors in kJ/kg\n", - "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in kJ\n", - "m=m1liq+m1vap #total mass in kg\n", - "V=5.0 #total volume in m^3\n", - "v2=V/m #final specific volume in m^3/kg\n", - "print\"by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\"\n", - "u2=2600.5 #specific internal energy at final state in kJ/kg\n", - "U2=m*u2 #internal energy at final state in kJ\n", - "Q=U2-U1 #heat transfer for the process in kJ\n", - "print\"\\n hence,heat transfer for the process is\",round(Q),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\n", - "\n", - " hence,heat transfer for the process is 104935.0 kJ\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.5E:pg-140" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5E\n", - "#calculating heat transfer for the given process\n", - "\n", - "Vliq=1 #volume of saturated liquid in ft^3\n", - "vf=0.01672 #in ft^3/lbm\n", - "Vvap=99 #volume of saturated water vapour in m^3\n", - "vg=26.80 #in ft^3/lbm\n", - "m1liq=Vliq/vf #mass of liquid in lbm\n", - "m1liq=round(m1liq,2)\n", - "m1vap=Vvap/vg #mass of vapors in lbm\n", - "m1vap=round(m1vap,2)\n", - "u1liq=180.1 #specific internal energy of liquid in Btu/lbm\n", - "u1vap=1077.6 #specific internal energy of vapors in Btu/lbm\n", - "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in Btu\n", - "U1=round(U1)\n", - "m=m1liq+m1vap #total mass in lbm\n", - "V=100.0 #total volume in ft^3\n", - "v2=V/m #final specific volume in ft^3/lbm\n", - "print\"by interplotation we find that for steam, if vg=1.575 ft^3/lbm then pressure is 294 lbf/in^2\"\n", - "u2=1117.0 #specific internal energy at final state in Btu/lbm\n", - "U2=m*u2 #internal energy at final state in Btu\n", - "U2=round(U2)\n", - "Q=U2-U1 #heat transfer for the process in Btu\n", - "print\"\\n hence,heat transfer for the process is\",round(Q),\"Btu\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "by interplotation we find that for steam, if vg=1.575 ft^3/lbm then pressure is 294 lbf/in^2\n", - "\n", - " hence,heat transfer for the process is 56182.0 Btu\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:pg-143" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#calculating work and heat transfer for the process\n", - "\n", - "V1=0.1 #volume of cylinder in m^3\n", - "m=0.5 #mass of steam in kg\n", - "v1=V1/m #specific volume of steam in m^3/kg\n", - "vf=0.001084 #m^3/kg\n", - "vfg=0.4614 #m^3/kg\n", - "x1=(v1-vf)/vfg #quality\n", - "hf=604.74 #kJ/kg\n", - "hfg=2133.8#kJ/kg\n", - "h2=3066.8 #final specific heat enthalpy in kJ/kg\n", - "h1=hf+x1*hfg #initial specific enthalpy in kJ/kg\n", - "Q=m*(h2-h1) #heat transfer for this process in kJ\n", - "P=400 #pressure inside cylinder in kPa\n", - "v2=0.6548 #specific enthalpy in m^3/kg\n", - "W=m*P*(v2-v1) #work done for the process in kJ\n", - "print\"\\n hence, work done for the process is\",round(W),\"kJ\" \n", - "print\"\\n and heat transfer is \",round(Q,1),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, work done for the process is 91.0 kJ\n", - "\n", - " and heat transfer is 771.1 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.7:pg-144" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# example 7\n", - "#calculating work and heat transfer for the process\n", - "V1=0.010 #volume of cylinder in m^3\n", - "V2=0.040 # m^3\n", - "P1=573 #kPa\n", - "v1=0.03606 #specific volume of steam in m^3/kg\n", - "u1=389.2 #kJ/kg\n", - "m=V1/v1#mass of steam in kg\n", - "v2=v1*(V2/V1)\n", - "P2=163 #kPa\n", - "u2=395.8 # kJ/kg\n", - "W=8 # kJ\n", - "Q2=m*(u2-u1)+W\n", - "u3=383.4#kJ/kg\n", - "W2=m*(u1-u3)#kJ\n", - "print\"\\n and heat transfer is \",round(Q2,2),\"kJ\" \n", - "print\"\\n hence, work done for the process is\",round(W2,1),\"kJ\" \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " and heat transfer is 9.83 kJ\n", - "\n", - " hence, work done for the process is 1.6 kJ\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.8:pg-151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#calculating change in enthalpy\n", - "import math\n", - "\n", - "h1=273.2 #specific heat enthalpy for oxygen at 300 K\n", - "h2=1540.2 #specific heat enthalpy for oxygen at 1500 K\n", - "T1=300 #initial temperature in K\n", - "T2=1500 #final temparature in K\n", - "\n", - "dh1=h2-h1 #this change in specific heat enthalpy is calculated using ideal gas tables \n", - "dh3=0.922*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n", - "dh4=1.0767*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n", - "print\"\\n Hence,change in specific heat enthalpy if ideal gas tables are used is \",round(dh1,1),\"kJ/kg\"\n", - "print\"\\n if specific heat is assumed to be constant and using its value at T1 is\",round(dh3,1),\"kJ/kg\"\n", - "print\"\\n if specific heat is assumed to be constant at its value at (T1+T2)/2 is\",round(dh4,1),\"kJ/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence,change in specific heat enthalpy if ideal gas tables are used is 1267.0 kJ/kg\n", - "\n", - " if specific heat is assumed to be constant and using its value at T1 is 1106.4 kJ/kg\n", - "\n", - " if specific heat is assumed to be constant at its value at (T1+T2)/2 is 1292.0 kJ/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.9:pg-152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#determining amount of heat transfer\n", - "\n", - "P=150 #pressure of nitrogen in cylinder in kPa\n", - "V=0.1 #initial volume of cylinder in m^3\n", - "T1=25 #initial temperature of nitrogen in celsius\n", - "T2=150 #final tempareture of nitrogen in celsius\n", - "R=0.2968 #in kJ/kg-K\n", - "m=P*V/(R*(T1+273)) #mass of nitrogen in kg\n", - "Cv=0.745 #constant volume specific heat for nitrogen in kJ/kg-K\n", - "W=-20 #work done on nitrogen gas in kJ\n", - "Q=m*Cv*(T2-T1)+W #heat transfer during the process in kJ\n", - "print\"\\n hence,the heat transfer for the above process is\",round(Q,1),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the heat transfer for the above process is -4.2 kJ\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.9E:pg-153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9E\n", - "#determining amount of heat transfer\n", - "\n", - "P=20 #pressure of nitrogen in cylinder in lbf/in^2\n", - "V=2 #initial volume of cylinder in ft^3\n", - "T1=80 #initial temperature of nitrogen in F\n", - "T2=300 #final tempareture of nitrogen in F\n", - "R=55.15 #in ft*lbf/lbm-R\n", - "m=P*V*144/(R*(540)) #mass of nitrogen in lbm\n", - "Cv=0.177 #constant volume specific heat for nitrogen in Btu/lbm-R\n", - "W=-9.15 #work done on nitrogen gas in Btu\n", - "Q=m*Cv*(T2-T1)+W #heat transfer during the process in Btu\n", - "print\"\\n hence,the heat transfer for the above process is\",round(Q,2),\"Btu\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the heat transfer for the above process is -1.62 Btu\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.10:pg-155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#calculating rate of increase of internal energy\n", - "\n", - "W=-12.8*20 #power consumed in J/s\n", - "Q=-10 #heat transfer rate from battery in J/s\n", - "r=Q-W #rate of increase of internal energy\n", - "print\"\\n hence,the rate of increase of internal energy is\",round(r),\"J/s\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the rate of increase of internal energy is 246.0 J/s\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.11:pg-155" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11\n", - "#rate of change of temperature\n", - "\n", - "Q=1500.0 #power produced by burning wood in J/s\n", - "mair=1 #mass of air in kg\n", - "mwood=5 #mass of soft pine wood in kg \n", - "miron=25 #mass of cast iron in kg\n", - "Cvair=0.717 #constant volume specific heat for air in kJ/kg\n", - "Cwood=1.38 #constant volume specific heat for wood in kJ/kg\n", - "Ciron=0.42 #constant volume specific heat for iron in kJ/kg\n", - "dT=75-20 #increase in temperature in Celsius\n", - "T=(Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) #rate of change of temperature in K/s\n", - "dt=(dT/T)/60 #in minutes\n", - "print\" hence,the rate of change of temperature is\",round(T,4),\"k/s\" \n", - "print\" and time taken to reach a temperature of T is\",round(dt),\"min\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " hence,the rate of change of temperature is 0.0828 k/s\n", - " and time taken to reach a temperature of T is 11.0 min\n" - ] - } - ], - "prompt_number": 49 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter6.ipynb deleted file mode 100755 index 2548c7ee..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter6.ipynb +++ /dev/null @@ -1,566 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:084379625b3dc39247a3be2201f659a82e58d8004d66338e0ef15cb00bca073d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6:FIRST-LAW ANALYSIS FOR A CONTROL VOLUME" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.1:pg-182" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#calculating mass flow rate in kg/s\n", - "import math\n", - "R=0.287 #in kJ/kg-K\n", - "T=25 #temperature in celsius\n", - "P=150 #pressure in kPa\n", - "v=R*(T+273.15)/P #specific volume in m^3/kg\n", - "D=0.2 #diameter of pipe in metre\n", - "A=math.pi*D**2/4 #cross sectional area in m^2\n", - "V=0.1 #velocity of air in m/s\n", - "m=V*A/v #mass flow rate in kg/s\n", - "print\"\\n hence,the mass flow rate is\",round(m,4),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the mass flow rate is 0.0055 kg/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.2:pg-184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#work done for adding the fluid\n", - "\n", - "P=600 #pressure in kPa\n", - "m=1 #in kg\n", - "v=0.001 #specific volume in m^3/kg\n", - "W=P*m*v #necessary work in kJ for adding the fluid \n", - "print\" \\n hence,the work involved in this process is\",round(W,4),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,the work involved in this process is 0.6 kJ\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.3:pg-188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#rate of flow of water\n", - "\n", - "hir=441.89 #in kJ/kg for refrigerant using steam table \n", - "her=249.10 #in kJ/kg for refrigerant using steam table\n", - "hiw=42 #in kJ/kg for water using steam table\n", - "hew=83.95 #in kJ/kg for water using steam table\n", - "mr=0.2 #the rate at which refrigerant enters the condenser in kg/s\n", - "mw=mr*(hir-her)/(hew-hiw) #rate of flow of water in kg/s\n", - "print\"\\n hence,the rate at which cooling water flows thorugh the condenser is\",round(mw,3),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the rate at which cooling water flows thorugh the condenser is 0.919 kg/s\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.4:pg-190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#determining quality of steam\n", - "\n", - "hi=2850.1 #initial specific heat enthalpy for steam in kJ/kg\n", - "Vi=50 #initial velocity of steam in m/s\n", - "Ve=600 #final velocity of steam in m/s\n", - "he=hi+Vi**2/(2*1000)-Ve**2/(2*1000) #final specific heat enthalpy for steam in kJ/kg\n", - "hf=467.1 #at final state in kJ/kg\n", - "hfg=2226.5 #at final state in kJ/kg\n", - "xe=(he-hf)/hfg #quality of steam in final state\n", - "print\" \\n hence, the quality is\",round(xe,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence, the quality is 0.99\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.5:pg-193" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#quality of ammonia leaving expansion valve\n", - "\n", - "hi=346.8 #specific heat enthalpy for ammonia at initial state in kJ/kg\n", - "he=hi #specific heat enthalpy for ammonia at final state will be equal that at initial state because it is a throttling process\n", - "hf=134.4 #at final state in kJ/kg\n", - "hfg=1296.4#at final state in kJ/kg\n", - "xe=(he-hf)*100/hfg #quality at final state\n", - "print\"\\n hence,quality of the ammonia leaving the expansion valve is\",round(xe,2),\"%\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,quality of the ammonia leaving the expansion valve is 16.38 %\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.6:pg-194" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#power output of turbine in kW\n", - "\n", - "hi=3137 #initial specific heat of enthalpy in kJ/kg\n", - "he=2675.5 #final specific heat of enthalpy in kJ/kg\n", - "Vi=50.0 #initial velocity of steam in m/s\n", - "Ve=100 #final velocity of steam in m/s\n", - "Zi=6 #height of inlet conditions in metres\n", - "Ze=3 #height of exit conditions in metres\n", - "m=1.5 #mass flow rate of steam in kg/s\n", - "g=9.8066 #acc. due to gravity in m/s^2\n", - "Qcv=-8.5 #heat transfer rate from turbine in kW\n", - "Wcv=Qcv+m*(hi+Vi**2/(2*1000)+g*Zi/1000)-m*(he+Ve**2/(2*1000)+g*Ze/1000) #power output of turbine in kW\n", - "print\"\\n hence,the power output of the turbine is\",round(Wcv,1),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the power output of the turbine is 678.2 kW\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.7:pg-196" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#heat transfer rate in aftercooler\n", - "\n", - "V1=0 #we assume initial velocity to be zero because its given that it enters with a low velocity\n", - "V2=25.0 #final velocity with which carbon dioxide exits in m/s\n", - "h2=401.52 #final specific enthalpy of heat when carbon dioxide exits in kJ/kg\n", - "h1=198 #initial specific enthalpy of heat in kJ/kg\n", - "w=h1-h2-V2**2/(2*1000) #in kJ/kg\n", - "Wc=-50 #power input to the compressor in kW\n", - "m=Wc/w #mass flow rate of carbon dioxide in kg/s\n", - "h3=257.9 #final specific enthalpy of heat when carbon dioxide flows into a constant pressure aftercooler\n", - "Qcool=-m*(h3-h2) #heat transfer rate in the aftercooler in kW\n", - "print\" \\n hence,heat transfer rate in the aftercooler is\",round(Qcool,1),\"kW\" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,heat transfer rate in the aftercooler is 35.2 kW\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.8:pg-197" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#Required pump work\n", - "\n", - "m=1.5 #mass flow rate of water in kg/s\n", - "g=9.807 #acceleration due to gravity in m/s^2\n", - "Zin=-15 #depth of water pump in well in metres\n", - "Zex=0 #in metres\n", - "v=0.001001 #specific volume in m^3/kg\n", - "Pex=400+101.3 #exit pressure in kPa\n", - "Pin=90 #in kPa\n", - "W=m*(g*(Zin-Zex)*0.001-(Pex-Pin)*v) #power input in kW\n", - "print\" \\n Hence, the pump requires power of input is\",-round(W,2),\"kW\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " Hence, the pump requires power of input is 0.84 kW\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.9:pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#heat tranfer in simple steam power plant\n", - "\n", - "h1=3023.5 #specific heat of enthalpy of steam leaving boiler in kJ/kg\n", - "h2=3002.5 #specific heat of enthalpy of steam entering turbine in kJ/kg\n", - "x=0.9 #quality of steam entering condenser\n", - "hf=226 #in kJ/kg\n", - "hfg=2373.1 #in kJ/kg\n", - "h3=hf+x*hfg #specific heat of enthalpy of steam entering condenser in kJ/kg\n", - "h4=188.5 #specific heat of enthalpy of steam entering pump in kJ/kg\n", - "q12=h2-h1 #heat transfer in line between boiler and turbine in kJ/kg\n", - "w23=h2-h3 #turbine work in kJ/kg\n", - "q34=h4-h3 #heat transfer in condenser\n", - "w45=-4 #pump work in kJ/kg\n", - "h5=h4-w45 #in kJ/kg\n", - "q51=h1-h5 #heat transfer in boiler in kJ/kg\n", - "print\"\\n hence, heat transfer in line between boiler and turbine is\",round(q12,1),\"kJ/kg\" \n", - "print\"\\n hence, turbine work is\",round(w23,1),\"kJ/kg\" \n", - "print\"\\n hence, heat transfer in condenser is \",round(q34,1),\"kJ/kg\" \n", - "print\"\\n hence, heat transfer in boiler is \",round(q51,1),\"kJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, heat transfer in line between boiler and turbine is -21.0 kJ/kg\n", - "\n", - " hence, turbine work is 640.7 kJ/kg\n", - "\n", - " hence, heat transfer in condenser is -2173.3 kJ/kg\n", - "\n", - " hence, heat transfer in boiler is 2831.0 kJ/kg\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.10:pg-200" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#analysis of refrigerator\n", - "\n", - "hf4=167.4 #in kJ/kg\n", - "hfg4=215.6 #in kJ/kg\n", - "h3=241.8 #specific heat of enthalpy of R-134a entering expansion valve\n", - "h4=h3 #specific heat of enthalpy of R-134a leaving expansion valve\n", - "h1=387.2 #in kJ/kg\n", - "h2=435.1 #in kJ/kg\n", - "x4=(h3-hf4)/hfg4 #quality of R-134a at evaporator inlet\n", - "m=0.1 #mass flow rate in kg/s\n", - "Qevap=m*(h1-h4) #rate of heat transfer to the evaporator\n", - "Wcomp=-5 #power input to compressor in kW\n", - "Qcomp=m*(h2-h1)+Wcomp #rate of heat transfer from compressor\n", - "print\"\\n hence, the quality at the evaporator inlet is \",round(x4,3), \n", - "print\"\\n hence, the rate of heat transfer to the evaporator is \",round(Qevap,2),\n", - "print\"\\n hence, rate of heat transfer from the compressor is\",round(Qcomp,2), " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, the quality at the evaporator inlet is 0.345 \n", - " hence, the rate of heat transfer to the evaporator is 14.54 \n", - " hence, rate of heat transfer from the compressor is -0.21\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.11:pg-204" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11\n", - "#Determining the final temperature of steam\n", - "\n", - "u2=3040.4 #final internal energy in kJ/kg\n", - "hi=u2 #in kJ/kg\n", - "P2=1.4 #final Pressure in MPa\n", - "print\"Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \"\n", - "T2=452 #final temperature in Celsius" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.12:pg-206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12\n", - "#Calculating mass flow of steam in tank\n", - "\n", - "V1=0.4 #initial volume fo tank in m^3\n", - "v1=0.5243 #initial specific volume in m^3/kg\n", - "h1=3040.4 #initial specific enthalpy in kJ/kg\n", - "u1=2548.9 #initial specific internal energy in kJ/kg\n", - "m1=V1/v1 #initial mass of steam in tank in kg\n", - "V2=0.4 #final volume in m^3\n", - "print\"let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\" \n", - "T2=342 #final temperature in Celsius\n", - "v2=0.1974 #final specific volume in m^3/kg\n", - "m2=V2/v2 #final mass of the steam in the tank in kg\n", - "m=m2-m1 #mass of steam that flowsinto the tank\n", - "print\" \\n Hence,mass of the steam that flows into the tank is\",round(m,3),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\n", - " \n", - " Hence,mass of the steam that flows into the tank is 1.263 kg\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.13:pg-207" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13\n", - "#Calculating mass flow of steam in tank\n", - "\n", - "vf1=0.001725 #in m^3/kg\n", - "vf2=0.0016 #in m^3/kg\n", - "uf1=368.7 #in kJ/kg\n", - "uf2=226 #in kJ/kg\n", - "vg1=0.08313 #in m^3/kg\n", - "vfg2=0.20381\n", - "ug1=1341 #in kJ/kg\n", - "ufg2=1099.7 #in kJ/kg\n", - "Vf=1 #initial volume of liquid in m^3\n", - "Vg=1 #initial volume of vapor in m^3\n", - "mf1=Vf/vf1 #initial mass of liquid in kg\n", - "mg1=Vg/vg1 #initial mass of vapor in kg\n", - "m1=mf1+mg1 #initial mass of liquid in kg\n", - "he=1461.1 #in kJ/kg\n", - "V=2 #volume of tank in m^3\n", - "print\"m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\"\n", - "print\"Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\"\n", - "x2=((2*1461.1)-(2*226)-(0.00160*634706))/((634706*0.20381)+(2*1099.7)) #quality of ammonia\n", - "v2=0.00160+(0.20381*x2) #final specific volume in m^3/kg\n", - "m2=V/v2 #final mass of ammonia in kg\n", - "m=m1-m2 #mass of ammonia withdrawn\n", - "print\" \\n Hence,mass of ammonia withdrawn is\",round(m,1),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\n", - "Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\n", - " \n", - " Hence,mass of ammonia withdrawn is 72.7 kg\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb deleted file mode 100755 index 953e821b..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb +++ /dev/null @@ -1,652 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c03e579abb4dafb7ea55c1a7f66b6338546355647f3c3d21afe4e72021a3ad5f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6:FIRST-LAW ANALYSIS FOR A CONTROL VOLUME" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.1:pg-182" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#calculating mass flow rate in kg/s\n", - "import math\n", - "R=0.287 #in kJ/kg-K\n", - "T=25 #temperature in celsius\n", - "P=150 #pressure in kPa\n", - "v=R*(T+273.15)/P #specific volume in m^3/kg\n", - "D=0.2 #diameter of pipe in metre\n", - "A=math.pi*D**2/4 #cross sectional area in m^2\n", - "V=0.1 #velocity of air in m/s\n", - "m=V*A/v #mass flow rate in kg/s\n", - "print\"\\n hence,the mass flow rate is\",round(m,4),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the mass flow rate is 0.0055 kg/s\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.2:pg-184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#work done for adding the fluid\n", - "\n", - "P=600 #pressure in kPa\n", - "m=1 #in kg\n", - "v=0.001 #specific volume in m^3/kg\n", - "W=P*m*v #necessary work in kJ for adding the fluid \n", - "print\" \\n hence,the work involved in this process is\",round(W,4),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,the work involved in this process is 0.6 kJ\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.3:pg-188" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#rate of flow of water\n", - "\n", - "hir=441.89 #in kJ/kg for refrigerant using steam table \n", - "her=249.10 #in kJ/kg for refrigerant using steam table\n", - "hiw=42 #in kJ/kg for water using steam table\n", - "hew=83.95 #in kJ/kg for water using steam table\n", - "mr=0.2 #the rate at which refrigerant enters the condenser in kg/s\n", - "mw=mr*(hir-her)/(hew-hiw) #rate of flow of water in kg/s\n", - "print\"\\n hence,the rate at which cooling water flows thorugh the condenser is\",round(mw,3),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the rate at which cooling water flows thorugh the condenser is 0.919 kg/s\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.4:pg-190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#determining quality of steam\n", - "\n", - "hi=2850.1 #initial specific heat enthalpy for steam in kJ/kg\n", - "Vi=50 #initial velocity of steam in m/s\n", - "Ve=600 #final velocity of steam in m/s\n", - "he=hi+Vi**2/(2*1000)-Ve**2/(2*1000) #final specific heat enthalpy for steam in kJ/kg\n", - "hf=467.1 #at final state in kJ/kg\n", - "hfg=2226.5 #at final state in kJ/kg\n", - "xe=(he-hf)/hfg #quality of steam in final state\n", - "print\" \\n hence, the quality is\",round(xe,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence, the quality is 0.99\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.4E:pg-191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4E\n", - "#determining quality of steam\n", - "\n", - "hi=1227.5 #initial specific heat enthalpy for steam in Btu/lbm\n", - "Vi=200 #initial velocity of steam in ft/s\n", - "Ve=2000 #final velocity of steam in ft/s\n", - "he=hi+Vi**2/(2*32.17*778)-Ve**2/(2*32.17*778) #final specific heat enthalpy for steam in Btu/lbm\n", - "hf=198.31 #at final state in Btu/lbm\n", - "hfg=958.81 #at final state in Btu/lbm\n", - "xe=(he-hf)/hfg #quality of steam in final state\n", - "print\" \\n hence, the quality is\",round(xe,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence, the quality is 0.99\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.5:pg-193" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#quality of ammonia leaving expansion valve\n", - "\n", - "hi=346.8 #specific heat enthalpy for ammonia at initial state in kJ/kg\n", - "he=hi #specific heat enthalpy for ammonia at final state will be equal that at initial state because it is a throttling process\n", - "hf=134.4 #at final state in kJ/kg\n", - "hfg=1296.4#at final state in kJ/kg\n", - "xe=(he-hf)*100/hfg #quality at final state\n", - "print\"\\n hence,quality of the ammonia leaving the expansion valve is\",round(xe,2),\"%\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,quality of the ammonia leaving the expansion valve is 16.38 %\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.6:pg-194" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#power output of turbine in kW\n", - "\n", - "hi=3137 #initial specific heat of enthalpy in kJ/kg\n", - "he=2675.5 #final specific heat of enthalpy in kJ/kg\n", - "Vi=50.0 #initial velocity of steam in m/s\n", - "Ve=100 #final velocity of steam in m/s\n", - "Zi=6 #height of inlet conditions in metres\n", - "Ze=3 #height of exit conditions in metres\n", - "m=1.5 #mass flow rate of steam in kg/s\n", - "g=9.8066 #acc. due to gravity in m/s^2\n", - "Qcv=-8.5 #heat transfer rate from turbine in kW\n", - "Wcv=Qcv+m*(hi+Vi**2/(2*1000)+g*Zi/1000)-m*(he+Ve**2/(2*1000)+g*Ze/1000) #power output of turbine in kW\n", - "print\"\\n hence,the power output of the turbine is\",round(Wcv,1),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the power output of the turbine is 678.2 kW\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.7:pg-196" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#heat transfer rate in aftercooler\n", - "\n", - "V1=0 #we assume initial velocity to be zero because its given that it enters with a low velocity\n", - "V2=25.0 #final velocity with which carbon dioxide exits in m/s\n", - "h2=401.52 #final specific enthalpy of heat when carbon dioxide exits in kJ/kg\n", - "h1=198 #initial specific enthalpy of heat in kJ/kg\n", - "w=h1-h2-V2**2/(2*1000) #in kJ/kg\n", - "Wc=-50 #power input to the compressor in kW\n", - "m=Wc/w #mass flow rate of carbon dioxide in kg/s\n", - "h3=257.9 #final specific enthalpy of heat when carbon dioxide flows into a constant pressure aftercooler\n", - "Qcool=-m*(h3-h2) #heat transfer rate in the aftercooler in kW\n", - "print\" \\n hence,heat transfer rate in the aftercooler is\",round(Qcool,1),\"kW\" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,heat transfer rate in the aftercooler is 35.2 kW\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.8:pg-197" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#Required pump work\n", - "\n", - "m=1.5 #mass flow rate of water in kg/s\n", - "g=9.807 #acceleration due to gravity in m/s^2\n", - "Zin=-15 #depth of water pump in well in metres\n", - "Zex=0 #in metres\n", - "v=0.001001 #specific volume in m^3/kg\n", - "Pex=400+101.3 #exit pressure in kPa\n", - "Pin=90 #in kPa\n", - "W=m*(g*(Zin-Zex)*0.001-(Pex-Pin)*v) #power input in kW\n", - "print\" \\n Hence, the pump requires power of input is\",-round(W,2),\"kW\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " Hence, the pump requires power of input is 0.84 kW\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.9:pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#heat tranfer in simple steam power plant\n", - "\n", - "h1=3023.5 #specific heat of enthalpy of steam leaving boiler in kJ/kg\n", - "h2=3002.5 #specific heat of enthalpy of steam entering turbine in kJ/kg\n", - "x=0.9 #quality of steam entering condenser\n", - "hf=226 #in kJ/kg\n", - "hfg=2373.1 #in kJ/kg\n", - "h3=hf+x*hfg #specific heat of enthalpy of steam entering condenser in kJ/kg\n", - "h4=188.5 #specific heat of enthalpy of steam entering pump in kJ/kg\n", - "q12=h2-h1 #heat transfer in line between boiler and turbine in kJ/kg\n", - "w23=h2-h3 #turbine work in kJ/kg\n", - "q34=h4-h3 #heat transfer in condenser\n", - "w45=-4 #pump work in kJ/kg\n", - "h5=h4-w45 #in kJ/kg\n", - "q51=h1-h5 #heat transfer in boiler in kJ/kg\n", - "print\"\\n hence, heat transfer in line between boiler and turbine is\",round(q12,1),\"kJ/kg\" \n", - "print\"\\n hence, turbine work is\",round(w23,1),\"kJ/kg\" \n", - "print\"\\n hence, heat transfer in condenser is \",round(q34,1),\"kJ/kg\" \n", - "print\"\\n hence, heat transfer in boiler is \",round(q51,1),\"kJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, heat transfer in line between boiler and turbine is -21.0 kJ/kg\n", - "\n", - " hence, turbine work is 640.7 kJ/kg\n", - "\n", - " hence, heat transfer in condenser is -2173.3 kJ/kg\n", - "\n", - " hence, heat transfer in boiler is 2831.0 kJ/kg\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.10:pg-200" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#analysis of refrigerator\n", - "\n", - "hf4=167.4 #in kJ/kg\n", - "hfg4=215.6 #in kJ/kg\n", - "h3=241.8 #specific heat of enthalpy of R-134a entering expansion valve\n", - "h4=h3 #specific heat of enthalpy of R-134a leaving expansion valve\n", - "h1=387.2 #in kJ/kg\n", - "h2=435.1 #in kJ/kg\n", - "x4=(h3-hf4)/hfg4 #quality of R-134a at evaporator inlet\n", - "m=0.1 #mass flow rate in kg/s\n", - "Qevap=m*(h1-h4) #rate of heat transfer to the evaporator\n", - "Wcomp=-5 #power input to compressor in kW\n", - "Qcomp=m*(h2-h1)+Wcomp #rate of heat transfer from compressor\n", - "print\"\\n hence, the quality at the evaporator inlet is \",round(x4,3), \n", - "print\"\\n hence, the rate of heat transfer to the evaporator is \",round(Qevap,2),\n", - "print\"\\n hence, rate of heat transfer from the compressor is\",round(Qcomp,2), " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, the quality at the evaporator inlet is 0.345 \n", - " hence, the rate of heat transfer to the evaporator is 14.54 \n", - " hence, rate of heat transfer from the compressor is -0.21\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.11:pg-204" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11\n", - "#Determining the final temperature of steam\n", - "\n", - "u2=3040.4 #final internal energy in kJ/kg\n", - "hi=u2 #in kJ/kg\n", - "P2=1.4 #final Pressure in MPa\n", - "print\"Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \"\n", - "T2=452 #final temperature in Celsius" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.12:pg-206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12\n", - "#Calculating mass flow of steam in tank\n", - "\n", - "V1=0.4 #initial volume fo tank in m^3\n", - "v1=0.5243 #initial specific volume in m^3/kg\n", - "h1=3040.4 #initial specific enthalpy in kJ/kg\n", - "u1=2548.9 #initial specific internal energy in kJ/kg\n", - "m1=V1/v1 #initial mass of steam in tank in kg\n", - "V2=0.4 #final volume in m^3\n", - "print\"let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\" \n", - "T2=342 #final temperature in Celsius\n", - "v2=0.1974 #final specific volume in m^3/kg\n", - "m2=V2/v2 #final mass of the steam in the tank in kg\n", - "m=m2-m1 #mass of steam that flowsinto the tank\n", - "print\" \\n Hence,mass of the steam that flows into the tank is\",round(m,3),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\n", - " \n", - " Hence,mass of the steam that flows into the tank is 1.263 kg\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.13:pg-207" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13\n", - "#Calculating mass flow of steam in tank\n", - "\n", - "vf1=0.001725 #in m^3/kg\n", - "vf2=0.0016 #in m^3/kg\n", - "uf1=368.7 #in kJ/kg\n", - "uf2=226 #in kJ/kg\n", - "vg1=0.08313 #in m^3/kg\n", - "vfg2=0.20381\n", - "ug1=1341 #in kJ/kg\n", - "ufg2=1099.7 #in kJ/kg\n", - "Vf=1 #initial volume of liquid in m^3\n", - "Vg=1 #initial volume of vapor in m^3\n", - "mf1=Vf/vf1 #initial mass of liquid in kg\n", - "mg1=Vg/vg1 #initial mass of vapor in kg\n", - "m1=mf1+mg1 #initial mass of liquid in kg\n", - "he=1461.1 #in kJ/kg\n", - "V=2 #volume of tank in m^3\n", - "print\"m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\"\n", - "print\"Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\"\n", - "x2=((2*1461.1)-(2*226)-(0.00160*634706))/((634706*0.20381)+(2*1099.7)) #quality of ammonia\n", - "v2=0.00160+(0.20381*x2) #final specific volume in m^3/kg\n", - "m2=V/v2 #final mass of ammonia in kg\n", - "m=m1-m2 #mass of ammonia withdrawn\n", - "print\" \\n Hence,mass of ammonia withdrawn is\",round(m,1),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\n", - "Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\n", - " \n", - " Hence,mass of ammonia withdrawn is 72.7 kg\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.13E:pg-209" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13E\n", - "#Calculating mass flow of steam in tank\n", - "\n", - "vf1=0.02747#in ft3/lbm\n", - "vf2=0.02564#in ft3/lbm\n", - "uf1=153.89#in Btu/lbm\n", - "uf2=97.16#in Btu/lbm\n", - "vg1=1.4168 #in ft^3/lbm\n", - "vfg2=3.2647#in ft^3/lbm\n", - "ug1=576.23#in Btu/lbm\n", - "ufg2=472.78#in Btu/lbm\n", - "Vf=25 #initial volume of liquid in ft^3\n", - "Vg=25 #initial volume of vapor in ft^3\n", - "mf1=Vf/vf1 #initial mass of liquid in lbm\n", - "mg1=Vg/vg1 #initial mass of vapor in lbm\n", - "m1=mf1+mg1 #initial mass of liquid in lbm\n", - "he=628 #in Btu/lbm\n", - "V=50 #volume of tank in ft^3\n", - "print\"m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.02564+3.2647*x2) and u2=uf2+x2*ufg2=97.16+3.2647*x2.\"\n", - "print\"Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\"\n", - "x2=((50*628)-(50*97.16)-(432391*0.02564))/((432391*3.2647)+(50*472.98)) #quality of ammonia\n", - "x2=round(x2,6)\n", - "v2=0.02564+(3.2647*x2) #final specific volume in ft^3/lbm\n", - "v2=round(v2,6)\n", - "m2=V/v2 #final mass of ammonia in lbm\n", - "m=m1-m2 #mass of ammonia withdrawn\n", - "print\" \\n Hence,mass of ammonia withdrawn is\",round(m,1),\"lbm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.02564+3.2647*x2) and u2=uf2+x2*ufg2=97.16+3.2647*x2.\n", - "Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\n", - " \n", - " Hence,mass of ammonia withdrawn is 105.3 lbm\n" - ] - } - ], - "prompt_number": 27 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter7.ipynb b/Fundamentals_Of_Thermodynamics/Chapter7.ipynb deleted file mode 100755 index 8b49a808..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter7.ipynb +++ /dev/null @@ -1,188 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:eaab49a206212133280afcf75d94d2c8dc077f30ee178c5c537c49bf39ade08a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7:THE SECOND LAW OF THERMODYNAMICS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.1:pg-241" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#rate of fuel consumption\n", - "\n", - "W=136*0.7355 #output of automobile engine in kW\n", - "neng=0.3 #thermal efficiency of automobile engine\n", - "Qh=W/neng #energy output of fuel in kW\n", - "Q1=Qh-W #total rate of energy rejected to the ambient\n", - "qh=35000.0 #energy output of fuel in kJ/kg\n", - "m=Qh/qh #rate of fuel consumption in kg/s\n", - "print\"\\n hence,total rate of energy rejected is\",round(Q1),\"kW\" \n", - "print\"\\n and rate of fuel consumption is\",round(m,4),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,total rate of energy rejected is 233.0 kW\n", - "\n", - " and rate of fuel consumption is 0.0095 kg/s\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.2:pg-243" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#coefficient of performance of refrigerator\n", - "\n", - "Qh=400 #heat rejected to kitchen air in W\n", - "W=150.0 #electrical input power in W\n", - "Q1=Qh-W #rate of energy taken out to cold space in W\n", - "B=Ql/W #coefficicent of performnace of refrigerator\n", - "print\"\\n hence,rate of energy taken out of the cold space is\",round(Q1),\"W\"\n", - "print\"\\n and coefficient of performance of the refrigerator is\",round(B,2)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,rate of energy taken out of the cold space is 250.0 W\n", - "\n", - " and coefficient of performance of the refrigerator is 1.67\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.4:pg-260" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#comparison of ideal carnot heat engine with actual heat engine\n", - "\n", - "Qh=1000.0 #rate of heat transfer to heat engine in kW\n", - "W=450.0 #rate of production of work in kW\n", - "Ql=Qh-W #rate of heat rejected by heat engine in kW\n", - "nthermal=W/Qh #efficiency from the definition of efficiency\n", - "Tl=300 #temperature of surroundings in K\n", - "Th=550.0 #temperature of heat source in Celsius\n", - "ncarnot=1-Tl/(Th+273.15) #efficiency if heat engine is considered to be ideal carnot heat engine\n", - "W2=ncarnot*Qh #rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n", - "Q12=Qh-W2 #rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n", - "print\"\\n hence,energy discarded to the ambient surroundings iS\",round(Q12,4),\"kw\"\n", - "print\"\\n and the engine efficiency is\",round(ncarnot,4)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,energy discarded to the ambient surroundings iS 364.4536 kw\n", - "\n", - " and the engine efficiency is 0.6355\n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.5:pg-261" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating required work\n", - "\n", - "Tl=24+273.15 #room temperature in Kelvins\n", - "Th=35+273.15 #atmospheric temperature in Kelvins\n", - "Ql=4 #rate of heat rejection from room\n", - "B=Tl/(Th-Tl) #coefficient of performance of air conditioner\n", - "W=Ql/B #required work in kW\n", - "print\"\\n hence,the magnitude of reqiured work is\",round(W,2),\"kw\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the magnitude of reqiured work is 0.15 kw\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb deleted file mode 100755 index 02425dea..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb +++ /dev/null @@ -1,217 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a60a19bd48510a099eb4483e5176d858019753b734df1f9001e5af0e3bc7fc2e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7:THE SECOND LAW OF THERMODYNAMICS" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.1:pg-241" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#rate of fuel consumption\n", - "\n", - "W=136*0.7355 #output of automobile engine in kW\n", - "neng=0.3 #thermal efficiency of automobile engine\n", - "Qh=W/neng #energy output of fuel in kW\n", - "Q1=Qh-W #total rate of energy rejected to the ambient\n", - "qh=35000.0 #energy output of fuel in kJ/kg\n", - "m=Qh/qh #rate of fuel consumption in kg/s\n", - "print\"\\n hence,total rate of energy rejected is\",round(Q1),\"kW\" \n", - "print\"\\n and rate of fuel consumption is\",round(m,4),\"kg/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,total rate of energy rejected is 233.0 kW\n", - "\n", - " and rate of fuel consumption is 0.0095 kg/s\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.2:pg-243" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#coefficient of performance of refrigerator\n", - "\n", - "Qh=400 #heat rejected to kitchen air in W\n", - "W=150.0 #electrical input power in W\n", - "Q1=Qh-W #rate of energy taken out to cold space in W\n", - "B=Ql/W #coefficicent of performnace of refrigerator\n", - "print\"\\n hence,rate of energy taken out of the cold space is\",round(Q1),\"W\"\n", - "print\"\\n and coefficient of performance of the refrigerator is\",round(B,2)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,rate of energy taken out of the cold space is 250.0 W\n", - "\n", - " and coefficient of performance of the refrigerator is 1.67\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.3:pg-256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "# temperature at which the pressure go to zero\n", - "\n", - "P1=110.9#pressur at the ice point in kPa\n", - "P2=151.5#pressure at the steam point in kPa\n", - "T1=0#in C\n", - "T2=100#in C\n", - "S=(P2-P1)/(T2-T1)#slope in kPa/C\n", - "T=T1-(P1/S)# absolute ideal gas temperature in C\n", - "print\"\\n hence,the absolute ideal gas temperature is\",round(T,2),\"C\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the absolute ideal gas temperature is -273.15 C\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.4:pg-260" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#comparison of ideal carnot heat engine with actual heat engine\n", - "\n", - "Qh=1000.0 #rate of heat transfer to heat engine in kW\n", - "W=450.0 #rate of production of work in kW\n", - "Ql=Qh-W #rate of heat rejected by heat engine in kW\n", - "nthermal=W/Qh #efficiency from the definition of efficiency\n", - "Tl=300 #temperature of surroundings in K\n", - "Th=550.0 #temperature of heat source in Celsius\n", - "ncarnot=1-Tl/(Th+273.15) #efficiency if heat engine is considered to be ideal carnot heat engine\n", - "W2=ncarnot*Qh #rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n", - "Q12=Qh-W2 #rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n", - "print\"\\n hence,energy discarded to the ambient surroundings iS\",round(Q12,4),\"kw\"\n", - "print\"\\n and the engine efficiency is\",round(ncarnot,4)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,energy discarded to the ambient surroundings iS 364.4536 kw\n", - "\n", - " and the engine efficiency is 0.6355\n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex7.5:pg-261" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating required work\n", - "\n", - "Tl=24+273.15 #room temperature in Kelvins\n", - "Th=35+273.15 #atmospheric temperature in Kelvins\n", - "Ql=4 #rate of heat rejection from room\n", - "B=Tl/(Th-Tl) #coefficient of performance of air conditioner\n", - "W=Ql/B #required work in kW\n", - "print\"\\n hence,the magnitude of reqiured work is\",round(W,2),\"kw\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the magnitude of reqiured work is 0.15 kw\n" - ] - } - ], - "prompt_number": 40 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter8.ipynb b/Fundamentals_Of_Thermodynamics/Chapter8.ipynb deleted file mode 100755 index b1b6e75a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter8.ipynb +++ /dev/null @@ -1,452 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e95f45030ec153dab9aa085b0a83755a3b429532b4c58448d37853e1ca968b64" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8:ENTROPY" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.1:pg-290" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#coefficient of performance of refrigerator\n", - "\n", - "Th=60 #temperature at which heat is rejected from R-134a\n", - "Tl=0 #temperature at which heat is absorbed into the R-134a \n", - "s1=1.7262 #specific entropy at 0 Celsius\n", - "s2=s1 #process of state change from 1-2 is isentropic \n", - "s3=1.2857 #specific entropy at 60 celsius\n", - "s4=s3 #process of state change from 3-4 is isentropic\n", - "print\"if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\"\n", - "P2=1400+(1600-1400)*(1.7262-1.736)/(1.7135-1.736) #pressure after compression in kPa\n", - "B=(Th+273.15)/(Th-Tl) #coefficient of performance of refrigerator\n", - "print\" \\n hence,pressure after compression is \",round(P2,1),\"kPa\"\n", - "print\"\\n and coefficient of performance of refrigerator is\",round(B,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\n", - " \n", - " hence,pressure after compression is 1487.1 kPa\n", - "\n", - " and coefficient of performance of refrigerator is 5.55\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.2:pg-290" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2 \n", - "#heat transfer in a given process\n", - "\n", - "u1=87.94 #specific internal energy of R-12 at state 1 in kJ/kg\n", - "u2=276.44 #specific internal energy of R-12 at state 2 in kJ/kg\n", - "s1=0.3357 #specific entropy at state 1 in kJ/kg-K\n", - "s2=1.2108 #specific entropy at state 2 in kJ/kg-K\n", - "V=0.001 #volume of saturated liquid in m^3\n", - "v1=0.000923 #specific volume in m^3/kg\n", - "m=V/v1 #mass of saturated liquid in kg\n", - "T=20 #temperature of liquid in celsius\n", - "Q12=m*(T+273.15)*(s2-s1) #heat transfer in kJ to accomplish the process\n", - "W12=m*(u1-u2)+Q12 #work required to accomplish the process\n", - "print\" \\n hence,work required to accomplish the process is\",round(W12,1),\"KJ\"\n", - "print\" \\n and heat transfer is\",round(Q12,1),\"KJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,work required to accomplish the process is 73.7 KJ\n", - " \n", - " and heat transfer is 277.9 KJ\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.3:pg-293" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#entropy change\n", - "import math\n", - "C=4.184 # specific heat of water in kJ/kg-K\n", - "T1=20 #initial temperature of water in celsius\n", - "T2=90 #final temperature of water in celsius\n", - "dS1=C*math.log((T2+273.2)/(T1+273.2)) #change in entropy in kJ/kg-K\n", - "dS2=1.1925-0.2966 #in kJ/kg-K using steam tables\n", - "print\"\\n hence,change in entropy assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n", - "print\"\\n using steam table is\",round(dS2,4),\"KJ/kg-k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,change in entropy assuming constant specific heat is 0.8958 KJ/kg-k\n", - "\n", - " using steam table is 0.8959 KJ/kg-k\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.4:pg-295" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#entropy change with different assumptions\n", - "import math\n", - "T1=300 #initial temperature in kelvins\n", - "T2=1500 #final temperature in kelvins\n", - "P1=200.0 #initial pressure in kPa\n", - "P2=150.0 #final pressure in kPa\n", - "R=0.2598 # in kJ/kg-K\n", - "Cp=0.922 #specific heat in kJ/kg-K at constant pressure\n", - "dsT2=8.0649 #in kJ/kg-K\n", - "dsT1=6.4168 #in kJ/kg-K\n", - "dS1=dsT2-dsT1-R*math.log(P2/P1) #entropy change calculated using ideal gas tables\n", - "dS3=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat in kJ/kg-K\n", - "dS4=1.0767*math.log(T2/T1)+0.0747 #entropy change assuming specific heat is constant at its value at 990K\n", - "print\"\\n hence,change in entropy using ideal gas tables is\",round(dS1,4),\"KJ/kg-k\"\n", - "print\"\\n hence,change in entropy using the value of specific heat at 300K is\",round(dS3,4),\"KJ/kg-k\"\n", - "print\"\\n hence,change in entropy assuming specific heat is constant at its value at 900K is \",round(dS4,4),\"KJ/kg-k\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,change in entropy using ideal gas tables is 1.7228 KJ/kg-k\n", - "\n", - " hence,change in entropy using the value of specific heat at 300K is 1.5586 KJ/kg-k\n", - "\n", - " hence,change in entropy assuming specific heat is constant at its value at 900K is 1.8076 KJ/kg-k\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.5:pg-296\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#entropy change\n", - "import math\n", - "Cp=1.004 #specific heat at constant pressure in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "P1=400.0 #initial pressure in kPa\n", - "P2=300.0 #final pressure in kPa\n", - "T1=300 #initial temperature in K\n", - "T2=600 #final temperature in K\n", - "dS1=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat\n", - "s1=6.8693 #specific entropy at T1\n", - "s2=7.5764 #specific entropy at T2\n", - "dS2=s2-s1-R*math.log(P2/P1) #entropy change assuming variable specific heat\n", - "print\"\\n hence,entropy change assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n", - "print\"\\n and assuming variable specific heat is\",round(dS2,4),\"KJ/kg-k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,entropy change assuming constant specific heat is 0.7785 KJ/kg-k\n", - "\n", - " and assuming variable specific heat is 0.7897 KJ/kg-k\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.6:pg-297" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#work done by air\n", - "import math\n", - "T1=600 #initial temperature of air in K\n", - "P1=400.0 #intial pressure of air in kPa\n", - "P2=150.0 #final pressure in kPa\n", - "u1=435.10 #specific internal energy at temperature T1 in kJ/kg\n", - "sT1=7.5764 #specific entropy at temperature T1 in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "ds=0\n", - "sT2=ds+sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n", - "print\"we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\"\n", - "T2=457 #final temperature in K\n", - "u2=328.14 #specific internal energy at temperature T2 in kJ/kg\n", - "w=u1-u2 #work done by air in kJ/kg\n", - "print\"\\n hence,work done by air is\",round(w,4),\"KJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\n", - "\n", - " hence,work done by air is 106.96 KJ/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.7:pg-300" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#work and heat transfer\n", - "\n", - "P2=500 #final pressure in cylinder in kPa\n", - "P1=100 #initial pressure in cylinder in kPa\n", - "T1=20+273.2 #initial temperature inside cylinder in Kelvins\n", - "n=1.3 \n", - "T2=(T1)*(P2/P1)**((n-1)/n) #final temperature inside cylinder in K\n", - "R=0.2968 #gas constant in kJ/kg-K\n", - "w12=R*(T2-T1)/(1-n) #work in kJ/kg\n", - "Cvo=0.745 #specific heat at constant volume in kJ/kg-K\n", - "q12=Cvo*(T2-T1)+w12 #heat transfer in kJ/kg\n", - "print\" \\n hence,work done is\",round(w12,2),\"KJ/kg\" \n", - "print\"\\n and heat transfer are\",round(q12,1),\"KJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,work done is -130.47 KJ/kg\n", - "\n", - " and heat transfer are -32.2 KJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.8:pg-308" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#calculating increase in entropy\n", - "\n", - "m=1 #mass of saturated water vapour\n", - "sfg=6.0480 #in kJ/K\n", - "T=25 #temperature of surrounding air in celsius\n", - "dScm=-m*sfg #change in entropy of control mass in kJ/K\n", - "hfg=2257.0 #in kJ/kg\n", - "Qtosurroundings=m*hfg #heat transferred to surroundings in kJ\n", - "dSsurroundings=Qtosurroundings/(T+273.15) #in kJ/K\n", - "dSnet=dScm+dSsurroundings #net increase in entropy in kJ/K\n", - "print\" hence,net increase in entropy of water plus surroundings is \",round(dSnet,3),\"KJ/k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " hence,net increase in entropy of water plus surroundings is 1.522 KJ/k\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.9:pg-309" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#entropy generation\n", - "\n", - "Qout=1.0 #value of heat flux generated by 1kW of electric power\n", - "T=600.0 #temperature of hot wire surface in K\n", - "Sgen=Qout/T #entropy generation in kW/K\n", - "print\"\\n hence,entropy generation is\",round(Sgen,5),\"KW/k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,entropy generation is 0.00167 KW/k\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.10:pg-310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#Determiining the entropy generated\n", - "\n", - "B=4.0#COP of air conditioner\n", - "W=10.0 #power input of air conditioner in kW\n", - "Qh=B*W #in kW\n", - "Ql=Qh-W #in kW\n", - "Thigh=323 #in Kelvin\n", - "Tlow=263 #in Kelvin\n", - "SgenHP=(Qh*1000/Thigh)-(Ql*1000/Tlow) #in W/K\n", - "Tl=281 # in K\n", - "Th=294 #in K\n", - "SgenCV1=Ql*1000/Tlow-Ql*1000/Tl #in W/K\n", - "SgenCV2=Qh*1000/Th-Qh*1000/Thigh #in W/K\n", - "SgenTOT=SgenCV1+SgenCV2+SgenHP #in W/K\n", - "print\" \\n Hence,Total entropy generated is\",round(SgenTOT,1),\"W/k\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " Hence,Total entropy generated is 29.3 W/k\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb deleted file mode 100755 index dce4d1fa..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb +++ /dev/null @@ -1,444 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:79711d3b5ce866eb594601c655e2c85bdace3e8f861ba88d25f2b6f7e8d8655f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8:ENTROPY" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.1:pg-290" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#coefficient of performance of refrigerator\n", - "\n", - "Th=60 #temperature at which heat is rejected from R-134a\n", - "Tl=0 #temperature at which heat is absorbed into the R-134a \n", - "s1=1.7262 #specific entropy at 0 Celsius\n", - "s2=s1 #process of state change from 1-2 is isentropic \n", - "s3=1.2857 #specific entropy at 60 celsius\n", - "s4=s3 #process of state change from 3-4 is isentropic\n", - "print\"if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\"\n", - "P2=1400+(1600-1400)*(1.7262-1.736)/(1.7135-1.736) #pressure after compression in kPa\n", - "B=(Th+273.15)/(Th-Tl) #coefficient of performance of refrigerator\n", - "print\" \\n hence,pressure after compression is \",round(P2,1),\"kPa\"\n", - "print\"\\n and coefficient of performance of refrigerator is\",round(B,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\n", - " \n", - " hence,pressure after compression is 1487.1 kPa\n", - "\n", - " and coefficient of performance of refrigerator is 5.55\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.2:pg-290" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2 \n", - "#heat transfer in a given process\n", - "\n", - "u1=87.94 #specific internal energy of R-12 at state 1 in kJ/kg\n", - "u2=276.44 #specific internal energy of R-12 at state 2 in kJ/kg\n", - "s1=0.3357 #specific entropy at state 1 in kJ/kg-K\n", - "s2=1.2108 #specific entropy at state 2 in kJ/kg-K\n", - "V=0.001 #volume of saturated liquid in m^3\n", - "v1=0.000923 #specific volume in m^3/kg\n", - "m=V/v1 #mass of saturated liquid in kg\n", - "T=20 #temperature of liquid in celsius\n", - "Q12=m*(T+273.15)*(s2-s1) #heat transfer in kJ to accomplish the process\n", - "W12=m*(u1-u2)+Q12 #work required to accomplish the process\n", - "print\" \\n hence,work required to accomplish the process is\",round(W12,1),\"KJ\"\n", - "print\" \\n and heat transfer is\",round(Q12,1),\"KJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,work required to accomplish the process is 73.7 KJ\n", - " \n", - " and heat transfer is 277.9 KJ\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.3:pg-293" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#entropy change\n", - "import math\n", - "C=4.184 # specific heat of water in kJ/kg-K\n", - "T1=20 #initial temperature of water in celsius\n", - "T2=90 #final temperature of water in celsius\n", - "dS1=C*math.log((T2+273.2)/(T1+273.2)) #change in entropy in kJ/kg-K\n", - "dS2=1.1925-0.2966 #in kJ/kg-K using steam tables\n", - "print\"\\n hence,change in entropy assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n", - "print\"\\n using steam table is\",round(dS2,4),\"KJ/kg-k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,change in entropy assuming constant specific heat is 0.8958 KJ/kg-k\n", - "\n", - " using steam table is 0.8959 KJ/kg-k\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.4:pg-295" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#entropy change with different assumptions\n", - "import math\n", - "T1=300 #initial temperature in kelvins\n", - "T2=1500 #final temperature in kelvins\n", - "P1=200.0 #initial pressure in kPa\n", - "P2=150.0 #final pressure in kPa\n", - "R=0.2598 # in kJ/kg-K\n", - "Cp=0.922 #specific heat in kJ/kg-K at constant pressure\n", - "dsT2=8.0649 #in kJ/kg-K\n", - "dsT1=6.4168 #in kJ/kg-K\n", - "dS1=dsT2-dsT1-R*math.log(P2/P1) #entropy change calculated using ideal gas tables\n", - "dS3=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat in kJ/kg-K\n", - "dS4=1.0767*math.log(T2/T1)+0.0747 #entropy change assuming specific heat is constant at its value at 990K\n", - "print\"\\n hence,change in entropy using ideal gas tables is\",round(dS1,4),\"KJ/kg-k\"\n", - "print\"\\n hence,change in entropy using the value of specific heat at 300K is\",round(dS3,4),\"KJ/kg-k\"\n", - "print\"\\n hence,change in entropy assuming specific heat is constant at its value at 900K is \",round(dS4,4),\"KJ/kg-k\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,change in entropy using ideal gas tables is 1.7228 KJ/kg-k\n", - "\n", - " hence,change in entropy using the value of specific heat at 300K is 1.5586 KJ/kg-k\n", - "\n", - " hence,change in entropy assuming specific heat is constant at its value at 900K is 1.8076 KJ/kg-k\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.5:pg-296\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#entropy change\n", - "import math\n", - "Cp=1.004 #specific heat at constant pressure in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "P1=400.0 #initial pressure in kPa\n", - "P2=300.0 #final pressure in kPa\n", - "T1=300 #initial temperature in K\n", - "T2=600 #final temperature in K\n", - "dS1=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat\n", - "s1=6.8693 #specific entropy at T1\n", - "s2=7.5764 #specific entropy at T2\n", - "dS2=s2-s1-R*math.log(P2/P1) #entropy change assuming variable specific heat\n", - "print\"\\n hence,entropy change assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n", - "print\"\\n and assuming variable specific heat is\",round(dS2,4),\"KJ/kg-k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,entropy change assuming constant specific heat is 0.7785 KJ/kg-k\n", - "\n", - " and assuming variable specific heat is 0.7897 KJ/kg-k\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.6:pg-297" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#work done by air\n", - "import math\n", - "T1=600 #initial temperature of air in K\n", - "P1=400.0 #intial pressure of air in kPa\n", - "P2=150.0 #final pressure in kPa\n", - "u1=435.10 #specific internal energy at temperature T1 in kJ/kg\n", - "sT1=7.5764 #specific entropy at temperature T1 in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "ds=0\n", - "sT2=ds+sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n", - "print\"we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\"\n", - "T2=457 #final temperature in K\n", - "u2=328.14 #specific internal energy at temperature T2 in kJ/kg\n", - "w=u1-u2 #work done by air in kJ/kg\n", - "print\"\\n hence,work done by air is\",round(w,4),\"KJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\n", - "\n", - " hence,work done by air is 106.96 KJ/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.7:pg-300" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#work and heat transfer\n", - "\n", - "P2=500 #final pressure in cylinder in kPa\n", - "P1=100 #initial pressure in cylinder in kPa\n", - "T1=20+273.2 #initial temperature inside cylinder in Kelvins\n", - "n=1.3 \n", - "T2=(T1)*(P2/P1)**((n-1)/n) #final temperature inside cylinder in K\n", - "R=0.2968 #gas constant in kJ/kg-K\n", - "w12=R*(T2-T1)/(1-n) #work in kJ/kg\n", - "Cvo=0.745 #specific heat at constant volume in kJ/kg-K\n", - "q12=Cvo*(T2-T1)+w12 #heat transfer in kJ/kg\n", - "print\" \\n hence,work done is\",round(w12,2),\"KJ/kg\" \n", - "print\"\\n and heat transfer are\",round(q12,1),\"KJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " hence,work done is -130.47 KJ/kg\n", - "\n", - " and heat transfer are -32.2 KJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.8:pg-308" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#calculating increase in entropy\n", - "\n", - "m=1 #mass of saturated water vapour\n", - "sfg=6.0480 #in kJ/K\n", - "T=25 #temperature of surrounding air in celsius\n", - "dScm=-m*sfg #change in entropy of control mass in kJ/K\n", - "hfg=2257.0 #in kJ/kg\n", - "Qtosurroundings=m*hfg #heat transferred to surroundings in kJ\n", - "dSsurroundings=Qtosurroundings/(T+273.15) #in kJ/K\n", - "dSnet=dScm+dSsurroundings #net increase in entropy in kJ/K\n", - "print\" hence,net increase in entropy of water plus surroundings is \",round(dSnet,3),\"KJ/k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " hence,net increase in entropy of water plus surroundings is 1.522 KJ/k\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.9:pg-309" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#entropy generation\n", - "\n", - "Qout=1.0 #value of heat flux generated by 1kW of electric power\n", - "T=600.0 #temperature of hot wire surface in K\n", - "Sgen=Qout/T #entropy generation in kW/K\n", - "print\"\\n hence,entropy generation is\",round(Sgen,5),\"KW/k\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,entropy generation is 0.00167 KW/k\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.10:pg-310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#Determiining the entropy generated\n", - "\n", - "B=4.0#COP of air conditioner\n", - "W=10.0 #power input of air conditioner in kW\n", - "Qh=B*W #in kW\n", - "Ql=Qh-W #in kW\n", - "Thigh=323 #in Kelvin\n", - "Tlow=263 #in Kelvin\n", - "SgenHP=(Qh*1000/Thigh)-(Ql*1000/Tlow) #in W/K\n", - "Tl=281 # in K\n", - "Th=294 #in K\n", - "SgenCV1=Ql*1000/Tlow-Ql*1000/Tl #in W/K\n", - "SgenCV2=Qh*1000/Th-Qh*1000/Thigh #in W/K\n", - "SgenTOT=SgenCV1+SgenCV2+SgenHP #in W/K\n", - "print\" \\n Hence,Total entropy generated is\",round(SgenTOT,1),\"W/k\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " \n", - " Hence,Total entropy generated is 29.3 W/k\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter9.ipynb b/Fundamentals_Of_Thermodynamics/Chapter9.ipynb deleted file mode 100755 index c1f858fc..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter9.ipynb +++ /dev/null @@ -1,519 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7638f00c0629ff24b9e3c96e6eb43a103a0583de57d4e01375fbb8aa638bef10" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9:SECOND-LAW ANALYSIS FOR A CONTROL VOLUME" - ] - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Ex9.1:pg-336" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#work done by steam\n", - "\n", - "hi=3051.2 #initial specific heat of enthalpy of steam in kJ/kg\n", - "si=7.1228 #initial specific entropy of steam in kJ/kg-K\n", - "Pe=0.15 #final pressure in MPa\n", - "se=si #specific entropy in final state in kJ/kg-K\n", - "sf=1.4335 #in kJ/kg-K\n", - "sfg=5.7897 #in kJ/kg-K\n", - "vi=50.0 #velocity with which steam enters turbine in m/s\n", - "ve=200.0 #velocity with which steam leaves the turbine in m/s\n", - "xe=(se-sf)/sfg #quality of steam in final state\n", - "hf=467.1 #in kJ/kg\n", - "hfg=2226.5 #in kJ/kg\n", - "he=hf+xe*hfg #final specific heat of enthalpy of steam in kJ/kg\n", - "w=hi+vi**2/(2*1000)-he-ve**2/(2*1000) #work of steam for isentropic process in kJ/kg\n", - "print\"\\n hence, work per kilogram of steam for this isentropic process is\",round(w,1),\"KJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, work per kilogram of steam for this isentropic process is 377.5 KJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.2:pg-337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#exit velocity of steam from nozzle\n", - "\n", - "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n", - "si=7.1228 #initial specific entropy in kJ/kg-K\n", - "se=si #final specific entropy \n", - "Pe=0.3 #final pressure in MPa\n", - "print\"from steam table,various properties at final state are\"\n", - "he=2780.2 #final specific heat of enthalpy in kJ/kg-K\n", - "Te=159.1 #final temperature in celsius\n", - "vi=30.0 #velocity with which steam enters the nozzle in m/s\n", - "ve=((2*(hi-he)+(vi**2/1000))*1000)**0.5 #final velocity of steam with which it exits in m/s\n", - "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"m/s\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from steam table,various properties at final state are\n", - "\n", - " hence,exit velocity of the steam from the nozzle is 737.0 m/s\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.3:pg-340" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#violation of second law\n", - "\n", - "print\"from R-134a tables\"\n", - "se=1.7148 #specific entropy in final state in kJ/kg-K\n", - "si=1.7395 #initial specific entropy in kJ/kg-K \n", - "print\"therefore,se=si.The process described involves a violation of the second law and thus would be impossible.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from R-134a tables\n", - "therefore,se=si.The process described involves a violation of the second law and thus would be impossible.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.4:pg-340" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#calculating required specific work\n", - "\n", - "Cp=1.004 #specific heat of air at constant pressure in kJ/kg-K\n", - "Ti=290 #initial temperature in kelvins\n", - "Pi=100 #initial pressure in kPa\n", - "Pe=1000 #final pressure in kPa\n", - "k=1.4 \n", - "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n", - "we=Cp*(Ti-Te) #required specific work in kJ/kg\n", - "print\"\\n hence,specific work required is\",round(we),\"kJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,specific work required is -271.0 kJ/kg\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.5:pg-342" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#entropy generation\n", - "\n", - "h1=2865.54 #specific heat of enthalpy at state 1 in kJ/kg\n", - "h2=83.94 #specific heat of enthalpy at state 2 in kJ/kg\n", - "h3=2725.3 #specific heat of enthalpy at state 3 in kJ?kg\n", - "s1=7.3115 #specific entropy at state 1 in kJ/kg-K\n", - "s2=0.2966 #specific entropy at state 2 in kJ/kg-K\n", - "s3=6.9918 #specific entropy at state 3in kJ/kg-K\n", - "m1=2 #mass flow rate at state 1 in kg/s\n", - "m2=m1*(h1-h3)/(h3-h2) #mass flow rate at state 2 in kg/s\n", - "m3=m1+m2 #mass flow rate at state 3 in kg/s\n", - "Sgen=m3*s3-m1*s1-m2*s2 #entropy generation in the process\n", - "print\"\\n hence,entropy generated in this process is \",round(Sgen,3),\"kW/K\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,entropy generated in this process is 0.072 kW/K\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.6:pg-344" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#work required to fill the tank\n", - "import math\n", - "T1=17+273 #initial temperature of tank in Kelvins\n", - "sT1=6.83521 #specific entropy in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "P1=100 #initial pressure in kPa\n", - "P2=1000 #final pressure in kPa\n", - "sT2=sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n", - "T2=555.7 #from interplotation \n", - "V1=0.04 #volume of tank in m^3\n", - "V2=V1 #final volume is equal to initial volume\n", - "m1=P1*V1/(R*T1) #initial mass of air in tank in kg\n", - "m2=P2*V2/(R*T2) #final mass of air in tank in kg\n", - "Min=m2-m1 #in kg\n", - "u1=207.19 #initial specific heat of enthalpy in kJ/kg\n", - "u2=401.49 #final specific heat of enthalpy in kJ/kg\n", - "hin=290.43 #in kJ/kg\n", - "W12=Min*hin+m1*u1-m2*u2 #work required to fill the tank in kJ\n", - "print\"\\n hence,the total amount of work required to fill the tank is\",round(W12,1),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the total amount of work required to fill the tank is -31.9 kJ\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.7:pg-347" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#work required to pump water isentropically \n", - "\n", - "P1=100 #initial pressure in kPa\n", - "P2=5000 #final pressure in kPa\n", - "v=0.001004 #specific volume in m^3/kg\n", - "w=v*(P2-P1) #work required to pump water isentropically\n", - "print\"\\n hence,work required to pump water isentropically is \",round(w,2),\"kJ/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,work required to pump water isentropically is 4.92 kJ/kg\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.8:pg-348" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#Velocity in exit flow\n", - "\n", - "print\"From Steam Tables, for liquid water at 20 C\"\n", - "vf=0.001002 #in m^3/kg\n", - "v=vf\n", - "Pi=300 #Line pressure in kPa\n", - "Po=100 #in kPa\n", - "Ve=(2*v*(Pi-Po)*1000)**0.5 #velocity in the exit flow\n", - "print\" \\n Hence, an ideal nozzle can generate upto \",round(Ve),\"m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From Steam Tables, for liquid water at 20 C\n", - " \n", - " Hence, an ideal nozzle can generate upto 20.0 m/s\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.9:pg-351" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#Rate of Entropy Generation\n", - "\n", - "print\"From R-410a tables,we get\"\n", - "hi=280.6 #in kJ/kg\n", - "he=307.8 #in kJ/kg\n", - "si=1.0272 #in kJ/kg\n", - "se=1.0140 #in kJ/kg\n", - "m=0.08 #flow rate of refrigerant in kg/s\n", - "P=3 #electrical power input in kW\n", - "Qcv=m*(he-hi)-P #in kW\n", - "To=30 #in Celsius\n", - "Sgen=m*(se-si)-Qcv/(To+273.2) #rate of entropy generation \n", - "print\"\\n Hence,the rate of entropy generation for this process is\",round(Sgen,5),\"kW/K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From R-410a tables,we get\n", - "\n", - " Hence,the rate of entropy generation for this process is 0.00166 kW/K\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.10:pg-353" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#turbine efficiency\n", - "\n", - "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n", - "si=7.1228 #initial specific entropy in kJ/kg-K\n", - "sf=0.7548 #in kJ/kg-K\n", - "sfg=7.2536 #in kJ/kg-K\n", - "ses=si #final specific entropy is same as the initial\n", - "xes=(si-sf)/sfg #quality of steam when it leaves the turbine\n", - "hf=225.9 #in kJ/kg\n", - "hfg=2373.1 #in kJ/kg\n", - "hes=hf+xes*hfg #final specific heat of enthalpy in kJ/kg\n", - "ws=hi-hes #work output of turbine calculated ideally in kJ/kg\n", - "wa=600 #actual work output of turbine in kJ/kg\n", - "nturbine=wa/ws #efiiciency of turbine \n", - "print\"\\n hence,efficiency of the turbine is\",round(nturbine*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,efficiency of the turbine is 80.9 %\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.11:pg-355" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11\n", - "#turbine inlet pressure\n", - "import math\n", - "hi=1757.3 #initial specific heat of enthalpy of air in kJ/kg\n", - "si=8.6905 #initial specifc entropy of airin kJ/kg-K\n", - "he=855.3 #final specific heat of enthalpy of air in kJ/kg\n", - "w=hi-he #actual work done by turbine in kJ/kg\n", - "n=0.85 #efficiency of turbine \n", - "ws=w/n #ideal work done by turbine in kJ/kg\n", - "hes=hi-ws #from first law of isentropic process\n", - "Tes=683.7 #final temperature in kelvins from air tables\n", - "ses=7.7148 #in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "Pi=100/math.e**((si-ses)/-R) #turbine inlet pressure in kPa\n", - "print\"\\n hence,turbine inlet pressure is\",round(Pi),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,turbine inlet pressure is 2995.0 kPa\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.12:pg-357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12\n", - "#required work input\n", - "\n", - "Pe=150.0 #final pressure of air in kPa\n", - "Pi=100.0 #initial presure of air in kPa\n", - "k=1.4\n", - "Ti=300.0 #initial temperature of air in kelvis\n", - "Tes=Ti*(Pe/Pi)**((k-1)/k) #from second law\n", - "ws=1.004*(Ti-Tes) #from first law of isentropic process\n", - "n=0.7 #efficiency of automotive supercharger \n", - "w=ws/n #real work input in kJ/kg\n", - "Te=Ti-w/1.004 #temperature at supercharger exit in K\n", - "print\"\\n hence,required work input is \",round(w),\"kJ/kg\"\n", - "print\"\\n and exit temperature is \",round(Te,1),\"K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,required work input is -53.0 kJ/kg\n", - "\n", - " and exit temperature is 352.6 K\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb deleted file mode 100755 index db80c9d5..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb +++ /dev/null @@ -1,588 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:14f50faeadc2ed8de4732f59bac3e49ea9db1041eaf016b1692117fea4d3a511" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9:SECOND-LAW ANALYSIS FOR A CONTROL VOLUME" - ] - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Ex9.1:pg-336" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#work done by steam\n", - "\n", - "hi=3051.2 #initial specific heat of enthalpy of steam in kJ/kg\n", - "si=7.1228 #initial specific entropy of steam in kJ/kg-K\n", - "Pe=0.15 #final pressure in MPa\n", - "se=si #specific entropy in final state in kJ/kg-K\n", - "sf=1.4335 #in kJ/kg-K\n", - "sfg=5.7897 #in kJ/kg-K\n", - "vi=50.0 #velocity with which steam enters turbine in m/s\n", - "ve=200.0 #velocity with which steam leaves the turbine in m/s\n", - "xe=(se-sf)/sfg #quality of steam in final state\n", - "hf=467.1 #in kJ/kg\n", - "hfg=2226.5 #in kJ/kg\n", - "he=hf+xe*hfg #final specific heat of enthalpy of steam in kJ/kg\n", - "w=hi+vi**2/(2*1000)-he-ve**2/(2*1000) #work of steam for isentropic process in kJ/kg\n", - "print\"\\n hence, work per kilogram of steam for this isentropic process is\",round(w,1),\"KJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence, work per kilogram of steam for this isentropic process is 377.5 KJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.2:pg-337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#exit velocity of steam from nozzle\n", - "\n", - "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n", - "si=7.1228 #initial specific entropy in kJ/kg-K\n", - "se=si #final specific entropy \n", - "Pe=0.3 #final pressure in MPa\n", - "print\"from steam table,various properties at final state are\"\n", - "he=2780.2 #final specific heat of enthalpy in kJ/kg-K\n", - "Te=159.1 #final temperature in celsius\n", - "vi=30.0 #velocity with which steam enters the nozzle in m/s\n", - "ve=((2*(hi-he)+(vi**2/1000))*1000)**0.5 #final velocity of steam with which it exits in m/s\n", - "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"m/s\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from steam table,various properties at final state are\n", - "\n", - " hence,exit velocity of the steam from the nozzle is 737.0 m/s\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.2E:pg-339" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2E\n", - "#exit velocity of steam from nozzle\n", - "\n", - "hi=1279.1 #initial specific heat of enthalpy in Btu/lbm\n", - "si=1.7085 #initial specific entropy in Btu/lbm R\n", - "se=si #final specific entropy \n", - "Pe=40 #final pressure in lbf/in^2\n", - "he=1193.9 #final specific heat of enthalpy in Btu/lbm\n", - "Te=314.2 #final temperature in F\n", - "vi=100.0 #velocity with which steam enters the nozzle in ft/s\n", - "ve=((2*((hi-he)+(vi**2/(32.17*778)))*(32.17*778)))**0.5 #final velocity of steam with which it exits in ft/s\n", - "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"ft/s\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,exit velocity of the steam from the nozzle is 2070.0 ft/s\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.3:pg-340" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#violation of second law\n", - "\n", - "print\"from R-134a tables\"\n", - "se=1.7148 #specific entropy in final state in kJ/kg-K\n", - "si=1.7395 #initial specific entropy in kJ/kg-K \n", - "print\"therefore,se=si.The process described involves a violation of the second law and thus would be impossible.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from R-134a tables\n", - "therefore,se=si.The process described involves a violation of the second law and thus would be impossible.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.4:pg-340" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#calculating required specific work\n", - "\n", - "Cp=1.004 #specific heat of air at constant pressure in kJ/kg-K\n", - "Ti=290 #initial temperature in kelvins\n", - "Pi=100 #initial pressure in kPa\n", - "Pe=1000 #final pressure in kPa\n", - "k=1.4 \n", - "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n", - "we=Cp*(Ti-Te) #required specific work in kJ/kg\n", - "print\"\\n hence,specific work required is\",round(we),\"kJ/kg\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,specific work required is -271.0 kJ/kg\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.4E:pg-341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4E\n", - "#calculating required specific work\n", - "\n", - "Cp=0.24 #specific heat of air at constant pressure in Btu/lbm R\n", - "Ti=520 #initial temperature in R\n", - "Pi=14.7 #initial pressure in lbf/in^2\n", - "Pe=147 #final pressure in lbf/in^2\n", - "k=1.4 \n", - "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in R\n", - "we=Cp*(Ti-Te) #required specific work in Btu/lbm\n", - "print\"\\n hence,specific work required is\",round(we,2),\"Btu/lbm\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,specific work required is -116.15 Btu/lbm\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.5:pg-342" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#entropy generation\n", - "\n", - "h1=2865.54 #specific heat of enthalpy at state 1 in kJ/kg\n", - "h2=83.94 #specific heat of enthalpy at state 2 in kJ/kg\n", - "h3=2725.3 #specific heat of enthalpy at state 3 in kJ?kg\n", - "s1=7.3115 #specific entropy at state 1 in kJ/kg-K\n", - "s2=0.2966 #specific entropy at state 2 in kJ/kg-K\n", - "s3=6.9918 #specific entropy at state 3in kJ/kg-K\n", - "m1=2 #mass flow rate at state 1 in kg/s\n", - "m2=m1*(h1-h3)/(h3-h2) #mass flow rate at state 2 in kg/s\n", - "m3=m1+m2 #mass flow rate at state 3 in kg/s\n", - "Sgen=m3*s3-m1*s1-m2*s2 #entropy generation in the process\n", - "print\"\\n hence,entropy generated in this process is \",round(Sgen,3),\"kW/K\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,entropy generated in this process is 0.072 kW/K\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.6:pg-344" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#work required to fill the tank\n", - "import math\n", - "T1=17+273 #initial temperature of tank in Kelvins\n", - "sT1=6.83521 #specific entropy in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "P1=100 #initial pressure in kPa\n", - "P2=1000 #final pressure in kPa\n", - "sT2=sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n", - "T2=555.7 #from interplotation \n", - "V1=0.04 #volume of tank in m^3\n", - "V2=V1 #final volume is equal to initial volume\n", - "m1=P1*V1/(R*T1) #initial mass of air in tank in kg\n", - "m2=P2*V2/(R*T2) #final mass of air in tank in kg\n", - "Min=m2-m1 #in kg\n", - "u1=207.19 #initial specific heat of enthalpy in kJ/kg\n", - "u2=401.49 #final specific heat of enthalpy in kJ/kg\n", - "hin=290.43 #in kJ/kg\n", - "W12=Min*hin+m1*u1-m2*u2 #work required to fill the tank in kJ\n", - "print\"\\n hence,the total amount of work required to fill the tank is\",round(W12,1),\"kJ\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,the total amount of work required to fill the tank is -31.9 kJ\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.7:pg-347" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#work required to pump water isentropically \n", - "\n", - "P1=100 #initial pressure in kPa\n", - "P2=5000 #final pressure in kPa\n", - "v=0.001004 #specific volume in m^3/kg\n", - "w=v*(P2-P1) #work required to pump water isentropically\n", - "print\"\\n hence,work required to pump water isentropically is \",round(w,2),\"kJ/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,work required to pump water isentropically is 4.92 kJ/kg\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.8:pg-348" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#Velocity in exit flow\n", - "\n", - "print\"From Steam Tables, for liquid water at 20 C\"\n", - "vf=0.001002 #in m^3/kg\n", - "v=vf\n", - "Pi=300 #Line pressure in kPa\n", - "Po=100 #in kPa\n", - "Ve=(2*v*(Pi-Po)*1000)**0.5 #velocity in the exit flow\n", - "print\" \\n Hence, an ideal nozzle can generate upto \",round(Ve),\"m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From Steam Tables, for liquid water at 20 C\n", - " \n", - " Hence, an ideal nozzle can generate upto 20.0 m/s\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.9:pg-351" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9\n", - "#Rate of Entropy Generation\n", - "\n", - "print\"From R-410a tables,we get\"\n", - "hi=280.6 #in kJ/kg\n", - "he=307.8 #in kJ/kg\n", - "si=1.0272 #in kJ/kg\n", - "se=1.0140 #in kJ/kg\n", - "m=0.08 #flow rate of refrigerant in kg/s\n", - "P=3 #electrical power input in kW\n", - "Qcv=m*(he-hi)-P #in kW\n", - "To=30 #in Celsius\n", - "Sgen=m*(se-si)-Qcv/(To+273.2) #rate of entropy generation \n", - "print\"\\n Hence,the rate of entropy generation for this process is\",round(Sgen,5),\"kW/K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From R-410a tables,we get\n", - "\n", - " Hence,the rate of entropy generation for this process is 0.00166 kW/K\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.10:pg-353" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10\n", - "#turbine efficiency\n", - "\n", - "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n", - "si=7.1228 #initial specific entropy in kJ/kg-K\n", - "sf=0.7548 #in kJ/kg-K\n", - "sfg=7.2536 #in kJ/kg-K\n", - "ses=si #final specific entropy is same as the initial\n", - "xes=(si-sf)/sfg #quality of steam when it leaves the turbine\n", - "hf=225.9 #in kJ/kg\n", - "hfg=2373.1 #in kJ/kg\n", - "hes=hf+xes*hfg #final specific heat of enthalpy in kJ/kg\n", - "ws=hi-hes #work output of turbine calculated ideally in kJ/kg\n", - "wa=600 #actual work output of turbine in kJ/kg\n", - "nturbine=wa/ws #efiiciency of turbine \n", - "print\"\\n hence,efficiency of the turbine is\",round(nturbine*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,efficiency of the turbine is 80.9 %\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.11:pg-355" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11\n", - "#turbine inlet pressure\n", - "import math\n", - "hi=1757.3 #initial specific heat of enthalpy of air in kJ/kg\n", - "si=8.6905 #initial specifc entropy of airin kJ/kg-K\n", - "he=855.3 #final specific heat of enthalpy of air in kJ/kg\n", - "w=hi-he #actual work done by turbine in kJ/kg\n", - "n=0.85 #efficiency of turbine \n", - "ws=w/n #ideal work done by turbine in kJ/kg\n", - "hes=hi-ws #from first law of isentropic process\n", - "Tes=683.7 #final temperature in kelvins from air tables\n", - "ses=7.7148 #in kJ/kg-K\n", - "R=0.287 #gas constant in kJ/kg-K\n", - "Pi=100/math.e**((si-ses)/-R) #turbine inlet pressure in kPa\n", - "print\"\\n hence,turbine inlet pressure is\",round(Pi),\"kPa\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,turbine inlet pressure is 2995.0 kPa\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.12:pg-357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12\n", - "#required work input\n", - "\n", - "Pe=150.0 #final pressure of air in kPa\n", - "Pi=100.0 #initial presure of air in kPa\n", - "k=1.4\n", - "Ti=300.0 #initial temperature of air in kelvis\n", - "Tes=Ti*(Pe/Pi)**((k-1)/k) #from second law\n", - "ws=1.004*(Ti-Tes) #from first law of isentropic process\n", - "n=0.7 #efficiency of automotive supercharger \n", - "w=ws/n #real work input in kJ/kg\n", - "Te=Ti-w/1.004 #temperature at supercharger exit in K\n", - "print\"\\n hence,required work input is \",round(w),\"kJ/kg\"\n", - "print\"\\n and exit temperature is \",round(Te,1),\"K\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " hence,required work input is -53.0 kJ/kg\n", - "\n", - " and exit temperature is 352.6 K\n" - ] - } - ], - "prompt_number": 44 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/README.txt b/Fundamentals_Of_Thermodynamics/README.txt deleted file mode 100755 index f9822be5..00000000 --- a/Fundamentals_Of_Thermodynamics/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: abhishek chauhan -Course: btech -College/Institute/Organization: ABES Engineering College Ghaziabad -Department/Designation: electronics & communication engg -Book Title: Fundamentals Of Thermodynamics -Author: B. Claus And R. E. Sonntag -Publisher: Wiley India Pvt. Ltd., New Delhi -Year of publication: 2010 -Isbn: 978-81-265-2152-4 -Edition: 7 \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/chapter10.ipynb b/Fundamentals_Of_Thermodynamics/chapter10.ipynb deleted file mode 100755 index e985ae83..00000000 --- a/Fundamentals_Of_Thermodynamics/chapter10.ipynb +++ /dev/null @@ -1,474 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:498eddefb3635fb861c09bdd97718d2b72fb04f4d3b083cedbf9f6de28a92b4e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10:IRREVERSIBILITY AND AVAILABILITY" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.1:pg-386" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1\n", - "#Calculating reversible work\n", - "#Form the Steam Tables,the inlet and the exit state properties are \n", - "\n", - "hi=171.95 #initial specific heat of enthalpy in kJ/kg\n", - "si=0.5705 #initial specific entropy in kJ/kg-K\n", - "se=2.1341 #final specific entropy in kJ/kg-K\n", - "he=765.34 #final specific heat of enthalpy in kJ/kg-K\n", - "m=5 #mass flow rate of feedwater in kg/s\n", - "q1=900/m #heat added by one of the sources in kJ/kg\n", - "q2=he-hi-q1 #second heat transfer in kJ/kg\n", - "To=25+273.3 #Temp. of the surroundings in K\n", - "T1=100+273.2 #temp. of reservoir of one of the source in K\n", - "T2=200+273.2 #temp. of reservoir of second source in K\n", - "wrev=To*(se-si)-(he-hi)+q1*(1-To/T1)+q2*(1-To/T2) #reversible work in kJ/kg\n", - "print\"\\n Hence, the irreversibility is\",round(wrev),\"kJ/kg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence, the irreversibility is 62.0 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.2:pg-387" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2\n", - "#Calculating reversible work\n", - "#Form the Steam Tables,the inlet and the exit state properties are\n", - "\n", - "hi=298.6 #initial specific heat of enthalpy in kJ/kg\n", - "si=6.8631 #initial specific entropy in kJ/kg-K\n", - "se=7.4664 #final specific entropy in kJ/kg-K\n", - "he=544.7 #final specific heat of enthalpy in kJ/kg-K\n", - "q=-50 #heat lost to surroundings in kJ/kg\n", - "w=hi-he+q #work in kJ/kg\n", - "To=25+273.2 #Temp. of the surroundings in K\n", - "P1=100 #Pressure of ambient air in kPa\n", - "P2=1000 #Final pressure of air after compression in kPa\n", - "R=0.287 #Universal gas constant in kJ/kg-K\n", - "wrev=To*(se-si-R*log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in kJ/kg\n", - "i=wrev-w #irreversibility in kJ/kg\n", - "print\"\\n Hence,the irreversibility is\",round(i,1),\"kJ/kg\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence,the irreversibility is 32.8 kJ/kg\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.2E:pg-388" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2E\n", - "#Calculating reversible work\n", - "#Form the Steam Tables,the inlet and the exit state properties are\n", - "\n", - "hi=129.18 #initial specific heat of enthalpy in Btu/lbm\n", - "si=1.6405 #initial specific entropy in Btu/lbm R\n", - "se=1.7803 #final specific entropy in Btu/lbm R\n", - "he=231.20 #final specific heat of enthalpy in Btu/lbm\n", - "q=-22 #heat lost to surroundings in Btu/lbm\n", - "w=hi-he+q #work in Btu/lbm\n", - "To=539.7 #Temp. of the surroundings in R\n", - "P1=14.7 #Pressure of ambient air in lbf/in^2\n", - "P2=150 #Final pressure of air after compression in lbf/in^2\n", - "R=0.06855 #Universal gas constant in Btu/lbm R\n", - "wrev=To*(se-si-R*log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in Btu/lbm\n", - "i=wrev-w #irreversibility in Btu/lbm\n", - "print\"\\n Hence,the irreversibility is\",round(i,2),\"Btu/lbm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " Hence,the irreversibility is 11.52 Btu/lbm\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.3:pg-390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3\n", - "#Calculating reversible work and irreversibility\n", - "#Form the Steam Tables at state 1\n", - "\n", - "u1=1243.5 #initial specific internal energy in kJ/kg\n", - "s1=4.4819 #initial specific entropy in kJ/kg-K\n", - "v1=28.895 #initial specific volume in m^3/kg\n", - "v2=2*v1 #final specific volume in kg/m^3\n", - "u2=u1 #initial specific internal energy in kJ/kg\n", - "#These two independent properties, v2 and u2 , fix state 2.The final temp. is calculated by interplotation using the data for T2=5C and v2,x=0/3928 and u=948.5 kJ/kg. For T2=10C and v2, x=0.5433 and u=1317 kJ/kg\n", - "T2=9.1+273.2 #final temp. in K\n", - "x2=0.513 #quality in final state\n", - "s2=4.644 #final specific entropy in kJ/kg\n", - "V1=1 #volume of part of A in m^3\n", - "m=V1/v1 #mass flow rate in kg/s\n", - "To=20+273.2 #Room temperature in K\n", - "Wrev=To*m*(s2-s1) #reversible work in kJ\n", - "I=Wrev #irreversibility of the process\n", - "print\"\\n The irreversibility is\",round(I,3),\"kJ\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " The irreversibility is 1.645 kJ\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.4:pg-391" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4\n", - "#calculating the final mass in the tank and the irreversibility in the process\n", - "#From the ammonia tables, the initial and line state properties are\n", - "\n", - "V=1#volume of the rigid tank in m^3\n", - "v1=0.6995#initial specific volume in m^3/kg\n", - "u1=1369.5#initial specific internal energy in kJ/kg\n", - "s1=5.927#initial specific entropy in kJ/kg K\n", - "h1=134.41#initial specific heat of enthalpy in kJ/kg\n", - "si=0.5408#in kJ/kg K\n", - "m1=V/v1#initial mass in kg\n", - "x2=0.007182\n", - "v2=(0.001534 + x2 * 0.41684)#in m^3/kg\n", - "v2=round(v2,7)\n", - "s2=0.5762#final specific entropy in kJ/kg\n", - "m2=V/v2#the final mass in kg\n", - "mi=m2-m1#in kg\n", - "mi=round(mi,3)\n", - "T=293.15# in K\n", - "S2gen=(m2*s2-m1*s1-mi*si)#in kJ/kg\n", - "S2gen=round(S2gen,3)\n", - "Icv=T*S2gen#in kJ\n", - "print\"\\n the final mass is \",round(m2,2),\"kg\"\n", - "print\"\\n the irreversiblity is\",round(Icv,3),\"kJ\"\n", - "\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " the final mass is 220.86 kg\n", - "\n", - " the irreversiblity is 34.885 kJ\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.5:pg-396" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5\n", - "#calculating the availability per kilogram of the steam entering and at both points at which steam leaves the turbine,\n", - "#the isentropic efficiency,the second-law efficiency for this process\n", - "#For the ideal isentropic turbine,\n", - "\n", - "h0=104.9#in kJ/kg\n", - "s0=0.3674#entropy at state0 in kJ/kgK\n", - "m1=30#mass at state1 in kg\n", - "phi1=1109.6#in kJ/kg\n", - "h1=3115.3#enthalpy at state1 in kJ/kg\n", - "m2=5#mass at state2 in kg\n", - "phi2=755.3#in kJ/kg\n", - "h2=2855.4#enthalpy at state2 For the actual turbine in kJ/kg\n", - "m3=25#mass at state3 in kg\n", - "phi3=195.0#in kJ/kg\n", - "S2s=6.7428#entropy in kJ/kg K at state2\n", - "x2s=(6.7428-1.8606)/4.906# dryness factor at state2 \n", - "x2s=round(x2s,4)\n", - "h2s=640.2+(x2s*2108.5)#entropy at state2 for the ideal isentropic turbine\n", - "S3s=6.7428#entropy in kJ/kg K\n", - "x3s=(6.7428-0.7549)/7.2536# dryness factor at state3\n", - "x3s=round(x3s,4)\n", - "h3s=225.9+(x3s*2373.1)#enthalpy in kJ/kg\n", - "h3=2361.8#enthalpy at state3 For the actual turbine in kJ/kg\n", - "Ws=(m1*h1-m2*h2s-m3*h3s)#workdone for the ideal isentropic turbine in kW\n", - "W=(m1*h1-m2*h2-m3*h3)#workdone For the actual turbine in kW\n", - "W2=(m1*phi1-m2*phi2-m3*phi3)#workdone for the second ideal isentropic turbine in kW\n", - "eta1=W/Ws#The isentropic efficiency\n", - "eta2=W/W2#he second-law efficiency\n", - "print\"\\n the workdone for the ideal isentropic turbine is \",round(Ws),\"kW\"\n", - "print\"\\n the workdone for the actual turbine is \",round(W),\"kg\"\n", - "print\"\\n the workdone for the second ideal isentropic turbine is \",round(W2),\"kW\"\n", - "print\"\\n the isentropic efficiency is \",round(eta1,3)\n", - "print\"\\n the second-law efficiency is \",round(eta2,3)\n", - "#The answer of the x2s in the book is wrong.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " the workdone for the ideal isentropic turbine is 25145.0 kW\n", - "\n", - " the workdone for the actual turbine is 20137.0 kg\n", - "\n", - " the workdone for the second ideal isentropic turbine is 24637.0 kW\n", - "\n", - " the isentropic efficiency is 0.801\n", - "\n", - " the second-law efficiency is 0.817\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.6:pg-399" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6\n", - "#calculate the second-law efficiency for this process and the irreversibility per kilogram of water evaporated\n", - "\n", - "he1=2950#enthalpy in kJ/kg\n", - "hi1=632.2#enthalpy in kJ/kg\n", - "he2=599.5#enthalpy in kJ/kg\n", - "hi2=1199#enthalpy in kJ/kg\n", - "#r=mp/mh\n", - "r=(he1-hi1)/(hi2-he2)#the ratio of the mass flow of water\n", - "T0=298.15#in K\n", - "S1=1.8418#entropy at state1 in kJ/kgK\n", - "S2=7.0384#entropy at state2 in kJ/kgK\n", - "S3=7.8751#entropy at state3 in kJ/kgK\n", - "S4=7.3173#entropy at state4 in kJ/kgK\n", - "#phi=phi2-phi1\n", - "phi=(he1-hi1)-T0*(S2-S1)#The increase in availability of the water is, per kilogram of water in kJ/kg\n", - "#w=(mp2/mh2)*(phi3-phi4)\n", - "w=r*((hi2-he2)-T0*(S3-S4))#The decrease in availability of the products, per kilogram of water in kJ/kg\n", - "eta=phi/w#the second-law efficiency\n", - "#i=I/mh\n", - "i=phi+w#the process irreversibility per kilogram of water in kJ/kg\n", - "#e=I2/mh2\n", - "e=(T0*(S2-S1)+(T0*r*(S4-S3)))#The total irreversibility in kJ/kg\n", - "print\"\\n the second law efficiency is \",round(eta,3)\n", - "print\"\\n the total irreversibility is \",round(e,2),\"kJ/kg\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " the second law efficiency is 0.459\n", - "\n", - " the total irreversibility is 906.38 kJ/kg\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.7:pg-403" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 7\n", - "#calculate the heater\u2019s second-law efficiency\n", - "\n", - "h0=104.87#enthalpy in kJ/kg\n", - "s0=0.3673#entropy in kJ/kg K\n", - "h1=171.97#in kJ/kg\n", - "he=765.25#in kJ/kg\n", - "s1=0.5705#in kJ/kg K\n", - "T0=298.2#in C\n", - "se=2.1341#in kJ/kg K\n", - "shi1=(h1-h0)-T0*(s1-s0)#in kJ/kg\n", - "shie=(he-h0)-T0*(se-s0)#in kJ/kg\n", - "T1=373.2#in C\n", - "T2=473.2#in C\n", - "q1=180#heat at state1 in kJ\n", - "q2=413.28#heat at state2 in kJ\n", - "phisource1=(1-T0/T1)*q1#in kJ/kg\n", - "phisource2=(1-T0/T2)*q2#in kJ/kg\n", - "phisource=phisource1+phisource2#in kJ/kg\n", - "Icv=phisource+shi1-shie#in kJ/kg\n", - "eta2law=(phisource-Icv)/phisource#the heater\u2019s second-law efficiency\n", - "print\"\\n the heater\u2019s second-law efficiency is\",round(eta2law,2)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " the heater\u2019s second-law efficiency is 0.67\n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.8:pg-404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8\n", - "#calculate any heat transfer downward, and follow the flux of exergy, and find the exergy destruction in the process.\n", - "Qout=500.0#in W\n", - "Qin=500.0#in W\n", - "Tsurf=1000.0#in K\n", - "T0=298.15#in K\n", - "Sgen1=Qout/Tsurf#in W/K\n", - "phides=(T0*Sgen1)#in W\n", - "phitrans=((1-T0/Tsurf)*Qout)#in W\n", - "Ttop=500#in K\n", - "Sgen2=(Qout/Ttop)-(Qin/Tsurf)#in W/K\n", - "Te=phitrans-phides-((1-T0/Ttop)*Qout)#the exergy destruction in the process\n", - "print\"\\n the exergy destruction in the process is\",round(Te)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " the exergy destruction in the process is 0.0\n" - ] - } - ], - "prompt_number": 77 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/screenshots/heat_transfer_6.png b/Fundamentals_Of_Thermodynamics/screenshots/heat_transfer_6.png deleted file mode 100755 index c7a00e18..00000000 Binary files a/Fundamentals_Of_Thermodynamics/screenshots/heat_transfer_6.png and /dev/null differ diff --git a/Fundamentals_Of_Thermodynamics/screenshots/reversible_work_6.png b/Fundamentals_Of_Thermodynamics/screenshots/reversible_work_6.png deleted file mode 100755 index d4cf4f76..00000000 Binary files a/Fundamentals_Of_Thermodynamics/screenshots/reversible_work_6.png and /dev/null differ diff --git a/Fundamentals_Of_Thermodynamics/screenshots/velocity_6.png b/Fundamentals_Of_Thermodynamics/screenshots/velocity_6.png deleted file mode 100755 index 1533cad6..00000000 Binary files a/Fundamentals_Of_Thermodynamics/screenshots/velocity_6.png and /dev/null differ diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter10_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter10_6.ipynb new file mode 100755 index 00000000..59bbb80a --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter10_6.ipynb @@ -0,0 +1,164 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6310b6690e48041fd88dd8277353623ea538798dfeeeb9a3819409de065b2175" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10:IRREVERSIBILITY AND AVAILABILITY" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1:pg-386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#Calculating reversible work\n", + "\n", + "#Form the Steam Tables,the inlet and the exit state properties are \n", + "hi=171.95 #initial specific heat of enthalpy in kJ/kg\n", + "si=0.5705 #initial specific entropy in kJ/kg-K\n", + "se=2.1341 #final specific entropy in kJ/kg-K\n", + "he=765.34 #final specific heat of enthalpy in kJ/kg-K\n", + "m=5 #mass flow rate of feedwater in kg/s\n", + "q1=900/m #heat added by one of the sources in kJ/kg\n", + "q2=he-hi-q1 #second heat transfer in kJ/kg\n", + "To=25+273.3 #Temp. of the surroundings in K\n", + "T1=100+273.2 #temp. of reservoir of one of the source in K\n", + "T2=200+273.2 #temp. of reservoir of second source in K\n", + "wrev=To*(se-si)-(he-hi)+q1*(1-To/T1)+q2*(1-To/T2) #reversible work in kJ/kg\n", + "print\"\\n Hence, the irreversibility is\",round(wrev,1),\"kJ/kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Hence, the irreversibility is 62.0 kJ/kg\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.2:pg-387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#Calculating reversible work\n", + "import math\n", + "#Form the Steam Tables,the inlet and the exit state properties are\n", + "hi=298.6 #initial specific heat of enthalpy in kJ/kg\n", + "si=6.8631 #initial specific entropy in kJ/kg-K\n", + "se=7.4664 #final specific entropy in kJ/kg-K\n", + "he=544.7 #final specific heat of enthalpy in kJ/kg-K\n", + "q=-50 #heat lost to surroundings in kJ/kg\n", + "w=hi-he+q #work in kJ/kg\n", + "To=25+273.2 #Temp. of the surroundings in K\n", + "P1=100 #Pressure of ambient air in kPa\n", + "P2=1000 #Final pressure of air after compression in kPa\n", + "R=0.287 #Universal gas constant in kJ/kg-K\n", + "wrev=To*(se-si-R*math.log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in kJ/kg\n", + "i=wrev-w #irreversibility in kJ/kg\n", + "print\"\\n Hence, the irreversibility is\",round(i,1),\"kJ/kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Hence, the irreversibility is 32.8 kJ/kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3:pg-390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#Calculating reversible work and irreversibility\n", + "\n", + "#Form the Steam Tables at state 1\n", + "u1=1243.5 #initial specific internal energy in kJ/kg\n", + "s1=4.4819 #initial specific entropy in kJ/kg-K\n", + "v1=28.895 #initial specific volume in m^3/kg\n", + "v2=2*v1 #final specific volume in kg/m^3\n", + "u2=u1 #initial specific internal energy in kJ/kg\n", + "#These two independent properties, v2 and u2 , fix state 2.The final temp. is calculated by interplotation using the data for T2=5C and v2,x=0/3928 and u=948.5 kJ/kg. For T2=10C and v2, x=0.5433 and u=1317 kJ/kg\n", + "T2=9.1+273.2 #final temp. in K\n", + "x2=0.513 #quality in final state\n", + "s2=4.644 #final specific entropy in kJ/kg\n", + "V1=1 #volume of part of A in m^3\n", + "m=V1/v1 #mass flow rate in kg/s\n", + "To=20+273.2 #Room temperature in K\n", + "Wrev=To*m*(s2-s1) #reversible work in kJ\n", + "I=Wrev #irreversibility of the process\n", + "print\"\\n The irreversibility is \",round(I,3),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The irreversibility is 1.645 kJ\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter11_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter11_6.ipynb new file mode 100755 index 00000000..814dd14b --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter11_6.ipynb @@ -0,0 +1,529 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a88db765bb23172043955029f8f04edaf8e710f3cbd46a5474827f42fa8a65ec" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter11:Power and Refrigeration Systems\u2014With Phase Change" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.1:Pg-425" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ques 1\n", + "#To determine the efficiency of Rankine cycle\n", + "\n", + "#1-Inlet state of pump\n", + "#2-Exit state of pump\n", + "P2=2000;#Exit pressure in kPa\n", + "P1=10;#Inlet pressure in kPa\n", + "v=0.00101;#specific weight of water in m^3/kg\n", + "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", + "h1=191.8;#Enthalpy in kJ/kg from table\n", + "h2=h1+wp;#enthalpy in kJ/kg\n", + "#2-Inlet state for boiler\n", + "#3-Exit state for boiler\n", + "h3=2799.5;#Enthalpy in kJ/kg\n", + "#3-Inlet state for turbine\n", + "#4-Exit state for turbine\n", + "#s3=s4(Entropy remain same)\n", + "s4=6.3409;#kJ/kg\n", + "sf=0.6493;#Entropy at liquid state in kJ/kg\n", + "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg\n", + "x4=(s4-sf)/sfg;#x-factor\n", + "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n", + "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n", + "\n", + "nth=((h3-h2)-(h4-h1))/(h3-h2);\n", + "print\" Percentage efficiency =\",round(nth*100,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Percentage efficiency = 30.3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.2:Pg-429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ques 2\n", + "#To determine the efficiency of Rankine cycle\n", + "\n", + "#1-Inlet state of pump\n", + "#2-Exit state of pump\n", + "P2=4000;#Exit pressure in kPa\n", + "P1=10;#Inlet pressure in kPa\n", + "v=0.00101;#specific weight of water in m^3/kg\n", + "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", + "h1=191.8;#Enthalpy in kJ/kg from table\n", + "h2=h1+wp;#enthalpy in kJ/kg\n", + "#2-Inlet state for boiler\n", + "#3-Exit state for boiler\n", + "h3=3213.6;#Enthalpy in kJ/kg from table\n", + "#3-Inlet state for turbine\n", + "#4-Exit state for turbine\n", + "#s3=s4(Entropy remain same)\n", + "s4=6.7690;#Entropy in kJ/kg from table\n", + "sf=0.6493;#Entropy at liquid state in kJ/kg from table\n", + "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg from table\n", + "x4=(s4-sf)/sfg;#x-factor\n", + "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n", + "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n", + "\n", + "nth=((h3-h2)-(h4-h1))/(h3-h2);\n", + "print\"Percentage efficiency =\",round(nth*100,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage efficiency = 35.3 %\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.2E:Pg-431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ques 2\n", + "#To determine the efficiency of Rankine cycle\n", + "\n", + "#1-Inlet state of pump\n", + "#2-Exit state of pump\n", + "P2=600.0 ;#Exit pressure in lbf/in^2\n", + "P1=1.0;#Inlet pressure in lbf/in^2\n", + "v=0.01614;#specific weight of water in ft^3/lbm\n", + "wp=v*(P2-P1)*(144.0/778.0);#work done in pipe in Btu/lbm\n", + "h1=69.70;#Enthalpy in Btu/lbm from table\n", + "h2=h1+wp;#enthalpy in Btu/lbm\n", + "#2-Inlet state for boiler\n", + "#3-Exit state for boiler\n", + "h3=1407.6;#Enthalpy in Btu/lbm from table\n", + "#3-Inlet state for turbine\n", + "#4-Exit state for turbine\n", + "#s3=s4(Entropy remain same)\n", + "s4=1.6343;#Entropy in Btu/lbm from table\n", + "sf=1.9779;#Entropy at liquid state in Btu/lbm from table\n", + "sfg=1.8453;#Entropy difference for vapor and liquid state in Btu/lbm from table\n", + "x4=-(s4-sf)/sfg;#x-factor\n", + "hfg=1036.0;#Enthalpy difference in Btu/lbm for turbine\n", + "h4=1105.8-x4*hfg;#Enthalpy in Btu/lbm\n", + "wt=(h3-h4) #work done in turbine in Btu/lbm\n", + "\n", + "nth=((h3-h4)-wp)/(h3-h2);\n", + "print\"Percentage efficiency =\",round(nth*100,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage efficiency = 36.9 %\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.3:Pg-433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ques 3\n", + "#To determine the efficiency of a cycle\n", + "\n", + "#1-Inlet state of pump\n", + "#2-Exit state of pump\n", + "P2=4000;#Exit pressure in kPa\n", + "P1=10;#Inlet pressure in kPa\n", + "v=0.00101;#specific weight of water in m^3/kg\n", + "wp=v*(P2-P1);#work done in pipe in kJ/kg\n", + "h1=191.8;#Enthalpy in kJ/kg from table\n", + "h2=h1+wp;#enthalpy in kJ/kg\n", + "#2-Inlet state for boiler\n", + "#3-Exit state for Boiler\n", + "h3=3213.6;#Enthalpy in kJ/kg from table\n", + "#3-Inlet state for high pressure turbine\n", + "#4-Exit state for high pressure turbine\n", + "#s3=s4(Entropy remain same)\n", + "s4=6.7690;#Entropy in kJ/kg from table\n", + "sf=1.7766;#Entropy at liquid state in kJ/kg from table\n", + "sfg=5.1193;#Entropy difference for vapor and liquid state in kJ/kg from table\n", + "x4=(s4-sf)/sfg;#x-factor\n", + "hf=604.7#Enthalpy of liquid state in kJ/kg\n", + "hfg=2133.8;#Enthalpy difference in kJ/kg for turbine\n", + "h4=hf+x4*hfg;#Enthalpy in kJ/kg\n", + "#5-Inlet state for low pressure turbine\n", + "#6-Exit pressure for low pressure turbine\n", + "sf=0.6493;#Entropy in liquid state in kJ/kg for turbine\n", + "h5=3273.4;#enthalpy in kJ/kg \n", + "s5=7.8985;#Entropy in kJ/kg\n", + "sfg=7.5009;#entropy diff in kJ/kg \n", + "x6=(s5-sf)/sfg;#x-factor\n", + "hfg=2392.8;#enthalpy difference for low pressure turbine in kj/kg\n", + "h6=h1+x6*hfg;#entropy in kg/kg\n", + "wt=(h3-h4)+(h5-h6);#work output in kJ/kg\n", + "qh=(h3-h2)+(h5-h4);\n", + "\n", + "nth=(wt-wp)/qh;\n", + "print\" Percentage efficiency =\",round(nth*100,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Percentage efficiency = 35.9 %\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.4:Pg-438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4\n", + "#Efficiency of Refrigeration cycle\n", + "\n", + "#from previous examples\n", + "h1=191.8;#kJ/kg\n", + "h5=3213.6;#kg/kg\n", + "h6=2685.7;#kJ/kg\n", + "h7=2144.1;#kJ/kg\n", + "h3=604.7;#kJ/kg\n", + "#1-Inlet state of pump\n", + "#2-Exit state of pump\n", + "P2=400;#Exit pressure in kPa\n", + "P1=10; #Inlet pressure in kPa\n", + "v=0.00101;#specific weight of water in m^3/kg\n", + "wp1=v*(P2-P1);#work done for low pressure pump in kJ/kg\n", + "h1=191.8;#Enthalpy in kJ/kg from table\n", + "h2=h1+wp1;#enthalpy in kJ/kg\n", + "#5-Inlet state for turbine\n", + "#6,7-Exit state for turbine\n", + "y=(h3-h2)/(h6-h2);#extraction fraction\n", + "wt=(h5-h6)+(1-y)*(h6-h7);#turbine work in kJ/kg\n", + "#3-Inlet for high pressure pump\n", + "#4-Exit for high pressure pump\n", + "P3=400;#kPa\n", + "P4=4000;#kPa\n", + "v=0.001084;#specific heat for 3-4 process in m^3/kg\n", + "wp2=v*(P4-P3);#work done for high pressure pump\n", + "h4=h3+wp2;#Enthalpy in kJ/kg\n", + "wnet=wt-(1-y)*wp1-wp2;\n", + "qh=h5-h4;#Heat output in kJ/kg\n", + "nth=wnet/qh;\n", + "print\" Refrigerator Efficiency =\",round(nth*100,1),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Refrigerator Efficiency = 37.5 %\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.5:Pg-443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#To determine thermal efficiency of cycle\n", + "\n", + "#5-Inlet state for turbine\n", + "#6-Exit state for turbine\n", + "#h-Enthalpy at a state \n", + "#s-Entropy at a state\n", + "#from steam table\n", + "h5=3169.1;#kJ/kg\n", + "s5=6.7235;#kJ/kg\n", + "s6s=s5;\n", + "sf=0.6493;#Entropy for liquid state in kJ/kg\n", + "sfg=7.5009;#Entropy difference in kJ/kg\n", + "hf=191.8;#kJ/kg\n", + "hfg=2392.8;#Enthalpy difference in kJ/kg\n", + "x6s=(s6s-sf)/sfg;#x-factor\n", + "h6s=hf+x6s*hfg;#kJ/Kg at state 6s\n", + "nt=0.86;#turbine efficiency given\n", + "wt=nt*(h5-h6s);\n", + "#1-Inlet state for pump\n", + "#2-Exit state for pump\n", + "np=0.80;#pump efficiency given\n", + "v=0.001009;#specific heat in m^3/kg\n", + "P2=5000;#kPa\n", + "P1=10;#kPa\n", + "wp=v*(P2-P1)/np;#Work done in pump in kJ/kg\n", + "wnet=wt-wp;#net work in kJ/kg\n", + "#3-Inlet state for boiler\n", + "#4-Exit state for boiler\n", + "h3=171.8;#in kJ/kg from table\n", + "h4=3213.6;#kJ/kg from table\n", + "qh=h4-h3;\n", + "nth=wnet/qh;\n", + "print \"Cycle Efficiency =\",round(nth*100,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cycle Efficiency = 29.2 %\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.5E:Pg-445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#To determine thermal efficiency of cycle\n", + "\n", + "#5-Inlet state for turbine\n", + "#6-Exit state for turbine\n", + "#h-Enthalpy at a state \n", + "#s-Entropy at a state\n", + "#from steam table\n", + "h5=1386.8;#Btu/lbm\n", + "s5=1.6248;#Btu/lbm\n", + "s6s=s5;\n", + "sf=1.9779;#Entropy for liquid state in Btu/lbm\n", + "sfg=1.8453;#Entropy difference in Btu/lbm\n", + "hf=1105.8;# Btu/lbm\n", + "hfg=1036.0;#Enthalpy difference in Btu/lbm\n", + "x6s=(s6s-sf)/sfg;#x-factor\n", + "h6s=hf+x6s*hfg;#Btu/lbm at state 6s\n", + "nt=0.86;#turbine efficiency given\n", + "wt=nt*(h5-h6s);\n", + "#1-Inlet state for pump\n", + "#2-Exit state for pump\n", + "np=0.80;#pump efficiency given\n", + "v=0.016;#specific heat in ft^3/lbm\n", + "P2=800.0;# lbf/in^2\n", + "P1=1.0;# lbf/in^2\n", + "wp=(v*(P2-P1)*144.0)/(np*778.0);#Work done in pump in Btu/lbm\n", + "wnet=wt-wp;#net work in Btu/lbm\n", + "#3-Inlet state for boiler\n", + "#4-Exit state for boiler\n", + "h3=65.1;#in Btu/lbm from table\n", + "h4=1407.6;# Btu/lbm from table\n", + "qh=h4-h3;\n", + "nth=wnet/qh;\n", + "print \"Cycle Efficiency =\",round(nth*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cycle Efficiency = 30.48 %\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.6:Pg-451" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "#to determine the rate of refrigeration\n", + "\n", + "# refer to fig 11.21 in book\n", + "mdot=0.03 # mass flow rate in Kg/s\n", + "T1=-20 # temperature in evaporator in celsius\n", + "T3=40 #temperature in evaporator in Celsius\n", + "P2=1017 # saturation pressure in KPa\n", + "\n", + "# from table of R-134a refrigerant\n", + "h1=386.1 # enthalpy at state 1 in kJ/kg,\n", + "S1=1.7395 # entropy at state 1 in kJ/kg.K\n", + "S2=S1 # isentropic process\n", + "T2=47.7# corresponding value to S2 in table of R-134a in degree celsius\n", + "h2=428.4 # corresponding value to S2 in table of R-134a in kJ/kg\n", + "wc=h2-h1 # work done in compressor in kJ/kg\n", + "h4=h3=256.5 #enthalpy at state 4 and 3 in kJ/kg\n", + "qL=h1-h4 #Heat rejected in kJ/kg\n", + "\n", + "B=qL/wc # COP\n", + "\n", + "print\" the COP of the plant is\",round(B,2)\n", + "print\" the refrigeration rate is\",round(mdot*qL,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the COP of the plant is 3.06\n", + " the refrigeration rate is 3.89\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.7:Pg-454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#to determine the COP of cycle\n", + "\n", + "P1=125 # pressure at state 1 in kPa\n", + "P2=1.2 # pressure at state 2 in MPa\n", + "P3=1.19 # pressure at state 3 in MPa,\n", + "P4=1.16 # pressure at state 4 in MPa,\n", + "P5=1.15 # pressure at state 5 in MPa,\n", + "P6=P7=140 # pressure at state 6 and 7 in kPa,\n", + "P8=130 # pressure at state 8 in kPa,\n", + "T1=-10 #temperaure at state 1 in \u25e6C\n", + "T2=100 #temperaure at state 2 in \u25e6C\n", + "T3=80 #temperaure at state 3 in \u25e6C\n", + "T4=45 #temperaure at state 4 in \u25e6C\n", + "T5=40 #temperaure at state 5 in \u25e6C\n", + "T8=-20 #temperaure at state 8 in \u25e6C\n", + "q=-4 # heat transfer in kJ/Kg\n", + "\n", + "#x6=x7 quality condition given in question\n", + "\n", + "\n", + "# the following values are taken from table for refrigerant R-134a\n", + "h1=394.9 # enthalpy at state 1 in kJ/kg\n", + "h2=480.9 # enthalpy at state 2 in kJ/kg\n", + "h8=386.6 # enthalpy at state 8 in kJ/kg\n", + "wc=h2-h1-q # from first law\n", + "h5=h6=h7=256.4 # as x6=x7 and from table at state 5 in Kj/Kg\n", + "qL=h8-h7 # from first law \n", + "B=qL/wc # COP\n", + "print\" the COP of the plant is\",round(B,3)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the COP of the plant is 1.447\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter12_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter12_6.ipynb new file mode 100755 index 00000000..e2686e4a --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter12_6.ipynb @@ -0,0 +1,478 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:83a0af04c694ab4b0ad1a0fe252ffa0bd8e87abc642c64323f0c2a0d18dd9f5d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER13:Gas Mixtures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.1:Pg-480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "#Standard brayton cycle\n", + "\n", + "#1-Inlet for compressor\n", + "#2-Exit for compressor\n", + "#T-Temperature at a state\n", + "#P-Pressure at a state\n", + "T1=288.2;#K\n", + "P2=1000.0;#kPa\n", + "P1=100.0;#kPa\n", + "k=1.4;\n", + "T2=T1*(P2/P1)**(1.0-1/k);#K\n", + "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", + "wc=Cp*(T2-T1);#compressor work in kJ/kg;\n", + "print\" Temperature T2 =\",round(T2,2),\"K\"\n", + "print\" Compressor work =\",round(wc,1),\"kJ/kg\"\n", + "#3-Turbine Inlet\n", + "#4-Turbine Exit\n", + "P4=P1;\n", + "P3=P2;\n", + "T3=1373.2;#K\n", + "T4=T3*(P4/P3)**(1-1/k);#K\n", + "wt=Cp*(T3-T4);\n", + "wnet=wt-wc;\n", + "print\" Temperature T3 =\",round(T3,2),\" K\"\n", + "print\" Temperature T4 =\",round(T4),\"K\"\n", + "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", + "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", + "#2-Also high temperature heat exchanger Inlet\n", + "#3-(-do-) Exit\n", + "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", + "#4-high temp heat exchanger inlet\n", + "#1-(-do-) Exit\n", + "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", + "nth=wnet/qh;\n", + "print\" Thermal Efficiency of cycle =\",round(nth*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature T2 = 556.43 K\n", + " Compressor work = 269.3 kJ/kg\n", + " Temperature T3 = 1373.2 K\n", + " Temperature T4 = 711.0 K\n", + " Turbine work = 664.6 kJ/kg\n", + " Net work = 395.3 kJ/kg\n", + " Thermal Efficiency of cycle = 48.21 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.2:Pg-481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculation mistake in book\n", + "#ques2\n", + "#Standard brayton cycle\n", + "\n", + "#Calculation mistake in book\n", + "#1-Inlet for compressor\n", + "#2-Exit for compressor\n", + "#T-Temperature at a state\n", + "#P-Pressure at a state\n", + "T1=288.2;#K\n", + "P2=1000.0;#kPa\n", + "P1=100.0;#kPa\n", + "k=1.4;\n", + "T2s=T1*(P2/P1)**(1-1/k);#K\n", + "nc=.80;#Compressor Efficiency\n", + "T2=T1+(T2s-T1)/0.80;\n", + "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", + "wc=Cp*(T2-T1);#compressor work in kJ/kg\n", + "wc=round(wc)\n", + "print\" Temperature T2 =\",round(T2,2),\"K\"\n", + "print\" Compressor work =\",(wc),\"kJ/kg\"\n", + "#3-Turbine Inlet\n", + "#4-Turbine Exit\n", + "P4=P1;\n", + "P3=P2;\n", + "T3=1373.2;#K\n", + "T4s=T3*(P4/P3)**(1-1.0/k);#K\n", + "nt=0.85;#turbine Efficiency\n", + "T4=T3-(T3-T4s)*0.85;\n", + "wt=Cp*(T3-T4);\n", + "wnet=wt-wc;\n", + "print\" Temperature T3 =\",round(T3,1),\"K\"\n", + "print\" Temperature T4 =\",round(T4,1),\"K\"\n", + "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", + "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", + "#2-Also high temperature heat exchanger Inlet\n", + "#3-(-do-) Exit\n", + "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", + "#4-high temp heat exchanger inlet\n", + "#1-(-do-) Exit\n", + "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", + "nth=wnet/qh;\n", + "print\" Thermal Efficiency of cycle =\",round(nth*100),\"percent\"\n", + "#some answers are have acceptable difference beacause of approximization in book but here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature T2 = 623.48 K\n", + " Compressor work = 337.0 kJ/kg\n", + " Temperature T3 = 1373.2 K\n", + " Temperature T4 = 810.5 K\n", + " Turbine work = 564.91 kJ/kg\n", + " Net work = 227.91 kJ/kg\n", + " Thermal Efficiency of cycle = 30.0 percent\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.3:Pg-486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques3\n", + "#efficiency of the cycle\n", + "\n", + "wnet=395.2;#kJ/kg from example no 1\n", + "#Tx=T4\n", + "Tx=710.8;#K from example no 1\n", + "T3=1373.2;#K from example no 1\n", + "Cp=1.004;#specific heat in kJ/kg \n", + "qh=Cp*(T3-Tx);\n", + "nth=wnet/qh;\n", + "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Thermal efficiency = 59.4 percent\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.4:Pg-486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4\n", + "#Calculation of work in the given cycle\n", + "import math\n", + "R=0.287;#gas constant \n", + "T1=288.2;#compressor temperature K\n", + "T2=1373.2;#K turbine temperature K\n", + "#Pe/Pi=c=10, Pi/Pe=1/c from example 12.1\n", + "c=10.0;\n", + "wc=-R*T1*math.log(c);\n", + "print\" Isothermal work in compressor =\",round(wc,1),\"kJ/kg\"\n", + "wt=-R*T2*math.log(1/c);\n", + "print\" Isothermal work in turbine =\",round(wt,1),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Isothermal work in compressor = -190.5 kJ/kg\n", + " Isothermal work in turbine = 907.5 kJ/kg\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.5:Pg-491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#air standard cycle for jet repulsion\n", + "import math\n", + "#1-compressor inlet\n", + "#2-Compressor exit\n", + "#P-Pressure at given point\n", + "#T-Temperature at given point\n", + "P1=100;#kPa\n", + "P2=1000;#kPa\n", + "T1=288.2;#K\n", + "T2=556.8;#K\n", + "wc=269.5;#from ex 12.1 work done in compressor in kJ/kg\n", + "#2-Burner inlet\n", + "#3-Burner exit\n", + "P3=1000;#kPa\n", + "T3=1373.2;#K\n", + "#wc=wt\n", + "Cp=1.004;#specific enthalpy of heat at constant pressure in kJ/kg\n", + "k=1.4;\n", + "T4=T3-wc/Cp;\n", + "P4=P3*(T4/T3)**(1-1/k);\n", + "#from s4=s5 and h4=h5+v2/2 we get\n", + "T5=710.8#K, from second law\n", + "v=math.sqrt(2*Cp*1000*(T4-T5));#m/s\n", + "print\" Velocity of air leaving the nozel =\",round(v),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Velocity of air leaving the nozel = 889.0 m/s\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.6:Pg-494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "#air standard refrigeration cycle\n", + "\n", + "#1-compressor inlet\n", + "#2-compressor exit\n", + "P1=100;#kPa\n", + "P2=500;#kPa\n", + "k=1.4;\n", + "rp=P2/P1;\n", + "cop=(rp**(1-1/k)-1)**-1;\n", + "print\" Coefficient of performance =\",round(cop,2)\n", + "#3-Expander inlet\n", + "#4-Expander exit\n", + "P3=P2;\n", + "P4=P1;\n", + "T3=288.23;#K, given and fixed\n", + "T4=T3/(P3/P4)**(1-1/k);\n", + "T1=253.2;#K, given\n", + "Cp=1.004;#Specific heat at cons pressure in kJ/kg\n", + "ql=Cp*(T1-T4);#heat released in kJ/kg\n", + "P=1#power required in kW \n", + "ms=P/ql;#kg/s\n", + "print\" Rate at which the air enter the compressor =\",round(ms,3),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Coefficient of performance = 1.71\n", + " Rate at which the air enter the compressor = 0.014 kg/s\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.7:Pg-498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#the otto cycle\n", + "\n", + "#1-compressor inlet\n", + "#2-compressor exit\n", + "P1=100.0;#kPa\n", + "T1=288.2;#K\n", + "R=0.287;#gas constant\n", + "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", + "rv=10.0;#compression ratio given\n", + "k=1.4;#constant\n", + "T2=T1*rv**(k-1);#K\n", + "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", + "P2=P1*rv**k;#kPa\n", + "print\" Pressure at compressor exit, P2 =\",round(P2/1000,2),\"MPa\"\n", + "v2=v1/rv;#specific heat at exit in m^3/kg\n", + "#23-heat addition process\n", + "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", + "q23=1800.0;#kJ/kg heat addition, given\n", + "Cv=0.717;#specific heat at constant volume in kJ/kg\n", + "T3=T2+q23/Cv;#K\n", + "print\" Initial Temperature during heat additon process, T3 =\",round(T3,2),\"K\"\n", + "P3=P2*(T3/T2);#kPa\n", + "print\" Initial pressure during heat addition process, P3 =\",round(P3/1000,3),\"MPa\"\n", + "r=10.0;#k=V4/V3=P3/P4\n", + "T4=T3*(1/r)**(k-1);\n", + "print\" Final temperature during heat addition process, T4 =\",round(T4,3),\"K\";\n", + "P4=P3/r**k;#kPa\n", + "print\" Final pressure during heat addition process, P4 =\",round(P4/1000,4),\"MPa\"\n", + "nth=1-1/r**(k-1);#thermal efficiency\n", + "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"\n", + "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", + "wnet=q23+q41;\n", + "mep=wnet/(v1-v2);#effective mean pressure n kPa\n", + "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature at compressor exit, T2 = 723.9 K\n", + " Pressure at compressor exit, P2 = 2.51 MPa\n", + " Initial Temperature during heat additon process, T3 = 3234.39 K\n", + " Initial pressure during heat addition process, P3 = 11.223 MPa\n", + " Final temperature during heat addition process, T4 = 1287.632 K\n", + " Final pressure during heat addition process, P4 = 0.4468 MPa\n", + " Thermal efficiency = 60.2 percent\n", + " Mean effective pressure = 1455.37 kPa\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.8:Pg-501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques8\n", + "#the diesel cycle\n", + "\n", + "#1-compressor inlet\n", + "#2-compressor exit\n", + "P1=100;#kPa\n", + "T1=288.2;#K\n", + "R=0.287;#gas constant\n", + "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", + "rv=20;#compression ratio given\n", + "k=1.4;#constant\n", + "T2=T1*rv**(k-1);#K\n", + "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", + "P2=P1*rv**k;#kPa\n", + "print\" Pressure at compressor exit, P2 =\",round(P2/1000,3),\" MPa\"\n", + "v2=v1/rv;#specific heat at exit in m^3/kg\n", + "#23-heat addition process\n", + "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", + "q23=1800;#kJ/kg heat addition, given\n", + "Cv=.717;\n", + "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", + "T3=T2+q23/Cp;#K\n", + "print\" Initial Temperature during heat addition process, T3 =\",round(T3,2),\"K\"\n", + "r=T3/T2;#T3/T2=V3/V2=r\n", + "v3=r*v2;\n", + "T4=T3/(v1/v3)**(k-1);\n", + "print\" Final temperature during heat addition process, T4 =\",round(T4),\"K\"\n", + "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", + "wnet=q23+q41;\n", + "mep=wnet/(v1-v2);#effective mean pressure in kPa\n", + "qh=1800;#heat transfer in kJ/kg\n", + "nth=wnet/qh;#thermal efficiency\n", + "\n", + "print\" Thermal efficiency =\",round(nth*100,1),\"percent\"\n", + "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature at compressor exit, T2 = 955.2 K\n", + " Pressure at compressor exit, P2 = 6.629 MPa\n", + " Initial Temperature during heat addition process, T3 = 2748.05 K\n", + " Final temperature during heat addition process, T4 = 1265.0 K\n", + " Thermal efficiency = 61.1 percent\n", + " Mean effective pressure = 1399.18 kPa\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter13_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter13_6.ipynb new file mode 100755 index 00000000..5863fc4c --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter13_6.ipynb @@ -0,0 +1,385 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:13df1b90ea06630bb54a561fa81d4ebbaaa2d68a225d0631603576a208acfb40" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER13:Gas Mixtures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.3:Pg-533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques3\n", + "#calculating humidity ratio, dew point,mass of air, mass of vapor\n", + "\n", + "r=0.70;#relative humidity\n", + "Pg=5.628;#saturation pressure in kPa\n", + "Pv=r*Pg;#vapour pressure in kPa\n", + "P=100;#net pressure kPa \n", + "Pa=P-Pv;#Partial pressure of air\n", + "w=0.622*Pv/Pa;#humidity ratio formula\n", + "V=100;#volume in m^3\n", + "Ra=0.287;#gas constant for water vapour\n", + "T=308.2;#Temperature in K\n", + "ma=Pa*V/(Ra*T);#mass in kg\n", + "mv=w*ma;#mass of vapour\n", + "print\" Mass of vapour is\",round(mv,3),\"Kg \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Mass of vapour is 2.77 Kg \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.3E:Pg-533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques3\n", + "#calculating humidity ratio, dew point,mass of air, mass of vapor\n", + "\n", + "r=0.70;#relative humidity\n", + "Pg=0.6988 ;#saturation pressure in lbf/in^2\n", + "Pv=r*Pg;#vapour pressure in lbf/in^2\n", + "P=14.7;#net pressure in lbf/in^2\n", + "Pa=P-Pv;#Partial pressure of air\n", + "w=0.622*Pv/Pa;#humidity ratio formula\n", + "V=2000;#volume in ft^3\n", + "Ra=53.34;#gas constant for water vapour\n", + "T=70;#Temperature in F\n", + "ma=Pa*V*144/(Ra*(T+480));#mass in lbm\n", + "mv=w*ma;#mass of vapour\n", + "print\" Mass of vapour is\",round(mv,2),\"lbm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Mass of vapour is 2.99 lbm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.4:Pg-534" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4 \n", + "#calculating amount of water vapour condensed on cooling\n", + "\n", + "#from example 3\n", + "w1=0.0255;#w1=w, humidity ratio at initial temperature\n", + "ma=108.6;#mass of air in kg\n", + "P=100;#kPa net pressure\n", + "#at 5 C mixture is saturated so Pv2=Pg2\n", + "Pg2=0.8721;\n", + "Pv2=Pg2;\n", + "w2=0.622*Pv2/(P-Pg2);\n", + "mc=ma*(w1-w2);\n", + "print\"Mass of vapour condense is \",round(mc,3),\"kg \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of vapour condense is 2.175 kg \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.4E:Pg-535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4 \n", + "#calculating amount of water vapour condensed on cooling\n", + "\n", + "#from example 3 \n", + "w1=0.02135;#w1=w, humidity ratio at initial temperature\n", + "ma=139.6;#mass of air in lbm\n", + "P=14.7;#net pressure in lbf/in^2\n", + "#at 40 degree F mixture is saturated so Pv2=Pg2\n", + "Pg2=0.1217 # lbf/in^2\n", + "Pv2=Pg2;\n", + "w2=0.622*Pv2/(P-Pg2);# humidity ratio at final temperature\n", + "mc=ma*(w1-w2); #Mass of vapour condense in lbm\n", + "print\"Mass of vapour condense is \",round(mc,3),\"lbm \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of vapour condense is 2.256 lbm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.5:Pg-536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#calculating heat transfer per kilogram of dry air\n", + "\n", + "#1-inlet state\n", + "#2-Exit state\n", + "r1=0.80;#realtive humidity at state 1\n", + "Pg1=4.246;#saturation pressure of vapour in kPa\n", + "P1=105.0;#net pressure at state 1 in kPa\n", + "P2=100.0;#net pressure at state 2 in kPa\n", + "Pv1=r1*Pg1;#partial pressure of vapour in kPa\n", + "w1=0.622*Pv1/(P1-Pv1);#humidity ratio at state 1\n", + "r2=0.95;#relative humidity at state 2\n", + "Pg2=1.7051;#saturation pressure of vapour in kPa\n", + "Pv2=r2*Pg2;#partial pressure of vapour in kPa\n", + "w2=0.622*Pv2/(P2-Pv2);#humidity ratio at state 2\n", + "T1=30.0;#C\n", + "T2=15.0;#C\n", + "Cp=1.004;#specific heat of water vapour in kJ/kg\n", + "hv2=2528.9;#enthalpy of vapourisation of vapour in kJ/kg\n", + "hv1=2556.3;#enthalpy of vapourisation of vapour in kJ/kg\n", + "hl2=62.99;#enthalpy of \n", + "q=Cp*(T2-T1)+w2*hv2-w1*hv1+hl2*(w1-w2);#kJ/kg\n", + "print\" Heat transferred per unit mass =\",round(q,1),\"kJ/kg of dry air\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Heat transferred per unit mass = -41.7 kJ/kg of dry air\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.6:Pg-537" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "#calculating heat transferred in gas vapour mixture\n", + "\n", + "#n-Nitrogen\n", + "#v-water vapour\n", + "Pn2=1995;#Pressure of nitrogen in kPa\n", + "V=0.5;#Volume in m^3\n", + "Rn2=0.2968;#Gas constant for nitrogen in kJ/kg.K\n", + "Rv=0.4615;#gas constant for vapour\n", + "T1=323.2;#Temperature in K\n", + "T2=283.2;#Temperature in K\n", + "Pv1=5;#Pressure of water vapour in kPa at state 1\n", + "Pv2=1.2276;#Pressure of water vapour in kPa at state 2\n", + "mn2=Pn2*V/(Rn2*T1);#mass of nitrogen\n", + "mv1=Pv1*V/(Rv*T1);#mass of vapour in kg\n", + "mv2=Pv2*V/(Rv*T2);#mass of vapour in kg\n", + "ml2=mv1-mv2;#mass of liquid condensed n kg\n", + "uv1=2443.1;#specific internal energy of vapour in kJ/kg at state 1\n", + "uv2=2389.2;#specific internal energy of vapour in kJ/kg at state 2\n", + "ul2=42.0;#specific internal energy of liquid water in kJ/kg\n", + "Cv=0.745;#specific heat at constant volume in kJ/kg.K\n", + "Q=mn2*Cv*(T2-T1)+mv2*uv2+ml2*ul2-mv1*uv1;\n", + "print\"Heat transferred =\",round(Q,2),\"kJ \"\n", + "\n", + "#the answer is different in book due to intermediate approximization " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred = -339.1 kJ \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.7:Pg-539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#calculating humidity ratio and relative humidity \n", + "\n", + "#1-Inlet state\n", + "#2-Exit state\n", + "P=100;#net pressure in kPa \n", + "#it is steady state adiabatic process\n", + "#water vapour leaving is saturated so Pv2=Pg2\n", + "Pg2=2.339;#saturation pressure of vapour in kPa\n", + "Pv2=Pg2;#partial pressure of vapour\n", + "w2=0.622*Pv2/(P-Pg2);\n", + "Cpa=1.004;#specific heat n kJ/kg/K\n", + "T2=20;# final temp in C\n", + "T1=30;# initial temp in C\n", + "Hfg2=2454.1;#specific heat difference at state 2 in kJ/kg\n", + "hv1=2556.3;#enthalpy of water vapour at state 1 in kJ/kg\n", + "hl2=83.96;#enthalpy of liquid water in kJ/kg\n", + "w1=(Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2);\n", + "print \" Relative humidity =\",round(w1,4)\n", + "#also w1=0.622*Pv1/(100-Pv2)\n", + "Pv1=100*w1/(0.622+w1);\n", + "Pg1=4.246;#saturation pressure at state 1 in kPa\n", + "r=Pv1/Pg1;#humidity ratio\n", + "print\" Humidity ratio =\",round(r,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Relative humidity = 0.0107\n", + " Humidity ratio = 0.3993\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.7E:Pg-540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#calculating humidity ratio and relative humidity \n", + "\n", + "#1-Inlet state\n", + "#2-Exit state\n", + "P=14.7;#net pressure in lbf/in^2\n", + "#it is steady state adiabatic process\n", + "#water vapour leaving is saturated so Pv2=Pg2\n", + "Pg2=0.3632;#saturation pressure of vapour in lbf/in^2\n", + "Pv2=Pg2;#partial pressure of vapour\n", + "w2=0.622*Pv2/(P-Pg2);\n", + "Cpa=0.24;#specific heat n Btu/lbm/F\n", + "T2=70;# final temp in F\n", + "T1=84;# initial temp in F\n", + "Hfg2=1054.0;#specific heat difference at state 2 in Btu/lbm\n", + "hv1=1098.1;#enthalpy of water vapour at state 1 in Btu/lbm\n", + "hl2=38.1;#enthalpy of liquid water in Btu/lbm\n", + "w1=(Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2);\n", + "print \" Relative humidity =\",round(w1,4)\n", + "#also w1=0.622*Pv1/(100-Pv2)\n", + "Pv1=14.7*w1/(0.622+w1);\n", + "Pg1=0.584;#saturation pressure at state 1 in lbf/in^2\n", + "r=Pv1/Pg1;#humidity ratio\n", + "print\" Humidity ratio =\",round(r,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Relative humidity = 0.0125\n", + " Humidity ratio = 0.4958\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter14_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter14_6.ipynb new file mode 100755 index 00000000..8c5a5922 --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter14_6.ipynb @@ -0,0 +1,325 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4d90868c7316d94fc2ffdc05c5691234f77f3a832d71da7eb2108eaff0a215bc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter14:THERMODYNAMIC RELATIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.1:Pg-567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "#to determine the sublimation pressure of water\n", + "import math\n", + "#from table in appendix B.1.5\n", + "T1=213.2;#K, Temperature at state 1\n", + "P2=0.0129;#kPa, pressure at state 2\n", + "T2=233.2;#K, Temperature at state 2\n", + "hig=2838.9;#kJ/kg, enthalpy of sublimation \n", + "R=.46152;#Gas constant \n", + "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n", + "P1=P2*math.exp(-hig/R*(1/T1-1/T2));\n", + "print\" Sublimation Pressure \",round(P1,5),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sublimation Pressure 0.00109 kPa\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.1E:Pg-567\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "#to determine the sublimation pressure of water\n", + "import math\n", + "#from table in appendix B.1.5\n", + "T1=-70+460.7;# R, Temperature at state 1\n", + "P2=0.0019 # lbf/in^2 pressure at state 2\n", + "T2=-40+460.7;# R, Temperature at state 2\n", + "hig=1218.7;#Btu/lbm, enthalpy of sublimation \n", + "R=85.67;#Gas constant \n", + "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n", + "P1=P2*math.exp(-hig*778/R*(1/T1-1/T2));\n", + "print\" Sublimation Pressure \",round(P1,5),\"lbf/in^2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sublimation Pressure 0.00025 lbf/in^2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.4:Pg-579" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4\n", + "#Volume expansivity, Isothermal and Adiabatic compressibility\n", + "\n", + "#known data\n", + "ap=5*10**-5;#K^-1 Volume expansivity\n", + "bt=8.6*10**-12;#m^2/N, Isothermal compressibility\n", + "v=0.000114;#m^3/kg, specific volume\n", + "P2=100*10**6;#pressure at state 2 in kPa\n", + "P1=100;#pressure at state 1 in kPa\n", + "w=-v*bt*(P2**2-P1**2)/2;#work done in J/kg\n", + "#q=T*ds and ds=-v*ap*(P2-P1)\n", + "#so q=-T*v*ap*(P2-P1)\n", + "T=288.2;#Temperature in K\n", + "q=-T*v*ap*(P2-P1);#heat in J/kg\n", + "du=q-w;#change in internal energy in J/kg\n", + "print\" Change in internal energy =\",round(du,3),\"J/kg\"\n", + "\n", + "#the answer is correct within given limts\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Change in internal energy = -159.372 J/kg\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.5:Pg-586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#adiabatic steady state processes\n", + "\n", + "#from table A.2\n", + "P1=20;#pressure at state 1 in MPa\n", + "P2=2;#pressure at state 2 in MPa\n", + "T1=203.2;#Temperature at state 1 in K\n", + "Pr1=P1/3.39;#Reduced pressure at state 1\n", + "Pr2=P2/3.39;#Reduced pressure at state 2\n", + "Tr1=T1/126.2;#Reduced temperature\n", + "#from compressibility chart h1*-h1=2.1*R*Tc\n", + "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", + "#h2*-h2=0.5*R*Tc\n", + "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.5*R*Tc\n", + "R=0.2968;#gas constant for given substance\n", + "Tc=126.2;#K, Constant temperature\n", + "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", + "T2=146;#temperature at state 2\n", + "dh=-1.6*R*Tc+Cp*(T1-T2);#\n", + "print\" Enthalpy change =\",round(dh,3),\"kJ/kg \\n\"\n", + "print\" Since Enthalpy change is nearly \",-round(dh),\"kJ/kg so Temperature =\",round(T2,3),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enthalpy change = -0.35 kJ/kg \n", + "\n", + " Since Enthalpy change is nearly 0.0 kJ/kg so Temperature = 146.0 K\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.6:Pg-589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "#isothermal steady state processes\n", + "import math\n", + "#from table A.2\n", + "P1=8;#pressure at state 1 in MPa\n", + "P2=0.5;#pressure at state 2 in MPa\n", + "T1=150.0;#Temperature at state 1 in K\n", + "Pr1=P1/3.39;#Reduced pressure at state 1\n", + "Pr2=P2/3.39;#Reduced pressure at state 2\n", + "Tr1=T1/126.2;#Reduced temperature\n", + "T2=125.0;#temperature at state 2\n", + "#from compressibility chart h1*-h1=2.1*R*Tc\n", + "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", + "#h2*-h2=0.5*R*Tc\n", + "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.15*R*Tc\n", + "R=0.2968;#gas constant for given substance\n", + "Tc=126.2;#K, Constant temperature\n", + "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", + "dh=(2.35)*R*Tc+Cp*(T2-T1);#\n", + "print\" Enthalpy change =\",round(dh),\"kJ/kg\"\n", + "#change in entropy \n", + "#ds= -(s2*-s2)+(s2*-s1*)+(s1*-s1)\n", + "#s1*-s1=1.6*R\n", + "#s2*-s2=0.1*R\n", + "#s2*-s1*=Cp*log(T2/T1)-R*log(P2/P1)\n", + "#so\n", + "ds=1.6*R-0.1*R+Cp*math.log(T2/T1)-R*math.log(P2/P1);\n", + "print\" Entropy Change =\",round(ds,3),\"kJ/kg.K \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enthalpy change = 62.0 kJ/kg\n", + " Entropy Change = 1.078 kJ/kg.K \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.7:Pg-596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#percent deviation using specific volume calculated by kays rule and vander waals rule\n", + "import math\n", + "\n", + "#a-denotes C02\n", + "#b-denotes CH4\n", + "T=310.94;#Temperature of mixture K\n", + "P=86.19;#Pressure of mixture in MPa\n", + "#Tc- critical Temperature\n", + "#Pc-critical pressure\n", + "Tca=304.1;#K\n", + "Tcb=190.4;#K\n", + "Pca=7.38;#MPa\n", + "Pcb=4.60;#MPa\n", + "Ra=0.1889;#gas constant for a in kJ/kg.K\n", + "Rb=0.5183;#gas constant for b in kJ/kg.K\n", + "xa=0.8;#fraction of CO2\n", + "xb=0.2;#fraction of CH4\n", + "Rm=xa*Ra+xb*Rb;#mean gas constant in kJ/kg.K\n", + "Ma=44.01;#molecular mass of a\n", + "Mb=16.043;#molecular mass of b\n", + "#1.Kay's rule\n", + "ya=xa/Ma/(xa/Ma+xb/Mb);#mole fraction of a\n", + "yb=xb/Mb/(xa/Ma+xb/Mb);#mole fraction of b\n", + "Tcm=ya*Tca+yb*Tcb;#mean critical temp in K\n", + "Pcm=ya*Pca+yb*Tcb;#mean critical pressure n MPa\n", + "#therefore pseudo reduced property of mixture\n", + "Trm=T/Tcm;\n", + "Prm=P/Pcm;\n", + "Zm=0.7;#Compressiblity from generalised compressibility chart\n", + "vc=Zm*Rm*T/P/1000;#specific volume calculated in m^3/kg\n", + "ve=0.0006757;#experimental specific volume in m^3/kg\n", + "pd1=(ve-vc)/ve*100;#percent deviation\n", + "print\" Percentage deviation in specific volume using Kays rule =\",round(pd1,1),\"percent \\n\"\n", + "\n", + "#2. using vander waals equation\n", + "#values of vander waals constant\n", + "Aa=27*(Ra**2)*(Tca**2)/(64*Pca*1000);\n", + "Ba=Ra*Tca/(8*Pca*1000);\n", + "Ab=27*(Rb**2)*(Tcb**2)/(64*Pcb*1000);\n", + "Bb=Rb*Tcb/(8*Pcb*1000);\n", + "#mean vander waals constant\n", + "Am=(xa*math.sqrt(Aa)+xb*math.sqrt(Ab))**2;\n", + "Bm=(xa*Ba+xb*Bb);\n", + "#using vander waals equation we get cubic equation \n", + "#solving we get\n", + "vc=0.0006326;#calculated specific volume in m^3/kg\n", + "pd2=((ve-vc)/ve)*100;\n", + "print\" Percentage deviation in specific volume using vander waals eqn =\",round(pd2,1),\"percent\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Percentage deviation in specific volume using Kays rule = 4.8 percent \n", + "\n", + " Percentage deviation in specific volume using vander waals eqn = 6.4 percent\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter15_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter15_6.ipynb new file mode 100755 index 00000000..1c9182a7 --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter15_6.ipynb @@ -0,0 +1,921 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4afaac3b11e3c61840a392c8cec12435d16ae2f3d2cdfe278957aaca509d72f5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter15:CHEMICAL REACTIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.1:Pg-621" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "#theoratical air-fuel ratio for combustion of octane\n", + "#combustion equation is\n", + "#C8H18 + 12.5O2 + 12.5(3.76) N2 \u2192 8 CO2 + 9H2O + 47.0N2\n", + "rm=(12.5+47.0)/1;#air fuel ratio on mole basis\n", + "rma=rm*28.97/114.2;#air fuel ratio on mass basis;\n", + "print \"Theoratical air fuel ratio on mass basis is\",round(rma),\"kg air/kg fuel\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Theoratical air fuel ratio on mass basis is 15.0 kg air/kg fuel\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.2:Pg-622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 2\n", + "# molal analysis of the products of combustion\n", + "# combustion equation is \n", + "# C8H18 + 12.5(2) O2 + 12.5(2)(3.76) N2 \u2192 8 CO2 + 9H2O + 12.5O2 + 94.0N2\n", + "nCO2=8 # number of moles of CO2 \n", + "nH2O=9 # number of moles of H2O\n", + "nO2=12.5 # number of moles of O2\n", + "nN2=94.0 # number of moles of N2\n", + "moles=nCO2+nH2O+nO2+nN2 # total moles\n", + "# molal analysis of products\n", + "xCO2=nCO2*100/moles \n", + "xH2O=nH2O*100/moles\n", + "xO2=nO2*100/moles\n", + "xN2=nN2*100/moles\n", + "print \" CO2 =\",round(xCO2,2)\n", + "print \"\\n H2O=\",round(xH2O,2)\n", + "print \"\\n O2=\",round(xO2,2)\n", + "print \"\\n N2=\",round(xN2,2)\n", + "print \"\\n The dew point temp. corresponding to partial pressure of water i.e \",round(xH2O,2),\"KPa is 39.7 degree C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " CO2 = 6.48\n", + "\n", + " H2O= 7.29\n", + "\n", + " O2= 10.12\n", + "\n", + " N2= 76.11\n", + "\n", + " The dew point temp. corresponding to partial pressure of water i.e 7.29 KPa is 39.7 degree C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.2E:Pg-622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 2\n", + "# molal analysis of the products of combustion\n", + "# combustion equation is \n", + "# C8H18 + 12.5(2) O2 + 12.5(2)(3.76) N2 \u2192 8 CO2 + 9H2O + 12.5O2 + 94.0N2\n", + "pressure=14.7 # in lbf/in^2\n", + "nCO2=8 # number of moles of CO2 \n", + "nH2O=9 # number of moles of H2O\n", + "nO2=12.5 # number of moles of O2\n", + "nN2=94.0 # number of moles of N2\n", + "moles=nCO2+nH2O+nO2+nN2 # total moles\n", + "# molal analysis of products\n", + "xCO2=nCO2*100/moles \n", + "xH2O=nH2O*100/moles\n", + "xO2=nO2*100/moles\n", + "xN2=nN2*100/moles\n", + "print \" CO2 =\",round(xCO2,2)\n", + "print \"\\n H2O=\",round(xH2O,2)\n", + "print \"\\n O2=\",round(xO2,2)\n", + "print \"\\n N2=\",round(xN2,2)\n", + "PressureO2=pressure*xH2O/100 # partial pressure of O2\n", + "print \"\\n The dew point temp. corresponding to partial pressure of water i.e \",round(PressureO2,3),\"lbf/in^2 is 104 F degree C\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " CO2 = 6.48\n", + "\n", + " H2O= 7.29\n", + "\n", + " O2= 10.12\n", + "\n", + " N2= 76.11\n", + "\n", + " The dew point temp. corresponding to partial pressure of water i.e 1.071 lbf/in^2 is 104 F degree C\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.3:Pg-623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 3\n", + "# to determine the air\u2013fuel ratio on a volumetric basis\n", + "# the combustion equation is\n", + "# 0.14H2+0.27CO+0.03CH4+0.006O2+0.509N2+0.045CO2+0.259O2+0.259(3.76)N2\u21920.20H2O+0.345CO2+1.482 N2\n", + "mH2=2 # molar mass of H2\n", + "mCO=28 # molar mass of CO\n", + "mCH4=16 # molar mass of CH4\n", + "mO2=32 # molar mass of O2\n", + "mN2=28 # molar mass of N2\n", + "mCO2=44 # molar mass of CO2\n", + "\n", + "\n", + "kmolair=0.259 # moles of air in mixture using combustion equation\n", + "kmolfuel=0.21 # moles of fuel in mixture using combustion equation\n", + "ratioth=kmolair/kmolfuel # theoratical ratio\n", + "\n", + "# For 20% excess air\n", + "vratio=ratioth*(1+0.2) # new ratio for excess air on volume basis\n", + "\n", + "print \" The A/F ratio on volumetric basis is \",round(vratio,2)\n", + "mratio=vratio*28.97 /(0.14*mH2+0.27*mCO+0.03*mCH4+0.006*mO2+0.509*mN2+0.045*mCO2)\n", + "print \"\\n The A/F ratio on mass basis is \",round(mratio,2),\"kg air/kg fuel\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The A/F ratio on volumetric basis is 1.48\n", + "\n", + " The A/F ratio on mass basis is 1.73 kg air/kg fuel\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.4:Pg-624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 4\n", + "# determining the air\u2013fuel ratio and the percent theoretical air\n", + "CO2=10.00 # percentage\n", + "O2=2.37 # percentage\n", + "CO=0.53 # percentage\n", + "N2=87.10 # percentage\n", + "mCH4=16 # molecular mass of CH4\n", + "# using this data the combustion equation is\n", + "# a CH4 + b O2 + c N2 \u2192 10.0 CO2 + 0.53 CO + 2.37 O2 + d H2O + 87.1N2\n", + "# on balancing we get\n", + "# 10.53 CH4 + 23.16 O2 + 87.1N2 \u219210.0 CO2 + 0.53 CO + 2.37 O2 + 21.06 H2O + 87.1N2\n", + "# balanced combustion equation for per Kmole of fuel is:\n", + "# CH4 + 2.2O2 + 8.27 N2 \u2192 0.95 CO2 + 0.05 CO + 2H2O + 0.225 O2 + 8.27 N2\n", + "molesAir=2.2+8.27 # moles of air\n", + "AF= 28.97*molesAir/mCH4 # air fuel ratio on mass basis\n", + "print \"\\n The A/F ratio on mass basis is \",round(AF,2),\"kg air/kg fuel\"\n", + "# Theoritical combustion equation:\n", + "# CH4 + 2O2 + 2(3.76)N2 \u2192 CO2 + 2H2O + 7.52 N2\n", + "molesAirth=2+2*3.76 # moles of air(theoritical)\n", + "AFth= 28.97*molesAirth/mCH4 # air fuel ratio on mass basis (theoritical)\n", + "print \"\\n The A/F ratio (theoritical) on mass basis is \",round(AFth,2),\"kg air/kg fuel\"\n", + "print \"\\n The percent theoretical air is\",round(AF*100/AFth,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The A/F ratio on mass basis is 18.96 kg air/kg fuel\n", + "\n", + " The A/F ratio (theoritical) on mass basis is 17.24 kg air/kg fuel\n", + "\n", + " The percent theoretical air is 110.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.5:Pg-625" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 5\n", + "\n", + "Sulfur=0.6 # percent by mass\n", + "Hydrogen=5.7 # percent by mass\n", + "Carbon=79.2 # percent by mass\n", + "Oxygen=10.0 # percent by mass\n", + "Nitrogen=1.5 # percent by mass\n", + "Ash=3.0 # percent by mass\n", + "mS=32.0 # molecular mass \n", + "mH2=2.0 # molecular mass\n", + "mC=12.0 # molecular mass\n", + "mO2=32.0 # molecular mass\n", + "mN2=28.0 # molecular mass\n", + "# molal composition per 100 Kg of fuel:\n", + "S=Sulfur/mS # molal composition \n", + "H=Hydrogen/mH2 # molal composition\n", + "C=Carbon/mC # molal composition\n", + "O2=Oxygen/mO2 # molal composition\n", + "N2=Nitrogen/mN2 # molal composition\n", + "\n", + "#The combustion equation becomes \n", + "# 0.02 S + 0.02 O2 \u21920.02 SO2\n", + "# 2.85 H2 + 1.42 O2 \u21922.85 H2O\n", + "# 6.60 C + 6.60 O2 \u21926.60 CO2\n", + "\n", + "O2req=0.02+1.42+6.60 # kmol O2 required/100 kg fuel\n", + "O2present=O2req-O2 # kmol O2 from air/100 kg fuel\n", + "AFtheo= (O2present+O2present*3.76)*28.97/100 # AF ration theoritical kg air/kg fuel\n", + "print \"\\n The A/F ratio (theoritical) on mass basis is \",round(AFtheo,2),\"kg air/kg fuel\"\n", + "print \"\\n The A/F ratio for 30% excess air on mass basis is \",round(AFtheo*1.3,2),\"kg air/kg fuel\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The A/F ratio (theoritical) on mass basis is 10.66 kg air/kg fuel\n", + "\n", + " The A/F ratio for 30% excess air on mass basis is 13.85 kg air/kg fuel\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.6:Pg-629" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "# determining heat transfer per kilomole of fuel entering combustion chamber\n", + "\n", + "#1-CH4\n", + "#2-CO2\n", + "#3-H2O\n", + "#hf-standard enthalpy of given substance\n", + "hf1=-74.873;#kJ\n", + "hf2=-393.522;#kJ\n", + "hf3=-285.830;#kJ\n", + "Qcv=hf2+2*hf3-hf1;#kJ\n", + "print \"Heat transfer per kilomole of fuel entering combustion chamber is\",round(Qcv,3),\"kJ\"\n", + "#the answers in the book is different as they have not printed the decimals in values" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer per kilomole of fuel entering combustion chamber is -890.309 kJ\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.7:Pg-631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#calculating enthalpy of water at given pressure and temperature\n", + "\n", + "#1.Assuming steam to be an ideal gas with value of Cp\n", + "T1=298.15;#Initial temperature in K\n", + "T2=573.15;#final temperature in K\n", + "T=(T1+T2)/2;#average temperature in K\n", + "Cp=1.79+0.107*T/1000+0.586*(T/1000)**2-.20*(T/1000)**3;#specific heat at constant pressure in kj/kg.K\n", + "M=18.015;#mass in kg\n", + "dh=M*Cp*(T2-T1);#enthalpy change in kJ/kmol\n", + "ho=-241.826;#enthalpy at standard temperature and pressure in kJ/mol\n", + "htp1=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n", + "print \" 1. Enthalpy of water at given pressure and temperature using value of Cp =\",round(htp1,3),\"kJ/kmol\"\n", + "\n", + "#2..Assuming steam to be an ideal gas with value for dh\n", + "dh=9359;#enthalpy change from table A.9 in kJ/mol\n", + "htp2=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n", + "print \" 2. Enthalpy of water at given pressure and temperature assuming value od dh =\",round(htp2,3),\"kJ/kmol \"\n", + "\n", + "#3. Using steam table\n", + "dh=M*(2977.5-2547.2);#enthalpy change for gases in kJ/mol\n", + "htp3g=dh/1000+ho;\n", + "dh=M*(2977.5-104.9);#enthalpy change for liquid in kJ/mol\n", + "hl=-285.830;#standard enthalpy for liquid in kJ/kmol\n", + "htp31=hl+dh/1000.0;#enthalpy at given temp and pressure in kJ/kmol\n", + "print \" 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp31,3),\"kJ/kmol \"\n", + "print \" 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp3g,3),\"kJ/kmol \"\n", + "#4.using generalised charts\n", + "#htp=ho-(h2*-h2)+(h2*-h1*)+(h1*-h1);\n", + "#h2*-h2=Z*R*Tc,\n", + "#h2*-h1*=9539 kJ/mol, from part 2\n", + "#h1*-h1=0 ,as ideal gas \n", + "Z=0.21;#from chart\n", + "R=8.3145;#gas constant in SI units\n", + "Tc=647.3;#critical temperature in K\n", + "htp4=ho+9539/1000-Z*R*Tc/1000;#enthalpy at given temp and pressure in kJ/kmol\n", + "print \" 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = \",round(htp4,3),\"kJ/kmol\"\n", + "#the answers in book are different as they have not printed the decimals in values" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1. Enthalpy of water at given pressure and temperature using value of Cp = -232.258 kJ/kmol\n", + " 2. Enthalpy of water at given pressure and temperature assuming value od dh = -232.826 kJ/kmol \n", + " 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.08 kJ/kmol \n", + " 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.074 kJ/kmol \n", + " 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = -233.956 kJ/kmol\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.8:Pg-632" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 8\n", + "# Determine the heat transfer\n", + "airth=400 # % excess theoritical air\n", + "Ti=25 # Entry temp in degree celsius\n", + "To=900 # Exit temp in Kelvin\n", + "mf=0.25 # specific fuel consumption in kg/s of fuel per megawatt output\n", + "# The combustion equation is:\n", + "# C8H18(l) + 4(12.5)O2 + 4(12.5)(3.76)N2 \u2192 8CO2 + 9H2O + 37.5O2 + 188.0N2\n", + "hfC8H18=-250105 # is the enthalpy of fuel in kJ/kmol \n", + "nCO2=8 # moles\n", + "hfCO2=-393522 # enthalpy in kJ/kmol\n", + "DelhCO2=28030 # enthalpy in kJ/kmol\n", + "mC8H18=114.23 # molecular mass\n", + "nH2O=9 # moles\n", + "hfH2O=-241826 # enthalpy in kJ/kmol\n", + "DelhH2O=21937 # enthalpy in kJ/kmol\n", + "DelhO2=19241 # enthalpy in kJ/kmol\n", + "nO2=37.5 # moles\n", + "DelhN2=18225 # enthalpy in kJ/kmol\n", + "nN2=188.0 # moles\n", + "Eproduct=nCO2*(hfCO2+DelhCO2)+nH2O*(hfH2O+DelhH2O)+nO2*DelhO2+nN2*DelhN2\n", + "\n", + "Wcv=1000*mC8H18/mf # work in kJ/kmol fuel\n", + "print \" The work is \",Wcv,\"kJ/kmol fuel\"\n", + "\n", + "Qcv=Eproduct+Wcv-hfC8H18 # using first law\n", + "print \" The Heat transfer is \",Qcv,\"kJ/kmol fuel\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work is 456920.0 kJ/kmol fuel\n", + " The Heat transfer is -48074.5 kJ/kmol fuel\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.8E:Pg-633" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 8\n", + "# Determine the heat transfer\n", + "airth=400 # % excess theoritical air\n", + "Ti=77 # Entry temp in F\n", + "To=1100 # Exit temp in F\n", + "mf=1 # specific fuel consumption in lb of fuel per horsepower-hour\n", + "# The combustion equation is:\n", + "# C8H18(l) + 4(12.5)O2 + 4(12.5)(3.76)N2 \u2192 8CO2 + 9H2O + 37.5O2 + 188.0N2\n", + "hfC8H18=-107526 # is the enthalpy of fuel in Btu/lb.mol\n", + "nCO2=8 # moles\n", + "hfCO2=-169184 # enthalpy in Btu/lb.mol\n", + "DelhCO2=11391 # enthalpy in Btu/lb.mol\n", + "mC8H18=114.23 # molecular mass\n", + "nH2O=9 # moles\n", + "hfH2O=-103966 # enthalpy in Btu/lb.mol\n", + "DelhH2O=8867 # enthalpy in Btu/lb.mol\n", + "DelhO2=7784 # enthalpy in Btu/lb.mol\n", + "nO2=37.5 # moles\n", + "DelhN2=7374 # enthalpy in Btu/lb.mol\n", + "nN2=188.0 # moles\n", + "Eproduct=nCO2*(hfCO2+DelhCO2)+nH2O*(hfH2O+DelhH2O)+nO2*DelhO2+nN2*DelhN2\n", + "\n", + "Wcv=2544*mC8H18 # work in kJ/kmol fuel\n", + "print \" The work is \",Wcv,\"Btu/lb.mol fuel\"\n", + "\n", + "Qcv=Eproduct+Wcv-hfC8H18 # using first law\n", + "print \" The Heat transfer is \",Qcv,\"Btu/lb.mol fuel\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The work is 290601.12 Btu/lb.mol fuel\n", + " The Heat transfer is -41895.88 Btu/lb.mol fuel\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.9:Pg-634" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques 9\n", + "\n", + "# The combustion equation is\n", + "# C2H4 + 3O2 \u2192 2 CO2 + 2H2O(g)\n", + "hfC2H4=52467 # enthalpy in KJ/mol\n", + "R=8.314 # gas constant\n", + "T=298.2 # temperature in Kelvin\n", + "hfCO2=-393522 # enthalpy in kJ/kmol\n", + "DelhCO2=12906 # enthalpy in kJ/kmol\n", + "hfH2O=-241826 # enthalpy in kJ/kmol\n", + "DelhH2O=10499 # enthalpy in kJ/kmol\n", + "Ureactant=hfC2H4-4*R*T # energy of reactant in KJ\n", + "Uproduct=2*(hfCO2+DelhCO2)+2*(hfH2O+DelhH2O) # energy of product in KJ\n", + "Q=Uproduct-Ureactant # using first law\n", + "print \"The Heat transfer is \",Q,\"kJ\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Heat transfer is -1266436.0608 kJ\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.10:Pg-638" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques 10\n", + "\n", + "# The combustion equation is\n", + "# C3H8 + 5O2 \u2192 3 CO2 + 4H2O\n", + "hfC3H8g=-103900 # enthalpy of C3H8 in KJ/mol from Table A.10\n", + "hfC3H8l=hfC3H8g-44.097*370 # enthalpy of C3H8 liquid as enthalpy of evaporation is given in question\n", + "hfH2Ol=285830 # enthalpy of water in KJ/mol\n", + "hfH2Og=241826 # enthalpy in KJ/mol\n", + "hfCO2=393522 # enthalpy in KJ/mol\n", + "nO2=5 # moles\n", + "nCO2=3 # moles\n", + "nH2O=4 # moles\n", + "nC3H8=1 # moles\n", + "# part(1) : liquid propane-liquid water\n", + "hrP=(nCO2*hfCO2 + nH2O*hfH2Ol -nC3H8*hfC3H8l)/44.097 # higher heating value of liquid propane \n", + "print \"The higher heating value of liquid propane is\",round(hrP,2),\"KJ/kg\"\n", + "\n", + "# part(2) : Liquid propane\u2013gaseous water\n", + "\n", + "hrP=(nCO2*hfCO2 + nH2O*hfH2Og -nC3H8*hfC3H8l)/44.097 # lower heating value of liquid propane \n", + "print \"The lower heating value of liquid propane is\",round(hrP,2),\"KJ/kg\"\n", + "\n", + "# part(3) :Gaseous propane\u2013liquid water\n", + "hrP=(nCO2*hfCO2 + nH2O*hfH2Ol -nC3H8*hfC3H8g)/44.097 # higher heating value of gaseous propane \n", + "print \"The higher heating value of gaseous propane is\",round(hrP,2),\"KJ/kg\"\n", + "\n", + "# part(4) :Gaseous propane\u2013Gaseous water\n", + "hrP=(nCO2*hfCO2 + nH2O*hfH2Og -nC3H8*hfC3H8g)/44.097 # lower heating value of gaseous propane \n", + "print \"The lower heating value of gaseous propane is\",round(hrP,2),\"KJ/kg\"\n", + "\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The higher heating value of liquid propane is -120215.89 KJ/kg\n", + "The lower heating value of liquid propane is 51434.02 KJ/kg\n", + "The higher heating value of gaseous propane is 55055.58 KJ/kg\n", + "The lower heating value of gaseous propane is 51064.02 KJ/kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.11:Pg-638" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques 10\n", + "# The combustion equation is\n", + "# C3H8(g) + 5O2 \u2192 3 CO2 + 4H2O(g)\n", + "hfC3H8=-103900 # enthalpy of C3H8 in KJ/mol from Table A.10\n", + "Cp=2.1 # in KJ/Kg.K\n", + "T1=500 # temp in Kelvin\n", + "T2=298.2 # temp in Kelvin\n", + "DelhO2=6086 # enthalpy of O2 in KJ/mol\n", + "hfCO2=-393522 # enthalpy in KJ/mol\n", + "DelhCO2=8305 # enthalpy of CO2 in KJ/mol\n", + "hfH2O=-241826 # enthalpy of H2O in KJ/mol\n", + "DelhH2O=6922 # enthalpy in KJ/mol\n", + "nO2=5 # moles\n", + "nCO2=3 # moles\n", + "nH2O=4 # moles\n", + "nC3H8=1 # moles\n", + "\n", + "hR500= hfC3H8+Cp*44.097*(T1-T2)+nO2*DelhO2 # in KJ/mol\n", + "hP500= nCO2*(hfCO2+DelhCO2)+ nH2O*(DelhH2O+hfH2O) # in KJ/mol\n", + "hRP500=hP500-hR500 # in KJ/mol\n", + "Hrp500=hRP500/44.097 # KJ/Kg\n", + "\n", + "print \" The enthalpy of combustion of gaseous propane at 500 K \",round(Hrp500)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The enthalpy of combustion of gaseous propane at 500 K -46273.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.12:Pg-639" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 12\n", + "# The question is solved by Trial and Error and using the table , no need for Calculation Thus not solved in Python" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.13:Pg-645" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 13\n", + "# The equation for this chemical reaction is\n", + "# C2H4(g) + 3(4) O2 + 3(4)(3.76) N2 \u2192 2 CO2+2H2O(g) + 9O2 + 45.1 N2\n", + "T=25+273.15 # temp in degree kelvin\n", + "P=0.1 # pressure in Mpa\n", + "hfCO2=-393522 # enthalpy in KJ/mol\n", + "hfH2O=-241826 # enthalpy of H2O in KJ/mol\n", + "HfC2H4=52467 # enthalpy of C2H4 in KJ/mol\n", + "hfO2=0 # enthalpy of formation in KJ/mol\n", + "SCO2=213.795 # kJ/kmol fuel\n", + "SH2O=188.243 # kJ/kmol fuel\n", + "SC2H4=219.330 # kJ/kmol fuel\n", + "SO2=205.148 # kJ/kmol fuel\n", + "DelH=2*hfCO2+2*hfH2O-HfC2H4-3*hfO2 # in KJ/mol\n", + "DelS=2*SCO2+2*SH2O-SC2H4-3*SO2 # kJ/kmol fuel\n", + "DelG=DelH-T*(DelS) # Gibbs Energy\n", + "Wrev=-DelG/28.054 # reversible work in kJ/kg\n", + "print \"The reversible work is \",round(Wrev,2),\"kJ/kg \"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reversible work is 46838.61 kJ/kg \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.14:Pg-647" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques \n", + "# The question is solved by Trial and Error and using the table , no need for Calculation Thus not solved in Python" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.15:Pg-649" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques15\n", + "#calculatng reversible elecromotive force \n", + "\n", + "#1-H2O\n", + "#2-H2\n", + "#3-O2\n", + "#hf-standard enthalpy \n", + "#sf-standard entropy\n", + "hf1=-285.830;#kJ\n", + "hf2=0;#kJ\n", + "hf3=0;#kJ\n", + "sf1=69.950;#kJ/K\n", + "sf2=130.678;#kJ/K\n", + "sf3=205.148;#kJ/K\n", + "dH=2*hf1-2*hf2-hf3;#change in enthalpy in kJ\n", + "dS=2*sf1-2*sf2-sf3;#change in entropy in kJ/K\n", + "T=298.15;#temperature in K\n", + "dG=dH-T*dS/1000;#change in gibbs free energy in kJ\n", + "E=-dG*1000/(96485*4);#emf in V\n", + "print\" Reversible electromotive Force =\",round(E,3),\" V\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Reversible electromotive Force = 1.229 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.16:Pg-654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 16\n", + "# to Calculate the combustion efficiency\n", + "Tair = 400 # temp in K\n", + "Vair = 100 # velocity in m/s\n", + "Tfuel = 50 # temp of fuel in \u25e6C\n", + "Tproducts = 1100 # temp of product in K\n", + "Vproducts = 150 # velocity of product in m/s\n", + "FAactual = 0.0211 # air fuel ratio kg fuel/kg air\n", + "\n", + "# HR + KER= \u2212243737 + 14892nO2 \n", + "# HP + KEP= \u22125 068 599 + 120 853nO2 \n", + "# using these two equations :\n", + "no2=(-5068599.0 + 243737.0)/(14892.0-120853) # in kmol O2/kmol fuel\n", + "FAideal=114.23/(4.76*no2*28.91) # in kg fuel/kg air\n", + "\n", + "efficomb=FAideal*100/FAactual # Efficiency\n", + "\n", + "print \" The combustion efficiency is \",round(efficomb,2),\"%\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The combustion efficiency is 86.4 %\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex15.17:Pg-654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques17\n", + "#efficiency of generator and plant\n", + "\n", + "q=325000*(3398.3-856.0);#heat transferred to H2O/kg fuel in kJ/kg\n", + "qv=26700.0*33250;#higher heating value in kJ/kg\n", + "nst=q/qv*100;#efficiency of steam generator\n", + "w=81000.0*3600;#net work done in kJ/kg\n", + "nth=w/qv*100.0;#thermal efficiency\n", + "print\" Efficiency of generator =\",round(nst,1),\"percent\\n\"\n", + "print\" Thermal Efficiency =\",round(nth,1),\" percent\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation while here the answers are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Efficiency of generator = 93.1 percent\n", + "\n", + " Thermal Efficiency = 32.8 percent\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter16_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter16_6.ipynb new file mode 100755 index 00000000..c155fdc6 --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter16_6.ipynb @@ -0,0 +1,377 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2573953a96bd6739252db580058edb8938919cec53d4f1d76f9484cfa4f2a1d5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16:INTRODUCTION TO PHASE AND CHEMICAL EQUILIBRIUM" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.1:676" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "# pressure required to make diamonds from graphite\n", + "import math\n", + "T=25 # temp in degree C\n", + "ggrp= 0 # g for fraphite\n", + "gdiamnd=2867.8 # g for diamond in kJ/mol\n", + "vgrp=0.000444 # specific volume of graphite in m^3/kg\n", + "vdiamnd=0.000284 # specific volume of graphite in m^3/kg\n", + "BetaTgrp=0.304e-6 # beta for graphite in 1/MPa\n", + "BetaTdiamnd=0.016e-6 # beta for diamond in 1/MPa\n", + "\n", + "P=-(-2*(vgrp-vdiamnd)+math.sqrt((2*vgrp-2*vdiamnd)**2-4*(vgrp*BetaTgrp-vdiamnd*BetaTdiamnd)*(2*gdiamnd/(12.011*1000))))/(2*(vgrp*BetaTgrp-vdiamnd*BetaTdiamnd))\n", + "print int(P),\" MPa is the pressure at which possibility exists for conversion from graphite to diamonds\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1493 MPa is the pressure at which possibility exists for conversion from graphite to diamonds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.2:PG-681" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques2\n", + "#to determine change in gibbs free energy\n", + "\n", + "#1-H2\n", + "#2-O2\n", + "#3-H2O\n", + "\n", + "#at T=298 K\n", + "T1=298.0;#K\n", + "Hf1=0;#Enthalpy of formation of H2 at 298 K\n", + "Hf2=0;#Enthalpy of formation of O2 at 298 K\n", + "Hf3=-241826;#enthalpy of formation of H2O at 298 K in kJ\n", + "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n", + "Sf1=130.678;#Entropy of H2 at 298 K n kJ/K\n", + "Sf2=205.148;#Entropy of O2 at 298 K in kJ/K\n", + "Sf3=188.834;#entropy of H2O at 298 K in kJ/K\n", + "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n", + "dG1=dH-T1*dS;#change n gibbs free energy in kJ\n", + "print\" Change in gibbs free energy at\",T1,\"kelvin is\",round(dG1),\"kJ \"\n", + "#at T=2000 K\n", + "T2=2000.0;#K\n", + "Hf1=52942-0;#Enthalpy of formation of H2 at 2000 K\n", + "Hf2=59176-0;#Enthalpy of formation of O2 at 2000 K\n", + "Hf3=-241826+72788;#enthalpy of formation of H2O at 2000 K in kJ\n", + "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n", + "Sf1=188.419;#Entropy of H2 at 2000 K n kJ/K\n", + "Sf2=268.748;#Entropy of O2 at 2000 K in kJ/K\n", + "Sf3=264.769;#entropy of H2O at 2000 K in kJ/K\n", + "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n", + "dG2=dH-(T2*dS);#change n gibbs free energy in kJ\n", + "print\" Change in gibbs free energy at\",T2,\"kelvin is\",round(dG2),\" kJ \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Change in gibbs free energy at 298.0 kelvin is 457179.0 kJ \n", + " Change in gibbs free energy at 2000.0 kelvin is 271040.0 kJ \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.3:PG-683" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques3\n", + "#calculating equilibrium constant \n", + "\n", + "dG1=-457.166;#change in gibbs free energy at temp 298 K from example2 in kJ\n", + "dG2=-271.040;#change in gibbs free energy at temp 2000 K from example2 n kJ\n", + "T1=298;#K\n", + "T2=2000;#K\n", + "R=8.3145;#gas constant\n", + "K1=dG1*1000/(R*T1);\n", + "K2=dG2*1000/(R*T2);\n", + "print\" Equilibrium constant at \",T1,\"K = \",round(K1,2)\n", + "print\" Equilibrium constant at \",T2,\"K = \",round(K2,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Equilibrium constant at 298 K = -184.51\n", + " Equilibrium constant at 2000 K = -16.299\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.4:Pg-684" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# The example is about proving that Equlibrium constant can be found using table hence doesn't require solution in python " + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.5:Pg-685" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 5\n", + "# To determine Heat Transfer\n", + "# The process is two step as:\n", + "# Combustion: C + O2--->CO2\n", + "# Dissociation reaction: 2CO2---->2CO + O2\n", + "# overall process : C + O2 \u2192 0.5622 CO2 + 0.4378 CO + 0.2189 O2\n", + "nCO2=0.5622 # moles of CO2\n", + "nCO=0.4378 # moles of CO\n", + "nO2=0.2189 # moles of NO2\n", + "\n", + "# from Table A.9:\n", + "hfCO2=0 # enthalpy of formation\n", + "hfC=0 # enthalpy of formation\n", + "hfCO=0 # enthalpy of formation\n", + "hfO2=0 # enthalpy of formation\n", + "hfCO23000=-393522 # enthalpy @ 3000K\n", + "hfCO3000=-110527 # enthalpy @ 3000K\n", + "hfO23000=0 # enthalpy @ 3000K\n", + "hfCO2298=-152853 # enthalpy @ 298K\n", + "hfCO298=-93504 # enthalpy @ 298K\n", + "hfO2298=-98013 # enthalpy @ 298K\n", + "\n", + "Hr=hfC+hfO2 # enthalpy of reactants\n", + "Hp=nCO2*(hfCO2+hfCO23000-hfCO2298)+nCO*(hfCO+hfCO3000-hfCO298)+nO2*(hfO2+hfO23000-hfO2298)\n", + "\n", + "Qcv=Hp-Hr # using first law\n", + "print round(Qcv),\"kJ/kmol C is the heat transfer \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-121302.0 kJ/kmol C is the heat transfer \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.6:Pg-687" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 6\n", + "# to determine the composition\n", + "# the standard equation is C + 2O2 \u2192 CO2 + O2\n", + "# from equilibrium C + 2O2 \u2192 (1 \u2212 2z)CO2 + 2zCO + (1 + z)O2\n", + "T=3000 # temp in K\n", + "P=0.1 # prssure in MPa\n", + "z = 0.1553 # from equilibrium equation using table\n", + "yCO2=(1-2*z)/(2+z) # mole fraction of CO2\n", + "yCO = 2*z/(2+z) # mole fraction of CO\n", + "yO2=(1+z)/(2+z) # mole fraction of O2\n", + "print \"The mole fraction is \",round(yCO2,3),\" for CO2 \\n\"\n", + "print \"The mole fraction is \",round(yCO,3),\" for CO \\n\"\n", + "print \"The mole fraction is \",round(yO2,3),\" for O2 \\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mole fraction is 0.32 for CO2 \n", + "\n", + "The mole fraction is 0.144 for CO \n", + "\n", + "The mole fraction is 0.536 for O2 \n", + "\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.7:Pg-691" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 7\n", + "# to determine the equilibrium composition\n", + "# The reaction equation is:\n", + "# (1): 2.H2O -->2H2 + O2\n", + "# (2): 2 H2O -->H2 + 2OH\n", + "# the equilibrium equation is \n", + "# H2O \u2192 (1 \u2212 2a \u2212 2b)H2O + (2a + b)H2 + aO2 + 2bOH\n", + "P= 0.1 # pressure in MPa\n", + "T=3000 # temp in Kelvin\n", + "a=0.0534 # using value of K from Table A.11 @ 3000k\n", + "b=0.0551 # using value of K from Table A.11 @ 3000k\n", + "nH2O= (1-2*a-b) # moles of H2O\n", + "nH2=2*a+b# moles of H2\n", + "nO2=a# moles of O2\n", + "nOH= 2*b# moles of OH\n", + "X=nH2O+nH2+nO2+nOH\n", + "yH2O=nH2O/X # mole fraction\n", + "yH2=nH2/X # mole fraction\n", + "yO2=nO2/X # mole fraction\n", + "yOH=nOH/X # mole fraction\n", + "print \"The mole fraction of H2O is\",round(yH2O,2),\"\\n\"\n", + "print \"The mole fraction of H2 is\",round(yH2,2),\"\\n\"\n", + "print \"The mole fraction of O2 is\",round(yO2,2),\"\\n\"\n", + "print \"The mole fraction of OH is\",round(yOH,2),\"\\n\"\n", + "# the answers are slightly different due to approximation in textbook while here the answers are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mole fraction of H2O is 0.72 \n", + "\n", + "The mole fraction of H2 is 0.139 \n", + "\n", + "The mole fraction of O2 is 0.046 \n", + "\n", + "The mole fraction of OH is 0.095 \n", + "\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16.8:pg-696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ques 8\n", + "# determine the the equilibrium composition\n", + "P= 1 # pressure in Kpa\n", + "T=10000 # temp in Kelvin\n", + "z=0.2008 # using k from table \n", + "# the chemical equation is Ar -->Ar^(+) + e\u2212\n", + "\n", + "yAr=(1-z)/(1 + z) # mole fraction of Ar\n", + "yArpositive= z/(1+z) # mole fraction of Ar(+)\n", + "yenegative=z/(1+z) # mole fraction of ye-\n", + "print \"The mole fraction of Ar is\",round(yAr,3),\"\\n\"\n", + "print \"The mole fraction of Ar+ is\",round(yArpositive,3),\"\\n\"\n", + "print \"The mole fraction of e- is\",round(yenegative,3),\"\\n\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mole fraction of Ar is 0.666 \n", + "\n", + "The mole fraction of Ar+ is 0.167 \n", + "\n", + "The mole fraction of e- is 0.167 \n", + "\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter17_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter17_6.ipynb new file mode 100755 index 00000000..11b9507c --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter17_6.ipynb @@ -0,0 +1,462 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e77c793709c88cc39a2de404e997a6f1eed32d352c214c1580d822fd7a5a83a2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: COMPRESSIBLE FLOW" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.1:PG-710" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "#to determine isentropic stagnation pressure and temperature \n", + "\n", + "T=300;#Temperature of air in K\n", + "P=150;#Pressure of air in kPa\n", + "v=200;#velocity of air flow n m/s\n", + "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", + "To=v**2/(2000*Cp)+T;#stagnation temperature in K\n", + "k=1.4;#constant\n", + "Po=P*(To/T)**(k/(k-1));#stagnation pressure in kPa\n", + "print 'Stagnation Temperature is ',round(To,1),' K \\n'\n", + "print 'Stagnation Pressure is ',round(Po,2),'kPa \\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stagnation Temperature is 319.9 K \n", + "\n", + "Stagnation Pressure is 187.85 kPa \n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.2:PG-713" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques2\n", + "#to determine the force\n", + "\n", + "#initializing variables\n", + "mdot=-1 # mass flow rate out of control volume in kg/s\n", + "Vx=-1 # x component of velocity of control volume in m/s\n", + "Vy=10 # y component of velocity of control volume in m/s\n", + "\n", + "Fx=mdot*Vx # Force in X direction\n", + "\n", + "Fy=mdot*Vy # Force in Y direction\n", + "\n", + "print \"the force the man exert on the wheelbarrow\",round(Fx),\"N\"\n", + "print \"the force the floor exerts on the wheelbarrow\",round(Fy),\"N\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the force the man exert on the wheelbarrow 1.0 N\n", + "the force the floor exerts on the wheelbarrow -10.0 N\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.3:PG-715" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques3\n", + "#determining the thrust acting on a control surface\n", + "\n", + "#i-inlet\n", + "#e-exit\n", + "#using momentum equation on control surface in x direction\n", + "me=20.4;#mass exiting in kg\n", + "mi=20;#mass entering in kg\n", + "ve=450;#exit velocity in m/s\n", + "vi=100;#inlet velocity in m/s\n", + "Pi=95;#Pressure at inlet in kPa\n", + "Pe=125;#Pressure at exit in kPa\n", + "Po=100;#surrounding pressure in kPa\n", + "Ai=0.2;#inlet area in m^2\n", + "Ae=0.1;#exit area in m^2\n", + "Rx=(me*ve-mi*vi)/1000-(Pi-Po)*Ai+(Pe-Po)*Ae;#thrust in x direction in kN\n", + "\n", + "print \"Thrust acting in x direction is \",round(Rx,2),\"kN\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thrust acting in x direction is 10.68 kN\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.4:PG-717" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4\n", + "#to determine increase in enthalpy\n", + "#initializing variables\n", + "#i-inlet\n", + "#e-exit\n", + "\n", + "T=25+273 # temperature in kelvin\n", + "v=0.001003 # specific volume of water in kg/m^3 at 25 *c from table B.1.1 \n", + "ve=7;#exit velocity in m/s\n", + "vi=30;#inlet velocity in m/s\n", + "Pi=350;#Pressure at inlet in kPa\n", + "Pe=600;#Pressure at exit in kPa\n", + "\n", + "#using momentum equation on control surface \n", + "Pes= (vi**2-ve**2)/(2*v*1000)+Pi # exit pressure for reversible diffuser\n", + "delH=(vi**2-ve**2)/(2*1000.0) # change in enthalpy from first law in kJ/kg\n", + "delU=delH-v*(Pe-Pi) # change in internal energy in kJ/kg\n", + "delS=delU/T # change in entropy in kJ/kg.K\n", + "print\"the exit pressure for reversible diffuser is \",round(Pes),\"kPa\"\n", + "print\"the increase in enthalpy is \",round(delH,5),\"kJ/kg\"\n", + "print\"the increase in internal energy is \",round(delU,5),\"kJ/kg\"\n", + "print\"the increase in entropy is \",round(delS,6),\"kJ/kg.K\"\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the exit pressure for reversible diffuser is 774.0 kPa\n", + "the increase in enthalpy is 0.4255 kJ/kg\n", + "the increase in internal energy is 0.17475 kJ/kg\n", + "the increase in entropy is 0.000586 kJ/kg.K\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.5:PG-720" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#determining velocity of sound in air\n", + "import math\n", + "k=1.4;#constant\n", + "R=0.287;#gas constant\n", + "#at 300K\n", + "T1=300;# temperature in kelvin\n", + "c1=math.sqrt(k*R*T1*1000)\n", + "print \"Speed of sound at 300 K is\",round(c1,1),\" m/s\" \n", + "#at 1000K\n", + "T2=1000;# temperature in kelvin\n", + "c2=math.sqrt(k*R*T2*1000)\n", + "print \"Speed of sound at 1000 K is\",round(c2,1),\" m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of sound at 300 K is 347.2 m/s\n", + "Speed of sound at 1000 K is 633.9 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.6:PG-727" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "#determining mass flow rate through control volume\n", + "import math\n", + "k=1.4;#constant\n", + "R=0.287;#gas constant\n", + "To=360;#stagnation Temperature in K \n", + "T=To*0.8333;#Temperature of air in K, 0.8333 stagnation ratio from table\n", + "v=math.sqrt(k*R*T*1000);#velocity in m/s\n", + "P=528;#stagnation pressure in kPa\n", + "d=P/(R*T);#stagnation density in kg/m^3\n", + "A=500*10**-6;#area in m^2\n", + "ms=d*A*v;#mass flow rate in kg/s\n", + "print\" Mass flow rate at the throat section is\",round(ms,4),\"kg/s\"\n", + "#e-exit state\n", + "Te=To*0.9381;#exit temperature in K, ratio from table\n", + "ce=math.sqrt(k*R*Te*1000);#exit velocity of sound in m/s\n", + "Me=0.573;#Mach number\n", + "ve=Me*ce;\n", + "Pe=800;#exit pressure in kPa\n", + "de=Pe/R/Te;\n", + "mse=de*A*ve;\n", + "print\" Mass flow rate at the exit section is\",round(mse,4),\" kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Mass flow rate at the throat section is 1.0646 kg/s\n", + " Mass flow rate at the exit section is 0.8711 kg/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.7:PG-728" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#determining exit properties in a control volume\n", + "import math\n", + "Po=1000;#stagnation pressure in kPa\n", + "To=360;#stagnation temperature in K\n", + "\n", + "#when diverging section acting as nozzle\n", + "\n", + "Pe1=0.0939*Po;#exit pressure of air in kPa\n", + "Te1=0.5089*To;#exit temperature in K\n", + "k=1.4;#constant\n", + "R=0.287;#gas constant for air\n", + "ce=math.sqrt(k*R*Te1*1000);#velocity of sound in exit section in m/s\n", + "Me=2.197;#mach number from table\n", + "ve1=Me*ce;#velocity of air at exit section in m/s\n", + "print \"When diverging section act as a nozzle :-\"\n", + "print \"Exit pressure is\",round(Pe1,4),\" kPa\"\n", + "print \"Exit Temperature\",round(Te1,1),\" K\"\n", + "print \"Exit velocity is\",round(ve1,1),\" m/s \"\n", + "\n", + "#when diverging section act as diffuser\n", + "\n", + "Me=0.308;\n", + "Pe2=0.0936*Po;#exit pressure of air in kPa\n", + "Te2=0.9812*To;#exit temperature in K\n", + "ce=math.sqrt(k*R*Te2*1000);#velocity of sound in exit section in m/s\n", + "ve2=Me*ce;\n", + "print \"When diverging section act as a diffuser :-\"\n", + "print \"Exit pressure is\",round(Pe2,1),\" kPa\"\n", + "print \"Exit Temperature\",round(Te2,2),\" K\"\n", + "print \"Exit velocity is\",round(ve2,),\" m/s \"\n", + "\n", + "# The value of Exit pressure when diverging section acts as diffuser is wrong\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When diverging section act as a nozzle :-\n", + "Exit pressure is 93.9 kPa\n", + "Exit Temperature 183.2 K\n", + "Exit velocity is 596.1 m/s \n", + "When diverging section act as a diffuser :-\n", + "Exit pressure is 93.6 kPa\n", + "Exit Temperature 353.23 K\n", + "Exit velocity is 116.0 m/s \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.8:PG-731" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques8\n", + "#Determine the static pressure and temperature of supersonic nozzle\n", + "#x-inlet\n", + "#y-exit\n", + "# using the data from previous example\n", + "Mx=2.197 # Mach number at x\n", + "Px=93.9 # IN kPa\n", + "Tx=183.2 # IN K\n", + "P0x=1000 # IN kPa\n", + "T0x = 360 # in K\n", + "My=0.547 # Mach number at y From Table A.13\n", + "Py = 5.46*Px # From Table A.13\n", + "Ty = 1.854 * Tx # From Table A.13\n", + "P0y= 0.630 * P0x # From Table A.13\n", + "print \"Exit pressure after shock is\",round(Py,1),\" kPa\"\n", + "print \"Exit Temperature after shock is\",round(Ty,1),\" K\"\n", + "print \"Exit stagnation pressure after shock is\",round(P0y,1),\" kPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit pressure after shock is 512.7 kPa\n", + "Exit Temperature after shock is 339.7 K\n", + "Exit stagnation pressure after shock is 630.0 kPa\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17.9:PG-733" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques9\n", + "#determining exit plane properties in control volume\n", + "\n", + "#x-inlet\n", + "#y-exit\n", + "Mx=1.5;#mach number for inlet\n", + "My=0.7011;#mach number for exit\n", + "Px=272.4;#inlet pressure in kPa\n", + "Tx=248.3;#inlet temperature in K\n", + "Tox=360 # stagnation temperature in Kelvin\n", + "Pox=1000.0;#stagnation pressure for inlet\n", + "Py=2.4583*Px;# Pressure at 1.5 mach in kPa\n", + "Ty=1.320*Tx;# temperature at 1.5 mach in K\n", + "Poy=0.9298*Pox;# pressure at 1.5 mach in kPa\n", + "\n", + "Toy=Tox # constant\n", + "Me=0.339 # from table with A/A*=1.860 and M < 1\n", + "Pe=0.9222*Py;#Exit Pressure in kPa\n", + "Te=0.9771*Toy;#Exit temperature in K\n", + "Poe=0.9222*Poy;#Exit pressure in kPa\n", + "\n", + "print \"Exit Mach no.=\",Me\n", + "print \"Exit temperature =\",round(Te,2),\"K \"\n", + "print \"Exit pressure =\",round(Poe,1),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit Mach no.= 0.339\n", + "Exit temperature = 351.76 K \n", + "Exit pressure = 857.5 kPa\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter2_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter2_6.ipynb new file mode 100755 index 00000000..08e192fe --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter2_6.ipynb @@ -0,0 +1,379 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:96f5bd0fa542764d6a8f75d5a1a42e4b79791697476f4029d0fa0fea1de65bed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2:SOME CONCEPTS AND DEFINITIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1:pg-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#weight of a person\n", + "\n", + "\n", + "m=1 #kg\n", + "g=9.75 #acc.due to gravity in m/s^2\n", + "F=m*g #weight of 1 kg mass in N\n", + "print\"\\n hence,weight of person is\",round(F,2),\" N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,weight of person is 9.75 N\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1E:pg-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#weight of a person\n", + "\n", + "\n", + "m=1 #lbm\n", + "g=32 #acc.due to gravity in ft/s^2\n", + "F=m*g/32.174 #weight of 1 lbm mass in lbf\n", + "print\"\\n hence,weight of person is\",round(F,4),\" lbf\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,weight of person is 0.9946 lbf\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2:pg-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#average volume and density\n", + "\n", + "Vliq=0.2 #volume of liquid in m^3\n", + "dliq=997 #density of liquid in kg/m^3\n", + "Vstone=0.12 #volume of stone in m^3\n", + "Vsand=0.15 #volume of sand in m^3\n", + "Vair=0.53 #vo;ume of air in m^3\n", + "mliq=Vliq*dliq #mass of liquid in kg\n", + "dstone=2750 #density of stone in kg/m^3\n", + "dsand=1500 #density of sand in kg/m^3\n", + "mstone=Vstone*dstone #volume of stone in m^3\n", + "msand=Vsand*dsand #volume of sand in m^3\n", + "Vtot=1 #total volume in m^3\n", + "dair=1.1 #density of air in kg/m^3\n", + "mair=Vair*dair #mass of air\n", + "mtot=mair+msand+mliq+mstone #total mass in kg\n", + "v=Vtot/mtot #specific volume in m^3/kg\n", + "d=1/v #overall density in kg/m^3\n", + "print\"\\n hence,average specific volume is\",round(v,6),\"m^3/kg\" \n", + "print\"\\n and overall density is\", round(d),\"kg/m^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,average specific volume is 0.001325 m^3/kg\n", + "\n", + " and overall density is 755.0 kg/m^3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3:pg-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#calculating the required force\n", + "import math\n", + "\n", + "Dcyl=0.1 #cylinder diameter in m\n", + "Drod=0.01 #rod diameter in m\n", + "Acyl=math.pi*Dcyl**2/4 #cross sectional area of cylinder in m^2\n", + "Arod=math.pi*Drod**2/4 #cross sectional area of rod in m^2\n", + "Pcyl=250000 #inside hydaulic pressure in Pa\n", + "Po=101000 #outside atmospheric pressure in kPa\n", + "g=9.81 #acc. due to gravity in m/s^2\n", + "mp=25 #mass of (rod+piston) in kg\n", + "F=Pcyl*Acyl-Po*(Acyl-Arod)-mp*g #the force that rod can push within the upward direction in N\n", + "print\"\\n hence,the force that rod can push within the upward direction is\",round(F,1),\" N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the force that rod can push within the upward direction is 932.9 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.4:pg-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#Calculating atmospheric pressure \n", + "\n", + "dm=13534 #density of mercury in kg/m^3\n", + "H=0.750 #height difference between two columns in metres\n", + "g=9.80665 #acc. due to gravity in m/s^2\n", + "Patm=dm*H*g/1000 #atmospheric pressure in kPa\n", + "print\"\\n hence, atmospheric pressure is\",round(Patm,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, atmospheric pressure is 99.54 kPa\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5:pg-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#pressure inside vessel\n", + "\n", + "dm=13590 #density of mercury in kg/m^3\n", + "H=0.24 #height difference between two columns in metres\n", + "g=9.80665 #acc. due to gravity in m/s^2\n", + "dP=dm*H*g #pressure difference in Pa\n", + "Patm=13590*0.750*9.80665 #Atmospheric Pressure in Pa\n", + "Pvessel=dP+Patm #Absolute Pressure inside vessel in Pa\n", + "Pvessel=Pvessel/101325 #Absolute Pressure inside vessel in atm\n", + "print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,3),\"atm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, the absolute pressure inside vessel is 1.302 atm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5E:pg-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7\n", + "#pressure inside vessel\n", + "\n", + "dm=848 #density of mercury in lbm/ft^3\n", + "H=9.5 #height difference between two columns in inches\n", + "g=32.174 #acc. due to gravity in ft/s^2\n", + "dP=dm*H*g #pressure difference in lbf/in^2\n", + "Patm=848*9.5*32.174/(1728*32.174) #Atmospheric Pressure in lbf/in^2\n", + "Pvessel=dP+Patm #Absolute Pressure inside vessel in lbf/in^2\n", + "Pvessel=848*29.5*32.174/(1728*32.174)+Patm #Absolute Pressure inside vessel in lbf/in^2\n", + "print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,2),\"lbf/in^2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, the absolute pressure inside vessel is 19.14 lbf/in^2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6:pg-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8\n", + "#calculating pressure\n", + "\n", + "dg=750 #density of gaasoline in kg/m^3\n", + "dR=1206 #density of R-134a in kg/m^3\n", + "H=7.5 #height of storage tank in metres\n", + "g=9.807 #acc. due to gravity in m/s^2\n", + "dP1=dg*g*H/1000 #in kPa\n", + "Ptop1=101 #atmospheric pressure in kPa\n", + "P1=dP1+Ptop1\n", + "print\"hence,pressure at the bottom of storage tank if fluid is gasoline is\",round(P1,1),\"kPa\" \n", + "dP2=dR*g*H/1000 #in kPa\n", + "Ptop2=1000 #top surface pressure in kPa\n", + "P2=dP2+Ptop2\n", + "print\"\\n hence, pressure at the bottom of storage tank if liquid is R-134a is\",round(P2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,pressure at the bottom of storage tank if fluid is gasoline is 156.2 kPa\n", + "\n", + " hence, pressure at the bottom of storage tank if liquid is R-134a is 1089.0 kPa\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7:pg-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#calculating balancing force\n", + "\n", + "Po=100#Outside atmospheric pressure in kPa\n", + "F1=25 #net force on the smallest piston in kN\n", + "A1=0.01 #cross sectional area of lower piston in m^2\n", + "P1=Po+F1/A1 #fluid pressure in kPa\n", + "d=900 #density of fluid in kg/m^3\n", + "g=9.81 #acc. due to gravity in m/s^2\n", + "H=6 #height of second piston in comparison to first one in m\n", + "P2=P1-d*g*H/1000 #pressure at higher elevation on piston 2 in kPa\n", + "A2=0.05 #cross sectional area of higher piston in m^3\n", + "F2=(P2-Po)*A2 #balancing force on second piston in kN\n", + "print\"\\n hence, balancing force on second larger piston is\",round(F2,1),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, balancing force on second larger piston is 122.4 N\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter3_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter3_6.ipynb new file mode 100755 index 00000000..64998280 --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter3_6.ipynb @@ -0,0 +1,571 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b6e51b20af9aaa1b32972245e7dbe7cc42b3ed40e5f3cbf6db8837625a12aebc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3:PROPERTIES OF A PURE SUBSTANCE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1:pg-57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#determinig the phase of water\n", + "\n", + "print\"from the table,we find that at 120C,saturation pressure of water is 198.5 kPa.But here we have pressure of 500 kPa.hence,water exists as a compressed liquid here.\"\n", + "print\"also at 120C,vf=0.00106 kg/m^3 and vg=0.89186 kg/m^3.given v=0.5 m^3/kg i.e. vfvg,so the state is superheated vapor\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "from the table,we find that at 30C,saturation pressure of ammonia is 1167 kPa.But here we have pressure of 1000 kPa.hence,ammonia exists in superheated vapor state.\n", + "for R-22 at 200 kPa,vg=0.1119 kg/m^3.given v=0.15 m^3/kg i.e. v>vg,so the state is superheated vapor\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3:pg-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#determining the quality and specific volume\n", + "\n", + "v1=0.5 #given specific volume in m^3/kg\n", + "vf=0.001073 #specific volume when only liquid phase is present in m^3/kg\n", + "vfg=0.60475 #in m^3/kg\n", + "x=(v1-vf)/vfg #quality\n", + "print\"For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is\",round(x,3)\n", + "\n", + "v2=1 #given specific volume in m^3/kg\n", + "\n", + " # using the method of interplotation\n", + "T=((400-300)*(1.0-0.8753))/(1.0315-0.8753)+300 #temperature of the water\n", + "print\"For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is\",round(T,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is 0.825\n", + "For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is 379.8\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4:pg-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #example 4\n", + "#percentage of vapor \n", + "\n", + "vliq=0.1 #volume of saturated liquid in m^3\n", + "vf=0.000843 #in m^3/kg\n", + "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n", + "vg=0.02671 #in m^3/kg\n", + "mliq=vliq/vf #mass of liquid in kg \n", + "mvap=vvap/vg #mass of vapor in kg\n", + "m=mliq+mvap #total mass in kg\n", + "x=mvap*100/m #percentage of vapor on mass basis\n", + "print\"hence,% vapor on mass basis is\",round(x,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,% vapor on mass basis is 22.1 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4E:pg-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #example 5\n", + "#percentage of vapor \n", + "\n", + "vliq=0.1 #volume of saturated liquid in ft^3\n", + "vf=0.0136 #in ft^3/lbm\n", + "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n", + "vg=0.4009 #in ft^3/lbm\n", + "mliq=vliq/vf #mass of liquid in lbm \n", + "mvap=vvap/vg #mass of vapor in lbm\n", + "m=mliq+mvap #total mass in lbm\n", + "x=mvap*100/m #percentage of vapor on mass basis\n", + "print\"hence,% vapor on mass basis is\",round(x,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,% vapor on mass basis is 23.4 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5:pg-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#calculating pressure after heat addition\n", + "\n", + "v1=0.14922 #specific volume of sautrated ammonia in m^3/kg\n", + "print\"Since the volume does not change during the process,the specific volume remains constant.therefore\"\n", + "v2=v1 #in m^3/kg\n", + "print\"Since vg at 40C is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\"\n", + "P2=945 #final pressure in kPa\n", + "print\"hence,the final pressure is 945 kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the volume does not change during the process,the specific volume remains constant.therefore\n", + "Since vg at 40C is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\n", + "hence,the final pressure is 945 kPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5E:pg-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#calculating pressure after heat addition\n", + "\n", + "v1=2.311 #specific volume of sautrated ammonia in ft^3/lbm\n", + "print\"Since the volume does not change during the process,the specific volume remains constant.therefore\"\n", + "v2=v1 #in ft^3/lbm\n", + "print\"Since vg at 120f is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\"\n", + "P2=145 #final pressure in lbf/in^2\n", + "print\"hence,the final pressure is 145 lbf/in^2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the volume does not change during the process,the specific volume remains constant.therefore\n", + "Since vg at 120f is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\n", + "hence,the final pressure is 145 lbf/in^2\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6:pg-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#Determinig the missing property\n", + "\n", + "T1=273-53.2 #given temperature in K\n", + "P1=600 #given pressure in kPa\n", + "print\"This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\"\n", + "T2=100 #given temp. in K\n", + "v2=0.008 #given specific volume in m^3/kg\n", + "vf=0.001452 #in m^3/kg\n", + "vg=0.0312 #in m^3/kg\n", + "Psat=779.2 #saturation pressure in kPa\n", + "vfg=vg-vf #in m^3/kg\n", + "x=(v2-vf)/vfg #quality\n", + "print\"\\n hence, the pressure is\",round(Psat,1),\"kPa\"\n", + "print\"\\n and quality is\",round(x,4),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\n", + "\n", + " hence, the pressure is 779.2 kPa\n", + "\n", + " and quality is 0.2201 %\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7:pg-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7\n", + "#determining the pressure of water\n", + "\n", + "vg=0.12736 #specific volume in m^3/kg for water at 200C\n", + "v=0.4 #specific volume in m^3/kg\n", + "P1=500 #in kPa\n", + "v1=0.42492 #specific volume at P1 in m^3/kg\n", + "P2=600 #in kPa\n", + "v2=0.35202 #specific volume at P2 in m^3/kg\n", + "P=P1+(P2-P1)*(v-v1)/(v2-v1) #calculating pressure by interplotation\n", + "print \"hence,the pressure of water is\",round(P,1),\" kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " hence,the pressure of water is 534.2 kPa\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8:pg-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8\n", + "#calculating mass of air\n", + "\n", + "P=100 #pressure in kPa\n", + "V=6*10*4 #volume of room in m^3\n", + "R=0.287 #in kN-m/kg-K\n", + "T=25 #temperature in Celsius\n", + "m=P*V/(R*(T+273.1)) #mass of air contained in room\n", + "print\"\\n hence, mass of air contained in room is\",round(m,1),\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, mass of air contained in room is 280.5 kg\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9:pg-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#calculating pressure inside tank\n", + "\n", + "V=0.5 #volumr of tank in m^3\n", + "m=10 #mass of ideal gas in kg\n", + "T=25 #temperature of tank in Celsius\n", + "M=24 #molecular mass of gas in kg/kmol\n", + "Ru=8.3145 #universal gas constant in kN-m/kmol-K\n", + "R=Ru/M #gas constant for given ideal gas in kN-m/kg-K\n", + "P=m*R*(T+273.2)/V #pressure inside tank\n", + "print\"\\n hence,pressure inside tank is\",round(P),\"kpa\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,pressure inside tank is 2066.0 kpa\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.10:pg-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10\n", + "#mass flow rate\n", + "\n", + "dt=185 #time period in seconds over which there is incrrease in volume \n", + "dV=0.75 #increase in volume in 0.75 in m^3\n", + "V=dV/dt #volume flow rate in m^3/s\n", + "P=105 #pressure inside gas bell kPa\n", + "T=21 #temperature in celsius\n", + "R=0.1889 #ideal gas constant in kJ/kg-K\n", + "m=P*V/(R*(T+273.15)) #mass flow rate of the flow in kg/s\n", + "print\"\\n hence,mass flow rate is\",round(m,5),\"kg/s\"\n", + "print\"\\n and volume flow rate is\",round(V,5),\"m^3/s\"\n", + "#The answer of volume flow rate in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,mass flow rate is 0.00766 kg/s\n", + "\n", + " and volume flow rate is 0.00405 m^3/s\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.12:pg-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12\n", + "#determining specific using diffenet laws\n", + "\n", + "T=100.0 #given temp.in 100 celsius\n", + "P=3.0 #given pressure in MPa\n", + "v1=0.0065 #specific volume in m^3/kg using table\n", + "print\"\\n hence,the specific volume for R-134a using R-134a tables is\",round(v1,3),\"m^3/kg\"\n", + "M=102.3 #molecular mass in kg\n", + "R=8.3145 #in kJ/K\n", + "Ru=R/M #in kJ/K-kg\n", + "v2=Ru*(T+273)/(P*1000) #specific volume assuming R-134a to be ideal gas in m^3/kg\n", + "print\"\\n hence,the specific volume for R-134a using R-134a the ideal gas laws is\",round(v2,5),\"m^3/kg\"\n", + "Tr=373.2/374.2 #reduced temperature using generalized chart\n", + "Pr=3.0/4.06 #reduced pressure using generalized chart\n", + "Z=0.67 #compressibility factor \n", + "v3=Z*v2 # specific volume using generalized chart in m^3/kg\n", + "print\"\\n hence,the specific volume for R-134a using the generalized chart is\",round(v3,5),\"m^3/kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the specific volume for R-134a using R-134a tables is 0.006 m^3/kg\n", + "\n", + " hence,the specific volume for R-134a using R-134a the ideal gas laws is 0.01011 m^3/kg\n", + "\n", + " hence,the specific volume for R-134a using the generalized chart is 0.00677 m^3/kg\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.13:pg-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 13\n", + "#calculating mass of gas\n", + "\n", + "Pc=4250 #critical pressure of propane in kPa\n", + "Tc=369.8 #critical temperature in K\n", + "T=15 #temperature of propane in celsius\n", + "Tr=T/Tc #reduced temperature\n", + "Prsat=0.2 # reduced pressure \n", + "P=Prsat*Pc #pressure in kPa\n", + "x=0.1 #given quality\n", + "Zf=0.035 #from graph\n", + "Zg=0.83 #from graph\n", + "Z=(1-x)*Zf+x*Zg #overall compressibility factor\n", + "V=0.1 #volume of steel bottle in m^3\n", + "R=0.1887 #in kPa-m^3/kg-K\n", + "m=P*V/(Z*R*(T+273)) #total propane mass in kg\n", + "print\"\\n hence,the total propane mass is\",round(m,2),\"kg\"\n", + "print\"\\n and pressure is\",round(P,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the total propane mass is 13.66 kg\n", + "\n", + " and pressure is 850.0 kPa\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter4_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter4_6.ipynb new file mode 100755 index 00000000..eed9d20a --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter4_6.ipynb @@ -0,0 +1,198 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da3557673ab31ece618ad10f5b0d3ef78112ff36bd0b260e508d99211060a1c9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4:WORK AND HEAT" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1:PG-96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#work done during different processes\n", + "import math\n", + "\n", + "P1=200 #initial pressure inside cylinder in kPa\n", + "V2=0.1 #in m^3\n", + "V1=0.04 #initial volume of gas in m^3\n", + "\n", + "W1=P1*(V2-V1) #work done in isobaric process in kJ\n", + "print\"\\n hence,the work done during the isobaric process is\",round(W1,2),\"kJ. \\n\"\n", + "\n", + "W2=P1*V1*math.log(V2/V1) #work done in isothermal process in kJ\n", + "print\"\\n hence,the work done in isothermal process is\",round(W2,2),\"kJ. \\n\"\n", + "\n", + "P2=P1*(V1/V2)**(1.3) #final pressure according to the given process\n", + "W3=(P2*V2-P1*V1)/(1-1.3)\n", + "print\"\\n hence,the work done during the described process is\",round(W3,2),\"kJ. \\n\"\n", + "\n", + "W4=0 #work done in isochoric process\n", + "print\"\\n hence,the work done in the isochoric process is\",round(W4,3),\"kJ. \\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the work done during the isobaric process is 12.0 kJ. \n", + "\n", + "\n", + " hence,the work done in isothermal process is 7.33 kJ. \n", + "\n", + "\n", + " hence,the work done during the described process is 6.41 kJ. \n", + "\n", + "\n", + " hence,the work done in the isochoric process is 0.0 kJ. \n", + "\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3:PG-99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "\n", + "#work produced\n", + "\n", + "Psat=190.2 #in kPa\n", + "P1=Psat #saturation pressure in state 1\n", + "vf=0.001504 #in m^3/kg\n", + "vfg=0.62184 #in m^3/kg\n", + "x1=0.25 #quality\n", + "v1=vf+x1*vfg #specific volume at state 1 in m^3/kg\n", + "v2=1.41*v1 #specific volume at state 2 in m^3/kg\n", + "P2=600 #pressure in state 2 in kPa from Table B.2.2\n", + "m=0.5 #mass of ammonia in kg\n", + "W=m*(P1+P2)*(v2-v1)/2 #woork produced by ammonia in kJ\n", + "print \"The final pressure is\",round(P2),\"kPa\\n\"\n", + "print \"hence,work produced by ammonia is\",round(W,2),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure is 600.0 kPa\n", + "\n", + "hence,work produced by ammonia is 12.71 kJ\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4:PG-100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "\n", + "#calculating work done\n", + "\n", + "v1=0.35411 #specific volume at state 1 in m^3/kg\n", + "v2=v1/2 \n", + "m=0.1 #mass of water in kg\n", + "P1=1000 #pressure inside cylinder in kPa\n", + "W=m*P1*(v2-v1) #in kJ\n", + "print \"the work in the overall process is\",round(W,1),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the work in the overall process is -17.7 kJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.7:PG-108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7\n", + "#heat transfer\n", + "k=1.4 #conductivity of glass pane in W/m-K\n", + "A=0.5 #total surface area of glass pane\n", + "dx=0.005 #thickness of glasspane in m\n", + "dT1=20-12.1 #temperature difference between room air and outer glass surface temperature in celsius\n", + "Q=-k*A*dT1/dx #conduction through glass slab in W\n", + "h=100 #convective heat transfer coefficient in W/m^2-K \n", + "dT=12.1-(-10) #temperature difference between warm room and colder ambient in celsius\n", + "Q2=h*A*dT #heat transfer in convective layer in W\n", + "#result\n", + "print \"the rate of heat transfer in the glass and convective layer is\",round(Q2),\"kW.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer in the glass and convective layer is 1105.0 kW.\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter5_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter5_6.ipynb new file mode 100755 index 00000000..5a9734bc --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter5_6.ipynb @@ -0,0 +1,635 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bc9fbdf4ecee4bce9770355a576adf487ef4df6d34bad14ada42e8383ea01d91" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter5:THE FIRST LAW OF THERMODYNAMICS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1:pg-131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#calculating height\n", + "\n", + "m=1100 #mass of car in kg\n", + "ke=400 #kinetic energy of car in kJ\n", + "V=(2*ke*1000/m)**0.5 #velocity of car in m/s\n", + "g=9.807 #acc. due to gravity in m/s^2\n", + "H=ke*1000/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", + "print\"hence,the car should be raised to a height is\",round(H,1),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,the car should be raised to a height is 37.1 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1E:pg-132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1E\n", + "#calculating height\n", + "\n", + "m=2400 #mass of car in lbm\n", + "ke=400 #kinetic energy of car in Btu\n", + "V=(2*ke*778.17*32.174/m)**0.5 #velocity of car in ft/s\n", + "g=32.174 #acc. due to gravity in ft/s^2\n", + "H=ke*778.17*32.174/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", + "print\"hence,the car should be raised to a height is\",round(H,1),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,the car should be raised to a height is 129.7 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2:pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#change in internal energy\n", + "\n", + "W=-5090 #work input to paddle wheel in kJ\n", + "Q=-1500 #heat transfer from tank in kJ\n", + "dU=Q-W #change in internal energy in kJ\n", + "print\"hence,change in internal energy is\",round(dU),\"kj\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,change in internal energy is 3590.0 kj\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3:pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#analysis of energy transfer\n", + "\n", + "g=9.806 #acceleration due to gravity in m/s^2\n", + "m=10 #mass of stone in kg\n", + "H1=10.2 #initial height of stone above water in metres\n", + "H2=0 #final height in metres\n", + "dKE1=-m*g*(H2-H1) #change in kinetic energy when stone enters state 2 in J\n", + "dPE1=-1 #change in potential energy when stone enters state 2 in J\n", + "print\"\\n hence,when stone is \",round(dKE1),\"J\"\n", + "print\"\\n and change in potential energy is \",round(dPE1),\"J\"\n", + "dPE2=0 #change in potential energy when stone enters state 3 in JQ2=0 //no heat transfer when stone enters state 3 in J\n", + "W2=0 #no work done when stone enters state 3 in J\n", + "dKE2=-1 #change in kinetic energy when stone enters state 3\n", + "dU2=-dKE2 #change in internal energy when stone enters state 3 in J\n", + "print\"\\n hence,when stone has just come to rest in the bucket is \",round(dKE2),\"J\" \n", + "print\"\\n and dU is\",round(dU2),\"J\" \n", + "dKE3=0 #change in kinetic energy when stone enters state 4\n", + "dPE=0 #change in potential energy when stone enters state 4 in J\n", + "W3=0 #no work done when stone enters state 4 in J\n", + "dU3=-1 #change in internal energy when stone enters state 4 in J\n", + "Q3=dU3 #heat transfer when stone enters state 4 in J\n", + "print\"\\n hence,when stone has entered state 4 is\",round(dU3),\"J\" \n", + "print\"\\n and Q3 is \",round(Q3),\"J\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence,when stone is 1000.0 J\n", + "\n", + " and change in potential energy is -1.0 J\n", + "\n", + " hence,when stone has just come to rest in the bucket is -1.0 J\n", + "\n", + " and dU is 1.0 J\n", + "\n", + " hence,when stone has entered state 4 is -1.0 J\n", + "\n", + " and Q3 is -1.0 J\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4:pg-136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#Determinig the missing properties \n", + "\n", + "T1=300 #given temp. in Celsius\n", + "u1=2780 #given specific internal enrgy in kJ/kg\n", + "print\"From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\" #hiven pressure in kPa\n", + "u2=2000 #given specific intrernal energy in kJ/kg\n", + "print\"at P=2000 kPa\"\n", + "uf=906.4 #in kJ/kg\n", + "ug=2600.3 #in kJ/kg \n", + "x2=(u2-906.4)/(ug-uf) \n", + "print\"Also, under the given conditions\"\n", + "vf=0.001177 #in m^3/kg \n", + "vg=0.099627 #in m^3/kg\n", + "v2=vf+x2*(vg-vf)#Specific volume for water in m^3/kg\n", + "print\"\\n hence,specific volume for water is \",round(v2,5),\"m^3/kg\" \n", + "print\"\\n Therefore ,this state is \",round(x2,4),\"N\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\n", + "at P=2000 kPa\n", + "Also, under the given conditions\n", + "\n", + " hence,specific volume for water is 0.06474 m^3/kg\n", + "\n", + " Therefore ,this state is 0.6456 N\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5:pg-138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#calculating heat transfer for the given process\n", + "\n", + "Vliq=0.05 #volume of saturated liquid in m^3\n", + "vf=0.001043 #in m^3/kg\n", + "Vvap=4.95 #volume of saturated water vapour in m^3\n", + "vg=1.6940 #in m^3/kg\n", + "m1liq=Vliq/vf #mass of liquid in kg\n", + "m1liq=round(m1liq,2)\n", + "m1vap=Vvap/vg #mass of vapors in kg\n", + "m1vap=round(m1vap,2)\n", + "u1liq=417.36 #specific internal energy of liquid in kJ/kg\n", + "u1vap=2506.1 #specific internal energy of vapors in kJ/kg\n", + "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in kJ\n", + "m=m1liq+m1vap #total mass in kg\n", + "V=5.0 #total volume in m^3\n", + "v2=V/m #final specific volume in m^3/kg\n", + "print\"by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\"\n", + "u2=2600.5 #specific internal energy at final state in kJ/kg\n", + "U2=m*u2 #internal energy at final state in kJ\n", + "Q=U2-U1 #heat transfer for the process in kJ\n", + "print\"\\n hence,heat transfer for the process is\",round(Q),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\n", + "\n", + " hence,heat transfer for the process is 104935.0 kJ\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5E:pg-140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5E\n", + "#calculating heat transfer for the given process\n", + "\n", + "Vliq=1 #volume of saturated liquid in ft^3\n", + "vf=0.01672 #in ft^3/lbm\n", + "Vvap=99 #volume of saturated water vapour in m^3\n", + "vg=26.80 #in ft^3/lbm\n", + "m1liq=Vliq/vf #mass of liquid in lbm\n", + "m1liq=round(m1liq,2)\n", + "m1vap=Vvap/vg #mass of vapors in lbm\n", + "m1vap=round(m1vap,2)\n", + "u1liq=180.1 #specific internal energy of liquid in Btu/lbm\n", + "u1vap=1077.6 #specific internal energy of vapors in Btu/lbm\n", + "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in Btu\n", + "U1=round(U1)\n", + "m=m1liq+m1vap #total mass in lbm\n", + "V=100.0 #total volume in ft^3\n", + "v2=V/m #final specific volume in ft^3/lbm\n", + "print\"by interplotation we find that for steam, if vg=1.575 ft^3/lbm then pressure is 294 lbf/in^2\"\n", + "u2=1117.0 #specific internal energy at final state in Btu/lbm\n", + "U2=m*u2 #internal energy at final state in Btu\n", + "U2=round(U2)\n", + "Q=U2-U1 #heat transfer for the process in Btu\n", + "print\"\\n hence,heat transfer for the process is\",round(Q),\"Btu\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "by interplotation we find that for steam, if vg=1.575 ft^3/lbm then pressure is 294 lbf/in^2\n", + "\n", + " hence,heat transfer for the process is 56182.0 Btu\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.6:pg-143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#calculating work and heat transfer for the process\n", + "\n", + "V1=0.1 #volume of cylinder in m^3\n", + "m=0.5 #mass of steam in kg\n", + "v1=V1/m #specific volume of steam in m^3/kg\n", + "vf=0.001084 #m^3/kg\n", + "vfg=0.4614 #m^3/kg\n", + "x1=(v1-vf)/vfg #quality\n", + "hf=604.74 #kJ/kg\n", + "hfg=2133.8#kJ/kg\n", + "h2=3066.8 #final specific heat enthalpy in kJ/kg\n", + "h1=hf+x1*hfg #initial specific enthalpy in kJ/kg\n", + "Q=m*(h2-h1) #heat transfer for this process in kJ\n", + "P=400 #pressure inside cylinder in kPa\n", + "v2=0.6548 #specific enthalpy in m^3/kg\n", + "W=m*P*(v2-v1) #work done for the process in kJ\n", + "print\"\\n hence, work done for the process is\",round(W),\"kJ\" \n", + "print\"\\n and heat transfer is \",round(Q,1),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, work done for the process is 91.0 kJ\n", + "\n", + " and heat transfer is 771.1 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.7:pg-144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# example 7\n", + "#calculating work and heat transfer for the process\n", + "V1=0.010 #volume of cylinder in m^3\n", + "V2=0.040 # m^3\n", + "P1=573 #kPa\n", + "v1=0.03606 #specific volume of steam in m^3/kg\n", + "u1=389.2 #kJ/kg\n", + "m=V1/v1#mass of steam in kg\n", + "v2=v1*(V2/V1)\n", + "P2=163 #kPa\n", + "u2=395.8 # kJ/kg\n", + "W=8 # kJ\n", + "Q2=m*(u2-u1)+W\n", + "u3=383.4#kJ/kg\n", + "W2=m*(u1-u3)#kJ\n", + "print\"\\n and heat transfer is \",round(Q2,2),\"kJ\" \n", + "print\"\\n hence, work done for the process is\",round(W2,1),\"kJ\" \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " and heat transfer is 9.83 kJ\n", + "\n", + " hence, work done for the process is 1.6 kJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.8:pg-151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8\n", + "#calculating change in enthalpy\n", + "import math\n", + "\n", + "h1=273.2 #specific heat enthalpy for oxygen at 300 K\n", + "h2=1540.2 #specific heat enthalpy for oxygen at 1500 K\n", + "T1=300 #initial temperature in K\n", + "T2=1500 #final temparature in K\n", + "\n", + "dh1=h2-h1 #this change in specific heat enthalpy is calculated using ideal gas tables \n", + "dh3=0.922*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n", + "dh4=1.0767*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n", + "print\"\\n Hence,change in specific heat enthalpy if ideal gas tables are used is \",round(dh1,1),\"kJ/kg\"\n", + "print\"\\n if specific heat is assumed to be constant and using its value at T1 is\",round(dh3,1),\"kJ/kg\"\n", + "print\"\\n if specific heat is assumed to be constant at its value at (T1+T2)/2 is\",round(dh4,1),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Hence,change in specific heat enthalpy if ideal gas tables are used is 1267.0 kJ/kg\n", + "\n", + " if specific heat is assumed to be constant and using its value at T1 is 1106.4 kJ/kg\n", + "\n", + " if specific heat is assumed to be constant at its value at (T1+T2)/2 is 1292.0 kJ/kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.9:pg-152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#determining amount of heat transfer\n", + "\n", + "P=150 #pressure of nitrogen in cylinder in kPa\n", + "V=0.1 #initial volume of cylinder in m^3\n", + "T1=25 #initial temperature of nitrogen in celsius\n", + "T2=150 #final tempareture of nitrogen in celsius\n", + "R=0.2968 #in kJ/kg-K\n", + "m=P*V/(R*(T1+273)) #mass of nitrogen in kg\n", + "Cv=0.745 #constant volume specific heat for nitrogen in kJ/kg-K\n", + "W=-20 #work done on nitrogen gas in kJ\n", + "Q=m*Cv*(T2-T1)+W #heat transfer during the process in kJ\n", + "print\"\\n hence,the heat transfer for the above process is\",round(Q,1),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the heat transfer for the above process is -4.2 kJ\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.9E:pg-153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9E\n", + "#determining amount of heat transfer\n", + "\n", + "P=20 #pressure of nitrogen in cylinder in lbf/in^2\n", + "V=2 #initial volume of cylinder in ft^3\n", + "T1=80 #initial temperature of nitrogen in F\n", + "T2=300 #final tempareture of nitrogen in F\n", + "R=55.15 #in ft*lbf/lbm-R\n", + "m=P*V*144/(R*(540)) #mass of nitrogen in lbm\n", + "Cv=0.177 #constant volume specific heat for nitrogen in Btu/lbm-R\n", + "W=-9.15 #work done on nitrogen gas in Btu\n", + "Q=m*Cv*(T2-T1)+W #heat transfer during the process in Btu\n", + "print\"\\n hence,the heat transfer for the above process is\",round(Q,2),\"Btu\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the heat transfer for the above process is -1.62 Btu\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.10:pg-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10\n", + "#calculating rate of increase of internal energy\n", + "\n", + "W=-12.8*20 #power consumed in J/s\n", + "Q=-10 #heat transfer rate from battery in J/s\n", + "r=Q-W #rate of increase of internal energy\n", + "print\"\\n hence,the rate of increase of internal energy is\",round(r),\"J/s\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the rate of increase of internal energy is 246.0 J/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.11:pg-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11\n", + "#rate of change of temperature\n", + "\n", + "Q=1500.0 #power produced by burning wood in J/s\n", + "mair=1 #mass of air in kg\n", + "mwood=5 #mass of soft pine wood in kg \n", + "miron=25 #mass of cast iron in kg\n", + "Cvair=0.717 #constant volume specific heat for air in kJ/kg\n", + "Cwood=1.38 #constant volume specific heat for wood in kJ/kg\n", + "Ciron=0.42 #constant volume specific heat for iron in kJ/kg\n", + "dT=75-20 #increase in temperature in Celsius\n", + "T=(Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) #rate of change of temperature in K/s\n", + "dt=(dT/T)/60 #in minutes\n", + "print\" hence,the rate of change of temperature is\",round(T,4),\"k/s\" \n", + "print\" and time taken to reach a temperature of T is\",round(dt),\"min\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " hence,the rate of change of temperature is 0.0828 k/s\n", + " and time taken to reach a temperature of T is 11.0 min\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter6_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter6_6.ipynb new file mode 100755 index 00000000..953e821b --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter6_6.ipynb @@ -0,0 +1,652 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c03e579abb4dafb7ea55c1a7f66b6338546355647f3c3d21afe4e72021a3ad5f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6:FIRST-LAW ANALYSIS FOR A CONTROL VOLUME" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1:pg-182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#calculating mass flow rate in kg/s\n", + "import math\n", + "R=0.287 #in kJ/kg-K\n", + "T=25 #temperature in celsius\n", + "P=150 #pressure in kPa\n", + "v=R*(T+273.15)/P #specific volume in m^3/kg\n", + "D=0.2 #diameter of pipe in metre\n", + "A=math.pi*D**2/4 #cross sectional area in m^2\n", + "V=0.1 #velocity of air in m/s\n", + "m=V*A/v #mass flow rate in kg/s\n", + "print\"\\n hence,the mass flow rate is\",round(m,4),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the mass flow rate is 0.0055 kg/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2:pg-184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#work done for adding the fluid\n", + "\n", + "P=600 #pressure in kPa\n", + "m=1 #in kg\n", + "v=0.001 #specific volume in m^3/kg\n", + "W=P*m*v #necessary work in kJ for adding the fluid \n", + "print\" \\n hence,the work involved in this process is\",round(W,4),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence,the work involved in this process is 0.6 kJ\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3:pg-188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#rate of flow of water\n", + "\n", + "hir=441.89 #in kJ/kg for refrigerant using steam table \n", + "her=249.10 #in kJ/kg for refrigerant using steam table\n", + "hiw=42 #in kJ/kg for water using steam table\n", + "hew=83.95 #in kJ/kg for water using steam table\n", + "mr=0.2 #the rate at which refrigerant enters the condenser in kg/s\n", + "mw=mr*(hir-her)/(hew-hiw) #rate of flow of water in kg/s\n", + "print\"\\n hence,the rate at which cooling water flows thorugh the condenser is\",round(mw,3),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the rate at which cooling water flows thorugh the condenser is 0.919 kg/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4:pg-190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#determining quality of steam\n", + "\n", + "hi=2850.1 #initial specific heat enthalpy for steam in kJ/kg\n", + "Vi=50 #initial velocity of steam in m/s\n", + "Ve=600 #final velocity of steam in m/s\n", + "he=hi+Vi**2/(2*1000)-Ve**2/(2*1000) #final specific heat enthalpy for steam in kJ/kg\n", + "hf=467.1 #at final state in kJ/kg\n", + "hfg=2226.5 #at final state in kJ/kg\n", + "xe=(he-hf)/hfg #quality of steam in final state\n", + "print\" \\n hence, the quality is\",round(xe,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence, the quality is 0.99\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4E:pg-191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4E\n", + "#determining quality of steam\n", + "\n", + "hi=1227.5 #initial specific heat enthalpy for steam in Btu/lbm\n", + "Vi=200 #initial velocity of steam in ft/s\n", + "Ve=2000 #final velocity of steam in ft/s\n", + "he=hi+Vi**2/(2*32.17*778)-Ve**2/(2*32.17*778) #final specific heat enthalpy for steam in Btu/lbm\n", + "hf=198.31 #at final state in Btu/lbm\n", + "hfg=958.81 #at final state in Btu/lbm\n", + "xe=(he-hf)/hfg #quality of steam in final state\n", + "print\" \\n hence, the quality is\",round(xe,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence, the quality is 0.99\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5:pg-193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#quality of ammonia leaving expansion valve\n", + "\n", + "hi=346.8 #specific heat enthalpy for ammonia at initial state in kJ/kg\n", + "he=hi #specific heat enthalpy for ammonia at final state will be equal that at initial state because it is a throttling process\n", + "hf=134.4 #at final state in kJ/kg\n", + "hfg=1296.4#at final state in kJ/kg\n", + "xe=(he-hf)*100/hfg #quality at final state\n", + "print\"\\n hence,quality of the ammonia leaving the expansion valve is\",round(xe,2),\"%\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,quality of the ammonia leaving the expansion valve is 16.38 %\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6:pg-194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#power output of turbine in kW\n", + "\n", + "hi=3137 #initial specific heat of enthalpy in kJ/kg\n", + "he=2675.5 #final specific heat of enthalpy in kJ/kg\n", + "Vi=50.0 #initial velocity of steam in m/s\n", + "Ve=100 #final velocity of steam in m/s\n", + "Zi=6 #height of inlet conditions in metres\n", + "Ze=3 #height of exit conditions in metres\n", + "m=1.5 #mass flow rate of steam in kg/s\n", + "g=9.8066 #acc. due to gravity in m/s^2\n", + "Qcv=-8.5 #heat transfer rate from turbine in kW\n", + "Wcv=Qcv+m*(hi+Vi**2/(2*1000)+g*Zi/1000)-m*(he+Ve**2/(2*1000)+g*Ze/1000) #power output of turbine in kW\n", + "print\"\\n hence,the power output of the turbine is\",round(Wcv,1),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the power output of the turbine is 678.2 kW\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.7:pg-196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7\n", + "#heat transfer rate in aftercooler\n", + "\n", + "V1=0 #we assume initial velocity to be zero because its given that it enters with a low velocity\n", + "V2=25.0 #final velocity with which carbon dioxide exits in m/s\n", + "h2=401.52 #final specific enthalpy of heat when carbon dioxide exits in kJ/kg\n", + "h1=198 #initial specific enthalpy of heat in kJ/kg\n", + "w=h1-h2-V2**2/(2*1000) #in kJ/kg\n", + "Wc=-50 #power input to the compressor in kW\n", + "m=Wc/w #mass flow rate of carbon dioxide in kg/s\n", + "h3=257.9 #final specific enthalpy of heat when carbon dioxide flows into a constant pressure aftercooler\n", + "Qcool=-m*(h3-h2) #heat transfer rate in the aftercooler in kW\n", + "print\" \\n hence,heat transfer rate in the aftercooler is\",round(Qcool,1),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence,heat transfer rate in the aftercooler is 35.2 kW\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.8:pg-197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8\n", + "#Required pump work\n", + "\n", + "m=1.5 #mass flow rate of water in kg/s\n", + "g=9.807 #acceleration due to gravity in m/s^2\n", + "Zin=-15 #depth of water pump in well in metres\n", + "Zex=0 #in metres\n", + "v=0.001001 #specific volume in m^3/kg\n", + "Pex=400+101.3 #exit pressure in kPa\n", + "Pin=90 #in kPa\n", + "W=m*(g*(Zin-Zex)*0.001-(Pex-Pin)*v) #power input in kW\n", + "print\" \\n Hence, the pump requires power of input is\",-round(W,2),\"kW\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " Hence, the pump requires power of input is 0.84 kW\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.9:pg-198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#heat tranfer in simple steam power plant\n", + "\n", + "h1=3023.5 #specific heat of enthalpy of steam leaving boiler in kJ/kg\n", + "h2=3002.5 #specific heat of enthalpy of steam entering turbine in kJ/kg\n", + "x=0.9 #quality of steam entering condenser\n", + "hf=226 #in kJ/kg\n", + "hfg=2373.1 #in kJ/kg\n", + "h3=hf+x*hfg #specific heat of enthalpy of steam entering condenser in kJ/kg\n", + "h4=188.5 #specific heat of enthalpy of steam entering pump in kJ/kg\n", + "q12=h2-h1 #heat transfer in line between boiler and turbine in kJ/kg\n", + "w23=h2-h3 #turbine work in kJ/kg\n", + "q34=h4-h3 #heat transfer in condenser\n", + "w45=-4 #pump work in kJ/kg\n", + "h5=h4-w45 #in kJ/kg\n", + "q51=h1-h5 #heat transfer in boiler in kJ/kg\n", + "print\"\\n hence, heat transfer in line between boiler and turbine is\",round(q12,1),\"kJ/kg\" \n", + "print\"\\n hence, turbine work is\",round(w23,1),\"kJ/kg\" \n", + "print\"\\n hence, heat transfer in condenser is \",round(q34,1),\"kJ/kg\" \n", + "print\"\\n hence, heat transfer in boiler is \",round(q51,1),\"kJ/kg\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, heat transfer in line between boiler and turbine is -21.0 kJ/kg\n", + "\n", + " hence, turbine work is 640.7 kJ/kg\n", + "\n", + " hence, heat transfer in condenser is -2173.3 kJ/kg\n", + "\n", + " hence, heat transfer in boiler is 2831.0 kJ/kg\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10:pg-200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10\n", + "#analysis of refrigerator\n", + "\n", + "hf4=167.4 #in kJ/kg\n", + "hfg4=215.6 #in kJ/kg\n", + "h3=241.8 #specific heat of enthalpy of R-134a entering expansion valve\n", + "h4=h3 #specific heat of enthalpy of R-134a leaving expansion valve\n", + "h1=387.2 #in kJ/kg\n", + "h2=435.1 #in kJ/kg\n", + "x4=(h3-hf4)/hfg4 #quality of R-134a at evaporator inlet\n", + "m=0.1 #mass flow rate in kg/s\n", + "Qevap=m*(h1-h4) #rate of heat transfer to the evaporator\n", + "Wcomp=-5 #power input to compressor in kW\n", + "Qcomp=m*(h2-h1)+Wcomp #rate of heat transfer from compressor\n", + "print\"\\n hence, the quality at the evaporator inlet is \",round(x4,3), \n", + "print\"\\n hence, the rate of heat transfer to the evaporator is \",round(Qevap,2),\n", + "print\"\\n hence, rate of heat transfer from the compressor is\",round(Qcomp,2), " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, the quality at the evaporator inlet is 0.345 \n", + " hence, the rate of heat transfer to the evaporator is 14.54 \n", + " hence, rate of heat transfer from the compressor is -0.21\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.11:pg-204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11\n", + "#Determining the final temperature of steam\n", + "\n", + "u2=3040.4 #final internal energy in kJ/kg\n", + "hi=u2 #in kJ/kg\n", + "P2=1.4 #final Pressure in MPa\n", + "print\"Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \"\n", + "T2=452 #final temperature in Celsius" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.12:pg-206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12\n", + "#Calculating mass flow of steam in tank\n", + "\n", + "V1=0.4 #initial volume fo tank in m^3\n", + "v1=0.5243 #initial specific volume in m^3/kg\n", + "h1=3040.4 #initial specific enthalpy in kJ/kg\n", + "u1=2548.9 #initial specific internal energy in kJ/kg\n", + "m1=V1/v1 #initial mass of steam in tank in kg\n", + "V2=0.4 #final volume in m^3\n", + "print\"let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\" \n", + "T2=342 #final temperature in Celsius\n", + "v2=0.1974 #final specific volume in m^3/kg\n", + "m2=V2/v2 #final mass of the steam in the tank in kg\n", + "m=m2-m1 #mass of steam that flowsinto the tank\n", + "print\" \\n Hence,mass of the steam that flows into the tank is\",round(m,3),\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\n", + " \n", + " Hence,mass of the steam that flows into the tank is 1.263 kg\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.13:pg-207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 13\n", + "#Calculating mass flow of steam in tank\n", + "\n", + "vf1=0.001725 #in m^3/kg\n", + "vf2=0.0016 #in m^3/kg\n", + "uf1=368.7 #in kJ/kg\n", + "uf2=226 #in kJ/kg\n", + "vg1=0.08313 #in m^3/kg\n", + "vfg2=0.20381\n", + "ug1=1341 #in kJ/kg\n", + "ufg2=1099.7 #in kJ/kg\n", + "Vf=1 #initial volume of liquid in m^3\n", + "Vg=1 #initial volume of vapor in m^3\n", + "mf1=Vf/vf1 #initial mass of liquid in kg\n", + "mg1=Vg/vg1 #initial mass of vapor in kg\n", + "m1=mf1+mg1 #initial mass of liquid in kg\n", + "he=1461.1 #in kJ/kg\n", + "V=2 #volume of tank in m^3\n", + "print\"m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\"\n", + "print\"Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\"\n", + "x2=((2*1461.1)-(2*226)-(0.00160*634706))/((634706*0.20381)+(2*1099.7)) #quality of ammonia\n", + "v2=0.00160+(0.20381*x2) #final specific volume in m^3/kg\n", + "m2=V/v2 #final mass of ammonia in kg\n", + "m=m1-m2 #mass of ammonia withdrawn\n", + "print\" \\n Hence,mass of ammonia withdrawn is\",round(m,1),\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\n", + "Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\n", + " \n", + " Hence,mass of ammonia withdrawn is 72.7 kg\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.13E:pg-209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 13E\n", + "#Calculating mass flow of steam in tank\n", + "\n", + "vf1=0.02747#in ft3/lbm\n", + "vf2=0.02564#in ft3/lbm\n", + "uf1=153.89#in Btu/lbm\n", + "uf2=97.16#in Btu/lbm\n", + "vg1=1.4168 #in ft^3/lbm\n", + "vfg2=3.2647#in ft^3/lbm\n", + "ug1=576.23#in Btu/lbm\n", + "ufg2=472.78#in Btu/lbm\n", + "Vf=25 #initial volume of liquid in ft^3\n", + "Vg=25 #initial volume of vapor in ft^3\n", + "mf1=Vf/vf1 #initial mass of liquid in lbm\n", + "mg1=Vg/vg1 #initial mass of vapor in lbm\n", + "m1=mf1+mg1 #initial mass of liquid in lbm\n", + "he=628 #in Btu/lbm\n", + "V=50 #volume of tank in ft^3\n", + "print\"m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.02564+3.2647*x2) and u2=uf2+x2*ufg2=97.16+3.2647*x2.\"\n", + "print\"Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\"\n", + "x2=((50*628)-(50*97.16)-(432391*0.02564))/((432391*3.2647)+(50*472.98)) #quality of ammonia\n", + "x2=round(x2,6)\n", + "v2=0.02564+(3.2647*x2) #final specific volume in ft^3/lbm\n", + "v2=round(v2,6)\n", + "m2=V/v2 #final mass of ammonia in lbm\n", + "m=m1-m2 #mass of ammonia withdrawn\n", + "print\" \\n Hence,mass of ammonia withdrawn is\",round(m,1),\"lbm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.02564+3.2647*x2) and u2=uf2+x2*ufg2=97.16+3.2647*x2.\n", + "Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\n", + " \n", + " Hence,mass of ammonia withdrawn is 105.3 lbm\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter7_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter7_6.ipynb new file mode 100755 index 00000000..02425dea --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter7_6.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a60a19bd48510a099eb4483e5176d858019753b734df1f9001e5af0e3bc7fc2e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter7:THE SECOND LAW OF THERMODYNAMICS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.1:pg-241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#rate of fuel consumption\n", + "\n", + "W=136*0.7355 #output of automobile engine in kW\n", + "neng=0.3 #thermal efficiency of automobile engine\n", + "Qh=W/neng #energy output of fuel in kW\n", + "Q1=Qh-W #total rate of energy rejected to the ambient\n", + "qh=35000.0 #energy output of fuel in kJ/kg\n", + "m=Qh/qh #rate of fuel consumption in kg/s\n", + "print\"\\n hence,total rate of energy rejected is\",round(Q1),\"kW\" \n", + "print\"\\n and rate of fuel consumption is\",round(m,4),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,total rate of energy rejected is 233.0 kW\n", + "\n", + " and rate of fuel consumption is 0.0095 kg/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.2:pg-243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#coefficient of performance of refrigerator\n", + "\n", + "Qh=400 #heat rejected to kitchen air in W\n", + "W=150.0 #electrical input power in W\n", + "Q1=Qh-W #rate of energy taken out to cold space in W\n", + "B=Ql/W #coefficicent of performnace of refrigerator\n", + "print\"\\n hence,rate of energy taken out of the cold space is\",round(Q1),\"W\"\n", + "print\"\\n and coefficient of performance of the refrigerator is\",round(B,2)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,rate of energy taken out of the cold space is 250.0 W\n", + "\n", + " and coefficient of performance of the refrigerator is 1.67\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.3:pg-256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "# temperature at which the pressure go to zero\n", + "\n", + "P1=110.9#pressur at the ice point in kPa\n", + "P2=151.5#pressure at the steam point in kPa\n", + "T1=0#in C\n", + "T2=100#in C\n", + "S=(P2-P1)/(T2-T1)#slope in kPa/C\n", + "T=T1-(P1/S)# absolute ideal gas temperature in C\n", + "print\"\\n hence,the absolute ideal gas temperature is\",round(T,2),\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the absolute ideal gas temperature is -273.15 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.4:pg-260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#comparison of ideal carnot heat engine with actual heat engine\n", + "\n", + "Qh=1000.0 #rate of heat transfer to heat engine in kW\n", + "W=450.0 #rate of production of work in kW\n", + "Ql=Qh-W #rate of heat rejected by heat engine in kW\n", + "nthermal=W/Qh #efficiency from the definition of efficiency\n", + "Tl=300 #temperature of surroundings in K\n", + "Th=550.0 #temperature of heat source in Celsius\n", + "ncarnot=1-Tl/(Th+273.15) #efficiency if heat engine is considered to be ideal carnot heat engine\n", + "W2=ncarnot*Qh #rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n", + "Q12=Qh-W2 #rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n", + "print\"\\n hence,energy discarded to the ambient surroundings iS\",round(Q12,4),\"kw\"\n", + "print\"\\n and the engine efficiency is\",round(ncarnot,4)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,energy discarded to the ambient surroundings iS 364.4536 kw\n", + "\n", + " and the engine efficiency is 0.6355\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.5:pg-261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#calculating required work\n", + "\n", + "Tl=24+273.15 #room temperature in Kelvins\n", + "Th=35+273.15 #atmospheric temperature in Kelvins\n", + "Ql=4 #rate of heat rejection from room\n", + "B=Tl/(Th-Tl) #coefficient of performance of air conditioner\n", + "W=Ql/B #required work in kW\n", + "print\"\\n hence,the magnitude of reqiured work is\",round(W,2),\"kw\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the magnitude of reqiured work is 0.15 kw\n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter8_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter8_6.ipynb new file mode 100755 index 00000000..dce4d1fa --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter8_6.ipynb @@ -0,0 +1,444 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:79711d3b5ce866eb594601c655e2c85bdace3e8f861ba88d25f2b6f7e8d8655f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter8:ENTROPY" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.1:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#coefficient of performance of refrigerator\n", + "\n", + "Th=60 #temperature at which heat is rejected from R-134a\n", + "Tl=0 #temperature at which heat is absorbed into the R-134a \n", + "s1=1.7262 #specific entropy at 0 Celsius\n", + "s2=s1 #process of state change from 1-2 is isentropic \n", + "s3=1.2857 #specific entropy at 60 celsius\n", + "s4=s3 #process of state change from 3-4 is isentropic\n", + "print\"if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\"\n", + "P2=1400+(1600-1400)*(1.7262-1.736)/(1.7135-1.736) #pressure after compression in kPa\n", + "B=(Th+273.15)/(Th-Tl) #coefficient of performance of refrigerator\n", + "print\" \\n hence,pressure after compression is \",round(P2,1),\"kPa\"\n", + "print\"\\n and coefficient of performance of refrigerator is\",round(B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\n", + " \n", + " hence,pressure after compression is 1487.1 kPa\n", + "\n", + " and coefficient of performance of refrigerator is 5.55\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2 \n", + "#heat transfer in a given process\n", + "\n", + "u1=87.94 #specific internal energy of R-12 at state 1 in kJ/kg\n", + "u2=276.44 #specific internal energy of R-12 at state 2 in kJ/kg\n", + "s1=0.3357 #specific entropy at state 1 in kJ/kg-K\n", + "s2=1.2108 #specific entropy at state 2 in kJ/kg-K\n", + "V=0.001 #volume of saturated liquid in m^3\n", + "v1=0.000923 #specific volume in m^3/kg\n", + "m=V/v1 #mass of saturated liquid in kg\n", + "T=20 #temperature of liquid in celsius\n", + "Q12=m*(T+273.15)*(s2-s1) #heat transfer in kJ to accomplish the process\n", + "W12=m*(u1-u2)+Q12 #work required to accomplish the process\n", + "print\" \\n hence,work required to accomplish the process is\",round(W12,1),\"KJ\"\n", + "print\" \\n and heat transfer is\",round(Q12,1),\"KJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence,work required to accomplish the process is 73.7 KJ\n", + " \n", + " and heat transfer is 277.9 KJ\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.3:pg-293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#entropy change\n", + "import math\n", + "C=4.184 # specific heat of water in kJ/kg-K\n", + "T1=20 #initial temperature of water in celsius\n", + "T2=90 #final temperature of water in celsius\n", + "dS1=C*math.log((T2+273.2)/(T1+273.2)) #change in entropy in kJ/kg-K\n", + "dS2=1.1925-0.2966 #in kJ/kg-K using steam tables\n", + "print\"\\n hence,change in entropy assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n", + "print\"\\n using steam table is\",round(dS2,4),\"KJ/kg-k\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,change in entropy assuming constant specific heat is 0.8958 KJ/kg-k\n", + "\n", + " using steam table is 0.8959 KJ/kg-k\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.4:pg-295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#entropy change with different assumptions\n", + "import math\n", + "T1=300 #initial temperature in kelvins\n", + "T2=1500 #final temperature in kelvins\n", + "P1=200.0 #initial pressure in kPa\n", + "P2=150.0 #final pressure in kPa\n", + "R=0.2598 # in kJ/kg-K\n", + "Cp=0.922 #specific heat in kJ/kg-K at constant pressure\n", + "dsT2=8.0649 #in kJ/kg-K\n", + "dsT1=6.4168 #in kJ/kg-K\n", + "dS1=dsT2-dsT1-R*math.log(P2/P1) #entropy change calculated using ideal gas tables\n", + "dS3=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat in kJ/kg-K\n", + "dS4=1.0767*math.log(T2/T1)+0.0747 #entropy change assuming specific heat is constant at its value at 990K\n", + "print\"\\n hence,change in entropy using ideal gas tables is\",round(dS1,4),\"KJ/kg-k\"\n", + "print\"\\n hence,change in entropy using the value of specific heat at 300K is\",round(dS3,4),\"KJ/kg-k\"\n", + "print\"\\n hence,change in entropy assuming specific heat is constant at its value at 900K is \",round(dS4,4),\"KJ/kg-k\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,change in entropy using ideal gas tables is 1.7228 KJ/kg-k\n", + "\n", + " hence,change in entropy using the value of specific heat at 300K is 1.5586 KJ/kg-k\n", + "\n", + " hence,change in entropy assuming specific heat is constant at its value at 900K is 1.8076 KJ/kg-k\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.5:pg-296\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#entropy change\n", + "import math\n", + "Cp=1.004 #specific heat at constant pressure in kJ/kg-K\n", + "R=0.287 #gas constant in kJ/kg-K\n", + "P1=400.0 #initial pressure in kPa\n", + "P2=300.0 #final pressure in kPa\n", + "T1=300 #initial temperature in K\n", + "T2=600 #final temperature in K\n", + "dS1=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat\n", + "s1=6.8693 #specific entropy at T1\n", + "s2=7.5764 #specific entropy at T2\n", + "dS2=s2-s1-R*math.log(P2/P1) #entropy change assuming variable specific heat\n", + "print\"\\n hence,entropy change assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n", + "print\"\\n and assuming variable specific heat is\",round(dS2,4),\"KJ/kg-k\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,entropy change assuming constant specific heat is 0.7785 KJ/kg-k\n", + "\n", + " and assuming variable specific heat is 0.7897 KJ/kg-k\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.6:pg-297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#work done by air\n", + "import math\n", + "T1=600 #initial temperature of air in K\n", + "P1=400.0 #intial pressure of air in kPa\n", + "P2=150.0 #final pressure in kPa\n", + "u1=435.10 #specific internal energy at temperature T1 in kJ/kg\n", + "sT1=7.5764 #specific entropy at temperature T1 in kJ/kg-K\n", + "R=0.287 #gas constant in kJ/kg-K\n", + "ds=0\n", + "sT2=ds+sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n", + "print\"we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\"\n", + "T2=457 #final temperature in K\n", + "u2=328.14 #specific internal energy at temperature T2 in kJ/kg\n", + "w=u1-u2 #work done by air in kJ/kg\n", + "print\"\\n hence,work done by air is\",round(w,4),\"KJ/kg\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\n", + "\n", + " hence,work done by air is 106.96 KJ/kg\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.7:pg-300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7\n", + "#work and heat transfer\n", + "\n", + "P2=500 #final pressure in cylinder in kPa\n", + "P1=100 #initial pressure in cylinder in kPa\n", + "T1=20+273.2 #initial temperature inside cylinder in Kelvins\n", + "n=1.3 \n", + "T2=(T1)*(P2/P1)**((n-1)/n) #final temperature inside cylinder in K\n", + "R=0.2968 #gas constant in kJ/kg-K\n", + "w12=R*(T2-T1)/(1-n) #work in kJ/kg\n", + "Cvo=0.745 #specific heat at constant volume in kJ/kg-K\n", + "q12=Cvo*(T2-T1)+w12 #heat transfer in kJ/kg\n", + "print\" \\n hence,work done is\",round(w12,2),\"KJ/kg\" \n", + "print\"\\n and heat transfer are\",round(q12,1),\"KJ/kg\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence,work done is -130.47 KJ/kg\n", + "\n", + " and heat transfer are -32.2 KJ/kg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.8:pg-308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#calculating increase in entropy\n", + "\n", + "m=1 #mass of saturated water vapour\n", + "sfg=6.0480 #in kJ/K\n", + "T=25 #temperature of surrounding air in celsius\n", + "dScm=-m*sfg #change in entropy of control mass in kJ/K\n", + "hfg=2257.0 #in kJ/kg\n", + "Qtosurroundings=m*hfg #heat transferred to surroundings in kJ\n", + "dSsurroundings=Qtosurroundings/(T+273.15) #in kJ/K\n", + "dSnet=dScm+dSsurroundings #net increase in entropy in kJ/K\n", + "print\" hence,net increase in entropy of water plus surroundings is \",round(dSnet,3),\"KJ/k\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " hence,net increase in entropy of water plus surroundings is 1.522 KJ/k\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.9:pg-309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#entropy generation\n", + "\n", + "Qout=1.0 #value of heat flux generated by 1kW of electric power\n", + "T=600.0 #temperature of hot wire surface in K\n", + "Sgen=Qout/T #entropy generation in kW/K\n", + "print\"\\n hence,entropy generation is\",round(Sgen,5),\"KW/k\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,entropy generation is 0.00167 KW/k\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.10:pg-310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10\n", + "#Determiining the entropy generated\n", + "\n", + "B=4.0#COP of air conditioner\n", + "W=10.0 #power input of air conditioner in kW\n", + "Qh=B*W #in kW\n", + "Ql=Qh-W #in kW\n", + "Thigh=323 #in Kelvin\n", + "Tlow=263 #in Kelvin\n", + "SgenHP=(Qh*1000/Thigh)-(Ql*1000/Tlow) #in W/K\n", + "Tl=281 # in K\n", + "Th=294 #in K\n", + "SgenCV1=Ql*1000/Tlow-Ql*1000/Tl #in W/K\n", + "SgenCV2=Qh*1000/Th-Qh*1000/Thigh #in W/K\n", + "SgenTOT=SgenCV1+SgenCV2+SgenHP #in W/K\n", + "print\" \\n Hence,Total entropy generated is\",round(SgenTOT,1),\"W/k\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " Hence,Total entropy generated is 29.3 W/k\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter9_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter9_6.ipynb new file mode 100755 index 00000000..db80c9d5 --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter9_6.ipynb @@ -0,0 +1,588 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:14f50faeadc2ed8de4732f59bac3e49ea9db1041eaf016b1692117fea4d3a511" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter9:SECOND-LAW ANALYSIS FOR A CONTROL VOLUME" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex9.1:pg-336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#work done by steam\n", + "\n", + "hi=3051.2 #initial specific heat of enthalpy of steam in kJ/kg\n", + "si=7.1228 #initial specific entropy of steam in kJ/kg-K\n", + "Pe=0.15 #final pressure in MPa\n", + "se=si #specific entropy in final state in kJ/kg-K\n", + "sf=1.4335 #in kJ/kg-K\n", + "sfg=5.7897 #in kJ/kg-K\n", + "vi=50.0 #velocity with which steam enters turbine in m/s\n", + "ve=200.0 #velocity with which steam leaves the turbine in m/s\n", + "xe=(se-sf)/sfg #quality of steam in final state\n", + "hf=467.1 #in kJ/kg\n", + "hfg=2226.5 #in kJ/kg\n", + "he=hf+xe*hfg #final specific heat of enthalpy of steam in kJ/kg\n", + "w=hi+vi**2/(2*1000)-he-ve**2/(2*1000) #work of steam for isentropic process in kJ/kg\n", + "print\"\\n hence, work per kilogram of steam for this isentropic process is\",round(w,1),\"KJ/kg\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, work per kilogram of steam for this isentropic process is 377.5 KJ/kg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2:pg-337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#exit velocity of steam from nozzle\n", + "\n", + "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n", + "si=7.1228 #initial specific entropy in kJ/kg-K\n", + "se=si #final specific entropy \n", + "Pe=0.3 #final pressure in MPa\n", + "print\"from steam table,various properties at final state are\"\n", + "he=2780.2 #final specific heat of enthalpy in kJ/kg-K\n", + "Te=159.1 #final temperature in celsius\n", + "vi=30.0 #velocity with which steam enters the nozzle in m/s\n", + "ve=((2*(hi-he)+(vi**2/1000))*1000)**0.5 #final velocity of steam with which it exits in m/s\n", + "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"m/s\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "from steam table,various properties at final state are\n", + "\n", + " hence,exit velocity of the steam from the nozzle is 737.0 m/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2E:pg-339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2E\n", + "#exit velocity of steam from nozzle\n", + "\n", + "hi=1279.1 #initial specific heat of enthalpy in Btu/lbm\n", + "si=1.7085 #initial specific entropy in Btu/lbm R\n", + "se=si #final specific entropy \n", + "Pe=40 #final pressure in lbf/in^2\n", + "he=1193.9 #final specific heat of enthalpy in Btu/lbm\n", + "Te=314.2 #final temperature in F\n", + "vi=100.0 #velocity with which steam enters the nozzle in ft/s\n", + "ve=((2*((hi-he)+(vi**2/(32.17*778)))*(32.17*778)))**0.5 #final velocity of steam with which it exits in ft/s\n", + "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"ft/s\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,exit velocity of the steam from the nozzle is 2070.0 ft/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3:pg-340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#violation of second law\n", + "\n", + "print\"from R-134a tables\"\n", + "se=1.7148 #specific entropy in final state in kJ/kg-K\n", + "si=1.7395 #initial specific entropy in kJ/kg-K \n", + "print\"therefore,se=si.The process described involves a violation of the second law and thus would be impossible.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "from R-134a tables\n", + "therefore,se=si.The process described involves a violation of the second law and thus would be impossible.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4:pg-340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#calculating required specific work\n", + "\n", + "Cp=1.004 #specific heat of air at constant pressure in kJ/kg-K\n", + "Ti=290 #initial temperature in kelvins\n", + "Pi=100 #initial pressure in kPa\n", + "Pe=1000 #final pressure in kPa\n", + "k=1.4 \n", + "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n", + "we=Cp*(Ti-Te) #required specific work in kJ/kg\n", + "print\"\\n hence,specific work required is\",round(we),\"kJ/kg\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,specific work required is -271.0 kJ/kg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4E:pg-341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4E\n", + "#calculating required specific work\n", + "\n", + "Cp=0.24 #specific heat of air at constant pressure in Btu/lbm R\n", + "Ti=520 #initial temperature in R\n", + "Pi=14.7 #initial pressure in lbf/in^2\n", + "Pe=147 #final pressure in lbf/in^2\n", + "k=1.4 \n", + "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in R\n", + "we=Cp*(Ti-Te) #required specific work in Btu/lbm\n", + "print\"\\n hence,specific work required is\",round(we,2),\"Btu/lbm\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,specific work required is -116.15 Btu/lbm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5:pg-342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#entropy generation\n", + "\n", + "h1=2865.54 #specific heat of enthalpy at state 1 in kJ/kg\n", + "h2=83.94 #specific heat of enthalpy at state 2 in kJ/kg\n", + "h3=2725.3 #specific heat of enthalpy at state 3 in kJ?kg\n", + "s1=7.3115 #specific entropy at state 1 in kJ/kg-K\n", + "s2=0.2966 #specific entropy at state 2 in kJ/kg-K\n", + "s3=6.9918 #specific entropy at state 3in kJ/kg-K\n", + "m1=2 #mass flow rate at state 1 in kg/s\n", + "m2=m1*(h1-h3)/(h3-h2) #mass flow rate at state 2 in kg/s\n", + "m3=m1+m2 #mass flow rate at state 3 in kg/s\n", + "Sgen=m3*s3-m1*s1-m2*s2 #entropy generation in the process\n", + "print\"\\n hence,entropy generated in this process is \",round(Sgen,3),\"kW/K\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,entropy generated in this process is 0.072 kW/K\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.6:pg-344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#work required to fill the tank\n", + "import math\n", + "T1=17+273 #initial temperature of tank in Kelvins\n", + "sT1=6.83521 #specific entropy in kJ/kg-K\n", + "R=0.287 #gas constant in kJ/kg-K\n", + "P1=100 #initial pressure in kPa\n", + "P2=1000 #final pressure in kPa\n", + "sT2=sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n", + "T2=555.7 #from interplotation \n", + "V1=0.04 #volume of tank in m^3\n", + "V2=V1 #final volume is equal to initial volume\n", + "m1=P1*V1/(R*T1) #initial mass of air in tank in kg\n", + "m2=P2*V2/(R*T2) #final mass of air in tank in kg\n", + "Min=m2-m1 #in kg\n", + "u1=207.19 #initial specific heat of enthalpy in kJ/kg\n", + "u2=401.49 #final specific heat of enthalpy in kJ/kg\n", + "hin=290.43 #in kJ/kg\n", + "W12=Min*hin+m1*u1-m2*u2 #work required to fill the tank in kJ\n", + "print\"\\n hence,the total amount of work required to fill the tank is\",round(W12,1),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the total amount of work required to fill the tank is -31.9 kJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.7:pg-347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7\n", + "#work required to pump water isentropically \n", + "\n", + "P1=100 #initial pressure in kPa\n", + "P2=5000 #final pressure in kPa\n", + "v=0.001004 #specific volume in m^3/kg\n", + "w=v*(P2-P1) #work required to pump water isentropically\n", + "print\"\\n hence,work required to pump water isentropically is \",round(w,2),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,work required to pump water isentropically is 4.92 kJ/kg\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.8:pg-348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8\n", + "#Velocity in exit flow\n", + "\n", + "print\"From Steam Tables, for liquid water at 20 C\"\n", + "vf=0.001002 #in m^3/kg\n", + "v=vf\n", + "Pi=300 #Line pressure in kPa\n", + "Po=100 #in kPa\n", + "Ve=(2*v*(Pi-Po)*1000)**0.5 #velocity in the exit flow\n", + "print\" \\n Hence, an ideal nozzle can generate upto \",round(Ve),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From Steam Tables, for liquid water at 20 C\n", + " \n", + " Hence, an ideal nozzle can generate upto 20.0 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.9:pg-351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#Rate of Entropy Generation\n", + "\n", + "print\"From R-410a tables,we get\"\n", + "hi=280.6 #in kJ/kg\n", + "he=307.8 #in kJ/kg\n", + "si=1.0272 #in kJ/kg\n", + "se=1.0140 #in kJ/kg\n", + "m=0.08 #flow rate of refrigerant in kg/s\n", + "P=3 #electrical power input in kW\n", + "Qcv=m*(he-hi)-P #in kW\n", + "To=30 #in Celsius\n", + "Sgen=m*(se-si)-Qcv/(To+273.2) #rate of entropy generation \n", + "print\"\\n Hence,the rate of entropy generation for this process is\",round(Sgen,5),\"kW/K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From R-410a tables,we get\n", + "\n", + " Hence,the rate of entropy generation for this process is 0.00166 kW/K\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.10:pg-353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10\n", + "#turbine efficiency\n", + "\n", + "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n", + "si=7.1228 #initial specific entropy in kJ/kg-K\n", + "sf=0.7548 #in kJ/kg-K\n", + "sfg=7.2536 #in kJ/kg-K\n", + "ses=si #final specific entropy is same as the initial\n", + "xes=(si-sf)/sfg #quality of steam when it leaves the turbine\n", + "hf=225.9 #in kJ/kg\n", + "hfg=2373.1 #in kJ/kg\n", + "hes=hf+xes*hfg #final specific heat of enthalpy in kJ/kg\n", + "ws=hi-hes #work output of turbine calculated ideally in kJ/kg\n", + "wa=600 #actual work output of turbine in kJ/kg\n", + "nturbine=wa/ws #efiiciency of turbine \n", + "print\"\\n hence,efficiency of the turbine is\",round(nturbine*100,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,efficiency of the turbine is 80.9 %\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.11:pg-355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11\n", + "#turbine inlet pressure\n", + "import math\n", + "hi=1757.3 #initial specific heat of enthalpy of air in kJ/kg\n", + "si=8.6905 #initial specifc entropy of airin kJ/kg-K\n", + "he=855.3 #final specific heat of enthalpy of air in kJ/kg\n", + "w=hi-he #actual work done by turbine in kJ/kg\n", + "n=0.85 #efficiency of turbine \n", + "ws=w/n #ideal work done by turbine in kJ/kg\n", + "hes=hi-ws #from first law of isentropic process\n", + "Tes=683.7 #final temperature in kelvins from air tables\n", + "ses=7.7148 #in kJ/kg-K\n", + "R=0.287 #gas constant in kJ/kg-K\n", + "Pi=100/math.e**((si-ses)/-R) #turbine inlet pressure in kPa\n", + "print\"\\n hence,turbine inlet pressure is\",round(Pi),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,turbine inlet pressure is 2995.0 kPa\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.12:pg-357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12\n", + "#required work input\n", + "\n", + "Pe=150.0 #final pressure of air in kPa\n", + "Pi=100.0 #initial presure of air in kPa\n", + "k=1.4\n", + "Ti=300.0 #initial temperature of air in kelvis\n", + "Tes=Ti*(Pe/Pi)**((k-1)/k) #from second law\n", + "ws=1.004*(Ti-Tes) #from first law of isentropic process\n", + "n=0.7 #efficiency of automotive supercharger \n", + "w=ws/n #real work input in kJ/kg\n", + "Te=Ti-w/1.004 #temperature at supercharger exit in K\n", + "print\"\\n hence,required work input is \",round(w),\"kJ/kg\"\n", + "print\"\\n and exit temperature is \",round(Te,1),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,required work input is -53.0 kJ/kg\n", + "\n", + " and exit temperature is 352.6 K\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/README.txt b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/README.txt new file mode 100755 index 00000000..f9822be5 --- /dev/null +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/README.txt @@ -0,0 +1,10 @@ +Contributed By: abhishek chauhan +Course: btech +College/Institute/Organization: ABES Engineering College Ghaziabad +Department/Designation: electronics & communication engg +Book Title: Fundamentals Of Thermodynamics +Author: B. Claus And R. E. Sonntag +Publisher: Wiley India Pvt. Ltd., New Delhi +Year of publication: 2010 +Isbn: 978-81-265-2152-4 +Edition: 7 \ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/heat_transfer_6.png b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/heat_transfer_6.png new file mode 100755 index 00000000..c7a00e18 Binary files /dev/null and b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/heat_transfer_6.png differ diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/reversible_work_6.png b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/reversible_work_6.png new file mode 100755 index 00000000..d4cf4f76 Binary files /dev/null and b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/reversible_work_6.png differ diff --git a/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/velocity_6.png b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/velocity_6.png new file mode 100755 index 00000000..1533cad6 Binary files /dev/null and b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/velocity_6.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb new file mode 100755 index 00000000..25aca7a9 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb @@ -0,0 +1,536 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 High Voltage cables " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_1 pgno403" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Radius = cm 4.8\n", + "\n", + " Inner radial thickness = cm 2.8\n", + "\n", + " Outer radial thickness = cm 0.2\n", + "\n", + " Vpeak of outer dielectric = kV 70.0374989883\n", + "\n", + " Vpeak of inner dielectric = kV 4.89863934243\n", + "\n", + " Peak voltage of cable = kV 74.9361383307\n", + "\n", + " Safe opearating voltage = kV 53.0\n" + ] + } + ], + "source": [ + "#Chapter 12, Exmaple 1, page 403\n", + "#Calculate radial thickness of insulating layer\n", + "from math import log\n", + "#based on equation 12.15 and v1alues of E1 and E2 \n", + "E1 = 40. # kV/cm\n", + "E2 = 25. # kV/cm\n", + "ep1 = 6. # permittives of the material\n", + "ep2 = 4. #permittives of the material\n", + "d1 = 4. # cm\n", + "d2 = 10. # cm\n", + "r1 = 2. # cm\n", + "r2 = (E1*ep1*2)/(E2*ep2)\n", + "inner = r2-(d1/2)\n", + "outer = (d2/2)-r2\n", + "#based on equation 12.16\n", + "V1peak = E1*r1*log(r2/r1) # inner dielectric\n", + "V2peak = E2*r2*log(d2/(2*r2)) # outter dielectric\n", + "Vcab = V1peak+V2peak # Peak volatge of cable\n", + "rms = Vcab/(2)**0.5\n", + "print\"\\n Radius = cm \",r2\n", + "print\"\\n Inner radial thickness = cm \",inner\n", + "print\"\\n Outer radial thickness = cm\",outer\n", + "print\"\\n Vpeak of outer dielectric = kV\", V1peak\n", + "print\"\\n Vpeak of inner dielectric = kV\", V2peak\n", + "print\"\\n Peak voltage of cable = kV\", Vcab\n", + "print\"\\n Safe opearating voltage = kV\", round(rms)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2 pgno404" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Radius = cm 2.57\n" + ] + } + ], + "source": [ + "#Chapter 12, Exmaple 2, page 404\n", + "#Calculate optimum value of r\n", + "\n", + "#Based on equation 12.17\n", + "V1 = 100 # kV\n", + "V2 = 55 # kV\n", + "r = V1*(2)**0.5/V2\n", + "print\"\\n Radius = cm \",round(r,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_3 pgno406" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Resistivity of insulation material = 10**10 ohm/m 4.53\n" + ] + } + ], + "source": [ + "#Chapter 12, Exmaple 3, page 406\n", + "#Calculate resistivity\n", + "from math import log,pi\n", + "l = 10**4 # cable length in m\n", + "Rr = 3/1.5 # R/r ratio\n", + "ins = 0.5*10**6 # insulation in ohms\n", + "p = 2*pi*l*ins/log(Rr)\n", + "print\"\\n Resistivity of insulation material = 10**10 ohm/m \",round(p/10**10,2)\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_4 pgno406" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " C4 = mircoF 5.0\n", + "\n", + " Line charging current = A 18.1379936423\n", + "\n", + " Charging = kVA 314.16\n" + ] + } + ], + "source": [ + "#Chapter 12, Exmaple 4, page 406\n", + "#Calculate resistivity\n", + "from math import pi\n", + "# Baased on Equation 12.1*10**2\n", + "c4 = 0.5*10**2/10 # micro F\n", + "Ic = 2*10**4*2*pi*5*50*10**-6/(3)**0.5\n", + "C = ((3)**0.5*10000*Ic)*(10**-9*10**6)\n", + "print\"\\n C4 = mircoF \",c4\n", + "print\"\\n Line charging current = A \",Ic\n", + "print\"\\n Charging = kVA \",round(C,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_5 pgno408" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " C2 = mircoF/Km 0.25\n", + "\n", + " C3 = mircoF/Km 0.65\n", + "\n", + " C4 = mircoF/Km 0.45\n", + "\n", + " Carging = kVAr 3079.1\n" + ] + } + ], + "source": [ + "#Chapter 12,Example 5, page 408\n", + "#Calculate capasitance and kVAr \n", + "from math import pi\n", + "#(a) Using the notations used in FiVgs. 12.15 and 12.16\n", + "C2 = 0.75/3 # microF/km\n", + "C3 = (0.6*3-2*C2)/2 # microF/km\n", + "C4 = (C2+C3)/2 # microF/km\n", + "print\"\\n C2 = mircoF/Km \",C2\n", + "print\"\\n C3 = mircoF/Km \",C3\n", + "print\"\\n C4 = mircoF/Km \",C4\n", + "#(b)Capacitance of 10 km between 2 cores\n", + "V = 33*10**3\n", + "w = 2*pi*50\n", + "C = 2*V**2*w*C4*10*10**-9\n", + "print\"\\n Carging = kVAr \",round(C,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_6 pgno409" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Conductor resistance = ohm 0.105\n", + "\n", + " Conductor resistance for the whole leangth (Rc) = ohm 8.925\n", + "\n", + " Resistance of sheath (Rsh) = ohm/Km 22.8257125656\n", + "\n", + " Conductor to sheath mutual inductive reactance (Xm)= ohm/m 5.70302447331\n", + "\n", + " Effective AC resistance(Ref) = ohm 10.2661818113\n", + "\n", + " Reactance with sheaths open-circuit(Xc) = ohm 11.1\n", + "\n", + " Effective reactance per cable(Xef) = ohm 11.0412424998\n", + "\n", + " Sheath loss/conductor loss = 0.150272471857\n", + "\n", + " emf induced per sheath(emf) = kV 2.28\n" + ] + } + ], + "source": [ + "#Chapter 12,Example 6, page 409\n", + "#Determine the efective electrical parameters \n", + "from math import pi,log\n", + "rc = 0.0875*(1+0.004*50) # conductor resistance in ohm/km\n", + "Rc = 0.105*85 # ohm\n", + "w = 2*pi*50\n", + "Rsh = 23.2*10**-6*85*10**5/(pi*(3**2-2.5**2)) # Resistance of sheath\n", + "D = 8.\n", + "rsh = 1./2.*(2.5+3)\n", + "Xm = w*2*log(D/rsh)*10**-7*85000\n", + "Ref = Rc + Xm**2*Rsh/(Rsh**2+Xm**2) # Effective AC resistance \n", + "Xc = 11.1# reactance with sheaths open-circuit\n", + "Xef = Xc-(Xm**2/(Rsh**2+Xm**2)) #Effective reactance per cable\n", + "SlCl = Rsh*Xm**2/(Rc*(Rsh**2+Xm**2)) # Sheath loss/conductor loss\n", + "I = 400 # A\n", + "emf = Xm*I # emf induced per sheath\n", + "print\"\\n Conductor resistance = ohm\",rc\n", + "print\"\\n Conductor resistance for the whole leangth (Rc) = ohm\",Rc\n", + "print\"\\n Resistance of sheath (Rsh) = ohm/Km \",Rsh\n", + "print\"\\n Conductor to sheath mutual inductive reactance (Xm)= ohm/m \",Xm\n", + "print\"\\n Effective AC resistance(Ref) = ohm \",Ref\n", + "print\"\\n Reactance with sheaths open-circuit(Xc) = ohm \",Xc\n", + "print\"\\n Effective reactance per cable(Xef) = ohm \",Xef\n", + "print\"\\n Sheath loss/conductor loss = \",SlCl\n", + "print\"\\n emf induced per sheath(emf) = kV\",round(emf/1000,2)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_7 pgno410" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Induced sheath voltage per Km = V/km 26.6\n", + "\n", + " If the sheaths are bonded at one end, the voltage between them at the other end = = V/km 46.1318808794\n" + ] + } + ], + "source": [ + "#Chapter 12,Example 7, page 410\n", + "#Determine the induced sheath voltage \n", + "from math import log\n", + "D = 15. # cm\n", + "rsh = 5.5/2 # Sheath diameter converted to radius in cm\n", + "I = 250. # A\n", + "E = 2*10**-7*314*I*log(D/rsh)*10**3\n", + "\n", + "print\"\\n If the sheaths are bonded at one end, the voltage between them at the other end = = V/km\",E*(3)**0.5\n", + "print\"\\n Induced sheath voltage per Km = V/km\",round(E,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_9 pgno412" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " V1 = kV/cm 45.562691669\n", + "\n", + " V2 = kV/cm 23.2040739531\n", + "\n", + " Emax = kV/cm 47.5\n" + ] + } + ], + "source": [ + "#Chapter 12,Example 9, page 412\n", + "#Determine the maximum stress \n", + "from math import log\n", + "Emax = 47.5 # kV\n", + "b = 2.65 # cm\n", + "a = 1. # cm\n", + "ba = 0.55*3 # 1/3(b-a)\n", + "r1 = 1.55 # cm\n", + "r2 = 2.1 # cm2Vr = 2.65 # cm \n", + "V = 53.8 # kV\n", + "alpha = ba**(1/3)\n", + "# based on the example 12_8 \n", + "#calculating VEmax1, Emax2, Emax3 \n", + "x = 1/(a*log(r1/a))\n", + "y = 1/(r1*log(r2/r1))\n", + "z = 1/(r2*log(b/r2))\n", + "VV1 = Emax/x\n", + "V1V2 = Emax/y\n", + "V2 = Emax/z\n", + "V1 = V2+(Emax/y)\n", + "\n", + "print\"\\n V1 = kV/cm\",V1\n", + "print\"\\n V2 = kV/cm\",V2\n", + "print\"\\n Emax = kV/cm\",Emax\n", + "# Answers may vary due to round off error.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_8 pgno411" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Peak voltage of the conductor V = kV 53.8887743412\n", + "\n", + " V1 = kV 41.1\n", + "\n", + " V2 = kV 23.9\n", + "\n", + " Maximum stress without sheaths = kV/cm 26.258912261\n", + "\n", + " Minimum stress without sheaths = kV/cm 41.7324619433\n", + "\n", + " Maximum stress with sheaths = kV/cm 26.258912261\n", + "\n", + " Minimum stress with sheaths = kV/cm 26.258912261\n" + ] + } + ], + "source": [ + "#Chapter 12,Example 8, page 411\n", + "#Determine the maximum stress \n", + "from math import log\n", + "ba = 5.3/2 # b/a\n", + "alpha = ba**(1/3)\n", + "r1 = 1.385 # cm\n", + "r2 = 1.92 # cm\n", + "r = 2.65 # cm\n", + "V = 66*(2)**0.5/(3)**0.5\n", + "V2 = 23.9#V/(1+(1/alpha)+(1/alpha**2))\n", + "V1 = 41.1#(1+1/alpha)*V2\n", + "#calculating maximim and minimum stress without sheaths\n", + "Emax0 = V/1*log(r/1)\n", + "Emin0 = V/(r*log(r))\n", + "#calculating max and min stress with the sheaths\n", + "Emax = Emax0*3/(1+(alpha)+(alpha**2))\n", + "Emin = Emax/alpha\n", + "print\"\\n Peak voltage of the conductor V = kV\",V\n", + "print\"\\n V1 = kV\",V1\n", + "print\"\\n V2 = kV\",V2\n", + "print\"\\n Maximum stress without sheaths = kV/cm\",Emax0/2\n", + "print\"\\n Minimum stress without sheaths = kV/cm\",Emin0*2\n", + "print\"\\n Maximum stress with sheaths = kV/cm\",Emax/2\n", + "print\"\\n Minimum stress with sheaths = kV/cm\",Emin/2\n", + "\n", + "# Answers vary due to round off errors.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_10 pgno412" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " E1max = kV/cm 51.5\n", + "\n", + " E2max = kV/cm 38.69\n" + ] + } + ], + "source": [ + "#Chapter 12,Example 10, page 412\n", + "#Determine the maximum stress \n", + "from math import log,e\n", + "a = 1 #cm\n", + "r1 = 2 # cm\n", + "b = 2.65 # cm\n", + "er1 = 4.5\n", + "er2 = 3.6\n", + "V = 53.8 # kV\n", + "ba = 5.3/2 # b/a\n", + "alpha = 1.325\n", + "E1max = V/(log(r1)+(er1/er2)*log(alpha))\n", + "E2max = V/((r1*(er2/er1)*log(r1))+log(alpha))\n", + "print\"\\n E1max = kV/cm\",round(E1max,1)\n", + "print\"\\n E2max = kV/cm\",round(E2max,2) # answer vary from the text\n", + "\n", + "# Answer vary from the text due to round off \n", + "\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb new file mode 100755 index 00000000..23418ebe --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb @@ -0,0 +1,749 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 High Voltage Generation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_1 pgno:556" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Part (a)\n", + "\n", + " Ripple Voltage = V 2000.0\n", + "\n", + " Part (b)\n", + "\n", + " Voltage drop = V 11000.0\n", + "\n", + " Part (c)\n", + "\n", + " Average output voltage = kV 271.842712475\n", + "\n", + " Part (d)\n", + "\n", + " Ripple Factor in percentage = 3.88908729653\n" + ] + } + ], + "source": [ + "\n", + "#Chapter 16,Example 1, page 556\n", + "#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor \n", + "\n", + "I1 = 5*10**-3 # A\n", + "C2 = 0.05*10**-6 # F\n", + "C1 = 0.01*10**-6 # F\n", + "Vs = 100 # kV\n", + "f = 50 # Hz \n", + "\n", + "from math import sqrt\n", + "# (a) Ripple voltage\n", + "print\"\\n Part (a)\"\n", + "delV = I1/(C2*f)\n", + "print\"\\n Ripple Voltage = V\", delV\n", + "# (b) Voltage drop \n", + "print\"\\n Part (b)\"\n", + "Vd = I1/f*((1/C1)+(1/(2*C2)))\n", + "print\"\\n Voltage drop = V\", Vd\n", + "# (c) Average output voltage \n", + "print\"\\n Part (c)\"\n", + "Vav = 2*Vs*sqrt(2)-Vd*10**-3\n", + "print\"\\n Average output voltage = kV\", round(Vav,1)\n", + "# (d) Ripple factor \n", + "print\"\\n Part (d)\"\n", + "RF = Vd*10**-3/(2*Vs*sqrt(2)) \n", + "print\"\\n Ripple Factor in percentage = \", round(RF*100,2)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_2 pgno:556" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Part (a)\n", + "\n", + " Ripple Voltage = kV 21.0\n", + "\n", + " Part (b)\n", + "\n", + " Voltage drop = kV 12.5\n", + "\n", + " Part (c)\n", + "\n", + " Average output voltage = kV 411.76\n", + "\n", + " Part (d)\n", + "\n", + " Ripple Factor in percentage = 2.95\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 2, page 556\n", + "#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor \n", + "\n", + "I1 = 5*10**-3 # A\n", + "C3 = 0.10*10**-6 # F\n", + "C2 = 0.05*10**-6 # F\n", + "C1 = 0.01*10**-6 # F\n", + "Vs = 100 # kV\n", + "f = 50 # Hz \n", + "\n", + "from math import sqrt\n", + "# (a) Ripple voltage\n", + "print\"\\n Part (a)\"\n", + "delV = I1/f*((2/C1)+(1/C3))\n", + "print\"\\n Ripple Voltage = kV\", delV*10**-3\n", + "# (b) Voltage drop \n", + "print\"\\n Part (b)\"\n", + "Vd = I1/f*((1/C2)+(1/C1)+(1/(2*C3)))\n", + "print\"\\n Voltage drop = kV\", round(Vd*10**-3,1)\n", + "# (c) Average output voltage \n", + "print\"\\n Part (c)\"\n", + "Vav = 3*Vs*sqrt(2)-Vd*10**-3\n", + "print\"\\n Average output voltage = kV\", round(Vav,2)\n", + "# (d) Ripple factor \n", + "print\"\\n Part (d)\"\n", + "RF = Vd*10**-3/(3*Vs*sqrt(2)) \n", + "print\"\\n Ripple Factor in percentage = \", round(RF*100,2)\n", + "\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_3 pgno:557" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Part (a)\n", + "\n", + " Ripple Voltage = kV 52.0\n", + "\n", + " Part (b)\n", + "\n", + " Voltage drop = kV 872.0\n", + "\n", + " Part (c)\n", + "\n", + " Average output voltage = kV 6715.55843272\n", + "\n", + " Part (d)\n", + "\n", + " Ripple Factor in percentage = 10.704810993\n", + "\n", + " Part (e)\n", + "\n", + " Optimum number of stages = stages 21.0\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 3, page 557\n", + "#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor (e)optimum number of stages\n", + "\n", + "I1 = 5*10**-3 # A\n", + "C = 0.15*10**-6 # F\n", + "Vs = 200 # kV\n", + "f = 50 # Hz \n", + "n = 12\n", + "from math import sqrt\n", + "# (a) Ripple voltage\n", + "print\"\\n Part (a)\"\n", + "delV = I1*n*(n+1)/(f*C*2)\n", + "print\"\\n Ripple Voltage = kV\", delV*10**-3\n", + "# (b) Voltage drop \n", + "print\"\\n Part (b)\"\n", + "a = I1/(f*C)\n", + "Vd = a*((2/3*n**3)+(n**2/2)-(n/6)+(n*(n+1)/4))\n", + "print\"\\n Voltage drop = kV\", Vd*10**-3*12\n", + "# (c) Average output voltage \n", + "print\"\\n Part (c)\"\n", + "Vav = 2*n*Vs*sqrt(2)-Vd*10**-3\n", + "print\"\\n Average output voltage = kV\", Vav\n", + "# (d) Ripple factor \n", + "print\"\\n Part (d)\"\n", + "RF = Vd*10**-3/(2*n*Vs*sqrt(2))*10 \n", + "print\"\\n Ripple Factor in percentage = \", RF*100\n", + "# (e) Optimum number of stages\n", + "print\"\\n Part (e)\"\n", + "nopt = sqrt(Vs*sqrt(2)*10**3*f*C/I1) \n", + "print\"\\n Optimum number of stages = stages\", round(nopt)\n", + "\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_4 pgno:558" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Reactance of the cable = k ohm 125.0\n", + "\n", + " Leakage reactance of the transformer = k ohm 50.0\n", + "\n", + " Additional series reactance = k ohm 75.0\n", + "\n", + " Inductance of required series inductor = H 238.732414638\n", + "\n", + " Total circuit resistance = k ohm 21.875\n", + "\n", + " maximum current that can be supplied by the transformer = A 0.4\n", + "\n", + " Exciting voltage of transformer secondary = kV 8.75\n", + "\n", + " Input voltage of transformer primary = V 7.7\n", + "\n", + " Input power of the transformer = kW 3.5\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 4, page 558\n", + "#Determine the input voltage and power\n", + "from math import pi\n", + "Vc = 500*10**3 # V\n", + "A = 4 # A\n", + "Xl = 8./100. # in percentage \n", + "kV = 250.\n", + "Xc = Vc/A # Reactance of the cable\n", + "XL = Xl*(kV**2/100)*10**3 # Leakage reactance of the transformer\n", + "Radd = Xc-XL # Additional series reactance\n", + "Ind = Radd/(2*pi*XL) # Inductance of required series inductor\n", + "R = 3.5/100.*(kV**2/100)*10**3 # Total circuit resistance\n", + "Imax = 100./250. # maximum current that can be supplied by the transformer\n", + "Vex = Imax*R # Exciting voltage of transformer secondary\n", + "Vin = Vex*220/kV # Input voltage of transformer primary\n", + "P = Vin*100./220. # Input power of the transformer\n", + "print\"\\n Reactance of the cable = k ohm\", Xc*10**-3\n", + "print\"\\n Leakage reactance of the transformer = k ohm\", XL*10**-3\n", + "print\"\\n Additional series reactance = k ohm\", Radd*10**-3\n", + "print\"\\n Inductance of required series inductor = H\", Ind*10**3\n", + "print\"\\n Total circuit resistance = k ohm\", R*10**-3\n", + "print\"\\n maximum current that can be supplied by the transformer = A\", Imax\n", + "print\"\\n Exciting voltage of transformer secondary = kV\", Vex*10**-3\n", + "print\"\\n Input voltage of transformer primary = V\", Vin*10**-3\n", + "print\"\\n Input power of the transformer = kW\", P*10**-3\n", + "\n", + "# Answers may vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_5 pgno:559" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Charging current= micro A 0.5\n", + "\n", + " Potential difference = MV 50.0\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 5,page 559\n", + "#Determine the charging current and potential difference\n", + "\n", + "ps = 0.5*10**-6 # C/m**2\n", + "u = 10 # m/s\n", + "w = 0.1 # m\n", + "I = ps*u*w \n", + "Rl = 10**14 # ohm\n", + "V = I*Rl*10**-6\n", + "print\"\\n Charging current= micro A\", I*10**6\n", + "print\"\\n Potential difference = MV\", V\n", + "\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_6 pgno:560" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Theta = micro S 4.94772675074\n", + "\n", + " Neta = 0.986880297225\n", + "\n", + " Alpha = 6.96319779479\n", + "\n", + " T1 = microS 1.11048978183\n", + "\n", + " T2 = microS 49.9720401825\n", + "\n", + " Generated lighting impulse = wave 0.0222222222222\n", + "\n", + " alpha1 = microS 0.0145885577162\n", + "\n", + " alpha2 = microS 2.80011732464\n", + "\n", + " e(t) = * (e**t - f**t) 99.721740833 -0.015 -2.8\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 6,page 560\n", + "#Determine the wave generated\n", + "\n", + "# With refrence to table 16.1\n", + "C1 = 0.125*10**-6 # F\n", + "C2 = 1*10**-9 # F\n", + "R1 = 360. # ohm\n", + "R2 = 544. # ohm\n", + "V0 = 100. # kV\n", + "from math import sqrt\n", + "theta = sqrt(C1*C2*R1*R2)\n", + "neta = 1/(1+(1+R1/R2)*C2/C1)\n", + "alpha = R2*C1/(2*theta*neta)\n", + "print\"\\n Theta = micro S\",theta*10**6\n", + "print\"\\n Neta = \",neta\n", + "print\"\\n Alpha = \",alpha\n", + "# Coresponding to alpha the following can be deduced from Fig 16.12\n", + "T2 = 10.1*theta*10**6\n", + "T1 = T2/45\n", + "imp = T1/T2 # generated lighting impulse\n", + "# From equations 16.41 and 16.42\n", + "a1 = (alpha-sqrt(alpha**2-1))*10**-6/(theta) \n", + "a2 = (alpha+sqrt(alpha**2-1))*10**-6/theta \n", + "print\"\\n T1 = microS\", T1\n", + "print\"\\n T2 = microS\", T2\n", + "print\"\\n Generated lighting impulse = wave\", imp\n", + "print\"\\n alpha1 = microS\", a1\n", + "print\"\\n alpha2 = microS\", a2\n", + "# According to equation 16.40\n", + "et = neta*(alpha*V0)/sqrt(alpha**2-1)\n", + "print\"\\n e(t) = * (e**t - f**t)\",et,round(-a1,3),round(-a2,2) # Equation of the wave form generated by the impulese\n", + "\n", + "#Answers may vary due to round off error \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_7 pgno:561" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Theta = micro S 4.94772675074\n", + "\n", + " Neta = 0.598886775171\n", + "\n", + " Alpha = 11.4743604205\n", + "\n", + " T1 = microS 0.670004664163\n", + "\n", + " T2 = microS 80.4005596995\n", + "\n", + " alpha1 = microS 0.00882394544921\n", + "\n", + " alpha2 = microS 4.62941134867\n", + "\n", + " e(t) = * (e**t - f**t) 60.1174165831 -0.0088 -4.63\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 6,page 561\n", + "#Determine the wave generated\n", + "\n", + "C1 = 0.125*10**-6 # F\n", + "C2 = 1*10**-9 # F\n", + "R1 = 360. # ohm\n", + "R2 = 544. # ohm\n", + "V0 = 100. # kV\n", + "from math import sqrt\n", + "theta = sqrt(C1*C2*R1*R2)\n", + "neta = 1/(1+R1/R2+C2/C1)\n", + "alpha = R2*C1/(2*theta*neta)\n", + "print\"\\n Theta = micro S\",theta*10**6\n", + "print\"\\n Neta = \",neta\n", + "print\"\\n Alpha = \",alpha\n", + "# Coresponding to alpha the following can be deduced from Fig 16.12\n", + "T2 = 16.25*theta*10**6\n", + "T1 = T2/120\n", + "# From equations 16.41 and 16.42\n", + "a1 = (alpha-sqrt(alpha**2-1))*10**-6/(theta) \n", + "a2 = (alpha+sqrt(alpha**2-1))*10**-6/theta \n", + "print\"\\n T1 = microS\", T1 # Answer given in the text is wrong\n", + "print\"\\n T2 = microS\", T2 \n", + "print\"\\n alpha1 = microS\", a1\n", + "print\"\\n alpha2 = microS\", a2\n", + "# According to equation 16.40\n", + "et = neta*(alpha*V0)/sqrt(alpha**2-1)\n", + "print\"\\n e(t) = * (e**t - f**t)\",et,round(-a1,4),round(-a2,2) # Equation of the wave form generated by the impulese\n", + "\n", + "#Answers may vary due to round off error \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_8 pgno:562" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Theta = micro S 416.666666667\n", + "\n", + " X = 0.063\n", + "\n", + " R1 = k Ohm 53.3539946227\n", + "\n", + " R2 = k Ohm 26.0315820533\n", + "\n", + " neta = 0.976\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 8,page 562\n", + "#Determine the circuit efficiency\n", + "\n", + "C1 = 0.125*10**-6 # F\n", + "C2 = 1*10**-9 # F\n", + "T2 = 2500.\n", + "T1 = 250.\n", + "from math import sqrt\n", + "# Bsaed on Figure 16.12\n", + "T2T1 = T2/T1\n", + "a = 4. # alpha\n", + "theta = T2/6.\n", + "# From table 16.1\n", + "X = (1/a**2)*(1+C2/C1)\n", + "R1 = (a*theta*10**-6/C2)*(1-sqrt(1-X))\n", + "R2 = (a*theta*10**-6/(C1+C2))*(1+sqrt(1-X))\n", + "neta = 1/(1+(1+R1/R2)*C2/C1)\n", + "print\"\\n Theta = micro S\", theta\n", + "print\"\\n X = \", X\n", + "print\"\\n R1 = k Ohm\", R1*10**-3\n", + "print\"\\n R2 = k Ohm\", R2*10**-3\n", + "print\"\\n neta = \", round(neta,3)\n", + "\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_9 pgno:563" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Theta = micro S 5.26315789474\n", + "\n", + " X = 0.025634765625\n", + "\n", + " V0 = 960.0\n", + "\n", + " R1 = Ohm 434.546374554\n", + "\n", + " R2 = Ohm 3187.32736562\n", + "\n", + " R1/n = Ohm 54.3182968192\n", + "\n", + " R2/n = Ohm 398.415920703\n", + "\n", + " neta = 0.946237811669\n", + "\n", + " Maximum output voltage = kV 908.388299202\n", + "\n", + " Energy rating = J 9216.0\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 9,page 563\n", + "#Determine the maximum output voltage and energy rating\n", + "\n", + "n = 8.\n", + "C1 = 0.16/n # micro F\n", + "C2 = 0.001 # micro F\n", + "T2 = 50.\n", + "T1 = 1.2\n", + "from math import sqrt\n", + "# beased on figure 16.12\n", + "a = 6.4 # alpha\n", + "theta = T2/9.5\n", + "X = (1/a**2)*(1+C2/C1)\n", + "R1 = (a*theta*10**-6/C2)*(1-sqrt(1-X))\n", + "R2 = (a*theta*10**-6/(C1+C2))*(1+sqrt(1-X))\n", + "R1n = R1/n\n", + "R2n = R2/n\n", + "V0 = n*120 \n", + "neta = 1/(1+(1+R1/R2)*C2/C1)\n", + "V = neta*V0\n", + "E = 1./2.*C1*V0**2 \n", + "print\"\\n Theta = micro S\", theta\n", + "print\"\\n X = \", X\n", + "print\"\\n V0 = \", V0\n", + "print\"\\n R1 = Ohm\", R1*10**6 \n", + "print\"\\n R2 = Ohm\", R2*10**6 \n", + "print\"\\n R1/n = Ohm\", R1n*10**6\n", + "print\"\\n R2/n = Ohm\", R2n*10**6\n", + "print\"\\n neta = \", neta\n", + "print\"\\n Maximum output voltage = kV\", V\n", + "print\"\\n Energy rating = kJ\", E/1000\n", + "\n", + "# Answers greatly vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_10 pgno:564" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " R1 = Ohm 840\n", + "\n", + " R2 = Ohm 4800\n", + "\n", + " Theta = microS 6.48074069841\n", + "\n", + " Neta = 0.912408759124\n", + "\n", + " Alpha = 4.22791178896\n", + "\n", + " T1 = microS 1.81\n", + "\n", + " T2 = microS 45.37\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 10,page 564\n", + "#Determine the from and tail times\n", + "\n", + "n = 12\n", + "C1 = 0.125*10**-6/n # micro F\n", + "C2 = 0.001*10**-6 # micro F\n", + "R1 = 70*n # ohm\n", + "R2 = 400*n # ohm\n", + "from math import sqrt\n", + "# beased on figure 16.15\n", + "theta = sqrt(C1*C2*R1*R2)\n", + "neta = 1/(1+R1/R2+C2/C1)\n", + "a = R2*C1/(2*theta*neta) # alpha\n", + "T2 = 7*theta*10**6\n", + "T1 = T2/25\n", + "print\"\\n R1 = Ohm\", R1 \n", + "print\"\\n R2 = Ohm\", R2 \n", + "print\"\\n Theta = microS\",theta*10**6\n", + "print\"\\n Neta = \",neta\n", + "print\"\\n Alpha = \",a\n", + "print\"\\n T1 = microS\", round(T1,2) \n", + "print\"\\n T2 = microS\", round(T2,2) \n", + "\n", + "# Answers greatly vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_ 11pgno:564" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " R = ohm 1.97423402868\n", + "\n", + " y = s**-1 123389.626793\n", + "\n", + " I(t) = * exp(t) * sin(t) A 15.625 -12.33896 20000.0\n" + ] + } + ], + "source": [ + "#Chapter 16,Example 11,page 564\n", + "#Determine the equation generated by impulse\n", + "from math import sqrt\n", + "w = 0.02*10**6 # s**-1 obtained by solving eq 16.47 iteratively\n", + "R = sqrt(4-(sqrt(8*8*4)*0.02)**2) # solved the simplified equation\n", + "L = 8*10**-6\n", + "V = 25*10**3\n", + "# In equation 16.46\n", + "y = R/(2*L)\n", + "# Deriving the equation\n", + "a = V/(w*L)\n", + "print\"\\n R = ohm\",R\n", + "print\"\\n y = s**-1\",y\n", + "print\"\\n I(t) = * exp(t) * sin(t) A\",a/10000,round(-y,1)/10000,w\n", + "\n", + "# Answers may vary due to round off error\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb new file mode 100755 index 00000000..16682b1d --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb @@ -0,0 +1,398 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19 Applications of High Voltage Engineering in Industries " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_1 pgno:665" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " The seperation between the particles = m 1.63265306122\n" + ] + } + ], + "source": [ + " #Chapter 19,Example 1,page 665\n", + "#Determine the sepration between the particles\n", + "\n", + "# Based on the equations 19.6, 19.7, 19.8, 19.9 and 19.10\n", + "E = 8*10**5 # V/m\n", + "qm = 10*10**-6 # C/kg, qm = q/m\n", + "y = -1 # m\n", + "t = (1*2/9.8)\n", + "x = 1./2.*qm*E*t\n", + "print\"\\n The seperation between the particles = m\",round(2*x,3)\n", + "\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_2 pgno:667" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " The pumping pressure P = N/m**2 900.0\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 2,page 667\n", + "#Determine the pumping pressure\n", + "\n", + "p0 = 30*10**-3 # C/m**3\n", + "V = 30*10**3 # V\n", + "P = p0*V\n", + "print\"\\n The pumping pressure P = N/m**2\",P\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_4 pgno:670" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " The vertical displacement of the drop = m 0.0029\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 4,page 670\n", + "#Determine the vertical displacement of the drop\n", + "\n", + "d = 0.03*10**-3 # m\n", + "p = 2000 # kg/m**3\n", + "q = 100*10**-15 # C\n", + "V0 = 3500. # V\n", + "d2 = 2*10**-3 # m\n", + "L1 = 15*10**-3 # m\n", + "L2 = 12*10**-3 # m\n", + "Vz = 25. # m/s\n", + "from math import pi\n", + "m = 4./3.*pi*(1./2.*d)**3*p\n", + "t0 = L1/Vz\n", + "Vx0 = q*V0*t0/(m*d2)\n", + "x0 = 1./2.*Vx0*t0\n", + "t1 = (L1+L2)/Vz\n", + "x1 = x0+Vx0*(t1-t0)\n", + "\n", + "print\"\\n The vertical displacement of the drop = m\",round(x1,4)\n", + " \n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_5 pgno672" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Ea = V/m 902570.520843\n", + "\n", + " Eb = V/m 300856.840281\n", + "\n", + " Charge density = C/m**2 2.65957446809e-06\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 5,page 672\n", + "#Determine the electric stress and charge density\n", + "\n", + "a = 25*10**-6 # m\n", + "b = 75*10**-6 # m\n", + "Er = 2.8\n", + "ps = 25*10**-6 # C/m**3\n", + "E0 = 8.84*10**-12\n", + "\n", + "Ea = (b*ps)/(ps*E0+b*Er*E0)\n", + "Eb = (a*ps)/(ps*E0+b*Er*E0) # the negative noation is removed to obtain positive answer as in the book \n", + "psc = E0*Eb\n", + "\n", + "print\"\\n Ea = V/m\",Ea\n", + "print\"\\n Eb = V/m\",Eb\n", + "print\"\\n Charge density = C/m**2\",psc\n", + "\n", + "# Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_6 pgno:675" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Current density = A/m**2 5.304e-08\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 6,page 675\n", + "#Determine the current density\n", + "\n", + "\n", + "E0 = 8.84*10**-12\n", + "Us = 1.5*10**-3*10**-4\n", + "V = 100\n", + "d3 = 10**-6 # d**3\n", + "J = 4*E0*Us*V**2/d3\n", + "print\"\\n Current density = A/m**2\",J\n", + "\n", + "# Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_7 pgno:676" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Thickness of the dust layer = m 0.00177\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 7,page 676\n", + "#Determine the thickness of dust layer\n", + "\n", + "Edb = 3*10**6\n", + "E0 = 8.84*10**-12\n", + "p0 = 15*10**-3\n", + "d = Edb*E0/p0\n", + "print\"\\n Thickness of the dust layer = m\",round(d,5)\n", + "\n", + "# Answers may vary due to round off errors\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_8 pgno:676" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Ion velocity = m/s 71010.8899112\n", + "\n", + " Populsion force = N 0.0197152859477\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 8,page 676\n", + "#Determine the velocity of the ejected ions and propolsion force\n", + "from math import sqrt\n", + "mi = 133*1.67*10**-27 # kg\n", + "qi = 1.6*10**-19 # C\n", + "Va = 3500 # V\n", + "I = 0.2 # A\n", + "vi = sqrt(2*qi*Va/mi)\n", + "F = vi*mi*I/qi\n", + "print\"\\n Ion velocity = m/s\",vi\n", + "print\"\\n Populsion force = N\",F\n", + "\n", + "# Answers may vary due to round off errors\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_9 pgno:667" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Velocity = m/s2 2.0\n", + "\n", + " Position of the particle = m 0.24\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 9,page 677\n", + "#Determine the position of the particle \n", + "\n", + "V = 120*10**3 # applied voltage in V\n", + "d = 0.6 # space b/w the plates in m\n", + "vd = 1.2 # vertical dimention in m \n", + "qm = 10*10**-6 # charge to mass C/kg \n", + "y = 4.9\n", + "from math import sqrt\n", + "t0 = sqrt(vd/y)\n", + "# based on eq 19.51 and 19.52\n", + "dx2 = qm*V/d\n", + "x = t0**2\n", + "print\"\\n Velocity = m/s2\",dx2\n", + "print\"\\n Position of the particle = m\",round(x,2)\n", + "\n", + "# Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_10 pgno:679" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " The minimum voltage required for gnerating drops witha charge of 50 pC per drop = kV 11.81\n" + ] + } + ], + "source": [ + "#Chapter 19,Example 10,page 679\n", + "#Determine the minimum voltage required for gnerating drops witha charge of 50 pC per drop\n", + "from math import pi,log\n", + "q = 50*10**-12\n", + "a = 25*10**-6\n", + "b = 750*10**-6\n", + "E0 = 8.84*10**-12\n", + "r = 50*10**-6 \n", + "V = (3*q*b**2*log(b/a))/(7*pi*E0*r**3)\n", + "print\"\\n The minimum voltage required for gnerating drops witha charge of 50 pC per drop = kV\",round(V*10**-6,2)\n", + "\n", + "# Answers may vary due to round off error\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb new file mode 100755 index 00000000..20fc2d8a --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb @@ -0,0 +1,310 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 Electric Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_5 pgno:65" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum field = V/m per volt 4.20643156401\n" + ] + } + ], + "source": [ + "#Chapter 2, Example 5, page 65\n", + "#Calculate the maximum field at the sphere surface\n", + "#Calulating Field at surface E based on figure 2.31 and table 2.3\n", + "from math import pi\n", + "Q1 = 0.25\n", + "e0 = 8.85418*10**-12 #Epselon nought\n", + "RV1= ((1/0.25**2)+(0.067/(0.25-0.067)**2)+(0.0048/(0.25-0.067)**2))\n", + "RV2= ((0.25+0.01795+0.00128)/(0.75-0.067)**2)\n", + "RV= RV1+RV2\n", + "E = (Q1*RV)/(4*pi*e0*10**10)\n", + "print\"Maximum field = V/m per volt\",E\n", + "\n", + "#Answers vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_6 pgno:66" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part a\t\n", + "Equivalent radius = m 0.0887411967465\n", + "Charge per bundle = uC/m 4.88704086264e-06\n", + "Charge per sunconducter = uC/m 2.44352043132e-06\n", + "\tPart b\n", + "\tSub part 1\t\n", + "Maximum feild = V/m \t2607466.95017\n", + "Maximum feild = V/m \t2412255.52075\n", + "Maximum feild = V/m \t2509861.23546\n", + "\tSub part 2\t\n", + "EO1 = V/m \t2597956.83558\n", + "EO2 = V/m \t2597429.47744\n", + "EI1 = V/m \t2402709.21273\n", + "EI2 = V/m \t2402258.0563\n", + "\tPart c\t\n", + "The average of the maximum gradient = V/m \t2597693.15651\n" + ] + } + ], + "source": [ + "#Chapter 2, Exmaple 6, page 66\n", + "#calculation based on figure 2.32\n", + "\n", + "#(a)Charge on each bundle\n", + "print\"Part a\\t\"\n", + "req = (0.0175*0.45)**0.5\n", + "print\"Equivalent radius = m \", req\n", + "from math import log\n", + "from math import pi\n", + "V = 400*10**3 #Voltage\n", + "H = 12. #bundle height in m\n", + "d = 9. #pole to pole spacing in m\n", + "e0 = 8.85418*10**-12 #Epselon nought\n", + "Hd = ((2*H)**2+d**2)**0.5#2*H**2 + d**2\n", + "Q = V*2*pi*e0/(log((2*H/req))-log((Hd/d)))\n", + "q = Q/2\n", + "print\"Charge per bundle = uC/m \",Q #micro C/m\n", + "print\"Charge per sunconducter = uC/m \",q #micro C/m\n", + "\n", + "#(b part i)Maximim & average surface feild\n", + "print\"\\tPart b\"\n", + "print\"\\tSub part 1\\t\"\n", + "r = 0.0175 #subconductor radius\n", + "R = 0.45 #conductor to subconductor spacing\n", + "MF = (q/(2*pi*e0))*((1/r)+(1/R)) # maximum feild\n", + "print\"Maximum feild = V/m \\t\",MF\n", + "MSF = (q/(2*pi*e0))*((1/r)-(1/R)) # maximum surface feild\n", + "print\"Maximum feild = V/m \\t\",MSF\n", + "ASF = (q/(2*pi*e0))*(1/r) # Average surface feild\n", + "print\"Maximum feild = V/m \\t\",ASF\n", + "\n", + "#(b part ii) Considering the two sunconductors on the left\n", + "print\"\\tSub part 2\\t\"\n", + "#field at the outer point of subconductor #1 \n", + "drO1 = 1/(d+r)\n", + "dRrO1 = 1/(d+R+r)\n", + "EO1 = MF -((q/(2*pi*e0))*(drO1+dRrO1))\n", + "print\"EO1 = V/m \\t\",EO1\n", + "#field at the outer point of subconductor #2 \n", + "drO2 = 1/(d-r)\n", + "dRrO2 = 1/(d-R-r)\n", + "EO2 = MF -((q/(2*pi*e0))*(dRrO2+drO2))\n", + "print\"EO2 = V/m \\t\",EO2\n", + "\n", + "#field at the inner point of subconductor #1 \n", + "drI1 = 1/(d-r)\n", + "dRrI1 = 1/(d+R-r)\n", + "EI1 = MSF -((q/(2*pi*e0))*(drI1+dRrI1))\n", + "print\"EI1 = V/m \\t\",EI1\n", + "#field at the inner point of subconductor #2 \n", + "drI2 = 1/(d+r)\n", + "dRrI2 = 1/(d-R+r)\n", + "EI2 = MSF -((q/(2*pi*e0))*(dRrI2+drI2)) \n", + "print\"EI2 = V/m \\t\",EI2\n", + "\n", + "#(part c)Average of the maximim gradient\n", + "print\"\\tPart c\\t\"\n", + "Eavg = (EO1+EO2)/2\n", + "print\"The average of the maximum gradient = V/m \\t\",Eavg\n", + "\n", + "\n", + "#Answers might vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_7 pgno:69" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electric Feild = V/m \t30015596280.4\n" + ] + } + ], + "source": [ + "#Chapter 2, Exmaple 7, page 69\n", + "#Electric feild induced at x\n", + "from math import pi\n", + "e0 = 8.85418*10**-12 #Epselon nought\n", + "q = 1 # C/m\n", + "C = (q/(2*pi*e0))\n", + "#Based on figure 2.33\n", + "E = C-(C*(1./3.+1./7.))+(C*(1+1./5.+1./9.))+(C*(1./5.+1./9.))-(C*(1./3.+1./7.))\n", + "print\"Electric Feild = V/m \\t\",E\n", + "\n", + "#Answers might vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_8 pgno:70" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Thickness of graded design= cm 4.24264068712\n", + "Curve = cm**2 62.4264068712\n", + "V1 = cm**3 47402.906725\n", + "Thickness of regular design = cm 14.684289433\n", + "V2 = cm**3 8619.45\n" + ] + } + ], + "source": [ + "#Chapter 2, Exmaple 8, page 70\n", + "#Calculate the volume of the insulator\n", + "#Thinkness of graded design\n", + "from math import e\n", + "from math import pi\n", + "V = 150*(2)**0.5\n", + "Ebd = 50\n", + "T = V/Ebd\n", + "print\"\\nThickness of graded design= cm \",T\n", + "#Based on figure 2.24\n", + "r = 2 # radius of the conductor\n", + "l = 10 #length of graded cylinder; The textbook uses 10 instead of 20\n", + "zr = l*(T+r)\n", + "print\"Curve = cm**2 \",zr\n", + "#Volume of graded design V1\n", + "V1 = 4*pi*zr*(zr-r)\n", + "print\"V1 = cm**3 \",V1 #Unit is wrong in the textbook\n", + "#Thickness of regular design as obtained form Eq.2.77\n", + "pow = V/(2*Ebd)\n", + "t = 2*(e**pow-1)\n", + "print\"Thickness of regular design = cm \",t\n", + "#Volume of regular design V2\n", + "V2 = pi*((2+t)**2-4)*10\n", + "print\"V2 = cm**3 \",round(V2,2)#unit not mentioned in textbook\n", + " \n", + "#Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_11 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The values of Phi2 and Phi4 are: [[ 3.6568 -326.5 ]\n", + " [-261.92857143 4.37537287]]\n" + ] + } + ], + "source": [ + "#Chapter 2, Exmaple 11, page 75\n", + "#Calculate the potential within the mesh\n", + "#Based on figure 2.38(b)\n", + "#equations are obtained using Eq.2.46\n", + "import numpy\n", + "from numpy import linalg\n", + "A1 = 1/2*(0.54+0.16)\n", + "A2 = 1/2*(0.91+0.14)\n", + "S = numpy.matrix([[0.5571, -0.4571, -0.1],[-0.4751, 0.828, 0.3667],[-0.1, 0.667, 0.4667]])\n", + "#By obtaining the elements of the global stiffness matrix(Sadiku,1994)\n", + "#and by emplying the Eq.2.49(a)\n", + "S1 = numpy.matrix([[1.25, -0.014],[-0.014, 0.8381]])\n", + "S2 = numpy.matrix([[-0.7786, -0.4571],[-0.4571, -0.3667]])\n", + "Phi13 = numpy.matrix([[0], [10]])\n", + "val1 = S2*Phi13\n", + "Phi24 = val1/S1\n", + "print\"The values of Phi2 and Phi4 are:\",-Phi24\n", + "\n", + "#Answers may vary due to round of error \n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb new file mode 100755 index 00000000..da216aac --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb @@ -0,0 +1,699 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 Ionization and Deionization Processes in Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_1 pgno:130" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity of Oxygen (O2)= m^2/s^2 102978\n", + "Velocity of Oxygen (O)= m/s 320.901854155\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 1, page 103\n", + "#Movement of oxygen molecule\n", + "\n", + "#using equation 3.3\n", + "R = 3814 # J/Kg.mol.K\n", + "T = 300 # K\n", + "M = 32 # mol^-1\n", + "V2 = 3*R*(T/M)\n", + "V = (V2)**0.5\n", + "print\"Velocity of Oxygen (O2)= m^2/s^2\",V2\n", + "#Since Oxygen is a diatomic gas\n", + "print\"Velocity of Oxygen (O)= m/s\",V\n", + "#Velocity of oxygen is about 300 m/s\n", + "\n", + "#Answer given in the textbook is wrong\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_2 pgno:104" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "G = m^3\t0.001563967325\n", + "K.E = J\t157.960699825\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 2, page 104\n", + "#Kinetic energy of oxygen molecule\n", + "#from Eq.3.2\n", + "G = (2*10**-3/32)*(8314*298*1.01*10**5)*10**-10\n", + "print\"\\nG = m^3\\t\",G # Answer is is wrong in the text \n", + "#From equation 3.1\n", + "mv2 = 3/2*1.01*10**5 # 1/2*m0*v^2\n", + "KE = mv2*G#total transalational K.E\n", + "print\"K.E = J\\t\",KE\n", + "#Answer may varry due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_3 pgno:104" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "N = 3.63168110755e-20\n", + "\n", + "Pressure = N/m**2 0.196\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 3, page 104\n", + "#Maximum pressure in the chamber\n", + "from math import pi\n", + "#Making use of equation 3.10\n", + "N1 = (4*pi*1.7*1.7*0.10*10**-10*10**-10)\n", + "N = 1/N1\n", + "#Using equation 3.2\n", + "R = 8314 # J/Kg*mol*K \n", + "M = 28 # Mol**-1\n", + "N = 220*10**-8 # Kg\n", + "T = 300 # K\n", + "p = N/M*R*T\n", + "print\"\\nN = \",N1\n", + "print\"\\nPressure = N/m**2\",round(p,3)\n", + "\n", + "#Answer vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_4 pgno:105" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "K.E = J 1.6e-19\n", + "\n", + "Temperature = K 7729.0\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 4, page 105\n", + "#Temperature & Average K.E of He atom\n", + "\n", + "m0 = 1\n", + "v2 = 1.6*10**-19 # V**2\n", + "KE = m0*v2\n", + "#Using equation 3.3\n", + "T = 2*KE/(3*1.38*10**-23) \n", + "print\"\\nK.E = J\",KE\n", + "print\"\\nTemperature = K\",round(T)\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_5 pgno:105" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Volume of He = m^3 11.15\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 5, page 105\n", + "#Volume of Helium \n", + "\n", + "# Using equation 3.2\n", + "G = (1*8314*273)/(2.016*1.01*10**5)\n", + "print\"\\nVolume of He = m^3\",round(G,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_6 pgno:105" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " \n", + " Mean free path = *n0 0.367879441171\n", + "\n", + " 5 times mean free path = *n0 0.0067\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 6, page 105\n", + "#Determine mean free path \n", + "from math import e\n", + "#(a) Mean free path\n", + "na = e**-1\n", + "#(b) 5 times mean free path\n", + "nb = e**-5\n", + "print\"\\n Mean free path = *n0 \",na\n", + "print\"\\n 5 times mean free path = *n0 \",round(nb,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_7 pgno:105" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "V**2 = m**2/s**2 1702247.19101\n", + "\n", + "Mean square velocity = m/s 1305.0\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 7, page 105\n", + "#Mean square velocity of Helium \n", + "\n", + "#based on equation 3.2 and 3.3 we derive the gas density\n", + "N = 178*10**-3 # kg/m**3\n", + "# calculating mean square velocity\n", + "v2 = (3*1.01*10**5)/N\n", + "print\"\\nV**2 = m**2/s**2\",v2\n", + "v = (v2)**0.5\n", + "print\"\\nMean square velocity = m/s\",round(v)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_8 pgno:106" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "1/2*m*v^2 = J 4.0434e-19\n", + "\n", + "Energy of free electron = eV 3.317125\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 8, page 106\n", + "#Energy of free electron\n", + "\n", + "#Using equation 3.3\n", + "mv2 = (3/2*1.38*10**-21*293) # 1/2*m*v^2\n", + "E = mv2*10**38/1.6*10**-19+0.79\n", + "print\"\\n1/2*m*v^2 = J\",mv2\n", + "print\"\\nEnergy of free electron = eV\",round(E,2)\n", + "\n", + "#Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_9 pgno:106" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Number od atoms per cm^3 = 4.5183e+22\n", + "\n", + "Average vloume occupied by one atom = cm^3 2.21322178696e-23\n", + "\n", + "Average separation between atoms = cm 2.807641e-08\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 9, page 106\n", + "#Average separation and volume occupied by one atom\n", + "\n", + "NA = 6.0244*10**23\n", + "NoA = NA*0.075 # Number of atoms/cm^3\n", + "V = 1/NoA # Average volume occupied by one atom\n", + "S = 2.807641e-08#nthroot(V,3) # Average separation between atoms\n", + "print\"\\nNumber od atoms per cm^3 = \",NoA\n", + "print\"\\nAverage vloume occupied by one atom = cm^3\",V\n", + "print\"\\nAverage separation between atoms = cm\",S\n", + "\n", + "\n", + "#Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_10 pgno:106" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Photon energy eV = 62.25\n", + "\n", + "Kinetic energy eV = 48.65\n", + "\n", + "Velocity m/s = 4133873.88319\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 10, page 106\n", + "#KE and velocity of photoelectron\n", + "\n", + "h = 4.15*10**-15\n", + "c = 3*10**8\n", + "l = 200*10**-10\n", + "BE = 13.6 # Binding energy\n", + "PE = h*c/l\n", + "KE = PE-BE # Kinetic energy of photoelectron\n", + "Ve = ((2*KE*1.6*10**-19)/9.11*10**-31)**0.5*10**31\n", + "print\"\\nPhoton energy eV = \",PE\n", + "print\"\\nKinetic energy eV = \",KE\n", + "print\"\\nVelocity m/s = \",Ve\n", + "\n", + "#Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_11 pgno:107" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Liquid photon absorption coefficient cm^-1 = 0.0896\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 11, page 107\n", + "#Find the absorption coefficient\n", + "from math import log\n", + "# Using equation 3.20\n", + "x = 20.\n", + "I0 = 6.\n", + "Mu = -1/x*log(1/I0)\n", + "print\"\\nLiquid photon absorption coefficient cm^-1 = \",round(Mu,4)\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_12 pgno:107" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Binding Energy = eV 12.45\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 12, page 107\n", + "#Binding energy\n", + "h = 4.15*10**-15\n", + "c = 3*10**8\n", + "Imax = 1000*10**-10\n", + "We = h*c/Imax\n", + "print\"\\nBinding Energy = eV \",We\n", + "\n", + "#Answer may vary due to round off errorS\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_14 pgno:108" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "N = atoms/m**3 3.52749208584e+22\n", + "\n", + "ra = m 2.7696940413e-10\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 14, page 108\n", + "#Diameter of argon atom\n", + "from math import pi\n", + "#As derived from example 13\n", + "N = (1.01*10**5/760)/(1.38*10**-23*273)\n", + "print\"\\nN = atoms/m**3 \",N\n", + "#Use equation 3.10\n", + "ra = ((85*10**2)/(pi*3.527*10**22))**0.5 \n", + "print\"\\nra = m \",ra\n", + "\n", + "#Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_15 pgno:109" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\\Mobility of electrons = m**2/s*V 9375.0\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 15, page 109\n", + "#Mobility of electrons\n", + "\n", + "Ie = 3\n", + "d = 0.8\n", + "A = 8*10**-4\n", + "Vne = 20*10**17 #V*ne\n", + "e = 1.6*10**-19\n", + "ke = (Ie*d)/(A*Vne*e)\n", + "print\"\\Mobility of electrons = m**2/s*V \",ke\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_17 pgno:110" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "+(0.02) = ions/m^3 1911913074.19\n", + "\n", + "+(-0.02) = ions/m^3 5.23036331254e+11\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 17, page 110\n", + "#Determine the ion density\n", + "from math import e\n", + "#Based on equation 3.50 and 3.52\n", + "nplus = 10**11*e**(-1.6*10**-19*5*0.02/(1.38*10**-23*293))\n", + "nminus = 10**10*e**(-1.6*10**-19*5*-0.02/(1.38*10**-23*293)) #textbook uses 0.02 inseatead of -0.02. In the program I have used -0.02\n", + "print\"\\n+(0.02) = ions/m^3 \",nplus\n", + "print\"\\n+(-0.02) = ions/m^3 \",nminus\n", + "\n", + "#answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_18 pgno:110" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " r1^2-r2^2 = 3.03255e-05\n", + "\n", + " r2 = m 0.00551502493195\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 18, page 110\n", + "#Determine the diameter\n", + "\n", + "#Based on the equation 3.40\n", + "k = 1.38*10**-23\n", + "T = 293\n", + "z2z1 = 0.05\n", + "e = 1.6*10**-19\n", + "E = 250\n", + "r1 = 0.09*10**-6\n", + "r1r2 = (6*k*T*z2z1)/(e*E)\n", + "r2 = (r1+r1r2)**0.5\n", + "print\"\\n r1^2-r2^2 = \",r1r2\n", + "print\"\\n r2 = m \",r2\n", + "\n", + "#answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_19 pgno:111" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " lambda = m 0.000222148172831\n", + "\n", + " Vi = V 28.5\n" + ] + } + ], + "source": [ + "#Chapter 3, Exmaple 19, page 111\n", + "#Determine mean free path and ionization\n", + "\n", + "#(a)Mean free path\n", + "#Based on equation 3.14 and 3.15\n", + "lamb = 1/(9003*0.5);\n", + "#(b)Ionization potential\n", + "Vi = 256584./9003.\n", + "print\"\\n lambda = m \",lamb\n", + "print\"\\n Vi = V \",round(Vi,1)\n", + "\n", + "#answers may vary due to round off error\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb new file mode 100755 index 00000000..907ccacf --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb @@ -0,0 +1,557 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Electrical Breakdown of Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_1 pgno:139" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Part (a)\n", + " alpha = m^-1 460.517018599\n", + "\n", + " Part (b)\n", + " I0 = 2.7e-09\n", + "\n", + " No of electrons emitted = electrons/s 16875000000.0\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 1, page 139\n", + "#Claculate alpha and No. of electrons emmited\n", + "from math import log,e\n", + "#Claculate (a)alpha\n", + "d2 = 0.01\n", + "d1 = 0.005\n", + "I2 = 2.7*10**-7\n", + "I1 = 2.7*10**-8\n", + "alpha = 1/(d2-d1)*log(I2/I1)\n", + "#(b)number of electrons emmited from cathode per second\n", + "I0 = I1*e**(-alpha*d1)\n", + "n0 = I0/(1.6*10**-19)\n", + "print\"\\n Part (a)\\n alpha = m^-1\",alpha\n", + "print\"\\n Part (b)\\n I0 = \",I0\n", + "print\"\\n No of electrons emitted = electrons/s\",n0\n", + "#Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2 pgno:140" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " a*d = 20.7232658369\n", + "\n", + " electrode space = m 0.045\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 2, page 140\n", + "#Claculate electrode space\n", + "from math import log\n", + "#based on the values of example 1\n", + "d2 = 0.01\n", + "d1 = 0.005\n", + "I2 = 2.7*10**-7\n", + "I1 = 2.7*10**-8\n", + "a = 1/(d2-d1)*log(I2/I1) # alpha\n", + "#10**9 = %e**a(a*d) \n", + "#multiplying log on bith sides log(10**9) = a*d\n", + "ad = log(10**9)\n", + "print\"\\n a*d = \",ad\n", + "d = ad/a\n", + "print\"\\n electrode space = m\",d\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_3 pgno:140" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Avalanche size = m 6766.0\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 3, page 140\n", + "#Claculate size of developed avalanche\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "\n", + "a = 4*10**4\n", + "b = 15*10**5\n", + "#Rewriting equation 4.2\n", + "x0=0;x1=0.0005;\n", + "def fun1(x):\n", + "\ty=a-b*(x)**0.5\n", + "\treturn y\n", + "X=scipy.integrate.quad(fun1,x0,x1);\n", + "expX=6765.964568 \n", + "As = expX # Avelanche size\n", + "print\"\\n Avalanche size = m\",round(As)\n", + " \n", + "#Answers may vary due to round of error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_4 pgno:141" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " m or m away from the cathode 0.0517 0.00155\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 4, page 141\n", + "#Claculate distance to produce avalanche\n", + "\n", + "#Rewrite equation 4.2\n", + "#using the values of a and b from previous example\n", + "#convert integartion to quaderatic equation form\n", + "#x=poly(0,\"x\");\n", + "import numpy\n", + "\n", + "p=numpy.array([7.5*10**5, 59.97-4*10**4, 59.97])\n", + "r=numpy.roots(p)\n", + " #obtaining the roots\n", + "print\"\\n m or m away from the cathode\",round(r[0],4),round(r[1],5)\n", + "\n", + "#Answer may vary due to round of error.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_5 pgno:141" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Minimum distance = m 0.0011\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 5, page 141\n", + "#Claculate minimum distance to produce avalanche of size 10^19\n", + "\n", + "#Rewriting equation 4.2 and converting it into quadratic equation\n", + "#x=poly(0,\"x\");\n", + "import numpy\n", + "\n", + "p=numpy.array([7.5*10**5, 4*10**4, 43.75])\n", + "r=numpy.roots(p)\n", + " #obtaining the roots\n", + "print\"\\n Minimum distance = m\",round(-r[1],4)# other root is disregarded\n", + "\n", + "#Answer may vary due to round of error.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_7 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " E = V/m 4500000.0\n", + "\n", + " Alpha = m^-1 2397.29425605\n", + "\n", + " Total secondary coefficient of ionization = 0.00834\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 7, page 142\n", + "#Claculate secondary coefficient\n", + "from math import exp\n", + "#Using equation 3.15\n", + "E = 9*10**3/0.002\n", + "T = 11253.7 # m^-7*kPa^-1\n", + "B = 273840 # V/mkPa\n", + "p = 101.3 # kPa or 1 atm\n", + "d = 0.002 # m\n", + "alpha = p*T*exp(-B*p/E)\n", + "Y = 1/(exp(alpha*d)-1)\n", + "print\"\\n E = V/m\",E\n", + "print\"\\n Alpha = m^-1\",alpha\n", + "print\"\\n Total secondary coefficient of ionization = \",round(Y,5)\n", + "\n", + "\n", + "#Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_8 pgno:143" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Alpha 1 = m^-1 39.8\n", + "\n", + " Alpha 2 = m^-1 39.8\n", + "\n", + " Alpha 3 = m^-1 41.97\n", + "\n", + " From the above results we can understand that ionization mechanism must be acting at d3 \n", + "\n", + " secondary ionization coefficient = 0.0363\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 8, page 143\n", + "#Claculate first and secondary ionization coefficient\n", + "from math import log\n", + "from math import exp\n", + "#(a)first ionization coefficient\n", + "#Using equation 4.7a\n", + "d1 = 0.005\n", + "a1d1 = log(1.22)\n", + "a1 = a1d1/d1\n", + "\n", + "d2 = 0.01504\n", + "a2d2 = log(1.82)\n", + "a2 = a2d2/d2\n", + "\n", + "d3 = 0.019 # wrong value used in the text\n", + "a3d3 = log(2.22)\n", + "a3 = a3d3/d3\n", + "\n", + "print\"\\n Alpha 1 = m^-1\",round(a1,1)\n", + "print\"\\n Alpha 2 = m^-1\",round(a2,1)\n", + "print\"\\n Alpha 3 = m^-1\",round(a3,2)\n", + "print\"\\n From the above results we can understand that ionization mechanism must be acting at d3 \"\n", + "\n", + "#secondary ionization coefficient\n", + "I = 2.22\n", + "e = exp(a1*d3)\n", + "Y = (I-e)/(I*(e-1))\n", + "print\"\\n secondary ionization coefficient = \",round(Y,4)\n", + "\n", + "#Answer may vary due to round off error.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_9 pgno:144" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Distance = m 0.085\n", + "\n", + " E = V/m 1596.0\n", + "\n", + " Volatge = V 135.37\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 9, page 144\n", + "#Claculate distance and voltage\n", + "from math import log\n", + "a = 39.8 # alpha\n", + "Y = 0.0354 # corfficient\n", + "p = 0.133 # kPa\n", + "Ep = 12000 # E/P , unit : V/m*kPa\n", + "\n", + "d = (1/a)*(log(1/Y + 1)) # distance\n", + "E = Ep*p\n", + "V = E*d\n", + "\n", + "print\"\\n Distance = m\",round(d,3)\n", + "print\"\\n E = V/m\",E\n", + "print\"\\n Volatge = V\",round(V,2)\n", + "\n", + "#Answers may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_10 pgno:144" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " E = V/m 5952875.253\n", + "\n", + " Voltage breakdown = kV 5.95\n", + "\n", + " Voltage breakdown = kV 4.68\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 10, page 144\n", + "#Claculate (a)Raether's criterion (b)Meek and Lobe's criterion\n", + "from math import log\n", + "#(a)Raether's criterion\n", + "# as assumed by Raether and based equation 3.3, 3.50, 4.22 and 4.23\n", + "d = 0.001 # m\n", + "alpha = 10792.2 # m**-1\n", + "p = 101.3 #kPa**-1\n", + "ap = 106.54 # alpha/p Unit: m**-1*kPa**-1\n", + "T = 11253.7 # m**-1*kPa**-1\n", + "B = 273840 # V/m*kPa\n", + "Ep = 58764.81 # E/p Unit:V/m*kPa\n", + "\n", + "ad = 17.7 + log(d)\n", + "E = Ep*p\n", + "Vs = E*d*10**-3 #Voltage breakdown\n", + "print\"\\n E = V/m\",E\n", + "print\"\\n Voltage breakdown = kV\",round(Vs,2)\n", + "\n", + "#(b)Meek and Loeb's criterion\n", + "#Using equation 4.11 and based on 4.24 & 4,25 \n", + "#+ we get Er = 468*10**4 V/m\n", + "Er = 468*10**4 # V/m\n", + "Vs2 = Er*0.001*10**-3\n", + "print\"\\n Voltage breakdown = kV\",Vs2\n", + "\n", + "# Answers may vary due to round of error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_11 pgno:146" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Electron drift velocity = m/s 250000.0\n", + "\n", + " alpha = m**-1 114.3\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 11, page 146\n", + "#Claculate the first Townsend's ionization coefficient\n", + "\n", + "t = 0.2*10**-6 # transit time of electrons in seconds\n", + "d = 0.05 # m\n", + "ve = d/t\n", + "TC = 35*10**-9 # Time constant\n", + "a = 1/(ve*TC)\n", + "print\"\\n Electron drift velocity = m/s\",ve\n", + "print\"\\n alpha = m**-1\",round(a,1)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_12 pgno:146" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Ea = V/m 2828427.12475\n", + "\n", + " x = *sin(3.14*t) 1.26043075492\n", + "\n", + " t = ms 0.0252934474843\n", + "\n", + " fmax = Hz 630.2\n" + ] + } + ], + "source": [ + "#Chapter 4, Exmaple 12, page 146\n", + "#Travel time and maximum frequency\n", + "from math import pi\n", + "from math import asin\n", + "\n", + "#(a)Determine the travel time\n", + "Ea = 200*(2)**0.5*10**3/0.1\n", + "x = 1.4*10**-4*2828.4*10**3/(2*pi*50)\n", + "d = 0.1\n", + "print\"\\n Ea = V/m\",Ea\n", + "print\"\\n x = *sin(3.14*t)\",x\n", + "#obtaining t from x\n", + "t = asin(d/x)/3.14\n", + "print\"\\n t = ms\",t# answer mentioned in the text is wrong\n", + "#(b)Determine the maximum frequency\n", + "k = 1.4*10**-4\n", + "fmax = k*Ea/(2*pi*d)\n", + "print\"\\n fmax = Hz\",round(fmax,1)\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb new file mode 100755 index 00000000..b414db5a --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb @@ -0,0 +1,428 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 The Corona Discharge" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2 pgno:173" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Part (a): based on equation 4.13\n", + "\n", + " Breakdown voltage = V or kV 9005.94518519 9.0\n", + "\n", + " Part (b):Corrsponding to an avelanche size of 10**8\n", + "\n", + " Breakdown voltage = V or kV 9688.16740741 9.7\n", + "\n", + " Part (c):According to criteria expressed by Equations 5.4 and 5.5\n", + "\n", + " Breakdown voltage = kV or kV 9.4 9.2\n" + ] + } + ], + "source": [ + "#Chapter 5, Exmaple 2, page 173\n", + "#Calculate breakdown voltage\n", + "\n", + "#(a)Based on equation 4.13\n", + "p = 101.3 # kPa\n", + "Ep = 2400.4/0.027\n", + "E = p*Ep\n", + "d = 1*10**-3 # 1 mm\n", + "Vs1 = E*d\n", + "print\"\\n Part (a): based on equation 4.13\"\n", + "print\"\\n Breakdown voltage = V or kV\",Vs1,round(Vs1*10**-3)\n", + "\n", + "#(b)Corrsponding to an avelanche size of 10**8\n", + "p = 101.3 # kPa\n", + "Cp = Ep*0.027*p\n", + "Vs2 = (18.42 + (Cp*10**-3))/0.027\n", + "print\"\\n Part (b):Corrsponding to an avelanche size of 10**8\"\n", + "print\"\\n Breakdown voltage = V or kV\",Vs2,round(Vs2*10**-3,1)\n", + "\n", + "#(b)According to criteria expressed by Equations 5.4 and 5.5\n", + "p = 101.3 # kPa\n", + "Vs3a = 9.4\n", + "Vs3b = 9.2\n", + "print\"\\n Part (c):According to criteria expressed by Equations 5.4 and 5.5\"\n", + "print\"\\n Breakdown voltage = kV or kV\",Vs3a,Vs3b\n", + "\n", + "#Answer may vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_3 pgno:174" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Part (a): based on equation 5.14\n", + "\n", + " Breakdown voltage = kV or kV 27.0178355556 45.03\n", + "\n", + " Part (b):According to eqution 5.13\n", + "\n", + " Breakdown voltage = V or kV 27.7000577778 45.71\n", + "\n", + " Part (c):According to criteria expressed by Equations 5.4 and 5.5\n", + "\n", + " Breakdown voltage = kV or kV 27.7 45.5\n" + ] + } + ], + "source": [ + "#Chapter 5, Exmaple 3, page 174\n", + "#Calculate breakdown voltage at atm pressure 3 and 5\n", + "\n", + "#(a)Based on equation 5.14\n", + "p = 101.3 # kPa\n", + "Ep = 2400.4/0.027\n", + "E = p*Ep\n", + "d = 1*10**-3 # 1 mm\n", + "Vs13 = E*d*3 # at 3 atm\n", + "Vs15 = E*d*5 # at 5 atm\n", + "print\"\\n Part (a): based on equation 5.14\"\n", + "print\"\\n Breakdown voltage = kV or kV\",Vs13*10**-3,round(Vs15*10**-3,2)\n", + "\n", + "#(b)According to eqution 5.13\n", + "p = 101.3 # kPa\n", + "Cp3 = Ep*0.027*p*3 # at 3 atm\n", + "Vs23 = (18.42 + (Cp3*10**-3))/0.027\n", + "Cp5 = Ep*0.027*p*5 # at 5 atm\n", + "Vs25 = (18.42 + (Cp5*10**-3))/0.027\n", + "print\"\\n Part (b):According to eqution 5.13\"\n", + "print\"\\n Breakdown voltage = V or kV\",Vs23*10**-3,round(Vs25*10**-3,2)\n", + "\n", + "#(b)According to criteria expressed by Equations 5.4 and 5.5\n", + "p = 101.3 # kPa\n", + "Vs3a = 27.73 # at 3 atm\n", + "Vs3b = 45.5 # at 5 atm\n", + "print\"\\n Part (c):According to criteria expressed by Equations 5.4 and 5.5\"\n", + "print\"\\n Breakdown voltage = kV or kV\",round(Vs3a,1),round(Vs3b,1)\n", + "\n", + "#Answer may vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_8 pgno:179" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " E0 = kVpeak/cm 39.0\n", + "\n", + " Part (a)\n", + "\n", + " The postive corona = kVpeak 241.8\n", + "\n", + " The negative corona = kV 171.0\n", + "\n", + " Part (b)\n", + "\n", + " The postive corona = kVpeak 324.48\n", + "\n", + " The negative corona = kV 228.8\n", + "\n", + " Part (c)\n", + "\n", + " The postive corona = kVpeak 388.83\n", + "\n", + " The negative corona = kV 274.2\n", + "\n", + " Part (d)\n", + "\n", + " The postive corona = kVpeak 444.21\n", + "\n", + " The negative corona = kV 313.2\n" + ] + } + ], + "source": [ + "#Chapter 5, Exmaple 8, page 179\n", + "#Calculate corona onset voltage\n", + "\n", + "s = 4 # cm\n", + "r = 1 # cm\n", + "D = 5*10^2 # cm\n", + "dt = 1\n", + "E0 = 30*dt*(1 + 0.3*(dt*r)**0.5)\n", + "print\"\\n E0 = kVpeak/cm\",E0\n", + "#using equations (5.18), the positive and negative corona\n", + "En = 27.501 # kVpeak/cm\n", + "#part a\n", + "Vp1 = 6.2*E0\n", + "Vn1 = 6.2*En\n", + "print\"\\n Part (a)\"\n", + "print\"\\n The postive corona = kVpeak\",Vp1\n", + "print\"\\n The negative corona = kV\",round(Vn1)\n", + "#part b\n", + "Vp2 = 8.32*E0\n", + "Vn2 = 8.32*En\n", + "print\"\\n Part (b)\"\n", + "print\"\\n The postive corona = kVpeak\",Vp2\n", + "print\"\\n The negative corona = kV\",round(Vn2,1)\n", + "#part c\n", + "Vp3 = 9.97*E0\n", + "Vn3 = 9.97*En\n", + "print\"\\n Part (c)\"\n", + "print\"\\n The postive corona = kVpeak\",Vp3\n", + "print\"\\n The negative corona = kV\",round(Vn3,1)\n", + "#part d\n", + "Vp4 = 11.39*E0\n", + "Vn4 = 11.39*En\n", + "print\"\\n Part (d)\"\n", + "print\"\\n The postive corona = kVpeak\",Vp4\n", + "print\"\\n The negative corona = kV\",round(Vn4,1)\n", + "\n", + "#Answer CONSIDERABLY vary due to round off error.\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_9 pgno:180" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Mean geometric distance between the conductors m 6.004626\n", + "\n", + " E0 = kVpeak/cm 39.0\n", + "\n", + " V0peak = kVpeak 249.510313968\n", + "\n", + " V0 = kV 175.9\n" + ] + } + ], + "source": [ + "#Chapter 5, Exmaple 9, page 180\n", + "#Calculate corona onset voltage\n", + "from math import log\n", + "t = 5*5*8.66 # the three side of the trangle in m\n", + "Deq = 6.004626#nthroot(t,3) \n", + "dt = 1 #delta = 1 at standard temperature and pressure\n", + "r = 1 #radius of the conductor\n", + "En = 27.501 # kVpeak/cm\n", + "E0 = 30*dt*(1 + 0.3*(dt*r)**0.5)\n", + "V0peak = E0*log(Deq*10**2)\n", + "V0 = En*log(Deq*10**2)\n", + "\n", + "print\"\\n Mean geometric distance between the conductors m\",Deq\n", + "print\"\\n E0 = kVpeak/cm\",E0\n", + "print\"\\n V0peak = kVpeak\",V0peak\n", + "print\"\\n V0 = kV\",round(V0,1)\n", + "\n", + "#Answers may vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_10 pgno:180" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Reative air density 0.600612870276\n", + "\n", + " Corona onset field = kVpeak/cm 19.409458636\n", + "\n", + " V0peak = kVpeak 124.175900467\n", + "\n", + " V0 = kV 175.943157549\n", + "\n", + " Ration of V0 = 1.56300480127\n", + "\n", + " Corona power loss Pc = kW/km 6.51960146384\n", + "\n", + " Corona current = mA/Km 41.1\n" + ] + } + ], + "source": [ + "#Chapter 5, Exmaple 10, page 180\n", + "#Calculate corona power loss\n", + "from math import log\n", + "p = 75 # pressure\n", + "t = 35 # temprature\n", + "m1 = 0.92\n", + "m2 = 0.95\n", + "t = 5*5*8.66 # the three side of the trangle in m\n", + "Deq = 6.004626#nthroot(t,3) \n", + "dt = (3.92*p)/(273+t) #Relative air density\n", + "E0 = 30*dt*(1 + 0.3*(dt)**0.5)*m1*m2\n", + "En = 27.501 # kVpeak/cm\n", + "Vph = (275*10**3)/(3)**0.5\n", + "V0peak = E0*log(Deq*10**2)\n", + "V0 = En*log(Deq*10**2)\n", + "V0ratio = 275/V0\n", + "print\"\\n Reative air density \",dt\n", + "print\"\\n Corona onset field = kVpeak/cm\",E0\n", + "print\"\\n V0peak = kVpeak\",V0peak\n", + "print\"\\n V0 = kV\",V0\n", + "print\"\\n Ration of V0 = \",V0ratio\n", + "K = 0.05 # K factor\n", + "Pc = (3.73*K*50*Vph**2)/(Deq*10**2)**2\n", + "Cc = Pc*10**3/Vph\n", + "print\"\\n Corona power loss Pc = kW/km\",Pc*10**-5\n", + "print\"\\n Corona current = mA/Km\",round(Cc*10**-2,1)\n", + "\n", + "#Answer vary due to round off error\n", + "#Some of the answers provided in the textbook are wrong\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_11 pgno:180" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " E0 = kVpeak/cm or 20 kV/cm 28.3912466575\n", + "\n", + " V0 = kV 425.955402321\n", + "\n", + " V0 (line to line) = kV 737.8\n", + "\n", + " Voltage (line to line) = kV 1312.5\n", + "\n", + " Envelope radius = 5 cm\n" + ] + } + ], + "source": [ + "#Chapter 5, Exmaple 11, page 180\n", + "#Calculate corona onset voltage and effective corona envelope\n", + "from math import log\n", + "#(a) corona onset voltage\n", + "r = 3.175 # cm\n", + "h = 13 # m\n", + "m= 0.9 # m1 and m2\n", + "dt = 1 # Relative air density\n", + "E0 = 30*dt*(1 + 0.3/(r)**0.5)*m*m\n", + "V0 = 20*r*log(2*h*10**2/r)\n", + "print\"\\n E0 = kVpeak/cm or 20 kV/cm\",E0\n", + "print\"\\n V0 = kV\",V0\n", + "print\"\\n V0 (line to line) = kV\",round(V0*(3)**0.5,1)\n", + "\n", + "#(b)Corona envelope at 2.5 p.u\n", + "V = 2.5*525 # line to line voltage * 2.5\n", + "print\"\\n Voltage (line to line) = kV\",V\n", + "#Solving the equations in trila and error method\n", + "print\"\\n Envelope radius = 5 cm\"\n", + "\n", + "# Answers may vary due to round off error.\n", + " \n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb new file mode 100755 index 00000000..71792aab --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb @@ -0,0 +1,74 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chpater 14 Overvoltages on Power systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_1 pgno453" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " f1 = Hz 183.776298474\n", + "\n", + " Time to crest = micro seconds 1360.0\n" + ] + } + ], + "source": [ + "#Chapter 14,Example 1, page 453\n", + "#Determine the time to crest \n", + "\n", + "\n", + "I = 400 # mH of inductance\n", + "L = 500*10**-3 # mH\n", + "C = 1.5*10**-6 # micro F\n", + "from math import pi,sqrt\n", + "f = 1/(2*pi*sqrt(L*C)) \n", + "t = 10**6/(4*f) # calulation done in the text is wrong\n", + "print\"\\n f1 = Hz\",f\n", + "print\"\\n Time to crest = micro seconds\",round(t)\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt new file mode 100755 index 00000000..9365c7b9 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt @@ -0,0 +1,10 @@ +Contributed By: Vedantam Lakshmi Manasa +Course: btech +College/Institute/Organization: K L university +Department/Designation: ECE +Book Title: High Voltage Engineering Theory and Practice +Author: M. Khalifa +Publisher: Marcel Dekker +Year of publication: 2000 +Isbn: 0824704029 +Edition: 2 \ No newline at end of file diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png new file mode 100755 index 00000000..dea34c4f Binary files /dev/null and b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png new file mode 100755 index 00000000..0cc6d038 Binary files /dev/null and b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png new file mode 100755 index 00000000..58da270c Binary files /dev/null and b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png differ diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb new file mode 100755 index 00000000..3986f8e6 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb @@ -0,0 +1,49 @@ +{ + "metadata": { + "name": "ch1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 1 : The way of the program" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 1 Page no : 7" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 1 page no : 7\n'''\n\nprint \"Hello, world.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Hello, world.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb new file mode 100755 index 00000000..cd0445e0 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "ch10" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "CHAPTER 10. : VECTORS" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.1 page no :103\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.1 page no :103\n''' \n\nvalues = [] \nc = int(raw_input())\nwhile(c != -1):\n values.append(c)\n c = int(raw_input())\n\nsize=len(values)\nfor i in range(size):\n print values[i] ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "5\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "4\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "3\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "2\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "-1\n" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "5\n4\n3\n2\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.2 page no :104\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.2 page no :104\n'''\nimport random\n\nfor i in range(4):\n x = random.random();\n print x", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0.16979844903\n0.113100369897\n0.851107623696\n0.0966914962921\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.3 page no :105\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.3 page no :105\n'''\nimport random\ndef randomVector(n,upperBound):\n vec = []\n for i in range(n):\n vec.append(random.random () * 100 % upperBound)\n return vec\n\ndef printVector(vec):\n for i in range(len(vec)):\n print vec[i] ,\n\nnumValues = 20;\nupperBound = 10;\nvector = randomVector (numValues, upperBound);\nprintVector(vector)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.84318995426 8.49475291756 7.92488160107 3.93550646061 0.967457025838 6.72758767668 6.22192058422 8.19279912461 7.4898535715 3.02785494125 2.97556694487 4.70451449621 8.21039455753 2.95832700489 7.02858630112 8.72631899097 5.67567455024 7.48090989023 9.14911759876 9.82069257056\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.4 page no: 106\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.4 page no: 106\n'''\nimport random\ndef howMany(vec,value):\n count = 0\n for i in range(len(vec)):\n if (vec[i] == value):\n count += 1\n return count\n\ndef randomVector(n,upperBound):\n vec = []\n for i in range(n):\n vec.append(int(random.random () * 100 % upperBound))\n return vec\n \nnumValues = 20;\nupperBound = 10;\nvector = randomVector (numValues, upperBound);\nprint \"value \\t howMany\"\nfor i in range(upperBound):\n print i , '\\t' , howMany(vector, i)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "value \t howMany\n0 \t2\n1 \t2\n2 \t0\n3 \t4\n4 \t3\n5 \t1\n6 \t2\n7 \t1\n8 \t2\n9 \t3\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb new file mode 100755 index 00000000..3f21ca72 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "ch11" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "CHAPTER 11 : MEMBER FUNCTIONS" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.1 page no :112\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.1 page no :112\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n\nc = Time( 9, 14, 30.0 )\nc.printTime ()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.2 page no :114\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.2 page no :114\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def increment (self,secs):\n self.second += secs\n while (self.second >= 60.0):\n self.second -= 60.0;\n self.minute += 1;\n\n while (self.minute >= 60):\n self.minute -= 60.0;\n self.hour += 1;\n\nc = Time (9, 14, 30.0)\nc.increment (500.0);\nc.printTime ();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 22 : 50.0\nTime is 9 hour 22 minutes 50.0\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.3 page no :115\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.3 page no :115\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n\nc = Time (9, 14, 30.0)\nprint c.convertToSeconds()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "33270.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.4 page no :115\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.4 page no :115\n'''\n\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n def after (self,time2):\n if (self.hour > time2.hour):\n return True;\n if (self.hour < time2.hour): \n return False;\n if (self.minute > time2.minute): \n return True;\n if (self.minute < time2.minute):\n return False;\n if (self.second > time2.second): \n return True;\n return False;\n\nt1 = Time( 11, 59, 3.14159 )\nt2 = Time( 12, 42, 3.234 )\n\nif (t2.after(t1)):\n print \"The bread will be done after it starts.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The bread will be done after it starts.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.5 page no :116\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.5 page no :116\n'''\n\nclass Time:\n def __init__(self,h,m=None,s=None):\n if m==None:\n self.hour = int (secs / 3600.0);\n secs -= self.hour * 3600.0;\n self.minute = int (secs / 60.0); \n secs -= self.minute * 60.0;\n self.second = secs;\n else:\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\nc = Time (9, 14, 30.0)\nc.printTime()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.6 page no : 117\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.6 page no : 117\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\nc = Time (9, 14, 30.0)\nc.printTime()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.7 page no :119\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.7 page no :119\n'''\nclass Time:\n def __init__(self,h,m=None,s=None):\n if m==None:\n self.hour = int (secs / 3600.0);\n secs -= self.hour * 3600.0;\n self.minute = int (secs / 60.0); \n secs -= self.minute * 60.0;\n self.second = secs;\n else:\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def after (self,time2):\n if (self.hour > time2.hour):\n return True;\n if (self.hour < time2.hour): \n return False;\n if (self.minute > time2.minute): \n return True;\n if (self.minute < time2.minute):\n return False;\n if (self.second > time2.second): \n return True;\n return False;\n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n def increment (self,secs):\n self.second += secs\n while (self.second >= 60.0):\n self.second -= 60.0;\n self.minute += 1;\n\n while (self.minute >= 60):\n self.minute -= 60.0;\n self.hour += 1;\n\n def add(self,t2):\n a = t2.convertToSeconds()\n self.increment(a)\n\nc = Time(9, 14, 30.0)\nc.increment (500.0);\nc.printTime();\nb = Time(3, 35, 0.0);\ncurent = c\nc.add(b)\nd = c\nd.printTime()\nif(d.after(curent)):\n print \"The bread will be done after it starts.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 22 : 50.0\nTime is 9 hour 22 minutes 50.0\n12 : 57.0 : 50.0\nTime is 12 hour 57.0 minutes 50.0\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb new file mode 100755 index 00000000..c78a7ba1 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb @@ -0,0 +1,169 @@ +{ + "metadata": { + "name": "ch12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 12 : Vectors of Objects" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.1 page no :124\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.1 page no :124\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\nc = Card (0,3)\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.2 page no : 126\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.2 page no : 126\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\nc = Card (1, 11)\nc.print_ ();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Queen of Diamonds\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.3 page no :127\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.3 page no :127\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\nc1 = Card(1, 11);\nc2 =Card(1, 11);\nif (c1.equals(c2)):\n print \"Yup, that's the same card.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Yup, that's the same card.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.4 page no :129\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.4 page no :129\n'''\n\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def isGreater(self,c2):\n if (self.suit > c2.suit):\n return True;\n if (selfsuit < c2.suit):\n return False;\n if (self.rank > c2.rank):\n return True;\n if (self.rank < c2.rank):\n return False;\n return False;\n\nc1 = Card(2, 11)\nc2 = Card(1, 11)\nif (c1.isGreater (c2)):\n c1.print_()\n print \"is greater than\" \n c2.print_();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Queen of Hearts\nis greater than\nQueen of Diamonds\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.5 page no :130\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.5 page no :130\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n\ndef printDeck(deck):\n for i in range(len(deck)):\n deck[i].print_()\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nprintDeck(deck)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.6 page no : 131\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.6 page no : 131\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n \n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def find(self,deck):\n for i in range(len(deck)):\n if (self.equals(deck[i])):\n return i;\n return -1;\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nindex = deck[17].find (deck)\nprint \"I found the card at index = \" , index ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "I found the card at index = 17\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.7 page no : 133\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.7 page no : 133\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n \n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def find(self,deck):\n for i in range(len(deck)):\n if (self.equals(deck[i])):\n return i;\n return -1;\n \n def isGreater(self,c2):\n if (self.suit > c2.suit):\n return True;\n if (self.suit < c2.suit):\n return False;\n if (self.rank > c2.rank):\n return True;\n if (self.rank < c2.rank):\n return False;\n return False;\n \ndef findBisect(deck,card,low,high):\n print low , \", \" , high \n if (high < low):\n return -1;\n mid = (high + low) / 2\n if (card.equals(deck[mid])):\n return mid;\n if (deck[mid].isGreater (card)):\n return findBisect (deck, card,low, mid-1);\n else:\n return findBisect (deck,card, mid+1, high)\n\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nprint findBisect (deck, deck[23], 0, 51)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0 , 51\n0 , 24\n13 , 24\n19 , 24\n22 , 24\n23\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb new file mode 100755 index 00000000..f9a283c6 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "ch13" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 13 : Objects of Vectors" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.1 page no: 137\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.1 page no: 137\n'''\nclass Suit:\n CLUBS = 0\n DIAMOND = 1\n HEARTS = 2\n SPADES = 3\n\nclass Rank: \n ACE=1\n TWO = 2\n THREE = 3\n FOUR =4\n FIVE = 5\n SIX = 6\n SEVEN = 7\n EIGHT = 8\n NINE= 9\n TEN = 10\n JACK = 11 \n QUEEN = 12\n KING =13\n \nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\ndeck = []\n\nfor suit in range(Suit.SPADES):\n for rank in range(Rank.KING):\n a = Card(suit,rank)\n deck.append(a)\n \n\nfor i in deck:\n i.print_() ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.2 page no : 140\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.2 page no : 140\n'''\nclass Suit:\n CLUBS = 0\n DIAMOND = 1\n HEARTS = 2\n SPADES = 3\n\nclass Rank: \n ACE=1\n TWO = 2\n THREE = 3\n FOUR =4\n FIVE = 5\n SIX = 6\n SEVEN = 7\n EIGHT = 8\n NINE= 9\n TEN = 10\n JACK = 11 \n QUEEN = 12\n KING =13\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n \n for suit in range(Suit.SPADES):\n for rank in range(Rank.KING):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n\nd = Deck(52)\nd.print_()\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.3 page no : 142\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.3 page no : 142\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n\nd = Deck()\na = Card(1,11)\nprint a.find(d)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "24\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.4 page no :144\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.4 page no :144\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n return\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n \n def subdeck(self,low,high):\n sub = Deck(high-low+1)\n for i in range(len(sub.cards)):\n sub.cards.append(self.cards[low+i])\n return sub;\n\ndeck = Deck()\nhand1 = deck.subdeck (0, 4);\nhand2 = deck.subdeck (5, 9);\npack = deck.subdeck (10, 51);\n\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.5 page no : 146\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.5 page no : 146\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n return\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n \n def merge(self,d2):\n # create a new deck big enough for all the cards\n result = Deck (len(d1.cards)+ len(d2.cards));\n # use the index i to keep track of where we are in\n # the first deck, and the index j for the second deck\n i = 0;\n j = 0;\n # the index k traverses the result deck\n return result;", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb new file mode 100755 index 00000000..124b0855 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb @@ -0,0 +1,130 @@ +{ + "metadata": { + "name": "ch14" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 14 : Classes and invariants" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.1 page no :149\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.1 page no :149\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def getRank (self):\n return self.rank\n \n def getSuit (self):\n return self.suit\n \n def setRank(self,r):\n self.rank = r \n\n def setSuit (self, s):\n self.suit = s", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.2 page no :151\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.2 page no :151\ndefining class \n'''\n\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n pass\n else:\n self.real = r\n self.imag = i", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.3 page no : 152\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.3 page no : 152\n'''\nimport math\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n\n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def calculateCartesian (self):\n self.real = self.mag * math.cos(self.theta);\n self.imag = self.mag * math.sin (self.theta); \n self.cartesian = True;\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def printPolar(self):\n print self.mag , \" e^ \" , self.theta , \"i\"\n\n\nc1 = Complex(2.0, 3.0);\nc1.printCartesian();\nc1.printPolar();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "2.0 + 3.0 i\n0 e^ 0 i\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.4 page no : 155\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.4 page no : 155\n'''\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n\n def add(self,b):\n real = self.getReal() + b.getReal();\n imag = self.getImag() + b.getImag();\n s = Complex(real, imag);\n return s\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\nc1 = Complex(2.0, 3.0);\nc2 = Complex(3.0, 4.0);\ns = c1.add (c2);\ns.printCartesian();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "5.0 + 7.0 i\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.5 page no :156\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.5 page no :156\n'''\nimport math\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def calculateCartesian (self):\n self.real = self.mag * math.cos(self.theta);\n self.imag = self.mag * math.sin (self.theta); \n self.cartesian = True;\n\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def mult(self,b):\n mag = self.mag * b.mag\n theta = self.theta + b.theta\n product = Complex()\n product.setPolar (mag, theta);\n return product;\n\n def setPolar(self,m,t):\n self.mag = m\n self.theta = t;\n self.cartesian = False\n self.polar = True;\n\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.6 page no :159\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.6 page no :159\ndefining class Complex\n'''\n\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def mult(self,b):\n mag = self.mag * b.mag\n theta = a.theta + b.theta\n product = Complex()\n product.setPolar (mag, theta);\n return product;\n\n def setPolar(self,m,t):\n self.mag = m\n self.theta = t;\n self.cartesian = False\n self.polar = true;\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb new file mode 100755 index 00000000..cc4b221f --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb @@ -0,0 +1,127 @@ +{ + "metadata": { + "name": "ch15" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 15 : File Input/Output and apmatrixes" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 15.1 page no : 162\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 15.1 page no : 162\n'''\ntry:\n fileName = \"a.txt\"\n f = open(fileName,\"r\")\nexcept:\n print \"Unable to open the file named \" , fileName;\n import sys\n sys.exit(0)\n\n# reading file line by line\n \nfor i in f.readlines():\n print i\n\nf.close() ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SystemExit", + "evalue": "0", + "output_type": "pyerr", + "traceback": [ + "An exception has occurred, use %tb to see the full traceback.\n", + "\u001b[1;31mSystemExit\u001b[0m\u001b[1;31m:\u001b[0m 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Unable to open the file named a.txt\n" + }, + { + "output_type": "stream", + "stream": "stderr", + "text": "To exit: use 'exit', 'quit', or Ctrl-D.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 15.2 page no : 163\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 15.2 page no : 163\n'''\n\ntry:\n fileName = \"a.txt\"\n outputFile = \"b.txt\"\n f = open(fileName,\"r\")\n w = open(outputFile,\"w\")\nexcept:\n print \"Unable to open the file named \" , fileName;\n import sys\n sys.exit(0)\n\n# reading file line by line\n \nfor i in f.readlines():\n w.write(i)\n print i\n \nf.close()\nw.close() ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SystemExit", + "evalue": "0", + "output_type": "pyerr", + "traceback": [ + "An exception has occurred, use %tb to see the full traceback.\n", + "\u001b[1;31mSystemExit\u001b[0m\u001b[1;31m:\u001b[0m 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Unable to open the file named a.txt\n" + }, + { + "output_type": "stream", + "stream": "stderr", + "text": "To exit: use 'exit', 'quit', or Ctrl-D.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 15.3 page no : 167\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 15.3 page no : 167\n'''\n\nclass Set:\n def __init__(self,n):\n self.elements = []\n self.numElements = 0\n\n def getNumElements(self):\n return self.numElements\n\n def getElement(self,i):\n if (i < self.numElements):\n return slef.elements[i];\n else:\n print \"Set index out of range.\" \n import sys\n sys.exit(0)\n\n def find(self,s):\n for i in range(self.numElements):\n if (self.elements[i] == s): \n return i;\n return -1;\n\n def add(self,s):\n # if the element is already in the set, return its index\n index = self.find(s);\n if (index != -1):\n return index;\n # if the apvector is full, double its size\n # add the new elements and return its index\n self.elements.append(s)\n self.numElements += 1\n return self.numElements - 1;\n\ncities= Set (2);\ncity1 = 'ahmedabad'\ncity2 = 'rajkot'\nindex1 = cities.add(city1);\nindex2 = cities.add(city2)\nprint index1, index2", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0 1\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb new file mode 100755 index 00000000..b12d669c --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb @@ -0,0 +1,112 @@ +{ + "metadata": { + "name": "ch2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 2 : Variables and types" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 2.1 Page no : 11" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.1 page no :11\n'''\n\nprint \"Hello, world.\" \nprint \"How are you?\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Hello, world.\nHow are you?\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 2.2 Page no : 11/12" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.2 page no : 11/12\n'''\n\nprint \"Goodbye, \";\nprint \"cruel world!\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Goodbye, \ncruel world!\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 2.3 page no : 14\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.3 page no : 14\n'''\nhour = 11;\nminute = 59;\ncolon = ':';\nprint \"The current time is \",\nprint hour,colon,minute", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The current time is 11 : 59\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 2.4 page no : 16\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.4 page no : 16\n'''\n\nhour = 11;\nminute = 59;\nprint \"Number of minutes since midnight: \",\nprint hour*60 + minute \nprint \"Fraction of the hour that has passed: \",\nprint minute/60", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Number of minutes since midnight: 719\nFraction of the hour that has passed: 0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb new file mode 100755 index 00000000..303271a9 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb @@ -0,0 +1,133 @@ +{ + "metadata": { + "name": "ch3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 3 : Function" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.1 page no :25" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 3.1 page no :25\n'''\n\ndef newLine ():\n print ''\n\n\nprint \"First Line.\" \nnewLine ()\nprint \"Second Line.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "First Line.\n\nSecond Line.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.2 page no :25" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 3.2 page no :25\n'''\ndef newLine ():\n print ''\n\nprint \"First Line.\" \nnewLine ()\nnewLine ()\nnewLine ()\nprint \"Second Line.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "First Line.\n\n\n\nSecond Line.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.3 page no :26" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 3.3 page no :26\n'''\n\n\ndef newLine ():\n print ''\n\n\ndef threeLine ():\n newLine (); \n newLine ();\n newLine ();\n \nprint \"First Line.\" \nthreeLine()\nprint \"Second Line.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "First Line.\n\n\n\nSecond Line.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.4 page no :28" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# -*- coding: UTF-8 -*-\n'''\nexample 3.4 page no :28\n'''\n\ndef printTwice (phil):\n print phil , phil\n\n\nprintTwice ('a');\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "a a\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.5 page no :28" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# -*- coding: UTF-8 -*-\n'''\nexample 3.5 page no :28\n'''\n\n\ndef printTwice (phil):\n print phil , phil\n\nargument = 'b' \nprintTwice (argument);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "b b\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb new file mode 100755 index 00000000..08fbd2a9 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb @@ -0,0 +1,112 @@ +{ + "metadata": { + "name": "ch4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 4 : Conditionals and recursion" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.1 page no :34" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.1 page no :34\n'''\n\ndef printParity (x):\n if (x%2 == 0):\n print \"x is even\" \n else:\n print \"x is odd\" \n\nprintParity (17)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "x is odd\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.2 page no :36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.2 page no :36\n'''\nimport math\n\ndef printLogarithm (x):\n if (x <= 0.0):\n print \"Positive numbers only, please.\" \n return;\n result = math.log(x);\n print \"The log of x is \" , result;\n\nprintLogarithm(-1)\nprintLogarithm(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Positive numbers only, please.\nThe log of x is 1.60943791243\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.3 page no : 37" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.3 page no : 37\n'''\n\ndef countdown (n):\n if (n == 0):\n print \"Blastoff!\" \n else:\n print n\n countdown (n-1)\n\ncountdown(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "5\n4\n3\n2\n1\nBlastoff!\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.4\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.4\n'''\nimport math\ndef printLogarithm(x):\n if (x <= 0.0):\n print \"Positive numbers only, please.\" << endl;\n return;\n result = math.log(x)\n print \"The log of x is \" , result;\n\ndef countdown (n) :\n if (n == 0):\n print \"Blastoff!\"\n else:\n print n\n countdown (n-1);\n\n\ncountdown (3);\nprintLogarithm(10)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3\n2\n1\nBlastoff!\nThe log of x is 2.30258509299\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb new file mode 100755 index 00000000..a55d763d --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb @@ -0,0 +1,229 @@ +{ + "metadata": { + "name": "ch5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 5 : Fruitful functions" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.1 page no :41\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.1 page no :41\n'''\nimport math\ndef area (radius):\n area = math.pi * radius * radius;\n return area;\n\nprint area(3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "28.2743338823\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.2 page no :42\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.2 page no :42\n'''\n\ndef absoluteValue (x):\n if (x < 0):\n return -x\n else:\n return x\n\nprint absoluteValue(-3) \nprint absoluteValue(3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3\n3\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.3 page no :44\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.3 page no :44\n'''\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n print \"dx is \" , dx\n print \"dy is \" , dy \n return 0.0\n\ndistance(10,10,20,20) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "dx is 10\ndy is 10\n" + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 3, + "text": "0.0" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.4 page no :44\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.4 page no :44\n'''\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n print \"dsquared is \" , dsquared\n return 0.0;\n\ndistance(10,10,20,20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "dsquared is 200\n" + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 4, + "text": "0.0" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.5 page no :45\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.5 page no :45\n'''\nimport math\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n return math.sqrt(dsquared)\n \nprint distance(10,10,20,20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "14.1421356237\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.6 page no :45\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.6 page no :45\n'''\n\nimport math\ndef area (radius):\n area = math.pi * radius * radius;\n return area;\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n return math.sqrt(dsquared)\n \ndef fred(xc, yc, xp,yp):\n radius = distance (xc, yc, xp, yp);\n result = area (radius);\n return result;\n\nprint fred(10,10,20,20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "628.318530718\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.7 page no :48\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.7 page no :48\n'''\ndef isSingleDigit(x):\n if (x >= 0 and x < 10):\n return True\n else:\n return False;\n\nprint isSingleDigit(11)\nprint isSingleDigit(4)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "False\nTrue\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.8 page no :51/53\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.8 page no :51/53\n'''\n\ndef factorial (n):\n if (n == 0):\n return 1;\n else:\n recurse = factorial (n-1)\n result = n * recurse\n return result;\n\nprint factorial(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "120\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.9 page no :53\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.9 page no :53\n'''\ndef fibonacci (n):\n if (n == 0 or n == 1):\n return 1\n else:\n return fibonacci (n-1) + fibonacci (n-2)\n\nprint fibonacci(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "8\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb new file mode 100755 index 00000000..3b13a110 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb @@ -0,0 +1,265 @@ +{ + "metadata": { + "name": "ch6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 6 : Iteration" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.1 page no :56\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.1 page no :56\n'''\n\ndef countdown (n):\n while (n > 0):\n print n\n n = n-1\n print \"Blastoff!\"\n return 0\n \ncountdown(5) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "5\n4\n3\n2\n1\nBlastoff!\n" + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": "0" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.2 page no :57\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.2 page no :57\n'''\n\ndef sequence (n):\n while (n != 1):\n print n\n if (n%2 == 0):\n n = n / 2\n else:\n n = n*3 + 1\n \nsequence(10)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "10\n5\n16\n8\n4\n2\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.3 page no :58\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.3 page no :58\n'''\nimport math\nx = 1.0\nwhile (x < 10.0):\n print x , \"\\t\" , math.log(x)\n x = x + 1.0", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.0 \t0.0\n2.0 \t0.69314718056\n3.0 \t1.09861228867\n4.0 \t1.38629436112\n5.0 \t1.60943791243\n6.0 \t1.79175946923\n7.0 \t1.94591014906\n8.0 \t2.07944154168\n9.0 \t2.19722457734\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.4 page no :59\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.4 page no :59\n'''\nimport math\nx = 1.0\nwhile (x < 10.0):\n print x , \"\\t\" , math.log(x) / math.log(2.0) \n x = x + 1.0\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.0 \t0.0\n2.0 \t1.0\n3.0 \t1.58496250072\n4.0 \t2.0\n5.0 \t2.32192809489\n6.0 \t2.58496250072\n7.0 \t2.80735492206\n8.0 \t3.0\n9.0 \t3.16992500144\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.5 page no :59\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.5 page no :59\n'''\nimport math\nx = 1.0;\nwhile (x < 100.0):\n print x , \"\\t\" , math.log(x) / math.log(2.0)\n x = x * 2.0", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.0 \t0.0\n2.0 \t1.0\n4.0 \t2.0\n8.0 \t3.0\n16.0 \t4.0\n32.0 \t5.0\n64.0 \t6.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.6 page no: 60\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.6 page no: 60\n'''\n\ni = 1;\nwhile (i <= 6):\n print 2*i ,\n i = i + 1;\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "2 4 6 8 10 12\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.7 page no:60\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.7 page no:60\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n \nprintMultiples(3) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3 6 9 12 15 18\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.8 page no:61\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.8 page no:61\n'''\n\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ni = 1;\nwhile (i <= 6):\n printMultiples (i);\n i = i + 1;", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n5 10 15 20 25 30 \n6 12 18 24 30 36 \n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.9 page no: 62\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.9 page no: 62\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ndef printMultTable ():\n i = 1;\n while (i <= 6):\n printMultiples (i)\n i = i + 1\n\nprintMultTable()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n5 10 15 20 25 30 \n6 12 18 24 30 36 \n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.10 page no :63\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.10 page no :63\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ndef printMultTable (high):\n i = 1;\n while (i <= high):\n printMultiples (i);\n i = i + 1;\n \nprintMultTable(4) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.11 page no :64\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.11 page no :64\n'''\n\ndef printMultiples(n,high):\n i = 1;\n while (i <= high):\n print n*i ,\n i = i + 1;\n print ''\n\ndef printMultTable (high):\n i = 1; \n while (i <= high):\n printMultiples (i, high)\n i = i + 1;\n\nprintMultTable(5) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 \n2 4 6 8 10 \n3 6 9 12 15 \n4 8 12 16 20 \n5 10 15 20 25 \n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb new file mode 100755 index 00000000..e0a37b49 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "ch7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 7 : Strings and things" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.1 page no : 69\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.1 page no : 69\n'''\n\nfruit = \"banana\"\nindex = 0\nwhile(index < len(fruit)):\n letter = fruit[index]\n print letter\n index = index + 1", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "b\na\nn\na\nn\na\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.2 page no :71\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.2 page no :71\n'''\n\ndef find(s,c,i):\n while (i \"banana\"):\n print \"Your word, \" , word , \", comes after banana.\" \nelse:\n print \"Yes, we have no bananas!\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Your word, Zebra , comes before banana.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 7.7 page no : 75" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "a = 'a'\nprint a.upper()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "A\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb new file mode 100755 index 00000000..75cf53be --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb @@ -0,0 +1,239 @@ +{ + "metadata": { + "name": "ch8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 8 : Structures" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.1 page no :77\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.1 page no :77\n'''\n\nclass Point:\n def __init__(self):\n self.x = 0.0\n self.y = 0.0\n\n\nb = Point()\nb.x = 3.0\nb.y = 4.0\n\nprint b.x , \", \" , b.y \ndistance = b.x * b.x + b.y * b.y\nprint \"Distance : \" , distance", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3.0 , 4.0\nDistance : 25.0\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.2 page no :79\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.2 page no :79\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\np1 = Point(3.0, 4.0)\np2 = p1\nprint p2.x , \", \" , p2.y ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3.0 , 4.0\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.3 page no : 80\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.3 page no : 80\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n \np1 = Point(3.0, 4.0)\nprintPoint(p1)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "( 3.0 , 4.0 )\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.4 page no : 80\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.4 page no : 80\n'''\n\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef distance(p1,p2):\n dx = p2.x - p1.x\n dy = p2.y - p1.y\n import math\n return math.sqrt(dx*dx + dy*dy)\n \np1 = Point(3.0, 4.0)\np2 = Point(4.0,5.0)\nprint distance(p1,p2)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.41421356237\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.5 page no : 81\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.5 page no : 81\n'''\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef reflect(p):\n temp = p.x\n p.x = p.y\n p.y = temp\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n\nblank = Point(3.0, 4.0)\nprintPoint (blank)\nreflect (blank)\nprintPoint (blank)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "( 3.0 , 4.0 )\n( 4.0 , 3.0 )\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.6 page no : 84\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.6 page no : 84\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\nclass Rectangle:\n def __init__(self,p,x,y):\n self.corner = p\n self.width = x\n self.height = y\n\nc = Point(0.0, 0.0)\nb = Rectangle( c, 100.0, 200.0 )\nb.width += 50.0\nprint b.height ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "200.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.7 page no : 84\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.7 page no : 84\n'''\n\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\nclass Rectangle:\n def __init__(self,p,x,y):\n self.corner = p\n self.width = x\n self.height = y\n\ndef findCenter(box):\n x = box.corner.x + box.width/2\n y = box.corner.y + box.height/2\n result = Point(x, y)\n return result\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n\nbox = Rectangle( Point(0.0, 0.0), 100, 200)\ncenter = findCenter (box);\nprintPoint (center);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "( 50.0 , 100.0 )\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.8 page no : 84\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.8 page no : 84\n'''\n\ndef swap(x,y):\n temp = x[0]\n x[0] = y[0]\n y[0] = temp\n\ni = [7]\nj = [9]\nswap (i, j)\nprint i[0] , j[0]", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 7\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.9 page no : 85\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.9 page no : 85\n'''\n\n# prompt the user for input86\nprint \"Enter an integer: \",\n# get input\ntry:\n x = int(raw_input())\n print x \n# check and see if the input statement succeeded\nexcept:\n print \"That was not an integer.\" \n\n# print the value we got from the user\n\nprint \"What is your name? \" , \nname = raw_input()\nprint name", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter an integer: " + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "a\n" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": " That was not an integer.\nWhat is your name? " + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "abc\n" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": " abc\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb new file mode 100755 index 00000000..25f763ca --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "ch9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "CHAPTER 9. : MORE STRUCTURES" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.1 page no :90\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.1 page no :90\n'''\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\nt = Time( 11, 59, 3.14159 )\nprintTime(t)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "11 : 59 : 3.14159\nTime is 11 hour 59 minutes 3.14159\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.2 page no : 91\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.2 page no : 91\n'''\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\ndef after(time1,time2):\n if (time1.hour > time2.hour):\n return True\n if (time1.hour < time2.hour): \n return False;\n if (time1.minute > time2.minute):\n return True\n if (time1.minute < time2.minute): \n return False;\n if (time1.second > time2.second): \n return True\n return False;\n\nt1 = Time( 11, 59, 3.14159 )\nt2 = Time( 12, 42, 3.234 )\nprint after(t1,t2)\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "False\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.3 page no : 91\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.3 page no : 91\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n return Time(hour,minute,second)\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.4 page no : 92\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.4 page no : 92\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n if (second >= 60.0):\n second -= 60.0;\n minute += 1\n if (minute >= 60):\n minute -= 60;\n hour += 1;\n return Time(hour,minute,second)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.5 page no : 93\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.5 page no : 93\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef increment (time,secs):\n time.second += secs\n if (time.second >= 60.0):\n time.second -= 60.0;\n time.minute += 1;\n if (time.minute >= 60):\n time.minute -= 60;\n time.hour += 1;\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n if (second >= 60.0):\n second -= 60.0;\n minute += 1\n if (minute >= 60):\n minute -= 60;\n hour += 1;\n return Time(hour,minute,second)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.6 page no : 94\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.6 page no : 94\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef addTimeFill(t1,t2,s):\n s.hour = t1.hour + t2.hour;\n s.minute = t1.minute + t2.minute;\n s.second = t1.second + t2.second;\n if (s.second >= 60.0):\n s.second -= 60.0;\n s.minute += 1;\n if (s.minute >= 60):\n s.minute -= 60;\n s.hour += 1;\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = Time(0,0,0)\naddTimeFill (c, b,doneTime);\nprintTime(doneTime)\n\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.7 page no : 97\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.7 page no : 97\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef convertToSeconds (t):\n minutes = t.hour * 60 + t.minute;\n seconds = minutes * 60 + t.second;\n return seconds;\n\ndef makeTime(secs):\n hour = int (secs / 3600.0);\n secs -= hour * 3600.0;\n minute = int (secs / 60.0);\n secs -= minute * 60;\n second = secs;\n return Time(hour,minute,second)\n\ndef addTime (t1,t2):\n seconds = convertToSeconds (t1) + convertToSeconds (t2);\n return makeTime(seconds)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n\n\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png new file mode 100755 index 00000000..a580b1d0 Binary files /dev/null and b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png differ diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png new file mode 100755 index 00000000..ccf4eb8a Binary files /dev/null and b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png differ diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png new file mode 100755 index 00000000..7657553e Binary files /dev/null and b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png differ diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png old mode 100644 new mode 100755 diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png old mode 100644 new mode 100755 diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png old mode 100644 new mode 100755 diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png old mode 100644 new mode 100755 diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png old mode 100644 new mode 100755 diff --git a/Magnifying_C/Chapter_10.ipynb b/Magnifying_C/Chapter_10.ipynb deleted file mode 100755 index 1a4d1459..00000000 --- a/Magnifying_C/Chapter_10.ipynb +++ /dev/null @@ -1,336 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10: Miscellany" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1, Page number: 356" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "# Calculation and result\n", - "i = 0\n", - "for arg in sys.argv :\n", - " print ('arg [%d] - %s' % (i, arg))\n", - " i = i+1" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "%run 10.1.py hello world" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "arg [0] - 10.1.py\n", - "arg [1] - hello\n", - "arg [2] - world\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2, Page number: 358" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "# Function declaration, calculation and result\n", - "if len(sys.argv) != 2 :\n", - "\tprint ('Inappropriate number of arguments')\n", - "\t\n", - "total = 0\n", - "def fact (n) :\n", - " total = n\n", - " while n > 1 :\n", - " total = total * (n - 1)\n", - " n = n - 1\n", - " return total\n", - "\n", - "print ('Factorial of %d is %d ' % (int(sys.argv[1]), fact (int(sys.argv[1]))))" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "%run 10.2.py 5" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Factorial of 5 is 120 \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.3, Page number: 361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "# Function declaration\n", - "def printdata () :\n", - "\ti = 0\n", - "\tfor arg in sys.argv[1:] :\n", - "\t\tprint ('The data in cell [%d] is %s ' % (i, arg))\n", - "\t\ti = i+1\n", - "\n", - "# Calculation and result\n", - "print ('The names before sorting are ')\n", - "printdata ()\n", - "\n", - "sys.argv.sort() \n", - "\n", - "print ('The names after sorting are ')\n", - "printdata ()" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "%run 10.3.py zimbabwe nigeria argentina china hongkong" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The names before sorting are \n", - "The data in cell [0] is zimbabwe \n", - "The data in cell [1] is nigeria \n", - "The data in cell [2] is argentina \n", - "The data in cell [3] is china \n", - "The data in cell [4] is hongkong \n", - "The names after sorting are \n", - "The data in cell [0] is argentina \n", - "The data in cell [1] is china \n", - "The data in cell [2] is hongkong \n", - "The data in cell [3] is nigeria \n", - "The data in cell [4] is zimbabwe \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4, Page number: 377" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter any positive number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def convert (a) :\n", - " return int(bin(a)[2:])\n", - "\n", - "bits = str(convert (a))\n", - "print ('Number of bits = %d' % (len(bits)))\n", - "print ('Binary equivalent is : %d' % (convert (a)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any positive number 16\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of bits = 5\n", - "Binary equivalent is : 10000\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5, Page number: 379" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number : '))\n", - "b = int(raw_input('Enter second number : '))\n", - "\n", - "# Calculation and result\n", - "b = ~b + 1\n", - "c = a + b\n", - "\n", - "print ('Subtraction is = %d ' % c)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number : 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number : 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subtraction is = 4 \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.6, Page number: 380" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number : '))\n", - "original_a = a\n", - "\n", - "b = int(raw_input('Enter second number : '))\n", - "original_b = b\n", - "\n", - "# Calculation and result\n", - "c = 1\n", - "while (b) :\n", - "\tif (b & 1) :\n", - "\t\tc = c * a\n", - "\tb = b >> 1\n", - "\ta = a * a\n", - "\n", - "print ('%d raise to %d = %d ' % (original_a, original_b, c))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number : 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number : 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "7 raise to 3 = 343 \n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_11.ipynb b/Magnifying_C/Chapter_11.ipynb deleted file mode 100755 index 16b27feb..00000000 --- a/Magnifying_C/Chapter_11.ipynb +++ /dev/null @@ -1,1664 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11: Structures and Unions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1, Page number: 388" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student :\n", - "\tid_no = ''\n", - "\tname = ''\n", - "\taddress = ''\n", - "\tage = ''\n", - "\t\n", - "newstudent = student()\n", - "\n", - "print ('Enter the student information ')\n", - "newstudent.id_no = int(raw_input('Enter student id_no : '))\n", - "newstudent.name = raw_input('Enter name of the student : ')\n", - "newstudent.address = raw_input('Enter the address of the student : ')\n", - "newstudent.age = int(raw_input('Enter the age of the student : '))\n", - "\n", - "print ('You have entered following information...')\n", - "print ('Student id_number = %d ' % newstudent.id_no)\n", - "print ('Student name = %s ' % newstudent.name)\n", - "print ('Student address = %s ' % newstudent.address)\n", - "print ('Age of student = %d ' % newstudent.age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student information \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter student id_no : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of the student : Amanjeet\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the address of the student : Delhi\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age of the student : 20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered following information...\n", - "Student id_number = 1 \n", - "Student name = Amanjeet \n", - "Student address = Delhi \n", - "Age of student = 20 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2, Page number: 390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student :\n", - "\tid_no = ''\n", - "\tname = ''\n", - "\taddress = ''\n", - "\tage = ''\n", - "\t\n", - "newstudent = student()\n", - "\n", - "def putdata (newstudent) : \n", - " print ('You have entered following information...')\n", - " print ('Student id_number = %d ' % newstudent.id_no)\n", - " print ('Student name = %s ' % newstudent.name)\n", - " print ('Student address = %s ' % newstudent.address)\n", - " print ('Age of student = %d ' % newstudent.age)\n", - " \n", - "print ('Enter the student information ') \n", - "newstudent.id_no = int(raw_input('Enter student id_no : '))\n", - "newstudent.name = raw_input('Enter name of the student : ')\n", - "newstudent.address = raw_input('Enter the address of the student : ')\n", - "newstudent.age = int(raw_input('Enter the age of the student : '))\n", - "\n", - "putdata (newstudent)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student information \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter student id_no : 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of the student : Deepti\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the address of the student : Noida\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age of the student : 23\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered following information...\n", - "Student id_number = 2 \n", - "Student name = Deepti \n", - "Student address = Noida \n", - "Age of student = 23 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3, Page number: 392" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student :\n", - "\tid_no = ''\n", - "\tname = ''\n", - "\taddress = ''\n", - "\tage = ''\n", - "\t\n", - "newstudent = student()\n", - "\n", - "def putdata (idno, name, add, age) :\n", - " print ('You have entered following information...')\n", - " print ('Student id_number = %d ' % idno)\n", - " print ('Student name = %s ' % name)\n", - " print ('Student address = %s ' % add)\n", - " print ('Age of student = %d ' % age)\n", - " \n", - "print ('Enter the student information ')\n", - "newstudent.id_no = int(raw_input('Enter student id_no : '))\n", - "newstudent.name = raw_input('Enter name of the student : ')\n", - "newstudent.address = raw_input('Enter the address of the student : ')\n", - "newstudent.age = int(raw_input('Enter the age of the student : '))\n", - "\n", - "putdata (newstudent.id_no, newstudent.name, newstudent.address, newstudent.age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student information \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter student id_no : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of the student : Kushagra\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the address of the student : Bangalore\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age of the student : 21\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered following information...\n", - "Student id_number = 3 \n", - "Student name = Kushagra \n", - "Student address = Bangalore \n", - "Age of student = 21 \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.4, Page number: 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student :\n", - "\tid_no = 0\n", - "\tname = 'Unknown'\n", - "\taddress = 'Unknown'\n", - "\tage = 0\n", - "\t\n", - "newstudent = student()\n", - "\n", - "def readdata (newstudent) :\n", - " print ('Enter the student information ')\n", - " newstudent.id_no = int(raw_input('Enter student id_no : '))\n", - " newstudent.name = raw_input('Enter name of the student : ')\n", - " newstudent.address = raw_input('Enter the address of the student : ')\n", - " newstudent.age = int(raw_input('Enter the age of the student : '))\n", - "\n", - "readdata (newstudent)\n", - "print ('You have entered following information...')\n", - "print ('Student id_number = %d ' % newstudent.id_no)\n", - "print ('Student name = %s ' % newstudent.name)\n", - "print ('Student address = %s ' % newstudent.address)\n", - "print ('Age of student = %d ' % newstudent.age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student information \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter student id_no : 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of the student : Vipul\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the address of the student : Chandigarh\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age of the student : 25\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered following information...\n", - "Student id_number = 4 \n", - "Student name = Vipul \n", - "Student address = Chandigarh \n", - "Age of student = 25 \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.5, Page number: 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student :\n", - "\tid_no = 0\n", - "\tname = 'Unknown'\n", - "\taddress = 'Unknown'\n", - "\tage = 0\n", - "\t\n", - "def readdata () :\n", - " x = student()\n", - " print ('Enter the student information ')\n", - " x.id_no = int(raw_input('Enter student id_no : '))\n", - " x.name = raw_input('Enter name of the student : ')\n", - " x.address = raw_input('Enter the address of the student : ')\n", - " x.age = int(raw_input('Enter the age of the student : '))\n", - " return x\n", - "\n", - "newstudent = readdata()\n", - "\n", - "print ('You have entered following information...')\n", - "print ('Student id_number = %d ' % newstudent.id_no)\n", - "print ('Student name = %s ' % newstudent.name)\n", - "print ('Student address = %s ' % newstudent.address)\n", - "print ('Age of student = %d ' % newstudent.age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student information \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter student id_no : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of the student : Ujjwal\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the address of the student : Jaipur\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age of the student : 20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered following information...\n", - "Student id_number = 5 \n", - "Student name = Ujjwal \n", - "Student address = Jaipur \n", - "Age of student = 20 \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.6, Page number: 400" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student :\n", - "\tid_no = 0\n", - "\tname = 'Unknown'\n", - "\taddress = 'Unknown'\n", - "\tage = 0\n", - "\t\n", - "x = student()\n", - "\n", - "def readdata (x) :\n", - " print ('Enter the student information ')\n", - " x.id_no = int(raw_input('Enter student id_no : '))\n", - " x.name = raw_input('Enter name of the student : ')\n", - " x.address = raw_input('Enter the address of the student : ')\n", - " x.age = int(raw_input('Enter the age of the student : '))\n", - "\n", - "readdata(x) \n", - "print ('You have entered following information...')\n", - "print ('Student id_number = %d ' % x.id_no)\n", - "print ('Student name = %s ' % x.name)\n", - "print ('Student address = %s ' % x.address)\n", - "print ('Age of student = %d ' % x.age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the student information \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter student id_no : 6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of the student : Karan\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the address of the student : Chennai\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age of the student : 24\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered following information...\n", - "Student id_number = 6 \n", - "Student name = Karan \n", - "Student address = Chennai \n", - "Age of student = 24 \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.7, Page number: 403" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student (object) :\n", - "\tdef __init__(self, roll=None, name=None, gender=None, marks=[0]*3) :\n", - "\t\tself.roll = roll\n", - "\t\tself.name = name\n", - "\t\tself.gender = gender\n", - "\t\tself.marks = marks\n", - "\n", - "def putdata (stud, count) :\n", - "\tprint ('RollNo\\t Name\\t\\t Gender\\t Sub1\\t Sub2\\t Sub3 ')\n", - "\tprint ('---------------------------------------------------------------------')\n", - "\t\n", - "\tfor i in range (0, count) :\n", - "\t\tprint ('%-10d' % stud[i].roll),\n", - "\t\tprint ('%-15s' % stud[i].name),\n", - "\t\t\n", - "\t\tif stud[i].gender == 0 :\n", - "\t\t\tprint ('%-15s' % 'Female'),\n", - "\t\telse :\n", - "\t\t\tprint ('%-15s' % 'Male'),\n", - "\t\t\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tprint ('%-10d' % stud[i].marks[j]),\n", - "\t\tprint\n", - "\n", - "def calculateper (stud, count) :\n", - "\taverage = 0\n", - "\tfor i in range (0, count) :\n", - "\t\tsum = 0\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tsum = sum + stud[i].marks[j]\n", - "\t\taverage = average + sum/3\n", - "\treturn average/count\n", - "\n", - "stud = []\t\n", - "stud.append (student (1, 'Kapildev', 1, (45, 56, 67)))\n", - "stud.append (student (2, 'Vidya', 0, (87, 45, 23)))\n", - "stud.append (student (3, 'Sharada', 0, (67, 94, 56)))\n", - "stud.append (student (4, 'Saismaran', 1, (56, 38, 84)))\n", - "stud.append (student (5, 'Reshma', 0, (67, 98, 76)))\n", - "\n", - "average_percentage = calculateper (stud, 5)\n", - "putdata (stud, 5)\n", - "print ('\\nAverage percentage of the class is : %.2f ' % average_percentage)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "RollNo\t Name\t\t Gender\t Sub1\t Sub2\t Sub3 \n", - "---------------------------------------------------------------------\n", - "1 Kapildev Male 45 56 67 \n", - "2 Vidya Female 87 45 23 \n", - "3 Sharada Female 67 94 56 \n", - "4 Saismaran Male 56 38 84 \n", - "5 Reshma Female 67 98 76 \n", - "\n", - "Average percentage of the class is : 63.00 \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.8, Page number: 406" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student (object) :\n", - "\tdef __init__(self, roll=None, name=None, gender=None, marks=[0]*3) :\n", - "\t\tself.roll = roll\n", - "\t\tself.name = name\n", - "\t\tself.gender = gender\n", - "\t\tself.marks = marks\n", - "\t\n", - "def putdata (stud, count) :\n", - "\tprint ('\\nRollNo\\t Name\\t\\t Gender\\t Sub1\\t Sub2\\t Sub3 ')\n", - "\tprint ('---------------------------------------------------------------------')\n", - "\t\n", - "\tfor i in range (0, count) :\n", - "\t\tprint ('%-10d' % stud[i].roll),\n", - "\t\tprint ('%-15s' % stud[i].name),\n", - "\t\t\n", - "\t\tif stud[i].gender == 0 :\n", - "\t\t\tprint ('%-15s' % 'Female'),\n", - "\t\telse :\n", - "\t\t\tprint ('%-15s' % 'Male'),\n", - "\t\t\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tprint ('%-10d' % stud[i].marks[j]),\n", - "\t\tprint\n", - "\n", - "def calculateper (stud, count) :\n", - "\taverage = 0\n", - "\tfor i in range (0, count) :\n", - "\t\tsum = 0\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tsum = sum + stud[i].marks[j]\n", - "\t\taverage = average + sum/3\n", - "\treturn average/count\n", - "\n", - "count = int(raw_input('Enter the number of students in a class : '))\n", - "stud = [student() for i in range (0, count)]\n", - "\n", - "for i in range (0, count) :\n", - "\tstud[i].roll = int(raw_input('\\nEnter roll number of student %d: ' % (i+1)))\n", - "\tstud[i].name = raw_input('Enter name of student %d: ' % (i+1))\n", - "\tstud[i].gender = int(raw_input('Enter gender[0/1] of student %d: ' % (i+1)))\n", - "\tprint ('Enter marks of three subjects of student %d: ' % (i+1))\n", - "\tfor j in range (0, 3) :\n", - "\t\tstud[i].marks[j] = int(raw_input('Subject %d: ' % (j+1)))\n", - "\n", - "putdata (stud, count)\n", - "average_percentage = calculateper (stud, count)\n", - "print ('\\nAverage percentage of the class is : %.2f ' % average_percentage)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of students in a class : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter roll number of student 1: 24\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of student 1: Vidya\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter gender[0/1] of student 1: 0\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of three subjects of student 1: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1: 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2: 96\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3: 75\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "RollNo\t Name\t\t Gender\t Sub1\t Sub2\t Sub3 \n", - "---------------------------------------------------------------------\n", - "24 Vidya Female 78 96 75 \n", - "\n", - "Average percentage of the class is : 83.00 \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.9, Page number: 408" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class student (object) :\n", - "\tdef __init__(self, roll=None, name=None, gender=None, marks=[0]*3) :\n", - "\t\tself.roll = roll\n", - "\t\tself.name = name\n", - "\t\tself.gender = gender\n", - "\t\tself.marks = marks\n", - "\n", - "def readdata (stud, count) :\n", - "\tfor i in range (0, count) :\n", - "\t\tstud[i].roll = int(raw_input('\\nEnter roll number of student %d: ' % (i+1)))\n", - "\t\tstud[i].name = raw_input('Enter name of student %d: ' % (i+1))\n", - "\t\tstud[i].gender = int(raw_input('Enter gender[0/1] of student %d: ' % (i+1)))\n", - "\t\tprint ('Enter marks of three subjects of student %d: ' % (i+1))\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tstud[i].marks[j] = int(raw_input('Subject %d: ' % (j+1)))\n", - "\t\n", - "def putdata (stud, count) :\n", - "\tprint ('\\nRollNo\\t Name\\t\\t Gender\\t Sub1\\t Sub2\\t Sub3 ')\n", - "\tprint ('---------------------------------------------------------------------')\n", - "\t\n", - "\tfor i in range (0, count) :\n", - "\t\tprint ('%-10d' % stud[i].roll),\n", - "\t\tprint ('%-15s' % stud[i].name),\n", - "\t\t\n", - "\t\tif stud[i].gender == 0 :\n", - "\t\t\tprint ('%-15s' % 'Female'),\n", - "\t\telse :\n", - "\t\t\tprint ('%-15s' % 'Male'),\n", - "\t\t\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tprint ('%-10d' % stud[i].marks[j]),\n", - "\t\tprint\n", - "\n", - "def calculateper (stud, count) :\n", - "\taverage = 0\n", - "\tfor i in range (0, count) :\n", - "\t\tsum = 0\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tsum = sum + stud[i].marks[j]\n", - "\t\taverage = average + sum/3\n", - "\treturn average/count\n", - "\n", - "count = int(raw_input('Enter the number of students in a class : '))\n", - "stud = [student() for i in range (0, count)]\n", - "readdata (stud, count)\n", - "\n", - "average_percentage = calculateper (stud, count)\n", - "putdata (stud, count)\n", - "print ('\\nAverage percentage of the class is : %.2f ' % average_percentage)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of students in a class : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter roll number of student 1: 25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of student 1: Kapildev\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter gender[0/1] of student 1: 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of three subjects of student 1: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1: 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2: 70\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3: 93\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "RollNo\t Name\t\t Gender\t Sub1\t Sub2\t Sub3 \n", - "---------------------------------------------------------------------\n", - "25 Kapildev Male 45 70 93 \n", - "\n", - "Average percentage of the class is : 69.00 \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.10, Page number: 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class time (object) :\n", - "\tdef __init__(self, hours=None, minutes=None, seconds=None) :\n", - "\t\tself.hours = hours\n", - "\t\tself.minutes = minutes\n", - "\t\tself.seconds = seconds\n", - "\n", - "def AcceptTime (t) :\n", - "\tprint ('Enter the time in hh mm ss format: ')\n", - "\tt.hours = int(raw_input('Hours = '))\n", - "\tt.minutes = int(raw_input('Minutes = '))\n", - "\tt.seconds = int(raw_input('Seconds = '))\n", - "\n", - "def ValidateTime (t) :\n", - "\tif t.hours < 0 or t.hours > 23 :\n", - "\t\treturn 0\n", - "\tif t.minutes < 0 or t.minutes > 60 :\n", - "\t\treturn 0\n", - "\tif t.seconds < 0 or t.seconds > 60 :\n", - "\t\treturn 0\n", - "\treturn 1\n", - "\n", - "def DisplayTime (t) :\n", - "\tprint ('Time you entered is %d:%d:%d ' % (t.hours, t.minutes, t.seconds))\n", - "\t\n", - "condition = True\n", - "while condition :\n", - "\tt = time ()\n", - "\tAcceptTime (t)\n", - "\t\n", - "\tif ValidateTime (t) == 1 :\n", - "\t\tcondition = False\n", - "\telse :\n", - "\t\tprint ('\\nTime is incorrect. Enter again ')\n", - "\t\t\n", - "DisplayTime (t)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the time in hh mm ss format: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hours = 13\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minutes = 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Seconds = 53\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time you entered is 13:45:53 \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.11, Page number: 414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class date (object) :\n", - "\tdef __init__(self, dd=None, mm=None, yy=None) :\n", - "\t\tself.dd = dd\n", - "\t\tself.mm = mm\n", - "\t\tself.yy = yy\n", - "\n", - "def AcceptDate (d) :\n", - "\tprint ('Enter date in dd mm yy format: ')\n", - "\td.dd = int(raw_input('Date = '))\n", - "\td.mm = int(raw_input('Month = '))\n", - "\td.yy = int(raw_input('Year = '))\n", - "\n", - "def isleap (val) :\n", - "\tif val % 4 == 0 and val % 100 or val % 400 == 0 :\n", - "\t\treturn 1\n", - "\treturn 0\n", - "\t\n", - "def ValidateDate (d) :\n", - "\tif d.dd < 1 or d.dd > 31 :\n", - "\t\treturn 0\n", - "\tif d.mm < 1 or d.mm > 12 :\n", - "\t\treturn 0\n", - "\tif d.yy < 1 :\n", - "\t\treturn 0\n", - "\tif d.mm == 2 :\n", - "\t\tif isleap (d.yy) :\n", - "\t\t\tif d.dd > 29 :\n", - "\t\t\t\treturn 0\n", - "\t\telif d.dd > 28 :\n", - "\t\t\treturn 0\n", - "\tif d.mm == 4 or d.mm == 6 or d.mm == 9 or d.mm == 11 and d.dd > 30 :\n", - "\t\treturn 0\n", - "\treturn 1\n", - "\n", - "def DisplayMsg (d1, d2) :\n", - "\tif d1.dd == d2.dd and d1.mm == d2.mm and d1.yy == d2.yy :\n", - "\t\tprint ('Both dates are Equal ')\n", - "\telse :\n", - "\t\tprint ('Both dates are Not Equal ')\n", - "\t\n", - "condition = True\n", - "while condition :\n", - "\td1 = date ()\n", - "\tAcceptDate (d1)\n", - "\t\n", - "\tif ValidateDate (d1) == 1 :\n", - "\t\tcondition = False\n", - "\telse :\n", - "\t\tprint ('\\nDate is incorrect. Enter again ')\n", - "\n", - "condition = True\n", - "while condition :\n", - "\td2 = date ()\n", - "\tAcceptDate (d2)\n", - "\t\n", - "\tif ValidateDate (d2) == 1 :\n", - "\t\tcondition = False\n", - "\telse :\n", - "\t\tprint ('\\nDate is incorrect. Enter again ')\n", - "\t\t\n", - "DisplayMsg (d1, d2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter date in dd mm yy format: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Date = 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Month = 11\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Year = 92\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter date in dd mm yy format: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Date = 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Month = 11\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Year = 92\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Both dates are Equal \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.12, Page number: 415" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class date (object) :\n", - "\tdef __init__(self, dd=None, mm=None, yy=None) :\n", - "\t\tself.dd = dd\n", - "\t\tself.mm = mm\n", - "\t\tself.yy = yy\n", - "\n", - "def AcceptDate (d) :\n", - "\tprint ('Enter date in dd mm yy format: ')\n", - "\td.dd = int(raw_input('Date = '))\n", - "\td.mm = int(raw_input('Month = '))\n", - "\td.yy = int(raw_input('Year = '))\n", - "\n", - "def isleap (val) :\n", - "\tif val % 4 == 0 and val % 100 or val % 400 == 0 :\n", - "\t\treturn 1\n", - "\treturn 0\n", - "\t\n", - "def ValidateDate (d) :\n", - "\tif d.dd < 1 or d.dd > 31 :\n", - "\t\treturn 0\n", - "\tif d.mm < 1 or d.mm > 12 :\n", - "\t\treturn 0\n", - "\tif d.yy < 1 :\n", - "\t\treturn 0\n", - "\tif d.mm == 2 :\n", - "\t\tif isleap (d.yy) :\n", - "\t\t\tif d.dd > 29 :\n", - "\t\t\t\treturn 0\n", - "\t\telif d.dd > 28 :\n", - "\t\t\treturn 0\n", - "\tif d.mm == 4 or d.mm == 6 or d.mm == 9 or d.mm == 11 and d.dd > 30 :\n", - "\t\treturn 0\n", - "\treturn 1\n", - "\n", - "def CalcDate (d1, d2) :\n", - "\tdate1 = date2 = 0\n", - "\tfor i in range (-d1.yy, d1.yy) :\n", - "\t\tdate1 = date1 + 366 if isleap (d1.yy) else 365\n", - "\t\td1.yy = d1.yy - 1\n", - "\t\t\n", - "\tfor i in range (-d1.mm, d1.mm) :\n", - "\t\tdate1 = date1 + (30 if (d1.mm==4 or d1.mm==6 or d1.mm==9 or d1.mm==11) else ((29 if isleap(d1.yy) else 28) if (d1.mm==2) else 31))\n", - "\t\n", - "\tdate1 = date1 + d1.dd\n", - "\t\n", - "\tfor i in range (-d2.yy, d2.yy) :\n", - "\t\tdate2 = date2 + 366 if isleap(d2.yy) else 365\n", - "\t\n", - "\tfor i in range (-d2.mm, d2.mm) :\n", - "\t\tdate2 = date2 + (30 if (d2.mm==4 or d2.mm==6 or d2.mm==9 or d2.mm==11) else ((29 if isleap(d2.yy) else 28) if d2.mm==2 else 31))\n", - "\t\n", - "\tdate2 = date2 + d2.dd\n", - "\t\n", - "\treturn (date2 - date1)/2\n", - "\t\t\n", - "def DisplayMsg (d1, d2, diff) :\n", - "\tprint ('The difference between %d %d %d and %d %d %d is %d days ' % (d1.dd, d1.mm, -d1.yy, d2.dd, d2.mm, d2.yy, diff))\n", - "\t\n", - "condition = True\n", - "while condition :\n", - "\tprint ('\\nEnter first date: ')\n", - "\td1 = date ()\n", - "\tAcceptDate (d1)\n", - "\t\n", - "\tif ValidateDate (d1) == 1 :\n", - "\t\tcondition = False\n", - "\telse :\n", - "\t\tprint ('\\nDate is incorrect. Enter again ')\n", - "\n", - "condition = True\n", - "while condition :\n", - "\tprint ('\\nEnter second date: ')\n", - "\td2 = date ()\n", - "\tAcceptDate (d2)\n", - "\t\n", - "\tif ValidateDate (d2) == 1 :\n", - "\t\tcondition = False\n", - "\telse :\n", - "\t\tprint ('\\nDate is incorrect. Enter again ')\n", - "\n", - "diff = CalcDate (d1, d2)\n", - "DisplayMsg (d1, d2, diff)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter first date: \n", - "Enter date in dd mm yy format: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Date = 01\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Month = 01\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Year = 01\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter second date: \n", - "Enter date in dd mm yy format: \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Date = 25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Month = 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Year = 08\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The difference between 1 1 1 and 25 12 8 is 2915 days \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.13, Page number: 419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from ctypes import *\n", - "\n", - "# Structure declaration\n", - "class stream (Union) :\n", - "\t_fields_ = [('grade', c_char), \n", - "\t\t\t\t\t('class_std', c_int), \n", - "\t\t\t\t\t('percentage', c_float)]\n", - "\t\n", - "class student (Structure) :\n", - "\t_fields_ = [('roll', c_int), \n", - "\t\t\t\t\t('name', c_char_p), \n", - "\t\t\t\t\t('gender', c_int), \n", - "\t\t\t\t\t('marks', c_int * 3), \n", - "\t\t\t\t\t('st_stream', c_char), \n", - "\t\t\t\t\t('st', stream)]\n", - "\t\n", - "def putdata (stud, count) :\n", - "\tprint ('\\nStream\\t Roll\\t Name\\t Gender\\t Result\\t ')\n", - "\tprint ('---------------------------------------------------------------------')\n", - "\t\n", - "\tfor i in range (0, count) :\n", - "\t\tif stud[i].st_stream == 'A' :\n", - "\t\t\tprint ('Arts\\t '),\n", - "\t\telif stud[i].st_stream == 'S' :\n", - "\t\t\tprint ('Science\\t '),\n", - "\t\telse :\n", - "\t\t\tprint ('Commerce '),\n", - "\t\t\t\n", - "\t\tprint ('%-5d ' % stud[i].roll),\n", - "\t\tprint ('%-3s ' % stud[i].name),\n", - "\t\t\n", - "\t\tif stud[i].gender == 0 :\n", - "\t\t\tprint ('\\tFemale'),\n", - "\t\telse :\n", - "\t\t\tprint ('\\tMale '),\n", - "\t\t\n", - "\t\tif stud[i].st_stream == 'A' :\n", - "\t\t\tprint (' %d Class ' % stud[i].st.class_std),\n", - "\t\telif stud[i].st_stream == 'S' :\n", - "\t\t\tprint (' %c Grade ' % stud[i].st.grade),\n", - "\t\telse :\n", - "\t\t\tprint (' %.2f Percent ' % stud[i].st.percentage),\n", - "\t\tprint\n", - "\n", - "def calculateper (stud, count) :\n", - "\taverage = 0\n", - "\tfor i in range (0, count) :\n", - "\t\tsum = 0\n", - "\t\tfor j in range (0, 3) :\n", - "\t\t\tsum = sum + stud[i].marks[j]\n", - "\t\taverage = (float)(sum/3)\n", - "\t\t\n", - "\t\tif stud[i].st_stream == 'A' :\n", - "\t\t\tif average >= 60 :\n", - "\t\t\t\tstud[i].st.class_std = 1\n", - "\t\t\telse :\n", - "\t\t\t\tstud[i].st.class_std = 2\n", - "\t\t\t\t\n", - "\t\telif stud[i].st_stream == 'S' :\n", - "\t\t\tif average >= 60 :\n", - "\t\t\t\tstud[i].st.grade = 'A'\n", - "\t\t\telse :\n", - "\t\t\t\tstud[i].st.class_std = 'B'\n", - "\t\telse : \n", - "\t\t\tstud[i].st.percentage = average\n", - "\n", - "count = int(raw_input('Enter the number of students in a class : '))\n", - "stud = [student() for i in range (0, count)]\n", - "\n", - "for i in range (0, count) :\n", - "\tstud[i].st_stream = raw_input('\\nEnter stream of student %d (A/C/S) : ' % (i+1))\n", - "\tstud[i].roll = int(raw_input('Enter roll number of student %d : ' % (i+1)))\n", - "\tstud[i].name = raw_input('Enter name of student %d : ' % (i+1))\n", - "\tstud[i].gender = int(raw_input('Enter gender of student %d [0/1] : ' % (i+1)))\n", - "\tprint ('Enter marks of three subjects of student %d : ' % (i+1))\n", - "\tfor j in range (0, 3) :\n", - "\t\tstud[i].marks[j] = int(raw_input('Subject %d : ' % (j+1)))\n", - "\t\n", - "calculateper (stud, count)\n", - "putdata (stud, count)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of students in a class : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter stream of student 1 (A/C/S) : A\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter roll number of student 1 : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of student 1 : Saismaran\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter gender of student 1 [0/1] : 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of three subjects of student 1 : \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1 : 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2 : 83\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3 : 59\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter stream of student 2 (A/C/S) : C\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter roll number of student 2 : 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of student 2 : Vidya\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter gender of student 2 [0/1] : 0\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of three subjects of student 2 : \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1 : 84\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2 : 75\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3 : 93\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter stream of student 3 (A/C/S) : S\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter roll number of student 3 : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name of student 3 : Pranav\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter gender of student 3 [0/1] : 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter marks of three subjects of student 3 : \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1 : 84\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2 : 95\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3 : 83\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Stream\t Roll\t Name\t Gender\t Result\t \n", - "---------------------------------------------------------------------\n", - "Arts\t 1 Saismaran \tMale 1 Class \n", - "Commerce 2 Vidya \tFemale 84.00 Percent \n", - "Science\t 3 Pranav \tMale A Grade \n" - ] - } - ], - "prompt_number": 17 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_12.ipynb b/Magnifying_C/Chapter_12.ipynb deleted file mode 100755 index 4fec3405..00000000 --- a/Magnifying_C/Chapter_12.ipynb +++ /dev/null @@ -1,2137 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12: Files" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1, Page number: 428" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "fp = open('12.1.dat', 'w')\n", - "\n", - "for i in range (0, 11) :\n", - "\tfp.write('%d, %d \\n' % (i, i*i))\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2, Page number: 429" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "fp = open('12.2.dat', 'w')\n", - "\n", - "for i in range (0, 11) :\n", - "\tfp.write('%d, %d \\n' % (i, i*i))\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.3, Page number: 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "fp = open('12.2.dat', 'a')\n", - "i = 11\n", - "fp.write('%d, %d \\n' % (i, i*i))\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.4, Page number: 432" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "with open ('12.2.dat') as fp:\n", - "\tfor line in fp :\n", - "\t\tprint line\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0, 0 \n", - "\n", - "1, 1 \n", - "\n", - "2, 4 \n", - "\n", - "3, 9 \n", - "\n", - "4, 16 \n", - "\n", - "5, 25 \n", - "\n", - "6, 36 \n", - "\n", - "7, 49 \n", - "\n", - "8, 64 \n", - "\n", - "9, 81 \n", - "\n", - "10, 100 \n", - "\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5, Page number: 434" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "print ('Data input ')\n", - "f1 = open('12.5.dat', 'w')\n", - "f1.write('You are learning Files in Python language ')\n", - "f1.close()\n", - "\n", - "print ('Data output ')\n", - "with open ('12.5.dat') as f1:\n", - "\tfor line in f1 :\n", - "\t\tprint line\n", - "f1.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Data input \n", - "Data output \n", - "You are learning Files in Python language \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.6, Page number: 435" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "print ('Contents of the data file ')\n", - "f1 = open('12.6.dat', 'w')\n", - "for i in range (0, 10) :\n", - "\tnumber = int(raw_input())\n", - "\tf1.write('%d\\n' % number)\n", - "f1.close()\n", - "\n", - "f1 = open('12.6.dat', 'r')\n", - "f2 = open('12.6o.dat', 'w')\n", - "f3 = open('12.6e.dat', 'w')\n", - "\n", - "num = [0] * 10\n", - "with open ('12.6.dat') as f1 :\n", - "\tnum = f1.read().splitlines()\n", - "\t\n", - "for i in range (0, 10) :\n", - "\tif (int(num[i]) % 2) != 0 :\n", - "\t\tf2.write('%s \\n' % (num[i]))\n", - "\telse :\n", - "\t\tf3.write('%s \\n' % (num[i]))\n", - "\t\n", - "f1.close()\n", - "f2.close()\n", - "f3.close()\n", - "\n", - "print ('Contents of the odd file ')\n", - "with open ('12.6o.dat') as f2:\n", - "\tfor line in f2 :\n", - "\t\tprint line\n", - "\n", - "print ('Contents of the even file ')\n", - "with open ('12.6e.dat') as f3:\n", - "\tfor line in f3 :\n", - "\t\tprint line\n", - "\n", - "f2.close()\n", - "f3.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Contents of the data file \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "9\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Contents of the odd file \n", - "1 \n", - "\n", - "3 \n", - "\n", - "5 \n", - "\n", - "7 \n", - "\n", - "9 \n", - "\n", - "Contents of the even file \n", - "2 \n", - "\n", - "4 \n", - "\n", - "6 \n", - "\n", - "8 \n", - "\n", - "10 \n", - "\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.7, Page number: 438" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "filename = raw_input('Input filename: ')\n", - "fp = open(filename, 'w')\n", - "\n", - "print ('Input inventory data ')\n", - "print ('\\nItemName number price quantity ')\n", - "\n", - "data = [[0 for y in xrange(5)] for x in xrange(3)]\n", - "for i in range (0, 3) :\n", - "\tfor j in range (0, 4) :\n", - "\t\tdata[i][j] = raw_input('')\n", - "\t\tfp.write('%s ' % data[i][j]),\n", - "\tfp.write('\\n')\n", - "\tprint\n", - "fp.close()\n", - "\n", - "fp = open(filename, 'r')\n", - "\n", - "for i in range (0, 3) :\n", - "\tfor j in range (2, 3) :\n", - "\t\tdata[i][j+2] = float(data[i][j]) * int(data[i][j+1])\n", - "\n", - "print ('ItemName number price quantity value ')\n", - "for i in range (0, 3) :\n", - "\tfor j in range (0, 5) :\n", - "\t\tprint ('%8s' % data[i][j]),\n", - "\tprint" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Input filename: 12.7.dat\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Input inventory data \n", - "\n", - "ItemName number price quantity \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Monitor\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "11\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3005.50\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mouse\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "22\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "500.50\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Keyboard\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "33\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "750.00\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "ItemName number price quantity value \n", - " Monitor 11 3005.50 10 30055.0\n", - " Mouse 22 500.50 5 2502.5\n", - "Keyboard 33 750.00 10 7500.0\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.8, Page number: 440" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "with open ('12.5.dat') as fp:\n", - "\tfor line in fp :\n", - "\t\tprint line\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You are learning Files in Python language \n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.9, Page number: 441" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sys import argv\n", - "\n", - "# Calculation and result\n", - "script, filename = argv\n", - "file = open(filename)\n", - "print file.read()\n", - "print ('\\nFile displayed successfully.....')" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "%run 12.9.py 12.1.dat" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0, 0 \n", - "1, 1 \n", - "2, 4 \n", - "3, 9 \n", - "4, 16 \n", - "5, 25 \n", - "6, 36 \n", - "7, 49 \n", - "8, 64 \n", - "9, 81 \n", - "10, 100 \n", - "\n", - "\n", - "File displayed successfully.....\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.10, Page number: 444" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "class person (object) :\n", - "\tdef __init__(self, name = None, age = 0):\n", - "\t\tself.name = 0\n", - "\t\tself.age = 0\n", - "\t\t\n", - "data = [person() for i in range (5)]\n", - "\n", - "fp = open('12.10.dat','w')\n", - "\n", - "for i in range (0, 5) :\n", - "\tdata[i].name = raw_input('\\nEnter name : ')\n", - "\tdata[i].age = int(raw_input('Enter age : '))\n", - "\t\n", - "for i in range (0, 5) :\n", - "\tfp.write('%s %d \\n' % (data[i].name, data[i].age))\n", - "\n", - "print ('\\n...Records are written to a file...')\n", - "print ('...Displaying records from a file...')\n", - "\n", - "for i in range (0, 5) :\n", - "\tprint ('\\nName : %s ' % data[i].name)\n", - "\tprint ('Age : %d ' % data[i].age)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter name : Dhiraj Kumar\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 23\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter name : Mohasin Khan\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter name : Suresh Waghmare\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 55\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter name : Anand Rao\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter name : Sunil Deshpande\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 23\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "...Records are written to a file...\n", - "...Displaying records from a file...\n", - "\n", - "Name : Dhiraj Kumar \n", - "Age : 23 \n", - "\n", - "Name : Mohasin Khan \n", - "Age : 45 \n", - "\n", - "Name : Suresh Waghmare \n", - "Age : 55 \n", - "\n", - "Name : Anand Rao \n", - "Age : 34 \n", - "\n", - "Name : Sunil Deshpande \n", - "Age : 23 \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.11, Page number: 445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "class record (object) :\n", - "\tdef __init__(self, name = None, age = 0) :\n", - "\t\tself.name = 0\n", - "\t\tself.age = 0\n", - "\t\t\n", - "def record_write (data, filename) :\n", - "\tfilep = open(filename, 'ab')\n", - "\tdata.name = raw_input('Enter name : ')\n", - "\tdata.age = int(raw_input('Enter age : '))\n", - "\tfilep.write('%s %d\\n' % (data.name, data.age))\n", - "\t\n", - "def record_readall (filename) :\n", - "\tprint\n", - "\twith open (filename) as filep :\n", - "\t\tfor line in filep :\n", - "\t\t\tprint line\n", - "\n", - "data = record ()\n", - "filename = '12.11.dat'\n", - "\n", - "condition = True\n", - "while condition :\n", - "\tenter = raw_input('\\nAdd record (y/n) ? ')\n", - "\tif enter == 'y' or enter == 'Y' :\n", - "\t\trecord_write (data, filename)\n", - "\telse :\n", - "\t\tcondition = False\n", - "\t\tbreak\n", - "\n", - "record_readall (filename)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Add record (y/n) ? y\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name : Mohan Pande\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Add record (y/n) ? y\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter name : Nitin Dighe\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter age : 32\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Add record (y/n) ? n\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Mohan Pande 34\n", - "\n", - "Nitin Dighe 32\n", - "\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.12, Page number: 449" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "fp = open('12.12.txt','r')\n", - "fp.seek(0, 0)\n", - "line = fp.readline()\n", - "print ('Read Line: %s ' % line)\n", - "\n", - "fp.seek(17, 0)\n", - "line = fp.readline()\n", - "print ('Read Line: %s ' % line)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Read Line: This is 1st line\n", - " \n", - "Read Line: This is 2nd line\n", - " \n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.13, Page number: 449" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import os\n", - "\n", - "# Calculation and result\n", - "statinfo = os.stat('12.13.txt')\n", - "print ('Filesize of \"12.13.txt\" is %d bytes ' % statinfo.st_size)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Filesize of \"12.13.txt\" is 15 bytes \n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.14, Page number: 455" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "nc = nlines = 0\n", - "\n", - "filename = raw_input('Enter file name: ')\n", - "with open(filename, 'r') as fp :\n", - " for line in fp :\n", - " nlines += 1\n", - " nc += len(line)\n", - "fp.close()\n", - "\n", - "print ('There are %d characters in %s ' % (nc, filename))\n", - "print ('There are %d lines ' % nlines)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter file name: 12.14.txt\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "There are 55 characters in 12.14.txt \n", - "There are 1 lines \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.15, Page number: 456" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "linecount = 0\n", - "filename = raw_input('Enter file name: ')\n", - "fp = open(filename, 'r')\n", - "for line in fp :\n", - "\tprint line\n", - "\tlinecount += 1\n", - "\tif linecount % 20 == 0 :\n", - "\t\traw_input(\"[Press Return to continue, Q to quit]\")\n", - "\t\tif raw_input() == 'Q' :\n", - "\t\t\texit()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter file name: 12.15.txt\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n", - "\n", - "2\n", - "\n", - "3\n", - "\n", - "4\n", - "\n", - "5\n", - "\n", - "6\n", - "\n", - "7\n", - "\n", - "8\n", - "\n", - "9\n", - "\n", - "10\n", - "\n", - "11\n", - "\n", - "12\n", - "\n", - "13\n", - "\n", - "14\n", - "\n", - "15\n", - "\n", - "16\n", - "\n", - "17\n", - "\n", - "18\n", - "\n", - "19\n", - "\n", - "20\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "[Press Return to continue, Q to quit]Q\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "21\n", - "\n", - "22\n", - "\n", - "23\n", - "\n", - "24\n", - "\n", - "25\n", - "\n", - "26\n", - "\n", - "27\n", - "\n", - "28\n", - "\n", - "29\n", - "\n", - "30\n", - "\n", - "31\n", - "\n", - "32\n", - "\n", - "33\n", - "\n", - "34\n", - "\n", - "35\n", - "\n", - "36\n", - "\n", - "37\n", - "\n", - "38\n", - "\n", - "39\n", - "\n", - "40\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "[Press Return to continue, Q to quit]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "41\n", - "\n", - "42\n", - "\n", - "43\n", - "\n", - "44\n", - "\n", - "45\n", - "\n", - "46\n", - "\n", - "47\n", - "\n", - "48\n", - "\n", - "49\n", - "\n", - "50\n", - "\n", - "51\n", - "\n", - "52\n", - "\n", - "53\n", - "\n", - "54\n", - "\n", - "55\n", - "\n", - "56\n", - "\n", - "57\n", - "\n", - "58\n", - "\n", - "59\n", - "\n", - "60\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "[Press Return to continue, Q to quit]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "61\n", - "\n", - "62\n", - "\n", - "63\n", - "\n", - "64\n", - "\n", - "65\n", - "\n", - "66\n", - "\n", - "67\n", - "\n", - "68\n", - "\n", - "69\n", - "\n", - "70\n", - "\n", - "71\n", - "\n", - "72\n", - "\n", - "73\n", - "\n", - "74\n", - "\n", - "75\n", - "\n", - "76\n", - "\n", - "77\n", - "\n", - "78\n", - "\n", - "79\n", - "\n", - "80\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "[Press Return to continue, Q to quit]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "81\n", - "\n", - "82\n", - "\n", - "83\n", - "\n", - "84\n", - "\n", - "85\n", - "\n", - "86\n", - "\n", - "87\n", - "\n", - "88\n", - "\n", - "89\n", - "\n", - "90\n", - "\n", - "91\n", - "\n", - "92\n", - "\n", - "93\n", - "\n", - "94\n", - "\n", - "95\n", - "\n", - "96\n", - "\n", - "97\n", - "\n", - "98\n", - "\n", - "99\n", - "\n", - "100\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "[Press Return to continue, Q to quit]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.16, Page number: 457" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "fname1 = raw_input('Enter source file: ')\n", - "fname2 = raw_input('Enter destination file: ')\n", - "\n", - "with open(fname1) as fp1 :\n", - "\twith open(fname2,'w') as fp2 : \n", - "\t\tfor line in fp1 :\n", - "\t\t\tfp2.write(line)\n", - "\n", - "print ('Files successfully copied ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter source file: 12.16in.txt\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter destination file: 12.16out.txt\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Files successfully copied \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.17, Page number: 458" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "total = count = 0\n", - "filenameIn = raw_input('Please enter an input filename: ')\n", - "filenameOut = raw_input('Please enter an output filename: ')\n", - "\n", - "print ('Opening %s for reading is OK.' % filenameIn)\n", - "print ('Opening %s for writing is OK.' % filenameOut)\n", - "print ('Calculate the total...')\n", - "\n", - "for i in open(filenameIn) :\n", - "\tcount += 1\n", - "\ttotal += int(i.strip())\n", - "\t\n", - "print ('Calculate the average...')\n", - "fileptrOut = open(filenameOut,'w')\n", - "fileptrOut.write('Average of %d numbers = %f ' % (count, (total/count)))\n", - "\n", - "print ('Check also your %s file content ' % filenameOut)\n", - "fileptrOut.close()\n", - "print ('\"%s\" closed successfully ' % filenameIn)\n", - "print ('\"%s\" closed successfully ' % filenameOut)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please enter an input filename: 12.17in.dat\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please enter an output filename: 12.17out.dat\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Opening 12.17in.dat for reading is OK.\n", - "Opening 12.17out.dat for writing is OK.\n", - "Calculate the total...\n", - "Calculate the average...\n", - "Check also your 12.17out.dat file content \n", - "\"12.17in.dat\" closed successfully \n", - "\"12.17out.dat\" closed successfully \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.18, Page number: 460" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Structure declaration\n", - "class STUDENT (object) :\n", - "\tdef __init__(self, fname=None, lname=None, id=None, quiz1=None, quiz2=None, quiz3=None, quiz4=None, exam=None) :\n", - "\t\tself.fname = fname\n", - "\t\tself.lname = lname\n", - "\t\tself.id = id\n", - "\t\tself.quiz1 = quiz1\n", - "\t\tself.quiz2 = quiz2\n", - "\t\tself.quiz3 = quiz3\n", - "\t\tself.quiz4 = quiz4\n", - "\t\tself.exam = exam\n", - "\t\n", - "def findLow (students, x, c) :\n", - "\tif x == 0 :\n", - "\t\tsmall = students[0].quiz1\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif small >= students[i].quiz1 and students[i].quiz1 > 0 :\n", - "\t\t\t\tsmall = students[i].quiz1\n", - "\t\treturn small\n", - "\t\t\n", - "\telif x == 1 :\n", - "\t\tsmall = students[0].quiz2\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif small >= students[i].quiz2 and students[i].quiz2 > 0 :\n", - "\t\t\t\tsmall = students[i].quiz2\n", - "\t\treturn small\n", - "\t\t\n", - "\telif x == 2 :\n", - "\t\tsmall = students[0].quiz3\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif small >= students[i].quiz3 and students[i].quiz3 > 0 :\n", - "\t\t\t\tsmall = students[i].quiz3\n", - "\t\treturn small\n", - "\n", - "\telif x == 3 :\n", - "\t\tsmall = students[0].quiz4\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif small >= students[i].quiz4 and students[i].quiz4 > 0 :\n", - "\t\t\t\tsmall = students[i].quiz4\n", - "\t\treturn small\n", - "\t\t\n", - "\telif x == 4 :\n", - "\t\tsmall = students[0].exam\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif small >= students[i].exam and students[i].exam > 0 :\n", - "\t\t\t\tsmall = students[i].exam\n", - "\t\treturn small\n", - "\treturn 0\n", - "\n", - "def findHigh (students, x, c) :\n", - "\tif x == 0 :\n", - "\t\tbig = students[0].quiz1\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif big <= students[i].quiz1 :\n", - "\t\t\t\tbig = students[i].quiz1\n", - "\t\treturn big\n", - "\t\t\n", - "\telif x == 1 :\n", - "\t\tbig = students[0].quiz2\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif big <= students[i].quiz2 :\n", - "\t\t\t\tbig = students[i].quiz2\n", - "\t\treturn big\n", - "\t\t\n", - "\telif x == 2 :\n", - "\t\tbig = students[0].quiz3\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif big <= students[i].quiz3 :\n", - "\t\t\t\tbig = students[i].quiz3\n", - "\t\treturn big\n", - "\n", - "\telif x == 3 :\n", - "\t\tbig = students[0].quiz4\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif big <= students[i].quiz4 :\n", - "\t\t\t\tbig = students[i].quiz4\n", - "\t\treturn big\n", - "\t\t\n", - "\telif x == 4 :\n", - "\t\tbig = students[0].exam\n", - "\t\tfor i in range (1, c) :\n", - "\t\t\tif big <= students[i].exam :\n", - "\t\t\t\tbig = students[i].exam\n", - "\t\treturn big\n", - "\treturn 0\n", - "\n", - "\n", - "students = [STUDENT() for i in range (5)]\n", - "summ = avg = low = high = [0] * 5\n", - "cnt = 0\n", - "\n", - "print ('--- CLASS INFO --- \\n')\n", - "print ('Name\\t\\t Id\\tQuiz1 Quiz2 Quiz3 Quiz4 Exam \\n')\n", - "\n", - "with open('12.18.txt') as fpr :\n", - "\tfor line in fpr :\n", - "\t\ti = 0\n", - "\t\tstudents[i].fname, students[i].lname, students[i].id, students[i].quiz1, students[i].quiz2, students[i].quiz3, students[i].quiz4, students[i].exam = line.split()\n", - "\t\tstudents[i].id = int(students[i].id)\n", - "\t\tstudents[i].quiz1 = int(students[i].quiz1)\n", - "\t\tstudents[i].quiz2 = int(students[i].quiz2)\n", - "\t\tstudents[i].quiz3 = int(students[i].quiz3)\n", - "\t\tstudents[i].quiz4 = int(students[i].quiz4)\n", - "\t\tstudents[i].exam = int(students[i].exam)\n", - "\t\t\n", - "\t\tprint ('%-s %-s\\t %-4d\t%-3d\t%-3d\t%-3d\t%-3d\t%-3d' % (students[i].fname, students[i].lname, students[i].id, students[i].quiz1, students[i].quiz2, students[i].quiz3, students[i].quiz4, students[i].exam)) \n", - "\t\t\n", - "\t\tsumm[0] += int(students[i].quiz1)\n", - "\t\tsumm[1] += int(students[i].quiz2)\n", - "\t\tsumm[2] += int(students[i].quiz3)\t\t\n", - "\t\tsumm[3] += int(students[i].quiz4)\n", - "\t\tsumm[4] += int(students[i].exam)\n", - "\t\ti = i+1\n", - "\t\tcnt = cnt+1\n", - "\n", - "print ('\\nSTATISTICS')\n", - "print ('\\t\\tQuiz1\tQuiz2\tQuiz3\tQuiz4\tExam\\n')\n", - "print ('Average:\\t'),\n", - "for i in range (0, 5) :\n", - "\tavg[i] = float(summ[i])/cnt\n", - "\tprint ('%-5.1f \\t' % avg[i]),\n", - "print\n", - "\n", - "print ('Lowest:\\t\\t'),\n", - "for i in range (0, 5) :\n", - "\tlow[i] = findLow (students, i, cnt)\n", - "\thigh[i] = findHigh (students, i, cnt)\n", - "\t\n", - "for i in range (0, 5) :\n", - "\tprint ('%-5d \\t' % low[i]),\n", - "print\n", - "\t\n", - "print ('Highest:\\t'),\n", - "for i in range (0, 5) :\n", - "\tprint ('%-5d \\t' % high[i]),\n", - "print\n", - "\n", - "print ('\\n --- END OF REPORT --- \\n')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "--- CLASS INFO --- \n", - "\n", - "Name\t\t Id\tQuiz1 Quiz2 Quiz3 Quiz4 Exam \n", - "\n", - "anand mane\t 11 \t10 \t3 \t4 \t5 \t80 \n", - "mandar patil\t 12 \t4 \t5 \t6 \t7 \t50 \n", - "kishoe dhane\t 13 \t4 \t5 \t6 \t8 \t55 \n", - "\n", - "STATISTICS\n", - "\t\tQuiz1\tQuiz2\tQuiz3\tQuiz4\tExam\n", - "\n", - "Average:\t6.0 \t4.3 \t5.3 \t6.7 \t61.7 \t\n", - "Lowest:\t\t4 \t5 \t6 \t8 \t55 \t\n", - "Highest:\t4 \t5 \t6 \t8 \t55 \t\n", - "\n", - " --- END OF REPORT --- \n", - "\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.19, Page number: 466" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import sys\n", - "\n", - "# Structure declaration\n", - "class Employee (object) :\n", - "\tdef __init__(self, fname=None, lname=None, sub_taken=None, last_edu=None, join_date=None, id=None, age=None, bsal=None) :\n", - "\t\tself.fname = fname\n", - "\t\tself.lname = lname\n", - "\t\tself.sub_taken = sub_taken\n", - "\t\tself.last_edu = last_edu\n", - "\t\tself.join_date = join_date\n", - "\t\tself.id = id\n", - "\t\tself.age = age\n", - "\t\tself.bsal = bsal\n", - "\t\n", - "emp = Employee ()\n", - "fp = open('12.19.dat','ab+')\n", - "recsize = sys.getsizeof(emp)\n", - "\n", - "condition = True\n", - "while condition :\n", - "\tprint ('\\n1.Add Records \\\n", - "\t\t\t \\n2.Delete Records \\\n", - "\t\t\t \\n3.Modify Records \\\n", - "\t\t\t \\n4.List Records \\\n", - "\t\t\t \\n5.Exit')\n", - "\tchoice = int(raw_input('\\nEnter your choice: '))\n", - "\t\n", - "\tif choice == 1 :\n", - "\t\tanother = 'Y'\n", - "\t\twhile another == 'Y' or another == 'y' :\n", - "\t\t\tfp = open('12.19.dat','ab+')\n", - "\t\t\temp.fname = raw_input('Enter the first name: ')\n", - "\t\t\temp.lname = raw_input('Enter the last name: ')\n", - "\t\t\temp.age = int(raw_input('Enter the age: '))\n", - "\t\t\temp.bsal = int(raw_input('Enter the basic salary: '))\n", - "\t\t\temp.join_date = int(raw_input('Enter joining date: '))\n", - "\t\t\temp.id = int(raw_input('Enter the employee id: '))\n", - "\t\t\temp.last_edu = raw_input('Enter the last education: ')\n", - "\t\t\temp.sub_taken = raw_input('Enter the subject taken: ')\n", - "\t\t\tfp.write('%d %s %s %d %d %s %s %s \\n' % (emp.id, emp.fname, emp.lname, emp.age, emp.bsal, emp.join_date, emp.last_edu, emp.sub_taken))\n", - "\t\t\tanother = raw_input('Add another record (Y/N) ? ')\n", - "\n", - "\telif choice == 2 :\n", - "\t\tanother = 'Y'\n", - "\t\twhile another == 'Y' or another == 'y' :\n", - "\t\t\tfp = open('12.19.dat','r')\n", - "\t\t\tlines = fp.readlines()\n", - "\t\t\tlines = lines[:-1]\n", - "\t\t\tprint ('\\nRecord deleted ')\n", - "\t\t\tanother = raw_input('Delete another record (Y/N) ? ')\n", - "\t\t\n", - "\telif choice == 3 :\n", - "\t\tfp = open('12.19.dat','w')\n", - "\t\tanother = 'Y'\n", - "\t\twhile another == 'Y' or another == 'y' :\n", - "\t\t\temp.fname = raw_input('Enter the first name: ')\n", - "\t\t\temp.lname = raw_input('Enter the last name: ')\n", - "\t\t\temp.age = int(raw_input('Enter the age: '))\n", - "\t\t\temp.bsal = int(raw_input('Enter the basic salary: '))\n", - "\t\t\temp.join_date = int(raw_input('Enter joining date: '))\n", - "\t\t\temp.id = int(raw_input('Enter the employee id: '))\n", - "\t\t\temp.last_edu = raw_input('Enter the last education: ')\n", - "\t\t\temp.sub_taken = raw_input('Enter the subject taken: ')\n", - "\t\t\tfp.write('%d %s %s %d %d %s %s %s \\n' % (emp.id, emp.fname, emp.lname, emp.age, emp.bsal, emp.join_date, emp.last_edu, emp.sub_taken))\n", - "\t\t\tanother = raw_input('Modify another record (Y/N) ? ')\n", - "\t \t\n", - "\telif choice == 4 :\n", - "\t\twith open ('12.19.dat','r') as fp :\n", - "\t\t\tfor line in fp :\n", - "\t\t\t\tprint line\n", - "\t\t\n", - "\telif choice == 5 :\n", - "\t\tcondition = False\n", - "\t\tfp.close()\n", - "\t\texit()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1.Add Records \t\t\t \n", - "2.Delete Records \t\t\t \n", - "3.Modify Records \t\t\t \n", - "4.List Records \t\t\t \n", - "5.Exit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter your choice: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the first name: Anand\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last name: Rao\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age: 29\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the basic salary: 5000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter joining date: 2004\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the employee id: 11\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last education: BCA\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the subject taken: OS\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Add another record (Y/N) ? y\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the first name: Deepti\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last name: Garg\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age: 22\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the basic salary: 25000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter joining date: 2014\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the employee id: 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last education: BTech\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the subject taken: CSE\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Add another record (Y/N) ? n\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1.Add Records \t\t\t \n", - "2.Delete Records \t\t\t \n", - "3.Modify Records \t\t\t \n", - "4.List Records \t\t\t \n", - "5.Exit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter your choice: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11 Anand Rao 29 5000 2004 BCA OS \n", - "\n", - "12 Deepti Garg 22 25000 2014 BTech CSE \n", - "\n", - "\n", - "1.Add Records \t\t\t \n", - "2.Delete Records \t\t\t \n", - "3.Modify Records \t\t\t \n", - "4.List Records \t\t\t \n", - "5.Exit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter your choice: 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Record deleted \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Delete another record (Y/N) ? y\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Record deleted \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Delete another record (Y/N) ? n\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1.Add Records \t\t\t \n", - "2.Delete Records \t\t\t \n", - "3.Modify Records \t\t\t \n", - "4.List Records \t\t\t \n", - "5.Exit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter your choice: 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the first name: Nalin\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last name: Chhibber\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the age: 25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the basic salary: 30000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter joining date: 2012\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the employee id: 07\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the last education: MTech\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the subject taken: DBMS\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Modify another record (Y/N) ? n\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1.Add Records \t\t\t \n", - "2.Delete Records \t\t\t \n", - "3.Modify Records \t\t\t \n", - "4.List Records \t\t\t \n", - "5.Exit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter your choice: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "7 Nalin Chhibber 25 30000 2012 MTech DBMS \n", - "\n", - "\n", - "1.Add Records \t\t\t \n", - "2.Delete Records \t\t\t \n", - "3.Modify Records \t\t\t \n", - "4.List Records \t\t\t \n", - "5.Exit\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter your choice: 5\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_2.ipynb b/Magnifying_C/Chapter_2.ipynb deleted file mode 100755 index 7144ab92..00000000 --- a/Magnifying_C/Chapter_2.ipynb +++ /dev/null @@ -1,203 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2: Syntactic Aspects" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1, Page number: 39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "class color() :\n", - " RED = 5\n", - " YELLOW = 6\n", - " GREEN = 4\n", - " BLUE = 5\n", - "\n", - "print ('RED = %d ' % color.RED)\n", - "print ('YELLOW = %d ' % color.YELLOW)\n", - "print ('GREEN = %d ' % color.GREEN)\n", - "print ('BLUE = %d ' % color.BLUE)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "RED = 5 \n", - "YELLOW = 6 \n", - "GREEN = 4 \n", - "BLUE = 5 \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2, Page number: 41" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "i = 2004\n", - "c = 'Year'\n", - "\n", - "print ('%s %d' % (c, i))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Year 2004\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, Page number: 44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "num = 5\n", - "c = '$'\n", - "pi = 3.141\n", - "print ('Hello World')\n", - "print ('%d %c %f' % (num, c, pi))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hello World\n", - "5 $ 3.141000\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2, Page number: 45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "num = int(raw_input('Enter your favorite number '))\n", - "print ('You have entered your favorite number as %d ' % num)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your favorite number 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered your favorite number as 3 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3, Page number: 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "fahrenheit = float(raw_input('Please enter the Fahrenheit temperature '))\n", - "\n", - "centigrade = float(5)/9 * (fahrenheit - 32)\n", - "\n", - "print ('The temperature in Centigrade is %.2f ' % centigrade)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please enter the Fahrenheit temperature 100\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The temperature in Centigrade is 37.78 \n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_3.ipynb b/Magnifying_C/Chapter_3.ipynb deleted file mode 100755 index 9e566fc1..00000000 --- a/Magnifying_C/Chapter_3.ipynb +++ /dev/null @@ -1,1060 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Simple Programs" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1, Page number: 67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Calculation and result\n", - "pi = 3.141\n", - "num = int(raw_input('Enter your favorite number: '))\n", - "print ('You have entered your favorite number as %d' % num)\n", - "c = raw_input('Enter your favorite character: ')\n", - "print ('You have entered your favorite character as %c' % c)\n", - "print ('The value of pi is %.3f ' % pi)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your favorite number: 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered your favorite number as 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter your favorite character: m\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "You have entered your favorite character as m\n", - "The value of pi is 3.141 \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1, Page number: 70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "\n", - "# Calculation\n", - "som = a+b\n", - "\n", - "# Result\n", - "print ('The sum of %d + %d = %d ' % (a, b, som))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 67\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 990\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sum of 67 + 990 = 1057 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2, Page number: 71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "\n", - "# Calculation and result\n", - "if a>b :\n", - " print ('The greater number is %d ' % a)\n", - "else :\n", - " print ('The greater number is %d ' % b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 190\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greater number is 190 \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3, Page number: 72" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "\n", - "# Calculation and result\n", - "if a==b :\n", - " print ('Both numbers are equal ')\n", - "else :\n", - " if a>b :\n", - " print ('The greater number is %d ' % a)\n", - " else :\n", - " print ('The greater number is %d ' % b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 78\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Both numbers are equal \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4, Page number: 73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "c = int(raw_input('Enter third number '))\n", - "\n", - "# Calculation and result\n", - "if a>b :\n", - " if a>c :\n", - " print ('The greatest number is %d ' % a)\n", - " else :\n", - " print ('The greatest number is %d ' % c)\n", - "\n", - "else :\n", - " if b>c :\n", - " print ('The greatest number is %d ' % b)\n", - " else : \n", - " print ('The greatest number is %d ' % c)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 128\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter third number 90\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greatest number is 128 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5, Page number: 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('Counting upto %d ' % n)\n", - "\n", - "for i in range (1, n+1) :\n", - " print ('%d ' % i)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Counting upto 7 \n", - "1 2 3 4 5 6 7 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, Page number: 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('Even numbers upto %d ' % n)\n", - "\n", - "for i in range (2, n+1, 2) :\n", - " print ('%d ' % i)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Even numbers upto 10 \n", - "2 4 6 8 10 \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7, Page number: 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('Odd numbers upto %d ' % n)\n", - "\n", - "for i in range (1, n+1, 2) :\n", - " print ('%d ' % i)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Odd numbers upto 10 \n", - "1 3 5 7 9 \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page number: 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('Number line upto %d ' % n)\n", - "\n", - "for i in range (-n, n+1) :\n", - " print ('%d ' % i)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number line upto 7 \n", - "-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9, Page number: 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "sum = 0\n", - "\n", - "# Calculation\n", - "for i in range (1, n+1) :\n", - " sum = sum + i\n", - "\n", - "# Result\n", - "print ('Sum of %d natural numbers is %d ' % (n, sum))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of 6 natural numbers is 21 \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10, Page number: 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('The factors of %d are ' % n)\n", - "\n", - "for i in range (1, n+1) :\n", - " if n%i == 0 :\n", - " print ('%d ' % i)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 28\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The factors of 28 are \n", - "1 2 4 7 14 28 \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11, Page number: 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('The first 10 multiples of %d are ' % n)\n", - "\n", - "for i in range (1, 11) :\n", - " print ('%d X %d = %d ' % (n, i, n*i))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The first 10 multiples of 6 are \n", - "6 X 1 = 6 \n", - "6 X 2 = 12 \n", - "6 X 3 = 18 \n", - "6 X 4 = 24 \n", - "6 X 5 = 30 \n", - "6 X 6 = 36 \n", - "6 X 7 = 42 \n", - "6 X 8 = 48 \n", - "6 X 9 = 54 \n", - "6 X 10 = 60 \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.12, Page number: 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "i = 1\n", - "sum = 0\n", - "\n", - "# Calculation\n", - "print ('The sum of digits of %d is' % n),\n", - "\n", - "while n > 0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - "\n", - "# Result\n", - "print ('%d' % sum)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 5214\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sum of digits of 5214 is 12\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.13, Page number: 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "flag = 1\n", - "\n", - "# Calculation\n", - "for i in range (2, n) :\n", - " if flag == 1 :\n", - " if n%i == 0 :\n", - " flag = 0\n", - "\n", - "# Result\n", - "if flag :\n", - " print ('%d is Prime ' % n)\n", - "else :\n", - " print ('%d is Composite ' % n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 41\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "41 is Prime \n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.14, Page number: 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "first = 0\n", - "second = 1\n", - "count = 3\n", - "\n", - "# Calculation and result\n", - "print ('%d Fibonacci terms are ' % n)\n", - "print ('%d %d ' % (first, second)),\n", - "\n", - "while count<=n :\n", - " third = first + second\n", - " first = second\n", - " second = third\n", - " print ('%d ' % third),\n", - " count = count + 1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10 Fibonacci terms are \n", - "0 1 1 2 3 5 8 13 21 34 \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15, Page number: 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "sum = n\n", - "\n", - "# Calculation\n", - "print ('Sum of digits of %d is' % n),\n", - "\n", - "while sum>=10 :\n", - " sum = 0\n", - " while n>0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " n = sum\n", - "\n", - "# Result\n", - "print ('%d' % sum)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 8626\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 8626 is 4\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.16, Page number: 84" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Calculation and result\n", - "print ('Prime numbers upto %d are ' % n)\n", - "\n", - "for num in range (2, n+1) :\n", - " flag = 1\n", - " for i in range (2, num) :\n", - " if num % i == 0 : \n", - " flag = 0\n", - " if flag :\n", - " print ('%d ' % num)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 12\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Prime numbers upto 12 are \n", - "2 3 5 7 11 \n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.17, Page number: 85" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number '))\n", - "\n", - "# Calculation and result\n", - "for lin in range (1, n+1) :\n", - " for count in range (1, lin+1) :\n", - " print ('%d ' % count),\n", - " print" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 \n", - "1 2 \n", - "1 2 3 \n", - "1 2 3 4 \n", - "1 2 3 4 5 \n", - "1 2 3 4 5 6 \n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.18, Page number: 86" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number '))\n", - "\n", - "# Calculation and result\n", - "for lin in range (1, n+1) :\n", - " for count in range (lin, 2*lin) :\n", - " print ('%d ' % count),\n", - " print" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 \n", - "2 3 \n", - "3 4 5 \n", - "4 5 6 7 \n", - "5 6 7 8 9 \n", - "6 7 8 9 10 11 \n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.19, Page number: 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number '))\n", - "\n", - "# Calculation and result\n", - "for lin in range (1, n+1) :\n", - " for blk in range (1, n-lin+1) :\n", - " print ' ',\n", - " for up in range (1, lin+1) :\n", - " print ('%d' % up),\n", - " down = lin-1\n", - " while down>0 :\n", - " print ('%d' % down),\n", - " down = down-1\n", - " print" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1\n", - " 1 2 1\n", - " 1 2 3 2 1\n", - " 1 2 3 4 3 2 1\n", - " 1 2 3 4 5 4 3 2 1\n", - "1 2 3 4 5 6 5 4 3 2 1\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.20, Page number: 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number '))\n", - "\n", - "# Calculation and result\n", - "for lin in range (1, n+1) :\n", - " for blk in range (1, n-lin+1) :\n", - " print ' ',\n", - " for up in range (lin, 2*lin) :\n", - " print ('%d' % (up%10)),\n", - " down = 2*lin-2\n", - " while down>=lin :\n", - " print ('%d' % (down%10)),\n", - " down = down-1\n", - " print" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1\n", - " 2 3 2\n", - " 3 4 5 4 3\n", - " 4 5 6 7 6 5 4\n", - " 5 6 7 8 9 8 7 6 5\n", - "6 7 8 9 0 1 0 9 8 7 6\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_4.ipynb b/Magnifying_C/Chapter_4.ipynb deleted file mode 100755 index a071712d..00000000 --- a/Magnifying_C/Chapter_4.ipynb +++ /dev/null @@ -1,1070 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4: Functions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1, Page number: 91" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration and result\n", - "a = 5\n", - "c = 'h'\n", - "b = 3.14\n", - "def myfunction (x, ch, fl) :\n", - " print ('%d %c %.2f ' % (x, ch, fl))\n", - " \n", - "myfunction (a, c, b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5 h 3.14 \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2, Page number: 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def add (a, b) :\n", - " som = a + b\n", - " return som\n", - "\n", - "print ('The sum of %d and %d is %d' % (a, b, (add (a, b))))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 8\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sum of 7 and 8 is 15\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3, Page number: 99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def greater (a, b) :\n", - " if a > b :\n", - " return a\n", - " else :\n", - " return b\n", - "\n", - "print ('The greater number is %d' % (greater (a, b)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 190\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greater number is 190\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4, Page number: 100" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def greater (a, b) :\n", - " if a == b :\n", - " print ('Both numbers are equal')\n", - " elif a > b :\n", - " print ('The greater number is %d' % a)\n", - " else :\n", - " print ('The greater number is %d' % b)\n", - " return\n", - "\n", - "greater (a, b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Both numbers are equal\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5, Page number: 102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "c = int(raw_input('Enter third number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def greatest (a, b, c) :\n", - " if a > b :\n", - " if a > c :\n", - " return a\n", - " else :\n", - " return c\n", - " else :\n", - " if b > c :\n", - " return b\n", - " else :\n", - " return c\n", - "\n", - "print ('The greatest number is %d' % (greatest (a, b, c)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 128\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter third number: 190\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greatest number is 190\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6, Page number: 104" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printnum (n) :\n", - " print ('Counting upto %d' % n) \n", - " for i in range (1, n+1) :\n", - " print i,\n", - "\n", - "printnum (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Counting upto 7\n", - "1 2 3 4 5 6 7\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.7, Page number: 105" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printeven (n) :\n", - " print ('Even numbers upto %d' % n) \n", - " for i in range (2, n+1, 2) :\n", - " print i,\n", - "\n", - "printeven (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Even numbers upto 7\n", - "2 4 6\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.8, Page number: 107" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printodd (n) :\n", - " print ('Odd numbers upto %d' % n) \n", - " for i in range (1, n+1, 2) :\n", - " print i,\n", - "\n", - "printodd (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Odd numbers upto 7\n", - "1 3 5 7\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9, Page number: 108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printnum (n) :\n", - " print ('Number line for %d' % n) \n", - " for i in range (-n, n+1) :\n", - " print i,\n", - "\n", - "printnum (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number line for 4\n", - "-4 -3 -2 -1 0 1 2 3 4\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10, Page number: 110" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def summate (n) :\n", - " total = 0\n", - " for i in range (1, n+1) :\n", - " total = total + i\n", - " return total\n", - "\n", - "print('Sum of first %d natural numbers is %d' % (n, summate (n)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of first 6 natural numbers is 21\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.11, Page number: 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def factors (n) :\n", - " print ('The factors of %d are' % n)\n", - " for i in range (1, n+1) :\n", - " if n%i == 0 :\n", - " print i,\n", - "\n", - "factors (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 28\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The factors of 28 are\n", - "1 2 4 7 14 28\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12, Page number: 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def multiple (n) :\n", - " print ('The first 10 multiples of %d are' % n)\n", - " for i in range (1, 11) :\n", - " print('%d X %d = %d' % (n, i, n*i))\n", - "\n", - "multiple (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The first 10 multiples of 6 are\n", - "6 X 1 = 6\n", - "6 X 2 = 12\n", - "6 X 3 = 18\n", - "6 X 4 = 24\n", - "6 X 5 = 30\n", - "6 X 6 = 36\n", - "6 X 7 = 42\n", - "6 X 8 = 48\n", - "6 X 9 = 54\n", - "6 X 10 = 60\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.13, Page number: 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def sumofdigit (n) :\n", - " sum = 0\n", - " while n>0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " return sum\n", - "\n", - "print ('The sum of digits of %d is %d' % (n, sumofdigit (n)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 5214\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sum of digits of 5214 is 12\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14, Page number: 116" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def prime (n) :\n", - " count = 0\n", - " for i in range (2, n) :\n", - " if n%i == 0 :\n", - " count = count + 1\n", - " break\n", - "\n", - " if count == 0 :\n", - " print ('The number %d is prime' % n)\n", - " else :\n", - " print ('The number %d is composite' % n)\n", - "\n", - "prime (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 14\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The number 14 is composite\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.15, Page number: 118" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('%d terms of Fibonacci series are ' % n)\n", - "\n", - "def printfibo (n) :\n", - " first = 0\n", - " second = 1\n", - " count = 3\n", - "\n", - " print ('%d %d ' % (first, second)),\n", - "\n", - " while count<=n :\n", - " third = first + second\n", - " first = second\n", - " second = third\n", - " print (' %d ' % third), \n", - " count = count + 1\n", - "\n", - "printfibo (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10 terms of Fibonacci series are \n", - "0 1 1 2 3 5 8 13 21 34 \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.16, Page number: 120" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def sumofdigit (n) :\n", - " sum = n\n", - " while sum>=10 :\n", - " sum = 0\n", - " while n>0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " n = sum\n", - " return sum\n", - "\n", - "print ('Sum of digits of %d is %d' % (n, sumofdigit (n)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 8626\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 8626 is 4\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.17, Page number: 122" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('Prime numbers upto %d are ' % n)\n", - "\n", - "def printprime (n) :\n", - " for num in range (2, n+1) :\n", - " flag = 1\n", - " for i in range (2, num) :\n", - " if num % i == 0 : \n", - " flag = 0\n", - " if flag :\n", - " print ('%d ' % num),\n", - "\n", - "printprime (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 40\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Prime numbers upto 40 are \n", - "2 3 5 7 11 13 17 19 23 29 31 37 \n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.18, Page number: 124" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def pattern (n) :\n", - " for lin in range (1, n+1) :\n", - " for count in range (1, lin+1) :\n", - " print ('%d ' % count),\n", - " print\n", - "\n", - "pattern (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 \n", - "1 2 \n", - "1 2 3 \n", - "1 2 3 4 \n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19, Page number: 126" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def pattern (n) :\n", - " for lin in range (1, n+1) :\n", - " for count in range (lin, 2*lin) :\n", - " print ('%d ' % count),\n", - " print\n", - "\n", - "pattern (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 \n", - "2 3 \n", - "3 4 5 \n", - "4 5 6 7 \n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.20, Page number: 128" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def pattern (n) :\n", - " for lin in range (1, n+1) :\n", - " for blk in range (1, n-lin+1) :\n", - " print ' ',\n", - " for up in range (1, lin+1) :\n", - " print ('%d' % up),\n", - " down = lin-1\n", - " while down>0 :\n", - " print ('%d' % down),\n", - " down = down-1\n", - " print\n", - "\n", - "pattern (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1\n", - " 1 2 1\n", - " 1 2 3 2 1\n", - "1 2 3 4 3 2 1\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.21, Page number: 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter a number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def pattern (n) :\n", - " for lin in range (1, n+1) :\n", - " for blk in range (1, n-lin+1) :\n", - " print ' ',\n", - " for up in range (lin, 2*lin) :\n", - " print ('%d' % (up%10)),\n", - " down = 2*lin-2\n", - " while down>=lin :\n", - " print ('%d' % (down%10)),\n", - " down = down-1\n", - " print\n", - "\n", - "pattern (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number: 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1\n", - " 2 3 2\n", - " 3 4 5 4 3\n", - "4 5 6 7 6 5 4\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_5.ipynb b/Magnifying_C/Chapter_5.ipynb deleted file mode 100755 index b4cb2db2..00000000 --- a/Magnifying_C/Chapter_5.ipynb +++ /dev/null @@ -1,909 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5: Pointers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1, Page number: 135" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Calculation and result\n", - "print ('The original values are a = %d b = %d' % (a, b))\n", - "temp = a\n", - "a = b\n", - "b = temp\n", - "\n", - "print ('The values after swapping are a = %d b = %d' % (a, b))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 15\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 27\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The original values are a = 15 b = 27\n", - "The values after swapping are a = 27 b = 15\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2, Page number: 136" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('The original values are a = %d b = %d' % (a, b))\n", - "\n", - "def swap (a, b) :\n", - " temp = a\n", - " a = b\n", - " b = temp\n", - " print ('The values after swapping are a = %d b = %d' % (a, b))\n", - "\n", - "swap (a, b)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 15\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 27\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The original values are a = 15 b = 27\n", - "The values after swapping are a = 27 b = 15\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3, Page number: 141" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('The original values are a = %d b = %d' % (a, b))\n", - "\n", - "def swap (a, b) :\n", - " temp = a\n", - " a = b\n", - " b = temp\n", - " print ('The values after swapping are a = %d b = %d' % (a, b))\n", - "\n", - "swap (a, b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 15\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 27\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The original values are a = 15 b = 27\n", - "The values after swapping are a = 27 b = 15\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4, Page number: 145" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('In main the original values are a = %d b = %d' % (a, b))\n", - "print ('In main the address of a is %x and address of b is %x' % (a, b))\n", - "\n", - "def swap (a, b) :\n", - " print ('In swap the address in a is %x and b is %x' % (a, b))\n", - " temp = a\n", - " a = b\n", - " b = temp\n", - " print ('The values after swapping are a = %d b = %d' % (a, b))\n", - "\n", - "swap (a, b)\n", - "\n", - "print ('In main the values after swapping are a = %d b = %d' % (a, b))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 15\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 27\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In main the original values are a = 15 b = 27\n", - "In main the address of a is f and address of b is 1b\n", - "In swap the address in a is f and b is 1b\n", - "The values after swapping are a = 27 b = 15\n", - "In main the values after swapping are a = 15 b = 27\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5, Page number: 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('In main the value of a = %d b = %d' % (a, b))\n", - "\n", - "def doooo (a, b) :\n", - " a = a+10\n", - " b = b+10\n", - "\n", - "doooo (a, b)\n", - "\n", - "print ('In main the value of a = %d b = %d' % (a, b))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In main the value of a = 5 b = 7\n", - "In main the value of a = 5 b = 7\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6, Page number: 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number: '))\n", - "b = int(raw_input('Enter second number: '))\n", - "\n", - "# Function declaration, calculation and result\n", - "print ('In main the value of a = %d b = %d' % (a, b))\n", - "print ('In main the addresses are a = %s b = %s' % (hex(id(a)), hex(id(b))))\n", - "\n", - "def doooo (a, b) :\n", - " print ('In doooo the addresses are a = %s b = %s' % (hex(id(a)), hex(id(b))))\n", - " a = a+10\n", - " b = b+10\n", - "\n", - "doooo (a, b)\n", - "\n", - "print ('In main the value of a = %d b = %d' % (a, b))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number: 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In main the value of a = 5 b = 7\n", - "In main the addresses are a = 0x1b49138 b = 0x1b49108\n", - "In doooo the addresses are a = 0x1b49138 b = 0x1b49108\n", - "In main the value of a = 5 b = 7\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7, Page number: 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def add (a, b) :\n", - " x = a+b\n", - " return x\n", - "\n", - "som = add (a, b)\n", - "\n", - "print ('The sum of %d + %d = %d' % (a, b, som))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sum of 2 + 3 = 5\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8, Page number: 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def greater (a, b) :\n", - " if a>b :\n", - " big = a\n", - " else :\n", - " big = b\n", - " return big\n", - "\n", - "great = greater (a, b)\n", - "\n", - "print ('The greater number is %d' % great)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 23\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greater number is 45\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9, Page number: 156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "c = int(raw_input('Enter third number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def greater (a, b, c) :\n", - " if a>b :\n", - " if a>c :\n", - " big = a\n", - " else :\n", - " big = c\n", - " else :\n", - " if b>c :\n", - " big = b\n", - " else :\n", - " big = c\n", - " return big\n", - "\n", - "great = greater (a, b, c)\n", - "\n", - "print ('The greatest number is %d' % great)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 190\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter third number 128\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greatest number is 190\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10, Page number: 158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def summate (n) :\n", - " i = 1\n", - " total = 0\n", - " while i <= n :\n", - " total = total + i\n", - " i = i+1\n", - " return total\n", - "\n", - "sumn = summate (n)\n", - "\n", - "print ('Sum of first %d natural numbers is %d' % (n, sumn))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of first 5 natural numbers is 15\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.11, Page number: 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def sumofdigit (n) :\n", - " sum = 0\n", - " while n > 0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " return sum\n", - "\n", - "result = sumofdigit (n)\n", - "\n", - "print ('Sum of digits of %d is %d' % (n, result))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 7162\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 7162 is 16\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12, Page number: 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "sum = n\n", - "\n", - "# Function declaration, calculation and result\n", - "def sumofdigit (n, sum) :\n", - " while sum>=10 :\n", - " sum = 0\n", - " while n>0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " n = sum\n", - " return sum\n", - "\n", - "result = sumofdigit (n, sum)\n", - "\n", - "print ('Sum of digits of %d is %d' % (n, result))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 7162\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 7162 is 7\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.13, Page number: 163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def checkprime (n) :\n", - " flag = 1\n", - " i = 2\n", - " while i b :\n", - " big = 'first'\n", - " else :\n", - " big = 'second'\n", - " return big\n", - "\n", - "greater (a, b)\n", - "\n", - "if big == 'equal' :\n", - " print ('EQUAL')\n", - "else :\n", - " if big == 'first' :\n", - " print ('First number is greater %d' % a)\n", - " else :\n", - " print ('Second number is greater %d' % b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "EQUAL\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7, Page number: 196" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = int(raw_input('Enter first number '))\n", - "b = int(raw_input('Enter second number '))\n", - "c = int(raw_input('Enter third number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def greater (a, b, c) :\n", - " if a>b :\n", - " if a>c :\n", - " print ('The greatest number is %d ' % a)\n", - " else :\n", - " print ('The greatest number is %d ' % c)\n", - "\n", - " else :\n", - " if b>c :\n", - " print ('The greatest number is %d ' % b)\n", - " else : \n", - " print ('The greatest number is %d ' % c)\n", - "\n", - "greater (a, b, c)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter first number 190\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter second number 128\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter third number 45\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The greatest number is 190 \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.8, Page number: 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def summate (n) :\n", - " i = 1\n", - " global total\n", - " total = 0\n", - " while i <= n :\n", - " total = total + i\n", - " i = i+1\n", - " \n", - "summate (n)\n", - "\n", - "print ('Sum of first %d natural numbers is %d' % (n, total))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of first 6 natural numbers is 21\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9, Page number: 199" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def sumofdigit (n) :\n", - " global sum\n", - " sum = 0\n", - " while n > 0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " return sum\n", - "\n", - "sumofdigit (n)\n", - "\n", - "print ('Sum of digits of %d is %d' % (n, sum))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 7612\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 7612 is 16\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10, Page number: 201" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def checkprime (n) :\n", - " flag = 1\n", - " i = 2\n", - " while i=10 :\n", - " sum = 0\n", - " while n>0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " n = sum\n", - " return sum\n", - "\n", - "result = sumofdigit (n, sum)\n", - "\n", - "print ('Sum of digits of %d is %d' % (n, result))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 7612\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 7612 is 7\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.13, Page number: 207" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def prime (n) :\n", - " for num in range (2, n) :\n", - " flag = 1\n", - " for i in range (2, num) :\n", - " if num % i == 0 : \n", - " flag = 0\n", - " if flag :\n", - " print ('%d ' % num),\n", - "\n", - "prime (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 20\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2 3 5 7 11 13 17 19 \n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.14, Page number: 210" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "m = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def fun1 (m) :\n", - " if not hasattr(fun1, \"temp\") : \n", - " fun1.temp = 0\n", - " print ('In function value of temp = %d' % fun1.temp)\n", - " if fun1.temp < m :\n", - " fun1.temp = m\n", - " else :\n", - " fun1.temp = fun1.temp + 1\n", - "\n", - "for i in range (1, 6) :\n", - " fun1 (m)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In function value of temp = 0\n", - "In function value of temp = 10\n", - "In function value of temp = 11\n", - "In function value of temp = 12\n", - "In function value of temp = 13\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.15, Page number: 212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "m = 10\n", - "i = 1\n", - "\n", - "# Function declaration, calculation and result\n", - "def fun1 (m) :\n", - " x = m\n", - " if not hasattr(fun1, \"temp\") : \n", - " fun1.temp = 0\n", - "\n", - " if fun1.temp == 0 :\n", - " print ('\\nIn FUNCTION Global variable')\n", - " print ('Value of m = %d address of m = %x' % (m, id(m)))\n", - " print ('\\nIn FUNCTION Formal parameter variable')\n", - " print ('Value of x = %d address of x = %x' % (x, id(x)))\n", - " print ('\\nIn FUNCTION Static variable')\n", - " print ('Value of temp = %d address of temp = %x' % (fun1.temp, id(fun1.temp)))\n", - "\n", - " if fun1.temp < m :\n", - " fun1.temp = m\n", - "\n", - " else :\n", - " print ('Value of temp = %d' % fun1.temp)\n", - " fun1.temp = fun1.temp + 1\n", - "\n", - "print ('\\nIn MAIN Global variable')\n", - "print ('Value of m = %d address of m = %x' % (m, id(m)))\n", - "print ('\\nIn MAIN Local variable')\n", - "print ('Value of i = %d address of i = %x' % (i, id(i)))\n", - " \n", - "for i in range (1, 6) :\n", - " fun1 (m)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In MAIN Global variable\n", - "Value of m = 10 address of m = 117d0c0\n", - "\n", - "In MAIN Local variable\n", - "Value of i = 1 address of i = 117d198\n", - "\n", - "In FUNCTION Global variable\n", - "Value of m = 10 address of m = 117d0c0\n", - "\n", - "In FUNCTION Formal parameter variable\n", - "Value of x = 10 address of x = 117d0c0\n", - "\n", - "In FUNCTION Static variable\n", - "Value of temp = 0 address of temp = 117d1b0\n", - "Value of temp = 10\n", - "Value of temp = 11\n", - "Value of temp = 12\n", - "Value of temp = 13\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.16, Page number: 215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter number of Fibonacci terms required '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def nextfibo () :\n", - " if not hasattr(nextfibo, \"first\") : \n", - " nextfibo.first = 0\n", - " if not hasattr(nextfibo, \"second\") : \n", - " nextfibo.second = 1\n", - " if not hasattr(nextfibo, \"third\") : \n", - " nextfibo.third = 0\n", - " nextfibo.third = nextfibo.first + nextfibo.second\n", - " nextfibo.first = nextfibo.second\n", - " nextfibo.second = nextfibo.third\n", - " return nextfibo.first\n", - " \n", - "print ('%d terms of Fibonacci series are' % n) \n", - "print 0,\n", - "for count in range (2, n+1) :\n", - " result = nextfibo ()\n", - " print ('%d' % result)," - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter number of Fibonacci terms required 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10 terms of Fibonacci series are\n", - "0 1 1 2 3 5 8 13 21 34\n" - ] - } - ], - "prompt_number": 17 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_7.ipynb b/Magnifying_C/Chapter_7.ipynb deleted file mode 100755 index 73eec220..00000000 --- a/Magnifying_C/Chapter_7.ipynb +++ /dev/null @@ -1,862 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7: Recursion" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1, Page number: 219" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration, calculation and result\n", - "str = raw_input('Enter a string: ')\n", - "\n", - "print str" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a string: HELLO\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "HELLO\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2, Page number: 221" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration, calculation and result\n", - "str = raw_input('Enter a string: ')\n", - "\n", - "print str[::-1]" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a string: HELLO\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "OLLEH\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3, Page number: 224" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def fact (n) :\n", - " if n>0 :\n", - " return n * fact (n-1)\n", - " else :\n", - " return 1\n", - "\n", - "print ('Factorial of %d is %d' % (n, fact (n)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Factorial of 5 is 120\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4, Page number: 227" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printnum (n) :\n", - " if n>0 :\n", - " printnum (n-1)\n", - " print n,\n", - "\n", - "print ('Counting up to %d' % n)\n", - "printnum (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Counting up to 10\n", - "1 2 3 4 5 6 7 8 9 10\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5, Page number: 229" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printeven (n) :\n", - "\tif not hasattr(printeven, \"x\") : \n", - "\t\tprinteven.x = 2\n", - " \n", - "\tif printeven.x <= n :\n", - "\t\tprint printeven.x,\n", - "\t\tprinteven.x = printeven.x + 2\n", - "\t\tprinteven (n)\n", - "\n", - "print ('Even numbers up to %d are' % n)\n", - "printeven (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Even numbers up to 10 are\n", - "2 4 6 8 10\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.6, Page number: 231" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printodd (x, n) :\n", - "\tif x <= n : \n", - "\t\tprint x,\n", - "\t\tprintodd (x+2, n)\n", - "\n", - "print ('Odd numbers up to %d are' % n)\n", - "printodd (1, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Odd numbers up to 10 are\n", - "1 3 5 7 9\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.7, Page number: 232" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printnum (fro, to) :\n", - "\tif fro <= to : \n", - "\t\tprint fro,\n", - "\t\tprintnum (fro+1, to)\n", - "\n", - "print ('Number line for %d is' % n)\n", - "printnum (-n, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number line for 5 is\n", - "-5 -4 -3 -2 -1 0 1 2 3 4 5\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.8, Page number: 234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def summate (n) :\n", - "\tif n > 0 : \n", - "\t\treturn n + summate (n-1)\n", - "\telse :\n", - "\t\treturn 0\n", - "\n", - "print ('Sum of first %d natural numbers is %d' % (n, summate (n)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of first 10 natural numbers is 55\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.9, Page number: 237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def factors (n) :\n", - "\tif not hasattr(factors, \"i\") : \n", - "\t\tfactors.i = 1\n", - "\t\t\n", - "\tif factors.i <= n : \n", - "\t\tif n % factors.i == 0 :\n", - "\t\t\tprint factors.i,\n", - "\t\tfactors.i = factors.i + 1\n", - "\t\tfactors (n)\n", - "\n", - "print ('The factors of %d are' % n)\n", - "factors (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 28\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The factors of 28 are\n", - "1 2 4 7 14 28\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.10, Page number: 239" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def multiple (n) :\n", - "\tif not hasattr(multiple, \"i\") : \n", - "\t\tmultiple.i = 1\n", - "\t\t\n", - "\tif multiple.i <= 10 : \n", - "\t\tprint ('%d X %d = %d' % (n, multiple.i, n*multiple.i))\n", - "\t\tmultiple.i = multiple.i + 1\n", - "\t\tmultiple (n)\n", - "\n", - "print ('The first 10 multiples of %d are' % n)\n", - "multiple (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The first 10 multiples of 6 are\n", - "6 X 1 = 6\n", - "6 X 2 = 12\n", - "6 X 3 = 18\n", - "6 X 4 = 24\n", - "6 X 5 = 30\n", - "6 X 6 = 36\n", - "6 X 7 = 42\n", - "6 X 8 = 48\n", - "6 X 9 = 54\n", - "6 X 10 = 60\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.11, Page number: 241" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def checkprime (n) :\n", - " flag = 1\n", - " i = 2\n", - " while i=10 :\n", - " sum = 0\n", - " while n>0 :\n", - " sum = sum + n%10\n", - " n = n/10\n", - " n = sum\n", - " return sum\n", - "\n", - "result = sumofdigit (n, sum)\n", - "\n", - "print ('Sum of digits of %d is %d' % (n, result))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 8626\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of digits of 8626 is 4\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.14, Page number: 245" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def prime (n) :\n", - " for num in range (3, n+1) :\n", - " flag = 1\n", - " for i in range (2, num) :\n", - " if num % i == 0 : \n", - " flag = 0\n", - " if flag :\n", - " print ('%d ' % num),\n", - "\n", - "print ('Prime numbers upto %d are' % n)\n", - "prime (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 30\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Prime numbers upto 30 are\n", - "3 5 7 11 13 17 19 23 29 \n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.15, Page number: 246" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int (raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def pattern (n) :\n", - "\tif n > 0 :\n", - "\t\tpattern (n-1)\n", - "\t\tfor count in range (1, n+1) :\n", - "\t\t\tprint ('%d' % count),\n", - " \tprint\n", - " \t\n", - "pattern (n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1\n", - "1 2\n", - "1 2 3\n", - "1 2 3 4\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.16, Page number: 249" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "n = int(raw_input('Enter any number '))\n", - "\n", - "# Function declaration, calculation and result\n", - "def printline (x, total) :\n", - "\tif x > 0 :\n", - "\t\tprintline (x-1, total)\n", - "\t\tfor blk in range (1, total-x+1) :\n", - "\t\t\tprint ' ',\n", - "\t\tfor up in range (1, x+1) :\n", - "\t\t\tprint ('%d' % up),\n", - "\t\tdown = x-1\n", - "\t\twhile down>0 :\n", - "\t\t\tprint ('%d' % down),\n", - "\t\t\tdown = down-1\n", - "\t\tprint\n", - "\n", - "printline (n, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1\n", - " 1 2 1\n", - " 1 2 3 2 1\n", - "1 2 3 4 3 2 1\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.17, Page number: 253" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def listsum () :\n", - "\tn = int(raw_input('Enter any number '))\n", - "\tif n > 0 :\n", - "\t\treturn n + listsum ()\n", - "\telse :\n", - "\t\treturn 0\n", - "\t\t\n", - "sum = listsum ()\n", - "print ('Sum of list of numbers is %d' % sum)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any number -4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum of list of numbers is 6\n" - ] - } - ], - "prompt_number": 18 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_8.ipynb b/Magnifying_C/Chapter_8.ipynb deleted file mode 100755 index ccafa905..00000000 --- a/Magnifying_C/Chapter_8.ipynb +++ /dev/null @@ -1,2718 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8: Arrays" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1, Page number: 256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "word = array('c', ['H', 'e', 'l', 'l', 'o'])\n", - "\n", - "# Result\n", - "print ('The contents of word [] is %s ' % ''.join(word))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The contents of word [] is Hello \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2, Page number: 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "marks = [0]*10\n", - "avg = 0\n", - "\n", - "# Calculation and result\n", - "for i in range (0, 10) :\n", - "\tmarks[i] = int(raw_input('Enter value in cell [%d] ' % i))\n", - "\tavg = avg + marks[i]\n", - "\n", - "avg = avg/10\n", - "print ('The average marks are %f' % avg)\n", - "\n", - "for i in range (0, 10) :\n", - "\tif marks[i] < avg :\n", - "\t\tprint ('Marks in cell [%d] are %d less than average' % (i, marks[i]))\n", - "\telse :\n", - "\t\tprint ('Marks in cell [%d] are %d above/equal to average' % (i, marks[i]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [0] 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [1] 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [2] 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [3] 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [4] 56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [5] 98\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [6] 53\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [7] 82\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [8] 74\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [9] 39\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average marks are 63.000000\n", - "Marks in cell [0] are 45 less than average\n", - "Marks in cell [1] are 78 above/equal to average\n", - "Marks in cell [2] are 65 above/equal to average\n", - "Marks in cell [3] are 43 less than average\n", - "Marks in cell [4] are 56 less than average\n", - "Marks in cell [5] are 98 above/equal to average\n", - "Marks in cell [6] are 53 less than average\n", - "Marks in cell [7] are 82 above/equal to average\n", - "Marks in cell [8] are 74 above/equal to average\n", - "Marks in cell [9] are 39 less than average\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3, Page number: 261" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "data = raw_input('Enter the string ')\n", - "\n", - "# Calculation and result\n", - "rev_data = reversed (data)\n", - "\n", - "if list (data) == list (rev_data) :\n", - "\tprint ('The string %s is a PALINDROME' % data)\n", - "else :\n", - "\tprint ('The string %s is not a PALINDROME' % data)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the string MADAM\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The string MADAM is a PALINDROME\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4, Page number: 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "marks = [0]*10\n", - "avg = 0\n", - "\n", - "# Function declaration, calculation and result\n", - "def readdata (marks) :\n", - "\tfor i in range (0, 10) :\n", - "\t\tmarks[i] = int(raw_input('Enter value in cell [%d] ' % i))\n", - "\t\t\n", - "def average (marks) :\n", - "\tmean = 0\n", - "\tfor i in range (0, 10) :\n", - "\t\tmean = mean + marks[i]\n", - "\treturn mean/10\n", - "\n", - "def printdata (marks, avg) :\n", - "\tfor i in range (0, 10) :\n", - "\t\tif marks[i] < avg :\n", - "\t\t\tprint ('Marks in cell [%d] are %d less than average' % (i, marks[i]))\n", - "\t\telse :\n", - "\t\t\tprint ('Marks in cell [%d] are %d above/equal to average' % (i, marks[i]))\t\n", - "\n", - "\n", - "readdata (marks)\n", - "avg = average (marks)\t\n", - "print ('The average marks are %f' % avg)\n", - "printdata (marks, avg)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [0] 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [1] 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [2] 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [3] 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [4] 56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [5] 98\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [6] 53\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [7] 82\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [8] 74\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell [9] 39\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average marks are 63.000000\n", - "Marks in cell [0] are 45 less than average\n", - "Marks in cell [1] are 78 above/equal to average\n", - "Marks in cell [2] are 65 above/equal to average\n", - "Marks in cell [3] are 43 less than average\n", - "Marks in cell [4] are 56 less than average\n", - "Marks in cell [5] are 98 above/equal to average\n", - "Marks in cell [6] are 53 less than average\n", - "Marks in cell [7] are 82 above/equal to average\n", - "Marks in cell [8] are 74 above/equal to average\n", - "Marks in cell [9] are 39 less than average\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5, Page number: 273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "a = [10, 20, 30, 40, 50]\n", - "\n", - "# Function declaration, calculation and result\n", - "def fun (x, y, z) :\n", - "\tx = x + 5\n", - "\ty = y + 10\n", - "\tz[4] = z[4] + 100\n", - "\n", - "\n", - "for i in range (0, 5) :\n", - "\tprint ('The cell [%d] contains %d' % (i, a[i]))\n", - "\tprint ('The address of cell [%d] is %x' % (i, id(a[i])))\n", - "\t\t\n", - "fun (a[0], a[3], a)\t\n", - "print\n", - "\n", - "for i in range (0, 5) :\n", - "\tprint ('The cell [%d] contains %d' % (i, a[i]))\n", - "\tprint ('The address of cell [%d] is %x' % (i, id(a[i])))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The cell [0] contains 10\n", - "The address of cell [0] is 18bc0c0\n", - "The cell [1] contains 20\n", - "The address of cell [1] is 18bbfd0\n", - "The cell [2] contains 30\n", - "The address of cell [2] is 18bbee0\n", - "The cell [3] contains 40\n", - "The address of cell [3] is 18bc5b8\n", - "The cell [4] contains 50\n", - "The address of cell [4] is 18bc4c8\n", - "\n", - "The cell [0] contains 10\n", - "The address of cell [0] is 18bc0c0\n", - "The cell [1] contains 20\n", - "The address of cell [1] is 18bbfd0\n", - "The cell [2] contains 30\n", - "The address of cell [2] is 18bbee0\n", - "The cell [3] contains 40\n", - "The address of cell [3] is 18bc5b8\n", - "The cell [4] contains 150\n", - "The address of cell [4] is 18bcaf8\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6, Page number: 275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "data = raw_input('Enter the string ')\n", - "\n", - "# Function declaration, calculation and result\n", - "def revstring (data) :\n", - "\trev_data = reversed (data)\n", - "\n", - "\tif list (data) == list (rev_data) :\n", - "\t\tprint ('The string %s is a PALINDROME' % data)\n", - "\telse :\n", - "\t\tprint ('The string %s is not a PALINDROME' % data)\n", - "\n", - "revstring (data)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the string python\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The string python is not a PALINDROME\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7, Page number: 277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "a = [0]*10\n", - "\n", - "# Function declaration, calculation and result\n", - "def readnsort (a) :\n", - "\tpos = 0\n", - "\tfor len in range (0, 10) :\n", - "\t\tnum = int(raw_input('Enter data element no. %d ' % len))\n", - "\t\t\n", - "\t\tfor pos in range (0, len+1) :\n", - "\t\t\tif num < a[pos] :\n", - "\t\t\t\tbreak\n", - "\t\t\t\t\n", - "\t\ti = len\t\t\n", - "\t\twhile i>=pos :\n", - "\t\t\ta[i] = a[i-1]\n", - "\t\t\ti = i-1\n", - "\t\ta[pos] = num\n", - "\t\t\t\n", - "def printdata (a) :\n", - "\tfor i in range (0, 10) :\n", - "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\t\t\t\n", - "\t\t\t\n", - "readnsort (a)\n", - "print\n", - "printdata (a)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 0 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 1 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 2 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 3 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 4 56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 5 98\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 6 53\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 7 82\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 8 74\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data element no. 9 39\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The data in cell [0] is 39 \n", - "The data in cell [1] is 43 \n", - "The data in cell [2] is 45 \n", - "The data in cell [3] is 53 \n", - "The data in cell [4] is 56 \n", - "The data in cell [5] is 65 \n", - "The data in cell [6] is 74 \n", - "The data in cell [7] is 78 \n", - "The data in cell [8] is 82 \n", - "The data in cell [9] is 98 \n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.8, Page number: 279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Function declaration, calculation and result\n", - "def readdata () :\n", - "\ta = []\n", - "\tfor i in range (0, 10) :\n", - "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", - "\treturn a\n", - "\n", - "def sortdata (a) :\n", - "\tfor p in range (0, 9) :\n", - "\t\tmin = p\n", - "\t\tfor i in range (p, 10) :\n", - "\t\t\tif a[min] > a[i] :\n", - "\t\t\t\tmin = i\n", - "\t\ttemp = a[p]\n", - "\t\ta[p] = a[min]\n", - "\t\ta[min] = temp\n", - "\treturn a\n", - "\n", - "def printdata (a) :\n", - "\tfor i in range (0, 10) :\n", - "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", - "\n", - "a = readdata ()\n", - "a = sortdata (a)\n", - "print ('\\nThe sorted data is ')\n", - "printdata (a)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [0] 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [1] 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [2] 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [3] 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [4] 56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [5] 98\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [6] 53\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [7] 82\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [8] 74\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [9] 39\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The sorted data is \n", - "The data in cell [0] is 39 \n", - "The data in cell [1] is 43 \n", - "The data in cell [2] is 45 \n", - "The data in cell [3] is 53 \n", - "The data in cell [4] is 56 \n", - "The data in cell [5] is 65 \n", - "The data in cell [6] is 74 \n", - "The data in cell [7] is 78 \n", - "The data in cell [8] is 82 \n", - "The data in cell [9] is 98 \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9, Page number: 282" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Function declaration, calculation and result\n", - "def readdata () :\n", - "\ta = []\n", - "\tfor i in range (0, 10) :\n", - "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", - "\treturn a\n", - "\n", - "def bubble (a) :\n", - "\tfor p in range (0, 10) :\n", - "\t\tfor i in range (0, 9-p) :\n", - "\t\t\tif a[i] > a[i+1] :\n", - "\t\t\t\ttemp = a[i]\n", - "\t\t\t\ta[i] = a[i+1]\n", - "\t\t\t\ta[i+1] = temp\n", - "\treturn a\n", - "\n", - "def printdata (a) :\n", - "\tfor i in range (0, 10) :\n", - "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", - "\n", - "a = readdata ()\n", - "a = bubble (a)\n", - "print ('\\nThe sorted data is ')\n", - "printdata (a)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [0] 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [1] 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [2] 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [3] 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [4] 56\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [5] 98\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [6] 53\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [7] 82\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [8] 74\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [9] 39\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The sorted data is \n", - "The data in cell [0] is 39 \n", - "The data in cell [1] is 43 \n", - "The data in cell [2] is 45 \n", - "The data in cell [3] is 53 \n", - "The data in cell [4] is 56 \n", - "The data in cell [5] is 65 \n", - "The data in cell [6] is 74 \n", - "The data in cell [7] is 78 \n", - "The data in cell [8] is 82 \n", - "The data in cell [9] is 98 \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.10, Page number: 285" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Function declaration, calculation and result\n", - "def readdata (size) :\n", - "\ta = []\n", - "\tfor i in range (0, size) :\n", - "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", - "\treturn a\n", - "\n", - "def bubble (a, size) :\n", - "\tfor p in range (0, size) :\n", - "\t\tfor i in range (0, size-p-1) :\n", - "\t\t\tif a[i] > a[i+1] :\n", - "\t\t\t\ttemp = a[i]\n", - "\t\t\t\ta[i] = a[i+1]\n", - "\t\t\t\ta[i+1] = temp\n", - "\treturn a\n", - "\n", - "def printdata (a, size) :\n", - "\tfor i in range (0, size) :\n", - "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", - "\n", - "def lsearch (a, key, size) :\n", - "\tfor i in range (0, size) :\n", - "\t\tif a[i] == key :\n", - "\t\t\treturn i\n", - "\t\tif i == size :\n", - "\t\t\treturn -1\n", - "\t\t\t\n", - "size = int(raw_input('Enter the total number of elements '))\n", - "a = readdata (size)\n", - "a = bubble (a, size)\n", - "print ('\\nThe sorted array is ')\n", - "printdata (a, size)\n", - "\n", - "find = int(raw_input('\\nEnter the element to be searched '))\n", - "pos = lsearch (a, find, size)\n", - "\n", - "if pos<0 :\n", - "\tprint ('\\nThe element %d NOT FOUND ' % find)\n", - "else :\n", - "\tprint ('\\nThe element %d found at position %d ' % (find, pos))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the total number of elements 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [0] 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [1] 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [2] 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [3] 34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [4] 49\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The sorted array is \n", - "The data in cell [0] is 34 \n", - "The data in cell [1] is 45 \n", - "The data in cell [2] is 49 \n", - "The data in cell [3] is 65 \n", - "The data in cell [4] is 78 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter the element to be searched 65\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The element 65 found at position 3 \n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.11, Page number: 288" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Function declaration, calculation and result\n", - "def readdata (size) :\n", - "\ta = []\n", - "\tfor i in range (0, size) :\n", - "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", - "\treturn a\n", - "\n", - "def bubble (a, size) :\n", - "\tfor p in range (0, size) :\n", - "\t\tfor i in range (0, size-p-1) :\n", - "\t\t\tif a[i] > a[i+1] :\n", - "\t\t\t\ttemp = a[i]\n", - "\t\t\t\ta[i] = a[i+1]\n", - "\t\t\t\ta[i+1] = temp\n", - "\treturn a\n", - "\n", - "def printdata (a, size) :\n", - "\tfor i in range (0, size) :\n", - "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", - "\n", - "def bsearch (a, key, size) :\n", - "\tfirst = 0\n", - "\tlast = size - 1\n", - "\tmid = (first + last)/2\n", - "\t\n", - "\twhile (first <= last and a[mid] != key) :\n", - "\t\tif a[mid] < key :\n", - "\t\t\tfirst = mid + 1\n", - "\t\telse :\n", - "\t\t\tif a[mid] > key :\n", - "\t\t\t\tlast = mid - 1\n", - "\t\tmid = (first + last)/2\n", - "\t\n", - "\tif a[mid] == key :\n", - "\t\treturn mid\n", - "\telse :\n", - "\t\treturn -1\n", - "\t\t\t\n", - "size = int(raw_input('Enter the number of elements in the array '))\n", - "a = readdata (size)\n", - "a = bubble (a, size)\n", - "print ('\\nThe sorted array is ')\n", - "printdata (a, size)\n", - "\n", - "find = int(raw_input('\\nPlease enter the element to be searched for '))\n", - "pos = bsearch (a, find, size)\n", - "\n", - "if pos<0 :\n", - "\tprint ('\\nThe element %d NOT FOUND ' % find)\n", - "else :\n", - "\tprint ('\\nThe element %d found at position %d ' % (find, pos))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of elements in the array 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [0] 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [1] 78\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [2] 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [3] 34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [4] 49\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The sorted array is \n", - "The data in cell [0] is 34 \n", - "The data in cell [1] is 45 \n", - "The data in cell [2] is 49 \n", - "The data in cell [3] is 65 \n", - "The data in cell [4] is 78 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Please enter the element to be searched for 45\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The element 45 found at position 1 \n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.12, Page number: 293" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Function declaration, calculation and result\n", - "def readncompute (no_of_students) :\n", - "\ta = [[0 for y in xrange(5)] for x in xrange(no_of_students)]\n", - "\tper = [0 for x in range(no_of_students)]\n", - "\tavg = 0\n", - "\t\n", - "\tfor i in range (0, no_of_students) :\n", - "\t\tprint ('\\nEnter marks of 5 subjects for Roll no. %d ' % (i+1))\n", - "\t\t\n", - "\t\tfor j in range (0, 5) :\n", - "\t\t\ta[i][j] = int(raw_input('Subject %d = ' % (j+1)))\n", - "\t\t\tper[i] = per[i] + a[i][j]\n", - "\t\t\t\n", - "\t\tper[i] = per[i]/5\n", - "\t\tavg = avg + per[i]\n", - "\t\t\n", - "\treturn a, avg/no_of_students, per\n", - "\n", - "def printdata (a, no_of_students, avg, per) :\n", - "\tfor i in range (0, no_of_students) :\n", - "\t\tprint ('\\nMarks for Roll no. %d are ' % (i+1))\n", - "\t\tfor j in range (0, 5) :\n", - "\t\t\tprint a[i][j]\n", - "\t\tprint ('Percentage for Roll no. %d is %f ' % ((i+1), per[i]))\n", - "\t\t\n", - "\t\tif per[i] < avg :\n", - "\t\t\tprint ('Below average')\n", - "\t\telse :\n", - "\t\t\tprint ('Above average')\n", - "\t\t\n", - "\n", - "no_of_students = int(raw_input('How many students marks do you want to enter '))\n", - "a, average, per = readncompute (no_of_students)\n", - "print ('\\nThe average marks are %f ' % average)\n", - "printdata (a, no_of_students, average, per)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many students marks do you want to enter 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for Roll no. 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1 = 75\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2 = 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3 = 51\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4 = 68\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5 = 73\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for Roll no. 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1 = 49\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2 = 71\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3 = 62\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4 = 53\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5 = 50\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for Roll no. 3 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1 = 90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2 = 82\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3 = 74\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4 = 93\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5 = 89\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The average marks are 68.000000 \n", - "\n", - "Marks for Roll no. 1 are \n", - "75\n", - "43\n", - "51\n", - "68\n", - "73\n", - "Percentage for Roll no. 1 is 62.000000 \n", - "Below average\n", - "\n", - "Marks for Roll no. 2 are \n", - "49\n", - "71\n", - "62\n", - "53\n", - "50\n", - "Percentage for Roll no. 2 is 57.000000 \n", - "Below average\n", - "\n", - "Marks for Roll no. 3 are \n", - "90\n", - "82\n", - "74\n", - "93\n", - "89\n", - "Percentage for Roll no. 3 is 85.000000 \n", - "Above average\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.13, Page number: 296" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def getchoice () :\n", - "\tprint\n", - "\tprint ('1 - Input two matrices ')\n", - "\tprint ('2 - Add and display sum ')\n", - "\tprint ('3 - Exit ')\n", - "\t\n", - "\tchoice = int(raw_input('Enter choice : '))\n", - "\treturn choice\n", - "\n", - "def read (matrix, rows, cols) :\t\n", - "\tfor i in range (0, rows) :\n", - "\t\tprint ('\\nEnter elements for row %d ' % (i+1))\t\t\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", - "\n", - "def add (sum, augend, addend, rows, cols) :\n", - "\tfor i in range (0, rows) :\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tsum[i][j] = augend[i][j] + addend[i][j]\n", - "\n", - "def display2matrices (augend, addend, rows, cols) :\n", - "\tprint ('\\nMatrix A ')\n", - "\tfor i in range (0, rows) :\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%3d ' % augend[i][j]),\n", - "\t\tprint\n", - "\tprint ('\\nMatrix B ')\n", - "\tfor i in range (0, rows) :\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%3d ' % addend[i][j]),\n", - "\t\tprint\n", - "\n", - "def display3matrices (sum, augend, addend, rows, cols) :\n", - "\tprint\n", - "\tfor i in range (0, rows) :\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%3d ' % augend[i][j]),\n", - "\t\tprint ('%s ' % ('+' if i==rows/2 else ' ')),\n", - "\t\t\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%2d ' % addend[i][j]),\n", - "\t\tprint ('%s ' % ('=' if i==rows/2 else ' ')),\n", - "\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%2d ' % sum[i][j]),\n", - "\t\tprint\n", - "\n", - "def display (matrix, rows, cols) :\n", - "\tfor i in range (0, rows) :\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%3d ' % matrix[i][j]),\n", - "\t\tprint\n", - "\n", - "augend = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "addend = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "sum = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "\n", - "condition = True\n", - "while condition :\n", - "\tchoice = getchoice ()\n", - "\t\n", - "\tif choice == 1 :\n", - "\t\trows = int(raw_input('\\nEnter the number of rows '))\t\t\n", - "\t\tcols = int(raw_input('Enter the number of columns '))\n", - "\t\t\n", - "\t\tprint ('\\n\\nEnter the first matrix ')\n", - "\t\tread (augend, rows, cols)\n", - "\t\tprint ('\\n\\nEnter the second matrix ')\n", - "\t\tread (addend, rows, cols)\n", - "\t\tprint ('\\n\\nYou entered ')\n", - "\t\tdisplay2matrices (augend, addend, rows, cols)\n", - "\t\n", - "\telif choice == 2 :\n", - "\t\tadd (sum, augend, addend, rows, cols)\n", - "\t\tdisplay3matrices (sum, augend, addend, rows, cols)\n", - "\t\n", - "\telif choice == 3 :\n", - "\t\tcondition = False\n", - "\t\texit ()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1 - Input two matrices \n", - "2 - Add and display sum \n", - "3 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter the number of rows 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of columns 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "Enter the first matrix \n", - "\n", - "Enter elements for row 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][1] = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][2] = 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][3] = 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][1] = 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][2] = 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][3] = 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row 3 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][1] = 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][2] = 6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][3] = 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "Enter the second matrix \n", - "\n", - "Enter elements for row 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][1] = 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][2] = 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][3] = 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][1] = 6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][2] = 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][3] = 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row 3 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][1] = 8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][2] = 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][3] = 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\n", - "You entered \n", - "\n", - "Matrix A \n", - " 1 2 3 \n", - " 3 4 5 \n", - " 5 6 7 \n", - "\n", - "Matrix B \n", - " 3 5 1 \n", - " 6 5 3 \n", - " 8 7 4 \n", - "\n", - "1 - Input two matrices \n", - "2 - Add and display sum \n", - "3 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " 1 2 3 3 5 1 4 7 4 \n", - " 3 4 5 + 6 5 3 = 9 9 8 \n", - " 5 6 7 8 7 4 13 13 11 \n", - "\n", - "1 - Input two matrices \n", - "2 - Add and display sum \n", - "3 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 3\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.14, Page number: 300" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def readmatrix (matrix, rows, cols) :\t\n", - "\tfor i in range (0, rows) :\n", - "\t\tprint ('\\nPlease enter elements for row %d ' % (i+1))\t\t\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", - "\n", - "def multiply (prod, a, b, Ar, Ac, Bc) :\n", - "\tfor i in range (0, Ar) :\n", - "\t\tfor j in range (0, Bc) :\n", - "\t\t\tprod[i][j] = 0\n", - "\t\t\tfor k in range (0, Ac) :\n", - "\t\t\t\tprod[i][j] += a[i][k] * b[k][j]\n", - "\n", - "def display (matrix, rows, cols) :\n", - "\tfor i in range (0, rows) :\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tprint ('%3d ' % matrix[i][j]),\n", - "\t\tprint\n", - "\n", - "a = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "b = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "product = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "\n", - "condition = True\n", - "while condition :\n", - "\tArows, Acols = map(int, raw_input('Enter order of matrix A: ').split())\n", - "\tBrows, Bcols = map(int, raw_input('Enter order of matrix B: ').split())\n", - "\n", - "\tif Acols == Brows :\n", - "\t\tcondition = False\n", - "\t\tbreak\n", - "\telse : \n", - "\t\tprint ('\\nMatrices are not compatible for multiplication. Enter the order again. ')\n", - "\t\tcontinue\n", - "\t\n", - "print ('\\nEnter matrix A: ')\n", - "readmatrix (a, Arows, Acols)\n", - "\t\n", - "print ('\\nEnter matrix B: ')\n", - "readmatrix (b, Brows, Bcols)\n", - "\n", - "multiply (product, a, b, Arows, Acols, Bcols)\n", - "print ('\\nThe resultant product (A.B) is: ')\n", - "display (product, Arows, Bcols)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter order of matrix A: 2 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter order of matrix B: 3 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter matrix A: \n", - "\n", - "Please enter elements for row 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][1] = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][2] = 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][3] = 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Please enter elements for row 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][1] = 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][2] = 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][3] = 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter matrix B: \n", - "\n", - "Please enter elements for row 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][1] = 6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][2] = 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Please enter elements for row 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][1] = 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][2] = 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Please enter elements for row 3 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][1] = 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][2] = 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The resultant product (A.B) is: \n", - " 20 14 \n", - " 56 41 \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.15, Page number: 303" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def getchoice () :\n", - "\tprint\n", - "\tprint ('1 - Input square matrix ')\n", - "\tprint ('2 - Display upper triangular matrix ')\n", - "\tprint ('3 - Display lower triangular matrix ')\n", - "\tprint ('4 - Exit ')\n", - "\t\n", - "\tcondition = True\n", - "\twhile condition :\n", - "\t\tchoice = int(raw_input('Enter choice : '))\n", - "\t\t\n", - "\t\tif choice in range (1, 5) :\n", - "\t\t\tcondition = False\n", - "\t\t\t\n", - "\treturn choice\n", - "\n", - "def displayupper (matrix, order) :\n", - "\tprint\n", - "\tfor i in range (0, order) :\n", - "\t\tfor j in range (0, order) :\n", - "\t\t\tif j >= i :\n", - "\t\t\t\tprint ('%3d ' % matrix[i][j]),\n", - "\t\t\telse :\n", - "\t\t\t\tprint ('%3d ' % 0),\n", - "\t\tprint\n", - "\t\t\n", - "def displaylower (matrix, order) :\n", - "\tprint\n", - "\tfor i in range (0, order) :\n", - "\t\tfor j in range (0, order) :\n", - "\t\t\tif j <= i :\n", - "\t\t\t\tprint ('%3d ' % matrix[i][j]),\n", - "\t\t\telse :\n", - "\t\t\t\tprint ('%3d ' % 0),\n", - "\t\tprint\n", - "\n", - "def read (matrix, rows, cols) :\t\n", - "\tfor i in range (0, rows) :\n", - "\t\tprint ('\\nEnter %d elements for row %d ' % (rows, (i+1)))\t\t\n", - "\t\tfor j in range (0, cols) :\n", - "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", - "\n", - "matrix = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "\n", - "condition = True\n", - "while condition :\n", - "\tchoice = getchoice ()\n", - "\t\n", - "\tif choice == 1 :\n", - "\t\torder = int(raw_input('\\nEnter order of square matrix '))\t\t\n", - "\t\tread (matrix, order, order)\n", - "\t\n", - "\telif choice == 2 :\n", - "\t\tdisplayupper (matrix, order)\n", - "\t\n", - "\telif choice == 3 :\n", - "\t\tdisplaylower (matrix, order)\n", - "\t\t\n", - "\telif choice == 4 :\n", - "\t\tcondition = False\n", - "\t\texit ()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1 - Input square matrix \n", - "2 - Display upper triangular matrix \n", - "3 - Display lower triangular matrix \n", - "4 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter order of square matrix 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter 3 elements for row 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][1] = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][2] = 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][3] = 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter 3 elements for row 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][1] = 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][2] = 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][3] = 6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter 3 elements for row 3 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][1] = 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][2] = 8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][3] = 9\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1 - Input square matrix \n", - "2 - Display upper triangular matrix \n", - "3 - Display lower triangular matrix \n", - "4 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " 1 2 3 \n", - " 0 5 6 \n", - " 0 0 9 \n", - "\n", - "1 - Input square matrix \n", - "2 - Display upper triangular matrix \n", - "3 - Display lower triangular matrix \n", - "4 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " 1 0 0 \n", - " 4 5 0 \n", - " 7 8 9 \n", - "\n", - "1 - Input square matrix \n", - "2 - Display upper triangular matrix \n", - "3 - Display lower triangular matrix \n", - "4 - Exit \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter choice : 4\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.16, Page number: 307" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def readmatrix (matrix, n) :\n", - "\tfor i in range (0, n) :\n", - "\t\tprint ('\\nEnter elements for row no %d ' % (i+1))\n", - "\t\tfor j in range (0, n) :\n", - "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", - "\n", - "def display (matrix, n) :\n", - "\tprint\n", - "\tfor i in range (0, n) :\n", - "\t\tfor j in range (0, n) :\n", - "\t\t\tprint ('%5d ' % matrix[i][j]),\n", - "\t\tprint\n", - "\t\t\n", - "def isunitmatrix(matrix, n) :\n", - "\tfor i in range (0, n) :\n", - "\t\tif matrix[i][i] != 1 :\n", - "\t\t\treturn 0\n", - "\t\n", - "\tfor i in range (0, n) :\n", - "\t\tfor j in range (0, n) :\n", - "\t\t\tif i != j :\n", - "\t\t\t\tif matrix[i][j] != 0 :\n", - "\t\t\t\t\treturn 0\n", - "\treturn 1\n", - "\n", - "matrix = [[0 for y in xrange(10)] for x in xrange(10)]\n", - "n = int(raw_input('Enter order of matrix '))\n", - "readmatrix (matrix, n)\n", - "display (matrix, n)\n", - "\n", - "if (isunitmatrix (matrix, n)) :\n", - "\tprint \"UNIT MATRIX\"\n", - "else :\n", - "\tprint \"NOT A UNIT MATRIX\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter order of matrix 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row no 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][1] = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][2] = 0\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[1][3] = 0\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row no 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][1] = 0\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][2] = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[2][3] = 0\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter elements for row no 3 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][1] = 0\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][2] = 0\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "matrix[3][3] = 1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " 1 0 0 \n", - " 0 1 0 \n", - " 0 0 1 \n", - "UNIT MATRIX\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.17, Page number: 311" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "string = raw_input('Enter a string: ')\n", - "\n", - "# Calculation and result\n", - "swap_string = string.swapcase()\n", - "\n", - "print swap_string" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a string: hello world\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "HELLO WORLD\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.18, Page number: 312" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "string = raw_input('Enter a string ')\n", - "\n", - "# Function declaration, calculation and result\n", - "def printstr (string) :\n", - "\tfor i in range (0, len(string)) :\n", - "\t\tfor j in range (0, i+1) :\n", - "\t\t\tprint string[j],\n", - "\t\tprint\n", - "\t\n", - "\ti = i - 2\n", - "\twhile i >= 0 :\n", - "\t\tfor j in range (0, i+1) :\n", - "\t\t\tprint string[j],\n", - "\t\tprint\n", - "\t\ti = i - 1\n", - "\t\t\n", - "printstr (string)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a string hello\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "h\n", - "h e\n", - "h e l\n", - "h e l l\n", - "h e l l o\n", - "h e l\n", - "h e\n", - "h\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.19, Page number: 314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = raw_input('Enter any string ')\n", - "\n", - "# Function declaration, calculation and result\n", - "def copy (a) :\n", - "\tb = a\n", - "\treturn b\n", - "\t\n", - "b = copy (a)\n", - "print\n", - "print ('The first string is %s ' % a)\n", - "print ('The second string is %s ' % b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any string hello\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The first string is hello \n", - "The second string is hello \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.20, Page number: 315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "a = raw_input('Enter the major string: ')\n", - "b = raw_input('Enter the minor string: ')\n", - "\n", - "# Function declaration, calculation and result\n", - "def ispart (a, b) :\n", - "\tif b in a :\n", - "\t\tprint ('The string \"%s\" is A SUBSTRING of \"%s\" ' % (b, a))\n", - "\telse :\n", - "\t\tprint ('The string \"%s\" is NOT A SUBSTRING of \"%s\" ' % (b, a))\n", - "\n", - "ispart (a, b)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the major string: python is a programming language\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the minor string: python\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The string \"python\" is A SUBSTRING of \"python is a programming language\" \n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/Chapter_9.ipynb b/Magnifying_C/Chapter_9.ipynb deleted file mode 100755 index acb61edf..00000000 --- a/Magnifying_C/Chapter_9.ipynb +++ /dev/null @@ -1,1093 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9: More on Pointers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1, Page number: 318" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "a = [[1,2,3,4,5],\n", - " [6,7,8,9,10],\n", - " [11,12,13,14,15],\n", - " [16,17,18,19,20],\n", - " [21,22,23,24,25]]\n", - "\n", - "# Calculation and result\n", - "print ('The value of a is %x ' % id(a))\n", - "\n", - "for i in range (0, 5) :\n", - "\tprint ('The value of a[%d] is %x ' % (i, id(i)))\n", - "\n", - "for i in range (0, 5) :\n", - "\tfor j in range (0, 5) : \n", - "\t\tprint ('The cell [%d][%d] i.e. %x has %d ' % (i, j, id(a[i][j]), a[i][j]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of a is 7f55dc3e08c0 \n", - "The value of a[0] is 18861b0 \n", - "The value of a[1] is 1886198 \n", - "The value of a[2] is 1886180 \n", - "The value of a[3] is 1886168 \n", - "The value of a[4] is 1886150 \n", - "The cell [0][0] i.e. 1886198 has 1 \n", - "The cell [0][1] i.e. 1886180 has 2 \n", - "The cell [0][2] i.e. 1886168 has 3 \n", - "The cell [0][3] i.e. 1886150 has 4 \n", - "The cell [0][4] i.e. 1886138 has 5 \n", - "The cell [1][0] i.e. 1886120 has 6 \n", - "The cell [1][1] i.e. 1886108 has 7 \n", - "The cell [1][2] i.e. 18860f0 has 8 \n", - "The cell [1][3] i.e. 18860d8 has 9 \n", - "The cell [1][4] i.e. 18860c0 has 10 \n", - "The cell [2][0] i.e. 18860a8 has 11 \n", - "The cell [2][1] i.e. 1886090 has 12 \n", - "The cell [2][2] i.e. 1886078 has 13 \n", - "The cell [2][3] i.e. 1886060 has 14 \n", - "The cell [2][4] i.e. 1886048 has 15 \n", - "The cell [3][0] i.e. 1886030 has 16 \n", - "The cell [3][1] i.e. 1886018 has 17 \n", - "The cell [3][2] i.e. 1886000 has 18 \n", - "The cell [3][3] i.e. 1885fe8 has 19 \n", - "The cell [3][4] i.e. 1885fd0 has 20 \n", - "The cell [4][0] i.e. 1885fb8 has 21 \n", - "The cell [4][1] i.e. 1885fa0 has 22 \n", - "The cell [4][2] i.e. 1885f88 has 23 \n", - "The cell [4][3] i.e. 1885f70 has 24 \n", - "The cell [4][4] i.e. 1885f58 has 25 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2, Page number: 320" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from array import *\n", - "\n", - "# Variable declaration\n", - "a = [[[1,2,3,4,5], [6,7,8,9,10], [11,12,13,14,15], [16,17,18,19,20]],\n", - " [[21,22,23,24,25], [26,27,28,29,30], [31,32,33,34,35], [36,37,38,39,40]]]\n", - "\n", - "# Calculation and result\n", - "print ('The value of a is %x ' % id(a))\n", - "\n", - "for i in range (0, 2) :\n", - "\tprint ('The value of a[%d] is %x ' % (i, id(a[i])))\n", - "\tfor j in range (0, 4) :\n", - "\t\tprint ('The value of a[%d][%d] is %x ' % (i, j, id(a[i][j])))\n", - "\tprint\n", - "\n", - "for i in range (0, 2) :\n", - "\tfor j in range (0, 4) : \n", - "\t\tfor k in range (0, 5) :\n", - "\t\t\tprint ('The cell [%d][%d][%d] i.e. %x has %d ' % (i, j, k, id(a[i][j][k]), a[i][j][k]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of a is 7f55de4772d8 \n", - "The value of a[0] is 7f55de486b90 \n", - "The value of a[0][0] is 7f55de4db368 \n", - "The value of a[0][1] is 7f55de48f050 \n", - "The value of a[0][2] is 7f55de4db3f8 \n", - "The value of a[0][3] is 7f55de4c7908 \n", - "\n", - "The value of a[1] is 7f55de477320 \n", - "The value of a[1][0] is 7f55de4ff3f8 \n", - "The value of a[1][1] is 7f55de477290 \n", - "The value of a[1][2] is 7f55de4773b0 \n", - "The value of a[1][3] is 7f55de477368 \n", - "\n", - "The cell [0][0][0] i.e. 1886198 has 1 \n", - "The cell [0][0][1] i.e. 1886180 has 2 \n", - "The cell [0][0][2] i.e. 1886168 has 3 \n", - "The cell [0][0][3] i.e. 1886150 has 4 \n", - "The cell [0][0][4] i.e. 1886138 has 5 \n", - "The cell [0][1][0] i.e. 1886120 has 6 \n", - "The cell [0][1][1] i.e. 1886108 has 7 \n", - "The cell [0][1][2] i.e. 18860f0 has 8 \n", - "The cell [0][1][3] i.e. 18860d8 has 9 \n", - "The cell [0][1][4] i.e. 18860c0 has 10 \n", - "The cell [0][2][0] i.e. 18860a8 has 11 \n", - "The cell [0][2][1] i.e. 1886090 has 12 \n", - "The cell [0][2][2] i.e. 1886078 has 13 \n", - "The cell [0][2][3] i.e. 1886060 has 14 \n", - "The cell [0][2][4] i.e. 1886048 has 15 \n", - "The cell [0][3][0] i.e. 1886030 has 16 \n", - "The cell [0][3][1] i.e. 1886018 has 17 \n", - "The cell [0][3][2] i.e. 1886000 has 18 \n", - "The cell [0][3][3] i.e. 1885fe8 has 19 \n", - "The cell [0][3][4] i.e. 1885fd0 has 20 \n", - "The cell [1][0][0] i.e. 1885fb8 has 21 \n", - "The cell [1][0][1] i.e. 1885fa0 has 22 \n", - "The cell [1][0][2] i.e. 1885f88 has 23 \n", - "The cell [1][0][3] i.e. 1885f70 has 24 \n", - "The cell [1][0][4] i.e. 1885f58 has 25 \n", - "The cell [1][1][0] i.e. 1885f40 has 26 \n", - "The cell [1][1][1] i.e. 1885f28 has 27 \n", - "The cell [1][1][2] i.e. 1885f10 has 28 \n", - "The cell [1][1][3] i.e. 1885ef8 has 29 \n", - "The cell [1][1][4] i.e. 1885ee0 has 30 \n", - "The cell [1][2][0] i.e. 1885ec8 has 31 \n", - "The cell [1][2][1] i.e. 1885eb0 has 32 \n", - "The cell [1][2][2] i.e. 1885e98 has 33 \n", - "The cell [1][2][3] i.e. 1885e80 has 34 \n", - "The cell [1][2][4] i.e. 1885e68 has 35 \n", - "The cell [1][3][0] i.e. 1886618 has 36 \n", - "The cell [1][3][1] i.e. 1886600 has 37 \n", - "The cell [1][3][2] i.e. 18865e8 has 38 \n", - "The cell [1][3][3] i.e. 18865d0 has 39 \n", - "The cell [1][3][4] i.e. 18865b8 has 40 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3, Page number: 326" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def readdata (a, num) :\n", - "\twhile num > 0 :\n", - "\t\ta[num-1] = int(raw_input('Enter value in cell[%d] ' % num))\n", - "\t\tnum = num - 1\n", - "\t\t\n", - "def printdata (a, num) :\n", - "\twhile num > 0 :\n", - "\t\tprint ('Value in cell[%d] is %d ' % (num, a[num-1]))\n", - "\t\tnum = num - 1\n", - "\n", - "n = int(raw_input('Enter the number of elements '))\n", - "a = [0 for i in xrange(n)]\n", - "readdata (a, n)\n", - "print\n", - "printdata (a, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of elements 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[3] 30\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[2] 20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[1] 10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value in cell[3] is 30 \n", - "Value in cell[2] is 20 \n", - "Value in cell[1] is 10 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4, Page number: 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def readdata (a, n) :\n", - "\twhile n > 0 :\n", - "\t\ta[n-1] = int(raw_input('Enter value in cell[%d] ' % n))\n", - "\t\tn = n - 1\n", - "\t\t\n", - "def printdata (a, n) :\n", - "\twhile n > 0 :\n", - "\t\tprint ('Value in cell[%d] is %d ' % (n, a[n-1]))\n", - "\t\tn = n - 1\n", - "\n", - "n = int(raw_input('Enter the number of elements '))\n", - "a = [0 for i in xrange(n)]\n", - "readdata (a, n)\n", - "print\n", - "printdata (a, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of elements 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[5] 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[4] 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[3] 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[2] 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[1] 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value in cell[5] is 1 \n", - "Value in cell[4] is 2 \n", - "Value in cell[3] is 3 \n", - "Value in cell[2] is 4 \n", - "Value in cell[1] is 5 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5, Page number: 330" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "global n\n", - "n = 0\n", - "\n", - "def makearray (n) :\n", - "\tn = int(raw_input('Enter the number of elements '))\t\n", - "\treturn n\n", - "\t\n", - "def readdata (a, n) :\n", - "\twhile n > 0 :\n", - "\t\ta[n-1] = int(raw_input('Enter value in cell[%d] ' % n))\n", - "\t\tn = n - 1\n", - "\t\t\n", - "def printdata (a, n) :\n", - "\twhile n > 0 :\n", - "\t\tprint ('Value in cell[%d] is %d ' % (n, a[n-1]))\n", - "\t\tn = n - 1\n", - "\t\t\n", - "n = makearray (n)\n", - "a = [0 for i in xrange(n)]\n", - "readdata (a, n)\n", - "print\n", - "printdata (a, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of elements 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[4] 400\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[3] 300\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[2] 200\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value in cell[1] 100\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value in cell[4] is 400 \n", - "Value in cell[3] is 300 \n", - "Value in cell[2] is 200 \n", - "Value in cell[1] is 100 \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6, Page number: 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration, calculation and result\n", - "string = raw_input('Enter the string: ')\n", - "\n", - "rev_string = reversed(string)\n", - "\n", - "if list(string) == list(rev_string) :\n", - "\tprint ('%s is a PALINDROME ' % string)\n", - "else :\n", - "\tprint ('%s is not a PALINDROME ' % string)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the string: malayalam\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "malayalam is a PALINDROME \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.7, Page number: 337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def readdata (a, n) :\n", - "\tfor i in range (0, n) :\n", - "\t\ta[i] = int(raw_input('Enter data in cell [%d] ' % i))\n", - "\treturn a\n", - "\n", - "def bubble (a, n) :\n", - "\tfor p in range (0, n) :\n", - "\t\tfor i in range (0, n-1-p) :\n", - "\t\t\tif a[i] > a[i+1] :\n", - "\t\t\t\ttemp = a[i]\n", - "\t\t\t\ta[i] = a[i+1]\n", - "\t\t\t\ta[i+1] = temp\n", - "\treturn a\n", - "\n", - "def printdata (a, n) :\n", - "\tfor i in range (0, n) :\n", - "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", - "\n", - "n = int(raw_input('Enter the number of elements to be entered: '))\n", - "a = [0] * n\n", - "a = readdata (a, n)\n", - "a = bubble (a, n)\n", - "print ('\\nThe sorted data is ')\n", - "printdata (a, n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the number of elements to be entered: 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [0] 46\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [1] 75\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [2] 68\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [3] 34\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter data in cell [4] 49\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The sorted data is \n", - "The data in cell [0] is 34 \n", - "The data in cell [1] is 46 \n", - "The data in cell [2] is 49 \n", - "The data in cell [3] is 68 \n", - "The data in cell [4] is 75 \n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8, Page number: 341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration, calculation and result\n", - "i = 6\n", - "c = 'a'\n", - "\n", - "the_data = i\n", - "print ('the_data points to the integer value %d ' % the_data)\n", - "\n", - "the_data = c\n", - "print ('the_data points to the character value %c ' % the_data)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the_data points to the integer value 6 \n", - "the_data points to the character value a \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.9, Page number: 343" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "marks = [[0 for x in xrange(5)] for x in xrange(5)]\n", - "avg = 0\n", - "percent = [0 for x in xrange(5)]\n", - "\n", - "# Function declaration, calculation and result\n", - "def readncompute (marks, percent, avg) :\n", - "\tno_of_students = int(raw_input('How many students marks do you want to enter? '))\n", - "\tfor i in range (0, no_of_students) :\n", - "\t\tprint ('\\nEnter marks of 5 subjects for roll no. %d ' % (i+1))\n", - "\t\tfor j in range (0, 5) :\n", - "\t\t\tmarks[i][j] = int(raw_input('Subject %d: ' % (j+1)))\n", - "\t\t\tpercent[i] = percent[i] + marks[i][j]\n", - "\t\t\n", - "\t\tpercent[i] = percent[i]/5\n", - "\t\tavg = avg + percent[i]\n", - "\treturn avg/no_of_students, no_of_students\n", - "\n", - "def printdata (score, per, avg, no_of_students) :\n", - "\tfor i in range (0, no_of_students) :\n", - "\t\tprint ('\\nMarks for roll no. %d are ' % (i+1))\n", - "\t\tfor j in range (0, 5) :\n", - "\t\t\tprint ('%d ' % score[i][j])\n", - "\t\tprint ('Percentage for roll no. is %.2f ' % per[i])\n", - "\t\tif per[i] < avg :\n", - "\t\t\tprint ('Below average')\n", - "\t\telse :\n", - "\t\t\tprint ('Above average')\n", - "\n", - "average, nos = readncompute(marks, percent, avg)\n", - "print ('\\nThe average marks are %.2f' % average)\n", - "printdata (marks, percent, average, nos)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many students marks do you want to enter? 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for roll no. 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1: 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2: 76\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3: 54\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4: 83\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5: 94\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for roll no. 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1: 84\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2: 62\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3: 94\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4: 73\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5: 62\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The average marks are 74.00\n", - "\n", - "Marks for roll no. 1 are \n", - "65 \n", - "76 \n", - "54 \n", - "83 \n", - "94 \n", - "Percentage for roll no. is 74.00 \n", - "Above average\n", - "\n", - "Marks for roll no. 2 are \n", - "84 \n", - "62 \n", - "94 \n", - "73 \n", - "62 \n", - "Percentage for roll no. is 75.00 \n", - "Above average\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.10, Page number: 349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Variable declaration\n", - "marks = [[0 for x in xrange(5)] for x in xrange(5)]\n", - "avg = 0\n", - "percent = [0 for x in xrange(5)]\n", - "\n", - "# Function declaration, calculation and result\n", - "def readncompute (marks, percent, avg) :\n", - "\tno_of_students = int(raw_input('How many students marks do you want to enter? '))\n", - "\tfor i in range (0, no_of_students) :\n", - "\t\tprint ('\\nEnter marks of 5 subjects for roll no. %d ' % (i+1))\n", - "\t\tfor j in range (0, 5) :\n", - "\t\t\tmarks[i][j] = int(raw_input('Subject %d: ' % (j+1)))\n", - "\t\t\tpercent[i] = percent[i] + marks[i][j]\n", - "\t\t\n", - "\t\tpercent[i] = percent[i]/5\n", - "\t\tavg = avg + percent[i]\n", - "\treturn avg/no_of_students, no_of_students\n", - "\n", - "def printdata (score, per, avg, no_of_students) :\n", - "\tfor i in range (0, no_of_students) :\n", - "\t\tprint ('\\nMarks for roll no. %d are ' % (i+1))\n", - "\t\tfor j in range (0, 5) :\n", - "\t\t\tprint ('%d ' % score[i][j])\n", - "\t\tprint ('Percentage for roll no. is %.2f ' % per[i])\n", - "\t\tif per[i] < avg :\n", - "\t\t\tprint ('Below average')\n", - "\t\telse :\n", - "\t\t\tprint ('Above average')\n", - "\n", - "average, nos = readncompute(marks, percent, avg)\n", - "print ('\\nThe average marks are %.2f' % average)\n", - "printdata (marks, percent, average, nos)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many students marks do you want to enter? 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for roll no. 1 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1: 65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2: 76\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3: 54\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4: 32\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5: 89\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Enter marks of 5 subjects for roll no. 2 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 1: 76\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 2: 86\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 3: 43\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 4: 32\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Subject 5: 21\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The average marks are 57.00\n", - "\n", - "Marks for roll no. 1 are \n", - "65 \n", - "76 \n", - "54 \n", - "32 \n", - "89 \n", - "Percentage for roll no. is 63.00 \n", - "Above average\n", - "\n", - "Marks for roll no. 2 are \n", - "76 \n", - "86 \n", - "43 \n", - "32 \n", - "21 \n", - "Percentage for roll no. is 51.00 \n", - "Below average\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.11, Page number: 351" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Function declaration, calculation and result\n", - "def readdata (a, n) :\n", - "\tfor i in range (0, n) :\n", - "\t\ta[i] = int(raw_input('Enter data in cell [%d] ' % i))\n", - "\treturn a\n", - "\n", - "def bubble (name) :\n", - "\tfor p in range (0, 4) :\n", - "\t\tfor i in range (0, 3-p) :\n", - "\t\t\tif name[i] > name[i+1] :\n", - "\t\t\t\ttemp = name[i]\n", - "\t\t\t\tname[i] = name[i+1]\n", - "\t\t\t\tname[i+1] = temp\n", - "\treturn name\n", - "\n", - "def printdata (name) :\n", - "\tfor i in range (0, 4) :\n", - "\t\tprint ('The data in cell [%d] is %s ' % ((i+1), name[i]))\n", - "\n", - "name = [0] * 4\n", - "for i in range (0, 4) :\n", - "\tname[i] = raw_input('Enter string[%d] ' % (i+1))\n", - "\n", - "name = bubble (name)\n", - "print ('\\nThe sorted data is ')\n", - "printdata (name)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter string[1] zaheer\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter string[2] ashita\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter string[3] tamanna\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter string[4] purti\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The sorted data is \n", - "The data in cell [1] is ashita \n", - "The data in cell [2] is purti \n", - "The data in cell [3] is tamanna \n", - "The data in cell [4] is zaheer \n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Magnifying_C/README.txt b/Magnifying_C/README.txt deleted file mode 100755 index 2ec7deb7..00000000 --- a/Magnifying_C/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Mahesh M -Course: btech -College/Institute/Organization: MSIT -Department/Designation: CSE -Book Title: Magnifying C -Author: Arpita Gopal -Publisher: Prentice Hall India Learning Private Limited, New Delhi -Year of publication: 2009 -Isbn: 9788120338616 -Edition: 1 \ No newline at end of file diff --git a/Magnifying_C/screenshots/chapter_10.png b/Magnifying_C/screenshots/chapter_10.png deleted file mode 100755 index 26daa2e1..00000000 Binary files a/Magnifying_C/screenshots/chapter_10.png and /dev/null differ diff --git a/Magnifying_C/screenshots/chapter_2.png b/Magnifying_C/screenshots/chapter_2.png deleted file mode 100755 index c7b049ba..00000000 Binary files a/Magnifying_C/screenshots/chapter_2.png and /dev/null differ diff --git a/Magnifying_C/screenshots/chapter_6.png b/Magnifying_C/screenshots/chapter_6.png deleted file mode 100755 index 585a8ed4..00000000 Binary files a/Magnifying_C/screenshots/chapter_6.png and /dev/null differ diff --git a/Magnifying_C/screenshots/ss_1.png b/Magnifying_C/screenshots/ss_1.png deleted file mode 100755 index c9ed06ce..00000000 Binary files a/Magnifying_C/screenshots/ss_1.png and /dev/null differ diff --git a/Magnifying_C/screenshots/ss_2.png b/Magnifying_C/screenshots/ss_2.png deleted file mode 100755 index 5fc014e9..00000000 Binary files a/Magnifying_C/screenshots/ss_2.png and /dev/null differ diff --git a/Magnifying_C/screenshots/ss_3.png b/Magnifying_C/screenshots/ss_3.png deleted file mode 100755 index bd465ad3..00000000 Binary files a/Magnifying_C/screenshots/ss_3.png and /dev/null differ diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb new file mode 100755 index 00000000..1a4d1459 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb @@ -0,0 +1,336 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Miscellany" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1, Page number: 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "# Calculation and result\n", + "i = 0\n", + "for arg in sys.argv :\n", + " print ('arg [%d] - %s' % (i, arg))\n", + " i = i+1" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%run 10.1.py hello world" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "arg [0] - 10.1.py\n", + "arg [1] - hello\n", + "arg [2] - world\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page number: 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "# Function declaration, calculation and result\n", + "if len(sys.argv) != 2 :\n", + "\tprint ('Inappropriate number of arguments')\n", + "\t\n", + "total = 0\n", + "def fact (n) :\n", + " total = n\n", + " while n > 1 :\n", + " total = total * (n - 1)\n", + " n = n - 1\n", + " return total\n", + "\n", + "print ('Factorial of %d is %d ' % (int(sys.argv[1]), fact (int(sys.argv[1]))))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%run 10.2.py 5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factorial of 5 is 120 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page number: 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "# Function declaration\n", + "def printdata () :\n", + "\ti = 0\n", + "\tfor arg in sys.argv[1:] :\n", + "\t\tprint ('The data in cell [%d] is %s ' % (i, arg))\n", + "\t\ti = i+1\n", + "\n", + "# Calculation and result\n", + "print ('The names before sorting are ')\n", + "printdata ()\n", + "\n", + "sys.argv.sort() \n", + "\n", + "print ('The names after sorting are ')\n", + "printdata ()" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%run 10.3.py zimbabwe nigeria argentina china hongkong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The names before sorting are \n", + "The data in cell [0] is zimbabwe \n", + "The data in cell [1] is nigeria \n", + "The data in cell [2] is argentina \n", + "The data in cell [3] is china \n", + "The data in cell [4] is hongkong \n", + "The names after sorting are \n", + "The data in cell [0] is argentina \n", + "The data in cell [1] is china \n", + "The data in cell [2] is hongkong \n", + "The data in cell [3] is nigeria \n", + "The data in cell [4] is zimbabwe \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page number: 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter any positive number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def convert (a) :\n", + " return int(bin(a)[2:])\n", + "\n", + "bits = str(convert (a))\n", + "print ('Number of bits = %d' % (len(bits)))\n", + "print ('Binary equivalent is : %d' % (convert (a)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any positive number 16\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of bits = 5\n", + "Binary equivalent is : 10000\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5, Page number: 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number : '))\n", + "b = int(raw_input('Enter second number : '))\n", + "\n", + "# Calculation and result\n", + "b = ~b + 1\n", + "c = a + b\n", + "\n", + "print ('Subtraction is = %d ' % c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number : 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number : 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subtraction is = 4 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6, Page number: 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number : '))\n", + "original_a = a\n", + "\n", + "b = int(raw_input('Enter second number : '))\n", + "original_b = b\n", + "\n", + "# Calculation and result\n", + "c = 1\n", + "while (b) :\n", + "\tif (b & 1) :\n", + "\t\tc = c * a\n", + "\tb = b >> 1\n", + "\ta = a * a\n", + "\n", + "print ('%d raise to %d = %d ' % (original_a, original_b, c))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number : 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number : 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "7 raise to 3 = 343 \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb new file mode 100755 index 00000000..16b27feb --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb @@ -0,0 +1,1664 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Structures and Unions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page number: 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student :\n", + "\tid_no = ''\n", + "\tname = ''\n", + "\taddress = ''\n", + "\tage = ''\n", + "\t\n", + "newstudent = student()\n", + "\n", + "print ('Enter the student information ')\n", + "newstudent.id_no = int(raw_input('Enter student id_no : '))\n", + "newstudent.name = raw_input('Enter name of the student : ')\n", + "newstudent.address = raw_input('Enter the address of the student : ')\n", + "newstudent.age = int(raw_input('Enter the age of the student : '))\n", + "\n", + "print ('You have entered following information...')\n", + "print ('Student id_number = %d ' % newstudent.id_no)\n", + "print ('Student name = %s ' % newstudent.name)\n", + "print ('Student address = %s ' % newstudent.address)\n", + "print ('Age of student = %d ' % newstudent.age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student information \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student id_no : 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of the student : Amanjeet\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the address of the student : Delhi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age of the student : 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered following information...\n", + "Student id_number = 1 \n", + "Student name = Amanjeet \n", + "Student address = Delhi \n", + "Age of student = 20 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page number: 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student :\n", + "\tid_no = ''\n", + "\tname = ''\n", + "\taddress = ''\n", + "\tage = ''\n", + "\t\n", + "newstudent = student()\n", + "\n", + "def putdata (newstudent) : \n", + " print ('You have entered following information...')\n", + " print ('Student id_number = %d ' % newstudent.id_no)\n", + " print ('Student name = %s ' % newstudent.name)\n", + " print ('Student address = %s ' % newstudent.address)\n", + " print ('Age of student = %d ' % newstudent.age)\n", + " \n", + "print ('Enter the student information ') \n", + "newstudent.id_no = int(raw_input('Enter student id_no : '))\n", + "newstudent.name = raw_input('Enter name of the student : ')\n", + "newstudent.address = raw_input('Enter the address of the student : ')\n", + "newstudent.age = int(raw_input('Enter the age of the student : '))\n", + "\n", + "putdata (newstudent)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student information \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student id_no : 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of the student : Deepti\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the address of the student : Noida\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age of the student : 23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered following information...\n", + "Student id_number = 2 \n", + "Student name = Deepti \n", + "Student address = Noida \n", + "Age of student = 23 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3, Page number: 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student :\n", + "\tid_no = ''\n", + "\tname = ''\n", + "\taddress = ''\n", + "\tage = ''\n", + "\t\n", + "newstudent = student()\n", + "\n", + "def putdata (idno, name, add, age) :\n", + " print ('You have entered following information...')\n", + " print ('Student id_number = %d ' % idno)\n", + " print ('Student name = %s ' % name)\n", + " print ('Student address = %s ' % add)\n", + " print ('Age of student = %d ' % age)\n", + " \n", + "print ('Enter the student information ')\n", + "newstudent.id_no = int(raw_input('Enter student id_no : '))\n", + "newstudent.name = raw_input('Enter name of the student : ')\n", + "newstudent.address = raw_input('Enter the address of the student : ')\n", + "newstudent.age = int(raw_input('Enter the age of the student : '))\n", + "\n", + "putdata (newstudent.id_no, newstudent.name, newstudent.address, newstudent.age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student information \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student id_no : 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of the student : Kushagra\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the address of the student : Bangalore\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age of the student : 21\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered following information...\n", + "Student id_number = 3 \n", + "Student name = Kushagra \n", + "Student address = Bangalore \n", + "Age of student = 21 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, Page number: 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student :\n", + "\tid_no = 0\n", + "\tname = 'Unknown'\n", + "\taddress = 'Unknown'\n", + "\tage = 0\n", + "\t\n", + "newstudent = student()\n", + "\n", + "def readdata (newstudent) :\n", + " print ('Enter the student information ')\n", + " newstudent.id_no = int(raw_input('Enter student id_no : '))\n", + " newstudent.name = raw_input('Enter name of the student : ')\n", + " newstudent.address = raw_input('Enter the address of the student : ')\n", + " newstudent.age = int(raw_input('Enter the age of the student : '))\n", + "\n", + "readdata (newstudent)\n", + "print ('You have entered following information...')\n", + "print ('Student id_number = %d ' % newstudent.id_no)\n", + "print ('Student name = %s ' % newstudent.name)\n", + "print ('Student address = %s ' % newstudent.address)\n", + "print ('Age of student = %d ' % newstudent.age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student information \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student id_no : 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of the student : Vipul\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the address of the student : Chandigarh\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age of the student : 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered following information...\n", + "Student id_number = 4 \n", + "Student name = Vipul \n", + "Student address = Chandigarh \n", + "Age of student = 25 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5, Page number: 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student :\n", + "\tid_no = 0\n", + "\tname = 'Unknown'\n", + "\taddress = 'Unknown'\n", + "\tage = 0\n", + "\t\n", + "def readdata () :\n", + " x = student()\n", + " print ('Enter the student information ')\n", + " x.id_no = int(raw_input('Enter student id_no : '))\n", + " x.name = raw_input('Enter name of the student : ')\n", + " x.address = raw_input('Enter the address of the student : ')\n", + " x.age = int(raw_input('Enter the age of the student : '))\n", + " return x\n", + "\n", + "newstudent = readdata()\n", + "\n", + "print ('You have entered following information...')\n", + "print ('Student id_number = %d ' % newstudent.id_no)\n", + "print ('Student name = %s ' % newstudent.name)\n", + "print ('Student address = %s ' % newstudent.address)\n", + "print ('Age of student = %d ' % newstudent.age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student information \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student id_no : 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of the student : Ujjwal\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the address of the student : Jaipur\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age of the student : 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered following information...\n", + "Student id_number = 5 \n", + "Student name = Ujjwal \n", + "Student address = Jaipur \n", + "Age of student = 20 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6, Page number: 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student :\n", + "\tid_no = 0\n", + "\tname = 'Unknown'\n", + "\taddress = 'Unknown'\n", + "\tage = 0\n", + "\t\n", + "x = student()\n", + "\n", + "def readdata (x) :\n", + " print ('Enter the student information ')\n", + " x.id_no = int(raw_input('Enter student id_no : '))\n", + " x.name = raw_input('Enter name of the student : ')\n", + " x.address = raw_input('Enter the address of the student : ')\n", + " x.age = int(raw_input('Enter the age of the student : '))\n", + "\n", + "readdata(x) \n", + "print ('You have entered following information...')\n", + "print ('Student id_number = %d ' % x.id_no)\n", + "print ('Student name = %s ' % x.name)\n", + "print ('Student address = %s ' % x.address)\n", + "print ('Age of student = %d ' % x.age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the student information \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student id_no : 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of the student : Karan\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the address of the student : Chennai\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age of the student : 24\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered following information...\n", + "Student id_number = 6 \n", + "Student name = Karan \n", + "Student address = Chennai \n", + "Age of student = 24 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7, Page number: 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student (object) :\n", + "\tdef __init__(self, roll=None, name=None, gender=None, marks=[0]*3) :\n", + "\t\tself.roll = roll\n", + "\t\tself.name = name\n", + "\t\tself.gender = gender\n", + "\t\tself.marks = marks\n", + "\n", + "def putdata (stud, count) :\n", + "\tprint ('RollNo\\t Name\\t\\t Gender\\t Sub1\\t Sub2\\t Sub3 ')\n", + "\tprint ('---------------------------------------------------------------------')\n", + "\t\n", + "\tfor i in range (0, count) :\n", + "\t\tprint ('%-10d' % stud[i].roll),\n", + "\t\tprint ('%-15s' % stud[i].name),\n", + "\t\t\n", + "\t\tif stud[i].gender == 0 :\n", + "\t\t\tprint ('%-15s' % 'Female'),\n", + "\t\telse :\n", + "\t\t\tprint ('%-15s' % 'Male'),\n", + "\t\t\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tprint ('%-10d' % stud[i].marks[j]),\n", + "\t\tprint\n", + "\n", + "def calculateper (stud, count) :\n", + "\taverage = 0\n", + "\tfor i in range (0, count) :\n", + "\t\tsum = 0\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tsum = sum + stud[i].marks[j]\n", + "\t\taverage = average + sum/3\n", + "\treturn average/count\n", + "\n", + "stud = []\t\n", + "stud.append (student (1, 'Kapildev', 1, (45, 56, 67)))\n", + "stud.append (student (2, 'Vidya', 0, (87, 45, 23)))\n", + "stud.append (student (3, 'Sharada', 0, (67, 94, 56)))\n", + "stud.append (student (4, 'Saismaran', 1, (56, 38, 84)))\n", + "stud.append (student (5, 'Reshma', 0, (67, 98, 76)))\n", + "\n", + "average_percentage = calculateper (stud, 5)\n", + "putdata (stud, 5)\n", + "print ('\\nAverage percentage of the class is : %.2f ' % average_percentage)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RollNo\t Name\t\t Gender\t Sub1\t Sub2\t Sub3 \n", + "---------------------------------------------------------------------\n", + "1 Kapildev Male 45 56 67 \n", + "2 Vidya Female 87 45 23 \n", + "3 Sharada Female 67 94 56 \n", + "4 Saismaran Male 56 38 84 \n", + "5 Reshma Female 67 98 76 \n", + "\n", + "Average percentage of the class is : 63.00 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8, Page number: 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student (object) :\n", + "\tdef __init__(self, roll=None, name=None, gender=None, marks=[0]*3) :\n", + "\t\tself.roll = roll\n", + "\t\tself.name = name\n", + "\t\tself.gender = gender\n", + "\t\tself.marks = marks\n", + "\t\n", + "def putdata (stud, count) :\n", + "\tprint ('\\nRollNo\\t Name\\t\\t Gender\\t Sub1\\t Sub2\\t Sub3 ')\n", + "\tprint ('---------------------------------------------------------------------')\n", + "\t\n", + "\tfor i in range (0, count) :\n", + "\t\tprint ('%-10d' % stud[i].roll),\n", + "\t\tprint ('%-15s' % stud[i].name),\n", + "\t\t\n", + "\t\tif stud[i].gender == 0 :\n", + "\t\t\tprint ('%-15s' % 'Female'),\n", + "\t\telse :\n", + "\t\t\tprint ('%-15s' % 'Male'),\n", + "\t\t\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tprint ('%-10d' % stud[i].marks[j]),\n", + "\t\tprint\n", + "\n", + "def calculateper (stud, count) :\n", + "\taverage = 0\n", + "\tfor i in range (0, count) :\n", + "\t\tsum = 0\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tsum = sum + stud[i].marks[j]\n", + "\t\taverage = average + sum/3\n", + "\treturn average/count\n", + "\n", + "count = int(raw_input('Enter the number of students in a class : '))\n", + "stud = [student() for i in range (0, count)]\n", + "\n", + "for i in range (0, count) :\n", + "\tstud[i].roll = int(raw_input('\\nEnter roll number of student %d: ' % (i+1)))\n", + "\tstud[i].name = raw_input('Enter name of student %d: ' % (i+1))\n", + "\tstud[i].gender = int(raw_input('Enter gender[0/1] of student %d: ' % (i+1)))\n", + "\tprint ('Enter marks of three subjects of student %d: ' % (i+1))\n", + "\tfor j in range (0, 3) :\n", + "\t\tstud[i].marks[j] = int(raw_input('Subject %d: ' % (j+1)))\n", + "\n", + "putdata (stud, count)\n", + "average_percentage = calculateper (stud, count)\n", + "print ('\\nAverage percentage of the class is : %.2f ' % average_percentage)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of students in a class : 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter roll number of student 1: 24\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student 1: Vidya\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter gender[0/1] of student 1: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of three subjects of student 1: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1: 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2: 96\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3: 75\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "RollNo\t Name\t\t Gender\t Sub1\t Sub2\t Sub3 \n", + "---------------------------------------------------------------------\n", + "24 Vidya Female 78 96 75 \n", + "\n", + "Average percentage of the class is : 83.00 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9, Page number: 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class student (object) :\n", + "\tdef __init__(self, roll=None, name=None, gender=None, marks=[0]*3) :\n", + "\t\tself.roll = roll\n", + "\t\tself.name = name\n", + "\t\tself.gender = gender\n", + "\t\tself.marks = marks\n", + "\n", + "def readdata (stud, count) :\n", + "\tfor i in range (0, count) :\n", + "\t\tstud[i].roll = int(raw_input('\\nEnter roll number of student %d: ' % (i+1)))\n", + "\t\tstud[i].name = raw_input('Enter name of student %d: ' % (i+1))\n", + "\t\tstud[i].gender = int(raw_input('Enter gender[0/1] of student %d: ' % (i+1)))\n", + "\t\tprint ('Enter marks of three subjects of student %d: ' % (i+1))\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tstud[i].marks[j] = int(raw_input('Subject %d: ' % (j+1)))\n", + "\t\n", + "def putdata (stud, count) :\n", + "\tprint ('\\nRollNo\\t Name\\t\\t Gender\\t Sub1\\t Sub2\\t Sub3 ')\n", + "\tprint ('---------------------------------------------------------------------')\n", + "\t\n", + "\tfor i in range (0, count) :\n", + "\t\tprint ('%-10d' % stud[i].roll),\n", + "\t\tprint ('%-15s' % stud[i].name),\n", + "\t\t\n", + "\t\tif stud[i].gender == 0 :\n", + "\t\t\tprint ('%-15s' % 'Female'),\n", + "\t\telse :\n", + "\t\t\tprint ('%-15s' % 'Male'),\n", + "\t\t\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tprint ('%-10d' % stud[i].marks[j]),\n", + "\t\tprint\n", + "\n", + "def calculateper (stud, count) :\n", + "\taverage = 0\n", + "\tfor i in range (0, count) :\n", + "\t\tsum = 0\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tsum = sum + stud[i].marks[j]\n", + "\t\taverage = average + sum/3\n", + "\treturn average/count\n", + "\n", + "count = int(raw_input('Enter the number of students in a class : '))\n", + "stud = [student() for i in range (0, count)]\n", + "readdata (stud, count)\n", + "\n", + "average_percentage = calculateper (stud, count)\n", + "putdata (stud, count)\n", + "print ('\\nAverage percentage of the class is : %.2f ' % average_percentage)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of students in a class : 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter roll number of student 1: 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student 1: Kapildev\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter gender[0/1] of student 1: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of three subjects of student 1: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1: 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2: 70\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3: 93\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "RollNo\t Name\t\t Gender\t Sub1\t Sub2\t Sub3 \n", + "---------------------------------------------------------------------\n", + "25 Kapildev Male 45 70 93 \n", + "\n", + "Average percentage of the class is : 69.00 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10, Page number: 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class time (object) :\n", + "\tdef __init__(self, hours=None, minutes=None, seconds=None) :\n", + "\t\tself.hours = hours\n", + "\t\tself.minutes = minutes\n", + "\t\tself.seconds = seconds\n", + "\n", + "def AcceptTime (t) :\n", + "\tprint ('Enter the time in hh mm ss format: ')\n", + "\tt.hours = int(raw_input('Hours = '))\n", + "\tt.minutes = int(raw_input('Minutes = '))\n", + "\tt.seconds = int(raw_input('Seconds = '))\n", + "\n", + "def ValidateTime (t) :\n", + "\tif t.hours < 0 or t.hours > 23 :\n", + "\t\treturn 0\n", + "\tif t.minutes < 0 or t.minutes > 60 :\n", + "\t\treturn 0\n", + "\tif t.seconds < 0 or t.seconds > 60 :\n", + "\t\treturn 0\n", + "\treturn 1\n", + "\n", + "def DisplayTime (t) :\n", + "\tprint ('Time you entered is %d:%d:%d ' % (t.hours, t.minutes, t.seconds))\n", + "\t\n", + "condition = True\n", + "while condition :\n", + "\tt = time ()\n", + "\tAcceptTime (t)\n", + "\t\n", + "\tif ValidateTime (t) == 1 :\n", + "\t\tcondition = False\n", + "\telse :\n", + "\t\tprint ('\\nTime is incorrect. Enter again ')\n", + "\t\t\n", + "DisplayTime (t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the time in hh mm ss format: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hours = 13\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minutes = 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Seconds = 53\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time you entered is 13:45:53 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11, Page number: 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class date (object) :\n", + "\tdef __init__(self, dd=None, mm=None, yy=None) :\n", + "\t\tself.dd = dd\n", + "\t\tself.mm = mm\n", + "\t\tself.yy = yy\n", + "\n", + "def AcceptDate (d) :\n", + "\tprint ('Enter date in dd mm yy format: ')\n", + "\td.dd = int(raw_input('Date = '))\n", + "\td.mm = int(raw_input('Month = '))\n", + "\td.yy = int(raw_input('Year = '))\n", + "\n", + "def isleap (val) :\n", + "\tif val % 4 == 0 and val % 100 or val % 400 == 0 :\n", + "\t\treturn 1\n", + "\treturn 0\n", + "\t\n", + "def ValidateDate (d) :\n", + "\tif d.dd < 1 or d.dd > 31 :\n", + "\t\treturn 0\n", + "\tif d.mm < 1 or d.mm > 12 :\n", + "\t\treturn 0\n", + "\tif d.yy < 1 :\n", + "\t\treturn 0\n", + "\tif d.mm == 2 :\n", + "\t\tif isleap (d.yy) :\n", + "\t\t\tif d.dd > 29 :\n", + "\t\t\t\treturn 0\n", + "\t\telif d.dd > 28 :\n", + "\t\t\treturn 0\n", + "\tif d.mm == 4 or d.mm == 6 or d.mm == 9 or d.mm == 11 and d.dd > 30 :\n", + "\t\treturn 0\n", + "\treturn 1\n", + "\n", + "def DisplayMsg (d1, d2) :\n", + "\tif d1.dd == d2.dd and d1.mm == d2.mm and d1.yy == d2.yy :\n", + "\t\tprint ('Both dates are Equal ')\n", + "\telse :\n", + "\t\tprint ('Both dates are Not Equal ')\n", + "\t\n", + "condition = True\n", + "while condition :\n", + "\td1 = date ()\n", + "\tAcceptDate (d1)\n", + "\t\n", + "\tif ValidateDate (d1) == 1 :\n", + "\t\tcondition = False\n", + "\telse :\n", + "\t\tprint ('\\nDate is incorrect. Enter again ')\n", + "\n", + "condition = True\n", + "while condition :\n", + "\td2 = date ()\n", + "\tAcceptDate (d2)\n", + "\t\n", + "\tif ValidateDate (d2) == 1 :\n", + "\t\tcondition = False\n", + "\telse :\n", + "\t\tprint ('\\nDate is incorrect. Enter again ')\n", + "\t\t\n", + "DisplayMsg (d1, d2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter date in dd mm yy format: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date = 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Month = 11\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Year = 92\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter date in dd mm yy format: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date = 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Month = 11\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Year = 92\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both dates are Equal \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12, Page number: 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class date (object) :\n", + "\tdef __init__(self, dd=None, mm=None, yy=None) :\n", + "\t\tself.dd = dd\n", + "\t\tself.mm = mm\n", + "\t\tself.yy = yy\n", + "\n", + "def AcceptDate (d) :\n", + "\tprint ('Enter date in dd mm yy format: ')\n", + "\td.dd = int(raw_input('Date = '))\n", + "\td.mm = int(raw_input('Month = '))\n", + "\td.yy = int(raw_input('Year = '))\n", + "\n", + "def isleap (val) :\n", + "\tif val % 4 == 0 and val % 100 or val % 400 == 0 :\n", + "\t\treturn 1\n", + "\treturn 0\n", + "\t\n", + "def ValidateDate (d) :\n", + "\tif d.dd < 1 or d.dd > 31 :\n", + "\t\treturn 0\n", + "\tif d.mm < 1 or d.mm > 12 :\n", + "\t\treturn 0\n", + "\tif d.yy < 1 :\n", + "\t\treturn 0\n", + "\tif d.mm == 2 :\n", + "\t\tif isleap (d.yy) :\n", + "\t\t\tif d.dd > 29 :\n", + "\t\t\t\treturn 0\n", + "\t\telif d.dd > 28 :\n", + "\t\t\treturn 0\n", + "\tif d.mm == 4 or d.mm == 6 or d.mm == 9 or d.mm == 11 and d.dd > 30 :\n", + "\t\treturn 0\n", + "\treturn 1\n", + "\n", + "def CalcDate (d1, d2) :\n", + "\tdate1 = date2 = 0\n", + "\tfor i in range (-d1.yy, d1.yy) :\n", + "\t\tdate1 = date1 + 366 if isleap (d1.yy) else 365\n", + "\t\td1.yy = d1.yy - 1\n", + "\t\t\n", + "\tfor i in range (-d1.mm, d1.mm) :\n", + "\t\tdate1 = date1 + (30 if (d1.mm==4 or d1.mm==6 or d1.mm==9 or d1.mm==11) else ((29 if isleap(d1.yy) else 28) if (d1.mm==2) else 31))\n", + "\t\n", + "\tdate1 = date1 + d1.dd\n", + "\t\n", + "\tfor i in range (-d2.yy, d2.yy) :\n", + "\t\tdate2 = date2 + 366 if isleap(d2.yy) else 365\n", + "\t\n", + "\tfor i in range (-d2.mm, d2.mm) :\n", + "\t\tdate2 = date2 + (30 if (d2.mm==4 or d2.mm==6 or d2.mm==9 or d2.mm==11) else ((29 if isleap(d2.yy) else 28) if d2.mm==2 else 31))\n", + "\t\n", + "\tdate2 = date2 + d2.dd\n", + "\t\n", + "\treturn (date2 - date1)/2\n", + "\t\t\n", + "def DisplayMsg (d1, d2, diff) :\n", + "\tprint ('The difference between %d %d %d and %d %d %d is %d days ' % (d1.dd, d1.mm, -d1.yy, d2.dd, d2.mm, d2.yy, diff))\n", + "\t\n", + "condition = True\n", + "while condition :\n", + "\tprint ('\\nEnter first date: ')\n", + "\td1 = date ()\n", + "\tAcceptDate (d1)\n", + "\t\n", + "\tif ValidateDate (d1) == 1 :\n", + "\t\tcondition = False\n", + "\telse :\n", + "\t\tprint ('\\nDate is incorrect. Enter again ')\n", + "\n", + "condition = True\n", + "while condition :\n", + "\tprint ('\\nEnter second date: ')\n", + "\td2 = date ()\n", + "\tAcceptDate (d2)\n", + "\t\n", + "\tif ValidateDate (d2) == 1 :\n", + "\t\tcondition = False\n", + "\telse :\n", + "\t\tprint ('\\nDate is incorrect. Enter again ')\n", + "\n", + "diff = CalcDate (d1, d2)\n", + "DisplayMsg (d1, d2, diff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter first date: \n", + "Enter date in dd mm yy format: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date = 01\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Month = 01\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Year = 01\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter second date: \n", + "Enter date in dd mm yy format: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date = 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Month = 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Year = 08\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The difference between 1 1 1 and 25 12 8 is 2915 days \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.13, Page number: 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import *\n", + "\n", + "# Structure declaration\n", + "class stream (Union) :\n", + "\t_fields_ = [('grade', c_char), \n", + "\t\t\t\t\t('class_std', c_int), \n", + "\t\t\t\t\t('percentage', c_float)]\n", + "\t\n", + "class student (Structure) :\n", + "\t_fields_ = [('roll', c_int), \n", + "\t\t\t\t\t('name', c_char_p), \n", + "\t\t\t\t\t('gender', c_int), \n", + "\t\t\t\t\t('marks', c_int * 3), \n", + "\t\t\t\t\t('st_stream', c_char), \n", + "\t\t\t\t\t('st', stream)]\n", + "\t\n", + "def putdata (stud, count) :\n", + "\tprint ('\\nStream\\t Roll\\t Name\\t Gender\\t Result\\t ')\n", + "\tprint ('---------------------------------------------------------------------')\n", + "\t\n", + "\tfor i in range (0, count) :\n", + "\t\tif stud[i].st_stream == 'A' :\n", + "\t\t\tprint ('Arts\\t '),\n", + "\t\telif stud[i].st_stream == 'S' :\n", + "\t\t\tprint ('Science\\t '),\n", + "\t\telse :\n", + "\t\t\tprint ('Commerce '),\n", + "\t\t\t\n", + "\t\tprint ('%-5d ' % stud[i].roll),\n", + "\t\tprint ('%-3s ' % stud[i].name),\n", + "\t\t\n", + "\t\tif stud[i].gender == 0 :\n", + "\t\t\tprint ('\\tFemale'),\n", + "\t\telse :\n", + "\t\t\tprint ('\\tMale '),\n", + "\t\t\n", + "\t\tif stud[i].st_stream == 'A' :\n", + "\t\t\tprint (' %d Class ' % stud[i].st.class_std),\n", + "\t\telif stud[i].st_stream == 'S' :\n", + "\t\t\tprint (' %c Grade ' % stud[i].st.grade),\n", + "\t\telse :\n", + "\t\t\tprint (' %.2f Percent ' % stud[i].st.percentage),\n", + "\t\tprint\n", + "\n", + "def calculateper (stud, count) :\n", + "\taverage = 0\n", + "\tfor i in range (0, count) :\n", + "\t\tsum = 0\n", + "\t\tfor j in range (0, 3) :\n", + "\t\t\tsum = sum + stud[i].marks[j]\n", + "\t\taverage = (float)(sum/3)\n", + "\t\t\n", + "\t\tif stud[i].st_stream == 'A' :\n", + "\t\t\tif average >= 60 :\n", + "\t\t\t\tstud[i].st.class_std = 1\n", + "\t\t\telse :\n", + "\t\t\t\tstud[i].st.class_std = 2\n", + "\t\t\t\t\n", + "\t\telif stud[i].st_stream == 'S' :\n", + "\t\t\tif average >= 60 :\n", + "\t\t\t\tstud[i].st.grade = 'A'\n", + "\t\t\telse :\n", + "\t\t\t\tstud[i].st.class_std = 'B'\n", + "\t\telse : \n", + "\t\t\tstud[i].st.percentage = average\n", + "\n", + "count = int(raw_input('Enter the number of students in a class : '))\n", + "stud = [student() for i in range (0, count)]\n", + "\n", + "for i in range (0, count) :\n", + "\tstud[i].st_stream = raw_input('\\nEnter stream of student %d (A/C/S) : ' % (i+1))\n", + "\tstud[i].roll = int(raw_input('Enter roll number of student %d : ' % (i+1)))\n", + "\tstud[i].name = raw_input('Enter name of student %d : ' % (i+1))\n", + "\tstud[i].gender = int(raw_input('Enter gender of student %d [0/1] : ' % (i+1)))\n", + "\tprint ('Enter marks of three subjects of student %d : ' % (i+1))\n", + "\tfor j in range (0, 3) :\n", + "\t\tstud[i].marks[j] = int(raw_input('Subject %d : ' % (j+1)))\n", + "\t\n", + "calculateper (stud, count)\n", + "putdata (stud, count)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of students in a class : 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter stream of student 1 (A/C/S) : A\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter roll number of student 1 : 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student 1 : Saismaran\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter gender of student 1 [0/1] : 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of three subjects of student 1 : \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1 : 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2 : 83\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3 : 59\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter stream of student 2 (A/C/S) : C\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter roll number of student 2 : 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student 2 : Vidya\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter gender of student 2 [0/1] : 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of three subjects of student 2 : \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1 : 84\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2 : 75\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3 : 93\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter stream of student 3 (A/C/S) : S\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter roll number of student 3 : 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student 3 : Pranav\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter gender of student 3 [0/1] : 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter marks of three subjects of student 3 : \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1 : 84\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2 : 95\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3 : 83\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Stream\t Roll\t Name\t Gender\t Result\t \n", + "---------------------------------------------------------------------\n", + "Arts\t 1 Saismaran \tMale 1 Class \n", + "Commerce 2 Vidya \tFemale 84.00 Percent \n", + "Science\t 3 Pranav \tMale A Grade \n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb new file mode 100755 index 00000000..4fec3405 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb @@ -0,0 +1,2137 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Files" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page number: 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "fp = open('12.1.dat', 'w')\n", + "\n", + "for i in range (0, 11) :\n", + "\tfp.write('%d, %d \\n' % (i, i*i))\n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, Page number: 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "fp = open('12.2.dat', 'w')\n", + "\n", + "for i in range (0, 11) :\n", + "\tfp.write('%d, %d \\n' % (i, i*i))\n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3, Page number: 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "fp = open('12.2.dat', 'a')\n", + "i = 11\n", + "fp.write('%d, %d \\n' % (i, i*i))\n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4, Page number: 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "with open ('12.2.dat') as fp:\n", + "\tfor line in fp :\n", + "\t\tprint line\n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0, 0 \n", + "\n", + "1, 1 \n", + "\n", + "2, 4 \n", + "\n", + "3, 9 \n", + "\n", + "4, 16 \n", + "\n", + "5, 25 \n", + "\n", + "6, 36 \n", + "\n", + "7, 49 \n", + "\n", + "8, 64 \n", + "\n", + "9, 81 \n", + "\n", + "10, 100 \n", + "\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5, Page number: 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "print ('Data input ')\n", + "f1 = open('12.5.dat', 'w')\n", + "f1.write('You are learning Files in Python language ')\n", + "f1.close()\n", + "\n", + "print ('Data output ')\n", + "with open ('12.5.dat') as f1:\n", + "\tfor line in f1 :\n", + "\t\tprint line\n", + "f1.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Data input \n", + "Data output \n", + "You are learning Files in Python language \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6, Page number: 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "print ('Contents of the data file ')\n", + "f1 = open('12.6.dat', 'w')\n", + "for i in range (0, 10) :\n", + "\tnumber = int(raw_input())\n", + "\tf1.write('%d\\n' % number)\n", + "f1.close()\n", + "\n", + "f1 = open('12.6.dat', 'r')\n", + "f2 = open('12.6o.dat', 'w')\n", + "f3 = open('12.6e.dat', 'w')\n", + "\n", + "num = [0] * 10\n", + "with open ('12.6.dat') as f1 :\n", + "\tnum = f1.read().splitlines()\n", + "\t\n", + "for i in range (0, 10) :\n", + "\tif (int(num[i]) % 2) != 0 :\n", + "\t\tf2.write('%s \\n' % (num[i]))\n", + "\telse :\n", + "\t\tf3.write('%s \\n' % (num[i]))\n", + "\t\n", + "f1.close()\n", + "f2.close()\n", + "f3.close()\n", + "\n", + "print ('Contents of the odd file ')\n", + "with open ('12.6o.dat') as f2:\n", + "\tfor line in f2 :\n", + "\t\tprint line\n", + "\n", + "print ('Contents of the even file ')\n", + "with open ('12.6e.dat') as f3:\n", + "\tfor line in f3 :\n", + "\t\tprint line\n", + "\n", + "f2.close()\n", + "f3.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Contents of the data file \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Contents of the odd file \n", + "1 \n", + "\n", + "3 \n", + "\n", + "5 \n", + "\n", + "7 \n", + "\n", + "9 \n", + "\n", + "Contents of the even file \n", + "2 \n", + "\n", + "4 \n", + "\n", + "6 \n", + "\n", + "8 \n", + "\n", + "10 \n", + "\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7, Page number: 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "filename = raw_input('Input filename: ')\n", + "fp = open(filename, 'w')\n", + "\n", + "print ('Input inventory data ')\n", + "print ('\\nItemName number price quantity ')\n", + "\n", + "data = [[0 for y in xrange(5)] for x in xrange(3)]\n", + "for i in range (0, 3) :\n", + "\tfor j in range (0, 4) :\n", + "\t\tdata[i][j] = raw_input('')\n", + "\t\tfp.write('%s ' % data[i][j]),\n", + "\tfp.write('\\n')\n", + "\tprint\n", + "fp.close()\n", + "\n", + "fp = open(filename, 'r')\n", + "\n", + "for i in range (0, 3) :\n", + "\tfor j in range (2, 3) :\n", + "\t\tdata[i][j+2] = float(data[i][j]) * int(data[i][j+1])\n", + "\n", + "print ('ItemName number price quantity value ')\n", + "for i in range (0, 3) :\n", + "\tfor j in range (0, 5) :\n", + "\t\tprint ('%8s' % data[i][j]),\n", + "\tprint" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input filename: 12.7.dat\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input inventory data \n", + "\n", + "ItemName number price quantity \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Monitor\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "11\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3005.50\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mouse\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "22\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "500.50\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Keyboard\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "33\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "750.00\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "ItemName number price quantity value \n", + " Monitor 11 3005.50 10 30055.0\n", + " Mouse 22 500.50 5 2502.5\n", + "Keyboard 33 750.00 10 7500.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8, Page number: 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "with open ('12.5.dat') as fp:\n", + "\tfor line in fp :\n", + "\t\tprint line\n", + "fp.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You are learning Files in Python language \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9, Page number: 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sys import argv\n", + "\n", + "# Calculation and result\n", + "script, filename = argv\n", + "file = open(filename)\n", + "print file.read()\n", + "print ('\\nFile displayed successfully.....')" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%run 12.9.py 12.1.dat" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0, 0 \n", + "1, 1 \n", + "2, 4 \n", + "3, 9 \n", + "4, 16 \n", + "5, 25 \n", + "6, 36 \n", + "7, 49 \n", + "8, 64 \n", + "9, 81 \n", + "10, 100 \n", + "\n", + "\n", + "File displayed successfully.....\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10, Page number: 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "class person (object) :\n", + "\tdef __init__(self, name = None, age = 0):\n", + "\t\tself.name = 0\n", + "\t\tself.age = 0\n", + "\t\t\n", + "data = [person() for i in range (5)]\n", + "\n", + "fp = open('12.10.dat','w')\n", + "\n", + "for i in range (0, 5) :\n", + "\tdata[i].name = raw_input('\\nEnter name : ')\n", + "\tdata[i].age = int(raw_input('Enter age : '))\n", + "\t\n", + "for i in range (0, 5) :\n", + "\tfp.write('%s %d \\n' % (data[i].name, data[i].age))\n", + "\n", + "print ('\\n...Records are written to a file...')\n", + "print ('...Displaying records from a file...')\n", + "\n", + "for i in range (0, 5) :\n", + "\tprint ('\\nName : %s ' % data[i].name)\n", + "\tprint ('Age : %d ' % data[i].age)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter name : Dhiraj Kumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter name : Mohasin Khan\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter name : Suresh Waghmare\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 55\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter name : Anand Rao\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter name : Sunil Deshpande\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "...Records are written to a file...\n", + "...Displaying records from a file...\n", + "\n", + "Name : Dhiraj Kumar \n", + "Age : 23 \n", + "\n", + "Name : Mohasin Khan \n", + "Age : 45 \n", + "\n", + "Name : Suresh Waghmare \n", + "Age : 55 \n", + "\n", + "Name : Anand Rao \n", + "Age : 34 \n", + "\n", + "Name : Sunil Deshpande \n", + "Age : 23 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11, Page number: 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "class record (object) :\n", + "\tdef __init__(self, name = None, age = 0) :\n", + "\t\tself.name = 0\n", + "\t\tself.age = 0\n", + "\t\t\n", + "def record_write (data, filename) :\n", + "\tfilep = open(filename, 'ab')\n", + "\tdata.name = raw_input('Enter name : ')\n", + "\tdata.age = int(raw_input('Enter age : '))\n", + "\tfilep.write('%s %d\\n' % (data.name, data.age))\n", + "\t\n", + "def record_readall (filename) :\n", + "\tprint\n", + "\twith open (filename) as filep :\n", + "\t\tfor line in filep :\n", + "\t\t\tprint line\n", + "\n", + "data = record ()\n", + "filename = '12.11.dat'\n", + "\n", + "condition = True\n", + "while condition :\n", + "\tenter = raw_input('\\nAdd record (y/n) ? ')\n", + "\tif enter == 'y' or enter == 'Y' :\n", + "\t\trecord_write (data, filename)\n", + "\telse :\n", + "\t\tcondition = False\n", + "\t\tbreak\n", + "\n", + "record_readall (filename)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Add record (y/n) ? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name : Mohan Pande\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Add record (y/n) ? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name : Nitin Dighe\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age : 32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Add record (y/n) ? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Mohan Pande 34\n", + "\n", + "Nitin Dighe 32\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12, Page number: 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "fp = open('12.12.txt','r')\n", + "fp.seek(0, 0)\n", + "line = fp.readline()\n", + "print ('Read Line: %s ' % line)\n", + "\n", + "fp.seek(17, 0)\n", + "line = fp.readline()\n", + "print ('Read Line: %s ' % line)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Read Line: This is 1st line\n", + " \n", + "Read Line: This is 2nd line\n", + " \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13, Page number: 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import os\n", + "\n", + "# Calculation and result\n", + "statinfo = os.stat('12.13.txt')\n", + "print ('Filesize of \"12.13.txt\" is %d bytes ' % statinfo.st_size)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Filesize of \"12.13.txt\" is 15 bytes \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14, Page number: 455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "nc = nlines = 0\n", + "\n", + "filename = raw_input('Enter file name: ')\n", + "with open(filename, 'r') as fp :\n", + " for line in fp :\n", + " nlines += 1\n", + " nc += len(line)\n", + "fp.close()\n", + "\n", + "print ('There are %d characters in %s ' % (nc, filename))\n", + "print ('There are %d lines ' % nlines)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter file name: 12.14.txt\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "There are 55 characters in 12.14.txt \n", + "There are 1 lines \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15, Page number: 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "linecount = 0\n", + "filename = raw_input('Enter file name: ')\n", + "fp = open(filename, 'r')\n", + "for line in fp :\n", + "\tprint line\n", + "\tlinecount += 1\n", + "\tif linecount % 20 == 0 :\n", + "\t\traw_input(\"[Press Return to continue, Q to quit]\")\n", + "\t\tif raw_input() == 'Q' :\n", + "\t\t\texit()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter file name: 12.15.txt\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n", + "\n", + "2\n", + "\n", + "3\n", + "\n", + "4\n", + "\n", + "5\n", + "\n", + "6\n", + "\n", + "7\n", + "\n", + "8\n", + "\n", + "9\n", + "\n", + "10\n", + "\n", + "11\n", + "\n", + "12\n", + "\n", + "13\n", + "\n", + "14\n", + "\n", + "15\n", + "\n", + "16\n", + "\n", + "17\n", + "\n", + "18\n", + "\n", + "19\n", + "\n", + "20\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "[Press Return to continue, Q to quit]Q\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "21\n", + "\n", + "22\n", + "\n", + "23\n", + "\n", + "24\n", + "\n", + "25\n", + "\n", + "26\n", + "\n", + "27\n", + "\n", + "28\n", + "\n", + "29\n", + "\n", + "30\n", + "\n", + "31\n", + "\n", + "32\n", + "\n", + "33\n", + "\n", + "34\n", + "\n", + "35\n", + "\n", + "36\n", + "\n", + "37\n", + "\n", + "38\n", + "\n", + "39\n", + "\n", + "40\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "[Press Return to continue, Q to quit]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "41\n", + "\n", + "42\n", + "\n", + "43\n", + "\n", + "44\n", + "\n", + "45\n", + "\n", + "46\n", + "\n", + "47\n", + "\n", + "48\n", + "\n", + "49\n", + "\n", + "50\n", + "\n", + "51\n", + "\n", + "52\n", + "\n", + "53\n", + "\n", + "54\n", + "\n", + "55\n", + "\n", + "56\n", + "\n", + "57\n", + "\n", + "58\n", + "\n", + "59\n", + "\n", + "60\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "[Press Return to continue, Q to quit]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "61\n", + "\n", + "62\n", + "\n", + "63\n", + "\n", + "64\n", + "\n", + "65\n", + "\n", + "66\n", + "\n", + "67\n", + "\n", + "68\n", + "\n", + "69\n", + "\n", + "70\n", + "\n", + "71\n", + "\n", + "72\n", + "\n", + "73\n", + "\n", + "74\n", + "\n", + "75\n", + "\n", + "76\n", + "\n", + "77\n", + "\n", + "78\n", + "\n", + "79\n", + "\n", + "80\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "[Press Return to continue, Q to quit]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "81\n", + "\n", + "82\n", + "\n", + "83\n", + "\n", + "84\n", + "\n", + "85\n", + "\n", + "86\n", + "\n", + "87\n", + "\n", + "88\n", + "\n", + "89\n", + "\n", + "90\n", + "\n", + "91\n", + "\n", + "92\n", + "\n", + "93\n", + "\n", + "94\n", + "\n", + "95\n", + "\n", + "96\n", + "\n", + "97\n", + "\n", + "98\n", + "\n", + "99\n", + "\n", + "100\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "[Press Return to continue, Q to quit]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16, Page number: 457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "fname1 = raw_input('Enter source file: ')\n", + "fname2 = raw_input('Enter destination file: ')\n", + "\n", + "with open(fname1) as fp1 :\n", + "\twith open(fname2,'w') as fp2 : \n", + "\t\tfor line in fp1 :\n", + "\t\t\tfp2.write(line)\n", + "\n", + "print ('Files successfully copied ')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter source file: 12.16in.txt\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter destination file: 12.16out.txt\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Files successfully copied \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17, Page number: 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "total = count = 0\n", + "filenameIn = raw_input('Please enter an input filename: ')\n", + "filenameOut = raw_input('Please enter an output filename: ')\n", + "\n", + "print ('Opening %s for reading is OK.' % filenameIn)\n", + "print ('Opening %s for writing is OK.' % filenameOut)\n", + "print ('Calculate the total...')\n", + "\n", + "for i in open(filenameIn) :\n", + "\tcount += 1\n", + "\ttotal += int(i.strip())\n", + "\t\n", + "print ('Calculate the average...')\n", + "fileptrOut = open(filenameOut,'w')\n", + "fileptrOut.write('Average of %d numbers = %f ' % (count, (total/count)))\n", + "\n", + "print ('Check also your %s file content ' % filenameOut)\n", + "fileptrOut.close()\n", + "print ('\"%s\" closed successfully ' % filenameIn)\n", + "print ('\"%s\" closed successfully ' % filenameOut)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter an input filename: 12.17in.dat\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter an output filename: 12.17out.dat\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Opening 12.17in.dat for reading is OK.\n", + "Opening 12.17out.dat for writing is OK.\n", + "Calculate the total...\n", + "Calculate the average...\n", + "Check also your 12.17out.dat file content \n", + "\"12.17in.dat\" closed successfully \n", + "\"12.17out.dat\" closed successfully \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18, Page number: 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Structure declaration\n", + "class STUDENT (object) :\n", + "\tdef __init__(self, fname=None, lname=None, id=None, quiz1=None, quiz2=None, quiz3=None, quiz4=None, exam=None) :\n", + "\t\tself.fname = fname\n", + "\t\tself.lname = lname\n", + "\t\tself.id = id\n", + "\t\tself.quiz1 = quiz1\n", + "\t\tself.quiz2 = quiz2\n", + "\t\tself.quiz3 = quiz3\n", + "\t\tself.quiz4 = quiz4\n", + "\t\tself.exam = exam\n", + "\t\n", + "def findLow (students, x, c) :\n", + "\tif x == 0 :\n", + "\t\tsmall = students[0].quiz1\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif small >= students[i].quiz1 and students[i].quiz1 > 0 :\n", + "\t\t\t\tsmall = students[i].quiz1\n", + "\t\treturn small\n", + "\t\t\n", + "\telif x == 1 :\n", + "\t\tsmall = students[0].quiz2\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif small >= students[i].quiz2 and students[i].quiz2 > 0 :\n", + "\t\t\t\tsmall = students[i].quiz2\n", + "\t\treturn small\n", + "\t\t\n", + "\telif x == 2 :\n", + "\t\tsmall = students[0].quiz3\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif small >= students[i].quiz3 and students[i].quiz3 > 0 :\n", + "\t\t\t\tsmall = students[i].quiz3\n", + "\t\treturn small\n", + "\n", + "\telif x == 3 :\n", + "\t\tsmall = students[0].quiz4\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif small >= students[i].quiz4 and students[i].quiz4 > 0 :\n", + "\t\t\t\tsmall = students[i].quiz4\n", + "\t\treturn small\n", + "\t\t\n", + "\telif x == 4 :\n", + "\t\tsmall = students[0].exam\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif small >= students[i].exam and students[i].exam > 0 :\n", + "\t\t\t\tsmall = students[i].exam\n", + "\t\treturn small\n", + "\treturn 0\n", + "\n", + "def findHigh (students, x, c) :\n", + "\tif x == 0 :\n", + "\t\tbig = students[0].quiz1\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif big <= students[i].quiz1 :\n", + "\t\t\t\tbig = students[i].quiz1\n", + "\t\treturn big\n", + "\t\t\n", + "\telif x == 1 :\n", + "\t\tbig = students[0].quiz2\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif big <= students[i].quiz2 :\n", + "\t\t\t\tbig = students[i].quiz2\n", + "\t\treturn big\n", + "\t\t\n", + "\telif x == 2 :\n", + "\t\tbig = students[0].quiz3\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif big <= students[i].quiz3 :\n", + "\t\t\t\tbig = students[i].quiz3\n", + "\t\treturn big\n", + "\n", + "\telif x == 3 :\n", + "\t\tbig = students[0].quiz4\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif big <= students[i].quiz4 :\n", + "\t\t\t\tbig = students[i].quiz4\n", + "\t\treturn big\n", + "\t\t\n", + "\telif x == 4 :\n", + "\t\tbig = students[0].exam\n", + "\t\tfor i in range (1, c) :\n", + "\t\t\tif big <= students[i].exam :\n", + "\t\t\t\tbig = students[i].exam\n", + "\t\treturn big\n", + "\treturn 0\n", + "\n", + "\n", + "students = [STUDENT() for i in range (5)]\n", + "summ = avg = low = high = [0] * 5\n", + "cnt = 0\n", + "\n", + "print ('--- CLASS INFO --- \\n')\n", + "print ('Name\\t\\t Id\\tQuiz1 Quiz2 Quiz3 Quiz4 Exam \\n')\n", + "\n", + "with open('12.18.txt') as fpr :\n", + "\tfor line in fpr :\n", + "\t\ti = 0\n", + "\t\tstudents[i].fname, students[i].lname, students[i].id, students[i].quiz1, students[i].quiz2, students[i].quiz3, students[i].quiz4, students[i].exam = line.split()\n", + "\t\tstudents[i].id = int(students[i].id)\n", + "\t\tstudents[i].quiz1 = int(students[i].quiz1)\n", + "\t\tstudents[i].quiz2 = int(students[i].quiz2)\n", + "\t\tstudents[i].quiz3 = int(students[i].quiz3)\n", + "\t\tstudents[i].quiz4 = int(students[i].quiz4)\n", + "\t\tstudents[i].exam = int(students[i].exam)\n", + "\t\t\n", + "\t\tprint ('%-s %-s\\t %-4d\t%-3d\t%-3d\t%-3d\t%-3d\t%-3d' % (students[i].fname, students[i].lname, students[i].id, students[i].quiz1, students[i].quiz2, students[i].quiz3, students[i].quiz4, students[i].exam)) \n", + "\t\t\n", + "\t\tsumm[0] += int(students[i].quiz1)\n", + "\t\tsumm[1] += int(students[i].quiz2)\n", + "\t\tsumm[2] += int(students[i].quiz3)\t\t\n", + "\t\tsumm[3] += int(students[i].quiz4)\n", + "\t\tsumm[4] += int(students[i].exam)\n", + "\t\ti = i+1\n", + "\t\tcnt = cnt+1\n", + "\n", + "print ('\\nSTATISTICS')\n", + "print ('\\t\\tQuiz1\tQuiz2\tQuiz3\tQuiz4\tExam\\n')\n", + "print ('Average:\\t'),\n", + "for i in range (0, 5) :\n", + "\tavg[i] = float(summ[i])/cnt\n", + "\tprint ('%-5.1f \\t' % avg[i]),\n", + "print\n", + "\n", + "print ('Lowest:\\t\\t'),\n", + "for i in range (0, 5) :\n", + "\tlow[i] = findLow (students, i, cnt)\n", + "\thigh[i] = findHigh (students, i, cnt)\n", + "\t\n", + "for i in range (0, 5) :\n", + "\tprint ('%-5d \\t' % low[i]),\n", + "print\n", + "\t\n", + "print ('Highest:\\t'),\n", + "for i in range (0, 5) :\n", + "\tprint ('%-5d \\t' % high[i]),\n", + "print\n", + "\n", + "print ('\\n --- END OF REPORT --- \\n')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "--- CLASS INFO --- \n", + "\n", + "Name\t\t Id\tQuiz1 Quiz2 Quiz3 Quiz4 Exam \n", + "\n", + "anand mane\t 11 \t10 \t3 \t4 \t5 \t80 \n", + "mandar patil\t 12 \t4 \t5 \t6 \t7 \t50 \n", + "kishoe dhane\t 13 \t4 \t5 \t6 \t8 \t55 \n", + "\n", + "STATISTICS\n", + "\t\tQuiz1\tQuiz2\tQuiz3\tQuiz4\tExam\n", + "\n", + "Average:\t6.0 \t4.3 \t5.3 \t6.7 \t61.7 \t\n", + "Lowest:\t\t4 \t5 \t6 \t8 \t55 \t\n", + "Highest:\t4 \t5 \t6 \t8 \t55 \t\n", + "\n", + " --- END OF REPORT --- \n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.19, Page number: 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "\n", + "# Structure declaration\n", + "class Employee (object) :\n", + "\tdef __init__(self, fname=None, lname=None, sub_taken=None, last_edu=None, join_date=None, id=None, age=None, bsal=None) :\n", + "\t\tself.fname = fname\n", + "\t\tself.lname = lname\n", + "\t\tself.sub_taken = sub_taken\n", + "\t\tself.last_edu = last_edu\n", + "\t\tself.join_date = join_date\n", + "\t\tself.id = id\n", + "\t\tself.age = age\n", + "\t\tself.bsal = bsal\n", + "\t\n", + "emp = Employee ()\n", + "fp = open('12.19.dat','ab+')\n", + "recsize = sys.getsizeof(emp)\n", + "\n", + "condition = True\n", + "while condition :\n", + "\tprint ('\\n1.Add Records \\\n", + "\t\t\t \\n2.Delete Records \\\n", + "\t\t\t \\n3.Modify Records \\\n", + "\t\t\t \\n4.List Records \\\n", + "\t\t\t \\n5.Exit')\n", + "\tchoice = int(raw_input('\\nEnter your choice: '))\n", + "\t\n", + "\tif choice == 1 :\n", + "\t\tanother = 'Y'\n", + "\t\twhile another == 'Y' or another == 'y' :\n", + "\t\t\tfp = open('12.19.dat','ab+')\n", + "\t\t\temp.fname = raw_input('Enter the first name: ')\n", + "\t\t\temp.lname = raw_input('Enter the last name: ')\n", + "\t\t\temp.age = int(raw_input('Enter the age: '))\n", + "\t\t\temp.bsal = int(raw_input('Enter the basic salary: '))\n", + "\t\t\temp.join_date = int(raw_input('Enter joining date: '))\n", + "\t\t\temp.id = int(raw_input('Enter the employee id: '))\n", + "\t\t\temp.last_edu = raw_input('Enter the last education: ')\n", + "\t\t\temp.sub_taken = raw_input('Enter the subject taken: ')\n", + "\t\t\tfp.write('%d %s %s %d %d %s %s %s \\n' % (emp.id, emp.fname, emp.lname, emp.age, emp.bsal, emp.join_date, emp.last_edu, emp.sub_taken))\n", + "\t\t\tanother = raw_input('Add another record (Y/N) ? ')\n", + "\n", + "\telif choice == 2 :\n", + "\t\tanother = 'Y'\n", + "\t\twhile another == 'Y' or another == 'y' :\n", + "\t\t\tfp = open('12.19.dat','r')\n", + "\t\t\tlines = fp.readlines()\n", + "\t\t\tlines = lines[:-1]\n", + "\t\t\tprint ('\\nRecord deleted ')\n", + "\t\t\tanother = raw_input('Delete another record (Y/N) ? ')\n", + "\t\t\n", + "\telif choice == 3 :\n", + "\t\tfp = open('12.19.dat','w')\n", + "\t\tanother = 'Y'\n", + "\t\twhile another == 'Y' or another == 'y' :\n", + "\t\t\temp.fname = raw_input('Enter the first name: ')\n", + "\t\t\temp.lname = raw_input('Enter the last name: ')\n", + "\t\t\temp.age = int(raw_input('Enter the age: '))\n", + "\t\t\temp.bsal = int(raw_input('Enter the basic salary: '))\n", + "\t\t\temp.join_date = int(raw_input('Enter joining date: '))\n", + "\t\t\temp.id = int(raw_input('Enter the employee id: '))\n", + "\t\t\temp.last_edu = raw_input('Enter the last education: ')\n", + "\t\t\temp.sub_taken = raw_input('Enter the subject taken: ')\n", + "\t\t\tfp.write('%d %s %s %d %d %s %s %s \\n' % (emp.id, emp.fname, emp.lname, emp.age, emp.bsal, emp.join_date, emp.last_edu, emp.sub_taken))\n", + "\t\t\tanother = raw_input('Modify another record (Y/N) ? ')\n", + "\t \t\n", + "\telif choice == 4 :\n", + "\t\twith open ('12.19.dat','r') as fp :\n", + "\t\t\tfor line in fp :\n", + "\t\t\t\tprint line\n", + "\t\t\n", + "\telif choice == 5 :\n", + "\t\tcondition = False\n", + "\t\tfp.close()\n", + "\t\texit()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1.Add Records \t\t\t \n", + "2.Delete Records \t\t\t \n", + "3.Modify Records \t\t\t \n", + "4.List Records \t\t\t \n", + "5.Exit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter your choice: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the first name: Anand\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last name: Rao\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age: 29\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the basic salary: 5000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter joining date: 2004\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the employee id: 11\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last education: BCA\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the subject taken: OS\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Add another record (Y/N) ? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the first name: Deepti\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last name: Garg\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age: 22\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the basic salary: 25000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter joining date: 2014\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the employee id: 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last education: BTech\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the subject taken: CSE\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Add another record (Y/N) ? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1.Add Records \t\t\t \n", + "2.Delete Records \t\t\t \n", + "3.Modify Records \t\t\t \n", + "4.List Records \t\t\t \n", + "5.Exit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter your choice: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "11 Anand Rao 29 5000 2004 BCA OS \n", + "\n", + "12 Deepti Garg 22 25000 2014 BTech CSE \n", + "\n", + "\n", + "1.Add Records \t\t\t \n", + "2.Delete Records \t\t\t \n", + "3.Modify Records \t\t\t \n", + "4.List Records \t\t\t \n", + "5.Exit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter your choice: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Record deleted \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delete another record (Y/N) ? y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Record deleted \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delete another record (Y/N) ? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1.Add Records \t\t\t \n", + "2.Delete Records \t\t\t \n", + "3.Modify Records \t\t\t \n", + "4.List Records \t\t\t \n", + "5.Exit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter your choice: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the first name: Nalin\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last name: Chhibber\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the age: 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the basic salary: 30000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter joining date: 2012\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the employee id: 07\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the last education: MTech\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the subject taken: DBMS\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modify another record (Y/N) ? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1.Add Records \t\t\t \n", + "2.Delete Records \t\t\t \n", + "3.Modify Records \t\t\t \n", + "4.List Records \t\t\t \n", + "5.Exit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter your choice: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "7 Nalin Chhibber 25 30000 2012 MTech DBMS \n", + "\n", + "\n", + "1.Add Records \t\t\t \n", + "2.Delete Records \t\t\t \n", + "3.Modify Records \t\t\t \n", + "4.List Records \t\t\t \n", + "5.Exit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter your choice: 5\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb new file mode 100755 index 00000000..7144ab92 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb @@ -0,0 +1,203 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Syntactic Aspects" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, Page number: 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "class color() :\n", + " RED = 5\n", + " YELLOW = 6\n", + " GREEN = 4\n", + " BLUE = 5\n", + "\n", + "print ('RED = %d ' % color.RED)\n", + "print ('YELLOW = %d ' % color.YELLOW)\n", + "print ('GREEN = %d ' % color.GREEN)\n", + "print ('BLUE = %d ' % color.BLUE)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RED = 5 \n", + "YELLOW = 6 \n", + "GREEN = 4 \n", + "BLUE = 5 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, Page number: 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "i = 2004\n", + "c = 'Year'\n", + "\n", + "print ('%s %d' % (c, i))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Year 2004\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page number: 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "num = 5\n", + "c = '$'\n", + "pi = 3.141\n", + "print ('Hello World')\n", + "print ('%d %c %f' % (num, c, pi))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hello World\n", + "5 $ 3.141000\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page number: 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "num = int(raw_input('Enter your favorite number '))\n", + "print ('You have entered your favorite number as %d ' % num)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your favorite number 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered your favorite number as 3 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, Page number: 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "fahrenheit = float(raw_input('Please enter the Fahrenheit temperature '))\n", + "\n", + "centigrade = float(5)/9 * (fahrenheit - 32)\n", + "\n", + "print ('The temperature in Centigrade is %.2f ' % centigrade)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter the Fahrenheit temperature 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature in Centigrade is 37.78 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb new file mode 100755 index 00000000..9e566fc1 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb @@ -0,0 +1,1060 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Simple Programs" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, Page number: 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation and result\n", + "pi = 3.141\n", + "num = int(raw_input('Enter your favorite number: '))\n", + "print ('You have entered your favorite number as %d' % num)\n", + "c = raw_input('Enter your favorite character: ')\n", + "print ('You have entered your favorite character as %c' % c)\n", + "print ('The value of pi is %.3f ' % pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your favorite number: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered your favorite number as 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your favorite character: m\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have entered your favorite character as m\n", + "The value of pi is 3.141 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page number: 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "\n", + "# Calculation\n", + "som = a+b\n", + "\n", + "# Result\n", + "print ('The sum of %d + %d = %d ' % (a, b, som))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 67\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 990\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of 67 + 990 = 1057 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page number: 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "\n", + "# Calculation and result\n", + "if a>b :\n", + " print ('The greater number is %d ' % a)\n", + "else :\n", + " print ('The greater number is %d ' % b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 190\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greater number is 190 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page number: 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "\n", + "# Calculation and result\n", + "if a==b :\n", + " print ('Both numbers are equal ')\n", + "else :\n", + " if a>b :\n", + " print ('The greater number is %d ' % a)\n", + " else :\n", + " print ('The greater number is %d ' % b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 78\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both numbers are equal \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page number: 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "c = int(raw_input('Enter third number '))\n", + "\n", + "# Calculation and result\n", + "if a>b :\n", + " if a>c :\n", + " print ('The greatest number is %d ' % a)\n", + " else :\n", + " print ('The greatest number is %d ' % c)\n", + "\n", + "else :\n", + " if b>c :\n", + " print ('The greatest number is %d ' % b)\n", + " else : \n", + " print ('The greatest number is %d ' % c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 128\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter third number 90\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greatest number is 128 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page number: 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('Counting upto %d ' % n)\n", + "\n", + "for i in range (1, n+1) :\n", + " print ('%d ' % i)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Counting upto 7 \n", + "1 2 3 4 5 6 7 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page number: 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('Even numbers upto %d ' % n)\n", + "\n", + "for i in range (2, n+1, 2) :\n", + " print ('%d ' % i)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Even numbers upto 10 \n", + "2 4 6 8 10 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7, Page number: 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('Odd numbers upto %d ' % n)\n", + "\n", + "for i in range (1, n+1, 2) :\n", + " print ('%d ' % i)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Odd numbers upto 10 \n", + "1 3 5 7 9 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page number: 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('Number line upto %d ' % n)\n", + "\n", + "for i in range (-n, n+1) :\n", + " print ('%d ' % i)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number line upto 7 \n", + "-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9, Page number: 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "sum = 0\n", + "\n", + "# Calculation\n", + "for i in range (1, n+1) :\n", + " sum = sum + i\n", + "\n", + "# Result\n", + "print ('Sum of %d natural numbers is %d ' % (n, sum))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of 6 natural numbers is 21 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10, Page number: 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('The factors of %d are ' % n)\n", + "\n", + "for i in range (1, n+1) :\n", + " if n%i == 0 :\n", + " print ('%d ' % i)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 28\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factors of 28 are \n", + "1 2 4 7 14 28 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11, Page number: 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('The first 10 multiples of %d are ' % n)\n", + "\n", + "for i in range (1, 11) :\n", + " print ('%d X %d = %d ' % (n, i, n*i))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first 10 multiples of 6 are \n", + "6 X 1 = 6 \n", + "6 X 2 = 12 \n", + "6 X 3 = 18 \n", + "6 X 4 = 24 \n", + "6 X 5 = 30 \n", + "6 X 6 = 36 \n", + "6 X 7 = 42 \n", + "6 X 8 = 48 \n", + "6 X 9 = 54 \n", + "6 X 10 = 60 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12, Page number: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "i = 1\n", + "sum = 0\n", + "\n", + "# Calculation\n", + "print ('The sum of digits of %d is' % n),\n", + "\n", + "while n > 0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + "\n", + "# Result\n", + "print ('%d' % sum)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 5214\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of digits of 5214 is 12\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13, Page number: 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "flag = 1\n", + "\n", + "# Calculation\n", + "for i in range (2, n) :\n", + " if flag == 1 :\n", + " if n%i == 0 :\n", + " flag = 0\n", + "\n", + "# Result\n", + "if flag :\n", + " print ('%d is Prime ' % n)\n", + "else :\n", + " print ('%d is Composite ' % n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 41\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "41 is Prime \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14, Page number: 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "first = 0\n", + "second = 1\n", + "count = 3\n", + "\n", + "# Calculation and result\n", + "print ('%d Fibonacci terms are ' % n)\n", + "print ('%d %d ' % (first, second)),\n", + "\n", + "while count<=n :\n", + " third = first + second\n", + " first = second\n", + " second = third\n", + " print ('%d ' % third),\n", + " count = count + 1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10 Fibonacci terms are \n", + "0 1 1 2 3 5 8 13 21 34 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15, Page number: 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "sum = n\n", + "\n", + "# Calculation\n", + "print ('Sum of digits of %d is' % n),\n", + "\n", + "while sum>=10 :\n", + " sum = 0\n", + " while n>0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " n = sum\n", + "\n", + "# Result\n", + "print ('%d' % sum)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 8626\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 8626 is 4\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16, Page number: 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Calculation and result\n", + "print ('Prime numbers upto %d are ' % n)\n", + "\n", + "for num in range (2, n+1) :\n", + " flag = 1\n", + " for i in range (2, num) :\n", + " if num % i == 0 : \n", + " flag = 0\n", + " if flag :\n", + " print ('%d ' % num)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 12\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Prime numbers upto 12 are \n", + "2 3 5 7 11 \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17, Page number: 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number '))\n", + "\n", + "# Calculation and result\n", + "for lin in range (1, n+1) :\n", + " for count in range (1, lin+1) :\n", + " print ('%d ' % count),\n", + " print" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 \n", + "1 2 \n", + "1 2 3 \n", + "1 2 3 4 \n", + "1 2 3 4 5 \n", + "1 2 3 4 5 6 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18, Page number: 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number '))\n", + "\n", + "# Calculation and result\n", + "for lin in range (1, n+1) :\n", + " for count in range (lin, 2*lin) :\n", + " print ('%d ' % count),\n", + " print" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 \n", + "2 3 \n", + "3 4 5 \n", + "4 5 6 7 \n", + "5 6 7 8 9 \n", + "6 7 8 9 10 11 \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19, Page number: 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number '))\n", + "\n", + "# Calculation and result\n", + "for lin in range (1, n+1) :\n", + " for blk in range (1, n-lin+1) :\n", + " print ' ',\n", + " for up in range (1, lin+1) :\n", + " print ('%d' % up),\n", + " down = lin-1\n", + " while down>0 :\n", + " print ('%d' % down),\n", + " down = down-1\n", + " print" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1\n", + " 1 2 1\n", + " 1 2 3 2 1\n", + " 1 2 3 4 3 2 1\n", + " 1 2 3 4 5 4 3 2 1\n", + "1 2 3 4 5 6 5 4 3 2 1\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20, Page number: 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number '))\n", + "\n", + "# Calculation and result\n", + "for lin in range (1, n+1) :\n", + " for blk in range (1, n-lin+1) :\n", + " print ' ',\n", + " for up in range (lin, 2*lin) :\n", + " print ('%d' % (up%10)),\n", + " down = 2*lin-2\n", + " while down>=lin :\n", + " print ('%d' % (down%10)),\n", + " down = down-1\n", + " print" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1\n", + " 2 3 2\n", + " 3 4 5 4 3\n", + " 4 5 6 7 6 5 4\n", + " 5 6 7 8 9 8 7 6 5\n", + "6 7 8 9 0 1 0 9 8 7 6\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb new file mode 100755 index 00000000..a071712d --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb @@ -0,0 +1,1070 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1, Page number: 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration and result\n", + "a = 5\n", + "c = 'h'\n", + "b = 3.14\n", + "def myfunction (x, ch, fl) :\n", + " print ('%d %c %.2f ' % (x, ch, fl))\n", + " \n", + "myfunction (a, c, b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5 h 3.14 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2, Page number: 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def add (a, b) :\n", + " som = a + b\n", + " return som\n", + "\n", + "print ('The sum of %d and %d is %d' % (a, b, (add (a, b))))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of 7 and 8 is 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page number: 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def greater (a, b) :\n", + " if a > b :\n", + " return a\n", + " else :\n", + " return b\n", + "\n", + "print ('The greater number is %d' % (greater (a, b)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 190\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greater number is 190\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page number: 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def greater (a, b) :\n", + " if a == b :\n", + " print ('Both numbers are equal')\n", + " elif a > b :\n", + " print ('The greater number is %d' % a)\n", + " else :\n", + " print ('The greater number is %d' % b)\n", + " return\n", + "\n", + "greater (a, b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both numbers are equal\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page number: 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "c = int(raw_input('Enter third number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def greatest (a, b, c) :\n", + " if a > b :\n", + " if a > c :\n", + " return a\n", + " else :\n", + " return c\n", + " else :\n", + " if b > c :\n", + " return b\n", + " else :\n", + " return c\n", + "\n", + "print ('The greatest number is %d' % (greatest (a, b, c)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 128\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter third number: 190\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greatest number is 190\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page number: 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printnum (n) :\n", + " print ('Counting upto %d' % n) \n", + " for i in range (1, n+1) :\n", + " print i,\n", + "\n", + "printnum (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Counting upto 7\n", + "1 2 3 4 5 6 7\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page number: 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printeven (n) :\n", + " print ('Even numbers upto %d' % n) \n", + " for i in range (2, n+1, 2) :\n", + " print i,\n", + "\n", + "printeven (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Even numbers upto 7\n", + "2 4 6\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8, Page number: 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printodd (n) :\n", + " print ('Odd numbers upto %d' % n) \n", + " for i in range (1, n+1, 2) :\n", + " print i,\n", + "\n", + "printodd (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Odd numbers upto 7\n", + "1 3 5 7\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page number: 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printnum (n) :\n", + " print ('Number line for %d' % n) \n", + " for i in range (-n, n+1) :\n", + " print i,\n", + "\n", + "printnum (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number line for 4\n", + "-4 -3 -2 -1 0 1 2 3 4\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page number: 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def summate (n) :\n", + " total = 0\n", + " for i in range (1, n+1) :\n", + " total = total + i\n", + " return total\n", + "\n", + "print('Sum of first %d natural numbers is %d' % (n, summate (n)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of first 6 natural numbers is 21\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11, Page number: 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def factors (n) :\n", + " print ('The factors of %d are' % n)\n", + " for i in range (1, n+1) :\n", + " if n%i == 0 :\n", + " print i,\n", + "\n", + "factors (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 28\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factors of 28 are\n", + "1 2 4 7 14 28\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12, Page number: 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def multiple (n) :\n", + " print ('The first 10 multiples of %d are' % n)\n", + " for i in range (1, 11) :\n", + " print('%d X %d = %d' % (n, i, n*i))\n", + "\n", + "multiple (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first 10 multiples of 6 are\n", + "6 X 1 = 6\n", + "6 X 2 = 12\n", + "6 X 3 = 18\n", + "6 X 4 = 24\n", + "6 X 5 = 30\n", + "6 X 6 = 36\n", + "6 X 7 = 42\n", + "6 X 8 = 48\n", + "6 X 9 = 54\n", + "6 X 10 = 60\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13, Page number: 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def sumofdigit (n) :\n", + " sum = 0\n", + " while n>0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " return sum\n", + "\n", + "print ('The sum of digits of %d is %d' % (n, sumofdigit (n)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 5214\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of digits of 5214 is 12\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14, Page number: 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def prime (n) :\n", + " count = 0\n", + " for i in range (2, n) :\n", + " if n%i == 0 :\n", + " count = count + 1\n", + " break\n", + "\n", + " if count == 0 :\n", + " print ('The number %d is prime' % n)\n", + " else :\n", + " print ('The number %d is composite' % n)\n", + "\n", + "prime (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 14\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number 14 is composite\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15, Page number: 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('%d terms of Fibonacci series are ' % n)\n", + "\n", + "def printfibo (n) :\n", + " first = 0\n", + " second = 1\n", + " count = 3\n", + "\n", + " print ('%d %d ' % (first, second)),\n", + "\n", + " while count<=n :\n", + " third = first + second\n", + " first = second\n", + " second = third\n", + " print (' %d ' % third), \n", + " count = count + 1\n", + "\n", + "printfibo (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10 terms of Fibonacci series are \n", + "0 1 1 2 3 5 8 13 21 34 \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16, Page number: 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def sumofdigit (n) :\n", + " sum = n\n", + " while sum>=10 :\n", + " sum = 0\n", + " while n>0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " n = sum\n", + " return sum\n", + "\n", + "print ('Sum of digits of %d is %d' % (n, sumofdigit (n)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 8626\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 8626 is 4\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17, Page number: 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('Prime numbers upto %d are ' % n)\n", + "\n", + "def printprime (n) :\n", + " for num in range (2, n+1) :\n", + " flag = 1\n", + " for i in range (2, num) :\n", + " if num % i == 0 : \n", + " flag = 0\n", + " if flag :\n", + " print ('%d ' % num),\n", + "\n", + "printprime (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 40\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Prime numbers upto 40 are \n", + "2 3 5 7 11 13 17 19 23 29 31 37 \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18, Page number: 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def pattern (n) :\n", + " for lin in range (1, n+1) :\n", + " for count in range (1, lin+1) :\n", + " print ('%d ' % count),\n", + " print\n", + "\n", + "pattern (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 \n", + "1 2 \n", + "1 2 3 \n", + "1 2 3 4 \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19, Page number: 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def pattern (n) :\n", + " for lin in range (1, n+1) :\n", + " for count in range (lin, 2*lin) :\n", + " print ('%d ' % count),\n", + " print\n", + "\n", + "pattern (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 \n", + "2 3 \n", + "3 4 5 \n", + "4 5 6 7 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20, Page number: 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def pattern (n) :\n", + " for lin in range (1, n+1) :\n", + " for blk in range (1, n-lin+1) :\n", + " print ' ',\n", + " for up in range (1, lin+1) :\n", + " print ('%d' % up),\n", + " down = lin-1\n", + " while down>0 :\n", + " print ('%d' % down),\n", + " down = down-1\n", + " print\n", + "\n", + "pattern (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1\n", + " 1 2 1\n", + " 1 2 3 2 1\n", + "1 2 3 4 3 2 1\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21, Page number: 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter a number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def pattern (n) :\n", + " for lin in range (1, n+1) :\n", + " for blk in range (1, n-lin+1) :\n", + " print ' ',\n", + " for up in range (lin, 2*lin) :\n", + " print ('%d' % (up%10)),\n", + " down = 2*lin-2\n", + " while down>=lin :\n", + " print ('%d' % (down%10)),\n", + " down = down-1\n", + " print\n", + "\n", + "pattern (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1\n", + " 2 3 2\n", + " 3 4 5 4 3\n", + "4 5 6 7 6 5 4\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb new file mode 100755 index 00000000..b4cb2db2 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb @@ -0,0 +1,909 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page number: 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Calculation and result\n", + "print ('The original values are a = %d b = %d' % (a, b))\n", + "temp = a\n", + "a = b\n", + "b = temp\n", + "\n", + "print ('The values after swapping are a = %d b = %d' % (a, b))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 27\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The original values are a = 15 b = 27\n", + "The values after swapping are a = 27 b = 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page number: 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('The original values are a = %d b = %d' % (a, b))\n", + "\n", + "def swap (a, b) :\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " print ('The values after swapping are a = %d b = %d' % (a, b))\n", + "\n", + "swap (a, b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 27\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The original values are a = 15 b = 27\n", + "The values after swapping are a = 27 b = 15\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page number: 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('The original values are a = %d b = %d' % (a, b))\n", + "\n", + "def swap (a, b) :\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " print ('The values after swapping are a = %d b = %d' % (a, b))\n", + "\n", + "swap (a, b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 27\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The original values are a = 15 b = 27\n", + "The values after swapping are a = 27 b = 15\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page number: 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('In main the original values are a = %d b = %d' % (a, b))\n", + "print ('In main the address of a is %x and address of b is %x' % (a, b))\n", + "\n", + "def swap (a, b) :\n", + " print ('In swap the address in a is %x and b is %x' % (a, b))\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " print ('The values after swapping are a = %d b = %d' % (a, b))\n", + "\n", + "swap (a, b)\n", + "\n", + "print ('In main the values after swapping are a = %d b = %d' % (a, b))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 27\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In main the original values are a = 15 b = 27\n", + "In main the address of a is f and address of b is 1b\n", + "In swap the address in a is f and b is 1b\n", + "The values after swapping are a = 27 b = 15\n", + "In main the values after swapping are a = 15 b = 27\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page number: 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('In main the value of a = %d b = %d' % (a, b))\n", + "\n", + "def doooo (a, b) :\n", + " a = a+10\n", + " b = b+10\n", + "\n", + "doooo (a, b)\n", + "\n", + "print ('In main the value of a = %d b = %d' % (a, b))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In main the value of a = 5 b = 7\n", + "In main the value of a = 5 b = 7\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6, Page number: 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number: '))\n", + "b = int(raw_input('Enter second number: '))\n", + "\n", + "# Function declaration, calculation and result\n", + "print ('In main the value of a = %d b = %d' % (a, b))\n", + "print ('In main the addresses are a = %s b = %s' % (hex(id(a)), hex(id(b))))\n", + "\n", + "def doooo (a, b) :\n", + " print ('In doooo the addresses are a = %s b = %s' % (hex(id(a)), hex(id(b))))\n", + " a = a+10\n", + " b = b+10\n", + "\n", + "doooo (a, b)\n", + "\n", + "print ('In main the value of a = %d b = %d' % (a, b))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number: 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In main the value of a = 5 b = 7\n", + "In main the addresses are a = 0x1b49138 b = 0x1b49108\n", + "In doooo the addresses are a = 0x1b49138 b = 0x1b49108\n", + "In main the value of a = 5 b = 7\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page number: 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def add (a, b) :\n", + " x = a+b\n", + " return x\n", + "\n", + "som = add (a, b)\n", + "\n", + "print ('The sum of %d + %d = %d' % (a, b, som))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of 2 + 3 = 5\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8, Page number: 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def greater (a, b) :\n", + " if a>b :\n", + " big = a\n", + " else :\n", + " big = b\n", + " return big\n", + "\n", + "great = greater (a, b)\n", + "\n", + "print ('The greater number is %d' % great)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greater number is 45\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9, Page number: 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "c = int(raw_input('Enter third number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def greater (a, b, c) :\n", + " if a>b :\n", + " if a>c :\n", + " big = a\n", + " else :\n", + " big = c\n", + " else :\n", + " if b>c :\n", + " big = b\n", + " else :\n", + " big = c\n", + " return big\n", + "\n", + "great = greater (a, b, c)\n", + "\n", + "print ('The greatest number is %d' % great)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 190\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter third number 128\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greatest number is 190\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10, Page number: 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def summate (n) :\n", + " i = 1\n", + " total = 0\n", + " while i <= n :\n", + " total = total + i\n", + " i = i+1\n", + " return total\n", + "\n", + "sumn = summate (n)\n", + "\n", + "print ('Sum of first %d natural numbers is %d' % (n, sumn))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of first 5 natural numbers is 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11, Page number: 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def sumofdigit (n) :\n", + " sum = 0\n", + " while n > 0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " return sum\n", + "\n", + "result = sumofdigit (n)\n", + "\n", + "print ('Sum of digits of %d is %d' % (n, result))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 7162\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 7162 is 16\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12, Page number: 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "sum = n\n", + "\n", + "# Function declaration, calculation and result\n", + "def sumofdigit (n, sum) :\n", + " while sum>=10 :\n", + " sum = 0\n", + " while n>0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " n = sum\n", + " return sum\n", + "\n", + "result = sumofdigit (n, sum)\n", + "\n", + "print ('Sum of digits of %d is %d' % (n, result))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 7162\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 7162 is 7\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13, Page number: 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def checkprime (n) :\n", + " flag = 1\n", + " i = 2\n", + " while i b :\n", + " big = 'first'\n", + " else :\n", + " big = 'second'\n", + " return big\n", + "\n", + "greater (a, b)\n", + "\n", + "if big == 'equal' :\n", + " print ('EQUAL')\n", + "else :\n", + " if big == 'first' :\n", + " print ('First number is greater %d' % a)\n", + " else :\n", + " print ('Second number is greater %d' % b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EQUAL\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page number: 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = int(raw_input('Enter first number '))\n", + "b = int(raw_input('Enter second number '))\n", + "c = int(raw_input('Enter third number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def greater (a, b, c) :\n", + " if a>b :\n", + " if a>c :\n", + " print ('The greatest number is %d ' % a)\n", + " else :\n", + " print ('The greatest number is %d ' % c)\n", + "\n", + " else :\n", + " if b>c :\n", + " print ('The greatest number is %d ' % b)\n", + " else : \n", + " print ('The greatest number is %d ' % c)\n", + "\n", + "greater (a, b, c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first number 190\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second number 128\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter third number 45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The greatest number is 190 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8, Page number: 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def summate (n) :\n", + " i = 1\n", + " global total\n", + " total = 0\n", + " while i <= n :\n", + " total = total + i\n", + " i = i+1\n", + " \n", + "summate (n)\n", + "\n", + "print ('Sum of first %d natural numbers is %d' % (n, total))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of first 6 natural numbers is 21\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9, Page number: 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def sumofdigit (n) :\n", + " global sum\n", + " sum = 0\n", + " while n > 0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " return sum\n", + "\n", + "sumofdigit (n)\n", + "\n", + "print ('Sum of digits of %d is %d' % (n, sum))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 7612\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 7612 is 16\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10, Page number: 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def checkprime (n) :\n", + " flag = 1\n", + " i = 2\n", + " while i=10 :\n", + " sum = 0\n", + " while n>0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " n = sum\n", + " return sum\n", + "\n", + "result = sumofdigit (n, sum)\n", + "\n", + "print ('Sum of digits of %d is %d' % (n, result))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 7612\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 7612 is 7\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13, Page number: 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def prime (n) :\n", + " for num in range (2, n) :\n", + " flag = 1\n", + " for i in range (2, num) :\n", + " if num % i == 0 : \n", + " flag = 0\n", + " if flag :\n", + " print ('%d ' % num),\n", + "\n", + "prime (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2 3 5 7 11 13 17 19 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14, Page number: 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "m = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def fun1 (m) :\n", + " if not hasattr(fun1, \"temp\") : \n", + " fun1.temp = 0\n", + " print ('In function value of temp = %d' % fun1.temp)\n", + " if fun1.temp < m :\n", + " fun1.temp = m\n", + " else :\n", + " fun1.temp = fun1.temp + 1\n", + "\n", + "for i in range (1, 6) :\n", + " fun1 (m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In function value of temp = 0\n", + "In function value of temp = 10\n", + "In function value of temp = 11\n", + "In function value of temp = 12\n", + "In function value of temp = 13\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15, Page number: 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "m = 10\n", + "i = 1\n", + "\n", + "# Function declaration, calculation and result\n", + "def fun1 (m) :\n", + " x = m\n", + " if not hasattr(fun1, \"temp\") : \n", + " fun1.temp = 0\n", + "\n", + " if fun1.temp == 0 :\n", + " print ('\\nIn FUNCTION Global variable')\n", + " print ('Value of m = %d address of m = %x' % (m, id(m)))\n", + " print ('\\nIn FUNCTION Formal parameter variable')\n", + " print ('Value of x = %d address of x = %x' % (x, id(x)))\n", + " print ('\\nIn FUNCTION Static variable')\n", + " print ('Value of temp = %d address of temp = %x' % (fun1.temp, id(fun1.temp)))\n", + "\n", + " if fun1.temp < m :\n", + " fun1.temp = m\n", + "\n", + " else :\n", + " print ('Value of temp = %d' % fun1.temp)\n", + " fun1.temp = fun1.temp + 1\n", + "\n", + "print ('\\nIn MAIN Global variable')\n", + "print ('Value of m = %d address of m = %x' % (m, id(m)))\n", + "print ('\\nIn MAIN Local variable')\n", + "print ('Value of i = %d address of i = %x' % (i, id(i)))\n", + " \n", + "for i in range (1, 6) :\n", + " fun1 (m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "In MAIN Global variable\n", + "Value of m = 10 address of m = 117d0c0\n", + "\n", + "In MAIN Local variable\n", + "Value of i = 1 address of i = 117d198\n", + "\n", + "In FUNCTION Global variable\n", + "Value of m = 10 address of m = 117d0c0\n", + "\n", + "In FUNCTION Formal parameter variable\n", + "Value of x = 10 address of x = 117d0c0\n", + "\n", + "In FUNCTION Static variable\n", + "Value of temp = 0 address of temp = 117d1b0\n", + "Value of temp = 10\n", + "Value of temp = 11\n", + "Value of temp = 12\n", + "Value of temp = 13\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16, Page number: 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter number of Fibonacci terms required '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def nextfibo () :\n", + " if not hasattr(nextfibo, \"first\") : \n", + " nextfibo.first = 0\n", + " if not hasattr(nextfibo, \"second\") : \n", + " nextfibo.second = 1\n", + " if not hasattr(nextfibo, \"third\") : \n", + " nextfibo.third = 0\n", + " nextfibo.third = nextfibo.first + nextfibo.second\n", + " nextfibo.first = nextfibo.second\n", + " nextfibo.second = nextfibo.third\n", + " return nextfibo.first\n", + " \n", + "print ('%d terms of Fibonacci series are' % n) \n", + "print 0,\n", + "for count in range (2, n+1) :\n", + " result = nextfibo ()\n", + " print ('%d' % result)," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of Fibonacci terms required 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10 terms of Fibonacci series are\n", + "0 1 1 2 3 5 8 13 21 34\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb new file mode 100755 index 00000000..73eec220 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb @@ -0,0 +1,862 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Recursion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page number: 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration, calculation and result\n", + "str = raw_input('Enter a string: ')\n", + "\n", + "print str" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: HELLO\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HELLO\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page number: 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration, calculation and result\n", + "str = raw_input('Enter a string: ')\n", + "\n", + "print str[::-1]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: HELLO\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "OLLEH\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page number: 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def fact (n) :\n", + " if n>0 :\n", + " return n * fact (n-1)\n", + " else :\n", + " return 1\n", + "\n", + "print ('Factorial of %d is %d' % (n, fact (n)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factorial of 5 is 120\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4, Page number: 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printnum (n) :\n", + " if n>0 :\n", + " printnum (n-1)\n", + " print n,\n", + "\n", + "print ('Counting up to %d' % n)\n", + "printnum (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Counting up to 10\n", + "1 2 3 4 5 6 7 8 9 10\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page number: 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printeven (n) :\n", + "\tif not hasattr(printeven, \"x\") : \n", + "\t\tprinteven.x = 2\n", + " \n", + "\tif printeven.x <= n :\n", + "\t\tprint printeven.x,\n", + "\t\tprinteven.x = printeven.x + 2\n", + "\t\tprinteven (n)\n", + "\n", + "print ('Even numbers up to %d are' % n)\n", + "printeven (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Even numbers up to 10 are\n", + "2 4 6 8 10\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6, Page number: 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printodd (x, n) :\n", + "\tif x <= n : \n", + "\t\tprint x,\n", + "\t\tprintodd (x+2, n)\n", + "\n", + "print ('Odd numbers up to %d are' % n)\n", + "printodd (1, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Odd numbers up to 10 are\n", + "1 3 5 7 9\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7, Page number: 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printnum (fro, to) :\n", + "\tif fro <= to : \n", + "\t\tprint fro,\n", + "\t\tprintnum (fro+1, to)\n", + "\n", + "print ('Number line for %d is' % n)\n", + "printnum (-n, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number line for 5 is\n", + "-5 -4 -3 -2 -1 0 1 2 3 4 5\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8, Page number: 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def summate (n) :\n", + "\tif n > 0 : \n", + "\t\treturn n + summate (n-1)\n", + "\telse :\n", + "\t\treturn 0\n", + "\n", + "print ('Sum of first %d natural numbers is %d' % (n, summate (n)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of first 10 natural numbers is 55\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9, Page number: 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def factors (n) :\n", + "\tif not hasattr(factors, \"i\") : \n", + "\t\tfactors.i = 1\n", + "\t\t\n", + "\tif factors.i <= n : \n", + "\t\tif n % factors.i == 0 :\n", + "\t\t\tprint factors.i,\n", + "\t\tfactors.i = factors.i + 1\n", + "\t\tfactors (n)\n", + "\n", + "print ('The factors of %d are' % n)\n", + "factors (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 28\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factors of 28 are\n", + "1 2 4 7 14 28\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10, Page number: 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def multiple (n) :\n", + "\tif not hasattr(multiple, \"i\") : \n", + "\t\tmultiple.i = 1\n", + "\t\t\n", + "\tif multiple.i <= 10 : \n", + "\t\tprint ('%d X %d = %d' % (n, multiple.i, n*multiple.i))\n", + "\t\tmultiple.i = multiple.i + 1\n", + "\t\tmultiple (n)\n", + "\n", + "print ('The first 10 multiples of %d are' % n)\n", + "multiple (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first 10 multiples of 6 are\n", + "6 X 1 = 6\n", + "6 X 2 = 12\n", + "6 X 3 = 18\n", + "6 X 4 = 24\n", + "6 X 5 = 30\n", + "6 X 6 = 36\n", + "6 X 7 = 42\n", + "6 X 8 = 48\n", + "6 X 9 = 54\n", + "6 X 10 = 60\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11, Page number: 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def checkprime (n) :\n", + " flag = 1\n", + " i = 2\n", + " while i=10 :\n", + " sum = 0\n", + " while n>0 :\n", + " sum = sum + n%10\n", + " n = n/10\n", + " n = sum\n", + " return sum\n", + "\n", + "result = sumofdigit (n, sum)\n", + "\n", + "print ('Sum of digits of %d is %d' % (n, result))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 8626\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of digits of 8626 is 4\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14, Page number: 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def prime (n) :\n", + " for num in range (3, n+1) :\n", + " flag = 1\n", + " for i in range (2, num) :\n", + " if num % i == 0 : \n", + " flag = 0\n", + " if flag :\n", + " print ('%d ' % num),\n", + "\n", + "print ('Prime numbers upto %d are' % n)\n", + "prime (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Prime numbers upto 30 are\n", + "3 5 7 11 13 17 19 23 29 \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15, Page number: 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int (raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def pattern (n) :\n", + "\tif n > 0 :\n", + "\t\tpattern (n-1)\n", + "\t\tfor count in range (1, n+1) :\n", + "\t\t\tprint ('%d' % count),\n", + " \tprint\n", + " \t\n", + "pattern (n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1\n", + "1 2\n", + "1 2 3\n", + "1 2 3 4\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16, Page number: 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "n = int(raw_input('Enter any number '))\n", + "\n", + "# Function declaration, calculation and result\n", + "def printline (x, total) :\n", + "\tif x > 0 :\n", + "\t\tprintline (x-1, total)\n", + "\t\tfor blk in range (1, total-x+1) :\n", + "\t\t\tprint ' ',\n", + "\t\tfor up in range (1, x+1) :\n", + "\t\t\tprint ('%d' % up),\n", + "\t\tdown = x-1\n", + "\t\twhile down>0 :\n", + "\t\t\tprint ('%d' % down),\n", + "\t\t\tdown = down-1\n", + "\t\tprint\n", + "\n", + "printline (n, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1\n", + " 1 2 1\n", + " 1 2 3 2 1\n", + "1 2 3 4 3 2 1\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17, Page number: 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def listsum () :\n", + "\tn = int(raw_input('Enter any number '))\n", + "\tif n > 0 :\n", + "\t\treturn n + listsum ()\n", + "\telse :\n", + "\t\treturn 0\n", + "\t\t\n", + "sum = listsum ()\n", + "print ('Sum of list of numbers is %d' % sum)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number -4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of list of numbers is 6\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb new file mode 100755 index 00000000..ccafa905 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb @@ -0,0 +1,2718 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Arrays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page number: 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "word = array('c', ['H', 'e', 'l', 'l', 'o'])\n", + "\n", + "# Result\n", + "print ('The contents of word [] is %s ' % ''.join(word))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The contents of word [] is Hello \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page number: 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "marks = [0]*10\n", + "avg = 0\n", + "\n", + "# Calculation and result\n", + "for i in range (0, 10) :\n", + "\tmarks[i] = int(raw_input('Enter value in cell [%d] ' % i))\n", + "\tavg = avg + marks[i]\n", + "\n", + "avg = avg/10\n", + "print ('The average marks are %f' % avg)\n", + "\n", + "for i in range (0, 10) :\n", + "\tif marks[i] < avg :\n", + "\t\tprint ('Marks in cell [%d] are %d less than average' % (i, marks[i]))\n", + "\telse :\n", + "\t\tprint ('Marks in cell [%d] are %d above/equal to average' % (i, marks[i]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [0] 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [1] 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [2] 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [3] 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [4] 56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [5] 98\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [6] 53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [7] 82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [8] 74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [9] 39\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average marks are 63.000000\n", + "Marks in cell [0] are 45 less than average\n", + "Marks in cell [1] are 78 above/equal to average\n", + "Marks in cell [2] are 65 above/equal to average\n", + "Marks in cell [3] are 43 less than average\n", + "Marks in cell [4] are 56 less than average\n", + "Marks in cell [5] are 98 above/equal to average\n", + "Marks in cell [6] are 53 less than average\n", + "Marks in cell [7] are 82 above/equal to average\n", + "Marks in cell [8] are 74 above/equal to average\n", + "Marks in cell [9] are 39 less than average\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page number: 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "data = raw_input('Enter the string ')\n", + "\n", + "# Calculation and result\n", + "rev_data = reversed (data)\n", + "\n", + "if list (data) == list (rev_data) :\n", + "\tprint ('The string %s is a PALINDROME' % data)\n", + "else :\n", + "\tprint ('The string %s is not a PALINDROME' % data)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the string MADAM\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The string MADAM is a PALINDROME\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page number: 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "marks = [0]*10\n", + "avg = 0\n", + "\n", + "# Function declaration, calculation and result\n", + "def readdata (marks) :\n", + "\tfor i in range (0, 10) :\n", + "\t\tmarks[i] = int(raw_input('Enter value in cell [%d] ' % i))\n", + "\t\t\n", + "def average (marks) :\n", + "\tmean = 0\n", + "\tfor i in range (0, 10) :\n", + "\t\tmean = mean + marks[i]\n", + "\treturn mean/10\n", + "\n", + "def printdata (marks, avg) :\n", + "\tfor i in range (0, 10) :\n", + "\t\tif marks[i] < avg :\n", + "\t\t\tprint ('Marks in cell [%d] are %d less than average' % (i, marks[i]))\n", + "\t\telse :\n", + "\t\t\tprint ('Marks in cell [%d] are %d above/equal to average' % (i, marks[i]))\t\n", + "\n", + "\n", + "readdata (marks)\n", + "avg = average (marks)\t\n", + "print ('The average marks are %f' % avg)\n", + "printdata (marks, avg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [0] 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [1] 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [2] 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [3] 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [4] 56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [5] 98\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [6] 53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [7] 82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [8] 74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell [9] 39\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average marks are 63.000000\n", + "Marks in cell [0] are 45 less than average\n", + "Marks in cell [1] are 78 above/equal to average\n", + "Marks in cell [2] are 65 above/equal to average\n", + "Marks in cell [3] are 43 less than average\n", + "Marks in cell [4] are 56 less than average\n", + "Marks in cell [5] are 98 above/equal to average\n", + "Marks in cell [6] are 53 less than average\n", + "Marks in cell [7] are 82 above/equal to average\n", + "Marks in cell [8] are 74 above/equal to average\n", + "Marks in cell [9] are 39 less than average\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page number: 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "a = [10, 20, 30, 40, 50]\n", + "\n", + "# Function declaration, calculation and result\n", + "def fun (x, y, z) :\n", + "\tx = x + 5\n", + "\ty = y + 10\n", + "\tz[4] = z[4] + 100\n", + "\n", + "\n", + "for i in range (0, 5) :\n", + "\tprint ('The cell [%d] contains %d' % (i, a[i]))\n", + "\tprint ('The address of cell [%d] is %x' % (i, id(a[i])))\n", + "\t\t\n", + "fun (a[0], a[3], a)\t\n", + "print\n", + "\n", + "for i in range (0, 5) :\n", + "\tprint ('The cell [%d] contains %d' % (i, a[i]))\n", + "\tprint ('The address of cell [%d] is %x' % (i, id(a[i])))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cell [0] contains 10\n", + "The address of cell [0] is 18bc0c0\n", + "The cell [1] contains 20\n", + "The address of cell [1] is 18bbfd0\n", + "The cell [2] contains 30\n", + "The address of cell [2] is 18bbee0\n", + "The cell [3] contains 40\n", + "The address of cell [3] is 18bc5b8\n", + "The cell [4] contains 50\n", + "The address of cell [4] is 18bc4c8\n", + "\n", + "The cell [0] contains 10\n", + "The address of cell [0] is 18bc0c0\n", + "The cell [1] contains 20\n", + "The address of cell [1] is 18bbfd0\n", + "The cell [2] contains 30\n", + "The address of cell [2] is 18bbee0\n", + "The cell [3] contains 40\n", + "The address of cell [3] is 18bc5b8\n", + "The cell [4] contains 150\n", + "The address of cell [4] is 18bcaf8\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6, Page number: 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "data = raw_input('Enter the string ')\n", + "\n", + "# Function declaration, calculation and result\n", + "def revstring (data) :\n", + "\trev_data = reversed (data)\n", + "\n", + "\tif list (data) == list (rev_data) :\n", + "\t\tprint ('The string %s is a PALINDROME' % data)\n", + "\telse :\n", + "\t\tprint ('The string %s is not a PALINDROME' % data)\n", + "\n", + "revstring (data)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the string python\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The string python is not a PALINDROME\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7, Page number: 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "a = [0]*10\n", + "\n", + "# Function declaration, calculation and result\n", + "def readnsort (a) :\n", + "\tpos = 0\n", + "\tfor len in range (0, 10) :\n", + "\t\tnum = int(raw_input('Enter data element no. %d ' % len))\n", + "\t\t\n", + "\t\tfor pos in range (0, len+1) :\n", + "\t\t\tif num < a[pos] :\n", + "\t\t\t\tbreak\n", + "\t\t\t\t\n", + "\t\ti = len\t\t\n", + "\t\twhile i>=pos :\n", + "\t\t\ta[i] = a[i-1]\n", + "\t\t\ti = i-1\n", + "\t\ta[pos] = num\n", + "\t\t\t\n", + "def printdata (a) :\n", + "\tfor i in range (0, 10) :\n", + "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\t\t\t\n", + "\t\t\t\n", + "readnsort (a)\n", + "print\n", + "printdata (a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 0 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 1 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 2 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 3 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 4 56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 5 98\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 6 53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 7 82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 8 74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data element no. 9 39\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The data in cell [0] is 39 \n", + "The data in cell [1] is 43 \n", + "The data in cell [2] is 45 \n", + "The data in cell [3] is 53 \n", + "The data in cell [4] is 56 \n", + "The data in cell [5] is 65 \n", + "The data in cell [6] is 74 \n", + "The data in cell [7] is 78 \n", + "The data in cell [8] is 82 \n", + "The data in cell [9] is 98 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page number: 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Function declaration, calculation and result\n", + "def readdata () :\n", + "\ta = []\n", + "\tfor i in range (0, 10) :\n", + "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", + "\treturn a\n", + "\n", + "def sortdata (a) :\n", + "\tfor p in range (0, 9) :\n", + "\t\tmin = p\n", + "\t\tfor i in range (p, 10) :\n", + "\t\t\tif a[min] > a[i] :\n", + "\t\t\t\tmin = i\n", + "\t\ttemp = a[p]\n", + "\t\ta[p] = a[min]\n", + "\t\ta[min] = temp\n", + "\treturn a\n", + "\n", + "def printdata (a) :\n", + "\tfor i in range (0, 10) :\n", + "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", + "\n", + "a = readdata ()\n", + "a = sortdata (a)\n", + "print ('\\nThe sorted data is ')\n", + "printdata (a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [0] 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [1] 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [2] 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [3] 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [4] 56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [5] 98\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [6] 53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [7] 82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [8] 74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [9] 39\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The sorted data is \n", + "The data in cell [0] is 39 \n", + "The data in cell [1] is 43 \n", + "The data in cell [2] is 45 \n", + "The data in cell [3] is 53 \n", + "The data in cell [4] is 56 \n", + "The data in cell [5] is 65 \n", + "The data in cell [6] is 74 \n", + "The data in cell [7] is 78 \n", + "The data in cell [8] is 82 \n", + "The data in cell [9] is 98 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9, Page number: 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Function declaration, calculation and result\n", + "def readdata () :\n", + "\ta = []\n", + "\tfor i in range (0, 10) :\n", + "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", + "\treturn a\n", + "\n", + "def bubble (a) :\n", + "\tfor p in range (0, 10) :\n", + "\t\tfor i in range (0, 9-p) :\n", + "\t\t\tif a[i] > a[i+1] :\n", + "\t\t\t\ttemp = a[i]\n", + "\t\t\t\ta[i] = a[i+1]\n", + "\t\t\t\ta[i+1] = temp\n", + "\treturn a\n", + "\n", + "def printdata (a) :\n", + "\tfor i in range (0, 10) :\n", + "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", + "\n", + "a = readdata ()\n", + "a = bubble (a)\n", + "print ('\\nThe sorted data is ')\n", + "printdata (a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [0] 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [1] 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [2] 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [3] 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [4] 56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [5] 98\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [6] 53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [7] 82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [8] 74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [9] 39\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The sorted data is \n", + "The data in cell [0] is 39 \n", + "The data in cell [1] is 43 \n", + "The data in cell [2] is 45 \n", + "The data in cell [3] is 53 \n", + "The data in cell [4] is 56 \n", + "The data in cell [5] is 65 \n", + "The data in cell [6] is 74 \n", + "The data in cell [7] is 78 \n", + "The data in cell [8] is 82 \n", + "The data in cell [9] is 98 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10, Page number: 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Function declaration, calculation and result\n", + "def readdata (size) :\n", + "\ta = []\n", + "\tfor i in range (0, size) :\n", + "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", + "\treturn a\n", + "\n", + "def bubble (a, size) :\n", + "\tfor p in range (0, size) :\n", + "\t\tfor i in range (0, size-p-1) :\n", + "\t\t\tif a[i] > a[i+1] :\n", + "\t\t\t\ttemp = a[i]\n", + "\t\t\t\ta[i] = a[i+1]\n", + "\t\t\t\ta[i+1] = temp\n", + "\treturn a\n", + "\n", + "def printdata (a, size) :\n", + "\tfor i in range (0, size) :\n", + "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", + "\n", + "def lsearch (a, key, size) :\n", + "\tfor i in range (0, size) :\n", + "\t\tif a[i] == key :\n", + "\t\t\treturn i\n", + "\t\tif i == size :\n", + "\t\t\treturn -1\n", + "\t\t\t\n", + "size = int(raw_input('Enter the total number of elements '))\n", + "a = readdata (size)\n", + "a = bubble (a, size)\n", + "print ('\\nThe sorted array is ')\n", + "printdata (a, size)\n", + "\n", + "find = int(raw_input('\\nEnter the element to be searched '))\n", + "pos = lsearch (a, find, size)\n", + "\n", + "if pos<0 :\n", + "\tprint ('\\nThe element %d NOT FOUND ' % find)\n", + "else :\n", + "\tprint ('\\nThe element %d found at position %d ' % (find, pos))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the total number of elements 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [0] 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [1] 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [2] 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [3] 34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [4] 49\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The sorted array is \n", + "The data in cell [0] is 34 \n", + "The data in cell [1] is 45 \n", + "The data in cell [2] is 49 \n", + "The data in cell [3] is 65 \n", + "The data in cell [4] is 78 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter the element to be searched 65\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The element 65 found at position 3 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11, Page number: 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Function declaration, calculation and result\n", + "def readdata (size) :\n", + "\ta = []\n", + "\tfor i in range (0, size) :\n", + "\t\ta.append(int(raw_input('Enter data in cell [%d] ' % i)))\n", + "\treturn a\n", + "\n", + "def bubble (a, size) :\n", + "\tfor p in range (0, size) :\n", + "\t\tfor i in range (0, size-p-1) :\n", + "\t\t\tif a[i] > a[i+1] :\n", + "\t\t\t\ttemp = a[i]\n", + "\t\t\t\ta[i] = a[i+1]\n", + "\t\t\t\ta[i+1] = temp\n", + "\treturn a\n", + "\n", + "def printdata (a, size) :\n", + "\tfor i in range (0, size) :\n", + "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", + "\n", + "def bsearch (a, key, size) :\n", + "\tfirst = 0\n", + "\tlast = size - 1\n", + "\tmid = (first + last)/2\n", + "\t\n", + "\twhile (first <= last and a[mid] != key) :\n", + "\t\tif a[mid] < key :\n", + "\t\t\tfirst = mid + 1\n", + "\t\telse :\n", + "\t\t\tif a[mid] > key :\n", + "\t\t\t\tlast = mid - 1\n", + "\t\tmid = (first + last)/2\n", + "\t\n", + "\tif a[mid] == key :\n", + "\t\treturn mid\n", + "\telse :\n", + "\t\treturn -1\n", + "\t\t\t\n", + "size = int(raw_input('Enter the number of elements in the array '))\n", + "a = readdata (size)\n", + "a = bubble (a, size)\n", + "print ('\\nThe sorted array is ')\n", + "printdata (a, size)\n", + "\n", + "find = int(raw_input('\\nPlease enter the element to be searched for '))\n", + "pos = bsearch (a, find, size)\n", + "\n", + "if pos<0 :\n", + "\tprint ('\\nThe element %d NOT FOUND ' % find)\n", + "else :\n", + "\tprint ('\\nThe element %d found at position %d ' % (find, pos))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of elements in the array 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [0] 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [1] 78\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [2] 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [3] 34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [4] 49\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The sorted array is \n", + "The data in cell [0] is 34 \n", + "The data in cell [1] is 45 \n", + "The data in cell [2] is 49 \n", + "The data in cell [3] is 65 \n", + "The data in cell [4] is 78 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Please enter the element to be searched for 45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The element 45 found at position 1 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12, Page number: 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Function declaration, calculation and result\n", + "def readncompute (no_of_students) :\n", + "\ta = [[0 for y in xrange(5)] for x in xrange(no_of_students)]\n", + "\tper = [0 for x in range(no_of_students)]\n", + "\tavg = 0\n", + "\t\n", + "\tfor i in range (0, no_of_students) :\n", + "\t\tprint ('\\nEnter marks of 5 subjects for Roll no. %d ' % (i+1))\n", + "\t\t\n", + "\t\tfor j in range (0, 5) :\n", + "\t\t\ta[i][j] = int(raw_input('Subject %d = ' % (j+1)))\n", + "\t\t\tper[i] = per[i] + a[i][j]\n", + "\t\t\t\n", + "\t\tper[i] = per[i]/5\n", + "\t\tavg = avg + per[i]\n", + "\t\t\n", + "\treturn a, avg/no_of_students, per\n", + "\n", + "def printdata (a, no_of_students, avg, per) :\n", + "\tfor i in range (0, no_of_students) :\n", + "\t\tprint ('\\nMarks for Roll no. %d are ' % (i+1))\n", + "\t\tfor j in range (0, 5) :\n", + "\t\t\tprint a[i][j]\n", + "\t\tprint ('Percentage for Roll no. %d is %f ' % ((i+1), per[i]))\n", + "\t\t\n", + "\t\tif per[i] < avg :\n", + "\t\t\tprint ('Below average')\n", + "\t\telse :\n", + "\t\t\tprint ('Above average')\n", + "\t\t\n", + "\n", + "no_of_students = int(raw_input('How many students marks do you want to enter '))\n", + "a, average, per = readncompute (no_of_students)\n", + "print ('\\nThe average marks are %f ' % average)\n", + "printdata (a, no_of_students, average, per)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students marks do you want to enter 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for Roll no. 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1 = 75\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2 = 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3 = 51\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4 = 68\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5 = 73\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for Roll no. 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1 = 49\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2 = 71\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3 = 62\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4 = 53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5 = 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for Roll no. 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1 = 90\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2 = 82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3 = 74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4 = 93\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5 = 89\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The average marks are 68.000000 \n", + "\n", + "Marks for Roll no. 1 are \n", + "75\n", + "43\n", + "51\n", + "68\n", + "73\n", + "Percentage for Roll no. 1 is 62.000000 \n", + "Below average\n", + "\n", + "Marks for Roll no. 2 are \n", + "49\n", + "71\n", + "62\n", + "53\n", + "50\n", + "Percentage for Roll no. 2 is 57.000000 \n", + "Below average\n", + "\n", + "Marks for Roll no. 3 are \n", + "90\n", + "82\n", + "74\n", + "93\n", + "89\n", + "Percentage for Roll no. 3 is 85.000000 \n", + "Above average\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13, Page number: 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def getchoice () :\n", + "\tprint\n", + "\tprint ('1 - Input two matrices ')\n", + "\tprint ('2 - Add and display sum ')\n", + "\tprint ('3 - Exit ')\n", + "\t\n", + "\tchoice = int(raw_input('Enter choice : '))\n", + "\treturn choice\n", + "\n", + "def read (matrix, rows, cols) :\t\n", + "\tfor i in range (0, rows) :\n", + "\t\tprint ('\\nEnter elements for row %d ' % (i+1))\t\t\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", + "\n", + "def add (sum, augend, addend, rows, cols) :\n", + "\tfor i in range (0, rows) :\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tsum[i][j] = augend[i][j] + addend[i][j]\n", + "\n", + "def display2matrices (augend, addend, rows, cols) :\n", + "\tprint ('\\nMatrix A ')\n", + "\tfor i in range (0, rows) :\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%3d ' % augend[i][j]),\n", + "\t\tprint\n", + "\tprint ('\\nMatrix B ')\n", + "\tfor i in range (0, rows) :\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%3d ' % addend[i][j]),\n", + "\t\tprint\n", + "\n", + "def display3matrices (sum, augend, addend, rows, cols) :\n", + "\tprint\n", + "\tfor i in range (0, rows) :\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%3d ' % augend[i][j]),\n", + "\t\tprint ('%s ' % ('+' if i==rows/2 else ' ')),\n", + "\t\t\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%2d ' % addend[i][j]),\n", + "\t\tprint ('%s ' % ('=' if i==rows/2 else ' ')),\n", + "\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%2d ' % sum[i][j]),\n", + "\t\tprint\n", + "\n", + "def display (matrix, rows, cols) :\n", + "\tfor i in range (0, rows) :\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%3d ' % matrix[i][j]),\n", + "\t\tprint\n", + "\n", + "augend = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "addend = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "sum = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "\n", + "condition = True\n", + "while condition :\n", + "\tchoice = getchoice ()\n", + "\t\n", + "\tif choice == 1 :\n", + "\t\trows = int(raw_input('\\nEnter the number of rows '))\t\t\n", + "\t\tcols = int(raw_input('Enter the number of columns '))\n", + "\t\t\n", + "\t\tprint ('\\n\\nEnter the first matrix ')\n", + "\t\tread (augend, rows, cols)\n", + "\t\tprint ('\\n\\nEnter the second matrix ')\n", + "\t\tread (addend, rows, cols)\n", + "\t\tprint ('\\n\\nYou entered ')\n", + "\t\tdisplay2matrices (augend, addend, rows, cols)\n", + "\t\n", + "\telif choice == 2 :\n", + "\t\tadd (sum, augend, addend, rows, cols)\n", + "\t\tdisplay3matrices (sum, augend, addend, rows, cols)\n", + "\t\n", + "\telif choice == 3 :\n", + "\t\tcondition = False\n", + "\t\texit ()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1 - Input two matrices \n", + "2 - Add and display sum \n", + "3 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter the number of rows 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of columns 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Enter the first matrix \n", + "\n", + "Enter elements for row 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][1] = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][2] = 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][3] = 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][1] = 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][2] = 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][3] = 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][1] = 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][2] = 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][3] = 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Enter the second matrix \n", + "\n", + "Enter elements for row 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][1] = 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][2] = 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][3] = 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][1] = 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][2] = 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][3] = 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][1] = 8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][2] = 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][3] = 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "You entered \n", + "\n", + "Matrix A \n", + " 1 2 3 \n", + " 3 4 5 \n", + " 5 6 7 \n", + "\n", + "Matrix B \n", + " 3 5 1 \n", + " 6 5 3 \n", + " 8 7 4 \n", + "\n", + "1 - Input two matrices \n", + "2 - Add and display sum \n", + "3 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " 1 2 3 3 5 1 4 7 4 \n", + " 3 4 5 + 6 5 3 = 9 9 8 \n", + " 5 6 7 8 7 4 13 13 11 \n", + "\n", + "1 - Input two matrices \n", + "2 - Add and display sum \n", + "3 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14, Page number: 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def readmatrix (matrix, rows, cols) :\t\n", + "\tfor i in range (0, rows) :\n", + "\t\tprint ('\\nPlease enter elements for row %d ' % (i+1))\t\t\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", + "\n", + "def multiply (prod, a, b, Ar, Ac, Bc) :\n", + "\tfor i in range (0, Ar) :\n", + "\t\tfor j in range (0, Bc) :\n", + "\t\t\tprod[i][j] = 0\n", + "\t\t\tfor k in range (0, Ac) :\n", + "\t\t\t\tprod[i][j] += a[i][k] * b[k][j]\n", + "\n", + "def display (matrix, rows, cols) :\n", + "\tfor i in range (0, rows) :\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tprint ('%3d ' % matrix[i][j]),\n", + "\t\tprint\n", + "\n", + "a = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "b = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "product = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "\n", + "condition = True\n", + "while condition :\n", + "\tArows, Acols = map(int, raw_input('Enter order of matrix A: ').split())\n", + "\tBrows, Bcols = map(int, raw_input('Enter order of matrix B: ').split())\n", + "\n", + "\tif Acols == Brows :\n", + "\t\tcondition = False\n", + "\t\tbreak\n", + "\telse : \n", + "\t\tprint ('\\nMatrices are not compatible for multiplication. Enter the order again. ')\n", + "\t\tcontinue\n", + "\t\n", + "print ('\\nEnter matrix A: ')\n", + "readmatrix (a, Arows, Acols)\n", + "\t\n", + "print ('\\nEnter matrix B: ')\n", + "readmatrix (b, Brows, Bcols)\n", + "\n", + "multiply (product, a, b, Arows, Acols, Bcols)\n", + "print ('\\nThe resultant product (A.B) is: ')\n", + "display (product, Arows, Bcols)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter order of matrix A: 2 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter order of matrix B: 3 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter matrix A: \n", + "\n", + "Please enter elements for row 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][1] = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][2] = 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][3] = 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Please enter elements for row 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][1] = 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][2] = 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][3] = 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter matrix B: \n", + "\n", + "Please enter elements for row 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][1] = 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][2] = 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Please enter elements for row 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][1] = 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][2] = 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Please enter elements for row 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][1] = 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][2] = 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The resultant product (A.B) is: \n", + " 20 14 \n", + " 56 41 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15, Page number: 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def getchoice () :\n", + "\tprint\n", + "\tprint ('1 - Input square matrix ')\n", + "\tprint ('2 - Display upper triangular matrix ')\n", + "\tprint ('3 - Display lower triangular matrix ')\n", + "\tprint ('4 - Exit ')\n", + "\t\n", + "\tcondition = True\n", + "\twhile condition :\n", + "\t\tchoice = int(raw_input('Enter choice : '))\n", + "\t\t\n", + "\t\tif choice in range (1, 5) :\n", + "\t\t\tcondition = False\n", + "\t\t\t\n", + "\treturn choice\n", + "\n", + "def displayupper (matrix, order) :\n", + "\tprint\n", + "\tfor i in range (0, order) :\n", + "\t\tfor j in range (0, order) :\n", + "\t\t\tif j >= i :\n", + "\t\t\t\tprint ('%3d ' % matrix[i][j]),\n", + "\t\t\telse :\n", + "\t\t\t\tprint ('%3d ' % 0),\n", + "\t\tprint\n", + "\t\t\n", + "def displaylower (matrix, order) :\n", + "\tprint\n", + "\tfor i in range (0, order) :\n", + "\t\tfor j in range (0, order) :\n", + "\t\t\tif j <= i :\n", + "\t\t\t\tprint ('%3d ' % matrix[i][j]),\n", + "\t\t\telse :\n", + "\t\t\t\tprint ('%3d ' % 0),\n", + "\t\tprint\n", + "\n", + "def read (matrix, rows, cols) :\t\n", + "\tfor i in range (0, rows) :\n", + "\t\tprint ('\\nEnter %d elements for row %d ' % (rows, (i+1)))\t\t\n", + "\t\tfor j in range (0, cols) :\n", + "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", + "\n", + "matrix = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "\n", + "condition = True\n", + "while condition :\n", + "\tchoice = getchoice ()\n", + "\t\n", + "\tif choice == 1 :\n", + "\t\torder = int(raw_input('\\nEnter order of square matrix '))\t\t\n", + "\t\tread (matrix, order, order)\n", + "\t\n", + "\telif choice == 2 :\n", + "\t\tdisplayupper (matrix, order)\n", + "\t\n", + "\telif choice == 3 :\n", + "\t\tdisplaylower (matrix, order)\n", + "\t\t\n", + "\telif choice == 4 :\n", + "\t\tcondition = False\n", + "\t\texit ()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1 - Input square matrix \n", + "2 - Display upper triangular matrix \n", + "3 - Display lower triangular matrix \n", + "4 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter order of square matrix 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter 3 elements for row 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][1] = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][2] = 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][3] = 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter 3 elements for row 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][1] = 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][2] = 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][3] = 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter 3 elements for row 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][1] = 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][2] = 8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][3] = 9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "1 - Input square matrix \n", + "2 - Display upper triangular matrix \n", + "3 - Display lower triangular matrix \n", + "4 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " 1 2 3 \n", + " 0 5 6 \n", + " 0 0 9 \n", + "\n", + "1 - Input square matrix \n", + "2 - Display upper triangular matrix \n", + "3 - Display lower triangular matrix \n", + "4 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " 1 0 0 \n", + " 4 5 0 \n", + " 7 8 9 \n", + "\n", + "1 - Input square matrix \n", + "2 - Display upper triangular matrix \n", + "3 - Display lower triangular matrix \n", + "4 - Exit \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter choice : 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.16, Page number: 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def readmatrix (matrix, n) :\n", + "\tfor i in range (0, n) :\n", + "\t\tprint ('\\nEnter elements for row no %d ' % (i+1))\n", + "\t\tfor j in range (0, n) :\n", + "\t\t\tmatrix[i][j] = int(raw_input('matrix[%d][%d] = ' % ((i+1),(j+1))))\n", + "\n", + "def display (matrix, n) :\n", + "\tprint\n", + "\tfor i in range (0, n) :\n", + "\t\tfor j in range (0, n) :\n", + "\t\t\tprint ('%5d ' % matrix[i][j]),\n", + "\t\tprint\n", + "\t\t\n", + "def isunitmatrix(matrix, n) :\n", + "\tfor i in range (0, n) :\n", + "\t\tif matrix[i][i] != 1 :\n", + "\t\t\treturn 0\n", + "\t\n", + "\tfor i in range (0, n) :\n", + "\t\tfor j in range (0, n) :\n", + "\t\t\tif i != j :\n", + "\t\t\t\tif matrix[i][j] != 0 :\n", + "\t\t\t\t\treturn 0\n", + "\treturn 1\n", + "\n", + "matrix = [[0 for y in xrange(10)] for x in xrange(10)]\n", + "n = int(raw_input('Enter order of matrix '))\n", + "readmatrix (matrix, n)\n", + "display (matrix, n)\n", + "\n", + "if (isunitmatrix (matrix, n)) :\n", + "\tprint \"UNIT MATRIX\"\n", + "else :\n", + "\tprint \"NOT A UNIT MATRIX\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter order of matrix 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row no 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][1] = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][2] = 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[1][3] = 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row no 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][1] = 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][2] = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[2][3] = 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter elements for row no 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][1] = 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][2] = 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "matrix[3][3] = 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " 1 0 0 \n", + " 0 1 0 \n", + " 0 0 1 \n", + "UNIT MATRIX\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17, Page number: 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "string = raw_input('Enter a string: ')\n", + "\n", + "# Calculation and result\n", + "swap_string = string.swapcase()\n", + "\n", + "print swap_string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: hello world\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HELLO WORLD\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18, Page number: 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "string = raw_input('Enter a string ')\n", + "\n", + "# Function declaration, calculation and result\n", + "def printstr (string) :\n", + "\tfor i in range (0, len(string)) :\n", + "\t\tfor j in range (0, i+1) :\n", + "\t\t\tprint string[j],\n", + "\t\tprint\n", + "\t\n", + "\ti = i - 2\n", + "\twhile i >= 0 :\n", + "\t\tfor j in range (0, i+1) :\n", + "\t\t\tprint string[j],\n", + "\t\tprint\n", + "\t\ti = i - 1\n", + "\t\t\n", + "printstr (string)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string hello\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h\n", + "h e\n", + "h e l\n", + "h e l l\n", + "h e l l o\n", + "h e l\n", + "h e\n", + "h\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19, Page number: 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = raw_input('Enter any string ')\n", + "\n", + "# Function declaration, calculation and result\n", + "def copy (a) :\n", + "\tb = a\n", + "\treturn b\n", + "\t\n", + "b = copy (a)\n", + "print\n", + "print ('The first string is %s ' % a)\n", + "print ('The second string is %s ' % b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any string hello\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The first string is hello \n", + "The second string is hello \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.20, Page number: 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "a = raw_input('Enter the major string: ')\n", + "b = raw_input('Enter the minor string: ')\n", + "\n", + "# Function declaration, calculation and result\n", + "def ispart (a, b) :\n", + "\tif b in a :\n", + "\t\tprint ('The string \"%s\" is A SUBSTRING of \"%s\" ' % (b, a))\n", + "\telse :\n", + "\t\tprint ('The string \"%s\" is NOT A SUBSTRING of \"%s\" ' % (b, a))\n", + "\n", + "ispart (a, b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the major string: python is a programming language\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the minor string: python\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The string \"python\" is A SUBSTRING of \"python is a programming language\" \n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb new file mode 100755 index 00000000..acb61edf --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb @@ -0,0 +1,1093 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: More on Pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page number: 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "a = [[1,2,3,4,5],\n", + " [6,7,8,9,10],\n", + " [11,12,13,14,15],\n", + " [16,17,18,19,20],\n", + " [21,22,23,24,25]]\n", + "\n", + "# Calculation and result\n", + "print ('The value of a is %x ' % id(a))\n", + "\n", + "for i in range (0, 5) :\n", + "\tprint ('The value of a[%d] is %x ' % (i, id(i)))\n", + "\n", + "for i in range (0, 5) :\n", + "\tfor j in range (0, 5) : \n", + "\t\tprint ('The cell [%d][%d] i.e. %x has %d ' % (i, j, id(a[i][j]), a[i][j]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is 7f55dc3e08c0 \n", + "The value of a[0] is 18861b0 \n", + "The value of a[1] is 1886198 \n", + "The value of a[2] is 1886180 \n", + "The value of a[3] is 1886168 \n", + "The value of a[4] is 1886150 \n", + "The cell [0][0] i.e. 1886198 has 1 \n", + "The cell [0][1] i.e. 1886180 has 2 \n", + "The cell [0][2] i.e. 1886168 has 3 \n", + "The cell [0][3] i.e. 1886150 has 4 \n", + "The cell [0][4] i.e. 1886138 has 5 \n", + "The cell [1][0] i.e. 1886120 has 6 \n", + "The cell [1][1] i.e. 1886108 has 7 \n", + "The cell [1][2] i.e. 18860f0 has 8 \n", + "The cell [1][3] i.e. 18860d8 has 9 \n", + "The cell [1][4] i.e. 18860c0 has 10 \n", + "The cell [2][0] i.e. 18860a8 has 11 \n", + "The cell [2][1] i.e. 1886090 has 12 \n", + "The cell [2][2] i.e. 1886078 has 13 \n", + "The cell [2][3] i.e. 1886060 has 14 \n", + "The cell [2][4] i.e. 1886048 has 15 \n", + "The cell [3][0] i.e. 1886030 has 16 \n", + "The cell [3][1] i.e. 1886018 has 17 \n", + "The cell [3][2] i.e. 1886000 has 18 \n", + "The cell [3][3] i.e. 1885fe8 has 19 \n", + "The cell [3][4] i.e. 1885fd0 has 20 \n", + "The cell [4][0] i.e. 1885fb8 has 21 \n", + "The cell [4][1] i.e. 1885fa0 has 22 \n", + "The cell [4][2] i.e. 1885f88 has 23 \n", + "The cell [4][3] i.e. 1885f70 has 24 \n", + "The cell [4][4] i.e. 1885f58 has 25 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page number: 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from array import *\n", + "\n", + "# Variable declaration\n", + "a = [[[1,2,3,4,5], [6,7,8,9,10], [11,12,13,14,15], [16,17,18,19,20]],\n", + " [[21,22,23,24,25], [26,27,28,29,30], [31,32,33,34,35], [36,37,38,39,40]]]\n", + "\n", + "# Calculation and result\n", + "print ('The value of a is %x ' % id(a))\n", + "\n", + "for i in range (0, 2) :\n", + "\tprint ('The value of a[%d] is %x ' % (i, id(a[i])))\n", + "\tfor j in range (0, 4) :\n", + "\t\tprint ('The value of a[%d][%d] is %x ' % (i, j, id(a[i][j])))\n", + "\tprint\n", + "\n", + "for i in range (0, 2) :\n", + "\tfor j in range (0, 4) : \n", + "\t\tfor k in range (0, 5) :\n", + "\t\t\tprint ('The cell [%d][%d][%d] i.e. %x has %d ' % (i, j, k, id(a[i][j][k]), a[i][j][k]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is 7f55de4772d8 \n", + "The value of a[0] is 7f55de486b90 \n", + "The value of a[0][0] is 7f55de4db368 \n", + "The value of a[0][1] is 7f55de48f050 \n", + "The value of a[0][2] is 7f55de4db3f8 \n", + "The value of a[0][3] is 7f55de4c7908 \n", + "\n", + "The value of a[1] is 7f55de477320 \n", + "The value of a[1][0] is 7f55de4ff3f8 \n", + "The value of a[1][1] is 7f55de477290 \n", + "The value of a[1][2] is 7f55de4773b0 \n", + "The value of a[1][3] is 7f55de477368 \n", + "\n", + "The cell [0][0][0] i.e. 1886198 has 1 \n", + "The cell [0][0][1] i.e. 1886180 has 2 \n", + "The cell [0][0][2] i.e. 1886168 has 3 \n", + "The cell [0][0][3] i.e. 1886150 has 4 \n", + "The cell [0][0][4] i.e. 1886138 has 5 \n", + "The cell [0][1][0] i.e. 1886120 has 6 \n", + "The cell [0][1][1] i.e. 1886108 has 7 \n", + "The cell [0][1][2] i.e. 18860f0 has 8 \n", + "The cell [0][1][3] i.e. 18860d8 has 9 \n", + "The cell [0][1][4] i.e. 18860c0 has 10 \n", + "The cell [0][2][0] i.e. 18860a8 has 11 \n", + "The cell [0][2][1] i.e. 1886090 has 12 \n", + "The cell [0][2][2] i.e. 1886078 has 13 \n", + "The cell [0][2][3] i.e. 1886060 has 14 \n", + "The cell [0][2][4] i.e. 1886048 has 15 \n", + "The cell [0][3][0] i.e. 1886030 has 16 \n", + "The cell [0][3][1] i.e. 1886018 has 17 \n", + "The cell [0][3][2] i.e. 1886000 has 18 \n", + "The cell [0][3][3] i.e. 1885fe8 has 19 \n", + "The cell [0][3][4] i.e. 1885fd0 has 20 \n", + "The cell [1][0][0] i.e. 1885fb8 has 21 \n", + "The cell [1][0][1] i.e. 1885fa0 has 22 \n", + "The cell [1][0][2] i.e. 1885f88 has 23 \n", + "The cell [1][0][3] i.e. 1885f70 has 24 \n", + "The cell [1][0][4] i.e. 1885f58 has 25 \n", + "The cell [1][1][0] i.e. 1885f40 has 26 \n", + "The cell [1][1][1] i.e. 1885f28 has 27 \n", + "The cell [1][1][2] i.e. 1885f10 has 28 \n", + "The cell [1][1][3] i.e. 1885ef8 has 29 \n", + "The cell [1][1][4] i.e. 1885ee0 has 30 \n", + "The cell [1][2][0] i.e. 1885ec8 has 31 \n", + "The cell [1][2][1] i.e. 1885eb0 has 32 \n", + "The cell [1][2][2] i.e. 1885e98 has 33 \n", + "The cell [1][2][3] i.e. 1885e80 has 34 \n", + "The cell [1][2][4] i.e. 1885e68 has 35 \n", + "The cell [1][3][0] i.e. 1886618 has 36 \n", + "The cell [1][3][1] i.e. 1886600 has 37 \n", + "The cell [1][3][2] i.e. 18865e8 has 38 \n", + "The cell [1][3][3] i.e. 18865d0 has 39 \n", + "The cell [1][3][4] i.e. 18865b8 has 40 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page number: 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def readdata (a, num) :\n", + "\twhile num > 0 :\n", + "\t\ta[num-1] = int(raw_input('Enter value in cell[%d] ' % num))\n", + "\t\tnum = num - 1\n", + "\t\t\n", + "def printdata (a, num) :\n", + "\twhile num > 0 :\n", + "\t\tprint ('Value in cell[%d] is %d ' % (num, a[num-1]))\n", + "\t\tnum = num - 1\n", + "\n", + "n = int(raw_input('Enter the number of elements '))\n", + "a = [0 for i in xrange(n)]\n", + "readdata (a, n)\n", + "print\n", + "printdata (a, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of elements 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[3] 30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[2] 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[1] 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Value in cell[3] is 30 \n", + "Value in cell[2] is 20 \n", + "Value in cell[1] is 10 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page number: 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def readdata (a, n) :\n", + "\twhile n > 0 :\n", + "\t\ta[n-1] = int(raw_input('Enter value in cell[%d] ' % n))\n", + "\t\tn = n - 1\n", + "\t\t\n", + "def printdata (a, n) :\n", + "\twhile n > 0 :\n", + "\t\tprint ('Value in cell[%d] is %d ' % (n, a[n-1]))\n", + "\t\tn = n - 1\n", + "\n", + "n = int(raw_input('Enter the number of elements '))\n", + "a = [0 for i in xrange(n)]\n", + "readdata (a, n)\n", + "print\n", + "printdata (a, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of elements 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[5] 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[4] 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[3] 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[2] 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[1] 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Value in cell[5] is 1 \n", + "Value in cell[4] is 2 \n", + "Value in cell[3] is 3 \n", + "Value in cell[2] is 4 \n", + "Value in cell[1] is 5 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5, Page number: 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "global n\n", + "n = 0\n", + "\n", + "def makearray (n) :\n", + "\tn = int(raw_input('Enter the number of elements '))\t\n", + "\treturn n\n", + "\t\n", + "def readdata (a, n) :\n", + "\twhile n > 0 :\n", + "\t\ta[n-1] = int(raw_input('Enter value in cell[%d] ' % n))\n", + "\t\tn = n - 1\n", + "\t\t\n", + "def printdata (a, n) :\n", + "\twhile n > 0 :\n", + "\t\tprint ('Value in cell[%d] is %d ' % (n, a[n-1]))\n", + "\t\tn = n - 1\n", + "\t\t\n", + "n = makearray (n)\n", + "a = [0 for i in xrange(n)]\n", + "readdata (a, n)\n", + "print\n", + "printdata (a, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of elements 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[4] 400\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[3] 300\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[2] 200\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value in cell[1] 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Value in cell[4] is 400 \n", + "Value in cell[3] is 300 \n", + "Value in cell[2] is 200 \n", + "Value in cell[1] is 100 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6, Page number: 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration, calculation and result\n", + "string = raw_input('Enter the string: ')\n", + "\n", + "rev_string = reversed(string)\n", + "\n", + "if list(string) == list(rev_string) :\n", + "\tprint ('%s is a PALINDROME ' % string)\n", + "else :\n", + "\tprint ('%s is not a PALINDROME ' % string)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the string: malayalam\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "malayalam is a PALINDROME \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7, Page number: 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def readdata (a, n) :\n", + "\tfor i in range (0, n) :\n", + "\t\ta[i] = int(raw_input('Enter data in cell [%d] ' % i))\n", + "\treturn a\n", + "\n", + "def bubble (a, n) :\n", + "\tfor p in range (0, n) :\n", + "\t\tfor i in range (0, n-1-p) :\n", + "\t\t\tif a[i] > a[i+1] :\n", + "\t\t\t\ttemp = a[i]\n", + "\t\t\t\ta[i] = a[i+1]\n", + "\t\t\t\ta[i+1] = temp\n", + "\treturn a\n", + "\n", + "def printdata (a, n) :\n", + "\tfor i in range (0, n) :\n", + "\t\tprint ('The data in cell [%d] is %d ' % (i, a[i]))\n", + "\n", + "n = int(raw_input('Enter the number of elements to be entered: '))\n", + "a = [0] * n\n", + "a = readdata (a, n)\n", + "a = bubble (a, n)\n", + "print ('\\nThe sorted data is ')\n", + "printdata (a, n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of elements to be entered: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [0] 46\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [1] 75\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [2] 68\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [3] 34\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data in cell [4] 49\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The sorted data is \n", + "The data in cell [0] is 34 \n", + "The data in cell [1] is 46 \n", + "The data in cell [2] is 49 \n", + "The data in cell [3] is 68 \n", + "The data in cell [4] is 75 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page number: 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration, calculation and result\n", + "i = 6\n", + "c = 'a'\n", + "\n", + "the_data = i\n", + "print ('the_data points to the integer value %d ' % the_data)\n", + "\n", + "the_data = c\n", + "print ('the_data points to the character value %c ' % the_data)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the_data points to the integer value 6 \n", + "the_data points to the character value a \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9, Page number: 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "marks = [[0 for x in xrange(5)] for x in xrange(5)]\n", + "avg = 0\n", + "percent = [0 for x in xrange(5)]\n", + "\n", + "# Function declaration, calculation and result\n", + "def readncompute (marks, percent, avg) :\n", + "\tno_of_students = int(raw_input('How many students marks do you want to enter? '))\n", + "\tfor i in range (0, no_of_students) :\n", + "\t\tprint ('\\nEnter marks of 5 subjects for roll no. %d ' % (i+1))\n", + "\t\tfor j in range (0, 5) :\n", + "\t\t\tmarks[i][j] = int(raw_input('Subject %d: ' % (j+1)))\n", + "\t\t\tpercent[i] = percent[i] + marks[i][j]\n", + "\t\t\n", + "\t\tpercent[i] = percent[i]/5\n", + "\t\tavg = avg + percent[i]\n", + "\treturn avg/no_of_students, no_of_students\n", + "\n", + "def printdata (score, per, avg, no_of_students) :\n", + "\tfor i in range (0, no_of_students) :\n", + "\t\tprint ('\\nMarks for roll no. %d are ' % (i+1))\n", + "\t\tfor j in range (0, 5) :\n", + "\t\t\tprint ('%d ' % score[i][j])\n", + "\t\tprint ('Percentage for roll no. is %.2f ' % per[i])\n", + "\t\tif per[i] < avg :\n", + "\t\t\tprint ('Below average')\n", + "\t\telse :\n", + "\t\t\tprint ('Above average')\n", + "\n", + "average, nos = readncompute(marks, percent, avg)\n", + "print ('\\nThe average marks are %.2f' % average)\n", + "printdata (marks, percent, average, nos)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students marks do you want to enter? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for roll no. 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1: 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2: 76\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3: 54\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4: 83\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5: 94\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for roll no. 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1: 84\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2: 62\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3: 94\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4: 73\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5: 62\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The average marks are 74.00\n", + "\n", + "Marks for roll no. 1 are \n", + "65 \n", + "76 \n", + "54 \n", + "83 \n", + "94 \n", + "Percentage for roll no. is 74.00 \n", + "Above average\n", + "\n", + "Marks for roll no. 2 are \n", + "84 \n", + "62 \n", + "94 \n", + "73 \n", + "62 \n", + "Percentage for roll no. is 75.00 \n", + "Above average\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10, Page number: 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variable declaration\n", + "marks = [[0 for x in xrange(5)] for x in xrange(5)]\n", + "avg = 0\n", + "percent = [0 for x in xrange(5)]\n", + "\n", + "# Function declaration, calculation and result\n", + "def readncompute (marks, percent, avg) :\n", + "\tno_of_students = int(raw_input('How many students marks do you want to enter? '))\n", + "\tfor i in range (0, no_of_students) :\n", + "\t\tprint ('\\nEnter marks of 5 subjects for roll no. %d ' % (i+1))\n", + "\t\tfor j in range (0, 5) :\n", + "\t\t\tmarks[i][j] = int(raw_input('Subject %d: ' % (j+1)))\n", + "\t\t\tpercent[i] = percent[i] + marks[i][j]\n", + "\t\t\n", + "\t\tpercent[i] = percent[i]/5\n", + "\t\tavg = avg + percent[i]\n", + "\treturn avg/no_of_students, no_of_students\n", + "\n", + "def printdata (score, per, avg, no_of_students) :\n", + "\tfor i in range (0, no_of_students) :\n", + "\t\tprint ('\\nMarks for roll no. %d are ' % (i+1))\n", + "\t\tfor j in range (0, 5) :\n", + "\t\t\tprint ('%d ' % score[i][j])\n", + "\t\tprint ('Percentage for roll no. is %.2f ' % per[i])\n", + "\t\tif per[i] < avg :\n", + "\t\t\tprint ('Below average')\n", + "\t\telse :\n", + "\t\t\tprint ('Above average')\n", + "\n", + "average, nos = readncompute(marks, percent, avg)\n", + "print ('\\nThe average marks are %.2f' % average)\n", + "printdata (marks, percent, average, nos)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students marks do you want to enter? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for roll no. 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1: 65\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2: 76\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3: 54\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4: 32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5: 89\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter marks of 5 subjects for roll no. 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 1: 76\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 2: 86\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 3: 43\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 4: 32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subject 5: 21\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The average marks are 57.00\n", + "\n", + "Marks for roll no. 1 are \n", + "65 \n", + "76 \n", + "54 \n", + "32 \n", + "89 \n", + "Percentage for roll no. is 63.00 \n", + "Above average\n", + "\n", + "Marks for roll no. 2 are \n", + "76 \n", + "86 \n", + "43 \n", + "32 \n", + "21 \n", + "Percentage for roll no. is 51.00 \n", + "Below average\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11, Page number: 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Function declaration, calculation and result\n", + "def readdata (a, n) :\n", + "\tfor i in range (0, n) :\n", + "\t\ta[i] = int(raw_input('Enter data in cell [%d] ' % i))\n", + "\treturn a\n", + "\n", + "def bubble (name) :\n", + "\tfor p in range (0, 4) :\n", + "\t\tfor i in range (0, 3-p) :\n", + "\t\t\tif name[i] > name[i+1] :\n", + "\t\t\t\ttemp = name[i]\n", + "\t\t\t\tname[i] = name[i+1]\n", + "\t\t\t\tname[i+1] = temp\n", + "\treturn name\n", + "\n", + "def printdata (name) :\n", + "\tfor i in range (0, 4) :\n", + "\t\tprint ('The data in cell [%d] is %s ' % ((i+1), name[i]))\n", + "\n", + "name = [0] * 4\n", + "for i in range (0, 4) :\n", + "\tname[i] = raw_input('Enter string[%d] ' % (i+1))\n", + "\n", + "name = bubble (name)\n", + "print ('\\nThe sorted data is ')\n", + "printdata (name)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string[1] zaheer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string[2] ashita\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string[3] tamanna\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string[4] purti\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The sorted data is \n", + "The data in cell [1] is ashita \n", + "The data in cell [2] is purti \n", + "The data in cell [3] is tamanna \n", + "The data in cell [4] is zaheer \n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/README.txt b/Magnifying_C_by_Arpita_Goyal/README.txt new file mode 100755 index 00000000..2ec7deb7 --- /dev/null +++ b/Magnifying_C_by_Arpita_Goyal/README.txt @@ -0,0 +1,10 @@ +Contributed By: Mahesh M +Course: btech +College/Institute/Organization: MSIT +Department/Designation: CSE +Book Title: Magnifying C +Author: Arpita Gopal +Publisher: Prentice Hall India Learning Private Limited, New Delhi +Year of publication: 2009 +Isbn: 9788120338616 +Edition: 1 \ No newline at end of file diff --git a/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_10.png b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_10.png new file mode 100755 index 00000000..26daa2e1 Binary files /dev/null and b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_10.png differ diff --git a/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_2.png b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_2.png new file mode 100755 index 00000000..c7b049ba Binary files /dev/null and b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_2.png differ diff --git a/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_6.png b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_6.png new file mode 100755 index 00000000..585a8ed4 Binary files /dev/null and b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_6.png differ diff --git a/Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png new file mode 100755 index 00000000..c9ed06ce Binary files /dev/null and b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png differ diff --git a/Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png new file mode 100755 index 00000000..5fc014e9 Binary files /dev/null and b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png differ diff --git a/Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png new file mode 100755 index 00000000..bd465ad3 Binary files /dev/null and b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png differ diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png old mode 100644 new mode 100755 diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png old mode 100644 new mode 100755 diff --git a/Oscillations_and_Waves_by_S._Prakash/README.txt b/Oscillations_and_Waves_by_S._Prakash/README.txt old mode 100644 new mode 100755 diff --git a/Power_Electronics/README.txt b/Power_Electronics/README.txt deleted file mode 100755 index 95f5f179..00000000 --- a/Power_Electronics/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -Contributed By: Anay Sonawane -Course: btech -College/Institute/Organization: Wavelet group -Department/Designation: E&tc -Book Title: Power Electronics -Author: Dr. B R Gupta, V Singhal -Publisher: S.K.Kataria and sons, New Delhi -Year of publication: 2010 -Isbn: 81-85749-53-1 -Edition: 6 \ No newline at end of file diff --git a/Power_Electronics/chapter10.ipynb b/Power_Electronics/chapter10.ipynb deleted file mode 100755 index cbc3cb90..00000000 --- a/Power_Electronics/chapter10.ipynb +++ /dev/null @@ -1,228 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 : Cycloconverters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2, Page No 594" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "R=10.0\n", - "a=30.0\n", - "\n", - "#Calculations\n", - "V_or=(V_m/math.sqrt(2))*math.sqrt((1/math.pi)*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2))\n", - "I_or=V_or/R \n", - "I_s=I_or\n", - "pf=(I_or**2*R)/(V_s*I_s) \n", - "\n", - "\n", - "#Results\n", - "print(\"rms value of o/p current=%.2f A\" %I_or)\n", - "print(\"rms value of o/p current for each convertor=%.2f A\" %(I_or/math.sqrt(2)))\n", - "print(\"rms value of o/p current for each thyristor=%.3f A\" %(I_or/2))\n", - "print(\"i/p pf=%.4f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of o/p current=22.67 A\n", - "rms value of o/p current for each convertor=16.03 A\n", - "rms value of o/p current for each thyristor=11.333 A\n", - "i/p pf=0.9855\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.4, Page No 604" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0\n", - "V_ph=V_s/2\n", - "a=160.0\n", - "\n", - "#Calculations\n", - "r=math.cos(math.radians(180-a))\n", - "m=3\n", - "V_or=r*(V_ph*(m/math.pi)*math.sin(math.pi/m)) \n", - "R=2\n", - "X_L=1.5\n", - "th=math.degrees(math.atan(X_L/R))\n", - "Z=math.sqrt(R**2+X_L**2)\n", - "I_or=V_or/Z \n", - "P=I_or**2*R \n", - "\n", - "#Results\n", - "print(\"rms o/p voltage=%.3f V\" %V_or)\n", - "print(\"rms o/p current=%.2f A\" %I_or)\n", - "print(\"phase angle of o/p current=%.2f deg\" %-th)\n", - "print(\"o/p power=%.2f W\" %P)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms o/p voltage=155.424 V\n", - "rms o/p current=62.17 A\n", - "phase angle of o/p current=-36.87 deg\n", - "o/p power=7730.11 W\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5 Page No 604" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0\n", - "V_ph=V_s/2\n", - "V_l=V_ph*math.sqrt(3)\n", - "a=160.0\n", - "\n", - "#Calculations\n", - "r=math.cos(math.radians(180-a))\n", - "m=6\n", - "V_or=r*(V_l*(m/math.pi)*math.sin(math.pi/m)) \n", - "R=2\n", - "X_L=1.5\n", - "th=math.degrees(math.atan(X_L/R))\n", - "Z=math.sqrt(R**2+X_L**2)\n", - "I_or=V_or/Z \n", - "P=I_or**2*R \n", - "\n", - "#Results\n", - "print(\"rms o/p voltage=%.2f V\" %V_or)\n", - "print(\"rms o/p current=%.2f A\" %I_or)\n", - "print(\"phase angle of o/p current=%.2f deg\" %-th)\n", - "print(\"o/p power=%.2f W\" %P)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms o/p voltage=310.85 V\n", - "rms o/p current=124.34 A\n", - "phase angle of o/p current=-36.87 deg\n", - "o/p power=30920.44 W\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.7, Page No 605" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_l=400.0\n", - "V_ml=math.sqrt(2)*V_l\n", - "m=6\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "L=.0012\n", - "I=40.0\n", - "\n", - "#Calculations\n", - "V_or1=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n", - "V_omx1=V_or1-3*w*L*I/math.pi\n", - "V_rms1=V_omx1/math.sqrt(2) \n", - "a2=30.0\n", - "V_or2=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n", - "V_omx2=V_or2-3*w*L*I/math.pi\n", - "V_rms2=V_omx2/math.sqrt(2) \n", - "\n", - "\n", - "#Results\n", - "print(\"for firing angle=0deg\")\n", - "a1=0\n", - "print(\"rms value of load voltage=%.2f V\" %V_rms2)\n", - "print(\"for firing angle=30deg\")\n", - "print(\"rms value of load voltage=%.2f V\" %V_rms2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle=0deg\n", - "rms value of load voltage=-369.12 V\n", - "for firing angle=30deg\n", - "rms value of load voltage=-369.12 V\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter11.ipynb b/Power_Electronics/chapter11.ipynb deleted file mode 100755 index d2317d28..00000000 --- a/Power_Electronics/chapter11.ipynb +++ /dev/null @@ -1,299 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 : Some Applications" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1, Page No 622" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=11000.0\n", - "V_ml=math.sqrt(2)*V_s\n", - "f=50.0\n", - "\n", - "#Calculations\n", - "w=2*math.pi*f\n", - "I_d=300\n", - "R_d=1\n", - "g=20 #g=gamma\n", - "a=math.degrees(math.acos(math.cos(math.radians(g))+math.pi/(3*V_ml)*I_d*R_d)) \n", - "L_s=.01\n", - "V_d=(3/math.pi)*((V_ml*math.cos(math.radians(a)))-w*L_s*I_d) \n", - "\n", - "#Results\n", - "print(\"firing angle=%.3f deg\" %a)\n", - "print(\"rectifier o/p voltage=%.1f V\" %V_d)\n", - "print(\"dc link voltage=%.3f V\" %(2*V_d/1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle=16.283 deg\n", - "rectifier o/p voltage=13359.3 V\n", - "dc link voltage=26.719 V\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2, Page No 623" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_d=(200.0+200)*10**3\n", - "P=1000.0*10**6\n", - "\n", - "#Calculations\n", - "I_d=P/V_d\n", - " #each thristor conducts for 120deg for a periodicity of 360deg\n", - "a=0\n", - "V_d=200.0*10**3\n", - "V_ml=V_d*math.pi/(3*math.cos(math.radians(a)))\n", - "\n", - "#Results\n", - "print(\"rms current rating of thyristor=%.2f A\" %(I_d*math.sqrt(120/360)))\n", - "print(\"peak reverse voltage across each thyristor=%.2f kV\" %(V_ml/2/1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms current rating of thyristor=0.00 A\n", - "peak reverse voltage across each thyristor=104.72 kV\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3 Page No 627" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_m=230.0\n", - "V_s=230/math.sqrt(2)\n", - "pf=0.8\n", - "P=2000.0\n", - "\n", - "#Calculations\n", - "I_m=P/(V_s*pf)\n", - "I_Tr=I_m/math.sqrt(2)\n", - "I_TA=2*I_m/math.pi\n", - "fos=2 #factor of safety\n", - "PIV=V_m*math.sqrt(2)\n", - "I_Tr=I_m/(2)\n", - "I_TA=I_m/math.pi\n", - "\n", - "#Results\n", - "print(\"rms value of thyristor current=%.2f A\" %(fos*I_Tr))\n", - "print(\"avg value of thyristor current=%.3f A\" %(fos*I_TA))\n", - "print(\"voltage rating of thyristor=%.2f V\" %PIV)\n", - "print(\"rms value of diode current=%.3f A\" %(fos*I_Tr))\n", - "print(\"avg value of diode current=%.3f A\" %(fos*I_TA))\n", - "print(\"voltage rating of diode=%.2f V\" %PIV)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of thyristor current=15.37 A\n", - "avg value of thyristor current=9.786 A\n", - "voltage rating of thyristor=325.27 V\n", - "rms value of diode current=15.372 A\n", - "avg value of diode current=9.786 A\n", - "voltage rating of diode=325.27 V\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.4, Page No 629" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=200.0\n", - "I=10.0\n", - "\n", - "#Calculations\n", - "R_L=V/I \n", - "I_h=.005 #holding current\n", - "R2=V/I_h \n", - "t_c=20*10**-6\n", - "fos=2 #factor of safety\n", - "C=t_c*fos/(R_L*math.log(2)) \n", - "\n", - "#Results\n", - "print(\"value of load resistance=%.0f ohm\" %R_L)\n", - "print(\"value of R2=%.0f kilo-ohm\" %(R2/1000))\n", - "print(\"value of C=%.3f uF\" %(C*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of load resistance=20 ohm\n", - "value of R2=40 kilo-ohm\n", - "value of C=2.885 uF\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.5 Page No 646" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "u_r=10\n", - "f=10000.0 #Hz\n", - "p=4.0*10**-8 #ohm-m\n", - "\n", - "#Calculations\n", - "dl=(1/(2*math.pi))*math.sqrt(p*10**7/(u_r*f)) \n", - "l=0.12 #length of cylinder\n", - "t=20.0 #no of turns\n", - "I=100.0\n", - "H=t*I/l\n", - "P_s=2*math.pi*H**2*math.sqrt(u_r*f*p*10**-7) \n", - "d=.02 #diameter\n", - "P_v=4*H**2*p/(d*dl) \n", - "\n", - "#Results\n", - "print(\"depth of heat of penetration=%.5f mm\" %(dl*1000))\n", - "print(\"heat generated per unit cylinder surface area=%.3f W/m**2\" %P_s)\n", - "print(\"heat generated per unit cylinder volume=%.0f W/m**3\" %P_v)\n", - " #answer of P_v varies as given in book as value of d is not taken as in formulae. " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "depth of heat of penetration=0.31831 mm\n", - "heat generated per unit cylinder surface area=34906.585 W/m**2\n", - "heat generated per unit cylinder volume=6981317 W/m**3\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.6 Page No 646" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=3000.0\n", - "\n", - "#Calculations\n", - "t_qmin=30.0*10**-6\n", - "f_r=f/(1-2*t_qmin*f)\n", - "R=0.06\n", - "L=20.0*10**-6\n", - "C=1/(L*((2*math.pi*f_r)**2+(R/(2*L))**2)) \n", - "\n", - "#Results\n", - "print(\"required capacitor size=%.4f F\" %(C*10**6))\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "required capacitor size=94.2215 F\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter12.ipynb b/Power_Electronics/chapter12.ipynb deleted file mode 100755 index f8605d69..00000000 --- a/Power_Electronics/chapter12.ipynb +++ /dev/null @@ -1,1997 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 : Electic Drives" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1, Page No 658" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T_e=15.0 #Nm\n", - "K_m=0.5 #V-s/rad\n", - "I_a=T_e/K_m\n", - "n_m=1000.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*n_m/60\n", - "E_a=K_m*w_m\n", - "r_a=0.7\n", - "V_t=E_a+I_a*r_a\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=math.degrees(math.acos(2*math.pi*V_t/V_m-1))\n", - "print(\"firing angle delay=%.3f deg\" %a)\n", - "I_Tr=I_a*math.sqrt((180-a)/360) \n", - "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n", - "I_fdr=I_a*math.sqrt((180+a)/360) \n", - "print(\"rms value of freewheeling diode current=%.3f A\" %I_fdr)\n", - "pf=V_t*I_a/(V_s*I_Tr) \n", - "\n", - "#Results \n", - "print(\"input power factor=%.4f\" %pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle delay=65.349 deg\n", - "rms value of thyristor current=16.930 A\n", - "rms value of freewheeling diode current=24.766 A\n", - "input power factor=0.5652\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2, Page No 660" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "E=150.0\n", - "R=8.0\n", - "\n", - "#Calculations\n", - "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n", - "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n", - "P=E*I_o \n", - "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n", - "P_r=I_or**2*R \n", - "pf=(P+P_r)/(V*I_or)\n", - "\n", - "#Results\n", - "print(\"avg charging curent=%.4f A\" %I_o)\n", - "print(\"power supplied to the battery=%.2f W\" %P)\n", - "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n", - "print(\"supply pf=%.3f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg charging curent=3.5679 A\n", - "power supplied to the battery=535.18 W\n", - "power dissipated by the resistor=829.760 W\n", - "supply pf=0.583\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.3 Page No 661" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variablesV_s=250\n", - "V_m=math.sqrt(2)*V_s\n", - "a=30.0\n", - "k=0.03 #Nm/A**2\n", - "n_m=1000.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*n_m/60\n", - "r=.2 #r_a+r_s\n", - "V_t=V_m/math.pi*(1+math.cos(math.radians(a)))\n", - "I_a=V_t/(k*w_m+r) \n", - "print(\"motor armature current=%.2f A\" %I_a)\n", - "T_e=k*I_a**2 \n", - "print(\"motor torque=%.3f Nm\" %T_e)\n", - "I_sr=I_a*math.sqrt((180-a)/180)\n", - "pf=(V_t*I_a)/(V_s*I_sr) \n", - "\n", - "#Results\n", - "print(\"input power factor=%.2f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor armature current=57.82 A\n", - "motor torque=100.285 Nm\n", - "input power factor=0.92\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.4, Page No 663" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0\n", - "V_m=math.sqrt(2)*V_s\n", - "V_f=2*V_m/math.pi\n", - "r_f=200.0\n", - "I_f=V_f/r_f\n", - "T_e=85.0\n", - "K_a=0.8\n", - "\n", - "#Calculations\n", - "I_a=T_e/(I_f*K_a) \n", - "print(\"rated armature current=%.2f A\" %I_a)\n", - "n_m=1200.0\n", - "w_m=2*math.pi*n_m/60\n", - "r_a=0.2\n", - "V_t=K_a*I_f*w_m+I_a*r_a\n", - "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n", - "print(\"firing angle delay=%.2f deg\" %a)\n", - "E_a=V_t\n", - "w_mo=E_a/(K_a*I_f)\n", - "N=60*w_mo/(2*math.pi)\n", - "reg=((N-n_m)/n_m)*100 \n", - "print(\"speed regulation at full load=%.2f\" %reg)\n", - "I_ar=I_a\n", - "pf=(V_t*I_a)/(V_s*I_ar) \n", - "print(\"input power factor of armature convertor=%.4f\" %pf)\n", - "I_fr=I_f\n", - "I_sr=math.sqrt(I_fr**2+I_ar**2)\n", - "VA=I_sr*V_s\n", - "P=V_t*I_a+V_f*I_f\n", - "\n", - "#Results\n", - "print(\"input power factor of drive=%.4f\" %(P/VA))\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rated armature current=59.01 A\n", - "firing angle delay=57.63 deg\n", - "speed regulation at full load=6.52\n", - "input power factor of armature convertor=0.4821\n", - "input power factor of drive=0.5093\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5 Page No 664" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0\n", - "V_m=math.sqrt(2)*V_s\n", - "V_f=2*V_m/math.pi\n", - "\n", - "#Calculations\n", - "a1=math.degrees(math.acos(V_t*math.pi/(2*V_m))) \n", - "print(\"delay angle of field converter=%.0f deg\" %a1)\n", - "r_f=200.0\n", - "I_f=V_f/r_f\n", - "T_e=85.0\n", - "K_a=0.8\n", - "I_a=T_e/(I_f*K_a)\n", - "n_m=1200.0\n", - "w_m=2*math.pi*n_m/60\n", - "r_a=0.1\n", - "I_a=50.0\n", - "V_t=-K_a*I_f*w_m+I_a*r_a\n", - "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n", - "\n", - "#Results\n", - "print(\"firing angle delay of armature converter=%.3f deg\" %a)\n", - "print(\"power fed back to ac supply=%.0f W\" %(-V_t*I_a))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "delay angle of field converter=58 deg\n", - "firing angle delay of armature converter=119.260 deg\n", - "power fed back to ac supply=8801 W\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.6 Page No 665" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_t=220.0\n", - "n_m=1500.0\n", - "w_m=2*math.pi*n_m/60\n", - "I_a=10.0\n", - "r_a=1.0\n", - "\n", - "#Calculations\n", - "K_m=(V_t-I_a*r_a)/(w_m)\n", - "T=5.0\n", - "I_a=T/K_m\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=30.0\n", - "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", - "w_m=(V_t-I_a*r_a)/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "print(\"motor speed=%.2f rpm\" %N)\n", - "a=45\n", - "n_m=1000\n", - "w_m=2*math.pi*n_m/60\n", - "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", - "I_a=(V_t-K_m*w_m)/r_a\n", - "T_e=K_m*I_a \n", - "\n", - "#Results\n", - "print(\"torque developed=%.3f Nm\" %T_e)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor speed=1254.22 rpm\n", - "torque developed=8.586 Nm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.7, Page No 666" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_t=220.0\n", - "n_m=1000.0\n", - "w_m=2*math.pi*n_m/60\n", - "I_a=60.0\n", - "r_a=.1\n", - "\n", - "#Calculations\n", - "K_m=(V_t-I_a*r_a)/(w_m)\n", - "V_s=230\n", - "V_m=math.sqrt(2)*V_s\n", - "print(\"for 600rpm speed\")\n", - "n_m=600.0\n", - "w_m=2*math.pi*n_m/60\n", - "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m))) \n", - "print(\"firing angle=%.3f deg\" %a)\n", - "print(\"for -500rpm speed\")\n", - "n_m=-500.0\n", - "w_m=2*math.pi*n_m/60\n", - "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m)))\n", - "print(\"firing angle=%.2f deg\" %a)\n", - "I_a=I_a/2\n", - "a=150\n", - "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", - "w_m=(V_t-I_a*r_a)/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "#Results\n", - "print(\"motor speed=%.3f rpm\" %N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for 600rpm speed\n", - "firing angle=49.530 deg\n", - "for -500rpm speed\n", - "firing angle=119.19 deg\n", - "motor speed=-852.011 rpm\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.8 Page No 672" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "K_m=1.5\n", - "T_e=50.0\n", - "I_a=T_e/K_m\n", - "r_a=0.9\n", - "a=45.0\n", - "V_s=415.0\n", - "\n", - "#Calculations\n", - "V_ml=math.sqrt(2)*V_s\n", - "w_m=((3*V_ml*(1+math.cos(math.radians(a)))/(2*math.pi))-I_a*r_a)/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "#Results\n", - "print(\"motor speed=%.2f rpm\" %N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor speed=2854.42 rpm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.9 Page No 672" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variablesV_t=600\n", - "n_m=1500.0\n", - "w_m=2*math.pi*n_m/60\n", - "I_a=80.0\n", - "r_a=1.0\n", - "\n", - "#Calculations\n", - "K_m=(V_t-I_a*r_a)/(w_m)\n", - "V_s=400.0\n", - "V_m=math.sqrt(2)*V_s\n", - "print(\"for firing angle=45deg and speed=1200rpm\")\n", - "a=45.0\n", - "n_m=1200.0\n", - "w_m=2*math.pi*n_m/60\n", - "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n", - "I_sr=I_a*math.sqrt(2/3) \n", - "print(\"rms value of source current=%.3f A\" %I_sr)\n", - "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(1/3)))\n", - "print(\"avg value of thyristor current=%.2f A\" %I_a*(1/3))\n", - "pf=(3/(2*math.pi)*(1+math.cos(math.radians(a)))) \n", - "print(\"input power factor=%.3f\" %pf)\n", - "\n", - "print(\"for firing angle=90deg and speed=700rpm\")\n", - "a=90\n", - "n_m=700\n", - "w_m=2*math.pi*n_m/60\n", - "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n", - "I_sr=I_a*math.sqrt(90/180) \n", - "\n", - "\n", - "#Results\n", - "print(\"rms value of source current=%.3f A\" %I_sr)\n", - "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(90.0/360)))\n", - "print(\"avg value of thyristor current=%.3f A\" %I_a*(1/3))\n", - "pf=(math.sqrt(6)/(2*math.pi)*(1+math.cos(math.radians(a))))*math.sqrt(180/(180-a)) \n", - "print(\"input power factor=%.4f\" %pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle=45deg and speed=1200rpm\n", - "rms value of source current=0.000 A\n", - "rms value of thyristor current=0.000 A\n", - "\n", - "input power factor=0.815\n", - "for firing angle=90deg and speed=700rpm\n", - "rms value of source current=0.000 A\n", - "rms value of thyristor current=195.558 A\n", - "\n", - "input power factor=0.5513\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.10 Page No 676" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=30\n", - "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n", - "I_a=21.0\n", - "r_a=.1\n", - "V_d=2.0\n", - "K_m=1.6\n", - "\n", - "#Calculations\n", - "w_m=(V_t-I_a*r_a-V_d)/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "print(\"speed of motor=%.1f rpm\" %N)\n", - "\n", - "N=2000\n", - "w_m=2*math.pi*N/60\n", - "I_a=210\n", - "V_t=K_m*w_m+I_a*r_a+V_d\n", - "a=math.degrees(math.acos(V_t*math.pi/(3*V_m)))\n", - "print(\"firing angle=%.2f deg\" %a)\n", - "I_sr=I_a*math.sqrt(2.0/3.0)\n", - "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n", - "print(\"supply power factor=%.3f\" %pf)\n", - "\n", - "I_a=21\n", - "w_m=(V_t-I_a*r_a-V_d)/K_m\n", - "n=w_m*60/(2*math.pi)\n", - "reg=(n-N)/N*100 \n", - "\n", - "#Results\n", - "print(\"speed regulation(percent)=%.2f\" %reg)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "speed of motor=2767.6 rpm\n", - "firing angle=48.48 deg\n", - "supply power factor=0.633\n", - "speed regulation(percent)=5.64\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.11, Page No 677" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_t=230.0\n", - "V_l=V_t*math.pi/(3*math.sqrt(2))\n", - "V_ph=V_l/math.sqrt(3)\n", - "V_in=400 #per phase voltage input\n", - "\n", - "#Calculations\n", - "N1=1500.0\n", - "I_a1=20.0\n", - "r_a1=.6\n", - "E_a1=V_t-I_a1*r_a1\n", - "n1=1000.0\n", - "E_a2=E_a1/1500.0*1000.0\n", - "V_t1=E_a1+I_a1*r_a1\n", - "a1=math.degrees(math.acos(V_t1*math.pi/(3*math.sqrt(2.0)*V_l)))\n", - "I_a2=.5*I_a1\n", - "n2=-900.0\n", - "V_t2=n2*E_a2/N1+I_a2*r_a1\n", - "a2=math.degrees(math.acos(V_t2*math.pi/(3*math.sqrt(2)*V_l))) \n", - "\n", - "#Results\n", - "print(\"transformer phase turns ratio=%.3f\" %(V_in/V_ph))\n", - "print(\"for motor running at 1000rpm at rated torque\")\n", - "print(\"firing angle delay=%.2f deg\" %a1)\n", - "print(\"for motor running at -900rpm at half of rated torque\")\n", - "print(\"firing angle delay=%.3f deg\" %a2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "transformer phase turns ratio=4.068\n", - "for motor running at 1000rpm at rated torque\n", - "firing angle delay=0.00 deg\n", - "for motor running at -900rpm at half of rated torque\n", - "firing angle delay=110.674 deg\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.12, Page No 678" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variablesV_s=400\n", - "V_ml=math.sqrt(2)*V_s\n", - "V_f=3*V_ml/math.pi\n", - "R_f=300.0\n", - "I_f=V_f/R_f\n", - "T_e=60.0\n", - "k=1.1\n", - "\n", - "#Calculations\n", - "I_a=T_e/(k*I_f)\n", - "N1=1000.0\n", - "w_m1=2*math.pi*N1/60\n", - "r_a1=.3\n", - "V_t1=k*I_f*w_m1+I_a*r_a1\n", - "a1=math.degrees(math.acos(V_f*math.pi/(3*V_ml)))\n", - "N2=3000\n", - "w_m2=2*math.pi*N/60\n", - "a2=0\n", - "V_t2=3*V_ml*math.cos(math.radians(a))/math.pi\n", - "I_f2=(V_t2-I_a*r_a)/(w_m2*k)\n", - "V_f2=I_f2*R_f\n", - "a2=math.degrees(math.acos(V_f2*math.pi/(3*V_ml)))\n", - "\n", - "#Results\n", - "print(\"firing angle=%.3f deg\" %a)\n", - "print(\"firing angle=%.3f deg\" %a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle=48.477 deg\n", - "firing angle=48.477 deg\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.13, Page No 679" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - " #after calculating\n", - " #t=w_m/6000-math.pi/360\n", - "\n", - "N=1000.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*N/60\n", - "t=w_m/6000-math.pi/360 \n", - "\n", - "#Results\n", - "print(\"time reqd=%.2f s\" %t)\n", - " #printing mistake in the answer in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "time reqd=0.01 s\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.14, Page No 679" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_a=1.0 #supposition\n", - "a=60.0\n", - "\n", - "#Calculations\n", - "I_s1=2*math.sqrt(2)/math.pi*I_a*math.sin(math.radians(a))\n", - "I_s3=2*math.sqrt(2)/(3*math.pi)*I_a*math.sin(math.radians(3*a))\n", - "I_s5=2*math.sqrt(2)/(5*math.pi)*I_a*math.sin(math.radians(5*a))\n", - "per3=I_s3/I_s1*100 \n", - "print(\"percent of 3rd harmonic current in fundamental=%.2f\" %per3)\n", - "per5=I_s5/I_s1*100 \n", - "\n", - "#Results\n", - "print(\"percent of 5th harmonic current in fundamental=%.2f\" %per5)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percent of 3rd harmonic current in fundamental=0.00\n", - "percent of 5th harmonic current in fundamental=-20.00\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.15, Page No 680" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_a=60.0\n", - "I_TA=I_a/3 \n", - "\n", - "#Calculations\n", - "print(\"avg thyristor current=%.0f A\" %I_TA)\n", - "I_Tr=I_a/math.sqrt(3) \n", - "print(\"rms thyristor current=%.3f A\" %I_Tr)\n", - "V_s=400\n", - "V_m=math.sqrt(2)*V_s\n", - "I_sr=I_a*math.sqrt(2.0/3)\n", - "a=150\n", - "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n", - "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n", - "print(\"power factor of ac source=%.3f\" %pf)\n", - "\n", - "r_a=0.5\n", - "K_m=2.4\n", - "w_m=(V_t-I_a*r_a)/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "#Results\n", - "print(\"Speed of motor=%.2f rpm\" %N)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg thyristor current=20 A\n", - "rms thyristor current=34.641 A\n", - "power factor of ac source=-0.827\n", - "Speed of motor=-1980.76 rpm\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.16, Page No 685" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_a=300.0\n", - "V_s=600.0\n", - "a=0.6\n", - "V_t=a*V_s\n", - "P=V_t*I_a \n", - "\n", - "#Calculations\n", - "print(\"input power from source=%.0f kW\" %(P/1000))\n", - "R_eq=V_s/(a*I_a) \n", - "print(\"equivalent input resistance=%.3f ohm\" %R_eq)\n", - "k=.004\n", - "R=.04+.06\n", - "w_m=(a*V_s-I_a*R)/(k*I_a)\n", - "N=w_m*60/(2*math.pi) \n", - "print(\"motor speed=%.1f rpm\" %N)\n", - "T_e=k*I_a**2 \n", - "\n", - "#Results\n", - "print(\"motor torque=%.0f Nm\" %T_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "input power from source=108 kW\n", - "equivalent input resistance=3.333 ohm\n", - "motor speed=2626.1 rpm\n", - "motor torque=360 Nm\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.17, Page No 686" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T_on=10.0\n", - "T_off=15.0\n", - "\n", - "#Calculations\n", - "a=T_on/(T_on+T_off)\n", - "V_s=230.0\n", - "V_t=a*V_s\n", - "r_a=3\n", - "K_m=.5\n", - "N=1500\n", - "w_m=2*math.pi*N/60\n", - "I_a=(V_t-K_m*w_m)/r_a \n", - "\n", - "#Results\n", - "print(\"motor load current=%.3f A\" %I_a)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor load current=4.487 A\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.18, Page No 686" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "w_m=0 \n", - "print(\"lower limit of speed control=%.0f rpm\" %w_m)\n", - "I_a=25.0\n", - "r_a=.2\n", - "V_s=220\n", - "K_m=0.08\n", - "\n", - "#Calculations\n", - "a=(K_m*w_m+I_a*r_a)/V_s \n", - "print(\"lower limit of duty cycle=%.3f\" %a)\n", - "a=1 \n", - "print(\"upper limit of duty cycle=%.0f\" %a)\n", - "w_m=(a*V_s-I_a*r_a)/K_m \n", - "\n", - "#Results\n", - "print(\"upper limit of speed control=%.1f rpm\" %w_m)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lower limit of speed control=0 rpm\n", - "lower limit of duty cycle=0.023\n", - "upper limit of duty cycle=1\n", - "upper limit of speed control=2687.5 rpm\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.21, Page No 691" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=0.6\n", - "V_s=400.0\n", - "V_t=(1-a)*V_s\n", - "I_a=300.0\n", - "P=V_t*I_a \n", - "\n", - "#Calculations \n", - "print(\"power returned=%.0f kW\" %(P/1000))\n", - "r_a=.2\n", - "K_m=1.2\n", - "R_eq=(1-a)*V_s/I_a+r_a \n", - "print(\"equivalent load resistance=%.4f ohm\" %R_eq)\n", - "w_mn=I_a*r_a/K_m\n", - "N=w_mn*60/(2*math.pi) \n", - "print(\"min braking speed=%.2f rpm\" %N)\n", - "w_mx=(V_s+I_a*r_a)/K_m\n", - "N=w_mx*60/(2*math.pi) \n", - "print(\"max braking speed=%.1f rpm\" %N)\n", - "w_m=(V_t+I_a*r_a)/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "#Results\n", - "print(\"max braking speed=%.1f rpm\" %N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "power returned=48 kW\n", - "equivalent load resistance=0.7333 ohm\n", - "min braking speed=477.46 rpm\n", - "max braking speed=3660.6 rpm\n", - "max braking speed=1750.7 rpm\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.22, Page No 699" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "N=1500.0\n", - "\n", - "#Calculations\n", - "print(\"when speed=1455rpm\")\n", - "n=1455.0\n", - "s1=(N-n)/N\n", - "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n", - "print(\"I_2mx/I_2r=%.3f\" %r)\n", - "print(\"when speed=1350rpm\")\n", - "n=1350\n", - "s1=(N-n)/N\n", - "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n", - "\n", - "#Results\n", - "print(\"I_2mx/I_2r=%.3f\" %r)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when speed=1455rpm\n", - "I_2mx/I_2r=0.000\n", - "when speed=1350rpm\n", - "I_2mx/I_2r=0.000\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.24, Page No 705" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V1=400.0\n", - "r1=0.6\n", - "r2=0.4\n", - "s=1.0\n", - "x1=1.6\n", - "x2=1.6\n", - "\n", - "#Calculations\n", - "print(\"at starting in normal conditions\")\n", - "I_n=V1/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n", - "print(\"current=%.2f A\" %I_n)\n", - "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n", - "print(\"pf=%.4f\" %pf)\n", - "f1=50\n", - "w_s=4*math.pi*f1/4\n", - "T_en=(3/w_s)*I_n**2*(r2/s) \n", - "print(\"\\nTorque developed=%.2f Nm\" %T_en)\n", - "print(\"motor is operated with DOL starting\")\n", - "I_d=V1/2/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n", - "print(\"current=%.0f A\" %I_d)\n", - "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n", - "print(\"pf=%.2f\" %pf)\n", - "f1=25\n", - "w_s=4*math.pi*f1/4\n", - "T_ed=(3/w_s)*I_d**2*(r2/s) \n", - "print(\"Torque developed=%.3f Nm\" %T_ed)\n", - "print(\"at max torque conditions\")\n", - "s_mn=r2/math.sqrt((r1)**2+((x1+x2))**2)\n", - "I_n=V1/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n", - "print(\"current=%.3f A\" %I_n)\n", - "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n", - "print(\"pf=%.4f\" %pf)\n", - "f1=50\n", - "w_s=4*math.pi*f1/4\n", - "T_en=(3/w_s)*I_n**2*(r2/s_mn) \n", - "print(\"Torque developed=%.2f Nm\" %T_en)\n", - "print(\"motor is operated with DOL starting\")\n", - "s_mn=r2/math.sqrt((r1)**2+((x1+x2)/2)**2)\n", - "I_d=V1/2/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n", - "print(\"current=%.3f A\" %I_d)\n", - "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n", - "print(\"\\npf=%.3f\" %pf)\n", - "f1=25\n", - "w_s=4*math.pi*f1/4\n", - "T_en=(3/w_s)*I_d**2*(r2/s_mn) \n", - "\n", - "\n", - "#Results \n", - "print(\"Torque developed=%.3f Nm\" %T_en)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "at starting in normal conditions\n", - "current=119.31 A\n", - "pf=0.2983\n", - "\n", - "Torque developed=108.75 Nm\n", - "motor is operated with DOL starting\n", - "current=106 A\n", - "pf=0.53\n", - "Torque developed=171.673 Nm\n", - "at max torque conditions\n", - "current=79.829 A\n", - "pf=0.7695\n", - "Torque developed=396.26 Nm\n", - "motor is operated with DOL starting\n", - "current=71.199 A\n", - "\n", - "pf=0.822\n", - "Torque developed=330.883 Nm\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.25, Page No 709" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "x1=1.0\n", - "X_m=50.0\n", - "X_e=x1*X_m/(x1+X_m)\n", - "V=231.0\n", - "V_e=V*X_m/(x1+X_m)\n", - "x2=1.0\n", - "r2=.4\n", - "r1=0\n", - "\n", - "#Calculations\n", - "s_m=r2/(x2+X_e) \n", - "print(\"slip at max torque=%.2f\" %s_m)\n", - "s_mT=r2/(x2+X_m) \n", - "print(\"slip at max torque=%.5f\" %s_mT)\n", - "f1=50.0\n", - "w_s=4*math.pi*f1/4\n", - "print(\"for constant voltage input\")\n", - "T_est=(3/w_s)*(V_e/math.sqrt(r2**2+(x2+X_e)**2))**2*(r2) \n", - "print(\"starting torque=%.3f Nm\" %T_est)\n", - "T_em=(3/w_s)*V_e**2/(2*(x2+X_e)) \n", - "print(\"maximum torque developed=%.2f Nm\" %T_em)\n", - "print(\"for constant current input\")\n", - "I1=28\n", - "T_est=(3/w_s)*(I1*X_m)**2/(r2**2+(x2+X_m)**2)*r2 \n", - "print(\"starting torque=%.3f Nm\" %T_est)\n", - "T_em=(3/w_s)*(I1*X_m)**2/(2*(x2+X_m)) \n", - "print(\"maximum torque developed=%.3f Nm\" %T_em)\n", - "s=s_mT\n", - "i=1\n", - "I_m=I1*(r2/s+i*x2)/(r2/s+i*(x2+X_m))\n", - "I_m=math.fabs(I_m)\n", - "V1=math.sqrt(3)*I_m*X_m \n", - "\n", - "#Results\n", - "print(\"supply voltage reqd=%.1f V\" %V1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "slip at max torque=0.20\n", - "slip at max torque=0.00784\n", - "for constant voltage input\n", - "starting torque=95.988 Nm\n", - "maximum torque developed=247.31 Nm\n", - "for constant current input\n", - "starting torque=5.756 Nm\n", - "maximum torque developed=366.993 Nm\n", - "supply voltage reqd=1236.2 V\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.27, Page No 718" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=420.0\n", - "V1=V/math.sqrt(3)\n", - "T_e=450.0\n", - "N=1440.0\n", - "n=1000.0\n", - "T_L=T_e*(n/N)**2\n", - "n1=1500.0\n", - "\n", - "#Calculations\n", - "w_s=2*math.pi*n1/60\n", - "w_m=2*math.pi*n/60\n", - "a=.8\n", - "I_d=T_L*w_s/(2.339*a*V1)\n", - "k=0\n", - "R=(1-w_m/w_s)*(2.339*a*V1)/(I_d*(1-k)) \n", - "print(\"value of chopper resistance=%.4f ohm\" %R)\n", - "n=1320.0\n", - "T_L=T_e*(n/N)**2\n", - "I_d=T_L*w_s/(2.339*a*V1) \n", - "print(\"Inductor current=%.3f A\" %I_d)\n", - "w_m=2*math.pi*n/60\n", - "k=1-((1-w_m/w_s)*(2.339*a*V1)/(I_d*R)) \n", - "print(\"value of duty cycle=%.4f\" %k)\n", - "s=(n1-n)/n1\n", - "V_d=2.339*s*a*V1 \n", - "print(\"Rectifed o/p voltage=%.3f V\" %V_d)\n", - "P=V_d*I_d\n", - "I2=math.sqrt(2/3)*I_d\n", - "r2=0.02\n", - "Pr=3*I2**2*r2\n", - "I1=a*I2\n", - "r1=0.015\n", - "Ps=3*I1**2*r1\n", - "Po=T_L*w_m\n", - "Pi=Po+Ps+Pr+P\n", - "eff=Po/Pi*100 \n", - "\n", - "#Results\n", - "print(\"Efficiency(in percent)=%.2f\" %eff)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of chopper resistance=2.0132 ohm\n", - "Inductor current=130.902 A\n", - "value of duty cycle=0.7934\n", - "Rectifed o/p voltage=54.449 V\n", - "Efficiency(in percent)=88.00\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.28, Page No 720" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=400.0\n", - "V_ph=V/math.sqrt(3)\n", - "N_s=1000.0\n", - "N=800.0\n", - "a=.7\n", - "I_d=110\n", - "R=2.0\n", - "\n", - "#Calculations\n", - "k=1-((1-N/N_s)*(2.339*a*V_ph)/(I_d*R)) \n", - "print(\"value of duty cycle=%.3f\" %k)\n", - "P=I_d**2*R*(1-k)\n", - "I1=a*I_d*math.sqrt(2/3)\n", - "r1=0.1\n", - "r2=0.08\n", - "Pr=3*I1**2*(r1+r2)\n", - "P_o=20000\n", - "P_i=P_o+Pr+P\n", - "eff=P_o/P_i*100 \n", - "print(\"Efficiency=%.2f\" %eff)\n", - "I11=math.sqrt(6)/math.pi*a*I_d\n", - "th=43\n", - "P_ip=math.sqrt(3)*V*I11*math.cos(math.radians(th))\n", - "pf=P_ip/(math.sqrt(3)*V*I11) \n", - "\n", - "#Results\n", - "print(\"Input power factor=%.4f\" %pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of duty cycle=0.656\n", - "Efficiency=70.62\n", - "Input power factor=0.7314\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.29, Page No 724" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=420.0\n", - "V1=V/math.sqrt(3)\n", - "N=1000.0\n", - "w_m=2*math.pi*N/60\n", - "N_s=1500.0\n", - "\n", - "#Calculations\n", - "s=(N_s-N)/N_s\n", - "a=0.8\n", - "V_d=2.339*a*s*V1 \n", - "print(\"rectified voltage=%.2f V\" %V_d)\n", - "T=450.0\n", - "N1=1200.0\n", - "T_L=T*(N/N1)**2\n", - "f1=50\n", - "w_s=4*math.pi*f1/4\n", - "I_d=w_s*T_L/(2.339*a*V1) \n", - "print(\"inductor current=%.2f A\" %I_d)\n", - "a_T=-.4\n", - "a1=math.degrees(math.acos(s*a/a_T))\n", - "print(\"delay angle of inverter=%.2f deg\" %a1)\n", - "\n", - "P_s=V_d*I_d\n", - "P_o=T_L*w_m\n", - "R_d=0.01\n", - "P_i=I_d**2*R_d\n", - "I2=math.sqrt(2/3)*I_d\n", - "r2=0.02\n", - "r1=0.015\n", - "P_rol=3*I2**2*r2\n", - "I1=a*I2\n", - "P_sol=3*I1**2*r1\n", - "P_i=P_o+P_rol+P_sol+P_i\n", - "eff=P_o/P_i*100 \n", - "print(\"\\nefficiency=%.2f\" %eff)\n", - "w_m=w_s*(1+(-a_T/a)*math.cos(math.radians(a1))-w_s*R_d*T_L/(2.339*a*V1)**2)\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "#Results \n", - "print(\"motor speed=%.1f rpm\" %N)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rectified voltage=151.25 V\n", - "inductor current=108.18 A\n", - "delay angle of inverter=131.81 deg\n", - "\n", - "efficiency=99.64\n", - "motor speed=996.4 rpm\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.30, Page No 726" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=700.0\n", - "E2=V/math.sqrt(3)\n", - "N_s=1500.0\n", - "N=1200.0\n", - "\n", - "#Calculations\n", - "s=(N_s-N)/N_s\n", - "V_dd=0.7\n", - "V_dt=1.5\n", - "V_d=3*math.sqrt(6)*s*E2/math.pi-2*V_dd\n", - "V1=415.0\n", - "a=math.degrees(math.acos((3*math.sqrt(2)*E2/math.pi)**-1*(-V_d+2*V_dt)))\n", - "\n", - "#Results\n", - "print(\"firing angle advance=%.2f deg\" %(180-a))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle advance=70.22 deg\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.31, Page No 726" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=700.0\n", - "E2=V/math.sqrt(3)\n", - "N_s=1500.0\n", - "N=1200.0\n", - "\n", - "#Calculations\n", - "s=(N_s-N)/N_s\n", - "V_dd=.7\n", - "V_dt=1.5\n", - "a=0\n", - "u=18 #overlap angle in case of rectifier\n", - "V_d=3*math.sqrt(6)*s*E2*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dd\n", - "V1=415\n", - "V_ml=math.sqrt(2)*V1\n", - "u=4 #overlap anglein the inverter\n", - " #V_dc=-(3*V_ml*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dt)\n", - " #V_dc=V_d\n", - " #after solving % (1+math.cos(math.radians(u)))*math.cos(math.radians(a))-math.sin(math.radians(u))*math.sin(math.radians(a))=-.6425\n", - "a=math.degrees(math.acos(-.6425/(math.sqrt((1+math.cos(math.radians(u)))**2+math.sin(math.radians(u))**2))))-math.degrees(math.asin(math.sin(math.radians(a))/(1+math.cos(math.radians(u)))))\n", - "\n", - "#Results\n", - "print(\"firing angle advance=%.2f deg\" %(180-a))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle advance=71.25 deg\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.32, Page No 727" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=700.0\n", - "E2=V\n", - "N_s=1500.0\n", - "N=1200.0\n", - "\n", - "#Calculations\n", - "s=(N_s-N)/N_s\n", - "V1=415.0\n", - "a_T=s*E2/V1 \n", - "\n", - "#Results\n", - "print(\"voltage ratio of the transformer=%.2f\" %a_T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "voltage ratio of the transformer=0.34\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.33, Page No 733" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "P=6.0\n", - "N_s=600.0\n", - "f1=P*N_s/120.0\n", - "V=400.0\n", - "f=50.0\n", - "\n", - "#Calculations\n", - "V_t=f1*V/f \n", - "print(\"supply freq=%.0f Hz\" %V_t)\n", - "T=340.0\n", - "N=1000.0\n", - "T_L=T*(N_s/N)**2\n", - "w_s=2*math.pi*N_s/60\n", - "P=T_L*w_s\n", - "I_a=P/(math.sqrt(3)*V_t) \n", - "print(\"armature current=%.2f A\" %I_a)\n", - "Z_s=2\n", - "X_s=f1/f*math.fabs(Z_s)\n", - "V_t=V_t/math.sqrt(3)\n", - "Ef=math.sqrt(V_t**2+(I_a*X_s)**2)\n", - "print(\"excitation voltage=%.2f V\" %(math.sqrt(3)*Ef))\n", - "dl=math.degrees(math.atan(I_a*X_s/V_t))\n", - "print(\"load angle=%.2f deg\" %dl)\n", - "T_em=(3/w_s)*(Ef*V_t/X_s) \n", - "\n", - "#Results\n", - "print(\"pull out torque=%.2f Nm\" %T_em)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "supply freq=240 Hz\n", - "armature current=18.50 A\n", - "excitation voltage=243.06 V\n", - "load angle=9.10 deg\n", - "pull out torque=773.69 Nm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.34, Page No 736" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "P=4.0\n", - "f=50.0\n", - "w_s=4*math.pi*f/P\n", - "X_d=8.0\n", - "X_q=2.0\n", - "T_e=80.0\n", - "V=400.0\n", - "\n", - "#Calculations\n", - "V_t=V/math.sqrt(3)\n", - "dl=(1/2)*math.degrees(math.asin(T_e*w_s/((3/2)*(V_t)**2*(1/X_q-1/X_d)))) \n", - "print(\"load angle=%.3f deg\" %dl)\n", - "I_d=V_t*math.cos(math.radians(dl))/X_d\n", - "I_q=V_t*math.sin(math.radians(dl))/X_q\n", - "I_a=math.sqrt(I_d**2+I_q**2) \n", - "print(\"armature current=%.2f A\" %I_a)\n", - "pf=T_e*w_s/(math.sqrt(3)*V*I_a) \n", - "\n", - "#Results\n", - "print(\"input power factor=%.4f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "load angle=0.000 deg\n", - "armature current=28.87 A\n", - "input power factor=0.6283\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.35, Page No 737" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T_e=3.0\n", - "K_m=1.2\n", - "I_a=T_e/K_m\n", - "r_a=2.0\n", - "V=230.0\n", - "\n", - "#Calculations\n", - "E_a=(0.263*math.sqrt(2)*V-I_a*r_a)/(1-55/180)\n", - "w_m=E_a/K_m\n", - "N=w_m*60/(2*math.pi) \n", - "\n", - "#Results\n", - "print(\"motor speed=%.2f rpm\" %N)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor speed=640.96 rpm\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.36, Page No 738" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "K_m=1.0\n", - "N=1360.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*N/60\n", - "E_a=K_m*w_m\n", - " #after calculations V_t % calculated\n", - "V_t=163.45\n", - "r_a=4\n", - "I_a=(V_t-E_a)/r_a\n", - "T_e=K_m*I_a \n", - "\n", - "#Results\n", - "print(\"motor torque=%.4f Nm\" %T_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor torque=5.2578 Nm\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.37, Page No 740" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "K_m=1.0\n", - "N=2100.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*N/60\n", - "E_a=K_m*w_m\n", - " #after calculations V_t % calculated\n", - "V_t=227.66\n", - "r_a=4\n", - "I_a=(V_t-E_a)/r_a\n", - "T_e=K_m*I_a \n", - "\n", - "#Results\n", - "print(\"motor torque=%.2f Nm\" %T_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor torque=1.94 Nm\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.38, Page No 742" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "K_m=1.0\n", - "N=840.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*N/60\n", - "E_a=K_m*w_m\n", - "V=230.0\n", - "a=75.0\n", - "V_t=math.sqrt(2)*V/math.pi*(1+math.cos(math.radians(a)))\n", - "r_a=4\n", - "I_a=(V_t-E_a)/r_a\n", - "T_e=K_m*I_a \n", - "\n", - "#Results\n", - "print(\"motor torque=%.4f Nm\" %T_e)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor torque=10.5922 Nm\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.39, Page No 743" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "K_m=1.0\n", - "N=1400.0\n", - "\n", - "#Calculations\n", - "w_m=2*math.pi*N/60\n", - "E_a=K_m*w_m\n", - "V=230.0\n", - "a=60.0\n", - "a1=212\n", - "V_t=math.sqrt(2)*V/math.pi*(math.cos(math.radians(a))-math.cos(math.radians(a1)))+E_a*(180+a-a1)/180\n", - "r_a=3\n", - "I_a=(V_t-E_a)/r_a\n", - "T_e=K_m*I_a \n", - "\n", - "#Results\n", - "print(\"motor torque=%.3f Nm\" %T_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor torque=5.257 Nm\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.40, Page No 745" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "K_m=1.0\n", - "N=600.0\n", - "w_m=2*math.pi*N/60\n", - "E_a=K_m*w_m\n", - "V=230.0\n", - "a=60.0\n", - "\n", - "#Calculations\n", - "V_t=2*math.sqrt(2)*V/math.pi*(math.cos(math.radians(a)))\n", - "r_a=3\n", - "I_a=(V_t-E_a)/r_a\n", - "T_e=K_m*I_a \n", - "\n", - "\n", - "#Results\n", - "print(\"motor torque=%.3f Nm\" %T_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "motor torque=13.568 Nm\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.41, Page No 745" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "r1=.6\n", - "r2=.4\n", - "s=0.04\n", - "x1=1.6\n", - "x2=1.6\n", - "Z=(r1+r2/s)+(x1+x2)\n", - "V=400.0\n", - "I1=V/Z \n", - "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n", - "print(\"and with %.1f deg phase\" %math.fabs(I1))\n", - "I2=V/Z\n", - "N=1500\n", - "w_s=2*math.pi*N/60\n", - "T_e=(3/w_s)*abs(I2)**2*r2/s \n", - "print(\"motor torque=%.2f Nm\" %T_e)\n", - "N_r=N*(1-s)\n", - "\n", - "f=45\n", - "N_s1=120*f/4\n", - "w_s=2*math.pi*N_s1/60\n", - "s1=(N_s1-N_r)/N_s1\n", - "Z=(r1+r2/s1)+(x1+x2)*f/50.0\n", - "V=360\n", - "I1=V/Z \n", - "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n", - "print(\"and with %.1f deg phase\" %math.fabs(I1))\n", - "I2=V/Z\n", - "T_e=(3/w_s)*abs(I2)**2*r2/s1 \n", - "print(\"motor torque=%.2f Nm\" %T_e)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "source current=0.000 A \n", - "and with 29.0 deg phase\n", - "motor torque=160.46 Nm\n", - "source current=-0.000 A \n", - "and with 142.9 deg phase\n", - "motor torque=-2598.45 Nm\n" - ] - } - ], - "prompt_number": 37 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter13.ipynb b/Power_Electronics/chapter13.ipynb deleted file mode 100755 index 62d2a926..00000000 --- a/Power_Electronics/chapter13.ipynb +++ /dev/null @@ -1,342 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13 : Power Factor Improvement" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.1, Page No 754" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=250.0\n", - "R_l=5.0\n", - "I_l=20.0\n", - "V_l1=math.sqrt(V_s**2-(R_l*I_l)**2)\n", - "reg2=(V_s-V_l1)/V_s*100 \n", - "pf1=1.0\n", - "\n", - "#Calculations\n", - "P_l1=V_l1*I_l*pf1 #load power\n", - "P_r1=V_s*I_l*pf1 #max powwible system rating\n", - "utf1=P_l1*100/P_r1 \n", - "pf2=0.5\n", - " #(.5*V_l)**2+(.866*V_l+R_l*I_l)**2=V_s**2\n", - " #after solving\n", - "V_l2=158.35 \n", - "reg2=(V_s-V_l2)/V_s*100 \n", - "P_l2=V_l2*I_l*pf2 #load power\n", - "P_r2=V_s*I_l #max powwible system rating\n", - "utf2=P_l2*100/P_r2 \n", - "\n", - "\n", - "#Results\n", - "print(\"for pf=1\")\n", - "print(\"load voltage=%.2f V\" %V_l1)\n", - "print(\"voltage regulation=%.2f\" %reg1)\n", - "print(\"system utilisation factor=%.3f\" %utf1)\n", - "print(\"energy consumed(in units)=%.1f\" %(P_l1/1000))\n", - "print(\"for pf=.5\")\n", - "print(\"load voltage=%.2f V\" %V_l2)\n", - "print(\"voltage regulation=%.2f\" %reg2)\n", - "print(\"system utilisation factor=%.3f\" %utf2)\n", - "print(\"energy consumed(in units)=%.2f\" %(P_l2/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'reg1' is not defined", - "output_type": "pyerr", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 25\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"for pf=1\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"load voltage=%.2f V\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mV_l1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 27\u001b[1;33m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"voltage regulation=%.2f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mreg1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 28\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"system utilisation factor=%.3f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mutf1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 29\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"energy consumed(in units)=%.1f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mP_l1\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m1000\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;31mNameError\u001b[0m: name 'reg1' is not defined" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for pf=1\n", - "load voltage=229.13 V\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.2, Page No 756" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=50.0\n", - "V_s=230.0\n", - "I_m1=2\n", - "pf1=.3\n", - "\n", - "#Calculations\n", - "I_c1=I_m1*math.sin(math.radians(math.degrees(math.acos(pf1))))\n", - "C1=I_c1/(2*math.pi*f*V_s) \n", - "I_m2=5\n", - "pf2=.5\n", - "I_c2=I_m2*math.sin(math.radians(math.degrees(math.acos(pf2))))\n", - "C2=I_c2/(2*math.pi*f*V_s) \n", - "I_m3=10\n", - "pf3=.7\n", - "I_c3=I_m3*math.sin(math.radians(math.degrees(math.acos(pf3))))\n", - "C3=I_c3/(2*math.pi*f*V_s) \n", - "\n", - "#Results\n", - "print(\"at no load\")\n", - "print(\"value of capacitance=%.3f uF\" %(C1*10**6))\n", - "print(\"at half full load\")\n", - "print(\"value of capacitance=%.3f uF\" %(C2*10**6))\n", - "print(\"at full load\")\n", - "print(\"value of capacitance=%.3f uF\" %(C3*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "at no load\n", - "value of capacitance=26.404 uF\n", - "at half full load\n", - "value of capacitance=59.927 uF\n", - "at full load\n", - "value of capacitance=98.834 uF\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.3 Page No 764" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_c=10.0\n", - "f=50.0\n", - "V_s=230.0\n", - "\n", - "#Calculations\n", - "C=I_c/(2*math.pi*f*V_s) \n", - "I_l=10\n", - "L=V_s/(2*math.pi*f*I_l) \n", - "\n", - "#Results\n", - "print(\"value of capacitance=%.3f uF\" %(C*10**6))\n", - "print(\"value of inductor=%.3f mH\" %(L*1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of capacitance=138.396 uF\n", - "value of inductor=73.211 mH\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.4, Page No 765" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "I_L=10.0\n", - "X_L=V_s/I_L\n", - "I_f1=6.0\n", - " #B=2*a-math.sin(2*a)\n", - "B=2*math.pi-I_f1*math.pi*X_L/V_s\n", - "a=0\n", - "i=1.0\n", - "for a in range(1,360):\n", - " b=2*a*math.pi/180-math.sin(math.radians(2*a)) \n", - " if math.fabs(B-b)<=0.001 : #by hit and trial\n", - " i=2\n", - " break\n", - "print(\"firing angle of TCR = %.1f deg\" %a)\n", - " #(a-.01)*180/math.pi)\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle of TCR = 359.0 deg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.5 Page No 766" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "L=.01\n", - "\n", - "\n", - "#Calculations\n", - "print(\"for firing angle=90deg\")\n", - "a=90*math.pi/180\n", - "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", - "print(\"effective inductance=%.0f mH\" %(L_eff*1000))\n", - "print(\"for firing angle=120deg\")\n", - "a=120*math.pi/180\n", - "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", - "print(\"effective inductance=%.3f mH\" %(L_eff*1000))\n", - "print(\"for firing angle=150deg\")\n", - "a=150*math.pi/180\n", - "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", - "print(\"effective inductance=%.2f mH\" %(L_eff*1000))\n", - "print(\"for firing angle=170deg\")\n", - "a=170*math.pi/180\n", - "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", - "print(\"effective inductance=%.3f H\" %L_eff)\n", - "print(\"for firing angle=175deg\")\n", - "a=175*math.pi/180\n", - "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", - "\n", - "#Results\n", - "print(\"effective inductance=%.2f H\" %L_eff)\n", - "print(\"for firing angle=180deg\")\n", - "a=180*math.pi/180\n", - "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", - "print(\"effective inductance=%.3f H\" %L_eff)\n", - " #random value at firing angle =180 is equivalent to infinity as in answer in book\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle=90deg\n", - "effective inductance=10 mH\n", - "for firing angle=120deg\n", - "effective inductance=25.575 mH\n", - "for firing angle=150deg\n", - "effective inductance=173.40 mH\n", - "for firing angle=170deg\n", - "effective inductance=4.459 H\n", - "for firing angle=175deg\n", - "effective inductance=35.51 H\n", - "for firing angle=180deg\n", - "effective inductance=-128265253940037.750 H\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.6 Page No 766" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "Q=100.0*10**3\n", - "V_s=11.0*10**3\n", - "\n", - "#Calculations\n", - "f=50.0\n", - "L=V_s**2/(2*math.pi*f*Q) \n", - "\n", - "#Results\n", - "print(\"effective inductance=%.4f H\" %L)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "effective inductance=3.8515 H\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter14.ipynb b/Power_Electronics/chapter14.ipynb deleted file mode 100755 index a9c3a3f1..00000000 --- a/Power_Electronics/chapter14.ipynb +++ /dev/null @@ -1,93 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14 : Miscellaneous Topics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.1, Page No 777" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a1=0\n", - "a2=45.0\n", - "\n", - "#Calculations\n", - "print(\"for two single phase series semiconvertors\")\n", - "V_0=V_m/math.pi*(2+math.cos(math.radians(a1))+math.cos(math.radians(a2))) \n", - "print(\"avg o/p voltage=%.2f V\" %V_0)\n", - "V_or=V_s*math.sqrt((1/math.pi)*(4*math.pi-3*a2*math.pi/180+(3/2)*math.sin(math.radians(2*a2)))) \n", - "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", - "DF=(3+math.cos(math.radians(a2)))/(math.sqrt(2)*math.sqrt(5+3*math.cos(math.radians(a2)))) \n", - "print(\"DF=%.2f\" %DF)\n", - "PF=math.sqrt(2/math.pi)*(3+math.cos(math.radians(a2)))/math.sqrt(4*math.pi-3*a2*math.pi/180) \n", - "print(\"PF=%.2f\" %PF)\n", - "HF=math.sqrt((math.pi*(math.pi-(3/4)*a2*math.pi/180)/(5+3*math.cos(math.radians(a2))))-1) \n", - "print(\"HF=%.2f\" %HF)\n", - "print(\"for two single phase series full convertors\")\n", - "a=45.0\n", - "V_0=2*V_m/math.pi*(1+math.cos(math.radians(a))) \n", - "print(\"avg o/p voltage=%.2f V\" %V_0)\n", - "V_or=2*V_s*math.sqrt((1/math.pi)*(math.pi-a2*math.pi/180+(1/2)*math.sin(math.radians(2*a2)))) \n", - "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", - "DF=math.cos(math.radians(a2/2)) \n", - "\n", - "\n", - "#Results \n", - "print(\"DF=%.2f\" %DF)\n", - "PF=math.sqrt(2/(math.pi*(math.pi-a2*math.pi/180)))*(1+math.cos(math.radians(a2))) \n", - "print(\"PF=%.2f\" %PF)\n", - "HF=math.sqrt((math.pi*(math.pi-a2*math.pi/180)/(4+4*math.cos(math.radians(a2))))-1) \n", - "print(\"HF=%.2f\" %HF)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for two single phase series semiconvertors\n", - "avg o/p voltage=383.82 V\n", - "rms value of o/p voltage=434.47 V\n", - "DF=0.98\n", - "PF=0.93\n", - "HF=0.62\n", - "for two single phase series full convertors\n", - "avg o/p voltage=353.50 V\n", - "rms value of o/p voltage=398.37 V\n", - "DF=0.92\n", - "PF=0.89\n", - "HF=0.29\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter2.ipynb b/Power_Electronics/chapter2.ipynb deleted file mode 100755 index 1872c9f4..00000000 --- a/Power_Electronics/chapter2.ipynb +++ /dev/null @@ -1,233 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 02 : Power Semiconductor Diodes and Transistors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1, Page No 21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "B=40.0\n", - "R_c=10 #ohm\n", - "V_cc=130.0 #V\n", - "V_B=10.0 #V\n", - "V_CES=1.0 #V\n", - "V_BES=1.5 #V\n", - "\n", - "#Calculations\n", - "I_CS=(V_cc-V_CES)/R_c #A\n", - "I_BS=I_CS/B #A\n", - "R_B1=(V_B-V_BES)/I_BS\n", - "P_T1=V_BES*I_BS+V_CES*I_CS\n", - "ODF=5\n", - "I_B=ODF*I_BS\n", - "R_B2=(V_B-V_BES)/I_B\n", - "P_T2=V_BES*I_B+V_CES*I_CS\n", - "B_f=I_CS/I_B\n", - "\n", - "#Results\n", - "print(\"value of R_B in saturated state= %.2f ohm\" %R_B1)\n", - "print(\"Power loss in transistor=%.2f W\" %P_T1)\n", - "print(\"Value of R_B for an overdrive factor 5 = %.2f ohm\" %R_B2)\n", - "print(\"Power loss in transistor = %.2f W\" %P_T2)\n", - "print(\"Forced current gain=%.0f\" %B_f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of R_B in saturated state= 26.36 ohm\n", - "Power loss in transistor=13.38 W\n", - "Value of R_B for an overdrive factor 5 = 5.27 ohm\n", - "Power loss in transistor = 15.32 W\n", - "Forced current gain=8\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2, Page No 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_CEO=2*10**-3 #A\n", - "V_CC=220.0 #V\n", - "P_dt=I_CEO*V_CC #instant. power loss during delay time\n", - "t_d=.4*10**-6 #s\n", - "f=5000\n", - "P_d=f*I_CEO*V_CC*t_d #avg power loss during delay time\n", - "V_CES=2 #V\n", - "t_r=1*10**-6 #s\n", - "I_CS=80 #A\n", - "\n", - "#Calculations\n", - "P_r=f*I_CS*t_r*(V_CC/2-(V_CC-V_CES)/3) #avg power loss during rise time\n", - "t_m=V_CC*t_r/(2*(V_CC-V_CES))\n", - "P_rm=I_CS*V_CC**2/(4*(V_CC-V_CES)) #instant. power loss during rise time\n", - "\n", - "#Results\n", - "P_on=P_d+P_r \n", - "print(\"Avg power loss during turn on = %.2f W\" %P_on)\n", - "P_nt=I_CS*V_CES \n", - "print(\"Instantaneous power loss during turn on = %.0f W\" %P_nt)\n", - "t_n=50*10**-6\n", - "P_n=f*I_CS*V_CES*t_n\n", - "print(\"Avg power loss during conduction period = %.0f W\" %P_n)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Avg power loss during turn on = 14.93 W\n", - "Instantaneous power loss during turn on = 160 W\n", - "Avg power loss during conduction period = 40 W\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 Page No 26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_CEO=2*10**-3 #A\n", - "V_CC=220 #V\n", - "t_d=.4*10**-6 #s\n", - "f=5000\n", - "V_CES=2 #V\n", - "t_r=1*10**-6 #s\n", - "I_CS=80 #A\n", - "t_n=50*10**-6 #s\n", - "t_0=40*10**-6 #s\n", - "t_f=3*10**-6 #s\n", - "\n", - "#Calculations\n", - "P_st=I_CS*V_CES # instant. power loss during t_s\n", - "P_s=f*I_CS*V_CES*t_f #avg power loss during t_s\n", - "P_f=f*t_f*(I_CS/6)*(V_CC-V_CES) #avg power loss during fall time\n", - "P_fm=(I_CS/4)*(V_CC-V_CES) #peak instant power dissipation\n", - "P_off=P_s+P_f\n", - "\n", - "#Results\n", - "print(\"Total avg power loss during turn off = %.2f W\" %P_off)\n", - "P_0t=I_CEO*V_CC\n", - "print(\"Instantaneous power loss during t_0 = %.2f W\" %P_0t)\n", - "P_0=f*I_CEO*V_CC*t_0 #avg power loss during t_s\n", - "P_on=14.9339 #W from previous eg\n", - "P_n=40 #W from previous eg\n", - "P_T=P_on+P_n+P_off+P_0 \n", - "print(\"Total power loss = %.2f W\" %P_T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total avg power loss during turn off = 44.91 W\n", - "Instantaneous power loss during t_0 = 0.44 W\n", - "Total power loss = 99.93 W\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4, Page No 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_CS=100.0 \n", - "V_CC=200.0 \n", - "t_on=40*10**-6\n", - "\n", - "#Calculations\n", - "P_on=(I_CS/50)*10**6*t_on*(V_CC*t_on/2-(V_CC*10**6*t_on**2/(40*3))) #energy during turn on\n", - "t_off=60*10**-6\n", - "P_off=(I_CS*t_off/2-(I_CS/60)*10**6*(t_off**2)/3)*((V_CC/75)*10**6*t_off) #energy during turn off\n", - "P_t=P_on+P_off #total energy\n", - "P_avg=300.0\n", - "f=P_avg/P_t\n", - "\n", - "#Results\n", - "print(\"Allowable switching frequency = %.2f Hz\" %f)\n", - "#in book ans is: f=1123.6 Hz. The difference in results due to difference in rounding of of digits" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Allowable switching frequency = 1125.00 Hz\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter3.ipynb b/Power_Electronics/chapter3.ipynb deleted file mode 100755 index 2e53ef9d..00000000 --- a/Power_Electronics/chapter3.ipynb +++ /dev/null @@ -1,1001 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 03 : Diode Circuits and Rectifiers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2, Page No 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0 #V\n", - "V_o=100.0 #V\n", - "L=100.0 #uH\n", - "C=30.0 #uF\n", - "\n", - "#Calculations\n", - "t_o=math.pi*math.sqrt(L*C)\n", - "print(\"conduction time of diode = %.2f us\" %t_o)\n", - "#in book solution is t_o=54.77 us. The ans is incorrect as %pi is not muliplied in ans. Formulae mentioned in correct.\n", - "I_p=(V_s-V_o)*math.sqrt(C/L)\n", - "\n", - "#Results\n", - "print(\"Peak current through diode=%.2f A\" %I_p)\n", - "v_D=-V_s+V_o \n", - "print(\"Voltage across diode = %.2f V\" %v_D)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "conduction time of diode = 172.07 us\n", - "Peak current through diode=164.32 A\n", - "Voltage across diode = -300.00 V\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, Page No 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "R=10 #ohm\n", - "L=0.001 #H\n", - "C=5*10**-6 #F\n", - "V_s=230 #V\n", - "xi=R/(2*L)\n", - "\n", - "#Calculations\n", - "w_o=1/math.sqrt(L*C)\n", - "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n", - "t=math.pi/w_r \n", - "\n", - "#Results\n", - "print('Conduction time of diode=%.3f us'%(t*10**6))\n", - "t=0\n", - "di=V_s/L\n", - "print('Rate of change of current at t=0 is %.2f A/s' %di)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Conduction time of diode=237.482 us\n", - "Rate of change of current at t=0 is 230000.00 A/s\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7 Page No 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I_or=100 #A\n", - "R=1.0 #assumption\n", - "\n", - "#Calculations\n", - "V_m=I_or*2*R\n", - "I_o=V_m/(math.pi*R)\n", - "q=200 #Ah\n", - "t=q/I_o\n", - "\n", - "#Results\n", - "print(\"time required to deliver charge=%.02f hrs\" %t)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "time required to deliver charge=3.14 hrs\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page No 70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0 #V\n", - "P=1000 #W\n", - "R=V_s**2/P\n", - "\n", - "#Calculations\n", - "V_or=math.sqrt(2)*V_s/2\n", - "P_h=V_or**2/R \n", - "print(\"Power delivered to the heater = %.2f W\" %P_h)\n", - "V_m=math.sqrt(2)*230\n", - "I_m=V_m/R\n", - "\n", - "#Results\n", - "print(\"Peak value of diode current = %.2f A\" %I_m)\n", - "pf=V_or/V_s\n", - "print(\"Input power factor=%.2f\" %pf)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power delivered to the heater = 500.00 W\n", - "Peak value of diode current = 6.15 A\n", - "Input power factor=0.71\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9 Page No 71" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230 #V\n", - "V_m=V_s*math.sqrt(2)\n", - "E=150 #V\n", - "\n", - "#Calculations\n", - "theta1=math.degrees(E/(math.sqrt(2)*V_s))\n", - "R=8 #ohm\n", - "f=50 #Hz\n", - "I_o=(1/(2*math.pi*R))*((2*math.sqrt(2)*V_s*math.cos(math.radians(theta1)))-E*(math.pi-2*theta1*math.pi/180))\n", - "\n", - "#Results\n", - "print(\"avg value of charging current=%.2f A\" %I_o)\n", - "P_d=E*I_o\n", - "print(\"\\npower delivered to battery=%.2f W\" %P_d)\n", - "I_or=math.sqrt((1/(2*math.pi*R**2))*((V_s**2+E**2)*(math.pi-2*theta1*math.pi/180)+V_s**2*math.sin(math.radians(2*theta1))-4*V_m*E*math.cos(math.radians(theta1))))\n", - "print(\"\\nrms value of the load current=%.2f A\" %I_or)\n", - "pf=(E*I_o+I_or**2*R)/(V_s*I_or)\n", - "print(\"\\nsupply pf=%.3f\" %pf)\n", - "P_dd=I_or**2*R\n", - "print(\"\\npower dissipated in the resistor=%.2f W\" %P_dd)\n", - "q=1000.00 #Wh\n", - "t=q/P_d \n", - "print(\"\\ncharging time=%.2f hr\" %t)\n", - "n=P_d*100/(P_d+P_dd)\n", - "print(\"rectifier efficiency =%.2f \" %n)\n", - "PIV=math.sqrt(2)*V_s+E\n", - "print(\"PIV of diode=%.2f V\" %PIV)\n", - "#solutions have small variations due to difference in rounding off of digits" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg value of charging current=4.97 A\n", - "\n", - "power delivered to battery=745.11 W\n", - "\n", - "rms value of the load current=9.29 A\n", - "\n", - "supply pf=0.672\n", - "\n", - "power dissipated in the resistor=690.74 W\n", - "\n", - "charging time=1.34 hr\n", - "rectifier efficiency =51.89 \n", - "PIV of diode=475.27 V\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10 Page No 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_s=230 #V\n", - "t_rr=40*10**-6 #s reverde recovery time\n", - "\n", - "#Calculations\n", - "V_o=2*math.sqrt(2)*V_s/math.pi\n", - "V_m=math.sqrt(2)*V_s\n", - "f=50\n", - "V_r1=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n", - "v_avg1=V_r1*100/V_o*10**3\n", - "f=2500\n", - "V_r2=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n", - "v_avg2=V_r2*100/V_o\n", - "\n", - "#Results\n", - "print(\"when f=50Hz\")\n", - "print(\"Percentage reduction in avg o/p voltage=%.2f x 10^-3\" %v_avg1)\n", - "print(\"when f=2500Hz\")\n", - "print(\"Percentage reduction in avg o/p voltage = %.3f\" %v_avg2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when f=50Hz\n", - "Percentage reduction in avg o/p voltage=3.95 x 10^-3\n", - "when f=2500Hz\n", - "Percentage reduction in avg o/p voltage = 9.549\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11, Page No 79 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230 #V\n", - "R=10.0 #ohm\n", - "\n", - "#Calculations\n", - "V_m=math.sqrt(2)*V_s\n", - "V_o=2*V_m/math.pi\n", - "print(\"Avg value of o/p voltage = %.2f V\" %V_o)\n", - "I_o=V_o/R\n", - "print(\"Avg value of o/p current = %.2f A\" %I_o)\n", - "I_DA=I_o/2\n", - "print(\"Avg value of diode current=%.2f A\" %I_DA)\n", - "I_Dr=I_o/math.sqrt(2) \n", - "\n", - "#Results\n", - "print(\"rms value of diode current=%.2f A\" %I_Dr)\n", - "print(\"rms value of o/p current = %.2f A\" %I_o)\n", - "print(\"rms value of i/p current = %.2f A\" %I_o)\n", - "pf=(V_o/V_s)\n", - "print(\"supply pf = %.2f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Avg value of o/p voltage = 207.07 V\n", - "Avg value of o/p current = 20.71 A\n", - "Avg value of diode current=10.35 A\n", - "rms value of diode current=14.64 A\n", - "rms value of o/p current = 20.71 A\n", - "rms value of i/p current = 20.71 A\n", - "supply pf = 0.90\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.12 Page No 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "V_s=230.0 #V\n", - "R=1000.0 #ohm\n", - "R_D=20.0 #ohm\n", - "\n", - "#Calculations\n", - "V_m=math.sqrt(2)*V_s\n", - "I_om=V_m/(R+R_D) \n", - "\n", - "#Results\n", - "print(\"Peak load current = %.2f A\" %I_om)\n", - "I_o=I_om/math.pi\n", - "print(\"dc load current = %.2f A\" %I_o)\n", - "V_D=I_o*R_D-V_m/math.pi\n", - "print(\"dc diode voltage = %.2f V\" %V_D)\n", - "V_on=V_m/math.pi\n", - "print(\"at no load, load voltage = %.2f V\" %V_on)\n", - "V_o1=I_o*R \n", - "print(\"at given load, load voltage = %.2f V\" %V_o1)\n", - "vr=(V_on-V_o1)*100/V_on \n", - "print(\"Voltage regulation(in percent)=%.2f\" %vr)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak load current = 0.32 A\n", - "dc load current = 0.10 A\n", - "dc diode voltage = -101.51 V\n", - "at no load, load voltage = 103.54 V\n", - "at given load, load voltage = 101.51 V\n", - "Voltage regulation(in percent)=1.96\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.13 Page No 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_L=6.8 #V\n", - "V_smax=20*1.2 #V\n", - "V_smin=20*.8 #V\n", - "I_Lmax=30*1.5 #mA\n", - "I_Lmin=30*0.5 #mA\n", - "I_z=1 #mA\n", - "\n", - "#Calculations\n", - "R_smax=(V_smax-V_L)/((I_Lmin+I_z)*10**-3)\n", - "print(\"max source resistance = %.2f ohm\" %R_smax)\n", - "R_smin=(V_smin-V_L)/((I_Lmax+I_z)*10**-3) \n", - "print(\"Min source resistance = %.2f ohm\" %R_smin) #in book solution, error is committed in putting the values in formulea(printing error) but solution is correct\n", - "R_Lmax=V_L*1000/I_Lmin\n", - "print(\"Max load resistance = %.2f ohm\" %R_Lmax)\n", - "R_Lmin=V_L*1000/I_Lmax \n", - "V_d=0.6 #V\n", - "V_r=V_L-V_d\n", - "\n", - "#Results\n", - "print(\"Min load resistance=%.2f ohm\" %R_Lmin)\n", - "print(\"Voltage rating of zener diode=%.2f V\" %V_r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "max source resistance = 1075.00 ohm\n", - "Min source resistance = 200.00 ohm\n", - "Max load resistance = 453.33 ohm\n", - "Min load resistance=151.11 ohm\n", - "Voltage rating of zener diode=6.20 V\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.14 Page No 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "I2=200*10**-6 #A\n", - "V_z=20 #V\n", - "R_G=500.0 #hm\n", - "\n", - "#Calculations\n", - "R2=(V_z/I2)-R_G\n", - "print(\"R2=%.2f kilo-ohm\" %(R2/1000))\n", - "\n", - "V_v=25 #V\n", - "I1=I2\n", - "R1=(V_v-V_z)/I1\n", - "\n", - "#Results\n", - "print(\"R1=%.0f kilo-ohm\"%(R1/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "R2=99.50 kilo-ohm\n", - "R1=25 kilo-ohm\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15, Page No 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_s=2*230 #V\n", - "\n", - "#Calculations\n", - "V_o=(math.sqrt(2)*V_s)/math.pi\n", - "R=60 #ohm\n", - "P_dc=(V_o)**2/R\n", - "TUF=0.2865\n", - "VA=P_dc/TUF\n", - "\n", - "#RESULTS\n", - "print(\"kVA rating of the transformer = %.2f kVA\" %(VA/1000));\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "kVA rating of the transformer = 2.49 kVA\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.16, Page No 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "tr=0.5 #turns ratio\n", - "I_o=10.0\n", - "V=230.0\n", - "V_s=V/tr\n", - "\n", - "#Calculations\n", - "V_m=math.sqrt(2)*V_s\n", - "V_o=2*V_m/math.pi\n", - "phi1=0\n", - "#displacemnt angle=0 as fundamnetal component of i/p source current in phase with source voltage\n", - "DF=math.cos(math.radians(phi1))\n", - "I_s1=4*I_o/(math.sqrt(2)*math.pi)\n", - "I_s=math.sqrt(I_o**2*math.pi/math.pi)\n", - "CDF=I_s1/I_o\n", - "pf=CDF*DF\n", - "HF=math.sqrt((I_s/I_s1)**2-1)\n", - "CF=I_o/I_s\n", - "\n", - "#Results\n", - "print(\"o/p voltage = %.2f V\" %V_o)\n", - "print(\"distortion factor = %.2f\" %DF)\n", - "print(\"i/p pf=%.2f\" %pf)\n", - "print(\"Current displacent factor=%.2f\" %CDF)\n", - "print(\"Harmonic factor = %.2f\" %HF)\n", - "print(\"Creast factor = %.2f\" %CF)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "o/p voltage = 414.15 V\n", - "distortion factor = 1.00\n", - "i/p pf=0.90\n", - "Current displacent factor=0.90\n", - "Harmonic factor = 0.48\n", - "Creast factor = 1.00\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.17, Page No 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_o=230.0\n", - "R=10.0\n", - "V_s=V_o*math.pi/(2*math.sqrt(2))\n", - "I_o=V_o/R\n", - "I_m=math.sqrt(2)*V_s/R\n", - "I_DAV=I_m/math.pi\n", - "\n", - "#Calculations\n", - "#avg value of diode current\n", - "I_Dr=I_m/2\n", - "PIV=math.sqrt(2)*V_s\n", - "I_s=I_m/math.sqrt(2)\n", - "TF=V_s*I_s\n", - "\n", - "#Results\n", - "print(\"peak diode current=%.2f A\" %I_m)\n", - "print(\"I_DAV=%.2f A\" %I_DAV)\n", - "print(\"I_Dr=%.2f A\" %I_Dr) #rms value of diode current\n", - "print(\"PIV=%.1f V\" %PIV)\n", - "print(\"Transformer rating = %.2f kVA\" %(TF/1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "peak diode current=36.13 A\n", - "I_DAV=11.50 A\n", - "I_Dr=18.06 A\n", - "PIV=361.3 V\n", - "Transformer rating = 6.53 kVA\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.18, Page No 103" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "tr=5\n", - "V=1100.0\n", - "R=10.0\n", - "\n", - "\n", - "#Calculations\n", - "print(\"In case of 3ph-3pulse type\")\n", - "V_ph=V/tr\n", - "V_mp=math.sqrt(2)*V_ph\n", - "V_o=3*math.sqrt(3)*V_mp/(2*math.pi)\n", - "print(\"avg o/p voltage=%.1f V\" %V_o)\n", - "I_mp=V_mp/R\n", - "I_D=(I_mp/math.pi)*math.sin(math.pi/3) \n", - "print(\"\\navg value of diode current=%.3f A\" %I_D)\n", - "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3))) \n", - "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n", - "V_or=V_mp*math.sqrt((3/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3)))\n", - "P=(V_or**2)/R \n", - "print(\"\\npower delivered=%.1f W\" %P)\n", - "print(\"in case of 3ph-M6 type\")\n", - "V_ph=V_ph/2\n", - "V_mp=math.sqrt(2)*V_ph\n", - "V_o=3*V_mp/(math.pi) \n", - "I_mp=V_mp/R\n", - "I_D=(I_mp/math.pi)*math.sin(math.pi/6) \n", - "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6))) \n", - "V_or=V_mp*math.sqrt((6/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6)))\n", - "P=(V_or**2)/R \n", - "\n", - "#Results\n", - "print(\"avg o/p voltage=%.2f V\" %V_o)\n", - "print(\"\\navg value of diode current=%.2f A\" %I_D)\n", - "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n", - "print(\"\\npower delivered=%.0f W\" %P)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In case of 3ph-3pulse type\n", - "avg o/p voltage=257.3 V\n", - "\n", - "avg value of diode current=8.577 A\n", - "\n", - "rms value of diode current=15.10 A\n", - "\n", - "power delivered=6841.3 W\n", - "in case of 3ph-M6 type\n", - "avg o/p voltage=148.55 V\n", - "\n", - "avg value of diode current=2.48 A\n", - "\n", - "rms value of diode current=6.07 A\n", - "\n", - "power delivered=2211 W\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.19, Page No 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_o=400\n", - "R=10\n", - "\n", - "#Calculations\n", - "V_ml=V_o*math.pi/3\n", - "V_s=V_ml/(math.sqrt(2)*math.sqrt(3))\n", - "I_m=V_ml/R\n", - "I_s=.7804*I_m\n", - "tr=3*V_s*I_s \n", - "\n", - "#Results\n", - "print(\"transformer rating=%.1f VA\" %tr)\n", - "I_Dr=.5518*I_m \n", - "print(\"\\nrms value of diode current=%.3f A\" %I_Dr)\n", - "I_D=I_m/math.pi \n", - "print(\"\\navg value of diode current=%.3f A\" %I_D)\n", - "print(\"\\npeak diode current=%.2f A\" %I_m)\n", - "PIV=V_ml \n", - "print(\"\\nPIV=%.2f V\" %PIV)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "transformer rating=16770.3 VA\n", - "\n", - "rms value of diode current=23.114 A\n", - "\n", - "avg value of diode current=13.333 A\n", - "\n", - "peak diode current=41.89 A\n", - "\n", - "PIV=418.88 V\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.20, Page No 116" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_l=230\n", - "E=240\n", - "R=8\n", - "\n", - "#Calculations\n", - "V_ml=math.sqrt(2)*V_l\n", - "V_o=3*V_ml/math.pi\n", - "I_o=(V_o-E)/R\n", - "P_b=E*I_o \n", - "P_d=E*I_o+I_o**2*R \n", - "phi1=0\n", - "math.cos(math.radians(phi1))\n", - "I_s1=2*math.sqrt(3)*I_o/(math.sqrt(2)*math.pi)\n", - "I_s=math.sqrt(I_o**2*2*math.pi/(3*math.pi))\n", - "CDF=I_s1/I_s \n", - "pf=DF*CDF \n", - "HF=math.sqrt(CDF**-2-1) \n", - "tr=math.sqrt(3)*V_l*I_o*math.sqrt(2/3)\n", - "\n", - "#Results\n", - "print(\"Power delivered to battery=%.1f W\" %P_b)\n", - "print(\"Power delivered to load=%.2f W\" %P_d)\n", - "print(\"Displacement factor=%.2f\" %DF)\n", - "print(\"Current distortion factor=%.3f\" %CDF)\n", - "print(\"i/p pf=%.3f\"%pf)\n", - "print(\"Harmonic factor=%.2f\" %HF)\n", - "print(\"Tranformer rating=%.2f VA\" %tr)\n", - "#answers have small variations from the book due to difference in rounding off of digits" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power delivered to battery=2118.3 W\n", - "Power delivered to load=2741.48 W\n", - "Displacement factor=1.00\n", - "Current distortion factor=0.955\n", - "i/p pf=0.955\n", - "Harmonic factor=0.31\n", - "Tranformer rating=0.00 VA\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.21, Page No 122" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=50 #Hz\n", - "V=230.0\n", - "\n", - "#Calculations\n", - "V_m=math.sqrt(2)*V\n", - "R=400.0\n", - "RF=0.05\n", - "C=(1/(4*f*R))*(1+(1/(math.sqrt(2)*RF)))\n", - "\n", - "#Results\n", - "print(\"capacitor value=%.2f uF\" %(C/10**-6))\n", - "V_o=V_m*(1-1/(4*f*R*C))\n", - "print(\"o/p voltage with filter=%.2f V\" %V_o)\n", - "V_o=2*V_m/math.pi \n", - "print(\"o/p voltage without filter=%.2f V\" %V_o)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "capacitor value=189.28 uF\n", - "o/p voltage with filter=303.79 V\n", - "o/p voltage without filter=207.07 V\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.22, Page No 122" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=50\n", - "CRF=0.05\n", - "R=300\n", - "\n", - "#Calculations\n", - "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n", - "print(\"L=%.2f H\" %L)\n", - "R=30\n", - "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n", - "\n", - "\n", - "#Results\n", - "print(\"\\nL=%.2f H\" %L)\n", - "L=0\n", - "CRF=.4715*R/math.sqrt(R**2+(2*2*math.pi*f*L)**2) \n", - "print(\"\\nCRF=%.2f\" %CRF)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "L=4.48 H\n", - "\n", - "L=0.45 H\n", - "\n", - "CRF=0.47\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.23, Page No 127" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=50\n", - "L_L=10*10**-3\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "\n", - "#Calculations\n", - "C=10/(2*w*math.sqrt(R**2+(2*w*L_L)**2))\n", - "\n", - "#Results\n", - "print(\"C=%.2f uF\" %(C*10**6))\n", - "VRF=0.1\n", - "L=(1/(4*w**2*C))*((math.sqrt(2)/(3*VRF))+1)\n", - "print(\"\\nL=%.2f mH\" %(L*10**3))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "C=315.83 uF\n", - "\n", - "L=45.83 mH\n" - ] - } - ], - "prompt_number": 44 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter4.ipynb b/Power_Electronics/chapter4.ipynb deleted file mode 100755 index 22311574..00000000 --- a/Power_Electronics/chapter4.ipynb +++ /dev/null @@ -1,946 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 04 : Thyristors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3, Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "P=.5 #P=V_g*I_g\n", - "s=130 #s=V_g/I_g\n", - "\n", - "#Calculations\n", - "I_g=math.sqrt(P/s)\n", - "V_g=s*I_g\n", - "E=15\n", - "R_s=(E-V_g)/I_g \n", - "\n", - "#Results\n", - "print(\"Gate source resistance=%.2f ohm\" %R_s)\n", - "#Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Gate source resistance=111.87 ohm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.4, Page No 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "R_s=120 #slope of load line is -120V/A. This gives gate source resistance\n", - "print(\"gate source resistance=%.0f ohm\" %R_s)\n", - "\n", - "P=.4 #P=V_g*I_g\n", - "E_s=15\n", - "\n", - "#Calculations\n", - " #E_s=I_g*R_s+V_g % after solving this\n", - " #120*I_g**2-15*I_g+0.4=0 so\n", - "a=120 \n", - "b=-15\n", - "c=0.4\n", - "D=math.sqrt((b**2)-4*a*c)\n", - "I_g=(-b+D)/(2*a) \n", - "V_g=P/I_g\n", - "\n", - "#Results\n", - "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n", - "print(\"\\nthen trigger voltage=%.3f V\" %V_g)\n", - "I_g=(-b-D)/(2*a) \n", - "V_g=P/I_g\n", - "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n", - "print(\"\\nthen trigger voltage=%.2f V\" %V_g)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "gate source resistance=120 ohm\n", - "\n", - "trigger current=86.44 mA\n", - "\n", - "then trigger voltage=4.628 V\n", - "\n", - "trigger current=38.56 mA\n", - "\n", - "then trigger voltage=10.37 V\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.5 Page No 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "#V_g=1+10*I_g\n", - "P_gm=5 #P_gm=V_g*I_g\n", - "#after solving % eqn becomes 10*I_g**2+I_g-5=0\n", - "a=10.0 \n", - "b=1.0 \n", - "c=-5\n", - "\n", - "#Calculations\n", - "I_g=(-b+math.sqrt(b**2-4*a*c))/(2*a)\n", - "E_s=15\n", - "#using E_s=R_s*I_g+V_g\n", - "R_s=(E_s-1)/I_g-10 \n", - "P_gav=.3 #W\n", - "T=20*10**-6\n", - "f=P_gav/(P_gm*T)\n", - "dl=f*T\n", - "\n", - "#Results\n", - "print(\"Reistance=%.3f ohm\" %R_s)\n", - "print(\"Triggering freq=%.0f kHz\" %(f/1000))\n", - "print(\"Tduty cycle=%.2f\" %dl)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reistance=11.248 ohm\n", - "Triggering freq=3 kHz\n", - "Tduty cycle=0.06\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.6, Page No 151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I=.1\n", - "E=200.0\n", - "L=0.2\n", - "\n", - "#Calculations\n", - "t=I*L/E \n", - "R=20.0\n", - "t1=(-L/R)*math.log(1-(R*I/E)) \n", - "L=2.0\n", - "t2=(-L/R)*math.log(1-(R*I/E)) \n", - "\n", - "#Results\n", - "print(\"in case load consists of (a)L=.2H\")\n", - "print(\"min gate pulse width=%.0f us\" %(t*10**6))\n", - "print(\"(b)R=20ohm in series with L=.2H\")\n", - "print(\"min gate pulse width=%.3f us\" %(t1*10**6))\n", - "print(\"(c)R=20ohm in series with L=2H\")\n", - "print(\"min gate pulse width=%.2f us\" %(t2*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "in case load consists of (a)L=.2H\n", - "min gate pulse width=100 us\n", - "(b)R=20ohm in series with L=.2H\n", - "min gate pulse width=100.503 us\n", - "(c)R=20ohm in series with L=2H\n", - "min gate pulse width=1005.03 us\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.9 Page No 163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "def theta(th):\n", - " I_m=1 #supposition\n", - " I_av=(I_m/(2*math.pi))*(1+math.cos(math.radians(th)))\n", - " I_rms=math.sqrt((I_m/(2*math.pi))*((180-th)*math.pi/360+.25*math.sin(math.radians(2*th))))\n", - " FF=I_rms/I_av\n", - " I_rms=35\n", - " I_TAV=I_rms/FF\n", - " return I_TAV\n", - "\n", - "#Calculations\n", - "print(\"when conduction angle=180\")\n", - "th=0\n", - "I_TAV=theta(th)\n", - "print(\"avg on current rating=%.3f A\" %I_TAV)\n", - "print(\"when conduction angle=90\")\n", - "th=90\n", - "I_TAV=theta(th)\n", - "\n", - "#Results\n", - "print(\"avg on current rating=%.3f A\" %I_TAV)\n", - "print(\"when conduction angle=30\")\n", - "th=150\n", - "I_TAV=theta(th)\n", - "print(\"avg on current rating=%.3f A\" %I_TAV)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when conduction angle=180\n", - "avg on current rating=22.282 A\n", - "when conduction angle=90\n", - "avg on current rating=15.756 A\n", - "when conduction angle=30\n", - "avg on current rating=8.790 A\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.10, Page No 164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "def theta(th):\n", - " n=360.0/th\n", - " I=1.0 #supposition\n", - " I_av=I/n\n", - " I_rms=I/math.sqrt(n)\n", - " FF=I_rms/I_av\n", - " I_rms=35\n", - " I_TAV=I_rms/FF\n", - " return I_TAV\n", - "\n", - "#Calculations\n", - "th=180.0\n", - "I_TAV1=theta(th)\n", - "th=90.0\n", - "I_TAV2=theta(th)\n", - "th=30.0\n", - "I_TAV3=theta(th)\n", - "\n", - "#Results\n", - "print(\"when conduction angle=180\")\n", - "print(\"avg on current rating=%.3f A\" %I_TAV)\n", - "print(\"when conduction angle=90\")\n", - "print(\"avg on current rating=%.1f A\" %I_TAV2)\n", - "print(\"when conduction angle=30\")\n", - "print(\"avg on current rating=%.4f A\" %I_TAV3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when conduction angle=180\n", - "avg on current rating=8.790 A\n", - "when conduction angle=90\n", - "avg on current rating=17.5 A\n", - "when conduction angle=30\n", - "avg on current rating=10.1036 A\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.11 Page No 165" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "f=50.0 #Hz\n", - "\n", - "#Calculations\n", - "I_sb=3000.0\n", - "t=1/(4*f)\n", - "T=1/(2*f)\n", - "I=math.sqrt(I_sb**2*t/T) \n", - "r=(I_sb/math.sqrt(2))**2*T \n", - "\n", - "#Results\n", - "print(\"surge current rating=%.2f A\" %I)\n", - "print(\"\\nI**2*t rating=%.0f A^2.s\" %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "surge current rating=2121.32 A\n", - "\n", - "I**2*t rating=45000 A^2.s\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12 Page No 165" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "V_s=300.0 #V\n", - "R=60.0 #ohm\n", - "L=2.0 #H\n", - "\n", - "#Calculations\n", - "t=40*10**-6 #s\n", - "i_T=(V_s/R)*(1-math.exp(-R*t/L))\n", - "i=.036 #A\n", - "R1=V_s/(i-i_T)\n", - "\n", - "#Results\n", - "print(\"maximum value of remedial parameter=%.3f kilo-ohm\" %(R1/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum value of remedial parameter=9.999 kilo-ohm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.16 Page No 172" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_p=230.0*math.sqrt(2)\n", - "\n", - "#Calculations\n", - "R=1+((1)**-1+(10)**-1)**-1\n", - "A=V_p/R\n", - "s=1 #s\n", - "t_c=20*A**-2*s\n", - "\n", - "#Results\n", - "print(\"fault clearance time=%.4f ms\" %(t_c*10**3))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fault clearance time=0.6890 ms\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.17, Page No 176" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "V_s=math.sqrt(2)*230 #V\n", - "L=15*10**-6 #H\n", - "I=V_s/L #I=(di/dt)_max\n", - "R_s=10 #ohm\n", - "v=I*R_s #v=(dv/dt)_max\n", - "\n", - "#Calculations\n", - "f=50 #Hz\n", - "X_L=L*2*math.pi*f\n", - "R=2\n", - "I_max=V_s/(R+X_L) \n", - "FF=math.pi/math.sqrt(2)\n", - "I_TAV1=I_max/FF \n", - "FF=3.98184\n", - "I_TAV2=I_max/FF \n", - "\n", - "\n", - "#RESULTS\n", - "print(\"(di/dt)_max=%.3f A/usec\" %(I/10**6))\n", - "print(\"\\n(dv/dt)_max=%.2f V/usec\" %(v/10**6))\n", - "print(\"\\nI_rms=%.3f A\" %I_max)\n", - "print(\"when conduction angle=90\")\n", - "print(\"I_TAV=%.3f A\" %I_TAV1)\n", - "print(\"when conduction angle=30\")\n", - "print(\"I_TAV=%.3f A\" %I_TAV2)\n", - "print(\"\\nvoltage rating=%.3f V\" %(2.75*V_s)) #rating is taken 2.75 times of peak working voltage unlike 2.5 to 3 times as mentioned int book." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(di/dt)_max=21.685 A/usec\n", - "\n", - "(dv/dt)_max=216.85 V/usec\n", - "\n", - "I_rms=162.252 A\n", - "when conduction angle=90\n", - "I_TAV=73.039 A\n", - "when conduction angle=30\n", - "I_TAV=40.748 A\n", - "\n", - "voltage rating=894.490 V\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19, Page No 186" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "T_jm=125\n", - "th_jc=.15 #degC/W\n", - "th_cs=0.075 #degC/W\n", - "\n", - "\n", - "#Calculations\n", - "dT=54 #dT=T_s-T_a\n", - "P_av=120\n", - "th_sa=dT/P_av\n", - "T_a=40 #ambient temp\n", - "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n", - "if (P_av-120)<1 :\n", - " print(\"selection of heat sink is satisfactory\")\n", - "\n", - "dT=58 #dT=T_s-T_a\n", - "P_av=120\n", - "th_sa=dT/P_av\n", - "T_a=40 #ambient temp\n", - "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n", - "if (P_av-120)<1 :\n", - " print(\"selection of heat sink is satisfactory\")\n", - "\n", - "V_m=math.sqrt(2)*230\n", - "R=2\n", - "I_TAV=V_m/(R*math.pi)\n", - "P_av=90\n", - "th_sa=(T_jm-T_a)/P_av-(th_jc+th_cs)\n", - "dT=P_av*th_sa\n", - "print(\"for heat sink\") \n", - "print(\"T_s-T_a=%.2f degC\" %dT) \n", - "print(\"\\nP_av=%.0f W\" %P_av)\n", - "P=(V_m/2)**2/R\n", - "eff=P/(P+P_av) \n", - "print(\"\\nckt efficiency=%.3f pu\" %eff)\n", - "a=60 #delay angle\n", - "I_TAV=(V_m/(2*math.pi*R))*(1+math.cos(math.radians(a)))\n", - "print(\"\\nI_TAV=%.2f A\" %I_TAV)\n", - "dT=46\n", - "T_s=dT+T_a\n", - "T_c=T_s+P_av*th_cs \n", - "T_j=T_c+P_av*th_jc \n", - "\n", - "#Results\n", - "print(\"\\ncase temp=%.2f degC\" %T_c)\n", - "print(\"\\njunction temp=%.2f degC\" %T_j)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for heat sink\n", - "T_s-T_a=-20.25 degC\n", - "\n", - "P_av=90 W\n", - "\n", - "ckt efficiency=0.993 pu\n", - "\n", - "I_TAV=38.83 A\n", - "\n", - "case temp=92.75 degC\n", - "\n", - "junction temp=106.25 degC\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.20, Page No 187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T_j=125.0 #degC\n", - "T_s=70.0 #degC\n", - "th_jc=.16 #degC/W\n", - "th_cs=.08 #degC/W\n", - "\n", - "#Calculations\n", - "P_av1=(T_j-T_s)/(th_jc+th_cs) \n", - "\n", - "T_s=60 #degC\n", - "P_av2=(T_j-T_s)/(th_jc+th_cs) \n", - "inc=(math.sqrt(P_av2)-math.sqrt(P_av1))*100/math.sqrt(P_av1) \n", - "\n", - "#Results\n", - "print(\"Total avg power loss in thristor sink combination=%.2f W\" %P_av1)\n", - "print(\"Percentage inc in rating=%.2f\" %inc)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total avg power loss in thristor sink combination=229.17 W\n", - "Percentage inc in rating=8.71\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.21, Page No 197" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "R=25000.0\n", - "I_l1=.021 #I_l=leakage current\n", - "I_l2=.025\n", - "I_l3=.018\n", - "I_l4=.016\n", - " #V1=(I-I_l1)*R\n", - " #V2=(I-I_l2)*R\n", - " #V3=(I-I_l3)*R\n", - " #V4=(I-I_l4)*R\n", - " #V=V1+V2+V3+V4\n", - " \n", - "#Calculations\n", - "V=10000.0\n", - "I_l=I_l1+I_l2+I_l3+I_l4\n", - " #after solving\n", - "I=((V/R)+I_l)/4\n", - "R_c=40.0\n", - "V1=(I-I_l1)*R \n", - "\n", - "#Resluts\n", - "print(\"voltage across SCR1=%.0f V\" %V1)\n", - "V2=(I-I_l2)*R \n", - "print(\"\\nvoltage across SCR2=%.0f V\" %V2)\n", - "V3=(I-I_l3)*R \n", - "print(\"\\nvoltage across SCR3=%.0f V\" %V3)\n", - "V4=(I-I_l4)*R \n", - "print(\"\\nvoltage across SCR4=%.0f V\" %V4)\n", - "\n", - "I1=V1/R_c \n", - "print(\"\\ndischarge current through SCR1=%.3f A\" %I1)\n", - "I2=V2/R_c \n", - "print(\"\\ndischarge current through SCR2=%.3f A\" %I2)\n", - "I3=V3/R_c \n", - "print(\"\\ndischarge current through SCR3=%.3f A\" %I3)\n", - "I4=V4/R_c \n", - "print(\"\\ndischarge current through SCR4=%.3f A\" %I4)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "voltage across SCR1=2475 V\n", - "\n", - "voltage across SCR2=2375 V\n", - "\n", - "voltage across SCR3=2550 V\n", - "\n", - "voltage across SCR4=2600 V\n", - "\n", - "discharge current through SCR1=61.875 A\n", - "\n", - "discharge current through SCR2=59.375 A\n", - "\n", - "discharge current through SCR3=63.750 A\n", - "\n", - "discharge current through SCR4=65.000 A\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.22, Page No 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_r=1000 #rating of SCR\n", - "I_r=200 #rating of SCR\n", - "V_s=6000 #rating of String\n", - "I_s=1000 #rating of String\n", - "\n", - "#Calculations\n", - "print(\"when DRF=.1\")\n", - "DRF=.1\n", - "n_s=V_s/(V_r*(1-DRF)) \n", - "print(\"number of series units=%.0f\" %math.ceil(n_s))\n", - "n_p=I_s/(I_r*(1-DRF)) \n", - "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))\n", - "print(\"when DRF=.2\")\n", - "DRF=.2\n", - "\n", - "#Results\n", - "n_s=V_s/(V_r*(1-DRF)) \n", - "print(\"number of series units=%.0f\" %math.ceil(n_s))\n", - "n_p=I_s/(I_r*(1-DRF)) \n", - "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when DRF=.1\n", - "number of series units=7\n", - "\n", - "number of parrallel units=6\n", - "when DRF=.2\n", - "number of series units=8\n", - "\n", - "number of parrallel units=7\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.23, Page No 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V1=1.6 #on state voltage drop of SCR1\n", - "V2=1.2 #on state voltage drop of SCR2\n", - "I1=250.0 #current rating of SCR1\n", - "I2=350.0 #current rating of SCR2\n", - "\n", - "#Calculations\n", - "R1=V1/I1\n", - "R2=V2/I2\n", - "I=600.0 #current to be shared\n", - " #for SCR1 % I*(R1+R)/(total resistance)=k*I1 (1)\n", - " #for SCR2 % I*(R2+R)/(total resistance)=k*I2 (2)\n", - " #(1)/(2)\n", - "R=(R2*I2-R1*I1)/(I1-I2)\n", - "\n", - "\n", - "#Results\n", - "print(\"RSequired value of resistance=%.3f ohm\" %R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "RSequired value of resistance=0.004 ohm\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.25, Page No 223" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=2000.0 #Hz\n", - "C=0.04*10**-6\n", - "n=.72\n", - "\n", - "#Calculations\n", - "R=1/(f*C*math.log(1/(1-n))) \n", - "V_p=18\n", - "V_BB=V_p/n\n", - "R2=10**4/(n*V_BB) \n", - "I=4.2*10**-3 #leakage current\n", - "R_BB=5000\n", - "R1=(V_BB/I)-R2-R_BB\n", - "\n", - "#Results\n", - "print(\"R=%.2f kilo-ohm\" %(R/1000))\n", - "print(\"\\nR2=%.2f ohm\" %R2)\n", - "print(\"\\nR1=%.0f ohm\" %R1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "R=9.82 kilo-ohm\n", - "\n", - "R2=555.56 ohm\n", - "\n", - "R1=397 ohm\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.26, Page No 223" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "\n", - "V_p=18.0\n", - "n=.72\n", - "V_BB=V_p/n\n", - "I_p=.6*10**-3\n", - "I_v=2.5*10**-3\n", - "V_v=1\n", - "\n", - "#Calculations\n", - "R_max=V_BB*(1-n)/I_p \n", - "print(\"R_max=%.2f kilo-ohm\" %(R_max/1000))\n", - "R_min=(V_BB-V_v)/I_v \n", - "print(\"\\nR_min=%.2f kilo-ohm\" %(R_min/1000))\n", - "\n", - "C=.04*10**-6\n", - "f_min=1/(R_max*C*math.log(1/(1-n))) \n", - "print(\"\\nf_min=%.3f kHz\" %(f_min/1000))\n", - "f_max=1/(R_min*C*math.log(1/(1-n))) \n", - "print(\"\\nf_max=%.2f kHz\" %(f_max/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "R_max=11.67 kilo-ohm\n", - "\n", - "R_min=9.60 kilo-ohm\n", - "\n", - "f_min=1.683 kHz\n", - "\n", - "f_max=2.05 kHz\n" - ] - } - ], - "prompt_number": 17 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter5.ipynb b/Power_Electronics/chapter5.ipynb deleted file mode 100755 index 1d261f20..00000000 --- a/Power_Electronics/chapter5.ipynb +++ /dev/null @@ -1,511 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 05 : Thyristor Commutation Techniques" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1, Page No 252" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "L=5.0*10**-3 #mH\n", - "C=20.0*10**-6 #\u00b5F\n", - "V_s=200 #V\n", - "\n", - "#Calculations\n", - "w_o=math.sqrt(1/(L*C)) #rad/s\n", - "t_o=math.pi/w_o #ms\n", - "\n", - "#Results\n", - "print('conduction time of thyristor = %.2f ms' %(t_o*1000))\n", - "print('voltage across thyristor=%.0f V' %V_s)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "conduction time of thyristor = 0.99 ms\n", - "voltage across thyristor=200 V\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2, Page No 255" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "C=20.0*10**-6 #\u00b5F\n", - "L=5.0*10**-6 #\u00b5H\n", - "V_s=230.0 #V\n", - "\n", - "#Calculations\n", - "I_p=V_s*math.sqrt(C/L) #A\n", - "w_o=math.sqrt(1/(L*C)) #rad/sec\n", - "t_o=math.pi/w_o #\u00b5S\n", - "I_o=300 \n", - "a = math.degrees(math.asin(I_o/(2*V_s))) \n", - "V_ab = V_s*math.cos(math.radians(a)) #V \n", - "t_c=C*V_ab/I_o #\u00b5s\n", - "\n", - "#Calculations\n", - "print(\"conduction time of auxillery thyristor=%.2f us\" %(t_o*10**6))\n", - "print(\"voltage across main thyristor=%.2f V\" %V_ab)\n", - "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "conduction time of auxillery thyristor=31.42 us\n", - "voltage across main thyristor=174.36 V\n", - "ckt turn off time=11.62 us\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3 Page No 258" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_s=200.0 #V\n", - "R1=10.0 #\u2126\n", - "R2=100.0 #\u2126\n", - "C=0 # value of capacitor\n", - "\n", - "#Calculations\n", - "I1=V_s*(1/R1+2/R2) #A\n", - "I2=V_s*(2/R1+1/R2) #A\n", - "t_c1=40*10**-6\n", - "fos=2 #factor of safety\n", - "C1=t_c1*fos/(R1*math.log(2))\n", - "C2=t_c1*fos/(R2*math.log(2))\n", - "if C1 > C2 :\n", - " C = C1*10**6\n", - "else :\n", - " C = C2*10**6\n", - "\n", - "\n", - "#Results\n", - "print(\"peak value of current through SCR1=%.2f A\" %I1); \n", - "print(\"Peak value of current through SCR2=%.2f A\" %I2);\n", - "print(\"Value of capacitor=%.2f uF\" %C);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "peak value of current through SCR1=24.00 A\n", - "Peak value of current through SCR2=42.00 A\n", - "Value of capacitor=11.54 uF\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4, Page No 260" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0 #V\n", - "L=20*10**-6 #\u00b5H\n", - "C=40*10**-6 #\u00b5F\n", - "I_o=120.0 #A\n", - "\n", - "#Calculations\n", - "I_p=V_s*math.sqrt(C/L) #A\n", - "t_c=C*V_s/I_o #\u00b5s\n", - "w_o=math.sqrt(1/(L*C)) \n", - "t_c1=math.pi/(2*w_o) #\u00b5s\n", - "\n", - "#Results\n", - "print(\"current through main thyristor=%.2f A\" %(I_o+I_p))\n", - "print(\"Current through auxillery thyristor=%.2f A\" %I_o)\n", - "print(\"Circuit turn off time for main thyristor=%.2f us\" %(t_c*10**6))\n", - "print(\"Circuit turn off time for auxillery thyristor=%.2f us\" %(t_c1*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "current through main thyristor=445.27 A\n", - "Current through auxillery thyristor=120.00 A\n", - "Circuit turn off time for main thyristor=76.67 us\n", - "Circuit turn off time for auxillery thyristor=44.43 us\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5 Page No 263" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "C_j=25*10**-12 #pF\n", - "I_c=5*10**-3 #charging current\n", - "V_s=200.0 #V\n", - "R=50.0 #\u2126\n", - "\n", - "#Calculations\n", - "C=(C_j*V_s)/(I_c*R)\n", - "\n", - "\n", - "#RESULTS\n", - "print(\"Value of C=%.2f \u00b5F\" %(C*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Value of C=0.02 \u00b5F\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6 Page No 263" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "V_s=200.0 #V\n", - "R=5.0 #\u2126\n", - "\n", - "#Calculations\n", - "C=10.0*10**-6\n", - "#for turn off V_s*(1-2*exp(-t/(R*C)))=0, so after solving\n", - "t_c=R*C*math.log(2.0)\n", - "\n", - "#Results\n", - "print(\"circuit turn off time=%.2f us\" %(t_c*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "circuit turn off time=34.66 us\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.7, Page No 264 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=1.0 #\u2126\n", - "L=20*10**-6 #\u00b5H\n", - "C=40*10**-6 #\u00b5F\n", - "\n", - "#Calculations\n", - "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n", - "t_1=math.pi/w_r\n", - "\n", - "#Results\n", - "print(\"conduction time of thyristor=%.3f us\" %(t_1*10**6))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "conduction time of thyristor=125.664 us\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.8 Page No 265" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math \n", - "\n", - "#initialisation of variables\n", - "dv=400*10.0**-6 #dv=dv_T/dt(V/s)\n", - "V_s=200.0 #v\n", - "R=20.0 #\u2126\n", - "\n", - "#Calculations\n", - "C=V_s/(R*dv) \n", - "C_j=.025*10**-12\n", - "C_s=C-C_j\n", - "I_T=40;\n", - "R_s=1/((I_T/V_s)-(1/R)) \n", - "#value of R_s in book is wrongly calculated\n", - "\n", - "#Results\n", - "print(\"R_s=%.2f ohm\" %R_s)\n", - "print(\"C_s=%.3f uF\" %(C_s/10**6))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "R_s=6.67 ohm\n", - "C_s=0.025 uF\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.9 Page No 265" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=200.0 #V\n", - "C=20.0*10**-6 #\u00b5H \n", - "L=0.2*10**-3 #\u00b5F\n", - "i_c=10.0\n", - "\n", - "#Calculations\n", - "i=V_s*math.sqrt(C/L)\n", - "w_o=1.0/math.sqrt(L*C)\n", - "t_1 = (1/w_o)*math.degrees(math.asin(i_c/i))\n", - "t_o=math.pi/w_o\n", - "t_c=t_o-2*t_1 \n", - "\n", - "#Results\n", - "print(\"reqd time=%.2f us\" %(t_1*10**6))\n", - "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n", - "print(\"ckt turn off time=%.5f us\" %t_1)\n", - "#solution in book wrong, as wrong values are selected while filling the formuleas" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "reqd time=575.37 us\n", - "ckt turn off time=-952.05 us\n", - "ckt turn off time=0.00058 us\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.11 Page No 268 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "L=1.0 #\u00b5H\n", - "R=50.0 #\u2126\n", - "V_s=200.0 #V\n", - "t=0.01 #sec\n", - "Vd=0.7\n", - "\n", - "#Calculations\n", - "tau=L/R\n", - "i=(V_s/R)*(1-math.exp(-t/tau))\n", - "t=8*10**-3\n", - "i1=i-t*Vd \n", - "\n", - "\n", - "#Results\n", - "print(\"current through L = %.2f A\" %i1)\n", - "i_R=0 #current in R at t=.008s\n", - "print(\"Current through R = %.2f A\" %i_R)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "current through L = 1.57 A\n", - "Current through R = 0.00 A\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.12, Page No 269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#initialisation of variables\n", - "\n", - "#initialisation of variables\n", - "L=1.0 #H\n", - "R=50.0 #ohm\n", - "V_s=200.0 #V\n", - "\n", - "#Calculations\n", - "tau=L/R\n", - "t=0.01 #s\n", - "i=(V_s/R)*(1-math.exp(-t/tau))\n", - "C=1*10**-6 #F\n", - "V_c=math.sqrt(L/C)*i\n", - "\n", - "#Results\n", - "print(\"current in R,L=%.2f A\" %i)\n", - "print(\"voltage across C=%.2f kV\" %(V_c/1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "current in R,L=1.57 A\n", - "voltage across C=1.57 kV\n" - ] - } - ], - "prompt_number": 22 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter6.ipynb b/Power_Electronics/chapter6.ipynb deleted file mode 100755 index dff6564b..00000000 --- a/Power_Electronics/chapter6.ipynb +++ /dev/null @@ -1,1761 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 06 : Phase Controlled Rectifiers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1, Page No 283" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "P=1000.0\n", - "R=V**2/P\n", - "\n", - "#Calculations\n", - "a=math.pi/4\n", - "V_or1=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n", - "P1=V_or1**2/R \n", - "a=math.pi/2\n", - "V_or2=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n", - "P2=V_or2**2/R \n", - "\n", - "#Results\n", - "print(\"when firing angle delay is of 45deg\")\n", - "print(\"power absorbed=%.2f W\" %P1)\n", - "print(\"when firing angle delay is of 90deg\")\n", - "print(\"power absorbed=%.2f W\" %P2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when firing angle delay is of 45deg\n", - "power absorbed=454.58 W\n", - "when firing angle delay is of 90deg\n", - "power absorbed=250.00 W\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.2, Page No 283" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "E=150.0\n", - "R=8.0\n", - "\n", - "#Calculations\n", - "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n", - "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n", - "P=E*I_o \n", - "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n", - "P_r=I_or**2*R \n", - "pf=(P+P_r)/(V*I_or)\n", - "\n", - "#Results\n", - "print(\"avg charging curent=%.4f A\" %I_o)\n", - "print(\"power supplied to the battery=%.2f W\" %P)\n", - "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n", - "print(\"supply pf=%.3f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg charging curent=3.5679 A\n", - "power supplied to the battery=535.18 W\n", - "power dissipated by the resistor=829.760 W\n", - "supply pf=0.583\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3 Page No 284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "E=150.0\n", - "R=8.0\n", - "a=35.0\n", - "\n", - "#Calculations\n", - "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n", - "th2=180-th1\n", - "I_o=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(th2)))-E*((th2-a)*math.pi/180)) \n", - "P=E*I_o \n", - "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*((th2-a)*math.pi/180)-(V**2/2)*(math.sin(math.radians(2*th2))-math.sin(math.radians(2*a)))-2*math.sqrt(2)*V*E*(math.cos(math.radians(a))-math.cos(math.radians(th2)))))\n", - "P_r=I_or**2*R \n", - "pf=(P+P_r)/(V*I_or) \n", - "\n", - "\n", - "#Results\n", - "print(\"avg charging curent=%.4f A\" %I_o)\n", - "print(\"power supplied to the battery=%.2f W\" %P)\n", - "print(\"power dissipated by the resistor=%.2f W\" %P_r)\n", - "print(\"supply pf=%.4f\" %pf)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg charging curent=4.9208 A\n", - "power supplied to the battery=738.12 W\n", - "power dissipated by the resistor=689.54 W\n", - "supply pf=0.6686\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.4, Page No 285" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "B=210\n", - "f=50.0 #Hz\n", - "w=2*math.pi*f\n", - "a=40.0 #firing angle\n", - "V=230.0\n", - "R=5.0\n", - "L=2*10**-3\n", - "\n", - "#Calculations\n", - "t_c1=(360-B)*math.pi/(180*w) \n", - "V_o1=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n", - "I_o1=V_o1/R \n", - "E=110\n", - "R=5\n", - "L=2*10**-3\n", - "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n", - "t_c2=(360-B+th1)*math.pi/(180*w) \n", - "V_o2=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n", - "I_o2=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(B)))-E*((B-a)*math.pi/180)) \n", - "V_o2=R*I_o2+E \n", - "\n", - "\n", - "#Results\n", - "print(\"for R=5ohm and L=2mH\")\n", - "print(\"ckt turn off time=%.3f msec\" %(t_c1*1000))\n", - "print(\"avg output voltage=%.3f V\" %V_o1)\n", - "print(\"avg output current=%.4f A\" %I_o1)\n", - "print(\"for R=5ohm % L=2mH and E=110V\")\n", - "print(\"ckt turn off time=%.3f msec\" %(t_c2*1000))\n", - "print(\"avg output current=%.4f A\" %I_o2)\n", - "print(\"avg output voltage=%.3f V\" %V_o2) " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for R=5ohm and L=2mH\n", - "ckt turn off time=8.333 msec\n", - "avg output voltage=84.489 V\n", - "avg output current=16.8979 A\n", - "for R=5ohm % L=2mH and E=110V\n", - "ckt turn off time=9.431 msec\n", - "avg output current=6.5090 A\n", - "avg output voltage=142.545 V\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.5 Page No 286" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "f=50.0\n", - "R=10.0\n", - "a=60.0\n", - "\n", - "#Calculations\n", - "V_m=(math.sqrt(2)*V_s)\n", - "V_o=V_m/(2*math.pi)*(1+math.cos(math.radians(a)))\n", - "I_o=V_o/R\n", - "V_or=(V_m/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a*math.pi/180)+.5*math.sin(math.radians(2*a)))\n", - "I_or=V_or/R\n", - "P_dc=V_o*I_o\n", - "P_ac=V_or*I_or\n", - "RE=P_dc/P_ac \n", - "FF=V_or/V_o \n", - "VRF=math.sqrt(FF**2-1) \n", - "TUF=P_dc/(V_s*I_or) \n", - "PIV=V_m \n", - "\n", - "\n", - "#Results\n", - "print(\"rectification efficiency=%.4f\" %RE)\n", - "print(\"form factor=%.3f\" %FF)\n", - "print(\"voltage ripple factor=%.4f\" %VRF)\n", - "print(\"t/f utilisation factor=%.4f\" %TUF)\n", - "print(\"PIV of thyristor=%.2f V\" %PIV)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rectification efficiency=0.2834\n", - "form factor=1.879\n", - "voltage ripple factor=1.5903\n", - "t/f utilisation factor=0.1797\n", - "PIV of thyristor=325.27 V\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.6 Page No 294" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=1000.0\n", - "fos=2.5 #factor of safety\n", - "I_TAV=40.0\n", - "\n", - "#Calculations\n", - "V_m1=V/(2*fos)\n", - "P1=(2*V_m1/math.pi)*I_TAV \n", - "V_m2=V/(fos)\n", - "P2=(2*V_m2/math.pi)*I_TAV \n", - "\n", - "#Results\n", - "print(\"for mid pt convertor\")\n", - "print(\"power handled=%.3f kW\" %(P1/1000))\n", - "print(\"for bridge convertor\")\n", - "print(\"power handled=%.3f kW\" %(P2/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for mid pt convertor\n", - "power handled=5.093 kW\n", - "for bridge convertor\n", - "power handled=10.186 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.7, Page No 297" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "R=.4\n", - "I_o=10\n", - "I_or=I_o\n", - "E=120.0\n", - "\n", - "#Calculations\n", - "a1=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m)))\n", - "pf1=(E*I_o+I_or**2*R)/(V_s*I_or) \n", - "E=-120.0\n", - "a2=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m))) \n", - "pf2=(-E*I_o-I_or**2*R)/(V_s*I_or) \n", - "\n", - "#Results\n", - "print(\"firing angle delay=%.2f deg\" %a1)\n", - "print(\"pf=%.4f\" %pf1)\n", - "print(\"firing angle delay=%.2f deg\" %a2)\n", - "print(\"pf=%.4f\" %pf2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle delay=53.21 deg\n", - "pf=0.5391\n", - "firing angle delay=124.07 deg\n", - "pf=0.5043\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.9 Page No 299" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "f=50.0\n", - "a=45.0\n", - "R=5.0\n", - "E=100.0\n", - "\n", - "#Calculations\n", - "V_o=((math.sqrt(2)*V_s)/(2*math.pi))*(3+math.cos(math.radians(a)))\n", - "I_o=(V_o-E)/R \n", - "P=E*I_o \n", - "\n", - "#Results\n", - "print(\"avg o/p current=%.3f A\" %I_o)\n", - "print(\"power delivered to battery=%.4f kW\" %(P/1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg o/p current=18.382 A\n", - "power delivered to battery=1.8382 kW\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.10 Page No 300" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variablesV_s=230\n", - "f=50.0\n", - "a=50.0\n", - "R=6.0\n", - "E=60.0\n", - "V_o1=((math.sqrt(2)*2*V_s)/(math.pi))*math.cos(math.radians(a))\n", - "I_o1=(V_o1-E)/R \n", - "\n", - "#ATQ after applying the conditions\n", - "V_o2=((math.sqrt(2)*V_s)/(math.pi))*math.cos(math.radians(a))\n", - "I_o2=(V_o2-E)/R \n", - "\n", - "print(\"avg o/p current=%.3f A\" %I_o1)\n", - "print(\"avg o/p current after change=%.2f A\" %I_o2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg o/p current=12.184 A\n", - "avg o/p current after change=1.09 A\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.11 Page No 309" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=45.0\n", - "R=10.0\n", - "\n", - "#Calculations\n", - "V_o=(2*V_m/math.pi)*math.cos(math.radians(a))\n", - "I_o=V_o/R\n", - "V_or=V_m/math.sqrt(2)\n", - "I_or=I_o\n", - "P_dc=V_o*I_o\n", - "P_ac=V_or*I_or\n", - "RE=P_dc/P_ac \n", - "FF=V_or/V_o \n", - "VRF=math.sqrt(FF**2-1) \n", - "I_s1=2*math.sqrt(2)*I_o/math.pi\n", - "DF=math.cos(math.radians(a))\n", - "CDF=.90032\n", - "pf=CDF*DF \n", - "HF=math.sqrt((1/CDF**2)-1) \n", - "Q=2*V_m*I_o*math.sin(math.radians(a))/math.pi \n", - "\n", - "#Results\n", - "print(\"rectification efficiency=%.4f\" %RE)\n", - "print(\"form factor=%.4f\" %FF)\n", - "print(\"voltage ripple factor=%.4f\" %VRF)\n", - "print(\"pf=%.5f\" %pf)\n", - "print(\"HF=%.5f\" %HF)\n", - "print(\"active power=%.2f W\" %P_dc) \n", - "print(\"reactive power=%.3f Var\" %Q)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rectification efficiency=0.6366\n", - "form factor=1.5708\n", - "voltage ripple factor=1.2114\n", - "pf=0.63662\n", - "HF=0.48342\n", - "active power=2143.96 W\n", - "reactive power=2143.956 Var\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.12, Page No 310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=45.0\n", - "R=10.0\n", - "\n", - "#Calculations\n", - "V_o=(V_m/math.pi)*(1+math.cos(math.radians(a)))\n", - "I_o=V_o/R\n", - "V_or=V_s*math.sqrt((1/math.pi)*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2))\n", - "I_or=I_o\n", - "P_dc=V_o*I_o\n", - "P_ac=V_or*I_or\n", - "RE=P_dc/P_ac \n", - "FF=V_or/V_o \n", - "VRF=math.sqrt(FF**2-1) \n", - "I_s1=2*math.sqrt(2)*I_o*math.cos(math.radians(a/2))/math.pi\n", - "DF=math.cos(math.radians(a/2)) \n", - "CDF=2*math.sqrt(2)*math.cos(math.radians(a/2))/math.sqrt(math.pi*(math.pi-a*math.pi/180)) \n", - "pf=CDF*DF \n", - "HF=math.sqrt((1/CDF**2)-1) \n", - "Q=V_m*I_o*math.sin(math.radians(a))/math.pi\n", - "\n", - "#Results\n", - "print(\"form factor=%.3f\" %FF)\n", - "print(\"rectification efficiency=%.4f\" %RE)\n", - "print(\"voltage ripple factor=%.3f\" %VRF) \n", - "print(\"DF=%.4f\" %DF)\n", - "print(\"CDF=%.4f\" %CDF)\n", - "print(\"pf=%.4f\" %pf)\n", - "print(\"HF=%.4f\" %HF)\n", - "print(\"active power=%.3f W\" %P_dc)\n", - "print(\"reactive power=%.2f Var\" %Q)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "form factor=1.241\n", - "rectification efficiency=0.8059\n", - "voltage ripple factor=0.735\n", - "DF=0.9239\n", - "CDF=0.9605\n", - "pf=0.8874\n", - "HF=0.2899\n", - "active power=3123.973 W\n", - "reactive power=1293.99 Var\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.13, Page No 319" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "R=10.0\n", - "\n", - "#Calculations\n", - "V_ml=math.sqrt(2)*V_s\n", - "V_om=3*V_ml/(2*math.pi)\n", - "V_o=V_om/2\n", - "th=30\n", - "a=math.degrees(math.acos((2*math.pi*math.sqrt(3)*V_o/(3*V_ml)-1)))-th \n", - "I_o=V_o/R \n", - "V_or=V_ml/(2*math.sqrt(math.pi))*math.sqrt((5*math.pi/6-a*math.pi/180)+.5*math.sin(math.radians(2*a+2*th)))\n", - "I_or=V_or/R \n", - "RE=V_o*I_o/(V_or*I_or) \n", - "\n", - "#Results\n", - "print(\"delay angle=%.1f deg\" %a)\n", - "print(\"avg load current=%.3f A\" %I_o)\n", - "print(\"rms load current=%.3f A\" %I_or)\n", - "print(\"rectification efficiency=%.4f\" %RE)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "delay angle=67.7 deg\n", - "avg load current=7.765 A\n", - "rms load current=10.477 A\n", - "rectification efficiency=0.5494\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.15, Page No 321" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=400.0\n", - "V_ml=math.sqrt(2)*V\n", - "v_T=1.4\n", - "a1=30.0\n", - "\n", - "#Calculations\n", - "V_o1=3*V_ml/(2*math.pi)*math.cos(math.radians(a1))-v_T \n", - "a2=60.0\n", - "V_o2=3*V_ml/(2*math.pi)*math.cos(math.radians(a2))-v_T \n", - "I_o=36\n", - "I_TA=I_o/3 \n", - "I_Tr=I_o/math.sqrt(3) \n", - "P=I_TA*v_T \n", - "\n", - "#Results\n", - "print(\"for firing angle = 30deg\")\n", - "print(\"avg output voltage=%.3f V\" %V_o1)\n", - "print(\"for firing angle = 60deg\")\n", - "print(\"avg output voltage=%.2f V\" %V_o2)\n", - "print(\"avg current rating=%.0f A\" %I_TA)\n", - "print(\"rms current rating=%.3f A\" %I_Tr)\n", - "print(\"PIV of SCR=%.1f V\" %V_ml)\n", - "print(\"power dissipated=%.1f W\" %P)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle = 30deg\n", - "avg output voltage=232.509 V\n", - "for firing angle = 60deg\n", - "avg output voltage=133.65 V\n", - "avg current rating=12 A\n", - "rms current rating=20.785 A\n", - "PIV of SCR=565.7 V\n", - "power dissipated=16.8 W\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17, Page No 331" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "E=200\n", - "I_o=20\n", - "R=.5\n", - "\n", - "#Calculations\n", - "V_o1=E+I_o*R\n", - "V_s=230\n", - "V_ml=math.sqrt(2)*V_s\n", - "a1=math.degrees(math.acos(V_o1*math.pi/(3*V_ml)))\n", - "th=120\n", - "I_s=math.sqrt((1/math.pi)*I_o**2*th*math.pi/180)\n", - "P=E*I_o+I_o**2*R\n", - "pf=P/(math.sqrt(3)*V_s*I_s) \n", - "V_o2=E-I_o*R\n", - "a2=math.degrees(math.acos(-V_o2*math.pi/(3*V_ml))) \n", - "\n", - "#Results\n", - "print(\"firing angle delay=%.3f deg\" %a1)\n", - "print(\"pf=%.3f\" %pf)\n", - "print(\"firing angle delay=%.2f deg\" %a2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle delay=47.461 deg\n", - "pf=0.646\n", - "firing angle delay=127.71 deg\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.18, Page No 332" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "f=50.0\n", - "\n", - "#Calculations\n", - "w=2*math.pi*f\n", - "a1=0\n", - "t_c1=(4*math.pi/3-a1*math.pi/180)/w \n", - "a2=30\n", - "t_c2=(4*math.pi/3-a2*math.pi/180)/w \n", - "\n", - "#Results\n", - "print(\"for firing angle delay=0deg\")\n", - "print(\"commutation time=%.2f ms\" %(t_c1*1000))\n", - "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n", - "print(\"for firing angle delay=30deg\")\n", - "print(\"commutation time=%.2f ms\" %(t_c2*1000))\n", - "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle delay=0deg\n", - "commutation time=13.33 ms\n", - "peak reverse voltage=325.27 V\n", - "for firing angle delay=30deg\n", - "commutation time=11.67 ms\n", - "peak reverse voltage=325.27 V\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.19, Page No 333" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=30.0\n", - "R=10.0\n", - "P=5000.0\n", - "\n", - "#Calculations\n", - "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n", - "V_ph=V_s/math.sqrt(3) \n", - "I_or=math.sqrt(P*R)\n", - "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n", - "V_ph=V_s/math.sqrt(3) \n", - "\n", - "#Results\n", - "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n", - "print(\"for constant load current\")\n", - "print(\"V_ph=%.2f V\" %V_ph)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "per phase voltage percent V_ph=110.384 V\n", - "for constant load current\n", - "V_ph=110.38 V\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.20, Page No 334" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=30.0\n", - "R=10.0\n", - "P=5000.0\n", - "\n", - "#Calculations\n", - "V_s=math.sqrt(P*R*4*math.pi/(2*3)/(2*math.pi/3+math.sqrt(3)*(1+math.cos(math.radians(2*a)))/2))\n", - "V_ph=V_s/math.sqrt(3) \n", - "I_or=math.sqrt(P*R)\n", - "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n", - "V_ph=V_s/math.sqrt(3) \n", - "\n", - "#Results\n", - "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n", - "print(\"for constant load current\")\n", - "print(\"V_ph=%.2f V\" %V_ph)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "per phase voltage percent V_ph=102.459 V\n", - "for constant load current\n", - "V_ph=102.46 V\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.21, Page No 334" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=90.0\n", - "R=10.0\n", - "P=5000.0\n", - "\n", - "#Calculations\n", - "V_s=math.sqrt(P*R*4*math.pi/(2*3)/((math.pi-math.pi/2)+(math.sin(math.radians(2*a)))/2))\n", - "V_ph=V_s/math.sqrt(3) \n", - "I_or=math.sqrt(P*R)\n", - "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n", - "V_ph=V_s/math.sqrt(3) \n", - "\n", - "#Results\n", - "print(\"per phase voltage percent V_ph=%.2f V\" %V_ph)\n", - "print(\"for constant load current\")\n", - "print(\"V_ph=%.1f V\" %V_ph)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "per phase voltage percent V_ph=191.19 V\n", - "for constant load current\n", - "V_ph=191.2 V\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.22 Page No 334" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "E=200.0\n", - "I_o=20.0\n", - "R=.5\n", - "\n", - "#Calculations\n", - "V_o=E+I_o*R\n", - "V_s=230\n", - "V_ml=math.sqrt(2)*V_s\n", - "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml)-1)) \n", - "a1=180-a\n", - "I_sr=math.sqrt((1/math.pi)*I_o**2*(a1*math.pi/180))\n", - "P=V_o*I_o\n", - "pf=P/(math.sqrt(3)*V_s*I_sr) \n", - "\n", - "#Results\n", - "print(\"firing angle delay=%.2f deg\" %a)\n", - "print(\"pf=%.2f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle delay=69.38 deg\n", - "pf=0.67\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.23, Page No 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=400.0\n", - "f=50.0\n", - "I_o=15.0\n", - "a=45.0\n", - "\n", - "#Calculations\n", - "I_TA=I_o*120.0/360.0\n", - "I_Tr=math.sqrt(I_o**2*120/360)\n", - "I_sr=math.sqrt(I_o**2*120/180)\n", - "V_ml=math.sqrt(2)*V_s\n", - "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", - "V_or=V_ml*math.sqrt((3/(2*math.pi))*(math.pi/3+math.sqrt(3/2)*math.cos(math.radians(2*a))))\n", - "I_or=I_o\n", - "P_dc=V_o*I_o\n", - "P_ac=V_or*I_or\n", - "RE=P_dc/P_ac \n", - "VA=3*V_s/math.sqrt(3)*I_sr\n", - "TUF=P_dc/VA \n", - "pf=P_ac/VA \n", - "\n", - "#Results\n", - "print(\"rectification efficiency=%.5f\" %RE)\n", - "print(\"TUF=%.4f\" %TUF)\n", - "print(\"Input pf=%.3f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rectification efficiency=0.95493\n", - "TUF=0.6752\n", - "Input pf=0.707\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.24, Page No 341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I=10.0\n", - "a=45.0\n", - "V=400.0\n", - "f=50.0\n", - "\n", - "#Calculations\n", - "DF=math.cos(math.radians(a))\n", - "I_o=10\n", - "I_s1=4*I_o/(math.sqrt(2)*math.pi)*math.sin(math.pi/3)\n", - "I_sr=I_o*math.sqrt(2.0/3.0)\n", - "I_o=1 #suppose\n", - "CDF=I_s1/I_sr \n", - "THD=math.sqrt(1/CDF**2-1) \n", - "pf=CDF*DF \n", - "P=(3*math.sqrt(2)*V*math.cos(math.radians(a))/math.pi)*I\n", - "Q=(3*math.sqrt(2)*V*math.sin(math.radians(a))/math.pi)*I \n", - " \n", - "#Results\n", - "print(\"DF=%.3f\" %DF)\n", - "print(\"CDF=%.3f\" %CDF)\n", - "print(\"THD=%.5f\" %THD)\n", - "print(\"PF=%.4f\" %pf)\n", - "print(\"active power=%.2f W\" %P) \n", - "print(\"reactive power=%.2f Var\" %Q)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "DF=0.707\n", - "CDF=0.955\n", - "THD=0.31084\n", - "PF=0.6752\n", - "active power=3819.72 W\n", - "reactive power=3819.72 Var\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.25, Page No 342" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "print(\"for firing angle=30deg\")\n", - "a=30.0\n", - "V=400.0\n", - "V_ml=math.sqrt(2)*V\n", - "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", - "E=350\n", - "R=10\n", - "\n", - "#Calculations\n", - "I_o=(V_o-E)/R\n", - "I_or=I_o\n", - "P1=V_o*I_o \n", - "I_sr=I_o*math.sqrt(2.0/3.0)\n", - "VA=3*V/math.sqrt(3)*I_sr\n", - "pf=P1/VA \n", - "a=180-60\n", - "V=400\n", - "V_ml=math.sqrt(2)*V\n", - "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", - "E=-350\n", - "R=10\n", - "I_o=(V_o-E)/R\n", - "I_or=I_o\n", - "P2=-V_o*I_o \n", - "I_sr=I_o*math.sqrt(2.0/3.0)\n", - "VA=3*V/math.sqrt(3)*I_sr\n", - "pf=P2/VA \n", - "\n", - "print(\"power delivered to load=%.2f W\" %P1)\n", - "print(\"pf=%.4f\" %pf)\n", - "print(\"for firing advance angle=60deg\")\n", - "print(\"power delivered to load=%.2f W\" %P2)\n", - "print(\"pf=%.4f\" %pf)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle=30deg\n", - "power delivered to load=5511.74 W\n", - "pf=0.4775\n", - "for firing advance angle=60deg\n", - "power delivered to load=2158.20 W\n", - "pf=0.4775\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.26, Page No 347" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=0\n", - "u=15.0\n", - "\n", - "#Calculations\n", - "i=math.cos(math.radians(a))-math.cos(math.radians(a+u))\n", - "a=30\n", - "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", - "a=45\n", - "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", - "a=60\n", - "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", - "\n", - "#Results\n", - "print(\"for firing angle=30deg\") \n", - "print(\"overlap angle=%.1f deg\" %u)\n", - "print(\"for firing angle=45deg\") \n", - "print(\"overlap angle=%.1f deg\" %u)\n", - "print(\"for firing angle=60deg\") \n", - "print(\"overlap angle=%.2f deg\" %u)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle=30deg\n", - "overlap angle=2.2 deg\n", - "for firing angle=45deg\n", - "overlap angle=2.2 deg\n", - "for firing angle=60deg\n", - "overlap angle=2.23 deg\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.28, Page No 352" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "E=400.0\n", - "I_o=20.0\n", - "R=1\n", - "\n", - "#Calculations\n", - "V_o=E+I_o*R\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "L=.004\n", - "V=230 #per phase voltage\n", - "V_ml=math.sqrt(6)*V\n", - "a=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o+3*w*L*I_o/math.pi))) \n", - "print(\"firing angle delay=%.3f deg\" %a)\n", - "u=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o-3*w*L*I_o/math.pi)))-a \n", - "\n", - "#Results\n", - "print(\"overlap angle=%.2f deg\" %u)\n", - "#Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle delay=34.382 deg\n", - "overlap angle=8.22 deg\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.29, Page No 352" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=400.0\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "R=1\n", - "E=230\n", - "I=15.0\n", - "\n", - "#Calculations\n", - "V_o=-E+I*R\n", - "V_ml=math.sqrt(2)*V\n", - "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml))) \n", - "L=0.004\n", - "a=math.degrees(math.acos((2*math.pi)/(3*V_ml)*(V_o+3*w*L*I/(2*math.pi)))) \n", - "u=math.degrees(math.acos(math.cos(math.radians(a))-3*f*L*I/V_ml))-a \n", - "\n", - "#Results\n", - "print(\"firing angle=%.3f deg\" %a)\n", - "print(\"firing angle delay=%.3f deg\" %a)\n", - "print(\"overlap angle=%.3f deg\" %u)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle=139.702 deg\n", - "firing angle delay=139.702 deg\n", - "overlap angle=1.431 deg\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.31, Page No 361" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0 #per phase\n", - "f=50.0\n", - "\n", - "#Calculations\n", - "V_ml=math.sqrt(3.0)*math.sqrt(2)*V\n", - "w=2*math.pi*f\n", - "a1=60.0\n", - "L=0.015\n", - "i_cp=(math.sqrt(3)*V_ml/(w*L))*(1-math.sin(math.radians(a1))) \n", - "\n", - "#Results\n", - "print(\"circulating current=%.4f A\" %i_cp)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "circulating current=27.7425 A\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.32, Page No 362" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "V_m=math.sqrt(2)*V\n", - "a=30.0\n", - "\n", - "#Calculations\n", - "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n", - "R=10\n", - "I_o=V_o/R \n", - "I_TA=I_o*math.pi/(2*math.pi) \n", - "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n", - "I_s=math.sqrt(I_o**2*math.pi/(math.pi)) \n", - "I_o=I_s\n", - "pf=(V_o*I_o/(V*I_s)) \n", - "\n", - "#Results\n", - "print(\"avg o/p voltage=%.3f V\" %V_o)\n", - "print(\"avg o/p current=%.2f A\" %I_o)\n", - "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n", - "print(\"rms value of thyristor current=%.2f A\" %I_Tr)\n", - "print(\"pf=%.4f\" %pf)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n", - " \n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg o/p voltage=179.330 V\n", - "avg o/p current=17.93 A\n", - "avg value of thyristor current=8.967 A\n", - "rms value of thyristor current=12.68 A\n", - "pf=0.7797\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.33, Page No 363" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "V_m=math.sqrt(2)*V\n", - "a=30.0\n", - "L=.0015\n", - "\n", - "#Calculations\n", - "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n", - "R=10\n", - "I_o=V_o/R \n", - "f=50\n", - "w=2*math.pi*f\n", - "V_ox=2*V_m*math.cos(math.radians(a))/math.pi-w*L*I_o/math.pi \n", - "u=math.degrees(math.acos(math.cos(math.radians(a))-I_o*w*L/V_m))-a \n", - "I=I_o\n", - "pf=V_o*I_o/(V*I) \n", - "\n", - "#Results\n", - "print(\"avg o/p voltage=%.3f V\" %V_ox)\n", - "print(\"angle of overlap=%.3f deg\" %u)\n", - "print(\"pf=%.4f\" %pf)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg o/p voltage=176.640 V\n", - "angle of overlap=2.855 deg\n", - "pf=0.7797\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.34, Page No 364" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=415.0\n", - "V_ml=math.sqrt(2)*V\n", - "a1=35.0 #firing angle advance\n", - "\n", - "#Calculations\n", - "a=180-a1\n", - "I_o=80.0\n", - "r_s=0.04\n", - "v_T=1.5\n", - "X_l=.25 #reactance=w*L\n", - "E=-3*V_ml*math.cos(math.radians(a))/math.pi+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi \n", - "\n", - "#Results\n", - "print(\"mean generator voltage=%.3f V\" %E)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mean generator voltage=487.590 V\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.35, Page No 364" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=415.0\n", - "V_ml=math.sqrt(2)*V\n", - "R=0.2\n", - "I_o=80\n", - "r_s=0.04\n", - "v_T=1.5\n", - "\n", - "#Calculations\n", - "X_l=.25 #reactance=w*L\n", - "a=35\n", - "E=-(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n", - "a1=35\n", - "a=180-a1\n", - "E=(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n", - "\n", - "#Results\n", - "print(\"when firing angle=35deg\") \n", - "print(\"mean generator voltage=%.3f V\" %E)\n", - "print(\"when firing angle advance=35deg\")\n", - "print(\"mean generator voltage=%.3f V\" %E)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when firing angle=35deg\n", - "mean generator voltage=503.590 V\n", - "when firing angle advance=35deg\n", - "mean generator voltage=503.590 V\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.36, Page No 365" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=5.0\n", - "V=230.0\n", - "\n", - "#Calculations\n", - "V_mp=math.sqrt(2)*V\n", - "a=30.0\n", - "E=150.0\n", - "B=180-math.degrees(math.asin(E/V_mp))\n", - "I_o=(3/(2*math.pi*R))*(V_mp*(math.cos(math.radians(a+30))-math.cos(math.radians(B)))-E*((B-a-30)*math.pi/180))\n", - "\n", - "#Results\n", - "print(\"avg current flowing=%.2f A\" %I_o)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg current flowing=19.96 A\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.37, Page No 366" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=30.0\n", - "V=230.0\n", - "\n", - "#Calculations\n", - "V_m=math.sqrt(2)*V\n", - "V_o=V_m*(1+math.cos(math.radians(a)))/math.pi \n", - "E=100\n", - "R=10\n", - "I_o=(V_o-E)/R \n", - "I_TA=I_o*math.pi/(2*math.pi) \n", - "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n", - "I_s=math.sqrt(I_o**2*(1-a/180)*math.pi/(math.pi))\n", - "I_or=I_o\n", - "P=E*I_o+I_or**2*R\n", - "pf=(P/(V*I_s)) \n", - "f=50\n", - "w=2*math.pi*f\n", - "t_c=(1-a/180)*math.pi/w \n", - "\n", - "#Results\n", - "print(\"\\navg o/p current=%.2f A\" %I_o)\n", - "print(\"avg o/p voltage=%.3f V\" %V_o)\n", - "print(\"avg value of thyristor current=%.2f A\" %I_TA)\n", - "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n", - "print(\"avg value of diode current=%.2f A\" %I_TA)\n", - "print(\"rms value of diode current=%.3f A\" %I_Tr)\n", - "print(\"pf=%.4f\" %pf)\n", - "print(\"circuit turn off time=%.2f ms\" %(t_c*1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "avg o/p current=9.32 A\n", - "avg o/p voltage=193.202 V\n", - "avg value of thyristor current=4.66 A\n", - "rms value of thyristor current=6.590 A\n", - "avg value of diode current=4.66 A\n", - "rms value of diode current=6.590 A\n", - "pf=0.9202\n", - "circuit turn off time=8.33 ms\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.38, Page No 368" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "V_m=math.sqrt(2)*V\n", - "L=0.05\n", - "f=50.0\n", - "\n", - "#Calculations\n", - "w=2*math.pi*f\n", - "a=30\n", - "i_cp=2*V_m*(1-math.cos(math.radians(a)))/(w*L) \n", - "R=30.0\n", - "i_l=V_m/R\n", - "i1=i_cp+i_l \n", - "i2=i_cp \n", - "\n", - "#Results\n", - "print(\"peak value of circulating current=%.3f A\" %i_cp)\n", - "print(\"peak value of current in convertor 1=%.3f A\" %i1)\n", - "print(\"peak value of current in convertor 2=%.3f A\" %i2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "peak value of circulating current=5.548 A\n", - "peak value of current in convertor 1=16.391 A\n", - "peak value of current in convertor 2=5.548 A\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.39, Page No 370" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "R=5.0\n", - "L=0.05\n", - "\n", - "#Calculations\n", - "phi=math.degrees(math.atan(w*L/R)) \n", - "phi=90+math.degrees(math.atan(w*L/R)) \n", - "\n", - "#Results\n", - "print(\"for no current transients\")\n", - "print(\"triggering angle=%.2f deg\" %phi)\n", - "print(\"for worst transients\")\n", - "print(\"triggering angle=%.2f deg\" %phi)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for no current transients\n", - "triggering angle=162.34 deg\n", - "for worst transients\n", - "triggering angle=162.34 deg\n" - ] - } - ], - "prompt_number": 34 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter7.ipynb b/Power_Electronics/chapter7.ipynb deleted file mode 100755 index 726160c8..00000000 --- a/Power_Electronics/chapter7.ipynb +++ /dev/null @@ -1,1036 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 07 : Choppers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2, Page No 387" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=0.4 #duty cycle %a=T_on/T\n", - "V_s=230.0\n", - "R=10.0\n", - "\n", - "#Calculations\n", - "V=a*(V_s-2) \n", - "V_or=math.sqrt(a*(V_s-2)**2) \n", - "P_o=V_or**2/R\n", - "P_i=V_s*V/R\n", - "n=P_o*100/P_i \n", - "\n", - "#Results\n", - "print(\"avg o/p voltage=%.1f V\" %V)\n", - "print(\"rms value of o/p voltage=%.1f V\" %V_or)\n", - "print(\"chopper efficiency in percentage=%.2f\" %n)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "avg o/p voltage=91.2 V\n", - "rms value of o/p voltage=144.2 V\n", - "chopper efficiency in percentage=99.13\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3, Page No 388" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_i=220.0\n", - "V_o=660.0\n", - "\n", - "#Calculations\n", - "a=1-V_i/V_o\n", - "T_on=100.0 #microsecond\n", - "T=T_on/a\n", - "T_off=T-T_on \n", - "T_off=T_off/2\n", - "T_on=T-T_off\n", - "a=T_on/T\n", - "V_o=V_i/(1-a)\n", - "\n", - "#Results \n", - "print(\"pulse width of o/p voltage=%.0f us\" %T_off)\n", - "print(\"\\nnew o/p voltage=%.0f V\" %V_o)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pulse width of o/p voltage=25 us\n", - "\n", - "new o/p voltage=1320 V\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4 Page No 288" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_1=12.0\n", - "I_2=16.0\n", - "\n", - "#Calculations\n", - "I_0=(I_1+I_2)/2\n", - "R=10.0\n", - "V_0=I_0*R\n", - "V_s=200.0\n", - "a=V_0/V_s\n", - "r=a/(1-a)\n", - "\n", - "#Results\n", - "print(\"time ratio(T_on/T_off)=%.3f\" %r)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "time ratio(T_on/T_off)=2.333\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5, Page No 390" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_o=660.0\n", - "V_s=220.0\n", - "\n", - "#Calculations\n", - "a=(V_o/V_s)/(1+(V_o/V_s))\n", - "T_on=120\n", - "T=T_on/a\n", - "T_off=T-T_on \n", - "T_off=3*T_off\n", - "T_on=T-T_off\n", - "a=T_on/(T_on+T_off)\n", - "V_o=V_s*(a/(1-a)) \n", - "\n", - "#Results\n", - "print(\"pulse width o/p voltage=%.0f us\" %T_off)\n", - "print(\"\\nnew o/p voltage=%.2f V\" %V_o)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pulse width o/p voltage=120 us\n", - "\n", - "new o/p voltage=73.33 V\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.11 Page No 408" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=1.0\n", - "L=.005\n", - "T_a=L/R\n", - "T=2000*10**-6\n", - "E=24.0\n", - "V_s=220\n", - "T_on=600*10**-6\n", - "a=T_on/T\n", - "\n", - "#Calculations\n", - "a1=(T_a/T)*math.log(1+(E/V_s)*((math.exp(T/T_a))-1))\n", - "if a1a :\n", - " print(\"load current is continuous\")\n", - "else:\n", - " print(\"load current is discontinuous\")\n", - "\n", - "t_x=T_on+L*math.log(1+((V_s-E)/272)*(1-math.exp(-T_on/T_a)))\n", - " #Value of t_x wrongly calculated in the book so ans of V_o and I_o varies\n", - "V_o=a*V_s+(1-t_x/T)*E \n", - "I_o=(V_o-E)/R \n", - "I_mx=(V_s-E)/R*(1-math.exp(-T_on/T_a)) \n", - "\n", - "#Results \n", - "print(\"avg o/p voltage=%.2f V\" %V_o)\n", - "print(\"avg o/p current=%.2f A\" %I_o) \n", - "print(\"max value of load current=%.1f A\" %I_mx)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "load current is discontinuous\n", - "avg o/p voltage=121.77 V\n", - "avg o/p current=49.77 A\n", - "max value of load current=81.5 A\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.13, Page No 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=0.2\n", - "V_s=500\n", - "E=a*V_s\n", - "L=0.06\n", - "I=10\n", - "\n", - "#Calculations\n", - "T_on=(L*I)/(V_s-E)\n", - "f=a/T_on \n", - "\n", - "#Results\n", - "print(\"chopping freq=%.2f Hz\" %f)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "chopping freq=133.33 Hz\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.14 Page No 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=0.5\n", - "pu=0.1 #pu ripple\n", - "\n", - "#Calculations\n", - " #x=T/T_a\n", - " #y=exp(-a*x)\n", - "y=(1-pu)/(1+pu)\n", - " #after solving\n", - "x=math.log(1/y)/a\n", - "f=1000\n", - "T=1/f\n", - "T_a=T/x\n", - "R=2\n", - "L=R*T_a\n", - "Li=0.002\n", - "Le=L-Li \n", - "\n", - "#Results\n", - "print(\"external inductance=%.3f mH\" %(Le*1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "external inductance=-2.000 mH\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.15 Page No 414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=10.0\n", - "L=0.015\n", - "T_a=L/R\n", - "f=1250.0\n", - "T=1.0/f\n", - "a=0.5\n", - "T_on=a*T\n", - "V_s=220.0\n", - "\n", - "#Calculations\n", - "I_mx=(V_s/R)*((1-math.exp(-T_on/T_a))/(1-math.exp(-T/T_a))) \n", - "I_mn=(V_s/R)*((math.exp(T_on/T_a)-1)/(math.exp(T/T_a)-1)) \n", - "dI=I_mx-I_mn \n", - "V_o=a*V_s\n", - "I_o=V_o/R \n", - "I_or=math.sqrt(I_mx**2+dI**2/3+I_mx*dI) \n", - "I_chr=math.sqrt(a)*I_or \n", - "\n", - "#Results\n", - "print(\"Max value of ripple current=%.2f A\" %dI)\n", - "print(\"Max value of load current=%.3f A\" %I_mx)\n", - "print(\"Min value of load current=%.2f A\" %I_mn)\n", - "print(\"Avg value of load current=%.2f A\" %I_o) \n", - "print(\"rms value of load current=%.2f A\" %I_or)\n", - "print(\"rms value of chopper current=%.2f A\" %I_chr)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Max value of ripple current=2.92 A\n", - "Max value of load current=12.458 A\n", - "Min value of load current=9.54 A\n", - "Avg value of load current=11.00 A\n", - "rms value of load current=13.94 A\n", - "rms value of chopper current=9.86 A\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.17 Page No 417" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "L=0.0016\n", - "C=4*10**-6\n", - "\n", - "#Calculations\n", - "w=1/math.sqrt(L*C)\n", - "t=math.pi/w \n", - "\n", - "\n", - "#Results\n", - "print(\"time for which current flows=%.2f us\" %(t*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "time for which current flows=251.33 us\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.18, Page No 424" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "t_q=20.0*10**-6\n", - "dt=20.0*10**-6\n", - "\n", - "#Calculations\n", - "t_c=t_q+dt\n", - "I_0=60.0\n", - "V_s=60.0\n", - "C=t_c*I_0/V_s \n", - "\n", - "#Results \n", - "print(\"value of commutating capacitor=%.0f uF\" %(C*10**6))\n", - "\n", - "L1=(V_s/I_0)**2*C\n", - "L2=(2*t_c/math.pi)**2/C\n", - "if L1>L2 :\n", - " print(\"value of commutating inductor=%.0f uH\" %(L1*10**6))\n", - "else:\n", - " print(\"value of commutating inductor=%.0f uH\" %(L2*10**6))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of commutating capacitor=40 uF\n", - "value of commutating inductor=40 uH\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.19, Page No 424" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "t=100.0*10**-6\n", - "R=10.0\n", - "\n", - "#Calculations\n", - " #V_s*(1-2*math.exp(-t/(R*C)))=0\n", - "C=-t/(R*math.log(1.0/2)) \n", - "L=(4/9.0)*C*R**2 \n", - "L=(1.0/4)*C*R**2 \n", - "\n", - "#Results\n", - "print(\"Value of comutating component C=%.3f uF\" %(C*10**6))\n", - "print(\"max permissible current through SCR is 2.5 times load current\")\n", - "print(\"value of comutating component L=%.1f uH\" %(L*10**6))\n", - "print(\"max permissible current through SCR is 1.5 times peak diode current\")\n", - "print(\"value of comutating component L=%.2f uH\" %(L*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Value of comutating component C=14.427 uF\n", - "max permissible current through SCR is 2.5 times load current\n", - "value of comutating component L=360.7 uH\n", - "max permissible current through SCR is 1.5 times peak diode current\n", - "value of comutating component L=360.67 uH\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.20, Page No 426" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T_on=800.0*10**-6\n", - "V_s=220.0\n", - "I_o=80.0\n", - "C=50*10**-6\n", - "\n", - "#Calculations\n", - "T=T_on+2*V_s*C/I_o \n", - "L=20*10**-6\n", - "C=50*10**-6\n", - "i_T1=I_o+V_s*math.sqrt(C/L) \n", - "i_TA=I_o \n", - "t_c=C*V_s/I_o \n", - "t_c1=(math.pi/2)*math.sqrt(L*C) \n", - "t=150*10**-6\n", - "v_c=I_o*t/C-V_s \n", - "\n", - "#Results \n", - "print(\"effective on period=%.0f us\" %(T*10**6))\n", - "print(\"peak current through main thyristor=%.2f A\" %i_T1)\n", - "print(\"peak current through auxillery thyristor=%.0f A\" %i_TA)\n", - "print(\"turn off time for main thyristor=%.1f us\" %(t_c*10**6))\n", - "print(\"turn off time for auxillery thyristor=%.3f us\" %(t_c1*10**6))\n", - "print(\"total commutation interval=%.0f us\" %(2*t_c*10**6))\n", - "print(\"capacitor voltage=%.0f V\" %v_c)\n", - "print(\"time nedded to recharge the capacitor=%.0f us\" %(2*V_s*C/I_o*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for firing angle = 30deg\n", - "avg output voltage=232.509 V\n", - "for firing angle = 60deg\n", - "avg output voltage=133.65 V\n", - "avg current rating=12 A\n", - "rms current rating=20.785 A\n", - "PIV of SCR=565.7 V\n", - "power dissipated=16.8 W\n" - ] - } - ], - "prompt_number": 122 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.21, Page No 427" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_o=260.0\n", - "V_s=220.0\n", - "fos=2 #factor of safety\n", - "\n", - "#Calculations\n", - "t_off=18*10**-6\n", - "t_c=2*t_off\n", - "C=t_c*I_o/V_s \n", - "L=(V_s/(0.8*I_o))**2*C \n", - "f=400\n", - "a_mn=math.pi*f*math.sqrt(L*C)\n", - "V_omn=V_s*(a_mn+2*f*t_c) \n", - "V_omx=V_s \n", - "\n", - "#Results\n", - "print(\"Value of C=%.3f uF\" %(C*10**6))\n", - "print(\"value of L=%.3f uH\" %(L*10**6))\n", - "print(\"min value of o/p voltage=%.3f V\" %V_omn)\n", - "print(\"max value of o/p voltage=%.0f V\" %V_omx)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "firing angle delay=47.461 deg\n", - "pf=0.646\n", - "firing angle delay=127.71 deg\n" - ] - } - ], - "prompt_number": "*" - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.22, Page No 434" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "x=2.0\n", - "t_q=30*10**-6\n", - "dt=30*10**-6\n", - "t_c=t_q+dt\n", - "V_s=230.0\n", - "I_o=200.0\n", - "\n", - "#Calculations\n", - "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n", - "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n", - "V_cp=V_s+I_o*math.sqrt(L/C) \n", - "I_cp=x*I_o \n", - "x=3\n", - "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n", - "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n", - "V_cp=V_s+I_o*math.sqrt(L/C) \n", - "I_cp=x*I_o \n", - "\n", - "#Results\n", - "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n", - "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n", - "print(\"peak capacitor voltage=%.0f V\" %V_cp)\n", - "print(\"peak commutataing current=%.0f A\" %I_cp)\n", - "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n", - "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n", - "print(\"peak capacitor voltage=%.2f V\" %V_cp)\n", - "print(\"peak commutataing current=%.0f A\" %I_cp)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of commutating inductor=7.321 uH\n", - "value of commutating capacitor=49.822 uF\n", - "peak capacitor voltage=307 V\n", - "peak commutataing current=600 A\n", - "value of commutating inductor=7.321 uH\n", - "value of commutating capacitor=49.822 uF\n", - "peak capacitor voltage=306.67 V\n", - "peak commutataing current=600 A\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.23, Page No 434" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variablesV_s=230\n", - "C=50*10**-6\n", - "L=20*10**-6\n", - "I_cp=V_s*math.sqrt(C/L)\n", - "I_o=200\n", - "x=I_cp/I_o\n", - "\n", - "#Calculations\n", - "t_c=(math.pi-2*math.asin(1/x))*math.sqrt(C*L) \n", - "th1=math.degrees(math.asin(1.0/x))\n", - "t=(5*math.pi/2-th1*math.pi/180)*math.sqrt(L*C)+C*V_s*(1-math.cos(math.radians(th1)))/I_o \n", - "t=(math.pi-th1*math.pi/180)*math.sqrt(L*C) \n", - "\n", - "#Results\n", - "print(\"turn off time of main thyristor=%.2f us\" %(t_c*10**6))\n", - "print(\"total commutation interval=%.3f us\" %(t*10**6))\n", - "print(\"turn off time of auxillery thyristor=%.3f us\" %(t*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "turn off time of main thyristor=62.52 us\n", - "total commutation interval=80.931 us\n", - "turn off time of auxillery thyristor=80.931 us\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.24, Page No 440" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "tc=0.006\n", - "R=10.0\n", - "L=R*tc\n", - "f=2000.0\n", - "\n", - "#Calculations\n", - "T=1/f\n", - "V_o=50.0\n", - "V_s=100.0\n", - "a=V_o/V_s\n", - "T_on=a*T\n", - "T_off=T-T_on\n", - "dI=V_o*T_off/L\n", - "I_o=V_o/R\n", - "I2=I_o+dI/2 \n", - "I1=I_o-dI/2 \n", - "\n", - "#Results\n", - "print(\"max value of load current=%.3f A\" %I2)\n", - "print(\"min value of load current=%.3f A\" %I1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "max value of load current=5.104 A\n", - "min value of load current=4.896 A\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.27, Page No 443" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "I_a=30.0\n", - "r_a=.5\n", - "V_s=220.0\n", - "\n", - "#Calculations\n", - "a=I_a*r_a/V_s \n", - "a=1\n", - "k=.1 #V/rpm\n", - "N=(a*V_s-I_a*r_a)/k \n", - "\n", - "#Results\n", - "print(\"min value of duty cycle=%.3f\" %a)\n", - "print(\"min Value of speed control=%.0f rpm\" %0)\n", - "print(\"max value of duty cycle=%.0f\" %a)\n", - "print(\"max value of speed control=%.0f rpm\" %N)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "min value of duty cycle=1.000\n", - "min Value of speed control=0 rpm\n", - "max value of duty cycle=1\n", - "max value of speed control=2050 rpm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.28, Page No 444" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_t=72.0\n", - "I_a=200.0\n", - "r_a=0.045\n", - "N=2500.0\n", - "\n", - "#Calculations\n", - "k=(V_t-I_a*r_a)/N\n", - "E_a=k*1000\n", - "L=.007\n", - "Rm=.045\n", - "Rb=0.065\n", - "R=Rm+Rb\n", - "T_a=L/R\n", - "I_mx=230\n", - "I_mn=180\n", - "T_on=-T_a*math.log(-((V_t-E_a)/R-I_mx)/((I_mn)-(V_t-E_a)/R))\n", - "R=Rm\n", - "T_a=L/R\n", - "T_off=-T_a*math.log(-((-E_a)/R-I_mn)/((I_mx)-(-E_a)/R))\n", - "T=T_on+T_off\n", - "f=1/T \n", - "a=T_on/T \n", - "\n", - "#Results\n", - "print(\"chopping freq=%.1f Hz\" %f) \n", - "print(\"duty cycle ratio=%.3f\" %a)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "chopping freq=40.5 Hz\n", - "\n", - "duty cycle ratio=0.588\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.29, Page No 445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variablesI_mx=425\n", - "I_lt=180.0 #lower limit of current pulsation\n", - "I_mn=I_mx-I_lt\n", - "T_on=0.014\n", - "T_off=0.011\n", - "\n", - "#Calculations\n", - "T=T_on+T_off\n", - "T_a=.0635\n", - "a=T_on/T\n", - "V=(I_mx-I_mn*math.exp(-T_on/T_a))/(1-math.exp(-T_on/T_a))\n", - "a=.5\n", - "I_mn=(I_mx-V*(1-math.exp(-T_on/T_a)))/(math.exp(-T_on/T_a))\n", - "T=I_mx-I_mn \n", - "T=T_on/a\n", - "f=1/T \n", - "\n", - "#Results\n", - "print(\"higher limit of current pulsation=%.0f A\" %T)\n", - "print(\"chopping freq=%.3f Hz\" %f)\n", - "print(\"duty cycle ratio=%.2f\" %a)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "higher limit of current pulsation=0 A\n", - "chopping freq=35.714 Hz\n", - "duty cycle ratio=0.50\n" - ] - } - ], - "prompt_number": 32 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter8.ipynb b/Power_Electronics/chapter8.ipynb deleted file mode 100755 index 721a9faf..00000000 --- a/Power_Electronics/chapter8.ipynb +++ /dev/null @@ -1,984 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 08 : Inverters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3, Page No 465" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "T=0.1*10**-3\n", - "f=1.0/T\n", - "k=15*10**-6 #k=th/w\n", - "\n", - "#Calculations\n", - "th=2*math.pi*f*k\n", - "X_l=10.0\n", - "R=2.0\n", - "X_c=R*math.tan(th)+X_l\n", - "C=1/(2*math.pi*f*X_c) \n", - "\n", - "#Results\n", - "print(\"value of C=%.3f uF\" %(C*10**6))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of C=1.248 uF\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4 Page No 466" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "\n", - "#Calculations\n", - "V_01=2*V_s/(math.sqrt(2)*math.pi)\n", - "R=2.0\n", - "I_01=V_01/R\n", - "P_d=I_01**2*R \n", - "V=V_s/2\n", - "I_s=math.sqrt(2)*I_01/math.pi\n", - "P_s=V*I_s\n", - "\n", - "#Results\n", - "print(\"power delivered to load=%.1f W\" %P_d)\n", - "print(\"power delivered by both sources=%.1f W\" %(2*P_s))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "power delivered to load=5359.9 W\n", - "power delivered by both sources=5359.9 W\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5, Page No 468" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_01=4*V_s/(math.pi*math.sqrt(2))\n", - "R=1.0\n", - "X_L=6.0\n", - "X_c=7.0\n", - "\n", - "#Calculations\n", - "I_01=V_01/math.sqrt(R**2+(X_L-X_c)**2)\n", - "P=I_01**2*R \n", - "I_s=math.sqrt(2)*I_01*(2*math.cos(math.radians(45)))/math.pi\n", - "P_s=V_s*I_s \n", - "\n", - "#Results\n", - "print(\"power delivered to the source=%.3f kW\" %(P/1000))\n", - "print(\"\\npower from the source=%.3f kW\" %(P_s/1000))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "power delivered to the source=21.440 kW\n", - "\n", - "power from the source=21.440 kW\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6 Page No 469" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_01=230.0\n", - "R=2.0\n", - "I_01=V_01/R\n", - "I_m=I_01*math.sqrt(2)\n", - "I_T1=I_m/2 \n", - "I_D1=0 \n", - "X_L=8.0\n", - "X_C=6.0\n", - "\n", - "#Calculations\n", - "I_01=V_01/math.sqrt(R**2+(X_L-X_C)**2)\n", - "phi1=math.degrees(math.atan((X_L-X_C)/R))\n", - "I_T1=I_T1*math.sqrt(2)*0.47675 \n", - "I_D1=.1507025*I_m/math.sqrt(2) \n", - "\n", - "\n", - "#Results\n", - "print(\"when load R=2 ohm\")\n", - "print(\"rms value of thyristor current=%.2f A\" %I_T1)\n", - "print(\"rms value of diode current=%.0f A\" %I_D1)\n", - "print(\"when load R=2ohm % X_L=8ohm and X_C=6ohm\")\n", - "print(\"rms value of thyristor current=%.3f A\" %I_T1)\n", - "print(\"rms value of diode current=%.3f A\" %I_D1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "when load R=2 ohm\n", - "rms value of thyristor current=54.83 A\n", - "rms value of diode current=17 A\n", - "when load R=2ohm % X_L=8ohm and X_C=6ohm\n", - "rms value of thyristor current=54.826 A\n", - "rms value of diode current=17.331 A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.7 Page No 470" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "R=4.0\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "L=0.035\n", - "\n", - "#Calculations\n", - "C=155*10**-6\n", - "X_L=w*L\n", - "X_C=1/(w*C)\n", - "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n", - "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n", - "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n", - "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n", - "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n", - "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n", - "I_m1=4*V_s/(Z1*math.pi)\n", - "I_01=I_m1/math.sqrt(2) \n", - "I_m3=4*V_s/(3*Z3*math.pi)\n", - "I_m5=4*V_s/(5*Z5*math.pi)\n", - "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2)\n", - "I_0=I_m/math.sqrt(2)\n", - "P_0=(I_0)**2*R \n", - "P_01=(I_01)**2*R \n", - "t1=(180-phi1)*math.pi/(180*w) \n", - "t1=(phi1)*math.pi/(180*w) \n", - "\n", - "#Results\n", - "print(\"rms value of fundamental load current=%.2f A\" %I_01)\n", - "print(\"load power=%.1f W\" %P_0)\n", - "print(\"fundamental load power=%.1f W\" %P_01)\n", - "print(\"rms value of thyristor current=%.3f A\" %(I_m/2))\n", - "print(\"conduction time for thyristor=%.3f ms\" %(t1*1000))\n", - "print(\"Conduction time for diodes=%.3f ms\" %(t1*1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of fundamental load current=20.02 A\n", - "load power=1632.5 W\n", - "fundamental load power=1602.6 W\n", - "rms value of thyristor current=14.285 A\n", - "conduction time for thyristor=3.736 ms\n", - "Conduction time for diodes=3.736 ms\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.8, Page No 473" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_01=2*V_s/(math.sqrt(2)*math.pi) \n", - "R=10.0\n", - "\n", - "#Calculations\n", - "I_01=V_01/R\n", - "P=I_01**2*R \n", - "V_or=math.sqrt((V_s/2)**2)\n", - "P=V_or**2/R \n", - "I_TP=V_s/(2*R)\n", - "I_or=I_TP\n", - "pf=I_01**2*R/(V_or*I_or) \n", - "DF=V_01/V_or \n", - "V_oh=math.sqrt(V_or**2-V_01**2)\n", - "THD=V_oh/V_01 \n", - "V_03=V_01/3\n", - "HF=V_03/V_01\n", - "\n", - "#Results\n", - "print(\"fundamental rms o/p voltage=%.3f V\" %V_01)\n", - "print(\"fundamental power to load=%.1f W\" %P)\n", - "print(\"total o/p power to load=%.1f W\" %P)\n", - "print(\"avg SCR current=%.2f A\" %(I_TP*180/360))\n", - "print(\"i/p pf=%.3f\" %pf) \n", - "print(\"distortion factor=%.1f\" %DF)\n", - "print(\"THD=%.3f\" %THD) \n", - "print(\"harmonic factor=%.4f\" %HF)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fundamental rms o/p voltage=103.536 V\n", - "fundamental power to load=1322.5 W\n", - "total o/p power to load=1322.5 W\n", - "avg SCR current=5.75 A\n", - "i/p pf=0.811\n", - "distortion factor=0.9\n", - "THD=0.483\n", - "harmonic factor=0.3333\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.9 Page No 474" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=60\n", - "R=3.0\n", - "\n", - "#Calculations\n", - "V_or=math.sqrt(V_s**2*math.pi/math.pi) \n", - "V_01=4*V_s/(math.sqrt(2)*math.pi) \n", - "P_o=V_or**2/R \n", - "P_01=V_01**2/R \n", - "I_s=V_s/R \n", - "I_avg=I_s*math.pi/(2*math.pi) \n", - "V_03=V_01/3\n", - "HF=V_03/V_01 \n", - "V_oh=math.sqrt(V_or**2-V_01**2)\n", - "THD=V_oh/V_01 \n", - "\n", - "#Results\n", - "print(\"rms value of o/p voltage=%.0f V\" %V_or)\n", - "print(\"o/p power=%.0f W\" %P_o)\n", - "print(\"fundamental component of rms voltage=%.2f V\" %V_01)\n", - "print(\"fundamental freq o/p power=%.2f W\" %P_01) \n", - "print(\"peak current=%.0f A\" %I_s)\n", - "print(\"avg current of each transistor=%.0f A\" %I_avg)\n", - "print(\"peak reverse blocking voltage=%.0f V\" %V_s)\n", - "print(\"harmonic factor=%.4f\" %HF)\n", - "print(\"THD=%.4f\" %THD)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of o/p voltage=60 V\n", - "o/p power=1200 W\n", - "fundamental component of rms voltage=54.02 V\n", - "fundamental freq o/p power=972.68 W\n", - "peak current=20 A\n", - "avg current of each transistor=10 A\n", - "peak reverse blocking voltage=60 V\n", - "harmonic factor=0.3333\n", - "THD=0.4834\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.10 Page No 475" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=220.0\n", - "R=6.0\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "L=0.03\n", - "C=180*10**-6\n", - "X_L=w*L\n", - "X_C=1/(w*C)\n", - "\n", - "#Calculations\n", - "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n", - "V_01=4*V_s/(math.sqrt(2)*math.pi)\n", - "V_oh=math.sqrt(V_or**2-V_01**2)\n", - "THD=V_oh/V_01 \n", - "print(\"THD of voltage=%.4f\" %THD)\n", - "DF=V_01/V_or \n", - "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n", - "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n", - "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n", - "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n", - "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n", - "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n", - "Z7=math.sqrt(R**2+(X_L*7-X_C/7)**2)\n", - "phi7=math.degrees(math.atan((X_L*7-X_C/7)/R))\n", - "I_01=19.403\n", - "I_m1=4*V_s/(Z1*math.pi)\n", - "I_m3=4*V_s/(3*Z3*math.pi)\n", - "I_m5=4*V_s/(5*Z5*math.pi)\n", - "I_m7=4*V_s/(7*Z7*math.pi)\n", - "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n", - "I_or=I_m/math.sqrt(2)\n", - "I_oh=math.sqrt((I_m**2-I_m1**2)/2)\n", - "THD=I_oh/I_01 \n", - "DF=I_01/I_or \n", - "P_o=I_or**2*R \n", - "I_avg=P_o/V_s \n", - "t1=(180-phi1)*math.pi/(180*w) \n", - "t1=1/(2*f)-t1 \n", - "I_p=I_m1 \n", - "I_t1=.46135*I_p \n", - "\n", - "#Results\n", - "print(\"\\nDF=%.1f\" %DF)\n", - "print(\"THD of current=%.4f\" %THD) \n", - "print(\"DF=%.3f\" %DF)\n", - "print(\"load power=%.1f W\" %P_o)\n", - "print(\"avg value of load current=%.2f A\" %I_avg)\n", - "print(\"conduction time for thyristor=%.0f ms\" %(t1*1000))\n", - "print(\"conduction time for diodes=%.0f ms\" %(t1*1000))\n", - "print(\"peak transistor current=%.2f A\" %I_p)\n", - "print(\"rms transistor current=%.2f A\" %I_t1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "THD of voltage=0.4834\n", - "\n", - "DF=1.0\n", - "THD of current=0.1557\n", - "DF=0.988\n", - "load power=2313.5 W\n", - "avg value of load current=10.52 A\n", - "conduction time for thyristor=3 ms\n", - "conduction time for diodes=3 ms\n", - "peak transistor current=27.44 A\n", - "rms transistor current=12.66 A\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.11 Page No 497" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=450.0\n", - "R=10.0\n", - "\n", - "#Calculations\n", - "I_or=math.sqrt((V_s/(3*R))**2*2/3+(2*V_s/(3*R))**2*1/3) \n", - "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(3*R))**2*2*math.pi/3+(2*V_s/(3*R))**2*math.pi/3)) \n", - "P=3*I_or**2*R \n", - "I_or=math.sqrt((1/(math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n", - "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n", - "P=3*I_or**2*R \n", - "\n", - "#Results\n", - "print(\"for 180deg mode\")\n", - "print(\"rms value of load current=%.3f A\" %I_or)\n", - "print(\"power delivered to load=%.1f kW\" %(P/1000))\n", - "print(\"rms value of load current=%.0f A\" %I_T1)\n", - "print(\"for 120deg mode\")\n", - "print(\"rms value of load current=%.3f A\" %I_or)\n", - "print(\"rms value of load current=%.2f A\" %I_T1)\n", - "print(\"power delivered to load=%.3f kW\" %(P/1000))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for 180deg mode\n", - "rms value of load current=18.371 A\n", - "power delivered to load=10.1 kW\n", - "rms value of load current=13 A\n", - "for 120deg mode\n", - "rms value of load current=18.371 A\n", - "rms value of load current=12.99 A\n", - "power delivered to load=10.125 kW\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.12, Page No 510" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "R=10.0\n", - "f=50.0\n", - "w=2*math.pi*f\n", - "L=0.03\n", - "\n", - "#Calculations\n", - "X_L=w*L\n", - "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n", - "V_01=4*V_s/(math.sqrt(2)*math.pi)\n", - "Z1=math.sqrt(R**2+(X_L)**2)\n", - "phi1=-math.degrees(math.atan((X_L)/R))\n", - "Z3=math.sqrt(R**2+(X_L*3)**2)\n", - "phi3=math.degrees(math.atan((X_L*3)/R))\n", - "Z5=math.sqrt(R**2+(X_L*5)**2)\n", - "phi5=math.degrees(math.atan((X_L*5)/R))\n", - "Z7=math.sqrt(R**2+(X_L*7)**2)\n", - "phi7=math.degrees(math.atan((X_L*7)/R))\n", - "I_m1=4*V_s/(math.sqrt(2)*Z1*math.pi)\n", - "I_m3=4*V_s/(math.sqrt(2)*3*Z3*math.pi)\n", - "I_m5=4*V_s/(math.sqrt(2)*5*Z5*math.pi)\n", - "I_m7=4*V_s/(math.sqrt(2)*7*Z7*math.pi)\n", - "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n", - "P=I_m**2*R \n", - "I_01=I_m1*math.sin(math.radians(45))\n", - "I_03=I_m3*math.sin(math.radians(3*45))\n", - "I_05=I_m5*math.sin(math.radians(5*45))\n", - "I_07=I_m7*math.sin(math.radians(7*45))\n", - "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n", - "P=I_0*R \n", - "g=(180-90)/3+45/2\n", - "I_01=2*I_m1*math.sin(math.radians(g))*math.sin(math.radians(45/2))\n", - "I_03=2*I_m3*math.sin(math.radians(g*3))*math.sin(math.radians(3*45/2))\n", - "I_05=2*I_m5*math.sin(math.radians(g*5))*math.sin(math.radians(5*45/2))\n", - "I_07=2*I_m7*math.sin(math.radians(g*7))*math.sin(math.radians(7*45/2))\n", - "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n", - "P=I_0*R \n", - "\n", - "\n", - "#Results\n", - "print(\"using square wave o/p\")\n", - "print(\"power delivered=%.2f W\" %P)\n", - "print(\"using quasi-square wave o/p\")\n", - "print(\"power delivered=%.2f W\" %P)\n", - "print(\"using two symmitrical spaced pulses\")\n", - "print(\"power delivered=%.2f W\" %P)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "using square wave o/p\n", - "power delivered=845.87 W\n", - "using quasi-square wave o/p\n", - "power delivered=845.87 W\n", - "using two symmitrical spaced pulses\n", - "power delivered=845.87 W\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.14, Page No 520" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=50.0\n", - "T=1/f\n", - "I=0.5\n", - "\n", - "#Calculations\n", - "di=I/T #di=di/dt\n", - "V_s=220.0\n", - "L=V_s/di \n", - "t=20*10**-6\n", - "fos=2 #factor of safety\n", - "t_c=t*fos\n", - "R=10\n", - "C=t_c/(R*math.log(2))\n", - "\n", - "#Results \n", - "print(\"source inductance=%.1f H\" %L)\n", - "print(\"commutating capacitor=%.2f uF\" %(C*10**6))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "source inductance=8.8 H\n", - "commutating capacitor=5.77 uF\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.15, Page No 539" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=10.0\n", - "L=.01\n", - "C=10*10**-6\n", - "#Calculations\n", - "if (R**2)<(4*L/C) :\n", - " print(\"ckt will commutate on its own\")\n", - "else:\n", - " print(\"ckt will not commutate on its own\")\n", - "\n", - "xie=R/(2*L)\n", - "w_o=1/math.sqrt(L*C)\n", - "w_r=math.sqrt(w_o**2-xie**2)\n", - "phi=math.degrees(math.atan(xie/w_r))\n", - "t=math.pi/w_r\n", - "V_s=1\n", - "v_L=V_s*(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180+phi))\n", - "v_c=V_s*(1-(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180-phi))) \n", - "di=V_s/L \n", - "\n", - "\n", - "#Results\n", - "print(\"voltage across inductor(*V_s)=%.5f V\" %v_L) \n", - "print(\"voltage across capacitor(*V_s)=%.5f V\" %v_c)\n", - "print(\"di/dt*V_s (for t=0)=%.0f A/s\" %di)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "ckt will commutate on its own\n", - "voltage across inductor(*V_s)=-0.60468 V\n", - "voltage across capacitor(*V_s)=1.60468 V\n", - "di/dt*V_s (for t=0)=100 A/s\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.16, Page No 540" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "L=0.006\n", - "C=1.2*10**-6\n", - "R=100.0\n", - "\n", - "#Calculations\n", - "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", - "T_off=0.2*10**-3\n", - "f=1/(2*(T+T_off)) \n", - "R=40\n", - "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", - "T_off=.2*10**-3\n", - "f=1/(2*(T+T_off)) \n", - "R=140\n", - "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", - "T_off=.2*10**-3\n", - "f=1/(2*(T+T_off)) \n", - "\n", - "#Results\n", - "print(\"o/p freq=%.2f Hz\" %f)\n", - "print(\"for R=40ohm\")\n", - "print(\"upper limit o/p freq=%.1f Hz\" %f)\n", - "print(\"for R=140ohm\")\n", - "print(\"lower limit o/p freq=%.1f Hz\" %f)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "o/p freq=239.81 Hz\n", - "for R=40ohm\n", - "upper limit o/p freq=239.8 Hz\n", - "for R=140ohm\n", - "lower limit o/p freq=239.8 Hz\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.17, Page No 540" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "f=5000.0\n", - "w=2*math.pi*f\n", - "R=3.0\n", - "\n", - "#Calculations\n", - "L=60*10**-6\n", - "xie=R/(2*L)\n", - "C=7.5*10**-6\n", - "w_o=1/math.sqrt(L*C)\n", - "w_r=math.sqrt(w_o**2-xie**2)\n", - "t_c=math.pi*(1/w-1/w_r) \n", - "fos=1.5\n", - "t_q=10*10**-6\n", - "f_max=1/(2*math.pi*(t_q*fos/math.pi+1/w_r)) \n", - "\n", - "#Results\n", - "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n", - "print(\"max possible operating freq=%.1f Hz\" %f_max)\n", - " #Answers have small variations from that in the book due to difference in the rounding off of digits." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "ckt turn off time=21.39 us\n", - "max possible operating freq=5341.4 Hz\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.18, Page No 541" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "a=30.0\n", - "R=10.0\n", - "P=5000.0\n", - "\n", - "#Calculations\n", - "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n", - "V_ph=V_s/math.sqrt(3) \n", - "I_or=math.sqrt(P*R)\n", - "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n", - "V_ph=V_s/math.sqrt(3) \n", - "\n", - "#Results\n", - "print(\"per phase voltage V_ph=%.3f V\" %V_ph) \n", - "print(\"for constant load current\")\n", - "print(\"V_ph=%.2f V\" %V_ph)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "per phase voltage V_ph=110.384 V\n", - "for constant load current\n", - "V_ph=110.38 V\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.19, Page No 547" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "t=20.0\n", - "fos=2.0 #factor of safety\n", - "\n", - "#Calculations\n", - "t_c=t*fos\n", - "n=1.0/3\n", - "R=20.0\n", - "C=n**2*t_c/(4*R*math.log(2)) \n", - "\n", - "#Results \n", - "print(\"value of capacitor=%.2f uF\" %C)\n", - " #printing mistake in the answer in book." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "value of capacitor=0.08 uF\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.20, Page No 547" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=220.0\n", - "V_p=math.sqrt(2)*V_s/3 \n", - "V_L=math.sqrt(3)*V_p \n", - "V_p1=math.sqrt(2)*V_s/math.pi \n", - "V_L1=math.sqrt(3)*V_p1 \n", - "V_oh=math.sqrt(V_L**2-V_L1**2)\n", - "\n", - "#Calculations\n", - "THD=V_oh/V_L1 \n", - "V_a1=2*V_s/math.pi\n", - "V_a5=2*V_s/(5*math.pi)\n", - "V_a7=2*V_s/(7*math.pi)\n", - "V_a11=2*V_s/(11*math.pi)\n", - "R=4.0\n", - "L=0.02\n", - "f=50\n", - "w=2*math.pi*f\n", - "Z1=math.sqrt(R**2+(w*L)**2)\n", - "Z5=math.sqrt(R**2+(5*w*L)**2)\n", - "Z7=math.sqrt(R**2+(7*w*L)**2)\n", - "Z11=math.sqrt(R**2+(11*w*L)**2)\n", - "I_a1=V_a1/Z1\n", - "I_a5=V_a5/Z5\n", - "I_a7=V_a7/Z7\n", - "I_a11=V_a11/Z11\n", - "I_or=math.sqrt((I_a1**2+I_a5**2+I_a7**2+I_a11**2)/2)\n", - "P=3*I_or**2*R \n", - "I_s=P/V_s \n", - "I_TA=I_s/3 \n", - " \n", - "#Results\n", - "print(\"rms value of phasor voltages=%.2f V\" %V_p)\n", - "print(\"rms value of line voltages=%.2f V\" %V_L)\n", - "print(\"fundamental component of phase voltage=%.3f V\" %V_p1)\n", - "print(\"fundamental component of line voltages=%.3f V\" %V_L1)\n", - "print(\"THD=%.7f\" %THD)\n", - "print(\"load power=%.1f W\" %P)\n", - "print(\"avg value of source current=%.3f A\" %I_s)\n", - "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of phasor voltages=103.71 V\n", - "rms value of line voltages=179.63 V\n", - "fundamental component of phase voltage=99.035 V\n", - "fundamental component of line voltages=171.533 V\n", - "THD=0.3108419\n", - "load power=2127.6 W\n", - "avg value of source current=9.671 A\n", - "avg value of thyristor current=3.224 A\n" - ] - } - ], - "prompt_number": 17 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/chapter9.ipynb b/Power_Electronics/chapter9.ipynb deleted file mode 100755 index 052c4736..00000000 --- a/Power_Electronics/chapter9.ipynb +++ /dev/null @@ -1,388 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 09 : AC Voltage Controllers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1, Page No 560" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=45.0\n", - "\n", - "#Calculations\n", - "V_or=(V_m/2)*math.sqrt(1/math.pi*((2*math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", - "R=20\n", - "I_or=V_or/R\n", - "P_o=I_or**2*R \n", - "I_s=I_or\n", - "VA=V_s*I_s\n", - "pf=P_o/VA \n", - "V_o=math.sqrt(2)*V_s/(2*math.pi)*(math.cos(math.radians(a))-1)\n", - "I_ON=V_o/R \n", - "\n", - "#Results\n", - "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n", - "print(\"load power=%.1f W\" %P_o)\n", - "print(\"i/p pf=%.4f\" %pf)\n", - "print(\"avg i/p current=%.4f A\" %I_ON)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of o/p voltage=224.716 V\n", - "load power=2524.9 W\n", - "i/p pf=0.9770\n", - "avg i/p current=-0.7581 A\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2, Page No 560" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=45.0\n", - "\n", - "#Calculations\n", - "V_or=(V_s)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", - "R=20\n", - "I_or=V_or/R\n", - "P_o=I_or**2*R \n", - "I_s=I_or\n", - "VA=V_s*I_s\n", - "pf=P_o/VA \n", - "I_TA=math.sqrt(2)*V_s/(2*math.pi*R)*(math.cos(math.radians(a))+1) \n", - "I_Tr=math.sqrt(2)*V_s/(2*R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", - "\n", - "#Results\n", - "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n", - "print(\"load power=%.2f W\" %P_o)\n", - "print(\"i/p pf=%.2f\" %pf)\n", - "print(\"avg thyristor current=%.2f A\" %I_TA) \n", - "print(\"rms value of thyristor current=%.2f A\" %I_Tr)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of o/p voltage=219.304 V\n", - "load power=2404.71 W\n", - "i/p pf=0.95\n", - "avg thyristor current=4.42 A\n", - "rms value of thyristor current=7.75 A\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3 Page No 564" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "n=6.0 #on cycles\n", - "m=4.0 #off cycles\n", - "\n", - "#Calculations\n", - "k=n/(n+m)\n", - "V_or=V_s*math.sqrt(k) \n", - "pf=math.sqrt(k) \n", - "R=15\n", - "I_m=V_s*math.sqrt(2)/R\n", - "I_TA=k*I_m/math.pi\n", - "I_TR=I_m*math.sqrt(k)/2 \n", - " \n", - "#Results\n", - "print(\"rms value of o/ voltage=%.2f V\" %V_or)\n", - "print(\"i/p pf=%.2f\" %pf)\n", - "print(\"avg thyristor current=%.2f A\" %I_TA) \n", - "print(\"rms value of thyristor current=%.2f A\" %I_TR)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of o/ voltage=178.16 V\n", - "i/p pf=0.77\n", - "avg thyristor current=4.14 A\n", - "rms value of thyristor current=8.40 A\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4, Page No 569" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "R=3.0\n", - "\n", - "#Calculations\n", - "I_TAM1=2*V_m/(2*math.pi*R) \n", - "I_TRM2=V_m/(2*R) \n", - "f=50\n", - "w=2*math.pi*f\n", - "t_c=math.pi/w \n", - " \n", - "#Results\n", - "print(\"max value of avg thyristor current=%.3f A\" %I_TAM1)\n", - "print(\"max value of avg thyristor current=%.3f A\" %I_TRM2)\n", - "print(\"ckt turn off time=%.0f ms\" %(t_c*1000))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "max value of avg thyristor current=34.512 A\n", - "max value of avg thyristor current=54.212 A\n", - "ckt turn off time=10 ms\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5 Page No 575" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "R=3.0\n", - "X_L=4.0\n", - "\n", - "#Calculations\n", - "phi=math.degrees(math.atan(X_L/R)) \n", - "V_s=230\n", - "Z=math.sqrt(R**2+X_L**2)\n", - "I_or=V_s/Z \n", - "P=I_or**2*R \n", - "I_s=I_or\n", - "pf=P/(V_s*I_s) \n", - "I_TAM=math.sqrt(2)*V_s/(math.pi*Z) \n", - "I_Tm=math.sqrt(2)*V_s/(2*Z) \n", - "f=50\n", - "w=2*math.pi*f\n", - "di=math.sqrt(2)*V_s*w/Z \n", - "\n", - "#Results\n", - "print(\"min firing angle=%.2f deg\" %phi)\n", - "print(\"\\nmax firing angle=%.0f deg\" %180)\n", - "print(\"i/p pf=%.1f\" %pf)\n", - "print(\"max value of rms load current=%.0f A\" %I_or)\n", - "print(\"max power=%.0f W\" %P)\n", - "print(\"max value of avg thyristor current=%.3f A\" %I_TAM)\n", - "print(\"max value of rms thyristor current=%.3f A\" %I_Tm)\n", - "print(\"di/dt=%.0f A/s\" %di)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "min firing angle=53.13 deg\n", - "\n", - "max firing angle=180 deg\n", - "i/p pf=0.6\n", - "max value of rms load current=46 A\n", - "max power=6348 W\n", - "max value of avg thyristor current=20.707 A\n", - "max value of rms thyristor current=32.527 A\n", - "di/dt=20437 A/s\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6 Page No 576" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V=230.0\n", - "R=3.0 #ohm\n", - "X_L=5.0 #ohm\n", - "a=120.0 #firing angle delay\n", - "\n", - "#Calculations\n", - "phi=math.degrees(math.atan(X_L/R))\n", - "b=0\n", - "i=1\n", - "while (i>0) :\n", - " LHS=math.sin(math.radians(b-a))\n", - " RHS=math.sin(math.radians(a-phi))*math.exp(-(R/X_L)*(b-a)*math.pi/180)\n", - " if math.fabs(LHS-RHS)<= 0.01 :\n", - " B=b\n", - " i=2\n", - " break\n", - " \n", - " b=b+.1 \n", - "V_or=math.sqrt(2)*V*math.sqrt((1/(2*math.pi))*((B-a)*math.pi/180+(math.sin(math.radians(2*a))-math.sin(math.radians(2*B)))/2))\n", - "\n", - "\n", - "#Results\n", - "print(\"Extinction angle=%.1f deg\" %B) #answer in the book is wrong as formulae for RHS is wrongly employed\n", - "print(\"rms value of output voltage=%.2f V\" %V_or) #answer do not match due to wrong B in book\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Extinction angle=156.1 deg\n", - "rms value of output voltage=97.75 V\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.8, Page No 581" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#initialisation of variables\n", - "V_s=230.0\n", - "V_m=math.sqrt(2)*V_s\n", - "a=60.0\n", - "R=20.0\n", - "\n", - "#Calculations\n", - "V_or=math.sqrt((V_m**2/(2*math.pi))*(a*math.pi/180-math.sin(math.radians(2*a))/2)+(2*V_m**2/(math.pi))*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2)) \n", - "I_T1r=(V_m/R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", - "I_T3r=(V_m/(2*R))*math.sqrt(1/math.pi*((a*math.pi/180)-math.sin(math.radians(2*a))/2)) \n", - "I1=math.sqrt(2)*I_T1r\n", - "I3=math.sqrt((math.sqrt(2)*I_T1r)**2+(math.sqrt(2)*I_T3r)**2)\n", - "r=V_s*(I1+I3) \n", - "P_o=V_or**2/R\n", - "pf=P_o/r \n", - "\n", - "#Results\n", - "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", - "print(\"rms value of current for upper thyristors=%.2f A\" %I_T1r)\n", - "print(\"rms value of current for lower thyristors=%.2f A\" %I_T3r)\n", - "print(\"t/f VA rating=%.2f VA\" %r)\n", - "print(\"i/p pf=%.2f\" %pf)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rms value of o/p voltage=424.94 V\n", - "rms value of current for upper thyristors=14.59 A\n", - "rms value of current for lower thyristors=3.60 A\n", - "t/f VA rating=9631.61 VA\n", - "i/p pf=0.94\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Power_Electronics/screenshots/Capture.png b/Power_Electronics/screenshots/Capture.png deleted file mode 100755 index fea874d6..00000000 Binary files a/Power_Electronics/screenshots/Capture.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Capture1.png b/Power_Electronics/screenshots/Capture1.png deleted file mode 100755 index 28481be5..00000000 Binary files a/Power_Electronics/screenshots/Capture1.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Capture2.png b/Power_Electronics/screenshots/Capture2.png deleted file mode 100755 index f52a294c..00000000 Binary files a/Power_Electronics/screenshots/Capture2.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter2.png b/Power_Electronics/screenshots/Chapter2.png deleted file mode 100755 index 9380fbcb..00000000 Binary files a/Power_Electronics/screenshots/Chapter2.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter2_1.png b/Power_Electronics/screenshots/Chapter2_1.png deleted file mode 100755 index 9380fbcb..00000000 Binary files a/Power_Electronics/screenshots/Chapter2_1.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter2_2.png b/Power_Electronics/screenshots/Chapter2_2.png deleted file mode 100755 index 9380fbcb..00000000 Binary files a/Power_Electronics/screenshots/Chapter2_2.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter2_3.png b/Power_Electronics/screenshots/Chapter2_3.png deleted file mode 100755 index 9380fbcb..00000000 Binary files a/Power_Electronics/screenshots/Chapter2_3.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter2_4.png b/Power_Electronics/screenshots/Chapter2_4.png deleted file mode 100755 index 9380fbcb..00000000 Binary files a/Power_Electronics/screenshots/Chapter2_4.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter3.png b/Power_Electronics/screenshots/Chapter3.png deleted file mode 100755 index cef740d3..00000000 Binary files a/Power_Electronics/screenshots/Chapter3.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter3_1.png b/Power_Electronics/screenshots/Chapter3_1.png deleted file mode 100755 index cef740d3..00000000 Binary files a/Power_Electronics/screenshots/Chapter3_1.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter3_2.png b/Power_Electronics/screenshots/Chapter3_2.png deleted file mode 100755 index cef740d3..00000000 Binary files a/Power_Electronics/screenshots/Chapter3_2.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter3_3.png b/Power_Electronics/screenshots/Chapter3_3.png deleted file mode 100755 index cef740d3..00000000 Binary files a/Power_Electronics/screenshots/Chapter3_3.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter3_4.png b/Power_Electronics/screenshots/Chapter3_4.png deleted file mode 100755 index cef740d3..00000000 Binary files a/Power_Electronics/screenshots/Chapter3_4.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter4.png b/Power_Electronics/screenshots/Chapter4.png deleted file mode 100755 index a1d64cf1..00000000 Binary files a/Power_Electronics/screenshots/Chapter4.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter4_1.png b/Power_Electronics/screenshots/Chapter4_1.png deleted file mode 100755 index a1d64cf1..00000000 Binary files a/Power_Electronics/screenshots/Chapter4_1.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter4_2.png b/Power_Electronics/screenshots/Chapter4_2.png deleted file mode 100755 index a1d64cf1..00000000 Binary files a/Power_Electronics/screenshots/Chapter4_2.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter4_3.png b/Power_Electronics/screenshots/Chapter4_3.png deleted file mode 100755 index a1d64cf1..00000000 Binary files a/Power_Electronics/screenshots/Chapter4_3.png and /dev/null differ diff --git a/Power_Electronics/screenshots/Chapter4_4.png b/Power_Electronics/screenshots/Chapter4_4.png deleted file mode 100755 index a1d64cf1..00000000 Binary files a/Power_Electronics/screenshots/Chapter4_4.png and /dev/null differ diff --git a/Power_Electronics/screenshots/ex1_2.PNG b/Power_Electronics/screenshots/ex1_2.PNG deleted file mode 100755 index abb82616..00000000 Binary files a/Power_Electronics/screenshots/ex1_2.PNG and /dev/null differ diff --git a/Power_Electronics/screenshots/ex1_2_1.PNG b/Power_Electronics/screenshots/ex1_2_1.PNG deleted file mode 100755 index abb82616..00000000 Binary files a/Power_Electronics/screenshots/ex1_2_1.PNG and /dev/null differ diff --git a/Power_Electronics/screenshots/ex1_9.PNG b/Power_Electronics/screenshots/ex1_9.PNG deleted file mode 100755 index 49309df8..00000000 Binary files a/Power_Electronics/screenshots/ex1_9.PNG and /dev/null differ diff --git a/Power_Electronics/screenshots/ex1_9_1.PNG b/Power_Electronics/screenshots/ex1_9_1.PNG deleted file mode 100755 index 49309df8..00000000 Binary files a/Power_Electronics/screenshots/ex1_9_1.PNG and /dev/null differ diff --git a/Power_Electronics/screenshots/ex9_6.PNG b/Power_Electronics/screenshots/ex9_6.PNG deleted file mode 100755 index f5604a90..00000000 Binary files a/Power_Electronics/screenshots/ex9_6.PNG and /dev/null differ diff --git a/Power_Electronics/screenshots/ex9_6_1.PNG b/Power_Electronics/screenshots/ex9_6_1.PNG deleted file mode 100755 index f5604a90..00000000 Binary files a/Power_Electronics/screenshots/ex9_6_1.PNG and /dev/null differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb new file mode 100755 index 00000000..a1e99a45 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb @@ -0,0 +1,283 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Power Supplies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 10.1, Page No. 416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Voltage regulation and % change in output voltage per unit of load current\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vfl = 24 # full load voltage\n", + "Vnl = 24.5 # no load voltage\n", + "Ifl = 2 # full load current\n", + "\n", + "#calculations\n", + "#(a)\n", + "VR = (Vnl-Vfl)/Vfl\n", + "#(b)\n", + "x = VR*100/Ifl\n", + "\n", + "#Result\n", + "print(\"(a) Voltage regulation = %.4f or %.2f%%\\n(b) %%tage change in output voltage per unit load current = %.2f%%\"%(VR,VR*100,x))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Voltage regulation = 0.0208 or 2.08%\n", + "(b) %tage change in output voltage per unit load current = 1.04%\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 10.2, Page No. 416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Redulation in percent V\n", + "\n", + "\n", + "import math\n", + "Vout = 0.3 # change in output voltage when input change\n", + "Vin = 4 # input voltage change\n", + "V = 15 # rated ouutput voltage\n", + "\n", + "#calculations\n", + "lr = (Vout/V)*100/Vin\n", + "print(\"%% line regulation = %.1f%% V\"%lr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% line regulation = 0.5% V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 10.3, Page No. 416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output voltage, load current, zener curretn\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vi = 15.0 # input voltage\n", + "beta_dc = 50.0 # transistor gain\n", + "Rl = 1000.0 # load resistor\n", + "Vz = 6.0 # zener voltage\n", + "Ri = 500.0 # input voltage\n", + "Vbe = 0.7 # voltage drop across transistor base-emitter\n", + "\n", + "#Calculations\n", + "Vo = Vz-Vbe\n", + "Il = Vo/Rl\n", + "Vce = Vi-Vo\n", + "I = (V-Vz)/Ri\n", + "Ib = Il/beta_dc\n", + "Iz = I-Ib\n", + "\n", + "#Result\n", + "print(\"Vo = %.1fV\\nLoad current = %.1f mA\\nZener current = %.3f mA\"%(Vo,Il*1000,Iz*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vo = 5.3V\n", + "Load current = 5.3 mA\n", + "Zener current = 17.894 mA\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 10.4, Page No. 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#output voltage(referring fig.10.2)\n", + "\n", + "import math\n", + "Vz = 6.0 # zener voltage\n", + "R1 = 10.0*10**3 # resistance 1\n", + "R2 = 15.0*10**3 # resistance 2\n", + "\n", + "#Calculations\n", + "Vo = (1+(R2/R1))*Vz\n", + "\n", + "#Result\n", + "print(\"Vo = %d V\"%Vo)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vo = 15 V\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 10.5, Page No. 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# finding Vo, Io, Ic (referring fig.10.1)\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vz = 9.0 # zener voltage\n", + "R1 = 1.5*10**3 # resistance 1\n", + "R2 = 3.0*10**3 # resistance 2, value used in calculations\n", + "Rl = 2.0*10**3 # load resistance\n", + "Rs = 200 # source resistance\n", + "Vin = 30 # input oltage\n", + "\n", + "#Calculations\n", + "Vo = (1+(R2/R1))*Vz\n", + "Is =(Vin - Vo)/Rs\n", + "Io = Vo/Rl\n", + "Ic = Is -Io\n", + "\n", + "#Result\n", + "print(\"Vo = %d V\\nIo = %.1f mA\\nIc = %.1f mA\"%(Vo,Io*1000,Ic*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vo = 27 V\n", + "Io = 13.5 mA\n", + "Ic = 1.5 mA\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 10.6, Page No. 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Minimum and maximum output voltage\n", + "\n", + "import math\n", + "# variable declaration\n", + "Iadj = 40*10**-6 # current\n", + "Vref = 1.25 # reference voltage\n", + "R1 = 2*10**3 # resistance R1\n", + "R2min = 0 # minimum value of R2 resistor\n", + "R2max = 20.0*10**3 # maximum value of R2 resistor\n", + "\n", + "#calculations\n", + "Vo1 = (Vref*(1+(R2max/R1)))+Iadj*R2max\n", + "Vo2 = Vref*(1+(R2min/R1))\n", + "\n", + "#Result\n", + "print(\"When R2 = %d k-ohm\\nVo = %.2f V\"%(R2max/1000,Vo1))\n", + "print(\"\\nWhen R2 = %d k-ohm\\nVo = %.2f V\"%(R2min/1000,Vo2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When R2 = 20 k-ohm\n", + "Vo = 14.55 V\n", + "\n", + "When R2 = 0 k-ohm\n", + "Vo = 1.25 V\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb new file mode 100755 index 00000000..46f69125 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb @@ -0,0 +1,1030 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Integrated Citcuits and Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.1, Page No.442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# dc currents and voltage of differential amplifier\n", + "\n", + "import math\n", + "# Variable declaration\n", + "Vcc = 12 # collector voltage\n", + "Vee = -12 # emitter voltage\n", + "Rc = 4.1*10**3 # Collector resistance\n", + "Re = 3.8*10**3 # emitter resistance\n", + "Vbe = 0.7 # voltage across base-emitter junction\n", + "\n", + "#Calculations\n", + "Ie = (Vcc-Vbe)/Re\n", + "Ic = 0.5*Ie\n", + "Vo = Vcc-Ic*Rc\n", + "\n", + "#Result\n", + "print(\"Ie = %.4f mA\\nIc = %.3f mA\\nVo = %.1f V\"%(Ie*1000,Ic*1000,Vo))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ie = 2.9737 mA\n", + "Ic = 1.487 mA\n", + "Vo = 5.9 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.2, Page No.442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Differential amplifier parameters\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vcc = 12 # collector voltage\n", + "Vee = -12 # emitter voltage\n", + "Rc = 1*10**6 # Collector resistance\n", + "Re = 1*10**6 # emitter resistance\n", + "Vbe = 0.7 # voltage across base-emitter junction\n", + "vi = 2.1*10**-3 # AC input voltage\n", + "beta = 75 \n", + "\n", + "#Calculations\n", + "#(a)\n", + "Ie = (Vcc-Vbe)/Re\n", + "ie = 0.5*Ie\n", + "re = (25*10**-3)/ie\n", + "re_dash = 4420.0#value used in the book\n", + "#(b)\n", + "g = Rc/(2*re_dash)\n", + "g = math.floor(g*10)/10\n", + "#(c)\n", + "vo = g*vi\n", + "vo = math.floor(vo*10000)/10000\n", + "#(d)\n", + "Zi = 2*beta*re\n", + "#(e)\n", + "cmg = Rc/(re+2*Re)\n", + "cmg = math.ceil(cmg*1000)/1000\n", + "#(f)\n", + "cmrr = g/cmg\n", + "#(g)\n", + "cmrr_db = 20*math.log10(cmrr)\n", + "\n", + "#Result\n", + "print(\"(a) re = %d ohm\\n(b) voltage gain for differential input = %.1f\\n(c) AC output voltage = %.4f V\"%(re,g,vo))\n", + "print(\"(d) input impedance = %d k-ohm\\n(e) CMRR = %.2f\\n(g) CMRR' = %.1f dB\"%(Zi/1000,cmrr,cmrr_db))\n", + "\n", + "#Answer for re is wong in the book " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) re = 4424 ohm\n", + "(b) voltage gain for differential input = 113.1\n", + "(c) AC output voltage = 0.2375 V\n", + "(d) input impedance = 663 k-ohm\n", + "(e) CMRR = 226.65\n", + "(g) CMRR' = 47.1 dB\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.3, Page No. 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Op-amp with negative feedback\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ag = 100000.0 # open loop gain of Op-amp\n", + "fb = 0.01 # feed back factor\n", + "vi = 2*10**-3 # input voltage\n", + "\n", + "#Calculations\n", + "# a\n", + "g = Ag/(1+(fb*Ag))\n", + "# b\n", + "v = vi*g\n", + "# c\n", + "Ev = v/Ag\n", + "\n", + "#Result\n", + "print(\"(a) Closed loop gain = %.1f \\n(b) Output = %.4f V\\n(c) Error voltage = %.3f*10^-6 V\"%(g,v,Ev*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Closed loop gain = 99.9 \n", + "(b) Output = 0.1998 V\n", + "(c) Error voltage = 1.998*10^-6 V\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.4, Page No. 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Op-amp with negative feedback\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ag = 15000.0 # open loop gain of Op-amp\n", + "fb = 0.01 # feed back factor\n", + "vi = 2*10**-3 # input voltage\n", + "\n", + "#Calculations\n", + "# a\n", + "g = Ag/(1+(fb*Ag))\n", + "# b\n", + "v = vi*g\n", + "# c\n", + "Ev = v/Ag\n", + "\n", + "#Result\n", + "print(\"(a) Closed loop gain = %.3f \\n(b) Output = %.4f V\\n(c) Error voltage = %.3f*10^-5 V\"%(g,v,Ev*10**5))\n", + "print(\"\\nComparison conclusion:\\nA decrease in open loop gain causes a corresponding increase in error voltage,\")\n", + "print(\"thus keeping the output voltage nearly constant.\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Closed loop gain = 99.338 \n", + "(b) Output = 0.1987 V\n", + "(c) Error voltage = 1.325*10^-5 V\n", + "\n", + "Comparison conclusion:\n", + "A decrease in open loop gain causes a corresponding increase in error voltage,\n", + "thus keeping the output voltage nearly constant.\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.5, Page No. 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# input/output impedances\n", + "\n", + "import math\n", + "#variable declaration\n", + "g = 100000.0 # open loop gain\n", + "Zi = 2*10**6 # input impedance\n", + "Zo = 75 # output impedance\n", + "beta = 0.01 # feedback factor\n", + "\n", + "#Calculations\n", + "D = 1+ beta*g\n", + "Zi_cl = Zi*D\n", + "Zo_cl = Zo/D\n", + "\n", + "#Result\n", + "print(\"Closed loop input impedance = %.0f M-ohm\\nClosed loop output impedance = %.4f ohm\"%(Zi_cl/10**6,Zo_cl))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop input impedance = 2002 M-ohm\n", + "Closed loop output impedance = 0.0749 ohm\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.6, Page No.448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# closed loop gain and disensitivity\n", + "\n", + "import math\n", + "#Variable declaration\n", + "g = 100000.0 # open loop gain\n", + "beta = 0.001 # feedback factor\n", + "\n", + "#calculations\n", + "clg = g/(1+ beta*g)\n", + "D = 1+g*beta\n", + "\n", + "# Result\n", + "print(\"Closed loop gain = %.1f \\nDesensitivity = %.0f \"%(clg,D))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop gain = 990.1 \n", + "Desensitivity = 101 \n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.7, Page No.448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# closed loop gain and upper cut off frequency\n", + "\n", + "import math\n", + "#Variable declaration\n", + "f = 10**6 # unity gain frequency\n", + "alg = 100000.0 # open loop gain\n", + "b1 = 0.001 # feedback factor in case 1\n", + "b2 = 0.01 # feedback factor in case 2\n", + "b3 = 0.1 # feedback factor in case 3\n", + "\n", + "#calculations\n", + "# a\n", + "f1 = f/alg\n", + "# b\n", + "g2 = alg/(1+alg*b1)\n", + "f2 = f/g2\n", + "# c\n", + "g3 = alg/(1+alg*b2)\n", + "f3 = f/g3\n", + "# d\n", + "g4 = alg/(1+alg*b3)\n", + "f4 = f/g4\n", + "\n", + "#Result\n", + "print(\"Open loop,\\tgain = %.0f \\tf2 = %d Hz\"%(alg,f1))\n", + "print(\"Closed loop,\\tgain = %.1f \\tf2 = %d Hz\"%(g2,f2))\n", + "print(\"Closed loop,\\tgain = %.1f \\tf2 = %d Hz\"%(g3,f3))\n", + "print(\"Closed loop,\\tgain = %.3f \\tf2 = %d Hz\"%(g4,f4))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open loop,\tgain = 100000 \tf2 = 10 Hz\n", + "Closed loop,\tgain = 990.1 \tf2 = 1010 Hz\n", + "Closed loop,\tgain = 99.9 \tf2 = 10010 Hz\n", + "Closed loop,\tgain = 9.999 \tf2 = 100010 Hz\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.8, Page No.449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Slew rating\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Imax = 10*10**-6 # maximum current\n", + "C = 4000*10**-12 # capacitance in pF\n", + "\n", + "#Calculations\n", + "sr = Imax/C\n", + "\n", + "#Result\n", + "print(\"Slew rate = %.1f V/ms\"%(sr/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slew rate = 2.5 V/ms\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.9, Page No. 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# slew rate distortion\n", + "\n", + "import math\n", + "#Variable declaration\n", + "sr = 0.4 # Slew rate\n", + "V = 6 # peak value of voltage\n", + "f = 10*10**3 # frequency\n", + "\n", + "#Calculations\n", + "slope = 2*math.pi*f*V\n", + "\n", + "#Result\n", + "print(\"Initial slope of sine wave =%.5f V/micro-sec\"%(slope/10**6))\n", + "print(\"\\nSince the slew rate of amplifier is %.1f V/micro-sec, there is no slew rate distortion.\"%(sr))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial slope of sine wave =0.37699 V/micro-sec\n", + "\n", + "Since the slew rate of amplifier is 0.4 V/micro-sec, there is no slew rate distortion.\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.10, Page No. 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Slew rate distortion \n", + "\n", + "import math\n", + "#Variable declaration\n", + "sr = 0.5*10**6 # slew rate\n", + "V = 10 # peak value of input signal\n", + "f = 10*10**3 # frequency\n", + "\n", + "#calculations\n", + "# a\n", + "slope = 2*math.pi*f*V\n", + "# b\n", + "Vp = sr/(2*math.pi*f)\n", + "\n", + "#Result\n", + "print(\"(a) Initial slope of sine wave = %.3f V/micro-sec\"%(slope/10**6))\n", + "print(\"Since initial slope is more than the slew rate of amplifier, slew rate distortion will occur.\")\n", + "print(\"\\n(b) To eliminate slew rate distortion,\\n Vp = %.2f V\"%Vp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Initial slope of sine wave = 0.628 V/micro-sec\n", + "Since initial slope is more than the slew rate of amplifier, slew rate distortion will occur.\n", + "\n", + "(b) To eliminate slew rate distortion,\n", + " Vp = 7.96 V\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.11, Page No.451" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# inverting amplifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = 100000.0 # open loop gain\n", + "Zo = 75.0 # output impedance\n", + "f = 1.0*10**6 # unity gain frequency\n", + "R1 = 1.0*10**3 # Source Resistance \n", + "Rf = 100.0*10**3 # feedback resistance\n", + "\n", + "#Calculations\n", + "# a\n", + "g = -Rf/R1\n", + "# b\n", + "beta = R1/(R1+Rf)\n", + "D = 1+(A*beta)\n", + "# c\n", + "f2 = beta*f\n", + "# d\n", + "Zi_cl = R1\n", + "\n", + "#result\n", + "print(\"(a) Gain = %f\\n(b) disensitivity = %.1f\"%(g,D))\n", + "print(\"(c) closed loop upper cut off frequency = %.1f*10^3 Hz\\n(d) closed loop input impedance = %.0f ohm\"%(f2/1000,Zi_cl))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Gain = -100.000000\n", + "(b) disensitivity = 991.1\n", + "(c) closed loop upper cut off frequency = 9.9*10^3 Hz\n", + "(d) closed loop input impedance = 1000 ohm\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.12, Page No. 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# closed loop voltage gain, input/output impedance(refering to fig 12.11)\n", + "\n", + "import math\n", + "# Variable declaration\n", + "R2 = 100.0*10**3 # Resistance R2\n", + "R1 = 100.0 # Resistance R1\n", + "A = 100000.0 # open loop gain\n", + "Zin = 2*10**6 # input impedance\n", + "Zo = 75 # output impedance\n", + "\n", + "# Calculations\n", + "g = (R1+R2)/R1\n", + "beta = R1/(R1+R2)\n", + "Zi_dash = (1+A*beta)*Zin\n", + "Zo_dash = Zo/(1+A*beta)\n", + "\n", + "#Result\n", + "print(\"Closed loop gain = %.0f \\nClosed loop input impedance = %.1f M-ohm\\nClosed loop output impedance = %.3f ohm\"%(g,Zi_dash/10**6,Zo_dash))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop gain = 1001 \n", + "Closed loop input impedance = 201.8 M-ohm\n", + "Closed loop output impedance = 0.743 ohm\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.13, Page No.454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Op-amp parameters(refering to fig. 12.13)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = 100000.0 # open loop gain\n", + "f = 1.0*10**6 # unity gain frequency\n", + "R3 = 150 *10**3 # Resistance R3\n", + "Ci = 1*10**-6 # inpuut capacitor\n", + "R2 = 100*10**3 # Resistance R2\n", + "Cb = 1*10**-6 # Bias capacitor\n", + "R1 = 1.0*10**3 # Resistance R1\n", + "Co = 1*10**-6 # output capacitance\n", + "Rl = 15*10**3 # load resistance\n", + "\n", + "#Calculations\n", + "# a\n", + "A = (R1+R2)/R1\n", + "# b\n", + "beta = 1/A\n", + "f2 = f/A\n", + "# c\n", + "fc1 = 1/(2*math.pi*Ci*R3)\n", + "fc2 = 1/(2*math.pi*Cb*Rl)\n", + "fc3 = 1/(2*math.pi*Co*R1)\n", + "\n", + "#Result\n", + "print(\"(a) Avf = %.0f \\n\\n(b) f2' =%.1f*10^3 Hz\"%(A,f2/1000))\n", + "print(\"\\n(c) The critical frequencies are,\\n fc = %.3f Hz\\n fc = %.2f Hz\\n fc = %.2f Hz\"%(fc1,fc2,fc3))\n", + "print(\"\\n(d) Evidently the lower cut off frequency is the highest of the above three critical frequencies, i.e. %.2f Hz\"%fc3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Avf = 101 \n", + "\n", + "(b) f2' =9.9*10^3 Hz\n", + "\n", + "(c) The critical frequencies are,\n", + " fc = 1.061 Hz\n", + " fc = 10.61 Hz\n", + " fc = 159.15 Hz\n", + "\n", + "(d) Evidently the lower cut off frequency is the highest of the above three critical frequencies, i.e. 159.15 Hz\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.14, Page No.455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output voltage(referring fig.12.14)\n", + "\n", + "import math\n", + "# Variable declaration\n", + "v1 = 0.5 # input voltage 1\n", + "v2 = 1.5 # input voltage 2\n", + "v3 = 0.2 # input voltage 3\n", + "R1 = 10.0*10**3 # resistance R1\n", + "R2 = 10.0*10**3 # resistance R2\n", + "R3 = 10.0*10**3 # resistance R3\n", + "Rf = 50.0*10**3 # feedback resistance\n", + "\n", + "#Calculations\n", + "vo = -Rf*((v1/R1)+(v2/R2)+(v3/R3))\n", + "\n", + "#Result\n", + "print(\"Output Voltage = %.0f V\"%vo)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage = -11 V\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.15, Page No.455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.16, Page No.456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.17, Page No. 457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# difference amplifier(referring fig. 12.18)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "R1 = 50.0*10**3 # Resistance R1\n", + "R2 = 10.0*10**3 # Resistance R2\n", + "Vs1 = 4.5 # input voltage at channel 1\n", + "Vs2 = 5.0 # input voltage at channel 2\n", + "\n", + "\n", + "#Calculations\n", + "vo = R1*(Vs2-Vs1)/R2\n", + "\n", + "#Result\n", + "print(\"Output voltage = %.1f V\"%vo)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 2.5 V\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.18, Page No.458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# CMRR in dB\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = 50.0 # gain of difference amplifier\n", + "v = 2.0 # input voltage\n", + "vo = 5.0*10**-3 # output voltage \n", + "\n", + "#Calculations\n", + "Vcom = 0.5*(v+v)\n", + "Acom = vo/Vcom\n", + "cmrr = A/Acom\n", + "cmrr = 20*math.log10(cmrr)\n", + "\n", + "#Result\n", + "print(\"CMRR = %.2f dB\"%(cmrr))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CMRR = 86.02 dB\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.19, Page No.458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical Example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical Example\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.20, Page No.459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical Example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical Example\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.21, Page No.466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# two pole high pass filter(referring fig. 12.32)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "R1 = 10.0*10**3 # Resistance R1\n", + "R2 = 5.6*10**3 # Resistance R2\n", + "R = 1.0*10**3 # Resistance R\n", + "C = 0.01 *10**-6 # capacitance \n", + "vi = 1.6*10**-3 # input voltage \n", + "\n", + "#Calculations\n", + "# a\n", + "A = 1+(R2/R1)\n", + "# b\n", + "vo = A*vi\n", + "# c\n", + "pi = math.ceil(math.pi*10000)/10000\n", + "fc = 1/(2*pi*R*C)\n", + "# d\n", + "gain = 0.707*A\n", + "\n", + "#Result\n", + "print(\"(a) midband gain = %.2f\\n(b) output voltage = %.3f mV\\n(c) fc = %.2f Hz\\n(d) Gain = %.3f\"%(A,vo*1000,fc,gain))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) midband gain = 1.56\n", + "(b) output voltage = 2.496 mV\n", + "(c) fc = 15915.46 Hz\n", + "(d) Gain = 1.103\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.22, Page No. 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Low pass filter(referring fig. 12.30)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vi = 1.1*10**-3 # input voltage\n", + "R = 10*10**3 # Resistance\n", + "C = 0.001*10**-6 # Capacitance\n", + "R1 = 10*10**3 # Resistance R1\n", + "R2 = 5.6*10**3 # Resistance R2\n", + "\n", + "#Calculations\n", + "# a\n", + "A = (R1+R2)/R1\n", + "vo1 = A*vi\n", + "# b\n", + "fc = 1/(2*math.pi*R*C)\n", + "# c\n", + "vo = 0.707*vo1\n", + "\n", + "#Result\n", + "print(\"(a) Avf = %.2f\\n Vo = %.3f*10^-3 V\\n(b) fc = %.3f*10^3 Hz\\n(c) at f = fc,\\nVo = %.3f* 10^-3 V\"%(A,vo1*1000,fc/1000,vo*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Avf = 1.56\n", + " Vo = 1.716*10^-3 V\n", + "(b) fc = 15.915*10^3 Hz\n", + "(c) at f = fc,\n", + "Vo = 1.213* 10^-3 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 12.23, Page No.466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb new file mode 100755 index 00000000..2e5b592a --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb @@ -0,0 +1,965 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Number Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.1, Page No. 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Decimal to binary conversion: 10\n", + "\n", + "import math\n", + "#variable declaration\n", + "N = 10 # decimal no to be convered to binary\n", + "k = N\n", + "#Calculations\n", + "i = 0\n", + "b =[0,0,0,0,0,0]\n", + "while(N!=0):\n", + " b[i] = N%2\n", + " N = N/2\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"Binary equivalent of decimal %d is %d%d%d%d\"%(k,b[3],b[2],b[1],b[0]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binari equivalent of decimal 10 is 1010\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.2, Page No.474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Decimal to binary conversion: 25\n", + "\n", + "import math\n", + "#variable declaration\n", + "N = 25 # decimal no to be convered to binary\n", + "\n", + "#Calculations\n", + "k = N\n", + "i = 0\n", + "b =[0,0,0,0,0,0]\n", + "while(N!=0):\n", + " b[i] = N%2\n", + " N = N/2\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"Binary equivalent of decimal %d is %d%d%d%d%d\"%(k,b[4],b[3],b[2],b[1],b[0]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binari equivalent of decimal 25 is 11001\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.3, Page No. 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Binary to decimal:101110\n", + "\n", + "import math\n", + "b0 = 0 # bit 0\n", + "b1 = 1 # bit 1\n", + "b2 = 1 # bit 2\n", + "b3 = 1 # bit 3\n", + "b4 = 0 # bit 4\n", + "b5 = 1 # bit 5\n", + "\n", + "#Calculations\n", + "D = (2**0)*b0+(2**1)*b1+(2**2)*b2+(2**3)*b3+(2**4)*b4+(2**5)*b5\n", + "\n", + "#Result\n", + "print(\"Decimal no is %d\"%D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decimal no is 46\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.4, Page No. 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Decimal to binary conversion: 15,31\n", + "\n", + "import math\n", + "#######################################################################################\n", + "# for N = 15\n", + "#variable declaration\n", + "N = 15 # decimal no to be convered to binary\n", + "\n", + "#Calculations\n", + "k = N\n", + "i = 0\n", + "b =[0,0,0,0,0,0]\n", + "while(N!=0):\n", + " b[i] = N%2\n", + " N = N/2\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"(a)\\nBinary equivalent of decimal %d is %d%d%d%d%d\"%(k,b[4],b[3],b[2],b[1],b[0]))\n", + "\n", + "########################################################################################\n", + "\n", + "# For N =31\n", + "#variable declaration\n", + "N = 31 # decimal no to be convered to binary\n", + "\n", + "#Calculations\n", + "k = N\n", + "i = 0\n", + "b =[0,0,0,0,0,0]\n", + "while(N!=0):\n", + " b[i] = N%2\n", + " N = N/2\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"Binary equivalent of decimal %d is %d%d%d%d%d\"%(k,b[4],b[3],b[2],b[1],b[0]))\n", + "##########################################################################################\n", + "#Addition\n", + "c= bin(15+31)[2:]\n", + "print(\"(b) Addition of 15 and 31 is %s in binary. Decimal equivalent of %s is %d\"%(c,c,int(c,2)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Binari equivalent of decimal 15 is 01111\n", + "Binari equivalent of decimal 31 is 11111\n", + "(b) Addition of 15 and 31 is 101110 in binary. Decimal equivalent of 101110 is 46\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.5, Page No.475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Binary subtraction\n", + "\n", + "import math\n", + "#Variable declaration\n", + "n1 = 11001 # first number\n", + "n2 = 10001 # second number\n", + "\n", + "#calculations\n", + "n1 = int(str(n1),2)\n", + "n2 = int(str(n2),2)\n", + "c = bin(n1-n2)[2:]\n", + "\n", + "#Result\n", + "print(\"Subtraction result in binary = %s\"%c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subtraction result in binary = 1000\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.6, Page No.475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Binary subtraction\n", + "\n", + "import math\n", + "#Variable declaration\n", + "n1 = 1010 # first number\n", + "n2 = 111 # second number\n", + "\n", + "#calculations\n", + "n1 = int(str(n1),2)\n", + "n2 = int(str(n2),2)\n", + "c = bin(n1-n2)[2:]\n", + "\n", + "#Result\n", + "print(\"Subtraction result in binary = %s\"%c)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Subtraction result in binary = 11\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.7, Page No. 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 16- bit signed binary representation\n", + "\n", + "import math\n", + "#Variable declaration\n", + "a = 8\n", + "b = -8\n", + "c = 165\n", + "d = -165\n", + "\n", + "#Calculations\n", + "#c = bin(d)\n", + "a = format(a,'#018b')[2:]\n", + "b = format(b,'#018b')[3:]\n", + "c = format(c,'#018b')[2:]\n", + "d = format(d,'#018b')[3:]\n", + "str = '1'\n", + "#Result\n", + "print(\"In the leading bit we will have 1 to represent '-' sign\\n\")\n", + "print(\"(a) +8 --> %s\"%(a))\n", + "print(\"(b) -8 --> %s%s\"%(str,b))\n", + "print(\"(c) +167 --> %s\"%(c))\n", + "print(\"(d) -167 --> %s%s\"%(str,d))\n", + "\n", + "a = format(-167%(1<<16),'016b')\n", + "b = format(167%(1<<16),'016b')\n", + "print a\n", + "print b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In the leading bit we will have 1 to represent '-' sign\n", + "\n", + "(a) +8 --> 0000000000001000\n", + "(b) -8 --> 1000000000001000\n", + "(c) +167 --> 0000000010100101\n", + "(d) -167 --> 1000000010100101\n", + "1111111101011001\n", + "0000000010100111\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.8, Page No.477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 2's complement\n", + "\n", + "import math\n", + "# variable declaration\n", + "a = int('00011111',2)\n", + "b = int('11100101',2)\n", + "c = int('11110111',2)\n", + "\n", + "#Calculations\n", + "a = format(-a%(1<<8),'08b')\n", + "b = format(-b%(1<<8),'08b')\n", + "c = format(-c%(1<<8),'08b')\n", + "print(\"(a) 2's complement of 00011111 --> %s \" %a)\n", + "print(\"(b) 2's complement of 11100101 --> %s \" %b)\n", + "print(\"(c) 2's complement of 11110111 --> %s \" %c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) 2's complement of 00011111 --> 11100001 \n", + "(b) 2's complement of 11100101 --> 00011011 \n", + "(c) 2's complement of 11110111 --> 00001001 \n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.9, Page No. 13.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 8-bit number range\n", + "\n", + "import math\n", + "#calculations\n", + "a = int('01111111',2)\n", + "b = int('10000000',2)\n", + "\n", + "#Result\n", + "print(\"largest positive 8-bit no in %d and smallest negative number is -%d\"%(a,b))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "largest positive 8-bit no in 127 and smallest negative number is -128\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.10, Page No.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 2's complement and addition,subtraction\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = -24\n", + "B = 16\n", + "#Calculations\n", + "#2's complement\n", + "a = format(A%(1<<8),'08b')\n", + "b = format(-B%(1<<8),'08b')\n", + "# addition\n", + "c = bin(A+B)[3:]\n", + "c = format(-int(c,2)%(1<<8),'08b')\n", + "#Subtraction\n", + "d = bin(A-B)[3:]\n", + "d = format(-int(d,2)%(1<<8),'08b')\n", + "#Result\n", + "print(\"(a)\\n2's complement of -24 --> %s \" %a)\n", + "print(\"2's complement of 16 --> %s \" %b)\n", + "print(\"(b) A+B = %s\"%c) \n", + "print(\"(c) A-B = %s\"%d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "2's complement of -24 --> 11101000 \n", + "2's complement of 16 --> 11110000 \n", + "(b) A+B = 11111000\n", + "(c) A-B = 11011000\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.11, Page No. 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 2's complement and addition,subtraction\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = -60\n", + "B = -28\n", + "#Calculations\n", + "#2's complement\n", + "a = format(A%(1<<8),'08b')\n", + "b = format(B%(1<<8),'08b')\n", + "# addition\n", + "c = bin(A+B)[3:]\n", + "c = format(-int(c,2)%(1<<8),'08b')\n", + "#Subtraction\n", + "x = B-A\n", + "d = bin(B-A)[2:]\n", + "d = format(int(d,2),'08b')\n", + "#Result\n", + "print(\"(a)\\n2's complement of A --> %s \" %a)\n", + "print(\"2's complement of B --> %s \" %b)\n", + "print(\"(b) B+A = %s\"%c) \n", + "print(\"(c) B-A = %s\"%d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "2's complement of A --> 11000100 \n", + "2's complement of B --> 11100100 \n", + "(b) B+A = 10101000\n", + "(c) B-A = 00100000\n" + ] + } + ], + "prompt_number": 130 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.12, Page No. 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# decimal to binary\n", + "\n", + "# For N = 0.6875\n", + "#variable declaration\n", + "N = 0.6875 # decimal no to be convered to binary\n", + "\n", + "#Calculations\n", + "k = N\n", + "i = 0\n", + "b =[0,0,0,0,0,0,0,0,0,0,0,0]\n", + "while(N!=0):\n", + " N = N*2\n", + " #print N\n", + " b[i]=0\n", + " #print b[i]\n", + " if (N>1) or(N==1):\n", + " N =N-1\n", + " b[i]=1\n", + " i=i+1\n", + " \n", + "#Result\n", + "print(\"Binary equivalent of decimal %f is 0.%d%d%d%d \"%(k,b[0],b[1],b[2],b[3]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary equivalent of decimal 0.687500 is 0.1011 \n" + ] + } + ], + "prompt_number": 230 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.13, Page No.480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# decimal to binary\n", + "\n", + "# For N = 0.634\n", + "#variable declaration\n", + "N = 0.634 # decimal no to be convered to binary\n", + "\n", + "#Calculations\n", + "k = N\n", + "i = 0\n", + "b =[0,0,0,0,0,0,0,0,0,0,0,0]\n", + "while(i!=7):\n", + " N = N*2\n", + " #print N\n", + " b[i]=0\n", + " #print b[i]\n", + " if (N>1) or(N==1):\n", + " N =N-1\n", + " b[i]=1\n", + " i=i+1\n", + "\n", + "#Result \n", + "#Result\n", + "print(\"Binary equivalent of decimal %f is 0.%d%d%d%d%d%d%d \"%(k,b[0],b[1],b[2],b[3],b[4],b[5],b[6]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary equivalent of decimal 0.634000 is 0.1010001 \n" + ] + } + ], + "prompt_number": 222 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.14, Page No.480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# decimal to binary\n", + "\n", + "# For N = 0.634\n", + "#variable declaration\n", + "N = 39.12 # decimal no to be convered to binary\n", + "\n", + "N1 = 39\n", + "k = N1\n", + "#Calculations\n", + "i = 0\n", + "b =[0,0,0,0,0,0,0,0]\n", + "while(N1!=0):\n", + " b[i] = N1%2\n", + " N1 = N1/2\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"Binary equivalent of decimal %d is %d%d%d%d%d%d%d\"%(k,b[6],b[5],b[4],b[3],b[2],b[1],b[0]))\n", + "\n", + "\n", + "N2 =0.12\n", + "#Calculations\n", + "k = N2\n", + "i = 0\n", + "b =[0,0,0,0,0,0,0,0,0,0,0,0]\n", + "while(i!=7):\n", + " N2 = N2*2\n", + " #print N\n", + " b[i]=0\n", + " #print b[i]\n", + " if (N2>1) or(N2==1):\n", + " N2 =N2-1\n", + " b[i]=1\n", + " i=i+1\n", + " \n", + "#Result\n", + "print(\"Binary equivalent of decimal %f is 0.%d%d%d%d%d%d%d \"%(k,b[0],b[1],b[2],b[3],b[4],b[5],b[6]))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary equivalent of decimal 39 is 0100111\n", + "Binary equivalent of decimal 0.120000 is 0.0001111 \n" + ] + } + ], + "prompt_number": 225 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.15, Page No.481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# binary Addition\n", + "\n", + "import math\n", + "#Variable declaration\n", + "a1 = int('101101',2) # integer part of first no\n", + "a2 = int('0101',2) # fractiona part of first no\n", + "b1 = int('10001',2) # integer part of second no\n", + "b2 = int('1010',2) # fractiona part of second no(in fraction we can add any no of 0s)\n", + "\n", + "#Calculations\n", + "c1= bin(a1+b1)[2:]\n", + "c2 = bin(a2+b2)[2:]\n", + "\n", + "print(\"Addition --> %s.%s\"%(c1,c2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Addition --> 111110.1111\n" + ] + } + ], + "prompt_number": 227 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.16, Page No. 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# binary to decimal conversion\n", + "\n", + "import math\n", + "#Variable declaration\n", + "i0 = 1 # LSB of integer\n", + "i1 = 0\n", + "i2 = 0\n", + "i3 = 1\n", + "i4 = 1 # MSB of integer\n", + "f1 = 0\n", + "f2 = 0\n", + "f3 = 1\n", + "f4 = 0\n", + "f5 = 1\n", + "f6 = 1\n", + "\n", + "#Calculations\n", + "D = i0*(2**0)+i1*(2**1)+i2*(2**2)+i3*(2**3)+i4*(2**4)+f1*(2**-1)+f2*(2**-2)+f3*(2**-3)+f4*(2**-4)+f5*(2**-5)+f6*(2**-6)\n", + "\n", + "#Result\n", + "print(\"Decimal equivalent = %f\"%D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decimal equivalent = 25.171875\n" + ] + } + ], + "prompt_number": 231 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.17, Page No. 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Hexadecimal to decimal\n", + "\n", + "import math\n", + "#variable declaration\n", + "a = 3\n", + "b = 10 # decimal equivalent of A\n", + "c = 8\n", + "#Calculations\n", + "# binary equvalent of 8 A 3 \n", + "# 1000 1010 0011\n", + "# a\n", + "Da = (1*2**0)+(1*2**1)+(0*2**2)+(0*2**3)+(0*2**4)+(1*2**5)+(0*2**6)+(1*2**7)+(0*2**8)+(0*2**9)+(0*2**10)+(1*2**11)\n", + "print(\"(a) Decimal equivalent of 8A3 is %d\"%Da)\n", + "# b \n", + "Db = (a*(16**0))+(b*(16**1))+(c*(16**2))\n", + "print(\"(b) Decimal equivalent of 8A3 is %d\"%Db)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Decimal equivalent of 8A3 is 2211\n", + "(b) Decimal equivalent of 8A3 is 2211\n" + ] + } + ], + "prompt_number": 236 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.18, Page No. 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# decimal to hexadecimal\n", + "\n", + "import math\n", + "#Variable declaration\n", + "N = 268 # no to be converted into hexadecimal\n", + "\n", + "N1 = 268\n", + "k = N1\n", + "#Calculations\n", + "i = 0\n", + "b =[0,0,0,0,0,0,0,0]\n", + "while(N1!=0):\n", + " b[i] = N1%16\n", + " N1 = N1/16\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"Remainder1: %d = C\\nRemainder2: %d\\nRemainder3: %d\\n\\nHexaecimal equivalent of %d = 10C\"%(b[0],b[1],b[2],k))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Remainder1: 12 = C\n", + "Remainder2: 0\n", + "Remainder3: 1\n", + "\n", + "Hexaecimal equivalent of 268 = 10C\n" + ] + } + ], + "prompt_number": 260 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.19, Page No.483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# decimal to hexadecimal\n", + "\n", + "import math\n", + "#Variable declaration\n", + "N = 5741 # no to be converted into hexadecimal\n", + "\n", + "N1 = 5741\n", + "k = N1\n", + "#Calculations\n", + "i = 0\n", + "b =[0,0,0,0,0,0,0,0]\n", + "while(N1!=0):\n", + " b[i] = N1%16\n", + " N1 = N1/16\n", + " i = i+1 \n", + "\n", + "#Result\n", + "print(\"Remainder1: %d = D\\nRemainder2: %d\\nRemainder3: %d\\nRemainder4: %d\\n\\nHexaecimal equivalent of %d =166D\"%(b[0],b[1],b[2],b[3],k))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Remainder1: 13 = D\n", + "Remainder2: 6\n", + "Remainder3: 6\n", + "Remainder4: 1\n", + "\n", + "Hexaecimal equivalent of 5741 =166D\n" + ] + } + ], + "prompt_number": 259 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 13.20, Page No.483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Hexadecimal to decimal\n", + "\n", + "import math\n", + "#variable declaration\n", + "a = 0\n", + "b = 7\n", + "c = 13 # decimal equivalent of D\n", + "#Calculations\n", + "D = (a*(16**0))+(b*(16**1))+(c*(16**2))\n", + "\n", + "#Result\n", + "print(\"(b) Decimal equivalent of 8A3 is %d\"%D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(b) Decimal equivalent of 8A3 is 3440\n" + ] + } + ], + "prompt_number": 262 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb new file mode 100755 index 00000000..47f33435 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb @@ -0,0 +1,449 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Power Diodes And Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.1, Page No. 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# stored charge and peak reverse current\n", + "\n", + "import math\n", + "#variable declaration\n", + "t = 2.5*10**-6 # reverese recovery time to diode\n", + "di_by_dt = 35*10**6 # di/dt in A/S\n", + "\n", + "#Calculations\n", + "Q= 0.5*(t**2)*di_by_dt\n", + "I= math.sqrt(2*Q*di_by_dt)\n", + "\n", + "#result\n", + "print(\"(a) Stored charge\\n Q = %.3f * 10^-6 C\\n\\n(b) Peak reverse current\\nI = %.1f A\"%(Q*10**6,I))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Stored charge\n", + " Q = 109.375 * 10^-6 C\n", + "\n", + "(b) Peak reverse current\n", + "I = 87.5 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.2, Page No.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Vrrm rating for diode in full wave rectifire\n", + "\n", + "import math\n", + "# variable declaration\n", + "V= 12 # secondary peak voltage\n", + "sf = 1.4 # safety factor\n", + "\n", + "#calculations\n", + "# For fullwave rectifier with transformer secondary voltage 12-0-12, each diode will experience Vrrm equal to 2 x sqrt(2)x 12\n", + "r = math.sqrt(2)\n", + "r = math.floor(r*1000)/1000 \n", + "V = 2*r*V # Actual value of Vrrm for each diode\n", + "Vrrm= V*sf\n", + "\n", + "# result\n", + "print(\"Vrrm rating for each diode with safety factor of %.1f is %.2fV\\n\\n\"%(sf,Vrrm))\n", + "#Answer in the book for Vrrm rating is wrong\n", + "\n", + "#%pylab inline\n", + "import matplotlib.pyplot as plt\n", + "from numpy import arange,sin,pi\n", + "%matplotlib inline\n", + "#fig -1\n", + "t = arange(0.0,4,0.01)\n", + "S = sin(math.pi*t)\n", + "plt.subplot(411)\n", + "plt.title(\"Secondary Voltage\")\n", + "plt.plot(t,S)\n", + "#fig -2\n", + "plt.subplot(412)\n", + "plt.title(\"Load Voltage\")\n", + "t1 = arange(0.0,1,0.01)\n", + "t2 = arange(1.0,2.0,0.01)\n", + "t3 = arange(2.0,3.0,0.01)\n", + "t4 = arange(3.0,4.0,0.01)\n", + "s1 = sin((pi*t1))\n", + "s2 = sin((pi*t1))\n", + "s3 = sin(pi*t1)\n", + "s4 = sin(pi*t1)\n", + "\n", + "plt.plot(t1,s1)\n", + "plt.plot(t2,s2)\n", + "plt.plot(t3,s3)\n", + "plt.plot(t4,s4)\n", + "#fig -3\n", + "plt.subplot(413)\n", + "plt.title(\"Voltage across D1\")\n", + "plt.axis([0,4,0,1])\n", + "plt.plot(t1,s1)\n", + "plt.plot(t3,s3)\n", + "#fig -4\n", + "plt.subplot(414)\n", + "plt.title(\"Voltage across D2\")\n", + "plt.axis([0,4,-1,0])\n", + "s2 = sin((pi*t1)-pi)\n", + "s4 = sin(pi*t1-pi)\n", + "plt.plot(t2,s2)\n", + "plt.plot(t4,s4)\n", + "#Result\n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vrrm rating for each diode with safety factor of 1.4 is 47.51V\n", + "\n", + "\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEKCAYAAAD6q1UVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYU9cbx79BrMoeskVRQGUIqCiitWItDhT3rts6667V\narXgHlSrldbRqnVr1Z9iFdDWghP3FhFBkOUABJkCCe/vj6OpSICQdQPcz/PcR5N7cs43h+TNvee8\nQ0BEBB4eHh6eGoUG1wJ4eHh4eFQPb/x5eHh4aiC88efh4eGpgfDGn4eHh6cGwht/Hh4enhoIb/x5\neH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sKcsOvm2\nZ1BQEJKSkpCQkIDdu3ejc+fOErt9Qh5bVkiEr6wUDvoSi8Xw8/ODtbU1/vjjDwCAv78/PD09ERYW\nBnNzc2hra2Pr1q2qlCiTxv3792PdunWoUaMGtLS0sHv3bpVqBIBBgwbh3LlzeP36NZo0aYL58+cj\nLy9PopFvO8qqUwi2BIBLly5hx44daNWqleTHHxQUhKdPn0q0CsGmsugUgk1TUlLg6+uLgoICFBQU\nYNiwYejSpYugfuuy6hSCPQvzaTpHUVuyIC8Gg8Gohqg8yIvBYDAY/MOcP4PBYFRDmPNnMBiMaghz\n/gwGg1ENYc6fwWAwqiHM+TMYDEY1hDl/BoPBqIYw589gMBjVkP8DYQvKpBZyZSsAAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.3, Page No. 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average, peak and rms current\n", + "\n", + "import math\n", + "#variable declaration(from the waveform)\n", + "Ip = 20.0 # Peak current\n", + "\n", + "#calculations\n", + "Iavg = (Ip*1.0)/3.0\n", + "Irms = math.sqrt((Ip**2)*1.0/3.0)\n", + "\n", + "#Result\n", + "print(\"Peak Current = %d A\\nAverage Current = %.3f A\\nrms Current = %.3f A\"%(Ip,Iavg,Irms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak Current = 20 A\n", + "Average Current = 6.667 A\n", + "rms Current = 11.547 A\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.4, Page No. 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#power BJT\n", + "\n", + "import math\n", + "# variable declaration\n", + "Vcc =220.0 # collector voltage\n", + "Vce_sat = 1.0 # Vce saturation voltage\n", + "Rb =6.0 # base resisror\n", + "Rl = 8.0 # load resisotr\n", + "hfe = 15.0 # gain\n", + "Vbe = 0.7 # base-emiter voltage drop\n", + "\n", + "#calculations\n", + "#(a)\n", + "Ic = (Vcc-Vce_sat)/Rl\n", + "Ib=Ic/hfe\n", + "#(b)\n", + "Vbb= Ib*Rb+Vbe\n", + "#(c)\n", + "Pc = Ic*Vce_sat\n", + "Pb = Ib*Vbe\n", + "Pt = Pc+Pb\n", + "\n", + "#Result\n", + "print(\"(a) Base current, Ib = %.3f A\\n(b) Vbb = %.2f V\\n(c) Total power dissipation in BJT = %.4f W\"%(Ib,Vbb,Pt))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Base current, Ib = 1.825 A\n", + "(b) Vbb = 11.65 V\n", + "(c) Total power dissipation in BJT = 28.6525 W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.5, Page No. 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Load current and losses in BJT\n", + "\n", + "import math\n", + "# variable declaration(with reference to example 1.4)\n", + "Vbb_org = 11.65 # original Vbb\n", + "fall =0.85 # 85% fall in original value\n", + "Vce_sat = 1.0 # Vce saturation voltage\n", + "Rb =6.0 # base resisror\n", + "hfe = 15.0 # gain\n", + "Vbe = 0.7 # base-emiter voltage drop\n", + "\n", + "\n", + "#calculations\n", + "Vbb = fall* Vbb_org\n", + "Ib = (Vbb-Vbe)/Rb\n", + "Ic = Ib*hfe\n", + "Pc =Ic*Vce_sat\n", + "Pb = Ib* Vbe\n", + "Pt = Pc+Pb\n", + "\n", + "#Result\n", + "print(\"Load current = %.3f A\\nLosses in BJT = %.2f W\"%(Ib,Pt))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load current = 1.534 A\n", + "Losses in BJT = 24.08 W\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.6, Page No. 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Power loss in BJT\n", + "\n", + "import math\n", + "#variable declaration(with reference to example 1.4)\n", + "Vcc = 240 # New value of collector current\n", + "Ic = 27.375 # collector current,from example 1.4\n", + "Pb = 1.2775 # base power dissipation,from example 1.4\n", + "Rl = 8.0 # load resisotr\n", + "\n", + "#Calculations\n", + "Vce = Vcc-(Ic*Rl)\n", + "Pc = Vce* Ic\n", + "Pt = Pb+ Pc\n", + "\n", + "#result\n", + "print(\"Total power dissipation = %.4f W\"%Pt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power dissipation = 576.1525 W\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.7, Page No. 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# BJT switching frequency\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "# variable declaration\n", + "I = 80 # maximum current, from swiching characteristics\n", + "t1 = 40 *10**-6 # rise time, from swiching characteristics\n", + "t2 = 60* 10**-6 # falll time, from swiching characteristics\n", + "V = 200 # collector-emitter voltage\n", + "Pavg =250 # average power loss\n", + "\n", + "\n", + "#calculations\n", + "# switching ON\n", + "ic = I/t1\n", + "def f(x):\n", + " return (ic*x)*(V-(V/t1)*x)\n", + "t_lower =0\n", + "t_upper = t1\n", + "val_on = quad(f,t_lower,t_upper)\n", + "\n", + "# switching OFF\n", + "ic = I-I/t1\n", + "Vc = V/t2\n", + "def f1(x):\n", + " return (I-(I/t2)*x)*(Vc*x)\n", + "t_lower =0\n", + "t_upper = t2\n", + "val_off = quad(f1,t_lower,t_upper)\n", + "\n", + "loss= val_on[0]+val_off[0]\n", + "loss= math.floor(loss*10000)/10000\n", + "f =Pavg/loss\n", + "\n", + "# Result\n", + "#print(\"(a) Switching ON:\\nEnergy losses during switching on = %.4f J\"%(val_on[0]))\n", + "#print(\"\\n(b)Switching OFF\\nEnergy losses during switching off of BJT =%.2f J\"%(val_off[0]))\n", + "print(\"\\nSwitching frequency = %.1f Hz\"%f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Switching frequency = 937.7 Hz\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 1.8, Page No. 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Turn ON loss of power transistor\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vmax = 300 # voltage during start\n", + "Imax = 200 # full current after start\n", + "t = 1* 10**-6 # starting time \n", + "\n", + "#calculation\n", + "E_loss = Vmax*Imax*t/6 #formula\n", + "\n", + "#Result\n", + "print(\"Energy loss = %.2f Joules\"%E_loss)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy loss = 0.01 Joules\n", + "\n" + ] + } + ], + "prompt_number": 54 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb new file mode 100755 index 00000000..6e52e316 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb @@ -0,0 +1,2357 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Thyristors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.1, Page No.39 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Anode current\n", + "\n", + "import math\n", + "#Variable declaration\n", + "alfa_1 = 0.35 # Gain of PNP transistor of two transistor model\n", + "alfa_2 = 0.40 # Gain of NPN transistor of two transistor model\n", + "Ig = 40*10**-3 # Gate current\n", + "\n", + "\n", + "#Calculations\n", + "Ia = (alfa_2*Ig)/(1-(alfa_1+alfa_2))\n", + "\n", + "#Result\n", + "print(\"Anode current = %d * 10^-3 A\"%(Ia*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Anode current = 64 * 10^-3 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.2, Page No.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Equivalent capacitor\n", + "\n", + "import math\n", + "# Variable declaration\n", + "dv_by_dt = 190 # in Volt per micro-sec\n", + "Ic= 8 *10**-3 # Capacitive current\n", + "\n", + "#Calculation\n", + "C = Ic/(dv_by_dt*10**6)\n", + "\n", + "#Result\n", + "print(\"C = %.1f * 10^12 F\"%(C*10**12))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 42.1 * 10^12 F\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.3, Page No. 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Thyristor\n", + "\n", + "import math\n", + "# Variable declaration\n", + "Vt = 0.75 # Thyristor trigger voltage\n", + "It = 7*10**-3 # Thyristor trigger current\n", + "Vcc = 20 # Suppy voltage, given data\n", + "Rg = 2000 # gate resistor, given data\n", + "R = 200 # input resistor\n", + "\n", + "#Calculations\n", + "#(a)\n", + "V0 = 20 # when thyristor is not conducting, there is no current through it.\n", + "#(b)\n", + "Vs = Vt+It*Rg\n", + "#(c)\n", + "i= 5*10**-3 #to have holding curernt\n", + "v1= i*R\n", + "#(d)\n", + "drop =0.7 # voltage drop across thyristor\n", + "v2=v1+drop\n", + "\n", + "#Result\n", + "print(\"(a) V0 = %d\\n(b) Vs = %.2f\\n(c) Vcc should be reduced to less than %d V if thyristor is ideal.\\n(d) Vcc should be reduced to less than %.1f V\"%(V0,Vs,v1,v2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) V0 = 20\n", + "(b) Vs = 14.75\n", + "(c) Vcc should be reduced to less than 1 V if thyristor is ideal.\n", + "(d) Vcc should be reduced to less than 1.7 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.4, Page No.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of Vg,Ig and Rg\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vs = 25 # gate signal amplitude\n", + "Pavg_loss = 0.6 # Avg power loss\n", + "\n", + "#Calculations\n", + "P_loss = Pavg_loss*2*math.pi/math.pi\n", + "Ig =(-1+(math.sqrt(1**2-4*9*(-1.2))))/(2*9) #alfa=(-b+sqrt(b^2-4ac))/2a-->solution for quadratic equation\n", + "Ig = math.ceil(Ig*1000)/1000\n", + "Vg = 1+9*Ig #given data\n", + "Rg = (24-9*Ig)/Ig\n", + "\n", + "#Calculations\n", + "print(\"Vg = %.3f \\nIg = %.3f\\nRg = %.2f\"%(Vg,Ig,Rg))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vg = 3.826 \n", + "Ig = 0.314\n", + "Rg = 67.43\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.5, Page No.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Minimum width of gate pulse\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 100 # DC supply voltage\n", + "L = 10 # Inductance\n", + "i = 80*10**-3 # latching current of thyristor\n", + "\n", + "#Calculations\n", + "t = L*i/V\n", + "\n", + "#Result\n", + "print(\"Width of pulse should be more than %d milli-second.\"%(t*10**3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of pulse should be more than 8 milli-second.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.6, Page No. 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Minimum width of gate pulse\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 100 # DC supply voltage\n", + "R = 10 # Resistance\n", + "L = 5 # Inductance\n", + "i = 50*10**-3 # latching current of thyristor\n", + "\n", + "#Calculation\n", + "t = math.log((1-(i*R)/V))/((-R/L)*math.log(math.e)) # i = (V/R)*(1-e^(-R*t/L))\n", + "\n", + "#Result\n", + "print(\"Minimum width of gate pulse is %.1f milli-second.\"%(t*10**3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum width of gate pulse is 2.5 milli-second.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.7, Page No. 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# resistor value\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 90.0 # DC supply voltage\n", + "i = 40*10**-3 # latching current of thyristor\n", + "t = 40* 10**-6 # pulse width\n", + "R = 25.0 # load Resistance\n", + "L = 0.5 # Inductance\n", + "#Calculation\n", + "#(a)\n", + "i2 = (V/R)*(1-math.e**(-R*t/L))\n", + "\n", + "#(b)\n", + "R = V/(i-i2)\n", + "\n", + "#Result\n", + "print(\"(a)\\nAt the end of the gate pulse, i = %.4f A\"%i2)\n", + "print(\"Since the current is less than latching current, thyristor will not turn on.\")\n", + "print(\"\\n(b)\\nR should be less than %d ohm.\"%math.ceil(R))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "At the end of the gate pulse, i = 0.0072 A\n", + "Since the current is less than latching current, thyristor will not turn on.\n", + "\n", + "(b)\n", + "R should be less than 2744 ohm.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.8, Page No.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Resistor value\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 100.0 # DC supply voltage\n", + "i = 50*10**-3 # holding current of thyristor\n", + "t = 50* 10**-6 # pulse width\n", + "R = 20.0 # load Resistance\n", + "L = 0.5 # Inductance\n", + "\n", + "#Calculations\n", + "i2 = (V/R)*(1-math.e**(-R*t/L))\n", + "Rmax = V/(i-i2)\n", + "\n", + "#Result\n", + "print(\"When firing pulse ends, i = %.2f mA\"%(i2*10**3))\n", + "print(\"Since this current is less than holding current, the thyristor will not remain on and return to off state.\")\n", + "print(\"Maximum value of R = %.3f ohm\"%(math.floor(Rmax*1000)/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When firing pulse ends, i = 9.99 mA\n", + "Since this current is less than holding current, the thyristor will not remain on and return to off state.\n", + "Maximum value of R = 2499.375 ohm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.9, Page No.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# triggering angle \n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 240 # AC supply voltage\n", + "f = 50 # supply frequency\n", + "R = 5 # load resistance\n", + "L = 0.05 # inductance\n", + "\n", + "#Calculation\n", + "theta = math.atan(2*math.pi*f*L/R)\n", + "theta = theta*180/math.pi\n", + "fi = theta+90\n", + "print(\"theta = %.2f\u00b0\"%(theta))\n", + "print(\"\\nCurrent transient is maximun(worst) if\\nsin(fi-theta) = 1\")\n", + "print(\"therefore, fi-%.2f\u00b0 = 90\u00b0\"%theta)\n", + "print(\"fi = %.2f\u00b0\"%fi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "theta = 72.34\u00b0)\n", + "\n", + "Current transient is maximun(worst) if\n", + "sin(fi-theta) = 1\n", + "therefore, fi-72.34\u00b0 = 90\u00b0\n", + "fi = 162.34\u00b0\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.10, Page No.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.11, Page No.50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.12, Page No. 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# rms current and form factor\n", + "\n", + "import math\n", + "# variable declaration\n", + "I = 120 # Current in Ampere\n", + "gamma = 180.0 # in degrees, thyristor conducts between alfa and alfa+gamma in each 360\u00b0 \n", + "\n", + "# calculations\n", + "#(a)-- formulas\n", + "#(b)\n", + "Irms = I*math.sqrt(gamma/360)\n", + "Iavg = I*(gamma/360)\n", + "ff = Irms/Iavg\n", + "\n", + "#result\n", + "print(\"RMS curent = %.2f A\\nAverage Current = %.0f A\\nForm factor = %.3f\"%(Irms,Iavg,ff))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS curent = 84.85 A\n", + "Average Current = 60 A\n", + "Form factor = 1.414\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.13, Page No.53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Power supplied to the load and average load current\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "# variable declaration\n", + "R = 100.0 # load resistance\n", + "V = 230.0 # Supply Voltage\n", + "\n", + "#Calculations\n", + "#(a)\n", + "def f(x):\n", + " return math.sin(x)**2\n", + "wt_lower=math.pi/3\n", + "wt_upper =math.pi\n", + "val = quad(f,wt_lower,wt_upper)\n", + "I = ((math.sqrt(2)*V/R)**2)*val[0]/(2*math.pi)\n", + "Irms = math.sqrt(I)\n", + "P =(Irms**2)*R\n", + "\n", + "#(b)\n", + "def f(x):\n", + " return math.sin(x)**2\n", + "wt_lower2=math.pi/4\n", + "wt_upper2 =math.pi\n", + "val2 = quad(f,wt_lower2,wt_upper2)\n", + "x = (math.sqrt(2)*V/R)\n", + "x = math.floor(x*100)/100\n", + "I2 = (x**2)*val2[0]/(2*math.pi)\n", + "Irms2 = math.sqrt(I2)\n", + "P2 =(Irms2**2)*R\n", + "\n", + "#(c)\n", + "def f(x):\n", + " return (3.25/(2*math.pi))*math.sin(x)\n", + "wt_lower3=math.pi/3\n", + "wt_upper3 =math.pi\n", + "val3 = quad(f,wt_lower3,wt_upper3)\n", + "wt_lower4=math.pi/4\n", + "wt_upper4 =math.pi\n", + "val4 = quad(f,wt_lower4,wt_upper4)\n", + "\n", + "\n", + "print(\"(a)\\nRMS current = %.2f A\\nPower supplied to load = %d W\"%(Irms,math.ceil(P)))\n", + "print(\"\\n\\n(b)\\nRMS current = %f A\\nPower supplied to load = %f W\"%(Irms2,P2))\n", + "print(\"\\n(c)\\nWhen firing angle is 60\u00b0, Average current = %.3f A\" %val3[0])\n", + "print(\"When firing angle is 45\u00b0, Average current = %.3f A\" %val4[0])\n", + "# for (b) answer matches to the book if val2[0] = 1.4255" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "RMS current = 1.46 A\n", + "Power supplied to load = 213 W\n", + "\n", + "\n", + "(b)\n", + "RMS current = 1.549431 A\n", + "Power supplied to load = 240.073727 W\n", + "\n", + "(c)\n", + "When firing angle is 60\u00b0, Average current = 0.776 A\n", + "When firing angle is 45\u00b0, Average current = 0.883 A\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.14, Page No.54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# average power loss in thyristor\n", + "\n", + "import math\n", + "# Variable declaration\n", + "Iavg = 200 # Average current\n", + "v1 = 1.8 # voltage drop across thyristor for 200A current\n", + "v2 = 1.9 # voltage drop across thyristor for 400A current\n", + "\n", + "#Calculations\n", + "#(a)\n", + "A1 = Iavg # amplitude of rectangular current wave\n", + "P1 = A1*v1\n", + "#(b)\n", + "A2 = 2*Iavg\n", + "P2 = A2*v2*math.pi/(2*math.pi)\n", + "\n", + "#Result\n", + "print(\"(a) Average power loss = %d W\"%P1)\n", + "print(\"(b) Average power loss = %d W\"%P2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average power loss = 360 W\n", + "(b) Average power loss = 380 W\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.15, Page No.55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# average on state current\n", + "\n", + "import math\n", + "#Variable declaration\n", + "I = 40 # rms on state current\n", + "f = 50 # frequency\n", + "cp_a =170 # conduction period\n", + "cp_b =100 # conduction period\n", + "cp_c =40 # conduction period\n", + "\n", + "#Calculations\n", + "alfa_a = 180-cp_a\n", + "alfa_b = 180-cp_b\n", + "alfa_c = 180-cp_c\n", + "Im_a = math.sqrt(((I**2)*2*math.pi)/(((math.pi-alfa_a*math.pi/180)/2)+math.sin(2*alfa_a*math.pi/180)/4))\n", + "Iv_a = 0.316*Im_a\n", + "Im_b = math.sqrt(((I**2)*2*math.pi)/(((math.pi-alfa_b*math.pi/180)/2)+math.sin(2*alfa_b*math.pi/180)/4))\n", + "Iv_b = 0.1868*Im_b\n", + "Im_c = math.sqrt(((I**2)*2*math.pi)/(((math.pi-alfa_c*math.pi/180)/2)+math.sin(2*alfa_c*math.pi/180)/4))\n", + "Iv_c = 0.0372*Im_c\n", + "\n", + "#Result\n", + "print(\"(a) Iavg = %.3f A\"%(math.ceil(Iv_a*1000)/1000))\n", + "print(\"(b) Iavg = %.2f A\"%Iv_b)\n", + "print(\"(c) Iavg = %.2f A\"%(math.floor(Iv_c*100)/100))\n", + "#answer for(b) is not matching with the answer given in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Iavg = 25.295 A\n", + "(b) Iavg = 19.13 A\n", + "(c) Iavg = 11.62 A\n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.16, page No. 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# power dissiopation\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#variable declaration\n", + "It = 20 # constant current\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vt = 0.9+ 0.02*It\n", + "P1 = Vt*It\n", + "#(b)\n", + "def f(x):\n", + " return (0.9+0.02*(20*math.pi*math.sin(x)))*(20*math.pi*math.sin(x))/(2*math.pi)\n", + "# if denominator math.pi value is taken as 3.14, then answer for P2 =37.75\n", + "theta_lower = 0\n", + "theta_upper = math.pi\n", + "val = quad(f,theta_lower,theta_upper)\n", + "P2 = val[0]\n", + "#(c)\n", + "P3 = P1/2\n", + "#(d)\n", + "P4 = P1/3\n", + "\n", + "#result\n", + "print(\"(a) Power dissipation = %d W\"%P1)\n", + "print(\"(b) Mean Power dissipation = %.2f W\"%P2)\n", + "print(\"(c) Mean Power dissipation = %d W\"%P3)\n", + "print(\"(d) Mean Power dissipation = %.2f W\"%P4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Power dissipation = 26 W\n", + "(b) Mean Power dissipation = 37.74 W\n", + "(c) Mean Power dissipation = 13 W\n", + "(d) Mean Power dissipation = 8.67 W\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.17, Page No. 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# I^2t rating \n", + "\n", + "import math\n", + "# Variable declaration\n", + "Is = 2000.0 # half cycle surge current rating for SCR\n", + "f = 50.0 # operating AC frequency\n", + "\n", + "#Calculation\n", + "T = 1/f\n", + "t_half = T/2\n", + "t = t_half/2\n", + "I = math.sqrt((Is**2)*t/t_half)\n", + "rating = (I**2)*t_half\n", + "\n", + "#Result\n", + "print(\"I^2t rating = %d A^2 secs\"%rating)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I^2t rating = 20000 A^2 secs\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.18, Page No. 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Resistance and average power loss\n", + "\n", + "import math\n", + "#variable declaration\n", + "P = 6 #peak power loss\n", + "d = 0.3 # duty cylce \n", + "\n", + "#calculations\n", + "#(a)\n", + "#solution of equation 9Ig^2+Ig-6 = 0\n", + "Ig =(-1+(math.sqrt(1**2-4*9*(-6))))/(2*9) #alfa=(-b+sqrt(b^2-4ac))/2a-->solution for quadratic equation\n", + "Ig = math.ceil(Ig*1000)/1000\n", + "Rg = (11/Ig)-9 #from KVL equation of gate circuit\n", + "#(b)\n", + "Pavg = P*d\n", + "\n", + "#Result\n", + "print(\"(a)\\nIg = %.3f A \\nRg = %.3f ohm\"%(Ig,Rg))\n", + "print(\"\\n(b) Average power loss = %.1f W \"%Pavg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Ig = 0.763 A \n", + "Rg = 5.417 ohm\n", + "\n", + "(b) Average power loss = 1.8 W \n" + ] + } + ], + "prompt_number": 144 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.19, Page No. 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# trigger current and voltage for gate power dissipation\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vs = 12 # supply voltage\n", + "P = 0.3 # Power dissipation\n", + "Rs = 100 # load line slope i.e. source resistance\n", + "\n", + "#Calculation\n", + "#solution for equation 100Ig^2-12Ig+0.3 = 0\n", + "Ig =(-(-Vs)-(math.sqrt((-Vs)**2-4*Rs*(P))))/(2*Rs) #alfa=(-b(+/-)sqrt(b^2-4ac))/2a-->solution for quadratic equation\n", + "Vg = P/Ig\n", + "print(\"Ig = %.1f mA\\nVg = %.2f V\"%(Ig*1000,Vg))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ig = 35.5 mA\n", + "Vg = 8.45 V\n" + ] + } + ], + "prompt_number": 150 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.20, Page No. 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Finding values of resistors\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Es = 12.0 # Supply voltage\n", + "V = 800.0 # SCR voltage rating\n", + "I = 110.0 # SCR currert rating\n", + "imax = 250*10**-3 # Maximum permissible current through battery\n", + "isc = 600*10**-3 # short circuit current of the battery\n", + "Vg = 2.4 # required gate voltage\n", + "Ig = 50*10**-3 # required gate current\n", + "Vgmax = 3 # maximum gate voltage\n", + "Igmax = 100*10**-3 # maximum gate current\n", + "\n", + "\n", + "#Calculations\n", + "Rs = Es/isc\n", + "#considering R2 is not connected\n", + "R1 =(Es/imax)-Rs\n", + "#R1 must be 28 or more so that battery curenrt doesnot exceeds 250mA\n", + "R1min = Es/Igmax-Rs\n", + "R1max = ((Es-Vg)/Ig)-Rs\n", + "R1 = 125 #selected \n", + "R2 = Vgmax*(Rs+R1)/(Es-Vgmax)\n", + "\n", + "# Result\n", + "print(\"Rs = %d ohm \\n\\nR1 must be more than %.0f ohm and must be less than %.0f ohm.\\nTherefore, select R1 = %.0f \"%(Rs,R1min,R1max,R1))\n", + "print(\"\\nR2 should be less than %.3f ohm.\\nTherefore, select R2 = %.0f ohm\"%(R2,math.floor(R2)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs = 20 ohm \n", + "\n", + "R1 must be more than 100 ohm and must be less than 172 ohm.\n", + "Therefore, select R1 = 125 \n", + "\n", + "R2 should be less than 48.333 ohm.\n", + "Therefore, select R2 = 48 ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.21, Page No. 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Surface temperature\n", + "\n", + "import math\n", + "#Variable declaration\n", + "l = 0.2 # length of aluminium rod\n", + "w = 0.01 # width of aluminium rod\n", + "d = 0.01 # depth of aluminium rod\n", + "tc = 220 # thermal conductivity\n", + "T1 = 30 # temperature at far end\n", + "P = 3 # injected heat\n", + "\n", + "#Calculation\n", + "theta = l/(tc*w*d)\n", + "T2 = P*theta+T1\n", + "\n", + "#Result\n", + "print(\"Temperature of the surface where heat is injected is %.2f\u00b0C\"%T2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the surface where heat is injected is 57.27\u00b0C\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.22, Page No. 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Power losses\n", + "\n", + "import math\n", + "#variable declaration\n", + "l = 2*10**-3 # lengthh of aluminium plate\n", + "a = 12*10**-4 # cross-section area\n", + "tc = 220 # thermal conductivity\n", + "td = 4 # desired thermal drop along length\n", + "\n", + "#Calculations\n", + "theta = l/(a*tc)\n", + "theta = math.floor(theta*10**6)/10**6\n", + "P_loss = td/theta\n", + "\n", + "#Result\n", + "print(\"power losses = %.2f W\"%P_loss)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power losses = 528.05 W\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.23, Page No. 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#thermal resistance of heat sink\n", + "\n", + "import math\n", + "#Variable declaration\n", + "P = 30.0 # power dissipation\n", + "T1 =125.0 # max junction temperature\n", + "T2 = 50.0 # max ambient temperature\n", + "tr1 =1.0 # thermal resistance of thyristor\n", + "tr2 = 0.3 # therrmal resistance of insuulator\n", + "\n", + "#calculations\n", + "Tr = (T1-T2)/P\n", + "Tr_hs = Tr-tr1-tr2\n", + "\n", + "#Result\n", + "print(\"Thermal resistance of heat sink = %.1f\u00b0C/W\"%Tr_hs)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal resistance of heat sink = 1.2\u00b0C/W\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.24, Page No.68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Junction temperature\n", + "\n", + "\n", + "import math\n", + "#variable declaration\n", + "tr = 0.627 # thermal resistance of device\n", + "T = 93 # heat sink temperature\n", + "V = 3 # voltage at junction\n", + "I = 25 # current at junction\n", + "\n", + "#calculation\n", + "T_junction = tr*V*I+T\n", + "\n", + "#Result\n", + "print(\"Junction Temperature = %d\u00b0C\"%T_junction)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Junction Temperature = 140\u00b0C\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.25, Page No. 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Thermal resistance\n", + "\n", + "import math\n", + "#Variable declaration\n", + "P = 40.0 #steady power loss in an SCR\n", + "Tr_hs = 0.8 # heat sink resistance\n", + "T1 = 120.0 # Maximumm junction temperature\n", + "T2 = 35.0 # ambient temperature\n", + "\n", + "#calculation\n", + "Tr = (T1-T2)/P\n", + "Rsh = Tr - Tr_hs\n", + "\n", + "#Result\n", + "print(\"Resistance of heat sink = %.3f\u00b0C/W\"%Rsh)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of heat sink = 1.325\u00b0C/W\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.26, Page No. 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# power loss and % increase in rating\n", + "\n", + "import math\n", + "# variable declaration\n", + "Tj = 125 # maximum junction temperature\n", + "Ts1 = 80 # max heat sink temperature\n", + "tr_jc = 0.7 # thermal resistance from junction to case \n", + "tr_cs = 0.4 # thermal resistance from case to sink\n", + "Ts2 = 50 # decreased heat sink temperature \n", + "#calculations\n", + "#(a)\n", + "Pav1 = (Tj-Ts1)/(tr_jc+tr_cs)\n", + "#(b)\n", + "Pav2 =(Tj-Ts2)/(tr_jc+tr_cs)\n", + "rating = 100*(math.sqrt(Pav2)-math.sqrt(Pav1))/math.sqrt(Pav1)\n", + "rating = math.floor(rating*100)/100\n", + "# result\n", + "print(\"(a)\\nAverage power loss = %.2fW\"%Pav1)\n", + "print(\"\\n(b)\\nAverage power loss = %.2fW\\n%% increase in rating = %.2f%%\"%(Pav2,rating))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Average power loss = 40.91W\n", + "\n", + "(b)\n", + "Average power loss = 68.18W\n", + "% increase in rating = 29.09%\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.27, Page No. 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minnimum and maximum firing angle of triac\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vs = 230.0 # Supply voltage\n", + "f = 50.0 # supply frequency\n", + "Vc = 25.0 # breakdown voltage\n", + "C = 0.6*10**-6 # capacitance\n", + "Rmin = 2000 # minimum resistance \n", + "Rmax = 20000 # maximum resistance\n", + "\n", + "#Calculations\n", + "#(a)\n", + "pi = math.ceil(math.pi*10**4)/10**4\n", + "Xc = 1/(2*pi*f*C)\n", + "Xc = math.floor(Xc*100)/100\n", + "Z1_m = math.sqrt(Rmin**2+Xc**2)\n", + "Z1_angle=math.atan(Xc/Rmin)\n", + "I1_m = Vs/Z1_m\n", + "I1_m = math.ceil(I1_m*10**5)/10**5\n", + "I1_angle = Z1_angle\n", + "Vc_m = I1_m*Xc\n", + "Vc_m = math.ceil(Vc_m*100)/100\n", + "Vc_angle = I1_angle*(180/math.pi)-90\n", + "alfa1 = (180/math.pi)*math.asin(Vc/(math.sqrt(2)*Vc_m))+(-Vc_angle)\n", + "\n", + "#(b)\n", + "Z2_m = math.sqrt(Rmax**2+Xc**2)\n", + "Z2_m = math.floor(Z2_m*10)/10\n", + "Z2_angle=math.atan(Xc/Rmax)\n", + "I2_m = Vs/Z2_m\n", + "I2_m = math.floor(I2_m*10**6)/10**6\n", + "I2_angle = Z2_angle\n", + "V2c_m = I2_m*Xc\n", + "V2c_m = math.ceil(V2c_m*100)/100\n", + "V2c_angle = I2_angle*(180/math.pi)-90\n", + "alfa2 = (180/math.pi)*math.asin(Vc/(math.sqrt(2)*V2c_m))+(-V2c_angle)\n", + "\n", + "#Result\n", + "print(\"Xc = %.2f ohms\"%Xc)\n", + "print(\"\\n(a) When R = %d ohms\\n Z(magnitude) = %.2f\\t\\tZ(angle) = %.2f\u00b0\"%(Rmin,Z1_m,-Z1_angle*(180/math.pi)))\n", + "print(\" I(magnitude) = %.5f\\t\\tI(angle) = %.2f\u00b0\"%(I1_m,I1_angle*(180/math.pi)))\n", + "print(\"\\nVoltage across capacitor,\\nV(magnitude) = %.2f\\t\\tV(angle) = %.2f\u00b0\"%(Vc_m,Vc_angle))\n", + "print(\"\\nMinimum firing angle = %.2f\u00b0\"%alfa1)\n", + "\n", + "print(\"\\n(b) When R = %d ohms\\n Z(magnitude) = %.2f\\t\\tZ(angle) = %.2f\u00b0\"%(Rmax,Z2_m,-Z2_angle*(180/math.pi)))\n", + "print(\" I(magnitude) = %f\\t\\tI(angle) = %.2f\u00b0\"%(I2_m,I2_angle*(180/math.pi)))\n", + "print(\"\\nVoltage across capacitor,\\nV(magnitude) = %.2f\\t\\tV(angle) = %.2f\u00b0\"%(V2c_m,V2c_angle))\n", + "print(\"\\nMaximum firing angle = %.2f\u00b0\"%(math.ceil(alfa2*10)/10))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Xc = 5305.15 ohms\n", + "\n", + "(a) When R = 2000 ohms\n", + " Z(magnitude) = 5669.62\t\tZ(angle) = -69.34\u00b0\n", + " I(magnitude) = 0.04057\t\tI(angle) = 69.34\u00b0\n", + "\n", + "Voltage across capacitor,\n", + "V(magnitude) = 215.23\t\tV(angle) = -20.66\u00b0\n", + "\n", + "Minimum firing angle = 25.37\u00b0\n", + "\n", + "(b) When R = 20000 ohms\n", + " Z(magnitude) = 20691.60\t\tZ(angle) = -14.86\u00b0\n", + " I(magnitude) = 0.011115\t\tI(angle) = 14.86\u00b0\n", + "\n", + "Voltage across capacitor,\n", + "V(magnitude) = 58.97\t\tV(angle) = -75.14\u00b0\n", + "\n", + "Maximum firing angle = 92.60\u00b0\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.28, Page no. 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# UJT relaxation circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 32.0 #voltage\n", + "h = 0.63 # voltage gain\n", + "Ip = 10*10**-6 # current \n", + "Vv = 3.5 # voltage drop\n", + "Iv = 10*10**-3 # current through the circuit\n", + "Vf = 0.5 # forward voltage drop across p-n junction\n", + "f = 50.0 # frequency of ascillation \n", + "t = 50.0*10**-6 # width of triggering pulse(given value is 50ms but used value is 50 micro-sec) \n", + "C = 0.4*10**-6 # Capacitance(assumed)\n", + "\n", + "#Calculations\n", + "T = 1/f\n", + "Vp = V*h+Vf\n", + "Rmax = (V-Vp)/Ip # R should be less than the given value\n", + "Rmin = (V-Vv)/Iv # R should be more than the given value\n", + "R = T/(C*math.log(1/(1-h)))\n", + "R4 = t/C\n", + "R3 = 10**4/(h*V)\n", + "\n", + "#Result\n", + "print(\"The value of R = %.2f*10^3 ohm is within the Rmax = %.3f*10^6 ohm and Rmin = %.2f*10^3 ohm\"%(R*10**-3,Rmax*10**-6,Rmin*10**-3))\n", + "print(\"Hence the value is suitable.\\n\\nR4 = %d ohm \\nR3 = %d ohm\"%(R4,R3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 50.29*10^3 ohm is within the Rmax = 1.134*10^6 ohm and Rmin = 2.85*10^3 ohm\n", + "Hence the value is suitable.\n", + "\n", + "R4 = 125 ohm \n", + "R3 = 496 ohm\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.29, Page No. 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#values of various components of circuit(referring to fig.2.36(a))\n", + "\n", + "import math\n", + "# variable declaration\n", + "f = 2.0*10**3 # ouutput frequency\n", + "Vdc = 10 # input voltage\n", + "h = 0.6 # voltage gain\n", + "I = 0.005 # peak discharge current\n", + "v = 0.5 # voltage drop across p-n junction(assumed)\n", + "\n", + "#Calculation\n", + "Vp = (Vdc*h)+v\n", + "R = (Vdc-Vp)/I # R should be less than this value\n", + "T = 1.0/f\n", + "C1 = 0.5*10**-6 # capacitance(assumed)\n", + "R1 = (T)/(C1*math.log(1/(1-h)))\n", + "\n", + "C2 = 1.0*10**-6 # capacitance(assumed)\n", + "R2 = (T)/(C2*math.log(1/(1-h)))\n", + "\n", + "#Result\n", + "print(\"for C = %.1f micro-F, R = %d Ohm. \\nThis value of R is not suitable because R must be less than %d ohm.\"%(C1*10**6,R1,R))\n", + "print(\"\\nfor C = %.1f micro-F, R = %.1f Ohm.\\nThis value is suitable because R is less than %d ohm\"%(C2*10**6,R2,R))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for C = 0.5 micro-F, R = 1091 Ohm. \n", + "This value of R is not suitable because R must be less than 700 ohm.\n", + "\n", + "for C = 1.0 micro-F, R = 545.7 Ohm.\n", + "This value is suitable because R is less than 700 ohm\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.30, Page No. 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Range of firing angle\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vs = 230.0 # supply voltage\n", + "Rmin= 1000.0 # minimum value of R1 resistor\n", + "Rmax = 22*10**3 # maximum value of R1 resistor\n", + "Vg = 2.0 # gate triggering voltage\n", + "C = 0.47*10**-6 # capacitor value\n", + "f = 50.0 # frequency\n", + "#Calculations\n", + "# For Rmin\n", + "theta = (180/math.pi)*math.atan(2*math.pi*f*C*Rmin)\n", + "theta = math.ceil(theta*10)/10\n", + "Vc = Vs*math.cos(theta*math.pi/180)\n", + "Vc = math.floor(Vc*100)/100\n", + "alfa = ((180/math.pi)*math.asin(Vg/(math.sqrt(2)*Vc)))+theta\n", + "alfa = math.floor(alfa*10)/10\n", + "\n", + "# for Rmax\n", + "theta2 = (180/math.pi)*math.atan(2*math.pi*f*C*Rmax)\n", + "theta2 = math.ceil(theta2*10)/10\n", + "Vc2 = Vs*math.cos(theta2*math.pi/180)\n", + "Vc2 = math.floor(Vc2*100)/100\n", + "alfa2 = ((180/math.pi)*math.asin(Vg/(math.sqrt(2)*Vc2)))+theta2\n", + "alfa2 = math.ceil(alfa2*10)/10\n", + "\n", + "#Result\n", + "print(\"Minimum firing angle = %.1f\u00b0\"%alfa)\n", + "print(\"Maximum firing angle = %.1f\u00b0\"%alfa2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum firing angle = 8.7\u00b0\n", + "Maximum firing angle = 74.1\u00b0\n" + ] + } + ], + "prompt_number": 137 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.31, Page No. 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# UJT relaxation oscillator design(reffering to fig.2.40)\n", + "\n", + "import math\n", + "#variable declaration\n", + "f = 50.0 # frequency of supply\n", + "Vbb = 12.0 # typical input vpltage\n", + "P = 300*10**3 # maximumm average power dissipation\n", + "Rbb = 5.6*10**3 # base resistor\n", + "Iv = 4*10**-3 # Valley point voltage\n", + "h = 0.63 # intrinsic stand off ratio\n", + "Vd = 0.5 # drop across p-n junction\n", + "Vv = 2.0 # Valley point voltage\n", + "Ip = 5*10**-6 # peak point current\n", + "v = 0.18 # minimum voltage for which SCR will not trigger\n", + "\n", + "#calculation\n", + "T = 1/f\n", + "#operating point should be on the left of valley point\n", + "R_1 = (Vbb-Vv)/Iv # R should be greater than this value\n", + "Vp = (h*Vbb)+Vd\n", + "#operation point should lie in the negative resistance region of characteristics of UJT\n", + "R_2 = (Vbb-Vp)/Ip # R should be less than this value\n", + "C = 0.02*10**-6 # assumed\n", + "R_3 = T/(C*math.log(1/(1-h)))\n", + "\n", + "C2 = 0.04*10**-6 # assumed\n", + "R_4 = T/(C2*math.log(1/(1-h)))\n", + "R = 500*10**3 # assumed\n", + "Rmax = R+R_1\n", + "R3_1 = (10**4)/(h*Vbb)\n", + "R3 = 1200 # assumed\n", + "R4_1 = v*(R3+Rbb)/(Vbb-v) # R4 value should be less than this value\n", + "R4 = 100 # assumed \n", + "tw = R4*C2\n", + "tow_min = R_1*C2*math.log(1/(1-h))\n", + "alfa_min = tow_min*(360/T)\n", + "tow_max = Rmax*C2*math.log(1/(1-h))\n", + "alfa_max = tow_max*(360/T)\n", + "\n", + "#Result\n", + "print(\"For C = %.2f micro F, R = %.2f k-ohm\\nThis value of R is more than maximum of %d k-ohm.\"%(C*10**6,R_3/1000,R_2/1000) )\n", + "print(\"Hence not suitable.\")\n", + "print(\"\\nFor C = %.2f micro F, R = %.2f K-ohm.\"%(C2*10**6,R_4/1000))\n", + "print(\"As this is less than max value. It is suitable. \\nLets assume R = %d k-ohm\"%(R/1000))\n", + "print(\"Rmax = %.1f k-ohm\"%(Rmax/1000))\n", + "print(\"\\nR3 = %.2f k-ohm. so take nearest value R3 = %.1f k-ohm\"%(R3_1/1000,R3/1000.0))\n", + "print(\"\\nR4 = %.2f ohm. so take nearest value R4 = %.1f ohm\"%(R4_1,R4))\n", + "print(\"\\nMinimum firing angle = %.2f\u00b0\"%alfa_min)\n", + "print(\"Maximum firing angle = %.1f\u00b0\"%alfa_max)\n", + "print(\"\\nThough maximum firing angle available is %.1f\u00b0, it will not be needed\"%alfa_max)\n", + "print(\"because in a single phase full wave converter the maximum firing angle is 180\u00b0\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For C = 0.02 micro F, R = 1005.78 k-ohm\n", + "This value of R is more than maximum of 788 k-ohm.\n", + "Hence not suitable.\n", + "\n", + "For C = 0.04 micro F, R = 502.89 K-ohm.\n", + "As this is less than max value. It is suitable. \n", + "Lets assume R = 500 k-ohm\n", + "Rmax = 502.5 k-ohm\n", + "\n", + "R3 = 1.32 k-ohm. so take nearest value R3 = 1.2 k-ohm\n", + "\n", + "R4 = 103.55 ohm. so take nearest value R4 = 100.0 ohm\n", + "\n", + "Minimum firing angle = 1.79\u00b0\n", + "Maximum firing angle = 359.7\u00b0\n", + "\n", + "Though maximum firing angle available is 359.7\u00b0, it will not be needed\n", + "because in a single phase full wave converter the maximum firing angle is 180\u00b0\n" + ] + } + ], + "prompt_number": 166 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.32, Page No.92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# conduction time of thyristor\n", + "\n", + "import math\n", + "#variable declaratrion\n", + "R =0.8 # load resistance\n", + "L = 10*10**-6 # inductance\n", + "C = 50*10**-6 # capacitance\n", + "\n", + "#calculations\n", + "R1 = math.sqrt(4*L/C) # R should be less than this value\n", + "t = math.pi/(math.sqrt((1/(L*C))-((R**2)/(4*L**2))))\n", + "\n", + "#Result\n", + "print(\"Value of sqrt(4L/C) is %.4f and give R = %.1f\\nTherefore, the circuit is underdamped.\"%(R1,R))\n", + "print(\"\\nt0 = %.2f*10**-6 seconds\"%(t*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of sqrt(4L/C) is 0.8944 and give R = 0.8\n", + "Therefore, the circuit is underdamped.\n", + "\n", + "t0 = 157.08*10**-6 seconds\n" + ] + } + ], + "prompt_number": 169 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.33, Page No. 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Values of L and C\n", + "\n", + "import math\n", + "#variable declaration\n", + "I = 8.0 # load current\n", + "V = 90.0 # Supply voltage\n", + "t = 40.0*10**-6 # turn off time\n", + "\n", + "#calculation\n", + "#print(\"Assume peak value of capacitor current to be twice the load cuuren.\")\n", + "C_by_L = (2*I/V)**2 # using eq 2.33\n", + "#print(\"Assume that thyristor is reverse biased for one-fourth period of resonant circuit.\")\n", + "CL = (t*2/math.pi)**2\n", + "# (2*I/V)^2*L^2 =(t*2/math.pi)^2\n", + "\n", + "L = math.sqrt(CL/C_by_L)\n", + "C =C_by_L*L\n", + "\n", + "print(\"L = %.2f*10**-6 H\\nC = %.3f*10**-6 F\"%(L*10**6,C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L = 143.24*10**-6 H\n", + "C = 4.527*10**-6 F\n" + ] + } + ], + "prompt_number": 173 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.34, Page No. 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Value of C for commutation\n", + "\n", + "import math\n", + "#variable declaration\n", + "R = 10 # load resistace\n", + "V = 100 # supply voltage \n", + "t = 50 * 10**-6 # turn off time\n", + "\n", + "#Calculations\n", + "C = t/(R*math.log(2))\n", + "\n", + "#Result\n", + "print(\"C = %.2f*10^-6 F\"%(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 7.21*10^-6 F\n" + ] + } + ], + "prompt_number": 176 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.35, Page No. 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# L and C of commutation circuit\n", + "\n", + "import math\n", + "# variable declaration\n", + "V = 100 # supply voltage\n", + "I = 40 # maximumm load current\n", + "T = 40*10**-6 # turn off time\n", + "t = 1.5 # extra 50% tolerance\n", + "\n", + "#Calculation\n", + "T = T*t\n", + "C = I*T/V\n", + "L = (V**2)*C/(I**2)\n", + "Ip = V*math.sqrt(C/L)\n", + "L2 = 2* 10**-4 # assume\n", + "Ip2 = V*math.sqrt(C/L2)\n", + "print(\"C = %.0f*10^-6 F\\nL = %.1f*10^-4 H\\nPeak capacitor current = %d A\"%(C*10**6,L*10**4,Ip))\n", + "print(\"\\nPeak capacitor current should be less than maximum load currentof %d A. If L is selected as %d *10^-4 H,\"%(I,L2*10**4))\n", + "print(\"the peak capacitor current will be %.1f A. Since this is less than %d A, this value of L is satisfactory.\"%(Ip2,I))\n", + "print(\"\\nHence,\\nC = %.0f*10^-6 F\\nL = %.1f*10^-4 H\"%(C*10**6,L2*10**4))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 24*10^-6 F\n", + "L = 1.5*10^-4 H\n", + "Peak capacitor current = 40 A\n", + "\n", + "Peak capacitor current should be less than maximum load currentof 40 A. If L is selected as 2 *10^-4 H,\n", + "the peak capacitor current will be 34.6 A. Since this is less than 40 A, this value of L is satisfactory.\n", + "\n", + "Hence,\n", + "C = 24*10^-6 F\n", + "L = 2.0*10^-4 H\n" + ] + } + ], + "prompt_number": 187 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.36, Page No. 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# current rating of the thyristor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vdc = 100.0 # input voltage\n", + "L = 0.1 *10**-3 # Inductance\n", + "C = 10*10**-6 # capacitance\n", + "Vc = 100.0 # iinitial voltage on capacitor\n", + "t = 25.0*10**-6 # thyristor turn offf time\n", + "I = 10.0 # Thyristor load current\n", + "\n", + "#Calculations\n", + "t_off = Vc*C/I\n", + "Ic = Vdc*math.sqrt(C/L)\n", + "\n", + "# Result\n", + "print(\"t_off = %d *10^-6 S\\nt_off is more than thyristor turn off time and is thus sufficient to commutate the main circuit.\"%(t_off*10**6))\n", + "print(\"\\nPeak capacitor current = %.2fA \"%Ic)\n", + "print(\"Maximum current rating of thyristor should be more than %.2fA\"%Ic)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "t_off = 100 *10^-6 S\n", + "t_off is more than thyristor turn off time and is thus sufficient to commutate the main circuit.\n", + "\n", + "Peak capacitor current = 31.62A \n", + "Maximum current rating of thyristor should be more than 31.62A\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.37, Page No. 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# value of R and C for snubber circuit\n", + "\n", + "import math\n", + "#variable declaration\n", + "dv_by_dt = 25*10**6 # Thyristor's dv/dt rating\n", + "L = 0.2 *10**-3 # source inductance\n", + "V = 230 # Supply voltage\n", + "df = 0.65 # damping factor\n", + "\n", + "#Calculation\n", + "Vm = V*math.sqrt(2) \n", + "C = (1/(2*L))*(0.564*Vm/dv_by_dt)**2\n", + "R = 2*df*math.sqrt(L/C)\n", + "\n", + "#Result\n", + "print(\"C = %.2f*10^-9 F\\n\\nR = %.1f ohm\"%(C*10**9,R))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 134.62*10^-9 F\n", + "\n", + "R = 50.1 ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.38, Page No.97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# snuubber circuit parameters\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 300.0 # input voltage\n", + "Rl = 10.0 # load resistance\n", + "f = 2000.0 # operating frequency otf the circuit\n", + "dv_by_dt = 100.0*10**6 # required dv/dt rating of the circuit\n", + "I = 100.0 # discharge current\n", + "\n", + "#calculations\n", + "#(a)\n", + "R = V/I\n", + "C = (1-(1/math.e))*Rl*V/(dv_by_dt*((R+Rl)**2))\n", + "C = math.floor(C*10**9)/10**9\n", + "#(b)\n", + "P = (C*V**2*f)/2\n", + "\n", + "#Result\n", + "print(\"(a)\\nR = %f ohm\\nC = %.3f*10^-6 F\"%(R,C*10**6))\n", + "print(\"\\n(b)\\nSnubber power loss = %.2f W\"%P)\n", + "print(\"\\nAll the energy stored in capacitor C is dissipated in resistance R. Hence power rating of R is %.2f W.\"%P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "R = 3.000000 ohm\n", + "C = 0.112*10^-6 F\n", + "\n", + "(b)\n", + "Snubber power loss = 10.08 W\n", + "\n", + "All the energy stored in capacitor C is dissipated in resistance R. Hence power rating of R is 10.08 W.\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.39, Page No.98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# maximum permissiible values of dv/dt and di/dt\n", + "\n", + "import math\n", + "#variable declaration\n", + "R = 4.0 # resistance\n", + "L = 6.0*10**-6 # inductance\n", + "C = 6.0*10**-6 # capacitance\n", + "V = 300.0 # Supply voltage\n", + "\n", + "#calculations\n", + "di_dt = V/L\n", + "Isc = V/R\n", + "dv_dt =(R* di_dt)+(Isc/C)\n", + "\n", + "#Result\n", + "print(\"Maximum di/dt = %.0f*10^6 A/s\\n\\nmaximum permissible dv/dt = %.1f*10^6 V/s\"%(di_dt*10**-6,dv_dt*10**-6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum di/dt = 50*10^6 A/s\n", + "\n", + "maximum permissible dv/dt = 212.5*10^6 V/s\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.40, Page No.98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# snubber circuit designe\n", + "\n", + "import math\n", + "#variable declaration\n", + "\n", + "Rl = 8.0 # load resistance\n", + "V = 230.0 # supply voltage\n", + "I = 200.0 # repititive peak current \n", + "di_dt = 40.0*10**6 # max. di/di rating\n", + "dv_dt = 150.0*10**6 # max. dv/dv rating\n", + "sf = 2.0 # safety factor for thyristor\n", + "\n", + "#Calculation\n", + "\n", + "I1 = I/2.0\n", + "di_dt2 = di_dt/2.0\n", + "dv_dt2 = dv_dt/2\n", + "Vp = V*math.sqrt(2)\n", + "#Vp = math.floor((Vp*10)/10)\n", + "L2 = Vp/di_dt2\n", + "L2 = math.floor(L2*10**8)/10**8\n", + "R2 = L2*dv_dt2/Vp\n", + "Ip = Vp/Rl\n", + "Ic = (math.floor(Vp*10)/10)/R2\n", + "It = math.floor(Ip*100)/100+Ic\n", + "Ic_max = I1 - Ip\n", + "Ic_max = math.ceil(Ic_max*100)/100\n", + "R = Vp /Ic_max\n", + "R = math.ceil(R)\n", + "h = 0.65 #assumed \n", + "C = 4*(h**2)*L2/R**2\n", + "dv_dt3 = Vp/((R+Rl)*C)\n", + "\n", + "#Result\n", + "print(\"when safety factor is 2 ,maximum permisible ratings are:\")\n", + "print(\"max. di/dt = %.0f*10^6 A/s\\nmax. dv/dt = %.0f*10^6 V/s\"%(di_dt2*10**-6,dv_dt2*10**-6))\n", + "print(\"\\nPeak value of input voltage = %.1f V\"%(math.floor(Vp*10)/10))\n", + "print(\"L = %.2f*10^-6 H \\nR = %.2f ohm\"%(L2*10**6,R2))\n", + "print(\"Peak load current = %.2fA\\nPeak capacitor discharge current = %.2f A\"%(math.floor(Ip*100)/100,Ic))\n", + "print(\"Total current through capacitor = %.2f\"%It)\n", + "print(\"\\nSince total current through capacitor is more than permissible vale. Hence max capacitor discharge current = %.2fA\"%Ic_max)\n", + "print(\"R = %.0f ohm\\nC = %.4f*10^-6F\"%(R,C*10**6))\n", + "print(\"dv/dt = %.2f*10^6 V/s\\nSince this value is within specified limit the design is safe. \"%(math.floor(dv_dt3*10**-4)/100))\n", + "print(\"Hence, R = %d ohm, C = %.4f micro-F and L = %.2f micro-H\"%(R,C*10**6,L2*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when safety factor is 2 ,maximum permisible ratings are:\n", + "max. di/dt = 20*10^6 A/s\n", + "max. dv/dt = 75*10^6 V/s\n", + "\n", + "Peak value of input voltage = 325.2 V\n", + "L = 16.26*10^-6 H \n", + "R = 3.75 ohm\n", + "Peak load current = 40.65A\n", + "Peak capacitor discharge current = 86.74 A\n", + "Total current through capacitor = 127.39\n", + "\n", + "Since total current through capacitor is more than permissible vale. Hence max capacitor discharge current = 59.35A\n", + "R = 6 ohm\n", + "C = 0.7633*10^-6F\n", + "dv/dt = 30.43*10^6 V/s\n", + "Since this value is within specified limit the design is safe. \n", + "Hence, R = 6 ohm, C = 0.7633 micro-F and L = 16.26 micro-H\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.41, Page No. 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Fault clearing time(referring to fig.2.59)\n", + "\n", + "import math\n", + "#variable declaration\n", + "I2t = 30 # I2t rating of thyristor\n", + "V = 230 # supply voltage\n", + "#For resistor values refer to fig 2.59\n", + "R1 = 2.0\n", + "R2 = 1.0\n", + "R3 = 5.0\n", + "R4 = 6.0\n", + "R5 = 5.0 \n", + "#calculation\n", + "Rnet = R1+(R3*R2)/R4\n", + "If = math.sqrt(2)*V/Rnet\n", + "tc = I2t/(If**2)\n", + "\n", + "#Result\n", + "print(\"tc = %.3f*10^-3 seconds \"%(math.ceil(tc*1000*1000)/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "tc = 2.277*10^-3 seconds \n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.42, Page No.103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# number of thyristors in series and parallel\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 3*10**3 # supply voltage\n", + "I = 750.0 # supply current\n", + "V1 = 800.0 # Thyristor voltage rating\n", + "I1 = 175.0 # Thyristor current rating\n", + "d = 0.25 # derating\n", + "\n", + "\n", + "# Calculation\n", + "np = I/((1-d)*I1)\n", + "ns = V/((1-d)*V1)\n", + "print(\"np = %.2f or %d\"%(np,math.ceil(np)))\n", + "print(\"ns = %d\"%(math.ceil(ns)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "np = 5.71 or 6\n", + "ns = 5\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.43, Page No. 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Value of R and C\n", + "\n", + "import math\n", + "#variable declaration(referring to example 2.42)\n", + "V = 3*10**3 # supply voltage\n", + "I = 750.0 # supply current\n", + "V1 = 800.0 # Thyristor voltage rating\n", + "I1 = 175.0 # Thyristor current rating\n", + "d = 0.25 # derating\n", + "Ib = 8*10**-3 # maximum forward leakage current\n", + "del_Q = 30*10**-6 # recovery charge difference\n", + "ns = 5 # number of series thyristors \n", + "\n", + "#Calculations\n", + "R = ((ns*V1)-V)/((ns-1)*Ib)\n", + "C = (ns-1)*del_Q/(ns*V1-V)\n", + "\n", + "#Result\n", + "print(\"R = %.2f*10^3 ohm\\nC = %.2f*10^-6 F\"%(R/1000,C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 31.25*10^3 ohm\n", + "C = 0.12*10^-6 F\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.44, Page No. 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# series resistance\n", + "\n", + "import math\n", + "# variabe declaration\n", + "I1 = 200 # thyristor1 current rating\n", + "I2 = 300 # thyristor2 current rating\n", + "V1 = 1.5 # on state voltage drop of thyristor1 \n", + "V2 = 1.2 # on state voltage drop of thyristor2\n", + "\n", + "#Calculations\n", + "R = (V1-V2)/(I2-I1)\n", + "\n", + "#Result\n", + "print(\"R = %.3f ohm\"%R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 0.003 ohm\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.45, Page No.104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Thyristor parameters\n", + "\n", + "import math\n", + "#variable declaration\n", + "ns = 12 # no of series thyristors\n", + "V = 16*10**3 # maximum DC voltage rating\n", + "Ib = 10*10**-3 # maximum leakage current of thyristor\n", + "del_Q = 150 *10**-6 # recovery charge differences of thyristors\n", + "R = 56*10**3 # resistance\n", + "C = 0.5 *10**-6 # Capacitance\n", + "\n", + "#Calculations\n", + "Vd1 = (V+(ns-1)*R*Ib)/ns\n", + "ssvd = 1-(V/(ns*Vd1))\n", + "Vd2 = (V+((ns-1)*del_Q/C))/ns\n", + "tsvd = 1-(V/(ns*Vd2))\n", + "\n", + "#Result\n", + "print(\"(a) Maximum steady state voltage rating = %.2f V\"%Vd1)\n", + "print(\"(b) Steady state voltage derating = %.3f or %.1f%%\"%(ssvd,ssvd*100))\n", + "print(\"(c) Maximum transient state voltage rating = %.2f V\"%Vd2)\n", + "print(\"(d) Transient state voltage derating = %.3f or %.1f%%\"%(tsvd,tsvd*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Maximum steady state voltage rating = 1846.67 V\n", + "(b) Steady state voltage derating = 0.278 or 27.8%\n", + "(c) Maximum transient state voltage rating = 1608.33 V\n", + "(d) Transient state voltage derating = 0.171 or 17.1%\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.46, Page No.104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# No of Thyristor\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 500.0 # single thyristor voltage rating\n", + "I = 75.0 # single thyristor current rating\n", + "Vmax = 7.5*10**3 # overall voltage rating of the circuit\n", + "Imax = 1.0*10**3 # overall current rating of the circuit\n", + "df = 0.14 # derating factor\n", + "\n", + "#Calcaulations\n", + "ns = Vmax/((1-df)*V)\n", + "np = Imax/((1-df)*I)\n", + "\n", + "#Result\n", + "print(\"No of thyristors in series, ns = %.2f say %d\"%(ns,math.ceil(ns)))\n", + "print(\"No of thyristors in parallel, np = %.2f say %d\"%(np,math.ceil(np)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No of thyristors in series, ns = 17.44 say 18\n", + "No of thyristors in parallel, np = 15.50 say 16\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.47, Page No. 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Turn off voltage and discharge current through SCR\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vmax = 8.0*10**3 # max voltage rating of the circuit\n", + "R = 20.0*10**3 # static equalising resistance \n", + "Rc = 25.0 # Resistace of dynamic equalising circuit\n", + "C = 0.1*10**-6 # Capacitance of dynamic equalising circuit\n", + "Ib1 = 22.0*10**-3 # leakage current of thyristor1\n", + "Ib2 = 20.0*10**-3 # leakage current of thyristor2\n", + "Ib3 = 18.0*10**-3 # leakage current of thyristor3\n", + "\n", + "\n", + "#Calculations \n", + "#(a)\n", + "I = ((Vmax/R)+(Ib1+Ib2+Ib3))/3\n", + "V1 = (I-Ib1)*R\n", + "V2 = (I-Ib2)*R\n", + "V3 = (I-Ib3)*R\n", + "#(b)\n", + "I1 = V1/Rc\n", + "I2 = V2/Rc\n", + "I3 = V3/Rc\n", + "\n", + "#Result\n", + "print(\"Voltage across SCR 1 = %.1fV\"%(math.floor(V1*10)/10))\n", + "print(\"Voltage across SCR 2 = %.1fV\"%(math.floor(V2*10)/10))\n", + "print(\"Voltage across SCR 3 = %.1fV\"%(math.floor(V3*10)/10))\n", + "print(\"Discharge current through SCR 1 = %.2fA\"%(math.floor(I1*100)/100))\n", + "print(\"Discharge current through SCR 2 = %.2fA\"%(math.floor(I2*100)/100))\n", + "print(\"Discharge current through SCR 3 = %.2fA\"%(math.floor(I3*100)/100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across SCR 1 = 2626.6V\n", + "Voltage across SCR 2 = 2666.6V\n", + "Voltage across SCR 3 = 2706.6V\n", + "Discharge current through SCR 1 = 105.06A\n", + "Discharge current through SCR 2 = 106.66A\n", + "Discharge current through SCR 3 = 108.26A\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb new file mode 100755 index 00000000..8f24e4d1 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb @@ -0,0 +1,2276 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Controlled Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.1, Page No. 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.2, Page No. 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.3, Page No. 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Half wave diode rectifier\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#Variable declaration\n", + "V = 12.0 # Voltage of the battery to be charged\n", + "B = 150.0 # battery capacity in Wh\n", + "I = 4.0 # average current requirement\n", + "t = 4.0 # transformer primary to secondary ratio \n", + "Vi = 230.0 # voltage at transformer primary\n", + "\n", + "# Calculations\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vp = Vi*sqrt_2/t\n", + "#(a)\n", + "alfa = (180/math.pi)*(math.asin(V/Vp))\n", + "ang_c = (180-alfa)-alfa\n", + "ang_c = math.floor(ang_c*100)/100\n", + "#(b)\n", + "def f(wt):\n", + " return ((Vp*math.sin(wt))-V)/(2*math.pi*I)\n", + "wt_lower=(alfa*math.pi/180)\n", + "wt_upper =math.pi-(alfa*math.pi/180)\n", + "val1 = quad(f,wt_lower,wt_upper)\n", + "R = val1[0]\n", + "R = math.floor(R*100)/100\n", + "#(c)\n", + "def g(wt):\n", + " return (((Vp*math.sin(wt))-V)**2)/(2*math.pi*(R**2))\n", + "val2 = quad(g,wt_lower,wt_upper)\n", + "Irms = val2[0]\n", + "Irms = math.floor(math.sqrt(Irms)*100)/100\n", + "P = (Irms**2)*R\n", + "#(d)\n", + "T = B/(V*I)\n", + "#(e)\n", + "eff = (V*I)/((V*I)+P)\n", + "#(f)\n", + "PIV = Vp+V\n", + "\n", + "#Results\n", + "print(\"(a) Conduction angle = %.2f\u00b0\\n(b) R = %.2f ohm\\n(c) Irms = %.2f A\\n Resistor power rating = %.1f W\"%(ang_c,R,Irms,P))\n", + "print(\"(d) Time of charging = %.3f hours\\n(e) Rectifier efficiency = %.4f or %.2f%%\\n(f) PIV = %.3f V\"%(T,eff,eff*100,PIV))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Conduction angle = 163.02\u00b0\n", + "(b) R = 5.04 ohm\n", + "(c) Irms = 6.58 A\n", + " Resistor power rating = 218.2 W\n", + "(d) Time of charging = 3.125 hours\n", + "(e) Rectifier efficiency = 0.1803 or 18.03%\n", + "(f) PIV = 93.305 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.4, Page No. 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Full wave centre tapped rectifier\n", + "\n", + "import math\n", + "# Variable declaration\n", + "Vm = 100.0 # transformer secondary voltage from mid point to each end\n", + "R = 5.0 # resistance\n", + "\n", + "#Calculation\n", + "#(b)\n", + "Idc = 2*Vm/(math.pi*R)\n", + "Idc = math.floor(Idc*1000)/1000\n", + "Vdc = Idc*R\n", + "Irms = 0.707*Vm/R\n", + "Pdc = R*Idc**2\n", + "Pdc = math.ceil(Pdc*100)/100\n", + "Pac = R*Irms**2\n", + "Pac = math.ceil(Pac*10)/10\n", + "eff = Pdc/Pac\n", + "FF = math.floor(((0.707*Vm*math.pi)/(2*Vm))*100)/100\n", + "RF = math.sqrt((FF**2)-1)\n", + "TUF = (((2/math.pi)**2)/(2*0.707*0.5))*100\n", + "PIV =2*Vm\n", + "\n", + "# Result\n", + "print(\"Idc = %.3f A\\nVdc = %.2f V\\nIrms = %.2f A\\nPdc = %.2f\\nPac = %.1f\\nEfficiency = %.3f\"%(Idc,Vdc,Irms,Pdc,Pac,eff))\n", + "print(\"FF = %.2f\\nRF = %.3f\\nTUF = %.2f%%\\nPIV = %d\\nCF = %f\"%(FF,RF,TUF,PIV,math.sqrt(2)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idc = 12.732 A\n", + "Vdc = 63.66 V\n", + "Irms = 14.14 A\n", + "Pdc = 810.52\n", + "Pac = 999.7\n", + "Efficiency = 0.811\n", + "FF = 1.11\n", + "RF = 0.482\n", + "TUF = 57.32%\n", + "PIV = 200\n", + "CF = 1.414214\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.5, Page No.133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.6, Page No.135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase diode bridge rectifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vm = 100.0 # Peak input voltage\n", + "R = 5.0 # load resistance\n", + "\n", + "#Calculation\n", + "#(b)\n", + "Idc = 2*Vm/(math.pi*R)\n", + "Idc = math.floor(Idc*1000)/1000\n", + "Vdc = Idc*R\n", + "Irms = 0.707*Vm/R\n", + "Pdc = R*Idc**2\n", + "Pdc = math.ceil(Pdc*100)/100\n", + "Pac = R*Irms**2\n", + "Pac = math.ceil(Pac*10)/10\n", + "eff = Pdc/Pac\n", + "FF = math.floor(((0.707*Vm*math.pi)/(2*Vm))*100)/100\n", + "RF = math.sqrt((FF**2)-1)\n", + "PIV =Vm\n", + "\n", + "# Result\n", + "print(\"Idc = %.3f A\\nVdc = %.2f V\\nIrms = %.2f A\\nPdc = %.2f\\nPac = %.1f\\nEfficiency = %.3f\"%(Idc,Vdc,Irms,Pdc,Pac,eff))\n", + "print(\"FF = %.2f\\nRF = %.3f\\nPIV = %d\\nCF = %f\"%(FF,RF,PIV,math.sqrt(2)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idc = 12.732 A\n", + "Vdc = 63.66 V\n", + "Irms = 14.14 A\n", + "Pdc = 810.52\n", + "Pac = 999.7\n", + "Efficiency = 0.811\n", + "FF = 1.11\n", + "RF = 0.482\n", + "PIV = 100\n", + "CF = 1.414214\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.7, Page No.135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.8, Page No.138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase half wave rectifier circuit\n", + "\n", + "import math\n", + "# Variable declaration\n", + "Vm = 400 # amplitude of output sine wave\n", + "alfa = 30 # thyristor firing angle\n", + "R = 50 # Load resistance\n", + "\n", + "#Calculations\n", + "alfa = alfa*math.pi/180\n", + "Vdc = Vm*(1+math.cos(alfa))/(2*math.pi)\n", + "I = Vdc/R\n", + "Vrms = Vm*math.sqrt(((math.pi-alfa)/(4*math.pi))+(math.sin(2*alfa)/(8*math.pi)))\n", + "Irms = Vrms/R\n", + "\n", + "#Result\n", + "print(\"Average DC voltage = %.1f V\\nAverage load current = %.3f A\"%(Vdc,I))\n", + "print(\"RMS voltage = %.1f V\\nRMS current = %.3f A\"%(Vrms,Irms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average DC voltage = 118.8 V\n", + "Average load current = 2.376 A\n", + "RMS voltage = 197.1 V\n", + "RMS current = 3.942 A\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.9, Page No. 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average current in the circuit\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#Variable declaration\n", + "Vm = 100.0 # peak input voltage\n", + "V = 50.0 # voltage of battery to be charged\n", + "R = 10.0 # load resistance\n", + "\n", + "#Calculations\n", + "wt = math.asin(V/Vm)\n", + "wt2= math.pi-wt\n", + "def f(wt):\n", + " return ((Vm*math.sin(wt))-V)/(2*math.pi*R)\n", + "wt_lower=wt\n", + "wt_upper =wt2\n", + "val = quad(f,wt_lower,wt_upper)\n", + "i = val[0]\n", + "\n", + "#Result\n", + "print(\"Average current in the circuit = %.2f A\"%i)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current in the circuit = 1.09 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.10, Page No. 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average current\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#Variable declaration\n", + "Vm = 110.0 # peak input voltage\n", + "f = 50.0 # input frequency\n", + "Ra = 10.0 # motor armature resistance\n", + "E = 55.5 # back emf of the motor\n", + "\n", + "#Calculations\n", + "wt = math.asin(E/(Vm*math.sqrt(2)))\n", + "wt2 = math.pi-wt\n", + "def f(wt):\n", + " return ((math.sqrt(2)*Vm*math.sin(wt))-E)/(2*math.pi*Ra)\n", + "wt_lower=wt\n", + "wt_upper =wt2\n", + "val = quad(f,wt_lower,wt_upper)\n", + "i = val[0]\n", + "\n", + "#Result\n", + "print(\"Average current in the circuit = %.3f A\"%i)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current in the circuit = 2.495 A\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.11, Page No. 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase half wave rectifier\n", + "\n", + "import math\n", + "# Variable declaration\n", + "R = 15.0 # load resistance\n", + "V = 230.0 # supply voltage\n", + "alfa = math.pi/2 # firing angle\n", + "\n", + "#Calculations\n", + "Vm = math.sqrt(2)*V\n", + "Vm = math.floor(Vm*10)/10\n", + "#(a)\n", + "Vdc = Vm*(1+math.cos(alfa))/(2*math.pi)\n", + "Vdc = math.ceil(Vdc*100)/100\n", + "Idc = Vdc/R\n", + "Idc = math.floor(Idc*100)/100\n", + "Vrms = Vm*math.sqrt(((math.pi-alfa)/(4*math.pi))+((math.sin(2*alfa))/(8*math.pi)))\n", + "Vrms = math.ceil(Vrms*100)/100\n", + "Irms =Vrms/R\n", + "Irms = math.floor(Irms*100)/100\n", + "#(b)\n", + "Pdc = Vdc*Idc\n", + "Pac = Vrms*Irms\n", + "eff = Pdc/Pac\n", + "#(c)\n", + "FF = Vrms/Vdc\n", + "RF = math.sqrt((FF**2)-1)\n", + "#(d)\n", + "VA = V*Irms\n", + "TUF = Pdc/VA\n", + "#(e)\n", + "PIV = Vm\n", + "\n", + "#Result\n", + "print(\"(a)\\nVdc = %.2f V\\nIdc = %.2fA\\nVrms = %.2f V\\nIrms = %.2f A\"%(Vdc,Idc,Vrms,Irms))\n", + "print(\"\\n(b)\\nRectification Efficiency = %.3f\"%eff)\n", + "print(\"\\n(c)\\nForm Factor = %.2f\\nRipple Factor = %.3f\\n\\n(d)\\nTransformer utilization factor =%.4f\\n\\n(e)PIV = %.1f V\"%(FF,RF,TUF,PIV))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Vdc = 51.76 V\n", + "Idc = 3.45A\n", + "Vrms = 114.98 V\n", + "Irms = 7.66 A\n", + "\n", + "(b)\n", + "Rectification Efficiency = 0.203\n", + "\n", + "(c)\n", + "Form Factor = 2.22\n", + "Ripple Factor = 1.984\n", + "\n", + "(d)\n", + "Transformer utilization factor =0.1014\n", + "\n", + "(e)PIV = 325.2 V\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.12, Page No.146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full wave rectifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 150.0 # input rms value\n", + "R = 30.0 # load resistance\n", + "alfa =(math.pi/180)*45 # firing angle\n", + "\n", + "#Calculations\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vdc = V*sqrt_2*(1+math.cos(alfa))/math.pi\n", + "I = Vdc/R\n", + "Vrms = V*sqrt_2*math.sqrt(((math.pi-alfa)/(2*math.pi))+((math.sin(2*alfa))/(4*math.pi)))\n", + "Irms =Vrms/R\n", + "\n", + "#Result\n", + "print(\"Vdc = %.2f V\\nAverage load current = %.2f A\\nVrms = %d V\\nRMS load current = %.3f A\"%(Vdc,I,Vrms,Irms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 115.25 V\n", + "Average load current = 3.84 A\n", + "Vrms = 143 V\n", + "RMS load current = 4.767 A\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.13, Page No. 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Transformer and thyristor parameters\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input to transformer primary\n", + "f = 50.0 # input frequency\n", + "Vdc = 100.0 # Average values of load voltage\n", + "Idc = 15.0 # Average value of load current\n", + "alfa = 30*(math.pi/180) # firing angle\n", + "d = 1.7 # drop across thyristor\n", + "\n", + "\n", + "#caculatios\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = ((Vdc+d)*math.pi)/(2*math.cos(alfa))\n", + "Vm = math.floor(Vm*100)/100\n", + "Vrms = Vm/1.4109#math.sqrt(2)::to match the ans in book\n", + "N = V/Vrms\n", + "#(b)\n", + "Irms = math.sqrt((Idc**2)/2)\n", + "Irms = math.ceil(Irms*100)/100\n", + "Tr = 2*Vrms*Irms\n", + "\n", + "#(c)\n", + "PIV = 2*Vm\n", + "#(d)\n", + "It = Irms\n", + "\n", + "#Result\n", + "print(\"(a)\\nVm = %.2f V\\nRMS voltage of each half cycle of secondary = %.2f V\\nTurn ratio of transformer = %.2f\"%(Vm,Vrms,N))\n", + "print(\"\\n(b)Transformer VA rating = %.1f VA\\n\\n(c)PIV = %.2f V\\n\\n(d)RMS value of thyristor current = %.2f A\"%(Tr,PIV,It))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Vm = 184.46 V\n", + "RMS voltage of each half cycle of secondary = 130.74 V\n", + "Turn ratio of transformer = 1.76\n", + "\n", + "(b)Transformer VA rating = 2774.3 VA\n", + "\n", + "(c)PIV = 368.92 V\n", + "\n", + "(d)RMS value of thyristor current = 10.61 A\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.14, Page No.148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# thyristor rated voltage\n", + "\n", + "import math\n", + "#Variable declaration\n", + "P = 10.0*10**3 # rectifier powwer rating\n", + "I = 50.0 # thyristor current rating\n", + "sf = 2 # safety factor\n", + "\n", + "#Calculations\n", + "Idc = I\n", + "#(a)\n", + "Vdc = P/Idc\n", + "Vm = Vdc*math.pi/2\n", + "PIV = 2*Vm\n", + "Vt = 2*PIV\n", + "#(a)\n", + "Vt2 = 2*Vm\n", + "\n", + "#Result\n", + "print(\"(a) Full wave centre tapped recifier:\\n Thyristor voltage rating = %.2f V\"%Vt)\n", + "print(\"\\n(b) Full wave bridge rectifier:\\n Thyristor voltage rating = %.2f V\"%Vt2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Full wave centre tapped recifier:\n", + " Thyristor voltage rating = 1256.64 V\n", + "\n", + "(b) Full wave bridge rectifier:\n", + " Thyristor voltage rating = 628.32 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.15, Page No. 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output voltage, firing angle, load current\n", + "\n", + "import math\n", + "from numpy import poly1d\n", + "#variable declaaration\n", + "V = 230.0 # input voltage\n", + "P = 1000.0 # output power rating\n", + "Pl = 800.0 # Actual power delivered\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vrms = math.sqrt((Pl*V**2)/P)\n", + "Vrms = math.ceil(Vrms*100)/100\n", + "#(b)\n", + "#After solving equation using taylor seris of X, we got following coefficient. \n", + "P = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*(1-(Vrms/V)**2))], variable = 'x')\n", + "x = P.r[(P.order+1)/2]*180/math.pi\n", + "alfa = math.ceil(x.real)\n", + "#(c)\n", + "I = Pl/Vrms\n", + "\n", + "#Result\n", + "print(\"(a) Vrms = %.2f V\\n(b) firing angle = %.0f\u00b0\\n(c) Load current(rms value) = %.3f A\"%(Vrms,alfa,I))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Vrms = 205.72 V\n", + "(b) firing angle = 61\u00b0\n", + "(c) Load current(rms value) = 3.889 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.16, Page No.149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average power output\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 800.0 # thyristor peak voltage rating\n", + "I = 30.0 # average forward current\n", + "sf = 2.5 # safety factor\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vm = V/(2*sf)\n", + "Vdc = 2*Vm/math.pi\n", + "Vdc = math.ceil(Vdc*100)/100\n", + "Idc = I/sf\n", + "P = Idc*Vdc\n", + "#(b)\n", + "Vm2 = V/sf\n", + "Vdc2 = 2*Vm2/math.pi\n", + "Vdc2 = math.ceil(Vdc2*100)/100\n", + "Idc2 = I/sf\n", + "P2 = Idc2*Vdc2\n", + "\n", + "#Result\n", + "print(\"(a) In a mid point converter:\\n Average output power = %.2f W\"%P)\n", + "print(\"(b) In a Bridge converter:\\n Average output power = %.2f W\"%P2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) In a mid point converter:\n", + " Average output power = 1222.32 W\n", + "(b) In a Bridge converter:\n", + " Average output power = 2444.64 W\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.17, Page No.150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Bridge converter parameters\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "R = 10.0 # load resistance\n", + "alfa = 30*math.pi/180 # firing angle\n", + "\n", + "#Calculations\n", + "#(b)\n", + "Vm = math.sqrt(2)*V\n", + "def f(wt):\n", + " return math.sin(wt)\n", + "wt_lower1 = alfa\n", + "wt_upper1 = math.pi\n", + "wt_lower2 = math.pi\n", + "wt_upper2 = 2*math.pi\n", + "val1 = quad(f,wt_lower1,wt_upper1)\n", + "val2 = quad(f,wt_lower2,wt_upper2)\n", + "Vo =math.floor(((Vm/(2*math.pi))*(val1[0]-val2[0]))*10)/10\n", + "I = Vo/R\n", + "P = Vo*I\n", + "#result\n", + "print(\"DC power output = %.3f W\"%P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC power output = 4004.001 W\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.18, Page No. 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output voltage and power\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "R = 10.0 # load resistance\n", + "\n", + "#Calculations\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vo = 2*sqrt_2*V/math.pi\n", + "Vo = math.floor(Vo*100)/100\n", + "I = Vo/R\n", + "P = Vo*I\n", + "\n", + "#Result\n", + "print(\"DC power = %.2f W\"%P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC power = 4286.56 W\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.19, Page No.154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase bridge converter circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50.0 # input frequency\n", + "I = 15.0 # constant load current\n", + "R = 0.5 # load resistance\n", + "L = 0.3 # inductance\n", + "E1 = 100 # back emf for case 1\n", + "E2 = -100 # back emf for case 2 \n", + "\n", + "#Calculations\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "alfa1 = (math.acos((E1+I*R)*math.pi/(2*Vm)))*(180/math.pi)\n", + "#(b)\n", + "alfa2 = (math.acos((E2+I*R)*math.pi/(2*Vm)))*(180/math.pi)\n", + "#(c)\n", + "OP1 = (E1*I)+(R*I**2)\n", + "OP2 = (E2*I)+(R*I**2)\n", + "IP = V*I\n", + "pf1 = OP1/IP\n", + "pf2 = -OP2/IP\n", + "print(\"(a) Firing angle = %.2f\u00b0\"%(math.ceil(alfa1*100)/100))\n", + "print(\"(b) Firing angle = %.2f\u00b0\"%alfa2)#Answer in the book is wrong\n", + "print(\"(c) when E = %d : input power factor= %.3f lagging\\n When E = %d: input power factor= %.3f lagging\"%(E1,pf1,E2,pf2)) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Firing angle = 58.73\u00b0\n", + "(b) Firing angle = 116.54\u00b0\n", + "(c) when E = 100 : input power factor= 0.467 lagging\n", + " When E = -100: input power factor= 0.402 lagging\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.20, Page No.155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average load current\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50.0 # frequency\n", + "R = 5.0 # load resistance\n", + "L = 8*10**-3 # inductance\n", + "E = 50.0 # back emf\n", + "alfa = 40*(math.pi/180) # firing angle\n", + "\n", + "#Calculations\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "I = ((2*Vm*math.cos(alfa)/math.pi)-E)/R\n", + "\n", + "#Result\n", + "print(\"Average load current = %.2f A\"%I)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load current = 21.72 A\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.21, Page No. 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Transformer and thyristor parameters for full bridge circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input to transformer primary\n", + "f = 50.0 # input frequency\n", + "Vdc = 100.0 # Average values of load voltage\n", + "Idc = 15.0 # Average value of load current\n", + "alfa = 30*(math.pi/180) # firing angle\n", + "d = 1.7 # drop across thyristor\n", + "\n", + "\n", + "#caculatios\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = ((Vdc+2*d)*math.pi)/(2*math.cos(alfa))\n", + "Vrms = Vm/sqrt_2\n", + "N = V/Vrms\n", + "#(b)\n", + "Irms = Idc\n", + "Tr = Vrms*Irms\n", + "#(c)\n", + "PIV = Vm\n", + "#(d)\n", + "Itrms = Idc/sqrt_2\n", + "\n", + "#Result\n", + "print(\"(a)\\nVm = %.2f V\\nRMS voltage of secondary = %.2f V\\nTurn ratio of transformer = %.3f\"%(Vm,Vrms,N))\n", + "print(\"\\n(b)Transformer VA rating = %.1f VA\\n\\n(c) PIV = %.2f V\\n\\n(d)RMS value of thyristor current = %.2f A\"%(math.ceil(Tr*10)/10,PIV,Itrms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Vm = 187.55 V\n", + "RMS voltage of secondary = 132.64 V\n", + "Turn ratio of transformer = 1.734\n", + "\n", + "(b)Transformer VA rating = 1989.6 VA\n", + "\n", + "(c) PIV = 187.55 V\n", + "\n", + "(d)RMS value of thyristor current = 10.61 A\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.22, Page No. 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase semi-converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50.0 # frequency\n", + "alfa = 90*math.pi/180 # firing angle\n", + "\n", + "# Calculation\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vm = math.floor(Vm*10)/10\n", + "Vdc = Vm*(1+math.cos(alfa))/math.pi\n", + "Vrms = (Vm/sqrt_2)*math.sqrt(((math.pi-alfa)+((math.sin(2*alfa))/2))/math.pi)\n", + "FF = Vrms/Vdc\n", + "\n", + "#Result\n", + "print(\"Vdc = %.2f V\\nVrms = %.1f V\\nForm factor = %.3f \"%(Vdc,Vrms,FF))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.51 V\n", + "Vrms = 162.6 V\n", + "Form factor = 1.571 \n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.23, Page No.160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase semi-converter Bridge circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50 # frequency\n", + "alfa = 90*math.pi/180 # firing angle\n", + "\n", + "\n", + "#calculations\n", + "#(a)\n", + "print(\"(a) Theoretical Section\")\n", + "#(b)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vdc = Vm*(1+math.cos(alfa))/math.pi\n", + "Vdc = math.floor(Vdc*100)/100\n", + "pi = math.floor(math.pi*1000)/1000\n", + "Vrms = (Vm/sqrt_2)*math.sqrt(((math.pi-alfa)+((math.sin(2*alfa))/2))/pi)\n", + "Is = math.sqrt(1-((alfa)/math.pi)) \n", + "Is1 = 2*sqrt_2*math.cos(alfa/2)/math.pi\n", + "HF = math.sqrt((Is/Is1)**2-1)\n", + "theta = -alfa/2\n", + "DF = math.cos(theta)\n", + "Pf = Is1*math.cos(theta)/Is\n", + "\n", + "#Result\n", + "print(\"(b)\\nVdc = %.2f V\\nVrms = %.2f V\\nHarmonic factor = %.3f\"%(Vdc,Vrms,HF))\n", + "print(\"Displacement factor = %.4f\\nInput power factor = %.4f lagging\"%(DF,Pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Theoretical Section\n", + "(b)\n", + "Vdc = 103.52 V\n", + "Vrms = 162.65 V\n", + "Harmonic factor = 0.484\n", + "Displacement factor = 0.7071\n", + "Input power factor = 0.6365 lagging\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.24, Page No.162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phasefull converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50 # frequency\n", + "alfa = math.pi/3 # firing angle\n", + "\n", + "#calculations\n", + "#(a)\n", + "print(\"(a) Theoretical Section\")\n", + "#(b)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vdc = 2*Vm*math.cos(alfa)/math.pi\n", + "Vdc = math.floor(Vdc*100)/100\n", + "Vrms = V\n", + "Is = 1\n", + "Is1 = 2*sqrt_2/math.pi\n", + "HF = math.sqrt((Is/Is1)**2-1)\n", + "theta = -alfa\n", + "DF = math.cos(theta)\n", + "Pf = Is1*math.cos(theta)/Is\n", + "\n", + "#Result\n", + "print(\"(b)\\nVdc = %.2f V\\nVrms = %d V\\nHarmonic factor = %.3f\"%(Vdc,Vrms,HF))\n", + "print(\"Displacement factor = %.1f\\nInput power factor = %.2f lagging\"%(DF,Pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Theoretical Section\n", + "(b)\n", + "Vdc = 103.52 V\n", + "Vrms = 230 V\n", + "Harmonic factor = 0.484\n", + "Displacement factor = 0.5\n", + "Input power factor = 0.45 lagging\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.25, Page No.164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase fully controlled bridge converter\n", + "\n", + "import math\n", + "# Variable declaration\n", + "V = 230.0 # input voltage\n", + "alfa = 30*math.pi/180 # firing angle\n", + "I = 4 # Constant load current\n", + "\n", + "#calculations\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vdc = math.floor((2*Vm*math.cos(alfa)/math.pi)*10)/10\n", + "R = Vdc/I\n", + "Il = math.floor((2*sqrt_2*I/math.pi)*10)/10\n", + "APi = V*Il*math.cos(alfa)\n", + "RPi = V*Il*math.sin(alfa)\n", + "App_i = V*Il\n", + "#(b)\n", + "Vdc1 = Vm*(1+math.cos(alfa))/3.1414#To adjust\n", + "Vdc1 = math.ceil(Vdc1*1000)/1000\n", + "Il1 = math.ceil((Vdc1/R)*100)/100\n", + "Il_2 = math.ceil((2*sqrt_2*Il1*math.cos(alfa/2)/math.pi)*100)/100\n", + "APi1 = V*Il_2*math.cos(alfa/2)\n", + "RPi1 = V*Il_2*math.sin(alfa/2)\n", + "App_i1 = V*Il_2\n", + "#(c)\n", + "Vdc3 = V*(1+math.cos(alfa))/(math.pi*sqrt_2)\n", + "Idc = math.floor((Vdc3/R)*100)/100\n", + "\n", + "#Result\n", + "print(\"(a)\\n Vdc = %.1f V\\n Load resistance = %.3f ohm\\n Active power input = %.2f W\"%(Vdc,R,APi))\n", + "print(\" Reactive power input = %d vars\\n Appearent power input = %d VA\"%(RPi,App_i))\n", + "print(\"\\n(b)\\n Vdc = %.3f V\\n Load current = %.2f A\\n Active power input = %.1f W\"%(Vdc1,Il_2,APi1))\n", + "print(\" Reactive power input = %.2f vars\\n Appearent power input = %.1f VA\"%(RPi1,App_i1))\n", + "print(\"\\n(c)\\n Vdc = %.3f V\\n Average dc output current = %.2f A\"%(Vdc3,Idc))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " Vdc = 179.3 V\n", + " Load resistance = 44.825 ohm\n", + " Active power input = 717.07 W\n", + " Reactive power input = 413 vars\n", + " Appearent power input = 828 VA\n", + "\n", + "(b)\n", + " Vdc = 193.185 V\n", + " Load current = 3.75 A\n", + " Active power input = 833.1 W\n", + " Reactive power input = 223.23 vars\n", + " Appearent power input = 862.5 VA\n", + "\n", + "(c)\n", + " Vdc = 96.615 V\n", + " Average dc output current = 2.15 A\n" + ] + } + ], + "prompt_number": 147 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.26, Page No. 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # single phase fully controlled bridge converter with R-L load\n", + " \n", + "import math\n", + "#Variable declaration\n", + "V = 230 # input voltage\n", + "alfa = 30*math.pi/180 # firing angle\n", + "I = 10 # constant load current\n", + "\n", + "#Calculations\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vdc = math.floor((2*Vm*math.cos(alfa)/math.pi)*10)/10\n", + "#(b)\n", + "Irms = I\n", + "#(c)\n", + "Is = I\n", + "Is1 = 2*sqrt_2*I/math.pi\n", + "#(d)\n", + "DF = math.cos(-alfa)\n", + "#(e)\n", + "pf = math.floor((Is1*DF/Is)*1000)/1000\n", + "#(f)\n", + "HF = math.sqrt(((Is/Is1)**2)-1)\n", + "#(g)\n", + "FF = V/Vdc\n", + "RF = math.ceil((math.sqrt(FF**2-1))*1000)/1000\n", + "\n", + "#Result\n", + "print(\"(a) DC output voltage = %.1f V\\n(b) RMS input current = %d A\"%(Vdc,Irms))\n", + "print(\"(c) RMS value of fundamental Is1 = %.0f A\\n(d) Displacement factor = %.3f \"%(Is1,DF))\n", + "print(\"(e) Input power factor = %.3f lagging\\n(f) Harmonic factor = %.3f\\n(g) Form Factor = %.3f\\t\\tRipple Factor = %.3f\"%(pf,HF,FF,RF))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) DC output voltage = 179.3 V\n", + "(b) RMS input current = 10 A\n", + "(c) RMS value of fundamental Is1 = 9 A\n", + "(d) Displacement factor = 0.866 \n", + "(e) Input power factor = 0.779 lagging\n", + "(f) Harmonic factor = 0.484\n", + "(g) Form Factor = 1.283\t\tRipple Factor = 0.804\n" + ] + } + ], + "prompt_number": 165 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.27, Page No.166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Half controlled bridge converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "alfa = 60*math.pi/180 # firing angle\n", + "V = 240 # input voltage\n", + "R = 10 # Load current\n", + "\n", + "#Calculations\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vdc = Vm*(1+math.cos(alfa))/math.pi\n", + "#(b)\n", + "I = math.floor((Vdc/R)*1000)/1000\n", + "Is = I*(1-alfa/math.pi)**(0.5)\n", + "#(c)\n", + "Is1 = 2*sqrt_2*I*math.cos(alfa/2)/math.pi\n", + "fi = -alfa/2\n", + "DF =math.cos(fi)\n", + "pf = Is1*DF/Is\n", + "#(d)\n", + "P = I**2*R\n", + "\n", + "#Result\n", + "print(\"(a) Vdc = %.2f\\n(b) Load current = %.3f A\\n(c) Displacement factor = %.3f\\n Input power factor = %.3f\"%(Vdc,I,DF,pf))\n", + "print(\"(d) Average power dissipated in load = %.2f W\"%P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Vdc = 162.03\n", + "(b) Load current = 16.203 A\n", + "(c) Displacement factor = 0.866\n", + " Input power factor = 0.827\n", + "(d) Average power dissipated in load = 2625.37 W\n" + ] + } + ], + "prompt_number": 170 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.28, Page No. 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Fully controlled three-phase bridge rectifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "I = 200.0 # AC line current\n", + "Vac = 400.0 # AC line voltage\n", + "Vdc = 360.0 # DC voltage\n", + "var = 0.1 # 10% line volatge variation\n", + "\n", + "#Calculation\n", + "#(a)\n", + "alfa = math.acos(Vdc*math.pi*math.sqrt(3)/(3*math.sqrt(3)*Vac*math.sqrt(2)))*(180/math.pi)\n", + "#(b)\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "S = I*Vac*sqrt_3\n", + "P = S*math.ceil(math.cos(alfa*math.pi/180)*10000)/10000\n", + "Q = math.sqrt(S**2-P**2)\n", + "#(c)\n", + "Vac1 = (1+var)*Vac\n", + "alfa2 =math.acos(Vdc/(3*Vac1*math.sqrt(2)/math.pi))*180/math.pi\n", + "Vac2 = (1-var)*Vac\n", + "alfa3 =math.acos(Vdc/(3*Vac2*math.sqrt(2)/math.pi))*180/math.pi\n", + "\n", + "#Result\n", + "print(\"(a) firing angle = %.1f\u00b0\\n(b) P = %.1f W\\n Q = %.1f vars\"%(S,P,Q))\n", + "print(\"(c) When ac line voltage is %d V : alfa = %.1f\u00b0\\n When ac line voltage is %d V : alfa = %.1f\u00b0\"%(Vac1,alfa2,Vac2,alfa3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) firing angle = 138560.0\u00b0\n", + "(b) P = 92350.2 W\n", + " Q = 103297.2 vars\n", + "(c) When ac line voltage is 440 V : alfa = 52.7\u00b0\n", + " When ac line voltage is 360 V : alfa = 42.2\u00b0\n" + ] + } + ], + "prompt_number": 188 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.29, Page No.170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase full converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # 3-phase input voltage\n", + "I = 150.0 # Average load current\n", + "alfa = 60*math.pi/180 # firing angle\n", + "\n", + "\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((sqrt_2*V/sqrt_3)*100)/100\n", + "Vdc =269.23#3*math.sqrt(3)*Vm*math.cos(alfa)/math.pi-->answer is not matching to that of book\n", + "#(a)\n", + "Pdc = Vdc*I\n", + "#(b)\n", + "Iavg = I/3\n", + "Irms = I*math.sqrt(2.0/6)\n", + "Vp = math.sqrt(2)*V\n", + "\n", + "#Result\n", + "print(\"(a) Output power = %.1f W\\n(b)\\nAverage thyristor current = %d A\\nRMS value of thyristor current = %.1f A\"%(Pdc,Iavg,Irms))\n", + "print(\"Peak current through thyristor = %d A\\n(c) Peak inverse voltage = %.1f V\"%(I,math.floor(Vp*10)/10))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output power = 40384.5 W\n", + "(b)\n", + "Average thyristor current = 50 A\n", + "RMS value of thyristor current = 86.6 A\n", + "Peak current through thyristor = 150 A\n", + "(c) Peak inverse voltage = 565.6 V\n" + ] + } + ], + "prompt_number": 258 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.30, Page No.170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase fully controlled bridge converter\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 400.0 # line to line input voltage\n", + "R = 100.0 # load resistance\n", + "P = 400.0 # power supplied to load\n", + "\n", + "#Calculations\n", + "Vrms = math.sqrt(V*R)\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((sqrt_2*V/sqrt_3)*100)/100\n", + "#(a)\n", + "alfa = math.acos((((Vrms/(sqrt_3*Vm))**2)-0.5)*(4*math.pi/(3*sqrt_3)))\n", + "alfa= (alfa/2)*(180/math.pi)\n", + "#(b)\n", + "I = math.sqrt(V/R)\n", + "Is = math.floor(math.sqrt(2*120.0/180.0)*100)/100\n", + "#(c)\n", + "app_i=sqrt_3*V*Is\n", + "#(d)\n", + "pf = V/app_i\n", + "\n", + "#Result\n", + "print(\"(a) alfa = %.1f\u00b0\\n(b) RMS value of input current = %.2f A\"%(alfa,Is))\n", + "print(\"(c) Input apparent power = %.2f VA\\n(d) power factor = %.1f lagging\"%(app_i,pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) alfa = 77.5\u00b0\n", + "(b) RMS value of input current = 1.15 A\n", + "(c) Input apparent power = 796.72 VA\n", + "(d) power factor = 0.5 lagging\n" + ] + } + ], + "prompt_number": 276 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.31, Page No.171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# six pulse thyristor converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vac = 415.0 # input AC voltage\n", + "Vdc = 460.0 # DC output voltage\n", + "I = 200.0 # load current\n", + "\n", + "#Calculation\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "#(a)\n", + "Vm = math.floor((sqrt_2*Vac/sqrt_3)*10)/10\n", + "alfa =math.ceil((Vdc*math.pi/(Vm*3*sqrt_3))*1000)/1000\n", + "alfa = math.acos(alfa)*(180/math.pi)\n", + "#(b)\n", + "P = Vdc*I\n", + "#(c)\n", + "Iac = I*(120.0/180.0)**(0.5)\n", + "#(d)\n", + "Irms =I*(120.0/360.0)**(0.5)\n", + "#(e)\n", + "Iavg =math.floor(I*100/3)/100\n", + "\n", + "#Result\n", + "print(\"(a) alfa = %.2f\u00b0\\n(b) DC power = %d kW\\n(c) AC line current = %.1f A\"%(alfa,P/1000,Iac))\n", + "print(\"(d) RMS thyristor current = %.1f A\\n(e) Average thyristor current = %.2f A\"%(Irms,Iavg))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) alfa = 34.81\u00b0\n", + "(b) DC power = 92 kW\n", + "(c) AC line current = 163.3 A\n", + "(d) RMS thyristor current = 115.5 A\n", + "(e) Average thyristor current = 66.66 A\n" + ] + } + ], + "prompt_number": 294 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.32, Page No. 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Firing angle and input power factor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "E = 200.0 # battery emf\n", + "R = 0.5 # battery internal resistance\n", + "I = 20.0 # current\n", + "\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "#(a)\n", + "Vm = math.floor((sqrt_2*V/sqrt_3)*10)/10\n", + "Vdc = E+I*R\n", + "pi = math.floor(math.pi*1000)/1000\n", + "alfa =Vdc*pi/(Vm*3*sqrt_3)\n", + "alfa = math.acos(alfa)*(180/math.pi)\n", + "alfa = math.ceil(alfa*100)/100\n", + "P = (E*I)+(I**2*R)\n", + "Is = ((I**2)*120.0/180.0)**(0.5)\n", + "pf = P/(sqrt_3*V*Is)\n", + "\n", + "#Result\n", + "print(\"Firing angle = %.2f\u00b0\\nInput power factor = %.3f lagging\"%(alfa,pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 47.45\u00b0\n", + "Input power factor = 0.646 lagging\n" + ] + } + ], + "prompt_number": 336 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.33, Page No.175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase semi-converter bridge circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # input voltage\n", + "R = 10.0 # load resistance\n", + "\n", + "\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n", + "#(a)\n", + "alfa = (math.pi)/3 #as load current continuous\n", + "Vdc1 = 3*1.7267*Vm*(1+math.cos(alfa))/(2*math.pi)#To match the answer to book's ans\n", + "Vdc1 = math.floor(Vdc1*100)/100 \n", + "Vmax = 3*1.7267*Vm*(1+math.cos(0))/(2*math.pi)\n", + "Vmax = math.floor(Vmax*100)/100\n", + "Vdc = Vmax/2\n", + "alfa2 = math.acos((Vdc*2*math.pi/(3*sqrt_3*Vm))-1)\n", + "#(b)\n", + "Idc = Vdc/R\n", + "#(c)\n", + "Vrms = sqrt_3*Vm*((3.0/(4*math.pi))*(math.pi-alfa2+(math.sin(2*alfa2))/2.0))**(0.5)\n", + "Vrms = 345.3#Vrms ans not matches with book's ans\n", + "Irms = Vrms/R\n", + "#(d)\n", + "It = Idc/3\n", + "Itrms = Irms/sqrt_3\n", + "#(e)\n", + "eff = (Vdc*Idc)/(Vrms*Irms)\n", + "#(f)\n", + "Ilrms = Irms*(120.0/180.0)**(0.5)\n", + "VA = Ilrms*V*3/sqrt_3\n", + "TUF = (Vdc*Idc)/(VA)\n", + "#(g)\n", + "APO = Irms**2*R\n", + "pf = APO/VA\n", + "\n", + "#Result\n", + "print(\"(a) Firing angle = %.0f\u00b0\\n(b) Vdc = %.3fV\\n Idc = %.2f A\\n(c) Vrms = %.1f V\\tIrms = %.2f A\"%(alfa2*180/math.pi,Vdc,Idc,Vrms,Irms))\n", + "print(\"(d) Average thyristor current = %.2f A\\t RMS thyristor current = %.2f A\"%(It,Itrms))\n", + "print(\"(e) rectification efficiency = %.3f or %.1f%%\\n(f) TUF = %.2f\\n(g) Input power factor = %.2f lagging\"%(eff,eff*100,TUF,pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Firing angle = 90\u00b0\n", + "(b) Vdc = 269.225V\n", + " Idc = 26.92 A\n", + "(c) Vrms = 345.3 V\tIrms = 34.53 A\n", + "(d) Average thyristor current = 8.97 A\t RMS thyristor current = 19.94 A\n", + "(e) rectification efficiency = 0.608 or 60.8%\n", + "(f) TUF = 0.37\n", + "(g) Input power factor = 0.61 lagging\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.34, Page No.176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase fully controlled bridge converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # input voltage\n", + "R = 10.0 # load resistance\n", + "\n", + "\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n", + "#(a)\n", + "alfa = (math.pi)/3 #as load current continuous\n", + "Vdc = 3*1.7267*Vm*(math.cos(alfa))/(math.pi)#To match the answer to book's ans\n", + "Vdc = math.ceil(Vdc*100)/100 \n", + "#(b)\n", + "Idc = Vdc/R\n", + "#(c)\n", + "Vrms = sqrt_3*Vm*(0.5+((3*1.7321*math.cos(2*alfa))/(4*math.pi)))**(0.5)\n", + "Vrms = 305.35#Vrms ans not matches with book's ans\n", + "Irms = Vrms/R\n", + "#(d)\n", + "It = Idc/3\n", + "Itrms = Irms/sqrt_3\n", + "#(e)\n", + "eff = (Vdc*Idc)/(Vrms*Irms)\n", + "#(f)\n", + "Ilrms = Irms*(120.0/180.0)**(0.5)\n", + "VA = Ilrms*V*3/sqrt_3\n", + "TUF = math.floor(((Vdc*Idc)/(VA))*1000)/1000\n", + "#(g)\n", + "APO = Irms**2*R\n", + "pf = APO/VA\n", + "\n", + "#Result\n", + "print(\"(a) Vdc = %.2fV\\n(b) Idc = %.2f A\\n(c) Vrms = %.2f V\\tIrms = %.2f A\"%(Vdc,Idc,Vrms,Irms))\n", + "print(\"(d) Average thyristor current = %.2f A\\t RMS thyristor current = %.2f A\"%(It,Itrms))\n", + "print(\"(e) rectification efficiency = %.3f or %.1f%%\\n(f) TUF = %.3f\\n(g) Input power factor = %.2f lagging\"%(eff,eff*100,TUF,pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Vdc = 269.23V\n", + "(b) Idc = 26.92 A\n", + "(c) Vrms = 305.35 V\tIrms = 30.54 A\n", + "(d) Average thyristor current = 8.97 A\t RMS thyristor current = 17.63 A\n", + "(e) rectification efficiency = 0.777 or 77.7%\n", + "(f) TUF = 0.419\n", + "(g) Input power factor = 0.54 lagging\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.34, Page No.177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical Example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical Example\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.35, Page No.179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical Example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical Example\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.37, Page No. 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Firing angle of converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # input voltage\n", + "E = 300.0 # back emf of the motor\n", + "\n", + "#Calculations\n", + "Vm = math.sqrt(2)*V\n", + "alfa = math.acos(E*2*math.pi/(3*math.sqrt(3)*Vm))\n", + "alfa = alfa*(180/math.pi)\n", + "\n", + "#Result\n", + "print(\"Firing angle, alfa = %.1f\u00b0\"%alfa)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle, alfa = 50.1\u00b0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.38, Page No.183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Overlap angle\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # input voltage\n", + "f = 50 # input frequency\n", + "I = 200.0 # load current\n", + "L = 0.2 *10**-3 # Source inductance\n", + "alfa1 = 20*math.pi/180 # firing angle for case 1\n", + "alfa2 = 30*math.pi/180 # firing angle for case 2\n", + "alfa3 = 60*math.pi/180 # firing angle for case 3\n", + "\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n", + "E = 3*2*math.pi*f*L*I/math.pi\n", + "Vo = 3*sqrt_3*Vm/math.pi\n", + "#(a)\n", + "mu1 = math.acos((Vo*math.cos(alfa1)-E)/Vo)-alfa1\n", + "mu1 = mu1*180/math.pi\n", + "mu1 = math.ceil(mu1*10)/10\n", + "#(b)\n", + "mu2 = math.acos((Vo*math.cos(alfa2)-E)/Vo)-alfa2\n", + "mu2 = mu2*180/math.pi\n", + "#(a)\n", + "mu3 = math.acos((Vo*math.cos(alfa3)-E)/Vo)-alfa3\n", + "mu3 = mu3*180/math.pi\n", + "\n", + "#Result\n", + "print(\"(a) for alfa = %.0f\u00b0:\\n\\t mu = %.1f\u00b0\"%(alfa1*180/math.pi,mu1))\n", + "print(\"\\n(b) for alfa = %.0f\u00b0:\\n\\t mu = %.2f\u00b0\"%(alfa2*180/math.pi,mu2))\n", + "print(\"\\n(c) for alfa = %.0f\u00b0:\\n\\t mu = %.2f\u00b0\"%(alfa3*180/math.pi,mu3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) for alfa = 20\u00b0:\n", + "\t mu = 3.5\u00b0\n", + "\n", + "(b) for alfa = 30\u00b0:\n", + "\t mu = 2.46\u00b0\n", + "\n", + "(c) for alfa = 60\u00b0:\n", + "\t mu = 1.46\u00b0\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.39, Page No.188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# peak circulating current and peak current of converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # Input voltage\n", + "f = 50 # frequency\n", + "R = 15 # load resistance\n", + "a1 = 60*math.pi/180 # firing angle 1\n", + "a2 = 120*math.pi/180 # firing angle 2\n", + "L = 50*10**-3 # inductance\n", + "\n", + "#Variable declaration\n", + "Vm = math.sqrt(2)*V\n", + "w = 2*math.pi*f\n", + "wl = w*L\n", + "wt = 2*math.pi\n", + "ir = 2*Vm*(math.cos(wt)-math.cos(a1))/wl\n", + "ir = math.floor(ir*10)/10\n", + "Ip = Vm/R\n", + "I = ir+Ip\n", + "\n", + "#Result\n", + "print(\"Peak circulating current = %.1f A\\nPeak current of converter 1 = %.2f A\"%(ir,I))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak circulating current = 20.7 A\n", + "Peak current of converter 1 = 42.38 A\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.40, Page No. 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# single phase circulating current dualconverter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50 # frequency\n", + "a1 = 30*math.pi/180 # firing angle 1\n", + "a2 = 150*math.pi/180 # firing angle 2 \n", + "R = 10 # Load resistance\n", + "I = 10.2 # Peak current\n", + "\n", + "#Calculation\n", + "#(a)\n", + "Vm = math.sqrt(2)*V\n", + "w = 2*math.pi*f\n", + "wt = 2*math.pi\n", + "L = 2*Vm*(math.cos(wt)-math.cos(a1))/(w*I)\n", + "#(b)\n", + "Ip = Vm/R\n", + "I1 = math.floor((I+Ip)*100)/100\n", + "\n", + "#Result\n", + "print(\"L = %.4f H\\npeak current of converter 1 = %.2f A\"%(L,I1))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L = 0.0272 H\n", + "peak current of converter 1 = 42.72 A\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.41, Page No.188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# single phase circulating current dualconverter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "f = 50 # frequency\n", + "a1 = 45*math.pi/180 # firing angle 1\n", + "a2 = 135*math.pi/180 # firing angle 2 \n", + "I = 39.7 # Peak current of converter\n", + "Ic = 11.5 # peak circulating current \n", + "#Calculation\n", + "#(a)\n", + "Vm = math.sqrt(2)*V\n", + "Vm = math.floor(Vm*10)/10\n", + "w = 2*math.pi*f\n", + "wt = 2*math.pi\n", + "x = math.floor(math.cos(a1)*1000)/1000\n", + "L = 2*Vm*(math.cos(wt)-x)/(w*Ic)\n", + "#(b)\n", + "Ip = I-Ic\n", + "R = Vm/Ip\n", + "\n", + "#Result\n", + "print(\"L = %.4f H\\nR = %.3f Ohm\"%(L,R))\n", + "#answer for L is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L = 0.0527 H\n", + "R = 11.532 Ohm\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.42, Page No. 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase dual converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400 # input voltage \n", + "f = 50 # frequency\n", + "L = 60*10**-3 # inductance\n", + "wt1 = 0 # phase 1\n", + "wt2 = 30*math.pi/180 # phase 2\n", + "wt3 = 90*math.pi/180 # phase 3 \n", + "alfa = 0 # firing angle\n", + "\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n", + "wl = 2*math.pi*f*L\n", + "ir1 = 3*Vm*(math.sin(wt1-wt2)-math.sin(alfa))/wl\n", + "ir2 = 3*Vm*(math.sin(wt2-wt2)-math.sin(alfa))/wl\n", + "ir3 = 3*Vm*(math.sin(wt3-wt2)-math.sin(alfa))/wl\n", + "ir4 = 3*Vm*(math.sin(wt3)-math.sin(alfa))/wl\n", + "\n", + "#Result\n", + "print(\"For wt = %.0f anf alfa = %d, ir = %.3f A\"%(wt1*180/math.pi,alfa,ir1))\n", + "print(\"For wt = %.0f anf alfa = %d, ir = %.0f A\"%(wt2*180/math.pi,alfa,ir2))\n", + "print(\"For wt = %.0f anf alfa = %d, ir = %.0f A\"%(wt3*180/math.pi,alfa,ir3))\n", + "print(\"Peak value of circulaing current, ir = %.2f A\"%(ir4))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For wt = 0 anf alfa = 0, ir = -25.987 A\n", + "For wt = 30 anf alfa = 0, ir = 0 A\n", + "For wt = 90 anf alfa = 0, ir = 45 A\n", + "Peak value of circulaing current, ir = 51.97 A\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 3.43, Page No.191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase circulating current dual converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 #input voltage\n", + "f = 50.0 # frequency\n", + "I = 42.0 # peak value of circulating current\n", + "alfa = 0 # firing angle\n", + "a1 = 30*math.pi/180 #\n", + "wt = 120*math.pi/180 # wt for max current\n", + "#Calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n", + "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n", + "w = 2*math.pi*f\n", + "L = 3*Vm*(math.sin(wt-a1)-math.sin(alfa))/(w*I)\n", + "\n", + "#Result\n", + "print(\"L = %.3f H\"%L)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L = 0.074 H\n" + ] + } + ], + "prompt_number": 63 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb new file mode 100755 index 00000000..c5ad12df --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb @@ -0,0 +1,983 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Inverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.1, Page No.205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Maximum output frequency\n", + "\n", + "import math\n", + "#Variable declaration\n", + "R = 80.0 # serries inverter resistance\n", + "L = 8*10**-3 # serries inverter inductance\n", + "C = 1.2*10**-6 # serries inverter capacitance\n", + "\n", + "#Calculations\n", + "X =(4*L)/C\n", + "f = math.sqrt((1/(L*C))-((R**2)/(4*L**2)))\n", + "f = math.ceil(f)\n", + "#Result\n", + "print(\"R^2 = %.0f\\n4L/C = %.0f\"%(R*R,X))\n", + "print(\"Since (R^2)<(4L/C), circuit is underdamped and it will work as a series inverter.\")\n", + "print(\"\\nMaximum frequency = %.4f*10^4 rad/sec or %.2f Hz\"%(f/10000,f/(2*math.pi)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R^2 = 6400\n", + "4L/C = 26667\n", + "Since (R^2)<(4L/C), circuit is underdamped and it will work as a series inverter.\n", + "\n", + "Maximum frequency = 0.8898*10^4 rad/sec or 1416.16 Hz\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.2, Page No. 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output frequency(refering example 4.1)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "R = 80.0 # serries inverter resistance\n", + "L = 8*10**-3 # serries inverter inductance\n", + "C = 1.2*10**-6 # serries inverter capacitance\n", + "t = 14*10**-6 # turn off time of thyristor\n", + "Fmax = 1416.16 # frequency as calculated in ex 4.1\n", + "\n", + "#Calculation\n", + "T =1/Fmax\n", + "T = math.floor(T*10**6)/10**6\n", + "k = 1/0.000734\n", + "f =1/(T+2*t)\n", + "\n", + "#Result\n", + "print(\"frequency = %.1f Hz\"%f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency = 1362.4 Hz\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.3, Page No.205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# circuit turn off time and max frequency\n", + "\n", + "import math\n", + "#Variable declaration\n", + "L = 50.0*10**-6 # Inductance\n", + "C = 6.0*10**-6 # capacitance\n", + "R = 4.0 # Resistance\n", + "V = 200.0 # input voltage\n", + "f = 6000.0 # output frequency\n", + "t = 6.0*10**-6 # SCR turn off time\n", + "\n", + "#calculations\n", + "x = 4*L/C\n", + "wr = math.sqrt((1/(L*C))-((R**2)/(4*L**2)))\n", + "wr = math.floor(wr*10)/10\n", + "fr = wr/(2*math.pi)\n", + "#(a)\n", + "x1 = math.pi/wr\n", + "x1= math.floor(x1*10**7)/10**7\n", + "toff = (math.pi/(2*math.pi*f))-(x1)\n", + "#(b)\n", + "fmax = 1/(2*((x1)+t))\n", + "\n", + "#result\n", + "print(\"(a) Available circuit turn off time = %.2f micro-sec\\n(b) fmax = %.1f Hz\"%(toff*10**6,fmax))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Available circuit turn off time = 7.93 micro-sec\n", + "(b) fmax = 6142.5 Hz\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.4, Page No. 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# thyristor ratings\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 40.0 # input DC voltage\n", + "Vo = 230.0 # output voltage\n", + "f = 50.0 # output frequency\n", + "Il = 2.0 # peak load current\n", + "t = 50.0*10**-6 # turn off time\n", + "\n", + "#calculations\n", + "Il_r = Vo*2/V\n", + "#after solving (i),(ii)\n", + "C=((t*3/math.pi)**2)*(((2*Vo)/(V**2))**2)\n", + "C = math.sqrt(C)\n", + "C = math.ceil(C*10**8)/10**8\n", + "L = ((t*3/math.pi)**2)/C\n", + "# OR\n", + "#L= C/(((2*Vo)/(V**2))**2)\n", + "\n", + "#Result\n", + "print(\"L = %.2f *10^-6 H\\nC = %.2f *10^-6 F\"%(L*10**6,C*10**6))\n", + "print(\"\\nFinal SCR rating is 100V,20A, turn off time 50 micro-sec\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L = 166.04 *10^-6 H\n", + "C = 13.73 *10^-6 F\n", + "\n", + "Final SCR rating is 100V,20A, turn off time 50 micro-sec\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.5, Page No. 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Single phase half bridge inverter\n", + "\n", + "import math\n", + "# variable declaration\n", + "R = 3.0 # load resistance\n", + "V = 30.0 # input DC voltage\n", + "\n", + "#Calculations\n", + "#(a) for n=1;\n", + "V1rms = 2*V/(math.sqrt(2)*math.pi)\n", + "#(b)\n", + "Vl = V/2\n", + "P = (Vl**2)/R\n", + "#(c)\n", + "Ip = Vl/R\n", + "#(d)\n", + "Iavg = Ip/2\n", + "#(e)\n", + "Vr = 2*Vl\n", + "\n", + "#Result\n", + "print(\"(a) RMS value V1 = %.1f V\\n(b) Output power = %.0f W\\n(c) Peak current in each thyristor = %.0f A\"%(V1rms,P,Ip))\n", + "print(\"(d)Each thyristor conducts for 50%% of time,\\n Average current = %.1f A\"%(Iavg))\n", + "print(\"(e) Peak reverse blocking voltage = %.0f V\"%Vr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value V1 = 13.5 V\n", + "(b) Output power = 75 W\n", + "(c) Peak current in each thyristor = 5 A\n", + "(d)Each thyristor conducts for 50% of time,\n", + " Average current = 2.5 A\n", + "(e) Peak reverse blocking voltage = 30 V\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.6, Page No. 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# full bridge inverter\n", + "\n", + "import math\n", + "# variable declaration\n", + "R = 3.0 # load resistance\n", + "V = 30.0 # input DC voltage\n", + "\n", + "#Calculations\n", + "#(a) for n=1;\n", + "V1rms = 4*V/(math.sqrt(2)*math.pi)\n", + "#(b)\n", + "Vl = V\n", + "P = (Vl**2)/R\n", + "#(c)\n", + "Ip = Vl/R\n", + "#(d)\n", + "Iavg = Ip/2\n", + "#(e)\n", + "Vr = Vl\n", + "\n", + "#Result\n", + "print(\"(a) RMS value V1 = %.1f V\\n(b) Output power = %.0f W\\n(c) Peak current in each thyristor = %.0f A\"%(V1rms,P,Ip))\n", + "print(\"(d)Each thyristor conducts for 50%% of time,\\n Average current = %.1f A\"%(Iavg))\n", + "print(\"(e) Peak reverse blocking voltage = %.0f V\"%Vr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value V1 = 27.0 V\n", + "(b) Output power = 300 W\n", + "(c) Peak current in each thyristor = 10 A\n", + "(d)Each thyristor conducts for 50% of time,\n", + " Average current = 5.0 A\n", + "(e) Peak reverse blocking voltage = 30 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.7, Page No. 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Full bridge inverter circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 200.0 # input voltage\n", + "R = 10.0 # resistance\n", + "L = 20.0*10**-3 # Inductance\n", + "C = 100.0*10**-6 # capacitance\n", + "f = 50.0 # inverter frequency\n", + "\n", + "#(a)\n", + "Z1_r = R\n", + "Z1_i = (2*math.pi*f*L)-(1/(2*math.pi*f*C))\n", + "Z1_i = math.floor(Z1_i*100)/100\n", + "Z1_mag = math.sqrt((Z1_r**2) + (Z1_i**2)) \n", + "Z1_angle =math.atan(Z1_i/Z1_r)*(180/math.pi) \n", + "Z1_angle = math.floor(Z1_angle*100)/100\n", + "\n", + "Z3_r = R\n", + "Z3_i = (3*2*math.pi*f*L)-(1/(3*2*math.pi*f*C))\n", + "Z3_i = math.floor(Z3_i*100)/100\n", + "Z3_mag = math.sqrt((Z3_r**2) + (Z3_i**2)) \n", + "Z3_angle =math.atan(Z3_i/Z3_r)*(180/math.pi) \n", + "Z3_angle = math.floor(Z3_angle*100)/100\n", + "\n", + "Z5_r = R\n", + "Z5_i = (5*2*math.pi*f*L)-(1/(5*2*math.pi*f*C))\n", + "Z5_i = math.floor(Z5_i*100)/100\n", + "Z5_mag = math.sqrt((Z5_r**2) + (Z5_i**2)) \n", + "Z5_angle =math.atan(Z5_i/Z5_r)*(180/math.pi) \n", + "#Z5_angle = math.floor(Z5_angle*100)/100\n", + "\n", + "Z7_r = R\n", + "Z7_i = (7*2*math.pi*f*L)-(1/(7*2*math.pi*f*C))\n", + "Z7_i = math.floor(Z7_i*100)/100\n", + "Z7_mag = math.sqrt((Z7_r**2) + (Z7_i**2)) \n", + "Z7_angle =math.atan(Z7_i/Z7_r)*(180/math.pi) \n", + "Z7_angle = math.floor(Z7_angle*100)/100\n", + "\n", + "Z9_r = R\n", + "Z9_i = (9*2*math.pi*f*L)-(1/(9*2*math.pi*f*C))\n", + "Z9_i = math.floor(Z9_i*100)/100\n", + "Z9_mag = math.sqrt((Z9_r**2) + (Z9_i**2)) \n", + "Z9_angle =math.atan(Z9_i/Z9_r)*(180/math.pi) \n", + "Z9_angle = math.floor(Z9_angle*100)/100\n", + "\n", + "x = 4*V/(math.pi)\n", + "w = 2*math.pi*f\n", + "\n", + "#(b)\n", + "I1 = math.floor(x*100/Z1_mag)/100\n", + "I3 = math.floor(x*100/(3*Z3_mag))/100\n", + "I5 = math.ceil(x*100/(5*Z5_mag))/100\n", + "I7 = math.ceil(x*1000/(7*Z7_mag))/1000\n", + "I9 = math.ceil(x*1000/(9*Z9_mag))/1000\n", + "If = I1/math.sqrt(2)\n", + "If = math.floor(If*100)/100\n", + "#(c)\n", + "Ip =math.sqrt(I1**2+I3**2+I5**2+I7**2+I9**2)\n", + "#(d)\n", + "Ihc = math.sqrt(Ip**2- I1**2)/math.sqrt(2)\n", + "Thd = math.sqrt(Ip**2- I1**2)/I1\n", + "#(e)\n", + "Ilrms = Ip/math.sqrt(2)\n", + "P = R*Ilrms**2\n", + "Pf = R*If**2\n", + "#(f)\n", + "Iavg = P/V\n", + "\n", + "#Result\n", + "print(\"(a)\\nZ1 = %.3f < %.2f\u00b0\"%(Z1_mag,Z1_angle))\n", + "print(\"Z3 = %.2f < %.2f\u00b0\"%(Z3_mag,Z3_angle))\n", + "print(\"Z5 = %.2f < %.2f\u00b0\"%(Z5_mag,Z5_angle))\n", + "print(\"Z7 = %.2f < %.2f\u00b0\"%(Z7_mag,Z7_angle))\n", + "print(\"Z9 = %.2f < %.2f\u00b0\"%(Z9_mag,Z9_angle))\n", + "print(\"Vl = %.2fsin(%.2ft)+%.2fsin(3*%.2ft)+%.2fsin(5*%.2ft)+%.2fsin(7*%.2ft)+%.2fsin(9*%.2ft)\"%(x,w,x/3,w,x/5,w,x/7,w,x/9,w))\n", + "print(\"Il = %.2fsin(%.2ft%.2f\u00b0)+%.2fsin(3*%.2ft-%.2f\u00b0)+%.2fsin(5*%.2ft-%.2f\u00b0)+%.3fsin(7*%.2ft-%.2f\u00b0)+%.3fsin(9*%.2ft-%.2f\u00b0)\"%(I1,w,Z1_angle,I3,w,Z3_angle,I5,w,Z5_angle,I7,w,Z7_angle,I9,w,Z9_angle))\n", + "\n", + "print(\"\\n(b) RMS load current at fundamental frequency = %.2f A\"%If)\n", + "print(\"\\n(c) Peak value of load current = %.2f A\"%Ip)\n", + "print(\"\\n(d) RMS harmonic current = %.3f A\\n Total harmonic distortion = %.3f or %.1f%%\"%(Ihc,Thd,Thd*100))\n", + "print(\"\\n(e) RMS value of load current = %.3f A\\n Total output power = %.1f W\\n Fundamental component of power = %.3f W\"%(Ilrms,P,Pf))\n", + "print(\"\\n(f) Average input current = %.4f A\\n Peak thyristor current = %.2f A\"%(Iavg,Ip))\n", + "#Some values are accurate only upto 1 or 2 decimal places" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Z1 = 27.437 < -68.63\u00b0\n", + "Z3 = 12.95 < 39.45\u00b0\n", + "Z5 = 26.96 < 68.23\u00b0\n", + "Z7 = 40.68 < 75.76\u00b0\n", + "Z9 = 53.94 < 79.31\u00b0\n", + "Vl = 254.65sin(314.16t)+84.88sin(3*314.16t)+50.93sin(5*314.16t)+36.38sin(7*314.16t)+28.29sin(9*314.16t)\n", + "Il = 9.28sin(314.16t-68.63\u00b0)+6.55sin(3*314.16t-39.45\u00b0)+1.89sin(5*314.16t-68.23\u00b0)+0.895sin(7*314.16t-75.76\u00b0)+0.525sin(9*314.16t-79.31\u00b0)\n", + "\n", + "(b) RMS load current at fundamental frequency = 6.56 A\n", + "\n", + "(c) Peak value of load current = 11.56 A\n", + "\n", + "(d) RMS harmonic current = 4.876 A\n", + " Total harmonic distortion = 0.743 or 74.3%\n", + "\n", + "(e) RMS value of load current = 8.175 A\n", + " Total output power = 668.3 W\n", + " Fundamental component of power = 430.336 W\n", + "\n", + "(f) Average input current = 3.3417 A\n", + " Peak thyristor current = 11.56 A\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.8, Page No. 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Value of C for proper load communication\n", + "\n", + "import math\n", + "#variable declaration\n", + "R = 2 # resistance\n", + "Xl = 10 # inductive reactance\n", + "f = 4*10**3 # operating frequency\n", + "T = 12*10**-6 # turn off time of thyristor\n", + "tol = 1.5 # 50% tolerance in circuit turn off time\n", + "\n", + "#Calculations\n", + "T = T*tol\n", + "theta = 2*math.pi*f*T #radians\n", + "#theta = theta*180/math.pi\n", + "Xc = 2*math.tan(theta)+Xl\n", + "C = 1/(Xc*2*math.pi*f)\n", + "\n", + "#Result\n", + "print(\"C = %.2f*10^-6 F\"%(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 3.63*10^-6 F\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.9, Page No. 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Full bridge inverter\n", + "\n", + "import math\n", + "#variable declaratrion\n", + "R = 10 # resistance\n", + "L = 50*10**-3 # inductance\n", + "f = 50 # frequency\n", + "V = 100 # input voltage\n", + "\n", + "#Calculation \n", + "\n", + "#(a)\n", + "Z1_r = R\n", + "Z1_i = (2*math.pi*f*L)\n", + "Z1_i = math.floor(Z1_i*100)/100\n", + "Z1_mag = math.sqrt((Z1_r**2) + (Z1_i**2)) \n", + "Z1_mag = math.ceil(Z1_mag*100)/100\n", + "Z1_angle =math.atan(Z1_i/Z1_r)*(180/math.pi) \n", + "Z1_angle = math.floor(Z1_angle*100)/100\n", + "\n", + "Z3_r = R\n", + "Z3_i = (3*2*math.pi*f*L)\n", + "Z3_i = math.floor(Z3_i*100)/100\n", + "Z3_mag = math.sqrt((Z3_r**2) + (Z3_i**2)) \n", + "Z3_angle =math.atan(Z3_i/Z3_r)*(180/math.pi) \n", + "Z3_angle = math.floor(Z3_angle*100)/100\n", + "\n", + "Z5_r = R\n", + "Z5_i = (5*2*math.pi*f*L)\n", + "Z5_i = math.floor(Z5_i*100)/100\n", + "Z5_mag = math.sqrt((Z5_r**2) + (Z5_i**2)) \n", + "Z5_mag = math.ceil(Z5_mag*100)/100\n", + "Z5_angle =math.atan(Z5_i/Z5_r)*(180/math.pi) \n", + "Z5_angle = math.ceil(Z5_angle*100)/100\n", + "\n", + "Z7_r = R\n", + "Z7_i = (7*2*math.pi*f*L)\n", + "Z7_i = math.floor(Z7_i*100)/100\n", + "Z7_mag = math.sqrt((Z7_r**2) + (Z7_i**2)) \n", + "Z7_mag = math.ceil(Z7_mag*100)/100\n", + "Z7_angle =math.atan(Z7_i/Z7_r)*(180/math.pi) \n", + "Z7_angle = math.floor(Z7_angle*100)/100\n", + "\n", + "x = 4*V/(math.pi)\n", + "w = 2*math.pi*f\n", + "#(b)\n", + "I1 = math.ceil(x*100/Z1_mag)/100\n", + "I3 = math.floor(x*1000/(3*Z3_mag))/1000\n", + "I5 = math.floor(x*100/(5*Z5_mag))/100\n", + "I7 = math.ceil(x*1000/(7*Z7_mag))/1000\n", + "\n", + "Ip =math.sqrt(I1**2+I3**2+I5**2+I7**2)\n", + "\n", + "#Result\n", + "print(\"Vl = %.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)\"%(x,w,x/3,3*w,x/5,5*w,x/7,7*w))\n", + "\n", + "print(\"\\nLoad impedances for various harmonics are:\")\n", + "print(\"Z1 = %.2f < %.1f\u00b0\"%(Z1_mag,Z1_angle))\n", + "print(\"Z3 = %.2f < %.0f\u00b0\"%(Z3_mag,Z3_angle))\n", + "print(\"Z5 = %.2f < %.2f\u00b0\"%(Z5_mag,Z5_angle))\n", + "print(\"Z7 = %.2f < %.2f\u00b0\"%(Z7_mag,Z7_angle))\n", + "\n", + "print(\"\\nIl = %.2fsin(%.2ft-%.1f\u00b0)+%.3fsin(%.2ft-%.0f\u00b0)+%.2fsin(%.2ft-%.2f\u00b0)+%.3fsin(%.2ft-%.1f\u00b0)\"%(I1,w,Z1_angle,I3,3*w,Z3_angle,I5,5*w,Z5_angle,I7,7*w,Z7_angle))\n", + "\n", + "print(\"\\nPeak load current = %.2f A\"%Ip)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = 127.32sin(314.16t)+42.44sin(942.48t)+25.46sin(1570.80t)+18.19sin(2199.11t)\n", + "\n", + "Load impedances for various harmonics are:\n", + "Z1 = 18.62 < 57.5\u00b0\n", + "Z3 = 48.17 < 78\u00b0\n", + "Z5 = 79.17 < 82.75\u00b0\n", + "Z7 = 110.41 < 84.80\u00b0\n", + "\n", + "Il = 6.84sin(314.16t-57.5\u00b0)+0.881sin(942.48t-78\u00b0)+0.32sin(1570.80t-82.75\u00b0)+0.165sin(2199.11t-84.8\u00b0)\n", + "\n", + "Peak load current = 6.91 A\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.10, Page No. 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# single phase Full bridge inverter\n", + "\n", + "import math\n", + "#variable declaratrion\n", + "R = 20 # resistance\n", + "L = 10*10**-3 # inductance\n", + "f = 50.0 # frequency\n", + "V = 100 # input voltage\n", + "\n", + "#Calculation \n", + "#(a)\n", + "Vrms = V\n", + "#(b)\n", + "Z1_r = R\n", + "Z1_i = (2*math.pi*f*L)\n", + "Z1_i = math.floor(Z1_i*100)/100\n", + "Z1_mag = math.sqrt((Z1_r**2) + (Z1_i**2)) \n", + "Z1_mag = math.floor(Z1_mag*100)/100\n", + "Z1_angle =math.atan(Z1_i/Z1_r)*(180/math.pi) \n", + "Z1_angle = math.floor(Z1_angle*100)/100\n", + "\n", + "Z3_r = R\n", + "Z3_i = (3*2*math.pi*f*L)\n", + "Z3_i = math.floor(Z3_i*100)/100\n", + "Z3_mag = math.sqrt((Z3_r**2) + (Z3_i**2)) \n", + "Z3_angle =math.atan(Z3_i/Z3_r)*(180/math.pi) \n", + "Z3_angle = math.floor(Z3_angle*100)/100\n", + "\n", + "Z5_r = R\n", + "Z5_i = (5*2*math.pi*f*L)\n", + "Z5_i = math.floor(Z5_i*100)/100\n", + "Z5_mag = math.sqrt((Z5_r**2) + (Z5_i**2)) \n", + "Z5_mag = math.ceil(Z5_mag*100)/100\n", + "Z5_angle =math.atan(Z5_i/Z5_r)*(180/math.pi) \n", + "Z5_angle = math.floor(Z5_angle*100)/100\n", + "\n", + "Z7_r = R\n", + "Z7_i = (7*2*math.pi*f*L)\n", + "Z7_i = math.floor(Z7_i*100)/100\n", + "Z7_mag = math.sqrt((Z7_r**2) + (Z7_i**2)) \n", + "Z7_mag = math.floor(Z7_mag*100)/100\n", + "Z7_angle =math.atan(Z7_i/Z7_r)*(180/math.pi) \n", + "Z7_angle = math.floor(Z7_angle*100)/100\n", + "\n", + "x = 4*V/(math.pi)\n", + "w = 2*math.pi*f\n", + "\n", + "I1 = math.floor(x*100/Z1_mag)/100\n", + "I3 = math.floor(x*1000/(3*Z3_mag))/1000\n", + "I5 = math.floor(x*1000/(5*Z5_mag))/1000\n", + "I7 = math.floor(x*1000/(7*Z7_mag))/1000\n", + "\n", + "#(c)\n", + "Ip =math.sqrt(I1**2+I3**2+I5**2+I7**2)\n", + "\n", + "#Result\n", + "print(\"(a) RMS load voltage %d V\"%Vrms)\n", + "print(\"\\n(b)\\n\\nVl = %.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)\"%(x,w,x/3,3*w,x/5,5*w,x/7,7*w))\n", + "\n", + "print(\"\\nLoad impedances for various harmonics are:\")\n", + "print(\"Z1 = %.2f < %.2f\u00b0\"%(Z1_mag,Z1_angle))\n", + "print(\"Z3 = %.1f < %.2f\u00b0\"%(Z3_mag,Z3_angle))\n", + "print(\"Z5 = %.2f < %.2f\u00b0\"%(Z5_mag,Z5_angle))\n", + "print(\"Z7 = %.2f < %.2f\u00b0\"%(Z7_mag,Z7_angle))\n", + "\n", + "print(\"\\nIl = %.2fsin(%.2ft-%.2f\u00b0)+%.2fsin(%.2ft-%.2f\u00b0)+%.3fsin(%.2ft-%.2f\u00b0)+%.3fsin(%.2ft-%.2f\u00b0)\"%(I1,w,Z1_angle,I3,3*w,Z3_angle,I5,5*w,Z5_angle,I7,7*w,Z7_angle))\n", + "print(\"\\nRMS value of fundamental component of load current = %.3f A\"%(I1/math.sqrt(2)))\n", + "print(\"\\n(c) Peak load current = %.2f A\"%Ip)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS load voltage 100 V\n", + "\n", + "(b)\n", + "\n", + "Vl = 127.32sin(314.16t)+42.44sin(942.48t)+25.46sin(1570.80t)+18.19sin(2199.11t)\n", + "\n", + "Load impedances for various harmonics are:\n", + "Z1 = 20.24 < 8.92\u00b0\n", + "Z3 = 22.1 < 25.22\u00b0\n", + "Z5 = 25.43 < 38.13\u00b0\n", + "Z7 = 29.72 < 47.71\u00b0\n", + "\n", + "Il = 6.29sin(314.16t-8.92\u00b0)+1.92sin(942.48t-25.22\u00b0)+1.001sin(1570.80t-38.13\u00b0)+0.612sin(2199.11t-47.71\u00b0)\n", + "\n", + "RMS value of fundamental component of load current = 4.448 A\n", + "\n", + "(c) Peak load current = 6.68 A\n" + ] + } + ], + "prompt_number": 152 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.11, Page No.229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase bridge inverter with 120\u00b0 mode of operation\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # supply voltage\n", + "R = 10.0 # per phase resistor\n", + "\n", + "#Calculations\n", + "Ip = V/(2*R)\n", + "Irms = math.sqrt(((2*R)**2)*(2.0/3.0))\n", + "P = Irms**2*R*3\n", + "Iavg = 2*R/3\n", + "Itrms = math.sqrt((2*R)**2/3)\n", + "\n", + "#Result\n", + "print(\"Peak value of load current = %d A\\nRMS load current = %.2f A\\nPower output = %.0f W\"%(Ip,Irms,P))\n", + "print(\"Average thyristor current = %.2f A\\nRMS value of thyristor current = %.2f A\"%(Iavg,Itrms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak value of load current = 20 A\n", + "RMS load current = 16.33 A\n", + "Power output = 8000 W\n", + "Average thyristor current = 6.67 A\n", + "RMS value of thyristor current = 11.55 A\n" + ] + } + ], + "prompt_number": 156 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.12, Page No. 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# 3-phase bridge inverter with 180\u00b0 mode of operation\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 400.0 # supply voltage\n", + "R = 10.0 # per phase resistor\n", + "\n", + "#Calculations\n", + "Rl = 1.5*R\n", + "i1 = V/Rl\n", + "Irms = math.sqrt((1/(2*math.pi))*(((i1**2*(2*math.pi/3)))+((i1/2)**2*((2*math.pi)-(2*math.pi/3)))))\n", + "P =Irms**2*R*3\n", + "Iavg = ((i1*math.pi/3)+(i1*math.pi/3))/(2*math.pi)\n", + "Itrms = math.sqrt(((i1**2*math.pi/3)+((i1/2)**2*2*math.pi/3))/(2*math.pi))\n", + "\n", + "#Result\n", + "print(\"RMS load current = %.3f A\\nPower output = %.2f A\\nPeak thyristor current = %.2f A\"%(Irms,P,i1))\n", + "print(\"Average current of thyristor = %.2f A\\nRMS current of thyristor = %.2f A\"%(Iavg,Itrms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS load current = 18.856 A\n", + "Power output = 10666.67 A\n", + "Peak thyristor current = 26.67 A\n", + "Average current of thyristor = 8.89 A\n", + "RMS current of thyristor = 13.33 A\n" + ] + } + ], + "prompt_number": 164 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.13, Page No.230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# RMS value of load current and RMS value of thyristor current\n", + "\n", + "import math\n", + "#variaable declaration\n", + "V = 450.0 # supply voltage\n", + "R = 10.0 # per phase load resistance\n", + "mode = 180 # conduction mode\n", + "\n", + "#calculation\n", + "Rl = 1.5*R\n", + "i1 = V/Rl\n", + "#(a)\n", + "Irms = math.sqrt((1/(2*math.pi))*(((i1**2*(2*math.pi/3)))+((i1/2)**2*((2*math.pi)-(2*math.pi/3)))))\n", + "Ip = i1\n", + "Itrms = math.sqrt((1/(2*math.pi))*(((i1**2*(math.pi/3)))+((i1/2)**2*((math.pi)-(math.pi/3)))))\n", + "\n", + "#Result\n", + "print(\"(a) RMS load current = %.2f A\\n(b) Peak current of thyristor = %.0f A\\n(c) RMS current of thyristor = %.0f A\"%(Irms,Ip,Itrms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS load current = 21.21 A\n", + "(b) Peak current of thyristor = 30 A\n", + "(c) RMS current of thyristor = 15 A\n" + ] + } + ], + "prompt_number": 167 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.14, Page No. 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full bridge inverter\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 200.0 # input voltage\n", + "w = 30.0 # width of each pulse\n", + "n = 5.0 # no of pulses each cycle\n", + "i =1.1 # factor by whic input is to be increased\n", + "w1= 33.0 # maximum width of pulse\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vl = V*math.sqrt(n*w/180.0)\n", + "Vl = math.floor(Vl*100)/100\n", + "Vl1 = 182.52 #value used in the book for calculations\n", + "#(b)\n", + "Vi = V*i\n", + "sig=(180*(Vl1/Vi)**2)/n\n", + "#(c)\n", + "V = Vl1/math.sqrt(n*w1/180.0)\n", + "\n", + "#Result\n", + "print(\"(a) Vl = %.2f V\\n(b) Pulse-width = %.2f\u00b0\\n(c) V = %.2f V\"%(Vl,sig,V))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Vl = 182.57 V\n", + "(b) Pulse-width = 24.78\u00b0\n", + "(c) V = 190.64 V\n" + ] + } + ], + "prompt_number": 186 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.15, Page No.234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full bridge inverter\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 200.0 #input voltage\n", + "w = 120.0 # width of signal\n", + "\n", + "#Calculations\n", + "Vl = V*math.sqrt(w/180)\n", + "\n", + "#Result\n", + "print(\"Vl = %.1f V\"%Vl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = 163.3 V\n" + ] + } + ], + "prompt_number": 190 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 4.16, Page No. 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Inverter controlled by sinusoidal pulse-width modulation\n", + "\n", + "import math\n", + "# variable declaration\n", + "V = 150.0 # input DC voltage\n", + "w1 = 20.0 # reference signal is more than control signal from 20\u00b0 to 40\u00b0\n", + "w2 = 60.0 # reference signal is more than control signal from 60\u00b0 to 120\u00b0\n", + "w3 = 20.0 # reference signal is more than control signal from 140\u00b0 to 160\u00b0\n", + "\n", + "#Calculations\n", + "Vl = V*math.sqrt((w1/180)+(w2/180)+(w3/180))\n", + "\n", + "#Result\n", + "print(\"Vl = %.1f V\"%Vl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = 111.8 V\n" + ] + } + ], + "prompt_number": 192 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb new file mode 100755 index 00000000..eed0454a --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb @@ -0,0 +1,1095 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Choppers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.1, Page No. 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# chopper parameters\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vi = 200.0 # input voltage\n", + "Vo = 150.0 # output voltage\n", + "R = 10.0 # resistance\n", + "\n", + "#Calculations\n", + "#(a)\n", + "alfa = Vo/Vi\n", + "#(b)\n", + "Iavg = Vo/R\n", + "Irms = math.sqrt(alfa)*Vi/R\n", + "#(c)\n", + "Irms_t = Irms\n", + "#(d)\n", + "Iavg_i = Iavg\n", + "#(e)\n", + "Reff = R/alfa\n", + "\n", + "#Result\n", + "print(\"(a) Alfa = %.2f \"%alfa)\n", + "print(\"(b) Average load current = %.0f A\\n RMS load current = %.2f A\"%(Iavg,Irms))\n", + "print(\"(c) RMS thyristor current = %.2f A\"%Irms_t)\n", + "print(\"(d) Average input current = %.0f A\"%Iavg_i)\n", + "print(\"(e) Effective input resistance = %.3f ohm\"%Reff)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Alfa = 0.75 \n", + "(b) Average load current = 15 A\n", + " RMS load current = 17.32 A\n", + "(c) RMS thyristor current = 17.32 A\n", + "(d) Average input current = 15 A\n", + "(e) Effective input resistance = 13.333 ohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# periods of conduction and blocking in each cycle\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vi = 230.0 # input voltage\n", + "Vav = 150.0 # output voltage\n", + "f = 1000.0 # frequency\n", + "\n", + "# Calculation\n", + "T = 1/f\n", + "Ton = Vav*T/Vi\n", + "Toff = T -Ton\n", + "\n", + "#Result\n", + "print(\"Conduction Period = %.3f*10^-3 s\\nBlocking period = %.3f*10^-3 s\"%(Ton*1000,Toff*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conduction Period = 0.652*10^-3 s\n", + "Blocking period = 0.348*10^-3 s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.3, Page No. 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# periods of conduction and blocking\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ra = 0.06 # armature resistance\n", + "Rf = 0.03 # field resistance\n", + "I = 15.0 # Average circuit current\n", + "f = 500.0 # chopper frequency\n", + "Be = 100 # back emf of motor\n", + "Vi = 200 # input voltage\n", + "\n", + "#Calculations\n", + "Vav = I*(Ra+Rf)+Be\n", + "T = 1/f\n", + "Ton = Vav*T/Vi\n", + "Toff = T -Ton\n", + "\n", + "#Result\n", + "print(\"Conduction Period = %.4f*10^-3 s\\nBlocking period = %.4f*10^-3 s\"%(Ton*1000,Toff*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conduction Period = 1.0135*10^-3 s\n", + "Blocking period = 0.9865*10^-3 s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.4, Page No.250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Duty Cycle\n", + "\n", + "import math\n", + "#Variable declaration\n", + "N = 800.0 # rated speed in rpm\n", + "I = 20 # rated current\n", + "Ra = 0.5 # armature resistanc\n", + "V = 240.0 # supply voltage\n", + "N1 = 600.0 # motor speed\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Be_800 = V- I*Ra\n", + "Be_600 = Be_800*N1/N\n", + "Vav = Be_600 + I*Ra\n", + "D1 = Vav/V\n", + "#(b)\n", + "Ia = I/2.0\n", + "Vav2 = Be_600+Ia*Ra\n", + "D2 = Vav2/V\n", + "\n", + "#Result\n", + "print(\"(a) Since torque is constant,Ia is also constant, i.e. %d A\\n Duty cycle = %.4f \"%(I,D1))\n", + "print(\"(b) Since torque is reduced to half and flux is constant,armature current is reduced to half, i.e. %d A\\n Duty cycle = %.4f \"%(Ia,D2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Since torque is constant,Ia is also constant, i.e. 20 A\n", + " Duty cycle = 0.7604 \n", + "(b) Since torque is reduced to half and flux is constant,armature current is reduced to half, i.e. 10 A\n", + " Duty cycle = 0.7396 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.5, Page No.256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# chopper parameters\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 200.0 # input voltage\n", + "R = 8.0 # load resistance\n", + "Vt = 2.0 # voltage drop across thyristor\n", + "f = 800.0 # chopper frequency\n", + "d = 0.4 # duty cycle\n", + "alfa = 0.5 # duty cycle for case 5\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vav = d*(V-Vt)\n", + "#(b)\n", + "Vl = math.sqrt(d)*(V-Vt)\n", + "#(c)\n", + "Po = (Vl**2)/R\n", + "Pi = d*V*(V-Vt)/R\n", + "eff = Po/Pi\n", + "#(d)\n", + "Ri = R/d\n", + "#(e)\n", + "Vl2 = 2*(V-Vt)/math.pi\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "V1 = Vl2/sqrt_2\n", + "V1 = math.floor(V1*1000)/1000\n", + "\n", + "#Result\n", + "print(\"(a) Vav = %.1f V\\n(b) Vl = %.3f V\\n(c) Chopper efficiency = %.0f%%\\n(d) Input resistance = %.0f ohm\"%(Vav,Vl,eff*100,Ri))\n", + "print(\"(e)\\nThe fundamental component (n=1) is,\\nVl = %.2fsin(%d*pi*t)\\nThe rms value of fundamental component is, V1 = %.3f V\"%(Vl2,2*f,V1))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Vav = 79.2 V\n", + "(b) Vl = 125.226 V\n", + "(c) Chopper efficiency = 99%\n", + "(d) Input resistance = 20 ohm\n", + "(e)\n", + "The fundamental component (n=1) is,\n", + "Vl = 126.05sin(1600*pi*t)\n", + "The rms value of fundamental component is, V1 = 89.144 V\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.6, Page No. 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# chopping frequency\n", + "\n", + "import math\n", + "#Variable declartion\n", + "V = 400 # input voltage\n", + "R = 0 # resistance\n", + "L = 0.05 # inductance\n", + "alfa = 0.25 # duty cycle of chopper\n", + "I = 10 # load current\n", + "\n", + "#Calculation\n", + "Vav = V*alfa\n", + "Ton = L*I/(V-Vav)\n", + "T = Ton/alfa\n", + "f = 1/T\n", + "\n", + "#Result\n", + "print(\"Chopper frequency = %d pulses/s\"%(f))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chopper frequency = 150 pulses/s\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.7, Page No. 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# chopper parameters\n", + "\n", + "import math\n", + "#variable declaration\n", + "R = 4.0 # resistance\n", + "L = 6*10**-3 # inductance\n", + "V = 200.0 # voltage\n", + "alfa = 0.5 # duty cycle\n", + "f = 1000.0 # frequency\n", + "E = 0 # back emf \n", + "#calculations\n", + "T = 1/f\n", + "#(a)\n", + "x = R*T/L\n", + "Imax = ((V/R)*((1-math.e**(-alfa*x))/(1-math.e**(-x))))-(E/R)\n", + "Imax = math.ceil(Imax*100)/100\n", + "Imin = ((V/R)*(((math.e**(alfa*x))-1)/((math.e**(x))-1)))-(E/R)\n", + "Imin = math.floor(Imin*100)/100\n", + "#(b)\n", + "ripple = V/(f*R*L)\n", + "#(c)\n", + "Iavg = (Imax+Imin)/2\n", + "#(d)\n", + "Il = math.sqrt((Imin**2)+(((Imax-Imin)**2)/3)+(Imin*(Imax-Imin)))\n", + "Il = math.floor(Il*100)/100\n", + "#(e)\n", + "Iavg_i =0.5*Iavg\n", + "#(f)\n", + "Irms_i = Il*math.sqrt(0.5)\n", + "\n", + "#Result\n", + "print(\"(a) Imax = %.2f A\\tImin = %.2f A\"%(Imax,Imin))\n", + "print(\"(b) Maximum Ripple = %.2f A\\n(c) Average load current = %.0f A\"%(ripple,Iavg))\n", + "print(\"(d) rms load current = %.2f A\\n(e) Average input current = %.1f A\\n(f) RMS input current = %.3f A\"%(Il,Iavg_i,Irms_i))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Imax = 29.13 A\tImin = 20.87 A\n", + "(b) Maximum Ripple = 8.33 A\n", + "(c) Average load current = 25 A\n", + "(d) rms load current = 25.11 A\n", + "(e) Average input current = 12.5 A\n", + "(f) RMS input current = 17.755 A\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.8, Page No.258 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Load inductance\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 300 # input voltage\n", + "R = 5 # load resistance\n", + "f = 250.0 # chopping frequency\n", + "r = 0.20 # 20% ripple\n", + "I = 30 # Average load current\n", + "\n", + "#Calculations\n", + "x = r*I\n", + "L = V/(4*f*x)\n", + "\n", + "#Result\n", + "print(\"L = %.0f *10^-3 H\"%(L*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L = 50 *10^-3 H\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.9, Page No.258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Current at the instannce of turn off of thryster and 5 msec after turn off\n", + "\n", + "import math\n", + "#Variable declaration\n", + "R = 0.5 # Armature resistance\n", + "L = 16*10**-3 # Arature inductance\n", + "V = 200.0 # DC input voltage\n", + "Be = 100.0 # Back emf\n", + "Imin = 10.0 # minimum load current\n", + "Toff = 2*10**-3 # thyristor turn off time\n", + "delay = 5*10**-3 # current at the to be calculated 5 msec after turn off\n", + "\n", + "#Calculation\n", + "#(a)\n", + "x = R/L\n", + "i = (((V-Be)/R)*(1-math.e**(-x*Toff)))+Imin*(math.e**(-x*Toff))\n", + "i = math.floor(i*100)/100\n", + "#(b)\n", + "i2 = i*(math.e**(-x*delay))\n", + "\n", + "#Result\n", + "print(\"(a) Current at the instance of turn off of thyristor = %.2f A\"%i)\n", + "print(\"(b) After the turn off of thyristor,the current freewheels 5 ms.\\n\\ti = %.2f A\"%i2)\n", + "# answers in the book are wrong:12.12+9.39=21.41" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current at the instance of turn off of thyristor = 21.51 A\n", + "(b) After the turn off of thyristor,the current freewheels 5 ms.\n", + "\ti = 18.40 A\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.10, Page No. 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Speed of the motor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 220.0 # input voltage\n", + "Ra = 1.0 # armature resistance\n", + "N = 1000.0 # no load speed of the motor\n", + "alfa = 0.6 # duty cycle\n", + "I = 20 # motor current\n", + "E = 220.0 # back emf at no load\n", + "\n", + "# Calculations\n", + "Vi = V*alfa\n", + "Be = Vi-Ra*I\n", + "N1 = Be*N/V\n", + "\n", + "#Result\n", + "print(\"Speed of the motor = %.1f rpm\"%N1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of the motor = 509.1 rpm\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.11, Page No.259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average load voltage of the chopper\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vi = 230.0 # input voltage\n", + "Ton = 25 # on time in ms\n", + "Toff = 10 # off time in ms\n", + "\n", + "#Calculations\n", + "V = Vi*Ton/(Ton+Toff)\n", + "\n", + "#Result\n", + "print(\"Average load voltage = %.3f V\"%V)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load voltage = 164.286 V\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.12, Page No. 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# max, min and average load current and load voltage\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 100.0 # applied voltage\n", + "Be = 0 # back emf\n", + "L = 1.0*10**-3 # inductance\n", + "R = 0.5 # Resistance\n", + "T = 3*10**-3 # Ton + Toff\n", + "Ton = 1*10**-3 # Ton\n", + "\n", + "#Calculations\n", + "alfa = Ton/T\n", + "x = T*R/L\n", + "#(a)\n", + "Imax = (V/R)*((1- math.e**(-alfa*x))/(1-math.e**(-x)))\n", + "#(b)\n", + "Imin = (V/R)*((math.e**(alfa*x)-1)/(math.e**(x)-1))\n", + "#(c)\n", + "Vavg = alfa*V\n", + "\n", + "#Result\n", + "print(\" Imax = %.2f A\\n Imin = %.1f A\\n Average load current = %.1f A\\n Average output voltage = %.2f V\"%(Imax,Imin,(Imax+Imin)/2,Vavg))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Imax = 101.30 A\n", + " Imin = 37.3 A\n", + " Average load current = 69.3 A\n", + " Average output voltage = 33.33 V\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.13, Page No.259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# In One quadrant chopper, output voltage and current\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 100.0 # applied voltage\n", + "Be = 12.0 # back emf\n", + "L = 0.8*10**-3 # inductance\n", + "R = 0.2 # Resistance\n", + "T = 2.4*10**-3 # Ton + Toff\n", + "Ton = 1*10**-3 # Ton\n", + "\n", + "#Calculations\n", + "alfa = Ton/T\n", + "x = T*R/L\n", + "#(a)\n", + "Imax = (V/R)*((1- math.e**(-alfa*x))/(1-math.e**(-x)))\n", + "#(b)\n", + "Imin = (V/R)*((math.e**(alfa*x)-1)/(math.e**(x)-1))\n", + "#(c)\n", + "Vavg = alfa*V\n", + "\n", + "#Result\n", + "print(\"(a) Imax = %.2f A\\n(b) Imin = %.1f A\\n(c) Average output voltage = %.2f V\"%(Imax,Imin,Vavg))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Imax = 245.13 A\n", + "(b) Imin = 172.7 A\n", + "(c) Average output voltage = 41.67 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.14, Page No. 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Series inductance\n", + "\n", + "import math\n", + "#Variable declaration\n", + "f = 400.0 # chopping frequency\n", + "V = 500.0 # input voltage\n", + "I = 10 # maximum current swing\n", + "\n", + "#calculations\n", + "L = V/(4*f*I)\n", + "\n", + "#Result\n", + "print(\"Series Inductance, L = %.2f*10^-3 H \"%(L*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series Inductance, L = 31.25*10^-3 H \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.15, Pager No.260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Motor speed and current swing\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 800.0 # input voltage\n", + "P = 300.0 # motor power rating in HP\n", + "eff = 0.9 # motor efficiency\n", + "R = 0.1 # total armature and field resistance\n", + "L = 100*10**-3 # inductance\n", + "alfa = 0.2 # duty cycle\n", + "N = 900.0 # motor rated speed \n", + "f = 400.0 # chopping frequency\n", + "\n", + "#Calculations\n", + "Po = P*735.5/1000\n", + "Pi = Po/eff\n", + "I = Pi*1000/V\n", + "Be = V-(I*R)\n", + "Be_duty = (alfa*V)-(I*R)\n", + "N2 = N*Be_duty/Be\n", + "di = (V- (alfa*V))*alfa/(L*f)\n", + "\n", + "#Result\n", + "print(\"Motor speed = %.2f rpm\\nCurrent swing = %.1f A\"%(N2,di))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Motor speed = 151.32 rpm\n", + "Current swing = 3.2 A\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.16, Page No. 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.17, Page No. 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Theoretical example\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical example\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.18, Page No. 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# step down chopper parameters\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 200.0 # input voltage\n", + "R = 2.0 # resistance\n", + "L = 10*10**-3 # inductance\n", + "E = 20.0 # back emf\n", + "T = 1000*10**-6 # chopping cycle\n", + "Ton =300*10**-6 # Ton time of thyrister\n", + "\n", + "#Calculations\n", + "#(a)\n", + "f = 1/T\n", + "x = (R*T)/L\n", + "alfa_min =(math.log(1+((E/V)*(math.e**(x)-1))))/x\n", + "alfa = Ton/T\n", + "#(b)\n", + "Imax = ((V/R)*((1-math.e**(-alfa*x))/(1-math.e**(-x))))-(E/R)\n", + "Imax = math.floor(Imax*10)/10\n", + "Imin = ((V/R)*((math.e**(alfa*x)-1)/(math.e**(x)-1)))-(E/R)\n", + "Imin = math.floor(Imin*100)/100\n", + "#(c)\n", + "Il = (alfa*V-E)/R\n", + "#(d)\n", + "x1 = alfa*V\n", + "x2 = (V*math.sin(math.pi*2*alfa))/math.pi\n", + "x3 = (V/math.pi)*(1-math.cos(alfa*2*math.pi))\n", + "x4 = (V*math.sin(math.pi*2*2*alfa))/(math.pi*2)\n", + "x5 = (V/(2*math.pi))*(1-math.cos(alfa*2*2*math.pi))\n", + "x6 = (V*math.sin(math.pi*3*2*alfa))/(math.pi*3)\n", + "x7 = (V/(3*math.pi))*(1-math.cos(alfa*2*3*math.pi))\n", + "d = f*2*math.pi\n", + "#(e)\n", + "Iavg = (alfa*(V-E)/R)-(L*(Imax-Imin)/(R*T))\n", + "\n", + "#Result\n", + "print(\"(a) Minimum required value of alfa = %.4f\\n Actual value of alfa = %.1f\"%(alfa_min,alfa))\n", + "print(\" Since actual value is more than minimum required for continuous current,the load current is continuous.\")\n", + "print(\"\\n(b) Imax = %.1f A\\tImin = %.2f A\"%(Imax,Imin))\n", + "print(\"\\n(c) Average load current = %.0f A\"%Il)\n", + "print(\"\\n(d) Vl = %d + %.2fcos(%.1ft) + %.2fsin(%.1ft)%.2fcos(%.1ft) + %.2fsin(%.1ft)%.2fcos(%.1ft) + %.2fsin(%.1ft)+....\"%(x1,x2,d,x3,d,x4,2*d,x5,2*d,x6,3*d,x7,3*d))\n", + "print(\"\\n(e) Average Input current = %.2f A\"%Iavg)\n", + "# answer for Imin is slightly greater than the answer given in book and hence answer for avg input current" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Minimum required value of alfa = 0.1095\n", + " Actual value of alfa = 0.3\n", + " Since actual value is more than minimum required for continuous current,the load current is continuous.\n", + "\n", + "(b) Imax = 22.1 A\tImin = 17.92 A\n", + "\n", + "(c) Average load current = 20 A\n", + "\n", + "(d) Vl = 60 + 60.55cos(6283.2t) + 83.33sin(6283.2t)-18.71cos(12566.4t) + 57.58sin(12566.4t)-12.47cos(18849.6t) + 4.05sin(18849.6t)+....\n", + "\n", + "(e) Average Input current = 6.10 A\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.19, Page No.266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# load current values\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 200.0 # input voltage\n", + "R = 4.0 # resistance\n", + "L = 10*10**-3 # inductance\n", + "T = 1000*10**-6 # chopping cycle\n", + "Ton =300*10**-6 # Ton time of thyrister\n", + "\n", + "#Calculations\n", + "f = 1/T\n", + "alfa = Ton/T\n", + "x1 = alfa*V\n", + "x2 = (V*math.sin(math.pi*2*alfa))/math.pi\n", + "x2 = math.ceil(x2*100)/100\n", + "x3 = (V/math.pi)*(1-math.cos(alfa*2*math.pi))\n", + "x3 = math.floor(x3*100)/100\n", + "x4 = (V*math.sin(math.pi*2*2*alfa))/(math.pi*2)\n", + "x4 = math.floor(x4*100)/100\n", + "x5 = (V/(2*math.pi))*(1-math.cos(alfa*2*2*math.pi))\n", + "x5 = math.floor(x5*100)/100\n", + "x6 = (V*math.sin(math.pi*3*2*alfa))/(math.pi*3)\n", + "x6 = math.ceil(x6*100)/100\n", + "x7 = (V/(3*math.pi))*(1-math.cos(alfa*2*3*math.pi))\n", + "x7 = math.floor(x7*100)/100\n", + "\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "V1 = math.sqrt((x2**2+x3**2))/sqrt_2\n", + "V2 = math.sqrt((x4**2+x5**2))/sqrt_2\n", + "V3 = math.sqrt((x6**2+x7**2))/sqrt_2\n", + "Z1_mag = math.sqrt(R**2+(2*math.pi*f*L)**2)\n", + "Z1_angle = math.tan((2*math.pi*f*L)/R)\n", + "I1 = V1/Z1_mag\n", + "\n", + "Z2_mag = math.sqrt(R**2+(2*2*math.pi*f*L)**2)\n", + "Z2_angle = math.tan((2*2*math.pi*f*L)/R)\n", + "I2 = V2/Z2_mag\n", + "\n", + "Z3_mag = math.sqrt(R**2+(3*2*math.pi*f*L)**2)\n", + "Z3_angle = math.tan((3*2*math.pi*f*L)/R)\n", + "I3 = V3/Z3_mag\n", + "\n", + "Iavg = alfa*V/4\n", + "Irms = math.sqrt(Iavg**2+I1**2+I2**2+I3**2)\n", + "\n", + "print(\"RMS value of first harmonic component of load current = %.3f A\"%I1)\n", + "print(\"RMS value of second harmonic component of load current = %.4f A\"%I2)\n", + "print(\"RMS value of third harmonic component of load current = %.4f A\"%I3)\n", + "print(\"RMS value of load current = %.4f A\"%Irms)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of first harmonic component of load current = 1.157 A\n", + "RMS value of second harmonic component of load current = 0.3406 A\n", + "RMS value of third harmonic component of load current = 0.0492 A\n", + "RMS value of load current = 15.0485 A\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.20, Page No.273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# L and C of the auxiliary commutation circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 200 # input voltage\n", + "I = 50 # average current\n", + "Il = 60 # peak load current\n", + "Toff = 15*10**-6 # thyristor turn off current\n", + "l = 1.5 # max current limit of 150%\n", + "\n", + "\n", + "#calculation\n", + "C = Toff*Il/V # C should be greater than this value\n", + "C1 = 5 *10**-6 # assumed\n", + "Ic = Il*l-Il\n", + "L = (V**2*(C1))/(Ic**2)\n", + "\n", + "#Result\n", + "print(\"C > %.1f*10^-6, Therefore assume C = %.1f*10^6 F\"%(C*10**6,C1*10**6))\n", + "print(\"L = %.2f*10^-6 H\"%(L*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C > 4.5*10^-6, Therefore assume C = 5.0*10^6 F\n", + "L = 222.22*10^-6 H\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.21, Page No.277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# period of conduction\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 200.0 # input voltage \n", + "Vav = 250.0 # output voltage\n", + "Toff = 0.6*10**-3 # blocking period\n", + "\n", + "#calculation\n", + "Ton = (Vav*Toff/V) - Toff\n", + "\n", + "#Result\n", + "print(\"Ton = %.2f*10^-3 second\"%(Ton*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ton = 0.15*10^-3 second\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 5.22, Page No.277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# period of conduction\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 150.0 # input voltage \n", + "Vav = 250.0 # output voltage\n", + "Toff = 1*10**-3 # blocking period\n", + "\n", + "#calculation\n", + "Ton = (Vav*Toff/V) - Toff\n", + "\n", + "#Result\n", + "print(\"Ton = %.4f*10^-3 second\"%(Ton*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ton = 0.6667*10^-3 second\n" + ] + } + ], + "prompt_number": 83 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb new file mode 100755 index 00000000..9456765e --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb @@ -0,0 +1,852 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: AC Regulators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.1, Page No.286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# input/output power, input power factor, average and rms vales of thyristor\n", + "\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#variable declaration\n", + "nc = 36.0 # conduction cycles\n", + "no = 64.0 # off cycles\n", + "V = 150.0 # input voltage\n", + "Rl = 8.0 # load resistance\n", + "\n", + "#calculations\n", + "#(a)\n", + "alfa = nc/(nc+no)\n", + "Vl = V*math.sqrt(alfa)\n", + "#(b)\n", + "P = (Vl**2)/Rl\n", + "#(d)\n", + "Il = Vl/Rl\n", + "va_i = V*Il\n", + "pf_i = P/va_i\n", + "#(e)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Ip = sqrt_2*V/Rl\n", + "\n", + "def f(x):\n", + " return (alfa/(2*math.pi))*Ip*(math.sin(x))\n", + "wt_lower=0\n", + "wt_upper =math.pi\n", + "val = quad(f,wt_lower,wt_upper)\n", + "\n", + "val2 =Ip*math.sqrt(alfa)/2.0\n", + "\n", + "#result\n", + "print(\"(a) rms output voltage, Vl = %.0f V\\n(b) Power output = %.1f W\"%(Vl,P))\n", + "print(\"(c) Since losses are neglected, input power = Output power = %.1f W\"%(P))\n", + "print(\"(d) input power factor = %.1f lagging\\n(e)\\tPeak thyristor current = %.4f A \"%(pf_i,Ip))\n", + "print(\"\\tAverage thyristor current = %.3f A\\n\\tRMS thyristor current = %.2f A\"%(val[0],val2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) rms output voltage, Vl = 90 V\n", + "(b) Power output = 1012.5 W\n", + "(c) Since losses are neglected, input power = Output power = 1012.5 W\n", + "(d) input power factor = 0.6 lagging\n", + "(e)\tPeak thyristor current = 26.5125 A \n", + "\tAverage thyristor current = 3.038 A\n", + "\tRMS thyristor current = 7.95 A\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.2, Page No.288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# single phase half wave regulator parameter\n", + "\n", + "import math\n", + "#vaariable declaration\n", + "V = 150.0 # input voltage\n", + "Rl = 8.0 # load resistance\n", + "theta = 60.0 # thyristor firing angle in degrees\n", + "\n", + "# Calculations\n", + "Vm =math.sqrt(2)*V\n", + "Vm = math.floor(Vm*10)/10\n", + "#(a)\n", + "Vo = Vm*(math.cos(theta*math.pi/180)-1)/(2*math.pi)\n", + "#(b)\n", + "Vl = Vm*math.sqrt(((2*math.pi)-(theta*math.pi/180)+(math.sin(2*theta*math.pi/180)/2))/(4*math.pi))\n", + "Vl = math.ceil(Vl*100)/100\n", + "#(c)\n", + "Po = (Vl**2)/Rl\n", + "#(d)\n", + "I = Vl/Rl\n", + "va = V*I\n", + "pf = Po/va\n", + "#(e)\n", + "Iavg = Vo/Rl\n", + "\n", + "#Result\n", + "print(\"(a) Average output voltage = %.1f V\\n This is negative because only a part of positive half cycle appears at the output\"%Vo)\n", + "print(\" whereas the whole negative cycle appears at the output.\")\n", + "print(\"\\n(b) Vl = %.2f V\\n\\n(c) Power output = %.2f W\\n\\n(d) Input pf = %.2f lagging\"%(Vl,Po,pf))\n", + "print(\"\\n(e) Average input current = Average output current = %.2f A \"%(Iavg))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average output voltage = -16.9 V\n", + " This is negative because only a part of positive half cycle appears at the output\n", + " whereas the whole negative cycle appears at the output.\n", + "\n", + "(b) Vl = 142.46 V\n", + "\n", + "(c) Power output = 2536.86 W\n", + "\n", + "(d) Input pf = 0.95 lagging\n", + "\n", + "(e) Average input current = Average output current = -2.11 A \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.3, Page No.293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full wave regulator parameters\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#variable declaration\n", + "V = 150.0 # input voltage\n", + "Rl = 8.0 # load resistance\n", + "theta = 60.0 # thyristor firing angle in degrees\n", + "\n", + "#calculations\n", + "Vm =math.sqrt(2)*V\n", + "Vm = math.floor(Vm*10)/10\n", + "#(a)\n", + "Vav = Vm*(math.cos(theta*math.pi/180)+1)/(math.pi)\n", + "#(b)\n", + "Vl = Vm*math.sqrt(((3.14)-(3.14/3)+(math.sin(2*theta*3.14/180)/2))/(2*3.141))\n", + "Vl = math.ceil(Vl*100)/100\n", + "#(c)\n", + "Io = Vl/Rl\n", + "Po = (Io**2)*Rl\n", + "#(d)\n", + "va = V*Io\n", + "pf = Po/va\n", + "#(e)\n", + "def f(x):\n", + " return math.sin(x)\n", + "wt_lower = math.pi/3 \n", + "wt_upper = math.pi\n", + "val = quad(f,wt_lower,wt_upper)\n", + "Iavg = val[0]*Vm/(2*math.pi*Rl)\n", + "\n", + "def g(x):\n", + " return math.sin(x)**2\n", + "wt_lower1 = math.pi/3\n", + "wt_upper1 = math.pi\n", + "val1 = quad(g,wt_lower1,wt_upper1)\n", + "Irms = (Vm/(Rl))*math.sqrt(val1[0]/(math.pi*2))\n", + "\n", + "#Result\n", + "print(\"(a) Average output voltage = %.2f V\\n \"%Vav)\n", + "print(\"\\n(b) Vl = %.2f V\\n\\n(c) Power output = %.2f W\\n\\n(d) Input pf = %.3f lagging\"%(Vl,Po,pf))\n", + "print(\"\\n(e) Average thyristor current= %.2f A\\n RMS thyristor current = %.2f A \"%(Iavg,Irms))\n", + "\n", + "#(b) For Vl calculation, value of pi is used different at different place. if math.pi is used then Vl = 134.53V\n", + "#(c) answer in the book is misprinted" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average output voltage = 101.27 V\n", + " \n", + "\n", + "(b) Vl = 134.52 V\n", + "\n", + "(c) Power output = 2261.95 W\n", + "\n", + "(d) Input pf = 0.897 lagging\n", + "\n", + "(e) Average thyristor current= 6.33 A\n", + " RMS thyristor current = 11.89 A \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.4, Page No. 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full wave ac voltage regulator\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#variable declaration\n", + "V = 120.0 # input voltage\n", + "Rl = 10.0 # load resistance\n", + "alfa = 90.0 # thyristor firing angle in degrees\n", + "\n", + "#Calculations\n", + "Vm =math.sqrt(2)*V\n", + "#Vm = math.floor(Vm*10)/10\n", + "#(a)\n", + "Vo = Vm*math.sqrt(((math.pi)-(alfa*math.pi/180)+(math.sin(2*alfa*math.pi/180)/2.0))/(2*math.pi))\n", + "#Vo = 60*math.sqrt(2) \n", + "#(b)\n", + "Il = Vo/Rl\n", + "Po = (Il**2)*Rl\n", + "VA = Il*V\n", + "pf = Po/VA\n", + "#(c)\n", + "def f(x):\n", + " return math.sin(x)\n", + "wt_lower = math.pi/2\n", + "wt_upper = math.pi\n", + "val = quad(f,wt_lower,wt_upper)\n", + "Iav = Vm*val[0]/(2*math.pi*Rl)\n", + " \n", + "#(d)\n", + "Irms = Il/math.sqrt(2)\n", + "#(e)\n", + "Irmsl = Vo/Rl\n", + "\n", + "#Result\n", + "print(\"(a) RMS output voltage = %f V\\n(b) Input p.f. = %.3f lagging\\n(c) Average thyristor current = %.1f A\"%(Vo,pf,Iav))\n", + "print(\"(d) RMS thyristor current = %.1f A\\n(e) RMS load current =%f A\"%(Irms,Irmsl))\n", + "# Answer for \"RMS output voltage\" and \"RMS load current\" is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS output voltage = 84.852814 V\n", + "(b) Input p.f. = 0.707 lagging\n", + "(c) Average thyristor current = 2.7 A\n", + "(d) RMS thyristor current = 6.0 A\n", + "(e) RMS load current =8.485281 A\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.5, Page No. 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# rms output voltage and average power\n", + "\n", + "import math\n", + "R = 400.0 # load resistance\n", + "V = 110.0 # input voltage\n", + "alfa = 60.0 # firing angle\n", + "\n", + "# calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = sqrt_2*V\n", + "Vo = Vm*math.sqrt(((math.pi)-(alfa*math.pi/180)+(math.sin(2*alfa*math.pi/180)/2.0))/(2*math.pi))\n", + "P = (Vo**2)/R\n", + "\n", + "#Result\n", + "print(\"RMS output voltage = %.2f V\\nAverage power = %.2f W\"%(Vm,P))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS output voltage = 155.54 V\n", + "Average power = 24.33 W\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.6, Page No.294 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Firing angle\n", + "\n", + "import math\n", + "from numpy import poly1d\n", + "# variable declaration\n", + "a1 = 0.80 # % of maximum power value1\n", + "a2 = 0.30 # % of maximum power value2\n", + "\n", + "#Calculation\n", + "#After solving equation using taylor seris of X, we got following coefficient. \n", + "P1 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*(1-a1))], variable = 'x')\n", + "P2 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-math.pi*1.525)], variable = 'x')\n", + "# hardcoded value used to match the answer to the book\n", + "x1 = P1.r[(P1.order+1)/2]*180/math.pi\n", + "x2 = P2.r[(P1.order+1)/2]*180/math.pi\n", + "alfa1 = x1.real\n", + "alfa2 = x2.real\n", + "print(\"(a) alfa1 = %.1f\u00b0\"%(x1.real))\n", + "print(\"(b) alfa2 = %.1f\u00b0\"%(x2.real))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) alfa1 = 60.5\u00b0\n", + "(b) alfa2 = 108.6\u00b0\n" + ] + } + ], + "prompt_number": 98 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.7, Page No.295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# single phase AC regulator\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 230.0 # Single phase supply voltage\n", + "f = 50.0 # supply frequency\n", + "R = 15.0 # load resistance\n", + "alfa = 30.0 # firing angle\n", + "\n", + "#calculations\n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = V*sqrt_2\n", + "alfa = alfa*math.pi/180 #degree to radians\n", + "#(a)\n", + "#-Theoretical\n", + "Iavg = Vm*(1+ math.cos(alfa))/(2*math.pi*R)\n", + "Irms = (Vm/R)*math.sqrt(((math.pi - alfa)/(4*math.pi))+(math.sin(2*alfa)/(8*math.pi)))\n", + "#(b)\n", + "a1 = (Vm)*(math.cos(2*alfa)-1)/(2*math.pi)\n", + "b1 = (Vm)*((math.pi-alfa)+((math.sin(2*alfa))/2.0))/(math.pi)\n", + "Va = math.sqrt(a1**2 + b1**2)\n", + "Vrms = Va/sqrt_2\n", + "Vrms = math.floor(Vrms*1000)/1000\n", + "#(e)\n", + "P = (Vrms**2)/R\n", + "#(f)\n", + "Vl = Vm*math.sqrt((math.pi -alfa+((math.sin(2*alfa))/2.0))/(2*math.pi))\n", + "Vl =math.floor(Vl*1000)/1000\n", + "#(g)\n", + "Pt = (Vl**2)/R\n", + "\n", + "#Result\n", + "print(\"(a) Average thyristor current = %.2f A\\n RMS thyristor current = %.3f A\"%(Iavg,Irms))\n", + "print(\"\\n(b) Amplitude of fundamental component of load voltage = %.1f V\\n RMS value = %.3f V\"%(math.floor(Va*10)/10,Vrms))\n", + "print(\"\\n(c) Since load is purely resistive, the load current rises from 0 to peak value instantaneously at alfa.\")\n", + "print(\" Hence max.(di/dt) is infinite\")\n", + "print(\"\\n(d) Maximum forward or reverse voltage across thyristor = %.2f V \"%(Vm))#math.pi =1.414\n", + "print(\"\\n\\n(e) Power delevered to load by fundamental component of load voltage = %.2f W\"%P)\n", + "print(\"\\n\\n(f) Load voltage = %.3f V\"%Vl)\n", + "print(\"\\n\\n(g) Total power output = %.2f W\"%Pt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average thyristor current = 6.44 A\n", + " RMS thyristor current = 10.683 A\n", + "\n", + "(b) Amplitude of fundamental component of load voltage = 316.9 V\n", + " RMS value = 224.116 V\n", + "\n", + "(c) Since load is purely resistive, the load current rises from 0 to peak value instantaneously at alfa.\n", + " Hence max.(di/dt) is infinite\n", + "\n", + "(d) Maximum forward or reverse voltage across thyristor = 325.22 V \n", + "\n", + "\n", + "(e) Power delevered to load by fundamental component of load voltage = 3348.53 W\n", + "\n", + "\n", + "(f) Load voltage = 226.625 V\n", + "\n", + "\n", + "(g) Total power output = 3423.93 W\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.8, Page No. 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full wave regulator\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 150 # input voltage\n", + "R = 4 # resistance of the circuit\n", + "L = 22*10**-3 # Inductance\n", + "f = 50 # frequency \n", + "alfa = 60 # firing angle\n", + "\n", + "#Calculation\n", + "#(a)\n", + "w = 2*math.pi*f\n", + "theta = (180/math.pi)*math.atan(w*L/R)\n", + "beta = 180+alfa\n", + "#(b)\n", + "alfa = alfa*math.pi/180\n", + "Vm = V*math.sqrt(2)\n", + "Vm = math.floor(Vm*10)/10\n", + "Vl = Vm*math.sqrt((math.pi-((math.sin(2*beta*math.pi/180))/2)+((math.sin(2*alfa))/2.0))/(2*math.pi))\n", + "\n", + "#Result\n", + "print(\"(a)\\ntheta = %.0f\u00b0\\nAs alfa = theta, (beta-alfa) = Conduction angle= pi\\ntherefore, Beta = %d\u00b0\"%(theta,beta))\n", + "print(\"\\n(b)\\n Vl = %.0f V\"%Vl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "theta = 60\u00b0\n", + "As alfa = theta, (beta-alfa) = Conduction angle= pi\n", + "therefore, Beta = 240\u00b0\n", + "\n", + "(b)\n", + " Vl = 150 V\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.9, Page No. 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Single phase full wave regulator parameters\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230 # input voltage\n", + "f = 50 # frequency\n", + "R = 5 # resistance of the circuit\n", + "L = 20*10**-3 # inductance\n", + "\n", + "#Calculations\n", + "w = 2*math.pi*f\n", + "theta = (180/math.pi)*math.atan(R/(2*math.pi*f*L))\n", + "theta = math.ceil(theta*100)/100\n", + "Il = V/math.sqrt((R**2)+((w**2)*(L**2)))\n", + "Il = math.floor(Il*100)/100\n", + "P =R*Il**2\n", + "ipf = (P)/(V*Il)\n", + "\n", + "#Result\n", + "print(\"theta = %.2f\u00b0\"%theta)\n", + "print(\"\\n(a) The minimum value of firing angle(alfa) is theta. Therefore, range of firing angle is %.2f\u00b0 to 180\u00b0.\"%theta)\n", + "print(\"\\n(b) Conduction period of each thyristor is 180\u00b0.\")\n", + "print(\"\\n(c)\\n Load current = %.2f A\\n Power output = %.2f W\\n Input power factor = %.3f lagging\"%(Il,P,ipf)) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "theta = 38.52\u00b0\n", + "\n", + "(a) The minimum value of firing angle(alfa) is theta. Therefore, range of firing angle is 38.52\u00b0 to 180\u00b0.\n", + "\n", + "(b) Conduction period of each thyristor is 180\u00b0.\n", + "\n", + "(c)\n", + " Load current = 28.64 A\n", + " Power output = 4101.25 W\n", + " Input power factor = 0.623 lagging\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.10, Page No. 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Singal phase full wave regulator circuit parameters\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "#Variable declaration\n", + "R = 9 # resistance of the circuit\n", + "L = 0.03 # inductance\n", + "V = 240 # input voltage\n", + "f = 50 # frequency\n", + "alfa1 = 0 # firing angle case a\n", + "alfa2 = 60 # firing angle case b\n", + "alfa3 = 90 # firing angle case c\n", + "\n", + "#calculations\n", + "RbyL = R/L\n", + "alfa1 = 0*math.pi/180\n", + "alfa2 = 60*math.pi/180\n", + "alfa3 = 90*math.pi/180 \n", + "alfa4 = 13.7*math.pi/180 \n", + "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n", + "w = 2*math.pi*f\n", + "Z_mag = math.sqrt((R**2)+(w**2)*(L**2))\n", + "Z_angle = math.floor((math.atan(w*L/R))*1000)/1000\n", + "x=math.floor(math.cos(Z_angle)*10000)/10000\n", + "\n", + "#(a)\n", + "Il = (V*math.sqrt(2)/Z_mag)#*math.sin((w/f)-(Z_angle*math.pi/180))\n", + "Il = math.floor(Il*100)/100\n", + "P = V*Il*x/sqrt_2\n", + "#b\n", + "k1 = math.ceil((Il*math.sin(alfa2-Z_angle))*100)/100\n", + "def h(t):\n", + " return ((V*sqrt_2*math.sin(w*t*alfa2))*((Il*math.sin((w*t)+(alfa2-Z_angle)))-(k1*math.e**(-RbyL*t))))\n", + "t2 = 0.00919\n", + "t1 = 0\n", + "val = quad(h,t1,t2)\n", + "P2 = val[0]/0.01\n", + "#c\n", + "k2 = math.floor((Il*math.sin(alfa3-Z_angle))*100)/100\n", + "def g(t):\n", + " return ((V*sqrt_2*math.sin(w*t*alfa3))*((Il*math.sin((w*t)+(alfa3-Z_angle)))-(k2*math.e**(-RbyL*t))))\n", + "t2 = 0.00733\n", + "t1 = 0\n", + "val2 = quad(g,t1,t2)\n", + "P3 = val2[0]/0.01\n", + "\n", + "angle1 = math.ceil((Z_angle*180/math.pi)*10)/10\n", + "angle2 = (alfa2-Z_angle)*180/math.pi\n", + "angle3 = (alfa3-Z_angle)*180/math.pi\n", + "\n", + "#Result\n", + "print(\"(a)\\nCurrent waveform--> i = %.2fsin(2pi*%dt-%.1f\u00b0) A\\nPower delivered = %.1f W\"%(Il,f,angle1,P))\n", + "print(\"(b)\\nCurrent waveform--> i = %.2fsin(2pi*%dt+%.1f\u00b0)-%.2fe^(-%dt) A\\nPower delivered = %.1f W\"%(Il,f,angle2,k1,RbyL,P2))\n", + "print(\"(c)\\nCurrent waveform--> i = %.2fsin(2pi*%dt+%.1f\u00b0)-%.2fe^(-%dt) A\\nPower delivered = %.1f W\"%(Il,f,angle3,k2,RbyL,P3))\n", + "#Power answer for (b) and (c) do not match with the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Current waveform--> i = 26.04sin(2pi*50t-46.3\u00b0) A\n", + "Power delivered = 3053.6 W\n", + "(b)\n", + "Current waveform--> i = 26.04sin(2pi*50t+13.7\u00b0)-6.17e^(-300t) A\n", + "Power delivered = 3885.4 W\n", + "(c)\n", + "Current waveform--> i = 26.04sin(2pi*50t+43.7\u00b0)-17.99e^(-300t) A\n", + "Power delivered = 2138.7 W\n" + ] + } + ], + "prompt_number": 200 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.11, Page No. 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Current and voltage ratings\n", + "\n", + "import math\n", + "# variable declaration\n", + "V = 415 # 3-phase input voltage\n", + "f = 50 # frequency\n", + "P = 20*10**3 # output power\n", + "sf = 1.5 # safety factor\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Il = P/(math.sqrt(3)*V)\n", + "Irms = Il*sf\n", + "Irms = math.floor(Irms*100)/100\n", + "Vrms = V*sf\n", + "#(b)\n", + "Irms_thyristor = Il*sf/math.sqrt(2)\n", + "\n", + "#Result\n", + "print(\"(a)\\n Line Current = %.2f A\\n RMS rating of each triac = %.2f A\\n rms voltage rating = %.1f V\"%(Il,Irms,Vrms))\n", + "print(\"\\n(b)\\n Line Current = %.2f A\\n RMS rating of each thyristor = %.2f A\\n rms voltage rating = %.1f V\"%(Il,Irms_thyristor,Vrms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " Line Current = 27.82 A\n", + " RMS rating of each triac = 41.73 A\n", + " rms voltage rating = 622.5 V\n", + "\n", + "(b)\n", + " Line Current = 27.82 A\n", + " RMS rating of each thyristor = 29.51 A\n", + " rms voltage rating = 622.5 V\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.12, Page No.305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output parameters of 3-phase AC regulator\n", + "\n", + "import math\n", + "# variable declaration\n", + "V = 415 # 3-phase input voltage\n", + "R = 15 # load resistance per phase\n", + "alfa = 30 # firing angle\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vrms = V/math.sqrt(3)\n", + "Vl = math.sqrt(3)*(math.sqrt(2)*Vrms)*math.sqrt(((math.pi/6)-((alfa*math.pi)/(180*4))+(math.sin(2*alfa*math.pi/180)/8))/(math.pi))\n", + "Vl = math.floor(Vl*10)/10\n", + "#(b)\n", + "P = (3*Vl**2)/R\n", + "#(c)\n", + "Il = Vl/R\n", + "#(d)\n", + "VA = 3*Vrms*Il\n", + "ipf = P/VA\n", + "\n", + "#Result\n", + "print(\"(a) rms value of input phase voltage = %.1f V\\n Vl = %.1f V\"%(Vrms,Vl))\n", + "print(\"\\n(b) Output power = %.1f W or %.4f kW\\n\\n(c) Line Current = %.2fA\\n\\n(d) input p.f. = %.3f lagging\"%(P,P/1000,Il,ipf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) rms value of input phase voltage = 239.6 V\n", + " Vl = 234.3 V\n", + "\n", + "(b) Output power = 10979.3 W or 10.9793 kW\n", + "\n", + "(c) Line Current = 15.62A\n", + "\n", + "(d) input p.f. = 0.978 lagging\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 6.13, Page No. 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# output parameters of 3-phase AC regulator\n", + "\n", + "import math\n", + "# variable declaration\n", + "V = 415 # 3-phase input voltage\n", + "R = 15 # load resistance per phase\n", + "alfa = 60 # firing angle\n", + "\n", + "#Calculations\n", + "#(a)\n", + "Vrms = V/math.sqrt(3)\n", + "#Vrms = math.floor(Vrms*10)/10\n", + "Vl = math.sqrt(3)*(1.414*Vrms)*math.sqrt(((3.141/6)-((alfa*3.141)/(180*4))+(math.sin(2*alfa*3.141/180)/8))/(math.pi))\n", + "#pi value = 3.141 to match the answer in the book\n", + "Vl = math.floor(Vl*100)/100\n", + "#(b)\n", + "P = (3*Vl**2)/R\n", + "#(c)\n", + "Il = Vl/R\n", + "#(d)\n", + "VA = 3*Vrms*Il\n", + "ipf = P/VA\n", + "\n", + "#Result\n", + "print(\"(a) rms value of input phase voltage = %f V\\n Vl = %f V\"%(Vrms,Vl))\n", + "print(\"\\n(b) Output power = %.2f W or %.5f kW\\n\\n(c) Line Current = %.3fA\\n\\n(d) input p.f. = %.2f lagging\"%(P,P/1000,Il,ipf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) rms value of input phase voltage = 239.600362 V\n", + " Vl = 201.390000 V\n", + "\n", + "(b) Output power = 8111.59 W or 8.11159 kW\n", + "\n", + "(c) Line Current = 13.426A\n", + "\n", + "(d) input p.f. = 0.84 lagging\n" + ] + } + ], + "prompt_number": 109 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb new file mode 100755 index 00000000..7288e1e0 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb @@ -0,0 +1,204 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Cycloconverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 7.1, Page No.319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# input voltage, SCR ratings and input power factors\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 250 # single phase supply voltage \n", + "I = 50 # supply current\n", + "pf = 0.8 # lagging power factor\n", + "alfa = 0 # ideal SCR\n", + "\n", + "#calculations\n", + "x = math.sqrt(2)\n", + "x = math.floor(x*1000)/1000\n", + "Vm = (V*math.pi*x)/(3*math.sin(math.pi/3))\n", + "Vrms = Vm/math.sqrt(2)\n", + "Irms = I*math.sqrt(2)/math.sqrt(3)\n", + "y = math.sqrt(3)\n", + "y = math.floor(y*1000)/1000\n", + "piv = y*Vm\n", + "piv = math.floor(piv*100)/100\n", + "Ii = math.sqrt((I**2)/3)\n", + "pipp = V*I*pf/3.0\n", + "pf_i = pipp/(Vrms*Ii)\n", + "\n", + "#Result\n", + "print(\"Vm = %f V\\nrms current rating of thyristor = %.1f A\\nPIV = %.2fV\\nRMS value of input current = %.1f A\"%(Vm,math.ceil(Irms),piv,Ii))\n", + "print(\"Power input per phase = %.2f W\\nInput power factor = %.3f lagging.\"%(pipp,pf_i))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vm = 427.452050 V\n", + "rms current rating of thyristor = 41.0 A\n", + "PIV = 740.34V\n", + "RMS value of input current = 28.9 A\n", + "Power input per phase = 3333.33 W\n", + "Input power factor = 0.382 lagging.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 7.2, Page No. 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#output voltage(referring ex 7.1)\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 250 # single phase supply voltage \n", + "theta1 = 30 # firing angle 1\n", + "theta2 = 45 # firing angle 2\n", + "\n", + "#calculations\n", + "#(a)\n", + "v1 = V*math.cos(theta1*math.pi/180)\n", + "#(b)\n", + "v2 = V*math.cos(theta2*math.pi/180)\n", + "\n", + "#Result\n", + "print(\"(a) RMS value of output voltage = %.1f V\"%v1)\n", + "print(\"(b) RMS value of output voltage = %.2f V\"%v2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value of output voltage = 216.5 V\n", + "(b) RMS value of output voltage = 176.78 V\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 7.3, Page No.320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Output voltage for different firing angle\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vrms = 230 # input voltage\n", + "theta1 = 0 # firing angle 1\n", + "theta2 = 30 # firing angle 2\n", + "\n", + "#calculation\n", + "#(a)\n", + "v1 = 6*math.sqrt(2)*Vrms*math.sin(math.pi/6)*math.cos(theta1*math.pi/180)/(math.pi*math.sqrt(2))\n", + "#(b)\n", + "v2 = 6*math.sqrt(2)*Vrms*math.sin(math.pi/6)*math.cos(theta2*math.pi/180)/(math.pi*math.sqrt(2))\n", + "\n", + "\n", + "#Result\n", + "print(\"(a) Vo = %.2f V\\n(b) Vo = %.1f V\"%(v1,v2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Vo = 219.63 V\n", + "(b) Vo = 190.2 V\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 7.4, Page No.320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# supply voltage\n", + "\n", + "import math\n", + "#variable declaration\n", + "Vo = 200 # output voltage\n", + "\n", + "#Calculation\n", + "Vi = Vo*(math.pi/3)/math.sin(math.pi/3)\n", + "\n", + "#Result\n", + "print(\"RMS value of input voltage = %.2f V \"%Vi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of input voltage = 241.84 V \n" + ] + } + ], + "prompt_number": 38 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb new file mode 100755 index 00000000..2f3270f0 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb @@ -0,0 +1,576 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Applications of Thyristors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.1, Page No. 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Crowbar circuit(refering to fig8.2)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vz = 14.8 # zener breakdown voltage\n", + "Vt = 0.85 # thyristor trigger voltage\n", + "\n", + "# Calculations \n", + "Vi = Vz+Vt\n", + "\n", + "#Result \n", + "print(\"Thyrister will be turned on when voltage across R is %.2f V.\"%Vt)\n", + "print(\"Since zener breakdown at %.1f V, the crowbar circuit will be turned on when\\nVi = %.2f V\"%(Vz,Vi))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thyrister will be turned on when voltage across R is 0.85 V.\n", + "Since zener breakdown at 14.8 V, the crowbar circuit will be turned on when\n", + "Vi = 15.65 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.2, Page No. 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Crowbar circuit(refering to fig.8.2) \n", + "\n", + "import math\n", + "Rz = 15.0 # resistance of zener diode under breakdown condition\n", + "Ig = 20*10**-3 # gate triggering current of thyristor\n", + "Vz = 14.8 # zener breakdown voltage\n", + "Vt = 0.85 # thyristor trigger voltage\n", + "R = 50.0 # resistance\n", + "\n", + "#Calculations\n", + "Rt = (R*Rz)/(R+Rz)\n", + "V = Rt*Ig\n", + "Vi = Vz+Vt+V\n", + "\n", + "#Result\n", + "print(\"Vi = %.3f V\"%Vi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vi = 15.881 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.3, Page No. 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Values of R and C (refering to fig.8.3)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 200 # input voltage\n", + "Il = 10 # load current\n", + "Toff1 = 15*10**-6 # turn off time\n", + "Ih = 4*10**-3 # thyristor holding current\n", + "\n", + "#Calculations\n", + "R = V/Ih\n", + "Rl = V/Il\n", + "C = Toff1/(Rl*math.log(2))\n", + "\n", + "#Result\n", + "print(\"R = %.0f k-ohm\\nC = %.3f*10^-6 F\"%(R/1000,C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 50 k-ohm\n", + "C = 1.082*10^-6 F\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.4, Page No. 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# duty cycle and Ton/Toff ratio\n", + "\n", + "import math\n", + "# Variable declaration\n", + "V = 230.0 # input voltage\n", + "R = 60.0 # load resistance\n", + "P1 = 400.0 # output ppower in case 1\n", + "P2 = 700.0 # output ppower in case 2\n", + "\n", + "#Calculations\n", + "Pmax = (V**2)/R\n", + "#(a)\n", + "alfa = P1/Pmax\n", + "Ton = alfa\n", + "Toff= 1-Ton\n", + "r = Ton/Toff\n", + "#(b)\n", + "alfa2 = P2/Pmax\n", + "Ton2 = alfa2\n", + "Toff2= 1-Ton2\n", + "r2= Ton2/Toff2\n", + "\n", + "#Result\n", + "print(\"Maximum power output = %.2f W\\n\\n(a)\\n Duty cycle = %.4f\\n Ton/Toff = %.4f\"%(Pmax,alfa,math.ceil(r*10000)/10000))\n", + "print(\"\\n(b)\\n Duty cycle = %.3f\\n Ton/Toff = %.3f\"%(alfa2,math.ceil(r2*1000)/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power output = 881.67 W\n", + "\n", + "(a)\n", + " Duty cycle = 0.4537\n", + " Ton/Toff = 0.8305\n", + "\n", + "(b)\n", + " Duty cycle = 0.794\n", + " Ton/Toff = 3.854\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.5, Page No.333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Output RMS voltage\n", + "\n", + "import math\n", + "# Variable declaration\n", + "Ton = 12.0 # circuit is on for 12 cycles\n", + "Toff = 19.0 # circuit is on for 19 cycles\n", + "V = 230.0 # input voltage\n", + "\n", + "#calcualtions\n", + "d = Ton/(Ton+Toff)\n", + "Vrms = V*math.sqrt(d)\n", + "\n", + "#Result\n", + "print(\"RMS output voltage = %.1f V\"%Vrms)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS output voltage = 143.1 V\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.6, Page No. 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Power supplied to heater\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230 # input voltage\n", + "R = 50 # load resistance\n", + "alfa1 = 90 # firing angle for case 1\n", + "alfa2 = 120 # firing angle for case 2\n", + "\n", + "#Calculations\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = V*sqrt_2\n", + "\n", + "#(a)\n", + "Vl = Vm*math.sqrt((math.pi-(alfa1*math.pi/180)+((math.sin(2*alfa1*math.pi/180))/2.0))/(2*math.pi))\n", + "P = (Vl**2)/R\n", + "\n", + "#(b)\n", + "Vl2 = Vm*math.sqrt((math.pi-(alfa2*math.pi/180)+((math.sin(2*alfa2*math.pi/180))/2.0))/(2*math.pi))\n", + "P2 = (Vl**2)/R\n", + "\n", + "#Result\n", + "print(\"(a) when alfa = %.0f\u00b0,\\n Power = %.2fW\"%(alfa1,Vl))\n", + "print(\"\\n(b) when alfa = %.0f\u00b0,\\n Power = %.2fW\"%(alfa2,Vl2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) when alfa = 90\u00b0,\n", + " Power = 162.61W\n", + "\n", + "(b) when alfa = 120\u00b0,\n", + " Power = 101.68W\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.7, Page No.333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# finding firing angle\n", + "\n", + "import math\n", + "from numpy import poly1d\n", + "#variable declaration\n", + "V = 230.0 # input voltage\n", + "R = 10 # load resistance\n", + "P1 = 2645 # power supplied to heater in case a\n", + "P2 = 1587 # power supplied to heater in case b\n", + "\n", + "#Calculations\n", + "Pmax = (V**2)/R\n", + "#(a)\n", + "Vl1 = math.floor((math.sqrt(P1*R))*100)/100\n", + "#After solving equation using taylor seris of X, we got following coefficient. \n", + "P1 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*(1-(Vl1/V)**2))], variable = 'x')\n", + "x1 = P1.r[(P1.order+1)/2]*180/math.pi\n", + "alfa1 = x1.real\n", + "#(b)\n", + "Vl2 = math.floor((math.sqrt(P2*R))*1000)/1000\n", + "P2 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*0.762500)], variable = 'x')\n", + "# hardcoded value used to match the answer to the book\n", + "x2 = P2.r[(P2.order+1)/2]*180/math.pi\n", + "alfa2 = x2.real\n", + "\n", + "#Result\n", + "print(\"(a) firing angle = %.0f\u00b0\"%math.ceil(alfa1))\n", + "print(\"(b) firing angle = %.1f\u00b0\"%(alfa2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) firing angle = 90\u00b0\n", + "(b) firing angle = 108.6\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.8, Page No. 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# current rating and Peak Inverse Voltage of each thyristor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400 # 3-phase input voltage\n", + "P = 20*10**3 # load \n", + "\n", + "#Calculations\n", + "#(a)\n", + "# since load is resistive, theta = 0\u00b0,therefore, cos(theta) = 1\n", + "I = P/(math.sqrt(3)*V)\n", + "PIV = V*math.sqrt(2)\n", + "PIV = math.floor(PIV*10)/10\n", + "#(b)\n", + "Ir = I/math.sqrt(2)\n", + "Ir = math.ceil(Ir*100)/100\n", + "#Result\n", + "print(\"(a)\\n I = %.2f A\\n During off state, line to line voltage can appear across triac. Hence current rating is %.2f A and\"%(I,I))\n", + "print(\" peak inverse voltage = %.1f V\"%PIV)\n", + "print(\"\\n(b)\\n Each thyristor conducts for every half cycle.\\n current rating = %.2f A\\n Peak inverse voltage is the same i.e. %.1f V\"%(Ir,PIV))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " I = 28.87 A\n", + " During off state, line to line voltage can appear across triac. Hence current rating is 28.87 A and\n", + " peak inverse voltage = 565.6 V\n", + "\n", + "(b)\n", + " Each thyristor conducts for every half cycle.\n", + " current rating = 20.42 A\n", + " Peak inverse voltage is the same i.e. 565.6 V\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.9, Page No.338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# applied voltage and current\n", + "\n", + "import math\n", + "#variable declaration\n", + "t = 5*10**-2 # insulating slab thickness\n", + "A = 100*10**-4 # insulating slab area\n", + "P = 300 # power \n", + "f = 10*10**6 # frequency\n", + "eps = 8.85*10**-12 # permitivity of free space\n", + "eps_r = 4.5 # relative permitivity\n", + "pf = 0.05 # power factor\n", + "\n", + "#Calculation\n", + "C = eps*eps_r*A/t\n", + "pi =math.floor(math.pi*100)/100\n", + "w = 2*pi*f\n", + "fi = (math.acos(pf))*(180/math.pi)\n", + "sig =90-fi\n", + "sig = math.ceil(sig*1000)/1000\n", + "sig = sig*math.pi/180\n", + "V = math.sqrt(P/(w*C*math.tan(sig)))\n", + "I = P/(V*pf)\n", + "\n", + "#Result\n", + "print(\"V = %.1f V\\nI = %.2f A\"%(V,I))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 3461.2 V\n", + "I = 1.73 A\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.10, Page No. 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# power input and current\n", + "\n", + "import math\n", + "# Variable declaration\n", + "t = 1*10**-2 # insulating slab thickness\n", + "A = 50*10**-4 # insulating slab area\n", + "V = 400 # input voltage \n", + "f = 20*10**6 # frequency\n", + "eps = 8.85*10**-12 # permitivity of free space\n", + "eps_r = 5 # relative permitivity\n", + "pf = 0.05 # power factor\n", + "\n", + "#Calculation\n", + "C = eps*eps_r*A/t\n", + "w = 2*math.pi*f\n", + "fi = (math.acos(pf))*(180/math.pi)\n", + "sig =90-fi\n", + "sig = math.ceil(sig*1000)/1000\n", + "sig = sig*math.pi/180\n", + "P = (V**2)*(w*C*math.tan(sig))\n", + "I = P/(V*pf)\n", + "\n", + "#Result\n", + "print(\"P = %.2f W\\nI = %.4f A\"%(P,I))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P = 22.27 W\n", + "I = 1.1135 A\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 8.11, Page No. 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# voltage of the source and current input\n", + "\n", + "import math\n", + "#variable declaration\n", + "t = 2 # insulating slab thickness\n", + "A = 75 # insulating slab area\n", + "T1 = 20 # lower temperature\n", + "T2 = 50 # Higher temperature\n", + "Time = 7*60 # time \n", + "f = 20*10**6 # frequency\n", + "eps = 8.85*10**-12 # permitivity of free space\n", + "eps_r =6.5 # relative permitivity\n", + "sh = 0.25 # specific heat\n", + "den = 0.55 # density\n", + "pf = 0.04 # power factor\n", + "\n", + "#Calculations\n", + "C = eps*eps_r*A*10**-4/(t*10**-2)\n", + "w = 2*math.pi*f\n", + "fi = (math.acos(pf))*(180/math.pi)\n", + "sig =90-fi\n", + "sig = math.ceil(sig*1000)/1000\n", + "sig = sig*math.pi/180\n", + "\n", + "m = A*t*den\n", + "H = m*sh*(T2-T1)\n", + "TH = H/0.9\n", + "Ei = TH*4.186\n", + "P = Ei/Time\n", + "P = math.floor(P*100)/100\n", + "V = math.sqrt(P/(w*C*pf))\n", + "V = math.ceil(V*100)/100\n", + "I = P/(V*pf)\n", + "I = math.floor(I*1000)/1000\n", + "#Result\n", + "print(\"V = %.2f V\\nI = %.3f A\"%(V,I))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 251.35 V\n", + "I = 0.681 A\n" + ] + } + ], + "prompt_number": 86 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb new file mode 100755 index 00000000..9cc8b752 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb @@ -0,0 +1,1255 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: DC and AC Motor Drives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.1, Page No. 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Field current, firing angle and power factor\n", + "\n", + "import math\n", + "# Variable delcaration\n", + "V= 230.0 # input supply voltage\n", + "f = 50.0 # supply frequency\n", + "alfa_f = 0 # firing angle for semi-converter for field\n", + "Rf = 200.0 # field resistance\n", + "Ra = 0.3 # Armature resistance\n", + "T = 50.0 # torque\n", + "r = 900.0 # rpm\n", + "vc = 0.8 # voltage constant\n", + "tc = 0.8 # torque constant\n", + "\n", + "#Calculations\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = V*sqrt_2\n", + "Vf = (2*Vm/math.pi)*math.cos(alfa_f)\n", + "If = Vf/Rf\n", + "If = math.floor(If*10**4)/10**4\n", + "#(b)\n", + "Ia = T/(tc*If)\n", + "Ia = math.ceil(Ia*1000)/1000\n", + "w = r*2*math.pi/60\n", + "w = math.ceil(w*1000)/1000\n", + "back_emf =vc*w*If\n", + "back_emf = math.floor(back_emf*100)/100\n", + "Va = back_emf+Ia*Ra\n", + "Va = math.floor(Va*1000)/1000\n", + "alfa = math.acos((Va*math.pi/(Vm))-1)\n", + "alfa_a = alfa*180/math.pi\n", + "alfa_a = math.floor(alfa_a*1000)/1000\n", + "#(c)\n", + "P = Va*Ia\n", + "Ii = Ia*math.sqrt((180-alfa_a)/180)\n", + "Ii = math.floor(Ii*100)/100\n", + "VA = V*Ii\n", + "pf = P/VA\n", + "\n", + "\n", + "#Result\n", + "print(\"(a) Field current = %.4f A\\n(b) Alfa_a = %.3f\u00b0\\n(c) Input power factor = %.3f lagging\"%(If,alfa_a,pf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Field current = 1.0352 A\n", + "(b) Alfa_a = 94.076\u00b0\n", + "(c) Input power factor = 0.605 lagging\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.2, Page No.378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Torque developed and motor speed\n", + "\n", + "import math\n", + "# Variable delcaration\n", + "V= 230.0 # input supply voltage\n", + "f = 50.0 # supply frequency\n", + "alfa_f = 0 # firing angle of converter in the field\n", + "Rf = 200.0 # field resistance\n", + "Ra = 0.25 # Armature resistance\n", + "Ia = 50 # Armature current\n", + "vc = 1.1 # voltage constant\n", + "tc = 1.1 # torque constant\n", + "alfa_a = 45 # firing angle of armature ciruit\n", + "\n", + "#Calculations\n", + "alfa_a = alfa_a*math.pi/180\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = V*sqrt_2\n", + "Vf = 2*Vm*math.cos(alfa_f)/math.pi\n", + "Va = 2*Vm*math.cos(alfa_a)/math.pi\n", + "If = Vf/Rf\n", + "If = math.floor(If*10**4)/10**4\n", + "T = tc*Ia*If\n", + "bemf = Va- Ia*Ra - 2\n", + "w = bemf/(vc*If)\n", + "N = w*60/(2*math.pi)\n", + "\n", + "#Result\n", + "print(\"Torque = %.3f N-m\\n\\nMotor Speed = %.1f rpm\"%(T,N))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque = 56.936 N-m\n", + "\n", + "Motor Speed = 1106.1 rpm\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.3, Page No. 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# firing angle of the converter in the armature circuit\n", + "\n", + "import math\n", + "V = 400 # input 3-phase supply\n", + "alfa_f = 0 # firing angle of field converter\n", + "Ra = 0.3 # Armature resistance\n", + "Rf = 250 # field resistance\n", + "Ia = 50 # Armature current\n", + "vc = 1.3 # motor voltage constant\n", + "N = 1200 # speed in rpm\n", + "\n", + "#Calculations\n", + "Vf = 3*math.sqrt(3)*V*math.sqrt(2)*math.cos(alfa_f)/(math.sqrt(3)*math.pi)\n", + "If = Vf/Rf\n", + "w = N*2*math.pi/60\n", + "Eb = vc*If*w\n", + "Va = Eb+Ia*Ra\n", + "alfa_a = math.acos(Va*math.sqrt(3)*math.pi/(3*V*math.sqrt(2)*math.sqrt(3)))\n", + "alfa_a = alfa_a*180/math.pi\n", + "alfa_a = math.ceil(alfa_a*100)/100\n", + "#Result\n", + "print(\"Alfa_a = %.2f\u00b0\"%alfa_a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Alfa_a = 47.07\u00b0\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.4, Page No. 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# input power, speed and torque\n", + "\n", + "import math\n", + "# Variable declaration\n", + "V = 500 # input supply voltage\n", + "Ra = 0.1 # Armature resistance\n", + "Ia = 200.0 # Armature current\n", + "vc = 1.4 # Volatage constant\n", + "tc = 1.4 # Torque constant\n", + "If = 2 # Field current\n", + "d = 0.5 # chopper duty cycle\n", + "\n", + "# Calculations\n", + "#(a)\n", + "Pi = d*V*Ia\n", + "#(b)\n", + "Va = V*d\n", + "Eb = Va - Ia*Ra\n", + "w = Eb/(vc*If)\n", + "w = math.floor(w*100)/100\n", + "N = w*60/(2*math.pi)\n", + "#(c)\n", + "T = tc*Ia*If\n", + "\n", + "#Result\n", + "print(\"(a) Power input = %.0f kW \\n(b) Speed = %.2f rpm\\n(c) Torque = %.0f N-m\"%(Pi/1000,N,T))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Power input = 50 kW \n", + "(b) Speed = 784.38 rpm\n", + "(c) Torque = 560 N-m\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.5, Page No. 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Braking DC motor using one quadrant chopper\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ra = 0.1 # Armature resistance\n", + "Rb = 7.5 # Breaking resistance\n", + "vc = 1.4 # voltage constant\n", + "Ia = 120 # armature current\n", + "If = 1.6 # field current\n", + "d = 0.35 # chopper duty cycle\n", + "\n", + "#calculations\n", + "#(a)\n", + "Vavg = Rb*Ia*(1-d)\n", + "#(b)\n", + "Pb = (Ia**2)*Rb*((1-d)**2)\n", + "#(c)\n", + "Eb = Vavg+Ra*Ia\n", + "w = Eb/(vc*If)\n", + "w = math.ceil(w*100)/100\n", + "N = w*60/(2*math.pi)\n", + "\n", + "#Result\n", + "print(\"(a) Average voltage across chopper = %.0f V\\n(b) Pb = %.0f W\\n(c) Speed = %.4f rpm \"%(Vavg,Pb,N))\n", + "#Answer for Pb and Speed is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average voltage across chopper = 585 V\n", + "(b) Pb = 45630 W\n", + "(c) Speed = 2545.0785 rpm \n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.6, Page No. 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Speed -Torque characteristics\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 220.0 # per phase input voltage\n", + "f = 50 # frequency\n", + "L = 0.012 # motor inductance\n", + "R = 0.72 # Resistance\n", + "a = 2 # Armature constant\n", + "alfa = 90 # firing angle\n", + "\n", + "#Calculations\n", + "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3=math.floor(math.sqrt(3)*1000)/1000\n", + "Va = 3*sqrt_3*V*sqrt_2*(1+math.cos(alfa*math.pi/180))/(2*math.pi)\n", + "Va = math.floor(Va*100)/100\n", + "Ia1 = 5 # Armature current for case 1\n", + "T1 = Ia1*a\n", + "Eb1 =Va-Ia1*R\n", + "Speed1 = Eb1*60/(a*2*math.pi) \n", + "Speed1 = math.floor(Speed1*100)/100\n", + "\n", + "Ia2 = 10 # Armature current for case 2\n", + "T2 = Ia2*a\n", + "Eb2 =Va-Ia2*R\n", + "Speed2 = Eb2*60/(a*2*math.pi) \n", + "Speed2 = math.floor(Speed2*100)/100\n", + "\n", + "Ia3 = 20 # Armature current for case 3\n", + "T3 = Ia3*a\n", + "Eb3 =Va-Ia3*R\n", + "Speed3 = Eb3*60/(a*2*math.pi) \n", + "Speed3 = math.floor(Speed3*100)/100\n", + "\n", + "Ia4 = 30 # Armature current for case 4\n", + "T4 = Ia4*a\n", + "Eb4 =Va-Ia4*R\n", + "Speed4 = Eb4*60/(a*2*math.pi) \n", + "Speed4 = math.floor(Speed4*100)/100\n", + "\n", + "#Result\n", + "print(\"Armature Voltage =%f V\"%Va)\n", + "print(\"For Ia =0%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia1,T1,Speed1))\n", + "print(\"For Ia =%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia2,T2,Speed2))\n", + "print(\"For Ia =%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia3,T3,Speed3))\n", + "print(\"For Ia =%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia4,T4,Speed4))\n", + "#################-----PLOT-----#####################\n", + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "t = [T1, T2, T3, T4]\n", + "S = [Speed1, Speed2, Speed3, Speed4 ]\n", + "plt.plot(t,S)\n", + "plt.plot(t,S,'ro')\n", + "plt.axis([0,70,0,1500])\n", + "plt.xlabel('Torque(N-m)')\n", + "plt.ylabel('Speed(RPM)')\n", + "plt.title('Speed torque characteristics')\n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature Voltage =257.250000 V\n", + "For Ia =05 A, Torque = 10 N-m and Speed = 1211.08 rpm\n", + "For Ia =10 A, Torque = 20 N-m and Speed = 1193.90 rpm\n", + "For Ia =20 A, Torque = 40 N-m and Speed = 1159.52 rpm\n", + "For Ia =30 A, Torque = 60 N-m and Speed = 1125.14 rpm\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEZCAYAAABrUHmEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVOW+B/DvAKN44SKog8ygY4DCyEUUcevxMqaAWqJp\nUpiKl2qbu9LsnLROFnYBup3SdrS74GW7My/1hGZKmIpaGhhgbEUTERSGSykgIiAC7/mDzQoUZIEw\nMPr9PM88z7qv3xplfedd6501CiGEABERkQxmHV0AERGZDoYGERHJxtAgIiLZGBpERCQbQ4OIiGRj\naBARkWwMDeqU9Ho9oqOjO7qMdnU3HWNERASeeOKJVq1rZWWFrKysti2I2g1Dgxr48ccfMXr0aNja\n2sLe3h5jxozBL7/8YvQ6FAoFFApFo/PCwsIwb948I1fU9m53jMa0YMECrF69+o628eKLL+Kzzz5r\ndrnGgvLq1avQarV3tH8yHouOLoA6j5KSEjz44IP45JNPEBwcjOvXr+PIkSPo2rVr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D3kotER8fj23btkk33duDXq/H9u3bO/2vyJHp\nYUuDqBXu5H6BXq9Henq69OW+tpaamgoXFxcGBrULtjSIiEg2tjSIiEg2hgYREcnG0CAiItkYGkRE\nJBtDg4iIZGNoEBGRbP8P+4nVQNPl4qUAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.7, Page No. 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Firing angle and no load speed\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400 # input 3-phase voltage\n", + "f = 50 # frequency\n", + "Ia = 50 # motor armature current\n", + "Ra = 0.1 # armature resistance\n", + "bec = 0.3 # back emf constant\n", + "alfa = 30.0 # firing angle\n", + "Inl = 5 # no load current\n", + "n = 1600 # speed in rpm \n", + "\n", + "#Calculations\n", + "#(a)\n", + "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3=math.floor(math.sqrt(3)*100)/100\n", + "Va = 3*sqrt_3*V*sqrt_2*(1+math.cos(alfa*math.pi/180))/(sqrt_3*2*math.pi)\n", + "Bemf = Va-Inl*Ra\n", + "Speed = Bemf/bec\n", + "#(b)\n", + "Bemf2 = n*bec\n", + "Vi = Bemf2+(Ra*Ia)\n", + "alfa2= math.acos((Vi/(3*sqrt_3*V*sqrt_2/(sqrt_3*2*math.pi)))-1)\n", + "alfa2 = alfa2*180/math.pi\n", + "\n", + "#Result\n", + "print(\"(a)\\nAverage output voltage of rectifier = %.1f V\\nBack emf = %.1f V\\nSpeed = %d rpm\"%(math.floor(Va*10)/10,Bemf,Speed))\n", + "print(\"\\n(b)\\nBack emf = %.0f V\\nInput voltage to motor = %.0f V\\nfiring angle = %.2f\u00b0\"%(Bemf2,Vi,alfa2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Average output voltage of rectifier = 503.9 V\n", + "Back emf = 503.4 V\n", + "Speed = 1678 rpm\n", + "\n", + "(b)\n", + "Back emf = 480 V\n", + "Input voltage to motor = 485 V\n", + "firing angle = 37.26\u00b0\n" + ] + } + ], + "prompt_number": 147 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.8, Page No. 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#firing angle of converter and power fed back to source(refering ex.9.2)\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V= 230.0 # input supply voltage\n", + "f = 50.0 # supply frequency\n", + "alfa_f = 0 # firing angle of converter in the field\n", + "Rf = 200.0 # field resistance\n", + "Ra = 0.25 # Armature resistance\n", + "Ia = 50 # Armature current\n", + "vc = 1.1 # voltage constant\n", + "tc = 1.1 # torque constant\n", + "alfa_a = 45 # firing angle of armature ciruit\n", + "\n", + "#Calculations\n", + "alfa_a = alfa_a*math.pi/180\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "Vm = V*sqrt_2\n", + "Vf = 2*Vm*math.cos(alfa_f)/math.pi\n", + "Va1 = 2*Vm*math.cos(alfa_a)/math.pi\n", + "bemf = Va1- Ia*Ra - 2\n", + "Eg = -bemf\n", + "Va = Eg + Ia*Ra +2\n", + "alfa = math.acos(Va*math.pi/(2*sqrt_2*V))\n", + "alfa = alfa*180/math.pi\n", + "P = -Va*Ia\n", + "\n", + "#Result\n", + "print(\"When field current is reversed, the direction of back emf is reversed. The motor now acts as generator.\\n\\nEg = %f\"%Eg)\n", + "print(\"\\nAlfa = %.2f\u00b0\\n\\nPower fed back to source = %d W\"%(alfa,P))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When field current is reversed, the direction of back emf is reversed. The motor now acts as generator.\n", + "\n", + "Eg = -131.900436\n", + "\n", + "Alfa = 124.54\u00b0\n", + "\n", + "Power fed back to source = 5870 W\n" + ] + } + ], + "prompt_number": 152 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.9, Page No.381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Half controlled single phase bridge converter\n", + "\n", + "import math\n", + "#variable declaration\n", + "V = 240 # input DC voltage\n", + "alfa = 100 # firing angle \n", + "Ra = 6 # armature Resistance\n", + "Ia = 1.8 # armature current\n", + "\n", + "#Calculations\n", + "alfa = alfa*math.pi/180\n", + "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n", + "Vdc = sqrt_2*V*(1+math.cos(alfa))/math.pi\n", + "Vdc = math.floor(Vdc*100)/100\n", + "Bemf = Vdc-Ra*Ia\n", + "\n", + "#Result\n", + "print(\"Back emf = %.2f V\"%Bemf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Back emf = 78.46 V\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.10, Page No.381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Speed and Torue\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 230.0 # input voltage\n", + "N = 1500.0 # rpm \n", + "Ra = 1.0 # armature resistance\n", + "Ia = 10 # Armature current\n", + "T1 = 5 # Torque for case-1\n", + "alfa1 = 30 # Firing angle for case-1\n", + "N2 = 950.0 # rpm in case-2\n", + "alfa2 = 45 # Firing angle for case-2\n", + "\n", + "#Calculations\n", + "w = N*2*math.pi/60\n", + "k = (V-Ia*Ra)/w\n", + "k = math.floor(k*10)/10\n", + "#(a)\n", + "Ia1 = T1/k\n", + "V1 = 2*V*math.sqrt(2)*math.cos(alfa1*math.pi/180)/math.pi\n", + "V1 = math.floor(V1*10)/10\n", + "w1 = (V1-Ia1*Ra)/k\n", + "w1 = w1*60/(2*math.pi)\n", + "#(b)\n", + "V2 = 2*V*math.sqrt(2)*math.cos(alfa2*math.pi/180)/math.pi\n", + "V2 = math.ceil(V2*100)/100\n", + "Ia2 = V2-(k*N2*2*math.pi/60)\n", + "#Ia2 = math.floor(Ia2*100)/100\n", + "T2 = k*Ia2\n", + "\n", + "#Result\n", + "print(\"k - Torque constant = %.1f N-m/A\"%k)\n", + "print(\"\\n(a) Speed = %.1f rpm\\n\\n(b) Torque = %f N-m\"%(w1,T2))\n", + "#Answer for torque is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k - Torque constant = 1.4 N-m/A\n", + "\n", + "(a) Speed = 1198.6 rpm\n", + "\n", + "(b) Torque = 10.013816 N-m\n" + ] + } + ], + "prompt_number": 177 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.11, Page No.382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# rms source, rms and average thyristor current and power factor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 500.0 # Morot max. voltage rating\n", + "N = 1500.0 # motor max. speed in rpm\n", + "Ia = 100.0 # Motor max. current\n", + "Vi = 350.0 # 3-phase input supply voltage\n", + "Ra = 1.1 # armature resistance\n", + "alfa = 45 # firing angle\n", + "N1 = 1200.0 # actual speed \n", + "\n", + "#Calculations\n", + "w = N*2*math.pi/60\n", + "w1 = N1*2*math.pi/60\n", + "k = (V-Ia*Ra)/w\n", + "k = math.floor(k*10**4)/10**4\n", + "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n", + "sqrt_3=math.floor(math.sqrt(3)*100)/100\n", + "Va = 3*sqrt_3*Vi*sqrt_2*(1+math.cos(alfa*math.pi/180))/(sqrt_3*2*3.142)#--math.pi = 3.142 to match the ans\n", + "Va = math.ceil(Va*100)/100\n", + "Ia = (Va -k*w1)/Ra\n", + "Ia = math.ceil(Ia*100)/100\n", + "Irms_i = Ia*math.sqrt(120.0/180.0)\n", + "Iavg = Ia/3\n", + "Irms = Ia/math.sqrt(3)\n", + "pf = (Ia*Va)/(sqrt_3*Vi*Irms_i)\n", + "\n", + "#Result\n", + "print(\"Torque constant, k = %.2f V-s/rad\\n\\n(a)\\nConverter output voltage = %.2f V\\nIa = %.2f A \"%(k,Va,Ia))\n", + "print(\"\\n(b)\\nRMS input current = %.2f A\\nAverage thyristor current = %.2f A\\nRMS thyristor current = %.2f A\"%(Irms_i,Iavg,Irms))\n", + "print(\"Input power factor = %.3f lagging\"%(math.floor(pf*1000)/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque constant, k = 2.48 V-s/rad\n", + "\n", + "(a)\n", + "Converter output voltage = 403.34 V\n", + "Ia = 83.04 A \n", + "\n", + "(b)\n", + "RMS input current = 67.80 A\n", + "Average thyristor current = 27.68 A\n", + "RMS thyristor current = 47.94 A\n", + "Input power factor = 0.815 lagging\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.12, Page No.383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# time taken by motor to reach 1000rpm speed\n", + "\n", + "import math\n", + "#Variable declaration\n", + "T = 40 # Load torque\n", + "N = 500.0 # motor speed \n", + "i = 0.01 # inertia of the drive\n", + "T1 = 100.0 # increased value of torque\n", + "N1 = 1000.0 # speed value\n", + "\n", + "#Calculations\n", + "w = N*2*math.pi/60\n", + "w1 = N1*2*math.pi/60\n", + "A = -w/((T1-T)/i)\n", + "t = (w1/((T1-T)/i))+A\n", + "t = math.floor(t*10**6)/10**6\n", + "\n", + "#Result\n", + "print(\"Time taken by motor to reach 1000 rpm speed = %f seconds\"%t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken by motor to reach 1000 rpm speed = 0.008726 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.13, Page No.384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# motor parameters:motor driven by DC chopper\n", + "\n", + "import math\n", + "#Variavble declaration\n", + "f = 400.0 # chopper operating frequency\n", + "V = 200.0 # input voltage\n", + "T = 30.0 # load torque\n", + "N = 1000.0 # speed in rpm\n", + "Ra = 0.2 # motor resistance\n", + "L = 2*10**-3 # motor inductance\n", + "emf = 1.5 # emf\n", + "k = 1.5 # torque constant\n", + "\n", + "#calculations\n", + "\n", + "w = N*math.pi*2/60\n", + "Ia = T/k\n", + "Be = emf*w\n", + "Be = math.ceil(Be*100)/100\n", + "alfa = (Be+Ia*Ra)/V\n", + "\n", + "t = 1/f\n", + "Ton = alfa*t\n", + "Toff = t-Ton\n", + "x = t*Ra/L\n", + "b1 = (1-(math.e**(-alfa*x)))\n", + "b1 = math.ceil(b1*10**4)/10**4\n", + "b2 = (1-(math.e**(-x)))\n", + "b2 = math.ceil(b2*10**4)/10**4\n", + "Imax = ((V/Ra)*(b1/b2))-(Be/Ra)\n", + "Imin= ((V/Ra)*(((math.e**(alfa*x))-1)/(((math.e**(x))-1))))-(Be/Ra)\n", + "x1 = (V-Be)/Ra\n", + "x2 = Ra/L\n", + "\n", + "#Result\n", + "print(\"(a)\\nImax = %.3f A\\nImin = %d A\\n\\n(b) Excursion of armature current = %.3f A\"%(Imax,Imin,Imax))\n", + "print(\"\\n(c)\\nVariation of cuurent during on period of chopper is \\ni = %.1f*(1-e^(-%d*t'))\"%(x1,x2))\n", + "print(\"\\nVariation of cuurent during off period of chopper is \\ni = %.3f*e^(-%d*t')-%.1f*(1-e^(-%d*t'))\"%(Imax,x2,Be/Ra,x2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Imax = 39.193 A\n", + "Imin = 0 A\n", + "\n", + "(b) Excursion of armature current = 39.193 A\n", + "\n", + "(c)\n", + "Variation of cuurent during on period of chopper is \n", + "i = 214.6*(1-e^(-100*t'))\n", + "\n", + "Variation of cuurent during off period of chopper is \n", + "i = 39.193*e^(-100*t')-785.4*(1-e^(-100*t'))\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.14, Page No.391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Average motor current and speed\n", + "\n", + "import math\n", + "# Variable declaration\n", + "f = 50.0 # input frequency\n", + "V = 230 # input voltage\n", + "Ra = 1.5 # armature resistance\n", + "Rf = 1.5 # field resistance\n", + "K = 0.25 # torque constant\n", + "TL = 25 # load torque\n", + "emf = 0.25 # emf constant\n", + "\n", + "#Calculations\n", + "Vo = 2*math.sqrt(2)*V/math.pi\n", + "Vo = math.floor(Vo)\n", + "Ia = math.sqrt(T/K)\n", + "Ia = math.floor(Ia)\n", + "w = (Vo-Ia*Ra)/(emf*Ia)\n", + "N =w*60/(2*math.pi)\n", + "N = math.floor(N*100)/100\n", + "\n", + "#Result\n", + "print(\"Ia = %d A\\nN = %.2f RPM\"%(Ia,N))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ia = 10 A\n", + "N = 733.38 RPM\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.15, Page No.391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Armature current and firing angle of semi-converter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vo = 675.0 # transformer secondary voltage\n", + "alfa1 = 90.5 # case 1 firing angle\n", + "N1 = 350.0 # case 1 motor speed in rpm\n", + "Ia1 = 30.0 # case 1 armature current\n", + "N2 = 500.0 # expected speed\n", + "Ra = 0.22 # armature resistance\n", + "Rf = 0.22 # field resistance\n", + "\n", + "#Calculations\n", + "Ia2 = Ia1*N2/N1\n", + "Ia2 = math.ceil(Ia2*100)/100\n", + "Va1 = Vo*math.sqrt(2)*(1+math.cos(alfa1*math.pi/180))/math.pi\n", + "Eb1 = Va1-(Ia1*(Ra+Rf))\n", + "Va2 = (Eb1/((Ia1*N1)/(Ia2*N2)))+Ia2*(Ra+Rf)\n", + "alfa2 = math.acos(((Va2*math.pi)/(math.sqrt(2)*Vo))-1)\n", + "alfa2 = alfa2*180/math.pi\n", + "\n", + "#Result\n", + "print(\"Armature current = %.2f A\\n\\nFiring Angle = %.2f\u00b0\"%(Ia2,alfa2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature current = 42.86 A\n", + "\n", + "Firing Angle = 4.77\u00b0\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.16, Page No. 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Torque and armature current\n", + "\n", + "import math\n", + "# Variable declaration\n", + "P = 15.0 # motor power rating\n", + "V = 220.0 # motor voltage rating\n", + "N = 1500.0 # motor max. speed\n", + "Vi = 230.0 # input voltage\n", + "emf = 0.03 # emf constant\n", + "K = 0.03 # Torque constant\n", + "alfa =45 # firing angle\n", + "\n", + "#Calculations\n", + "#(a)\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "alfa = alfa*math.pi/180\n", + "Vm = Vi*sqrt_2\n", + "N = N*2*math.pi/60\n", + "T = (4*emf*(Vm**2)*(math.cos(alfa)**2))/(((math.pi)**2)*(K*N)**2)\n", + "Ia = math.sqrt(T/K)\n", + "Ia = math.floor(Ia*100)/100\n", + "#(b)\n", + "Ia2 = Vm*(1+math.cos(alfa))/(math.pi*K*N)\n", + "Ia2 = math.floor(Ia2*10)/10\n", + "T2 = K*Ia2**2\n", + "\n", + "#Result\n", + "print(\"(a)\\n Torque = %.2f N-m\\n Armature current = %.2f A\"%(T,Ia))\n", + "print(\"\\n(b)\\n Armature current = %.1f A\\n Torque = %.4f N-m\"%(Ia2,T2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " Torque = 28.96 N-m\n", + " Armature current = 31.06 A\n", + "\n", + "(b)\n", + " Armature current = 37.5 A\n", + " Torque = 42.1875 N-m\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.17, Page No.392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# motor current and Torque \n", + "\n", + "import math\n", + "# variable declaration\n", + "Pr = 15.0 # motor power rating\n", + "Vr = 220.0 # motor voltage rating\n", + "N = 1000.0 # motor max. speed\n", + "R = 0.2 # total armature and series resistance\n", + "Vi = 230.0 # input voltage\n", + "Ks = 0.03 # speed constant\n", + "K = 0.03 # Torque constant\n", + "alfa = 30 # Firing angle\n", + "\n", + "#Calculation\n", + "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n", + "alfa = alfa*math.pi/180\n", + "Vm = Vi*sqrt_2\n", + "N = N*2*math.pi/60\n", + "N = math.ceil(N*100)/100\n", + "V = Vm*(1+math.cos(alfa))/math.pi\n", + "V = math.floor(V*100)/100\n", + "Ia = V/((Ks*N)+R)\n", + "Ia = math.floor(Ia*1000)/1000\n", + "T = K*(Ia*Ia)\n", + "\n", + "# Result\n", + "print(\"Armature current = %.3f A\\n\\nTorque = %.2f N-m\"%(Ia,T))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature current = 57.807 A\n", + "\n", + "Torque = 100.25 N-m\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.18, Page No. 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# load torque, rotor current and stator voltage\n", + "\n", + "import math\n", + "# Variable declaration\n", + "V = 400.0 # motor voltage rating\n", + "p = 4.0 # no of poles\n", + "f = 50.0 # frequency\n", + "r1 = 0.64 # Stator resistance \n", + "x1 = 1.1 # leakage resistance\n", + "r2 = 0.08 # rotor resistance\n", + "x2 = 0.12 # leakage resistance\n", + "T = 40.0 # Torque at given speed\n", + "N1 = 1440.0 # Speed value for given torque\n", + "N2 = 1300.0 # Speed value for which torque is asked to calculate\n", + "\n", + "#Calculations\n", + "#(a)\n", + "ns = 60*2*f/p\n", + "Tl = T*(N2/N1)**2\n", + "Tl = math.floor(Tl*10)/10\n", + "#(b)\n", + "s = (ns -N2)/ns\n", + "r2_dash = r2*(2)**2\n", + "x2_dash = x2*(2)**2\n", + "pi = math.floor(math.pi*100)/100\n", + "I2_dash = math.sqrt((Tl*2*pi*s*(ns/60))/(3*r2_dash)) \n", + "I2 = 2*I2_dash\n", + "#(c)\n", + "I1 = I2_dash\n", + "V1 = I1*math.sqrt(((r1+r2_dash+r2_dash*((1-s)/s))**2)+(x1+x2_dash)**2)\n", + "StV = V1*math.sqrt(3)\n", + "\n", + "#Result\n", + "print(\"(a) At %d rpm , Load torque = %.1f N-m\\n(b) Rotor current = %.2f A\\n(c) Stator voltage = %.1f V\"%(N2,Tl,I2,StV))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) At 1300 rpm , Load torque = 32.6 N-m\n", + "(b) Rotor current = 53.32 A\n", + "(c) Stator voltage = 158.2 V\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 2.19, Page No. 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# slip for max torque, speed and corresponding max torque\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V = 400.0 # motor voltage rating\n", + "p = 4.0 # no of poles\n", + "f = 50.0 # frequency\n", + "r1 = 0.64 # Stator resistance \n", + "x1 = 1.1 # leakage resistance\n", + "r2 = 0.08 # rotor resistance\n", + "x2 = 0.12 # leakage resistance\n", + "T = 40.0 # Torque at given speed\n", + "N1 = 1440.0 # Speed value for given torque\n", + "N2 = 1300.0 # Speed value for which torque is asked to calculate\n", + "f1 = 50 # case 1 frequency\n", + "f2 = 25 # case 2 frequency\n", + "\n", + "#Calculation\n", + "#(a)\n", + "ns = 2*f1/p\n", + "r2_dash = r2*(2)**2\n", + "x2_dash = x2*(2)**2\n", + "s = r2_dash/math.sqrt(r1**2+(x1+x2_dash)**2)\n", + "s = math.floor(s*10000)/10000\n", + "V1 = V/math.sqrt(3)\n", + "V1 = math.ceil(V1*100)/100\n", + "Tmax = (1.5*V1**2/(2*math.pi*ns))*(1/(r1+math.sqrt(r1**2+(x1+x2_dash)**2)))\n", + "Tmax = math.floor(Tmax*10)/10\n", + "n = ns*(1-s)\n", + "N = n*60\n", + "#(b)\n", + "x1_b = x1/2\n", + "x2_dash_b = x2_dash/2\n", + "s2 = r2_dash/math.sqrt(r1**2+(x1_b+x2_dash_b)**2)\n", + "s2 = math.floor(s2*10000)/10000\n", + "ns2 = 2*f2/p\n", + "V1_b = V1*0.5\n", + "Tmax2 = (1.5*V1_b**2/(2*math.pi*ns2))*(1/(r1+math.sqrt(r1**2+(x1_b+x2_dash_b)**2)))\n", + "n2 = ns2*(1-s2)\n", + "N2 = n2*60\n", + "\n", + "#Result\n", + "print(\"(a) for f = %d Hz\\n\\nslip = %.4f\\n\\nTmax = %.1f N-m\\n\\nSpeed corresponds to max torque = %.2f rpm\"%(f1,s,Tmax,N))\n", + "print(\"\\n\\n(b) for f = %d Hz\\n\\nslip = %.4f\\n\\nTmax = %.2f N-m\\n\\nSpeed corresponds to max torque = %.3f rpm\"%(f2,s2,Tmax2,N2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) for f = 50 Hz\n", + "\n", + "slip = 0.1877\n", + "\n", + "Tmax = 217.2 N-m\n", + "\n", + "Speed corresponds to max torque = 1218.45 rpm\n", + "\n", + "\n", + "(b) for f = 25 Hz\n", + "\n", + "slip = 0.3147\n", + "\n", + "Tmax = 153.72 N-m\n", + "\n", + "Speed corresponds to max torque = 513.975 rpm\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example 9.20, Page No. 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Starting torque\n", + "\n", + "import math\n", + "# Variable declaration\n", + "V = 400.0 # motor voltage rating\n", + "p = 4.0 # no of poles\n", + "f = 50.0 # frequency\n", + "r1 = 0.64 # Stator resistance \n", + "x1 = 1.1 # leakage resistance\n", + "r2 = 0.08 # rotor resistance\n", + "x2 = 0.12 # leakage resistance\n", + "T = 40.0 # Torque at given speed\n", + "N1 = 1440.0 # Speed value for given torque\n", + "N2 = 1300.0 # Speed value for which torque is asked to calculate\n", + "f1 = 50 # case 1 frequency\n", + "f2 = 25 # case 2 frequency\n", + "\n", + "#Calculation\n", + "#(a)\n", + "ns = 2*f1/p\n", + "r2_dash = r2*(2)**2\n", + "x2_dash = x2*(2)**2\n", + "#s = r2_dash/math.sqrt(r1**2+(x1+x2_dash)**2)\n", + "#s = math.floor(s*10000)/10000\n", + "V1 = V/math.sqrt(3)\n", + "V1 = math.ceil(V1*100)/100\n", + "Tstarting = (3*(V1**2)*(r2_dash))/(2*math.pi*ns*((r1+r2_dash)**2+(x1+x2_dash)**2))\n", + "#(b)\n", + "x1_b = x1/2\n", + "x2_dash_b = x2_dash/2\n", + "#s2 = math.floor(s2*10000)/10000\n", + "ns2 = 2*f2/p\n", + "V1_b = V1*0.5\n", + "Tstarting_b = (3*(V1_b**2)*(r2_dash))/(2*math.pi*ns2*((r1+r2_dash)**2+(x1_b+x2_dash_b)**2))\n", + "\n", + "#Result\n", + "print(\"(a) for %d Hz,\\nT_starting = %.2f N-m\"%(f1,Tstarting))\n", + "print(\"\\n(b) for %d Hz,\\nT_starting = %.2f N-m\"%(f2,Tstarting_b))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) for 50 Hz,\n", + "T_starting = 95.37 N-m\n", + "\n", + "(b) for 25 Hz,\n", + "T_starting = 105.45 N-m\n" + ] + } + ], + "prompt_number": 57 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/README.txt b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/README.txt new file mode 100755 index 00000000..95f5f179 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/README.txt @@ -0,0 +1,10 @@ +Contributed By: Anay Sonawane +Course: btech +College/Institute/Organization: Wavelet group +Department/Designation: E&tc +Book Title: Power Electronics +Author: Dr. B R Gupta, V Singhal +Publisher: S.K.Kataria and sons, New Delhi +Year of publication: 2010 +Isbn: 81-85749-53-1 +Edition: 6 \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture.png new file mode 100755 index 00000000..fea874d6 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture1.png new file mode 100755 index 00000000..28481be5 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture1.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture2.png new file mode 100755 index 00000000..f52a294c Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture2.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2.png new file mode 100755 index 00000000..9380fbcb Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_1.png new file mode 100755 index 00000000..9380fbcb Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_1.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_2.png new file mode 100755 index 00000000..9380fbcb Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_2.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_3.png new file mode 100755 index 00000000..9380fbcb Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_3.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_4.png new file mode 100755 index 00000000..9380fbcb Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_4.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3.png new file mode 100755 index 00000000..cef740d3 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_1.png new file mode 100755 index 00000000..cef740d3 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_1.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_2.png new file mode 100755 index 00000000..cef740d3 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_2.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_3.png new file mode 100755 index 00000000..cef740d3 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_3.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_4.png new file mode 100755 index 00000000..cef740d3 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_4.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4.png new file mode 100755 index 00000000..a1d64cf1 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_1.png new file mode 100755 index 00000000..a1d64cf1 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_1.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_2.png new file mode 100755 index 00000000..a1d64cf1 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_2.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_3.png new file mode 100755 index 00000000..a1d64cf1 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_3.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_4.png new file mode 100755 index 00000000..a1d64cf1 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_4.png differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2.PNG new file mode 100755 index 00000000..abb82616 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2.PNG differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2_1.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2_1.PNG new file mode 100755 index 00000000..abb82616 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2_1.PNG differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9.PNG new file mode 100755 index 00000000..49309df8 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9.PNG differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9_1.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9_1.PNG new file mode 100755 index 00000000..49309df8 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9_1.PNG differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6.PNG new file mode 100755 index 00000000..f5604a90 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6.PNG differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6_1.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6_1.PNG new file mode 100755 index 00000000..f5604a90 Binary files /dev/null and b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6_1.PNG differ diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter10.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter10.ipynb new file mode 100755 index 00000000..cbc3cb90 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter10.ipynb @@ -0,0 +1,228 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Cycloconverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page No 594" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "R=10.0\n", + "a=30.0\n", + "\n", + "#Calculations\n", + "V_or=(V_m/math.sqrt(2))*math.sqrt((1/math.pi)*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2))\n", + "I_or=V_or/R \n", + "I_s=I_or\n", + "pf=(I_or**2*R)/(V_s*I_s) \n", + "\n", + "\n", + "#Results\n", + "print(\"rms value of o/p current=%.2f A\" %I_or)\n", + "print(\"rms value of o/p current for each convertor=%.2f A\" %(I_or/math.sqrt(2)))\n", + "print(\"rms value of o/p current for each thyristor=%.3f A\" %(I_or/2))\n", + "print(\"i/p pf=%.4f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p current=22.67 A\n", + "rms value of o/p current for each convertor=16.03 A\n", + "rms value of o/p current for each thyristor=11.333 A\n", + "i/p pf=0.9855\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page No 604" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_ph=V_s/2\n", + "a=160.0\n", + "\n", + "#Calculations\n", + "r=math.cos(math.radians(180-a))\n", + "m=3\n", + "V_or=r*(V_ph*(m/math.pi)*math.sin(math.pi/m)) \n", + "R=2\n", + "X_L=1.5\n", + "th=math.degrees(math.atan(X_L/R))\n", + "Z=math.sqrt(R**2+X_L**2)\n", + "I_or=V_or/Z \n", + "P=I_or**2*R \n", + "\n", + "#Results\n", + "print(\"rms o/p voltage=%.3f V\" %V_or)\n", + "print(\"rms o/p current=%.2f A\" %I_or)\n", + "print(\"phase angle of o/p current=%.2f deg\" %-th)\n", + "print(\"o/p power=%.2f W\" %P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms o/p voltage=155.424 V\n", + "rms o/p current=62.17 A\n", + "phase angle of o/p current=-36.87 deg\n", + "o/p power=7730.11 W\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No 604" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_ph=V_s/2\n", + "V_l=V_ph*math.sqrt(3)\n", + "a=160.0\n", + "\n", + "#Calculations\n", + "r=math.cos(math.radians(180-a))\n", + "m=6\n", + "V_or=r*(V_l*(m/math.pi)*math.sin(math.pi/m)) \n", + "R=2\n", + "X_L=1.5\n", + "th=math.degrees(math.atan(X_L/R))\n", + "Z=math.sqrt(R**2+X_L**2)\n", + "I_or=V_or/Z \n", + "P=I_or**2*R \n", + "\n", + "#Results\n", + "print(\"rms o/p voltage=%.2f V\" %V_or)\n", + "print(\"rms o/p current=%.2f A\" %I_or)\n", + "print(\"phase angle of o/p current=%.2f deg\" %-th)\n", + "print(\"o/p power=%.2f W\" %P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms o/p voltage=310.85 V\n", + "rms o/p current=124.34 A\n", + "phase angle of o/p current=-36.87 deg\n", + "o/p power=30920.44 W\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page No 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_l=400.0\n", + "V_ml=math.sqrt(2)*V_l\n", + "m=6\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=.0012\n", + "I=40.0\n", + "\n", + "#Calculations\n", + "V_or1=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n", + "V_omx1=V_or1-3*w*L*I/math.pi\n", + "V_rms1=V_omx1/math.sqrt(2) \n", + "a2=30.0\n", + "V_or2=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n", + "V_omx2=V_or2-3*w*L*I/math.pi\n", + "V_rms2=V_omx2/math.sqrt(2) \n", + "\n", + "\n", + "#Results\n", + "print(\"for firing angle=0deg\")\n", + "a1=0\n", + "print(\"rms value of load voltage=%.2f V\" %V_rms2)\n", + "print(\"for firing angle=30deg\")\n", + "print(\"rms value of load voltage=%.2f V\" %V_rms2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=0deg\n", + "rms value of load voltage=-369.12 V\n", + "for firing angle=30deg\n", + "rms value of load voltage=-369.12 V\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter11.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter11.ipynb new file mode 100755 index 00000000..d2317d28 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter11.ipynb @@ -0,0 +1,299 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Some Applications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page No 622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=11000.0\n", + "V_ml=math.sqrt(2)*V_s\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "I_d=300\n", + "R_d=1\n", + "g=20 #g=gamma\n", + "a=math.degrees(math.acos(math.cos(math.radians(g))+math.pi/(3*V_ml)*I_d*R_d)) \n", + "L_s=.01\n", + "V_d=(3/math.pi)*((V_ml*math.cos(math.radians(a)))-w*L_s*I_d) \n", + "\n", + "#Results\n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"rectifier o/p voltage=%.1f V\" %V_d)\n", + "print(\"dc link voltage=%.3f V\" %(2*V_d/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle=16.283 deg\n", + "rectifier o/p voltage=13359.3 V\n", + "dc link voltage=26.719 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page No 623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_d=(200.0+200)*10**3\n", + "P=1000.0*10**6\n", + "\n", + "#Calculations\n", + "I_d=P/V_d\n", + " #each thristor conducts for 120deg for a periodicity of 360deg\n", + "a=0\n", + "V_d=200.0*10**3\n", + "V_ml=V_d*math.pi/(3*math.cos(math.radians(a)))\n", + "\n", + "#Results\n", + "print(\"rms current rating of thyristor=%.2f A\" %(I_d*math.sqrt(120/360)))\n", + "print(\"peak reverse voltage across each thyristor=%.2f kV\" %(V_ml/2/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms current rating of thyristor=0.00 A\n", + "peak reverse voltage across each thyristor=104.72 kV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No 627" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_m=230.0\n", + "V_s=230/math.sqrt(2)\n", + "pf=0.8\n", + "P=2000.0\n", + "\n", + "#Calculations\n", + "I_m=P/(V_s*pf)\n", + "I_Tr=I_m/math.sqrt(2)\n", + "I_TA=2*I_m/math.pi\n", + "fos=2 #factor of safety\n", + "PIV=V_m*math.sqrt(2)\n", + "I_Tr=I_m/(2)\n", + "I_TA=I_m/math.pi\n", + "\n", + "#Results\n", + "print(\"rms value of thyristor current=%.2f A\" %(fos*I_Tr))\n", + "print(\"avg value of thyristor current=%.3f A\" %(fos*I_TA))\n", + "print(\"voltage rating of thyristor=%.2f V\" %PIV)\n", + "print(\"rms value of diode current=%.3f A\" %(fos*I_Tr))\n", + "print(\"avg value of diode current=%.3f A\" %(fos*I_TA))\n", + "print(\"voltage rating of diode=%.2f V\" %PIV)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of thyristor current=15.37 A\n", + "avg value of thyristor current=9.786 A\n", + "voltage rating of thyristor=325.27 V\n", + "rms value of diode current=15.372 A\n", + "avg value of diode current=9.786 A\n", + "voltage rating of diode=325.27 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, Page No 629" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=200.0\n", + "I=10.0\n", + "\n", + "#Calculations\n", + "R_L=V/I \n", + "I_h=.005 #holding current\n", + "R2=V/I_h \n", + "t_c=20*10**-6\n", + "fos=2 #factor of safety\n", + "C=t_c*fos/(R_L*math.log(2)) \n", + "\n", + "#Results\n", + "print(\"value of load resistance=%.0f ohm\" %R_L)\n", + "print(\"value of R2=%.0f kilo-ohm\" %(R2/1000))\n", + "print(\"value of C=%.3f uF\" %(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of load resistance=20 ohm\n", + "value of R2=40 kilo-ohm\n", + "value of C=2.885 uF\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "u_r=10\n", + "f=10000.0 #Hz\n", + "p=4.0*10**-8 #ohm-m\n", + "\n", + "#Calculations\n", + "dl=(1/(2*math.pi))*math.sqrt(p*10**7/(u_r*f)) \n", + "l=0.12 #length of cylinder\n", + "t=20.0 #no of turns\n", + "I=100.0\n", + "H=t*I/l\n", + "P_s=2*math.pi*H**2*math.sqrt(u_r*f*p*10**-7) \n", + "d=.02 #diameter\n", + "P_v=4*H**2*p/(d*dl) \n", + "\n", + "#Results\n", + "print(\"depth of heat of penetration=%.5f mm\" %(dl*1000))\n", + "print(\"heat generated per unit cylinder surface area=%.3f W/m**2\" %P_s)\n", + "print(\"heat generated per unit cylinder volume=%.0f W/m**3\" %P_v)\n", + " #answer of P_v varies as given in book as value of d is not taken as in formulae. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of heat of penetration=0.31831 mm\n", + "heat generated per unit cylinder surface area=34906.585 W/m**2\n", + "heat generated per unit cylinder volume=6981317 W/m**3\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=3000.0\n", + "\n", + "#Calculations\n", + "t_qmin=30.0*10**-6\n", + "f_r=f/(1-2*t_qmin*f)\n", + "R=0.06\n", + "L=20.0*10**-6\n", + "C=1/(L*((2*math.pi*f_r)**2+(R/(2*L))**2)) \n", + "\n", + "#Results\n", + "print(\"required capacitor size=%.4f F\" %(C*10**6))\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required capacitor size=94.2215 F\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter12.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter12.ipynb new file mode 100755 index 00000000..f8605d69 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter12.ipynb @@ -0,0 +1,1997 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Electic Drives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page No 658" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_e=15.0 #Nm\n", + "K_m=0.5 #V-s/rad\n", + "I_a=T_e/K_m\n", + "n_m=1000.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*n_m/60\n", + "E_a=K_m*w_m\n", + "r_a=0.7\n", + "V_t=E_a+I_a*r_a\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=math.degrees(math.acos(2*math.pi*V_t/V_m-1))\n", + "print(\"firing angle delay=%.3f deg\" %a)\n", + "I_Tr=I_a*math.sqrt((180-a)/360) \n", + "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n", + "I_fdr=I_a*math.sqrt((180+a)/360) \n", + "print(\"rms value of freewheeling diode current=%.3f A\" %I_fdr)\n", + "pf=V_t*I_a/(V_s*I_Tr) \n", + "\n", + "#Results \n", + "print(\"input power factor=%.4f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=65.349 deg\n", + "rms value of thyristor current=16.930 A\n", + "rms value of freewheeling diode current=24.766 A\n", + "input power factor=0.5652\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, Page No 660" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "E=150.0\n", + "R=8.0\n", + "\n", + "#Calculations\n", + "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n", + "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n", + "P=E*I_o \n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n", + "P_r=I_or**2*R \n", + "pf=(P+P_r)/(V*I_or)\n", + "\n", + "#Results\n", + "print(\"avg charging curent=%.4f A\" %I_o)\n", + "print(\"power supplied to the battery=%.2f W\" %P)\n", + "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n", + "print(\"supply pf=%.3f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg charging curent=3.5679 A\n", + "power supplied to the battery=535.18 W\n", + "power dissipated by the resistor=829.760 W\n", + "supply pf=0.583\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No 661" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=250\n", + "V_m=math.sqrt(2)*V_s\n", + "a=30.0\n", + "k=0.03 #Nm/A**2\n", + "n_m=1000.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*n_m/60\n", + "r=.2 #r_a+r_s\n", + "V_t=V_m/math.pi*(1+math.cos(math.radians(a)))\n", + "I_a=V_t/(k*w_m+r) \n", + "print(\"motor armature current=%.2f A\" %I_a)\n", + "T_e=k*I_a**2 \n", + "print(\"motor torque=%.3f Nm\" %T_e)\n", + "I_sr=I_a*math.sqrt((180-a)/180)\n", + "pf=(V_t*I_a)/(V_s*I_sr) \n", + "\n", + "#Results\n", + "print(\"input power factor=%.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor armature current=57.82 A\n", + "motor torque=100.285 Nm\n", + "input power factor=0.92\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4, Page No 663" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "V_f=2*V_m/math.pi\n", + "r_f=200.0\n", + "I_f=V_f/r_f\n", + "T_e=85.0\n", + "K_a=0.8\n", + "\n", + "#Calculations\n", + "I_a=T_e/(I_f*K_a) \n", + "print(\"rated armature current=%.2f A\" %I_a)\n", + "n_m=1200.0\n", + "w_m=2*math.pi*n_m/60\n", + "r_a=0.2\n", + "V_t=K_a*I_f*w_m+I_a*r_a\n", + "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n", + "print(\"firing angle delay=%.2f deg\" %a)\n", + "E_a=V_t\n", + "w_mo=E_a/(K_a*I_f)\n", + "N=60*w_mo/(2*math.pi)\n", + "reg=((N-n_m)/n_m)*100 \n", + "print(\"speed regulation at full load=%.2f\" %reg)\n", + "I_ar=I_a\n", + "pf=(V_t*I_a)/(V_s*I_ar) \n", + "print(\"input power factor of armature convertor=%.4f\" %pf)\n", + "I_fr=I_f\n", + "I_sr=math.sqrt(I_fr**2+I_ar**2)\n", + "VA=I_sr*V_s\n", + "P=V_t*I_a+V_f*I_f\n", + "\n", + "#Results\n", + "print(\"input power factor of drive=%.4f\" %(P/VA))\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rated armature current=59.01 A\n", + "firing angle delay=57.63 deg\n", + "speed regulation at full load=6.52\n", + "input power factor of armature convertor=0.4821\n", + "input power factor of drive=0.5093\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No 664" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "V_f=2*V_m/math.pi\n", + "\n", + "#Calculations\n", + "a1=math.degrees(math.acos(V_t*math.pi/(2*V_m))) \n", + "print(\"delay angle of field converter=%.0f deg\" %a1)\n", + "r_f=200.0\n", + "I_f=V_f/r_f\n", + "T_e=85.0\n", + "K_a=0.8\n", + "I_a=T_e/(I_f*K_a)\n", + "n_m=1200.0\n", + "w_m=2*math.pi*n_m/60\n", + "r_a=0.1\n", + "I_a=50.0\n", + "V_t=-K_a*I_f*w_m+I_a*r_a\n", + "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n", + "\n", + "#Results\n", + "print(\"firing angle delay of armature converter=%.3f deg\" %a)\n", + "print(\"power fed back to ac supply=%.0f W\" %(-V_t*I_a))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delay angle of field converter=58 deg\n", + "firing angle delay of armature converter=119.260 deg\n", + "power fed back to ac supply=8801 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No 665" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=220.0\n", + "n_m=1500.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=10.0\n", + "r_a=1.0\n", + "\n", + "#Calculations\n", + "K_m=(V_t-I_a*r_a)/(w_m)\n", + "T=5.0\n", + "I_a=T/K_m\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=30.0\n", + "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", + "w_m=(V_t-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "print(\"motor speed=%.2f rpm\" %N)\n", + "a=45\n", + "n_m=1000\n", + "w_m=2*math.pi*n_m/60\n", + "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", + "I_a=(V_t-K_m*w_m)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"torque developed=%.3f Nm\" %T_e)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor speed=1254.22 rpm\n", + "torque developed=8.586 Nm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7, Page No 666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=220.0\n", + "n_m=1000.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=60.0\n", + "r_a=.1\n", + "\n", + "#Calculations\n", + "K_m=(V_t-I_a*r_a)/(w_m)\n", + "V_s=230\n", + "V_m=math.sqrt(2)*V_s\n", + "print(\"for 600rpm speed\")\n", + "n_m=600.0\n", + "w_m=2*math.pi*n_m/60\n", + "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m))) \n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"for -500rpm speed\")\n", + "n_m=-500.0\n", + "w_m=2*math.pi*n_m/60\n", + "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m)))\n", + "print(\"firing angle=%.2f deg\" %a)\n", + "I_a=I_a/2\n", + "a=150\n", + "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", + "w_m=(V_t-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"motor speed=%.3f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for 600rpm speed\n", + "firing angle=49.530 deg\n", + "for -500rpm speed\n", + "firing angle=119.19 deg\n", + "motor speed=-852.011 rpm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page No 672" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.5\n", + "T_e=50.0\n", + "I_a=T_e/K_m\n", + "r_a=0.9\n", + "a=45.0\n", + "V_s=415.0\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(2)*V_s\n", + "w_m=((3*V_ml*(1+math.cos(math.radians(a)))/(2*math.pi))-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"motor speed=%.2f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor speed=2854.42 rpm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page No 672" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_t=600\n", + "n_m=1500.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=80.0\n", + "r_a=1.0\n", + "\n", + "#Calculations\n", + "K_m=(V_t-I_a*r_a)/(w_m)\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "print(\"for firing angle=45deg and speed=1200rpm\")\n", + "a=45.0\n", + "n_m=1200.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n", + "I_sr=I_a*math.sqrt(2/3) \n", + "print(\"rms value of source current=%.3f A\" %I_sr)\n", + "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(1/3)))\n", + "print(\"avg value of thyristor current=%.2f A\" %I_a*(1/3))\n", + "pf=(3/(2*math.pi)*(1+math.cos(math.radians(a)))) \n", + "print(\"input power factor=%.3f\" %pf)\n", + "\n", + "print(\"for firing angle=90deg and speed=700rpm\")\n", + "a=90\n", + "n_m=700\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n", + "I_sr=I_a*math.sqrt(90/180) \n", + "\n", + "\n", + "#Results\n", + "print(\"rms value of source current=%.3f A\" %I_sr)\n", + "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(90.0/360)))\n", + "print(\"avg value of thyristor current=%.3f A\" %I_a*(1/3))\n", + "pf=(math.sqrt(6)/(2*math.pi)*(1+math.cos(math.radians(a))))*math.sqrt(180/(180-a)) \n", + "print(\"input power factor=%.4f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=45deg and speed=1200rpm\n", + "rms value of source current=0.000 A\n", + "rms value of thyristor current=0.000 A\n", + "\n", + "input power factor=0.815\n", + "for firing angle=90deg and speed=700rpm\n", + "rms value of source current=0.000 A\n", + "rms value of thyristor current=195.558 A\n", + "\n", + "input power factor=0.5513\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page No 676" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=30\n", + "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n", + "I_a=21.0\n", + "r_a=.1\n", + "V_d=2.0\n", + "K_m=1.6\n", + "\n", + "#Calculations\n", + "w_m=(V_t-I_a*r_a-V_d)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "print(\"speed of motor=%.1f rpm\" %N)\n", + "\n", + "N=2000\n", + "w_m=2*math.pi*N/60\n", + "I_a=210\n", + "V_t=K_m*w_m+I_a*r_a+V_d\n", + "a=math.degrees(math.acos(V_t*math.pi/(3*V_m)))\n", + "print(\"firing angle=%.2f deg\" %a)\n", + "I_sr=I_a*math.sqrt(2.0/3.0)\n", + "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n", + "print(\"supply power factor=%.3f\" %pf)\n", + "\n", + "I_a=21\n", + "w_m=(V_t-I_a*r_a-V_d)/K_m\n", + "n=w_m*60/(2*math.pi)\n", + "reg=(n-N)/N*100 \n", + "\n", + "#Results\n", + "print(\"speed regulation(percent)=%.2f\" %reg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed of motor=2767.6 rpm\n", + "firing angle=48.48 deg\n", + "supply power factor=0.633\n", + "speed regulation(percent)=5.64\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11, Page No 677" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=230.0\n", + "V_l=V_t*math.pi/(3*math.sqrt(2))\n", + "V_ph=V_l/math.sqrt(3)\n", + "V_in=400 #per phase voltage input\n", + "\n", + "#Calculations\n", + "N1=1500.0\n", + "I_a1=20.0\n", + "r_a1=.6\n", + "E_a1=V_t-I_a1*r_a1\n", + "n1=1000.0\n", + "E_a2=E_a1/1500.0*1000.0\n", + "V_t1=E_a1+I_a1*r_a1\n", + "a1=math.degrees(math.acos(V_t1*math.pi/(3*math.sqrt(2.0)*V_l)))\n", + "I_a2=.5*I_a1\n", + "n2=-900.0\n", + "V_t2=n2*E_a2/N1+I_a2*r_a1\n", + "a2=math.degrees(math.acos(V_t2*math.pi/(3*math.sqrt(2)*V_l))) \n", + "\n", + "#Results\n", + "print(\"transformer phase turns ratio=%.3f\" %(V_in/V_ph))\n", + "print(\"for motor running at 1000rpm at rated torque\")\n", + "print(\"firing angle delay=%.2f deg\" %a1)\n", + "print(\"for motor running at -900rpm at half of rated torque\")\n", + "print(\"firing angle delay=%.3f deg\" %a2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transformer phase turns ratio=4.068\n", + "for motor running at 1000rpm at rated torque\n", + "firing angle delay=0.00 deg\n", + "for motor running at -900rpm at half of rated torque\n", + "firing angle delay=110.674 deg\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12, Page No 678" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=400\n", + "V_ml=math.sqrt(2)*V_s\n", + "V_f=3*V_ml/math.pi\n", + "R_f=300.0\n", + "I_f=V_f/R_f\n", + "T_e=60.0\n", + "k=1.1\n", + "\n", + "#Calculations\n", + "I_a=T_e/(k*I_f)\n", + "N1=1000.0\n", + "w_m1=2*math.pi*N1/60\n", + "r_a1=.3\n", + "V_t1=k*I_f*w_m1+I_a*r_a1\n", + "a1=math.degrees(math.acos(V_f*math.pi/(3*V_ml)))\n", + "N2=3000\n", + "w_m2=2*math.pi*N/60\n", + "a2=0\n", + "V_t2=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "I_f2=(V_t2-I_a*r_a)/(w_m2*k)\n", + "V_f2=I_f2*R_f\n", + "a2=math.degrees(math.acos(V_f2*math.pi/(3*V_ml)))\n", + "\n", + "#Results\n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"firing angle=%.3f deg\" %a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle=48.477 deg\n", + "firing angle=48.477 deg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13, Page No 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + " #after calculating\n", + " #t=w_m/6000-math.pi/360\n", + "\n", + "N=1000.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "t=w_m/6000-math.pi/360 \n", + "\n", + "#Results\n", + "print(\"time reqd=%.2f s\" %t)\n", + " #printing mistake in the answer in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time reqd=0.01 s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14, Page No 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=1.0 #supposition\n", + "a=60.0\n", + "\n", + "#Calculations\n", + "I_s1=2*math.sqrt(2)/math.pi*I_a*math.sin(math.radians(a))\n", + "I_s3=2*math.sqrt(2)/(3*math.pi)*I_a*math.sin(math.radians(3*a))\n", + "I_s5=2*math.sqrt(2)/(5*math.pi)*I_a*math.sin(math.radians(5*a))\n", + "per3=I_s3/I_s1*100 \n", + "print(\"percent of 3rd harmonic current in fundamental=%.2f\" %per3)\n", + "per5=I_s5/I_s1*100 \n", + "\n", + "#Results\n", + "print(\"percent of 5th harmonic current in fundamental=%.2f\" %per5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percent of 3rd harmonic current in fundamental=0.00\n", + "percent of 5th harmonic current in fundamental=-20.00\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15, Page No 680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=60.0\n", + "I_TA=I_a/3 \n", + "\n", + "#Calculations\n", + "print(\"avg thyristor current=%.0f A\" %I_TA)\n", + "I_Tr=I_a/math.sqrt(3) \n", + "print(\"rms thyristor current=%.3f A\" %I_Tr)\n", + "V_s=400\n", + "V_m=math.sqrt(2)*V_s\n", + "I_sr=I_a*math.sqrt(2.0/3)\n", + "a=150\n", + "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n", + "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n", + "print(\"power factor of ac source=%.3f\" %pf)\n", + "\n", + "r_a=0.5\n", + "K_m=2.4\n", + "w_m=(V_t-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"Speed of motor=%.2f rpm\" %N)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg thyristor current=20 A\n", + "rms thyristor current=34.641 A\n", + "power factor of ac source=-0.827\n", + "Speed of motor=-1980.76 rpm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16, Page No 685" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=300.0\n", + "V_s=600.0\n", + "a=0.6\n", + "V_t=a*V_s\n", + "P=V_t*I_a \n", + "\n", + "#Calculations\n", + "print(\"input power from source=%.0f kW\" %(P/1000))\n", + "R_eq=V_s/(a*I_a) \n", + "print(\"equivalent input resistance=%.3f ohm\" %R_eq)\n", + "k=.004\n", + "R=.04+.06\n", + "w_m=(a*V_s-I_a*R)/(k*I_a)\n", + "N=w_m*60/(2*math.pi) \n", + "print(\"motor speed=%.1f rpm\" %N)\n", + "T_e=k*I_a**2 \n", + "\n", + "#Results\n", + "print(\"motor torque=%.0f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "input power from source=108 kW\n", + "equivalent input resistance=3.333 ohm\n", + "motor speed=2626.1 rpm\n", + "motor torque=360 Nm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17, Page No 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_on=10.0\n", + "T_off=15.0\n", + "\n", + "#Calculations\n", + "a=T_on/(T_on+T_off)\n", + "V_s=230.0\n", + "V_t=a*V_s\n", + "r_a=3\n", + "K_m=.5\n", + "N=1500\n", + "w_m=2*math.pi*N/60\n", + "I_a=(V_t-K_m*w_m)/r_a \n", + "\n", + "#Results\n", + "print(\"motor load current=%.3f A\" %I_a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor load current=4.487 A\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18, Page No 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "w_m=0 \n", + "print(\"lower limit of speed control=%.0f rpm\" %w_m)\n", + "I_a=25.0\n", + "r_a=.2\n", + "V_s=220\n", + "K_m=0.08\n", + "\n", + "#Calculations\n", + "a=(K_m*w_m+I_a*r_a)/V_s \n", + "print(\"lower limit of duty cycle=%.3f\" %a)\n", + "a=1 \n", + "print(\"upper limit of duty cycle=%.0f\" %a)\n", + "w_m=(a*V_s-I_a*r_a)/K_m \n", + "\n", + "#Results\n", + "print(\"upper limit of speed control=%.1f rpm\" %w_m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lower limit of speed control=0 rpm\n", + "lower limit of duty cycle=0.023\n", + "upper limit of duty cycle=1\n", + "upper limit of speed control=2687.5 rpm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.21, Page No 691" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.6\n", + "V_s=400.0\n", + "V_t=(1-a)*V_s\n", + "I_a=300.0\n", + "P=V_t*I_a \n", + "\n", + "#Calculations \n", + "print(\"power returned=%.0f kW\" %(P/1000))\n", + "r_a=.2\n", + "K_m=1.2\n", + "R_eq=(1-a)*V_s/I_a+r_a \n", + "print(\"equivalent load resistance=%.4f ohm\" %R_eq)\n", + "w_mn=I_a*r_a/K_m\n", + "N=w_mn*60/(2*math.pi) \n", + "print(\"min braking speed=%.2f rpm\" %N)\n", + "w_mx=(V_s+I_a*r_a)/K_m\n", + "N=w_mx*60/(2*math.pi) \n", + "print(\"max braking speed=%.1f rpm\" %N)\n", + "w_m=(V_t+I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"max braking speed=%.1f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power returned=48 kW\n", + "equivalent load resistance=0.7333 ohm\n", + "min braking speed=477.46 rpm\n", + "max braking speed=3660.6 rpm\n", + "max braking speed=1750.7 rpm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.22, Page No 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "N=1500.0\n", + "\n", + "#Calculations\n", + "print(\"when speed=1455rpm\")\n", + "n=1455.0\n", + "s1=(N-n)/N\n", + "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n", + "print(\"I_2mx/I_2r=%.3f\" %r)\n", + "print(\"when speed=1350rpm\")\n", + "n=1350\n", + "s1=(N-n)/N\n", + "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n", + "\n", + "#Results\n", + "print(\"I_2mx/I_2r=%.3f\" %r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when speed=1455rpm\n", + "I_2mx/I_2r=0.000\n", + "when speed=1350rpm\n", + "I_2mx/I_2r=0.000\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.24, Page No 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V1=400.0\n", + "r1=0.6\n", + "r2=0.4\n", + "s=1.0\n", + "x1=1.6\n", + "x2=1.6\n", + "\n", + "#Calculations\n", + "print(\"at starting in normal conditions\")\n", + "I_n=V1/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n", + "print(\"current=%.2f A\" %I_n)\n", + "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n", + "print(\"pf=%.4f\" %pf)\n", + "f1=50\n", + "w_s=4*math.pi*f1/4\n", + "T_en=(3/w_s)*I_n**2*(r2/s) \n", + "print(\"\\nTorque developed=%.2f Nm\" %T_en)\n", + "print(\"motor is operated with DOL starting\")\n", + "I_d=V1/2/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n", + "print(\"current=%.0f A\" %I_d)\n", + "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n", + "print(\"pf=%.2f\" %pf)\n", + "f1=25\n", + "w_s=4*math.pi*f1/4\n", + "T_ed=(3/w_s)*I_d**2*(r2/s) \n", + "print(\"Torque developed=%.3f Nm\" %T_ed)\n", + "print(\"at max torque conditions\")\n", + "s_mn=r2/math.sqrt((r1)**2+((x1+x2))**2)\n", + "I_n=V1/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n", + "print(\"current=%.3f A\" %I_n)\n", + "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n", + "print(\"pf=%.4f\" %pf)\n", + "f1=50\n", + "w_s=4*math.pi*f1/4\n", + "T_en=(3/w_s)*I_n**2*(r2/s_mn) \n", + "print(\"Torque developed=%.2f Nm\" %T_en)\n", + "print(\"motor is operated with DOL starting\")\n", + "s_mn=r2/math.sqrt((r1)**2+((x1+x2)/2)**2)\n", + "I_d=V1/2/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n", + "print(\"current=%.3f A\" %I_d)\n", + "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n", + "print(\"\\npf=%.3f\" %pf)\n", + "f1=25\n", + "w_s=4*math.pi*f1/4\n", + "T_en=(3/w_s)*I_d**2*(r2/s_mn) \n", + "\n", + "\n", + "#Results \n", + "print(\"Torque developed=%.3f Nm\" %T_en)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "at starting in normal conditions\n", + "current=119.31 A\n", + "pf=0.2983\n", + "\n", + "Torque developed=108.75 Nm\n", + "motor is operated with DOL starting\n", + "current=106 A\n", + "pf=0.53\n", + "Torque developed=171.673 Nm\n", + "at max torque conditions\n", + "current=79.829 A\n", + "pf=0.7695\n", + "Torque developed=396.26 Nm\n", + "motor is operated with DOL starting\n", + "current=71.199 A\n", + "\n", + "pf=0.822\n", + "Torque developed=330.883 Nm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25, Page No 709" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "x1=1.0\n", + "X_m=50.0\n", + "X_e=x1*X_m/(x1+X_m)\n", + "V=231.0\n", + "V_e=V*X_m/(x1+X_m)\n", + "x2=1.0\n", + "r2=.4\n", + "r1=0\n", + "\n", + "#Calculations\n", + "s_m=r2/(x2+X_e) \n", + "print(\"slip at max torque=%.2f\" %s_m)\n", + "s_mT=r2/(x2+X_m) \n", + "print(\"slip at max torque=%.5f\" %s_mT)\n", + "f1=50.0\n", + "w_s=4*math.pi*f1/4\n", + "print(\"for constant voltage input\")\n", + "T_est=(3/w_s)*(V_e/math.sqrt(r2**2+(x2+X_e)**2))**2*(r2) \n", + "print(\"starting torque=%.3f Nm\" %T_est)\n", + "T_em=(3/w_s)*V_e**2/(2*(x2+X_e)) \n", + "print(\"maximum torque developed=%.2f Nm\" %T_em)\n", + "print(\"for constant current input\")\n", + "I1=28\n", + "T_est=(3/w_s)*(I1*X_m)**2/(r2**2+(x2+X_m)**2)*r2 \n", + "print(\"starting torque=%.3f Nm\" %T_est)\n", + "T_em=(3/w_s)*(I1*X_m)**2/(2*(x2+X_m)) \n", + "print(\"maximum torque developed=%.3f Nm\" %T_em)\n", + "s=s_mT\n", + "i=1\n", + "I_m=I1*(r2/s+i*x2)/(r2/s+i*(x2+X_m))\n", + "I_m=math.fabs(I_m)\n", + "V1=math.sqrt(3)*I_m*X_m \n", + "\n", + "#Results\n", + "print(\"supply voltage reqd=%.1f V\" %V1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "slip at max torque=0.20\n", + "slip at max torque=0.00784\n", + "for constant voltage input\n", + "starting torque=95.988 Nm\n", + "maximum torque developed=247.31 Nm\n", + "for constant current input\n", + "starting torque=5.756 Nm\n", + "maximum torque developed=366.993 Nm\n", + "supply voltage reqd=1236.2 V\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.27, Page No 718" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=420.0\n", + "V1=V/math.sqrt(3)\n", + "T_e=450.0\n", + "N=1440.0\n", + "n=1000.0\n", + "T_L=T_e*(n/N)**2\n", + "n1=1500.0\n", + "\n", + "#Calculations\n", + "w_s=2*math.pi*n1/60\n", + "w_m=2*math.pi*n/60\n", + "a=.8\n", + "I_d=T_L*w_s/(2.339*a*V1)\n", + "k=0\n", + "R=(1-w_m/w_s)*(2.339*a*V1)/(I_d*(1-k)) \n", + "print(\"value of chopper resistance=%.4f ohm\" %R)\n", + "n=1320.0\n", + "T_L=T_e*(n/N)**2\n", + "I_d=T_L*w_s/(2.339*a*V1) \n", + "print(\"Inductor current=%.3f A\" %I_d)\n", + "w_m=2*math.pi*n/60\n", + "k=1-((1-w_m/w_s)*(2.339*a*V1)/(I_d*R)) \n", + "print(\"value of duty cycle=%.4f\" %k)\n", + "s=(n1-n)/n1\n", + "V_d=2.339*s*a*V1 \n", + "print(\"Rectifed o/p voltage=%.3f V\" %V_d)\n", + "P=V_d*I_d\n", + "I2=math.sqrt(2/3)*I_d\n", + "r2=0.02\n", + "Pr=3*I2**2*r2\n", + "I1=a*I2\n", + "r1=0.015\n", + "Ps=3*I1**2*r1\n", + "Po=T_L*w_m\n", + "Pi=Po+Ps+Pr+P\n", + "eff=Po/Pi*100 \n", + "\n", + "#Results\n", + "print(\"Efficiency(in percent)=%.2f\" %eff)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of chopper resistance=2.0132 ohm\n", + "Inductor current=130.902 A\n", + "value of duty cycle=0.7934\n", + "Rectifed o/p voltage=54.449 V\n", + "Efficiency(in percent)=88.00\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.28, Page No 720" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=400.0\n", + "V_ph=V/math.sqrt(3)\n", + "N_s=1000.0\n", + "N=800.0\n", + "a=.7\n", + "I_d=110\n", + "R=2.0\n", + "\n", + "#Calculations\n", + "k=1-((1-N/N_s)*(2.339*a*V_ph)/(I_d*R)) \n", + "print(\"value of duty cycle=%.3f\" %k)\n", + "P=I_d**2*R*(1-k)\n", + "I1=a*I_d*math.sqrt(2/3)\n", + "r1=0.1\n", + "r2=0.08\n", + "Pr=3*I1**2*(r1+r2)\n", + "P_o=20000\n", + "P_i=P_o+Pr+P\n", + "eff=P_o/P_i*100 \n", + "print(\"Efficiency=%.2f\" %eff)\n", + "I11=math.sqrt(6)/math.pi*a*I_d\n", + "th=43\n", + "P_ip=math.sqrt(3)*V*I11*math.cos(math.radians(th))\n", + "pf=P_ip/(math.sqrt(3)*V*I11) \n", + "\n", + "#Results\n", + "print(\"Input power factor=%.4f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of duty cycle=0.656\n", + "Efficiency=70.62\n", + "Input power factor=0.7314\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.29, Page No 724" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=420.0\n", + "V1=V/math.sqrt(3)\n", + "N=1000.0\n", + "w_m=2*math.pi*N/60\n", + "N_s=1500.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "a=0.8\n", + "V_d=2.339*a*s*V1 \n", + "print(\"rectified voltage=%.2f V\" %V_d)\n", + "T=450.0\n", + "N1=1200.0\n", + "T_L=T*(N/N1)**2\n", + "f1=50\n", + "w_s=4*math.pi*f1/4\n", + "I_d=w_s*T_L/(2.339*a*V1) \n", + "print(\"inductor current=%.2f A\" %I_d)\n", + "a_T=-.4\n", + "a1=math.degrees(math.acos(s*a/a_T))\n", + "print(\"delay angle of inverter=%.2f deg\" %a1)\n", + "\n", + "P_s=V_d*I_d\n", + "P_o=T_L*w_m\n", + "R_d=0.01\n", + "P_i=I_d**2*R_d\n", + "I2=math.sqrt(2/3)*I_d\n", + "r2=0.02\n", + "r1=0.015\n", + "P_rol=3*I2**2*r2\n", + "I1=a*I2\n", + "P_sol=3*I1**2*r1\n", + "P_i=P_o+P_rol+P_sol+P_i\n", + "eff=P_o/P_i*100 \n", + "print(\"\\nefficiency=%.2f\" %eff)\n", + "w_m=w_s*(1+(-a_T/a)*math.cos(math.radians(a1))-w_s*R_d*T_L/(2.339*a*V1)**2)\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results \n", + "print(\"motor speed=%.1f rpm\" %N)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectified voltage=151.25 V\n", + "inductor current=108.18 A\n", + "delay angle of inverter=131.81 deg\n", + "\n", + "efficiency=99.64\n", + "motor speed=996.4 rpm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.30, Page No 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=700.0\n", + "E2=V/math.sqrt(3)\n", + "N_s=1500.0\n", + "N=1200.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "V_dd=0.7\n", + "V_dt=1.5\n", + "V_d=3*math.sqrt(6)*s*E2/math.pi-2*V_dd\n", + "V1=415.0\n", + "a=math.degrees(math.acos((3*math.sqrt(2)*E2/math.pi)**-1*(-V_d+2*V_dt)))\n", + "\n", + "#Results\n", + "print(\"firing angle advance=%.2f deg\" %(180-a))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle advance=70.22 deg\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.31, Page No 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=700.0\n", + "E2=V/math.sqrt(3)\n", + "N_s=1500.0\n", + "N=1200.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "V_dd=.7\n", + "V_dt=1.5\n", + "a=0\n", + "u=18 #overlap angle in case of rectifier\n", + "V_d=3*math.sqrt(6)*s*E2*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dd\n", + "V1=415\n", + "V_ml=math.sqrt(2)*V1\n", + "u=4 #overlap anglein the inverter\n", + " #V_dc=-(3*V_ml*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dt)\n", + " #V_dc=V_d\n", + " #after solving % (1+math.cos(math.radians(u)))*math.cos(math.radians(a))-math.sin(math.radians(u))*math.sin(math.radians(a))=-.6425\n", + "a=math.degrees(math.acos(-.6425/(math.sqrt((1+math.cos(math.radians(u)))**2+math.sin(math.radians(u))**2))))-math.degrees(math.asin(math.sin(math.radians(a))/(1+math.cos(math.radians(u)))))\n", + "\n", + "#Results\n", + "print(\"firing angle advance=%.2f deg\" %(180-a))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle advance=71.25 deg\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.32, Page No 727" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=700.0\n", + "E2=V\n", + "N_s=1500.0\n", + "N=1200.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "V1=415.0\n", + "a_T=s*E2/V1 \n", + "\n", + "#Results\n", + "print(\"voltage ratio of the transformer=%.2f\" %a_T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage ratio of the transformer=0.34\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.33, Page No 733" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "P=6.0\n", + "N_s=600.0\n", + "f1=P*N_s/120.0\n", + "V=400.0\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "V_t=f1*V/f \n", + "print(\"supply freq=%.0f Hz\" %V_t)\n", + "T=340.0\n", + "N=1000.0\n", + "T_L=T*(N_s/N)**2\n", + "w_s=2*math.pi*N_s/60\n", + "P=T_L*w_s\n", + "I_a=P/(math.sqrt(3)*V_t) \n", + "print(\"armature current=%.2f A\" %I_a)\n", + "Z_s=2\n", + "X_s=f1/f*math.fabs(Z_s)\n", + "V_t=V_t/math.sqrt(3)\n", + "Ef=math.sqrt(V_t**2+(I_a*X_s)**2)\n", + "print(\"excitation voltage=%.2f V\" %(math.sqrt(3)*Ef))\n", + "dl=math.degrees(math.atan(I_a*X_s/V_t))\n", + "print(\"load angle=%.2f deg\" %dl)\n", + "T_em=(3/w_s)*(Ef*V_t/X_s) \n", + "\n", + "#Results\n", + "print(\"pull out torque=%.2f Nm\" %T_em)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "supply freq=240 Hz\n", + "armature current=18.50 A\n", + "excitation voltage=243.06 V\n", + "load angle=9.10 deg\n", + "pull out torque=773.69 Nm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.34, Page No 736" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "P=4.0\n", + "f=50.0\n", + "w_s=4*math.pi*f/P\n", + "X_d=8.0\n", + "X_q=2.0\n", + "T_e=80.0\n", + "V=400.0\n", + "\n", + "#Calculations\n", + "V_t=V/math.sqrt(3)\n", + "dl=(1/2)*math.degrees(math.asin(T_e*w_s/((3/2)*(V_t)**2*(1/X_q-1/X_d)))) \n", + "print(\"load angle=%.3f deg\" %dl)\n", + "I_d=V_t*math.cos(math.radians(dl))/X_d\n", + "I_q=V_t*math.sin(math.radians(dl))/X_q\n", + "I_a=math.sqrt(I_d**2+I_q**2) \n", + "print(\"armature current=%.2f A\" %I_a)\n", + "pf=T_e*w_s/(math.sqrt(3)*V*I_a) \n", + "\n", + "#Results\n", + "print(\"input power factor=%.4f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "load angle=0.000 deg\n", + "armature current=28.87 A\n", + "input power factor=0.6283\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.35, Page No 737" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_e=3.0\n", + "K_m=1.2\n", + "I_a=T_e/K_m\n", + "r_a=2.0\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "E_a=(0.263*math.sqrt(2)*V-I_a*r_a)/(1-55/180)\n", + "w_m=E_a/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"motor speed=%.2f rpm\" %N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor speed=640.96 rpm\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.36, Page No 738" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=1360.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + " #after calculations V_t % calculated\n", + "V_t=163.45\n", + "r_a=4\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.4f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=5.2578 Nm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.37, Page No 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=2100.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + " #after calculations V_t % calculated\n", + "V_t=227.66\n", + "r_a=4\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.2f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=1.94 Nm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.38, Page No 742" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=840.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + "V=230.0\n", + "a=75.0\n", + "V_t=math.sqrt(2)*V/math.pi*(1+math.cos(math.radians(a)))\n", + "r_a=4\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.4f Nm\" %T_e)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=10.5922 Nm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.39, Page No 743" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=1400.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + "V=230.0\n", + "a=60.0\n", + "a1=212\n", + "V_t=math.sqrt(2)*V/math.pi*(math.cos(math.radians(a))-math.cos(math.radians(a1)))+E_a*(180+a-a1)/180\n", + "r_a=3\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.3f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=5.257 Nm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.40, Page No 745" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=600.0\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + "V=230.0\n", + "a=60.0\n", + "\n", + "#Calculations\n", + "V_t=2*math.sqrt(2)*V/math.pi*(math.cos(math.radians(a)))\n", + "r_a=3\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "\n", + "#Results\n", + "print(\"motor torque=%.3f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=13.568 Nm\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.41, Page No 745" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "r1=.6\n", + "r2=.4\n", + "s=0.04\n", + "x1=1.6\n", + "x2=1.6\n", + "Z=(r1+r2/s)+(x1+x2)\n", + "V=400.0\n", + "I1=V/Z \n", + "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n", + "print(\"and with %.1f deg phase\" %math.fabs(I1))\n", + "I2=V/Z\n", + "N=1500\n", + "w_s=2*math.pi*N/60\n", + "T_e=(3/w_s)*abs(I2)**2*r2/s \n", + "print(\"motor torque=%.2f Nm\" %T_e)\n", + "N_r=N*(1-s)\n", + "\n", + "f=45\n", + "N_s1=120*f/4\n", + "w_s=2*math.pi*N_s1/60\n", + "s1=(N_s1-N_r)/N_s1\n", + "Z=(r1+r2/s1)+(x1+x2)*f/50.0\n", + "V=360\n", + "I1=V/Z \n", + "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n", + "print(\"and with %.1f deg phase\" %math.fabs(I1))\n", + "I2=V/Z\n", + "T_e=(3/w_s)*abs(I2)**2*r2/s1 \n", + "print(\"motor torque=%.2f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "source current=0.000 A \n", + "and with 29.0 deg phase\n", + "motor torque=160.46 Nm\n", + "source current=-0.000 A \n", + "and with 142.9 deg phase\n", + "motor torque=-2598.45 Nm\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter13.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter13.ipynb new file mode 100755 index 00000000..62d2a926 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter13.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Power Factor Improvement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page No 754" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=250.0\n", + "R_l=5.0\n", + "I_l=20.0\n", + "V_l1=math.sqrt(V_s**2-(R_l*I_l)**2)\n", + "reg2=(V_s-V_l1)/V_s*100 \n", + "pf1=1.0\n", + "\n", + "#Calculations\n", + "P_l1=V_l1*I_l*pf1 #load power\n", + "P_r1=V_s*I_l*pf1 #max powwible system rating\n", + "utf1=P_l1*100/P_r1 \n", + "pf2=0.5\n", + " #(.5*V_l)**2+(.866*V_l+R_l*I_l)**2=V_s**2\n", + " #after solving\n", + "V_l2=158.35 \n", + "reg2=(V_s-V_l2)/V_s*100 \n", + "P_l2=V_l2*I_l*pf2 #load power\n", + "P_r2=V_s*I_l #max powwible system rating\n", + "utf2=P_l2*100/P_r2 \n", + "\n", + "\n", + "#Results\n", + "print(\"for pf=1\")\n", + "print(\"load voltage=%.2f V\" %V_l1)\n", + "print(\"voltage regulation=%.2f\" %reg1)\n", + "print(\"system utilisation factor=%.3f\" %utf1)\n", + "print(\"energy consumed(in units)=%.1f\" %(P_l1/1000))\n", + "print(\"for pf=.5\")\n", + "print(\"load voltage=%.2f V\" %V_l2)\n", + "print(\"voltage regulation=%.2f\" %reg2)\n", + "print(\"system utilisation factor=%.3f\" %utf2)\n", + "print(\"energy consumed(in units)=%.2f\" %(P_l2/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'reg1' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 25\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"for pf=1\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"load voltage=%.2f V\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mV_l1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 27\u001b[1;33m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"voltage regulation=%.2f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mreg1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 28\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"system utilisation factor=%.3f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mutf1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 29\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"energy consumed(in units)=%.1f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mP_l1\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m1000\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mNameError\u001b[0m: name 'reg1' is not defined" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for pf=1\n", + "load voltage=229.13 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page No 756" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50.0\n", + "V_s=230.0\n", + "I_m1=2\n", + "pf1=.3\n", + "\n", + "#Calculations\n", + "I_c1=I_m1*math.sin(math.radians(math.degrees(math.acos(pf1))))\n", + "C1=I_c1/(2*math.pi*f*V_s) \n", + "I_m2=5\n", + "pf2=.5\n", + "I_c2=I_m2*math.sin(math.radians(math.degrees(math.acos(pf2))))\n", + "C2=I_c2/(2*math.pi*f*V_s) \n", + "I_m3=10\n", + "pf3=.7\n", + "I_c3=I_m3*math.sin(math.radians(math.degrees(math.acos(pf3))))\n", + "C3=I_c3/(2*math.pi*f*V_s) \n", + "\n", + "#Results\n", + "print(\"at no load\")\n", + "print(\"value of capacitance=%.3f uF\" %(C1*10**6))\n", + "print(\"at half full load\")\n", + "print(\"value of capacitance=%.3f uF\" %(C2*10**6))\n", + "print(\"at full load\")\n", + "print(\"value of capacitance=%.3f uF\" %(C3*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "at no load\n", + "value of capacitance=26.404 uF\n", + "at half full load\n", + "value of capacitance=59.927 uF\n", + "at full load\n", + "value of capacitance=98.834 uF\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_c=10.0\n", + "f=50.0\n", + "V_s=230.0\n", + "\n", + "#Calculations\n", + "C=I_c/(2*math.pi*f*V_s) \n", + "I_l=10\n", + "L=V_s/(2*math.pi*f*I_l) \n", + "\n", + "#Results\n", + "print(\"value of capacitance=%.3f uF\" %(C*10**6))\n", + "print(\"value of inductor=%.3f mH\" %(L*1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of capacitance=138.396 uF\n", + "value of inductor=73.211 mH\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4, Page No 765" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "I_L=10.0\n", + "X_L=V_s/I_L\n", + "I_f1=6.0\n", + " #B=2*a-math.sin(2*a)\n", + "B=2*math.pi-I_f1*math.pi*X_L/V_s\n", + "a=0\n", + "i=1.0\n", + "for a in range(1,360):\n", + " b=2*a*math.pi/180-math.sin(math.radians(2*a)) \n", + " if math.fabs(B-b)<=0.001 : #by hit and trial\n", + " i=2\n", + " break\n", + "print(\"firing angle of TCR = %.1f deg\" %a)\n", + " #(a-.01)*180/math.pi)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle of TCR = 359.0 deg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=.01\n", + "\n", + "\n", + "#Calculations\n", + "print(\"for firing angle=90deg\")\n", + "a=90*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.0f mH\" %(L_eff*1000))\n", + "print(\"for firing angle=120deg\")\n", + "a=120*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.3f mH\" %(L_eff*1000))\n", + "print(\"for firing angle=150deg\")\n", + "a=150*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.2f mH\" %(L_eff*1000))\n", + "print(\"for firing angle=170deg\")\n", + "a=170*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.3f H\" %L_eff)\n", + "print(\"for firing angle=175deg\")\n", + "a=175*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "\n", + "#Results\n", + "print(\"effective inductance=%.2f H\" %L_eff)\n", + "print(\"for firing angle=180deg\")\n", + "a=180*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.3f H\" %L_eff)\n", + " #random value at firing angle =180 is equivalent to infinity as in answer in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=90deg\n", + "effective inductance=10 mH\n", + "for firing angle=120deg\n", + "effective inductance=25.575 mH\n", + "for firing angle=150deg\n", + "effective inductance=173.40 mH\n", + "for firing angle=170deg\n", + "effective inductance=4.459 H\n", + "for firing angle=175deg\n", + "effective inductance=35.51 H\n", + "for firing angle=180deg\n", + "effective inductance=-128265253940037.750 H\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page No 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "Q=100.0*10**3\n", + "V_s=11.0*10**3\n", + "\n", + "#Calculations\n", + "f=50.0\n", + "L=V_s**2/(2*math.pi*f*Q) \n", + "\n", + "#Results\n", + "print(\"effective inductance=%.4f H\" %L)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective inductance=3.8515 H\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter14.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter14.ipynb new file mode 100755 index 00000000..a9c3a3f1 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter14.ipynb @@ -0,0 +1,93 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Miscellaneous Topics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1, Page No 777" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a1=0\n", + "a2=45.0\n", + "\n", + "#Calculations\n", + "print(\"for two single phase series semiconvertors\")\n", + "V_0=V_m/math.pi*(2+math.cos(math.radians(a1))+math.cos(math.radians(a2))) \n", + "print(\"avg o/p voltage=%.2f V\" %V_0)\n", + "V_or=V_s*math.sqrt((1/math.pi)*(4*math.pi-3*a2*math.pi/180+(3/2)*math.sin(math.radians(2*a2)))) \n", + "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", + "DF=(3+math.cos(math.radians(a2)))/(math.sqrt(2)*math.sqrt(5+3*math.cos(math.radians(a2)))) \n", + "print(\"DF=%.2f\" %DF)\n", + "PF=math.sqrt(2/math.pi)*(3+math.cos(math.radians(a2)))/math.sqrt(4*math.pi-3*a2*math.pi/180) \n", + "print(\"PF=%.2f\" %PF)\n", + "HF=math.sqrt((math.pi*(math.pi-(3/4)*a2*math.pi/180)/(5+3*math.cos(math.radians(a2))))-1) \n", + "print(\"HF=%.2f\" %HF)\n", + "print(\"for two single phase series full convertors\")\n", + "a=45.0\n", + "V_0=2*V_m/math.pi*(1+math.cos(math.radians(a))) \n", + "print(\"avg o/p voltage=%.2f V\" %V_0)\n", + "V_or=2*V_s*math.sqrt((1/math.pi)*(math.pi-a2*math.pi/180+(1/2)*math.sin(math.radians(2*a2)))) \n", + "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", + "DF=math.cos(math.radians(a2/2)) \n", + "\n", + "\n", + "#Results \n", + "print(\"DF=%.2f\" %DF)\n", + "PF=math.sqrt(2/(math.pi*(math.pi-a2*math.pi/180)))*(1+math.cos(math.radians(a2))) \n", + "print(\"PF=%.2f\" %PF)\n", + "HF=math.sqrt((math.pi*(math.pi-a2*math.pi/180)/(4+4*math.cos(math.radians(a2))))-1) \n", + "print(\"HF=%.2f\" %HF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for two single phase series semiconvertors\n", + "avg o/p voltage=383.82 V\n", + "rms value of o/p voltage=434.47 V\n", + "DF=0.98\n", + "PF=0.93\n", + "HF=0.62\n", + "for two single phase series full convertors\n", + "avg o/p voltage=353.50 V\n", + "rms value of o/p voltage=398.37 V\n", + "DF=0.92\n", + "PF=0.89\n", + "HF=0.29\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter2.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter2.ipynb new file mode 100755 index 00000000..1872c9f4 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter2.ipynb @@ -0,0 +1,233 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 02 : Power Semiconductor Diodes and Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page No 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "B=40.0\n", + "R_c=10 #ohm\n", + "V_cc=130.0 #V\n", + "V_B=10.0 #V\n", + "V_CES=1.0 #V\n", + "V_BES=1.5 #V\n", + "\n", + "#Calculations\n", + "I_CS=(V_cc-V_CES)/R_c #A\n", + "I_BS=I_CS/B #A\n", + "R_B1=(V_B-V_BES)/I_BS\n", + "P_T1=V_BES*I_BS+V_CES*I_CS\n", + "ODF=5\n", + "I_B=ODF*I_BS\n", + "R_B2=(V_B-V_BES)/I_B\n", + "P_T2=V_BES*I_B+V_CES*I_CS\n", + "B_f=I_CS/I_B\n", + "\n", + "#Results\n", + "print(\"value of R_B in saturated state= %.2f ohm\" %R_B1)\n", + "print(\"Power loss in transistor=%.2f W\" %P_T1)\n", + "print(\"Value of R_B for an overdrive factor 5 = %.2f ohm\" %R_B2)\n", + "print(\"Power loss in transistor = %.2f W\" %P_T2)\n", + "print(\"Forced current gain=%.0f\" %B_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of R_B in saturated state= 26.36 ohm\n", + "Power loss in transistor=13.38 W\n", + "Value of R_B for an overdrive factor 5 = 5.27 ohm\n", + "Power loss in transistor = 15.32 W\n", + "Forced current gain=8\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page No 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_CEO=2*10**-3 #A\n", + "V_CC=220.0 #V\n", + "P_dt=I_CEO*V_CC #instant. power loss during delay time\n", + "t_d=.4*10**-6 #s\n", + "f=5000\n", + "P_d=f*I_CEO*V_CC*t_d #avg power loss during delay time\n", + "V_CES=2 #V\n", + "t_r=1*10**-6 #s\n", + "I_CS=80 #A\n", + "\n", + "#Calculations\n", + "P_r=f*I_CS*t_r*(V_CC/2-(V_CC-V_CES)/3) #avg power loss during rise time\n", + "t_m=V_CC*t_r/(2*(V_CC-V_CES))\n", + "P_rm=I_CS*V_CC**2/(4*(V_CC-V_CES)) #instant. power loss during rise time\n", + "\n", + "#Results\n", + "P_on=P_d+P_r \n", + "print(\"Avg power loss during turn on = %.2f W\" %P_on)\n", + "P_nt=I_CS*V_CES \n", + "print(\"Instantaneous power loss during turn on = %.0f W\" %P_nt)\n", + "t_n=50*10**-6\n", + "P_n=f*I_CS*V_CES*t_n\n", + "print(\"Avg power loss during conduction period = %.0f W\" %P_n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avg power loss during turn on = 14.93 W\n", + "Instantaneous power loss during turn on = 160 W\n", + "Avg power loss during conduction period = 40 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_CEO=2*10**-3 #A\n", + "V_CC=220 #V\n", + "t_d=.4*10**-6 #s\n", + "f=5000\n", + "V_CES=2 #V\n", + "t_r=1*10**-6 #s\n", + "I_CS=80 #A\n", + "t_n=50*10**-6 #s\n", + "t_0=40*10**-6 #s\n", + "t_f=3*10**-6 #s\n", + "\n", + "#Calculations\n", + "P_st=I_CS*V_CES # instant. power loss during t_s\n", + "P_s=f*I_CS*V_CES*t_f #avg power loss during t_s\n", + "P_f=f*t_f*(I_CS/6)*(V_CC-V_CES) #avg power loss during fall time\n", + "P_fm=(I_CS/4)*(V_CC-V_CES) #peak instant power dissipation\n", + "P_off=P_s+P_f\n", + "\n", + "#Results\n", + "print(\"Total avg power loss during turn off = %.2f W\" %P_off)\n", + "P_0t=I_CEO*V_CC\n", + "print(\"Instantaneous power loss during t_0 = %.2f W\" %P_0t)\n", + "P_0=f*I_CEO*V_CC*t_0 #avg power loss during t_s\n", + "P_on=14.9339 #W from previous eg\n", + "P_n=40 #W from previous eg\n", + "P_T=P_on+P_n+P_off+P_0 \n", + "print(\"Total power loss = %.2f W\" %P_T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total avg power loss during turn off = 44.91 W\n", + "Instantaneous power loss during t_0 = 0.44 W\n", + "Total power loss = 99.93 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, Page No 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_CS=100.0 \n", + "V_CC=200.0 \n", + "t_on=40*10**-6\n", + "\n", + "#Calculations\n", + "P_on=(I_CS/50)*10**6*t_on*(V_CC*t_on/2-(V_CC*10**6*t_on**2/(40*3))) #energy during turn on\n", + "t_off=60*10**-6\n", + "P_off=(I_CS*t_off/2-(I_CS/60)*10**6*(t_off**2)/3)*((V_CC/75)*10**6*t_off) #energy during turn off\n", + "P_t=P_on+P_off #total energy\n", + "P_avg=300.0\n", + "f=P_avg/P_t\n", + "\n", + "#Results\n", + "print(\"Allowable switching frequency = %.2f Hz\" %f)\n", + "#in book ans is: f=1123.6 Hz. The difference in results due to difference in rounding of of digits" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Allowable switching frequency = 1125.00 Hz\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter3.ipynb new file mode 100755 index 00000000..2e53ef9d --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter3.ipynb @@ -0,0 +1,1001 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 03 : Diode Circuits and Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page No 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0 #V\n", + "V_o=100.0 #V\n", + "L=100.0 #uH\n", + "C=30.0 #uF\n", + "\n", + "#Calculations\n", + "t_o=math.pi*math.sqrt(L*C)\n", + "print(\"conduction time of diode = %.2f us\" %t_o)\n", + "#in book solution is t_o=54.77 us. The ans is incorrect as %pi is not muliplied in ans. Formulae mentioned in correct.\n", + "I_p=(V_s-V_o)*math.sqrt(C/L)\n", + "\n", + "#Results\n", + "print(\"Peak current through diode=%.2f A\" %I_p)\n", + "v_D=-V_s+V_o \n", + "print(\"Voltage across diode = %.2f V\" %v_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of diode = 172.07 us\n", + "Peak current through diode=164.32 A\n", + "Voltage across diode = -300.00 V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page No 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "R=10 #ohm\n", + "L=0.001 #H\n", + "C=5*10**-6 #F\n", + "V_s=230 #V\n", + "xi=R/(2*L)\n", + "\n", + "#Calculations\n", + "w_o=1/math.sqrt(L*C)\n", + "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n", + "t=math.pi/w_r \n", + "\n", + "#Results\n", + "print('Conduction time of diode=%.3f us'%(t*10**6))\n", + "t=0\n", + "di=V_s/L\n", + "print('Rate of change of current at t=0 is %.2f A/s' %di)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conduction time of diode=237.482 us\n", + "Rate of change of current at t=0 is 230000.00 A/s\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_or=100 #A\n", + "R=1.0 #assumption\n", + "\n", + "#Calculations\n", + "V_m=I_or*2*R\n", + "I_o=V_m/(math.pi*R)\n", + "q=200 #Ah\n", + "t=q/I_o\n", + "\n", + "#Results\n", + "print(\"time required to deliver charge=%.02f hrs\" %t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time required to deliver charge=3.14 hrs\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page No 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0 #V\n", + "P=1000 #W\n", + "R=V_s**2/P\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt(2)*V_s/2\n", + "P_h=V_or**2/R \n", + "print(\"Power delivered to the heater = %.2f W\" %P_h)\n", + "V_m=math.sqrt(2)*230\n", + "I_m=V_m/R\n", + "\n", + "#Results\n", + "print(\"Peak value of diode current = %.2f A\" %I_m)\n", + "pf=V_or/V_s\n", + "print(\"Input power factor=%.2f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power delivered to the heater = 500.00 W\n", + "Peak value of diode current = 6.15 A\n", + "Input power factor=0.71\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230 #V\n", + "V_m=V_s*math.sqrt(2)\n", + "E=150 #V\n", + "\n", + "#Calculations\n", + "theta1=math.degrees(E/(math.sqrt(2)*V_s))\n", + "R=8 #ohm\n", + "f=50 #Hz\n", + "I_o=(1/(2*math.pi*R))*((2*math.sqrt(2)*V_s*math.cos(math.radians(theta1)))-E*(math.pi-2*theta1*math.pi/180))\n", + "\n", + "#Results\n", + "print(\"avg value of charging current=%.2f A\" %I_o)\n", + "P_d=E*I_o\n", + "print(\"\\npower delivered to battery=%.2f W\" %P_d)\n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V_s**2+E**2)*(math.pi-2*theta1*math.pi/180)+V_s**2*math.sin(math.radians(2*theta1))-4*V_m*E*math.cos(math.radians(theta1))))\n", + "print(\"\\nrms value of the load current=%.2f A\" %I_or)\n", + "pf=(E*I_o+I_or**2*R)/(V_s*I_or)\n", + "print(\"\\nsupply pf=%.3f\" %pf)\n", + "P_dd=I_or**2*R\n", + "print(\"\\npower dissipated in the resistor=%.2f W\" %P_dd)\n", + "q=1000.00 #Wh\n", + "t=q/P_d \n", + "print(\"\\ncharging time=%.2f hr\" %t)\n", + "n=P_d*100/(P_d+P_dd)\n", + "print(\"rectifier efficiency =%.2f \" %n)\n", + "PIV=math.sqrt(2)*V_s+E\n", + "print(\"PIV of diode=%.2f V\" %PIV)\n", + "#solutions have small variations due to difference in rounding off of digits" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg value of charging current=4.97 A\n", + "\n", + "power delivered to battery=745.11 W\n", + "\n", + "rms value of the load current=9.29 A\n", + "\n", + "supply pf=0.672\n", + "\n", + "power dissipated in the resistor=690.74 W\n", + "\n", + "charging time=1.34 hr\n", + "rectifier efficiency =51.89 \n", + "PIV of diode=475.27 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=230 #V\n", + "t_rr=40*10**-6 #s reverde recovery time\n", + "\n", + "#Calculations\n", + "V_o=2*math.sqrt(2)*V_s/math.pi\n", + "V_m=math.sqrt(2)*V_s\n", + "f=50\n", + "V_r1=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n", + "v_avg1=V_r1*100/V_o*10**3\n", + "f=2500\n", + "V_r2=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n", + "v_avg2=V_r2*100/V_o\n", + "\n", + "#Results\n", + "print(\"when f=50Hz\")\n", + "print(\"Percentage reduction in avg o/p voltage=%.2f x 10^-3\" %v_avg1)\n", + "print(\"when f=2500Hz\")\n", + "print(\"Percentage reduction in avg o/p voltage = %.3f\" %v_avg2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when f=50Hz\n", + "Percentage reduction in avg o/p voltage=3.95 x 10^-3\n", + "when f=2500Hz\n", + "Percentage reduction in avg o/p voltage = 9.549\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11, Page No 79 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230 #V\n", + "R=10.0 #ohm\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V_s\n", + "V_o=2*V_m/math.pi\n", + "print(\"Avg value of o/p voltage = %.2f V\" %V_o)\n", + "I_o=V_o/R\n", + "print(\"Avg value of o/p current = %.2f A\" %I_o)\n", + "I_DA=I_o/2\n", + "print(\"Avg value of diode current=%.2f A\" %I_DA)\n", + "I_Dr=I_o/math.sqrt(2) \n", + "\n", + "#Results\n", + "print(\"rms value of diode current=%.2f A\" %I_Dr)\n", + "print(\"rms value of o/p current = %.2f A\" %I_o)\n", + "print(\"rms value of i/p current = %.2f A\" %I_o)\n", + "pf=(V_o/V_s)\n", + "print(\"supply pf = %.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avg value of o/p voltage = 207.07 V\n", + "Avg value of o/p current = 20.71 A\n", + "Avg value of diode current=10.35 A\n", + "rms value of diode current=14.64 A\n", + "rms value of o/p current = 20.71 A\n", + "rms value of i/p current = 20.71 A\n", + "supply pf = 0.90\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V_s=230.0 #V\n", + "R=1000.0 #ohm\n", + "R_D=20.0 #ohm\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V_s\n", + "I_om=V_m/(R+R_D) \n", + "\n", + "#Results\n", + "print(\"Peak load current = %.2f A\" %I_om)\n", + "I_o=I_om/math.pi\n", + "print(\"dc load current = %.2f A\" %I_o)\n", + "V_D=I_o*R_D-V_m/math.pi\n", + "print(\"dc diode voltage = %.2f V\" %V_D)\n", + "V_on=V_m/math.pi\n", + "print(\"at no load, load voltage = %.2f V\" %V_on)\n", + "V_o1=I_o*R \n", + "print(\"at given load, load voltage = %.2f V\" %V_o1)\n", + "vr=(V_on-V_o1)*100/V_on \n", + "print(\"Voltage regulation(in percent)=%.2f\" %vr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak load current = 0.32 A\n", + "dc load current = 0.10 A\n", + "dc diode voltage = -101.51 V\n", + "at no load, load voltage = 103.54 V\n", + "at given load, load voltage = 101.51 V\n", + "Voltage regulation(in percent)=1.96\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_L=6.8 #V\n", + "V_smax=20*1.2 #V\n", + "V_smin=20*.8 #V\n", + "I_Lmax=30*1.5 #mA\n", + "I_Lmin=30*0.5 #mA\n", + "I_z=1 #mA\n", + "\n", + "#Calculations\n", + "R_smax=(V_smax-V_L)/((I_Lmin+I_z)*10**-3)\n", + "print(\"max source resistance = %.2f ohm\" %R_smax)\n", + "R_smin=(V_smin-V_L)/((I_Lmax+I_z)*10**-3) \n", + "print(\"Min source resistance = %.2f ohm\" %R_smin) #in book solution, error is committed in putting the values in formulea(printing error) but solution is correct\n", + "R_Lmax=V_L*1000/I_Lmin\n", + "print(\"Max load resistance = %.2f ohm\" %R_Lmax)\n", + "R_Lmin=V_L*1000/I_Lmax \n", + "V_d=0.6 #V\n", + "V_r=V_L-V_d\n", + "\n", + "#Results\n", + "print(\"Min load resistance=%.2f ohm\" %R_Lmin)\n", + "print(\"Voltage rating of zener diode=%.2f V\" %V_r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max source resistance = 1075.00 ohm\n", + "Min source resistance = 200.00 ohm\n", + "Max load resistance = 453.33 ohm\n", + "Min load resistance=151.11 ohm\n", + "Voltage rating of zener diode=6.20 V\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I2=200*10**-6 #A\n", + "V_z=20 #V\n", + "R_G=500.0 #hm\n", + "\n", + "#Calculations\n", + "R2=(V_z/I2)-R_G\n", + "print(\"R2=%.2f kilo-ohm\" %(R2/1000))\n", + "\n", + "V_v=25 #V\n", + "I1=I2\n", + "R1=(V_v-V_z)/I1\n", + "\n", + "#Results\n", + "print(\"R1=%.0f kilo-ohm\"%(R1/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R2=99.50 kilo-ohm\n", + "R1=25 kilo-ohm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15, Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=2*230 #V\n", + "\n", + "#Calculations\n", + "V_o=(math.sqrt(2)*V_s)/math.pi\n", + "R=60 #ohm\n", + "P_dc=(V_o)**2/R\n", + "TUF=0.2865\n", + "VA=P_dc/TUF\n", + "\n", + "#RESULTS\n", + "print(\"kVA rating of the transformer = %.2f kVA\" %(VA/1000));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kVA rating of the transformer = 2.49 kVA\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16, Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "tr=0.5 #turns ratio\n", + "I_o=10.0\n", + "V=230.0\n", + "V_s=V/tr\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V_s\n", + "V_o=2*V_m/math.pi\n", + "phi1=0\n", + "#displacemnt angle=0 as fundamnetal component of i/p source current in phase with source voltage\n", + "DF=math.cos(math.radians(phi1))\n", + "I_s1=4*I_o/(math.sqrt(2)*math.pi)\n", + "I_s=math.sqrt(I_o**2*math.pi/math.pi)\n", + "CDF=I_s1/I_o\n", + "pf=CDF*DF\n", + "HF=math.sqrt((I_s/I_s1)**2-1)\n", + "CF=I_o/I_s\n", + "\n", + "#Results\n", + "print(\"o/p voltage = %.2f V\" %V_o)\n", + "print(\"distortion factor = %.2f\" %DF)\n", + "print(\"i/p pf=%.2f\" %pf)\n", + "print(\"Current displacent factor=%.2f\" %CDF)\n", + "print(\"Harmonic factor = %.2f\" %HF)\n", + "print(\"Creast factor = %.2f\" %CF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "o/p voltage = 414.15 V\n", + "distortion factor = 1.00\n", + "i/p pf=0.90\n", + "Current displacent factor=0.90\n", + "Harmonic factor = 0.48\n", + "Creast factor = 1.00\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17, Page No 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_o=230.0\n", + "R=10.0\n", + "V_s=V_o*math.pi/(2*math.sqrt(2))\n", + "I_o=V_o/R\n", + "I_m=math.sqrt(2)*V_s/R\n", + "I_DAV=I_m/math.pi\n", + "\n", + "#Calculations\n", + "#avg value of diode current\n", + "I_Dr=I_m/2\n", + "PIV=math.sqrt(2)*V_s\n", + "I_s=I_m/math.sqrt(2)\n", + "TF=V_s*I_s\n", + "\n", + "#Results\n", + "print(\"peak diode current=%.2f A\" %I_m)\n", + "print(\"I_DAV=%.2f A\" %I_DAV)\n", + "print(\"I_Dr=%.2f A\" %I_Dr) #rms value of diode current\n", + "print(\"PIV=%.1f V\" %PIV)\n", + "print(\"Transformer rating = %.2f kVA\" %(TF/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak diode current=36.13 A\n", + "I_DAV=11.50 A\n", + "I_Dr=18.06 A\n", + "PIV=361.3 V\n", + "Transformer rating = 6.53 kVA\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18, Page No 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "tr=5\n", + "V=1100.0\n", + "R=10.0\n", + "\n", + "\n", + "#Calculations\n", + "print(\"In case of 3ph-3pulse type\")\n", + "V_ph=V/tr\n", + "V_mp=math.sqrt(2)*V_ph\n", + "V_o=3*math.sqrt(3)*V_mp/(2*math.pi)\n", + "print(\"avg o/p voltage=%.1f V\" %V_o)\n", + "I_mp=V_mp/R\n", + "I_D=(I_mp/math.pi)*math.sin(math.pi/3) \n", + "print(\"\\navg value of diode current=%.3f A\" %I_D)\n", + "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3))) \n", + "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n", + "V_or=V_mp*math.sqrt((3/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3)))\n", + "P=(V_or**2)/R \n", + "print(\"\\npower delivered=%.1f W\" %P)\n", + "print(\"in case of 3ph-M6 type\")\n", + "V_ph=V_ph/2\n", + "V_mp=math.sqrt(2)*V_ph\n", + "V_o=3*V_mp/(math.pi) \n", + "I_mp=V_mp/R\n", + "I_D=(I_mp/math.pi)*math.sin(math.pi/6) \n", + "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6))) \n", + "V_or=V_mp*math.sqrt((6/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6)))\n", + "P=(V_or**2)/R \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.2f V\" %V_o)\n", + "print(\"\\navg value of diode current=%.2f A\" %I_D)\n", + "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n", + "print(\"\\npower delivered=%.0f W\" %P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case of 3ph-3pulse type\n", + "avg o/p voltage=257.3 V\n", + "\n", + "avg value of diode current=8.577 A\n", + "\n", + "rms value of diode current=15.10 A\n", + "\n", + "power delivered=6841.3 W\n", + "in case of 3ph-M6 type\n", + "avg o/p voltage=148.55 V\n", + "\n", + "avg value of diode current=2.48 A\n", + "\n", + "rms value of diode current=6.07 A\n", + "\n", + "power delivered=2211 W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19, Page No 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_o=400\n", + "R=10\n", + "\n", + "#Calculations\n", + "V_ml=V_o*math.pi/3\n", + "V_s=V_ml/(math.sqrt(2)*math.sqrt(3))\n", + "I_m=V_ml/R\n", + "I_s=.7804*I_m\n", + "tr=3*V_s*I_s \n", + "\n", + "#Results\n", + "print(\"transformer rating=%.1f VA\" %tr)\n", + "I_Dr=.5518*I_m \n", + "print(\"\\nrms value of diode current=%.3f A\" %I_Dr)\n", + "I_D=I_m/math.pi \n", + "print(\"\\navg value of diode current=%.3f A\" %I_D)\n", + "print(\"\\npeak diode current=%.2f A\" %I_m)\n", + "PIV=V_ml \n", + "print(\"\\nPIV=%.2f V\" %PIV)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transformer rating=16770.3 VA\n", + "\n", + "rms value of diode current=23.114 A\n", + "\n", + "avg value of diode current=13.333 A\n", + "\n", + "peak diode current=41.89 A\n", + "\n", + "PIV=418.88 V\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20, Page No 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_l=230\n", + "E=240\n", + "R=8\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(2)*V_l\n", + "V_o=3*V_ml/math.pi\n", + "I_o=(V_o-E)/R\n", + "P_b=E*I_o \n", + "P_d=E*I_o+I_o**2*R \n", + "phi1=0\n", + "math.cos(math.radians(phi1))\n", + "I_s1=2*math.sqrt(3)*I_o/(math.sqrt(2)*math.pi)\n", + "I_s=math.sqrt(I_o**2*2*math.pi/(3*math.pi))\n", + "CDF=I_s1/I_s \n", + "pf=DF*CDF \n", + "HF=math.sqrt(CDF**-2-1) \n", + "tr=math.sqrt(3)*V_l*I_o*math.sqrt(2/3)\n", + "\n", + "#Results\n", + "print(\"Power delivered to battery=%.1f W\" %P_b)\n", + "print(\"Power delivered to load=%.2f W\" %P_d)\n", + "print(\"Displacement factor=%.2f\" %DF)\n", + "print(\"Current distortion factor=%.3f\" %CDF)\n", + "print(\"i/p pf=%.3f\"%pf)\n", + "print(\"Harmonic factor=%.2f\" %HF)\n", + "print(\"Tranformer rating=%.2f VA\" %tr)\n", + "#answers have small variations from the book due to difference in rounding off of digits" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power delivered to battery=2118.3 W\n", + "Power delivered to load=2741.48 W\n", + "Displacement factor=1.00\n", + "Current distortion factor=0.955\n", + "i/p pf=0.955\n", + "Harmonic factor=0.31\n", + "Tranformer rating=0.00 VA\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21, Page No 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50 #Hz\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V\n", + "R=400.0\n", + "RF=0.05\n", + "C=(1/(4*f*R))*(1+(1/(math.sqrt(2)*RF)))\n", + "\n", + "#Results\n", + "print(\"capacitor value=%.2f uF\" %(C/10**-6))\n", + "V_o=V_m*(1-1/(4*f*R*C))\n", + "print(\"o/p voltage with filter=%.2f V\" %V_o)\n", + "V_o=2*V_m/math.pi \n", + "print(\"o/p voltage without filter=%.2f V\" %V_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitor value=189.28 uF\n", + "o/p voltage with filter=303.79 V\n", + "o/p voltage without filter=207.07 V\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22, Page No 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50\n", + "CRF=0.05\n", + "R=300\n", + "\n", + "#Calculations\n", + "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n", + "print(\"L=%.2f H\" %L)\n", + "R=30\n", + "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n", + "\n", + "\n", + "#Results\n", + "print(\"\\nL=%.2f H\" %L)\n", + "L=0\n", + "CRF=.4715*R/math.sqrt(R**2+(2*2*math.pi*f*L)**2) \n", + "print(\"\\nCRF=%.2f\" %CRF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L=4.48 H\n", + "\n", + "L=0.45 H\n", + "\n", + "CRF=0.47\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23, Page No 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=50\n", + "L_L=10*10**-3\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "\n", + "#Calculations\n", + "C=10/(2*w*math.sqrt(R**2+(2*w*L_L)**2))\n", + "\n", + "#Results\n", + "print(\"C=%.2f uF\" %(C*10**6))\n", + "VRF=0.1\n", + "L=(1/(4*w**2*C))*((math.sqrt(2)/(3*VRF))+1)\n", + "print(\"\\nL=%.2f mH\" %(L*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C=315.83 uF\n", + "\n", + "L=45.83 mH\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter4.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter4.ipynb new file mode 100755 index 00000000..22311574 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter4.ipynb @@ -0,0 +1,946 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 04 : Thyristors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "P=.5 #P=V_g*I_g\n", + "s=130 #s=V_g/I_g\n", + "\n", + "#Calculations\n", + "I_g=math.sqrt(P/s)\n", + "V_g=s*I_g\n", + "E=15\n", + "R_s=(E-V_g)/I_g \n", + "\n", + "#Results\n", + "print(\"Gate source resistance=%.2f ohm\" %R_s)\n", + "#Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gate source resistance=111.87 ohm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "R_s=120 #slope of load line is -120V/A. This gives gate source resistance\n", + "print(\"gate source resistance=%.0f ohm\" %R_s)\n", + "\n", + "P=.4 #P=V_g*I_g\n", + "E_s=15\n", + "\n", + "#Calculations\n", + " #E_s=I_g*R_s+V_g % after solving this\n", + " #120*I_g**2-15*I_g+0.4=0 so\n", + "a=120 \n", + "b=-15\n", + "c=0.4\n", + "D=math.sqrt((b**2)-4*a*c)\n", + "I_g=(-b+D)/(2*a) \n", + "V_g=P/I_g\n", + "\n", + "#Results\n", + "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n", + "print(\"\\nthen trigger voltage=%.3f V\" %V_g)\n", + "I_g=(-b-D)/(2*a) \n", + "V_g=P/I_g\n", + "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n", + "print(\"\\nthen trigger voltage=%.2f V\" %V_g)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gate source resistance=120 ohm\n", + "\n", + "trigger current=86.44 mA\n", + "\n", + "then trigger voltage=4.628 V\n", + "\n", + "trigger current=38.56 mA\n", + "\n", + "then trigger voltage=10.37 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "#V_g=1+10*I_g\n", + "P_gm=5 #P_gm=V_g*I_g\n", + "#after solving % eqn becomes 10*I_g**2+I_g-5=0\n", + "a=10.0 \n", + "b=1.0 \n", + "c=-5\n", + "\n", + "#Calculations\n", + "I_g=(-b+math.sqrt(b**2-4*a*c))/(2*a)\n", + "E_s=15\n", + "#using E_s=R_s*I_g+V_g\n", + "R_s=(E_s-1)/I_g-10 \n", + "P_gav=.3 #W\n", + "T=20*10**-6\n", + "f=P_gav/(P_gm*T)\n", + "dl=f*T\n", + "\n", + "#Results\n", + "print(\"Reistance=%.3f ohm\" %R_s)\n", + "print(\"Triggering freq=%.0f kHz\" %(f/1000))\n", + "print(\"Tduty cycle=%.2f\" %dl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reistance=11.248 ohm\n", + "Triggering freq=3 kHz\n", + "Tduty cycle=0.06\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page No 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I=.1\n", + "E=200.0\n", + "L=0.2\n", + "\n", + "#Calculations\n", + "t=I*L/E \n", + "R=20.0\n", + "t1=(-L/R)*math.log(1-(R*I/E)) \n", + "L=2.0\n", + "t2=(-L/R)*math.log(1-(R*I/E)) \n", + "\n", + "#Results\n", + "print(\"in case load consists of (a)L=.2H\")\n", + "print(\"min gate pulse width=%.0f us\" %(t*10**6))\n", + "print(\"(b)R=20ohm in series with L=.2H\")\n", + "print(\"min gate pulse width=%.3f us\" %(t1*10**6))\n", + "print(\"(c)R=20ohm in series with L=2H\")\n", + "print(\"min gate pulse width=%.2f us\" %(t2*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "in case load consists of (a)L=.2H\n", + "min gate pulse width=100 us\n", + "(b)R=20ohm in series with L=.2H\n", + "min gate pulse width=100.503 us\n", + "(c)R=20ohm in series with L=2H\n", + "min gate pulse width=1005.03 us\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "def theta(th):\n", + " I_m=1 #supposition\n", + " I_av=(I_m/(2*math.pi))*(1+math.cos(math.radians(th)))\n", + " I_rms=math.sqrt((I_m/(2*math.pi))*((180-th)*math.pi/360+.25*math.sin(math.radians(2*th))))\n", + " FF=I_rms/I_av\n", + " I_rms=35\n", + " I_TAV=I_rms/FF\n", + " return I_TAV\n", + "\n", + "#Calculations\n", + "print(\"when conduction angle=180\")\n", + "th=0\n", + "I_TAV=theta(th)\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)\n", + "print(\"when conduction angle=90\")\n", + "th=90\n", + "I_TAV=theta(th)\n", + "\n", + "#Results\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)\n", + "print(\"when conduction angle=30\")\n", + "th=150\n", + "I_TAV=theta(th)\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when conduction angle=180\n", + "avg on current rating=22.282 A\n", + "when conduction angle=90\n", + "avg on current rating=15.756 A\n", + "when conduction angle=30\n", + "avg on current rating=8.790 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page No 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "def theta(th):\n", + " n=360.0/th\n", + " I=1.0 #supposition\n", + " I_av=I/n\n", + " I_rms=I/math.sqrt(n)\n", + " FF=I_rms/I_av\n", + " I_rms=35\n", + " I_TAV=I_rms/FF\n", + " return I_TAV\n", + "\n", + "#Calculations\n", + "th=180.0\n", + "I_TAV1=theta(th)\n", + "th=90.0\n", + "I_TAV2=theta(th)\n", + "th=30.0\n", + "I_TAV3=theta(th)\n", + "\n", + "#Results\n", + "print(\"when conduction angle=180\")\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)\n", + "print(\"when conduction angle=90\")\n", + "print(\"avg on current rating=%.1f A\" %I_TAV2)\n", + "print(\"when conduction angle=30\")\n", + "print(\"avg on current rating=%.4f A\" %I_TAV3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when conduction angle=180\n", + "avg on current rating=8.790 A\n", + "when conduction angle=90\n", + "avg on current rating=17.5 A\n", + "when conduction angle=30\n", + "avg on current rating=10.1036 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "f=50.0 #Hz\n", + "\n", + "#Calculations\n", + "I_sb=3000.0\n", + "t=1/(4*f)\n", + "T=1/(2*f)\n", + "I=math.sqrt(I_sb**2*t/T) \n", + "r=(I_sb/math.sqrt(2))**2*T \n", + "\n", + "#Results\n", + "print(\"surge current rating=%.2f A\" %I)\n", + "print(\"\\nI**2*t rating=%.0f A^2.s\" %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "surge current rating=2121.32 A\n", + "\n", + "I**2*t rating=45000 A^2.s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "V_s=300.0 #V\n", + "R=60.0 #ohm\n", + "L=2.0 #H\n", + "\n", + "#Calculations\n", + "t=40*10**-6 #s\n", + "i_T=(V_s/R)*(1-math.exp(-R*t/L))\n", + "i=.036 #A\n", + "R1=V_s/(i-i_T)\n", + "\n", + "#Results\n", + "print(\"maximum value of remedial parameter=%.3f kilo-ohm\" %(R1/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of remedial parameter=9.999 kilo-ohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 Page No 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_p=230.0*math.sqrt(2)\n", + "\n", + "#Calculations\n", + "R=1+((1)**-1+(10)**-1)**-1\n", + "A=V_p/R\n", + "s=1 #s\n", + "t_c=20*A**-2*s\n", + "\n", + "#Results\n", + "print(\"fault clearance time=%.4f ms\" %(t_c*10**3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fault clearance time=0.6890 ms\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17, Page No 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "V_s=math.sqrt(2)*230 #V\n", + "L=15*10**-6 #H\n", + "I=V_s/L #I=(di/dt)_max\n", + "R_s=10 #ohm\n", + "v=I*R_s #v=(dv/dt)_max\n", + "\n", + "#Calculations\n", + "f=50 #Hz\n", + "X_L=L*2*math.pi*f\n", + "R=2\n", + "I_max=V_s/(R+X_L) \n", + "FF=math.pi/math.sqrt(2)\n", + "I_TAV1=I_max/FF \n", + "FF=3.98184\n", + "I_TAV2=I_max/FF \n", + "\n", + "\n", + "#RESULTS\n", + "print(\"(di/dt)_max=%.3f A/usec\" %(I/10**6))\n", + "print(\"\\n(dv/dt)_max=%.2f V/usec\" %(v/10**6))\n", + "print(\"\\nI_rms=%.3f A\" %I_max)\n", + "print(\"when conduction angle=90\")\n", + "print(\"I_TAV=%.3f A\" %I_TAV1)\n", + "print(\"when conduction angle=30\")\n", + "print(\"I_TAV=%.3f A\" %I_TAV2)\n", + "print(\"\\nvoltage rating=%.3f V\" %(2.75*V_s)) #rating is taken 2.75 times of peak working voltage unlike 2.5 to 3 times as mentioned int book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(di/dt)_max=21.685 A/usec\n", + "\n", + "(dv/dt)_max=216.85 V/usec\n", + "\n", + "I_rms=162.252 A\n", + "when conduction angle=90\n", + "I_TAV=73.039 A\n", + "when conduction angle=30\n", + "I_TAV=40.748 A\n", + "\n", + "voltage rating=894.490 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19, Page No 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "T_jm=125\n", + "th_jc=.15 #degC/W\n", + "th_cs=0.075 #degC/W\n", + "\n", + "\n", + "#Calculations\n", + "dT=54 #dT=T_s-T_a\n", + "P_av=120\n", + "th_sa=dT/P_av\n", + "T_a=40 #ambient temp\n", + "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n", + "if (P_av-120)<1 :\n", + " print(\"selection of heat sink is satisfactory\")\n", + "\n", + "dT=58 #dT=T_s-T_a\n", + "P_av=120\n", + "th_sa=dT/P_av\n", + "T_a=40 #ambient temp\n", + "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n", + "if (P_av-120)<1 :\n", + " print(\"selection of heat sink is satisfactory\")\n", + "\n", + "V_m=math.sqrt(2)*230\n", + "R=2\n", + "I_TAV=V_m/(R*math.pi)\n", + "P_av=90\n", + "th_sa=(T_jm-T_a)/P_av-(th_jc+th_cs)\n", + "dT=P_av*th_sa\n", + "print(\"for heat sink\") \n", + "print(\"T_s-T_a=%.2f degC\" %dT) \n", + "print(\"\\nP_av=%.0f W\" %P_av)\n", + "P=(V_m/2)**2/R\n", + "eff=P/(P+P_av) \n", + "print(\"\\nckt efficiency=%.3f pu\" %eff)\n", + "a=60 #delay angle\n", + "I_TAV=(V_m/(2*math.pi*R))*(1+math.cos(math.radians(a)))\n", + "print(\"\\nI_TAV=%.2f A\" %I_TAV)\n", + "dT=46\n", + "T_s=dT+T_a\n", + "T_c=T_s+P_av*th_cs \n", + "T_j=T_c+P_av*th_jc \n", + "\n", + "#Results\n", + "print(\"\\ncase temp=%.2f degC\" %T_c)\n", + "print(\"\\njunction temp=%.2f degC\" %T_j)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for heat sink\n", + "T_s-T_a=-20.25 degC\n", + "\n", + "P_av=90 W\n", + "\n", + "ckt efficiency=0.993 pu\n", + "\n", + "I_TAV=38.83 A\n", + "\n", + "case temp=92.75 degC\n", + "\n", + "junction temp=106.25 degC\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20, Page No 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_j=125.0 #degC\n", + "T_s=70.0 #degC\n", + "th_jc=.16 #degC/W\n", + "th_cs=.08 #degC/W\n", + "\n", + "#Calculations\n", + "P_av1=(T_j-T_s)/(th_jc+th_cs) \n", + "\n", + "T_s=60 #degC\n", + "P_av2=(T_j-T_s)/(th_jc+th_cs) \n", + "inc=(math.sqrt(P_av2)-math.sqrt(P_av1))*100/math.sqrt(P_av1) \n", + "\n", + "#Results\n", + "print(\"Total avg power loss in thristor sink combination=%.2f W\" %P_av1)\n", + "print(\"Percentage inc in rating=%.2f\" %inc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total avg power loss in thristor sink combination=229.17 W\n", + "Percentage inc in rating=8.71\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21, Page No 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "R=25000.0\n", + "I_l1=.021 #I_l=leakage current\n", + "I_l2=.025\n", + "I_l3=.018\n", + "I_l4=.016\n", + " #V1=(I-I_l1)*R\n", + " #V2=(I-I_l2)*R\n", + " #V3=(I-I_l3)*R\n", + " #V4=(I-I_l4)*R\n", + " #V=V1+V2+V3+V4\n", + " \n", + "#Calculations\n", + "V=10000.0\n", + "I_l=I_l1+I_l2+I_l3+I_l4\n", + " #after solving\n", + "I=((V/R)+I_l)/4\n", + "R_c=40.0\n", + "V1=(I-I_l1)*R \n", + "\n", + "#Resluts\n", + "print(\"voltage across SCR1=%.0f V\" %V1)\n", + "V2=(I-I_l2)*R \n", + "print(\"\\nvoltage across SCR2=%.0f V\" %V2)\n", + "V3=(I-I_l3)*R \n", + "print(\"\\nvoltage across SCR3=%.0f V\" %V3)\n", + "V4=(I-I_l4)*R \n", + "print(\"\\nvoltage across SCR4=%.0f V\" %V4)\n", + "\n", + "I1=V1/R_c \n", + "print(\"\\ndischarge current through SCR1=%.3f A\" %I1)\n", + "I2=V2/R_c \n", + "print(\"\\ndischarge current through SCR2=%.3f A\" %I2)\n", + "I3=V3/R_c \n", + "print(\"\\ndischarge current through SCR3=%.3f A\" %I3)\n", + "I4=V4/R_c \n", + "print(\"\\ndischarge current through SCR4=%.3f A\" %I4)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage across SCR1=2475 V\n", + "\n", + "voltage across SCR2=2375 V\n", + "\n", + "voltage across SCR3=2550 V\n", + "\n", + "voltage across SCR4=2600 V\n", + "\n", + "discharge current through SCR1=61.875 A\n", + "\n", + "discharge current through SCR2=59.375 A\n", + "\n", + "discharge current through SCR3=63.750 A\n", + "\n", + "discharge current through SCR4=65.000 A\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22, Page No 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_r=1000 #rating of SCR\n", + "I_r=200 #rating of SCR\n", + "V_s=6000 #rating of String\n", + "I_s=1000 #rating of String\n", + "\n", + "#Calculations\n", + "print(\"when DRF=.1\")\n", + "DRF=.1\n", + "n_s=V_s/(V_r*(1-DRF)) \n", + "print(\"number of series units=%.0f\" %math.ceil(n_s))\n", + "n_p=I_s/(I_r*(1-DRF)) \n", + "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))\n", + "print(\"when DRF=.2\")\n", + "DRF=.2\n", + "\n", + "#Results\n", + "n_s=V_s/(V_r*(1-DRF)) \n", + "print(\"number of series units=%.0f\" %math.ceil(n_s))\n", + "n_p=I_s/(I_r*(1-DRF)) \n", + "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when DRF=.1\n", + "number of series units=7\n", + "\n", + "number of parrallel units=6\n", + "when DRF=.2\n", + "number of series units=8\n", + "\n", + "number of parrallel units=7\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23, Page No 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V1=1.6 #on state voltage drop of SCR1\n", + "V2=1.2 #on state voltage drop of SCR2\n", + "I1=250.0 #current rating of SCR1\n", + "I2=350.0 #current rating of SCR2\n", + "\n", + "#Calculations\n", + "R1=V1/I1\n", + "R2=V2/I2\n", + "I=600.0 #current to be shared\n", + " #for SCR1 % I*(R1+R)/(total resistance)=k*I1 (1)\n", + " #for SCR2 % I*(R2+R)/(total resistance)=k*I2 (2)\n", + " #(1)/(2)\n", + "R=(R2*I2-R1*I1)/(I1-I2)\n", + "\n", + "\n", + "#Results\n", + "print(\"RSequired value of resistance=%.3f ohm\" %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RSequired value of resistance=0.004 ohm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25, Page No 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=2000.0 #Hz\n", + "C=0.04*10**-6\n", + "n=.72\n", + "\n", + "#Calculations\n", + "R=1/(f*C*math.log(1/(1-n))) \n", + "V_p=18\n", + "V_BB=V_p/n\n", + "R2=10**4/(n*V_BB) \n", + "I=4.2*10**-3 #leakage current\n", + "R_BB=5000\n", + "R1=(V_BB/I)-R2-R_BB\n", + "\n", + "#Results\n", + "print(\"R=%.2f kilo-ohm\" %(R/1000))\n", + "print(\"\\nR2=%.2f ohm\" %R2)\n", + "print(\"\\nR1=%.0f ohm\" %R1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R=9.82 kilo-ohm\n", + "\n", + "R2=555.56 ohm\n", + "\n", + "R1=397 ohm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26, Page No 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "V_p=18.0\n", + "n=.72\n", + "V_BB=V_p/n\n", + "I_p=.6*10**-3\n", + "I_v=2.5*10**-3\n", + "V_v=1\n", + "\n", + "#Calculations\n", + "R_max=V_BB*(1-n)/I_p \n", + "print(\"R_max=%.2f kilo-ohm\" %(R_max/1000))\n", + "R_min=(V_BB-V_v)/I_v \n", + "print(\"\\nR_min=%.2f kilo-ohm\" %(R_min/1000))\n", + "\n", + "C=.04*10**-6\n", + "f_min=1/(R_max*C*math.log(1/(1-n))) \n", + "print(\"\\nf_min=%.3f kHz\" %(f_min/1000))\n", + "f_max=1/(R_min*C*math.log(1/(1-n))) \n", + "print(\"\\nf_max=%.2f kHz\" %(f_max/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R_max=11.67 kilo-ohm\n", + "\n", + "R_min=9.60 kilo-ohm\n", + "\n", + "f_min=1.683 kHz\n", + "\n", + "f_max=2.05 kHz\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter5.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter5.ipynb new file mode 100755 index 00000000..1d261f20 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter5.ipynb @@ -0,0 +1,511 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 05 : Thyristor Commutation Techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page No 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=5.0*10**-3 #mH\n", + "C=20.0*10**-6 #\u00b5F\n", + "V_s=200 #V\n", + "\n", + "#Calculations\n", + "w_o=math.sqrt(1/(L*C)) #rad/s\n", + "t_o=math.pi/w_o #ms\n", + "\n", + "#Results\n", + "print('conduction time of thyristor = %.2f ms' %(t_o*1000))\n", + "print('voltage across thyristor=%.0f V' %V_s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of thyristor = 0.99 ms\n", + "voltage across thyristor=200 V\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page No 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "C=20.0*10**-6 #\u00b5F\n", + "L=5.0*10**-6 #\u00b5H\n", + "V_s=230.0 #V\n", + "\n", + "#Calculations\n", + "I_p=V_s*math.sqrt(C/L) #A\n", + "w_o=math.sqrt(1/(L*C)) #rad/sec\n", + "t_o=math.pi/w_o #\u00b5S\n", + "I_o=300 \n", + "a = math.degrees(math.asin(I_o/(2*V_s))) \n", + "V_ab = V_s*math.cos(math.radians(a)) #V \n", + "t_c=C*V_ab/I_o #\u00b5s\n", + "\n", + "#Calculations\n", + "print(\"conduction time of auxillery thyristor=%.2f us\" %(t_o*10**6))\n", + "print(\"voltage across main thyristor=%.2f V\" %V_ab)\n", + "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of auxillery thyristor=31.42 us\n", + "voltage across main thyristor=174.36 V\n", + "ckt turn off time=11.62 us\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=200.0 #V\n", + "R1=10.0 #\u2126\n", + "R2=100.0 #\u2126\n", + "C=0 # value of capacitor\n", + "\n", + "#Calculations\n", + "I1=V_s*(1/R1+2/R2) #A\n", + "I2=V_s*(2/R1+1/R2) #A\n", + "t_c1=40*10**-6\n", + "fos=2 #factor of safety\n", + "C1=t_c1*fos/(R1*math.log(2))\n", + "C2=t_c1*fos/(R2*math.log(2))\n", + "if C1 > C2 :\n", + " C = C1*10**6\n", + "else :\n", + " C = C2*10**6\n", + "\n", + "\n", + "#Results\n", + "print(\"peak value of current through SCR1=%.2f A\" %I1); \n", + "print(\"Peak value of current through SCR2=%.2f A\" %I2);\n", + "print(\"Value of capacitor=%.2f uF\" %C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak value of current through SCR1=24.00 A\n", + "Peak value of current through SCR2=42.00 A\n", + "Value of capacitor=11.54 uF\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page No 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0 #V\n", + "L=20*10**-6 #\u00b5H\n", + "C=40*10**-6 #\u00b5F\n", + "I_o=120.0 #A\n", + "\n", + "#Calculations\n", + "I_p=V_s*math.sqrt(C/L) #A\n", + "t_c=C*V_s/I_o #\u00b5s\n", + "w_o=math.sqrt(1/(L*C)) \n", + "t_c1=math.pi/(2*w_o) #\u00b5s\n", + "\n", + "#Results\n", + "print(\"current through main thyristor=%.2f A\" %(I_o+I_p))\n", + "print(\"Current through auxillery thyristor=%.2f A\" %I_o)\n", + "print(\"Circuit turn off time for main thyristor=%.2f us\" %(t_c*10**6))\n", + "print(\"Circuit turn off time for auxillery thyristor=%.2f us\" %(t_c1*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current through main thyristor=445.27 A\n", + "Current through auxillery thyristor=120.00 A\n", + "Circuit turn off time for main thyristor=76.67 us\n", + "Circuit turn off time for auxillery thyristor=44.43 us\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "C_j=25*10**-12 #pF\n", + "I_c=5*10**-3 #charging current\n", + "V_s=200.0 #V\n", + "R=50.0 #\u2126\n", + "\n", + "#Calculations\n", + "C=(C_j*V_s)/(I_c*R)\n", + "\n", + "\n", + "#RESULTS\n", + "print(\"Value of C=%.2f \u00b5F\" %(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C=0.02 \u00b5F\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=200.0 #V\n", + "R=5.0 #\u2126\n", + "\n", + "#Calculations\n", + "C=10.0*10**-6\n", + "#for turn off V_s*(1-2*exp(-t/(R*C)))=0, so after solving\n", + "t_c=R*C*math.log(2.0)\n", + "\n", + "#Results\n", + "print(\"circuit turn off time=%.2f us\" %(t_c*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "circuit turn off time=34.66 us\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page No 264 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=1.0 #\u2126\n", + "L=20*10**-6 #\u00b5H\n", + "C=40*10**-6 #\u00b5F\n", + "\n", + "#Calculations\n", + "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n", + "t_1=math.pi/w_r\n", + "\n", + "#Results\n", + "print(\"conduction time of thyristor=%.3f us\" %(t_1*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of thyristor=125.664 us\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "dv=400*10.0**-6 #dv=dv_T/dt(V/s)\n", + "V_s=200.0 #v\n", + "R=20.0 #\u2126\n", + "\n", + "#Calculations\n", + "C=V_s/(R*dv) \n", + "C_j=.025*10**-12\n", + "C_s=C-C_j\n", + "I_T=40;\n", + "R_s=1/((I_T/V_s)-(1/R)) \n", + "#value of R_s in book is wrongly calculated\n", + "\n", + "#Results\n", + "print(\"R_s=%.2f ohm\" %R_s)\n", + "print(\"C_s=%.3f uF\" %(C_s/10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R_s=6.67 ohm\n", + "C_s=0.025 uF\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=200.0 #V\n", + "C=20.0*10**-6 #\u00b5H \n", + "L=0.2*10**-3 #\u00b5F\n", + "i_c=10.0\n", + "\n", + "#Calculations\n", + "i=V_s*math.sqrt(C/L)\n", + "w_o=1.0/math.sqrt(L*C)\n", + "t_1 = (1/w_o)*math.degrees(math.asin(i_c/i))\n", + "t_o=math.pi/w_o\n", + "t_c=t_o-2*t_1 \n", + "\n", + "#Results\n", + "print(\"reqd time=%.2f us\" %(t_1*10**6))\n", + "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n", + "print(\"ckt turn off time=%.5f us\" %t_1)\n", + "#solution in book wrong, as wrong values are selected while filling the formuleas" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "reqd time=575.37 us\n", + "ckt turn off time=-952.05 us\n", + "ckt turn off time=0.00058 us\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No 268 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "L=1.0 #\u00b5H\n", + "R=50.0 #\u2126\n", + "V_s=200.0 #V\n", + "t=0.01 #sec\n", + "Vd=0.7\n", + "\n", + "#Calculations\n", + "tau=L/R\n", + "i=(V_s/R)*(1-math.exp(-t/tau))\n", + "t=8*10**-3\n", + "i1=i-t*Vd \n", + "\n", + "\n", + "#Results\n", + "print(\"current through L = %.2f A\" %i1)\n", + "i_R=0 #current in R at t=.008s\n", + "print(\"Current through R = %.2f A\" %i_R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current through L = 1.57 A\n", + "Current through R = 0.00 A\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12, Page No 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "#initialisation of variables\n", + "L=1.0 #H\n", + "R=50.0 #ohm\n", + "V_s=200.0 #V\n", + "\n", + "#Calculations\n", + "tau=L/R\n", + "t=0.01 #s\n", + "i=(V_s/R)*(1-math.exp(-t/tau))\n", + "C=1*10**-6 #F\n", + "V_c=math.sqrt(L/C)*i\n", + "\n", + "#Results\n", + "print(\"current in R,L=%.2f A\" %i)\n", + "print(\"voltage across C=%.2f kV\" %(V_c/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in R,L=1.57 A\n", + "voltage across C=1.57 kV\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter6.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter6.ipynb new file mode 100755 index 00000000..dff6564b --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter6.ipynb @@ -0,0 +1,1761 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 06 : Phase Controlled Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "P=1000.0\n", + "R=V**2/P\n", + "\n", + "#Calculations\n", + "a=math.pi/4\n", + "V_or1=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n", + "P1=V_or1**2/R \n", + "a=math.pi/2\n", + "V_or2=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n", + "P2=V_or2**2/R \n", + "\n", + "#Results\n", + "print(\"when firing angle delay is of 45deg\")\n", + "print(\"power absorbed=%.2f W\" %P1)\n", + "print(\"when firing angle delay is of 90deg\")\n", + "print(\"power absorbed=%.2f W\" %P2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when firing angle delay is of 45deg\n", + "power absorbed=454.58 W\n", + "when firing angle delay is of 90deg\n", + "power absorbed=250.00 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "E=150.0\n", + "R=8.0\n", + "\n", + "#Calculations\n", + "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n", + "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n", + "P=E*I_o \n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n", + "P_r=I_or**2*R \n", + "pf=(P+P_r)/(V*I_or)\n", + "\n", + "#Results\n", + "print(\"avg charging curent=%.4f A\" %I_o)\n", + "print(\"power supplied to the battery=%.2f W\" %P)\n", + "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n", + "print(\"supply pf=%.3f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg charging curent=3.5679 A\n", + "power supplied to the battery=535.18 W\n", + "power dissipated by the resistor=829.760 W\n", + "supply pf=0.583\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "E=150.0\n", + "R=8.0\n", + "a=35.0\n", + "\n", + "#Calculations\n", + "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n", + "th2=180-th1\n", + "I_o=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(th2)))-E*((th2-a)*math.pi/180)) \n", + "P=E*I_o \n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*((th2-a)*math.pi/180)-(V**2/2)*(math.sin(math.radians(2*th2))-math.sin(math.radians(2*a)))-2*math.sqrt(2)*V*E*(math.cos(math.radians(a))-math.cos(math.radians(th2)))))\n", + "P_r=I_or**2*R \n", + "pf=(P+P_r)/(V*I_or) \n", + "\n", + "\n", + "#Results\n", + "print(\"avg charging curent=%.4f A\" %I_o)\n", + "print(\"power supplied to the battery=%.2f W\" %P)\n", + "print(\"power dissipated by the resistor=%.2f W\" %P_r)\n", + "print(\"supply pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg charging curent=4.9208 A\n", + "power supplied to the battery=738.12 W\n", + "power dissipated by the resistor=689.54 W\n", + "supply pf=0.6686\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page No 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "B=210\n", + "f=50.0 #Hz\n", + "w=2*math.pi*f\n", + "a=40.0 #firing angle\n", + "V=230.0\n", + "R=5.0\n", + "L=2*10**-3\n", + "\n", + "#Calculations\n", + "t_c1=(360-B)*math.pi/(180*w) \n", + "V_o1=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n", + "I_o1=V_o1/R \n", + "E=110\n", + "R=5\n", + "L=2*10**-3\n", + "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n", + "t_c2=(360-B+th1)*math.pi/(180*w) \n", + "V_o2=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n", + "I_o2=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(B)))-E*((B-a)*math.pi/180)) \n", + "V_o2=R*I_o2+E \n", + "\n", + "\n", + "#Results\n", + "print(\"for R=5ohm and L=2mH\")\n", + "print(\"ckt turn off time=%.3f msec\" %(t_c1*1000))\n", + "print(\"avg output voltage=%.3f V\" %V_o1)\n", + "print(\"avg output current=%.4f A\" %I_o1)\n", + "print(\"for R=5ohm % L=2mH and E=110V\")\n", + "print(\"ckt turn off time=%.3f msec\" %(t_c2*1000))\n", + "print(\"avg output current=%.4f A\" %I_o2)\n", + "print(\"avg output voltage=%.3f V\" %V_o2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for R=5ohm and L=2mH\n", + "ckt turn off time=8.333 msec\n", + "avg output voltage=84.489 V\n", + "avg output current=16.8979 A\n", + "for R=5ohm % L=2mH and E=110V\n", + "ckt turn off time=9.431 msec\n", + "avg output current=6.5090 A\n", + "avg output voltage=142.545 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "f=50.0\n", + "R=10.0\n", + "a=60.0\n", + "\n", + "#Calculations\n", + "V_m=(math.sqrt(2)*V_s)\n", + "V_o=V_m/(2*math.pi)*(1+math.cos(math.radians(a)))\n", + "I_o=V_o/R\n", + "V_or=(V_m/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a*math.pi/180)+.5*math.sin(math.radians(2*a)))\n", + "I_or=V_or/R\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "FF=V_or/V_o \n", + "VRF=math.sqrt(FF**2-1) \n", + "TUF=P_dc/(V_s*I_or) \n", + "PIV=V_m \n", + "\n", + "\n", + "#Results\n", + "print(\"rectification efficiency=%.4f\" %RE)\n", + "print(\"form factor=%.3f\" %FF)\n", + "print(\"voltage ripple factor=%.4f\" %VRF)\n", + "print(\"t/f utilisation factor=%.4f\" %TUF)\n", + "print(\"PIV of thyristor=%.2f V\" %PIV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectification efficiency=0.2834\n", + "form factor=1.879\n", + "voltage ripple factor=1.5903\n", + "t/f utilisation factor=0.1797\n", + "PIV of thyristor=325.27 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=1000.0\n", + "fos=2.5 #factor of safety\n", + "I_TAV=40.0\n", + "\n", + "#Calculations\n", + "V_m1=V/(2*fos)\n", + "P1=(2*V_m1/math.pi)*I_TAV \n", + "V_m2=V/(fos)\n", + "P2=(2*V_m2/math.pi)*I_TAV \n", + "\n", + "#Results\n", + "print(\"for mid pt convertor\")\n", + "print(\"power handled=%.3f kW\" %(P1/1000))\n", + "print(\"for bridge convertor\")\n", + "print(\"power handled=%.3f kW\" %(P2/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for mid pt convertor\n", + "power handled=5.093 kW\n", + "for bridge convertor\n", + "power handled=10.186 kW\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page No 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "R=.4\n", + "I_o=10\n", + "I_or=I_o\n", + "E=120.0\n", + "\n", + "#Calculations\n", + "a1=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m)))\n", + "pf1=(E*I_o+I_or**2*R)/(V_s*I_or) \n", + "E=-120.0\n", + "a2=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m))) \n", + "pf2=(-E*I_o-I_or**2*R)/(V_s*I_or) \n", + "\n", + "#Results\n", + "print(\"firing angle delay=%.2f deg\" %a1)\n", + "print(\"pf=%.4f\" %pf1)\n", + "print(\"firing angle delay=%.2f deg\" %a2)\n", + "print(\"pf=%.4f\" %pf2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=53.21 deg\n", + "pf=0.5391\n", + "firing angle delay=124.07 deg\n", + "pf=0.5043\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "f=50.0\n", + "a=45.0\n", + "R=5.0\n", + "E=100.0\n", + "\n", + "#Calculations\n", + "V_o=((math.sqrt(2)*V_s)/(2*math.pi))*(3+math.cos(math.radians(a)))\n", + "I_o=(V_o-E)/R \n", + "P=E*I_o \n", + "\n", + "#Results\n", + "print(\"avg o/p current=%.3f A\" %I_o)\n", + "print(\"power delivered to battery=%.4f kW\" %(P/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p current=18.382 A\n", + "power delivered to battery=1.8382 kW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=230\n", + "f=50.0\n", + "a=50.0\n", + "R=6.0\n", + "E=60.0\n", + "V_o1=((math.sqrt(2)*2*V_s)/(math.pi))*math.cos(math.radians(a))\n", + "I_o1=(V_o1-E)/R \n", + "\n", + "#ATQ after applying the conditions\n", + "V_o2=((math.sqrt(2)*V_s)/(math.pi))*math.cos(math.radians(a))\n", + "I_o2=(V_o2-E)/R \n", + "\n", + "print(\"avg o/p current=%.3f A\" %I_o1)\n", + "print(\"avg o/p current after change=%.2f A\" %I_o2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p current=12.184 A\n", + "avg o/p current after change=1.09 A\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V_o=(2*V_m/math.pi)*math.cos(math.radians(a))\n", + "I_o=V_o/R\n", + "V_or=V_m/math.sqrt(2)\n", + "I_or=I_o\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "FF=V_or/V_o \n", + "VRF=math.sqrt(FF**2-1) \n", + "I_s1=2*math.sqrt(2)*I_o/math.pi\n", + "DF=math.cos(math.radians(a))\n", + "CDF=.90032\n", + "pf=CDF*DF \n", + "HF=math.sqrt((1/CDF**2)-1) \n", + "Q=2*V_m*I_o*math.sin(math.radians(a))/math.pi \n", + "\n", + "#Results\n", + "print(\"rectification efficiency=%.4f\" %RE)\n", + "print(\"form factor=%.4f\" %FF)\n", + "print(\"voltage ripple factor=%.4f\" %VRF)\n", + "print(\"pf=%.5f\" %pf)\n", + "print(\"HF=%.5f\" %HF)\n", + "print(\"active power=%.2f W\" %P_dc) \n", + "print(\"reactive power=%.3f Var\" %Q)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectification efficiency=0.6366\n", + "form factor=1.5708\n", + "voltage ripple factor=1.2114\n", + "pf=0.63662\n", + "HF=0.48342\n", + "active power=2143.96 W\n", + "reactive power=2143.956 Var\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12, Page No 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V_o=(V_m/math.pi)*(1+math.cos(math.radians(a)))\n", + "I_o=V_o/R\n", + "V_or=V_s*math.sqrt((1/math.pi)*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2))\n", + "I_or=I_o\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "FF=V_or/V_o \n", + "VRF=math.sqrt(FF**2-1) \n", + "I_s1=2*math.sqrt(2)*I_o*math.cos(math.radians(a/2))/math.pi\n", + "DF=math.cos(math.radians(a/2)) \n", + "CDF=2*math.sqrt(2)*math.cos(math.radians(a/2))/math.sqrt(math.pi*(math.pi-a*math.pi/180)) \n", + "pf=CDF*DF \n", + "HF=math.sqrt((1/CDF**2)-1) \n", + "Q=V_m*I_o*math.sin(math.radians(a))/math.pi\n", + "\n", + "#Results\n", + "print(\"form factor=%.3f\" %FF)\n", + "print(\"rectification efficiency=%.4f\" %RE)\n", + "print(\"voltage ripple factor=%.3f\" %VRF) \n", + "print(\"DF=%.4f\" %DF)\n", + "print(\"CDF=%.4f\" %CDF)\n", + "print(\"pf=%.4f\" %pf)\n", + "print(\"HF=%.4f\" %HF)\n", + "print(\"active power=%.3f W\" %P_dc)\n", + "print(\"reactive power=%.2f Var\" %Q)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "form factor=1.241\n", + "rectification efficiency=0.8059\n", + "voltage ripple factor=0.735\n", + "DF=0.9239\n", + "CDF=0.9605\n", + "pf=0.8874\n", + "HF=0.2899\n", + "active power=3123.973 W\n", + "reactive power=1293.99 Var\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13, Page No 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(2)*V_s\n", + "V_om=3*V_ml/(2*math.pi)\n", + "V_o=V_om/2\n", + "th=30\n", + "a=math.degrees(math.acos((2*math.pi*math.sqrt(3)*V_o/(3*V_ml)-1)))-th \n", + "I_o=V_o/R \n", + "V_or=V_ml/(2*math.sqrt(math.pi))*math.sqrt((5*math.pi/6-a*math.pi/180)+.5*math.sin(math.radians(2*a+2*th)))\n", + "I_or=V_or/R \n", + "RE=V_o*I_o/(V_or*I_or) \n", + "\n", + "#Results\n", + "print(\"delay angle=%.1f deg\" %a)\n", + "print(\"avg load current=%.3f A\" %I_o)\n", + "print(\"rms load current=%.3f A\" %I_or)\n", + "print(\"rectification efficiency=%.4f\" %RE)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delay angle=67.7 deg\n", + "avg load current=7.765 A\n", + "rms load current=10.477 A\n", + "rectification efficiency=0.5494\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15, Page No 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=400.0\n", + "V_ml=math.sqrt(2)*V\n", + "v_T=1.4\n", + "a1=30.0\n", + "\n", + "#Calculations\n", + "V_o1=3*V_ml/(2*math.pi)*math.cos(math.radians(a1))-v_T \n", + "a2=60.0\n", + "V_o2=3*V_ml/(2*math.pi)*math.cos(math.radians(a2))-v_T \n", + "I_o=36\n", + "I_TA=I_o/3 \n", + "I_Tr=I_o/math.sqrt(3) \n", + "P=I_TA*v_T \n", + "\n", + "#Results\n", + "print(\"for firing angle = 30deg\")\n", + "print(\"avg output voltage=%.3f V\" %V_o1)\n", + "print(\"for firing angle = 60deg\")\n", + "print(\"avg output voltage=%.2f V\" %V_o2)\n", + "print(\"avg current rating=%.0f A\" %I_TA)\n", + "print(\"rms current rating=%.3f A\" %I_Tr)\n", + "print(\"PIV of SCR=%.1f V\" %V_ml)\n", + "print(\"power dissipated=%.1f W\" %P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle = 30deg\n", + "avg output voltage=232.509 V\n", + "for firing angle = 60deg\n", + "avg output voltage=133.65 V\n", + "avg current rating=12 A\n", + "rms current rating=20.785 A\n", + "PIV of SCR=565.7 V\n", + "power dissipated=16.8 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17, Page No 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "E=200\n", + "I_o=20\n", + "R=.5\n", + "\n", + "#Calculations\n", + "V_o1=E+I_o*R\n", + "V_s=230\n", + "V_ml=math.sqrt(2)*V_s\n", + "a1=math.degrees(math.acos(V_o1*math.pi/(3*V_ml)))\n", + "th=120\n", + "I_s=math.sqrt((1/math.pi)*I_o**2*th*math.pi/180)\n", + "P=E*I_o+I_o**2*R\n", + "pf=P/(math.sqrt(3)*V_s*I_s) \n", + "V_o2=E-I_o*R\n", + "a2=math.degrees(math.acos(-V_o2*math.pi/(3*V_ml))) \n", + "\n", + "#Results\n", + "print(\"firing angle delay=%.3f deg\" %a1)\n", + "print(\"pf=%.3f\" %pf)\n", + "print(\"firing angle delay=%.2f deg\" %a2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=47.461 deg\n", + "pf=0.646\n", + "firing angle delay=127.71 deg\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18, Page No 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "a1=0\n", + "t_c1=(4*math.pi/3-a1*math.pi/180)/w \n", + "a2=30\n", + "t_c2=(4*math.pi/3-a2*math.pi/180)/w \n", + "\n", + "#Results\n", + "print(\"for firing angle delay=0deg\")\n", + "print(\"commutation time=%.2f ms\" %(t_c1*1000))\n", + "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n", + "print(\"for firing angle delay=30deg\")\n", + "print(\"commutation time=%.2f ms\" %(t_c2*1000))\n", + "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle delay=0deg\n", + "commutation time=13.33 ms\n", + "peak reverse voltage=325.27 V\n", + "for firing angle delay=30deg\n", + "commutation time=11.67 ms\n", + "peak reverse voltage=325.27 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19, Page No 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.2f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage percent V_ph=110.384 V\n", + "for constant load current\n", + "V_ph=110.38 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20, Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*4*math.pi/(2*3)/(2*math.pi/3+math.sqrt(3)*(1+math.cos(math.radians(2*a)))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.2f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage percent V_ph=102.459 V\n", + "for constant load current\n", + "V_ph=102.46 V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21, Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=90.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*4*math.pi/(2*3)/((math.pi-math.pi/2)+(math.sin(math.radians(2*a)))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage percent V_ph=%.2f V\" %V_ph)\n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.1f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage percent V_ph=191.19 V\n", + "for constant load current\n", + "V_ph=191.2 V\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "E=200.0\n", + "I_o=20.0\n", + "R=.5\n", + "\n", + "#Calculations\n", + "V_o=E+I_o*R\n", + "V_s=230\n", + "V_ml=math.sqrt(2)*V_s\n", + "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml)-1)) \n", + "a1=180-a\n", + "I_sr=math.sqrt((1/math.pi)*I_o**2*(a1*math.pi/180))\n", + "P=V_o*I_o\n", + "pf=P/(math.sqrt(3)*V_s*I_sr) \n", + "\n", + "#Results\n", + "print(\"firing angle delay=%.2f deg\" %a)\n", + "print(\"pf=%.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=69.38 deg\n", + "pf=0.67\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23, Page No 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "f=50.0\n", + "I_o=15.0\n", + "a=45.0\n", + "\n", + "#Calculations\n", + "I_TA=I_o*120.0/360.0\n", + "I_Tr=math.sqrt(I_o**2*120/360)\n", + "I_sr=math.sqrt(I_o**2*120/180)\n", + "V_ml=math.sqrt(2)*V_s\n", + "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "V_or=V_ml*math.sqrt((3/(2*math.pi))*(math.pi/3+math.sqrt(3/2)*math.cos(math.radians(2*a))))\n", + "I_or=I_o\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "VA=3*V_s/math.sqrt(3)*I_sr\n", + "TUF=P_dc/VA \n", + "pf=P_ac/VA \n", + "\n", + "#Results\n", + "print(\"rectification efficiency=%.5f\" %RE)\n", + "print(\"TUF=%.4f\" %TUF)\n", + "print(\"Input pf=%.3f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectification efficiency=0.95493\n", + "TUF=0.6752\n", + "Input pf=0.707\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24, Page No 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I=10.0\n", + "a=45.0\n", + "V=400.0\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "DF=math.cos(math.radians(a))\n", + "I_o=10\n", + "I_s1=4*I_o/(math.sqrt(2)*math.pi)*math.sin(math.pi/3)\n", + "I_sr=I_o*math.sqrt(2.0/3.0)\n", + "I_o=1 #suppose\n", + "CDF=I_s1/I_sr \n", + "THD=math.sqrt(1/CDF**2-1) \n", + "pf=CDF*DF \n", + "P=(3*math.sqrt(2)*V*math.cos(math.radians(a))/math.pi)*I\n", + "Q=(3*math.sqrt(2)*V*math.sin(math.radians(a))/math.pi)*I \n", + " \n", + "#Results\n", + "print(\"DF=%.3f\" %DF)\n", + "print(\"CDF=%.3f\" %CDF)\n", + "print(\"THD=%.5f\" %THD)\n", + "print(\"PF=%.4f\" %pf)\n", + "print(\"active power=%.2f W\" %P) \n", + "print(\"reactive power=%.2f Var\" %Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DF=0.707\n", + "CDF=0.955\n", + "THD=0.31084\n", + "PF=0.6752\n", + "active power=3819.72 W\n", + "reactive power=3819.72 Var\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25, Page No 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "print(\"for firing angle=30deg\")\n", + "a=30.0\n", + "V=400.0\n", + "V_ml=math.sqrt(2)*V\n", + "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "E=350\n", + "R=10\n", + "\n", + "#Calculations\n", + "I_o=(V_o-E)/R\n", + "I_or=I_o\n", + "P1=V_o*I_o \n", + "I_sr=I_o*math.sqrt(2.0/3.0)\n", + "VA=3*V/math.sqrt(3)*I_sr\n", + "pf=P1/VA \n", + "a=180-60\n", + "V=400\n", + "V_ml=math.sqrt(2)*V\n", + "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "E=-350\n", + "R=10\n", + "I_o=(V_o-E)/R\n", + "I_or=I_o\n", + "P2=-V_o*I_o \n", + "I_sr=I_o*math.sqrt(2.0/3.0)\n", + "VA=3*V/math.sqrt(3)*I_sr\n", + "pf=P2/VA \n", + "\n", + "print(\"power delivered to load=%.2f W\" %P1)\n", + "print(\"pf=%.4f\" %pf)\n", + "print(\"for firing advance angle=60deg\")\n", + "print(\"power delivered to load=%.2f W\" %P2)\n", + "print(\"pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=30deg\n", + "power delivered to load=5511.74 W\n", + "pf=0.4775\n", + "for firing advance angle=60deg\n", + "power delivered to load=2158.20 W\n", + "pf=0.4775\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26, Page No 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0\n", + "u=15.0\n", + "\n", + "#Calculations\n", + "i=math.cos(math.radians(a))-math.cos(math.radians(a+u))\n", + "a=30\n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", + "a=45\n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", + "a=60\n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", + "\n", + "#Results\n", + "print(\"for firing angle=30deg\") \n", + "print(\"overlap angle=%.1f deg\" %u)\n", + "print(\"for firing angle=45deg\") \n", + "print(\"overlap angle=%.1f deg\" %u)\n", + "print(\"for firing angle=60deg\") \n", + "print(\"overlap angle=%.2f deg\" %u)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=30deg\n", + "overlap angle=2.2 deg\n", + "for firing angle=45deg\n", + "overlap angle=2.2 deg\n", + "for firing angle=60deg\n", + "overlap angle=2.23 deg\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28, Page No 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "E=400.0\n", + "I_o=20.0\n", + "R=1\n", + "\n", + "#Calculations\n", + "V_o=E+I_o*R\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=.004\n", + "V=230 #per phase voltage\n", + "V_ml=math.sqrt(6)*V\n", + "a=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o+3*w*L*I_o/math.pi))) \n", + "print(\"firing angle delay=%.3f deg\" %a)\n", + "u=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o-3*w*L*I_o/math.pi)))-a \n", + "\n", + "#Results\n", + "print(\"overlap angle=%.2f deg\" %u)\n", + "#Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=34.382 deg\n", + "overlap angle=8.22 deg\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29, Page No 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=400.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "R=1\n", + "E=230\n", + "I=15.0\n", + "\n", + "#Calculations\n", + "V_o=-E+I*R\n", + "V_ml=math.sqrt(2)*V\n", + "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml))) \n", + "L=0.004\n", + "a=math.degrees(math.acos((2*math.pi)/(3*V_ml)*(V_o+3*w*L*I/(2*math.pi)))) \n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-3*f*L*I/V_ml))-a \n", + "\n", + "#Results\n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"firing angle delay=%.3f deg\" %a)\n", + "print(\"overlap angle=%.3f deg\" %u)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle=139.702 deg\n", + "firing angle delay=139.702 deg\n", + "overlap angle=1.431 deg\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31, Page No 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0 #per phase\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(3.0)*math.sqrt(2)*V\n", + "w=2*math.pi*f\n", + "a1=60.0\n", + "L=0.015\n", + "i_cp=(math.sqrt(3)*V_ml/(w*L))*(1-math.sin(math.radians(a1))) \n", + "\n", + "#Results\n", + "print(\"circulating current=%.4f A\" %i_cp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "circulating current=27.7425 A\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32, Page No 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "V_m=math.sqrt(2)*V\n", + "a=30.0\n", + "\n", + "#Calculations\n", + "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n", + "R=10\n", + "I_o=V_o/R \n", + "I_TA=I_o*math.pi/(2*math.pi) \n", + "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n", + "I_s=math.sqrt(I_o**2*math.pi/(math.pi)) \n", + "I_o=I_s\n", + "pf=(V_o*I_o/(V*I_s)) \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.3f V\" %V_o)\n", + "print(\"avg o/p current=%.2f A\" %I_o)\n", + "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n", + "print(\"rms value of thyristor current=%.2f A\" %I_Tr)\n", + "print(\"pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n", + " \n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p voltage=179.330 V\n", + "avg o/p current=17.93 A\n", + "avg value of thyristor current=8.967 A\n", + "rms value of thyristor current=12.68 A\n", + "pf=0.7797\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33, Page No 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "V_m=math.sqrt(2)*V\n", + "a=30.0\n", + "L=.0015\n", + "\n", + "#Calculations\n", + "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n", + "R=10\n", + "I_o=V_o/R \n", + "f=50\n", + "w=2*math.pi*f\n", + "V_ox=2*V_m*math.cos(math.radians(a))/math.pi-w*L*I_o/math.pi \n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-I_o*w*L/V_m))-a \n", + "I=I_o\n", + "pf=V_o*I_o/(V*I) \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.3f V\" %V_ox)\n", + "print(\"angle of overlap=%.3f deg\" %u)\n", + "print(\"pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p voltage=176.640 V\n", + "angle of overlap=2.855 deg\n", + "pf=0.7797\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34, Page No 364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=415.0\n", + "V_ml=math.sqrt(2)*V\n", + "a1=35.0 #firing angle advance\n", + "\n", + "#Calculations\n", + "a=180-a1\n", + "I_o=80.0\n", + "r_s=0.04\n", + "v_T=1.5\n", + "X_l=.25 #reactance=w*L\n", + "E=-3*V_ml*math.cos(math.radians(a))/math.pi+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi \n", + "\n", + "#Results\n", + "print(\"mean generator voltage=%.3f V\" %E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean generator voltage=487.590 V\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.35, Page No 364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=415.0\n", + "V_ml=math.sqrt(2)*V\n", + "R=0.2\n", + "I_o=80\n", + "r_s=0.04\n", + "v_T=1.5\n", + "\n", + "#Calculations\n", + "X_l=.25 #reactance=w*L\n", + "a=35\n", + "E=-(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n", + "a1=35\n", + "a=180-a1\n", + "E=(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n", + "\n", + "#Results\n", + "print(\"when firing angle=35deg\") \n", + "print(\"mean generator voltage=%.3f V\" %E)\n", + "print(\"when firing angle advance=35deg\")\n", + "print(\"mean generator voltage=%.3f V\" %E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when firing angle=35deg\n", + "mean generator voltage=503.590 V\n", + "when firing angle advance=35deg\n", + "mean generator voltage=503.590 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.36, Page No 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=5.0\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "V_mp=math.sqrt(2)*V\n", + "a=30.0\n", + "E=150.0\n", + "B=180-math.degrees(math.asin(E/V_mp))\n", + "I_o=(3/(2*math.pi*R))*(V_mp*(math.cos(math.radians(a+30))-math.cos(math.radians(B)))-E*((B-a-30)*math.pi/180))\n", + "\n", + "#Results\n", + "print(\"avg current flowing=%.2f A\" %I_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg current flowing=19.96 A\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.37, Page No 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V\n", + "V_o=V_m*(1+math.cos(math.radians(a)))/math.pi \n", + "E=100\n", + "R=10\n", + "I_o=(V_o-E)/R \n", + "I_TA=I_o*math.pi/(2*math.pi) \n", + "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n", + "I_s=math.sqrt(I_o**2*(1-a/180)*math.pi/(math.pi))\n", + "I_or=I_o\n", + "P=E*I_o+I_or**2*R\n", + "pf=(P/(V*I_s)) \n", + "f=50\n", + "w=2*math.pi*f\n", + "t_c=(1-a/180)*math.pi/w \n", + "\n", + "#Results\n", + "print(\"\\navg o/p current=%.2f A\" %I_o)\n", + "print(\"avg o/p voltage=%.3f V\" %V_o)\n", + "print(\"avg value of thyristor current=%.2f A\" %I_TA)\n", + "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n", + "print(\"avg value of diode current=%.2f A\" %I_TA)\n", + "print(\"rms value of diode current=%.3f A\" %I_Tr)\n", + "print(\"pf=%.4f\" %pf)\n", + "print(\"circuit turn off time=%.2f ms\" %(t_c*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "avg o/p current=9.32 A\n", + "avg o/p voltage=193.202 V\n", + "avg value of thyristor current=4.66 A\n", + "rms value of thyristor current=6.590 A\n", + "avg value of diode current=4.66 A\n", + "rms value of diode current=6.590 A\n", + "pf=0.9202\n", + "circuit turn off time=8.33 ms\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.38, Page No 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "V_m=math.sqrt(2)*V\n", + "L=0.05\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "a=30\n", + "i_cp=2*V_m*(1-math.cos(math.radians(a)))/(w*L) \n", + "R=30.0\n", + "i_l=V_m/R\n", + "i1=i_cp+i_l \n", + "i2=i_cp \n", + "\n", + "#Results\n", + "print(\"peak value of circulating current=%.3f A\" %i_cp)\n", + "print(\"peak value of current in convertor 1=%.3f A\" %i1)\n", + "print(\"peak value of current in convertor 2=%.3f A\" %i2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak value of circulating current=5.548 A\n", + "peak value of current in convertor 1=16.391 A\n", + "peak value of current in convertor 2=5.548 A\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.39, Page No 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "R=5.0\n", + "L=0.05\n", + "\n", + "#Calculations\n", + "phi=math.degrees(math.atan(w*L/R)) \n", + "phi=90+math.degrees(math.atan(w*L/R)) \n", + "\n", + "#Results\n", + "print(\"for no current transients\")\n", + "print(\"triggering angle=%.2f deg\" %phi)\n", + "print(\"for worst transients\")\n", + "print(\"triggering angle=%.2f deg\" %phi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for no current transients\n", + "triggering angle=162.34 deg\n", + "for worst transients\n", + "triggering angle=162.34 deg\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter7.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter7.ipynb new file mode 100755 index 00000000..726160c8 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter7.ipynb @@ -0,0 +1,1036 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 07 : Choppers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page No 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.4 #duty cycle %a=T_on/T\n", + "V_s=230.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V=a*(V_s-2) \n", + "V_or=math.sqrt(a*(V_s-2)**2) \n", + "P_o=V_or**2/R\n", + "P_i=V_s*V/R\n", + "n=P_o*100/P_i \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.1f V\" %V)\n", + "print(\"rms value of o/p voltage=%.1f V\" %V_or)\n", + "print(\"chopper efficiency in percentage=%.2f\" %n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p voltage=91.2 V\n", + "rms value of o/p voltage=144.2 V\n", + "chopper efficiency in percentage=99.13\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page No 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_i=220.0\n", + "V_o=660.0\n", + "\n", + "#Calculations\n", + "a=1-V_i/V_o\n", + "T_on=100.0 #microsecond\n", + "T=T_on/a\n", + "T_off=T-T_on \n", + "T_off=T_off/2\n", + "T_on=T-T_off\n", + "a=T_on/T\n", + "V_o=V_i/(1-a)\n", + "\n", + "#Results \n", + "print(\"pulse width of o/p voltage=%.0f us\" %T_off)\n", + "print(\"\\nnew o/p voltage=%.0f V\" %V_o)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pulse width of o/p voltage=25 us\n", + "\n", + "new o/p voltage=1320 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_1=12.0\n", + "I_2=16.0\n", + "\n", + "#Calculations\n", + "I_0=(I_1+I_2)/2\n", + "R=10.0\n", + "V_0=I_0*R\n", + "V_s=200.0\n", + "a=V_0/V_s\n", + "r=a/(1-a)\n", + "\n", + "#Results\n", + "print(\"time ratio(T_on/T_off)=%.3f\" %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time ratio(T_on/T_off)=2.333\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page No 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_o=660.0\n", + "V_s=220.0\n", + "\n", + "#Calculations\n", + "a=(V_o/V_s)/(1+(V_o/V_s))\n", + "T_on=120\n", + "T=T_on/a\n", + "T_off=T-T_on \n", + "T_off=3*T_off\n", + "T_on=T-T_off\n", + "a=T_on/(T_on+T_off)\n", + "V_o=V_s*(a/(1-a)) \n", + "\n", + "#Results\n", + "print(\"pulse width o/p voltage=%.0f us\" %T_off)\n", + "print(\"\\nnew o/p voltage=%.2f V\" %V_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pulse width o/p voltage=120 us\n", + "\n", + "new o/p voltage=73.33 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page No 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=1.0\n", + "L=.005\n", + "T_a=L/R\n", + "T=2000*10**-6\n", + "E=24.0\n", + "V_s=220\n", + "T_on=600*10**-6\n", + "a=T_on/T\n", + "\n", + "#Calculations\n", + "a1=(T_a/T)*math.log(1+(E/V_s)*((math.exp(T/T_a))-1))\n", + "if a1a :\n", + " print(\"load current is continuous\")\n", + "else:\n", + " print(\"load current is discontinuous\")\n", + "\n", + "t_x=T_on+L*math.log(1+((V_s-E)/272)*(1-math.exp(-T_on/T_a)))\n", + " #Value of t_x wrongly calculated in the book so ans of V_o and I_o varies\n", + "V_o=a*V_s+(1-t_x/T)*E \n", + "I_o=(V_o-E)/R \n", + "I_mx=(V_s-E)/R*(1-math.exp(-T_on/T_a)) \n", + "\n", + "#Results \n", + "print(\"avg o/p voltage=%.2f V\" %V_o)\n", + "print(\"avg o/p current=%.2f A\" %I_o) \n", + "print(\"max value of load current=%.1f A\" %I_mx)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "load current is discontinuous\n", + "avg o/p voltage=121.77 V\n", + "avg o/p current=49.77 A\n", + "max value of load current=81.5 A\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13, Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.2\n", + "V_s=500\n", + "E=a*V_s\n", + "L=0.06\n", + "I=10\n", + "\n", + "#Calculations\n", + "T_on=(L*I)/(V_s-E)\n", + "f=a/T_on \n", + "\n", + "#Results\n", + "print(\"chopping freq=%.2f Hz\" %f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "chopping freq=133.33 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.5\n", + "pu=0.1 #pu ripple\n", + "\n", + "#Calculations\n", + " #x=T/T_a\n", + " #y=exp(-a*x)\n", + "y=(1-pu)/(1+pu)\n", + " #after solving\n", + "x=math.log(1/y)/a\n", + "f=1000\n", + "T=1/f\n", + "T_a=T/x\n", + "R=2\n", + "L=R*T_a\n", + "Li=0.002\n", + "Le=L-Li \n", + "\n", + "#Results\n", + "print(\"external inductance=%.3f mH\" %(Le*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "external inductance=-2.000 mH\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=10.0\n", + "L=0.015\n", + "T_a=L/R\n", + "f=1250.0\n", + "T=1.0/f\n", + "a=0.5\n", + "T_on=a*T\n", + "V_s=220.0\n", + "\n", + "#Calculations\n", + "I_mx=(V_s/R)*((1-math.exp(-T_on/T_a))/(1-math.exp(-T/T_a))) \n", + "I_mn=(V_s/R)*((math.exp(T_on/T_a)-1)/(math.exp(T/T_a)-1)) \n", + "dI=I_mx-I_mn \n", + "V_o=a*V_s\n", + "I_o=V_o/R \n", + "I_or=math.sqrt(I_mx**2+dI**2/3+I_mx*dI) \n", + "I_chr=math.sqrt(a)*I_or \n", + "\n", + "#Results\n", + "print(\"Max value of ripple current=%.2f A\" %dI)\n", + "print(\"Max value of load current=%.3f A\" %I_mx)\n", + "print(\"Min value of load current=%.2f A\" %I_mn)\n", + "print(\"Avg value of load current=%.2f A\" %I_o) \n", + "print(\"rms value of load current=%.2f A\" %I_or)\n", + "print(\"rms value of chopper current=%.2f A\" %I_chr)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max value of ripple current=2.92 A\n", + "Max value of load current=12.458 A\n", + "Min value of load current=9.54 A\n", + "Avg value of load current=11.00 A\n", + "rms value of load current=13.94 A\n", + "rms value of chopper current=9.86 A\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=0.0016\n", + "C=4*10**-6\n", + "\n", + "#Calculations\n", + "w=1/math.sqrt(L*C)\n", + "t=math.pi/w \n", + "\n", + "\n", + "#Results\n", + "print(\"time for which current flows=%.2f us\" %(t*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for which current flows=251.33 us\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18, Page No 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "t_q=20.0*10**-6\n", + "dt=20.0*10**-6\n", + "\n", + "#Calculations\n", + "t_c=t_q+dt\n", + "I_0=60.0\n", + "V_s=60.0\n", + "C=t_c*I_0/V_s \n", + "\n", + "#Results \n", + "print(\"value of commutating capacitor=%.0f uF\" %(C*10**6))\n", + "\n", + "L1=(V_s/I_0)**2*C\n", + "L2=(2*t_c/math.pi)**2/C\n", + "if L1>L2 :\n", + " print(\"value of commutating inductor=%.0f uH\" %(L1*10**6))\n", + "else:\n", + " print(\"value of commutating inductor=%.0f uH\" %(L2*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of commutating capacitor=40 uF\n", + "value of commutating inductor=40 uH\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19, Page No 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "t=100.0*10**-6\n", + "R=10.0\n", + "\n", + "#Calculations\n", + " #V_s*(1-2*math.exp(-t/(R*C)))=0\n", + "C=-t/(R*math.log(1.0/2)) \n", + "L=(4/9.0)*C*R**2 \n", + "L=(1.0/4)*C*R**2 \n", + "\n", + "#Results\n", + "print(\"Value of comutating component C=%.3f uF\" %(C*10**6))\n", + "print(\"max permissible current through SCR is 2.5 times load current\")\n", + "print(\"value of comutating component L=%.1f uH\" %(L*10**6))\n", + "print(\"max permissible current through SCR is 1.5 times peak diode current\")\n", + "print(\"value of comutating component L=%.2f uH\" %(L*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of comutating component C=14.427 uF\n", + "max permissible current through SCR is 2.5 times load current\n", + "value of comutating component L=360.7 uH\n", + "max permissible current through SCR is 1.5 times peak diode current\n", + "value of comutating component L=360.67 uH\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20, Page No 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_on=800.0*10**-6\n", + "V_s=220.0\n", + "I_o=80.0\n", + "C=50*10**-6\n", + "\n", + "#Calculations\n", + "T=T_on+2*V_s*C/I_o \n", + "L=20*10**-6\n", + "C=50*10**-6\n", + "i_T1=I_o+V_s*math.sqrt(C/L) \n", + "i_TA=I_o \n", + "t_c=C*V_s/I_o \n", + "t_c1=(math.pi/2)*math.sqrt(L*C) \n", + "t=150*10**-6\n", + "v_c=I_o*t/C-V_s \n", + "\n", + "#Results \n", + "print(\"effective on period=%.0f us\" %(T*10**6))\n", + "print(\"peak current through main thyristor=%.2f A\" %i_T1)\n", + "print(\"peak current through auxillery thyristor=%.0f A\" %i_TA)\n", + "print(\"turn off time for main thyristor=%.1f us\" %(t_c*10**6))\n", + "print(\"turn off time for auxillery thyristor=%.3f us\" %(t_c1*10**6))\n", + "print(\"total commutation interval=%.0f us\" %(2*t_c*10**6))\n", + "print(\"capacitor voltage=%.0f V\" %v_c)\n", + "print(\"time nedded to recharge the capacitor=%.0f us\" %(2*V_s*C/I_o*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle = 30deg\n", + "avg output voltage=232.509 V\n", + "for firing angle = 60deg\n", + "avg output voltage=133.65 V\n", + "avg current rating=12 A\n", + "rms current rating=20.785 A\n", + "PIV of SCR=565.7 V\n", + "power dissipated=16.8 W\n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21, Page No 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_o=260.0\n", + "V_s=220.0\n", + "fos=2 #factor of safety\n", + "\n", + "#Calculations\n", + "t_off=18*10**-6\n", + "t_c=2*t_off\n", + "C=t_c*I_o/V_s \n", + "L=(V_s/(0.8*I_o))**2*C \n", + "f=400\n", + "a_mn=math.pi*f*math.sqrt(L*C)\n", + "V_omn=V_s*(a_mn+2*f*t_c) \n", + "V_omx=V_s \n", + "\n", + "#Results\n", + "print(\"Value of C=%.3f uF\" %(C*10**6))\n", + "print(\"value of L=%.3f uH\" %(L*10**6))\n", + "print(\"min value of o/p voltage=%.3f V\" %V_omn)\n", + "print(\"max value of o/p voltage=%.0f V\" %V_omx)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=47.461 deg\n", + "pf=0.646\n", + "firing angle delay=127.71 deg\n" + ] + } + ], + "prompt_number": "*" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22, Page No 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "x=2.0\n", + "t_q=30*10**-6\n", + "dt=30*10**-6\n", + "t_c=t_q+dt\n", + "V_s=230.0\n", + "I_o=200.0\n", + "\n", + "#Calculations\n", + "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n", + "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n", + "V_cp=V_s+I_o*math.sqrt(L/C) \n", + "I_cp=x*I_o \n", + "x=3\n", + "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n", + "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n", + "V_cp=V_s+I_o*math.sqrt(L/C) \n", + "I_cp=x*I_o \n", + "\n", + "#Results\n", + "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n", + "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n", + "print(\"peak capacitor voltage=%.0f V\" %V_cp)\n", + "print(\"peak commutataing current=%.0f A\" %I_cp)\n", + "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n", + "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n", + "print(\"peak capacitor voltage=%.2f V\" %V_cp)\n", + "print(\"peak commutataing current=%.0f A\" %I_cp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of commutating inductor=7.321 uH\n", + "value of commutating capacitor=49.822 uF\n", + "peak capacitor voltage=307 V\n", + "peak commutataing current=600 A\n", + "value of commutating inductor=7.321 uH\n", + "value of commutating capacitor=49.822 uF\n", + "peak capacitor voltage=306.67 V\n", + "peak commutataing current=600 A\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23, Page No 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=230\n", + "C=50*10**-6\n", + "L=20*10**-6\n", + "I_cp=V_s*math.sqrt(C/L)\n", + "I_o=200\n", + "x=I_cp/I_o\n", + "\n", + "#Calculations\n", + "t_c=(math.pi-2*math.asin(1/x))*math.sqrt(C*L) \n", + "th1=math.degrees(math.asin(1.0/x))\n", + "t=(5*math.pi/2-th1*math.pi/180)*math.sqrt(L*C)+C*V_s*(1-math.cos(math.radians(th1)))/I_o \n", + "t=(math.pi-th1*math.pi/180)*math.sqrt(L*C) \n", + "\n", + "#Results\n", + "print(\"turn off time of main thyristor=%.2f us\" %(t_c*10**6))\n", + "print(\"total commutation interval=%.3f us\" %(t*10**6))\n", + "print(\"turn off time of auxillery thyristor=%.3f us\" %(t*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "turn off time of main thyristor=62.52 us\n", + "total commutation interval=80.931 us\n", + "turn off time of auxillery thyristor=80.931 us\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.24, Page No 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "tc=0.006\n", + "R=10.0\n", + "L=R*tc\n", + "f=2000.0\n", + "\n", + "#Calculations\n", + "T=1/f\n", + "V_o=50.0\n", + "V_s=100.0\n", + "a=V_o/V_s\n", + "T_on=a*T\n", + "T_off=T-T_on\n", + "dI=V_o*T_off/L\n", + "I_o=V_o/R\n", + "I2=I_o+dI/2 \n", + "I1=I_o-dI/2 \n", + "\n", + "#Results\n", + "print(\"max value of load current=%.3f A\" %I2)\n", + "print(\"min value of load current=%.3f A\" %I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max value of load current=5.104 A\n", + "min value of load current=4.896 A\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.27, Page No 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=30.0\n", + "r_a=.5\n", + "V_s=220.0\n", + "\n", + "#Calculations\n", + "a=I_a*r_a/V_s \n", + "a=1\n", + "k=.1 #V/rpm\n", + "N=(a*V_s-I_a*r_a)/k \n", + "\n", + "#Results\n", + "print(\"min value of duty cycle=%.3f\" %a)\n", + "print(\"min Value of speed control=%.0f rpm\" %0)\n", + "print(\"max value of duty cycle=%.0f\" %a)\n", + "print(\"max value of speed control=%.0f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "min value of duty cycle=1.000\n", + "min Value of speed control=0 rpm\n", + "max value of duty cycle=1\n", + "max value of speed control=2050 rpm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.28, Page No 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=72.0\n", + "I_a=200.0\n", + "r_a=0.045\n", + "N=2500.0\n", + "\n", + "#Calculations\n", + "k=(V_t-I_a*r_a)/N\n", + "E_a=k*1000\n", + "L=.007\n", + "Rm=.045\n", + "Rb=0.065\n", + "R=Rm+Rb\n", + "T_a=L/R\n", + "I_mx=230\n", + "I_mn=180\n", + "T_on=-T_a*math.log(-((V_t-E_a)/R-I_mx)/((I_mn)-(V_t-E_a)/R))\n", + "R=Rm\n", + "T_a=L/R\n", + "T_off=-T_a*math.log(-((-E_a)/R-I_mn)/((I_mx)-(-E_a)/R))\n", + "T=T_on+T_off\n", + "f=1/T \n", + "a=T_on/T \n", + "\n", + "#Results\n", + "print(\"chopping freq=%.1f Hz\" %f) \n", + "print(\"duty cycle ratio=%.3f\" %a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "chopping freq=40.5 Hz\n", + "\n", + "duty cycle ratio=0.588\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.29, Page No 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesI_mx=425\n", + "I_lt=180.0 #lower limit of current pulsation\n", + "I_mn=I_mx-I_lt\n", + "T_on=0.014\n", + "T_off=0.011\n", + "\n", + "#Calculations\n", + "T=T_on+T_off\n", + "T_a=.0635\n", + "a=T_on/T\n", + "V=(I_mx-I_mn*math.exp(-T_on/T_a))/(1-math.exp(-T_on/T_a))\n", + "a=.5\n", + "I_mn=(I_mx-V*(1-math.exp(-T_on/T_a)))/(math.exp(-T_on/T_a))\n", + "T=I_mx-I_mn \n", + "T=T_on/a\n", + "f=1/T \n", + "\n", + "#Results\n", + "print(\"higher limit of current pulsation=%.0f A\" %T)\n", + "print(\"chopping freq=%.3f Hz\" %f)\n", + "print(\"duty cycle ratio=%.2f\" %a)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "higher limit of current pulsation=0 A\n", + "chopping freq=35.714 Hz\n", + "duty cycle ratio=0.50\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter8.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter8.ipynb new file mode 100755 index 00000000..721a9faf --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter8.ipynb @@ -0,0 +1,984 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 08 : Inverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page No 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T=0.1*10**-3\n", + "f=1.0/T\n", + "k=15*10**-6 #k=th/w\n", + "\n", + "#Calculations\n", + "th=2*math.pi*f*k\n", + "X_l=10.0\n", + "R=2.0\n", + "X_c=R*math.tan(th)+X_l\n", + "C=1/(2*math.pi*f*X_c) \n", + "\n", + "#Results\n", + "print(\"value of C=%.3f uF\" %(C*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of C=1.248 uF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "\n", + "#Calculations\n", + "V_01=2*V_s/(math.sqrt(2)*math.pi)\n", + "R=2.0\n", + "I_01=V_01/R\n", + "P_d=I_01**2*R \n", + "V=V_s/2\n", + "I_s=math.sqrt(2)*I_01/math.pi\n", + "P_s=V*I_s\n", + "\n", + "#Results\n", + "print(\"power delivered to load=%.1f W\" %P_d)\n", + "print(\"power delivered by both sources=%.1f W\" %(2*P_s))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power delivered to load=5359.9 W\n", + "power delivered by both sources=5359.9 W\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page No 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_01=4*V_s/(math.pi*math.sqrt(2))\n", + "R=1.0\n", + "X_L=6.0\n", + "X_c=7.0\n", + "\n", + "#Calculations\n", + "I_01=V_01/math.sqrt(R**2+(X_L-X_c)**2)\n", + "P=I_01**2*R \n", + "I_s=math.sqrt(2)*I_01*(2*math.cos(math.radians(45)))/math.pi\n", + "P_s=V_s*I_s \n", + "\n", + "#Results\n", + "print(\"power delivered to the source=%.3f kW\" %(P/1000))\n", + "print(\"\\npower from the source=%.3f kW\" %(P_s/1000))\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power delivered to the source=21.440 kW\n", + "\n", + "power from the source=21.440 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_01=230.0\n", + "R=2.0\n", + "I_01=V_01/R\n", + "I_m=I_01*math.sqrt(2)\n", + "I_T1=I_m/2 \n", + "I_D1=0 \n", + "X_L=8.0\n", + "X_C=6.0\n", + "\n", + "#Calculations\n", + "I_01=V_01/math.sqrt(R**2+(X_L-X_C)**2)\n", + "phi1=math.degrees(math.atan((X_L-X_C)/R))\n", + "I_T1=I_T1*math.sqrt(2)*0.47675 \n", + "I_D1=.1507025*I_m/math.sqrt(2) \n", + "\n", + "\n", + "#Results\n", + "print(\"when load R=2 ohm\")\n", + "print(\"rms value of thyristor current=%.2f A\" %I_T1)\n", + "print(\"rms value of diode current=%.0f A\" %I_D1)\n", + "print(\"when load R=2ohm % X_L=8ohm and X_C=6ohm\")\n", + "print(\"rms value of thyristor current=%.3f A\" %I_T1)\n", + "print(\"rms value of diode current=%.3f A\" %I_D1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when load R=2 ohm\n", + "rms value of thyristor current=54.83 A\n", + "rms value of diode current=17 A\n", + "when load R=2ohm % X_L=8ohm and X_C=6ohm\n", + "rms value of thyristor current=54.826 A\n", + "rms value of diode current=17.331 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "R=4.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=0.035\n", + "\n", + "#Calculations\n", + "C=155*10**-6\n", + "X_L=w*L\n", + "X_C=1/(w*C)\n", + "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n", + "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n", + "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n", + "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n", + "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n", + "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n", + "I_m1=4*V_s/(Z1*math.pi)\n", + "I_01=I_m1/math.sqrt(2) \n", + "I_m3=4*V_s/(3*Z3*math.pi)\n", + "I_m5=4*V_s/(5*Z5*math.pi)\n", + "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2)\n", + "I_0=I_m/math.sqrt(2)\n", + "P_0=(I_0)**2*R \n", + "P_01=(I_01)**2*R \n", + "t1=(180-phi1)*math.pi/(180*w) \n", + "t1=(phi1)*math.pi/(180*w) \n", + "\n", + "#Results\n", + "print(\"rms value of fundamental load current=%.2f A\" %I_01)\n", + "print(\"load power=%.1f W\" %P_0)\n", + "print(\"fundamental load power=%.1f W\" %P_01)\n", + "print(\"rms value of thyristor current=%.3f A\" %(I_m/2))\n", + "print(\"conduction time for thyristor=%.3f ms\" %(t1*1000))\n", + "print(\"Conduction time for diodes=%.3f ms\" %(t1*1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of fundamental load current=20.02 A\n", + "load power=1632.5 W\n", + "fundamental load power=1602.6 W\n", + "rms value of thyristor current=14.285 A\n", + "conduction time for thyristor=3.736 ms\n", + "Conduction time for diodes=3.736 ms\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page No 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_01=2*V_s/(math.sqrt(2)*math.pi) \n", + "R=10.0\n", + "\n", + "#Calculations\n", + "I_01=V_01/R\n", + "P=I_01**2*R \n", + "V_or=math.sqrt((V_s/2)**2)\n", + "P=V_or**2/R \n", + "I_TP=V_s/(2*R)\n", + "I_or=I_TP\n", + "pf=I_01**2*R/(V_or*I_or) \n", + "DF=V_01/V_or \n", + "V_oh=math.sqrt(V_or**2-V_01**2)\n", + "THD=V_oh/V_01 \n", + "V_03=V_01/3\n", + "HF=V_03/V_01\n", + "\n", + "#Results\n", + "print(\"fundamental rms o/p voltage=%.3f V\" %V_01)\n", + "print(\"fundamental power to load=%.1f W\" %P)\n", + "print(\"total o/p power to load=%.1f W\" %P)\n", + "print(\"avg SCR current=%.2f A\" %(I_TP*180/360))\n", + "print(\"i/p pf=%.3f\" %pf) \n", + "print(\"distortion factor=%.1f\" %DF)\n", + "print(\"THD=%.3f\" %THD) \n", + "print(\"harmonic factor=%.4f\" %HF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fundamental rms o/p voltage=103.536 V\n", + "fundamental power to load=1322.5 W\n", + "total o/p power to load=1322.5 W\n", + "avg SCR current=5.75 A\n", + "i/p pf=0.811\n", + "distortion factor=0.9\n", + "THD=0.483\n", + "harmonic factor=0.3333\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=60\n", + "R=3.0\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt(V_s**2*math.pi/math.pi) \n", + "V_01=4*V_s/(math.sqrt(2)*math.pi) \n", + "P_o=V_or**2/R \n", + "P_01=V_01**2/R \n", + "I_s=V_s/R \n", + "I_avg=I_s*math.pi/(2*math.pi) \n", + "V_03=V_01/3\n", + "HF=V_03/V_01 \n", + "V_oh=math.sqrt(V_or**2-V_01**2)\n", + "THD=V_oh/V_01 \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.0f V\" %V_or)\n", + "print(\"o/p power=%.0f W\" %P_o)\n", + "print(\"fundamental component of rms voltage=%.2f V\" %V_01)\n", + "print(\"fundamental freq o/p power=%.2f W\" %P_01) \n", + "print(\"peak current=%.0f A\" %I_s)\n", + "print(\"avg current of each transistor=%.0f A\" %I_avg)\n", + "print(\"peak reverse blocking voltage=%.0f V\" %V_s)\n", + "print(\"harmonic factor=%.4f\" %HF)\n", + "print(\"THD=%.4f\" %THD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=60 V\n", + "o/p power=1200 W\n", + "fundamental component of rms voltage=54.02 V\n", + "fundamental freq o/p power=972.68 W\n", + "peak current=20 A\n", + "avg current of each transistor=10 A\n", + "peak reverse blocking voltage=60 V\n", + "harmonic factor=0.3333\n", + "THD=0.4834\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 Page No 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=220.0\n", + "R=6.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=0.03\n", + "C=180*10**-6\n", + "X_L=w*L\n", + "X_C=1/(w*C)\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n", + "V_01=4*V_s/(math.sqrt(2)*math.pi)\n", + "V_oh=math.sqrt(V_or**2-V_01**2)\n", + "THD=V_oh/V_01 \n", + "print(\"THD of voltage=%.4f\" %THD)\n", + "DF=V_01/V_or \n", + "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n", + "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n", + "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n", + "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n", + "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n", + "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n", + "Z7=math.sqrt(R**2+(X_L*7-X_C/7)**2)\n", + "phi7=math.degrees(math.atan((X_L*7-X_C/7)/R))\n", + "I_01=19.403\n", + "I_m1=4*V_s/(Z1*math.pi)\n", + "I_m3=4*V_s/(3*Z3*math.pi)\n", + "I_m5=4*V_s/(5*Z5*math.pi)\n", + "I_m7=4*V_s/(7*Z7*math.pi)\n", + "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n", + "I_or=I_m/math.sqrt(2)\n", + "I_oh=math.sqrt((I_m**2-I_m1**2)/2)\n", + "THD=I_oh/I_01 \n", + "DF=I_01/I_or \n", + "P_o=I_or**2*R \n", + "I_avg=P_o/V_s \n", + "t1=(180-phi1)*math.pi/(180*w) \n", + "t1=1/(2*f)-t1 \n", + "I_p=I_m1 \n", + "I_t1=.46135*I_p \n", + "\n", + "#Results\n", + "print(\"\\nDF=%.1f\" %DF)\n", + "print(\"THD of current=%.4f\" %THD) \n", + "print(\"DF=%.3f\" %DF)\n", + "print(\"load power=%.1f W\" %P_o)\n", + "print(\"avg value of load current=%.2f A\" %I_avg)\n", + "print(\"conduction time for thyristor=%.0f ms\" %(t1*1000))\n", + "print(\"conduction time for diodes=%.0f ms\" %(t1*1000))\n", + "print(\"peak transistor current=%.2f A\" %I_p)\n", + "print(\"rms transistor current=%.2f A\" %I_t1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "THD of voltage=0.4834\n", + "\n", + "DF=1.0\n", + "THD of current=0.1557\n", + "DF=0.988\n", + "load power=2313.5 W\n", + "avg value of load current=10.52 A\n", + "conduction time for thyristor=3 ms\n", + "conduction time for diodes=3 ms\n", + "peak transistor current=27.44 A\n", + "rms transistor current=12.66 A\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 Page No 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=450.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "I_or=math.sqrt((V_s/(3*R))**2*2/3+(2*V_s/(3*R))**2*1/3) \n", + "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(3*R))**2*2*math.pi/3+(2*V_s/(3*R))**2*math.pi/3)) \n", + "P=3*I_or**2*R \n", + "I_or=math.sqrt((1/(math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n", + "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n", + "P=3*I_or**2*R \n", + "\n", + "#Results\n", + "print(\"for 180deg mode\")\n", + "print(\"rms value of load current=%.3f A\" %I_or)\n", + "print(\"power delivered to load=%.1f kW\" %(P/1000))\n", + "print(\"rms value of load current=%.0f A\" %I_T1)\n", + "print(\"for 120deg mode\")\n", + "print(\"rms value of load current=%.3f A\" %I_or)\n", + "print(\"rms value of load current=%.2f A\" %I_T1)\n", + "print(\"power delivered to load=%.3f kW\" %(P/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for 180deg mode\n", + "rms value of load current=18.371 A\n", + "power delivered to load=10.1 kW\n", + "rms value of load current=13 A\n", + "for 120deg mode\n", + "rms value of load current=18.371 A\n", + "rms value of load current=12.99 A\n", + "power delivered to load=10.125 kW\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12, Page No 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "R=10.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=0.03\n", + "\n", + "#Calculations\n", + "X_L=w*L\n", + "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n", + "V_01=4*V_s/(math.sqrt(2)*math.pi)\n", + "Z1=math.sqrt(R**2+(X_L)**2)\n", + "phi1=-math.degrees(math.atan((X_L)/R))\n", + "Z3=math.sqrt(R**2+(X_L*3)**2)\n", + "phi3=math.degrees(math.atan((X_L*3)/R))\n", + "Z5=math.sqrt(R**2+(X_L*5)**2)\n", + "phi5=math.degrees(math.atan((X_L*5)/R))\n", + "Z7=math.sqrt(R**2+(X_L*7)**2)\n", + "phi7=math.degrees(math.atan((X_L*7)/R))\n", + "I_m1=4*V_s/(math.sqrt(2)*Z1*math.pi)\n", + "I_m3=4*V_s/(math.sqrt(2)*3*Z3*math.pi)\n", + "I_m5=4*V_s/(math.sqrt(2)*5*Z5*math.pi)\n", + "I_m7=4*V_s/(math.sqrt(2)*7*Z7*math.pi)\n", + "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n", + "P=I_m**2*R \n", + "I_01=I_m1*math.sin(math.radians(45))\n", + "I_03=I_m3*math.sin(math.radians(3*45))\n", + "I_05=I_m5*math.sin(math.radians(5*45))\n", + "I_07=I_m7*math.sin(math.radians(7*45))\n", + "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n", + "P=I_0*R \n", + "g=(180-90)/3+45/2\n", + "I_01=2*I_m1*math.sin(math.radians(g))*math.sin(math.radians(45/2))\n", + "I_03=2*I_m3*math.sin(math.radians(g*3))*math.sin(math.radians(3*45/2))\n", + "I_05=2*I_m5*math.sin(math.radians(g*5))*math.sin(math.radians(5*45/2))\n", + "I_07=2*I_m7*math.sin(math.radians(g*7))*math.sin(math.radians(7*45/2))\n", + "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n", + "P=I_0*R \n", + "\n", + "\n", + "#Results\n", + "print(\"using square wave o/p\")\n", + "print(\"power delivered=%.2f W\" %P)\n", + "print(\"using quasi-square wave o/p\")\n", + "print(\"power delivered=%.2f W\" %P)\n", + "print(\"using two symmitrical spaced pulses\")\n", + "print(\"power delivered=%.2f W\" %P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "using square wave o/p\n", + "power delivered=845.87 W\n", + "using quasi-square wave o/p\n", + "power delivered=845.87 W\n", + "using two symmitrical spaced pulses\n", + "power delivered=845.87 W\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14, Page No 520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50.0\n", + "T=1/f\n", + "I=0.5\n", + "\n", + "#Calculations\n", + "di=I/T #di=di/dt\n", + "V_s=220.0\n", + "L=V_s/di \n", + "t=20*10**-6\n", + "fos=2 #factor of safety\n", + "t_c=t*fos\n", + "R=10\n", + "C=t_c/(R*math.log(2))\n", + "\n", + "#Results \n", + "print(\"source inductance=%.1f H\" %L)\n", + "print(\"commutating capacitor=%.2f uF\" %(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "source inductance=8.8 H\n", + "commutating capacitor=5.77 uF\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15, Page No 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=10.0\n", + "L=.01\n", + "C=10*10**-6\n", + "#Calculations\n", + "if (R**2)<(4*L/C) :\n", + " print(\"ckt will commutate on its own\")\n", + "else:\n", + " print(\"ckt will not commutate on its own\")\n", + "\n", + "xie=R/(2*L)\n", + "w_o=1/math.sqrt(L*C)\n", + "w_r=math.sqrt(w_o**2-xie**2)\n", + "phi=math.degrees(math.atan(xie/w_r))\n", + "t=math.pi/w_r\n", + "V_s=1\n", + "v_L=V_s*(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180+phi))\n", + "v_c=V_s*(1-(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180-phi))) \n", + "di=V_s/L \n", + "\n", + "\n", + "#Results\n", + "print(\"voltage across inductor(*V_s)=%.5f V\" %v_L) \n", + "print(\"voltage across capacitor(*V_s)=%.5f V\" %v_c)\n", + "print(\"di/dt*V_s (for t=0)=%.0f A/s\" %di)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ckt will commutate on its own\n", + "voltage across inductor(*V_s)=-0.60468 V\n", + "voltage across capacitor(*V_s)=1.60468 V\n", + "di/dt*V_s (for t=0)=100 A/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.16, Page No 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=0.006\n", + "C=1.2*10**-6\n", + "R=100.0\n", + "\n", + "#Calculations\n", + "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", + "T_off=0.2*10**-3\n", + "f=1/(2*(T+T_off)) \n", + "R=40\n", + "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", + "T_off=.2*10**-3\n", + "f=1/(2*(T+T_off)) \n", + "R=140\n", + "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", + "T_off=.2*10**-3\n", + "f=1/(2*(T+T_off)) \n", + "\n", + "#Results\n", + "print(\"o/p freq=%.2f Hz\" %f)\n", + "print(\"for R=40ohm\")\n", + "print(\"upper limit o/p freq=%.1f Hz\" %f)\n", + "print(\"for R=140ohm\")\n", + "print(\"lower limit o/p freq=%.1f Hz\" %f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "o/p freq=239.81 Hz\n", + "for R=40ohm\n", + "upper limit o/p freq=239.8 Hz\n", + "for R=140ohm\n", + "lower limit o/p freq=239.8 Hz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17, Page No 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=5000.0\n", + "w=2*math.pi*f\n", + "R=3.0\n", + "\n", + "#Calculations\n", + "L=60*10**-6\n", + "xie=R/(2*L)\n", + "C=7.5*10**-6\n", + "w_o=1/math.sqrt(L*C)\n", + "w_r=math.sqrt(w_o**2-xie**2)\n", + "t_c=math.pi*(1/w-1/w_r) \n", + "fos=1.5\n", + "t_q=10*10**-6\n", + "f_max=1/(2*math.pi*(t_q*fos/math.pi+1/w_r)) \n", + "\n", + "#Results\n", + "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n", + "print(\"max possible operating freq=%.1f Hz\" %f_max)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ckt turn off time=21.39 us\n", + "max possible operating freq=5341.4 Hz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18, Page No 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage V_ph=%.3f V\" %V_ph) \n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.2f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage V_ph=110.384 V\n", + "for constant load current\n", + "V_ph=110.38 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19, Page No 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "t=20.0\n", + "fos=2.0 #factor of safety\n", + "\n", + "#Calculations\n", + "t_c=t*fos\n", + "n=1.0/3\n", + "R=20.0\n", + "C=n**2*t_c/(4*R*math.log(2)) \n", + "\n", + "#Results \n", + "print(\"value of capacitor=%.2f uF\" %C)\n", + " #printing mistake in the answer in book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of capacitor=0.08 uF\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.20, Page No 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=220.0\n", + "V_p=math.sqrt(2)*V_s/3 \n", + "V_L=math.sqrt(3)*V_p \n", + "V_p1=math.sqrt(2)*V_s/math.pi \n", + "V_L1=math.sqrt(3)*V_p1 \n", + "V_oh=math.sqrt(V_L**2-V_L1**2)\n", + "\n", + "#Calculations\n", + "THD=V_oh/V_L1 \n", + "V_a1=2*V_s/math.pi\n", + "V_a5=2*V_s/(5*math.pi)\n", + "V_a7=2*V_s/(7*math.pi)\n", + "V_a11=2*V_s/(11*math.pi)\n", + "R=4.0\n", + "L=0.02\n", + "f=50\n", + "w=2*math.pi*f\n", + "Z1=math.sqrt(R**2+(w*L)**2)\n", + "Z5=math.sqrt(R**2+(5*w*L)**2)\n", + "Z7=math.sqrt(R**2+(7*w*L)**2)\n", + "Z11=math.sqrt(R**2+(11*w*L)**2)\n", + "I_a1=V_a1/Z1\n", + "I_a5=V_a5/Z5\n", + "I_a7=V_a7/Z7\n", + "I_a11=V_a11/Z11\n", + "I_or=math.sqrt((I_a1**2+I_a5**2+I_a7**2+I_a11**2)/2)\n", + "P=3*I_or**2*R \n", + "I_s=P/V_s \n", + "I_TA=I_s/3 \n", + " \n", + "#Results\n", + "print(\"rms value of phasor voltages=%.2f V\" %V_p)\n", + "print(\"rms value of line voltages=%.2f V\" %V_L)\n", + "print(\"fundamental component of phase voltage=%.3f V\" %V_p1)\n", + "print(\"fundamental component of line voltages=%.3f V\" %V_L1)\n", + "print(\"THD=%.7f\" %THD)\n", + "print(\"load power=%.1f W\" %P)\n", + "print(\"avg value of source current=%.3f A\" %I_s)\n", + "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of phasor voltages=103.71 V\n", + "rms value of line voltages=179.63 V\n", + "fundamental component of phase voltage=99.035 V\n", + "fundamental component of line voltages=171.533 V\n", + "THD=0.3108419\n", + "load power=2127.6 W\n", + "avg value of source current=9.671 A\n", + "avg value of thyristor current=3.224 A\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter9.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter9.ipynb new file mode 100755 index 00000000..052c4736 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter9.ipynb @@ -0,0 +1,388 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 09 : AC Voltage Controllers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page No 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "\n", + "#Calculations\n", + "V_or=(V_m/2)*math.sqrt(1/math.pi*((2*math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "R=20\n", + "I_or=V_or/R\n", + "P_o=I_or**2*R \n", + "I_s=I_or\n", + "VA=V_s*I_s\n", + "pf=P_o/VA \n", + "V_o=math.sqrt(2)*V_s/(2*math.pi)*(math.cos(math.radians(a))-1)\n", + "I_ON=V_o/R \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n", + "print(\"load power=%.1f W\" %P_o)\n", + "print(\"i/p pf=%.4f\" %pf)\n", + "print(\"avg i/p current=%.4f A\" %I_ON)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=224.716 V\n", + "load power=2524.9 W\n", + "i/p pf=0.9770\n", + "avg i/p current=-0.7581 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page No 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "\n", + "#Calculations\n", + "V_or=(V_s)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "R=20\n", + "I_or=V_or/R\n", + "P_o=I_or**2*R \n", + "I_s=I_or\n", + "VA=V_s*I_s\n", + "pf=P_o/VA \n", + "I_TA=math.sqrt(2)*V_s/(2*math.pi*R)*(math.cos(math.radians(a))+1) \n", + "I_Tr=math.sqrt(2)*V_s/(2*R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n", + "print(\"load power=%.2f W\" %P_o)\n", + "print(\"i/p pf=%.2f\" %pf)\n", + "print(\"avg thyristor current=%.2f A\" %I_TA) \n", + "print(\"rms value of thyristor current=%.2f A\" %I_Tr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=219.304 V\n", + "load power=2404.71 W\n", + "i/p pf=0.95\n", + "avg thyristor current=4.42 A\n", + "rms value of thyristor current=7.75 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "n=6.0 #on cycles\n", + "m=4.0 #off cycles\n", + "\n", + "#Calculations\n", + "k=n/(n+m)\n", + "V_or=V_s*math.sqrt(k) \n", + "pf=math.sqrt(k) \n", + "R=15\n", + "I_m=V_s*math.sqrt(2)/R\n", + "I_TA=k*I_m/math.pi\n", + "I_TR=I_m*math.sqrt(k)/2 \n", + " \n", + "#Results\n", + "print(\"rms value of o/ voltage=%.2f V\" %V_or)\n", + "print(\"i/p pf=%.2f\" %pf)\n", + "print(\"avg thyristor current=%.2f A\" %I_TA) \n", + "print(\"rms value of thyristor current=%.2f A\" %I_TR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/ voltage=178.16 V\n", + "i/p pf=0.77\n", + "avg thyristor current=4.14 A\n", + "rms value of thyristor current=8.40 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page No 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "R=3.0\n", + "\n", + "#Calculations\n", + "I_TAM1=2*V_m/(2*math.pi*R) \n", + "I_TRM2=V_m/(2*R) \n", + "f=50\n", + "w=2*math.pi*f\n", + "t_c=math.pi/w \n", + " \n", + "#Results\n", + "print(\"max value of avg thyristor current=%.3f A\" %I_TAM1)\n", + "print(\"max value of avg thyristor current=%.3f A\" %I_TRM2)\n", + "print(\"ckt turn off time=%.0f ms\" %(t_c*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max value of avg thyristor current=34.512 A\n", + "max value of avg thyristor current=54.212 A\n", + "ckt turn off time=10 ms\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=3.0\n", + "X_L=4.0\n", + "\n", + "#Calculations\n", + "phi=math.degrees(math.atan(X_L/R)) \n", + "V_s=230\n", + "Z=math.sqrt(R**2+X_L**2)\n", + "I_or=V_s/Z \n", + "P=I_or**2*R \n", + "I_s=I_or\n", + "pf=P/(V_s*I_s) \n", + "I_TAM=math.sqrt(2)*V_s/(math.pi*Z) \n", + "I_Tm=math.sqrt(2)*V_s/(2*Z) \n", + "f=50\n", + "w=2*math.pi*f\n", + "di=math.sqrt(2)*V_s*w/Z \n", + "\n", + "#Results\n", + "print(\"min firing angle=%.2f deg\" %phi)\n", + "print(\"\\nmax firing angle=%.0f deg\" %180)\n", + "print(\"i/p pf=%.1f\" %pf)\n", + "print(\"max value of rms load current=%.0f A\" %I_or)\n", + "print(\"max power=%.0f W\" %P)\n", + "print(\"max value of avg thyristor current=%.3f A\" %I_TAM)\n", + "print(\"max value of rms thyristor current=%.3f A\" %I_Tm)\n", + "print(\"di/dt=%.0f A/s\" %di)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "min firing angle=53.13 deg\n", + "\n", + "max firing angle=180 deg\n", + "i/p pf=0.6\n", + "max value of rms load current=46 A\n", + "max power=6348 W\n", + "max value of avg thyristor current=20.707 A\n", + "max value of rms thyristor current=32.527 A\n", + "di/dt=20437 A/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No 576" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "R=3.0 #ohm\n", + "X_L=5.0 #ohm\n", + "a=120.0 #firing angle delay\n", + "\n", + "#Calculations\n", + "phi=math.degrees(math.atan(X_L/R))\n", + "b=0\n", + "i=1\n", + "while (i>0) :\n", + " LHS=math.sin(math.radians(b-a))\n", + " RHS=math.sin(math.radians(a-phi))*math.exp(-(R/X_L)*(b-a)*math.pi/180)\n", + " if math.fabs(LHS-RHS)<= 0.01 :\n", + " B=b\n", + " i=2\n", + " break\n", + " \n", + " b=b+.1 \n", + "V_or=math.sqrt(2)*V*math.sqrt((1/(2*math.pi))*((B-a)*math.pi/180+(math.sin(math.radians(2*a))-math.sin(math.radians(2*B)))/2))\n", + "\n", + "\n", + "#Results\n", + "print(\"Extinction angle=%.1f deg\" %B) #answer in the book is wrong as formulae for RHS is wrongly employed\n", + "print(\"rms value of output voltage=%.2f V\" %V_or) #answer do not match due to wrong B in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Extinction angle=156.1 deg\n", + "rms value of output voltage=97.75 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page No 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=60.0\n", + "R=20.0\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt((V_m**2/(2*math.pi))*(a*math.pi/180-math.sin(math.radians(2*a))/2)+(2*V_m**2/(math.pi))*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2)) \n", + "I_T1r=(V_m/R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "I_T3r=(V_m/(2*R))*math.sqrt(1/math.pi*((a*math.pi/180)-math.sin(math.radians(2*a))/2)) \n", + "I1=math.sqrt(2)*I_T1r\n", + "I3=math.sqrt((math.sqrt(2)*I_T1r)**2+(math.sqrt(2)*I_T3r)**2)\n", + "r=V_s*(I1+I3) \n", + "P_o=V_or**2/R\n", + "pf=P_o/r \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", + "print(\"rms value of current for upper thyristors=%.2f A\" %I_T1r)\n", + "print(\"rms value of current for lower thyristors=%.2f A\" %I_T3r)\n", + "print(\"t/f VA rating=%.2f VA\" %r)\n", + "print(\"i/p pf=%.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=424.94 V\n", + "rms value of current for upper thyristors=14.59 A\n", + "rms value of current for lower thyristors=3.60 A\n", + "t/f VA rating=9631.61 VA\n", + "i/p pf=0.94\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb new file mode 100755 index 00000000..cbc3cb90 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb @@ -0,0 +1,228 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Cycloconverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page No 594" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "R=10.0\n", + "a=30.0\n", + "\n", + "#Calculations\n", + "V_or=(V_m/math.sqrt(2))*math.sqrt((1/math.pi)*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2))\n", + "I_or=V_or/R \n", + "I_s=I_or\n", + "pf=(I_or**2*R)/(V_s*I_s) \n", + "\n", + "\n", + "#Results\n", + "print(\"rms value of o/p current=%.2f A\" %I_or)\n", + "print(\"rms value of o/p current for each convertor=%.2f A\" %(I_or/math.sqrt(2)))\n", + "print(\"rms value of o/p current for each thyristor=%.3f A\" %(I_or/2))\n", + "print(\"i/p pf=%.4f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p current=22.67 A\n", + "rms value of o/p current for each convertor=16.03 A\n", + "rms value of o/p current for each thyristor=11.333 A\n", + "i/p pf=0.9855\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page No 604" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_ph=V_s/2\n", + "a=160.0\n", + "\n", + "#Calculations\n", + "r=math.cos(math.radians(180-a))\n", + "m=3\n", + "V_or=r*(V_ph*(m/math.pi)*math.sin(math.pi/m)) \n", + "R=2\n", + "X_L=1.5\n", + "th=math.degrees(math.atan(X_L/R))\n", + "Z=math.sqrt(R**2+X_L**2)\n", + "I_or=V_or/Z \n", + "P=I_or**2*R \n", + "\n", + "#Results\n", + "print(\"rms o/p voltage=%.3f V\" %V_or)\n", + "print(\"rms o/p current=%.2f A\" %I_or)\n", + "print(\"phase angle of o/p current=%.2f deg\" %-th)\n", + "print(\"o/p power=%.2f W\" %P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms o/p voltage=155.424 V\n", + "rms o/p current=62.17 A\n", + "phase angle of o/p current=-36.87 deg\n", + "o/p power=7730.11 W\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No 604" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_ph=V_s/2\n", + "V_l=V_ph*math.sqrt(3)\n", + "a=160.0\n", + "\n", + "#Calculations\n", + "r=math.cos(math.radians(180-a))\n", + "m=6\n", + "V_or=r*(V_l*(m/math.pi)*math.sin(math.pi/m)) \n", + "R=2\n", + "X_L=1.5\n", + "th=math.degrees(math.atan(X_L/R))\n", + "Z=math.sqrt(R**2+X_L**2)\n", + "I_or=V_or/Z \n", + "P=I_or**2*R \n", + "\n", + "#Results\n", + "print(\"rms o/p voltage=%.2f V\" %V_or)\n", + "print(\"rms o/p current=%.2f A\" %I_or)\n", + "print(\"phase angle of o/p current=%.2f deg\" %-th)\n", + "print(\"o/p power=%.2f W\" %P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms o/p voltage=310.85 V\n", + "rms o/p current=124.34 A\n", + "phase angle of o/p current=-36.87 deg\n", + "o/p power=30920.44 W\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page No 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_l=400.0\n", + "V_ml=math.sqrt(2)*V_l\n", + "m=6\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=.0012\n", + "I=40.0\n", + "\n", + "#Calculations\n", + "V_or1=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n", + "V_omx1=V_or1-3*w*L*I/math.pi\n", + "V_rms1=V_omx1/math.sqrt(2) \n", + "a2=30.0\n", + "V_or2=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n", + "V_omx2=V_or2-3*w*L*I/math.pi\n", + "V_rms2=V_omx2/math.sqrt(2) \n", + "\n", + "\n", + "#Results\n", + "print(\"for firing angle=0deg\")\n", + "a1=0\n", + "print(\"rms value of load voltage=%.2f V\" %V_rms2)\n", + "print(\"for firing angle=30deg\")\n", + "print(\"rms value of load voltage=%.2f V\" %V_rms2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=0deg\n", + "rms value of load voltage=-369.12 V\n", + "for firing angle=30deg\n", + "rms value of load voltage=-369.12 V\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb new file mode 100755 index 00000000..d2317d28 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb @@ -0,0 +1,299 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Some Applications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page No 622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=11000.0\n", + "V_ml=math.sqrt(2)*V_s\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "I_d=300\n", + "R_d=1\n", + "g=20 #g=gamma\n", + "a=math.degrees(math.acos(math.cos(math.radians(g))+math.pi/(3*V_ml)*I_d*R_d)) \n", + "L_s=.01\n", + "V_d=(3/math.pi)*((V_ml*math.cos(math.radians(a)))-w*L_s*I_d) \n", + "\n", + "#Results\n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"rectifier o/p voltage=%.1f V\" %V_d)\n", + "print(\"dc link voltage=%.3f V\" %(2*V_d/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle=16.283 deg\n", + "rectifier o/p voltage=13359.3 V\n", + "dc link voltage=26.719 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page No 623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_d=(200.0+200)*10**3\n", + "P=1000.0*10**6\n", + "\n", + "#Calculations\n", + "I_d=P/V_d\n", + " #each thristor conducts for 120deg for a periodicity of 360deg\n", + "a=0\n", + "V_d=200.0*10**3\n", + "V_ml=V_d*math.pi/(3*math.cos(math.radians(a)))\n", + "\n", + "#Results\n", + "print(\"rms current rating of thyristor=%.2f A\" %(I_d*math.sqrt(120/360)))\n", + "print(\"peak reverse voltage across each thyristor=%.2f kV\" %(V_ml/2/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms current rating of thyristor=0.00 A\n", + "peak reverse voltage across each thyristor=104.72 kV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No 627" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_m=230.0\n", + "V_s=230/math.sqrt(2)\n", + "pf=0.8\n", + "P=2000.0\n", + "\n", + "#Calculations\n", + "I_m=P/(V_s*pf)\n", + "I_Tr=I_m/math.sqrt(2)\n", + "I_TA=2*I_m/math.pi\n", + "fos=2 #factor of safety\n", + "PIV=V_m*math.sqrt(2)\n", + "I_Tr=I_m/(2)\n", + "I_TA=I_m/math.pi\n", + "\n", + "#Results\n", + "print(\"rms value of thyristor current=%.2f A\" %(fos*I_Tr))\n", + "print(\"avg value of thyristor current=%.3f A\" %(fos*I_TA))\n", + "print(\"voltage rating of thyristor=%.2f V\" %PIV)\n", + "print(\"rms value of diode current=%.3f A\" %(fos*I_Tr))\n", + "print(\"avg value of diode current=%.3f A\" %(fos*I_TA))\n", + "print(\"voltage rating of diode=%.2f V\" %PIV)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of thyristor current=15.37 A\n", + "avg value of thyristor current=9.786 A\n", + "voltage rating of thyristor=325.27 V\n", + "rms value of diode current=15.372 A\n", + "avg value of diode current=9.786 A\n", + "voltage rating of diode=325.27 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, Page No 629" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=200.0\n", + "I=10.0\n", + "\n", + "#Calculations\n", + "R_L=V/I \n", + "I_h=.005 #holding current\n", + "R2=V/I_h \n", + "t_c=20*10**-6\n", + "fos=2 #factor of safety\n", + "C=t_c*fos/(R_L*math.log(2)) \n", + "\n", + "#Results\n", + "print(\"value of load resistance=%.0f ohm\" %R_L)\n", + "print(\"value of R2=%.0f kilo-ohm\" %(R2/1000))\n", + "print(\"value of C=%.3f uF\" %(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of load resistance=20 ohm\n", + "value of R2=40 kilo-ohm\n", + "value of C=2.885 uF\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "u_r=10\n", + "f=10000.0 #Hz\n", + "p=4.0*10**-8 #ohm-m\n", + "\n", + "#Calculations\n", + "dl=(1/(2*math.pi))*math.sqrt(p*10**7/(u_r*f)) \n", + "l=0.12 #length of cylinder\n", + "t=20.0 #no of turns\n", + "I=100.0\n", + "H=t*I/l\n", + "P_s=2*math.pi*H**2*math.sqrt(u_r*f*p*10**-7) \n", + "d=.02 #diameter\n", + "P_v=4*H**2*p/(d*dl) \n", + "\n", + "#Results\n", + "print(\"depth of heat of penetration=%.5f mm\" %(dl*1000))\n", + "print(\"heat generated per unit cylinder surface area=%.3f W/m**2\" %P_s)\n", + "print(\"heat generated per unit cylinder volume=%.0f W/m**3\" %P_v)\n", + " #answer of P_v varies as given in book as value of d is not taken as in formulae. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of heat of penetration=0.31831 mm\n", + "heat generated per unit cylinder surface area=34906.585 W/m**2\n", + "heat generated per unit cylinder volume=6981317 W/m**3\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=3000.0\n", + "\n", + "#Calculations\n", + "t_qmin=30.0*10**-6\n", + "f_r=f/(1-2*t_qmin*f)\n", + "R=0.06\n", + "L=20.0*10**-6\n", + "C=1/(L*((2*math.pi*f_r)**2+(R/(2*L))**2)) \n", + "\n", + "#Results\n", + "print(\"required capacitor size=%.4f F\" %(C*10**6))\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required capacitor size=94.2215 F\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb new file mode 100755 index 00000000..f8605d69 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb @@ -0,0 +1,1997 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Electic Drives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page No 658" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_e=15.0 #Nm\n", + "K_m=0.5 #V-s/rad\n", + "I_a=T_e/K_m\n", + "n_m=1000.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*n_m/60\n", + "E_a=K_m*w_m\n", + "r_a=0.7\n", + "V_t=E_a+I_a*r_a\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=math.degrees(math.acos(2*math.pi*V_t/V_m-1))\n", + "print(\"firing angle delay=%.3f deg\" %a)\n", + "I_Tr=I_a*math.sqrt((180-a)/360) \n", + "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n", + "I_fdr=I_a*math.sqrt((180+a)/360) \n", + "print(\"rms value of freewheeling diode current=%.3f A\" %I_fdr)\n", + "pf=V_t*I_a/(V_s*I_Tr) \n", + "\n", + "#Results \n", + "print(\"input power factor=%.4f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=65.349 deg\n", + "rms value of thyristor current=16.930 A\n", + "rms value of freewheeling diode current=24.766 A\n", + "input power factor=0.5652\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, Page No 660" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "E=150.0\n", + "R=8.0\n", + "\n", + "#Calculations\n", + "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n", + "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n", + "P=E*I_o \n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n", + "P_r=I_or**2*R \n", + "pf=(P+P_r)/(V*I_or)\n", + "\n", + "#Results\n", + "print(\"avg charging curent=%.4f A\" %I_o)\n", + "print(\"power supplied to the battery=%.2f W\" %P)\n", + "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n", + "print(\"supply pf=%.3f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg charging curent=3.5679 A\n", + "power supplied to the battery=535.18 W\n", + "power dissipated by the resistor=829.760 W\n", + "supply pf=0.583\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No 661" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=250\n", + "V_m=math.sqrt(2)*V_s\n", + "a=30.0\n", + "k=0.03 #Nm/A**2\n", + "n_m=1000.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*n_m/60\n", + "r=.2 #r_a+r_s\n", + "V_t=V_m/math.pi*(1+math.cos(math.radians(a)))\n", + "I_a=V_t/(k*w_m+r) \n", + "print(\"motor armature current=%.2f A\" %I_a)\n", + "T_e=k*I_a**2 \n", + "print(\"motor torque=%.3f Nm\" %T_e)\n", + "I_sr=I_a*math.sqrt((180-a)/180)\n", + "pf=(V_t*I_a)/(V_s*I_sr) \n", + "\n", + "#Results\n", + "print(\"input power factor=%.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor armature current=57.82 A\n", + "motor torque=100.285 Nm\n", + "input power factor=0.92\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4, Page No 663" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "V_f=2*V_m/math.pi\n", + "r_f=200.0\n", + "I_f=V_f/r_f\n", + "T_e=85.0\n", + "K_a=0.8\n", + "\n", + "#Calculations\n", + "I_a=T_e/(I_f*K_a) \n", + "print(\"rated armature current=%.2f A\" %I_a)\n", + "n_m=1200.0\n", + "w_m=2*math.pi*n_m/60\n", + "r_a=0.2\n", + "V_t=K_a*I_f*w_m+I_a*r_a\n", + "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n", + "print(\"firing angle delay=%.2f deg\" %a)\n", + "E_a=V_t\n", + "w_mo=E_a/(K_a*I_f)\n", + "N=60*w_mo/(2*math.pi)\n", + "reg=((N-n_m)/n_m)*100 \n", + "print(\"speed regulation at full load=%.2f\" %reg)\n", + "I_ar=I_a\n", + "pf=(V_t*I_a)/(V_s*I_ar) \n", + "print(\"input power factor of armature convertor=%.4f\" %pf)\n", + "I_fr=I_f\n", + "I_sr=math.sqrt(I_fr**2+I_ar**2)\n", + "VA=I_sr*V_s\n", + "P=V_t*I_a+V_f*I_f\n", + "\n", + "#Results\n", + "print(\"input power factor of drive=%.4f\" %(P/VA))\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rated armature current=59.01 A\n", + "firing angle delay=57.63 deg\n", + "speed regulation at full load=6.52\n", + "input power factor of armature convertor=0.4821\n", + "input power factor of drive=0.5093\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No 664" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "V_f=2*V_m/math.pi\n", + "\n", + "#Calculations\n", + "a1=math.degrees(math.acos(V_t*math.pi/(2*V_m))) \n", + "print(\"delay angle of field converter=%.0f deg\" %a1)\n", + "r_f=200.0\n", + "I_f=V_f/r_f\n", + "T_e=85.0\n", + "K_a=0.8\n", + "I_a=T_e/(I_f*K_a)\n", + "n_m=1200.0\n", + "w_m=2*math.pi*n_m/60\n", + "r_a=0.1\n", + "I_a=50.0\n", + "V_t=-K_a*I_f*w_m+I_a*r_a\n", + "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n", + "\n", + "#Results\n", + "print(\"firing angle delay of armature converter=%.3f deg\" %a)\n", + "print(\"power fed back to ac supply=%.0f W\" %(-V_t*I_a))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delay angle of field converter=58 deg\n", + "firing angle delay of armature converter=119.260 deg\n", + "power fed back to ac supply=8801 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No 665" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=220.0\n", + "n_m=1500.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=10.0\n", + "r_a=1.0\n", + "\n", + "#Calculations\n", + "K_m=(V_t-I_a*r_a)/(w_m)\n", + "T=5.0\n", + "I_a=T/K_m\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=30.0\n", + "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", + "w_m=(V_t-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "print(\"motor speed=%.2f rpm\" %N)\n", + "a=45\n", + "n_m=1000\n", + "w_m=2*math.pi*n_m/60\n", + "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", + "I_a=(V_t-K_m*w_m)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"torque developed=%.3f Nm\" %T_e)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor speed=1254.22 rpm\n", + "torque developed=8.586 Nm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7, Page No 666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=220.0\n", + "n_m=1000.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=60.0\n", + "r_a=.1\n", + "\n", + "#Calculations\n", + "K_m=(V_t-I_a*r_a)/(w_m)\n", + "V_s=230\n", + "V_m=math.sqrt(2)*V_s\n", + "print(\"for 600rpm speed\")\n", + "n_m=600.0\n", + "w_m=2*math.pi*n_m/60\n", + "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m))) \n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"for -500rpm speed\")\n", + "n_m=-500.0\n", + "w_m=2*math.pi*n_m/60\n", + "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m)))\n", + "print(\"firing angle=%.2f deg\" %a)\n", + "I_a=I_a/2\n", + "a=150\n", + "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n", + "w_m=(V_t-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"motor speed=%.3f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for 600rpm speed\n", + "firing angle=49.530 deg\n", + "for -500rpm speed\n", + "firing angle=119.19 deg\n", + "motor speed=-852.011 rpm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page No 672" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.5\n", + "T_e=50.0\n", + "I_a=T_e/K_m\n", + "r_a=0.9\n", + "a=45.0\n", + "V_s=415.0\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(2)*V_s\n", + "w_m=((3*V_ml*(1+math.cos(math.radians(a)))/(2*math.pi))-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"motor speed=%.2f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor speed=2854.42 rpm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page No 672" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_t=600\n", + "n_m=1500.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=80.0\n", + "r_a=1.0\n", + "\n", + "#Calculations\n", + "K_m=(V_t-I_a*r_a)/(w_m)\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "print(\"for firing angle=45deg and speed=1200rpm\")\n", + "a=45.0\n", + "n_m=1200.0\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n", + "I_sr=I_a*math.sqrt(2/3) \n", + "print(\"rms value of source current=%.3f A\" %I_sr)\n", + "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(1/3)))\n", + "print(\"avg value of thyristor current=%.2f A\" %I_a*(1/3))\n", + "pf=(3/(2*math.pi)*(1+math.cos(math.radians(a)))) \n", + "print(\"input power factor=%.3f\" %pf)\n", + "\n", + "print(\"for firing angle=90deg and speed=700rpm\")\n", + "a=90\n", + "n_m=700\n", + "w_m=2*math.pi*n_m/60\n", + "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n", + "I_sr=I_a*math.sqrt(90/180) \n", + "\n", + "\n", + "#Results\n", + "print(\"rms value of source current=%.3f A\" %I_sr)\n", + "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(90.0/360)))\n", + "print(\"avg value of thyristor current=%.3f A\" %I_a*(1/3))\n", + "pf=(math.sqrt(6)/(2*math.pi)*(1+math.cos(math.radians(a))))*math.sqrt(180/(180-a)) \n", + "print(\"input power factor=%.4f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=45deg and speed=1200rpm\n", + "rms value of source current=0.000 A\n", + "rms value of thyristor current=0.000 A\n", + "\n", + "input power factor=0.815\n", + "for firing angle=90deg and speed=700rpm\n", + "rms value of source current=0.000 A\n", + "rms value of thyristor current=195.558 A\n", + "\n", + "input power factor=0.5513\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page No 676" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=30\n", + "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n", + "I_a=21.0\n", + "r_a=.1\n", + "V_d=2.0\n", + "K_m=1.6\n", + "\n", + "#Calculations\n", + "w_m=(V_t-I_a*r_a-V_d)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "print(\"speed of motor=%.1f rpm\" %N)\n", + "\n", + "N=2000\n", + "w_m=2*math.pi*N/60\n", + "I_a=210\n", + "V_t=K_m*w_m+I_a*r_a+V_d\n", + "a=math.degrees(math.acos(V_t*math.pi/(3*V_m)))\n", + "print(\"firing angle=%.2f deg\" %a)\n", + "I_sr=I_a*math.sqrt(2.0/3.0)\n", + "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n", + "print(\"supply power factor=%.3f\" %pf)\n", + "\n", + "I_a=21\n", + "w_m=(V_t-I_a*r_a-V_d)/K_m\n", + "n=w_m*60/(2*math.pi)\n", + "reg=(n-N)/N*100 \n", + "\n", + "#Results\n", + "print(\"speed regulation(percent)=%.2f\" %reg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed of motor=2767.6 rpm\n", + "firing angle=48.48 deg\n", + "supply power factor=0.633\n", + "speed regulation(percent)=5.64\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11, Page No 677" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=230.0\n", + "V_l=V_t*math.pi/(3*math.sqrt(2))\n", + "V_ph=V_l/math.sqrt(3)\n", + "V_in=400 #per phase voltage input\n", + "\n", + "#Calculations\n", + "N1=1500.0\n", + "I_a1=20.0\n", + "r_a1=.6\n", + "E_a1=V_t-I_a1*r_a1\n", + "n1=1000.0\n", + "E_a2=E_a1/1500.0*1000.0\n", + "V_t1=E_a1+I_a1*r_a1\n", + "a1=math.degrees(math.acos(V_t1*math.pi/(3*math.sqrt(2.0)*V_l)))\n", + "I_a2=.5*I_a1\n", + "n2=-900.0\n", + "V_t2=n2*E_a2/N1+I_a2*r_a1\n", + "a2=math.degrees(math.acos(V_t2*math.pi/(3*math.sqrt(2)*V_l))) \n", + "\n", + "#Results\n", + "print(\"transformer phase turns ratio=%.3f\" %(V_in/V_ph))\n", + "print(\"for motor running at 1000rpm at rated torque\")\n", + "print(\"firing angle delay=%.2f deg\" %a1)\n", + "print(\"for motor running at -900rpm at half of rated torque\")\n", + "print(\"firing angle delay=%.3f deg\" %a2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transformer phase turns ratio=4.068\n", + "for motor running at 1000rpm at rated torque\n", + "firing angle delay=0.00 deg\n", + "for motor running at -900rpm at half of rated torque\n", + "firing angle delay=110.674 deg\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12, Page No 678" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=400\n", + "V_ml=math.sqrt(2)*V_s\n", + "V_f=3*V_ml/math.pi\n", + "R_f=300.0\n", + "I_f=V_f/R_f\n", + "T_e=60.0\n", + "k=1.1\n", + "\n", + "#Calculations\n", + "I_a=T_e/(k*I_f)\n", + "N1=1000.0\n", + "w_m1=2*math.pi*N1/60\n", + "r_a1=.3\n", + "V_t1=k*I_f*w_m1+I_a*r_a1\n", + "a1=math.degrees(math.acos(V_f*math.pi/(3*V_ml)))\n", + "N2=3000\n", + "w_m2=2*math.pi*N/60\n", + "a2=0\n", + "V_t2=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "I_f2=(V_t2-I_a*r_a)/(w_m2*k)\n", + "V_f2=I_f2*R_f\n", + "a2=math.degrees(math.acos(V_f2*math.pi/(3*V_ml)))\n", + "\n", + "#Results\n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"firing angle=%.3f deg\" %a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle=48.477 deg\n", + "firing angle=48.477 deg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13, Page No 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + " #after calculating\n", + " #t=w_m/6000-math.pi/360\n", + "\n", + "N=1000.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "t=w_m/6000-math.pi/360 \n", + "\n", + "#Results\n", + "print(\"time reqd=%.2f s\" %t)\n", + " #printing mistake in the answer in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time reqd=0.01 s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14, Page No 679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=1.0 #supposition\n", + "a=60.0\n", + "\n", + "#Calculations\n", + "I_s1=2*math.sqrt(2)/math.pi*I_a*math.sin(math.radians(a))\n", + "I_s3=2*math.sqrt(2)/(3*math.pi)*I_a*math.sin(math.radians(3*a))\n", + "I_s5=2*math.sqrt(2)/(5*math.pi)*I_a*math.sin(math.radians(5*a))\n", + "per3=I_s3/I_s1*100 \n", + "print(\"percent of 3rd harmonic current in fundamental=%.2f\" %per3)\n", + "per5=I_s5/I_s1*100 \n", + "\n", + "#Results\n", + "print(\"percent of 5th harmonic current in fundamental=%.2f\" %per5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percent of 3rd harmonic current in fundamental=0.00\n", + "percent of 5th harmonic current in fundamental=-20.00\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15, Page No 680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=60.0\n", + "I_TA=I_a/3 \n", + "\n", + "#Calculations\n", + "print(\"avg thyristor current=%.0f A\" %I_TA)\n", + "I_Tr=I_a/math.sqrt(3) \n", + "print(\"rms thyristor current=%.3f A\" %I_Tr)\n", + "V_s=400\n", + "V_m=math.sqrt(2)*V_s\n", + "I_sr=I_a*math.sqrt(2.0/3)\n", + "a=150\n", + "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n", + "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n", + "print(\"power factor of ac source=%.3f\" %pf)\n", + "\n", + "r_a=0.5\n", + "K_m=2.4\n", + "w_m=(V_t-I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"Speed of motor=%.2f rpm\" %N)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg thyristor current=20 A\n", + "rms thyristor current=34.641 A\n", + "power factor of ac source=-0.827\n", + "Speed of motor=-1980.76 rpm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16, Page No 685" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=300.0\n", + "V_s=600.0\n", + "a=0.6\n", + "V_t=a*V_s\n", + "P=V_t*I_a \n", + "\n", + "#Calculations\n", + "print(\"input power from source=%.0f kW\" %(P/1000))\n", + "R_eq=V_s/(a*I_a) \n", + "print(\"equivalent input resistance=%.3f ohm\" %R_eq)\n", + "k=.004\n", + "R=.04+.06\n", + "w_m=(a*V_s-I_a*R)/(k*I_a)\n", + "N=w_m*60/(2*math.pi) \n", + "print(\"motor speed=%.1f rpm\" %N)\n", + "T_e=k*I_a**2 \n", + "\n", + "#Results\n", + "print(\"motor torque=%.0f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "input power from source=108 kW\n", + "equivalent input resistance=3.333 ohm\n", + "motor speed=2626.1 rpm\n", + "motor torque=360 Nm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17, Page No 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_on=10.0\n", + "T_off=15.0\n", + "\n", + "#Calculations\n", + "a=T_on/(T_on+T_off)\n", + "V_s=230.0\n", + "V_t=a*V_s\n", + "r_a=3\n", + "K_m=.5\n", + "N=1500\n", + "w_m=2*math.pi*N/60\n", + "I_a=(V_t-K_m*w_m)/r_a \n", + "\n", + "#Results\n", + "print(\"motor load current=%.3f A\" %I_a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor load current=4.487 A\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18, Page No 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "w_m=0 \n", + "print(\"lower limit of speed control=%.0f rpm\" %w_m)\n", + "I_a=25.0\n", + "r_a=.2\n", + "V_s=220\n", + "K_m=0.08\n", + "\n", + "#Calculations\n", + "a=(K_m*w_m+I_a*r_a)/V_s \n", + "print(\"lower limit of duty cycle=%.3f\" %a)\n", + "a=1 \n", + "print(\"upper limit of duty cycle=%.0f\" %a)\n", + "w_m=(a*V_s-I_a*r_a)/K_m \n", + "\n", + "#Results\n", + "print(\"upper limit of speed control=%.1f rpm\" %w_m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lower limit of speed control=0 rpm\n", + "lower limit of duty cycle=0.023\n", + "upper limit of duty cycle=1\n", + "upper limit of speed control=2687.5 rpm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.21, Page No 691" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.6\n", + "V_s=400.0\n", + "V_t=(1-a)*V_s\n", + "I_a=300.0\n", + "P=V_t*I_a \n", + "\n", + "#Calculations \n", + "print(\"power returned=%.0f kW\" %(P/1000))\n", + "r_a=.2\n", + "K_m=1.2\n", + "R_eq=(1-a)*V_s/I_a+r_a \n", + "print(\"equivalent load resistance=%.4f ohm\" %R_eq)\n", + "w_mn=I_a*r_a/K_m\n", + "N=w_mn*60/(2*math.pi) \n", + "print(\"min braking speed=%.2f rpm\" %N)\n", + "w_mx=(V_s+I_a*r_a)/K_m\n", + "N=w_mx*60/(2*math.pi) \n", + "print(\"max braking speed=%.1f rpm\" %N)\n", + "w_m=(V_t+I_a*r_a)/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"max braking speed=%.1f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power returned=48 kW\n", + "equivalent load resistance=0.7333 ohm\n", + "min braking speed=477.46 rpm\n", + "max braking speed=3660.6 rpm\n", + "max braking speed=1750.7 rpm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.22, Page No 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "N=1500.0\n", + "\n", + "#Calculations\n", + "print(\"when speed=1455rpm\")\n", + "n=1455.0\n", + "s1=(N-n)/N\n", + "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n", + "print(\"I_2mx/I_2r=%.3f\" %r)\n", + "print(\"when speed=1350rpm\")\n", + "n=1350\n", + "s1=(N-n)/N\n", + "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n", + "\n", + "#Results\n", + "print(\"I_2mx/I_2r=%.3f\" %r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when speed=1455rpm\n", + "I_2mx/I_2r=0.000\n", + "when speed=1350rpm\n", + "I_2mx/I_2r=0.000\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.24, Page No 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V1=400.0\n", + "r1=0.6\n", + "r2=0.4\n", + "s=1.0\n", + "x1=1.6\n", + "x2=1.6\n", + "\n", + "#Calculations\n", + "print(\"at starting in normal conditions\")\n", + "I_n=V1/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n", + "print(\"current=%.2f A\" %I_n)\n", + "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n", + "print(\"pf=%.4f\" %pf)\n", + "f1=50\n", + "w_s=4*math.pi*f1/4\n", + "T_en=(3/w_s)*I_n**2*(r2/s) \n", + "print(\"\\nTorque developed=%.2f Nm\" %T_en)\n", + "print(\"motor is operated with DOL starting\")\n", + "I_d=V1/2/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n", + "print(\"current=%.0f A\" %I_d)\n", + "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n", + "print(\"pf=%.2f\" %pf)\n", + "f1=25\n", + "w_s=4*math.pi*f1/4\n", + "T_ed=(3/w_s)*I_d**2*(r2/s) \n", + "print(\"Torque developed=%.3f Nm\" %T_ed)\n", + "print(\"at max torque conditions\")\n", + "s_mn=r2/math.sqrt((r1)**2+((x1+x2))**2)\n", + "I_n=V1/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n", + "print(\"current=%.3f A\" %I_n)\n", + "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n", + "print(\"pf=%.4f\" %pf)\n", + "f1=50\n", + "w_s=4*math.pi*f1/4\n", + "T_en=(3/w_s)*I_n**2*(r2/s_mn) \n", + "print(\"Torque developed=%.2f Nm\" %T_en)\n", + "print(\"motor is operated with DOL starting\")\n", + "s_mn=r2/math.sqrt((r1)**2+((x1+x2)/2)**2)\n", + "I_d=V1/2/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n", + "print(\"current=%.3f A\" %I_d)\n", + "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n", + "print(\"\\npf=%.3f\" %pf)\n", + "f1=25\n", + "w_s=4*math.pi*f1/4\n", + "T_en=(3/w_s)*I_d**2*(r2/s_mn) \n", + "\n", + "\n", + "#Results \n", + "print(\"Torque developed=%.3f Nm\" %T_en)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "at starting in normal conditions\n", + "current=119.31 A\n", + "pf=0.2983\n", + "\n", + "Torque developed=108.75 Nm\n", + "motor is operated with DOL starting\n", + "current=106 A\n", + "pf=0.53\n", + "Torque developed=171.673 Nm\n", + "at max torque conditions\n", + "current=79.829 A\n", + "pf=0.7695\n", + "Torque developed=396.26 Nm\n", + "motor is operated with DOL starting\n", + "current=71.199 A\n", + "\n", + "pf=0.822\n", + "Torque developed=330.883 Nm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25, Page No 709" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "x1=1.0\n", + "X_m=50.0\n", + "X_e=x1*X_m/(x1+X_m)\n", + "V=231.0\n", + "V_e=V*X_m/(x1+X_m)\n", + "x2=1.0\n", + "r2=.4\n", + "r1=0\n", + "\n", + "#Calculations\n", + "s_m=r2/(x2+X_e) \n", + "print(\"slip at max torque=%.2f\" %s_m)\n", + "s_mT=r2/(x2+X_m) \n", + "print(\"slip at max torque=%.5f\" %s_mT)\n", + "f1=50.0\n", + "w_s=4*math.pi*f1/4\n", + "print(\"for constant voltage input\")\n", + "T_est=(3/w_s)*(V_e/math.sqrt(r2**2+(x2+X_e)**2))**2*(r2) \n", + "print(\"starting torque=%.3f Nm\" %T_est)\n", + "T_em=(3/w_s)*V_e**2/(2*(x2+X_e)) \n", + "print(\"maximum torque developed=%.2f Nm\" %T_em)\n", + "print(\"for constant current input\")\n", + "I1=28\n", + "T_est=(3/w_s)*(I1*X_m)**2/(r2**2+(x2+X_m)**2)*r2 \n", + "print(\"starting torque=%.3f Nm\" %T_est)\n", + "T_em=(3/w_s)*(I1*X_m)**2/(2*(x2+X_m)) \n", + "print(\"maximum torque developed=%.3f Nm\" %T_em)\n", + "s=s_mT\n", + "i=1\n", + "I_m=I1*(r2/s+i*x2)/(r2/s+i*(x2+X_m))\n", + "I_m=math.fabs(I_m)\n", + "V1=math.sqrt(3)*I_m*X_m \n", + "\n", + "#Results\n", + "print(\"supply voltage reqd=%.1f V\" %V1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "slip at max torque=0.20\n", + "slip at max torque=0.00784\n", + "for constant voltage input\n", + "starting torque=95.988 Nm\n", + "maximum torque developed=247.31 Nm\n", + "for constant current input\n", + "starting torque=5.756 Nm\n", + "maximum torque developed=366.993 Nm\n", + "supply voltage reqd=1236.2 V\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.27, Page No 718" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=420.0\n", + "V1=V/math.sqrt(3)\n", + "T_e=450.0\n", + "N=1440.0\n", + "n=1000.0\n", + "T_L=T_e*(n/N)**2\n", + "n1=1500.0\n", + "\n", + "#Calculations\n", + "w_s=2*math.pi*n1/60\n", + "w_m=2*math.pi*n/60\n", + "a=.8\n", + "I_d=T_L*w_s/(2.339*a*V1)\n", + "k=0\n", + "R=(1-w_m/w_s)*(2.339*a*V1)/(I_d*(1-k)) \n", + "print(\"value of chopper resistance=%.4f ohm\" %R)\n", + "n=1320.0\n", + "T_L=T_e*(n/N)**2\n", + "I_d=T_L*w_s/(2.339*a*V1) \n", + "print(\"Inductor current=%.3f A\" %I_d)\n", + "w_m=2*math.pi*n/60\n", + "k=1-((1-w_m/w_s)*(2.339*a*V1)/(I_d*R)) \n", + "print(\"value of duty cycle=%.4f\" %k)\n", + "s=(n1-n)/n1\n", + "V_d=2.339*s*a*V1 \n", + "print(\"Rectifed o/p voltage=%.3f V\" %V_d)\n", + "P=V_d*I_d\n", + "I2=math.sqrt(2/3)*I_d\n", + "r2=0.02\n", + "Pr=3*I2**2*r2\n", + "I1=a*I2\n", + "r1=0.015\n", + "Ps=3*I1**2*r1\n", + "Po=T_L*w_m\n", + "Pi=Po+Ps+Pr+P\n", + "eff=Po/Pi*100 \n", + "\n", + "#Results\n", + "print(\"Efficiency(in percent)=%.2f\" %eff)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of chopper resistance=2.0132 ohm\n", + "Inductor current=130.902 A\n", + "value of duty cycle=0.7934\n", + "Rectifed o/p voltage=54.449 V\n", + "Efficiency(in percent)=88.00\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.28, Page No 720" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=400.0\n", + "V_ph=V/math.sqrt(3)\n", + "N_s=1000.0\n", + "N=800.0\n", + "a=.7\n", + "I_d=110\n", + "R=2.0\n", + "\n", + "#Calculations\n", + "k=1-((1-N/N_s)*(2.339*a*V_ph)/(I_d*R)) \n", + "print(\"value of duty cycle=%.3f\" %k)\n", + "P=I_d**2*R*(1-k)\n", + "I1=a*I_d*math.sqrt(2/3)\n", + "r1=0.1\n", + "r2=0.08\n", + "Pr=3*I1**2*(r1+r2)\n", + "P_o=20000\n", + "P_i=P_o+Pr+P\n", + "eff=P_o/P_i*100 \n", + "print(\"Efficiency=%.2f\" %eff)\n", + "I11=math.sqrt(6)/math.pi*a*I_d\n", + "th=43\n", + "P_ip=math.sqrt(3)*V*I11*math.cos(math.radians(th))\n", + "pf=P_ip/(math.sqrt(3)*V*I11) \n", + "\n", + "#Results\n", + "print(\"Input power factor=%.4f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of duty cycle=0.656\n", + "Efficiency=70.62\n", + "Input power factor=0.7314\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.29, Page No 724" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=420.0\n", + "V1=V/math.sqrt(3)\n", + "N=1000.0\n", + "w_m=2*math.pi*N/60\n", + "N_s=1500.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "a=0.8\n", + "V_d=2.339*a*s*V1 \n", + "print(\"rectified voltage=%.2f V\" %V_d)\n", + "T=450.0\n", + "N1=1200.0\n", + "T_L=T*(N/N1)**2\n", + "f1=50\n", + "w_s=4*math.pi*f1/4\n", + "I_d=w_s*T_L/(2.339*a*V1) \n", + "print(\"inductor current=%.2f A\" %I_d)\n", + "a_T=-.4\n", + "a1=math.degrees(math.acos(s*a/a_T))\n", + "print(\"delay angle of inverter=%.2f deg\" %a1)\n", + "\n", + "P_s=V_d*I_d\n", + "P_o=T_L*w_m\n", + "R_d=0.01\n", + "P_i=I_d**2*R_d\n", + "I2=math.sqrt(2/3)*I_d\n", + "r2=0.02\n", + "r1=0.015\n", + "P_rol=3*I2**2*r2\n", + "I1=a*I2\n", + "P_sol=3*I1**2*r1\n", + "P_i=P_o+P_rol+P_sol+P_i\n", + "eff=P_o/P_i*100 \n", + "print(\"\\nefficiency=%.2f\" %eff)\n", + "w_m=w_s*(1+(-a_T/a)*math.cos(math.radians(a1))-w_s*R_d*T_L/(2.339*a*V1)**2)\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results \n", + "print(\"motor speed=%.1f rpm\" %N)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectified voltage=151.25 V\n", + "inductor current=108.18 A\n", + "delay angle of inverter=131.81 deg\n", + "\n", + "efficiency=99.64\n", + "motor speed=996.4 rpm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.30, Page No 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=700.0\n", + "E2=V/math.sqrt(3)\n", + "N_s=1500.0\n", + "N=1200.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "V_dd=0.7\n", + "V_dt=1.5\n", + "V_d=3*math.sqrt(6)*s*E2/math.pi-2*V_dd\n", + "V1=415.0\n", + "a=math.degrees(math.acos((3*math.sqrt(2)*E2/math.pi)**-1*(-V_d+2*V_dt)))\n", + "\n", + "#Results\n", + "print(\"firing angle advance=%.2f deg\" %(180-a))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle advance=70.22 deg\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.31, Page No 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=700.0\n", + "E2=V/math.sqrt(3)\n", + "N_s=1500.0\n", + "N=1200.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "V_dd=.7\n", + "V_dt=1.5\n", + "a=0\n", + "u=18 #overlap angle in case of rectifier\n", + "V_d=3*math.sqrt(6)*s*E2*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dd\n", + "V1=415\n", + "V_ml=math.sqrt(2)*V1\n", + "u=4 #overlap anglein the inverter\n", + " #V_dc=-(3*V_ml*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dt)\n", + " #V_dc=V_d\n", + " #after solving % (1+math.cos(math.radians(u)))*math.cos(math.radians(a))-math.sin(math.radians(u))*math.sin(math.radians(a))=-.6425\n", + "a=math.degrees(math.acos(-.6425/(math.sqrt((1+math.cos(math.radians(u)))**2+math.sin(math.radians(u))**2))))-math.degrees(math.asin(math.sin(math.radians(a))/(1+math.cos(math.radians(u)))))\n", + "\n", + "#Results\n", + "print(\"firing angle advance=%.2f deg\" %(180-a))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle advance=71.25 deg\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.32, Page No 727" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=700.0\n", + "E2=V\n", + "N_s=1500.0\n", + "N=1200.0\n", + "\n", + "#Calculations\n", + "s=(N_s-N)/N_s\n", + "V1=415.0\n", + "a_T=s*E2/V1 \n", + "\n", + "#Results\n", + "print(\"voltage ratio of the transformer=%.2f\" %a_T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage ratio of the transformer=0.34\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.33, Page No 733" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "P=6.0\n", + "N_s=600.0\n", + "f1=P*N_s/120.0\n", + "V=400.0\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "V_t=f1*V/f \n", + "print(\"supply freq=%.0f Hz\" %V_t)\n", + "T=340.0\n", + "N=1000.0\n", + "T_L=T*(N_s/N)**2\n", + "w_s=2*math.pi*N_s/60\n", + "P=T_L*w_s\n", + "I_a=P/(math.sqrt(3)*V_t) \n", + "print(\"armature current=%.2f A\" %I_a)\n", + "Z_s=2\n", + "X_s=f1/f*math.fabs(Z_s)\n", + "V_t=V_t/math.sqrt(3)\n", + "Ef=math.sqrt(V_t**2+(I_a*X_s)**2)\n", + "print(\"excitation voltage=%.2f V\" %(math.sqrt(3)*Ef))\n", + "dl=math.degrees(math.atan(I_a*X_s/V_t))\n", + "print(\"load angle=%.2f deg\" %dl)\n", + "T_em=(3/w_s)*(Ef*V_t/X_s) \n", + "\n", + "#Results\n", + "print(\"pull out torque=%.2f Nm\" %T_em)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "supply freq=240 Hz\n", + "armature current=18.50 A\n", + "excitation voltage=243.06 V\n", + "load angle=9.10 deg\n", + "pull out torque=773.69 Nm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.34, Page No 736" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "P=4.0\n", + "f=50.0\n", + "w_s=4*math.pi*f/P\n", + "X_d=8.0\n", + "X_q=2.0\n", + "T_e=80.0\n", + "V=400.0\n", + "\n", + "#Calculations\n", + "V_t=V/math.sqrt(3)\n", + "dl=(1/2)*math.degrees(math.asin(T_e*w_s/((3/2)*(V_t)**2*(1/X_q-1/X_d)))) \n", + "print(\"load angle=%.3f deg\" %dl)\n", + "I_d=V_t*math.cos(math.radians(dl))/X_d\n", + "I_q=V_t*math.sin(math.radians(dl))/X_q\n", + "I_a=math.sqrt(I_d**2+I_q**2) \n", + "print(\"armature current=%.2f A\" %I_a)\n", + "pf=T_e*w_s/(math.sqrt(3)*V*I_a) \n", + "\n", + "#Results\n", + "print(\"input power factor=%.4f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "load angle=0.000 deg\n", + "armature current=28.87 A\n", + "input power factor=0.6283\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.35, Page No 737" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_e=3.0\n", + "K_m=1.2\n", + "I_a=T_e/K_m\n", + "r_a=2.0\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "E_a=(0.263*math.sqrt(2)*V-I_a*r_a)/(1-55/180)\n", + "w_m=E_a/K_m\n", + "N=w_m*60/(2*math.pi) \n", + "\n", + "#Results\n", + "print(\"motor speed=%.2f rpm\" %N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor speed=640.96 rpm\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.36, Page No 738" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=1360.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + " #after calculations V_t % calculated\n", + "V_t=163.45\n", + "r_a=4\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.4f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=5.2578 Nm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.37, Page No 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=2100.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + " #after calculations V_t % calculated\n", + "V_t=227.66\n", + "r_a=4\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.2f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=1.94 Nm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.38, Page No 742" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=840.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + "V=230.0\n", + "a=75.0\n", + "V_t=math.sqrt(2)*V/math.pi*(1+math.cos(math.radians(a)))\n", + "r_a=4\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.4f Nm\" %T_e)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=10.5922 Nm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.39, Page No 743" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=1400.0\n", + "\n", + "#Calculations\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + "V=230.0\n", + "a=60.0\n", + "a1=212\n", + "V_t=math.sqrt(2)*V/math.pi*(math.cos(math.radians(a))-math.cos(math.radians(a1)))+E_a*(180+a-a1)/180\n", + "r_a=3\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "#Results\n", + "print(\"motor torque=%.3f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=5.257 Nm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.40, Page No 745" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "K_m=1.0\n", + "N=600.0\n", + "w_m=2*math.pi*N/60\n", + "E_a=K_m*w_m\n", + "V=230.0\n", + "a=60.0\n", + "\n", + "#Calculations\n", + "V_t=2*math.sqrt(2)*V/math.pi*(math.cos(math.radians(a)))\n", + "r_a=3\n", + "I_a=(V_t-E_a)/r_a\n", + "T_e=K_m*I_a \n", + "\n", + "\n", + "#Results\n", + "print(\"motor torque=%.3f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "motor torque=13.568 Nm\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.41, Page No 745" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "r1=.6\n", + "r2=.4\n", + "s=0.04\n", + "x1=1.6\n", + "x2=1.6\n", + "Z=(r1+r2/s)+(x1+x2)\n", + "V=400.0\n", + "I1=V/Z \n", + "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n", + "print(\"and with %.1f deg phase\" %math.fabs(I1))\n", + "I2=V/Z\n", + "N=1500\n", + "w_s=2*math.pi*N/60\n", + "T_e=(3/w_s)*abs(I2)**2*r2/s \n", + "print(\"motor torque=%.2f Nm\" %T_e)\n", + "N_r=N*(1-s)\n", + "\n", + "f=45\n", + "N_s1=120*f/4\n", + "w_s=2*math.pi*N_s1/60\n", + "s1=(N_s1-N_r)/N_s1\n", + "Z=(r1+r2/s1)+(x1+x2)*f/50.0\n", + "V=360\n", + "I1=V/Z \n", + "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n", + "print(\"and with %.1f deg phase\" %math.fabs(I1))\n", + "I2=V/Z\n", + "T_e=(3/w_s)*abs(I2)**2*r2/s1 \n", + "print(\"motor torque=%.2f Nm\" %T_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "source current=0.000 A \n", + "and with 29.0 deg phase\n", + "motor torque=160.46 Nm\n", + "source current=-0.000 A \n", + "and with 142.9 deg phase\n", + "motor torque=-2598.45 Nm\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb new file mode 100755 index 00000000..62d2a926 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Power Factor Improvement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page No 754" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=250.0\n", + "R_l=5.0\n", + "I_l=20.0\n", + "V_l1=math.sqrt(V_s**2-(R_l*I_l)**2)\n", + "reg2=(V_s-V_l1)/V_s*100 \n", + "pf1=1.0\n", + "\n", + "#Calculations\n", + "P_l1=V_l1*I_l*pf1 #load power\n", + "P_r1=V_s*I_l*pf1 #max powwible system rating\n", + "utf1=P_l1*100/P_r1 \n", + "pf2=0.5\n", + " #(.5*V_l)**2+(.866*V_l+R_l*I_l)**2=V_s**2\n", + " #after solving\n", + "V_l2=158.35 \n", + "reg2=(V_s-V_l2)/V_s*100 \n", + "P_l2=V_l2*I_l*pf2 #load power\n", + "P_r2=V_s*I_l #max powwible system rating\n", + "utf2=P_l2*100/P_r2 \n", + "\n", + "\n", + "#Results\n", + "print(\"for pf=1\")\n", + "print(\"load voltage=%.2f V\" %V_l1)\n", + "print(\"voltage regulation=%.2f\" %reg1)\n", + "print(\"system utilisation factor=%.3f\" %utf1)\n", + "print(\"energy consumed(in units)=%.1f\" %(P_l1/1000))\n", + "print(\"for pf=.5\")\n", + "print(\"load voltage=%.2f V\" %V_l2)\n", + "print(\"voltage regulation=%.2f\" %reg2)\n", + "print(\"system utilisation factor=%.3f\" %utf2)\n", + "print(\"energy consumed(in units)=%.2f\" %(P_l2/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'reg1' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 25\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"for pf=1\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"load voltage=%.2f V\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mV_l1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 27\u001b[1;33m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"voltage regulation=%.2f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mreg1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 28\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"system utilisation factor=%.3f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mutf1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 29\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"energy consumed(in units)=%.1f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mP_l1\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m1000\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mNameError\u001b[0m: name 'reg1' is not defined" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for pf=1\n", + "load voltage=229.13 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page No 756" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50.0\n", + "V_s=230.0\n", + "I_m1=2\n", + "pf1=.3\n", + "\n", + "#Calculations\n", + "I_c1=I_m1*math.sin(math.radians(math.degrees(math.acos(pf1))))\n", + "C1=I_c1/(2*math.pi*f*V_s) \n", + "I_m2=5\n", + "pf2=.5\n", + "I_c2=I_m2*math.sin(math.radians(math.degrees(math.acos(pf2))))\n", + "C2=I_c2/(2*math.pi*f*V_s) \n", + "I_m3=10\n", + "pf3=.7\n", + "I_c3=I_m3*math.sin(math.radians(math.degrees(math.acos(pf3))))\n", + "C3=I_c3/(2*math.pi*f*V_s) \n", + "\n", + "#Results\n", + "print(\"at no load\")\n", + "print(\"value of capacitance=%.3f uF\" %(C1*10**6))\n", + "print(\"at half full load\")\n", + "print(\"value of capacitance=%.3f uF\" %(C2*10**6))\n", + "print(\"at full load\")\n", + "print(\"value of capacitance=%.3f uF\" %(C3*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "at no load\n", + "value of capacitance=26.404 uF\n", + "at half full load\n", + "value of capacitance=59.927 uF\n", + "at full load\n", + "value of capacitance=98.834 uF\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_c=10.0\n", + "f=50.0\n", + "V_s=230.0\n", + "\n", + "#Calculations\n", + "C=I_c/(2*math.pi*f*V_s) \n", + "I_l=10\n", + "L=V_s/(2*math.pi*f*I_l) \n", + "\n", + "#Results\n", + "print(\"value of capacitance=%.3f uF\" %(C*10**6))\n", + "print(\"value of inductor=%.3f mH\" %(L*1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of capacitance=138.396 uF\n", + "value of inductor=73.211 mH\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4, Page No 765" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "I_L=10.0\n", + "X_L=V_s/I_L\n", + "I_f1=6.0\n", + " #B=2*a-math.sin(2*a)\n", + "B=2*math.pi-I_f1*math.pi*X_L/V_s\n", + "a=0\n", + "i=1.0\n", + "for a in range(1,360):\n", + " b=2*a*math.pi/180-math.sin(math.radians(2*a)) \n", + " if math.fabs(B-b)<=0.001 : #by hit and trial\n", + " i=2\n", + " break\n", + "print(\"firing angle of TCR = %.1f deg\" %a)\n", + " #(a-.01)*180/math.pi)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle of TCR = 359.0 deg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=.01\n", + "\n", + "\n", + "#Calculations\n", + "print(\"for firing angle=90deg\")\n", + "a=90*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.0f mH\" %(L_eff*1000))\n", + "print(\"for firing angle=120deg\")\n", + "a=120*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.3f mH\" %(L_eff*1000))\n", + "print(\"for firing angle=150deg\")\n", + "a=150*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.2f mH\" %(L_eff*1000))\n", + "print(\"for firing angle=170deg\")\n", + "a=170*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.3f H\" %L_eff)\n", + "print(\"for firing angle=175deg\")\n", + "a=175*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "\n", + "#Results\n", + "print(\"effective inductance=%.2f H\" %L_eff)\n", + "print(\"for firing angle=180deg\")\n", + "a=180*math.pi/180\n", + "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n", + "print(\"effective inductance=%.3f H\" %L_eff)\n", + " #random value at firing angle =180 is equivalent to infinity as in answer in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=90deg\n", + "effective inductance=10 mH\n", + "for firing angle=120deg\n", + "effective inductance=25.575 mH\n", + "for firing angle=150deg\n", + "effective inductance=173.40 mH\n", + "for firing angle=170deg\n", + "effective inductance=4.459 H\n", + "for firing angle=175deg\n", + "effective inductance=35.51 H\n", + "for firing angle=180deg\n", + "effective inductance=-128265253940037.750 H\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page No 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "Q=100.0*10**3\n", + "V_s=11.0*10**3\n", + "\n", + "#Calculations\n", + "f=50.0\n", + "L=V_s**2/(2*math.pi*f*Q) \n", + "\n", + "#Results\n", + "print(\"effective inductance=%.4f H\" %L)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective inductance=3.8515 H\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb new file mode 100755 index 00000000..a9c3a3f1 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb @@ -0,0 +1,93 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Miscellaneous Topics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1, Page No 777" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a1=0\n", + "a2=45.0\n", + "\n", + "#Calculations\n", + "print(\"for two single phase series semiconvertors\")\n", + "V_0=V_m/math.pi*(2+math.cos(math.radians(a1))+math.cos(math.radians(a2))) \n", + "print(\"avg o/p voltage=%.2f V\" %V_0)\n", + "V_or=V_s*math.sqrt((1/math.pi)*(4*math.pi-3*a2*math.pi/180+(3/2)*math.sin(math.radians(2*a2)))) \n", + "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", + "DF=(3+math.cos(math.radians(a2)))/(math.sqrt(2)*math.sqrt(5+3*math.cos(math.radians(a2)))) \n", + "print(\"DF=%.2f\" %DF)\n", + "PF=math.sqrt(2/math.pi)*(3+math.cos(math.radians(a2)))/math.sqrt(4*math.pi-3*a2*math.pi/180) \n", + "print(\"PF=%.2f\" %PF)\n", + "HF=math.sqrt((math.pi*(math.pi-(3/4)*a2*math.pi/180)/(5+3*math.cos(math.radians(a2))))-1) \n", + "print(\"HF=%.2f\" %HF)\n", + "print(\"for two single phase series full convertors\")\n", + "a=45.0\n", + "V_0=2*V_m/math.pi*(1+math.cos(math.radians(a))) \n", + "print(\"avg o/p voltage=%.2f V\" %V_0)\n", + "V_or=2*V_s*math.sqrt((1/math.pi)*(math.pi-a2*math.pi/180+(1/2)*math.sin(math.radians(2*a2)))) \n", + "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", + "DF=math.cos(math.radians(a2/2)) \n", + "\n", + "\n", + "#Results \n", + "print(\"DF=%.2f\" %DF)\n", + "PF=math.sqrt(2/(math.pi*(math.pi-a2*math.pi/180)))*(1+math.cos(math.radians(a2))) \n", + "print(\"PF=%.2f\" %PF)\n", + "HF=math.sqrt((math.pi*(math.pi-a2*math.pi/180)/(4+4*math.cos(math.radians(a2))))-1) \n", + "print(\"HF=%.2f\" %HF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for two single phase series semiconvertors\n", + "avg o/p voltage=383.82 V\n", + "rms value of o/p voltage=434.47 V\n", + "DF=0.98\n", + "PF=0.93\n", + "HF=0.62\n", + "for two single phase series full convertors\n", + "avg o/p voltage=353.50 V\n", + "rms value of o/p voltage=398.37 V\n", + "DF=0.92\n", + "PF=0.89\n", + "HF=0.29\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb new file mode 100755 index 00000000..1872c9f4 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb @@ -0,0 +1,233 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 02 : Power Semiconductor Diodes and Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page No 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "B=40.0\n", + "R_c=10 #ohm\n", + "V_cc=130.0 #V\n", + "V_B=10.0 #V\n", + "V_CES=1.0 #V\n", + "V_BES=1.5 #V\n", + "\n", + "#Calculations\n", + "I_CS=(V_cc-V_CES)/R_c #A\n", + "I_BS=I_CS/B #A\n", + "R_B1=(V_B-V_BES)/I_BS\n", + "P_T1=V_BES*I_BS+V_CES*I_CS\n", + "ODF=5\n", + "I_B=ODF*I_BS\n", + "R_B2=(V_B-V_BES)/I_B\n", + "P_T2=V_BES*I_B+V_CES*I_CS\n", + "B_f=I_CS/I_B\n", + "\n", + "#Results\n", + "print(\"value of R_B in saturated state= %.2f ohm\" %R_B1)\n", + "print(\"Power loss in transistor=%.2f W\" %P_T1)\n", + "print(\"Value of R_B for an overdrive factor 5 = %.2f ohm\" %R_B2)\n", + "print(\"Power loss in transistor = %.2f W\" %P_T2)\n", + "print(\"Forced current gain=%.0f\" %B_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of R_B in saturated state= 26.36 ohm\n", + "Power loss in transistor=13.38 W\n", + "Value of R_B for an overdrive factor 5 = 5.27 ohm\n", + "Power loss in transistor = 15.32 W\n", + "Forced current gain=8\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page No 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_CEO=2*10**-3 #A\n", + "V_CC=220.0 #V\n", + "P_dt=I_CEO*V_CC #instant. power loss during delay time\n", + "t_d=.4*10**-6 #s\n", + "f=5000\n", + "P_d=f*I_CEO*V_CC*t_d #avg power loss during delay time\n", + "V_CES=2 #V\n", + "t_r=1*10**-6 #s\n", + "I_CS=80 #A\n", + "\n", + "#Calculations\n", + "P_r=f*I_CS*t_r*(V_CC/2-(V_CC-V_CES)/3) #avg power loss during rise time\n", + "t_m=V_CC*t_r/(2*(V_CC-V_CES))\n", + "P_rm=I_CS*V_CC**2/(4*(V_CC-V_CES)) #instant. power loss during rise time\n", + "\n", + "#Results\n", + "P_on=P_d+P_r \n", + "print(\"Avg power loss during turn on = %.2f W\" %P_on)\n", + "P_nt=I_CS*V_CES \n", + "print(\"Instantaneous power loss during turn on = %.0f W\" %P_nt)\n", + "t_n=50*10**-6\n", + "P_n=f*I_CS*V_CES*t_n\n", + "print(\"Avg power loss during conduction period = %.0f W\" %P_n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avg power loss during turn on = 14.93 W\n", + "Instantaneous power loss during turn on = 160 W\n", + "Avg power loss during conduction period = 40 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_CEO=2*10**-3 #A\n", + "V_CC=220 #V\n", + "t_d=.4*10**-6 #s\n", + "f=5000\n", + "V_CES=2 #V\n", + "t_r=1*10**-6 #s\n", + "I_CS=80 #A\n", + "t_n=50*10**-6 #s\n", + "t_0=40*10**-6 #s\n", + "t_f=3*10**-6 #s\n", + "\n", + "#Calculations\n", + "P_st=I_CS*V_CES # instant. power loss during t_s\n", + "P_s=f*I_CS*V_CES*t_f #avg power loss during t_s\n", + "P_f=f*t_f*(I_CS/6)*(V_CC-V_CES) #avg power loss during fall time\n", + "P_fm=(I_CS/4)*(V_CC-V_CES) #peak instant power dissipation\n", + "P_off=P_s+P_f\n", + "\n", + "#Results\n", + "print(\"Total avg power loss during turn off = %.2f W\" %P_off)\n", + "P_0t=I_CEO*V_CC\n", + "print(\"Instantaneous power loss during t_0 = %.2f W\" %P_0t)\n", + "P_0=f*I_CEO*V_CC*t_0 #avg power loss during t_s\n", + "P_on=14.9339 #W from previous eg\n", + "P_n=40 #W from previous eg\n", + "P_T=P_on+P_n+P_off+P_0 \n", + "print(\"Total power loss = %.2f W\" %P_T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total avg power loss during turn off = 44.91 W\n", + "Instantaneous power loss during t_0 = 0.44 W\n", + "Total power loss = 99.93 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, Page No 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_CS=100.0 \n", + "V_CC=200.0 \n", + "t_on=40*10**-6\n", + "\n", + "#Calculations\n", + "P_on=(I_CS/50)*10**6*t_on*(V_CC*t_on/2-(V_CC*10**6*t_on**2/(40*3))) #energy during turn on\n", + "t_off=60*10**-6\n", + "P_off=(I_CS*t_off/2-(I_CS/60)*10**6*(t_off**2)/3)*((V_CC/75)*10**6*t_off) #energy during turn off\n", + "P_t=P_on+P_off #total energy\n", + "P_avg=300.0\n", + "f=P_avg/P_t\n", + "\n", + "#Results\n", + "print(\"Allowable switching frequency = %.2f Hz\" %f)\n", + "#in book ans is: f=1123.6 Hz. The difference in results due to difference in rounding of of digits" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Allowable switching frequency = 1125.00 Hz\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb new file mode 100755 index 00000000..2e53ef9d --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb @@ -0,0 +1,1001 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 03 : Diode Circuits and Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page No 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0 #V\n", + "V_o=100.0 #V\n", + "L=100.0 #uH\n", + "C=30.0 #uF\n", + "\n", + "#Calculations\n", + "t_o=math.pi*math.sqrt(L*C)\n", + "print(\"conduction time of diode = %.2f us\" %t_o)\n", + "#in book solution is t_o=54.77 us. The ans is incorrect as %pi is not muliplied in ans. Formulae mentioned in correct.\n", + "I_p=(V_s-V_o)*math.sqrt(C/L)\n", + "\n", + "#Results\n", + "print(\"Peak current through diode=%.2f A\" %I_p)\n", + "v_D=-V_s+V_o \n", + "print(\"Voltage across diode = %.2f V\" %v_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of diode = 172.07 us\n", + "Peak current through diode=164.32 A\n", + "Voltage across diode = -300.00 V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page No 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "R=10 #ohm\n", + "L=0.001 #H\n", + "C=5*10**-6 #F\n", + "V_s=230 #V\n", + "xi=R/(2*L)\n", + "\n", + "#Calculations\n", + "w_o=1/math.sqrt(L*C)\n", + "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n", + "t=math.pi/w_r \n", + "\n", + "#Results\n", + "print('Conduction time of diode=%.3f us'%(t*10**6))\n", + "t=0\n", + "di=V_s/L\n", + "print('Rate of change of current at t=0 is %.2f A/s' %di)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conduction time of diode=237.482 us\n", + "Rate of change of current at t=0 is 230000.00 A/s\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I_or=100 #A\n", + "R=1.0 #assumption\n", + "\n", + "#Calculations\n", + "V_m=I_or*2*R\n", + "I_o=V_m/(math.pi*R)\n", + "q=200 #Ah\n", + "t=q/I_o\n", + "\n", + "#Results\n", + "print(\"time required to deliver charge=%.02f hrs\" %t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time required to deliver charge=3.14 hrs\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page No 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0 #V\n", + "P=1000 #W\n", + "R=V_s**2/P\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt(2)*V_s/2\n", + "P_h=V_or**2/R \n", + "print(\"Power delivered to the heater = %.2f W\" %P_h)\n", + "V_m=math.sqrt(2)*230\n", + "I_m=V_m/R\n", + "\n", + "#Results\n", + "print(\"Peak value of diode current = %.2f A\" %I_m)\n", + "pf=V_or/V_s\n", + "print(\"Input power factor=%.2f\" %pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power delivered to the heater = 500.00 W\n", + "Peak value of diode current = 6.15 A\n", + "Input power factor=0.71\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230 #V\n", + "V_m=V_s*math.sqrt(2)\n", + "E=150 #V\n", + "\n", + "#Calculations\n", + "theta1=math.degrees(E/(math.sqrt(2)*V_s))\n", + "R=8 #ohm\n", + "f=50 #Hz\n", + "I_o=(1/(2*math.pi*R))*((2*math.sqrt(2)*V_s*math.cos(math.radians(theta1)))-E*(math.pi-2*theta1*math.pi/180))\n", + "\n", + "#Results\n", + "print(\"avg value of charging current=%.2f A\" %I_o)\n", + "P_d=E*I_o\n", + "print(\"\\npower delivered to battery=%.2f W\" %P_d)\n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V_s**2+E**2)*(math.pi-2*theta1*math.pi/180)+V_s**2*math.sin(math.radians(2*theta1))-4*V_m*E*math.cos(math.radians(theta1))))\n", + "print(\"\\nrms value of the load current=%.2f A\" %I_or)\n", + "pf=(E*I_o+I_or**2*R)/(V_s*I_or)\n", + "print(\"\\nsupply pf=%.3f\" %pf)\n", + "P_dd=I_or**2*R\n", + "print(\"\\npower dissipated in the resistor=%.2f W\" %P_dd)\n", + "q=1000.00 #Wh\n", + "t=q/P_d \n", + "print(\"\\ncharging time=%.2f hr\" %t)\n", + "n=P_d*100/(P_d+P_dd)\n", + "print(\"rectifier efficiency =%.2f \" %n)\n", + "PIV=math.sqrt(2)*V_s+E\n", + "print(\"PIV of diode=%.2f V\" %PIV)\n", + "#solutions have small variations due to difference in rounding off of digits" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg value of charging current=4.97 A\n", + "\n", + "power delivered to battery=745.11 W\n", + "\n", + "rms value of the load current=9.29 A\n", + "\n", + "supply pf=0.672\n", + "\n", + "power dissipated in the resistor=690.74 W\n", + "\n", + "charging time=1.34 hr\n", + "rectifier efficiency =51.89 \n", + "PIV of diode=475.27 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=230 #V\n", + "t_rr=40*10**-6 #s reverde recovery time\n", + "\n", + "#Calculations\n", + "V_o=2*math.sqrt(2)*V_s/math.pi\n", + "V_m=math.sqrt(2)*V_s\n", + "f=50\n", + "V_r1=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n", + "v_avg1=V_r1*100/V_o*10**3\n", + "f=2500\n", + "V_r2=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n", + "v_avg2=V_r2*100/V_o\n", + "\n", + "#Results\n", + "print(\"when f=50Hz\")\n", + "print(\"Percentage reduction in avg o/p voltage=%.2f x 10^-3\" %v_avg1)\n", + "print(\"when f=2500Hz\")\n", + "print(\"Percentage reduction in avg o/p voltage = %.3f\" %v_avg2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when f=50Hz\n", + "Percentage reduction in avg o/p voltage=3.95 x 10^-3\n", + "when f=2500Hz\n", + "Percentage reduction in avg o/p voltage = 9.549\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11, Page No 79 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230 #V\n", + "R=10.0 #ohm\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V_s\n", + "V_o=2*V_m/math.pi\n", + "print(\"Avg value of o/p voltage = %.2f V\" %V_o)\n", + "I_o=V_o/R\n", + "print(\"Avg value of o/p current = %.2f A\" %I_o)\n", + "I_DA=I_o/2\n", + "print(\"Avg value of diode current=%.2f A\" %I_DA)\n", + "I_Dr=I_o/math.sqrt(2) \n", + "\n", + "#Results\n", + "print(\"rms value of diode current=%.2f A\" %I_Dr)\n", + "print(\"rms value of o/p current = %.2f A\" %I_o)\n", + "print(\"rms value of i/p current = %.2f A\" %I_o)\n", + "pf=(V_o/V_s)\n", + "print(\"supply pf = %.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avg value of o/p voltage = 207.07 V\n", + "Avg value of o/p current = 20.71 A\n", + "Avg value of diode current=10.35 A\n", + "rms value of diode current=14.64 A\n", + "rms value of o/p current = 20.71 A\n", + "rms value of i/p current = 20.71 A\n", + "supply pf = 0.90\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V_s=230.0 #V\n", + "R=1000.0 #ohm\n", + "R_D=20.0 #ohm\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V_s\n", + "I_om=V_m/(R+R_D) \n", + "\n", + "#Results\n", + "print(\"Peak load current = %.2f A\" %I_om)\n", + "I_o=I_om/math.pi\n", + "print(\"dc load current = %.2f A\" %I_o)\n", + "V_D=I_o*R_D-V_m/math.pi\n", + "print(\"dc diode voltage = %.2f V\" %V_D)\n", + "V_on=V_m/math.pi\n", + "print(\"at no load, load voltage = %.2f V\" %V_on)\n", + "V_o1=I_o*R \n", + "print(\"at given load, load voltage = %.2f V\" %V_o1)\n", + "vr=(V_on-V_o1)*100/V_on \n", + "print(\"Voltage regulation(in percent)=%.2f\" %vr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak load current = 0.32 A\n", + "dc load current = 0.10 A\n", + "dc diode voltage = -101.51 V\n", + "at no load, load voltage = 103.54 V\n", + "at given load, load voltage = 101.51 V\n", + "Voltage regulation(in percent)=1.96\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_L=6.8 #V\n", + "V_smax=20*1.2 #V\n", + "V_smin=20*.8 #V\n", + "I_Lmax=30*1.5 #mA\n", + "I_Lmin=30*0.5 #mA\n", + "I_z=1 #mA\n", + "\n", + "#Calculations\n", + "R_smax=(V_smax-V_L)/((I_Lmin+I_z)*10**-3)\n", + "print(\"max source resistance = %.2f ohm\" %R_smax)\n", + "R_smin=(V_smin-V_L)/((I_Lmax+I_z)*10**-3) \n", + "print(\"Min source resistance = %.2f ohm\" %R_smin) #in book solution, error is committed in putting the values in formulea(printing error) but solution is correct\n", + "R_Lmax=V_L*1000/I_Lmin\n", + "print(\"Max load resistance = %.2f ohm\" %R_Lmax)\n", + "R_Lmin=V_L*1000/I_Lmax \n", + "V_d=0.6 #V\n", + "V_r=V_L-V_d\n", + "\n", + "#Results\n", + "print(\"Min load resistance=%.2f ohm\" %R_Lmin)\n", + "print(\"Voltage rating of zener diode=%.2f V\" %V_r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max source resistance = 1075.00 ohm\n", + "Min source resistance = 200.00 ohm\n", + "Max load resistance = 453.33 ohm\n", + "Min load resistance=151.11 ohm\n", + "Voltage rating of zener diode=6.20 V\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "I2=200*10**-6 #A\n", + "V_z=20 #V\n", + "R_G=500.0 #hm\n", + "\n", + "#Calculations\n", + "R2=(V_z/I2)-R_G\n", + "print(\"R2=%.2f kilo-ohm\" %(R2/1000))\n", + "\n", + "V_v=25 #V\n", + "I1=I2\n", + "R1=(V_v-V_z)/I1\n", + "\n", + "#Results\n", + "print(\"R1=%.0f kilo-ohm\"%(R1/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R2=99.50 kilo-ohm\n", + "R1=25 kilo-ohm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15, Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=2*230 #V\n", + "\n", + "#Calculations\n", + "V_o=(math.sqrt(2)*V_s)/math.pi\n", + "R=60 #ohm\n", + "P_dc=(V_o)**2/R\n", + "TUF=0.2865\n", + "VA=P_dc/TUF\n", + "\n", + "#RESULTS\n", + "print(\"kVA rating of the transformer = %.2f kVA\" %(VA/1000));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kVA rating of the transformer = 2.49 kVA\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16, Page No 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "tr=0.5 #turns ratio\n", + "I_o=10.0\n", + "V=230.0\n", + "V_s=V/tr\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V_s\n", + "V_o=2*V_m/math.pi\n", + "phi1=0\n", + "#displacemnt angle=0 as fundamnetal component of i/p source current in phase with source voltage\n", + "DF=math.cos(math.radians(phi1))\n", + "I_s1=4*I_o/(math.sqrt(2)*math.pi)\n", + "I_s=math.sqrt(I_o**2*math.pi/math.pi)\n", + "CDF=I_s1/I_o\n", + "pf=CDF*DF\n", + "HF=math.sqrt((I_s/I_s1)**2-1)\n", + "CF=I_o/I_s\n", + "\n", + "#Results\n", + "print(\"o/p voltage = %.2f V\" %V_o)\n", + "print(\"distortion factor = %.2f\" %DF)\n", + "print(\"i/p pf=%.2f\" %pf)\n", + "print(\"Current displacent factor=%.2f\" %CDF)\n", + "print(\"Harmonic factor = %.2f\" %HF)\n", + "print(\"Creast factor = %.2f\" %CF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "o/p voltage = 414.15 V\n", + "distortion factor = 1.00\n", + "i/p pf=0.90\n", + "Current displacent factor=0.90\n", + "Harmonic factor = 0.48\n", + "Creast factor = 1.00\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17, Page No 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_o=230.0\n", + "R=10.0\n", + "V_s=V_o*math.pi/(2*math.sqrt(2))\n", + "I_o=V_o/R\n", + "I_m=math.sqrt(2)*V_s/R\n", + "I_DAV=I_m/math.pi\n", + "\n", + "#Calculations\n", + "#avg value of diode current\n", + "I_Dr=I_m/2\n", + "PIV=math.sqrt(2)*V_s\n", + "I_s=I_m/math.sqrt(2)\n", + "TF=V_s*I_s\n", + "\n", + "#Results\n", + "print(\"peak diode current=%.2f A\" %I_m)\n", + "print(\"I_DAV=%.2f A\" %I_DAV)\n", + "print(\"I_Dr=%.2f A\" %I_Dr) #rms value of diode current\n", + "print(\"PIV=%.1f V\" %PIV)\n", + "print(\"Transformer rating = %.2f kVA\" %(TF/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak diode current=36.13 A\n", + "I_DAV=11.50 A\n", + "I_Dr=18.06 A\n", + "PIV=361.3 V\n", + "Transformer rating = 6.53 kVA\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18, Page No 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "tr=5\n", + "V=1100.0\n", + "R=10.0\n", + "\n", + "\n", + "#Calculations\n", + "print(\"In case of 3ph-3pulse type\")\n", + "V_ph=V/tr\n", + "V_mp=math.sqrt(2)*V_ph\n", + "V_o=3*math.sqrt(3)*V_mp/(2*math.pi)\n", + "print(\"avg o/p voltage=%.1f V\" %V_o)\n", + "I_mp=V_mp/R\n", + "I_D=(I_mp/math.pi)*math.sin(math.pi/3) \n", + "print(\"\\navg value of diode current=%.3f A\" %I_D)\n", + "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3))) \n", + "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n", + "V_or=V_mp*math.sqrt((3/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3)))\n", + "P=(V_or**2)/R \n", + "print(\"\\npower delivered=%.1f W\" %P)\n", + "print(\"in case of 3ph-M6 type\")\n", + "V_ph=V_ph/2\n", + "V_mp=math.sqrt(2)*V_ph\n", + "V_o=3*V_mp/(math.pi) \n", + "I_mp=V_mp/R\n", + "I_D=(I_mp/math.pi)*math.sin(math.pi/6) \n", + "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6))) \n", + "V_or=V_mp*math.sqrt((6/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6)))\n", + "P=(V_or**2)/R \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.2f V\" %V_o)\n", + "print(\"\\navg value of diode current=%.2f A\" %I_D)\n", + "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n", + "print(\"\\npower delivered=%.0f W\" %P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case of 3ph-3pulse type\n", + "avg o/p voltage=257.3 V\n", + "\n", + "avg value of diode current=8.577 A\n", + "\n", + "rms value of diode current=15.10 A\n", + "\n", + "power delivered=6841.3 W\n", + "in case of 3ph-M6 type\n", + "avg o/p voltage=148.55 V\n", + "\n", + "avg value of diode current=2.48 A\n", + "\n", + "rms value of diode current=6.07 A\n", + "\n", + "power delivered=2211 W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19, Page No 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_o=400\n", + "R=10\n", + "\n", + "#Calculations\n", + "V_ml=V_o*math.pi/3\n", + "V_s=V_ml/(math.sqrt(2)*math.sqrt(3))\n", + "I_m=V_ml/R\n", + "I_s=.7804*I_m\n", + "tr=3*V_s*I_s \n", + "\n", + "#Results\n", + "print(\"transformer rating=%.1f VA\" %tr)\n", + "I_Dr=.5518*I_m \n", + "print(\"\\nrms value of diode current=%.3f A\" %I_Dr)\n", + "I_D=I_m/math.pi \n", + "print(\"\\navg value of diode current=%.3f A\" %I_D)\n", + "print(\"\\npeak diode current=%.2f A\" %I_m)\n", + "PIV=V_ml \n", + "print(\"\\nPIV=%.2f V\" %PIV)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transformer rating=16770.3 VA\n", + "\n", + "rms value of diode current=23.114 A\n", + "\n", + "avg value of diode current=13.333 A\n", + "\n", + "peak diode current=41.89 A\n", + "\n", + "PIV=418.88 V\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20, Page No 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_l=230\n", + "E=240\n", + "R=8\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(2)*V_l\n", + "V_o=3*V_ml/math.pi\n", + "I_o=(V_o-E)/R\n", + "P_b=E*I_o \n", + "P_d=E*I_o+I_o**2*R \n", + "phi1=0\n", + "math.cos(math.radians(phi1))\n", + "I_s1=2*math.sqrt(3)*I_o/(math.sqrt(2)*math.pi)\n", + "I_s=math.sqrt(I_o**2*2*math.pi/(3*math.pi))\n", + "CDF=I_s1/I_s \n", + "pf=DF*CDF \n", + "HF=math.sqrt(CDF**-2-1) \n", + "tr=math.sqrt(3)*V_l*I_o*math.sqrt(2/3)\n", + "\n", + "#Results\n", + "print(\"Power delivered to battery=%.1f W\" %P_b)\n", + "print(\"Power delivered to load=%.2f W\" %P_d)\n", + "print(\"Displacement factor=%.2f\" %DF)\n", + "print(\"Current distortion factor=%.3f\" %CDF)\n", + "print(\"i/p pf=%.3f\"%pf)\n", + "print(\"Harmonic factor=%.2f\" %HF)\n", + "print(\"Tranformer rating=%.2f VA\" %tr)\n", + "#answers have small variations from the book due to difference in rounding off of digits" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power delivered to battery=2118.3 W\n", + "Power delivered to load=2741.48 W\n", + "Displacement factor=1.00\n", + "Current distortion factor=0.955\n", + "i/p pf=0.955\n", + "Harmonic factor=0.31\n", + "Tranformer rating=0.00 VA\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21, Page No 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50 #Hz\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V\n", + "R=400.0\n", + "RF=0.05\n", + "C=(1/(4*f*R))*(1+(1/(math.sqrt(2)*RF)))\n", + "\n", + "#Results\n", + "print(\"capacitor value=%.2f uF\" %(C/10**-6))\n", + "V_o=V_m*(1-1/(4*f*R*C))\n", + "print(\"o/p voltage with filter=%.2f V\" %V_o)\n", + "V_o=2*V_m/math.pi \n", + "print(\"o/p voltage without filter=%.2f V\" %V_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitor value=189.28 uF\n", + "o/p voltage with filter=303.79 V\n", + "o/p voltage without filter=207.07 V\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22, Page No 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50\n", + "CRF=0.05\n", + "R=300\n", + "\n", + "#Calculations\n", + "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n", + "print(\"L=%.2f H\" %L)\n", + "R=30\n", + "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n", + "\n", + "\n", + "#Results\n", + "print(\"\\nL=%.2f H\" %L)\n", + "L=0\n", + "CRF=.4715*R/math.sqrt(R**2+(2*2*math.pi*f*L)**2) \n", + "print(\"\\nCRF=%.2f\" %CRF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L=4.48 H\n", + "\n", + "L=0.45 H\n", + "\n", + "CRF=0.47\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23, Page No 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=50\n", + "L_L=10*10**-3\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "\n", + "#Calculations\n", + "C=10/(2*w*math.sqrt(R**2+(2*w*L_L)**2))\n", + "\n", + "#Results\n", + "print(\"C=%.2f uF\" %(C*10**6))\n", + "VRF=0.1\n", + "L=(1/(4*w**2*C))*((math.sqrt(2)/(3*VRF))+1)\n", + "print(\"\\nL=%.2f mH\" %(L*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C=315.83 uF\n", + "\n", + "L=45.83 mH\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb new file mode 100755 index 00000000..22311574 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb @@ -0,0 +1,946 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 04 : Thyristors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "P=.5 #P=V_g*I_g\n", + "s=130 #s=V_g/I_g\n", + "\n", + "#Calculations\n", + "I_g=math.sqrt(P/s)\n", + "V_g=s*I_g\n", + "E=15\n", + "R_s=(E-V_g)/I_g \n", + "\n", + "#Results\n", + "print(\"Gate source resistance=%.2f ohm\" %R_s)\n", + "#Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gate source resistance=111.87 ohm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page No 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "R_s=120 #slope of load line is -120V/A. This gives gate source resistance\n", + "print(\"gate source resistance=%.0f ohm\" %R_s)\n", + "\n", + "P=.4 #P=V_g*I_g\n", + "E_s=15\n", + "\n", + "#Calculations\n", + " #E_s=I_g*R_s+V_g % after solving this\n", + " #120*I_g**2-15*I_g+0.4=0 so\n", + "a=120 \n", + "b=-15\n", + "c=0.4\n", + "D=math.sqrt((b**2)-4*a*c)\n", + "I_g=(-b+D)/(2*a) \n", + "V_g=P/I_g\n", + "\n", + "#Results\n", + "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n", + "print(\"\\nthen trigger voltage=%.3f V\" %V_g)\n", + "I_g=(-b-D)/(2*a) \n", + "V_g=P/I_g\n", + "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n", + "print(\"\\nthen trigger voltage=%.2f V\" %V_g)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gate source resistance=120 ohm\n", + "\n", + "trigger current=86.44 mA\n", + "\n", + "then trigger voltage=4.628 V\n", + "\n", + "trigger current=38.56 mA\n", + "\n", + "then trigger voltage=10.37 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "#V_g=1+10*I_g\n", + "P_gm=5 #P_gm=V_g*I_g\n", + "#after solving % eqn becomes 10*I_g**2+I_g-5=0\n", + "a=10.0 \n", + "b=1.0 \n", + "c=-5\n", + "\n", + "#Calculations\n", + "I_g=(-b+math.sqrt(b**2-4*a*c))/(2*a)\n", + "E_s=15\n", + "#using E_s=R_s*I_g+V_g\n", + "R_s=(E_s-1)/I_g-10 \n", + "P_gav=.3 #W\n", + "T=20*10**-6\n", + "f=P_gav/(P_gm*T)\n", + "dl=f*T\n", + "\n", + "#Results\n", + "print(\"Reistance=%.3f ohm\" %R_s)\n", + "print(\"Triggering freq=%.0f kHz\" %(f/1000))\n", + "print(\"Tduty cycle=%.2f\" %dl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reistance=11.248 ohm\n", + "Triggering freq=3 kHz\n", + "Tduty cycle=0.06\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page No 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I=.1\n", + "E=200.0\n", + "L=0.2\n", + "\n", + "#Calculations\n", + "t=I*L/E \n", + "R=20.0\n", + "t1=(-L/R)*math.log(1-(R*I/E)) \n", + "L=2.0\n", + "t2=(-L/R)*math.log(1-(R*I/E)) \n", + "\n", + "#Results\n", + "print(\"in case load consists of (a)L=.2H\")\n", + "print(\"min gate pulse width=%.0f us\" %(t*10**6))\n", + "print(\"(b)R=20ohm in series with L=.2H\")\n", + "print(\"min gate pulse width=%.3f us\" %(t1*10**6))\n", + "print(\"(c)R=20ohm in series with L=2H\")\n", + "print(\"min gate pulse width=%.2f us\" %(t2*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "in case load consists of (a)L=.2H\n", + "min gate pulse width=100 us\n", + "(b)R=20ohm in series with L=.2H\n", + "min gate pulse width=100.503 us\n", + "(c)R=20ohm in series with L=2H\n", + "min gate pulse width=1005.03 us\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "def theta(th):\n", + " I_m=1 #supposition\n", + " I_av=(I_m/(2*math.pi))*(1+math.cos(math.radians(th)))\n", + " I_rms=math.sqrt((I_m/(2*math.pi))*((180-th)*math.pi/360+.25*math.sin(math.radians(2*th))))\n", + " FF=I_rms/I_av\n", + " I_rms=35\n", + " I_TAV=I_rms/FF\n", + " return I_TAV\n", + "\n", + "#Calculations\n", + "print(\"when conduction angle=180\")\n", + "th=0\n", + "I_TAV=theta(th)\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)\n", + "print(\"when conduction angle=90\")\n", + "th=90\n", + "I_TAV=theta(th)\n", + "\n", + "#Results\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)\n", + "print(\"when conduction angle=30\")\n", + "th=150\n", + "I_TAV=theta(th)\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when conduction angle=180\n", + "avg on current rating=22.282 A\n", + "when conduction angle=90\n", + "avg on current rating=15.756 A\n", + "when conduction angle=30\n", + "avg on current rating=8.790 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page No 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "def theta(th):\n", + " n=360.0/th\n", + " I=1.0 #supposition\n", + " I_av=I/n\n", + " I_rms=I/math.sqrt(n)\n", + " FF=I_rms/I_av\n", + " I_rms=35\n", + " I_TAV=I_rms/FF\n", + " return I_TAV\n", + "\n", + "#Calculations\n", + "th=180.0\n", + "I_TAV1=theta(th)\n", + "th=90.0\n", + "I_TAV2=theta(th)\n", + "th=30.0\n", + "I_TAV3=theta(th)\n", + "\n", + "#Results\n", + "print(\"when conduction angle=180\")\n", + "print(\"avg on current rating=%.3f A\" %I_TAV)\n", + "print(\"when conduction angle=90\")\n", + "print(\"avg on current rating=%.1f A\" %I_TAV2)\n", + "print(\"when conduction angle=30\")\n", + "print(\"avg on current rating=%.4f A\" %I_TAV3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when conduction angle=180\n", + "avg on current rating=8.790 A\n", + "when conduction angle=90\n", + "avg on current rating=17.5 A\n", + "when conduction angle=30\n", + "avg on current rating=10.1036 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "f=50.0 #Hz\n", + "\n", + "#Calculations\n", + "I_sb=3000.0\n", + "t=1/(4*f)\n", + "T=1/(2*f)\n", + "I=math.sqrt(I_sb**2*t/T) \n", + "r=(I_sb/math.sqrt(2))**2*T \n", + "\n", + "#Results\n", + "print(\"surge current rating=%.2f A\" %I)\n", + "print(\"\\nI**2*t rating=%.0f A^2.s\" %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "surge current rating=2121.32 A\n", + "\n", + "I**2*t rating=45000 A^2.s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "V_s=300.0 #V\n", + "R=60.0 #ohm\n", + "L=2.0 #H\n", + "\n", + "#Calculations\n", + "t=40*10**-6 #s\n", + "i_T=(V_s/R)*(1-math.exp(-R*t/L))\n", + "i=.036 #A\n", + "R1=V_s/(i-i_T)\n", + "\n", + "#Results\n", + "print(\"maximum value of remedial parameter=%.3f kilo-ohm\" %(R1/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of remedial parameter=9.999 kilo-ohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 Page No 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_p=230.0*math.sqrt(2)\n", + "\n", + "#Calculations\n", + "R=1+((1)**-1+(10)**-1)**-1\n", + "A=V_p/R\n", + "s=1 #s\n", + "t_c=20*A**-2*s\n", + "\n", + "#Results\n", + "print(\"fault clearance time=%.4f ms\" %(t_c*10**3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fault clearance time=0.6890 ms\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17, Page No 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "V_s=math.sqrt(2)*230 #V\n", + "L=15*10**-6 #H\n", + "I=V_s/L #I=(di/dt)_max\n", + "R_s=10 #ohm\n", + "v=I*R_s #v=(dv/dt)_max\n", + "\n", + "#Calculations\n", + "f=50 #Hz\n", + "X_L=L*2*math.pi*f\n", + "R=2\n", + "I_max=V_s/(R+X_L) \n", + "FF=math.pi/math.sqrt(2)\n", + "I_TAV1=I_max/FF \n", + "FF=3.98184\n", + "I_TAV2=I_max/FF \n", + "\n", + "\n", + "#RESULTS\n", + "print(\"(di/dt)_max=%.3f A/usec\" %(I/10**6))\n", + "print(\"\\n(dv/dt)_max=%.2f V/usec\" %(v/10**6))\n", + "print(\"\\nI_rms=%.3f A\" %I_max)\n", + "print(\"when conduction angle=90\")\n", + "print(\"I_TAV=%.3f A\" %I_TAV1)\n", + "print(\"when conduction angle=30\")\n", + "print(\"I_TAV=%.3f A\" %I_TAV2)\n", + "print(\"\\nvoltage rating=%.3f V\" %(2.75*V_s)) #rating is taken 2.75 times of peak working voltage unlike 2.5 to 3 times as mentioned int book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(di/dt)_max=21.685 A/usec\n", + "\n", + "(dv/dt)_max=216.85 V/usec\n", + "\n", + "I_rms=162.252 A\n", + "when conduction angle=90\n", + "I_TAV=73.039 A\n", + "when conduction angle=30\n", + "I_TAV=40.748 A\n", + "\n", + "voltage rating=894.490 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19, Page No 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "T_jm=125\n", + "th_jc=.15 #degC/W\n", + "th_cs=0.075 #degC/W\n", + "\n", + "\n", + "#Calculations\n", + "dT=54 #dT=T_s-T_a\n", + "P_av=120\n", + "th_sa=dT/P_av\n", + "T_a=40 #ambient temp\n", + "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n", + "if (P_av-120)<1 :\n", + " print(\"selection of heat sink is satisfactory\")\n", + "\n", + "dT=58 #dT=T_s-T_a\n", + "P_av=120\n", + "th_sa=dT/P_av\n", + "T_a=40 #ambient temp\n", + "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n", + "if (P_av-120)<1 :\n", + " print(\"selection of heat sink is satisfactory\")\n", + "\n", + "V_m=math.sqrt(2)*230\n", + "R=2\n", + "I_TAV=V_m/(R*math.pi)\n", + "P_av=90\n", + "th_sa=(T_jm-T_a)/P_av-(th_jc+th_cs)\n", + "dT=P_av*th_sa\n", + "print(\"for heat sink\") \n", + "print(\"T_s-T_a=%.2f degC\" %dT) \n", + "print(\"\\nP_av=%.0f W\" %P_av)\n", + "P=(V_m/2)**2/R\n", + "eff=P/(P+P_av) \n", + "print(\"\\nckt efficiency=%.3f pu\" %eff)\n", + "a=60 #delay angle\n", + "I_TAV=(V_m/(2*math.pi*R))*(1+math.cos(math.radians(a)))\n", + "print(\"\\nI_TAV=%.2f A\" %I_TAV)\n", + "dT=46\n", + "T_s=dT+T_a\n", + "T_c=T_s+P_av*th_cs \n", + "T_j=T_c+P_av*th_jc \n", + "\n", + "#Results\n", + "print(\"\\ncase temp=%.2f degC\" %T_c)\n", + "print(\"\\njunction temp=%.2f degC\" %T_j)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for heat sink\n", + "T_s-T_a=-20.25 degC\n", + "\n", + "P_av=90 W\n", + "\n", + "ckt efficiency=0.993 pu\n", + "\n", + "I_TAV=38.83 A\n", + "\n", + "case temp=92.75 degC\n", + "\n", + "junction temp=106.25 degC\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20, Page No 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_j=125.0 #degC\n", + "T_s=70.0 #degC\n", + "th_jc=.16 #degC/W\n", + "th_cs=.08 #degC/W\n", + "\n", + "#Calculations\n", + "P_av1=(T_j-T_s)/(th_jc+th_cs) \n", + "\n", + "T_s=60 #degC\n", + "P_av2=(T_j-T_s)/(th_jc+th_cs) \n", + "inc=(math.sqrt(P_av2)-math.sqrt(P_av1))*100/math.sqrt(P_av1) \n", + "\n", + "#Results\n", + "print(\"Total avg power loss in thristor sink combination=%.2f W\" %P_av1)\n", + "print(\"Percentage inc in rating=%.2f\" %inc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total avg power loss in thristor sink combination=229.17 W\n", + "Percentage inc in rating=8.71\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21, Page No 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "R=25000.0\n", + "I_l1=.021 #I_l=leakage current\n", + "I_l2=.025\n", + "I_l3=.018\n", + "I_l4=.016\n", + " #V1=(I-I_l1)*R\n", + " #V2=(I-I_l2)*R\n", + " #V3=(I-I_l3)*R\n", + " #V4=(I-I_l4)*R\n", + " #V=V1+V2+V3+V4\n", + " \n", + "#Calculations\n", + "V=10000.0\n", + "I_l=I_l1+I_l2+I_l3+I_l4\n", + " #after solving\n", + "I=((V/R)+I_l)/4\n", + "R_c=40.0\n", + "V1=(I-I_l1)*R \n", + "\n", + "#Resluts\n", + "print(\"voltage across SCR1=%.0f V\" %V1)\n", + "V2=(I-I_l2)*R \n", + "print(\"\\nvoltage across SCR2=%.0f V\" %V2)\n", + "V3=(I-I_l3)*R \n", + "print(\"\\nvoltage across SCR3=%.0f V\" %V3)\n", + "V4=(I-I_l4)*R \n", + "print(\"\\nvoltage across SCR4=%.0f V\" %V4)\n", + "\n", + "I1=V1/R_c \n", + "print(\"\\ndischarge current through SCR1=%.3f A\" %I1)\n", + "I2=V2/R_c \n", + "print(\"\\ndischarge current through SCR2=%.3f A\" %I2)\n", + "I3=V3/R_c \n", + "print(\"\\ndischarge current through SCR3=%.3f A\" %I3)\n", + "I4=V4/R_c \n", + "print(\"\\ndischarge current through SCR4=%.3f A\" %I4)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage across SCR1=2475 V\n", + "\n", + "voltage across SCR2=2375 V\n", + "\n", + "voltage across SCR3=2550 V\n", + "\n", + "voltage across SCR4=2600 V\n", + "\n", + "discharge current through SCR1=61.875 A\n", + "\n", + "discharge current through SCR2=59.375 A\n", + "\n", + "discharge current through SCR3=63.750 A\n", + "\n", + "discharge current through SCR4=65.000 A\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22, Page No 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_r=1000 #rating of SCR\n", + "I_r=200 #rating of SCR\n", + "V_s=6000 #rating of String\n", + "I_s=1000 #rating of String\n", + "\n", + "#Calculations\n", + "print(\"when DRF=.1\")\n", + "DRF=.1\n", + "n_s=V_s/(V_r*(1-DRF)) \n", + "print(\"number of series units=%.0f\" %math.ceil(n_s))\n", + "n_p=I_s/(I_r*(1-DRF)) \n", + "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))\n", + "print(\"when DRF=.2\")\n", + "DRF=.2\n", + "\n", + "#Results\n", + "n_s=V_s/(V_r*(1-DRF)) \n", + "print(\"number of series units=%.0f\" %math.ceil(n_s))\n", + "n_p=I_s/(I_r*(1-DRF)) \n", + "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when DRF=.1\n", + "number of series units=7\n", + "\n", + "number of parrallel units=6\n", + "when DRF=.2\n", + "number of series units=8\n", + "\n", + "number of parrallel units=7\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23, Page No 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V1=1.6 #on state voltage drop of SCR1\n", + "V2=1.2 #on state voltage drop of SCR2\n", + "I1=250.0 #current rating of SCR1\n", + "I2=350.0 #current rating of SCR2\n", + "\n", + "#Calculations\n", + "R1=V1/I1\n", + "R2=V2/I2\n", + "I=600.0 #current to be shared\n", + " #for SCR1 % I*(R1+R)/(total resistance)=k*I1 (1)\n", + " #for SCR2 % I*(R2+R)/(total resistance)=k*I2 (2)\n", + " #(1)/(2)\n", + "R=(R2*I2-R1*I1)/(I1-I2)\n", + "\n", + "\n", + "#Results\n", + "print(\"RSequired value of resistance=%.3f ohm\" %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RSequired value of resistance=0.004 ohm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25, Page No 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=2000.0 #Hz\n", + "C=0.04*10**-6\n", + "n=.72\n", + "\n", + "#Calculations\n", + "R=1/(f*C*math.log(1/(1-n))) \n", + "V_p=18\n", + "V_BB=V_p/n\n", + "R2=10**4/(n*V_BB) \n", + "I=4.2*10**-3 #leakage current\n", + "R_BB=5000\n", + "R1=(V_BB/I)-R2-R_BB\n", + "\n", + "#Results\n", + "print(\"R=%.2f kilo-ohm\" %(R/1000))\n", + "print(\"\\nR2=%.2f ohm\" %R2)\n", + "print(\"\\nR1=%.0f ohm\" %R1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R=9.82 kilo-ohm\n", + "\n", + "R2=555.56 ohm\n", + "\n", + "R1=397 ohm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26, Page No 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "\n", + "V_p=18.0\n", + "n=.72\n", + "V_BB=V_p/n\n", + "I_p=.6*10**-3\n", + "I_v=2.5*10**-3\n", + "V_v=1\n", + "\n", + "#Calculations\n", + "R_max=V_BB*(1-n)/I_p \n", + "print(\"R_max=%.2f kilo-ohm\" %(R_max/1000))\n", + "R_min=(V_BB-V_v)/I_v \n", + "print(\"\\nR_min=%.2f kilo-ohm\" %(R_min/1000))\n", + "\n", + "C=.04*10**-6\n", + "f_min=1/(R_max*C*math.log(1/(1-n))) \n", + "print(\"\\nf_min=%.3f kHz\" %(f_min/1000))\n", + "f_max=1/(R_min*C*math.log(1/(1-n))) \n", + "print(\"\\nf_max=%.2f kHz\" %(f_max/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R_max=11.67 kilo-ohm\n", + "\n", + "R_min=9.60 kilo-ohm\n", + "\n", + "f_min=1.683 kHz\n", + "\n", + "f_max=2.05 kHz\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb new file mode 100755 index 00000000..1d261f20 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb @@ -0,0 +1,511 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 05 : Thyristor Commutation Techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page No 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=5.0*10**-3 #mH\n", + "C=20.0*10**-6 #\u00b5F\n", + "V_s=200 #V\n", + "\n", + "#Calculations\n", + "w_o=math.sqrt(1/(L*C)) #rad/s\n", + "t_o=math.pi/w_o #ms\n", + "\n", + "#Results\n", + "print('conduction time of thyristor = %.2f ms' %(t_o*1000))\n", + "print('voltage across thyristor=%.0f V' %V_s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of thyristor = 0.99 ms\n", + "voltage across thyristor=200 V\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page No 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "C=20.0*10**-6 #\u00b5F\n", + "L=5.0*10**-6 #\u00b5H\n", + "V_s=230.0 #V\n", + "\n", + "#Calculations\n", + "I_p=V_s*math.sqrt(C/L) #A\n", + "w_o=math.sqrt(1/(L*C)) #rad/sec\n", + "t_o=math.pi/w_o #\u00b5S\n", + "I_o=300 \n", + "a = math.degrees(math.asin(I_o/(2*V_s))) \n", + "V_ab = V_s*math.cos(math.radians(a)) #V \n", + "t_c=C*V_ab/I_o #\u00b5s\n", + "\n", + "#Calculations\n", + "print(\"conduction time of auxillery thyristor=%.2f us\" %(t_o*10**6))\n", + "print(\"voltage across main thyristor=%.2f V\" %V_ab)\n", + "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of auxillery thyristor=31.42 us\n", + "voltage across main thyristor=174.36 V\n", + "ckt turn off time=11.62 us\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=200.0 #V\n", + "R1=10.0 #\u2126\n", + "R2=100.0 #\u2126\n", + "C=0 # value of capacitor\n", + "\n", + "#Calculations\n", + "I1=V_s*(1/R1+2/R2) #A\n", + "I2=V_s*(2/R1+1/R2) #A\n", + "t_c1=40*10**-6\n", + "fos=2 #factor of safety\n", + "C1=t_c1*fos/(R1*math.log(2))\n", + "C2=t_c1*fos/(R2*math.log(2))\n", + "if C1 > C2 :\n", + " C = C1*10**6\n", + "else :\n", + " C = C2*10**6\n", + "\n", + "\n", + "#Results\n", + "print(\"peak value of current through SCR1=%.2f A\" %I1); \n", + "print(\"Peak value of current through SCR2=%.2f A\" %I2);\n", + "print(\"Value of capacitor=%.2f uF\" %C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak value of current through SCR1=24.00 A\n", + "Peak value of current through SCR2=42.00 A\n", + "Value of capacitor=11.54 uF\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page No 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0 #V\n", + "L=20*10**-6 #\u00b5H\n", + "C=40*10**-6 #\u00b5F\n", + "I_o=120.0 #A\n", + "\n", + "#Calculations\n", + "I_p=V_s*math.sqrt(C/L) #A\n", + "t_c=C*V_s/I_o #\u00b5s\n", + "w_o=math.sqrt(1/(L*C)) \n", + "t_c1=math.pi/(2*w_o) #\u00b5s\n", + "\n", + "#Results\n", + "print(\"current through main thyristor=%.2f A\" %(I_o+I_p))\n", + "print(\"Current through auxillery thyristor=%.2f A\" %I_o)\n", + "print(\"Circuit turn off time for main thyristor=%.2f us\" %(t_c*10**6))\n", + "print(\"Circuit turn off time for auxillery thyristor=%.2f us\" %(t_c1*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current through main thyristor=445.27 A\n", + "Current through auxillery thyristor=120.00 A\n", + "Circuit turn off time for main thyristor=76.67 us\n", + "Circuit turn off time for auxillery thyristor=44.43 us\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "C_j=25*10**-12 #pF\n", + "I_c=5*10**-3 #charging current\n", + "V_s=200.0 #V\n", + "R=50.0 #\u2126\n", + "\n", + "#Calculations\n", + "C=(C_j*V_s)/(I_c*R)\n", + "\n", + "\n", + "#RESULTS\n", + "print(\"Value of C=%.2f \u00b5F\" %(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C=0.02 \u00b5F\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "V_s=200.0 #V\n", + "R=5.0 #\u2126\n", + "\n", + "#Calculations\n", + "C=10.0*10**-6\n", + "#for turn off V_s*(1-2*exp(-t/(R*C)))=0, so after solving\n", + "t_c=R*C*math.log(2.0)\n", + "\n", + "#Results\n", + "print(\"circuit turn off time=%.2f us\" %(t_c*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "circuit turn off time=34.66 us\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page No 264 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=1.0 #\u2126\n", + "L=20*10**-6 #\u00b5H\n", + "C=40*10**-6 #\u00b5F\n", + "\n", + "#Calculations\n", + "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n", + "t_1=math.pi/w_r\n", + "\n", + "#Results\n", + "print(\"conduction time of thyristor=%.3f us\" %(t_1*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conduction time of thyristor=125.664 us\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "dv=400*10.0**-6 #dv=dv_T/dt(V/s)\n", + "V_s=200.0 #v\n", + "R=20.0 #\u2126\n", + "\n", + "#Calculations\n", + "C=V_s/(R*dv) \n", + "C_j=.025*10**-12\n", + "C_s=C-C_j\n", + "I_T=40;\n", + "R_s=1/((I_T/V_s)-(1/R)) \n", + "#value of R_s in book is wrongly calculated\n", + "\n", + "#Results\n", + "print(\"R_s=%.2f ohm\" %R_s)\n", + "print(\"C_s=%.3f uF\" %(C_s/10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R_s=6.67 ohm\n", + "C_s=0.025 uF\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=200.0 #V\n", + "C=20.0*10**-6 #\u00b5H \n", + "L=0.2*10**-3 #\u00b5F\n", + "i_c=10.0\n", + "\n", + "#Calculations\n", + "i=V_s*math.sqrt(C/L)\n", + "w_o=1.0/math.sqrt(L*C)\n", + "t_1 = (1/w_o)*math.degrees(math.asin(i_c/i))\n", + "t_o=math.pi/w_o\n", + "t_c=t_o-2*t_1 \n", + "\n", + "#Results\n", + "print(\"reqd time=%.2f us\" %(t_1*10**6))\n", + "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n", + "print(\"ckt turn off time=%.5f us\" %t_1)\n", + "#solution in book wrong, as wrong values are selected while filling the formuleas" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "reqd time=575.37 us\n", + "ckt turn off time=-952.05 us\n", + "ckt turn off time=0.00058 us\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No 268 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "L=1.0 #\u00b5H\n", + "R=50.0 #\u2126\n", + "V_s=200.0 #V\n", + "t=0.01 #sec\n", + "Vd=0.7\n", + "\n", + "#Calculations\n", + "tau=L/R\n", + "i=(V_s/R)*(1-math.exp(-t/tau))\n", + "t=8*10**-3\n", + "i1=i-t*Vd \n", + "\n", + "\n", + "#Results\n", + "print(\"current through L = %.2f A\" %i1)\n", + "i_R=0 #current in R at t=.008s\n", + "print(\"Current through R = %.2f A\" %i_R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current through L = 1.57 A\n", + "Current through R = 0.00 A\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12, Page No 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "#initialisation of variables\n", + "L=1.0 #H\n", + "R=50.0 #ohm\n", + "V_s=200.0 #V\n", + "\n", + "#Calculations\n", + "tau=L/R\n", + "t=0.01 #s\n", + "i=(V_s/R)*(1-math.exp(-t/tau))\n", + "C=1*10**-6 #F\n", + "V_c=math.sqrt(L/C)*i\n", + "\n", + "#Results\n", + "print(\"current in R,L=%.2f A\" %i)\n", + "print(\"voltage across C=%.2f kV\" %(V_c/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in R,L=1.57 A\n", + "voltage across C=1.57 kV\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb new file mode 100755 index 00000000..dff6564b --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb @@ -0,0 +1,1761 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 06 : Phase Controlled Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "P=1000.0\n", + "R=V**2/P\n", + "\n", + "#Calculations\n", + "a=math.pi/4\n", + "V_or1=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n", + "P1=V_or1**2/R \n", + "a=math.pi/2\n", + "V_or2=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n", + "P2=V_or2**2/R \n", + "\n", + "#Results\n", + "print(\"when firing angle delay is of 45deg\")\n", + "print(\"power absorbed=%.2f W\" %P1)\n", + "print(\"when firing angle delay is of 90deg\")\n", + "print(\"power absorbed=%.2f W\" %P2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when firing angle delay is of 45deg\n", + "power absorbed=454.58 W\n", + "when firing angle delay is of 90deg\n", + "power absorbed=250.00 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "E=150.0\n", + "R=8.0\n", + "\n", + "#Calculations\n", + "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n", + "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n", + "P=E*I_o \n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n", + "P_r=I_or**2*R \n", + "pf=(P+P_r)/(V*I_or)\n", + "\n", + "#Results\n", + "print(\"avg charging curent=%.4f A\" %I_o)\n", + "print(\"power supplied to the battery=%.2f W\" %P)\n", + "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n", + "print(\"supply pf=%.3f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg charging curent=3.5679 A\n", + "power supplied to the battery=535.18 W\n", + "power dissipated by the resistor=829.760 W\n", + "supply pf=0.583\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "E=150.0\n", + "R=8.0\n", + "a=35.0\n", + "\n", + "#Calculations\n", + "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n", + "th2=180-th1\n", + "I_o=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(th2)))-E*((th2-a)*math.pi/180)) \n", + "P=E*I_o \n", + "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*((th2-a)*math.pi/180)-(V**2/2)*(math.sin(math.radians(2*th2))-math.sin(math.radians(2*a)))-2*math.sqrt(2)*V*E*(math.cos(math.radians(a))-math.cos(math.radians(th2)))))\n", + "P_r=I_or**2*R \n", + "pf=(P+P_r)/(V*I_or) \n", + "\n", + "\n", + "#Results\n", + "print(\"avg charging curent=%.4f A\" %I_o)\n", + "print(\"power supplied to the battery=%.2f W\" %P)\n", + "print(\"power dissipated by the resistor=%.2f W\" %P_r)\n", + "print(\"supply pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg charging curent=4.9208 A\n", + "power supplied to the battery=738.12 W\n", + "power dissipated by the resistor=689.54 W\n", + "supply pf=0.6686\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page No 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "B=210\n", + "f=50.0 #Hz\n", + "w=2*math.pi*f\n", + "a=40.0 #firing angle\n", + "V=230.0\n", + "R=5.0\n", + "L=2*10**-3\n", + "\n", + "#Calculations\n", + "t_c1=(360-B)*math.pi/(180*w) \n", + "V_o1=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n", + "I_o1=V_o1/R \n", + "E=110\n", + "R=5\n", + "L=2*10**-3\n", + "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n", + "t_c2=(360-B+th1)*math.pi/(180*w) \n", + "V_o2=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n", + "I_o2=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(B)))-E*((B-a)*math.pi/180)) \n", + "V_o2=R*I_o2+E \n", + "\n", + "\n", + "#Results\n", + "print(\"for R=5ohm and L=2mH\")\n", + "print(\"ckt turn off time=%.3f msec\" %(t_c1*1000))\n", + "print(\"avg output voltage=%.3f V\" %V_o1)\n", + "print(\"avg output current=%.4f A\" %I_o1)\n", + "print(\"for R=5ohm % L=2mH and E=110V\")\n", + "print(\"ckt turn off time=%.3f msec\" %(t_c2*1000))\n", + "print(\"avg output current=%.4f A\" %I_o2)\n", + "print(\"avg output voltage=%.3f V\" %V_o2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for R=5ohm and L=2mH\n", + "ckt turn off time=8.333 msec\n", + "avg output voltage=84.489 V\n", + "avg output current=16.8979 A\n", + "for R=5ohm % L=2mH and E=110V\n", + "ckt turn off time=9.431 msec\n", + "avg output current=6.5090 A\n", + "avg output voltage=142.545 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "f=50.0\n", + "R=10.0\n", + "a=60.0\n", + "\n", + "#Calculations\n", + "V_m=(math.sqrt(2)*V_s)\n", + "V_o=V_m/(2*math.pi)*(1+math.cos(math.radians(a)))\n", + "I_o=V_o/R\n", + "V_or=(V_m/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a*math.pi/180)+.5*math.sin(math.radians(2*a)))\n", + "I_or=V_or/R\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "FF=V_or/V_o \n", + "VRF=math.sqrt(FF**2-1) \n", + "TUF=P_dc/(V_s*I_or) \n", + "PIV=V_m \n", + "\n", + "\n", + "#Results\n", + "print(\"rectification efficiency=%.4f\" %RE)\n", + "print(\"form factor=%.3f\" %FF)\n", + "print(\"voltage ripple factor=%.4f\" %VRF)\n", + "print(\"t/f utilisation factor=%.4f\" %TUF)\n", + "print(\"PIV of thyristor=%.2f V\" %PIV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectification efficiency=0.2834\n", + "form factor=1.879\n", + "voltage ripple factor=1.5903\n", + "t/f utilisation factor=0.1797\n", + "PIV of thyristor=325.27 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=1000.0\n", + "fos=2.5 #factor of safety\n", + "I_TAV=40.0\n", + "\n", + "#Calculations\n", + "V_m1=V/(2*fos)\n", + "P1=(2*V_m1/math.pi)*I_TAV \n", + "V_m2=V/(fos)\n", + "P2=(2*V_m2/math.pi)*I_TAV \n", + "\n", + "#Results\n", + "print(\"for mid pt convertor\")\n", + "print(\"power handled=%.3f kW\" %(P1/1000))\n", + "print(\"for bridge convertor\")\n", + "print(\"power handled=%.3f kW\" %(P2/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for mid pt convertor\n", + "power handled=5.093 kW\n", + "for bridge convertor\n", + "power handled=10.186 kW\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page No 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "R=.4\n", + "I_o=10\n", + "I_or=I_o\n", + "E=120.0\n", + "\n", + "#Calculations\n", + "a1=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m)))\n", + "pf1=(E*I_o+I_or**2*R)/(V_s*I_or) \n", + "E=-120.0\n", + "a2=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m))) \n", + "pf2=(-E*I_o-I_or**2*R)/(V_s*I_or) \n", + "\n", + "#Results\n", + "print(\"firing angle delay=%.2f deg\" %a1)\n", + "print(\"pf=%.4f\" %pf1)\n", + "print(\"firing angle delay=%.2f deg\" %a2)\n", + "print(\"pf=%.4f\" %pf2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=53.21 deg\n", + "pf=0.5391\n", + "firing angle delay=124.07 deg\n", + "pf=0.5043\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "f=50.0\n", + "a=45.0\n", + "R=5.0\n", + "E=100.0\n", + "\n", + "#Calculations\n", + "V_o=((math.sqrt(2)*V_s)/(2*math.pi))*(3+math.cos(math.radians(a)))\n", + "I_o=(V_o-E)/R \n", + "P=E*I_o \n", + "\n", + "#Results\n", + "print(\"avg o/p current=%.3f A\" %I_o)\n", + "print(\"power delivered to battery=%.4f kW\" %(P/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p current=18.382 A\n", + "power delivered to battery=1.8382 kW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=230\n", + "f=50.0\n", + "a=50.0\n", + "R=6.0\n", + "E=60.0\n", + "V_o1=((math.sqrt(2)*2*V_s)/(math.pi))*math.cos(math.radians(a))\n", + "I_o1=(V_o1-E)/R \n", + "\n", + "#ATQ after applying the conditions\n", + "V_o2=((math.sqrt(2)*V_s)/(math.pi))*math.cos(math.radians(a))\n", + "I_o2=(V_o2-E)/R \n", + "\n", + "print(\"avg o/p current=%.3f A\" %I_o1)\n", + "print(\"avg o/p current after change=%.2f A\" %I_o2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p current=12.184 A\n", + "avg o/p current after change=1.09 A\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V_o=(2*V_m/math.pi)*math.cos(math.radians(a))\n", + "I_o=V_o/R\n", + "V_or=V_m/math.sqrt(2)\n", + "I_or=I_o\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "FF=V_or/V_o \n", + "VRF=math.sqrt(FF**2-1) \n", + "I_s1=2*math.sqrt(2)*I_o/math.pi\n", + "DF=math.cos(math.radians(a))\n", + "CDF=.90032\n", + "pf=CDF*DF \n", + "HF=math.sqrt((1/CDF**2)-1) \n", + "Q=2*V_m*I_o*math.sin(math.radians(a))/math.pi \n", + "\n", + "#Results\n", + "print(\"rectification efficiency=%.4f\" %RE)\n", + "print(\"form factor=%.4f\" %FF)\n", + "print(\"voltage ripple factor=%.4f\" %VRF)\n", + "print(\"pf=%.5f\" %pf)\n", + "print(\"HF=%.5f\" %HF)\n", + "print(\"active power=%.2f W\" %P_dc) \n", + "print(\"reactive power=%.3f Var\" %Q)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectification efficiency=0.6366\n", + "form factor=1.5708\n", + "voltage ripple factor=1.2114\n", + "pf=0.63662\n", + "HF=0.48342\n", + "active power=2143.96 W\n", + "reactive power=2143.956 Var\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12, Page No 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V_o=(V_m/math.pi)*(1+math.cos(math.radians(a)))\n", + "I_o=V_o/R\n", + "V_or=V_s*math.sqrt((1/math.pi)*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2))\n", + "I_or=I_o\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "FF=V_or/V_o \n", + "VRF=math.sqrt(FF**2-1) \n", + "I_s1=2*math.sqrt(2)*I_o*math.cos(math.radians(a/2))/math.pi\n", + "DF=math.cos(math.radians(a/2)) \n", + "CDF=2*math.sqrt(2)*math.cos(math.radians(a/2))/math.sqrt(math.pi*(math.pi-a*math.pi/180)) \n", + "pf=CDF*DF \n", + "HF=math.sqrt((1/CDF**2)-1) \n", + "Q=V_m*I_o*math.sin(math.radians(a))/math.pi\n", + "\n", + "#Results\n", + "print(\"form factor=%.3f\" %FF)\n", + "print(\"rectification efficiency=%.4f\" %RE)\n", + "print(\"voltage ripple factor=%.3f\" %VRF) \n", + "print(\"DF=%.4f\" %DF)\n", + "print(\"CDF=%.4f\" %CDF)\n", + "print(\"pf=%.4f\" %pf)\n", + "print(\"HF=%.4f\" %HF)\n", + "print(\"active power=%.3f W\" %P_dc)\n", + "print(\"reactive power=%.2f Var\" %Q)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "form factor=1.241\n", + "rectification efficiency=0.8059\n", + "voltage ripple factor=0.735\n", + "DF=0.9239\n", + "CDF=0.9605\n", + "pf=0.8874\n", + "HF=0.2899\n", + "active power=3123.973 W\n", + "reactive power=1293.99 Var\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13, Page No 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(2)*V_s\n", + "V_om=3*V_ml/(2*math.pi)\n", + "V_o=V_om/2\n", + "th=30\n", + "a=math.degrees(math.acos((2*math.pi*math.sqrt(3)*V_o/(3*V_ml)-1)))-th \n", + "I_o=V_o/R \n", + "V_or=V_ml/(2*math.sqrt(math.pi))*math.sqrt((5*math.pi/6-a*math.pi/180)+.5*math.sin(math.radians(2*a+2*th)))\n", + "I_or=V_or/R \n", + "RE=V_o*I_o/(V_or*I_or) \n", + "\n", + "#Results\n", + "print(\"delay angle=%.1f deg\" %a)\n", + "print(\"avg load current=%.3f A\" %I_o)\n", + "print(\"rms load current=%.3f A\" %I_or)\n", + "print(\"rectification efficiency=%.4f\" %RE)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delay angle=67.7 deg\n", + "avg load current=7.765 A\n", + "rms load current=10.477 A\n", + "rectification efficiency=0.5494\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15, Page No 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=400.0\n", + "V_ml=math.sqrt(2)*V\n", + "v_T=1.4\n", + "a1=30.0\n", + "\n", + "#Calculations\n", + "V_o1=3*V_ml/(2*math.pi)*math.cos(math.radians(a1))-v_T \n", + "a2=60.0\n", + "V_o2=3*V_ml/(2*math.pi)*math.cos(math.radians(a2))-v_T \n", + "I_o=36\n", + "I_TA=I_o/3 \n", + "I_Tr=I_o/math.sqrt(3) \n", + "P=I_TA*v_T \n", + "\n", + "#Results\n", + "print(\"for firing angle = 30deg\")\n", + "print(\"avg output voltage=%.3f V\" %V_o1)\n", + "print(\"for firing angle = 60deg\")\n", + "print(\"avg output voltage=%.2f V\" %V_o2)\n", + "print(\"avg current rating=%.0f A\" %I_TA)\n", + "print(\"rms current rating=%.3f A\" %I_Tr)\n", + "print(\"PIV of SCR=%.1f V\" %V_ml)\n", + "print(\"power dissipated=%.1f W\" %P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle = 30deg\n", + "avg output voltage=232.509 V\n", + "for firing angle = 60deg\n", + "avg output voltage=133.65 V\n", + "avg current rating=12 A\n", + "rms current rating=20.785 A\n", + "PIV of SCR=565.7 V\n", + "power dissipated=16.8 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17, Page No 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "E=200\n", + "I_o=20\n", + "R=.5\n", + "\n", + "#Calculations\n", + "V_o1=E+I_o*R\n", + "V_s=230\n", + "V_ml=math.sqrt(2)*V_s\n", + "a1=math.degrees(math.acos(V_o1*math.pi/(3*V_ml)))\n", + "th=120\n", + "I_s=math.sqrt((1/math.pi)*I_o**2*th*math.pi/180)\n", + "P=E*I_o+I_o**2*R\n", + "pf=P/(math.sqrt(3)*V_s*I_s) \n", + "V_o2=E-I_o*R\n", + "a2=math.degrees(math.acos(-V_o2*math.pi/(3*V_ml))) \n", + "\n", + "#Results\n", + "print(\"firing angle delay=%.3f deg\" %a1)\n", + "print(\"pf=%.3f\" %pf)\n", + "print(\"firing angle delay=%.2f deg\" %a2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=47.461 deg\n", + "pf=0.646\n", + "firing angle delay=127.71 deg\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18, Page No 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "a1=0\n", + "t_c1=(4*math.pi/3-a1*math.pi/180)/w \n", + "a2=30\n", + "t_c2=(4*math.pi/3-a2*math.pi/180)/w \n", + "\n", + "#Results\n", + "print(\"for firing angle delay=0deg\")\n", + "print(\"commutation time=%.2f ms\" %(t_c1*1000))\n", + "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n", + "print(\"for firing angle delay=30deg\")\n", + "print(\"commutation time=%.2f ms\" %(t_c2*1000))\n", + "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle delay=0deg\n", + "commutation time=13.33 ms\n", + "peak reverse voltage=325.27 V\n", + "for firing angle delay=30deg\n", + "commutation time=11.67 ms\n", + "peak reverse voltage=325.27 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19, Page No 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.2f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage percent V_ph=110.384 V\n", + "for constant load current\n", + "V_ph=110.38 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20, Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*4*math.pi/(2*3)/(2*math.pi/3+math.sqrt(3)*(1+math.cos(math.radians(2*a)))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.2f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage percent V_ph=102.459 V\n", + "for constant load current\n", + "V_ph=102.46 V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21, Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=90.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*4*math.pi/(2*3)/((math.pi-math.pi/2)+(math.sin(math.radians(2*a)))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage percent V_ph=%.2f V\" %V_ph)\n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.1f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage percent V_ph=191.19 V\n", + "for constant load current\n", + "V_ph=191.2 V\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page No 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "E=200.0\n", + "I_o=20.0\n", + "R=.5\n", + "\n", + "#Calculations\n", + "V_o=E+I_o*R\n", + "V_s=230\n", + "V_ml=math.sqrt(2)*V_s\n", + "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml)-1)) \n", + "a1=180-a\n", + "I_sr=math.sqrt((1/math.pi)*I_o**2*(a1*math.pi/180))\n", + "P=V_o*I_o\n", + "pf=P/(math.sqrt(3)*V_s*I_sr) \n", + "\n", + "#Results\n", + "print(\"firing angle delay=%.2f deg\" %a)\n", + "print(\"pf=%.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=69.38 deg\n", + "pf=0.67\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23, Page No 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=400.0\n", + "f=50.0\n", + "I_o=15.0\n", + "a=45.0\n", + "\n", + "#Calculations\n", + "I_TA=I_o*120.0/360.0\n", + "I_Tr=math.sqrt(I_o**2*120/360)\n", + "I_sr=math.sqrt(I_o**2*120/180)\n", + "V_ml=math.sqrt(2)*V_s\n", + "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "V_or=V_ml*math.sqrt((3/(2*math.pi))*(math.pi/3+math.sqrt(3/2)*math.cos(math.radians(2*a))))\n", + "I_or=I_o\n", + "P_dc=V_o*I_o\n", + "P_ac=V_or*I_or\n", + "RE=P_dc/P_ac \n", + "VA=3*V_s/math.sqrt(3)*I_sr\n", + "TUF=P_dc/VA \n", + "pf=P_ac/VA \n", + "\n", + "#Results\n", + "print(\"rectification efficiency=%.5f\" %RE)\n", + "print(\"TUF=%.4f\" %TUF)\n", + "print(\"Input pf=%.3f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rectification efficiency=0.95493\n", + "TUF=0.6752\n", + "Input pf=0.707\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24, Page No 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I=10.0\n", + "a=45.0\n", + "V=400.0\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "DF=math.cos(math.radians(a))\n", + "I_o=10\n", + "I_s1=4*I_o/(math.sqrt(2)*math.pi)*math.sin(math.pi/3)\n", + "I_sr=I_o*math.sqrt(2.0/3.0)\n", + "I_o=1 #suppose\n", + "CDF=I_s1/I_sr \n", + "THD=math.sqrt(1/CDF**2-1) \n", + "pf=CDF*DF \n", + "P=(3*math.sqrt(2)*V*math.cos(math.radians(a))/math.pi)*I\n", + "Q=(3*math.sqrt(2)*V*math.sin(math.radians(a))/math.pi)*I \n", + " \n", + "#Results\n", + "print(\"DF=%.3f\" %DF)\n", + "print(\"CDF=%.3f\" %CDF)\n", + "print(\"THD=%.5f\" %THD)\n", + "print(\"PF=%.4f\" %pf)\n", + "print(\"active power=%.2f W\" %P) \n", + "print(\"reactive power=%.2f Var\" %Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DF=0.707\n", + "CDF=0.955\n", + "THD=0.31084\n", + "PF=0.6752\n", + "active power=3819.72 W\n", + "reactive power=3819.72 Var\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25, Page No 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "print(\"for firing angle=30deg\")\n", + "a=30.0\n", + "V=400.0\n", + "V_ml=math.sqrt(2)*V\n", + "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "E=350\n", + "R=10\n", + "\n", + "#Calculations\n", + "I_o=(V_o-E)/R\n", + "I_or=I_o\n", + "P1=V_o*I_o \n", + "I_sr=I_o*math.sqrt(2.0/3.0)\n", + "VA=3*V/math.sqrt(3)*I_sr\n", + "pf=P1/VA \n", + "a=180-60\n", + "V=400\n", + "V_ml=math.sqrt(2)*V\n", + "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n", + "E=-350\n", + "R=10\n", + "I_o=(V_o-E)/R\n", + "I_or=I_o\n", + "P2=-V_o*I_o \n", + "I_sr=I_o*math.sqrt(2.0/3.0)\n", + "VA=3*V/math.sqrt(3)*I_sr\n", + "pf=P2/VA \n", + "\n", + "print(\"power delivered to load=%.2f W\" %P1)\n", + "print(\"pf=%.4f\" %pf)\n", + "print(\"for firing advance angle=60deg\")\n", + "print(\"power delivered to load=%.2f W\" %P2)\n", + "print(\"pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=30deg\n", + "power delivered to load=5511.74 W\n", + "pf=0.4775\n", + "for firing advance angle=60deg\n", + "power delivered to load=2158.20 W\n", + "pf=0.4775\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26, Page No 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0\n", + "u=15.0\n", + "\n", + "#Calculations\n", + "i=math.cos(math.radians(a))-math.cos(math.radians(a+u))\n", + "a=30\n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", + "a=45\n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", + "a=60\n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n", + "\n", + "#Results\n", + "print(\"for firing angle=30deg\") \n", + "print(\"overlap angle=%.1f deg\" %u)\n", + "print(\"for firing angle=45deg\") \n", + "print(\"overlap angle=%.1f deg\" %u)\n", + "print(\"for firing angle=60deg\") \n", + "print(\"overlap angle=%.2f deg\" %u)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle=30deg\n", + "overlap angle=2.2 deg\n", + "for firing angle=45deg\n", + "overlap angle=2.2 deg\n", + "for firing angle=60deg\n", + "overlap angle=2.23 deg\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28, Page No 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "E=400.0\n", + "I_o=20.0\n", + "R=1\n", + "\n", + "#Calculations\n", + "V_o=E+I_o*R\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=.004\n", + "V=230 #per phase voltage\n", + "V_ml=math.sqrt(6)*V\n", + "a=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o+3*w*L*I_o/math.pi))) \n", + "print(\"firing angle delay=%.3f deg\" %a)\n", + "u=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o-3*w*L*I_o/math.pi)))-a \n", + "\n", + "#Results\n", + "print(\"overlap angle=%.2f deg\" %u)\n", + "#Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=34.382 deg\n", + "overlap angle=8.22 deg\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29, Page No 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=400.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "R=1\n", + "E=230\n", + "I=15.0\n", + "\n", + "#Calculations\n", + "V_o=-E+I*R\n", + "V_ml=math.sqrt(2)*V\n", + "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml))) \n", + "L=0.004\n", + "a=math.degrees(math.acos((2*math.pi)/(3*V_ml)*(V_o+3*w*L*I/(2*math.pi)))) \n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-3*f*L*I/V_ml))-a \n", + "\n", + "#Results\n", + "print(\"firing angle=%.3f deg\" %a)\n", + "print(\"firing angle delay=%.3f deg\" %a)\n", + "print(\"overlap angle=%.3f deg\" %u)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle=139.702 deg\n", + "firing angle delay=139.702 deg\n", + "overlap angle=1.431 deg\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31, Page No 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0 #per phase\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "V_ml=math.sqrt(3.0)*math.sqrt(2)*V\n", + "w=2*math.pi*f\n", + "a1=60.0\n", + "L=0.015\n", + "i_cp=(math.sqrt(3)*V_ml/(w*L))*(1-math.sin(math.radians(a1))) \n", + "\n", + "#Results\n", + "print(\"circulating current=%.4f A\" %i_cp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "circulating current=27.7425 A\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32, Page No 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "V_m=math.sqrt(2)*V\n", + "a=30.0\n", + "\n", + "#Calculations\n", + "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n", + "R=10\n", + "I_o=V_o/R \n", + "I_TA=I_o*math.pi/(2*math.pi) \n", + "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n", + "I_s=math.sqrt(I_o**2*math.pi/(math.pi)) \n", + "I_o=I_s\n", + "pf=(V_o*I_o/(V*I_s)) \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.3f V\" %V_o)\n", + "print(\"avg o/p current=%.2f A\" %I_o)\n", + "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n", + "print(\"rms value of thyristor current=%.2f A\" %I_Tr)\n", + "print(\"pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n", + " \n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p voltage=179.330 V\n", + "avg o/p current=17.93 A\n", + "avg value of thyristor current=8.967 A\n", + "rms value of thyristor current=12.68 A\n", + "pf=0.7797\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33, Page No 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "V_m=math.sqrt(2)*V\n", + "a=30.0\n", + "L=.0015\n", + "\n", + "#Calculations\n", + "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n", + "R=10\n", + "I_o=V_o/R \n", + "f=50\n", + "w=2*math.pi*f\n", + "V_ox=2*V_m*math.cos(math.radians(a))/math.pi-w*L*I_o/math.pi \n", + "u=math.degrees(math.acos(math.cos(math.radians(a))-I_o*w*L/V_m))-a \n", + "I=I_o\n", + "pf=V_o*I_o/(V*I) \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.3f V\" %V_ox)\n", + "print(\"angle of overlap=%.3f deg\" %u)\n", + "print(\"pf=%.4f\" %pf)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p voltage=176.640 V\n", + "angle of overlap=2.855 deg\n", + "pf=0.7797\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34, Page No 364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=415.0\n", + "V_ml=math.sqrt(2)*V\n", + "a1=35.0 #firing angle advance\n", + "\n", + "#Calculations\n", + "a=180-a1\n", + "I_o=80.0\n", + "r_s=0.04\n", + "v_T=1.5\n", + "X_l=.25 #reactance=w*L\n", + "E=-3*V_ml*math.cos(math.radians(a))/math.pi+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi \n", + "\n", + "#Results\n", + "print(\"mean generator voltage=%.3f V\" %E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean generator voltage=487.590 V\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.35, Page No 364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=415.0\n", + "V_ml=math.sqrt(2)*V\n", + "R=0.2\n", + "I_o=80\n", + "r_s=0.04\n", + "v_T=1.5\n", + "\n", + "#Calculations\n", + "X_l=.25 #reactance=w*L\n", + "a=35\n", + "E=-(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n", + "a1=35\n", + "a=180-a1\n", + "E=(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n", + "\n", + "#Results\n", + "print(\"when firing angle=35deg\") \n", + "print(\"mean generator voltage=%.3f V\" %E)\n", + "print(\"when firing angle advance=35deg\")\n", + "print(\"mean generator voltage=%.3f V\" %E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when firing angle=35deg\n", + "mean generator voltage=503.590 V\n", + "when firing angle advance=35deg\n", + "mean generator voltage=503.590 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.36, Page No 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=5.0\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "V_mp=math.sqrt(2)*V\n", + "a=30.0\n", + "E=150.0\n", + "B=180-math.degrees(math.asin(E/V_mp))\n", + "I_o=(3/(2*math.pi*R))*(V_mp*(math.cos(math.radians(a+30))-math.cos(math.radians(B)))-E*((B-a-30)*math.pi/180))\n", + "\n", + "#Results\n", + "print(\"avg current flowing=%.2f A\" %I_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg current flowing=19.96 A\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.37, Page No 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "V=230.0\n", + "\n", + "#Calculations\n", + "V_m=math.sqrt(2)*V\n", + "V_o=V_m*(1+math.cos(math.radians(a)))/math.pi \n", + "E=100\n", + "R=10\n", + "I_o=(V_o-E)/R \n", + "I_TA=I_o*math.pi/(2*math.pi) \n", + "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n", + "I_s=math.sqrt(I_o**2*(1-a/180)*math.pi/(math.pi))\n", + "I_or=I_o\n", + "P=E*I_o+I_or**2*R\n", + "pf=(P/(V*I_s)) \n", + "f=50\n", + "w=2*math.pi*f\n", + "t_c=(1-a/180)*math.pi/w \n", + "\n", + "#Results\n", + "print(\"\\navg o/p current=%.2f A\" %I_o)\n", + "print(\"avg o/p voltage=%.3f V\" %V_o)\n", + "print(\"avg value of thyristor current=%.2f A\" %I_TA)\n", + "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n", + "print(\"avg value of diode current=%.2f A\" %I_TA)\n", + "print(\"rms value of diode current=%.3f A\" %I_Tr)\n", + "print(\"pf=%.4f\" %pf)\n", + "print(\"circuit turn off time=%.2f ms\" %(t_c*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "avg o/p current=9.32 A\n", + "avg o/p voltage=193.202 V\n", + "avg value of thyristor current=4.66 A\n", + "rms value of thyristor current=6.590 A\n", + "avg value of diode current=4.66 A\n", + "rms value of diode current=6.590 A\n", + "pf=0.9202\n", + "circuit turn off time=8.33 ms\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.38, Page No 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "V_m=math.sqrt(2)*V\n", + "L=0.05\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "a=30\n", + "i_cp=2*V_m*(1-math.cos(math.radians(a)))/(w*L) \n", + "R=30.0\n", + "i_l=V_m/R\n", + "i1=i_cp+i_l \n", + "i2=i_cp \n", + "\n", + "#Results\n", + "print(\"peak value of circulating current=%.3f A\" %i_cp)\n", + "print(\"peak value of current in convertor 1=%.3f A\" %i1)\n", + "print(\"peak value of current in convertor 2=%.3f A\" %i2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak value of circulating current=5.548 A\n", + "peak value of current in convertor 1=16.391 A\n", + "peak value of current in convertor 2=5.548 A\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.39, Page No 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "R=5.0\n", + "L=0.05\n", + "\n", + "#Calculations\n", + "phi=math.degrees(math.atan(w*L/R)) \n", + "phi=90+math.degrees(math.atan(w*L/R)) \n", + "\n", + "#Results\n", + "print(\"for no current transients\")\n", + "print(\"triggering angle=%.2f deg\" %phi)\n", + "print(\"for worst transients\")\n", + "print(\"triggering angle=%.2f deg\" %phi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for no current transients\n", + "triggering angle=162.34 deg\n", + "for worst transients\n", + "triggering angle=162.34 deg\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb new file mode 100755 index 00000000..726160c8 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb @@ -0,0 +1,1036 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 07 : Choppers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page No 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.4 #duty cycle %a=T_on/T\n", + "V_s=230.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "V=a*(V_s-2) \n", + "V_or=math.sqrt(a*(V_s-2)**2) \n", + "P_o=V_or**2/R\n", + "P_i=V_s*V/R\n", + "n=P_o*100/P_i \n", + "\n", + "#Results\n", + "print(\"avg o/p voltage=%.1f V\" %V)\n", + "print(\"rms value of o/p voltage=%.1f V\" %V_or)\n", + "print(\"chopper efficiency in percentage=%.2f\" %n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avg o/p voltage=91.2 V\n", + "rms value of o/p voltage=144.2 V\n", + "chopper efficiency in percentage=99.13\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page No 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_i=220.0\n", + "V_o=660.0\n", + "\n", + "#Calculations\n", + "a=1-V_i/V_o\n", + "T_on=100.0 #microsecond\n", + "T=T_on/a\n", + "T_off=T-T_on \n", + "T_off=T_off/2\n", + "T_on=T-T_off\n", + "a=T_on/T\n", + "V_o=V_i/(1-a)\n", + "\n", + "#Results \n", + "print(\"pulse width of o/p voltage=%.0f us\" %T_off)\n", + "print(\"\\nnew o/p voltage=%.0f V\" %V_o)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pulse width of o/p voltage=25 us\n", + "\n", + "new o/p voltage=1320 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_1=12.0\n", + "I_2=16.0\n", + "\n", + "#Calculations\n", + "I_0=(I_1+I_2)/2\n", + "R=10.0\n", + "V_0=I_0*R\n", + "V_s=200.0\n", + "a=V_0/V_s\n", + "r=a/(1-a)\n", + "\n", + "#Results\n", + "print(\"time ratio(T_on/T_off)=%.3f\" %r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time ratio(T_on/T_off)=2.333\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page No 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_o=660.0\n", + "V_s=220.0\n", + "\n", + "#Calculations\n", + "a=(V_o/V_s)/(1+(V_o/V_s))\n", + "T_on=120\n", + "T=T_on/a\n", + "T_off=T-T_on \n", + "T_off=3*T_off\n", + "T_on=T-T_off\n", + "a=T_on/(T_on+T_off)\n", + "V_o=V_s*(a/(1-a)) \n", + "\n", + "#Results\n", + "print(\"pulse width o/p voltage=%.0f us\" %T_off)\n", + "print(\"\\nnew o/p voltage=%.2f V\" %V_o)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pulse width o/p voltage=120 us\n", + "\n", + "new o/p voltage=73.33 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page No 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=1.0\n", + "L=.005\n", + "T_a=L/R\n", + "T=2000*10**-6\n", + "E=24.0\n", + "V_s=220\n", + "T_on=600*10**-6\n", + "a=T_on/T\n", + "\n", + "#Calculations\n", + "a1=(T_a/T)*math.log(1+(E/V_s)*((math.exp(T/T_a))-1))\n", + "if a1a :\n", + " print(\"load current is continuous\")\n", + "else:\n", + " print(\"load current is discontinuous\")\n", + "\n", + "t_x=T_on+L*math.log(1+((V_s-E)/272)*(1-math.exp(-T_on/T_a)))\n", + " #Value of t_x wrongly calculated in the book so ans of V_o and I_o varies\n", + "V_o=a*V_s+(1-t_x/T)*E \n", + "I_o=(V_o-E)/R \n", + "I_mx=(V_s-E)/R*(1-math.exp(-T_on/T_a)) \n", + "\n", + "#Results \n", + "print(\"avg o/p voltage=%.2f V\" %V_o)\n", + "print(\"avg o/p current=%.2f A\" %I_o) \n", + "print(\"max value of load current=%.1f A\" %I_mx)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "load current is discontinuous\n", + "avg o/p voltage=121.77 V\n", + "avg o/p current=49.77 A\n", + "max value of load current=81.5 A\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13, Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.2\n", + "V_s=500\n", + "E=a*V_s\n", + "L=0.06\n", + "I=10\n", + "\n", + "#Calculations\n", + "T_on=(L*I)/(V_s-E)\n", + "f=a/T_on \n", + "\n", + "#Results\n", + "print(\"chopping freq=%.2f Hz\" %f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "chopping freq=133.33 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=0.5\n", + "pu=0.1 #pu ripple\n", + "\n", + "#Calculations\n", + " #x=T/T_a\n", + " #y=exp(-a*x)\n", + "y=(1-pu)/(1+pu)\n", + " #after solving\n", + "x=math.log(1/y)/a\n", + "f=1000\n", + "T=1/f\n", + "T_a=T/x\n", + "R=2\n", + "L=R*T_a\n", + "Li=0.002\n", + "Le=L-Li \n", + "\n", + "#Results\n", + "print(\"external inductance=%.3f mH\" %(Le*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "external inductance=-2.000 mH\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=10.0\n", + "L=0.015\n", + "T_a=L/R\n", + "f=1250.0\n", + "T=1.0/f\n", + "a=0.5\n", + "T_on=a*T\n", + "V_s=220.0\n", + "\n", + "#Calculations\n", + "I_mx=(V_s/R)*((1-math.exp(-T_on/T_a))/(1-math.exp(-T/T_a))) \n", + "I_mn=(V_s/R)*((math.exp(T_on/T_a)-1)/(math.exp(T/T_a)-1)) \n", + "dI=I_mx-I_mn \n", + "V_o=a*V_s\n", + "I_o=V_o/R \n", + "I_or=math.sqrt(I_mx**2+dI**2/3+I_mx*dI) \n", + "I_chr=math.sqrt(a)*I_or \n", + "\n", + "#Results\n", + "print(\"Max value of ripple current=%.2f A\" %dI)\n", + "print(\"Max value of load current=%.3f A\" %I_mx)\n", + "print(\"Min value of load current=%.2f A\" %I_mn)\n", + "print(\"Avg value of load current=%.2f A\" %I_o) \n", + "print(\"rms value of load current=%.2f A\" %I_or)\n", + "print(\"rms value of chopper current=%.2f A\" %I_chr)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max value of ripple current=2.92 A\n", + "Max value of load current=12.458 A\n", + "Min value of load current=9.54 A\n", + "Avg value of load current=11.00 A\n", + "rms value of load current=13.94 A\n", + "rms value of chopper current=9.86 A\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=0.0016\n", + "C=4*10**-6\n", + "\n", + "#Calculations\n", + "w=1/math.sqrt(L*C)\n", + "t=math.pi/w \n", + "\n", + "\n", + "#Results\n", + "print(\"time for which current flows=%.2f us\" %(t*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for which current flows=251.33 us\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18, Page No 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "t_q=20.0*10**-6\n", + "dt=20.0*10**-6\n", + "\n", + "#Calculations\n", + "t_c=t_q+dt\n", + "I_0=60.0\n", + "V_s=60.0\n", + "C=t_c*I_0/V_s \n", + "\n", + "#Results \n", + "print(\"value of commutating capacitor=%.0f uF\" %(C*10**6))\n", + "\n", + "L1=(V_s/I_0)**2*C\n", + "L2=(2*t_c/math.pi)**2/C\n", + "if L1>L2 :\n", + " print(\"value of commutating inductor=%.0f uH\" %(L1*10**6))\n", + "else:\n", + " print(\"value of commutating inductor=%.0f uH\" %(L2*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of commutating capacitor=40 uF\n", + "value of commutating inductor=40 uH\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19, Page No 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "t=100.0*10**-6\n", + "R=10.0\n", + "\n", + "#Calculations\n", + " #V_s*(1-2*math.exp(-t/(R*C)))=0\n", + "C=-t/(R*math.log(1.0/2)) \n", + "L=(4/9.0)*C*R**2 \n", + "L=(1.0/4)*C*R**2 \n", + "\n", + "#Results\n", + "print(\"Value of comutating component C=%.3f uF\" %(C*10**6))\n", + "print(\"max permissible current through SCR is 2.5 times load current\")\n", + "print(\"value of comutating component L=%.1f uH\" %(L*10**6))\n", + "print(\"max permissible current through SCR is 1.5 times peak diode current\")\n", + "print(\"value of comutating component L=%.2f uH\" %(L*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of comutating component C=14.427 uF\n", + "max permissible current through SCR is 2.5 times load current\n", + "value of comutating component L=360.7 uH\n", + "max permissible current through SCR is 1.5 times peak diode current\n", + "value of comutating component L=360.67 uH\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20, Page No 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T_on=800.0*10**-6\n", + "V_s=220.0\n", + "I_o=80.0\n", + "C=50*10**-6\n", + "\n", + "#Calculations\n", + "T=T_on+2*V_s*C/I_o \n", + "L=20*10**-6\n", + "C=50*10**-6\n", + "i_T1=I_o+V_s*math.sqrt(C/L) \n", + "i_TA=I_o \n", + "t_c=C*V_s/I_o \n", + "t_c1=(math.pi/2)*math.sqrt(L*C) \n", + "t=150*10**-6\n", + "v_c=I_o*t/C-V_s \n", + "\n", + "#Results \n", + "print(\"effective on period=%.0f us\" %(T*10**6))\n", + "print(\"peak current through main thyristor=%.2f A\" %i_T1)\n", + "print(\"peak current through auxillery thyristor=%.0f A\" %i_TA)\n", + "print(\"turn off time for main thyristor=%.1f us\" %(t_c*10**6))\n", + "print(\"turn off time for auxillery thyristor=%.3f us\" %(t_c1*10**6))\n", + "print(\"total commutation interval=%.0f us\" %(2*t_c*10**6))\n", + "print(\"capacitor voltage=%.0f V\" %v_c)\n", + "print(\"time nedded to recharge the capacitor=%.0f us\" %(2*V_s*C/I_o*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for firing angle = 30deg\n", + "avg output voltage=232.509 V\n", + "for firing angle = 60deg\n", + "avg output voltage=133.65 V\n", + "avg current rating=12 A\n", + "rms current rating=20.785 A\n", + "PIV of SCR=565.7 V\n", + "power dissipated=16.8 W\n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21, Page No 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_o=260.0\n", + "V_s=220.0\n", + "fos=2 #factor of safety\n", + "\n", + "#Calculations\n", + "t_off=18*10**-6\n", + "t_c=2*t_off\n", + "C=t_c*I_o/V_s \n", + "L=(V_s/(0.8*I_o))**2*C \n", + "f=400\n", + "a_mn=math.pi*f*math.sqrt(L*C)\n", + "V_omn=V_s*(a_mn+2*f*t_c) \n", + "V_omx=V_s \n", + "\n", + "#Results\n", + "print(\"Value of C=%.3f uF\" %(C*10**6))\n", + "print(\"value of L=%.3f uH\" %(L*10**6))\n", + "print(\"min value of o/p voltage=%.3f V\" %V_omn)\n", + "print(\"max value of o/p voltage=%.0f V\" %V_omx)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "firing angle delay=47.461 deg\n", + "pf=0.646\n", + "firing angle delay=127.71 deg\n" + ] + } + ], + "prompt_number": "*" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22, Page No 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "x=2.0\n", + "t_q=30*10**-6\n", + "dt=30*10**-6\n", + "t_c=t_q+dt\n", + "V_s=230.0\n", + "I_o=200.0\n", + "\n", + "#Calculations\n", + "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n", + "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n", + "V_cp=V_s+I_o*math.sqrt(L/C) \n", + "I_cp=x*I_o \n", + "x=3\n", + "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n", + "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n", + "V_cp=V_s+I_o*math.sqrt(L/C) \n", + "I_cp=x*I_o \n", + "\n", + "#Results\n", + "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n", + "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n", + "print(\"peak capacitor voltage=%.0f V\" %V_cp)\n", + "print(\"peak commutataing current=%.0f A\" %I_cp)\n", + "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n", + "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n", + "print(\"peak capacitor voltage=%.2f V\" %V_cp)\n", + "print(\"peak commutataing current=%.0f A\" %I_cp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of commutating inductor=7.321 uH\n", + "value of commutating capacitor=49.822 uF\n", + "peak capacitor voltage=307 V\n", + "peak commutataing current=600 A\n", + "value of commutating inductor=7.321 uH\n", + "value of commutating capacitor=49.822 uF\n", + "peak capacitor voltage=306.67 V\n", + "peak commutataing current=600 A\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23, Page No 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesV_s=230\n", + "C=50*10**-6\n", + "L=20*10**-6\n", + "I_cp=V_s*math.sqrt(C/L)\n", + "I_o=200\n", + "x=I_cp/I_o\n", + "\n", + "#Calculations\n", + "t_c=(math.pi-2*math.asin(1/x))*math.sqrt(C*L) \n", + "th1=math.degrees(math.asin(1.0/x))\n", + "t=(5*math.pi/2-th1*math.pi/180)*math.sqrt(L*C)+C*V_s*(1-math.cos(math.radians(th1)))/I_o \n", + "t=(math.pi-th1*math.pi/180)*math.sqrt(L*C) \n", + "\n", + "#Results\n", + "print(\"turn off time of main thyristor=%.2f us\" %(t_c*10**6))\n", + "print(\"total commutation interval=%.3f us\" %(t*10**6))\n", + "print(\"turn off time of auxillery thyristor=%.3f us\" %(t*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "turn off time of main thyristor=62.52 us\n", + "total commutation interval=80.931 us\n", + "turn off time of auxillery thyristor=80.931 us\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.24, Page No 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "tc=0.006\n", + "R=10.0\n", + "L=R*tc\n", + "f=2000.0\n", + "\n", + "#Calculations\n", + "T=1/f\n", + "V_o=50.0\n", + "V_s=100.0\n", + "a=V_o/V_s\n", + "T_on=a*T\n", + "T_off=T-T_on\n", + "dI=V_o*T_off/L\n", + "I_o=V_o/R\n", + "I2=I_o+dI/2 \n", + "I1=I_o-dI/2 \n", + "\n", + "#Results\n", + "print(\"max value of load current=%.3f A\" %I2)\n", + "print(\"min value of load current=%.3f A\" %I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max value of load current=5.104 A\n", + "min value of load current=4.896 A\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.27, Page No 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "I_a=30.0\n", + "r_a=.5\n", + "V_s=220.0\n", + "\n", + "#Calculations\n", + "a=I_a*r_a/V_s \n", + "a=1\n", + "k=.1 #V/rpm\n", + "N=(a*V_s-I_a*r_a)/k \n", + "\n", + "#Results\n", + "print(\"min value of duty cycle=%.3f\" %a)\n", + "print(\"min Value of speed control=%.0f rpm\" %0)\n", + "print(\"max value of duty cycle=%.0f\" %a)\n", + "print(\"max value of speed control=%.0f rpm\" %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "min value of duty cycle=1.000\n", + "min Value of speed control=0 rpm\n", + "max value of duty cycle=1\n", + "max value of speed control=2050 rpm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.28, Page No 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_t=72.0\n", + "I_a=200.0\n", + "r_a=0.045\n", + "N=2500.0\n", + "\n", + "#Calculations\n", + "k=(V_t-I_a*r_a)/N\n", + "E_a=k*1000\n", + "L=.007\n", + "Rm=.045\n", + "Rb=0.065\n", + "R=Rm+Rb\n", + "T_a=L/R\n", + "I_mx=230\n", + "I_mn=180\n", + "T_on=-T_a*math.log(-((V_t-E_a)/R-I_mx)/((I_mn)-(V_t-E_a)/R))\n", + "R=Rm\n", + "T_a=L/R\n", + "T_off=-T_a*math.log(-((-E_a)/R-I_mn)/((I_mx)-(-E_a)/R))\n", + "T=T_on+T_off\n", + "f=1/T \n", + "a=T_on/T \n", + "\n", + "#Results\n", + "print(\"chopping freq=%.1f Hz\" %f) \n", + "print(\"duty cycle ratio=%.3f\" %a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "chopping freq=40.5 Hz\n", + "\n", + "duty cycle ratio=0.588\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.29, Page No 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variablesI_mx=425\n", + "I_lt=180.0 #lower limit of current pulsation\n", + "I_mn=I_mx-I_lt\n", + "T_on=0.014\n", + "T_off=0.011\n", + "\n", + "#Calculations\n", + "T=T_on+T_off\n", + "T_a=.0635\n", + "a=T_on/T\n", + "V=(I_mx-I_mn*math.exp(-T_on/T_a))/(1-math.exp(-T_on/T_a))\n", + "a=.5\n", + "I_mn=(I_mx-V*(1-math.exp(-T_on/T_a)))/(math.exp(-T_on/T_a))\n", + "T=I_mx-I_mn \n", + "T=T_on/a\n", + "f=1/T \n", + "\n", + "#Results\n", + "print(\"higher limit of current pulsation=%.0f A\" %T)\n", + "print(\"chopping freq=%.3f Hz\" %f)\n", + "print(\"duty cycle ratio=%.2f\" %a)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "higher limit of current pulsation=0 A\n", + "chopping freq=35.714 Hz\n", + "duty cycle ratio=0.50\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb new file mode 100755 index 00000000..721a9faf --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb @@ -0,0 +1,984 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 08 : Inverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page No 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "T=0.1*10**-3\n", + "f=1.0/T\n", + "k=15*10**-6 #k=th/w\n", + "\n", + "#Calculations\n", + "th=2*math.pi*f*k\n", + "X_l=10.0\n", + "R=2.0\n", + "X_c=R*math.tan(th)+X_l\n", + "C=1/(2*math.pi*f*X_c) \n", + "\n", + "#Results\n", + "print(\"value of C=%.3f uF\" %(C*10**6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of C=1.248 uF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "\n", + "#Calculations\n", + "V_01=2*V_s/(math.sqrt(2)*math.pi)\n", + "R=2.0\n", + "I_01=V_01/R\n", + "P_d=I_01**2*R \n", + "V=V_s/2\n", + "I_s=math.sqrt(2)*I_01/math.pi\n", + "P_s=V*I_s\n", + "\n", + "#Results\n", + "print(\"power delivered to load=%.1f W\" %P_d)\n", + "print(\"power delivered by both sources=%.1f W\" %(2*P_s))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power delivered to load=5359.9 W\n", + "power delivered by both sources=5359.9 W\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page No 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_01=4*V_s/(math.pi*math.sqrt(2))\n", + "R=1.0\n", + "X_L=6.0\n", + "X_c=7.0\n", + "\n", + "#Calculations\n", + "I_01=V_01/math.sqrt(R**2+(X_L-X_c)**2)\n", + "P=I_01**2*R \n", + "I_s=math.sqrt(2)*I_01*(2*math.cos(math.radians(45)))/math.pi\n", + "P_s=V_s*I_s \n", + "\n", + "#Results\n", + "print(\"power delivered to the source=%.3f kW\" %(P/1000))\n", + "print(\"\\npower from the source=%.3f kW\" %(P_s/1000))\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power delivered to the source=21.440 kW\n", + "\n", + "power from the source=21.440 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_01=230.0\n", + "R=2.0\n", + "I_01=V_01/R\n", + "I_m=I_01*math.sqrt(2)\n", + "I_T1=I_m/2 \n", + "I_D1=0 \n", + "X_L=8.0\n", + "X_C=6.0\n", + "\n", + "#Calculations\n", + "I_01=V_01/math.sqrt(R**2+(X_L-X_C)**2)\n", + "phi1=math.degrees(math.atan((X_L-X_C)/R))\n", + "I_T1=I_T1*math.sqrt(2)*0.47675 \n", + "I_D1=.1507025*I_m/math.sqrt(2) \n", + "\n", + "\n", + "#Results\n", + "print(\"when load R=2 ohm\")\n", + "print(\"rms value of thyristor current=%.2f A\" %I_T1)\n", + "print(\"rms value of diode current=%.0f A\" %I_D1)\n", + "print(\"when load R=2ohm % X_L=8ohm and X_C=6ohm\")\n", + "print(\"rms value of thyristor current=%.3f A\" %I_T1)\n", + "print(\"rms value of diode current=%.3f A\" %I_D1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when load R=2 ohm\n", + "rms value of thyristor current=54.83 A\n", + "rms value of diode current=17 A\n", + "when load R=2ohm % X_L=8ohm and X_C=6ohm\n", + "rms value of thyristor current=54.826 A\n", + "rms value of diode current=17.331 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "R=4.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=0.035\n", + "\n", + "#Calculations\n", + "C=155*10**-6\n", + "X_L=w*L\n", + "X_C=1/(w*C)\n", + "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n", + "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n", + "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n", + "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n", + "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n", + "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n", + "I_m1=4*V_s/(Z1*math.pi)\n", + "I_01=I_m1/math.sqrt(2) \n", + "I_m3=4*V_s/(3*Z3*math.pi)\n", + "I_m5=4*V_s/(5*Z5*math.pi)\n", + "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2)\n", + "I_0=I_m/math.sqrt(2)\n", + "P_0=(I_0)**2*R \n", + "P_01=(I_01)**2*R \n", + "t1=(180-phi1)*math.pi/(180*w) \n", + "t1=(phi1)*math.pi/(180*w) \n", + "\n", + "#Results\n", + "print(\"rms value of fundamental load current=%.2f A\" %I_01)\n", + "print(\"load power=%.1f W\" %P_0)\n", + "print(\"fundamental load power=%.1f W\" %P_01)\n", + "print(\"rms value of thyristor current=%.3f A\" %(I_m/2))\n", + "print(\"conduction time for thyristor=%.3f ms\" %(t1*1000))\n", + "print(\"Conduction time for diodes=%.3f ms\" %(t1*1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of fundamental load current=20.02 A\n", + "load power=1632.5 W\n", + "fundamental load power=1602.6 W\n", + "rms value of thyristor current=14.285 A\n", + "conduction time for thyristor=3.736 ms\n", + "Conduction time for diodes=3.736 ms\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page No 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_01=2*V_s/(math.sqrt(2)*math.pi) \n", + "R=10.0\n", + "\n", + "#Calculations\n", + "I_01=V_01/R\n", + "P=I_01**2*R \n", + "V_or=math.sqrt((V_s/2)**2)\n", + "P=V_or**2/R \n", + "I_TP=V_s/(2*R)\n", + "I_or=I_TP\n", + "pf=I_01**2*R/(V_or*I_or) \n", + "DF=V_01/V_or \n", + "V_oh=math.sqrt(V_or**2-V_01**2)\n", + "THD=V_oh/V_01 \n", + "V_03=V_01/3\n", + "HF=V_03/V_01\n", + "\n", + "#Results\n", + "print(\"fundamental rms o/p voltage=%.3f V\" %V_01)\n", + "print(\"fundamental power to load=%.1f W\" %P)\n", + "print(\"total o/p power to load=%.1f W\" %P)\n", + "print(\"avg SCR current=%.2f A\" %(I_TP*180/360))\n", + "print(\"i/p pf=%.3f\" %pf) \n", + "print(\"distortion factor=%.1f\" %DF)\n", + "print(\"THD=%.3f\" %THD) \n", + "print(\"harmonic factor=%.4f\" %HF)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fundamental rms o/p voltage=103.536 V\n", + "fundamental power to load=1322.5 W\n", + "total o/p power to load=1322.5 W\n", + "avg SCR current=5.75 A\n", + "i/p pf=0.811\n", + "distortion factor=0.9\n", + "THD=0.483\n", + "harmonic factor=0.3333\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=60\n", + "R=3.0\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt(V_s**2*math.pi/math.pi) \n", + "V_01=4*V_s/(math.sqrt(2)*math.pi) \n", + "P_o=V_or**2/R \n", + "P_01=V_01**2/R \n", + "I_s=V_s/R \n", + "I_avg=I_s*math.pi/(2*math.pi) \n", + "V_03=V_01/3\n", + "HF=V_03/V_01 \n", + "V_oh=math.sqrt(V_or**2-V_01**2)\n", + "THD=V_oh/V_01 \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.0f V\" %V_or)\n", + "print(\"o/p power=%.0f W\" %P_o)\n", + "print(\"fundamental component of rms voltage=%.2f V\" %V_01)\n", + "print(\"fundamental freq o/p power=%.2f W\" %P_01) \n", + "print(\"peak current=%.0f A\" %I_s)\n", + "print(\"avg current of each transistor=%.0f A\" %I_avg)\n", + "print(\"peak reverse blocking voltage=%.0f V\" %V_s)\n", + "print(\"harmonic factor=%.4f\" %HF)\n", + "print(\"THD=%.4f\" %THD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=60 V\n", + "o/p power=1200 W\n", + "fundamental component of rms voltage=54.02 V\n", + "fundamental freq o/p power=972.68 W\n", + "peak current=20 A\n", + "avg current of each transistor=10 A\n", + "peak reverse blocking voltage=60 V\n", + "harmonic factor=0.3333\n", + "THD=0.4834\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 Page No 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=220.0\n", + "R=6.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=0.03\n", + "C=180*10**-6\n", + "X_L=w*L\n", + "X_C=1/(w*C)\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n", + "V_01=4*V_s/(math.sqrt(2)*math.pi)\n", + "V_oh=math.sqrt(V_or**2-V_01**2)\n", + "THD=V_oh/V_01 \n", + "print(\"THD of voltage=%.4f\" %THD)\n", + "DF=V_01/V_or \n", + "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n", + "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n", + "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n", + "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n", + "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n", + "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n", + "Z7=math.sqrt(R**2+(X_L*7-X_C/7)**2)\n", + "phi7=math.degrees(math.atan((X_L*7-X_C/7)/R))\n", + "I_01=19.403\n", + "I_m1=4*V_s/(Z1*math.pi)\n", + "I_m3=4*V_s/(3*Z3*math.pi)\n", + "I_m5=4*V_s/(5*Z5*math.pi)\n", + "I_m7=4*V_s/(7*Z7*math.pi)\n", + "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n", + "I_or=I_m/math.sqrt(2)\n", + "I_oh=math.sqrt((I_m**2-I_m1**2)/2)\n", + "THD=I_oh/I_01 \n", + "DF=I_01/I_or \n", + "P_o=I_or**2*R \n", + "I_avg=P_o/V_s \n", + "t1=(180-phi1)*math.pi/(180*w) \n", + "t1=1/(2*f)-t1 \n", + "I_p=I_m1 \n", + "I_t1=.46135*I_p \n", + "\n", + "#Results\n", + "print(\"\\nDF=%.1f\" %DF)\n", + "print(\"THD of current=%.4f\" %THD) \n", + "print(\"DF=%.3f\" %DF)\n", + "print(\"load power=%.1f W\" %P_o)\n", + "print(\"avg value of load current=%.2f A\" %I_avg)\n", + "print(\"conduction time for thyristor=%.0f ms\" %(t1*1000))\n", + "print(\"conduction time for diodes=%.0f ms\" %(t1*1000))\n", + "print(\"peak transistor current=%.2f A\" %I_p)\n", + "print(\"rms transistor current=%.2f A\" %I_t1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "THD of voltage=0.4834\n", + "\n", + "DF=1.0\n", + "THD of current=0.1557\n", + "DF=0.988\n", + "load power=2313.5 W\n", + "avg value of load current=10.52 A\n", + "conduction time for thyristor=3 ms\n", + "conduction time for diodes=3 ms\n", + "peak transistor current=27.44 A\n", + "rms transistor current=12.66 A\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 Page No 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=450.0\n", + "R=10.0\n", + "\n", + "#Calculations\n", + "I_or=math.sqrt((V_s/(3*R))**2*2/3+(2*V_s/(3*R))**2*1/3) \n", + "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(3*R))**2*2*math.pi/3+(2*V_s/(3*R))**2*math.pi/3)) \n", + "P=3*I_or**2*R \n", + "I_or=math.sqrt((1/(math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n", + "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n", + "P=3*I_or**2*R \n", + "\n", + "#Results\n", + "print(\"for 180deg mode\")\n", + "print(\"rms value of load current=%.3f A\" %I_or)\n", + "print(\"power delivered to load=%.1f kW\" %(P/1000))\n", + "print(\"rms value of load current=%.0f A\" %I_T1)\n", + "print(\"for 120deg mode\")\n", + "print(\"rms value of load current=%.3f A\" %I_or)\n", + "print(\"rms value of load current=%.2f A\" %I_T1)\n", + "print(\"power delivered to load=%.3f kW\" %(P/1000))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for 180deg mode\n", + "rms value of load current=18.371 A\n", + "power delivered to load=10.1 kW\n", + "rms value of load current=13 A\n", + "for 120deg mode\n", + "rms value of load current=18.371 A\n", + "rms value of load current=12.99 A\n", + "power delivered to load=10.125 kW\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12, Page No 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "R=10.0\n", + "f=50.0\n", + "w=2*math.pi*f\n", + "L=0.03\n", + "\n", + "#Calculations\n", + "X_L=w*L\n", + "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n", + "V_01=4*V_s/(math.sqrt(2)*math.pi)\n", + "Z1=math.sqrt(R**2+(X_L)**2)\n", + "phi1=-math.degrees(math.atan((X_L)/R))\n", + "Z3=math.sqrt(R**2+(X_L*3)**2)\n", + "phi3=math.degrees(math.atan((X_L*3)/R))\n", + "Z5=math.sqrt(R**2+(X_L*5)**2)\n", + "phi5=math.degrees(math.atan((X_L*5)/R))\n", + "Z7=math.sqrt(R**2+(X_L*7)**2)\n", + "phi7=math.degrees(math.atan((X_L*7)/R))\n", + "I_m1=4*V_s/(math.sqrt(2)*Z1*math.pi)\n", + "I_m3=4*V_s/(math.sqrt(2)*3*Z3*math.pi)\n", + "I_m5=4*V_s/(math.sqrt(2)*5*Z5*math.pi)\n", + "I_m7=4*V_s/(math.sqrt(2)*7*Z7*math.pi)\n", + "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n", + "P=I_m**2*R \n", + "I_01=I_m1*math.sin(math.radians(45))\n", + "I_03=I_m3*math.sin(math.radians(3*45))\n", + "I_05=I_m5*math.sin(math.radians(5*45))\n", + "I_07=I_m7*math.sin(math.radians(7*45))\n", + "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n", + "P=I_0*R \n", + "g=(180-90)/3+45/2\n", + "I_01=2*I_m1*math.sin(math.radians(g))*math.sin(math.radians(45/2))\n", + "I_03=2*I_m3*math.sin(math.radians(g*3))*math.sin(math.radians(3*45/2))\n", + "I_05=2*I_m5*math.sin(math.radians(g*5))*math.sin(math.radians(5*45/2))\n", + "I_07=2*I_m7*math.sin(math.radians(g*7))*math.sin(math.radians(7*45/2))\n", + "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n", + "P=I_0*R \n", + "\n", + "\n", + "#Results\n", + "print(\"using square wave o/p\")\n", + "print(\"power delivered=%.2f W\" %P)\n", + "print(\"using quasi-square wave o/p\")\n", + "print(\"power delivered=%.2f W\" %P)\n", + "print(\"using two symmitrical spaced pulses\")\n", + "print(\"power delivered=%.2f W\" %P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "using square wave o/p\n", + "power delivered=845.87 W\n", + "using quasi-square wave o/p\n", + "power delivered=845.87 W\n", + "using two symmitrical spaced pulses\n", + "power delivered=845.87 W\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14, Page No 520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=50.0\n", + "T=1/f\n", + "I=0.5\n", + "\n", + "#Calculations\n", + "di=I/T #di=di/dt\n", + "V_s=220.0\n", + "L=V_s/di \n", + "t=20*10**-6\n", + "fos=2 #factor of safety\n", + "t_c=t*fos\n", + "R=10\n", + "C=t_c/(R*math.log(2))\n", + "\n", + "#Results \n", + "print(\"source inductance=%.1f H\" %L)\n", + "print(\"commutating capacitor=%.2f uF\" %(C*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "source inductance=8.8 H\n", + "commutating capacitor=5.77 uF\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15, Page No 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=10.0\n", + "L=.01\n", + "C=10*10**-6\n", + "#Calculations\n", + "if (R**2)<(4*L/C) :\n", + " print(\"ckt will commutate on its own\")\n", + "else:\n", + " print(\"ckt will not commutate on its own\")\n", + "\n", + "xie=R/(2*L)\n", + "w_o=1/math.sqrt(L*C)\n", + "w_r=math.sqrt(w_o**2-xie**2)\n", + "phi=math.degrees(math.atan(xie/w_r))\n", + "t=math.pi/w_r\n", + "V_s=1\n", + "v_L=V_s*(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180+phi))\n", + "v_c=V_s*(1-(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180-phi))) \n", + "di=V_s/L \n", + "\n", + "\n", + "#Results\n", + "print(\"voltage across inductor(*V_s)=%.5f V\" %v_L) \n", + "print(\"voltage across capacitor(*V_s)=%.5f V\" %v_c)\n", + "print(\"di/dt*V_s (for t=0)=%.0f A/s\" %di)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ckt will commutate on its own\n", + "voltage across inductor(*V_s)=-0.60468 V\n", + "voltage across capacitor(*V_s)=1.60468 V\n", + "di/dt*V_s (for t=0)=100 A/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.16, Page No 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "L=0.006\n", + "C=1.2*10**-6\n", + "R=100.0\n", + "\n", + "#Calculations\n", + "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", + "T_off=0.2*10**-3\n", + "f=1/(2*(T+T_off)) \n", + "R=40\n", + "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", + "T_off=.2*10**-3\n", + "f=1/(2*(T+T_off)) \n", + "R=140\n", + "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n", + "T_off=.2*10**-3\n", + "f=1/(2*(T+T_off)) \n", + "\n", + "#Results\n", + "print(\"o/p freq=%.2f Hz\" %f)\n", + "print(\"for R=40ohm\")\n", + "print(\"upper limit o/p freq=%.1f Hz\" %f)\n", + "print(\"for R=140ohm\")\n", + "print(\"lower limit o/p freq=%.1f Hz\" %f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "o/p freq=239.81 Hz\n", + "for R=40ohm\n", + "upper limit o/p freq=239.8 Hz\n", + "for R=140ohm\n", + "lower limit o/p freq=239.8 Hz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17, Page No 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "f=5000.0\n", + "w=2*math.pi*f\n", + "R=3.0\n", + "\n", + "#Calculations\n", + "L=60*10**-6\n", + "xie=R/(2*L)\n", + "C=7.5*10**-6\n", + "w_o=1/math.sqrt(L*C)\n", + "w_r=math.sqrt(w_o**2-xie**2)\n", + "t_c=math.pi*(1/w-1/w_r) \n", + "fos=1.5\n", + "t_q=10*10**-6\n", + "f_max=1/(2*math.pi*(t_q*fos/math.pi+1/w_r)) \n", + "\n", + "#Results\n", + "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n", + "print(\"max possible operating freq=%.1f Hz\" %f_max)\n", + " #Answers have small variations from that in the book due to difference in the rounding off of digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ckt turn off time=21.39 us\n", + "max possible operating freq=5341.4 Hz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18, Page No 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "a=30.0\n", + "R=10.0\n", + "P=5000.0\n", + "\n", + "#Calculations\n", + "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n", + "V_ph=V_s/math.sqrt(3) \n", + "I_or=math.sqrt(P*R)\n", + "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n", + "V_ph=V_s/math.sqrt(3) \n", + "\n", + "#Results\n", + "print(\"per phase voltage V_ph=%.3f V\" %V_ph) \n", + "print(\"for constant load current\")\n", + "print(\"V_ph=%.2f V\" %V_ph)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "per phase voltage V_ph=110.384 V\n", + "for constant load current\n", + "V_ph=110.38 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19, Page No 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "t=20.0\n", + "fos=2.0 #factor of safety\n", + "\n", + "#Calculations\n", + "t_c=t*fos\n", + "n=1.0/3\n", + "R=20.0\n", + "C=n**2*t_c/(4*R*math.log(2)) \n", + "\n", + "#Results \n", + "print(\"value of capacitor=%.2f uF\" %C)\n", + " #printing mistake in the answer in book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of capacitor=0.08 uF\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.20, Page No 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=220.0\n", + "V_p=math.sqrt(2)*V_s/3 \n", + "V_L=math.sqrt(3)*V_p \n", + "V_p1=math.sqrt(2)*V_s/math.pi \n", + "V_L1=math.sqrt(3)*V_p1 \n", + "V_oh=math.sqrt(V_L**2-V_L1**2)\n", + "\n", + "#Calculations\n", + "THD=V_oh/V_L1 \n", + "V_a1=2*V_s/math.pi\n", + "V_a5=2*V_s/(5*math.pi)\n", + "V_a7=2*V_s/(7*math.pi)\n", + "V_a11=2*V_s/(11*math.pi)\n", + "R=4.0\n", + "L=0.02\n", + "f=50\n", + "w=2*math.pi*f\n", + "Z1=math.sqrt(R**2+(w*L)**2)\n", + "Z5=math.sqrt(R**2+(5*w*L)**2)\n", + "Z7=math.sqrt(R**2+(7*w*L)**2)\n", + "Z11=math.sqrt(R**2+(11*w*L)**2)\n", + "I_a1=V_a1/Z1\n", + "I_a5=V_a5/Z5\n", + "I_a7=V_a7/Z7\n", + "I_a11=V_a11/Z11\n", + "I_or=math.sqrt((I_a1**2+I_a5**2+I_a7**2+I_a11**2)/2)\n", + "P=3*I_or**2*R \n", + "I_s=P/V_s \n", + "I_TA=I_s/3 \n", + " \n", + "#Results\n", + "print(\"rms value of phasor voltages=%.2f V\" %V_p)\n", + "print(\"rms value of line voltages=%.2f V\" %V_L)\n", + "print(\"fundamental component of phase voltage=%.3f V\" %V_p1)\n", + "print(\"fundamental component of line voltages=%.3f V\" %V_L1)\n", + "print(\"THD=%.7f\" %THD)\n", + "print(\"load power=%.1f W\" %P)\n", + "print(\"avg value of source current=%.3f A\" %I_s)\n", + "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of phasor voltages=103.71 V\n", + "rms value of line voltages=179.63 V\n", + "fundamental component of phase voltage=99.035 V\n", + "fundamental component of line voltages=171.533 V\n", + "THD=0.3108419\n", + "load power=2127.6 W\n", + "avg value of source current=9.671 A\n", + "avg value of thyristor current=3.224 A\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb new file mode 100755 index 00000000..052c4736 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb @@ -0,0 +1,388 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 09 : AC Voltage Controllers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page No 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "\n", + "#Calculations\n", + "V_or=(V_m/2)*math.sqrt(1/math.pi*((2*math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "R=20\n", + "I_or=V_or/R\n", + "P_o=I_or**2*R \n", + "I_s=I_or\n", + "VA=V_s*I_s\n", + "pf=P_o/VA \n", + "V_o=math.sqrt(2)*V_s/(2*math.pi)*(math.cos(math.radians(a))-1)\n", + "I_ON=V_o/R \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n", + "print(\"load power=%.1f W\" %P_o)\n", + "print(\"i/p pf=%.4f\" %pf)\n", + "print(\"avg i/p current=%.4f A\" %I_ON)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=224.716 V\n", + "load power=2524.9 W\n", + "i/p pf=0.9770\n", + "avg i/p current=-0.7581 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page No 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=45.0\n", + "\n", + "#Calculations\n", + "V_or=(V_s)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "R=20\n", + "I_or=V_or/R\n", + "P_o=I_or**2*R \n", + "I_s=I_or\n", + "VA=V_s*I_s\n", + "pf=P_o/VA \n", + "I_TA=math.sqrt(2)*V_s/(2*math.pi*R)*(math.cos(math.radians(a))+1) \n", + "I_Tr=math.sqrt(2)*V_s/(2*R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n", + "print(\"load power=%.2f W\" %P_o)\n", + "print(\"i/p pf=%.2f\" %pf)\n", + "print(\"avg thyristor current=%.2f A\" %I_TA) \n", + "print(\"rms value of thyristor current=%.2f A\" %I_Tr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=219.304 V\n", + "load power=2404.71 W\n", + "i/p pf=0.95\n", + "avg thyristor current=4.42 A\n", + "rms value of thyristor current=7.75 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "n=6.0 #on cycles\n", + "m=4.0 #off cycles\n", + "\n", + "#Calculations\n", + "k=n/(n+m)\n", + "V_or=V_s*math.sqrt(k) \n", + "pf=math.sqrt(k) \n", + "R=15\n", + "I_m=V_s*math.sqrt(2)/R\n", + "I_TA=k*I_m/math.pi\n", + "I_TR=I_m*math.sqrt(k)/2 \n", + " \n", + "#Results\n", + "print(\"rms value of o/ voltage=%.2f V\" %V_or)\n", + "print(\"i/p pf=%.2f\" %pf)\n", + "print(\"avg thyristor current=%.2f A\" %I_TA) \n", + "print(\"rms value of thyristor current=%.2f A\" %I_TR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/ voltage=178.16 V\n", + "i/p pf=0.77\n", + "avg thyristor current=4.14 A\n", + "rms value of thyristor current=8.40 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page No 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "R=3.0\n", + "\n", + "#Calculations\n", + "I_TAM1=2*V_m/(2*math.pi*R) \n", + "I_TRM2=V_m/(2*R) \n", + "f=50\n", + "w=2*math.pi*f\n", + "t_c=math.pi/w \n", + " \n", + "#Results\n", + "print(\"max value of avg thyristor current=%.3f A\" %I_TAM1)\n", + "print(\"max value of avg thyristor current=%.3f A\" %I_TRM2)\n", + "print(\"ckt turn off time=%.0f ms\" %(t_c*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max value of avg thyristor current=34.512 A\n", + "max value of avg thyristor current=54.212 A\n", + "ckt turn off time=10 ms\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "R=3.0\n", + "X_L=4.0\n", + "\n", + "#Calculations\n", + "phi=math.degrees(math.atan(X_L/R)) \n", + "V_s=230\n", + "Z=math.sqrt(R**2+X_L**2)\n", + "I_or=V_s/Z \n", + "P=I_or**2*R \n", + "I_s=I_or\n", + "pf=P/(V_s*I_s) \n", + "I_TAM=math.sqrt(2)*V_s/(math.pi*Z) \n", + "I_Tm=math.sqrt(2)*V_s/(2*Z) \n", + "f=50\n", + "w=2*math.pi*f\n", + "di=math.sqrt(2)*V_s*w/Z \n", + "\n", + "#Results\n", + "print(\"min firing angle=%.2f deg\" %phi)\n", + "print(\"\\nmax firing angle=%.0f deg\" %180)\n", + "print(\"i/p pf=%.1f\" %pf)\n", + "print(\"max value of rms load current=%.0f A\" %I_or)\n", + "print(\"max power=%.0f W\" %P)\n", + "print(\"max value of avg thyristor current=%.3f A\" %I_TAM)\n", + "print(\"max value of rms thyristor current=%.3f A\" %I_Tm)\n", + "print(\"di/dt=%.0f A/s\" %di)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "min firing angle=53.13 deg\n", + "\n", + "max firing angle=180 deg\n", + "i/p pf=0.6\n", + "max value of rms load current=46 A\n", + "max power=6348 W\n", + "max value of avg thyristor current=20.707 A\n", + "max value of rms thyristor current=32.527 A\n", + "di/dt=20437 A/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No 576" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V=230.0\n", + "R=3.0 #ohm\n", + "X_L=5.0 #ohm\n", + "a=120.0 #firing angle delay\n", + "\n", + "#Calculations\n", + "phi=math.degrees(math.atan(X_L/R))\n", + "b=0\n", + "i=1\n", + "while (i>0) :\n", + " LHS=math.sin(math.radians(b-a))\n", + " RHS=math.sin(math.radians(a-phi))*math.exp(-(R/X_L)*(b-a)*math.pi/180)\n", + " if math.fabs(LHS-RHS)<= 0.01 :\n", + " B=b\n", + " i=2\n", + " break\n", + " \n", + " b=b+.1 \n", + "V_or=math.sqrt(2)*V*math.sqrt((1/(2*math.pi))*((B-a)*math.pi/180+(math.sin(math.radians(2*a))-math.sin(math.radians(2*B)))/2))\n", + "\n", + "\n", + "#Results\n", + "print(\"Extinction angle=%.1f deg\" %B) #answer in the book is wrong as formulae for RHS is wrongly employed\n", + "print(\"rms value of output voltage=%.2f V\" %V_or) #answer do not match due to wrong B in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Extinction angle=156.1 deg\n", + "rms value of output voltage=97.75 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page No 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#initialisation of variables\n", + "V_s=230.0\n", + "V_m=math.sqrt(2)*V_s\n", + "a=60.0\n", + "R=20.0\n", + "\n", + "#Calculations\n", + "V_or=math.sqrt((V_m**2/(2*math.pi))*(a*math.pi/180-math.sin(math.radians(2*a))/2)+(2*V_m**2/(math.pi))*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2)) \n", + "I_T1r=(V_m/R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n", + "I_T3r=(V_m/(2*R))*math.sqrt(1/math.pi*((a*math.pi/180)-math.sin(math.radians(2*a))/2)) \n", + "I1=math.sqrt(2)*I_T1r\n", + "I3=math.sqrt((math.sqrt(2)*I_T1r)**2+(math.sqrt(2)*I_T3r)**2)\n", + "r=V_s*(I1+I3) \n", + "P_o=V_or**2/R\n", + "pf=P_o/r \n", + "\n", + "#Results\n", + "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n", + "print(\"rms value of current for upper thyristors=%.2f A\" %I_T1r)\n", + "print(\"rms value of current for lower thyristors=%.2f A\" %I_T3r)\n", + "print(\"t/f VA rating=%.2f VA\" %r)\n", + "print(\"i/p pf=%.2f\" %pf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of o/p voltage=424.94 V\n", + "rms value of current for upper thyristors=14.59 A\n", + "rms value of current for lower thyristors=3.60 A\n", + "t/f VA rating=9631.61 VA\n", + "i/p pf=0.94\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png new file mode 100755 index 00000000..9380fbcb Binary files /dev/null and b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png differ diff --git a/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png new file mode 100755 index 00000000..cef740d3 Binary files /dev/null and b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png differ diff --git a/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png new file mode 100755 index 00000000..a1d64cf1 Binary files /dev/null and b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png differ diff --git a/Principles_Of_Electronic_Communication_Systems/chapter1.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter1.ipynb deleted file mode 100755 index 48b042da..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter1.ipynb +++ /dev/null @@ -1,249 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fa4937e894b2eaacf3d917ad54d3257fed9024ea716662722fd829aea08934e3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1 Introduction to electronic communication" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.1.a Page no 14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "c=300000000\n", - "f1=150000000.0\n", - "f2=430000000.0\n", - "f3=8000000.0\n", - "f4=750000.0\n", - "\n", - "#Calculation\n", - "W1 = c/f1\n", - "W2=c/f2\n", - "W3=c/f3\n", - "W4=c/f4\n", - "\n", - "#Result\n", - "print\"(a) Wavelength is \",W1,\"meter\"\n", - "print\"(b) Wavelength is \",round(W2,3),\"meter\"\n", - "print\"(c) Wavelength is \",W3,\"meter\"\n", - "print\"(d) Wavelength is \",W4,\"meter\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Wavelength is 2.0 meter\n", - "(b) Wavelength is 0.698 meter\n", - "(c) Wavelength is 37.5 meter\n", - "(d) Wavelength is 400.0 meter\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.2 page no 15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "c=300000000\n", - "wavelength=1.5\n", - "\n", - "#Calculation\n", - "frequency=c/wavelength\n", - "\n", - "#Result\n", - "print\"Signal frequncy is \",frequency/1000000.0,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Signal frequncy is 200.0 MHz\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.3 page no 15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "wavelength_feet=75\n", - "wavelength_meter= 75/3.28\n", - "c=300000000\n", - "\n", - "#Calculation\n", - "frequency=c/wavelength_meter\n", - "\n", - "#Result\n", - "print\"The signal frequncy is \",frequency/1000000.0,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The signal frequncy is 13.12 MHz\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.4 page no 15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "wavelength_inches=8\n", - "wavelength_meter= 8/39.37\n", - "c=300\n", - "\n", - "#Calculation\n", - "frequency= c/wavelength_meter\n", - "\n", - "#Result\n", - "print\"The signal freuency is \",round(frequency,1),\"MHz\"\n", - "print\"The signnalfrequency is \",round(frequency*10**-3,2),\"GHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The signal freuency is 1476.4 MHz\n", - "The signnalfrequency is 1.48 GHz\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.5 page no 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f1=902000000\n", - "f2=928000000\n", - "\n", - "#Calculation\n", - "bandwidth=f2-f1\n", - "\n", - "#Result\n", - "print\"Width of the band is \",bandwidth/1000000,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Width of the band is 26 MHz\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1.6 page no 19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "bandwidth_megahertz= 6\n", - "f1_megahertz=54\n", - "\n", - "#Calculation\n", - "f2_megahertz=f1_megahertz + bandwidth_megahertz\n", - "\n", - "#Result\n", - "print\"Upper frequency limit is \",f2_megahertz,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Upper frequency limit is 60 MHz\n" - ] - } - ], - "prompt_number": 15 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter10.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter10.ipynb deleted file mode 100755 index f969c01b..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter10.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6d0a5becdae7bf2928f5747f4da31ef68eb2576da776218335d8b44a4a733949" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 Multiplexing and Demultiplexing" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1 Page no 368" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "BW_service = 860*10**6\n", - "BW_ch = 6.0*10**6\n", - "\n", - "#calculation\n", - "total_ch = BW_service/BW_ch\n", - "\n", - "#result\n", - "print\"Total number of channels are \",round(total_ch,0)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total number of channels are 143.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2 Page no 380" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "channels =16\n", - "sampling_rate= 3.5*10**3\n", - "w_len=6\n", - "\n", - "#Calculation\n", - "available_ch =channels-1\n", - "bpf =channels*w_len\n", - "data_rate = sampling_rate * bpf\n", - "\n", - "#Result\n", - "print\"(a) Available channels are \",available_ch\n", - "print\"(b) Bits Per Frame = \",bpf\n", - "print\"(c) The serial data rate \",data_rate/10**3,\"KHz\"\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Available channels are 15\n", - "(b) Bits Per Frame = 96\n", - "(c) The serial data rate 336.0 KHz\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter11.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter11.ipynb deleted file mode 100755 index 015bcc79..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter11.ipynb +++ /dev/null @@ -1,143 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8bd5af3b2acf26b36843842ce0fbb28501e7f5eae117a0af6c810fe6d60c2891" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 The Transmission of binary data in communication systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1 Page no 392" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "t=0.0016\n", - "No_words=256.0\n", - "bits_word = 12.0\n", - "\n", - "#Calculation\n", - "tword= t/No_words\n", - "tbit = tword/bits_word\n", - "bps =1/tbit\n", - "\n", - "#Result\n", - "print\"(a) The time duration of the word \",tword*10**8,\"microsecond\"\n", - "print\"(b) The time duration of the one bit is \",round(tbit*10**8,4),\"microseconds\"\n", - "print\"(c) The speed of transmission is \",bps/10**5,\"kbps\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The time duration of the word 625.0 microsecond\n", - "(b) The time duration of the one bit is 52.0833 microseconds\n", - "(c) The speed of transmission is 19.2 kbps\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2 Page no 400" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "B=12.5*10**3\n", - "SN_dB= 25\n", - "\n", - "#Calculation\n", - "import math\n", - "C_th = 2*B\n", - "SN=316.2\n", - "C =B*3.32*log10(SN+1)\n", - "N= 2**(C/(2.0*B))\n", - "\n", - "#Result\n", - "print\"(a) The maximum theorotical data rate is \",C_th/10**3,\"kbps\"\n", - "print\"(b) The maximum theorotical capacity of channel is \",round(C/10**3,1),\"Kbps\"\n", - "print\"(c) The number of levels needed to acheive maximum speed are \",round(N,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The maximum theorotical data rate is 25.0 kbps\n", - "(b) The maximum theorotical capacity of channel is 103.8 Kbps\n", - "(c) The number of levels needed to acheive maximum speed are 17.78\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3 Page no 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "block =512\n", - "packets =8\n", - "BER = 2*10**-4\n", - " \n", - "#Calculation\n", - "avg_errors = block*packets*8*BER\n", - "\n", - "print\"Average number of errors are \",avg_errors\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average number of errors are 6.5536\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter12.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter12.ipynb deleted file mode 100755 index ae98ce2e..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter12.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:70c87938501c80a4a95b89850ad3f0f2a57b63c9811bc118f804b4d657133c5f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 Introduction to Networking and local area networks" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.1 Page no 448" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "N = 20\n", - "\n", - "#Calculation\n", - "L = (N*(N-1))/2.0\n", - "\n", - "#Result\n", - "print\"The number of interconnecting wires required are \",L\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The number of interconnecting wires required are 190.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.2 Page no 474" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "block = 1500\n", - "ethernet = 10.0*10**6\n", - "token_ring = 16.0*10**6\n", - "\n", - "#Calculation\n", - "t1_bit = 1/ethernet\n", - "t1_byte = 8*t1_bit\n", - "t1_1526 = 1526 *t1_byte\n", - "t2_bit = 1/token_ring\n", - "t2_byte = 8 * t2_bit\n", - "t2_1521 =1521*t2_byte\n", - "\n", - "#Result\n", - "print\"(a) Time required for 1526 bytes is \",t1_1526*10**6,\"ns\"\n", - "print\"(b) Time required for 1521 bytes is \",t2_1521*10**3,\"ms\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Time required for 1526 bytes is 1220.8 ns\n", - "(b) Time required for 1521 bytes is 0.7605 ms\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter13.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter13.ipynb deleted file mode 100755 index de1fc475..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter13.ipynb +++ /dev/null @@ -1,339 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4be2df010e0c0a454b43a2b1267f5b9f24594cfd973fe52088cb80f0e511082b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13 Transmission lines" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.1 Page no 483" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f= 450.0*10**6\n", - "\n", - "#Calculation\n", - "lamda = 984/f\n", - "len =0.1*lamda\n", - "\n", - "#Result\n", - "print\"feet long conductors would be considered as the transmission line \",round(len*10**6,3),\"ft\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "feet long conductors would be considered as the transmission line 0.219 ft\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.2 Page no 484" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "lamda = 2.19\n", - "\n", - "#Calculation\n", - "len = (3/8.0)*lamda\n", - "\n", - "#Result\n", - "print\"The pyhsical length of the transmission line \",round(len,2),\"feet\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The pyhsical length of the transmission line 0.82 feet\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.3 Page no 492" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "len = 165\n", - "attn_100ft = 5.3\n", - "pin = 100\n", - "attn_ft = 5.3/100.0\n", - "\n", - "#Calculation\n", - "total_attn = attn_ft * len\n", - "pout = pin *0.1335\n", - "\n", - "#Result\n", - "print\"The total attenuation of the cable is \",total_attn,\"dB\"\n", - "print\"Output power is \",pout,\"W\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total attenuation of the cable is 8.745 dB\n", - "Output power is 13.35 W\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.4 Page no 494" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "len =150\n", - "C =13.5\n", - "Z0 =93\n", - "f =2.5*10**6\n", - "attn_100ft =2.8\n", - "\n", - "#Calculation\n", - "L =C*Z0**2\n", - "td =(L*C)**0.5\n", - "theta = ((360)*188.3)/(1/f)\n", - "attn_ft = attn_100ft/100.0\n", - "total_attn = attn_ft*150\n", - "\n", - "print\"(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm\",Z0\n", - "print\"(b) The equivalent inductance per feet is \",L/10**3,\"nh\"\n", - "print\"(c) The time delay introduced by the cable per feet is \",td/10**3,\"ns\"\n", - "print\"(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is \",theta/10**9\n", - "print\"(e) The total attenuation is \",total_attn,\"db\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm 93\n", - "(b) The equivalent inductance per feet is 116.7615 nh\n", - "(c) The time delay introduced by the cable per feet is 1.2555 ns\n", - "(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is 169.47\n", - "(e) The total attenuation is 4.2 db\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.5 Page no 501" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "vmax= 52.0\n", - "vmin= 17.0\n", - "Z0 = 75\n", - "\n", - "#calculation\n", - "SWR = vmax/vmin\n", - "ref_coeff = (vmax-vmin)/(vmax+vmin)\n", - "Zl1 = Z0*SWR\n", - "Zl2 = Z0/SWR\n", - "\n", - "#Result\n", - "print\"(a) The standing wave ratio is \",round(SWR,2)\n", - "print\"(b) Reflection coefficient is \",round(ref_coeff,2)\n", - "print\"The value of resistive load is \",round(Zl1,2),\"ohm or\",round(Zl2,2),\"ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The standing wave ratio is 3.06\n", - "(b) Reflection coefficient is 0.51\n", - "The value of resistive load is 229.41 ohm or 24.52 ohm\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.6 Page no 503" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "SWR =3.05\n", - "ref_pwr =0.2562\n", - "pin =30\n", - "\n", - "#calculation\n", - "pout = pin -(pin*((SWR-1)/(SWR+1))**2)\n", - "\n", - "#Result\n", - "print\"The output power of the cable is \",round(pout,3),\"W\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output power of the cable is 22.314 W\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.7 Page no 508" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "C =4*10**-12\n", - "f =800*10**6\n", - "diele = 3.5\n", - "h = 0.0625\n", - "w = 0.13\n", - "t = 0.002\n", - "\n", - "#Calculation\n", - "import math\n", - "Z0 = 38.8*math.log(0.374/0.106)\n", - "Xc = 1/(6.28*f*C)\n", - "\n", - "#Result\n", - "print\"The charecteristics impedance of the transmission line is \",round(Z0,1),\"ohm\"\n", - "print\"The reactance of the capacitor is \",round(Xc,2),\"ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The charecteristics impedance of the transmission line is 48.9 ohm\n", - "The reactance of the capacitor is 49.76 ohm\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13.8 Page no 508" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "lamda = (984/800.0)\n", - "lamda_8 =lamda/8.0\n", - "\n", - "#Calculation\n", - "len = lamda_8*12*(1/3.6**0.5)\n", - "\n", - "#Result\n", - "print\"The length of the transmission line is \",round(len,3),\"inch\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The length of the transmission line is 0.972 inch\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter14.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter14.ipynb deleted file mode 100755 index 483c5c1b..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter14.ipynb +++ /dev/null @@ -1,229 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e45779b9fe24c5d57bbc44b21eced0e689b3f83e9f5f5eea042afe4effb61cee" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14 Antennas and Wave Propogation" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.1 page no 544" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f=310.0*10**6\n", - "\n", - "#Calculation\n", - "import math\n", - "len1 =(492*0.97)/f\n", - "len2 =(492/f)*0.8\n", - "len3 =(984/f)*0.73\n", - "z1 =120*log(35/2.0)\n", - "len4 =234/f\n", - "z2 = 73/2.0\n", - "\n", - "#Result\n", - "print\"(a) The length and radiation resistance of the dipole are \",round(len1*10**6,2),\"feet and 73 ohm respectively\"\n", - "print\"(b) The length of the folded dipole are \",round(len2*10**6,2),\"feet\"\n", - "print\"(c) The length and radiation resistance of the bow tie antenna are \",round(len3*10**6,1),\"feet and \",round(z1,1),\"ohm resp.\"\n", - "print\"(d) The length and radiation resistance of the groun plane antenna are \",round(len4*10**6,3),\"feet and\",z2,\"ohm resp.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The length and radiation resistance of the dipole are 1.54 feet and 73 ohm respectively\n", - "(b) The length of the folded dipole are 1.27 feet\n", - "(c) The length and radiation resistance of the bow tie antenna are 2.3 feet and 343.5 ohm resp.\n", - "(d) The length and radiation resistance of the groun plane antenna are 0.755 feet and 36.5 ohm resp.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.2 Page no 553" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "gain=14\n", - "len=250\n", - "attn_100=3.6\n", - "f =220*10\n", - "pin =50\n", - "p =0.126\n", - "\n", - "#Calculation\n", - "pout =pin*p\n", - "line_loss =pin-pout\n", - "pwr_ratio = 25.1\n", - "ERP = pwr_ratio*pout\n", - "\n", - "#Result\n", - "print\"(a) The transmission line loss is \",line_loss\n", - "print\"(b) Effective raduated power is \",round(ERP,1),\"W\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The transmission line loss is 43.7\n", - "(b) Effective raduated power is 158.1 W\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.3 Page no 556" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Z0 =50\n", - "Zl =172\n", - "f =460.0*10**6\n", - "VF =0.86\n", - "\n", - "#Calculation\n", - "len =(246/f)*VF\n", - "\n", - "#Result\n", - "print\"The length of the impedance matching section needed for the Q section is \",round(len*10**6,2),\"feet\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The length of the impedance matching section needed for the Q section is 0.46 feet\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.4 Page no 557" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f = 460.0*10**6\n", - "VF = 0.66\n", - "\n", - "#Calculation\n", - "len = (246/f)*VF\n", - "\n", - "#Result \n", - "print\"The length of impedance matching section is \",round(len*10**6,3),\"feet\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The length of impedance matching section is 0.353 feet\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14.5 Page no 567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "ht =275\n", - "hr =60\n", - "f=224.0*10**6\n", - "pt=100\n", - "Gt = 26\n", - "Gr = 3.27\n", - "\n", - "#Calculation\n", - "D =((2*ht)**0.5+(2*hr)**0.5)*1.61\n", - "lamda = 300/f\n", - "Pr = (pt*Gt*Gr*lamda**2)/(16*3.14**2*D**2)\n", - "\n", - "#Result\n", - "print\"(a) The maximmum transmitting distance is \",round(D,1),\"kilometer\"\n", - "print\"(b) The received power is \",round(Pr*10**15,1),\"nW\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The maximmum transmitting distance is 55.4 kilometer\n", - "(b) The received power is 31.5 nW\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter16.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter16.ipynb deleted file mode 100755 index a3463547..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter16.ipynb +++ /dev/null @@ -1,216 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:526f0478ca7a5ec4522d70a6832114c547e4784f425e0391463d5037753dde9d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 16 Microwave communication" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.1 Page no 616" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Zsrc =50\n", - "Zld =136\n", - "f =5800.0*10**6\n", - "Er =2.4\n", - "\n", - "#Calculation\n", - "Zq =(Zsrc * Zld)**0.5\n", - "Vp =1/(Er)**0.5\n", - "lamda = 300/f\n", - "len = (lamda/4.0)*38.37*Vp\n", - "\n", - "#Result\n", - "print\"(a) The required impedance is \",round(Zq,2),\"ohm\"\n", - "print\"(b) The length of the microstrip \",round(len*10**6,2),\"inches\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The required impedance is 82.46 ohm\n", - "(b) The length of the microstrip 0.32 inches\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.2 Page no 623" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "w=0.65\n", - "h=0.38\n", - "\n", - "#Calculation\n", - "fco = 300/(2.0*((0.65*2.54)/100.0))\n", - "f =1.42*fco\n", - "\n", - "#Result\n", - "print\"(a) The cutoff frequency of the \",round(fco/10**3,3),\"GHz\"\n", - "print\"(b) Operating frequency of the wavwguide is \",round(f/10**3,1),\"GHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The cutoff frequency of the 9.085 GHz\n", - "(b) Operating frequency of the wavwguide is 12.9 GHz\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.3 Page no 623" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#for the above question\n", - "print\"The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.4 Page no 648" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "lamda1 =5.0\n", - "f2 = 15.0*10**9\n", - "D=1.524\n", - "\n", - "#Calculation\n", - "f1=984/lamda1\n", - "lamda2 =300/f2\n", - "G = (6*(D/lamda2)**2)\n", - "B = 70/(D/lamda2)\n", - "\n", - "#Result\n", - "print\"(a) The lowest possible oprerating frequency is \",f1,\"MHz\"\n", - "print\"(b) The gain at 15 Ghz is \",G/10**12\n", - "print\"(c) The beam width at 15Ghz is \",round(B*10**6,2),\"degree\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The lowest possible oprerating frequency is 196.8 MHz\n", - "(b) The gain at 15 Ghz is 34838.64\n", - "(c) The beam width at 15Ghz is 0.92 degree\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 16.5 Page no 661" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "T = 9.2\n", - "theta = 20\n", - "sin20 = 0.342\n", - "a=5280\n", - "\n", - "#Calculation\n", - "D_nautical = T/12.36\n", - "D_statute =D_nautical*0.87\n", - "A = D_statute*0.342\n", - "A1=A*a\n", - "\n", - "#Result\n", - "print\"(a) The line of distance to the aircraft in the statute miles \",round(D_statute,3)\n", - "print\"(b) The altitude of the aircraft is \",round(A,2),\"mi\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The line of distance to the aircraft in the statute miles 0.648\n", - "(b) The altitude of the aircraft is 0.22 mi\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter17.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter17.ipynb deleted file mode 100755 index c9e3dcac..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter17.ipynb +++ /dev/null @@ -1,142 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:36f7565fa260d3a1374317f250783789b0d4ba7834e883c19725c0b3c84c1d9a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapeter 17 Satellite communication" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.1 Page no 678" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "stn_long = 95\n", - "stn_lat = 30\n", - "sat_long =121\n", - "rad_pos = 137\n", - "\n", - "\n", - "#Calculation\n", - "azimuth = 360-rad_pos\n", - "\n", - "#Result\n", - "print\"The elevation setting for the antenna is 45 degree\"\n", - "print\"The azimuth setting for the antenna is \",azimuth,\"degree\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The elevation setting for the antenna is 45 degree\n", - "The azimuth setting for the antenna is 223 degree\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.2 Page no 681" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "flo = 2*10**9\n", - "fd =3840*10**6\n", - "B =36*10**6\n", - "\n", - "#Calculation\n", - "fu =fd+flo\n", - "C =2*B\n", - "\n", - "#Result\n", - "print\"The uplink frequency is \",fu/10.0**9,\"GHz\"\n", - "print\"The data rate is \", C/10**6,\"Mbps\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The uplink frequency is 5.84 GHz\n", - "The data rate is 72 Mbps\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 17.3 Page no 691" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "fs = 4.08*10**9\n", - "fIF1 = 770*10**6\n", - "fIF2 = 140*10**6\n", - "\n", - "#Calculation\n", - "flo1 = fs - fIF1\n", - "flo2 = fIF1 - fIF2\n", - "\n", - "#Result\n", - "print\"The local oscillator frequency for first IF is \",flo1/10**6,\"MHz\"\n", - "print\"The local oscillator frequency for the second IF is \",flo2/10**6,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The local oscillator frequency for first IF is 3310.0 MHz\n", - "The local oscillator frequency for the second IF is 630 MHz\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter19.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter19.ipynb deleted file mode 100755 index 1ce8f35e..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter19.ipynb +++ /dev/null @@ -1,128 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:bbbebe541ba21d9bbb4d54500aef67ec9a094ac72f21cf0a19a14aa93b9c61ce" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 19 Optical communication" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 19.1 Page no 760" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "NA = 0.29\n", - "\n", - "#Calculation\n", - "import math\n", - "critical_angle = math.asin(0.29)*180/3.14\n", - "\n", - "print\"The critical angle is \",round(critical_angle,2),\"degree\"\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The critical angle is 16.87 degree\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 19.2 Page no 767" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "B_rating_Mhzkm =600*10**6\n", - "len_ft=500\n", - "\n", - "#Calculation\n", - "bandwidth = B_rating_Mhzkm/(len_ft/3274.0)\n", - "\n", - "#Result\n", - "print\"The bandwidth of the 500 feetr segment of the cable is \",bandwidth/10**6,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The bandwidth of the 500 feetr segment of the ccable is 3928.8 MHz\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 19.3 Page no 780" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "R=43*10**6\n", - "D=1200/3274.0\n", - "\n", - "#Calculation\n", - "d=1/(5.0*R*D)\n", - "\n", - "#Result\n", - "print\"The dispersion factor is \",round(d*10**9,1),\"ns/km\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The dispersion factor is 12.7 ns/km\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter22.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter22.ipynb deleted file mode 100755 index 2fc3916b..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter22.ipynb +++ /dev/null @@ -1,94 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d66b7b0a5ebd4fcdf9eb24f98ae81ac03aa2dcdb229f576b47a170647bd9ea49" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 22 Communication tests and measurments" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 22.1 Page no 854" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Vp=8 #volts\n", - "R=75 #Ohm\n", - "\n", - "#Calculation\n", - "Vmax=0.707*Vp\n", - "P=Vmax**2/R\n", - "\n", - "#Result\n", - "print\"Power is dissipated in the load is \",round(P,4),\"Watt\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power is dissipated in the load is 0.4265 Watt\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 22.2 Page no 857" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Pf=380.0 #Watt\n", - "Pr=40 #Watt\n", - "\n", - "#Calculation\n", - "import math\n", - "m=math.sqrt(Pr/Pf)\n", - "SWR=(1+m)/(1-m)\n", - "print\"SWR= \",round(SWR,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "SWR= 1.96\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter3.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter3.ipynb deleted file mode 100755 index ef029e65..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter3.ipynb +++ /dev/null @@ -1,331 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8e1b5c14d4876dc6b60f9f51fe0f04e94941e7f01c84340bf3441e1daf170b7a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3 Amplitude modulation fundamentals" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1 page no 99" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Vmax = 5.9\n", - "Vmin = 1.2\n", - "\n", - "#Calculation\n", - "m = (Vmax-Vmin)/(Vmax+Vmin)\n", - "Vc = (Vmax+Vmin)/2.0\n", - "Vm = (Vmax-Vmin)/2.0\n", - "m = Vm/Vc\n", - "\n", - "#Result\n", - "print\"(a) The modulation index is \",round(m,2)\n", - "print\"Vc= \",Vc,\"Vm= \",Vm,\"(for 2 volt/div on verticle scale)\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The modulation index is 0.66\n", - "Vc= 3.55 Vm= 2.35 (for 2 volt/div on verticle scale)\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2 page no 102" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "frq =980*10**3\n", - "frq_range = 5*10**3\n", - "\n", - "#Calculation\n", - "fusb = frq+frq_range\n", - "flsb = frq-frq_range\n", - "bw=fusb-flsb\n", - "\n", - "#Result\n", - "print\"The upper sideband is at \",fusb/10**3,\"Khz\"\n", - "print\"Lower sideband is at \",flsb/10**3,\"Khz\"\n", - "print\"the babdwidth is \",bw/10**3,\"KHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The upper sideband is at 985 Khz\n", - "Lower sideband is at 975 Khz\n", - "the babdwidth is 10 KHz\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3 page no 106" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Pc = 30\n", - "m=0.85\n", - "\n", - "#Calculation\n", - "Pt = Pc*(1+ (m**2/2.0))\n", - "Psb_both =Pt-Pc\n", - "Psb_one = Psb_both/2.0\n", - "\n", - "#Result\n", - "print\"The total power is \",round(Pt,1),\"watt\" \n", - "print\"The power in one sideband is \",round(Psb_one,1),\"Watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total power is 40.8 watt\n", - "The power in one sideband is 5.4 Watt\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4 page no 108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "R = 40\n", - "I = 4.8\n", - "m=0.9\n", - "\n", - "#Calculation\n", - "Pc = I**2*R\n", - "Pt = (I*(1+(m**2/2.0))**0.5)**2*R\n", - "Psb = Pt-Pc\n", - "\n", - "#Result\n", - "print\"(a) The carrier power is \",Pc,\" watt\"\n", - "print\"(b) Total power = \",round(Pt,0),\"watt\"\n", - "print\"(c) Sideband Power = \",round(Psb,1),\"watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The carrier power is 921.6 watt\n", - "(b) Total power = 1295.0 watt\n", - "(c) Sideband Power = 373.2 watt\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5 page no 108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "It = 5.1\n", - "Ic =4.8\n", - "\n", - "#Calculation\n", - "m=(2*((It/Ic)**2-1))**0.5\n", - "\n", - "#Result\n", - "print\"The percentage of modulation is \",round(m*100,0)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The percentage of modulation is 51.0\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6 page no 109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "m = 0.9\n", - "Pc = 921.6\n", - "\n", - "#calculation\n", - "Psb = (m**2*Pc)/4.0\n", - "\n", - "#Result\n", - "print\"The power in one sideband \",round(Psb,1),\"Watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The power in one sideband 186.6 Watt\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7 page no 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Vpp = 178\n", - "R = 75.0\n", - "\n", - "#Calculation\n", - "Vp =Vpp/2.0\n", - "Vrms = 0.707*Vp\n", - "PEP =(Vrms**2/R)\n", - "\n", - "#Result\n", - "print\"The peak envelop power is \", round(PEP,1),\"Watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The peak envelop power is 52.8 Watt\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8 page no 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Vs =24\n", - "Im =9.3\n", - "\n", - "#Calculation\n", - "PEP = Vs*Im \n", - "Pavg1 = PEP/3.0\n", - "Pavg2 = PEP/4.0\n", - "\n", - "#Result\n", - "print\"(a) The peak envelope power is \",PEP,\"watt\"\n", - "print\"(b) Average power of transmitter is \",Pavg2,\"watt to\",Pavg1,\"watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The peak envelope power is 223.2 watt\n", - "(b) Average power of transmitter is 55.8 watt to 74.4 watt\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter4.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter4.ipynb deleted file mode 100755 index 522fe2b5..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter4.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:268207babca50d59c46d454ea7ce41b37f6eaad8a022bc43c98526f17a497ebd" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter 4 Amplitude Modulator and Demodulator circuits" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1 Page no 129" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "\n", - "Vcc =48\n", - "I = 3.5\n", - "efficiency =70 #percent\n", - "modulation = 67 #percent\n", - "m = modulation/100.0\n", - "#calculation\n", - "\n", - "Pi = Vcc*I\n", - "Pc=Pi\n", - "Pm = Pi/2.0\n", - "Pout = (efficiency*Pi)/100.0\n", - "Ps = Pc*((m**2)/4.0)\n", - "maximum_swing = 2*Vcc \n", - "#Result\n", - "\n", - "print \"(a) RF input power to the output stage is \",Pi,\"W\"\n", - "print \"(b) AF power required for 100 percent modulation is \",Pm,\"W\"\n", - "print \"(c) Carrier output power is \",Pout,\"W\"\n", - "print \"(d) Power in one sideband for 67 percent modulation is \",round(Ps,2),\"W\"\n", - "print \"(e) maximum and minimum dc supply voltage swing with 100 percent modulation is \",maximum_swing,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) RF input power to the output stage is 168.0 W\n", - "(b) AF power required for 100 percent modulation is 84.0 W\n", - "(c) Carrier output power is 117.6 W\n", - "(d) Power in one sideband for 67 percent modulation is 18.85 W\n", - "(e) maximum and minimum dc supply voltage swing with 100 percent modulation is 96 V\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2 Page no 145" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "\n", - "fc =4.2*10**6\n", - "f1 = 300\n", - "f2 = 3400\n", - "#calculation\n", - "#upper sideband\n", - "\n", - "x0=fc+f1\n", - "y0=fc+f2\n", - "#lower sideband\n", - "\n", - "x1=fc-f1\n", - "y1=fc-f2\n", - "frequency=(x1+y1)/2.0\n", - "#Result \n", - "\n", - "print \"(a) Upper sideband ranges from \",x0,\"to\",y0\n", - "print \" lower sideband ranges from \",x1,\"to\",y1\n", - "print \"(b) approximate center frequency of a bandpass filter is \",frequency,\"Hz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) Upper sideband ranges from 4200300.0 to 4203400.0\n", - " lower sideband ranges from 4199700.0 to 4196600.0\n", - "(b) approximate center frequency of a bandpass filter is 4198150.0 Hz\n" - ] - } - ], - "prompt_number": 29 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter5.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter5.ipynb deleted file mode 100755 index 3539866c..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter5.ipynb +++ /dev/null @@ -1,253 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:91b0cb714976b5e3abb5fa418cb1d12fb7cd307f6d4fd008a74f2dcf67b41e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5 Fundamentals of frequency modulation" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.1 Page no 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f = 915*10**6\n", - "fm_deviation =12.5*10**3\n", - "\n", - "#Calculation\n", - "max_deviation = f + fm_deviation\n", - "min_deviation = f - fm_deviation\n", - "\n", - "#Result\n", - "print\"Maximum frequency occur during modulation is \",max_deviation/1000.0,\"KHz\"\n", - "print\"Minimum frequency occur during modulation is \",min_deviation/1000.0,\"KHz\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum frequency occur during modulation is 915012.5 KHz\n", - "Minimum frequency occur during modulation is 914987.5 KHz\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.2 Page no 160" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "max_deviation = 25*10**3\n", - "fm =15.0*10**3\n", - "\n", - "#Calculation\n", - "mf =max_deviation/fm\n", - "\n", - "#Result\n", - "print\"The deviation ratio of the TV sound is \",round(mf,3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The deviation ratio of the TV sound is 1.667\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.3 Page no 162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "mf = 2.2\n", - "fd = 7.48*10**3\n", - "\n", - "#Calculation\n", - "fm = fd/mf\n", - "\n", - "#Result\n", - "print\"The maximum modulating frequency is \",fm/1000.0,\"KHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum modulating frequency is 3.4 KHz\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.4 Page no 164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "J0 = -0.4\n", - "J1 = -0.07\n", - "J2 = 0.36\n", - "J3 = 0.43\n", - "J4 = 0.28\n", - "\n", - "#Result\n", - "print\"The amplitude of the carrier is \",J0\n", - "print\"Amplitudes of the first four sidebands are \",\" \\n \", J1,\"\\n \",J2,\"\\n \",J3,\"\\n \",J4\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The amplitude of the carrier is -0.4\n", - "Amplitudes of the first four sidebands are \n", - " -0.07 \n", - " 0.36 \n", - " 0.43 \n", - " 0.28\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.5 Page no 165" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "fd = 30*10**3\n", - "fm = 5*10**3\n", - "N=9\n", - "\n", - "#Calculation\n", - "bw1 = 2*fm*N\n", - "bw2 = 2*(fd+fm)\n", - "\n", - "#Result\n", - "print\"The maximum bandwidth of the fm signal is \",bw1/10**3,\"KHz\"\n", - "print\"Bandwidth using carson's rule \",bw2/10**3,\"KHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum bandwidth of the fm signal is 90 KHz\n", - "Bandwidth using carson's rule 70 KHz\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.6 Page no 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "S_N = 2.8\n", - "fm = 1.5*10**3\n", - "fd =4*10**3\n", - "\n", - "#Calculation\n", - "import math\n", - "fi= math.asin(1/S_N)\n", - "delta = fi*fm\n", - "SN =fd/delta\n", - "\n", - "#Result\n", - "print\"(a) The frequency deviation caused by the noise \",round(delta,1),\"Hz\"\n", - "print\"(b) The improved output signal to noise ratio is \",round(SN,1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The frequency deviation caused by the noise 547.8 Hz\n", - "(b) The improved output signal to noise ratio is 7.3\n" - ] - } - ], - "prompt_number": 21 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter6.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter6.ipynb deleted file mode 100755 index 8bd8c6da..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter6.ipynb +++ /dev/null @@ -1,148 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:aac83d9b958acba775304d5e53683242c3be955e852f2ce5dbe2f25d81f3bf36" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6 FM Circuits" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.1 Page no 178" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Vc =40*10**-12\n", - "c = 20*10**-12\n", - "f0 = 5.5*10**6\n", - "Ct = Vc+c\n", - "\n", - "#Calculation\n", - "L = 1/((6.28*f0)**2*Ct)\n", - "\n", - "#Result\n", - "print\"The value of the inductance is \",round(L*10**6,0),\"microhenry\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of the inductance is 14.0 microhenry\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.2 Page no 186" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f=168.96*10**6\n", - "multiplier=24.0\n", - "deviation = 5*10**3\n", - "fm = 2.8*10**3\n", - "\n", - "#Calculation\n", - "f0 =f/multiplier\n", - "fd= deviation/multiplier\n", - "phaseshift = fd/fm\n", - "phaseshift_degrees = phaseshift*57.3\n", - "total_phaseshift =2*phaseshift_degrees\n", - "\n", - "#Result\n", - "print\"(a) The crystal oscillator frequency is \",f0/10**6,\"MHz\"\n", - "print\"(b) The total phase shift is \",round(total_phaseshift,3),\"degree\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The crystal oscillator frequency is 7.04 MHz\n", - "(b) The total phase shift is 8.527 degree\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.3 Page no 187" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "R =1*10**3\n", - "phaseshift =4.263\n", - "phaseshift_center= 45\n", - "f =7.04*10**6\n", - "\n", - "#Calculation\n", - "phase_l = phaseshift_center - phaseshift\n", - "phase_u = phaseshift_center + phaseshift\n", - "phaserange_total = phase_u - phase_l\n", - "Xc1 = 1161\n", - "C1 = 1/(6.28*f*Xc1)\n", - "Xc2 = 861\n", - "C2 = 1/(6.28*f*Xc2)\n", - "\n", - "#Result\n", - "print\"The two values of the capacitance to achieve total deviation are \",round(C1*10**12,1),\"pf to\",round(C2*10**12,1),\"pf\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The two values of the capacitance to achieve total deviation are 19.5 pf to 26.3 pf\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter7.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter7.ipynb deleted file mode 100755 index c4587482..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter7.ipynb +++ /dev/null @@ -1,221 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:13e4ad42742896befb0b329fd930804197555dd5705f1dd526b017e9117b7b00" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7 Digital communication techniques" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.1 Page no 210" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "t = 71.4*10**-6\n", - "\n", - "#calculation\n", - "f = 1/t\n", - "fourth_harmonic = f*4\n", - "min_sampling = 2*fourth_harmonic\n", - "\n", - "#Result\n", - "print\"(a) The frequency of the signal is \",round(f/10**3,1),\"KHz\"\n", - "print\"(b) The fourth harmonic is \",round(fourth_harmonic/10**3,0),\"KHz\"\n", - "print\"(c) Minimum sampling rate is \",round(min_sampling/10**3,0),\"KHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The frequency of the signal is 14.0 KHz\n", - "(b) The fourth harmonic is 56.0 KHz\n", - "(c) Minimum sampling rate is 112.0 KHz\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.2 Page no 222" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "N = 14\n", - "discrete_levels = 2.0**N\n", - "\n", - "#Calculation\n", - "num_vltg_inc =2**N-1\n", - "resolution = 12/discrete_levels \n", - "\n", - "#Result\n", - "print\"(a) The numbedr of discrete levels that are represented using N number of bits are \",discrete_levels\n", - "print\"(b) the number odf voltage increments required to divide the voltage range are \",num_vltg_inc\n", - "print\"(c) Resolution of the digitization \",round(resolution*10**6,2),\"microvolt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The numbedr of discrete levels that are represented using N number of bits are 16384.0\n", - "(b) the number odf voltage increments required to divide the voltage range are 16383\n", - "(c) Resolution of the digitization 732.42 microvolt\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.3 Page no 225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "N =12\n", - "SINAD1=78\n", - "\n", - "#Calculation\n", - "SINAD2 = 6.02*N + 1.76\n", - "ENOB =(SINAD1 -1.76)/6.02\n", - "\n", - "#Result\n", - "print\"(a) The SINAD for 12 bit convertre is \",SINAD2,\"db\"\n", - "print\"(b) The ENOB for the converter with SINAD of 78 dB is \",round(ENOB,2),\"bits\" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The SINAD for 12 bit convertre is 74.0 db\n", - "(b) The ENOB for the converter with SINAD of 78 dB is 12.66 bits\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.4 Page no 233" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Gievn\n", - "Vm = 1.0\n", - "Vin = 0.25\n", - "mu =255\n", - "\n", - "#Calculation\n", - "import math\n", - "Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)\n", - "gain =Vout/Vin\n", - "\n", - "#Result\n", - "print\"The output voltage of the compander \",round(Vout,2),\"volt\"\n", - "print\"Gain of the compander is \",round(gain,0)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output voltage of the compander 0.75 volt\n", - "Gain of the compander is 3.0\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5 Page no 234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Vin = 0.8\n", - "Vm =1.0\n", - "mu =255\n", - "\n", - "#Calculation\n", - "import math\n", - "Vout = (Vm*math.log(1+mu*(Vin/Vm)))/math.log(1+mu)\n", - "gain =Vout/Vin\n", - "\n", - "#Result\n", - "print\"The output voltage of the compander \",round(Vout,1),\"volt\"\n", - "print\"Gain of the compander is \",round(gain,1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output voltage of the compander 1.0 volt\n", - "Gain of the compander is 1.2\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter8.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter8.ipynb deleted file mode 100755 index 4cad3df0..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter8.ipynb +++ /dev/null @@ -1,185 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6738b73e6fb4913114449836a25c14169c484a93e5e60fcba9b0e4a9815c8f56" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8 Radio transmitters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.1 Page no 249" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f = 16*10**6\n", - "ppm = 200\n", - "frequency_variation = 200 *16 \n", - "\n", - "#Calculation\n", - "min_f = f - frequency_variation\n", - "max_f = f + frequency_variation\n", - "\n", - "#Reslt\n", - "print\"The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are \",min_f,\"Hz and\",max_f,\"Hz respectively\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are 15996800 Hz and 16003200 Hz respectively\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.2 Page no 250" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f =14.9*10**6\n", - "mul_factor = 2*3*3\n", - "stability_ppm =300\n", - "variation = 0.0003\n", - "\n", - "#Calculation\n", - "total_variation = variation* mul_factor\n", - "fout = f * mul_factor\n", - "frequency_variation = fout*total_variation\n", - "f_lower = fout - frequency_variation\n", - "f_upper = fout + frequency_variation\n", - "\n", - "#Result\n", - "print\"(a) The output frequency of the transmitter is \",fout/10**6,\"MHz\"\n", - "print\"(b) The maximum and minimum frequencies of the transmitter are \",round(f_lower/10**6,2),\"Mhz and \",round(f_upper/10**6,2),\"Mhz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The output frequency of the transmitter is 268.2 MHz\n", - "(b) The maximum and minimum frequencies of the transmitter are 266.75 Mhz and 269.65 Mhz\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.3 Page no 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "f = 10*10**6\n", - "div_factor = 100.0\n", - "A =63\n", - "N = 285\n", - "M=32\n", - "\n", - "#Calculation\n", - "ref = f/div_factor\n", - "R =M*N+A\n", - "fout= R*ref\n", - "\n", - "#Result\n", - "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output frequency of the synthesizer is 918.3 MHz\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.4 Page no 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "f = 10*10**6\n", - "div_factor = 100.0\n", - "A =64\n", - "N = 285\n", - "M=32\n", - "\n", - "#Calculation\n", - "ref = f/div_factor\n", - "R =M*N+A\n", - "fout= R*ref\n", - "\n", - "#Result\n", - "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n", - "print\"The step change is \",fout/10**6-918.3,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output frequency of the synthesizer is 918.4 MHz\n", - "The step change is 0.1 MHz\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter9.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter9.ipynb deleted file mode 100755 index 379e8939..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter9.ipynb +++ /dev/null @@ -1,274 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3ff4b00636e0eec0da6869f81549546163050c8b991ea646d8083caae0f8dd37" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9 Communication receivers" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.1 Page no 318" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "fl =220*10**6\n", - "fm =224*10**6\n", - "IF1 = 10.7*10**6\n", - "IF = 1.5*10**6\n", - "\n", - "#Calculation\n", - "IF2 =IF1+IF\n", - "tune_l =fl+IF1\n", - "tune_m = fm+IF1\n", - "IF1_imgl = tune_l+IF1\n", - "IF2_imgm = tune_m+IF1\n", - "\n", - "#Result\n", - "print\"(a) The local oscillatior tuning range is \",tune_l/10**6,\"to \",tune_m/10**6,\"MHz\"\n", - "print\"(b) Frequency of the second local oscillator is \",IF2/10**6,\"MHz\"\n", - "print\"(c) First IF image range is \",IF1_imgl/10**6,\"MHz to \",IF2_imgm/10**6,\"MHz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The local oscillatior tuning range is 230.7 to 234.7 MHz\n", - "(b) Frequency of the second local oscillator is 12.2 MHz\n", - "(c) First IF image range is 241.4 MHz to 245.4 MHz\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.2 Page no 324" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "R = 100*10**3\n", - "T = 273+25\n", - "B = 20*10**3\n", - "k = 1.38*10**-23\n", - "\n", - "#Calculation\n", - "Vn=(4*k*T*B*R)**0.5\n", - "\n", - "#Result\n", - "print\"The noise voltage across 100k resistor is \",round(Vn*10**6,2),\"microvolt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The noise voltage across 100k resistor is 5.74 microvolt\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.3 Page no 324" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "R=75\n", - "B=6*10**6 \n", - "T = 29+273\n", - "k =1.38*10**-23\n", - "\n", - "#calculation\n", - "Vn = (4*k*T*B*R)**0.5\n", - "\n", - "#Result\n", - "print\"The input themal noise is \",round(Vn*10**6,2),\"microvolt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The input themal noise is 2.74 microvolt\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.4 Page no 326" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "Tc=32.2\n", - "Tk=273+Tc\n", - "B =30*10**3\n", - "k =1.38*10**-23\n", - "\n", - "#Calculation\n", - "Pn=k*Tk*B\n", - "\n", - "#Result\n", - "print\"The average noise power is \",round(Pn*10**16,2),\"10**-16 W\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The average noise power is 1.26 10**-16 W\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.5 Page no 329" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "SN_ip = 8\n", - "SN_op = 6.0\n", - "\n", - "#Calculation\n", - "NR = SN_ip/SN_op\n", - "NF = 10*log10(NR)\n", - "\n", - "#Result\n", - "print\"The noise factor is \",round(NR,2)\n", - "print\"The noise figure is \",round(NF,2),\"dB\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The noise factor is 1.33\n", - "The noise figure is 1.25 dB\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.6 Page no 330" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Given\n", - "R= 75.0\n", - "T=31+273\n", - "k=1.38*10**-23\n", - "B=6*10**6\n", - "Vs = 8.3*10**-6\n", - "NF=2.8\n", - "\n", - "#Calculation\n", - "import math\n", - "Vn = math.sqrt(4*k*T*B*R)\n", - "Pn = Vn**2/R\n", - "Ps = Vs**2/R\n", - "SN = (Ps*10**12)/(Pn/10.0**12)\n", - "SN_dB =10*log10(SN)\n", - "NR = 10**0.28\n", - "SN_op = SN/NR\n", - "Tn = 290*(NR-1)\n", - "\n", - "#Result\n", - "print\"(a) The input noise power is \",round(Pn*10**12,1),\"pW\"\n", - "print\"(b) The input signal power is \",round(Ps*10**12,3),\"pW\"\n", - "print\"(c) Signal to noise ratio in decibels \",round(SN/10**24,2)\n", - "print\"(d) The noise factor is \",round(NR,2)\n", - "print\"(e) Signal to noise ratio of the amplifier is \",round(SN_op/10**24,2)\n", - "print\"(f) The noise temperature of the amplifier \",round(Tn,0),\"K\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The input noise power is 0.1 pW\n", - "(b) The input signal power is 0.919 pW\n", - "(c) Signal to noise ratio in decibels 9.12\n", - "(d) The noise factor is 1.91\n", - "(e) Signal to noise ratio of the amplifier is 4.79\n", - "(f) The noise temperature of the amplifier 263.0 K\n" - ] - } - ], - "prompt_number": 23 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter_2.ipynb b/Principles_Of_Electronic_Communication_Systems/chapter_2.ipynb deleted file mode 100755 index 3847150a..00000000 --- a/Principles_Of_Electronic_Communication_Systems/chapter_2.ipynb +++ /dev/null @@ -1,1143 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:759039f1dfc5f6d62e90bf867630bc8f1cdda845968a4b5c11c4acddcb77b251" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 The fundamentals of Electronics: A Review" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 Page no 31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "vout=750*10**-3\n", - "vin = 30*10**-6\n", - "\n", - "#calculation\n", - "gain=vout/vin\n", - "\n", - "#Result\n", - "print\"The Voltage gain of the amplifier is \",gain\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Voltage gain of the amplifier is 25000.0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 Page no 31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "pout=6\n", - "power_gain=80.0\n", - "\n", - "#calculation\n", - "pin=pout/power_gain\n", - "\n", - "#Result\n", - "print\"The input power of the signal is \",pin*1000,\"mW\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The input power of the sigmal is 75.0 mW\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 Page no 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "A1=5;\n", - "A2=2;\n", - "A3=17;\n", - "total_gain=A1*A2*A3;\n", - "pin= 40*10**-3;\n", - "\n", - "#calculation\n", - "pout=total_gain*pin;\n", - "\n", - "#Result\n", - "print\"The output power is\",pout,\"watts\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output power is 6.8 watts\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4 Page no 32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "pin=25.0*10**-6;\n", - "pout=1.5*10**-3;\n", - "A1=3.0;\n", - "\n", - "#Calculation\n", - "total_gain=pout/pin;\n", - "print\"Total gain is\",total_gain\n", - "A2=total_gain/A1\n", - "\n", - "#Result\n", - "print\"The gain of second stage is \",A2\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total gain is 60.0\n", - "The gain of second stage is 20.0\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5 Page no 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "R1=10.0*10**3;\n", - "R2=470.0;\n", - "\n", - "#Calculation\n", - "attenuation=R2/(R2+R1)\n", - "A2=1/attenuation\n", - "\n", - "#Result\n", - "print\"(a) The attenuation (A1) is\",round(attenuation,3)\n", - "print\"(b) The attenuation (A2) is\",round(A2,1)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The attenuation (A1) is 0.045\n", - "(b) The attenuation (A2) is 22.3\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 Page no 35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "Vin=20.0*10**-6;\n", - "Vout=100*10**-3;\n", - "A1=45000.0 #A1 isAmplifier gain\n", - "\n", - "#calculation\n", - "AT=Vout/Vin #AT is Total gain\n", - "A2=AT/A1 #A2 is attenuation factor\n", - "\n", - "#Result\n", - "print\"Total gain is\",AT\n", - "print\"The atenuation factor needed to to keep the output voltage from exceeding 100 mv is \",round(A2,4)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total gain is 5000.0\n", - "The atenuation factor needed to to keep the output voltage from exceeding 100 mv is 0.1111\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7 Page no 36" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "Vin=3.0*10**-3\n", - "Vout=5\n", - "Pin=50.0*10**-3 \n", - "Pout=2*10**-3 \n", - "\n", - "#calculation\n", - "import math\n", - "gain_dB= 20*log10 (Vout/Vin)\n", - "gain_db=10*log10 (Pout/Pin)\n", - "\n", - "#Result\n", - "print\"(a) The gain of amplifier in dB is \",round(gain_dB,1)\n", - "print\"(b) The gain in dB is \",round(gain_db,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The gain of amplifier in dB is 64.4\n", - "(b) The gain in dB is -13.98\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8 Page no 38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "gain_dB = 40\n", - "pout_W= 100\n", - "\n", - "#calculation\n", - "pin_W = pout_W/10.0**4\n", - "\n", - "#Result\n", - "print\"The input power is \",pin_W*10**3,\"m Watt\"\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The input power is 10.0 m Watt\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9 Page no 38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "\n", - "gain_db = 60\n", - "vin = 50*10**-6\n", - "\n", - "#calculation\n", - "vout = 10**(60/20.0)*vin\n", - "\n", - "#Result\n", - "print\"The output voltage is \",vout,\"volt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output voltage is 0.05 volt\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.10 Page no 39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "\n", - "vin=90*10**-3\n", - "R1= 10.0*10**3\n", - "vout=7.8\n", - "Rout=8.0\n", - "\n", - "#calculation\n", - "pin= vin**2/R1\n", - "pout=vout**2/Rout\n", - "\n", - "import math\n", - "Ap_db = 10*log10 (pout/pin)\n", - "\n", - "#Result\n", - "print\"The power gain in decibel is \",round(Ap_db,1),\"dB\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The power gain in decibel is 69.7 dB\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.11 Page no 40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "\n", - "gain_db = 28\n", - "pin = 36*10**-3\n", - "\n", - "#calculation\n", - "pout = 10**2.8*pin;\n", - "\n", - "#Result\n", - "print\"The output power is \",round(pout,2),\"watt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output power is 22.71 watt\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.12 Page no 40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "gain1 = 6.8 \n", - "gain2 = 14.3\n", - "attenuation1 = -16.4\n", - "attenuation2 = -2.9\n", - "vout = 800*10**-3\n", - "\n", - "#calculation\n", - "At = gain1+gain2+attenuation1+attenuation2\n", - "vin = vout/10.0**(At/20.0)\n", - "\n", - "#Result\n", - "print\"The input voltage is \",round(vin*10**3,1),\"mv\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The input voltage is 650.3 mv\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.13 Page no 40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "pout_db =12.3\n", - "\n", - "#calculation\n", - "pout_mW = 0.001*10**(12.3/10.0)\n", - "\n", - "#Result\n", - "print\"The output power is \" ,round(pout_mW*10**3,0),\"mv\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The output power is 17.0 mv\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.14 Page no 46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "c = 2.7*10**-12\n", - "l = 33*10**-9\n", - "\n", - "#calculation\n", - "fr= 1/(6.28*(l*c)**0.5)\n", - "\n", - "#Result\n", - "print\"The resonat frequency is \" ,round(fr/10.0**6,0),\"Mhz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resonat frequency is 533.0 Mhz\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.15 Page no 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "c =12*10**-12\n", - "fr = 49*10**6\n", - "\n", - "#calculation\n", - "l=1/(4*3.14**2*fr**2*c)\n", - "\n", - "#Result\n", - "print\"The value of inductance is \" ,round(l*10**9,0),\"nh\" \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of inductance is 880.0 nh\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.16 Page no 49" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "fr=28*10**6\n", - "Q=70.0\n", - "\n", - "#calculation\n", - "bandwidth = fr/Q\n", - "\n", - "#Result\n", - "print\"The bandwidth is \",bandwidth/10.0**3,\"Khz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The bandwidth is 400.0 Khz\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.17 Page no 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "f1= 7.93*10**6\n", - "f2= 8.07*10**6\n", - "\n", - "#calculation\n", - "bw= f2-f1\n", - "fr=(f1*f2)**0.5\n", - "Q= fr/bw\n", - "\n", - "#Result\n", - "print\"(a) The bandwidth is \",bw/10.0**3,\"Khz\"\n", - "print\"(b) The resonant frequency is \",round(fr/10.0**6,0),\"Mhz\"\n", - "print\"(c) The Q of resonant circuit is \",round(Q,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The bandwidth is 140.0 Khz\n", - "(b) The resonant frequency is 8.0 Mhz\n", - "(c) The Q of resonant circuit is 57.14\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.18 Page no 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "Q=200.0\n", - "fr=16*10**6\n", - "\n", - "#calculation\n", - "bw=fr/Q\n", - "f1= fr-(bw/2)\n", - "f2=fr+(bw/2)\n", - "\n", - "#Result\n", - "print\"Bandwidth is \",bw*10**-3,\"KHz\"\n", - "print\"f1= \",f1*10**-6,\"MHz\"\n", - "print\"f2= \",f2*10**-6,\"MHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bandwidth is 80.0 KHz\n", - "f1= 15.96 MHz\n", - "f2= 16.04 MHz\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.19 Page no 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "Q= 150\n", - "Vs=3*10**-6\n", - "\n", - "#calculation\n", - "Vc= Q*Vs\n", - "\n", - "#Result\n", - "print\"The voltage across capacitor is \",Vc*10**6,\"microvolt\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The voltage across capacitor is 450.0 microvolt\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.20 Page no 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "fr= 52*10**6\n", - "Q=12.0\n", - "L=0.15*10**-6\n", - "\n", - "#calculation\n", - "Rw=(6.28*fr*L)/Q\n", - "Req= Rw*(Q**2+1)\n", - "\n", - "#Result\n", - "print\"Impedance of the parellel LC circuit is \",round(Req,0),\"ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Impedance of the parellel LC circuit is 592.0 ohm\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.21 Page no 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "fr= 52.0*10**6\n", - "Rw= 4.1\n", - "L =0.15*10**-6\n", - "\n", - "#calculation\n", - "C=1/(4.0*3.14**2*fr**2*L)\n", - "Z = L/(C*Rw)\n", - "\n", - "#Result\n", - "print\"the impedance of the circuit is \",round(Z,0),\"ohm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "the impedance of the circuit is 585.0 ohm\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.22 Page no 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "bw = 1.0*10**6\n", - "XL = 300\n", - "Rw = 10.0\n", - "fr =10*10**6\n", - "\n", - "#calculation\n", - "Q1 = XL/Rw\n", - "Rp = Rw*(Q1**2+1) \n", - "\n", - "Q2 = fr/bw\n", - "Rpnew = Q2*XL\n", - "\n", - "Rext = (Rpnew*Rp)/(Rp-Rpnew)\n", - "\n", - "#Result\n", - "print\"The value of resistor needed to set the bandwidth of the parellel tuned circuit is \",round(Rext,1),\"ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of resistor needed to set the bandwidth of the parellel tuned circuit is 4497.5 ohm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.23 Page no 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "R = 8.2*10**3\n", - "C =0.0033*10**-6\n", - "\n", - "#calculation\n", - "fco = 1/(6.28* R*C)\n", - "\n", - "#Result\n", - "print\"The cut off frequency is \",round(fco/10.0**3,2),\"Khz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The cut off frequency is 5.88 Khz\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.24 Page no 60" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "fco =3.4*10**3\n", - "C = 0.047*10**-6\n", - "\n", - "#calculation\n", - "R = 1/(6.28* fco* C)\n", - "\n", - "#Result\n", - "print\"The value of the resistor is \",round(R,0),\"ohm\"\n", - "print\"The closest standard value is \", 1000 ,\"ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of the resistor is 996.0 ohm\n", - "The closest standard value is 1000 ohm\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.25 Page no 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "fnotch = 120\n", - "R = 220*10**3\n", - "\n", - "#calculatiuon\n", - "C = 1/(6.28*R*fnotch)\n", - "\n", - "#Result\n", - "print\"The value of capacitance required is \",round(2*C*10**6,3),\"microfarad\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of capacitance required is 0.012 microfarad\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.26 Page no 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "Vpeak =3.0\n", - "f=48*10**3\n", - "\n", - "#calculation\n", - "fifth_harmonic = 5*f\n", - "Vrms=(4/3.14)*(3/5.0)*0.707\n", - "\n", - "#Result\n", - "print\"(a) The frequency of the fifth harmonic is \",fifth_harmonic/10.0**3,\"Khz\"\n", - "print\"The RMS voltage of the fifth harmonic is \",round(Vrms,3)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The frequency of the fifth harmonic is 240.0 Khz\n", - "The RMS voltage of the fifth harmonic is 0.54\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.27 Page no 87" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "Vpeak = 5\n", - "f = 4.0*10**6\n", - "duty_cycle=0.3\n", - "\n", - "#calculation\n", - "T = 1/f\n", - "t0 = duty_cycle*T\n", - "Vavg = Vpeak*duty_cycle\n", - "min_bw =1/t0\n", - "\n", - "#Result\n", - "print\"(a) The average DC value is \",Vavg,\"volt\"\n", - "print\"(b) The minimum bandwidth required is \" ,round(min_bw/10.0**6,3),\"Mhz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(a) The average DC value is 1.5 volt\n", - "(b) The minimum bandwidth required is 13.333 Mhz\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.28 Page no 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "tr =6*10**-9\n", - "\n", - "#calculation\n", - "min_bw=(35/0.006)\n", - "\n", - "#Result\n", - "print\"The minimum bandwidth is % is \",round(min_bw/10.0**2,1),\"Mhz\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum bandwidth is % is 58.3 Mhz\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.29 Page no 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "bw= 200.0*10**3\n", - "\n", - "#calculation\n", - "tr= 0.35/(bw*10**-3)\n", - "\n", - "#Result\n", - "print\"The fastest rise time of the circuit is \" ,tr*10**3,\"microseconds\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fastest rise time of the circuit is 1.75 microseconds\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.30 Page no 90" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given\n", - "bw_mhz = 60\n", - "tri_ns= 15\n", - "\n", - "#calculation\n", - "tra_osci = 0.35/(bw_mhz)\n", - "tra_comp = 1.1*(tri_ns**2 + (tra_osci*10**3)**2)**0.5\n", - "\n", - "#Result\n", - "print\"The rise time of the displayed square wave is \",round(tra_comp,1),\"ns\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The rise time of the displayed square wave is 17.7 ns\n" - ] - } - ], - "prompt_number": 27 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/screenshots/image_1.png b/Principles_Of_Electronic_Communication_Systems/screenshots/image_1.png deleted file mode 100755 index 41f1e840..00000000 Binary files a/Principles_Of_Electronic_Communication_Systems/screenshots/image_1.png and /dev/null differ diff --git a/Principles_Of_Electronic_Communication_Systems/screenshots/image_2.png b/Principles_Of_Electronic_Communication_Systems/screenshots/image_2.png deleted file mode 100755 index 3575a38f..00000000 Binary files a/Principles_Of_Electronic_Communication_Systems/screenshots/image_2.png and /dev/null differ diff --git a/Principles_Of_Electronic_Communication_Systems/screenshots/image_3.png b/Principles_Of_Electronic_Communication_Systems/screenshots/image_3.png deleted file mode 100755 index 882458c8..00000000 Binary files a/Principles_Of_Electronic_Communication_Systems/screenshots/image_3.png and /dev/null differ diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb new file mode 100755 index 00000000..7ddfe56f --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:076f20d31c3bb1bd9e8b8227097af625d385f1bb7f3b7a30dfedf3e414bce0c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 Multiplexing and Demultiplexing" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page no 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "BW_service = 860*10**6\n", + "BW_ch = 6.0*10**6\n", + "\n", + "#calculation\n", + "total_ch = BW_service/BW_ch\n", + "\n", + "#result\n", + "print\"Total number of channels are \",round(total_ch,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total number of channels are 143.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page no 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "channels =16\n", + "sampling_rate= 3.5*10**3\n", + "w_len=6\n", + "\n", + "#Calculation\n", + "available_ch =channels-1\n", + "bpf =channels*w_len\n", + "data_rate = sampling_rate * bpf\n", + "\n", + "#Result\n", + "print\"(a) Available channels are \",available_ch\n", + "print\"(b) Bits Per Frame = \",bpf\n", + "print\"(c) The serial data rate \",data_rate/10**3,\"Khz\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Available channels are 15\n", + "(b) Bits Per Frame = 96\n", + "(c) The serial data rate 336.0 Khz\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb new file mode 100755 index 00000000..72e4d978 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb @@ -0,0 +1,143 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ac4273a5639d4b88e878e68a7a5f45b084fdf8a5c45c4bc6304c023f494f5c4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 The Transmission of binary data in communication systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page no 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t=0.0016\n", + "No_words=256.0\n", + "bits_word = 12.0\n", + "\n", + "#Calculation\n", + "tword= t/No_words\n", + "tbit = tword/bits_word\n", + "bps =1/tbit\n", + "\n", + "#Result\n", + "print\"(a) The time duration of the word \",tword*10**8,\"microsecond\"\n", + "print\"(b) The time duration of the one bit is \",round(tbit*10**8,4),\"microseconds\"\n", + "print\"(c) The speed of transmission is \",bps/10**5,\"kbps\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The time duration of the word 625.0 microsecond\n", + "(b) The time duration of the one bit is 52.0833 microseconds\n", + "(c) The speed of transmission is 19.2 kbps\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page no 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=12.5*10**3\n", + "SN_dB= 25\n", + "\n", + "#Calculation\n", + "import math\n", + "C_th = 2*B\n", + "SN=316.2\n", + "C =B*3.32*log10(SN+1)\n", + "N= 2**(C/(2.0*B))\n", + "\n", + "#Result\n", + "print\"(a) The maximum theorotical data rate is \",C_th/10**3,\"kbps\"\n", + "print\"(b) The maximum theorotical capacity of channel is \",round(C/10**3,1),\"Kbps\"\n", + "print\"(c) The number of levels needed to acheive maximum speed are \",round(N,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum theorotical data rate is 25.0 kbps\n", + "(b) The maximum theorotical capacity of channel is 103.8 Kbps\n", + "(c) The number of levels needed to acheive maximum speed are 17.78\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page no 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "block =512\n", + "packets =8\n", + "BER = 2*10**-4\n", + " \n", + "#Calculation\n", + "avg_errors = block*packets*8*BER\n", + "\n", + "print\"Average number of errors are \",avg_errors\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average number of errors are 6.5536\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb new file mode 100755 index 00000000..09288512 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:24e3c45fb7b4a00b042c526c50c49b4a5f07521c8d395e638826ab3ea2de6f29" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 Introduction to Networking and local area networks" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page no 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N = 20\n", + "\n", + "#Calculation\n", + "L = (N*(N-1))/2.0\n", + "\n", + "#Result\n", + "print\"The number of interconnecting wires required are \",L\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of interconnecting wires required are 190.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page no 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "block = 1500\n", + "ethernet = 10.0*10**6\n", + "token_ring = 16.0*10**6\n", + "\n", + "#Calculation\n", + "t1_bit = 1/ethernet\n", + "t1_byte = 8*t1_bit\n", + "t1_1526 = 1526 *t1_byte\n", + "t2_bit = 1/token_ring\n", + "t2_byte = 8 * t2_bit\n", + "t2_1521 =1521*t2_byte\n", + "\n", + "#Result\n", + "print\"(a) Time required for 1526 bytes is \",t1_1526*10**6,\"ns\"\n", + "print\"(b) Time required for 1521 bytes is \",t2_1521*10**3,\"ms\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Time required for 1526 bytes is 1220.8 ns\n", + "(b) Time required for 1521 bytes is 0.7605 ms\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb new file mode 100755 index 00000000..a0657cff --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb @@ -0,0 +1,339 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0554007e74bfe6cdd53136e8f25769048ad21412148cdd192396d4befa058e18" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 Transmission lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page no 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f= 450.0*10**6\n", + "\n", + "#Calculation\n", + "lamda = 984/f\n", + "len =0.1*lamda\n", + "\n", + "#Result\n", + "print\"feet long conductors would be considered as the transmission line \",round(len*10**6,3),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "feet long conductors would be considered as the transmission line 0.219 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page no 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 2.19\n", + "\n", + "#Calculation\n", + "len = (3/8.0)*lamda\n", + "\n", + "#Result\n", + "print\"The pyhsical length of the transmission line \",round(len,2),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pyhsical length of the transmission line 0.82 feet\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page no 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "len = 165\n", + "attn_100ft = 5.3\n", + "pin = 100\n", + "attn_ft = 5.3/100.0\n", + "\n", + "#Calculation\n", + "total_attn = attn_ft * len\n", + "pout = pin *0.1335\n", + "\n", + "#Result\n", + "print\"The total attenuation of the cable is \",total_attn,\"dB\"\n", + "print\"Output power is \",pout,\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total attenuation of the cable is 8.745 dB\n", + "Output power is 13.35 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page no 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "len =150\n", + "C =13.5\n", + "Z0 =93\n", + "f =2.5*10**6\n", + "attn_100ft =2.8\n", + "\n", + "#Calculation\n", + "L =C*Z0**2\n", + "td =(L*C)**0.5\n", + "theta = ((360)*188.3)/(1/f)\n", + "attn_ft = attn_100ft/100.0\n", + "total_attn = attn_ft*150\n", + "\n", + "print\"(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm\",Z0\n", + "print\"(b) The equivalent inductance per feet is \",L/10**3,\"nh\"\n", + "print\"(c) The time delay introduced by the cable per feet is \",td/10**3,\"ns\"\n", + "print\"(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is \",theta/10**9\n", + "print\"(e) The total attenuation is \",total_attn,\"db\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm 93\n", + "(b) The equivalent inductance per feet is 116.7615 nh\n", + "(c) The time delay introduced by the cable per feet is 1.2555 ns\n", + "(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is 169.47\n", + "(e) The total attenuation is 4.2 db\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page no 501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "vmax= 52.0\n", + "vmin= 17.0\n", + "Z0 = 75\n", + "\n", + "#calculation\n", + "SWR = vmax/vmin\n", + "ref_coeff = (vmax-vmin)/(vmax+vmin)\n", + "Zl1 = Z0*SWR\n", + "Zl2 = Z0/SWR\n", + "\n", + "#Result\n", + "print\"(a) The standing wave ratio is \",round(SWR,2)\n", + "print\"(b) Reflection coefficient is \",round(ref_coeff,2)\n", + "print\"The value of resistive load is \",round(Zl1,2),\"ohm or\",round(Zl2,2),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The standing wave ratio is 3.06\n", + "(b) Reflection coefficient is 0.51\n", + "The value of resistive load is 229.41 ohm or 24.52 ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page no 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "SWR =3.05\n", + "ref_pwr =0.2562\n", + "pin =30\n", + "\n", + "#calculation\n", + "pout = pin -(pin*((SWR-1)/(SWR+1))**2)\n", + "\n", + "#Result\n", + "print\"The output power of the cable is \",round(pout,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power of the cable is 22.314 W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page no 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C =4*10**-12\n", + "f =800*10**6\n", + "diele = 3.5\n", + "h = 0.0625\n", + "w = 0.13\n", + "t = 0.002\n", + "\n", + "#Calculation\n", + "import math\n", + "Z0 = 38.8*math.log(0.374/0.106)\n", + "Xc = 1/(6.28*f*C)\n", + "\n", + "#Result\n", + "print\"The charecteristics impedance of the transmission line is \",round(Z0,1),\"ohm\"\n", + "print\"The reactance of the capacitor is \",round(Xc,2),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The charecteristics impedance of the transmission line is 48.9 ohm\n", + "The reactance of the capacitor is 49.76 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page no 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = (984/800.0)\n", + "lamda_8 =lamda/8.0\n", + "\n", + "#Calculation\n", + "len = lamda_8*12*(1/3.6**0.5)\n", + "\n", + "#Result\n", + "print\"The length of the transmission line is \",round(len,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of the transmission line is 0.972\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb new file mode 100755 index 00000000..eb757247 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb @@ -0,0 +1,229 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8f9093920b7d1b010ea79cdf7fde78edb0be4df7ea34f4ae2c0023eb64d7b5d4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 Antennas and Wave Propogation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 page no 544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=310.0*10**6\n", + "\n", + "#Calculation\n", + "import math\n", + "len1 =(492*0.97)/f\n", + "len2 =(492/f)*0.8\n", + "len3 =(984/f)*0.73\n", + "z1 =120*log(35/2.0)\n", + "len4 =234/f\n", + "z2 = 73/2.0\n", + "\n", + "#Result\n", + "print\"(a) The length and radiation resistance of the dipole are \",round(len1*10**6,2),\"feet and 73 ohm respectively\"\n", + "print\"(b) The length of the folded dipole are \",round(len2*10**6,2),\"feet\"\n", + "print\"(c) The length and radiation resistance of the bow tie antenna are \",round(len3*10**6,1),\"feet and \",round(z1,1),\"ohm respectively\"\n", + "print\"(d) The length and radiation resistance of the groun plane antenna are \",round(len4*10**6,3),\"feet and\",z2,\"ohmrespectively\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The length and radiation resistance of the dipole are 1.54 feet and 73 ohm respectively\n", + "(b) The length of the folded dipole are 1.27 feet\n", + "(c) The length and radiation resistance of the bow tie antenna are 2.3 feet and 343.5 ohm respectively\n", + "(d) The length and radiation resistance of the groun plane antenna are 0.755 feet and 36.5 ohmrespectively\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page no 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "gain=14\n", + "len=250\n", + "attn_100=3.6\n", + "f =220*10\n", + "pin =50\n", + "p =0.126\n", + "\n", + "#Calculation\n", + "pout =pin*p\n", + "line_loss =pin-pout\n", + "pwr_ratio = 25.1\n", + "ERP = pwr_ratio*pout\n", + "\n", + "#Result\n", + "print\"(a) The transmission line loss is \",line_loss\n", + "print\"(b) Effective raduated power is \",round(ERP,1),\"W\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The transmission line loss is 43.7\n", + "(b) Effective raduated power is 158.1 W\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page no 556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z0 =50\n", + "Zl =172\n", + "f =460.0*10**6\n", + "VF =0.86\n", + "\n", + "#Calculation\n", + "len =(246/f)*VF\n", + "\n", + "#Result\n", + "print\"The length of the impedance matching section needed for the Q section is \",round(len*10**6,2),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of the impedance matching section needed for the Q section is 0.46 feet\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4 Page no 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 460.0*10**6\n", + "VF = 0.66\n", + "\n", + "#Calculation\n", + "len = (246/f)*VF\n", + "\n", + "#Result \n", + "print\"The length of impedance matching section is \",round(len*10**6,3),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of impedance matching section is 0.353 feet\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5 Page no 567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ht =275\n", + "hr =60\n", + "f=224.0*10**6\n", + "pt=100\n", + "Gt = 26\n", + "Gr = 3.27\n", + "\n", + "#Calculation\n", + "D =((2*ht)**0.5+(2*hr)**0.5)*1.61\n", + "lamda = 300/f\n", + "Pr = (pt*Gt*Gr*lamda**2)/(16*3.14**2*D**2)\n", + "\n", + "#Result\n", + "print\"(a) The maximmum transmitting distance is \",round(D,1),\"kilometer\"\n", + "print\"The received power is \",round(Pr*10**15,1),\"nW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximmum transmitting distance is 55.4 kilometer\n", + "The received power is 31.5 nW\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb new file mode 100755 index 00000000..01f25016 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:549348f6567319d4a861893116b77bd50ff6991f4ba0e1a8c927cf50abf21c3e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 Microwave communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 Page no 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Zsrc =50\n", + "Zld =136\n", + "f =5800.0*10**6\n", + "Er =2.4\n", + "\n", + "#Calculation\n", + "Zq =(Zsrc * Zld)**0.5\n", + "Vp =1/(Er)**0.5\n", + "lamda = 300/f\n", + "len = (lamda/4.0)*38.37*Vp\n", + "\n", + "#Result\n", + "print\"(a) The required impedance is \",round(Zq,2),\"ohm\"\n", + "print\"(b) The length of the microstrip \",round(len*10**6,2),\"inches\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required impedance is 82.46 ohm\n", + "(b) The length of the microstrip 0.32 inches\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page no 623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "w=0.65\n", + "h=0.38\n", + "\n", + "#Calculation\n", + "fco = 300/(2.0*((0.65*2.54)/100.0))\n", + "f =1.42*fco\n", + "\n", + "#Result\n", + "print\"(a) The cutoff frequency of the \",round(fco/10**3,3),\"GHz\"\n", + "print\"(b) Operating frequency of the wavwguide is \",round(f/10**3,1),\"GHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The cutoff frequency of the 9.085 GHz\n", + "(b) Operating frequency of the wavwguide is 12.9 GHz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 Page no 623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#for the above question\n", + "print\"The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 Page no 648" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda1 =5.0\n", + "f2 = 15.0*10**9\n", + "D=1.524\n", + "\n", + "#Calculation\n", + "f1=984/lamda1\n", + "lamda2 =300/f2\n", + "G = (6*(D/lamda2)**2)\n", + "B = 70/(D/lamda2)\n", + "\n", + "#Result\n", + "print\"(a) The lowest possible oprerating frequency is \",f1,\"MHz\"\n", + "print\"(b) The gain at 15 Ghz is \",G/10**12\n", + "print\"(c) The beam width at 15Ghz is \",round(B*10**6,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The lowest possible oprerating frequency is 196.8 MHz\n", + "(b) The gain at 15 Ghz is 34838.64\n", + "(c) The beam width at 15Ghz is 0.92 degree\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5 Page no 661" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "T = 9.2\n", + "theta = 20\n", + "sin20 = 0.342\n", + "a=5280\n", + "\n", + "#Calculation\n", + "D_nautical = T/12.36\n", + "D_statute =D_nautical*0.87\n", + "A = D_statute*0.342\n", + "A1=A*a\n", + "\n", + "#Result\n", + "print\"(a) The line of distance to the aircraft in the statute miles \",round(D_statute,3)\n", + "print\"(b) The altitude of the aircraft is \",A1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.221469902913\n", + "(a) The line of distance to the aircraft in the statute miles 0.648\n", + "(b) The altitude of the aircraft is 1169.36108738\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb new file mode 100755 index 00000000..cced69ab --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1fcf40b444ffe01cf0b970d987135c0a701705380b8393b58911739ca6b5af8f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapeter 17 Satellite communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 Page no 678" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "stn_long = 95\n", + "stn_lat = 30\n", + "sat_long =121\n", + "rad_pos = 137\n", + "\n", + "\n", + "#Calculation\n", + "azimuth = 360-rad_pos\n", + "\n", + "#Result\n", + "print\"The elevation setting for the antenna is 45 degree\"\n", + "print\"The azimuth setting for the antenna is \",azimuth,\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The elevation setting for the antenna is 45 degree\n", + "The azimuth setting for the antenna is 223 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 Page no 681" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "flo = 2*10**9\n", + "fd =3840*10**6\n", + "B =36*10**6\n", + "\n", + "#Calculation\n", + "fu =fd+flo\n", + "C =2*B\n", + "\n", + "#Result\n", + "print\"The uplink frequency is \",fu/10.0**9,\"GHz\"\n", + "print\"The data rate is \", C/10**6,\"Mbps\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uplink frequency is 5.84 GHz\n", + "The data rate is 72 Mbps\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 Page no 691" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fs = 4.08*10**9\n", + "fIF1 = 770*10**6\n", + "fIF2 = 140*10**6\n", + "\n", + "#Calculation\n", + "flo1 = fs - fIF1\n", + "flo2 = fIF1 - fIF2\n", + "\n", + "#Result\n", + "print\"The local oscillator frequency for first IF is \",flo1/10**6,\"MHz\"\n", + "print\"The local oscillator frequency for the second IF is \",flo2/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The local oscillator frequency for first IF is 3310.0 MHz\n", + "The local oscillator frequency for the second IF is 630 MHz\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb new file mode 100755 index 00000000..a9b84b67 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb @@ -0,0 +1,128 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7e3bc9cbae38bb1fde7396ff7ff501e2e792199bc6ea4d5bd63e700cc726cfd6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 Optical communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1 Page no 760" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "NA = 0.29\n", + "\n", + "#Calculation\n", + "import math\n", + "critical_angle = math.asin(0.29)*180/3.14\n", + "\n", + "print\"The critical angle is \",round(critical_angle,2),\"degree\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical angle is 16.87 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 Page no 767" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B_rating_Mhzkm =600*10**6\n", + "len_ft=500\n", + "\n", + "#Calculation\n", + "bandwidth = B_rating_Mhzkm/(len_ft/3274.0)\n", + "\n", + "#Result\n", + "print\"The bandwidth of the 500 feetr segment of the cable is \",bandwidth/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth of the 500 feetr segment of the ccable is 3928.8 MHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.3 Page no 780" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=43*10**6\n", + "D=1200/3274.0\n", + "\n", + "#Calculation\n", + "d=1/(5.0*R*D)\n", + "\n", + "#Result\n", + "print\"The dispersion factor is \",round(d*10**9,1),\"ns/km\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dispersion factor is 12.7 ns/km\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter1_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter1_1.ipynb new file mode 100755 index 00000000..48b042da --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter1_1.ipynb @@ -0,0 +1,249 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fa4937e894b2eaacf3d917ad54d3257fed9024ea716662722fd829aea08934e3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Introduction to electronic communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.a Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=300000000\n", + "f1=150000000.0\n", + "f2=430000000.0\n", + "f3=8000000.0\n", + "f4=750000.0\n", + "\n", + "#Calculation\n", + "W1 = c/f1\n", + "W2=c/f2\n", + "W3=c/f3\n", + "W4=c/f4\n", + "\n", + "#Result\n", + "print\"(a) Wavelength is \",W1,\"meter\"\n", + "print\"(b) Wavelength is \",round(W2,3),\"meter\"\n", + "print\"(c) Wavelength is \",W3,\"meter\"\n", + "print\"(d) Wavelength is \",W4,\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Wavelength is 2.0 meter\n", + "(b) Wavelength is 0.698 meter\n", + "(c) Wavelength is 37.5 meter\n", + "(d) Wavelength is 400.0 meter\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=300000000\n", + "wavelength=1.5\n", + "\n", + "#Calculation\n", + "frequency=c/wavelength\n", + "\n", + "#Result\n", + "print\"Signal frequncy is \",frequency/1000000.0,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal frequncy is 200.0 MHz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "wavelength_feet=75\n", + "wavelength_meter= 75/3.28\n", + "c=300000000\n", + "\n", + "#Calculation\n", + "frequency=c/wavelength_meter\n", + "\n", + "#Result\n", + "print\"The signal frequncy is \",frequency/1000000.0,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The signal frequncy is 13.12 MHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "wavelength_inches=8\n", + "wavelength_meter= 8/39.37\n", + "c=300\n", + "\n", + "#Calculation\n", + "frequency= c/wavelength_meter\n", + "\n", + "#Result\n", + "print\"The signal freuency is \",round(frequency,1),\"MHz\"\n", + "print\"The signnalfrequency is \",round(frequency*10**-3,2),\"GHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The signal freuency is 1476.4 MHz\n", + "The signnalfrequency is 1.48 GHz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 page no 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f1=902000000\n", + "f2=928000000\n", + "\n", + "#Calculation\n", + "bandwidth=f2-f1\n", + "\n", + "#Result\n", + "print\"Width of the band is \",bandwidth/1000000,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of the band is 26 MHz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 page no 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "bandwidth_megahertz= 6\n", + "f1_megahertz=54\n", + "\n", + "#Calculation\n", + "f2_megahertz=f1_megahertz + bandwidth_megahertz\n", + "\n", + "#Result\n", + "print\"Upper frequency limit is \",f2_megahertz,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper frequency limit is 60 MHz\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb new file mode 100755 index 00000000..ddf30c24 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb @@ -0,0 +1,331 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:85b158cea1a60588125a433baf8a8e61131cf8432c25ac46bd61066878c52a4c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Amplitude modulation fundamentals" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 page no 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vmax = 5.9\n", + "Vmin = 1.2\n", + "\n", + "#Calculation\n", + "m = (Vmax-Vmin)/(Vmax+Vmin)\n", + "Vc = (Vmax+Vmin)/2.0\n", + "Vm = (Vmax-Vmin)/2.0\n", + "m = Vm/Vc\n", + "\n", + "#Result\n", + "print\"(a) The modulation index is \",round(m,2)\n", + "print\"Vc= \",Vc,\"Vm= \",Vm,\"(for 2 volt/div on verticle scale)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation index is 0.66\n", + "Vc= 3.55 Vm= 2.35 (for 2 volt/div on verticle scale)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 page no 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "frq =980*10**3\n", + "frq_range = 5*10**3\n", + "\n", + "#Calculation\n", + "fusb = frq+frq_range\n", + "flsb = frq-frq_range\n", + "bw=fusb-flsb\n", + "\n", + "#Result\n", + "print\"The upper sideband is at \",fusb/10**3,\"Khz\"\n", + "print\"Lower sideband is at \",flsb/10**3,\"Khz\"\n", + "print\"the babdwidth is \",bw/10**3,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The upper sideband is at 985 Khz\n", + "Lower sideband is at 975 Khz\n", + "the babdwidth is 10 KHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 page no 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Pc = 30\n", + "m=0.85\n", + "\n", + "#Calculation\n", + "Pt = Pc*(1+ (m**2/2.0))\n", + "Psb_both =Pt-Pc\n", + "Psb_one = Psb_both/2.0\n", + "\n", + "#Result\n", + "print\"The total power is \",round(Pt,1),\"watt\" \n", + "print\"The power in one sideband is \",round(Psb_one,1),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total power is 40.8 watt\n", + "The power in one sideband is 5.4 Watt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 page no 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R = 40\n", + "I = 4.8\n", + "m=0.9\n", + "\n", + "#Calculation\n", + "Pc = I**2*R\n", + "Pt = (I*(1+(m**2/2.0))**0.5)**2*R\n", + "Psb = Pt-Pc\n", + "\n", + "#Result\n", + "print\"(a) The carrier power is \",Pc,\" watt\"\n", + "print\"(b) Total power = \",round(Pt,0),\"watt\"\n", + "print\"(c) Sideband Power = \",round(Psb,1),\"watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The carrier power is 921.6 watt\n", + "(b) Total power = 1295.0 watt\n", + "(c) Sideband Power = 373.2 watt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 page no 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "It = 5.1\n", + "Ic =4.8\n", + "\n", + "#Calculation\n", + "m=(2*((It/Ic)**2-1))**0.5\n", + "\n", + "#Result\n", + "print\"The percentage of modulation is \",round(m*100,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage of modulation is 51.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 page no 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m = 0.9\n", + "Pc = 921.6\n", + "\n", + "#calculation\n", + "Psb = (m**2*Pc)/4.0\n", + "\n", + "#Result\n", + "print\"The power in one sideband \",round(Psb,1),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power in one sideband 186.6 Watt\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 page no 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vpp = 178\n", + "R = 75.0\n", + "\n", + "#Calculation\n", + "Vp =Vpp/2.0\n", + "Vrms = 0.707*Vp\n", + "PEP =(Vrms**2/R)\n", + "\n", + "#Result\n", + "print\"The peak envelop power is \", round(PEP,1),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The peak envelop power is 52.8 Watt\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vs =24\n", + "Im =9.3\n", + "\n", + "#Calculation\n", + "PEP = Vs*Im \n", + "Pavg1 = PEP/3.0\n", + "Pavg2 = PEP/4.0\n", + "\n", + "#Result\n", + "print\"(a) The peak envelope power is \",PEP,\"watt\"\n", + "print\"(b) Average power of transmitter is \",Pavg2,\"watt to\",Pavg1,\"watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The peak envelope power is 223.2 watt\n", + "(b) Average power of transmitter is 55.8 watt to 74.4 watt\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb new file mode 100755 index 00000000..45832f38 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb @@ -0,0 +1,123 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:560b11fe692ef5f7a898cfb445cca26656fbac5b17b2ed8f9a6482b6e6d61c60" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 4 Amplitude Modulator and Demodulator circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page no 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "Vcc =48\n", + "I = 3.5\n", + "efficiency =70 #percent\n", + "modulation = 67 #percent\n", + "m = modulation/100.0\n", + "#calculation\n", + "\n", + "Pi = Vcc*I\n", + "Pc=Pi\n", + "Pm = Pi/2.0\n", + "Pout = (efficiency*Pi)/100.0\n", + "Ps = Pc*((m**2)/4.0)\n", + "maximum_swing = 2*Vcc \n", + "#Result\n", + "\n", + "print \"(a) RF input power to the output stage is \",Pi,\"W\"\n", + "print \"(b) AF power required for 100 percent modulation is \",Pm,\"W\"\n", + "print \"(c) Carrier output power is \",Pout,\"W\"\n", + "print \"(d) Power in one sideband for 67 percent modulation is \",round(Ps,2),\"W\"\n", + "print \"(e) maximum and minimum dc supply voltage swing with 100 percent modulation is \",maximum_swing,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RF input power to the output stage is 168.0 W\n", + "(b) AF power required for 100 percent modulation is 84.0 W\n", + "(c) Carrier output power is 117.6 W\n", + "(d) Power in one sideband for 67 percent modulation is 18.85 W\n", + "(e) maximum and minimum dc supply voltage swing with 100 percent modulation is 96 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page no 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "fc =4.2*10**6\n", + "f1 = 300\n", + "f2 = 3400\n", + "#calculation\n", + "#upper sideband\n", + "\n", + "x0=fc+f1\n", + "y0=fc+f2\n", + "#lower sideband\n", + "\n", + "x1=fc-f1\n", + "y1=fc-f2\n", + "frequency=(x1+y1)/2.0\n", + "#Result \n", + "\n", + "print \"(a) Upper sideband ranges from \",x0,\"to\",y0\n", + "print \" lower sideband ranges from \",x1,\"to\",y1\n", + "print \"(b) approximate center frequency of a bandpass filter is \",frequency,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Upper sideband ranges from 4200300.0 to 4203400.0\n", + " lower sideband ranges from 4199700.0 to 4196600.0\n", + "(b) approximate center frequency of a bandpass filter is 4198150.0 Hz\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb new file mode 100755 index 00000000..c8ec456c --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb @@ -0,0 +1,253 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b01da4319cdb7c7c68bb5f48bf424b751928ca20873effe336ae7e4a6e7ae82d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 Fundamentals of frequency modulation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page no 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 915*10**6\n", + "fm_deviation =12.5*10**3\n", + "\n", + "#Calculation\n", + "max_deviation = f + fm_deviation\n", + "min_deviation = f - fm_deviation\n", + "\n", + "#Result\n", + "print\"Maximum frequency occur during modulation is \",max_deviation/1000.0,\"KHz\"\n", + "print\"Minimum frequency occur during modulation is \",min_deviation/1000.0,\"KHz\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency occur during modulation is 915012.5 KHz\n", + "Minimum frequency occur during modulation is 914987.5 KHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "max_deviation = 25*10**3\n", + "fm =15.0*10**3\n", + "\n", + "#Calculation\n", + "mf =max_deviation/fm\n", + "\n", + "#Result\n", + "print\"The deviation ratio of the TV sound is \",round(mf,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The deviation ratio of the TV sound is 1.667\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page no 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "mf = 2.2\n", + "fd = 7.48*10**3\n", + "\n", + "#Calculation\n", + "fm = fd/mf\n", + "\n", + "#Result\n", + "print\"The maximum modulating frequency is \",fm/1000.0,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum modulating frequency is 3.4 KHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page no 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "J0 = -0.4\n", + "J1 = -0.07\n", + "J2 = 0.36\n", + "J3 = 0.43\n", + "J4 = 0.28\n", + "\n", + "#Result\n", + "print\"The amplitude of the carrier is \",J0\n", + "print\"Amplitudes of the first four sidebands are \",\" \\n \", J1,\"\\n \",J2,\"\\n \",J3,\"\\n \",J4\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitude of the carrier is -0.4\n", + "Amplitudes of the first four sidebands are \n", + " -0.07 \n", + " 0.36 \n", + " 0.43 \n", + " 0.28\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page no 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fd = 30*10**3\n", + "fm = 5*10**3\n", + "N=9\n", + "\n", + "#Calculation\n", + "bw1 = 2*fm*N\n", + "bw2 = 2*(fd+fm)\n", + "\n", + "#Result\n", + "print\"The maximum bandwidth of the fm signal is \",bw1/10**3,\"KHz\"\n", + "print\"Bandwidth using carson's rule \",bw2/10**3,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum bandwidth of the fm signal is 90 KHz\n", + "Bandwidth using carson's rule 70 KHz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page no 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "S_N = 2.8\n", + "fm = 1.5*10**3\n", + "fd =4*10**3\n", + "\n", + "#Calculation\n", + "import math\n", + "fi= math.asin(1/S_N)\n", + "delta = fi*fm\n", + "SN =fd/delta\n", + "\n", + "#Result\n", + "print\"(a) The frequency deviation caused by the noise \",round(delta,1),\"Hz\"\n", + "print\"(b) The improved output signal to noise ratio is \",round(SN,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The frequency deviation caused by the noise 547.8 Hz\n", + "(b) The improved output signal to noise ratio is 7.3\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb new file mode 100755 index 00000000..582984c5 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb @@ -0,0 +1,148 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8aef1c332f2a49ead17fadd51ccfa9b15c7423655061dea702b72eda65234123" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 FM Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page no 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vc =40*10**-12\n", + "c = 20*10**-12\n", + "f0 = 5.5*10**6\n", + "Ct = Vc+c\n", + "\n", + "#Calculation\n", + "L = 1/((6.28*f0)**2*Ct)\n", + "\n", + "#Result\n", + "print\"The value of the inductance is \",round(L*10**6,0),\"microhenry\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the inductance is 14.0 microhenry\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page no 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=168.96*10**6\n", + "multiplier=24.0\n", + "deviation = 5*10**3\n", + "fm = 2.8*10**3\n", + "\n", + "#Calculation\n", + "f0 =f/multiplier\n", + "fd= deviation/multiplier\n", + "phaseshift = fd/fm\n", + "phaseshift_degrees = phaseshift*57.3\n", + "total_phaseshift =2*phaseshift_degrees\n", + "\n", + "#Result\n", + "print\"(a) The crystal oscillator frequency is \",f0/10**6,\"MHz\"\n", + "print\"(b) The total phase shift is \",round(total_phaseshift,3),\"degree\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The crystal oscillator frequency is 7.04 MHz\n", + "(b) The total phase shift is 8.527 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page no 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R =1*10**3\n", + "phaseshift =4.263\n", + "phaseshift_center= 45\n", + "f =7.04*10**6\n", + "\n", + "#Calculation\n", + "phase_l = phaseshift_center - phaseshift\n", + "phase_u = phaseshift_center + phaseshift\n", + "phaserange_total = phase_u - phase_l\n", + "Xc1 = 1161\n", + "C1 = 1/(6.28*f*Xc1)\n", + "Xc2 = 861\n", + "C2 = 1/(6.28*f*Xc2)\n", + "\n", + "#Result\n", + "print\"The two values of the capacitance to achieve total deviation are \",round(C1*10**12,1),\"pf to\",round(C2*10**12,1),\"pf\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The two values of the capacitance to achieve total deviation are 19.5 pf to 26.3 pf\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb new file mode 100755 index 00000000..76d26d6f --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb @@ -0,0 +1,221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d48f2ded6acd9d37d6695ba84fcf6540c7d0d4380b8041338a946e9bf63a999c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Digital communication techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page no 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t = 71.4*10**-6\n", + "\n", + "#calculation\n", + "f = 1/t\n", + "fourth_harmonic = f*4\n", + "min_sampling = 2*fourth_harmonic\n", + "\n", + "#Result\n", + "print\"(a) The frequency of the signal is \",round(f/10**3,1),\"KHz\"\n", + "print\"(b) The fourth harmonic is \",round(fourth_harmonic/10**3,0),\"KHz\"\n", + "print\"(c) Minimum sampling rate is \",round(min_sampling/10**3,0),\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The frequency of the signal is 14.0 KHz\n", + "(b) The fourth harmonic is 56.0 KHz\n", + "(c) Minimum sampling rate is 112.0 KHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page no 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N = 14\n", + "discrete_levels = 2.0**N\n", + "\n", + "#Calculation\n", + "num_vltg_inc =2**N-1\n", + "resolution = 12/discrete_levels \n", + "\n", + "#Result\n", + "print\"(a) The numbedr of discrete levels that are represented using N number of bits are \",discrete_levels\n", + "print\"(b) the number odf voltage increments required to divide the voltage range are \",num_vltg_inc\n", + "print\"(c) Resolution of the digitization \",round(resolution*10**6,2),\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The numbedr of discrete levels that are represented using N number of bits are 16384.0\n", + "(b) the number odf voltage increments required to divide the voltage range are 16383\n", + "(c) Resolution of the digitization 732.42 microvolt\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page no 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N =12\n", + "SINAD1=78\n", + "\n", + "#Calculation\n", + "SINAD2 = 6.02*N + 1.76\n", + "ENOB =(SINAD1 -1.76)/6.02\n", + "\n", + "#Result\n", + "print\"(a) The SINAD for 12 bit convertre is \",SINAD2,\"db\"\n", + "print\"(b) The ENOB for the converter with SINAD of 78 dB is \",round(ENOB,2),\"bits\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The SINAD for 12 bit convertre is 74.0 db\n", + "(b) The ENOB for the converter with SINAD of 78 dB is 12.66 bits\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page no 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Gievn\n", + "Vm = 1.0\n", + "Vin = 0.25\n", + "mu =255\n", + "\n", + "#Calculation\n", + "import math\n", + "Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)\n", + "gain =Vout/Vin\n", + "\n", + "#Result\n", + "print\"The output voltage of the compander \",round(Vout,2),\"volt\"\n", + "print\"Gain of the compander is \",round(gain,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage of the compander 0.75 volt\n", + "Gain of the compander is 3.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page no 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vin = 0.8\n", + "Vm =1.0\n", + "mu =255\n", + "\n", + "#Calculation\n", + "import math\n", + "Vout = (Vm*math.log(1+mu*(Vin/Vm)))/math.log(1+mu)\n", + "gain =Vout/Vin\n", + "\n", + "#Result\n", + "print\"The output voltage of the compander \",round(Vout,1),\"volt\"\n", + "print\"Gain of the compander is \",round(gain,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage of the compander 1.0 volt\n", + "Gain of the compander is 1.2\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb new file mode 100755 index 00000000..0c719a4a --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb @@ -0,0 +1,185 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:332fc501ed656c58460b6801381c21fa2c1eceb5892236956abe916f97a807b7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 Radio transmitters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page no 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 16*10**6\n", + "ppm = 200\n", + "frequency_variation = 200 *16 \n", + "\n", + "#Calculation\n", + "min_f = f - frequency_variation\n", + "max_f = f + frequency_variation\n", + "\n", + "#Reslt\n", + "print\"The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are \",min_f,\"Hz and\",max_f,\"Hz respectively\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are 15996800 Hz and 16003200 Hz respectively\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page no 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f =14.9*10**6\n", + "mul_factor = 2*3*3\n", + "stability_ppm =300\n", + "variation = 0.0003\n", + "\n", + "#Calculation\n", + "total_variation = variation* mul_factor\n", + "fout = f * mul_factor\n", + "frequency_variation = fout*total_variation\n", + "f_lower = fout - frequency_variation\n", + "f_upper = fout + frequency_variation\n", + "\n", + "#Result\n", + "print\"(a) The output frequency of the transmitter is \",fout/10**6,\"MHz\"\n", + "print\"(b) The maximum and minimum frequencies of the transmitter are \",round(f_lower/10**6,2),\"Mhz and \",round(f_upper/10**6,2),\"Mhz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output frequency of the transmitter is 268.2 MHz\n", + "(b) The maximum and minimum frequencies of the transmitter are 266.75 Mhz and 269.65 Mhz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page no 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "f = 10*10**6\n", + "div_factor = 100.0\n", + "A =63\n", + "N = 285\n", + "M=32\n", + "\n", + "#Calculation\n", + "ref = f/div_factor\n", + "R =M*N+A\n", + "fout= R*ref\n", + "\n", + "#Result\n", + "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output frequency of the synthesizer is 918.3 MHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page no 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 10*10**6\n", + "div_factor = 100.0\n", + "A =64\n", + "N = 285\n", + "M=32\n", + "\n", + "#Calculation\n", + "ref = f/div_factor\n", + "R =M*N+A\n", + "fout= R*ref\n", + "\n", + "#Result\n", + "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n", + "print\"The step change is \",fout/10**6-918.3,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output frequency of the synthesizer is 918.4 MHz\n", + "The step change is 0.1 MHz\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb new file mode 100755 index 00000000..d881af0f --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb @@ -0,0 +1,274 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6155c127590921d5e033df68036b77ef47addc52e34e8604566f4914d9b739cf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 Communication receivers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page no 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fl =220*10**6\n", + "fm =224*10**6\n", + "IF1 = 10.7*10**6\n", + "IF = 1.5*10**6\n", + "\n", + "#Calculation\n", + "IF2 =IF1+IF\n", + "tune_l =fl+IF1\n", + "tune_m = fm+IF1\n", + "IF1_imgl = tune_l+IF1\n", + "IF2_imgm = tune_m+IF1\n", + "\n", + "#Result\n", + "print\"(a) The local oscillatior tuning range is \",tune_l/10**6,\"to \",tune_m/10**6,\"Mhz\"\n", + "print\"(b) Frequency of the second local oscillator is \",IF2/10**6,\"MHz\"\n", + "print\"(c) First IF image range is \",IF1_imgl/10**6,\"MHz to \",IF2_imgm/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The local oscillatior tuning range is 230.7 to 234.7 Mhz\n", + "Frequency of the second local oscillator is 12.2 MHz\n", + "First IF image range is 241.4 MHz to 245.4 MHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page no 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R = 100*10**3\n", + "T = 273+25\n", + "B = 20*10**3\n", + "k = 1.38*10**-23\n", + "\n", + "#Calculation\n", + "Vn=(4*k*T*B*R)**0.5\n", + "\n", + "#Result\n", + "print\"The noise voltage across 100k resistor is \",round(Vn*10**6,2),\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The noise voltage across 100k resistor is 5.74 microvolt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page no 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=75\n", + "B=6*10**6 \n", + "T = 29+273\n", + "k =1.38*10**-23\n", + "\n", + "#calculation\n", + "Vn = (4*k*T*B*R)**0.5\n", + "\n", + "#Result\n", + "print\"The input themal noise is \",round(Vn*10**6,2),\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input themal noise is 2.74 microvolt\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page no 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Tc=32.2\n", + "Tk=273+Tc\n", + "B =30*10**3\n", + "k =1.38*10**-23\n", + "\n", + "#Calculation\n", + "Pn=k*Tk*B\n", + "\n", + "#Result\n", + "print\"The average noise power is \",round(Pn*10**16,2),\"10**-16 W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average noise power is 1.26 10**-16 W\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page no 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "SN_ip = 8\n", + "SN_op = 6.0\n", + "\n", + "#Calculation\n", + "NR = SN_ip/SN_op\n", + "NF = 10*log10(NR)\n", + "\n", + "#Result\n", + "print\"The noise factor is \",round(NR,2)\n", + "print\"The noise figure is \",round(NF,2),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The noise factor is 1.33\n", + "The noise figure is 1.25 dB\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page no 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R= 75.0\n", + "T=31+273\n", + "k=1.38*10**-23\n", + "B=6*10**6\n", + "Vs = 8.3*10**-6\n", + "NF=2.8\n", + "\n", + "#Calculation\n", + "import math\n", + "Vn = math.sqrt(4*k*T*B*R)\n", + "Pn = Vn**2/R\n", + "Ps = Vs**2/R\n", + "SN = (Ps*10**12)/(Pn/10.0**12)\n", + "SN_dB =10*log10(SN)\n", + "NR = 10**0.28\n", + "SN_op = SN/NR\n", + "Tn = 290*(NR-1)\n", + "\n", + "#Result\n", + "print\"(a) The input noise power is \",round(Pn*10**12,1),\"pW\"\n", + "print\"(b) The input signal power is \",round(Ps*10**12,3),\"pW\"\n", + "print\"(c) Signal to noise ratio in decibels \",round(SN/10**24,2)\n", + "print\"(d) The noise factor is \",round(NR,2)\n", + "print\"(e) Signal to noise ratio of the amplifier is \",round(SN_op/10**24,2)\n", + "print\"(f) The noise temperature of the amplifier \",round(Tn,0),\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The input noise power is 0.1 pW\n", + "(b) The input signal power is 0.919 pW\n", + "(c) Signal to noise ratio in decibels 9.12\n", + "(d) The noise factor is 1.91\n", + "(e) Signal to noise ratio of the amplifier is 4.79\n", + "(f) The noise temperature of the amplifier 263.0 K\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb new file mode 100755 index 00000000..0c5682f6 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb @@ -0,0 +1,1143 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0b7383bde99cd4f0125cd654ff30432e941ee3972919bf09fe35e260edf9b001" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 The fundamentals of Electronics: A Review" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page no 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "vout=750*10**-3\n", + "vin = 30*10**-6\n", + "\n", + "#calculation\n", + "gain=vout/vin\n", + "\n", + "#Result\n", + "print\"The Voltage gain of the amplifier is \",gain\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Voltage gain of the amplifier is 25000.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page no 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "pout=6\n", + "power_gain=80.0\n", + "\n", + "#calculation\n", + "pin=pout/power_gain\n", + "\n", + "#Result\n", + "print\"The input power of the signal is \",pin*1000,\"mW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input power of the sigmal is 75.0 mW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page no 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "A1=5;\n", + "A2=2;\n", + "A3=17;\n", + "total_gain=A1*A2*A3;\n", + "pin= 40*10**-3;\n", + "\n", + "#calculation\n", + "pout=total_gain*pin;\n", + "\n", + "#Result\n", + "print\"The output power is\",pout,\"watts\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power is 6.8 watts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page no 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "pin=25.0*10**-6;\n", + "pout=1.5*10**-3;\n", + "A1=3.0;\n", + "\n", + "#Calculation\n", + "total_gain=pout/pin;\n", + "print\"Total gain is\",total_gain\n", + "A2=total_gain/A1\n", + "\n", + "#Result\n", + "print\"The gain of second stage is \",A2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total gain is 60.0\n", + "The gain of second stage is 20.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page no 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "R1=10.0*10**3;\n", + "R2=470.0;\n", + "\n", + "#Calculation\n", + "attenuation=R2/(R2+R1)\n", + "A2=1/attenuation\n", + "\n", + "#Result\n", + "print\"(a) The attenuation (A1) is\",round(attenuation,3)\n", + "print\"(b) The attenuation (A2) is\",round(A2,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The attenuation (A1) is 0.045\n", + "(b) The attenuation (A2) is 22.3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page no 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vin=20.0*10**-6;\n", + "Vout=100*10**-3;\n", + "A1=45000.0 #A1 isAmplifier gain\n", + "\n", + "#calculation\n", + "AT=Vout/Vin #AT is Total gain\n", + "A2=AT/A1 #A2 is attenuation factor\n", + "\n", + "#Result\n", + "print\"Total gain is\",AT\n", + "print\"The atenuation factor needed to to keep the output voltage from exceeding 100 mv is \",round(A2,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total gain is 5000.0\n", + "The atenuation factor needed to to keep the output voltage from exceeding 100 mv is 0.1111\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page no 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vin=3.0*10**-3\n", + "Vout=5\n", + "Pin=50.0*10**-3 \n", + "Pout=2*10**-3 \n", + "\n", + "#calculation\n", + "import math\n", + "gain_dB= 20*log10 (Vout/Vin)\n", + "gain_db=10*log10 (Pout/Pin)\n", + "\n", + "#Result\n", + "print\"(a) The gain of amplifier in dB is \",round(gain_dB,1)\n", + "print\"(b) The gain in dB is \",round(gain_db,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The gain of amplifier in dB is 64.4\n", + "(b) The gain in dB is -13.98\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page no 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "gain_dB = 40\n", + "pout_W= 100\n", + "\n", + "#calculation\n", + "pin_W = pout_W/10.0**4\n", + "\n", + "#Result\n", + "print\"The input power is \",pin_W,\"Watt\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input power is 0.01 Watt\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page no 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "gain_db = 60\n", + "vin = 50*10**-6\n", + "\n", + "#calculation\n", + "vout = 10**(60/20.0)*vin\n", + "\n", + "#Result\n", + "print\"The output voltage is \",vout,\"volt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage is 0.05 volt\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page no 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "vin=90*10**-3\n", + "R1= 10.0*10**3\n", + "vout=7.8\n", + "Rout=8.0\n", + "\n", + "#calculation\n", + "pin= vin**2/R1\n", + "pout=vout**2/Rout\n", + "\n", + "import math\n", + "Ap_db = 10*log10 (pout/pin)\n", + "\n", + "#Result\n", + "print\"The power gain in decibel is \",round(Ap_db,1),\"dB\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power gain in decibel is 69.7 dB\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page no 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "gain_db = 28\n", + "pin = 36*10**-3\n", + "\n", + "#calculation\n", + "pout = 10**2.8*pin;\n", + "\n", + "#Result\n", + "print\"The output power is \",round(pout,2),\"watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power is 22.71 watt\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page no 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "gain1 = 6.8 \n", + "gain2 = 14.3\n", + "attenuation1 = -16.4\n", + "attenuation2 = -2.9\n", + "vout = 800*10**-3\n", + "\n", + "#calculation\n", + "At = gain1+gain2+attenuation1+attenuation2\n", + "vin = vout/10.0**(At/20.0)\n", + "\n", + "#Result\n", + "print\"The input voltage is \",round(vin*10**3,1),\"mv\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input voltage is 650.3 mv\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page no 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "pout_db =12.3\n", + "\n", + "#calculation\n", + "pout_mW = 0.001*10**(12.3/10.0)\n", + "\n", + "#Result\n", + "print\"The output power is \" ,round(pout_mW*10**3,0),\"mv\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power is 17.0 mv\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page no 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c = 2.7*10**-12\n", + "l = 33*10**-9\n", + "\n", + "#calculation\n", + "fr= 1/(6.28*(l*c)**0.5)\n", + "\n", + "#Result\n", + "print\"The resonat frequency is \" ,round(fr/10.0**6,0),\"Mhz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resonat frequency is 533.0 Mhz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page no 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c =12*10**-12\n", + "fr = 49*10**6\n", + "\n", + "#calculation\n", + "l=1/(4*3.14**2*fr**2*c)\n", + "\n", + "#Result\n", + "print\"The value of inductance is \" ,round(l*10**9,0),\"nh\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of inductance is 880.0 nh\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page no 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fr=28*10**6\n", + "Q=70.0\n", + "\n", + "#calculation\n", + "bandwidth = fr/Q\n", + "\n", + "#Result\n", + "print\"The bandwidth is \",bandwidth/10.0**3,\"Khz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth is 400.0 Khz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "f1= 7.93*10**6\n", + "f2= 8.07*10**6\n", + "\n", + "#calculation\n", + "bw= f2-f1\n", + "fr=(f1*f2)**0.5\n", + "Q= fr/bw\n", + "\n", + "#Result\n", + "print\"(a) The bandwidth is \",bw/10.0**3,\"Khz\"\n", + "print\"(b) The resonant frequency is \",round(fr/10.0**6,0),\"Mhz\"\n", + "print\"(c) The Q of resonant circuit is \",round(Q,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The bandwidth is 140.0 Khz\n", + "(b) The resonant frequency is 8.0 Mhz\n", + "(c) The Q of resonant circuit is 57.14\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Q=200.0\n", + "fr=16*10**6\n", + "\n", + "#calculation\n", + "bw=fr/Q\n", + "f1= fr-(bw/2)\n", + "f2=fr+(bw/2)\n", + "\n", + "#Result\n", + "print\"Bandwidth is \",bw*10**-3,\"KHz\"\n", + "print\"f1= \",f1*10**-6,\"MHz\"\n", + "print\"f2= \",f2*10**-6,\"MHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth is 80.0 KHz\n", + "f1= 15.96 MHz\n", + "f2= 16.04 MHz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page no 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Q= 150\n", + "Vs=3*10**-6\n", + "\n", + "#calculation\n", + "Vc= Q*Vs\n", + "\n", + "#Result\n", + "print\"The voltage across capacitor is \",Vc*10**6,\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage across capacitor is 450.0 microvolt\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page no 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fr= 52*10**6\n", + "Q=12.0\n", + "L=0.15*10**-6\n", + "\n", + "#calculation\n", + "Rw=(6.28*fr*L)/Q\n", + "Req= Rw*(Q**2+1)\n", + "\n", + "#Result\n", + "print\"Impedance of the parellel LC circuit is \",round(Req,0),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance of the parellel LC circuit is 592.0 ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21 Page no 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fr= 52.0*10**6\n", + "Rw= 4.1\n", + "L =0.15*10**-6\n", + "\n", + "#calculation\n", + "C=1/(4.0*3.14**2*fr**2*L)\n", + "Z = L/(C*Rw)\n", + "\n", + "#Result\n", + "print\"the impedance of the circuit is \",round(Z,0),\"ohm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the impedance of the circuit is 585.0 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 Page no 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw = 1.0*10**6\n", + "XL = 300\n", + "Rw = 10.0\n", + "fr =10*10**6\n", + "\n", + "#calculation\n", + "Q1 = XL/Rw\n", + "Rp = Rw*(Q1**2+1) \n", + "\n", + "Q2 = fr/bw\n", + "Rpnew = Q2*XL\n", + "\n", + "Rext = (Rpnew*Rp)/(Rp-Rpnew)\n", + "\n", + "#Result\n", + "print\"The value of resistor needed to set the bandwidth of the parellel tuned circuit is \",round(Rext,1),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistor needed to set the bandwidth of the parellel tuned circuit is 4497.5 ohm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 Page no 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "R = 8.2*10**3\n", + "C =0.0033*10**-6\n", + "\n", + "#calculation\n", + "fco = 1/(6.28* R*C)\n", + "\n", + "#Result\n", + "print\"The cut off frequency is \",round(fco/10.0**3,2),\"Khz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut off frequency is 5.88 Khz\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 Page no 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fco =3.4*10**3\n", + "C = 0.047*10**-6\n", + "\n", + "#calculation\n", + "R = 1/(6.28* fco* C)\n", + "\n", + "#Result\n", + "print\"The value of the resistor is \",round(R,0),\"ohm\"\n", + "print\"The closest standard value is \", 1000 ,\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the resistor is 996.0 ohm\n", + "The closest standard value is 1000 ohm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fnotch = 120\n", + "R = 220*10**3\n", + "\n", + "#calculatiuon\n", + "C = 1/(6.28*R*fnotch)\n", + "\n", + "#Result\n", + "print\"The value of capacitance required is \",round(2*C*10**6,3),\"microfarad\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of capacitance required is 0.012 microfarad\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 Page no 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vpeak =3.0\n", + "f=48*10**3\n", + "\n", + "#calculation\n", + "fifth_harmonic = 5*f\n", + "Vrms=(4/3.14)*(3/5.0)*0.707\n", + "\n", + "#Result\n", + "print\"(a) The frequency of the fifth harmonic is \",fifth_harmonic/10.0**3,\"Khz\"\n", + "print\"The RMS voltage of the fifth harmonic is \",round(Vrms,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The frequency of the fifth harmonic is 240.0 Khz\n", + "The RMS voltage of the fifth harmonic is 0.54\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 Page no 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vpeak = 5\n", + "f = 4.0*10**6\n", + "duty_cycle=0.3\n", + "\n", + "#calculation\n", + "T = 1/f\n", + "t0 = duty_cycle*T\n", + "Vavg = Vpeak*duty_cycle\n", + "min_bw =1/t0\n", + "\n", + "#Result\n", + "print\"(a) The average DC value is \",Vavg,\"volt\"\n", + "print\"(b) The minimum bandwidth required is \" ,round(min_bw/10.0**6,3),\"Mhz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The average DC value is 1.5 volt\n", + "(b) The minimum bandwidth required is 13.333 Mhz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28 Page no 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "tr =6*10**-9\n", + "\n", + "#calculation\n", + "min_bw=(35/0.006)\n", + "\n", + "#Result\n", + "print\"The minimum bandwidth is % is \",round(min_bw/10.0**2,1),\"Mhz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum bandwidth is % is 58.3 Mhz\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw= 200.0*10**3\n", + "\n", + "#calculation\n", + "tr= 0.35/(bw*10**-3)\n", + "\n", + "#Result\n", + "print\"The fastest rise time of the circuit is \" ,tr*10**3,\"microseconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fastest rise time of the circuit is 1.75 microseconds\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 Page no 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw_mhz = 60\n", + "tri_ns= 15\n", + "\n", + "#calculation\n", + "tra_osci = 0.35/(bw_mhz)\n", + "tra_comp = 1.1*(tri_ns**2 + (tra_osci*10**3)**2)**0.5\n", + "\n", + "#Result\n", + "print\"The rise time of the displayed square wave is \",round(tra_comp,1),\"ns\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rise time of the displayed square wave is 17.7 ns\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_1.png b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_1.png new file mode 100755 index 00000000..41f1e840 Binary files /dev/null and b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_1.png differ diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_2.png b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_2.png new file mode 100755 index 00000000..3575a38f Binary files /dev/null and b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_2.png differ diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_3.png b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_3.png new file mode 100755 index 00000000..882458c8 Binary files /dev/null and b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_3.png differ diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb new file mode 100755 index 00000000..48b042da --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb @@ -0,0 +1,249 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fa4937e894b2eaacf3d917ad54d3257fed9024ea716662722fd829aea08934e3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Introduction to electronic communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.a Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=300000000\n", + "f1=150000000.0\n", + "f2=430000000.0\n", + "f3=8000000.0\n", + "f4=750000.0\n", + "\n", + "#Calculation\n", + "W1 = c/f1\n", + "W2=c/f2\n", + "W3=c/f3\n", + "W4=c/f4\n", + "\n", + "#Result\n", + "print\"(a) Wavelength is \",W1,\"meter\"\n", + "print\"(b) Wavelength is \",round(W2,3),\"meter\"\n", + "print\"(c) Wavelength is \",W3,\"meter\"\n", + "print\"(d) Wavelength is \",W4,\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Wavelength is 2.0 meter\n", + "(b) Wavelength is 0.698 meter\n", + "(c) Wavelength is 37.5 meter\n", + "(d) Wavelength is 400.0 meter\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=300000000\n", + "wavelength=1.5\n", + "\n", + "#Calculation\n", + "frequency=c/wavelength\n", + "\n", + "#Result\n", + "print\"Signal frequncy is \",frequency/1000000.0,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal frequncy is 200.0 MHz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "wavelength_feet=75\n", + "wavelength_meter= 75/3.28\n", + "c=300000000\n", + "\n", + "#Calculation\n", + "frequency=c/wavelength_meter\n", + "\n", + "#Result\n", + "print\"The signal frequncy is \",frequency/1000000.0,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The signal frequncy is 13.12 MHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "wavelength_inches=8\n", + "wavelength_meter= 8/39.37\n", + "c=300\n", + "\n", + "#Calculation\n", + "frequency= c/wavelength_meter\n", + "\n", + "#Result\n", + "print\"The signal freuency is \",round(frequency,1),\"MHz\"\n", + "print\"The signnalfrequency is \",round(frequency*10**-3,2),\"GHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The signal freuency is 1476.4 MHz\n", + "The signnalfrequency is 1.48 GHz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 page no 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f1=902000000\n", + "f2=928000000\n", + "\n", + "#Calculation\n", + "bandwidth=f2-f1\n", + "\n", + "#Result\n", + "print\"Width of the band is \",bandwidth/1000000,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of the band is 26 MHz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 page no 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "bandwidth_megahertz= 6\n", + "f1_megahertz=54\n", + "\n", + "#Calculation\n", + "f2_megahertz=f1_megahertz + bandwidth_megahertz\n", + "\n", + "#Result\n", + "print\"Upper frequency limit is \",f2_megahertz,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper frequency limit is 60 MHz\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter10.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter10.ipynb new file mode 100755 index 00000000..f969c01b --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter10.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6d0a5becdae7bf2928f5747f4da31ef68eb2576da776218335d8b44a4a733949" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 Multiplexing and Demultiplexing" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page no 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "BW_service = 860*10**6\n", + "BW_ch = 6.0*10**6\n", + "\n", + "#calculation\n", + "total_ch = BW_service/BW_ch\n", + "\n", + "#result\n", + "print\"Total number of channels are \",round(total_ch,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total number of channels are 143.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page no 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "channels =16\n", + "sampling_rate= 3.5*10**3\n", + "w_len=6\n", + "\n", + "#Calculation\n", + "available_ch =channels-1\n", + "bpf =channels*w_len\n", + "data_rate = sampling_rate * bpf\n", + "\n", + "#Result\n", + "print\"(a) Available channels are \",available_ch\n", + "print\"(b) Bits Per Frame = \",bpf\n", + "print\"(c) The serial data rate \",data_rate/10**3,\"KHz\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Available channels are 15\n", + "(b) Bits Per Frame = 96\n", + "(c) The serial data rate 336.0 KHz\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter11.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter11.ipynb new file mode 100755 index 00000000..015bcc79 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter11.ipynb @@ -0,0 +1,143 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8bd5af3b2acf26b36843842ce0fbb28501e7f5eae117a0af6c810fe6d60c2891" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 The Transmission of binary data in communication systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page no 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t=0.0016\n", + "No_words=256.0\n", + "bits_word = 12.0\n", + "\n", + "#Calculation\n", + "tword= t/No_words\n", + "tbit = tword/bits_word\n", + "bps =1/tbit\n", + "\n", + "#Result\n", + "print\"(a) The time duration of the word \",tword*10**8,\"microsecond\"\n", + "print\"(b) The time duration of the one bit is \",round(tbit*10**8,4),\"microseconds\"\n", + "print\"(c) The speed of transmission is \",bps/10**5,\"kbps\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The time duration of the word 625.0 microsecond\n", + "(b) The time duration of the one bit is 52.0833 microseconds\n", + "(c) The speed of transmission is 19.2 kbps\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page no 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B=12.5*10**3\n", + "SN_dB= 25\n", + "\n", + "#Calculation\n", + "import math\n", + "C_th = 2*B\n", + "SN=316.2\n", + "C =B*3.32*log10(SN+1)\n", + "N= 2**(C/(2.0*B))\n", + "\n", + "#Result\n", + "print\"(a) The maximum theorotical data rate is \",C_th/10**3,\"kbps\"\n", + "print\"(b) The maximum theorotical capacity of channel is \",round(C/10**3,1),\"Kbps\"\n", + "print\"(c) The number of levels needed to acheive maximum speed are \",round(N,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum theorotical data rate is 25.0 kbps\n", + "(b) The maximum theorotical capacity of channel is 103.8 Kbps\n", + "(c) The number of levels needed to acheive maximum speed are 17.78\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page no 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "block =512\n", + "packets =8\n", + "BER = 2*10**-4\n", + " \n", + "#Calculation\n", + "avg_errors = block*packets*8*BER\n", + "\n", + "print\"Average number of errors are \",avg_errors\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average number of errors are 6.5536\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter12.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter12.ipynb new file mode 100755 index 00000000..ae98ce2e --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter12.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:70c87938501c80a4a95b89850ad3f0f2a57b63c9811bc118f804b4d657133c5f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 Introduction to Networking and local area networks" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page no 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N = 20\n", + "\n", + "#Calculation\n", + "L = (N*(N-1))/2.0\n", + "\n", + "#Result\n", + "print\"The number of interconnecting wires required are \",L\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of interconnecting wires required are 190.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page no 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "block = 1500\n", + "ethernet = 10.0*10**6\n", + "token_ring = 16.0*10**6\n", + "\n", + "#Calculation\n", + "t1_bit = 1/ethernet\n", + "t1_byte = 8*t1_bit\n", + "t1_1526 = 1526 *t1_byte\n", + "t2_bit = 1/token_ring\n", + "t2_byte = 8 * t2_bit\n", + "t2_1521 =1521*t2_byte\n", + "\n", + "#Result\n", + "print\"(a) Time required for 1526 bytes is \",t1_1526*10**6,\"ns\"\n", + "print\"(b) Time required for 1521 bytes is \",t2_1521*10**3,\"ms\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Time required for 1526 bytes is 1220.8 ns\n", + "(b) Time required for 1521 bytes is 0.7605 ms\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter13.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter13.ipynb new file mode 100755 index 00000000..de1fc475 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter13.ipynb @@ -0,0 +1,339 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4be2df010e0c0a454b43a2b1267f5b9f24594cfd973fe52088cb80f0e511082b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 Transmission lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page no 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f= 450.0*10**6\n", + "\n", + "#Calculation\n", + "lamda = 984/f\n", + "len =0.1*lamda\n", + "\n", + "#Result\n", + "print\"feet long conductors would be considered as the transmission line \",round(len*10**6,3),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "feet long conductors would be considered as the transmission line 0.219 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page no 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 2.19\n", + "\n", + "#Calculation\n", + "len = (3/8.0)*lamda\n", + "\n", + "#Result\n", + "print\"The pyhsical length of the transmission line \",round(len,2),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pyhsical length of the transmission line 0.82 feet\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page no 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "len = 165\n", + "attn_100ft = 5.3\n", + "pin = 100\n", + "attn_ft = 5.3/100.0\n", + "\n", + "#Calculation\n", + "total_attn = attn_ft * len\n", + "pout = pin *0.1335\n", + "\n", + "#Result\n", + "print\"The total attenuation of the cable is \",total_attn,\"dB\"\n", + "print\"Output power is \",pout,\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total attenuation of the cable is 8.745 dB\n", + "Output power is 13.35 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page no 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "len =150\n", + "C =13.5\n", + "Z0 =93\n", + "f =2.5*10**6\n", + "attn_100ft =2.8\n", + "\n", + "#Calculation\n", + "L =C*Z0**2\n", + "td =(L*C)**0.5\n", + "theta = ((360)*188.3)/(1/f)\n", + "attn_ft = attn_100ft/100.0\n", + "total_attn = attn_ft*150\n", + "\n", + "print\"(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm\",Z0\n", + "print\"(b) The equivalent inductance per feet is \",L/10**3,\"nh\"\n", + "print\"(c) The time delay introduced by the cable per feet is \",td/10**3,\"ns\"\n", + "print\"(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is \",theta/10**9\n", + "print\"(e) The total attenuation is \",total_attn,\"db\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm 93\n", + "(b) The equivalent inductance per feet is 116.7615 nh\n", + "(c) The time delay introduced by the cable per feet is 1.2555 ns\n", + "(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is 169.47\n", + "(e) The total attenuation is 4.2 db\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page no 501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "vmax= 52.0\n", + "vmin= 17.0\n", + "Z0 = 75\n", + "\n", + "#calculation\n", + "SWR = vmax/vmin\n", + "ref_coeff = (vmax-vmin)/(vmax+vmin)\n", + "Zl1 = Z0*SWR\n", + "Zl2 = Z0/SWR\n", + "\n", + "#Result\n", + "print\"(a) The standing wave ratio is \",round(SWR,2)\n", + "print\"(b) Reflection coefficient is \",round(ref_coeff,2)\n", + "print\"The value of resistive load is \",round(Zl1,2),\"ohm or\",round(Zl2,2),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The standing wave ratio is 3.06\n", + "(b) Reflection coefficient is 0.51\n", + "The value of resistive load is 229.41 ohm or 24.52 ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page no 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "SWR =3.05\n", + "ref_pwr =0.2562\n", + "pin =30\n", + "\n", + "#calculation\n", + "pout = pin -(pin*((SWR-1)/(SWR+1))**2)\n", + "\n", + "#Result\n", + "print\"The output power of the cable is \",round(pout,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power of the cable is 22.314 W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page no 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "C =4*10**-12\n", + "f =800*10**6\n", + "diele = 3.5\n", + "h = 0.0625\n", + "w = 0.13\n", + "t = 0.002\n", + "\n", + "#Calculation\n", + "import math\n", + "Z0 = 38.8*math.log(0.374/0.106)\n", + "Xc = 1/(6.28*f*C)\n", + "\n", + "#Result\n", + "print\"The charecteristics impedance of the transmission line is \",round(Z0,1),\"ohm\"\n", + "print\"The reactance of the capacitor is \",round(Xc,2),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The charecteristics impedance of the transmission line is 48.9 ohm\n", + "The reactance of the capacitor is 49.76 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page no 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = (984/800.0)\n", + "lamda_8 =lamda/8.0\n", + "\n", + "#Calculation\n", + "len = lamda_8*12*(1/3.6**0.5)\n", + "\n", + "#Result\n", + "print\"The length of the transmission line is \",round(len,3),\"inch\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of the transmission line is 0.972 inch\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter14.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter14.ipynb new file mode 100755 index 00000000..483c5c1b --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter14.ipynb @@ -0,0 +1,229 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e45779b9fe24c5d57bbc44b21eced0e689b3f83e9f5f5eea042afe4effb61cee" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 Antennas and Wave Propogation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 page no 544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=310.0*10**6\n", + "\n", + "#Calculation\n", + "import math\n", + "len1 =(492*0.97)/f\n", + "len2 =(492/f)*0.8\n", + "len3 =(984/f)*0.73\n", + "z1 =120*log(35/2.0)\n", + "len4 =234/f\n", + "z2 = 73/2.0\n", + "\n", + "#Result\n", + "print\"(a) The length and radiation resistance of the dipole are \",round(len1*10**6,2),\"feet and 73 ohm respectively\"\n", + "print\"(b) The length of the folded dipole are \",round(len2*10**6,2),\"feet\"\n", + "print\"(c) The length and radiation resistance of the bow tie antenna are \",round(len3*10**6,1),\"feet and \",round(z1,1),\"ohm resp.\"\n", + "print\"(d) The length and radiation resistance of the groun plane antenna are \",round(len4*10**6,3),\"feet and\",z2,\"ohm resp.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The length and radiation resistance of the dipole are 1.54 feet and 73 ohm respectively\n", + "(b) The length of the folded dipole are 1.27 feet\n", + "(c) The length and radiation resistance of the bow tie antenna are 2.3 feet and 343.5 ohm resp.\n", + "(d) The length and radiation resistance of the groun plane antenna are 0.755 feet and 36.5 ohm resp.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page no 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "gain=14\n", + "len=250\n", + "attn_100=3.6\n", + "f =220*10\n", + "pin =50\n", + "p =0.126\n", + "\n", + "#Calculation\n", + "pout =pin*p\n", + "line_loss =pin-pout\n", + "pwr_ratio = 25.1\n", + "ERP = pwr_ratio*pout\n", + "\n", + "#Result\n", + "print\"(a) The transmission line loss is \",line_loss\n", + "print\"(b) Effective raduated power is \",round(ERP,1),\"W\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The transmission line loss is 43.7\n", + "(b) Effective raduated power is 158.1 W\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page no 556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z0 =50\n", + "Zl =172\n", + "f =460.0*10**6\n", + "VF =0.86\n", + "\n", + "#Calculation\n", + "len =(246/f)*VF\n", + "\n", + "#Result\n", + "print\"The length of the impedance matching section needed for the Q section is \",round(len*10**6,2),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of the impedance matching section needed for the Q section is 0.46 feet\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4 Page no 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 460.0*10**6\n", + "VF = 0.66\n", + "\n", + "#Calculation\n", + "len = (246/f)*VF\n", + "\n", + "#Result \n", + "print\"The length of impedance matching section is \",round(len*10**6,3),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of impedance matching section is 0.353 feet\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5 Page no 567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "ht =275\n", + "hr =60\n", + "f=224.0*10**6\n", + "pt=100\n", + "Gt = 26\n", + "Gr = 3.27\n", + "\n", + "#Calculation\n", + "D =((2*ht)**0.5+(2*hr)**0.5)*1.61\n", + "lamda = 300/f\n", + "Pr = (pt*Gt*Gr*lamda**2)/(16*3.14**2*D**2)\n", + "\n", + "#Result\n", + "print\"(a) The maximmum transmitting distance is \",round(D,1),\"kilometer\"\n", + "print\"(b) The received power is \",round(Pr*10**15,1),\"nW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximmum transmitting distance is 55.4 kilometer\n", + "(b) The received power is 31.5 nW\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter16.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter16.ipynb new file mode 100755 index 00000000..a3463547 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter16.ipynb @@ -0,0 +1,216 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:526f0478ca7a5ec4522d70a6832114c547e4784f425e0391463d5037753dde9d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 Microwave communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 Page no 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Zsrc =50\n", + "Zld =136\n", + "f =5800.0*10**6\n", + "Er =2.4\n", + "\n", + "#Calculation\n", + "Zq =(Zsrc * Zld)**0.5\n", + "Vp =1/(Er)**0.5\n", + "lamda = 300/f\n", + "len = (lamda/4.0)*38.37*Vp\n", + "\n", + "#Result\n", + "print\"(a) The required impedance is \",round(Zq,2),\"ohm\"\n", + "print\"(b) The length of the microstrip \",round(len*10**6,2),\"inches\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required impedance is 82.46 ohm\n", + "(b) The length of the microstrip 0.32 inches\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page no 623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "w=0.65\n", + "h=0.38\n", + "\n", + "#Calculation\n", + "fco = 300/(2.0*((0.65*2.54)/100.0))\n", + "f =1.42*fco\n", + "\n", + "#Result\n", + "print\"(a) The cutoff frequency of the \",round(fco/10**3,3),\"GHz\"\n", + "print\"(b) Operating frequency of the wavwguide is \",round(f/10**3,1),\"GHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The cutoff frequency of the 9.085 GHz\n", + "(b) Operating frequency of the wavwguide is 12.9 GHz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 Page no 623" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#for the above question\n", + "print\"The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 Page no 648" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda1 =5.0\n", + "f2 = 15.0*10**9\n", + "D=1.524\n", + "\n", + "#Calculation\n", + "f1=984/lamda1\n", + "lamda2 =300/f2\n", + "G = (6*(D/lamda2)**2)\n", + "B = 70/(D/lamda2)\n", + "\n", + "#Result\n", + "print\"(a) The lowest possible oprerating frequency is \",f1,\"MHz\"\n", + "print\"(b) The gain at 15 Ghz is \",G/10**12\n", + "print\"(c) The beam width at 15Ghz is \",round(B*10**6,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The lowest possible oprerating frequency is 196.8 MHz\n", + "(b) The gain at 15 Ghz is 34838.64\n", + "(c) The beam width at 15Ghz is 0.92 degree\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5 Page no 661" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "T = 9.2\n", + "theta = 20\n", + "sin20 = 0.342\n", + "a=5280\n", + "\n", + "#Calculation\n", + "D_nautical = T/12.36\n", + "D_statute =D_nautical*0.87\n", + "A = D_statute*0.342\n", + "A1=A*a\n", + "\n", + "#Result\n", + "print\"(a) The line of distance to the aircraft in the statute miles \",round(D_statute,3)\n", + "print\"(b) The altitude of the aircraft is \",round(A,2),\"mi\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The line of distance to the aircraft in the statute miles 0.648\n", + "(b) The altitude of the aircraft is 0.22 mi\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter17.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter17.ipynb new file mode 100755 index 00000000..c9e3dcac --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter17.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:36f7565fa260d3a1374317f250783789b0d4ba7834e883c19725c0b3c84c1d9a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapeter 17 Satellite communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 Page no 678" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "stn_long = 95\n", + "stn_lat = 30\n", + "sat_long =121\n", + "rad_pos = 137\n", + "\n", + "\n", + "#Calculation\n", + "azimuth = 360-rad_pos\n", + "\n", + "#Result\n", + "print\"The elevation setting for the antenna is 45 degree\"\n", + "print\"The azimuth setting for the antenna is \",azimuth,\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The elevation setting for the antenna is 45 degree\n", + "The azimuth setting for the antenna is 223 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 Page no 681" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "flo = 2*10**9\n", + "fd =3840*10**6\n", + "B =36*10**6\n", + "\n", + "#Calculation\n", + "fu =fd+flo\n", + "C =2*B\n", + "\n", + "#Result\n", + "print\"The uplink frequency is \",fu/10.0**9,\"GHz\"\n", + "print\"The data rate is \", C/10**6,\"Mbps\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uplink frequency is 5.84 GHz\n", + "The data rate is 72 Mbps\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 Page no 691" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fs = 4.08*10**9\n", + "fIF1 = 770*10**6\n", + "fIF2 = 140*10**6\n", + "\n", + "#Calculation\n", + "flo1 = fs - fIF1\n", + "flo2 = fIF1 - fIF2\n", + "\n", + "#Result\n", + "print\"The local oscillator frequency for first IF is \",flo1/10**6,\"MHz\"\n", + "print\"The local oscillator frequency for the second IF is \",flo2/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The local oscillator frequency for first IF is 3310.0 MHz\n", + "The local oscillator frequency for the second IF is 630 MHz\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter19.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter19.ipynb new file mode 100755 index 00000000..1ce8f35e --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter19.ipynb @@ -0,0 +1,128 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bbbebe541ba21d9bbb4d54500aef67ec9a094ac72f21cf0a19a14aa93b9c61ce" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 Optical communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1 Page no 760" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "NA = 0.29\n", + "\n", + "#Calculation\n", + "import math\n", + "critical_angle = math.asin(0.29)*180/3.14\n", + "\n", + "print\"The critical angle is \",round(critical_angle,2),\"degree\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical angle is 16.87 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 Page no 767" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "B_rating_Mhzkm =600*10**6\n", + "len_ft=500\n", + "\n", + "#Calculation\n", + "bandwidth = B_rating_Mhzkm/(len_ft/3274.0)\n", + "\n", + "#Result\n", + "print\"The bandwidth of the 500 feetr segment of the cable is \",bandwidth/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth of the 500 feetr segment of the ccable is 3928.8 MHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.3 Page no 780" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=43*10**6\n", + "D=1200/3274.0\n", + "\n", + "#Calculation\n", + "d=1/(5.0*R*D)\n", + "\n", + "#Result\n", + "print\"The dispersion factor is \",round(d*10**9,1),\"ns/km\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dispersion factor is 12.7 ns/km\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter22.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter22.ipynb new file mode 100755 index 00000000..2fc3916b --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter22.ipynb @@ -0,0 +1,94 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d66b7b0a5ebd4fcdf9eb24f98ae81ac03aa2dcdb229f576b47a170647bd9ea49" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22 Communication tests and measurments" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.1 Page no 854" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vp=8 #volts\n", + "R=75 #Ohm\n", + "\n", + "#Calculation\n", + "Vmax=0.707*Vp\n", + "P=Vmax**2/R\n", + "\n", + "#Result\n", + "print\"Power is dissipated in the load is \",round(P,4),\"Watt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power is dissipated in the load is 0.4265 Watt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.2 Page no 857" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Pf=380.0 #Watt\n", + "Pr=40 #Watt\n", + "\n", + "#Calculation\n", + "import math\n", + "m=math.sqrt(Pr/Pf)\n", + "SWR=(1+m)/(1-m)\n", + "print\"SWR= \",round(SWR,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SWR= 1.96\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter3.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter3.ipynb new file mode 100755 index 00000000..ef029e65 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter3.ipynb @@ -0,0 +1,331 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8e1b5c14d4876dc6b60f9f51fe0f04e94941e7f01c84340bf3441e1daf170b7a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Amplitude modulation fundamentals" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 page no 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vmax = 5.9\n", + "Vmin = 1.2\n", + "\n", + "#Calculation\n", + "m = (Vmax-Vmin)/(Vmax+Vmin)\n", + "Vc = (Vmax+Vmin)/2.0\n", + "Vm = (Vmax-Vmin)/2.0\n", + "m = Vm/Vc\n", + "\n", + "#Result\n", + "print\"(a) The modulation index is \",round(m,2)\n", + "print\"Vc= \",Vc,\"Vm= \",Vm,\"(for 2 volt/div on verticle scale)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation index is 0.66\n", + "Vc= 3.55 Vm= 2.35 (for 2 volt/div on verticle scale)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 page no 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "frq =980*10**3\n", + "frq_range = 5*10**3\n", + "\n", + "#Calculation\n", + "fusb = frq+frq_range\n", + "flsb = frq-frq_range\n", + "bw=fusb-flsb\n", + "\n", + "#Result\n", + "print\"The upper sideband is at \",fusb/10**3,\"Khz\"\n", + "print\"Lower sideband is at \",flsb/10**3,\"Khz\"\n", + "print\"the babdwidth is \",bw/10**3,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The upper sideband is at 985 Khz\n", + "Lower sideband is at 975 Khz\n", + "the babdwidth is 10 KHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 page no 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Pc = 30\n", + "m=0.85\n", + "\n", + "#Calculation\n", + "Pt = Pc*(1+ (m**2/2.0))\n", + "Psb_both =Pt-Pc\n", + "Psb_one = Psb_both/2.0\n", + "\n", + "#Result\n", + "print\"The total power is \",round(Pt,1),\"watt\" \n", + "print\"The power in one sideband is \",round(Psb_one,1),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total power is 40.8 watt\n", + "The power in one sideband is 5.4 Watt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 page no 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R = 40\n", + "I = 4.8\n", + "m=0.9\n", + "\n", + "#Calculation\n", + "Pc = I**2*R\n", + "Pt = (I*(1+(m**2/2.0))**0.5)**2*R\n", + "Psb = Pt-Pc\n", + "\n", + "#Result\n", + "print\"(a) The carrier power is \",Pc,\" watt\"\n", + "print\"(b) Total power = \",round(Pt,0),\"watt\"\n", + "print\"(c) Sideband Power = \",round(Psb,1),\"watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The carrier power is 921.6 watt\n", + "(b) Total power = 1295.0 watt\n", + "(c) Sideband Power = 373.2 watt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 page no 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "It = 5.1\n", + "Ic =4.8\n", + "\n", + "#Calculation\n", + "m=(2*((It/Ic)**2-1))**0.5\n", + "\n", + "#Result\n", + "print\"The percentage of modulation is \",round(m*100,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage of modulation is 51.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 page no 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "m = 0.9\n", + "Pc = 921.6\n", + "\n", + "#calculation\n", + "Psb = (m**2*Pc)/4.0\n", + "\n", + "#Result\n", + "print\"The power in one sideband \",round(Psb,1),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power in one sideband 186.6 Watt\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 page no 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vpp = 178\n", + "R = 75.0\n", + "\n", + "#Calculation\n", + "Vp =Vpp/2.0\n", + "Vrms = 0.707*Vp\n", + "PEP =(Vrms**2/R)\n", + "\n", + "#Result\n", + "print\"The peak envelop power is \", round(PEP,1),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The peak envelop power is 52.8 Watt\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vs =24\n", + "Im =9.3\n", + "\n", + "#Calculation\n", + "PEP = Vs*Im \n", + "Pavg1 = PEP/3.0\n", + "Pavg2 = PEP/4.0\n", + "\n", + "#Result\n", + "print\"(a) The peak envelope power is \",PEP,\"watt\"\n", + "print\"(b) Average power of transmitter is \",Pavg2,\"watt to\",Pavg1,\"watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The peak envelope power is 223.2 watt\n", + "(b) Average power of transmitter is 55.8 watt to 74.4 watt\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter4.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter4.ipynb new file mode 100755 index 00000000..522fe2b5 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter4.ipynb @@ -0,0 +1,123 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:268207babca50d59c46d454ea7ce41b37f6eaad8a022bc43c98526f17a497ebd" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 4 Amplitude Modulator and Demodulator circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page no 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "Vcc =48\n", + "I = 3.5\n", + "efficiency =70 #percent\n", + "modulation = 67 #percent\n", + "m = modulation/100.0\n", + "#calculation\n", + "\n", + "Pi = Vcc*I\n", + "Pc=Pi\n", + "Pm = Pi/2.0\n", + "Pout = (efficiency*Pi)/100.0\n", + "Ps = Pc*((m**2)/4.0)\n", + "maximum_swing = 2*Vcc \n", + "#Result\n", + "\n", + "print \"(a) RF input power to the output stage is \",Pi,\"W\"\n", + "print \"(b) AF power required for 100 percent modulation is \",Pm,\"W\"\n", + "print \"(c) Carrier output power is \",Pout,\"W\"\n", + "print \"(d) Power in one sideband for 67 percent modulation is \",round(Ps,2),\"W\"\n", + "print \"(e) maximum and minimum dc supply voltage swing with 100 percent modulation is \",maximum_swing,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RF input power to the output stage is 168.0 W\n", + "(b) AF power required for 100 percent modulation is 84.0 W\n", + "(c) Carrier output power is 117.6 W\n", + "(d) Power in one sideband for 67 percent modulation is 18.85 W\n", + "(e) maximum and minimum dc supply voltage swing with 100 percent modulation is 96 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page no 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "fc =4.2*10**6\n", + "f1 = 300\n", + "f2 = 3400\n", + "#calculation\n", + "#upper sideband\n", + "\n", + "x0=fc+f1\n", + "y0=fc+f2\n", + "#lower sideband\n", + "\n", + "x1=fc-f1\n", + "y1=fc-f2\n", + "frequency=(x1+y1)/2.0\n", + "#Result \n", + "\n", + "print \"(a) Upper sideband ranges from \",x0,\"to\",y0\n", + "print \" lower sideband ranges from \",x1,\"to\",y1\n", + "print \"(b) approximate center frequency of a bandpass filter is \",frequency,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Upper sideband ranges from 4200300.0 to 4203400.0\n", + " lower sideband ranges from 4199700.0 to 4196600.0\n", + "(b) approximate center frequency of a bandpass filter is 4198150.0 Hz\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter5.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter5.ipynb new file mode 100755 index 00000000..3539866c --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter5.ipynb @@ -0,0 +1,253 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:91b0cb714976b5e3abb5fa418cb1d12fb7cd307f6d4fd008a74f2dcf67b41e57" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 Fundamentals of frequency modulation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page no 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 915*10**6\n", + "fm_deviation =12.5*10**3\n", + "\n", + "#Calculation\n", + "max_deviation = f + fm_deviation\n", + "min_deviation = f - fm_deviation\n", + "\n", + "#Result\n", + "print\"Maximum frequency occur during modulation is \",max_deviation/1000.0,\"KHz\"\n", + "print\"Minimum frequency occur during modulation is \",min_deviation/1000.0,\"KHz\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency occur during modulation is 915012.5 KHz\n", + "Minimum frequency occur during modulation is 914987.5 KHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "max_deviation = 25*10**3\n", + "fm =15.0*10**3\n", + "\n", + "#Calculation\n", + "mf =max_deviation/fm\n", + "\n", + "#Result\n", + "print\"The deviation ratio of the TV sound is \",round(mf,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The deviation ratio of the TV sound is 1.667\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page no 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "mf = 2.2\n", + "fd = 7.48*10**3\n", + "\n", + "#Calculation\n", + "fm = fd/mf\n", + "\n", + "#Result\n", + "print\"The maximum modulating frequency is \",fm/1000.0,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum modulating frequency is 3.4 KHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page no 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "J0 = -0.4\n", + "J1 = -0.07\n", + "J2 = 0.36\n", + "J3 = 0.43\n", + "J4 = 0.28\n", + "\n", + "#Result\n", + "print\"The amplitude of the carrier is \",J0\n", + "print\"Amplitudes of the first four sidebands are \",\" \\n \", J1,\"\\n \",J2,\"\\n \",J3,\"\\n \",J4\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitude of the carrier is -0.4\n", + "Amplitudes of the first four sidebands are \n", + " -0.07 \n", + " 0.36 \n", + " 0.43 \n", + " 0.28\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page no 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "fd = 30*10**3\n", + "fm = 5*10**3\n", + "N=9\n", + "\n", + "#Calculation\n", + "bw1 = 2*fm*N\n", + "bw2 = 2*(fd+fm)\n", + "\n", + "#Result\n", + "print\"The maximum bandwidth of the fm signal is \",bw1/10**3,\"KHz\"\n", + "print\"Bandwidth using carson's rule \",bw2/10**3,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum bandwidth of the fm signal is 90 KHz\n", + "Bandwidth using carson's rule 70 KHz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page no 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "S_N = 2.8\n", + "fm = 1.5*10**3\n", + "fd =4*10**3\n", + "\n", + "#Calculation\n", + "import math\n", + "fi= math.asin(1/S_N)\n", + "delta = fi*fm\n", + "SN =fd/delta\n", + "\n", + "#Result\n", + "print\"(a) The frequency deviation caused by the noise \",round(delta,1),\"Hz\"\n", + "print\"(b) The improved output signal to noise ratio is \",round(SN,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The frequency deviation caused by the noise 547.8 Hz\n", + "(b) The improved output signal to noise ratio is 7.3\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter6.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter6.ipynb new file mode 100755 index 00000000..8bd8c6da --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter6.ipynb @@ -0,0 +1,148 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:aac83d9b958acba775304d5e53683242c3be955e852f2ce5dbe2f25d81f3bf36" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 FM Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page no 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vc =40*10**-12\n", + "c = 20*10**-12\n", + "f0 = 5.5*10**6\n", + "Ct = Vc+c\n", + "\n", + "#Calculation\n", + "L = 1/((6.28*f0)**2*Ct)\n", + "\n", + "#Result\n", + "print\"The value of the inductance is \",round(L*10**6,0),\"microhenry\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the inductance is 14.0 microhenry\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page no 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=168.96*10**6\n", + "multiplier=24.0\n", + "deviation = 5*10**3\n", + "fm = 2.8*10**3\n", + "\n", + "#Calculation\n", + "f0 =f/multiplier\n", + "fd= deviation/multiplier\n", + "phaseshift = fd/fm\n", + "phaseshift_degrees = phaseshift*57.3\n", + "total_phaseshift =2*phaseshift_degrees\n", + "\n", + "#Result\n", + "print\"(a) The crystal oscillator frequency is \",f0/10**6,\"MHz\"\n", + "print\"(b) The total phase shift is \",round(total_phaseshift,3),\"degree\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The crystal oscillator frequency is 7.04 MHz\n", + "(b) The total phase shift is 8.527 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page no 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R =1*10**3\n", + "phaseshift =4.263\n", + "phaseshift_center= 45\n", + "f =7.04*10**6\n", + "\n", + "#Calculation\n", + "phase_l = phaseshift_center - phaseshift\n", + "phase_u = phaseshift_center + phaseshift\n", + "phaserange_total = phase_u - phase_l\n", + "Xc1 = 1161\n", + "C1 = 1/(6.28*f*Xc1)\n", + "Xc2 = 861\n", + "C2 = 1/(6.28*f*Xc2)\n", + "\n", + "#Result\n", + "print\"The two values of the capacitance to achieve total deviation are \",round(C1*10**12,1),\"pf to\",round(C2*10**12,1),\"pf\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The two values of the capacitance to achieve total deviation are 19.5 pf to 26.3 pf\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter7.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter7.ipynb new file mode 100755 index 00000000..c4587482 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter7.ipynb @@ -0,0 +1,221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:13e4ad42742896befb0b329fd930804197555dd5705f1dd526b017e9117b7b00" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Digital communication techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page no 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t = 71.4*10**-6\n", + "\n", + "#calculation\n", + "f = 1/t\n", + "fourth_harmonic = f*4\n", + "min_sampling = 2*fourth_harmonic\n", + "\n", + "#Result\n", + "print\"(a) The frequency of the signal is \",round(f/10**3,1),\"KHz\"\n", + "print\"(b) The fourth harmonic is \",round(fourth_harmonic/10**3,0),\"KHz\"\n", + "print\"(c) Minimum sampling rate is \",round(min_sampling/10**3,0),\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The frequency of the signal is 14.0 KHz\n", + "(b) The fourth harmonic is 56.0 KHz\n", + "(c) Minimum sampling rate is 112.0 KHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page no 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N = 14\n", + "discrete_levels = 2.0**N\n", + "\n", + "#Calculation\n", + "num_vltg_inc =2**N-1\n", + "resolution = 12/discrete_levels \n", + "\n", + "#Result\n", + "print\"(a) The numbedr of discrete levels that are represented using N number of bits are \",discrete_levels\n", + "print\"(b) the number odf voltage increments required to divide the voltage range are \",num_vltg_inc\n", + "print\"(c) Resolution of the digitization \",round(resolution*10**6,2),\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The numbedr of discrete levels that are represented using N number of bits are 16384.0\n", + "(b) the number odf voltage increments required to divide the voltage range are 16383\n", + "(c) Resolution of the digitization 732.42 microvolt\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page no 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N =12\n", + "SINAD1=78\n", + "\n", + "#Calculation\n", + "SINAD2 = 6.02*N + 1.76\n", + "ENOB =(SINAD1 -1.76)/6.02\n", + "\n", + "#Result\n", + "print\"(a) The SINAD for 12 bit convertre is \",SINAD2,\"db\"\n", + "print\"(b) The ENOB for the converter with SINAD of 78 dB is \",round(ENOB,2),\"bits\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The SINAD for 12 bit convertre is 74.0 db\n", + "(b) The ENOB for the converter with SINAD of 78 dB is 12.66 bits\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page no 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Gievn\n", + "Vm = 1.0\n", + "Vin = 0.25\n", + "mu =255\n", + "\n", + "#Calculation\n", + "import math\n", + "Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)\n", + "gain =Vout/Vin\n", + "\n", + "#Result\n", + "print\"The output voltage of the compander \",round(Vout,2),\"volt\"\n", + "print\"Gain of the compander is \",round(gain,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage of the compander 0.75 volt\n", + "Gain of the compander is 3.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page no 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Vin = 0.8\n", + "Vm =1.0\n", + "mu =255\n", + "\n", + "#Calculation\n", + "import math\n", + "Vout = (Vm*math.log(1+mu*(Vin/Vm)))/math.log(1+mu)\n", + "gain =Vout/Vin\n", + "\n", + "#Result\n", + "print\"The output voltage of the compander \",round(Vout,1),\"volt\"\n", + "print\"Gain of the compander is \",round(gain,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage of the compander 1.0 volt\n", + "Gain of the compander is 1.2\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter8.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter8.ipynb new file mode 100755 index 00000000..4cad3df0 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter8.ipynb @@ -0,0 +1,185 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6738b73e6fb4913114449836a25c14169c484a93e5e60fcba9b0e4a9815c8f56" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 Radio transmitters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page no 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 16*10**6\n", + "ppm = 200\n", + "frequency_variation = 200 *16 \n", + "\n", + "#Calculation\n", + "min_f = f - frequency_variation\n", + "max_f = f + frequency_variation\n", + "\n", + "#Reslt\n", + "print\"The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are \",min_f,\"Hz and\",max_f,\"Hz respectively\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are 15996800 Hz and 16003200 Hz respectively\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page no 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f =14.9*10**6\n", + "mul_factor = 2*3*3\n", + "stability_ppm =300\n", + "variation = 0.0003\n", + "\n", + "#Calculation\n", + "total_variation = variation* mul_factor\n", + "fout = f * mul_factor\n", + "frequency_variation = fout*total_variation\n", + "f_lower = fout - frequency_variation\n", + "f_upper = fout + frequency_variation\n", + "\n", + "#Result\n", + "print\"(a) The output frequency of the transmitter is \",fout/10**6,\"MHz\"\n", + "print\"(b) The maximum and minimum frequencies of the transmitter are \",round(f_lower/10**6,2),\"Mhz and \",round(f_upper/10**6,2),\"Mhz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output frequency of the transmitter is 268.2 MHz\n", + "(b) The maximum and minimum frequencies of the transmitter are 266.75 Mhz and 269.65 Mhz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page no 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "f = 10*10**6\n", + "div_factor = 100.0\n", + "A =63\n", + "N = 285\n", + "M=32\n", + "\n", + "#Calculation\n", + "ref = f/div_factor\n", + "R =M*N+A\n", + "fout= R*ref\n", + "\n", + "#Result\n", + "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output frequency of the synthesizer is 918.3 MHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page no 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f = 10*10**6\n", + "div_factor = 100.0\n", + "A =64\n", + "N = 285\n", + "M=32\n", + "\n", + "#Calculation\n", + "ref = f/div_factor\n", + "R =M*N+A\n", + "fout= R*ref\n", + "\n", + "#Result\n", + "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n", + "print\"The step change is \",fout/10**6-918.3,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output frequency of the synthesizer is 918.4 MHz\n", + "The step change is 0.1 MHz\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter9.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter9.ipynb new file mode 100755 index 00000000..379e8939 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter9.ipynb @@ -0,0 +1,274 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3ff4b00636e0eec0da6869f81549546163050c8b991ea646d8083caae0f8dd37" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 Communication receivers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page no 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fl =220*10**6\n", + "fm =224*10**6\n", + "IF1 = 10.7*10**6\n", + "IF = 1.5*10**6\n", + "\n", + "#Calculation\n", + "IF2 =IF1+IF\n", + "tune_l =fl+IF1\n", + "tune_m = fm+IF1\n", + "IF1_imgl = tune_l+IF1\n", + "IF2_imgm = tune_m+IF1\n", + "\n", + "#Result\n", + "print\"(a) The local oscillatior tuning range is \",tune_l/10**6,\"to \",tune_m/10**6,\"MHz\"\n", + "print\"(b) Frequency of the second local oscillator is \",IF2/10**6,\"MHz\"\n", + "print\"(c) First IF image range is \",IF1_imgl/10**6,\"MHz to \",IF2_imgm/10**6,\"MHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The local oscillatior tuning range is 230.7 to 234.7 MHz\n", + "(b) Frequency of the second local oscillator is 12.2 MHz\n", + "(c) First IF image range is 241.4 MHz to 245.4 MHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page no 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R = 100*10**3\n", + "T = 273+25\n", + "B = 20*10**3\n", + "k = 1.38*10**-23\n", + "\n", + "#Calculation\n", + "Vn=(4*k*T*B*R)**0.5\n", + "\n", + "#Result\n", + "print\"The noise voltage across 100k resistor is \",round(Vn*10**6,2),\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The noise voltage across 100k resistor is 5.74 microvolt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page no 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R=75\n", + "B=6*10**6 \n", + "T = 29+273\n", + "k =1.38*10**-23\n", + "\n", + "#calculation\n", + "Vn = (4*k*T*B*R)**0.5\n", + "\n", + "#Result\n", + "print\"The input themal noise is \",round(Vn*10**6,2),\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input themal noise is 2.74 microvolt\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page no 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Tc=32.2\n", + "Tk=273+Tc\n", + "B =30*10**3\n", + "k =1.38*10**-23\n", + "\n", + "#Calculation\n", + "Pn=k*Tk*B\n", + "\n", + "#Result\n", + "print\"The average noise power is \",round(Pn*10**16,2),\"10**-16 W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average noise power is 1.26 10**-16 W\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page no 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "SN_ip = 8\n", + "SN_op = 6.0\n", + "\n", + "#Calculation\n", + "NR = SN_ip/SN_op\n", + "NF = 10*log10(NR)\n", + "\n", + "#Result\n", + "print\"The noise factor is \",round(NR,2)\n", + "print\"The noise figure is \",round(NF,2),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The noise factor is 1.33\n", + "The noise figure is 1.25 dB\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page no 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R= 75.0\n", + "T=31+273\n", + "k=1.38*10**-23\n", + "B=6*10**6\n", + "Vs = 8.3*10**-6\n", + "NF=2.8\n", + "\n", + "#Calculation\n", + "import math\n", + "Vn = math.sqrt(4*k*T*B*R)\n", + "Pn = Vn**2/R\n", + "Ps = Vs**2/R\n", + "SN = (Ps*10**12)/(Pn/10.0**12)\n", + "SN_dB =10*log10(SN)\n", + "NR = 10**0.28\n", + "SN_op = SN/NR\n", + "Tn = 290*(NR-1)\n", + "\n", + "#Result\n", + "print\"(a) The input noise power is \",round(Pn*10**12,1),\"pW\"\n", + "print\"(b) The input signal power is \",round(Ps*10**12,3),\"pW\"\n", + "print\"(c) Signal to noise ratio in decibels \",round(SN/10**24,2)\n", + "print\"(d) The noise factor is \",round(NR,2)\n", + "print\"(e) Signal to noise ratio of the amplifier is \",round(SN_op/10**24,2)\n", + "print\"(f) The noise temperature of the amplifier \",round(Tn,0),\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The input noise power is 0.1 pW\n", + "(b) The input signal power is 0.919 pW\n", + "(c) Signal to noise ratio in decibels 9.12\n", + "(d) The noise factor is 1.91\n", + "(e) Signal to noise ratio of the amplifier is 4.79\n", + "(f) The noise temperature of the amplifier 263.0 K\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter_2.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter_2.ipynb new file mode 100755 index 00000000..3847150a --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter_2.ipynb @@ -0,0 +1,1143 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:759039f1dfc5f6d62e90bf867630bc8f1cdda845968a4b5c11c4acddcb77b251" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 The fundamentals of Electronics: A Review" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page no 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "vout=750*10**-3\n", + "vin = 30*10**-6\n", + "\n", + "#calculation\n", + "gain=vout/vin\n", + "\n", + "#Result\n", + "print\"The Voltage gain of the amplifier is \",gain\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Voltage gain of the amplifier is 25000.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page no 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "pout=6\n", + "power_gain=80.0\n", + "\n", + "#calculation\n", + "pin=pout/power_gain\n", + "\n", + "#Result\n", + "print\"The input power of the signal is \",pin*1000,\"mW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input power of the sigmal is 75.0 mW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page no 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "A1=5;\n", + "A2=2;\n", + "A3=17;\n", + "total_gain=A1*A2*A3;\n", + "pin= 40*10**-3;\n", + "\n", + "#calculation\n", + "pout=total_gain*pin;\n", + "\n", + "#Result\n", + "print\"The output power is\",pout,\"watts\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power is 6.8 watts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page no 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "pin=25.0*10**-6;\n", + "pout=1.5*10**-3;\n", + "A1=3.0;\n", + "\n", + "#Calculation\n", + "total_gain=pout/pin;\n", + "print\"Total gain is\",total_gain\n", + "A2=total_gain/A1\n", + "\n", + "#Result\n", + "print\"The gain of second stage is \",A2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total gain is 60.0\n", + "The gain of second stage is 20.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page no 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "R1=10.0*10**3;\n", + "R2=470.0;\n", + "\n", + "#Calculation\n", + "attenuation=R2/(R2+R1)\n", + "A2=1/attenuation\n", + "\n", + "#Result\n", + "print\"(a) The attenuation (A1) is\",round(attenuation,3)\n", + "print\"(b) The attenuation (A2) is\",round(A2,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The attenuation (A1) is 0.045\n", + "(b) The attenuation (A2) is 22.3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page no 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vin=20.0*10**-6;\n", + "Vout=100*10**-3;\n", + "A1=45000.0 #A1 isAmplifier gain\n", + "\n", + "#calculation\n", + "AT=Vout/Vin #AT is Total gain\n", + "A2=AT/A1 #A2 is attenuation factor\n", + "\n", + "#Result\n", + "print\"Total gain is\",AT\n", + "print\"The atenuation factor needed to to keep the output voltage from exceeding 100 mv is \",round(A2,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total gain is 5000.0\n", + "The atenuation factor needed to to keep the output voltage from exceeding 100 mv is 0.1111\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page no 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vin=3.0*10**-3\n", + "Vout=5\n", + "Pin=50.0*10**-3 \n", + "Pout=2*10**-3 \n", + "\n", + "#calculation\n", + "import math\n", + "gain_dB= 20*log10 (Vout/Vin)\n", + "gain_db=10*log10 (Pout/Pin)\n", + "\n", + "#Result\n", + "print\"(a) The gain of amplifier in dB is \",round(gain_dB,1)\n", + "print\"(b) The gain in dB is \",round(gain_db,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The gain of amplifier in dB is 64.4\n", + "(b) The gain in dB is -13.98\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page no 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "gain_dB = 40\n", + "pout_W= 100\n", + "\n", + "#calculation\n", + "pin_W = pout_W/10.0**4\n", + "\n", + "#Result\n", + "print\"The input power is \",pin_W*10**3,\"m Watt\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input power is 10.0 m Watt\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page no 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "gain_db = 60\n", + "vin = 50*10**-6\n", + "\n", + "#calculation\n", + "vout = 10**(60/20.0)*vin\n", + "\n", + "#Result\n", + "print\"The output voltage is \",vout,\"volt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage is 0.05 volt\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page no 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "vin=90*10**-3\n", + "R1= 10.0*10**3\n", + "vout=7.8\n", + "Rout=8.0\n", + "\n", + "#calculation\n", + "pin= vin**2/R1\n", + "pout=vout**2/Rout\n", + "\n", + "import math\n", + "Ap_db = 10*log10 (pout/pin)\n", + "\n", + "#Result\n", + "print\"The power gain in decibel is \",round(Ap_db,1),\"dB\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power gain in decibel is 69.7 dB\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page no 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "\n", + "gain_db = 28\n", + "pin = 36*10**-3\n", + "\n", + "#calculation\n", + "pout = 10**2.8*pin;\n", + "\n", + "#Result\n", + "print\"The output power is \",round(pout,2),\"watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power is 22.71 watt\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page no 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "gain1 = 6.8 \n", + "gain2 = 14.3\n", + "attenuation1 = -16.4\n", + "attenuation2 = -2.9\n", + "vout = 800*10**-3\n", + "\n", + "#calculation\n", + "At = gain1+gain2+attenuation1+attenuation2\n", + "vin = vout/10.0**(At/20.0)\n", + "\n", + "#Result\n", + "print\"The input voltage is \",round(vin*10**3,1),\"mv\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input voltage is 650.3 mv\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page no 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "pout_db =12.3\n", + "\n", + "#calculation\n", + "pout_mW = 0.001*10**(12.3/10.0)\n", + "\n", + "#Result\n", + "print\"The output power is \" ,round(pout_mW*10**3,0),\"mv\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power is 17.0 mv\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page no 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c = 2.7*10**-12\n", + "l = 33*10**-9\n", + "\n", + "#calculation\n", + "fr= 1/(6.28*(l*c)**0.5)\n", + "\n", + "#Result\n", + "print\"The resonat frequency is \" ,round(fr/10.0**6,0),\"Mhz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resonat frequency is 533.0 Mhz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page no 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c =12*10**-12\n", + "fr = 49*10**6\n", + "\n", + "#calculation\n", + "l=1/(4*3.14**2*fr**2*c)\n", + "\n", + "#Result\n", + "print\"The value of inductance is \" ,round(l*10**9,0),\"nh\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of inductance is 880.0 nh\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page no 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fr=28*10**6\n", + "Q=70.0\n", + "\n", + "#calculation\n", + "bandwidth = fr/Q\n", + "\n", + "#Result\n", + "print\"The bandwidth is \",bandwidth/10.0**3,\"Khz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth is 400.0 Khz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "f1= 7.93*10**6\n", + "f2= 8.07*10**6\n", + "\n", + "#calculation\n", + "bw= f2-f1\n", + "fr=(f1*f2)**0.5\n", + "Q= fr/bw\n", + "\n", + "#Result\n", + "print\"(a) The bandwidth is \",bw/10.0**3,\"Khz\"\n", + "print\"(b) The resonant frequency is \",round(fr/10.0**6,0),\"Mhz\"\n", + "print\"(c) The Q of resonant circuit is \",round(Q,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The bandwidth is 140.0 Khz\n", + "(b) The resonant frequency is 8.0 Mhz\n", + "(c) The Q of resonant circuit is 57.14\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page no 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Q=200.0\n", + "fr=16*10**6\n", + "\n", + "#calculation\n", + "bw=fr/Q\n", + "f1= fr-(bw/2)\n", + "f2=fr+(bw/2)\n", + "\n", + "#Result\n", + "print\"Bandwidth is \",bw*10**-3,\"KHz\"\n", + "print\"f1= \",f1*10**-6,\"MHz\"\n", + "print\"f2= \",f2*10**-6,\"MHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth is 80.0 KHz\n", + "f1= 15.96 MHz\n", + "f2= 16.04 MHz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page no 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Q= 150\n", + "Vs=3*10**-6\n", + "\n", + "#calculation\n", + "Vc= Q*Vs\n", + "\n", + "#Result\n", + "print\"The voltage across capacitor is \",Vc*10**6,\"microvolt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage across capacitor is 450.0 microvolt\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page no 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fr= 52*10**6\n", + "Q=12.0\n", + "L=0.15*10**-6\n", + "\n", + "#calculation\n", + "Rw=(6.28*fr*L)/Q\n", + "Req= Rw*(Q**2+1)\n", + "\n", + "#Result\n", + "print\"Impedance of the parellel LC circuit is \",round(Req,0),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance of the parellel LC circuit is 592.0 ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21 Page no 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fr= 52.0*10**6\n", + "Rw= 4.1\n", + "L =0.15*10**-6\n", + "\n", + "#calculation\n", + "C=1/(4.0*3.14**2*fr**2*L)\n", + "Z = L/(C*Rw)\n", + "\n", + "#Result\n", + "print\"the impedance of the circuit is \",round(Z,0),\"ohm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the impedance of the circuit is 585.0 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 Page no 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw = 1.0*10**6\n", + "XL = 300\n", + "Rw = 10.0\n", + "fr =10*10**6\n", + "\n", + "#calculation\n", + "Q1 = XL/Rw\n", + "Rp = Rw*(Q1**2+1) \n", + "\n", + "Q2 = fr/bw\n", + "Rpnew = Q2*XL\n", + "\n", + "Rext = (Rpnew*Rp)/(Rp-Rpnew)\n", + "\n", + "#Result\n", + "print\"The value of resistor needed to set the bandwidth of the parellel tuned circuit is \",round(Rext,1),\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistor needed to set the bandwidth of the parellel tuned circuit is 4497.5 ohm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 Page no 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "R = 8.2*10**3\n", + "C =0.0033*10**-6\n", + "\n", + "#calculation\n", + "fco = 1/(6.28* R*C)\n", + "\n", + "#Result\n", + "print\"The cut off frequency is \",round(fco/10.0**3,2),\"Khz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut off frequency is 5.88 Khz\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 Page no 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fco =3.4*10**3\n", + "C = 0.047*10**-6\n", + "\n", + "#calculation\n", + "R = 1/(6.28* fco* C)\n", + "\n", + "#Result\n", + "print\"The value of the resistor is \",round(R,0),\"ohm\"\n", + "print\"The closest standard value is \", 1000 ,\"ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the resistor is 996.0 ohm\n", + "The closest standard value is 1000 ohm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fnotch = 120\n", + "R = 220*10**3\n", + "\n", + "#calculatiuon\n", + "C = 1/(6.28*R*fnotch)\n", + "\n", + "#Result\n", + "print\"The value of capacitance required is \",round(2*C*10**6,3),\"microfarad\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of capacitance required is 0.012 microfarad\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 Page no 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vpeak =3.0\n", + "f=48*10**3\n", + "\n", + "#calculation\n", + "fifth_harmonic = 5*f\n", + "Vrms=(4/3.14)*(3/5.0)*0.707\n", + "\n", + "#Result\n", + "print\"(a) The frequency of the fifth harmonic is \",fifth_harmonic/10.0**3,\"Khz\"\n", + "print\"The RMS voltage of the fifth harmonic is \",round(Vrms,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The frequency of the fifth harmonic is 240.0 Khz\n", + "The RMS voltage of the fifth harmonic is 0.54\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 Page no 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vpeak = 5\n", + "f = 4.0*10**6\n", + "duty_cycle=0.3\n", + "\n", + "#calculation\n", + "T = 1/f\n", + "t0 = duty_cycle*T\n", + "Vavg = Vpeak*duty_cycle\n", + "min_bw =1/t0\n", + "\n", + "#Result\n", + "print\"(a) The average DC value is \",Vavg,\"volt\"\n", + "print\"(b) The minimum bandwidth required is \" ,round(min_bw/10.0**6,3),\"Mhz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The average DC value is 1.5 volt\n", + "(b) The minimum bandwidth required is 13.333 Mhz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28 Page no 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "tr =6*10**-9\n", + "\n", + "#calculation\n", + "min_bw=(35/0.006)\n", + "\n", + "#Result\n", + "print\"The minimum bandwidth is % is \",round(min_bw/10.0**2,1),\"Mhz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum bandwidth is % is 58.3 Mhz\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw= 200.0*10**3\n", + "\n", + "#calculation\n", + "tr= 0.35/(bw*10**-3)\n", + "\n", + "#Result\n", + "print\"The fastest rise time of the circuit is \" ,tr*10**3,\"microseconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fastest rise time of the circuit is 1.75 microseconds\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 Page no 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw_mhz = 60\n", + "tri_ns= 15\n", + "\n", + "#calculation\n", + "tra_osci = 0.35/(bw_mhz)\n", + "tra_comp = 1.1*(tri_ns**2 + (tra_osci*10**3)**2)**0.5\n", + "\n", + "#Result\n", + "print\"The rise time of the displayed square wave is \",round(tra_comp,1),\"ns\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rise time of the displayed square wave is 17.7 ns\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter01.ipynb b/Principles_Of_Foundation_Engineering/Chapter01.ipynb deleted file mode 100755 index 61dc3457..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter01.ipynb +++ /dev/null @@ -1,249 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3f5444f542f0d6a3b857b61fbecdc4e8047247ed8828d4cea5a34f91ccdf5eb3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1:Geotechnical Properties of Soil" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.1:Pg-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.1\n", - "\n", - "V=0.25; # ft^3\n", - "W=30.8; #lb\n", - "Wd=28.2; # weight dried lb\n", - "Gs=2.7;\n", - "Gammaw=62.4; #lb/ft^3\n", - "Gamma=W/V;\n", - "print Gamma,\" is moist unit weight in lb/ft^3\"\n", - "w=(W-Wd)/W;\n", - "print round(w*100,2),\"is moisture content in %\"\n", - "Gammad=Wd/V;\n", - "print Gammad, \"is dry unit weight in lb/ft^3\"\n", - "Vs=Wd/Gs/Gammaw;\n", - "Vv=V-Vs;\n", - "e=Vv/Vs;\n", - "print round(e,3),\" is void ratio\"\n", - "n=e/(1+e);\n", - "print round(n,2),\"is porosity\"\n", - "Vw=(W-Wd)/Gammaw;\n", - "S=Vw/Vv;\n", - "print round(S*100,2),\"is saturation in %\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "123.2 is moist unit weight in lb/ft^3\n", - "8.44 is moisture content in %\n", - "112.8 is dry unit weight in lb/ft^3\n", - "0.494 is void ratio\n", - "0.33 is porosity\n", - "50.43 is saturation in %\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.2:Pg-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.2\n", - "\n", - "e=0.72;\n", - "w=12.0/100; #moisture content\n", - "Gs=2.72;\n", - "Gammaw=9.81;#kN/m^3\n", - "Gammad=Gs*Gammaw/(1+e);\n", - "print round(Gammad,2),\"= dry unit weight in kN/m^3\"\n", - "Gamma=Gs*Gammaw*(1+w)/(1+e);\n", - "print round(Gamma,2),\" = moist unit weight in kN/m^3\"\n", - "Gammasat=(Gs+e)*Gammaw/(1+e);\n", - "wa=Gammasat-Gamma;#water added\n", - "print round(wa,2),\" = water added in kN/m^3\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15.51 = dry unit weight in kN/m^3\n", - "17.38 = moist unit weight in kN/m^3\n", - "2.24 = water added in kN/m^3\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.3:Pg-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.3\n", - "from scipy.optimize import fsolve\n", - "gmax=17.1; # Gammadmax\n", - "Dr=0.7;\n", - "w=8.0/100;#moisture content\n", - "gmin=14.2; #Gammadmin\n", - "def f(x):\n", - " return (x-14.2)/(17.1-14.2)*17.1/x-0.7 \n", - "x=fsolve(f,16);#solving for gammad\n", - "Gamma=x[0]*(1+w);\n", - "print round(Gamma,2),\"moist unit weight in kN/m^3\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "17.4 moist unit weight in kN/m^3\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.7:Pg-38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.7\n", - "import math\n", - "#part (a)\n", - "e1=0.92;\n", - "e2=0.86;\n", - "Hc=2.8; # in m\n", - "s2=212.0;#sigma2dash Load in kN/m2\n", - "s1=140.0;#sigma1dash Load in kN/m2\n", - "Cc=(e1-e2)/math.log10(s2/s1);\n", - "Sc=Cc*Hc/(1+e1)*math.log10(s2/s1);\n", - "print Sc*1000,\"consolidated depth in mm\"\n", - "#part (b)\n", - "# from Figure (1.21):\n", - "Sct=40.0;# in mm\n", - "T50=0.197;\n", - "t=4.5; # in MIN\n", - "Cr=T50*12.7**2.0/t;\n", - "U=Sct/Sc*100.0/1000;\n", - "H=Hc/2;\n", - "Tv=math.pi/4*U**2.0/100**2;\n", - "t=Tv*H**2.0/Cr*1000.0**2/60.0/24;\n", - "print round(t,1),\" is time required in days\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "87.5 consolidated depth in mm\n", - "31.6 is time required in days\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.8:Pg-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.8\n", - "\n", - "Cv=7.061; # in mm^2/min\n", - "tc=15*24*60.0;\n", - "H=2.8/2*1000.0;\n", - "Scmax=87.5; # consolidation\n", - "Tc=Cv*tc/H**2;\n", - "tv=31.6*24*60;\n", - "Tv=Cv*tv/H**2;\n", - "#from figure 1.28\n", - "Sct=Scmax*0.36;\n", - "print Sct,\"is consolidation in 31.6 days in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "31.5 is consolidation in 31.6 days in mm\n" - ] - } - ], - "prompt_number": 28 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter01_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter01_1.ipynb deleted file mode 100755 index 61dc3457..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter01_1.ipynb +++ /dev/null @@ -1,249 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3f5444f542f0d6a3b857b61fbecdc4e8047247ed8828d4cea5a34f91ccdf5eb3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1:Geotechnical Properties of Soil" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.1:Pg-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.1\n", - "\n", - "V=0.25; # ft^3\n", - "W=30.8; #lb\n", - "Wd=28.2; # weight dried lb\n", - "Gs=2.7;\n", - "Gammaw=62.4; #lb/ft^3\n", - "Gamma=W/V;\n", - "print Gamma,\" is moist unit weight in lb/ft^3\"\n", - "w=(W-Wd)/W;\n", - "print round(w*100,2),\"is moisture content in %\"\n", - "Gammad=Wd/V;\n", - "print Gammad, \"is dry unit weight in lb/ft^3\"\n", - "Vs=Wd/Gs/Gammaw;\n", - "Vv=V-Vs;\n", - "e=Vv/Vs;\n", - "print round(e,3),\" is void ratio\"\n", - "n=e/(1+e);\n", - "print round(n,2),\"is porosity\"\n", - "Vw=(W-Wd)/Gammaw;\n", - "S=Vw/Vv;\n", - "print round(S*100,2),\"is saturation in %\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "123.2 is moist unit weight in lb/ft^3\n", - "8.44 is moisture content in %\n", - "112.8 is dry unit weight in lb/ft^3\n", - "0.494 is void ratio\n", - "0.33 is porosity\n", - "50.43 is saturation in %\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.2:Pg-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.2\n", - "\n", - "e=0.72;\n", - "w=12.0/100; #moisture content\n", - "Gs=2.72;\n", - "Gammaw=9.81;#kN/m^3\n", - "Gammad=Gs*Gammaw/(1+e);\n", - "print round(Gammad,2),\"= dry unit weight in kN/m^3\"\n", - "Gamma=Gs*Gammaw*(1+w)/(1+e);\n", - "print round(Gamma,2),\" = moist unit weight in kN/m^3\"\n", - "Gammasat=(Gs+e)*Gammaw/(1+e);\n", - "wa=Gammasat-Gamma;#water added\n", - "print round(wa,2),\" = water added in kN/m^3\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15.51 = dry unit weight in kN/m^3\n", - "17.38 = moist unit weight in kN/m^3\n", - "2.24 = water added in kN/m^3\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.3:Pg-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.3\n", - "from scipy.optimize import fsolve\n", - "gmax=17.1; # Gammadmax\n", - "Dr=0.7;\n", - "w=8.0/100;#moisture content\n", - "gmin=14.2; #Gammadmin\n", - "def f(x):\n", - " return (x-14.2)/(17.1-14.2)*17.1/x-0.7 \n", - "x=fsolve(f,16);#solving for gammad\n", - "Gamma=x[0]*(1+w);\n", - "print round(Gamma,2),\"moist unit weight in kN/m^3\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "17.4 moist unit weight in kN/m^3\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.7:Pg-38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.7\n", - "import math\n", - "#part (a)\n", - "e1=0.92;\n", - "e2=0.86;\n", - "Hc=2.8; # in m\n", - "s2=212.0;#sigma2dash Load in kN/m2\n", - "s1=140.0;#sigma1dash Load in kN/m2\n", - "Cc=(e1-e2)/math.log10(s2/s1);\n", - "Sc=Cc*Hc/(1+e1)*math.log10(s2/s1);\n", - "print Sc*1000,\"consolidated depth in mm\"\n", - "#part (b)\n", - "# from Figure (1.21):\n", - "Sct=40.0;# in mm\n", - "T50=0.197;\n", - "t=4.5; # in MIN\n", - "Cr=T50*12.7**2.0/t;\n", - "U=Sct/Sc*100.0/1000;\n", - "H=Hc/2;\n", - "Tv=math.pi/4*U**2.0/100**2;\n", - "t=Tv*H**2.0/Cr*1000.0**2/60.0/24;\n", - "print round(t,1),\" is time required in days\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "87.5 consolidated depth in mm\n", - "31.6 is time required in days\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.8:Pg-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.8\n", - "\n", - "Cv=7.061; # in mm^2/min\n", - "tc=15*24*60.0;\n", - "H=2.8/2*1000.0;\n", - "Scmax=87.5; # consolidation\n", - "Tc=Cv*tc/H**2;\n", - "tv=31.6*24*60;\n", - "Tv=Cv*tv/H**2;\n", - "#from figure 1.28\n", - "Sct=Scmax*0.36;\n", - "print Sct,\"is consolidation in 31.6 days in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "31.5 is consolidation in 31.6 days in mm\n" - ] - } - ], - "prompt_number": 28 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter01_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter01_2.ipynb deleted file mode 100755 index 61dc3457..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter01_2.ipynb +++ /dev/null @@ -1,249 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3f5444f542f0d6a3b857b61fbecdc4e8047247ed8828d4cea5a34f91ccdf5eb3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1:Geotechnical Properties of Soil" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.1:Pg-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.1\n", - "\n", - "V=0.25; # ft^3\n", - "W=30.8; #lb\n", - "Wd=28.2; # weight dried lb\n", - "Gs=2.7;\n", - "Gammaw=62.4; #lb/ft^3\n", - "Gamma=W/V;\n", - "print Gamma,\" is moist unit weight in lb/ft^3\"\n", - "w=(W-Wd)/W;\n", - "print round(w*100,2),\"is moisture content in %\"\n", - "Gammad=Wd/V;\n", - "print Gammad, \"is dry unit weight in lb/ft^3\"\n", - "Vs=Wd/Gs/Gammaw;\n", - "Vv=V-Vs;\n", - "e=Vv/Vs;\n", - "print round(e,3),\" is void ratio\"\n", - "n=e/(1+e);\n", - "print round(n,2),\"is porosity\"\n", - "Vw=(W-Wd)/Gammaw;\n", - "S=Vw/Vv;\n", - "print round(S*100,2),\"is saturation in %\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "123.2 is moist unit weight in lb/ft^3\n", - "8.44 is moisture content in %\n", - "112.8 is dry unit weight in lb/ft^3\n", - "0.494 is void ratio\n", - "0.33 is porosity\n", - "50.43 is saturation in %\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.2:Pg-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.2\n", - "\n", - "e=0.72;\n", - "w=12.0/100; #moisture content\n", - "Gs=2.72;\n", - "Gammaw=9.81;#kN/m^3\n", - "Gammad=Gs*Gammaw/(1+e);\n", - "print round(Gammad,2),\"= dry unit weight in kN/m^3\"\n", - "Gamma=Gs*Gammaw*(1+w)/(1+e);\n", - "print round(Gamma,2),\" = moist unit weight in kN/m^3\"\n", - "Gammasat=(Gs+e)*Gammaw/(1+e);\n", - "wa=Gammasat-Gamma;#water added\n", - "print round(wa,2),\" = water added in kN/m^3\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15.51 = dry unit weight in kN/m^3\n", - "17.38 = moist unit weight in kN/m^3\n", - "2.24 = water added in kN/m^3\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.3:Pg-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.3\n", - "from scipy.optimize import fsolve\n", - "gmax=17.1; # Gammadmax\n", - "Dr=0.7;\n", - "w=8.0/100;#moisture content\n", - "gmin=14.2; #Gammadmin\n", - "def f(x):\n", - " return (x-14.2)/(17.1-14.2)*17.1/x-0.7 \n", - "x=fsolve(f,16);#solving for gammad\n", - "Gamma=x[0]*(1+w);\n", - "print round(Gamma,2),\"moist unit weight in kN/m^3\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "17.4 moist unit weight in kN/m^3\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.7:Pg-38" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.7\n", - "import math\n", - "#part (a)\n", - "e1=0.92;\n", - "e2=0.86;\n", - "Hc=2.8; # in m\n", - "s2=212.0;#sigma2dash Load in kN/m2\n", - "s1=140.0;#sigma1dash Load in kN/m2\n", - "Cc=(e1-e2)/math.log10(s2/s1);\n", - "Sc=Cc*Hc/(1+e1)*math.log10(s2/s1);\n", - "print Sc*1000,\"consolidated depth in mm\"\n", - "#part (b)\n", - "# from Figure (1.21):\n", - "Sct=40.0;# in mm\n", - "T50=0.197;\n", - "t=4.5; # in MIN\n", - "Cr=T50*12.7**2.0/t;\n", - "U=Sct/Sc*100.0/1000;\n", - "H=Hc/2;\n", - "Tv=math.pi/4*U**2.0/100**2;\n", - "t=Tv*H**2.0/Cr*1000.0**2/60.0/24;\n", - "print round(t,1),\" is time required in days\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "87.5 consolidated depth in mm\n", - "31.6 is time required in days\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex1.8:Pg-42" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 1.8\n", - "\n", - "Cv=7.061; # in mm^2/min\n", - "tc=15*24*60.0;\n", - "H=2.8/2*1000.0;\n", - "Scmax=87.5; # consolidation\n", - "Tc=Cv*tc/H**2;\n", - "tv=31.6*24*60;\n", - "Tv=Cv*tv/H**2;\n", - "#from figure 1.28\n", - "Sct=Scmax*0.36;\n", - "print Sct,\"is consolidation in 31.6 days in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "31.5 is consolidation in 31.6 days in mm\n" - ] - } - ], - "prompt_number": 28 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter02.ipynb b/Principles_Of_Foundation_Engineering/Chapter02.ipynb deleted file mode 100755 index f284c073..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter02.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1d0e8ca0a27c4b0cb17e7318d009efc3241a84a31e3f27c8ca705f6cb5276ce4" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 02:Natural Soil Deposits and Subsoil Exploration" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.1:Pg-109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2.1\n", - "import matplotlib.pyplot as plt\n", - "import numpy\n", - "import math\n", - "Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];\n", - "Time=(10**(-3))*numpy.array([11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5])\n", - "#part1\n", - "distance=5.25; # in meter\n", - "time=23e-3; # in second\n", - "v1=distance/time;\n", - "print round(v1,2),\"is speed in m/s\"\n", - "#part2\n", - "distance=11; # in meter\n", - "time=13.5e-3;# in second\n", - "v2=distance/time;\n", - "print round(v2,2),\" is speed in m/s\"\n", - "#part3\n", - "distance=14.75;# in meter\n", - "time=3.5e-3;# in second\n", - "v3=distance/time;\n", - "print round(v3,2),\"speed in m/s\"\n", - "plt.plot(Distance,Time);\n", - "plt.title(\"distance vs time\")\n", - "plt.xlabel(\"Distance in m\")\n", - "plt.ylabel(\"time in s\")\n", - "plt.show()\n", - "#part4\n", - "xc=10.4;\n", - "Ta=65e-3;\n", - "Z1=1/2.0*math.sqrt((v2-v1)/(v2+v1))*xc;\n", - "print round(Z1,2),\" is thickness of layer 1 in m\"\n", - "Z2=1/2.0*(Ta-2*Z1*math.sqrt(v3**2-v1**2)/v3/v1)*v3*v2/math.sqrt(v3**2-v2**2);\n", - "print round(Z2,2),\" is thickness of layer 2 in m\"\n", - "\n", - "# the answers are slightly different in textbook due to approximation while here answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "228.26 is speed in m/s\n", - "814.81 is speed in m/s\n", - "4214.29 speed in m/s\n", - "3.9" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " is thickness of layer 1 in m\n", - "12.82 is thickness of layer 2 in m\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter02_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter02_1.ipynb deleted file mode 100755 index f284c073..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter02_1.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1d0e8ca0a27c4b0cb17e7318d009efc3241a84a31e3f27c8ca705f6cb5276ce4" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 02:Natural Soil Deposits and Subsoil Exploration" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.1:Pg-109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2.1\n", - "import matplotlib.pyplot as plt\n", - "import numpy\n", - "import math\n", - "Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];\n", - "Time=(10**(-3))*numpy.array([11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5])\n", - "#part1\n", - "distance=5.25; # in meter\n", - "time=23e-3; # in second\n", - "v1=distance/time;\n", - "print round(v1,2),\"is speed in m/s\"\n", - "#part2\n", - "distance=11; # in meter\n", - "time=13.5e-3;# in second\n", - "v2=distance/time;\n", - "print round(v2,2),\" is speed in m/s\"\n", - "#part3\n", - "distance=14.75;# in meter\n", - "time=3.5e-3;# in second\n", - "v3=distance/time;\n", - "print round(v3,2),\"speed in m/s\"\n", - "plt.plot(Distance,Time);\n", - "plt.title(\"distance vs time\")\n", - "plt.xlabel(\"Distance in m\")\n", - "plt.ylabel(\"time in s\")\n", - "plt.show()\n", - "#part4\n", - "xc=10.4;\n", - "Ta=65e-3;\n", - "Z1=1/2.0*math.sqrt((v2-v1)/(v2+v1))*xc;\n", - "print round(Z1,2),\" is thickness of layer 1 in m\"\n", - "Z2=1/2.0*(Ta-2*Z1*math.sqrt(v3**2-v1**2)/v3/v1)*v3*v2/math.sqrt(v3**2-v2**2);\n", - "print round(Z2,2),\" is thickness of layer 2 in m\"\n", - "\n", - "# the answers are slightly different in textbook due to approximation while here answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "228.26 is speed in m/s\n", - "814.81 is speed in m/s\n", - "4214.29 speed in m/s\n", - "3.9" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " is thickness of layer 1 in m\n", - "12.82 is thickness of layer 2 in m\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter02_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter02_2.ipynb deleted file mode 100755 index f284c073..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter02_2.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1d0e8ca0a27c4b0cb17e7318d009efc3241a84a31e3f27c8ca705f6cb5276ce4" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 02:Natural Soil Deposits and Subsoil Exploration" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex2.1:Pg-109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 2.1\n", - "import matplotlib.pyplot as plt\n", - "import numpy\n", - "import math\n", - "Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];\n", - "Time=(10**(-3))*numpy.array([11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5])\n", - "#part1\n", - "distance=5.25; # in meter\n", - "time=23e-3; # in second\n", - "v1=distance/time;\n", - "print round(v1,2),\"is speed in m/s\"\n", - "#part2\n", - "distance=11; # in meter\n", - "time=13.5e-3;# in second\n", - "v2=distance/time;\n", - "print round(v2,2),\" is speed in m/s\"\n", - "#part3\n", - "distance=14.75;# in meter\n", - "time=3.5e-3;# in second\n", - "v3=distance/time;\n", - "print round(v3,2),\"speed in m/s\"\n", - "plt.plot(Distance,Time);\n", - "plt.title(\"distance vs time\")\n", - "plt.xlabel(\"Distance in m\")\n", - "plt.ylabel(\"time in s\")\n", - "plt.show()\n", - "#part4\n", - "xc=10.4;\n", - "Ta=65e-3;\n", - "Z1=1/2.0*math.sqrt((v2-v1)/(v2+v1))*xc;\n", - "print round(Z1,2),\" is thickness of layer 1 in m\"\n", - "Z2=1/2.0*(Ta-2*Z1*math.sqrt(v3**2-v1**2)/v3/v1)*v3*v2/math.sqrt(v3**2-v2**2);\n", - "print round(Z2,2),\" is thickness of layer 2 in m\"\n", - "\n", - "# the answers are slightly different in textbook due to approximation while here answers are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "228.26 is speed in m/s\n", - "814.81 is speed in m/s\n", - "4214.29 speed in m/s\n", - "3.9" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " is thickness of layer 1 in m\n", - "12.82 is thickness of layer 2 in m\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter03.ipynb b/Principles_Of_Foundation_Engineering/Chapter03.ipynb deleted file mode 100755 index 520b4f21..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter03.ipynb +++ /dev/null @@ -1,412 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e3a75199f67af72d14bee528a629ae06b2506206625e1ef3a86291ef88f556ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 03:Shallow Foundations: Ultimate bearing capacity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.1:Pg-130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.1\n", - "# From Table 3.1\n", - "Nc=17.69;\n", - "Nq=7.44;\n", - "Ny=3.64;\n", - "q=3*115;\n", - "Gamma=115.0; #lb/ft**3\n", - "c=320;\n", - "B=5.0;#ft\n", - "FS=4;#factor of safety\n", - "qu=1.3*c*Nc+q*Nq+0.4*Gamma*B*Ny\n", - "qall=qu/FS; #q allowed\n", - "Q=qall*B**2;\n", - "print Q,\"is allowable gross load in lb\" \n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "67269.0 is allowable gross load in lb\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.2:Pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.2\n", - "\n", - "from scipy.optimize import fsolve\n", - "import math\n", - "Gamma=105.0;#lb/ft**3\n", - "Gammasat=118.0;#lb/ft**3\n", - "FS=3.0;\n", - "pa=2014.125;#lb/ft**2\n", - "Depth=[5,10,15,20,25]; # in ft\n", - "N60=[4,6,6,10,5]; # in blow/ft\n", - "sigmao=[0,0,0,0,0]; # in lb/ft^2\n", - "phi=[0,0,0,0,0] # in degree\n", - "Gammaw=62.4;\n", - "s=0;\n", - "print \"depth (ft)\\tN60\\t \\tstress(lb/ft**2)\\t phi(degrees)\\n\"\n", - "for i in range(0,5):\n", - " sigmao[i]=2*Gamma+(Depth[i]-2)*(Gammasat-Gammaw);\n", - " phi[i]=math.sqrt(20*N60[i]*math.sqrt(pa/sigmao[i]))+20;\n", - " print \" \",Depth[i],\"\\t \",N60[i],\"\\t\\t \",sigmao[i],\" \\t \\t \\t\",round(phi[i],1),\" \\n\"\n", - " s=phi[i]+s\n", - "\n", - "avgphi=s/(i+1)\n", - "\n", - "print round(avgphi),\"average friction angle in degrees\"\n", - "#using graph get the values of other terms in terms of B and solve for B\n", - "def f(x):\n", - " return-150000/x**2+5263.9+5527.1/x+228.3*x\n", - "x=fsolve(f,4);\n", - "print round(x[0],1),\" is the width in ft\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "depth (ft)\tN60\t \tstress(lb/ft**2)\t phi(degrees)\n", - "\n", - " 5 \t 4 \t\t 376.8 \t \t \t33.6 \n", - "\n", - " 10 \t 6 \t\t 654.8 \t \t \t34.5 \n", - "\n", - " 15 \t 6 \t\t 932.8 \t \t \t33.3 \n", - "\n", - " 20 \t 10 \t\t 1210.8 \t \t \t36.1 \n", - "\n", - " 25 \t 5 \t\t 1488.8 \t \t \t30.8 \n", - "\n", - "34.0 average friction angle in degrees\n", - "4.5 is the width in ft\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.3:Pg-144" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.3\n", - "\n", - "import math\n", - "phi=25.0; #degrees\n", - "Es=620.0; #kN/m**2\n", - "Gamma=18.0;#kN/m**2\n", - "Df=0.6;# in m\n", - "B=0.6; # in m\n", - "L=1.2; # in m\n", - "Fqc=0.347;\n", - "Nq=10.66;\n", - "Nc=20.72;\n", - "Ngamma=10.88;\n", - "mu=0.3; # Poisson's ratio\n", - "Fyd=1.0;\n", - "c=48.0;#kN/m**2\n", - "q=Gamma*(Df+B/2);\n", - "Ir=Es/(2*(1+mu)*(c+q*math.tan(phi*math.pi/180.0)));\n", - "print round(Ir,2),\" is value of Ir\"\n", - "Fcc=Fqc-(1-Fqc)/(Nq*math.tan(phi*math.pi/180.0));\n", - "Fcs=1+Nq/Nc*B/L;\n", - "Fqs=1+B/L*math.tan(phi*math.pi/180.0);\n", - "Fys=1-0.4*B/L;\n", - "Fcd=1+0.4*Df/B;\n", - "Fqd=1+2.0*math.tan(phi*math.pi/180.0)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", - "q1=0.6*18;\n", - "Fyc=Fqc;\n", - "qu=c*Nc*Fcs*Fcd*Fcc+q1*Nq*Fqs*Fqd*Fqc+1.0/2*Gamma*Ngamma*Fys*Fyd*Fyc;\n", - "print round(qu,2),\"is ultimate bearing capacity in kN/m**2\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4.29 is value of Ir\n", - "469.24 is ultimate bearing capacity in kN/m**2\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.4:Pg-156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.4\n", - "import math\n", - "q=110*4.0; #lb/ft**2\n", - "Nq=33.3;\n", - "phi=35.0; # in degree\n", - "Df=4.0; # in ft\n", - "B=6.0; # in ft\n", - "Gamma=110.0;#lb/ft**3\n", - "Ngamma=48.03; #lb/ft**3\n", - "B1=6-2*0.5; # in ft\n", - "Fqi=1;\n", - "Fyi=1;\n", - "Fyd=1;\n", - "Fqs=1;\n", - "Fys=1;\n", - "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", - "qu=q*Nq*Fqs*Fqd*Fqi+1/2.0*B1*Gamma*Ngamma*Fys*Fyd*Fyi;\n", - "Qult=B1*1*qu;\n", - "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\" \n", - "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "151738.23 is ultimate bearing capacity in lb/ft\n", - "75.87 is ultimate bearing capacity in ton/ft\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.5:Pg-158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.5\n", - "\n", - "e=0.5; # in ft\n", - "B=6; # in ft\n", - "k=e/B;\n", - "Gamma=110; # in lb/ft^3 \n", - "q=440;\n", - "print \"get the values of Nqe and Nye from the figure from the value of e/B\"\n", - "Nye=26.8;\n", - "Nqe=33.4;\n", - "Qult=B*1*(q*Nqe+1/2.0*Gamma*B*Nye);\n", - "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\"\n", - "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "get the values of Nqe and Nye from the figure from the value of e/B\n", - "141240.0 is ultimate bearing capacity in lb/ft\n", - "70.62 is ultimate bearing capacity in ton/ft\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.6:Pg-159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.6\n", - "\n", - "Df=0.7; # in m\n", - "#from table\n", - "Nq=18.4;\n", - "Ny=22.4;\n", - "q=12.6;\n", - "phi=30; #angle in degree\n", - "L=1.5;# in m\n", - "Fyd=1;\n", - "Gamma=18; # in KN/m^3\n", - "L1=0.85*1.5; # in m\n", - "L2=0.21*1.5; # in m\n", - "B=1.5; # in m\n", - "A=1/2.0*(L1+L2)*B;\n", - "B1=A/L1; #B'\n", - "Fqs=1+B1/L1*math.tan(phi*math.pi/180);\n", - "Fys=1-0.4*B1/L1;\n", - "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180))**2*Df/B;\n", - "Qult=A*(q*Nq*Fqs*Fqd+1/2.0*Gamma*B1*Ny*Fys*Fyd);\n", - "print round(Qult,2),\" is ultimate load in kN\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "605.45 is ultimate load in kN\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.7:Pg-161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.7\n", - "\n", - "e=0.15; # in m\n", - "B=1.5; # in m\n", - "Fqs=1.0;\n", - "L=1.5;# in m\n", - "Gamma=18.0; # in KN/m^3\n", - "q=0.7*18;\n", - "#from table\n", - "Nqe=18.4;\n", - "Nye=11.58;\n", - "Fys=1+(2*e/B-0.68)*(B/L)+(0.43-3/2.0*e/B)*(B/L)**2;\n", - "Qult=B*L*(q*Nqe*Fqs+1/2.0*L*Gamma*Nye*Fys);\n", - "print round(Qult,2),\"is ultimate load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "803.03 is ultimate load in kN\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.8:Pg-163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.8\n", - "\n", - "q=16.0;# in kN/m^2\n", - "Nqei=14.2;\n", - "Gamma=16.0 # in kN/m^3\n", - "B=1.5;# in m\n", - "Nyet=20.0;\n", - "Qult=B*(Nqei*q+1/2.0*Gamma*B*Nyet);\n", - "print round(Qult,2),\" is ultimate load in kN/m\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "700.8 is ultimate load in kN/m\n" - ] - } - ], - "prompt_number": 48 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter03_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter03_1.ipynb deleted file mode 100755 index 520b4f21..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter03_1.ipynb +++ /dev/null @@ -1,412 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e3a75199f67af72d14bee528a629ae06b2506206625e1ef3a86291ef88f556ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 03:Shallow Foundations: Ultimate bearing capacity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.1:Pg-130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.1\n", - "# From Table 3.1\n", - "Nc=17.69;\n", - "Nq=7.44;\n", - "Ny=3.64;\n", - "q=3*115;\n", - "Gamma=115.0; #lb/ft**3\n", - "c=320;\n", - "B=5.0;#ft\n", - "FS=4;#factor of safety\n", - "qu=1.3*c*Nc+q*Nq+0.4*Gamma*B*Ny\n", - "qall=qu/FS; #q allowed\n", - "Q=qall*B**2;\n", - "print Q,\"is allowable gross load in lb\" \n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "67269.0 is allowable gross load in lb\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.2:Pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.2\n", - "\n", - "from scipy.optimize import fsolve\n", - "import math\n", - "Gamma=105.0;#lb/ft**3\n", - "Gammasat=118.0;#lb/ft**3\n", - "FS=3.0;\n", - "pa=2014.125;#lb/ft**2\n", - "Depth=[5,10,15,20,25]; # in ft\n", - "N60=[4,6,6,10,5]; # in blow/ft\n", - "sigmao=[0,0,0,0,0]; # in lb/ft^2\n", - "phi=[0,0,0,0,0] # in degree\n", - "Gammaw=62.4;\n", - "s=0;\n", - "print \"depth (ft)\\tN60\\t \\tstress(lb/ft**2)\\t phi(degrees)\\n\"\n", - "for i in range(0,5):\n", - " sigmao[i]=2*Gamma+(Depth[i]-2)*(Gammasat-Gammaw);\n", - " phi[i]=math.sqrt(20*N60[i]*math.sqrt(pa/sigmao[i]))+20;\n", - " print \" \",Depth[i],\"\\t \",N60[i],\"\\t\\t \",sigmao[i],\" \\t \\t \\t\",round(phi[i],1),\" \\n\"\n", - " s=phi[i]+s\n", - "\n", - "avgphi=s/(i+1)\n", - "\n", - "print round(avgphi),\"average friction angle in degrees\"\n", - "#using graph get the values of other terms in terms of B and solve for B\n", - "def f(x):\n", - " return-150000/x**2+5263.9+5527.1/x+228.3*x\n", - "x=fsolve(f,4);\n", - "print round(x[0],1),\" is the width in ft\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "depth (ft)\tN60\t \tstress(lb/ft**2)\t phi(degrees)\n", - "\n", - " 5 \t 4 \t\t 376.8 \t \t \t33.6 \n", - "\n", - " 10 \t 6 \t\t 654.8 \t \t \t34.5 \n", - "\n", - " 15 \t 6 \t\t 932.8 \t \t \t33.3 \n", - "\n", - " 20 \t 10 \t\t 1210.8 \t \t \t36.1 \n", - "\n", - " 25 \t 5 \t\t 1488.8 \t \t \t30.8 \n", - "\n", - "34.0 average friction angle in degrees\n", - "4.5 is the width in ft\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.3:Pg-144" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.3\n", - "\n", - "import math\n", - "phi=25.0; #degrees\n", - "Es=620.0; #kN/m**2\n", - "Gamma=18.0;#kN/m**2\n", - "Df=0.6;# in m\n", - "B=0.6; # in m\n", - "L=1.2; # in m\n", - "Fqc=0.347;\n", - "Nq=10.66;\n", - "Nc=20.72;\n", - "Ngamma=10.88;\n", - "mu=0.3; # Poisson's ratio\n", - "Fyd=1.0;\n", - "c=48.0;#kN/m**2\n", - "q=Gamma*(Df+B/2);\n", - "Ir=Es/(2*(1+mu)*(c+q*math.tan(phi*math.pi/180.0)));\n", - "print round(Ir,2),\" is value of Ir\"\n", - "Fcc=Fqc-(1-Fqc)/(Nq*math.tan(phi*math.pi/180.0));\n", - "Fcs=1+Nq/Nc*B/L;\n", - "Fqs=1+B/L*math.tan(phi*math.pi/180.0);\n", - "Fys=1-0.4*B/L;\n", - "Fcd=1+0.4*Df/B;\n", - "Fqd=1+2.0*math.tan(phi*math.pi/180.0)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", - "q1=0.6*18;\n", - "Fyc=Fqc;\n", - "qu=c*Nc*Fcs*Fcd*Fcc+q1*Nq*Fqs*Fqd*Fqc+1.0/2*Gamma*Ngamma*Fys*Fyd*Fyc;\n", - "print round(qu,2),\"is ultimate bearing capacity in kN/m**2\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4.29 is value of Ir\n", - "469.24 is ultimate bearing capacity in kN/m**2\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.4:Pg-156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.4\n", - "import math\n", - "q=110*4.0; #lb/ft**2\n", - "Nq=33.3;\n", - "phi=35.0; # in degree\n", - "Df=4.0; # in ft\n", - "B=6.0; # in ft\n", - "Gamma=110.0;#lb/ft**3\n", - "Ngamma=48.03; #lb/ft**3\n", - "B1=6-2*0.5; # in ft\n", - "Fqi=1;\n", - "Fyi=1;\n", - "Fyd=1;\n", - "Fqs=1;\n", - "Fys=1;\n", - "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", - "qu=q*Nq*Fqs*Fqd*Fqi+1/2.0*B1*Gamma*Ngamma*Fys*Fyd*Fyi;\n", - "Qult=B1*1*qu;\n", - "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\" \n", - "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "151738.23 is ultimate bearing capacity in lb/ft\n", - "75.87 is ultimate bearing capacity in ton/ft\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.5:Pg-158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.5\n", - "\n", - "e=0.5; # in ft\n", - "B=6; # in ft\n", - "k=e/B;\n", - "Gamma=110; # in lb/ft^3 \n", - "q=440;\n", - "print \"get the values of Nqe and Nye from the figure from the value of e/B\"\n", - "Nye=26.8;\n", - "Nqe=33.4;\n", - "Qult=B*1*(q*Nqe+1/2.0*Gamma*B*Nye);\n", - "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\"\n", - "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "get the values of Nqe and Nye from the figure from the value of e/B\n", - "141240.0 is ultimate bearing capacity in lb/ft\n", - "70.62 is ultimate bearing capacity in ton/ft\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.6:Pg-159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.6\n", - "\n", - "Df=0.7; # in m\n", - "#from table\n", - "Nq=18.4;\n", - "Ny=22.4;\n", - "q=12.6;\n", - "phi=30; #angle in degree\n", - "L=1.5;# in m\n", - "Fyd=1;\n", - "Gamma=18; # in KN/m^3\n", - "L1=0.85*1.5; # in m\n", - "L2=0.21*1.5; # in m\n", - "B=1.5; # in m\n", - "A=1/2.0*(L1+L2)*B;\n", - "B1=A/L1; #B'\n", - "Fqs=1+B1/L1*math.tan(phi*math.pi/180);\n", - "Fys=1-0.4*B1/L1;\n", - "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180))**2*Df/B;\n", - "Qult=A*(q*Nq*Fqs*Fqd+1/2.0*Gamma*B1*Ny*Fys*Fyd);\n", - "print round(Qult,2),\" is ultimate load in kN\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "605.45 is ultimate load in kN\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.7:Pg-161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.7\n", - "\n", - "e=0.15; # in m\n", - "B=1.5; # in m\n", - "Fqs=1.0;\n", - "L=1.5;# in m\n", - "Gamma=18.0; # in KN/m^3\n", - "q=0.7*18;\n", - "#from table\n", - "Nqe=18.4;\n", - "Nye=11.58;\n", - "Fys=1+(2*e/B-0.68)*(B/L)+(0.43-3/2.0*e/B)*(B/L)**2;\n", - "Qult=B*L*(q*Nqe*Fqs+1/2.0*L*Gamma*Nye*Fys);\n", - "print round(Qult,2),\"is ultimate load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "803.03 is ultimate load in kN\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.8:Pg-163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.8\n", - "\n", - "q=16.0;# in kN/m^2\n", - "Nqei=14.2;\n", - "Gamma=16.0 # in kN/m^3\n", - "B=1.5;# in m\n", - "Nyet=20.0;\n", - "Qult=B*(Nqei*q+1/2.0*Gamma*B*Nyet);\n", - "print round(Qult,2),\" is ultimate load in kN/m\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "700.8 is ultimate load in kN/m\n" - ] - } - ], - "prompt_number": 48 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter03_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter03_2.ipynb deleted file mode 100755 index 520b4f21..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter03_2.ipynb +++ /dev/null @@ -1,412 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e3a75199f67af72d14bee528a629ae06b2506206625e1ef3a86291ef88f556ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 03:Shallow Foundations: Ultimate bearing capacity" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.1:Pg-130" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.1\n", - "# From Table 3.1\n", - "Nc=17.69;\n", - "Nq=7.44;\n", - "Ny=3.64;\n", - "q=3*115;\n", - "Gamma=115.0; #lb/ft**3\n", - "c=320;\n", - "B=5.0;#ft\n", - "FS=4;#factor of safety\n", - "qu=1.3*c*Nc+q*Nq+0.4*Gamma*B*Ny\n", - "qall=qu/FS; #q allowed\n", - "Q=qall*B**2;\n", - "print Q,\"is allowable gross load in lb\" \n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "67269.0 is allowable gross load in lb\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.2:Pg-134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.2\n", - "\n", - "from scipy.optimize import fsolve\n", - "import math\n", - "Gamma=105.0;#lb/ft**3\n", - "Gammasat=118.0;#lb/ft**3\n", - "FS=3.0;\n", - "pa=2014.125;#lb/ft**2\n", - "Depth=[5,10,15,20,25]; # in ft\n", - "N60=[4,6,6,10,5]; # in blow/ft\n", - "sigmao=[0,0,0,0,0]; # in lb/ft^2\n", - "phi=[0,0,0,0,0] # in degree\n", - "Gammaw=62.4;\n", - "s=0;\n", - "print \"depth (ft)\\tN60\\t \\tstress(lb/ft**2)\\t phi(degrees)\\n\"\n", - "for i in range(0,5):\n", - " sigmao[i]=2*Gamma+(Depth[i]-2)*(Gammasat-Gammaw);\n", - " phi[i]=math.sqrt(20*N60[i]*math.sqrt(pa/sigmao[i]))+20;\n", - " print \" \",Depth[i],\"\\t \",N60[i],\"\\t\\t \",sigmao[i],\" \\t \\t \\t\",round(phi[i],1),\" \\n\"\n", - " s=phi[i]+s\n", - "\n", - "avgphi=s/(i+1)\n", - "\n", - "print round(avgphi),\"average friction angle in degrees\"\n", - "#using graph get the values of other terms in terms of B and solve for B\n", - "def f(x):\n", - " return-150000/x**2+5263.9+5527.1/x+228.3*x\n", - "x=fsolve(f,4);\n", - "print round(x[0],1),\" is the width in ft\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "depth (ft)\tN60\t \tstress(lb/ft**2)\t phi(degrees)\n", - "\n", - " 5 \t 4 \t\t 376.8 \t \t \t33.6 \n", - "\n", - " 10 \t 6 \t\t 654.8 \t \t \t34.5 \n", - "\n", - " 15 \t 6 \t\t 932.8 \t \t \t33.3 \n", - "\n", - " 20 \t 10 \t\t 1210.8 \t \t \t36.1 \n", - "\n", - " 25 \t 5 \t\t 1488.8 \t \t \t30.8 \n", - "\n", - "34.0 average friction angle in degrees\n", - "4.5 is the width in ft\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.3:Pg-144" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.3\n", - "\n", - "import math\n", - "phi=25.0; #degrees\n", - "Es=620.0; #kN/m**2\n", - "Gamma=18.0;#kN/m**2\n", - "Df=0.6;# in m\n", - "B=0.6; # in m\n", - "L=1.2; # in m\n", - "Fqc=0.347;\n", - "Nq=10.66;\n", - "Nc=20.72;\n", - "Ngamma=10.88;\n", - "mu=0.3; # Poisson's ratio\n", - "Fyd=1.0;\n", - "c=48.0;#kN/m**2\n", - "q=Gamma*(Df+B/2);\n", - "Ir=Es/(2*(1+mu)*(c+q*math.tan(phi*math.pi/180.0)));\n", - "print round(Ir,2),\" is value of Ir\"\n", - "Fcc=Fqc-(1-Fqc)/(Nq*math.tan(phi*math.pi/180.0));\n", - "Fcs=1+Nq/Nc*B/L;\n", - "Fqs=1+B/L*math.tan(phi*math.pi/180.0);\n", - "Fys=1-0.4*B/L;\n", - "Fcd=1+0.4*Df/B;\n", - "Fqd=1+2.0*math.tan(phi*math.pi/180.0)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", - "q1=0.6*18;\n", - "Fyc=Fqc;\n", - "qu=c*Nc*Fcs*Fcd*Fcc+q1*Nq*Fqs*Fqd*Fqc+1.0/2*Gamma*Ngamma*Fys*Fyd*Fyc;\n", - "print round(qu,2),\"is ultimate bearing capacity in kN/m**2\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4.29 is value of Ir\n", - "469.24 is ultimate bearing capacity in kN/m**2\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.4:Pg-156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.4\n", - "import math\n", - "q=110*4.0; #lb/ft**2\n", - "Nq=33.3;\n", - "phi=35.0; # in degree\n", - "Df=4.0; # in ft\n", - "B=6.0; # in ft\n", - "Gamma=110.0;#lb/ft**3\n", - "Ngamma=48.03; #lb/ft**3\n", - "B1=6-2*0.5; # in ft\n", - "Fqi=1;\n", - "Fyi=1;\n", - "Fyd=1;\n", - "Fqs=1;\n", - "Fys=1;\n", - "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", - "qu=q*Nq*Fqs*Fqd*Fqi+1/2.0*B1*Gamma*Ngamma*Fys*Fyd*Fyi;\n", - "Qult=B1*1*qu;\n", - "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\" \n", - "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "151738.23 is ultimate bearing capacity in lb/ft\n", - "75.87 is ultimate bearing capacity in ton/ft\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.5:Pg-158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.5\n", - "\n", - "e=0.5; # in ft\n", - "B=6; # in ft\n", - "k=e/B;\n", - "Gamma=110; # in lb/ft^3 \n", - "q=440;\n", - "print \"get the values of Nqe and Nye from the figure from the value of e/B\"\n", - "Nye=26.8;\n", - "Nqe=33.4;\n", - "Qult=B*1*(q*Nqe+1/2.0*Gamma*B*Nye);\n", - "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\"\n", - "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "get the values of Nqe and Nye from the figure from the value of e/B\n", - "141240.0 is ultimate bearing capacity in lb/ft\n", - "70.62 is ultimate bearing capacity in ton/ft\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.6:Pg-159" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.6\n", - "\n", - "Df=0.7; # in m\n", - "#from table\n", - "Nq=18.4;\n", - "Ny=22.4;\n", - "q=12.6;\n", - "phi=30; #angle in degree\n", - "L=1.5;# in m\n", - "Fyd=1;\n", - "Gamma=18; # in KN/m^3\n", - "L1=0.85*1.5; # in m\n", - "L2=0.21*1.5; # in m\n", - "B=1.5; # in m\n", - "A=1/2.0*(L1+L2)*B;\n", - "B1=A/L1; #B'\n", - "Fqs=1+B1/L1*math.tan(phi*math.pi/180);\n", - "Fys=1-0.4*B1/L1;\n", - "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180))**2*Df/B;\n", - "Qult=A*(q*Nq*Fqs*Fqd+1/2.0*Gamma*B1*Ny*Fys*Fyd);\n", - "print round(Qult,2),\" is ultimate load in kN\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation but here answer are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "605.45 is ultimate load in kN\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.7:Pg-161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.7\n", - "\n", - "e=0.15; # in m\n", - "B=1.5; # in m\n", - "Fqs=1.0;\n", - "L=1.5;# in m\n", - "Gamma=18.0; # in KN/m^3\n", - "q=0.7*18;\n", - "#from table\n", - "Nqe=18.4;\n", - "Nye=11.58;\n", - "Fys=1+(2*e/B-0.68)*(B/L)+(0.43-3/2.0*e/B)*(B/L)**2;\n", - "Qult=B*L*(q*Nqe*Fqs+1/2.0*L*Gamma*Nye*Fys);\n", - "print round(Qult,2),\"is ultimate load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "803.03 is ultimate load in kN\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex3.8:Pg-163" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 3.8\n", - "\n", - "q=16.0;# in kN/m^2\n", - "Nqei=14.2;\n", - "Gamma=16.0 # in kN/m^3\n", - "B=1.5;# in m\n", - "Nyet=20.0;\n", - "Qult=B*(Nqei*q+1/2.0*Gamma*B*Nyet);\n", - "print round(Qult,2),\" is ultimate load in kN/m\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "700.8 is ultimate load in kN/m\n" - ] - } - ], - "prompt_number": 48 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter04.ipynb b/Principles_Of_Foundation_Engineering/Chapter04.ipynb deleted file mode 100755 index da8b3fb8..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter04.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:84b2322c895fb47191307e7a54e3a6dc70036edd44f1781ba096e1e048c5f743" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 04:Ultimate Bearing Capacity of Shallow Foundations: Special Cases" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.1:Pg-176" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.1\n", - "\n", - "FS=4.0; # FOS\n", - "q=110*2.0; # in 1b/ft^2\n", - "Nq=90.0;\n", - "Ny=50.0;\n", - "Gamma=110.0; # in 1b/ft^3\n", - "m1=0.34; # From Figure 4.6(a)\n", - "B=2.5; # in ft\n", - "L=2.5; # in ft\n", - "H=1.5; # in ft\n", - "phi=35; # in degree\n", - "m2=0.45; # From Figure 4.6(b)\n", - "Fqs=1-0.34*B/L;\n", - "Fys=1-0.45*B/L;\n", - "qu=q*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", - "Qall=qu*B**2/FS;\n", - "print round(Qall,2),\"bearing load in lb\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "26326.95 bearing load in lb\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.2:Pg-177" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.2\n", - "\n", - "FS=3.0; # FOS\n", - "cu=72.0;\n", - "q=18.0; # in kN/m^3\n", - "B=1.0;# in m\n", - "H=0.25;# in m\n", - "qu=5.14*(1+(0.5*B/H-0.707)/5.14)*cu+q;\n", - "qall=qu/FS;\n", - "print round(qall,1),\"bearing capacity of soil in kN/m**2\" \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "160.4 bearing capacity of soil in kN/m**2\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.3:Pg-183" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.3\n", - "import math\n", - "k=0; #B/L;\n", - "c2=30;\n", - "Gamma=17.5; # in kN/m^3\n", - "H=1.5; # in m\n", - "Df=1.2; # in m\n", - "B=2.0; # in m\n", - "Ks=2.5;\n", - "phi=40; # in degree\n", - "pi=math.pi;\n", - "qu=(1+0.2*k)*5.14*c2+(1+k)*Gamma*H**2*(1+2*Df/H)*Ks*math.tan(phi*pi/180)/B+Gamma*H;\n", - "Qu=qu*B;\n", - "print round(Qu,2),\"is bearing capacity in kN/m\"\n", - "print \"there is slight variation due to rounding off error\"\n", - "#soil 2\n", - "Ny=109.4;\n", - "Nq=64.2;\n", - "Fqs=1;\n", - "Fys=1;\n", - "qt=Gamma*Df*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", - "print qt,\"bearing capacity in kN/m**2\"\n", - "\n", - "# answer in book is different due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "575.66 is bearing capacity in kN/m\n", - "there is slight variation due to rounding off error\n", - "3262.7 bearing capacity in kN/m**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.4:Pg-184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.4\n", - "\n", - "B=1.0; # in m\n", - "L=1.5;# in m\n", - "c2=48;# in m\n", - "ca=108; # in KN/m^2\n", - "D=1.0;# in m\n", - "H=1.0;# in m\n", - "Gamma=16.8; # in KN/m^3\n", - "FS=4;\n", - "qu=(1+0.2*B/L)*5.14*c2+(1+B/L)*2*ca*H/B+Gamma*D; # in KN/m^2\n", - "c1=120.0;\n", - "gamma1=16.8; # in kN/m^3\n", - "Df=1.0;\n", - "qt=(1+0.2*B/L)*5.14*c1+gamma1*Df;\n", - "print qt,\"is qt in kN/m**2\"\n", - "print \"no need to calculate qt since it is not useful for calculation\"\n", - "print qu/FS,\"is allowable shear stress in kN/m**2\"\n", - "print qu/FS*1*1.5,\" is allowable load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "715.84 is qt in kN/m**2\n", - "no need to calculate qt since it is not useful for calculation\n", - "164.104 is allowable shear stress in kN/m**2\n", - "246.156 is allowable load in kN\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.5:Pg-190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.5\n", - "\n", - "c=50; # in KN/m^2\n", - "#from table\n", - "Ncq=6.3;\n", - "FS=4.0;# FOS\n", - "qu=c*Ncq; # in KN/m^2\n", - "qall=qu/4;\n", - "print qall,\"allowed shear stress in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "78.75 allowed shear stress in kN/m**2\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.6:Pg-191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.6\n", - "\n", - "Gamma=16.8; # in kN/m^3\n", - "B=1.5;# in m\n", - "#from table\n", - "Nyq=120.0;\n", - "qu=1/2.0*Gamma*B*Nyq; # in KN/m^2\n", - "print qu,\" is shear stress in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1512.0 shear stress in kN/m**2\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.7:Pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.7\n", - "import math\n", - "phi=35; # in degree\n", - "Df=1.5; # in m\n", - "B=1.5; # in m\n", - "Gamma=17.4; # in kN/m^3\n", - "A=math.pi/4*Df**2; # in m^2\n", - "m=0.25;\n", - "Ku=0.936;\n", - "Fq=1+2*(1+m*Df/B)*Df/B*Ku*math.tan(phi*math.pi/180);\n", - "Qu=Fq*Gamma*A*Df; # in KN/m^2\n", - "print round(Qu,1),\" is bearing capacity in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "121.7 is bearing capacity in kN\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#example 4.8\n", - "\n", - "\n", - "\n", - "cu=52; # in kN/m^2\n", - "\n", - "B=1.5; # in m\n", - "\n", - "L=3; # in m\n", - "\n", - "k=0.107*cu+2.5;\n", - "\n", - "print round(k,2),\" is Df/B of square\" \n", - "\n", - "A=L*B; # in m^2\n", - "\n", - "Beta=0.2;\n", - "\n", - "Gamma=18.9; # in kN/m^3\n", - "\n", - "Df=1.8; # in m\n", - "\n", - "Qu=A*(Beta*(7.56+1.44*B/L)*cu+Gamma*Df); # in kN/m^2\n", - "\n", - "print round(Qu,1),\" is ultimate shear force in kN\"\n", - "\n", - " \n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "8.06 is Df/B of square\n", - "540.6 is ultimate shear force in kN\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter04_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter04_1.ipynb deleted file mode 100755 index 1d75ed9f..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter04_1.ipynb +++ /dev/null @@ -1,373 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7e16b5ec29439d0d7eaa54a0826b64a36c559ed79f17d130c42f4478805c682f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 04:Ultimate Bearing Capacity of Shallow Foundations: Special Cases" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.1:Pg-176" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.1\n", - "\n", - "FS=4.0; # FOS\n", - "q=110*2.0; # in 1b/ft^2\n", - "Nq=90.0;\n", - "Ny=50.0;\n", - "Gamma=110.0; # in 1b/ft^3\n", - "m1=0.34; # From Figure 4.6(a)\n", - "B=2.5; # in ft\n", - "L=2.5; # in ft\n", - "H=1.5; # in ft\n", - "phi=35; # in degree\n", - "m2=0.45; # From Figure 4.6(b)\n", - "Fqs=1-0.34*B/L;\n", - "Fys=1-0.45*B/L;\n", - "qu=q*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", - "Qall=qu*B**2/FS;\n", - "print round(Qall,2),\"bearing load in lb\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "26326.95 bearing load in lb\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.2:Pg-177" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.2\n", - "\n", - "FS=3.0; # FOS\n", - "cu=72.0;\n", - "q=18.0; # in kN/m^3\n", - "B=1.0;# in m\n", - "H=0.25;# in m\n", - "qu=5.14*(1+(0.5*B/H-0.707)/5.14)*cu+q;\n", - "qall=qu/FS;\n", - "print round(qall,1),\"bearing capacity of soil in kN/m**2\" \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "160.4 bearing capacity of soil in kN/m**2\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.3:Pg-183" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.3\n", - "import math\n", - "k=0; #B/L;\n", - "c2=30;\n", - "Gamma=17.5; # in kN/m^3\n", - "H=1.5; # in m\n", - "Df=1.2; # in m\n", - "B=2.0; # in m\n", - "Ks=2.5;\n", - "phi=40; # in degree\n", - "pi=math.pi;\n", - "qu=(1+0.2*k)*5.14*c2+(1+k)*Gamma*H**2*(1+2*Df/H)*Ks*math.tan(phi*pi/180)/B+Gamma*H;\n", - "Qu=qu*B;\n", - "print round(Qu,2),\"is bearing capacity in kN/m\"\n", - "print \"there is slight variation due to rounding off error\"\n", - "#soil 2\n", - "Ny=109.4;\n", - "Nq=64.2;\n", - "Fqs=1;\n", - "Fys=1;\n", - "qt=Gamma*Df*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", - "print qt,\"bearing capacity in kN/m**2\"\n", - "\n", - "# answer in book is different due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "575.66 is bearing capacity in kN/m\n", - "there is slight variation due to rounding off error\n", - "3262.7 bearing capacity in kN/m**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.4:Pg-184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.4\n", - "\n", - "B=1.0; # in m\n", - "L=1.5;# in m\n", - "c2=48;# in m\n", - "ca=108; # in KN/m^2\n", - "D=1.0;# in m\n", - "H=1.0;# in m\n", - "Gamma=16.8; # in KN/m^3\n", - "FS=4;\n", - "qu=(1+0.2*B/L)*5.14*c2+(1+B/L)*2*ca*H/B+Gamma*D; # in KN/m^2\n", - "c1=120.0;\n", - "gamma1=16.8; # in kN/m^3\n", - "Df=1.0;\n", - "qt=(1+0.2*B/L)*5.14*c1+gamma1*Df;\n", - "print qt,\"is qt in kN/m**2\"\n", - "print \"no need to calculate qt since it is not useful for calculation\"\n", - "print qu/FS,\"is allowable shear stress in kN/m**2\"\n", - "print qu/FS*1*1.5,\" is allowable load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "715.84 is qt in kN/m**2\n", - "no need to calculate qt since it is not useful for calculation\n", - "164.104 is allowable shear stress in kN/m**2\n", - "246.156 is allowable load in kN\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.5:Pg-190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.5\n", - "\n", - "c=50; # in KN/m^2\n", - "#from table\n", - "Ncq=6.3;\n", - "FS=4.0;# FOS\n", - "qu=c*Ncq; # in KN/m^2\n", - "qall=qu/4;\n", - "print qall,\"allowed shear stress in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "78.75 allowed shear stress in kN/m**2\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.6:Pg-191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.6\n", - "\n", - "Gamma=16.8; # in kN/m^3\n", - "B=1.5;# in m\n", - "#from table\n", - "Nyq=120.0;\n", - "qu=1/2.0*Gamma*B*Nyq; # in KN/m^2\n", - "print qu,\" is shear stress in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1512.0 shear stress in kN/m**2\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.7:Pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.7\n", - "import math\n", - "phi=35; # in degree\n", - "Df=1.5; # in m\n", - "B=1.5; # in m\n", - "Gamma=17.4; # in kN/m^3\n", - "A=math.pi/4*Df**2; # in m^2\n", - "m=0.25;\n", - "Ku=0.936;\n", - "Fq=1+2*(1+m*Df/B)*Df/B*Ku*math.tan(phi*math.pi/180);\n", - "Qu=Fq*Gamma*A*Df; # in KN/m^2\n", - "print round(Qu,1),\" is bearing capacity in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "121.7 is bearing capacity in kN\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.8:pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#example 4.8\n", - "\n", - "\n", - "\n", - "cu=52; # in kN/m^2\n", - "\n", - "B=1.5; # in m\n", - "\n", - "L=3; # in m\n", - "\n", - "k=0.107*cu+2.5;\n", - "\n", - "print round(k,2),\" is Df/B of square\" \n", - "\n", - "A=L*B; # in m^2\n", - "\n", - "Beta=0.2;\n", - "\n", - "Gamma=18.9; # in kN/m^3\n", - "\n", - "Df=1.8; # in m\n", - "\n", - "Qu=A*(Beta*(7.56+1.44*B/L)*cu+Gamma*Df); # in kN/m^2\n", - "\n", - "print round(Qu,1),\" is ultimate shear force in kN\"\n", - "\n", - " \n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "8.06 is Df/B of square\n", - "540.6 is ultimate shear force in kN\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter04_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter04_2.ipynb deleted file mode 100755 index 1d75ed9f..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter04_2.ipynb +++ /dev/null @@ -1,373 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:7e16b5ec29439d0d7eaa54a0826b64a36c559ed79f17d130c42f4478805c682f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 04:Ultimate Bearing Capacity of Shallow Foundations: Special Cases" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.1:Pg-176" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.1\n", - "\n", - "FS=4.0; # FOS\n", - "q=110*2.0; # in 1b/ft^2\n", - "Nq=90.0;\n", - "Ny=50.0;\n", - "Gamma=110.0; # in 1b/ft^3\n", - "m1=0.34; # From Figure 4.6(a)\n", - "B=2.5; # in ft\n", - "L=2.5; # in ft\n", - "H=1.5; # in ft\n", - "phi=35; # in degree\n", - "m2=0.45; # From Figure 4.6(b)\n", - "Fqs=1-0.34*B/L;\n", - "Fys=1-0.45*B/L;\n", - "qu=q*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", - "Qall=qu*B**2/FS;\n", - "print round(Qall,2),\"bearing load in lb\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "26326.95 bearing load in lb\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.2:Pg-177" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.2\n", - "\n", - "FS=3.0; # FOS\n", - "cu=72.0;\n", - "q=18.0; # in kN/m^3\n", - "B=1.0;# in m\n", - "H=0.25;# in m\n", - "qu=5.14*(1+(0.5*B/H-0.707)/5.14)*cu+q;\n", - "qall=qu/FS;\n", - "print round(qall,1),\"bearing capacity of soil in kN/m**2\" \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "160.4 bearing capacity of soil in kN/m**2\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.3:Pg-183" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.3\n", - "import math\n", - "k=0; #B/L;\n", - "c2=30;\n", - "Gamma=17.5; # in kN/m^3\n", - "H=1.5; # in m\n", - "Df=1.2; # in m\n", - "B=2.0; # in m\n", - "Ks=2.5;\n", - "phi=40; # in degree\n", - "pi=math.pi;\n", - "qu=(1+0.2*k)*5.14*c2+(1+k)*Gamma*H**2*(1+2*Df/H)*Ks*math.tan(phi*pi/180)/B+Gamma*H;\n", - "Qu=qu*B;\n", - "print round(Qu,2),\"is bearing capacity in kN/m\"\n", - "print \"there is slight variation due to rounding off error\"\n", - "#soil 2\n", - "Ny=109.4;\n", - "Nq=64.2;\n", - "Fqs=1;\n", - "Fys=1;\n", - "qt=Gamma*Df*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", - "print qt,\"bearing capacity in kN/m**2\"\n", - "\n", - "# answer in book is different due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "575.66 is bearing capacity in kN/m\n", - "there is slight variation due to rounding off error\n", - "3262.7 bearing capacity in kN/m**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.4:Pg-184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.4\n", - "\n", - "B=1.0; # in m\n", - "L=1.5;# in m\n", - "c2=48;# in m\n", - "ca=108; # in KN/m^2\n", - "D=1.0;# in m\n", - "H=1.0;# in m\n", - "Gamma=16.8; # in KN/m^3\n", - "FS=4;\n", - "qu=(1+0.2*B/L)*5.14*c2+(1+B/L)*2*ca*H/B+Gamma*D; # in KN/m^2\n", - "c1=120.0;\n", - "gamma1=16.8; # in kN/m^3\n", - "Df=1.0;\n", - "qt=(1+0.2*B/L)*5.14*c1+gamma1*Df;\n", - "print qt,\"is qt in kN/m**2\"\n", - "print \"no need to calculate qt since it is not useful for calculation\"\n", - "print qu/FS,\"is allowable shear stress in kN/m**2\"\n", - "print qu/FS*1*1.5,\" is allowable load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "715.84 is qt in kN/m**2\n", - "no need to calculate qt since it is not useful for calculation\n", - "164.104 is allowable shear stress in kN/m**2\n", - "246.156 is allowable load in kN\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.5:Pg-190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.5\n", - "\n", - "c=50; # in KN/m^2\n", - "#from table\n", - "Ncq=6.3;\n", - "FS=4.0;# FOS\n", - "qu=c*Ncq; # in KN/m^2\n", - "qall=qu/4;\n", - "print qall,\"allowed shear stress in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "78.75 allowed shear stress in kN/m**2\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.6:Pg-191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.6\n", - "\n", - "Gamma=16.8; # in kN/m^3\n", - "B=1.5;# in m\n", - "#from table\n", - "Nyq=120.0;\n", - "qu=1/2.0*Gamma*B*Nyq; # in KN/m^2\n", - "print qu,\" is shear stress in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1512.0 shear stress in kN/m**2\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.7:Pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 4.7\n", - "import math\n", - "phi=35; # in degree\n", - "Df=1.5; # in m\n", - "B=1.5; # in m\n", - "Gamma=17.4; # in kN/m^3\n", - "A=math.pi/4*Df**2; # in m^2\n", - "m=0.25;\n", - "Ku=0.936;\n", - "Fq=1+2*(1+m*Df/B)*Df/B*Ku*math.tan(phi*math.pi/180);\n", - "Qu=Fq*Gamma*A*Df; # in KN/m^2\n", - "print round(Qu,1),\" is bearing capacity in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "121.7 is bearing capacity in kN\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex4.8:pg-198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#example 4.8\n", - "\n", - "\n", - "\n", - "cu=52; # in kN/m^2\n", - "\n", - "B=1.5; # in m\n", - "\n", - "L=3; # in m\n", - "\n", - "k=0.107*cu+2.5;\n", - "\n", - "print round(k,2),\" is Df/B of square\" \n", - "\n", - "A=L*B; # in m^2\n", - "\n", - "Beta=0.2;\n", - "\n", - "Gamma=18.9; # in kN/m^3\n", - "\n", - "Df=1.8; # in m\n", - "\n", - "Qu=A*(Beta*(7.56+1.44*B/L)*cu+Gamma*Df); # in kN/m^2\n", - "\n", - "print round(Qu,1),\" is ultimate shear force in kN\"\n", - "\n", - " \n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "8.06 is Df/B of square\n", - "540.6 is ultimate shear force in kN\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter05.ipynb b/Principles_Of_Foundation_Engineering/Chapter05.ipynb deleted file mode 100755 index ca975aae..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter05.ipynb +++ /dev/null @@ -1,550 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:77a2cf465cec464205dc151afe10d9acafa79fe1b46b30f4a468368f8af3f8ea" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter05:Shallow Foundations: Allowable Bearing Capacity and Settlement" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.1:Pg-212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.1\n", - "\n", - "#first solution\n", - "B1=2.5; # in ft\n", - "B2=B1;\n", - "z=12.5; # in ft\n", - "L1=5; # in ft\n", - "L2=L1;\n", - "m=B1/z;\n", - "n=B2/z;\n", - "#from table 5.2 of the values using m,n\n", - "q=2000; # in lb/ft^2\n", - "I=0.0328;\n", - "deltasigma=q*4*I; # in lb/ft**2\n", - "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", - "#second solution\n", - "Ic=0.131;#from table\n", - "deltasigma=q*Ic; # in lb/ft**2\n", - "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "262.4 change in pressure in lb/ft**2\n", - "262.0 change in pressure in lb/ft**2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.2:Pg-215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.2\n", - "\n", - "qo=100; # in KN/m^2\n", - "H1=3; # in m\n", - "H2=5; # in m\n", - "#from table\n", - "IaH2=0.126;\n", - "IaH1=0.175;\n", - "deltasigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1)); # in kN/m**2\n", - "print round(deltasigma,2),\"change in pressure in kN/m**2\"\n", - "TS=4*deltasigma; # in kN/m**2\n", - "print round(TS,2),\"total change in pressure in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5.25 change in pressure in kN/m**2\n", - "21.0 total change in pressure in kN/m**2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.3:Pg-217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.3\n", - "H=7;\n", - "Gamma=17.5; # in KN/m^3\n", - "q0=Gamma*H # in KN/m^2\n", - "print q0,\" is pressure change in kN/m**2\"\n", - "#part2\n", - "#from figure\n", - "Ileftside=0.445;\n", - "Irightside=0.445;\n", - "deltasigma=q0*(Ileftside+Irightside); # in KN/m^2\n", - "print round(deltasigma,2),\"is change in stress in kN/m**2\"\n", - "#partc\n", - "#from figure 5.11\n", - "I=0.24;#I'\n", - "Dsigma1=43.75*I;#deltasigma1 in KN/m^2\n", - "I2=0.495;#I'\n", - "Dsigma2=I2*q0;#deltasigma2 in KN/m^2\n", - "I3=0.335;#I'\n", - "Dsigma3=I3*78.75;#deltasigma3 in KN/m^2\n", - "Dsigma=Dsigma1+Dsigma2-Dsigma3; # in KN/m^2\n", - "print round(Dsigma,2),\"is total stress increase in A in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "122.5 is pressure change in kN/m**2\n", - "109.03 is change in stress in kN/m**2\n", - "44.76 is total stress increase in A in kN/m**2\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.4:Pg-228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.4\n", - "\n", - "zbar=5;\n", - "mus=0.3;\n", - "F1=0.641;\n", - "F2=0.031;\n", - "z1=2.0; # in m\n", - "z2=1.0; # in m\n", - "z3=2.0; # in m\n", - "Es1=10000; # in kN/m**2\n", - "Es2=8000; # in kN/m**2\n", - "Es3=12000;# in kN/m**2\n", - "qo=150; # in KN/m^2\n", - "#from table 5.4\n", - "If=0.709;\n", - "Es=(Es1*z1+Es2*z2+Es3*z3)/zbar; # in kN/m**2\n", - "print Es,\" is modulus of elasticity in kN/m**2\"\n", - "Is=F1+(2-mus)/(1-mus)*F2;\n", - "Sc=qo*(1.0/Es-mus**2.0/Es)*Is*If*2;\n", - "Scrigid=0.93*Sc; # in m\n", - "print round(Scrigid*1000,2),\"is settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10400.0 is modulus of elasticity in kN/m**2\n", - "12.4 is settlement in mm\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.5:Pg-234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.5\n", - "import math\n", - "B=5; # in ft\n", - "L=10; # in ft\n", - "Ef=2.3e6; # in lb/in^2\n", - "Eo=1400.0; # in lb/in^2\n", - "k=25.0; # in lb/in^2/ft\n", - "t=1.0;\n", - "mus=0.3;\n", - "Df=5.0; # in ft\n", - "qo=5000.0; # in lb/ft^2\n", - "Ig=0.69;\n", - "Be=math.sqrt(4*B*L/math.pi);\n", - "If=math.pi/4+1/(4.6+10*(Ef/(Eo+2*Be/2*k))*(2*t/Be)**3);\n", - "Ie=1-1/(3.5*math.exp(1.22*mus-0.4)*(Be/Df+1.6));\n", - "Se=qo*Be*Ig*If*Ie/Eo*(1-mus**2)/144; # in ft\n", - "print round(Se*12,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.07 settlement in inches\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.6\n", - "\n", - "import math\n", - "import numpy\n", - "q=3.06; # in lb/in^2\n", - "qbar=25; # in lb/in^2\n", - "C1=1-0.5*(q/(qbar-q));\n", - "Sum=0;\n", - "C2=1+0.2*math.log10(10/0.1);\n", - "L=[1, 2, 3, 4, 5];\n", - "Dz=[48, 48, 96, 48, 144]; # in inch\n", - "Es=[750, 1250, 1250, 1000, 2000]; # in lb/in^2\n", - "z=[24, 72, 144, 216, 312]; # in inch\n", - "Iz=[0.275, 0.425, 0.417, 0.292, 0.125];\n", - "k=numpy.zeros(5)\n", - "print \"Layer No.\\t deltaz (in)\\t Es(lb/in**2)\\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \\n\"\n", - "for i in range(0,5):\n", - " k[i]=Iz[i]/Es[i]*Dz[i];\n", - " print L[i],\"\\t \\t \",Dz[i],\"\\t\\t \",Es[i],\"\\t\\t \",z[i],\" \\t\\t\\t\\t\\t \",Iz[i],\"\\t\\t \",round(k[i],3)\n", - " Sum=Sum+k[i];\n", - "\n", - "Se=C1*C2*(qbar-q)*Sum; # in inch\n", - "print round(Se,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Layer No.\t deltaz (in)\t Es(lb/in**2)\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \n", - "\n", - "1 \t \t 48 \t\t 750 \t\t 24 \t\t\t\t\t 0.275 \t\t 0.018\n", - "2 \t \t 48 \t\t 1250 \t\t 72 \t\t\t\t\t 0.425 \t\t 0.016\n", - "3 \t \t 96 \t\t 1250 \t\t 144 \t\t\t\t\t 0.417 \t\t 0.032\n", - "4 \t \t 48 \t\t 1000 \t\t 216 \t\t\t\t\t 0.292 \t\t 0.014\n", - "5 \t \t 144 \t\t 2000 \t\t 312 \t\t\t\t\t 0.125 \t\t 0.009\n", - "2.54 settlement in inches\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.7:Pg-244" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.7\n", - "\n", - "Df=1.0; # in m\n", - "B=1.75; # in m\n", - "L=1.75 # in m\n", - "qnet=120.0; # in KN/m^2\n", - "N60=10.0;# in m\n", - "alpha1=0.14 # for normally consolated sand\n", - "alpha2=1.71/(N60)**1.4 # for normally consolated sand\n", - "alpha3=1.0 # for normally consolated sand\n", - "Se=0.3*alpha1*alpha2*alpha3*(qnet/100)*((B/0.3)**0.7)*((1.25*(L/B)/(0.25+(L/B))))**2\n", - "print round(Se*1000,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11.79 settlement in mm\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.8:Pg-245" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.8\n", - "\n", - "Df=1; # in m\n", - "B=1.75; # in m\n", - "qnet=120; # in KN/m^2\n", - "N60=10; # in m\n", - "Fd=1+0.33*Df/B;\n", - "Se=2*qnet/N60/Fd*(B/(B+0.3))**2; # in mm\n", - "print round(Se,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "14.71 settlement in mm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.9:Pg-251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.9\n", - "\n", - "Ny=23.76; \n", - "Nq=16.51; \n", - "q=3*110.0; # in lb/ft^2\n", - "Gamma=110.0; # in lb/ft^3\n", - "B=4.0; # in ft\n", - "Nqe=0.63*Nq;\n", - "Nye=0.4*Ny;\n", - "que=q*Nqe+1/2.0*Gamma*B*Nye; # in lb/ft^2\n", - "print round(que,2),\" is bearing capacity in lb/ft**2\"\n", - "#part 2\n", - "V=0.4; # in ft/sec\n", - "A=0.32; # given in question\n", - "g=9.81; # acceleration constant in m/sec^2\n", - "kh=0.26;\n", - "k=0.92;#tan(alphae)\n", - "Seq=0.174*k*V**2/A/g*kh**-4/A**-4; # in m\n", - "print round(Seq,3),\"settelement in m\"\n", - "print round(Seq*39.57,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5523.31 is bearing capacity in lb/ft**2\n", - "0.019 settelement in m\n", - "0.74 settlement in inches\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.10:Pg-256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.10\n", - "\n", - "import math\n", - "Cc=0.32;\n", - "Hc=2.5;\n", - "eo=0.8;\n", - "sigmao=2.5*16.5+0.5*(17.5-9.81)+1.25*(16-9.81); # in kN/m^2\n", - "m1=[2, 2, 2];\n", - "z=[2, 3.25, 4.5];\n", - "n1=[4, 6.5, 9];\n", - "Ic=[0.19, 0.085, 0.045];\n", - "Dsigma=[28.5, 12.75, 6.75];#deltasigma\n", - "print (\"m1\\t z(m)\\t n1\\t Ic\\t Dsigma \\n\");\n", - "for i in range(0,3):\n", - " print round(m1[i],2),\"\\t \",round(z[i],2),\"\\t \",round(n1[i],2),\"\\t \",round(Ic[i],2),\"\\t \",round(Dsigma[i],2)\n", - "\n", - " Dsigmaav=1/6.0*(Dsigma[0]+4*Dsigma[1]+Dsigma[2]);\n", - " Sc=Cc*Hc/(1+eo)*math.log10((sigmao+Dsigmaav)/sigmao);\n", - "print round(Sc*1000,2),\"settlement in mm\"\n", - "#partb\n", - "B=1.0; # in m\n", - "L=2.0; # in m\n", - "z=0.5+1.5; # in m\n", - "B=B+z; # in m\n", - "L=L+z; # in m\n", - "A=0.6; # given in question\n", - "#from table\n", - "kcr=0.78; # by data\n", - "Sep=kcr*Sc;\n", - "print round(Sep*1000,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1\t z(m)\t n1\t Ic\t Dsigma \n", - "\n", - "2.0 \t 2.0 \t 4.0 \t 0.19 \t 28.5\n", - "2.0 \t 3.25 \t 6.5 \t 0.09 \t 12.75\n", - "2.0 \t 4.5 \t 9.0 \t 0.04 \t 6.75\n", - "46.45 settlement in mm\n", - "36.23 settlement in mm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.11:Pg-262" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.11\n", - "\n", - "import numpy\n", - "N60=(3+7+12+12+16)/5.0;\n", - "B=[2, 2.25, 2.3]; # in m\n", - "Fd=[1.248, 1.22, 1.215];\n", - "Qoac=102000*9.81/1000;#actual Qo\n", - "Se=25; # in mm\n", - "qnet=numpy.zeros(3)\n", - "Qo=numpy.zeros(3) # in kN\n", - "print \"B(m)\\t Fd\\t qnet(kN/m**2)\\t \\t Qo \\n\"\n", - "for i in range(0,3):\n", - " qnet[i]=10/0.08*(B[i]+0.3)**2/(B[i])**2*Fd[i]*Se/25;\n", - " Qo[i]=qnet[i]*B[i]**2;\n", - " print B[i],\"\\t\",Fd[i],\" \\t \",round(qnet[i],2),\"\\t\\t \",Qo[i],\"\\n\"\n", - "print int(Qoac),\"value of Qo in kN\"\n", - "print \"since Qo is 1000 kN thus B is equal to 2.3 m from the table\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "B(m)\t Fd\t qnet(kN/m**2)\t \t Qo \n", - "\n", - "2 \t1.248 \t 206.31 \t\t 825.24 \n", - "\n", - "2.25 \t1.22 \t 195.88 \t\t 991.63125 \n", - "\n", - "2.3 \t1.215 \t 194.08 \t\t 1026.675 \n", - "\n", - "1000 value of Qo in kN\n", - "since Qo is 1000 kN thus B is equal to 2.3 m from the table\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter05_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter05_1.ipynb deleted file mode 100755 index ca975aae..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter05_1.ipynb +++ /dev/null @@ -1,550 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:77a2cf465cec464205dc151afe10d9acafa79fe1b46b30f4a468368f8af3f8ea" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter05:Shallow Foundations: Allowable Bearing Capacity and Settlement" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.1:Pg-212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.1\n", - "\n", - "#first solution\n", - "B1=2.5; # in ft\n", - "B2=B1;\n", - "z=12.5; # in ft\n", - "L1=5; # in ft\n", - "L2=L1;\n", - "m=B1/z;\n", - "n=B2/z;\n", - "#from table 5.2 of the values using m,n\n", - "q=2000; # in lb/ft^2\n", - "I=0.0328;\n", - "deltasigma=q*4*I; # in lb/ft**2\n", - "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", - "#second solution\n", - "Ic=0.131;#from table\n", - "deltasigma=q*Ic; # in lb/ft**2\n", - "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "262.4 change in pressure in lb/ft**2\n", - "262.0 change in pressure in lb/ft**2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.2:Pg-215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.2\n", - "\n", - "qo=100; # in KN/m^2\n", - "H1=3; # in m\n", - "H2=5; # in m\n", - "#from table\n", - "IaH2=0.126;\n", - "IaH1=0.175;\n", - "deltasigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1)); # in kN/m**2\n", - "print round(deltasigma,2),\"change in pressure in kN/m**2\"\n", - "TS=4*deltasigma; # in kN/m**2\n", - "print round(TS,2),\"total change in pressure in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5.25 change in pressure in kN/m**2\n", - "21.0 total change in pressure in kN/m**2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.3:Pg-217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.3\n", - "H=7;\n", - "Gamma=17.5; # in KN/m^3\n", - "q0=Gamma*H # in KN/m^2\n", - "print q0,\" is pressure change in kN/m**2\"\n", - "#part2\n", - "#from figure\n", - "Ileftside=0.445;\n", - "Irightside=0.445;\n", - "deltasigma=q0*(Ileftside+Irightside); # in KN/m^2\n", - "print round(deltasigma,2),\"is change in stress in kN/m**2\"\n", - "#partc\n", - "#from figure 5.11\n", - "I=0.24;#I'\n", - "Dsigma1=43.75*I;#deltasigma1 in KN/m^2\n", - "I2=0.495;#I'\n", - "Dsigma2=I2*q0;#deltasigma2 in KN/m^2\n", - "I3=0.335;#I'\n", - "Dsigma3=I3*78.75;#deltasigma3 in KN/m^2\n", - "Dsigma=Dsigma1+Dsigma2-Dsigma3; # in KN/m^2\n", - "print round(Dsigma,2),\"is total stress increase in A in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "122.5 is pressure change in kN/m**2\n", - "109.03 is change in stress in kN/m**2\n", - "44.76 is total stress increase in A in kN/m**2\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.4:Pg-228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.4\n", - "\n", - "zbar=5;\n", - "mus=0.3;\n", - "F1=0.641;\n", - "F2=0.031;\n", - "z1=2.0; # in m\n", - "z2=1.0; # in m\n", - "z3=2.0; # in m\n", - "Es1=10000; # in kN/m**2\n", - "Es2=8000; # in kN/m**2\n", - "Es3=12000;# in kN/m**2\n", - "qo=150; # in KN/m^2\n", - "#from table 5.4\n", - "If=0.709;\n", - "Es=(Es1*z1+Es2*z2+Es3*z3)/zbar; # in kN/m**2\n", - "print Es,\" is modulus of elasticity in kN/m**2\"\n", - "Is=F1+(2-mus)/(1-mus)*F2;\n", - "Sc=qo*(1.0/Es-mus**2.0/Es)*Is*If*2;\n", - "Scrigid=0.93*Sc; # in m\n", - "print round(Scrigid*1000,2),\"is settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10400.0 is modulus of elasticity in kN/m**2\n", - "12.4 is settlement in mm\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.5:Pg-234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.5\n", - "import math\n", - "B=5; # in ft\n", - "L=10; # in ft\n", - "Ef=2.3e6; # in lb/in^2\n", - "Eo=1400.0; # in lb/in^2\n", - "k=25.0; # in lb/in^2/ft\n", - "t=1.0;\n", - "mus=0.3;\n", - "Df=5.0; # in ft\n", - "qo=5000.0; # in lb/ft^2\n", - "Ig=0.69;\n", - "Be=math.sqrt(4*B*L/math.pi);\n", - "If=math.pi/4+1/(4.6+10*(Ef/(Eo+2*Be/2*k))*(2*t/Be)**3);\n", - "Ie=1-1/(3.5*math.exp(1.22*mus-0.4)*(Be/Df+1.6));\n", - "Se=qo*Be*Ig*If*Ie/Eo*(1-mus**2)/144; # in ft\n", - "print round(Se*12,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.07 settlement in inches\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.6\n", - "\n", - "import math\n", - "import numpy\n", - "q=3.06; # in lb/in^2\n", - "qbar=25; # in lb/in^2\n", - "C1=1-0.5*(q/(qbar-q));\n", - "Sum=0;\n", - "C2=1+0.2*math.log10(10/0.1);\n", - "L=[1, 2, 3, 4, 5];\n", - "Dz=[48, 48, 96, 48, 144]; # in inch\n", - "Es=[750, 1250, 1250, 1000, 2000]; # in lb/in^2\n", - "z=[24, 72, 144, 216, 312]; # in inch\n", - "Iz=[0.275, 0.425, 0.417, 0.292, 0.125];\n", - "k=numpy.zeros(5)\n", - "print \"Layer No.\\t deltaz (in)\\t Es(lb/in**2)\\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \\n\"\n", - "for i in range(0,5):\n", - " k[i]=Iz[i]/Es[i]*Dz[i];\n", - " print L[i],\"\\t \\t \",Dz[i],\"\\t\\t \",Es[i],\"\\t\\t \",z[i],\" \\t\\t\\t\\t\\t \",Iz[i],\"\\t\\t \",round(k[i],3)\n", - " Sum=Sum+k[i];\n", - "\n", - "Se=C1*C2*(qbar-q)*Sum; # in inch\n", - "print round(Se,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Layer No.\t deltaz (in)\t Es(lb/in**2)\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \n", - "\n", - "1 \t \t 48 \t\t 750 \t\t 24 \t\t\t\t\t 0.275 \t\t 0.018\n", - "2 \t \t 48 \t\t 1250 \t\t 72 \t\t\t\t\t 0.425 \t\t 0.016\n", - "3 \t \t 96 \t\t 1250 \t\t 144 \t\t\t\t\t 0.417 \t\t 0.032\n", - "4 \t \t 48 \t\t 1000 \t\t 216 \t\t\t\t\t 0.292 \t\t 0.014\n", - "5 \t \t 144 \t\t 2000 \t\t 312 \t\t\t\t\t 0.125 \t\t 0.009\n", - "2.54 settlement in inches\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.7:Pg-244" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.7\n", - "\n", - "Df=1.0; # in m\n", - "B=1.75; # in m\n", - "L=1.75 # in m\n", - "qnet=120.0; # in KN/m^2\n", - "N60=10.0;# in m\n", - "alpha1=0.14 # for normally consolated sand\n", - "alpha2=1.71/(N60)**1.4 # for normally consolated sand\n", - "alpha3=1.0 # for normally consolated sand\n", - "Se=0.3*alpha1*alpha2*alpha3*(qnet/100)*((B/0.3)**0.7)*((1.25*(L/B)/(0.25+(L/B))))**2\n", - "print round(Se*1000,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11.79 settlement in mm\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.8:Pg-245" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.8\n", - "\n", - "Df=1; # in m\n", - "B=1.75; # in m\n", - "qnet=120; # in KN/m^2\n", - "N60=10; # in m\n", - "Fd=1+0.33*Df/B;\n", - "Se=2*qnet/N60/Fd*(B/(B+0.3))**2; # in mm\n", - "print round(Se,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "14.71 settlement in mm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.9:Pg-251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.9\n", - "\n", - "Ny=23.76; \n", - "Nq=16.51; \n", - "q=3*110.0; # in lb/ft^2\n", - "Gamma=110.0; # in lb/ft^3\n", - "B=4.0; # in ft\n", - "Nqe=0.63*Nq;\n", - "Nye=0.4*Ny;\n", - "que=q*Nqe+1/2.0*Gamma*B*Nye; # in lb/ft^2\n", - "print round(que,2),\" is bearing capacity in lb/ft**2\"\n", - "#part 2\n", - "V=0.4; # in ft/sec\n", - "A=0.32; # given in question\n", - "g=9.81; # acceleration constant in m/sec^2\n", - "kh=0.26;\n", - "k=0.92;#tan(alphae)\n", - "Seq=0.174*k*V**2/A/g*kh**-4/A**-4; # in m\n", - "print round(Seq,3),\"settelement in m\"\n", - "print round(Seq*39.57,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5523.31 is bearing capacity in lb/ft**2\n", - "0.019 settelement in m\n", - "0.74 settlement in inches\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.10:Pg-256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.10\n", - "\n", - "import math\n", - "Cc=0.32;\n", - "Hc=2.5;\n", - "eo=0.8;\n", - "sigmao=2.5*16.5+0.5*(17.5-9.81)+1.25*(16-9.81); # in kN/m^2\n", - "m1=[2, 2, 2];\n", - "z=[2, 3.25, 4.5];\n", - "n1=[4, 6.5, 9];\n", - "Ic=[0.19, 0.085, 0.045];\n", - "Dsigma=[28.5, 12.75, 6.75];#deltasigma\n", - "print (\"m1\\t z(m)\\t n1\\t Ic\\t Dsigma \\n\");\n", - "for i in range(0,3):\n", - " print round(m1[i],2),\"\\t \",round(z[i],2),\"\\t \",round(n1[i],2),\"\\t \",round(Ic[i],2),\"\\t \",round(Dsigma[i],2)\n", - "\n", - " Dsigmaav=1/6.0*(Dsigma[0]+4*Dsigma[1]+Dsigma[2]);\n", - " Sc=Cc*Hc/(1+eo)*math.log10((sigmao+Dsigmaav)/sigmao);\n", - "print round(Sc*1000,2),\"settlement in mm\"\n", - "#partb\n", - "B=1.0; # in m\n", - "L=2.0; # in m\n", - "z=0.5+1.5; # in m\n", - "B=B+z; # in m\n", - "L=L+z; # in m\n", - "A=0.6; # given in question\n", - "#from table\n", - "kcr=0.78; # by data\n", - "Sep=kcr*Sc;\n", - "print round(Sep*1000,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1\t z(m)\t n1\t Ic\t Dsigma \n", - "\n", - "2.0 \t 2.0 \t 4.0 \t 0.19 \t 28.5\n", - "2.0 \t 3.25 \t 6.5 \t 0.09 \t 12.75\n", - "2.0 \t 4.5 \t 9.0 \t 0.04 \t 6.75\n", - "46.45 settlement in mm\n", - "36.23 settlement in mm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.11:Pg-262" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.11\n", - "\n", - "import numpy\n", - "N60=(3+7+12+12+16)/5.0;\n", - "B=[2, 2.25, 2.3]; # in m\n", - "Fd=[1.248, 1.22, 1.215];\n", - "Qoac=102000*9.81/1000;#actual Qo\n", - "Se=25; # in mm\n", - "qnet=numpy.zeros(3)\n", - "Qo=numpy.zeros(3) # in kN\n", - "print \"B(m)\\t Fd\\t qnet(kN/m**2)\\t \\t Qo \\n\"\n", - "for i in range(0,3):\n", - " qnet[i]=10/0.08*(B[i]+0.3)**2/(B[i])**2*Fd[i]*Se/25;\n", - " Qo[i]=qnet[i]*B[i]**2;\n", - " print B[i],\"\\t\",Fd[i],\" \\t \",round(qnet[i],2),\"\\t\\t \",Qo[i],\"\\n\"\n", - "print int(Qoac),\"value of Qo in kN\"\n", - "print \"since Qo is 1000 kN thus B is equal to 2.3 m from the table\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "B(m)\t Fd\t qnet(kN/m**2)\t \t Qo \n", - "\n", - "2 \t1.248 \t 206.31 \t\t 825.24 \n", - "\n", - "2.25 \t1.22 \t 195.88 \t\t 991.63125 \n", - "\n", - "2.3 \t1.215 \t 194.08 \t\t 1026.675 \n", - "\n", - "1000 value of Qo in kN\n", - "since Qo is 1000 kN thus B is equal to 2.3 m from the table\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter05_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter05_2.ipynb deleted file mode 100755 index ca975aae..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter05_2.ipynb +++ /dev/null @@ -1,550 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:77a2cf465cec464205dc151afe10d9acafa79fe1b46b30f4a468368f8af3f8ea" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter05:Shallow Foundations: Allowable Bearing Capacity and Settlement" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.1:Pg-212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.1\n", - "\n", - "#first solution\n", - "B1=2.5; # in ft\n", - "B2=B1;\n", - "z=12.5; # in ft\n", - "L1=5; # in ft\n", - "L2=L1;\n", - "m=B1/z;\n", - "n=B2/z;\n", - "#from table 5.2 of the values using m,n\n", - "q=2000; # in lb/ft^2\n", - "I=0.0328;\n", - "deltasigma=q*4*I; # in lb/ft**2\n", - "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", - "#second solution\n", - "Ic=0.131;#from table\n", - "deltasigma=q*Ic; # in lb/ft**2\n", - "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "262.4 change in pressure in lb/ft**2\n", - "262.0 change in pressure in lb/ft**2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.2:Pg-215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.2\n", - "\n", - "qo=100; # in KN/m^2\n", - "H1=3; # in m\n", - "H2=5; # in m\n", - "#from table\n", - "IaH2=0.126;\n", - "IaH1=0.175;\n", - "deltasigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1)); # in kN/m**2\n", - "print round(deltasigma,2),\"change in pressure in kN/m**2\"\n", - "TS=4*deltasigma; # in kN/m**2\n", - "print round(TS,2),\"total change in pressure in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5.25 change in pressure in kN/m**2\n", - "21.0 total change in pressure in kN/m**2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.3:Pg-217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.3\n", - "H=7;\n", - "Gamma=17.5; # in KN/m^3\n", - "q0=Gamma*H # in KN/m^2\n", - "print q0,\" is pressure change in kN/m**2\"\n", - "#part2\n", - "#from figure\n", - "Ileftside=0.445;\n", - "Irightside=0.445;\n", - "deltasigma=q0*(Ileftside+Irightside); # in KN/m^2\n", - "print round(deltasigma,2),\"is change in stress in kN/m**2\"\n", - "#partc\n", - "#from figure 5.11\n", - "I=0.24;#I'\n", - "Dsigma1=43.75*I;#deltasigma1 in KN/m^2\n", - "I2=0.495;#I'\n", - "Dsigma2=I2*q0;#deltasigma2 in KN/m^2\n", - "I3=0.335;#I'\n", - "Dsigma3=I3*78.75;#deltasigma3 in KN/m^2\n", - "Dsigma=Dsigma1+Dsigma2-Dsigma3; # in KN/m^2\n", - "print round(Dsigma,2),\"is total stress increase in A in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "122.5 is pressure change in kN/m**2\n", - "109.03 is change in stress in kN/m**2\n", - "44.76 is total stress increase in A in kN/m**2\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.4:Pg-228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.4\n", - "\n", - "zbar=5;\n", - "mus=0.3;\n", - "F1=0.641;\n", - "F2=0.031;\n", - "z1=2.0; # in m\n", - "z2=1.0; # in m\n", - "z3=2.0; # in m\n", - "Es1=10000; # in kN/m**2\n", - "Es2=8000; # in kN/m**2\n", - "Es3=12000;# in kN/m**2\n", - "qo=150; # in KN/m^2\n", - "#from table 5.4\n", - "If=0.709;\n", - "Es=(Es1*z1+Es2*z2+Es3*z3)/zbar; # in kN/m**2\n", - "print Es,\" is modulus of elasticity in kN/m**2\"\n", - "Is=F1+(2-mus)/(1-mus)*F2;\n", - "Sc=qo*(1.0/Es-mus**2.0/Es)*Is*If*2;\n", - "Scrigid=0.93*Sc; # in m\n", - "print round(Scrigid*1000,2),\"is settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "10400.0 is modulus of elasticity in kN/m**2\n", - "12.4 is settlement in mm\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.5:Pg-234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.5\n", - "import math\n", - "B=5; # in ft\n", - "L=10; # in ft\n", - "Ef=2.3e6; # in lb/in^2\n", - "Eo=1400.0; # in lb/in^2\n", - "k=25.0; # in lb/in^2/ft\n", - "t=1.0;\n", - "mus=0.3;\n", - "Df=5.0; # in ft\n", - "qo=5000.0; # in lb/ft^2\n", - "Ig=0.69;\n", - "Be=math.sqrt(4*B*L/math.pi);\n", - "If=math.pi/4+1/(4.6+10*(Ef/(Eo+2*Be/2*k))*(2*t/Be)**3);\n", - "Ie=1-1/(3.5*math.exp(1.22*mus-0.4)*(Be/Df+1.6));\n", - "Se=qo*Be*Ig*If*Ie/Eo*(1-mus**2)/144; # in ft\n", - "print round(Se*12,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.07 settlement in inches\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.6\n", - "\n", - "import math\n", - "import numpy\n", - "q=3.06; # in lb/in^2\n", - "qbar=25; # in lb/in^2\n", - "C1=1-0.5*(q/(qbar-q));\n", - "Sum=0;\n", - "C2=1+0.2*math.log10(10/0.1);\n", - "L=[1, 2, 3, 4, 5];\n", - "Dz=[48, 48, 96, 48, 144]; # in inch\n", - "Es=[750, 1250, 1250, 1000, 2000]; # in lb/in^2\n", - "z=[24, 72, 144, 216, 312]; # in inch\n", - "Iz=[0.275, 0.425, 0.417, 0.292, 0.125];\n", - "k=numpy.zeros(5)\n", - "print \"Layer No.\\t deltaz (in)\\t Es(lb/in**2)\\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \\n\"\n", - "for i in range(0,5):\n", - " k[i]=Iz[i]/Es[i]*Dz[i];\n", - " print L[i],\"\\t \\t \",Dz[i],\"\\t\\t \",Es[i],\"\\t\\t \",z[i],\" \\t\\t\\t\\t\\t \",Iz[i],\"\\t\\t \",round(k[i],3)\n", - " Sum=Sum+k[i];\n", - "\n", - "Se=C1*C2*(qbar-q)*Sum; # in inch\n", - "print round(Se,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Layer No.\t deltaz (in)\t Es(lb/in**2)\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \n", - "\n", - "1 \t \t 48 \t\t 750 \t\t 24 \t\t\t\t\t 0.275 \t\t 0.018\n", - "2 \t \t 48 \t\t 1250 \t\t 72 \t\t\t\t\t 0.425 \t\t 0.016\n", - "3 \t \t 96 \t\t 1250 \t\t 144 \t\t\t\t\t 0.417 \t\t 0.032\n", - "4 \t \t 48 \t\t 1000 \t\t 216 \t\t\t\t\t 0.292 \t\t 0.014\n", - "5 \t \t 144 \t\t 2000 \t\t 312 \t\t\t\t\t 0.125 \t\t 0.009\n", - "2.54 settlement in inches\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.7:Pg-244" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.7\n", - "\n", - "Df=1.0; # in m\n", - "B=1.75; # in m\n", - "L=1.75 # in m\n", - "qnet=120.0; # in KN/m^2\n", - "N60=10.0;# in m\n", - "alpha1=0.14 # for normally consolated sand\n", - "alpha2=1.71/(N60)**1.4 # for normally consolated sand\n", - "alpha3=1.0 # for normally consolated sand\n", - "Se=0.3*alpha1*alpha2*alpha3*(qnet/100)*((B/0.3)**0.7)*((1.25*(L/B)/(0.25+(L/B))))**2\n", - "print round(Se*1000,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11.79 settlement in mm\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.8:Pg-245" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.8\n", - "\n", - "Df=1; # in m\n", - "B=1.75; # in m\n", - "qnet=120; # in KN/m^2\n", - "N60=10; # in m\n", - "Fd=1+0.33*Df/B;\n", - "Se=2*qnet/N60/Fd*(B/(B+0.3))**2; # in mm\n", - "print round(Se,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "14.71 settlement in mm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.9:Pg-251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.9\n", - "\n", - "Ny=23.76; \n", - "Nq=16.51; \n", - "q=3*110.0; # in lb/ft^2\n", - "Gamma=110.0; # in lb/ft^3\n", - "B=4.0; # in ft\n", - "Nqe=0.63*Nq;\n", - "Nye=0.4*Ny;\n", - "que=q*Nqe+1/2.0*Gamma*B*Nye; # in lb/ft^2\n", - "print round(que,2),\" is bearing capacity in lb/ft**2\"\n", - "#part 2\n", - "V=0.4; # in ft/sec\n", - "A=0.32; # given in question\n", - "g=9.81; # acceleration constant in m/sec^2\n", - "kh=0.26;\n", - "k=0.92;#tan(alphae)\n", - "Seq=0.174*k*V**2/A/g*kh**-4/A**-4; # in m\n", - "print round(Seq,3),\"settelement in m\"\n", - "print round(Seq*39.57,2),\"settlement in inches\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5523.31 is bearing capacity in lb/ft**2\n", - "0.019 settelement in m\n", - "0.74 settlement in inches\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.10:Pg-256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.10\n", - "\n", - "import math\n", - "Cc=0.32;\n", - "Hc=2.5;\n", - "eo=0.8;\n", - "sigmao=2.5*16.5+0.5*(17.5-9.81)+1.25*(16-9.81); # in kN/m^2\n", - "m1=[2, 2, 2];\n", - "z=[2, 3.25, 4.5];\n", - "n1=[4, 6.5, 9];\n", - "Ic=[0.19, 0.085, 0.045];\n", - "Dsigma=[28.5, 12.75, 6.75];#deltasigma\n", - "print (\"m1\\t z(m)\\t n1\\t Ic\\t Dsigma \\n\");\n", - "for i in range(0,3):\n", - " print round(m1[i],2),\"\\t \",round(z[i],2),\"\\t \",round(n1[i],2),\"\\t \",round(Ic[i],2),\"\\t \",round(Dsigma[i],2)\n", - "\n", - " Dsigmaav=1/6.0*(Dsigma[0]+4*Dsigma[1]+Dsigma[2]);\n", - " Sc=Cc*Hc/(1+eo)*math.log10((sigmao+Dsigmaav)/sigmao);\n", - "print round(Sc*1000,2),\"settlement in mm\"\n", - "#partb\n", - "B=1.0; # in m\n", - "L=2.0; # in m\n", - "z=0.5+1.5; # in m\n", - "B=B+z; # in m\n", - "L=L+z; # in m\n", - "A=0.6; # given in question\n", - "#from table\n", - "kcr=0.78; # by data\n", - "Sep=kcr*Sc;\n", - "print round(Sep*1000,2),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "m1\t z(m)\t n1\t Ic\t Dsigma \n", - "\n", - "2.0 \t 2.0 \t 4.0 \t 0.19 \t 28.5\n", - "2.0 \t 3.25 \t 6.5 \t 0.09 \t 12.75\n", - "2.0 \t 4.5 \t 9.0 \t 0.04 \t 6.75\n", - "46.45 settlement in mm\n", - "36.23 settlement in mm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.11:Pg-262" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 5.11\n", - "\n", - "import numpy\n", - "N60=(3+7+12+12+16)/5.0;\n", - "B=[2, 2.25, 2.3]; # in m\n", - "Fd=[1.248, 1.22, 1.215];\n", - "Qoac=102000*9.81/1000;#actual Qo\n", - "Se=25; # in mm\n", - "qnet=numpy.zeros(3)\n", - "Qo=numpy.zeros(3) # in kN\n", - "print \"B(m)\\t Fd\\t qnet(kN/m**2)\\t \\t Qo \\n\"\n", - "for i in range(0,3):\n", - " qnet[i]=10/0.08*(B[i]+0.3)**2/(B[i])**2*Fd[i]*Se/25;\n", - " Qo[i]=qnet[i]*B[i]**2;\n", - " print B[i],\"\\t\",Fd[i],\" \\t \",round(qnet[i],2),\"\\t\\t \",Qo[i],\"\\n\"\n", - "print int(Qoac),\"value of Qo in kN\"\n", - "print \"since Qo is 1000 kN thus B is equal to 2.3 m from the table\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "B(m)\t Fd\t qnet(kN/m**2)\t \t Qo \n", - "\n", - "2 \t1.248 \t 206.31 \t\t 825.24 \n", - "\n", - "2.25 \t1.22 \t 195.88 \t\t 991.63125 \n", - "\n", - "2.3 \t1.215 \t 194.08 \t\t 1026.675 \n", - "\n", - "1000 value of Qo in kN\n", - "since Qo is 1000 kN thus B is equal to 2.3 m from the table\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter06.ipynb b/Principles_Of_Foundation_Engineering/Chapter06.ipynb deleted file mode 100755 index d87679c7..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter06.ipynb +++ /dev/null @@ -1,351 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0ea06255a04932e0bf9952689cf2f6d919d320d1161a790bec574191c6fbafa1" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter06: Mat Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.1:Pg-279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6.1\n", - "\n", - "B=30; # in ft\n", - "L=45; # in ft\n", - "Df=6.5; # in ft\n", - "cu=1950;# in lb/ft^2\n", - "qunet=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B);\n", - "print int(qunet),\" is allowed force in lb/ft**2\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "12307 is allowed force in lb/ft**2\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.2:Pg-280" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6.2\n", - "\n", - "N60=10; # penetration number\n", - "Df=2; # in m\n", - "B=10.0; # in m\n", - "Se=25.0; # in mm\n", - "qnetall=N60/0.08*(1+0.33*Df/B)*Se/25;\n", - "print qnetall,\" is allowed pressure in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "133.25 is allowed pressure in kN/m**2\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.3:Pg-283" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6.3\n", - "\n", - "cu=2800; # in lb/ft^2\n", - "B=60; # in ft\n", - "L=100; # in ft\n", - "Df=5; # in ft\n", - "\n", - "Gamma=120; # in lb/ft^3\n", - "A=60*100; # in ft^2\n", - "Q=25e6; # load in Kip\n", - "FS=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B)/(Q/A-Gamma*Df);\n", - "print round(FS,2),\" is factor of safety\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4.66 is factor of safety\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.4:Pg-284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6.4\n", - "\n", - "import math\n", - "Cc=0.28;\n", - "Hc=18*12.0;\n", - "e0=0.9;\n", - "sigmao=11*100+40*(121.5-64)+18/2*(118-62.4); # in lb/ft^2\n", - "H2=5+40+18.0;\n", - "H1=5+40.0;\n", - "qo=3567.0;\n", - "#from table\n", - "IaH2=0.21;\n", - "IaH1=0.225;\n", - "Dsigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1))*4;\n", - "Scp=Cc*Hc/(1+e0)*math.log10(sigmao/sigmao+Dsigma/sigmao);\n", - "print round(Scp,2),\"is settlement in inches\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6.76 is settlement in inches\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.5:Pg-296" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6.5\n", - "import numpy\n", - "P=['A','B','C','D','E','F','G','H','I','J','K','L','M','N'];#point\n", - "k=1.2*numpy.ones(14);#Q/A\n", - "x=[-38,-24, -12, 0, 12, 24, 38, 38, 24, 12, 0, -12, -24, -38];\n", - "x1=numpy.zeros(14)\n", - "for i in range(0,14):\n", - " x1[i]=0.0017*x[i];\n", - "y=[48,48,48,48,48,48,48, -48, -48, -48, -48, -48, -48, -48];\n", - "y1=numpy.zeros(14)\n", - "for i in range(0,14):\n", - " y1[i]=-0.0011*y[i];\n", - "print \"point\\t Q\\A (kip/ft**2) x(ft)\\t 0.0017x(ft)\\t\\ty(ft)\\t \\t 0.0011y(ft)\\t \\t q(kip/ft**2)\\n\"\n", - "q=numpy.zeros(14)\n", - "for i in range(0,14):\n", - " q[i]=1.2+x1[i]+y1[i];\n", - " print P[i],\"\\t \",k[i],\"\\t\\t \",x[i],\"\\t\\t\",round(x1[i],3),\"\\t\\t\",y[i],\"\\t \\t \",round(y1[i],3),\"\\t \\t \\t\",round(q[i],3),\"\\t\\t \\n \"\n", - "\n", - "print \"the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "point\t Q\\A (kip/ft**2) x(ft)\t 0.0017x(ft)\t\ty(ft)\t \t 0.0011y(ft)\t \t q(kip/ft**2)\n", - "\n", - "A \t 1.2 \t\t -38 \t\t-0.065 \t\t48 \t \t -0.053 \t \t \t1.083 \t\t \n", - " \n", - "B \t 1.2 \t\t -24 \t\t-0.041 \t\t48 \t \t -0.053 \t \t \t1.106 \t\t \n", - " \n", - "C \t 1.2 \t\t -12 \t\t-0.02 \t\t48 \t \t -0.053 \t \t \t1.127 \t\t \n", - " \n", - "D \t 1.2 \t\t 0 \t\t0.0 \t\t48 \t \t -0.053 \t \t \t1.147 \t\t \n", - " \n", - "E \t 1.2 \t\t 12 \t\t0.02 \t\t48 \t \t -0.053 \t \t \t1.168 \t\t \n", - " \n", - "F \t 1.2 \t\t 24 \t\t0.041 \t\t48 \t \t -0.053 \t \t \t1.188 \t\t \n", - " \n", - "G \t 1.2 \t\t 38 \t\t0.065 \t\t48 \t \t -0.053 \t \t \t1.212 \t\t \n", - " \n", - "H \t 1.2 \t\t 38 \t\t0.065 \t\t-48 \t \t 0.053 \t \t \t1.317 \t\t \n", - " \n", - "I \t 1.2 \t\t 24 \t\t0.041 \t\t-48 \t \t 0.053 \t \t \t1.294 \t\t \n", - " \n", - "J \t 1.2 \t\t 12 \t\t0.02 \t\t-48 \t \t 0.053 \t \t \t1.273 \t\t \n", - " \n", - "K \t 1.2 \t\t 0 \t\t0.0 \t\t-48 \t \t 0.053 \t \t \t1.253 \t\t \n", - " \n", - "L \t 1.2 \t\t -12 \t\t-0.02 \t\t-48 \t \t 0.053 \t \t \t1.232 \t\t \n", - " \n", - "M \t 1.2 \t\t -24 \t\t-0.041 \t\t-48 \t \t 0.053 \t \t \t1.212 \t\t \n", - " \n", - "N \t 1.2 \t\t -38 \t\t-0.065 \t\t-48 \t \t 0.053 \t \t \t1.188 \t\t \n", - " \n", - "the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex6.6:Pg-299" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 6.6\n", - "\n", - "from scipy.optimize import fsolve\n", - "#solving for d\n", - "def f(d):\n", - " return (96+2*d)*d-2615.1\n", - "[x]=fsolve(f,19);\n", - "d1=x;\n", - "def f(d):\n", - " return (96+4*d)*d-6046.4\n", - "[x]=fsolve(f,28);\n", - "d2=x;\n", - "d=max(d2,d1);\n", - "d=round(d)\n", - "#now coming to design part\n", - "h=d+3+1; #in inch\n", - "print h,\"is total slab thickness in inches\"\n", - "qa=1.082; # in kip/ft^2\n", - "qb=1.106; # in kip/ft^2\n", - "qm=1.212; # in kip/ft^2\n", - "qn=1.188; # in kip/ft^2\n", - "q1A=qa/2.0+qb/2.0;\n", - "print round(q1A,3),\"is force in strip ABMN in kip/ft**2\"\n", - "q2A=qm/2.0+qn/2.0;\n", - "print round(q2A,3),\"is force in strip ABMN in kip/ft**2\"\n", - "q1=1.106/3+1.127/3+1.147/3;\n", - "print round(q1,3),\"is force in strip BCDKLM in kip/ft**2\"\n", - "q2=1.253/3+1.233/3+1.212/3;\n", - "print round(q2,3),\"is force in strip BCDKLM in kip/ft**2\"\n", - "q1=1.147/3+1.167/3+1.188/3;\n", - "print round(q1,3),\"is force in strip DEFIJK in kip/ft**2\"\n", - "q2=1.294/3+1.273/3+1.253/3;\n", - "print round(q2,3),\"is force in strip DEFIJK in kip/ft**2\"\n", - "q1=1.188/2+1.212/2;\n", - "print round(q1,3),\"is force in strip FGHI in kip/ft**2\"\n", - "q2=1.318/2+1.294/2;\n", - "print round(q2,3),\" is force in strip FGHI in kip/ft**2\"\n", - "#checking for force\n", - "#net soil reaction 2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", - "\n", - "#for sliding\n", - "phi2=18*math.pi/180; # the given angle\n", - "V=24.986;\n", - "B=12.5;\n", - "c2=0.9; # in lb/ft^2\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", - "if FSS>2 :\n", - " print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "\n", - "#for bearing\n", - "e=B/2.0-(Sum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in Kip/ft^2\n", - "Nc=13.1;\n", - "Nq=5.26;\n", - "Ny=4.07;\n", - "D=0.107;\n", - "Gamma2=4.0; # in lb/ft^3\n", - "B1=B-2*e;#Bdash\n", - "q=Gamma2*D # in lb/ft^2\n", - "Fcd=1+0.4*D/B1;\n", - "Fqd=1+2*math.tan(phi2)*(1-math.sin(phi2))**2*(D/B1);\n", - "Fyd=1;\n", - "zi=math.tan(Ph/V);\n", - "Fci=(1-zi/math.pi*2)**2;\n", - "Fqi=Fci;\n", - "Fyi=round((1-zi/phi2)**2);\n", - "qu=c2*Nc*Fcd*Fci+q*Nq*Fqd*Fqi+1/2.0*Gamma2*B1*Fyd*Fyi;\n", - "FSB=qu/qtoe;\n", - "if FSB>3 :\n", - " print \"bearing is safe with FS=\",round(FSB),\"\\n\\n\"\n", - " print \"slight changes due to round off error\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\n", - "\n", - "1.0 \t \t 4.05 \t \t \t5.75 \t \t \t 23.29 \n", - "\n", - "2.0 \t \t 1.35 \t \t \t4.67 \t \t \t 6.3 \n", - "\n", - "3.0 \t \t 5.16 \t \t \t6.25 \t \t \t 32.23 \n", - "\n", - "4.0 \t \t 13.01 \t \t \t9.5 \t \t \t 123.59 \n", - "\n", - "5.0 \t \t 1.42 \t \t \t12.5 \t \t \t 17.75 \n", - "\n", - "safe in overturning with FS= 3.47 \n", - "\n", - "bearing is safe with FS= 4.0 \n", - "\n", - "\n", - "slight changes due to round off error\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.2:Pg-369" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.2\n", - "\n", - "c=0.9; # # in lb/ft^2\n", - "B=12.5; # in ft\n", - "Gamma2=4; # in lb/ft^3\n", - "Fcd=1.138;\n", - "Fqd=1.107; \n", - "Nc=7.5;\n", - "Nq=4;\n", - "Ny=0;\n", - "q=0.428; # in lb/ft^2\n", - "qtoe=2.44; # in lb/ft^2\n", - "qu=c*Nc*Fcd+q*Nq*Fqd+1/2.0*Gamma2*B*Ny;\n", - "FSB=qu/qtoe; # factor of safety\n", - "if FSB>3.0 :\n", - " print \"safe in bearing with FS=\",round(FSB,2),\"\\n\\n\",\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "safe in bearing with FS= 3.92 \n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.3:Pg-370" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.3\n", - "import math\n", - "import numpy\n", - "Msum=0;#sum of moment\n", - "Vsum=0;#sum of force\n", - "H=15+2.5;#Hdash in ft\n", - "phi=30*math.pi/180; # given angle in degree\n", - "Gamma=121.0; # in lb/ft^3\n", - "Ka=(math.tan(math.pi/4-phi/2))**2;\n", - "Pa=1/2.0*Gamma*H**2*Ka/1000; # in Kip/ft\n", - "Ph=Pa; # in Kip/ft\n", - "Mo=Ph*H/3.0; # in Kip-ft/ft\n", - "AN=[1.0,2.0,3.0,4.0,5.0,6.0];#area number\n", - "W=[0.9,3.375,5.906,3.863,4.764,2.723];#weight\n", - "MA=[1.783,2.8,5.3,5.15,7.05,9.55];#moment arm\n", - "\n", - "print \"AreaNo \\t Weight(kip/ft) \\t Moment Arm(ft) \\t Moment (kip-ft/ft)\\n\"\n", - "M= numpy.zeros(6)\n", - "for i in range(0,6):\n", - " M[i]=W[i]*MA[i];\n", - " Vsum=Vsum+W[i];\n", - " Msum=Msum+M[i];\n", - " print round(AN[i],2),\"\\t\\t \",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", - "\n", - "FSO=(Msum)/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2)\n", - "\n", - "#for sliding\n", - "phi2=20*math.pi/180;\n", - "V=Vsum\n", - "B=10.3; # in ft\n", - "c2=1.0; # in lb/ft^2\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", - "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "e=B/2.0-(Msum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in kip/ft**2\n", - "print round(qtoe,2),\" is soil pressure at toe in kip/ft**2\"\n", - "qheel=V/B*(1-6*e/B); # in kip/ft**2\n", - "print round(qheel,2),\" is soil pressure at heel in kip/ft**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AreaNo \t Weight(kip/ft) \t Moment Arm(ft) \t Moment (kip-ft/ft)\n", - "\n", - "1.0 \t\t 0.9 \t \t \t 1.783 \t \t \t 1.6047 \n", - "\n", - "2.0 \t\t 3.38 \t \t \t 2.8 \t \t \t 9.45 \n", - "\n", - "3.0 \t\t 5.91 \t \t \t 5.3 \t \t \t 31.3018 \n", - "\n", - "4.0 \t\t 3.86 \t \t \t 5.15 \t \t \t 19.89445 \n", - "\n", - "5.0 \t\t 4.76 \t \t \t 7.05 \t \t \t 33.5862 \n", - "\n", - "6.0 \t\t 2.72 \t \t \t 9.55 \t \t \t 26.00465 \n", - "\n", - "safe in overturning with FS= 3.38\n", - "safe in sliding with FS= 1.94 \n", - "\n", - "3.51 is soil pressure at toe in kip/ft**2\n", - "0.67 is soil pressure at heel in kip/ft**2\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.4:Pg-372" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.4\n", - "\n", - "import math\n", - "import numpy\n", - "Msum=0;#sum of moment\n", - "Vsum=0;#sum of force\n", - "H=5+1.5;#Hdash in m\n", - "phi=32*math.pi/180 # angle in degree\n", - "Gamma=18.5; # in KN/m^3\n", - "Ka=0.424;\n", - "Pa=1/2.0*Gamma*H**2*Ka; # in KN/m\n", - "Ph=Pa*math.cos(15*math.pi/180+2/3.0*phi); # in KN/m\n", - "Mo=Ph*H/3.0; # moment\n", - "AN=[1,2,3,4,5];#area number\n", - "A=[4.36, 3.42, 0.77, 2.8, 2.8];#area\n", - "W=[102.81, 80.64, 18.16, 66.02, 93.14];#weight\n", - "MA=[2.18, 1.37, 0.98, 1.75, 2.83];#moment arm\n", - "print \"AreaNo \\t Area(m**2) \\t Weight(kN/m) \\t Moment Arm(m) \\t Moment (kN-m/m)\\n\"\n", - "M= numpy.zeros(5)\n", - "for i in range(0,5):\n", - " M[i]=W[i]*MA[i];\n", - " Vsum=Vsum+W[i];\n", - " Msum=Msum+M[i];\n", - " print round(AN[i],2),\"\\t\\t \",round(A[i],2),\" \\t \\t\",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", - "\n", - "FSO=Msum/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", - "\n", - "#for sliding\n", - "phi2=24*math.pi/180;\n", - "V=Vsum\n", - "B=3.5; # in m\n", - "c2=30; # in KN/m^2\n", - "Pp=1/2.0*2.37*18*1.5**2+2*30*1.54*1.5;\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2+Pp)/Ph;\n", - "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "print \"if Pp is ignored then FS=1.37\"\n", - "e=B/2.0-(Msum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in kN/m**2\n", - "print round(qtoe,2),\"soil pressure at toe in kN/m**2\"\n", - "qheel=V/B*(1-6*e/B); # in kN/m**2\n", - "print round(qheel,2),\"soil pressure at heel in kN/m**2\"\n", - "print \"there is difference in answer due to rounding off error\"\n", - "\n", - "# there is difference in answer due to rounding off error\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AreaNo \t Area(m**2) \t Weight(kN/m) \t Moment Arm(m) \t Moment (kN-m/m)\n", - "\n", - "1.0 \t\t 4.36 \t \t102.81 \t \t \t 2.18 \t \t \t 224.1258 \n", - "\n", - "2.0 \t\t 3.42 \t \t80.64 \t \t \t 1.37 \t \t \t 110.4768 \n", - "\n", - "3.0 \t\t 0.77 \t \t18.16 \t \t \t 0.98 \t \t \t 17.7968 \n", - "\n", - "4.0 \t\t 2.8 \t \t66.02 \t \t \t 1.75 \t \t \t 115.535 \n", - "\n", - "5.0 \t\t 2.8 \t \t93.14 \t \t \t 2.83 \t \t \t 263.5862 \n", - "\n", - "safe in overturning with FS= 2.53 \n", - "\n", - "safe in sliding with FS= 2.7 \n", - "\n", - "if Pp is ignored then FS=1.37\n", - "195.67 soil pressure at toe in kN/m**2\n", - "10.48 soil pressure at heel in kN/m**2\n", - "there is difference in answer due to rounding off error\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.6:Pg-393" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.6\n", - "import math\n", - "Sv=2; # in ft\n", - "Sh=3; # in ft\n", - "w=3/12.0; # in inch\n", - "fy=35000*144;\n", - "FSb=3;\n", - "pi=math.pi;\n", - "phi=36*pi/180;\n", - "Gamma1=105; # in lb/ft^3\n", - "H=30;\n", - "t=Gamma1*H*Sv*Sh*FSb/w/fy*(math.tan(pi/4-phi/2))**2;\n", - "t=t*12; #in inch\n", - "print round(t,2),\" is thickness in inches\"\n", - "t=t+0.001*50;\n", - "print \"so take thickness=0.2 inches\"\n", - "#for tie length\n", - "z=[5,10,15,20,25,30];\n", - "TL=[38.45, 35.89, 33.34, 30.79, 28.25, 25.7];#tie length\n", - "print \"z(ft)\\t Tie Length (ft)\\n\"\n", - "for i in range(0,6):\n", - " print z[i],\"\\t\",TL[i]\n", - "\n", - "print \"use tie length=40ft\"\n", - "#check for over turning\n", - "\n", - "z=30/3.0;\n", - "x1=20;\n", - "L=40;\n", - "Ka=0.26;\n", - "Pa=1/2.0*Gamma1*Ka*H**2; # in kip/ft**2\n", - "W1=Gamma1*H*L;\n", - "FSO=W1*x1/(Pa*z);\n", - "print round(FSO,2),\" is factor of safety is\" \n", - "print \"since FS>3 structure is safe\"\n", - "#check for sliding\n", - "k=2/3.0;\n", - "Pa=12285; # in kip/ft**2\n", - "FSS=W1*math.tan(k*phi)/Pa;\n", - "if FSS>3 :\n", - " print \"safe in sliding with FS=\",round(FSS,2)\n", - "\n", - "#check for bearing\n", - "Mr=126000*20; # in lb-ft/ft\n", - "Mo=12285*10; # in lb-ft/ft\n", - "V=126000;\n", - "e=L/2-Mr/V+Mo/V;\n", - "L1=L-2*e;#Ldash\n", - "c2=1000; # in lb/ft^2\n", - "Nc=25.8;\n", - "Gamma2=110; # in lb/ft^3\n", - "Ny=16.72;\n", - "qult=c2*Nc+1/2.0*Gamma2*L1*Ny\n", - "sigma0=Gamma1*H; # in lb/ft^2\n", - "FSB=qult/sigma0;\n", - "if FSB>5 :\n", - " print \"bearing is safe with FS=\",round(FSB,2)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.14 is thickness in inches\n", - "so take thickness=0.2 inches\n", - "z(ft)\t Tie Length (ft)\n", - "\n", - "5 \t38.45\n", - "10 \t35.89\n", - "15 \t33.34\n", - "20 \t30.79\n", - "25 \t28.25\n", - "30 \t25.7\n", - "use tie length=40ft\n", - "20.51 is factor of safety is\n", - "since FS>3 structure is safe\n", - "safe in sliding with FS= 4.57\n", - "safe in bearing with FS= 19.87\n" - ] - } - ], - "prompt_number": 56 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.7:Pg-397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.7\n", - "import math\n", - "import numpy\n", - "pi=math.pi;\n", - "phi=36.0*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "z=[8.0, 12.0, 16.0]; # in ft\n", - "sigmaG=80*12.0; # in lb/ft^2\n", - "Gamma1=110.0; # in lb/ft^3\n", - "FS=1.5;\n", - "Sv=numpy.zeros(3)\n", - "for i in range(0,3):\n", - " Sv[i]=sigmaG/Gamma1/z[i]/Ka/FS*12.0;\n", - " print \"for z=\",z[i],\" ft Sv = \",round(Sv[i],2),\" inches\\n\"\n", - "\n", - "z=[16.0,56.0,76.0,96.0,112.0,144.0,176.0];\n", - "zf=numpy.zeros(7)\n", - "k2=numpy.zeros(7)\n", - "L=numpy.zeros(7)\n", - "for i in range(0,7):\n", - " zf[i]=z[i]/12.0;#z in ft\n", - "Sv=[1.67,1.67,1.67,1.67,1.33,1.33,1.33];\n", - "k=[7.48,5.78,4.93,4.08,3.4,2.04,0.68];#0.51(H-z)\n", - "print \"z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \\n\"\n", - "for i in range(0,7):\n", - " k2[i]=0.438*Sv[i];#0.438Sv\n", - " L[i]=k[i]+k2[i];\n", - " print round(z[i],2),\"\\t \\t\",round(zf[i],2),\"\\t \",round(Sv[i],2),\"\\t \\t \",round(k[i],2),\"\\t \\t \\t\",round(k2[i],2),\"\\t \\t \\t \",round(L[i],2)\n", - "\n", - "Sv=20/12.0;\n", - "Ka=0.26;\n", - "FS=1.5;\n", - "l1=Sv*Ka*FS/4/math.tan(2/3.0*phi);\n", - "if l1<3:\n", - " l1=3;\n", - " print l1,\"length in ft\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for z= 8.0 ft Sv = 33.62 inches\n", - "\n", - "for z= 12.0 ft Sv = 22.41 inches\n", - "\n", - "for z= 16.0 ft Sv = 16.81 inches\n", - "\n", - "z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \n", - "\n", - "16.0 \t \t1.33 \t 1.67 \t \t 7.48 \t \t \t0.73 \t \t \t 8.21\n", - "56.0 \t \t4.67 \t 1.67 \t \t 5.78 \t \t \t0.73 \t \t \t 6.51\n", - "76.0 \t \t6.33 \t 1.67 \t \t 4.93 \t \t \t0.73 \t \t \t 5.66\n", - "96.0 \t \t8.0 \t 1.67 \t \t 4.08 \t \t \t0.73 \t \t \t 4.81\n", - "112.0 \t \t9.33 \t 1.33 \t \t 3.4 \t \t \t0.58 \t \t \t 3.98\n", - "144.0 \t \t12.0 \t 1.33 \t \t 2.04 \t \t \t0.58 \t \t \t 2.62\n", - "176.0 \t \t14.67 \t 1.33 \t \t 0.68 \t \t \t0.58 \t \t \t 1.26\n", - "3 length in ft\n" - ] - } - ], - "prompt_number": 79 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter08_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter08_1.ipynb deleted file mode 100755 index de2367cd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter08_1.ipynb +++ /dev/null @@ -1,527 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ae926d3fc40f9f56d82ee333a9b5a7f719ff4a11c08f89381773660beb02ead3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter08: Retaining walls" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.1:Pg-366" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.1\n", - "\n", - "import math\n", - "import numpy\n", - "H1=6*math.tan(10*math.pi/180.0); # in ft\n", - "H2=18.0; # in ft\n", - "H3=2.75; # in ft\n", - "Gamma1=117.0; # in lb/ft^3\n", - "Ka=0.294;#from table 7.1\n", - "H=H1+H2+H3; # in ft\n", - "Pa=1/2.0*Gamma1*H**2*Ka/1000; # in Kip/ft\n", - "Pr=Pa*math.sin(10*math.pi/180); # in Kip/ft\n", - "Ph=Pa*math.cos(10*math.pi/180); # in Kip/ft\n", - "Mo=Ph*H/3.0; # in Kip-ft/ft\n", - "Sum=0;#sigma Mr\n", - "S=[1, 2, 3, 4, 5];#section\n", - "W=[4.05, 1.35, 5.156, 13.01, 1.42];#weight\n", - "MA=[5.75, 4.67, 6.25, 9.5, 12.5, 12.5];#Moment Arm\n", - "M=numpy.zeros(5)\n", - "print \"Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\\n\"\n", - "for i in range(0,5):\n", - " M[i]=W[i]*MA[i];\n", - " Sum=Sum+M[i];\n", - " print round(S[i],2),\"\\t \\t \",round(W[i],2),\"\\t \\t \\t\",round(MA[i],2),\"\\t \\t \\t \",round(M[i],2),\"\\n\"\n", - "\n", - "FSO=Sum/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", - "\n", - "#for sliding\n", - "phi2=18*math.pi/180; # the given angle\n", - "V=24.986;\n", - "B=12.5;\n", - "c2=0.9; # in lb/ft^2\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", - "if FSS>2 :\n", - " print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "\n", - "#for bearing\n", - "e=B/2.0-(Sum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in Kip/ft^2\n", - "Nc=13.1;\n", - "Nq=5.26;\n", - "Ny=4.07;\n", - "D=0.107;\n", - "Gamma2=4.0; # in lb/ft^3\n", - "B1=B-2*e;#Bdash\n", - "q=Gamma2*D # in lb/ft^2\n", - "Fcd=1+0.4*D/B1;\n", - "Fqd=1+2*math.tan(phi2)*(1-math.sin(phi2))**2*(D/B1);\n", - "Fyd=1;\n", - "zi=math.tan(Ph/V);\n", - "Fci=(1-zi/math.pi*2)**2;\n", - "Fqi=Fci;\n", - "Fyi=round((1-zi/phi2)**2);\n", - "qu=c2*Nc*Fcd*Fci+q*Nq*Fqd*Fqi+1/2.0*Gamma2*B1*Fyd*Fyi;\n", - "FSB=qu/qtoe;\n", - "if FSB>3 :\n", - " print \"bearing is safe with FS=\",round(FSB),\"\\n\\n\"\n", - " print \"slight changes due to round off error\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\n", - "\n", - "1.0 \t \t 4.05 \t \t \t5.75 \t \t \t 23.29 \n", - "\n", - "2.0 \t \t 1.35 \t \t \t4.67 \t \t \t 6.3 \n", - "\n", - "3.0 \t \t 5.16 \t \t \t6.25 \t \t \t 32.23 \n", - "\n", - "4.0 \t \t 13.01 \t \t \t9.5 \t \t \t 123.59 \n", - "\n", - "5.0 \t \t 1.42 \t \t \t12.5 \t \t \t 17.75 \n", - "\n", - "safe in overturning with FS= 3.47 \n", - "\n", - "bearing is safe with FS= 4.0 \n", - "\n", - "\n", - "slight changes due to round off error\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.2:Pg-369" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.2\n", - "\n", - "c=0.9; # # in lb/ft^2\n", - "B=12.5; # in ft\n", - "Gamma2=4; # in lb/ft^3\n", - "Fcd=1.138;\n", - "Fqd=1.107; \n", - "Nc=7.5;\n", - "Nq=4;\n", - "Ny=0;\n", - "q=0.428; # in lb/ft^2\n", - "qtoe=2.44; # in lb/ft^2\n", - "qu=c*Nc*Fcd+q*Nq*Fqd+1/2.0*Gamma2*B*Ny;\n", - "FSB=qu/qtoe; # factor of safety\n", - "if FSB>3.0 :\n", - " print \"safe in bearing with FS=\",round(FSB,2),\"\\n\\n\",\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "safe in bearing with FS= 3.92 \n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.3:Pg-370" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.3\n", - "import math\n", - "import numpy\n", - "Msum=0;#sum of moment\n", - "Vsum=0;#sum of force\n", - "H=15+2.5;#Hdash in ft\n", - "phi=30*math.pi/180; # given angle in degree\n", - "Gamma=121.0; # in lb/ft^3\n", - "Ka=(math.tan(math.pi/4-phi/2))**2;\n", - "Pa=1/2.0*Gamma*H**2*Ka/1000; # in Kip/ft\n", - "Ph=Pa; # in Kip/ft\n", - "Mo=Ph*H/3.0; # in Kip-ft/ft\n", - "AN=[1.0,2.0,3.0,4.0,5.0,6.0];#area number\n", - "W=[0.9,3.375,5.906,3.863,4.764,2.723];#weight\n", - "MA=[1.783,2.8,5.3,5.15,7.05,9.55];#moment arm\n", - "\n", - "print \"AreaNo \\t Weight(kip/ft) \\t Moment Arm(ft) \\t Moment (kip-ft/ft)\\n\"\n", - "M= numpy.zeros(6)\n", - "for i in range(0,6):\n", - " M[i]=W[i]*MA[i];\n", - " Vsum=Vsum+W[i];\n", - " Msum=Msum+M[i];\n", - " print round(AN[i],2),\"\\t\\t \",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", - "\n", - "FSO=(Msum)/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2)\n", - "\n", - "#for sliding\n", - "phi2=20*math.pi/180;\n", - "V=Vsum\n", - "B=10.3; # in ft\n", - "c2=1.0; # in lb/ft^2\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", - "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "e=B/2.0-(Msum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in kip/ft**2\n", - "print round(qtoe,2),\" is soil pressure at toe in kip/ft**2\"\n", - "qheel=V/B*(1-6*e/B); # in kip/ft**2\n", - "print round(qheel,2),\" is soil pressure at heel in kip/ft**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AreaNo \t Weight(kip/ft) \t Moment Arm(ft) \t Moment (kip-ft/ft)\n", - "\n", - "1.0 \t\t 0.9 \t \t \t 1.783 \t \t \t 1.6047 \n", - "\n", - "2.0 \t\t 3.38 \t \t \t 2.8 \t \t \t 9.45 \n", - "\n", - "3.0 \t\t 5.91 \t \t \t 5.3 \t \t \t 31.3018 \n", - "\n", - "4.0 \t\t 3.86 \t \t \t 5.15 \t \t \t 19.89445 \n", - "\n", - "5.0 \t\t 4.76 \t \t \t 7.05 \t \t \t 33.5862 \n", - "\n", - "6.0 \t\t 2.72 \t \t \t 9.55 \t \t \t 26.00465 \n", - "\n", - "safe in overturning with FS= 3.38\n", - "safe in sliding with FS= 1.94 \n", - "\n", - "3.51 is soil pressure at toe in kip/ft**2\n", - "0.67 is soil pressure at heel in kip/ft**2\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.4:Pg-372" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.4\n", - "\n", - "import math\n", - "import numpy\n", - "Msum=0;#sum of moment\n", - "Vsum=0;#sum of force\n", - "H=5+1.5;#Hdash in m\n", - "phi=32*math.pi/180 # angle in degree\n", - "Gamma=18.5; # in KN/m^3\n", - "Ka=0.424;\n", - "Pa=1/2.0*Gamma*H**2*Ka; # in KN/m\n", - "Ph=Pa*math.cos(15*math.pi/180+2/3.0*phi); # in KN/m\n", - "Mo=Ph*H/3.0; # moment\n", - "AN=[1,2,3,4,5];#area number\n", - "A=[4.36, 3.42, 0.77, 2.8, 2.8];#area\n", - "W=[102.81, 80.64, 18.16, 66.02, 93.14];#weight\n", - "MA=[2.18, 1.37, 0.98, 1.75, 2.83];#moment arm\n", - "print \"AreaNo \\t Area(m**2) \\t Weight(kN/m) \\t Moment Arm(m) \\t Moment (kN-m/m)\\n\"\n", - "M= numpy.zeros(5)\n", - "for i in range(0,5):\n", - " M[i]=W[i]*MA[i];\n", - " Vsum=Vsum+W[i];\n", - " Msum=Msum+M[i];\n", - " print round(AN[i],2),\"\\t\\t \",round(A[i],2),\" \\t \\t\",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", - "\n", - "FSO=Msum/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", - "\n", - "#for sliding\n", - "phi2=24*math.pi/180;\n", - "V=Vsum\n", - "B=3.5; # in m\n", - "c2=30; # in KN/m^2\n", - "Pp=1/2.0*2.37*18*1.5**2+2*30*1.54*1.5;\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2+Pp)/Ph;\n", - "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "print \"if Pp is ignored then FS=1.37\"\n", - "e=B/2.0-(Msum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in kN/m**2\n", - "print round(qtoe,2),\"soil pressure at toe in kN/m**2\"\n", - "qheel=V/B*(1-6*e/B); # in kN/m**2\n", - "print round(qheel,2),\"soil pressure at heel in kN/m**2\"\n", - "print \"there is difference in answer due to rounding off error\"\n", - "\n", - "# there is difference in answer due to rounding off error\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AreaNo \t Area(m**2) \t Weight(kN/m) \t Moment Arm(m) \t Moment (kN-m/m)\n", - "\n", - "1.0 \t\t 4.36 \t \t102.81 \t \t \t 2.18 \t \t \t 224.1258 \n", - "\n", - "2.0 \t\t 3.42 \t \t80.64 \t \t \t 1.37 \t \t \t 110.4768 \n", - "\n", - "3.0 \t\t 0.77 \t \t18.16 \t \t \t 0.98 \t \t \t 17.7968 \n", - "\n", - "4.0 \t\t 2.8 \t \t66.02 \t \t \t 1.75 \t \t \t 115.535 \n", - "\n", - "5.0 \t\t 2.8 \t \t93.14 \t \t \t 2.83 \t \t \t 263.5862 \n", - "\n", - "safe in overturning with FS= 2.53 \n", - "\n", - "safe in sliding with FS= 2.7 \n", - "\n", - "if Pp is ignored then FS=1.37\n", - "195.67 soil pressure at toe in kN/m**2\n", - "10.48 soil pressure at heel in kN/m**2\n", - "there is difference in answer due to rounding off error\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.6:Pg-393" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.6\n", - "import math\n", - "Sv=2; # in ft\n", - "Sh=3; # in ft\n", - "w=3/12.0; # in inch\n", - "fy=35000*144;\n", - "FSb=3;\n", - "pi=math.pi;\n", - "phi=36*pi/180;\n", - "Gamma1=105; # in lb/ft^3\n", - "H=30;\n", - "t=Gamma1*H*Sv*Sh*FSb/w/fy*(math.tan(pi/4-phi/2))**2;\n", - "t=t*12; #in inch\n", - "print round(t,2),\" is thickness in inches\"\n", - "t=t+0.001*50;\n", - "print \"so take thickness=0.2 inches\"\n", - "#for tie length\n", - "z=[5,10,15,20,25,30];\n", - "TL=[38.45, 35.89, 33.34, 30.79, 28.25, 25.7];#tie length\n", - "print \"z(ft)\\t Tie Length (ft)\\n\"\n", - "for i in range(0,6):\n", - " print z[i],\"\\t\",TL[i]\n", - "\n", - "print \"use tie length=40ft\"\n", - "#check for over turning\n", - "\n", - "z=30/3.0;\n", - "x1=20;\n", - "L=40;\n", - "Ka=0.26;\n", - "Pa=1/2.0*Gamma1*Ka*H**2; # in kip/ft**2\n", - "W1=Gamma1*H*L;\n", - "FSO=W1*x1/(Pa*z);\n", - "print round(FSO,2),\" is factor of safety is\" \n", - "print \"since FS>3 structure is safe\"\n", - "#check for sliding\n", - "k=2/3.0;\n", - "Pa=12285; # in kip/ft**2\n", - "FSS=W1*math.tan(k*phi)/Pa;\n", - "if FSS>3 :\n", - " print \"safe in sliding with FS=\",round(FSS,2)\n", - "\n", - "#check for bearing\n", - "Mr=126000*20; # in lb-ft/ft\n", - "Mo=12285*10; # in lb-ft/ft\n", - "V=126000;\n", - "e=L/2-Mr/V+Mo/V;\n", - "L1=L-2*e;#Ldash\n", - "c2=1000; # in lb/ft^2\n", - "Nc=25.8;\n", - "Gamma2=110; # in lb/ft^3\n", - "Ny=16.72;\n", - "qult=c2*Nc+1/2.0*Gamma2*L1*Ny\n", - "sigma0=Gamma1*H; # in lb/ft^2\n", - "FSB=qult/sigma0;\n", - "if FSB>5 :\n", - " print \"bearing is safe with FS=\",round(FSB,2)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.14 is thickness in inches\n", - "so take thickness=0.2 inches\n", - "z(ft)\t Tie Length (ft)\n", - "\n", - "5 \t38.45\n", - "10 \t35.89\n", - "15 \t33.34\n", - "20 \t30.79\n", - "25 \t28.25\n", - "30 \t25.7\n", - "use tie length=40ft\n", - "20.51 is factor of safety is\n", - "since FS>3 structure is safe\n", - "safe in sliding with FS= 4.57\n", - "safe in bearing with FS= 19.87\n" - ] - } - ], - "prompt_number": 56 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.7:Pg-397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.7\n", - "import math\n", - "import numpy\n", - "pi=math.pi;\n", - "phi=36.0*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "z=[8.0, 12.0, 16.0]; # in ft\n", - "sigmaG=80*12.0; # in lb/ft^2\n", - "Gamma1=110.0; # in lb/ft^3\n", - "FS=1.5;\n", - "Sv=numpy.zeros(3)\n", - "for i in range(0,3):\n", - " Sv[i]=sigmaG/Gamma1/z[i]/Ka/FS*12.0;\n", - " print \"for z=\",z[i],\" ft Sv = \",round(Sv[i],2),\" inches\\n\"\n", - "\n", - "z=[16.0,56.0,76.0,96.0,112.0,144.0,176.0];\n", - "zf=numpy.zeros(7)\n", - "k2=numpy.zeros(7)\n", - "L=numpy.zeros(7)\n", - "for i in range(0,7):\n", - " zf[i]=z[i]/12.0;#z in ft\n", - "Sv=[1.67,1.67,1.67,1.67,1.33,1.33,1.33];\n", - "k=[7.48,5.78,4.93,4.08,3.4,2.04,0.68];#0.51(H-z)\n", - "print \"z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \\n\"\n", - "for i in range(0,7):\n", - " k2[i]=0.438*Sv[i];#0.438Sv\n", - " L[i]=k[i]+k2[i];\n", - " print round(z[i],2),\"\\t \\t\",round(zf[i],2),\"\\t \",round(Sv[i],2),\"\\t \\t \",round(k[i],2),\"\\t \\t \\t\",round(k2[i],2),\"\\t \\t \\t \",round(L[i],2)\n", - "\n", - "Sv=20/12.0;\n", - "Ka=0.26;\n", - "FS=1.5;\n", - "l1=Sv*Ka*FS/4/math.tan(2/3.0*phi);\n", - "if l1<3:\n", - " l1=3;\n", - " print l1,\"length in ft\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for z= 8.0 ft Sv = 33.62 inches\n", - "\n", - "for z= 12.0 ft Sv = 22.41 inches\n", - "\n", - "for z= 16.0 ft Sv = 16.81 inches\n", - "\n", - "z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \n", - "\n", - "16.0 \t \t1.33 \t 1.67 \t \t 7.48 \t \t \t0.73 \t \t \t 8.21\n", - "56.0 \t \t4.67 \t 1.67 \t \t 5.78 \t \t \t0.73 \t \t \t 6.51\n", - "76.0 \t \t6.33 \t 1.67 \t \t 4.93 \t \t \t0.73 \t \t \t 5.66\n", - "96.0 \t \t8.0 \t 1.67 \t \t 4.08 \t \t \t0.73 \t \t \t 4.81\n", - "112.0 \t \t9.33 \t 1.33 \t \t 3.4 \t \t \t0.58 \t \t \t 3.98\n", - "144.0 \t \t12.0 \t 1.33 \t \t 2.04 \t \t \t0.58 \t \t \t 2.62\n", - "176.0 \t \t14.67 \t 1.33 \t \t 0.68 \t \t \t0.58 \t \t \t 1.26\n", - "3 length in ft\n" - ] - } - ], - "prompt_number": 79 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter08_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter08_2.ipynb deleted file mode 100755 index de2367cd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter08_2.ipynb +++ /dev/null @@ -1,527 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ae926d3fc40f9f56d82ee333a9b5a7f719ff4a11c08f89381773660beb02ead3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter08: Retaining walls" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.1:Pg-366" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.1\n", - "\n", - "import math\n", - "import numpy\n", - "H1=6*math.tan(10*math.pi/180.0); # in ft\n", - "H2=18.0; # in ft\n", - "H3=2.75; # in ft\n", - "Gamma1=117.0; # in lb/ft^3\n", - "Ka=0.294;#from table 7.1\n", - "H=H1+H2+H3; # in ft\n", - "Pa=1/2.0*Gamma1*H**2*Ka/1000; # in Kip/ft\n", - "Pr=Pa*math.sin(10*math.pi/180); # in Kip/ft\n", - "Ph=Pa*math.cos(10*math.pi/180); # in Kip/ft\n", - "Mo=Ph*H/3.0; # in Kip-ft/ft\n", - "Sum=0;#sigma Mr\n", - "S=[1, 2, 3, 4, 5];#section\n", - "W=[4.05, 1.35, 5.156, 13.01, 1.42];#weight\n", - "MA=[5.75, 4.67, 6.25, 9.5, 12.5, 12.5];#Moment Arm\n", - "M=numpy.zeros(5)\n", - "print \"Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\\n\"\n", - "for i in range(0,5):\n", - " M[i]=W[i]*MA[i];\n", - " Sum=Sum+M[i];\n", - " print round(S[i],2),\"\\t \\t \",round(W[i],2),\"\\t \\t \\t\",round(MA[i],2),\"\\t \\t \\t \",round(M[i],2),\"\\n\"\n", - "\n", - "FSO=Sum/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", - "\n", - "#for sliding\n", - "phi2=18*math.pi/180; # the given angle\n", - "V=24.986;\n", - "B=12.5;\n", - "c2=0.9; # in lb/ft^2\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", - "if FSS>2 :\n", - " print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "\n", - "#for bearing\n", - "e=B/2.0-(Sum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in Kip/ft^2\n", - "Nc=13.1;\n", - "Nq=5.26;\n", - "Ny=4.07;\n", - "D=0.107;\n", - "Gamma2=4.0; # in lb/ft^3\n", - "B1=B-2*e;#Bdash\n", - "q=Gamma2*D # in lb/ft^2\n", - "Fcd=1+0.4*D/B1;\n", - "Fqd=1+2*math.tan(phi2)*(1-math.sin(phi2))**2*(D/B1);\n", - "Fyd=1;\n", - "zi=math.tan(Ph/V);\n", - "Fci=(1-zi/math.pi*2)**2;\n", - "Fqi=Fci;\n", - "Fyi=round((1-zi/phi2)**2);\n", - "qu=c2*Nc*Fcd*Fci+q*Nq*Fqd*Fqi+1/2.0*Gamma2*B1*Fyd*Fyi;\n", - "FSB=qu/qtoe;\n", - "if FSB>3 :\n", - " print \"bearing is safe with FS=\",round(FSB),\"\\n\\n\"\n", - " print \"slight changes due to round off error\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\n", - "\n", - "1.0 \t \t 4.05 \t \t \t5.75 \t \t \t 23.29 \n", - "\n", - "2.0 \t \t 1.35 \t \t \t4.67 \t \t \t 6.3 \n", - "\n", - "3.0 \t \t 5.16 \t \t \t6.25 \t \t \t 32.23 \n", - "\n", - "4.0 \t \t 13.01 \t \t \t9.5 \t \t \t 123.59 \n", - "\n", - "5.0 \t \t 1.42 \t \t \t12.5 \t \t \t 17.75 \n", - "\n", - "safe in overturning with FS= 3.47 \n", - "\n", - "bearing is safe with FS= 4.0 \n", - "\n", - "\n", - "slight changes due to round off error\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.2:Pg-369" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.2\n", - "\n", - "c=0.9; # # in lb/ft^2\n", - "B=12.5; # in ft\n", - "Gamma2=4; # in lb/ft^3\n", - "Fcd=1.138;\n", - "Fqd=1.107; \n", - "Nc=7.5;\n", - "Nq=4;\n", - "Ny=0;\n", - "q=0.428; # in lb/ft^2\n", - "qtoe=2.44; # in lb/ft^2\n", - "qu=c*Nc*Fcd+q*Nq*Fqd+1/2.0*Gamma2*B*Ny;\n", - "FSB=qu/qtoe; # factor of safety\n", - "if FSB>3.0 :\n", - " print \"safe in bearing with FS=\",round(FSB,2),\"\\n\\n\",\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "safe in bearing with FS= 3.92 \n", - "\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.3:Pg-370" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.3\n", - "import math\n", - "import numpy\n", - "Msum=0;#sum of moment\n", - "Vsum=0;#sum of force\n", - "H=15+2.5;#Hdash in ft\n", - "phi=30*math.pi/180; # given angle in degree\n", - "Gamma=121.0; # in lb/ft^3\n", - "Ka=(math.tan(math.pi/4-phi/2))**2;\n", - "Pa=1/2.0*Gamma*H**2*Ka/1000; # in Kip/ft\n", - "Ph=Pa; # in Kip/ft\n", - "Mo=Ph*H/3.0; # in Kip-ft/ft\n", - "AN=[1.0,2.0,3.0,4.0,5.0,6.0];#area number\n", - "W=[0.9,3.375,5.906,3.863,4.764,2.723];#weight\n", - "MA=[1.783,2.8,5.3,5.15,7.05,9.55];#moment arm\n", - "\n", - "print \"AreaNo \\t Weight(kip/ft) \\t Moment Arm(ft) \\t Moment (kip-ft/ft)\\n\"\n", - "M= numpy.zeros(6)\n", - "for i in range(0,6):\n", - " M[i]=W[i]*MA[i];\n", - " Vsum=Vsum+W[i];\n", - " Msum=Msum+M[i];\n", - " print round(AN[i],2),\"\\t\\t \",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", - "\n", - "FSO=(Msum)/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2)\n", - "\n", - "#for sliding\n", - "phi2=20*math.pi/180;\n", - "V=Vsum\n", - "B=10.3; # in ft\n", - "c2=1.0; # in lb/ft^2\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", - "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "e=B/2.0-(Msum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in kip/ft**2\n", - "print round(qtoe,2),\" is soil pressure at toe in kip/ft**2\"\n", - "qheel=V/B*(1-6*e/B); # in kip/ft**2\n", - "print round(qheel,2),\" is soil pressure at heel in kip/ft**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AreaNo \t Weight(kip/ft) \t Moment Arm(ft) \t Moment (kip-ft/ft)\n", - "\n", - "1.0 \t\t 0.9 \t \t \t 1.783 \t \t \t 1.6047 \n", - "\n", - "2.0 \t\t 3.38 \t \t \t 2.8 \t \t \t 9.45 \n", - "\n", - "3.0 \t\t 5.91 \t \t \t 5.3 \t \t \t 31.3018 \n", - "\n", - "4.0 \t\t 3.86 \t \t \t 5.15 \t \t \t 19.89445 \n", - "\n", - "5.0 \t\t 4.76 \t \t \t 7.05 \t \t \t 33.5862 \n", - "\n", - "6.0 \t\t 2.72 \t \t \t 9.55 \t \t \t 26.00465 \n", - "\n", - "safe in overturning with FS= 3.38\n", - "safe in sliding with FS= 1.94 \n", - "\n", - "3.51 is soil pressure at toe in kip/ft**2\n", - "0.67 is soil pressure at heel in kip/ft**2\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.4:Pg-372" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.4\n", - "\n", - "import math\n", - "import numpy\n", - "Msum=0;#sum of moment\n", - "Vsum=0;#sum of force\n", - "H=5+1.5;#Hdash in m\n", - "phi=32*math.pi/180 # angle in degree\n", - "Gamma=18.5; # in KN/m^3\n", - "Ka=0.424;\n", - "Pa=1/2.0*Gamma*H**2*Ka; # in KN/m\n", - "Ph=Pa*math.cos(15*math.pi/180+2/3.0*phi); # in KN/m\n", - "Mo=Ph*H/3.0; # moment\n", - "AN=[1,2,3,4,5];#area number\n", - "A=[4.36, 3.42, 0.77, 2.8, 2.8];#area\n", - "W=[102.81, 80.64, 18.16, 66.02, 93.14];#weight\n", - "MA=[2.18, 1.37, 0.98, 1.75, 2.83];#moment arm\n", - "print \"AreaNo \\t Area(m**2) \\t Weight(kN/m) \\t Moment Arm(m) \\t Moment (kN-m/m)\\n\"\n", - "M= numpy.zeros(5)\n", - "for i in range(0,5):\n", - " M[i]=W[i]*MA[i];\n", - " Vsum=Vsum+W[i];\n", - " Msum=Msum+M[i];\n", - " print round(AN[i],2),\"\\t\\t \",round(A[i],2),\" \\t \\t\",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", - "\n", - "FSO=Msum/Mo;\n", - "if FSO>2 :\n", - " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", - "\n", - "#for sliding\n", - "phi2=24*math.pi/180;\n", - "V=Vsum\n", - "B=3.5; # in m\n", - "c2=30; # in KN/m^2\n", - "Pp=1/2.0*2.37*18*1.5**2+2*30*1.54*1.5;\n", - "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2+Pp)/Ph;\n", - "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", - "print \"if Pp is ignored then FS=1.37\"\n", - "e=B/2.0-(Msum-Mo)/V;\n", - "qtoe=V/B*(1+6*e/B); # in kN/m**2\n", - "print round(qtoe,2),\"soil pressure at toe in kN/m**2\"\n", - "qheel=V/B*(1-6*e/B); # in kN/m**2\n", - "print round(qheel,2),\"soil pressure at heel in kN/m**2\"\n", - "print \"there is difference in answer due to rounding off error\"\n", - "\n", - "# there is difference in answer due to rounding off error\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "AreaNo \t Area(m**2) \t Weight(kN/m) \t Moment Arm(m) \t Moment (kN-m/m)\n", - "\n", - "1.0 \t\t 4.36 \t \t102.81 \t \t \t 2.18 \t \t \t 224.1258 \n", - "\n", - "2.0 \t\t 3.42 \t \t80.64 \t \t \t 1.37 \t \t \t 110.4768 \n", - "\n", - "3.0 \t\t 0.77 \t \t18.16 \t \t \t 0.98 \t \t \t 17.7968 \n", - "\n", - "4.0 \t\t 2.8 \t \t66.02 \t \t \t 1.75 \t \t \t 115.535 \n", - "\n", - "5.0 \t\t 2.8 \t \t93.14 \t \t \t 2.83 \t \t \t 263.5862 \n", - "\n", - "safe in overturning with FS= 2.53 \n", - "\n", - "safe in sliding with FS= 2.7 \n", - "\n", - "if Pp is ignored then FS=1.37\n", - "195.67 soil pressure at toe in kN/m**2\n", - "10.48 soil pressure at heel in kN/m**2\n", - "there is difference in answer due to rounding off error\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.6:Pg-393" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.6\n", - "import math\n", - "Sv=2; # in ft\n", - "Sh=3; # in ft\n", - "w=3/12.0; # in inch\n", - "fy=35000*144;\n", - "FSb=3;\n", - "pi=math.pi;\n", - "phi=36*pi/180;\n", - "Gamma1=105; # in lb/ft^3\n", - "H=30;\n", - "t=Gamma1*H*Sv*Sh*FSb/w/fy*(math.tan(pi/4-phi/2))**2;\n", - "t=t*12; #in inch\n", - "print round(t,2),\" is thickness in inches\"\n", - "t=t+0.001*50;\n", - "print \"so take thickness=0.2 inches\"\n", - "#for tie length\n", - "z=[5,10,15,20,25,30];\n", - "TL=[38.45, 35.89, 33.34, 30.79, 28.25, 25.7];#tie length\n", - "print \"z(ft)\\t Tie Length (ft)\\n\"\n", - "for i in range(0,6):\n", - " print z[i],\"\\t\",TL[i]\n", - "\n", - "print \"use tie length=40ft\"\n", - "#check for over turning\n", - "\n", - "z=30/3.0;\n", - "x1=20;\n", - "L=40;\n", - "Ka=0.26;\n", - "Pa=1/2.0*Gamma1*Ka*H**2; # in kip/ft**2\n", - "W1=Gamma1*H*L;\n", - "FSO=W1*x1/(Pa*z);\n", - "print round(FSO,2),\" is factor of safety is\" \n", - "print \"since FS>3 structure is safe\"\n", - "#check for sliding\n", - "k=2/3.0;\n", - "Pa=12285; # in kip/ft**2\n", - "FSS=W1*math.tan(k*phi)/Pa;\n", - "if FSS>3 :\n", - " print \"safe in sliding with FS=\",round(FSS,2)\n", - "\n", - "#check for bearing\n", - "Mr=126000*20; # in lb-ft/ft\n", - "Mo=12285*10; # in lb-ft/ft\n", - "V=126000;\n", - "e=L/2-Mr/V+Mo/V;\n", - "L1=L-2*e;#Ldash\n", - "c2=1000; # in lb/ft^2\n", - "Nc=25.8;\n", - "Gamma2=110; # in lb/ft^3\n", - "Ny=16.72;\n", - "qult=c2*Nc+1/2.0*Gamma2*L1*Ny\n", - "sigma0=Gamma1*H; # in lb/ft^2\n", - "FSB=qult/sigma0;\n", - "if FSB>5 :\n", - " print \"bearing is safe with FS=\",round(FSB,2)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.14 is thickness in inches\n", - "so take thickness=0.2 inches\n", - "z(ft)\t Tie Length (ft)\n", - "\n", - "5 \t38.45\n", - "10 \t35.89\n", - "15 \t33.34\n", - "20 \t30.79\n", - "25 \t28.25\n", - "30 \t25.7\n", - "use tie length=40ft\n", - "20.51 is factor of safety is\n", - "since FS>3 structure is safe\n", - "safe in sliding with FS= 4.57\n", - "safe in bearing with FS= 19.87\n" - ] - } - ], - "prompt_number": 56 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex8.7:Pg-397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 8.7\n", - "import math\n", - "import numpy\n", - "pi=math.pi;\n", - "phi=36.0*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "z=[8.0, 12.0, 16.0]; # in ft\n", - "sigmaG=80*12.0; # in lb/ft^2\n", - "Gamma1=110.0; # in lb/ft^3\n", - "FS=1.5;\n", - "Sv=numpy.zeros(3)\n", - "for i in range(0,3):\n", - " Sv[i]=sigmaG/Gamma1/z[i]/Ka/FS*12.0;\n", - " print \"for z=\",z[i],\" ft Sv = \",round(Sv[i],2),\" inches\\n\"\n", - "\n", - "z=[16.0,56.0,76.0,96.0,112.0,144.0,176.0];\n", - "zf=numpy.zeros(7)\n", - "k2=numpy.zeros(7)\n", - "L=numpy.zeros(7)\n", - "for i in range(0,7):\n", - " zf[i]=z[i]/12.0;#z in ft\n", - "Sv=[1.67,1.67,1.67,1.67,1.33,1.33,1.33];\n", - "k=[7.48,5.78,4.93,4.08,3.4,2.04,0.68];#0.51(H-z)\n", - "print \"z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \\n\"\n", - "for i in range(0,7):\n", - " k2[i]=0.438*Sv[i];#0.438Sv\n", - " L[i]=k[i]+k2[i];\n", - " print round(z[i],2),\"\\t \\t\",round(zf[i],2),\"\\t \",round(Sv[i],2),\"\\t \\t \",round(k[i],2),\"\\t \\t \\t\",round(k2[i],2),\"\\t \\t \\t \",round(L[i],2)\n", - "\n", - "Sv=20/12.0;\n", - "Ka=0.26;\n", - "FS=1.5;\n", - "l1=Sv*Ka*FS/4/math.tan(2/3.0*phi);\n", - "if l1<3:\n", - " l1=3;\n", - " print l1,\"length in ft\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "for z= 8.0 ft Sv = 33.62 inches\n", - "\n", - "for z= 12.0 ft Sv = 22.41 inches\n", - "\n", - "for z= 16.0 ft Sv = 16.81 inches\n", - "\n", - "z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \n", - "\n", - "16.0 \t \t1.33 \t 1.67 \t \t 7.48 \t \t \t0.73 \t \t \t 8.21\n", - "56.0 \t \t4.67 \t 1.67 \t \t 5.78 \t \t \t0.73 \t \t \t 6.51\n", - "76.0 \t \t6.33 \t 1.67 \t \t 4.93 \t \t \t0.73 \t \t \t 5.66\n", - "96.0 \t \t8.0 \t 1.67 \t \t 4.08 \t \t \t0.73 \t \t \t 4.81\n", - "112.0 \t \t9.33 \t 1.33 \t \t 3.4 \t \t \t0.58 \t \t \t 3.98\n", - "144.0 \t \t12.0 \t 1.33 \t \t 2.04 \t \t \t0.58 \t \t \t 2.62\n", - "176.0 \t \t14.67 \t 1.33 \t \t 0.68 \t \t \t0.58 \t \t \t 1.26\n", - "3 length in ft\n" - ] - } - ], - "prompt_number": 79 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter09.ipynb b/Principles_Of_Foundation_Engineering/Chapter09.ipynb deleted file mode 100755 index 8264fd98..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter09.ipynb +++ /dev/null @@ -1,512 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d9cb29be0932a6e1135cb07bf43a7e4c55a006ff68a1efd4e530482a24833ad9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter09:Sheet Pile Walls" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.1:Pg-419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.1\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "sall=30;#sigma allowed\n", - "pi=math.pi;\n", - "zbar=12.1; # in ft\n", - "L1=10.0; # in ft\n", - "L2=20.0; #in ft\n", - "Gamma=0.12; # in lb/ft^3\n", - "Gamma1=0.1294-0.0624; # in lb/ft^3\n", - "phi=40*pi/180; # angle given\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in Kip/ft\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in Kip/ft\n", - "L3=s2/(Gamma1*(Kp-Ka)); # in ft\n", - "print round(L3,2),\"is length in ft\"\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;# in Kip/ft\n", - "print round(P,2),\" is force in kip/ft\"\n", - "s5=Gamma*L1*Kp+Gamma1*L2*Kp+Gamma*L3*(Kp-Ka);#sigma5 in Kip/ft\n", - "print round(s5,2),\" is pressure in kip/ft\"\n", - "A1=s5/(Gamma1*(Kp-Ka)); # in ft^2\n", - "A2=8.0*P/(Gamma1*(Kp-Ka)) # in ft^2\n", - "A3=6.0*P*(2.0*zbar*(Gamma1*(Kp-Ka))+s5)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", - "A4=P*(6.0*zbar*s5+4.0*P)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", - "print \"A1,A2,A3,A4 respectively is \",round(A1,1),round(A2,2),round(A3,2),round(A4,2)\n", - "print \"slight error due to rounding off error\"\n", - "#part(b)\n", - "def f(x):\n", - " return x**4+41.7*x**3-270.5*x**2-13363*x-106863\n", - "[x]=fsolve(f,20);\n", - "D=1.88+x;\n", - "print round(D,2),\" is value of D, in ft\"\n", - "TL=L1+L2+1.3*D;\n", - "print round(TL,2),\" is total length in ft\"\n", - "#partc\n", - "z=math.sqrt(2*P/(Gamma1*(Kp-Ka)));#zdash\n", - "Mmax=P*(z+zbar)-1/2.0*(Gamma1*(Kp-Ka))*z**2*z/3.0;\n", - "S=Mmax*12/sall;\n", - "print round(S,2),\"is section modulus in in^3/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.88 is length in ft\n", - "9.96 is force in kip/ft\n", - "12.67 is pressure in kip/ft\n", - "A1,A2,A3,A4 respectively is 43.2 271.33 13708.16 110880.89\n", - "slight error due to rounding off error\n", - "21.68 is value of D, in ft\n", - "58.19 is total length in ft\n", - "70.06 is section modulus in in^3/ft\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.2:Pg-426" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.2\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "sall=172.5*1000;#sigma allowed in KN/m^2\n", - "pi=math.pi;\n", - "c=47.0; # in KN/m^2\n", - "zbar=1.78; # in m\n", - "L1=2.0; #in m\n", - "L2=3.0; # in m\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "phi=32*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2; # in kN/ft\n", - "print round(P,2),\" is force in kN/m\"\n", - "def f(x):\n", - " return 127.4*x**2-104.4*x-357.15\n", - "[x]=fsolve(f,2);\n", - "D=x;\n", - "print round(D,2),\" is value of D in m\"\n", - "print round(D*1.5,2),\"actual D in m\"\n", - "L4=D*(4*c-(Gamma*L1+Gamma1*L2)-P/D)/4/c;\n", - "print round(L4,2),\" is length in m\"\n", - "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in KN/m^2\n", - "s7=4*c+(Gamma*L1+Gamma1*L2);#sigma7 in KN/m^2\n", - "z=P/s6;#zdash\n", - "Mmax=P*(z+zbar)-1/2.0*s6*z**2; # in KN-m/m\n", - "S=Mmax*12.0/sall; # in m^3/m\n", - "print round(S,4),\" is section modulus in m**3/m\"\n", - "print \"is slight error due to rounding off error\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "52.25 is force in kN/m\n", - "2.13 is value of D in m\n", - "3.2 actual D in m\n", - "1.17 is length in m\n", - "0.0072 is section modulus in m**3/m\n", - "is slight error due to rounding off error\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.3:Pg-433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.3\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "zbar=2.23; # in m\n", - "L1=2.0; # in m\n", - "L2=3.0; # in m\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "phi=32*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", - "L3=s2/(Gamma1*(Kp-Ka)); # in m\n", - "print round(L3,2),\"length in m\"\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;\n", - "print round(P,2),\"force in kN/m\"\n", - "def f(x):\n", - " return x**3+6.99*x**2-14.55\n", - "[x]=fsolve(f,1.4);\n", - "D=L3+x;\n", - "print round(D,2),\"value of D in m\"\n", - "AL=1.4*D;\n", - "print round(AL,2),\"actual length in m\"\n", - "#partb\n", - "L4=1.4;\n", - "F=P-1/2.0*(Gamma1*(Kp-Ka)*L4**2);\n", - "print round(F,2),\"anchor force in kN/m\"\n", - "#partc\n", - "def f(x):\n", - " return x**2+6.682*x-14.44\n", - "[x]=fsolve(f,1.7);\n", - "z=x+2;\n", - "Mmax=-1/2.0*s1*L1*(x+2/3.0)+F*(x+1)-s1*x*x/2-1/2.0*Ka*Gamma1*x**3/3.0;\n", - "print round(Mmax,2),\" is maximum moment in kN-m/m\" \n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.66 length in m\n", - "58.38 force in kN/m\n", - "1.98 value of D in m\n", - "2.78 actual length in m\n", - "30.88 anchor force in kN/m\n", - "43.74 is maximum moment in kN-m/m\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.4:Pg-439" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.4\n", - "\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "GD=0.23; # from fig. 9.16\n", - "CDL1=1.172; # from fig. 9.19\n", - "L1=2; # in m\n", - "L2=3; # in m\n", - "Dth=(L1+L2)*GD*CDL1;\n", - "print round(Dth,2),\"theoritical depth in m\"\n", - "Dac=1.4*Dth;\n", - "print round(Dac,2),\"actual depth in m\"\n", - "print \"approximate it as 2 m\"\n", - "#part(b)\n", - "CFL1=1.073;\n", - "GF=0.07;\n", - "Gammaa=(Gamma*L1**2+Gamma1*L2**2+2*Gamma*L1*L2)/(L1+L2)**2; # in KN/m^3\n", - "F=Gammaa*(L1+L2)**2*GF*CFL1; # in KN/m\n", - "print round(F,2),\"force in kN/m\"\n", - "#part(c)\n", - "GM=0.021; # from fig. 9.18\n", - "CML1=1.036; # from fig. 9.21\n", - "Mmax=Gammaa*(L1+L2)**3*GM*CML1; # in kN-m/m\n", - "print round(Mmax,2),\"maximum moment in kN-m/m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.35 theoritical depth in m\n", - "1.89 actual depth in m\n", - "approximate it as 2 m\n", - "25.54 force in kN/m\n", - "36.99 maximum moment in kN-m/m\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.5:Pg-442" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.5\n", - "import math\n", - "import matplotlib.pyplot as plt\n", - "import numpy\n", - "Mmax=43.72; # in kN-m/m\n", - "sp=[\"PSA-31\",\"PSA-23\"];#sheet pile\n", - "H=[7.9,7.9] # in m\n", - "I=[4.41e-6,5.63e-6]; # in m^4/m\n", - "p=[0.00466,0.00365];\n", - "S=[10.8e-5,12.8e-5]; # in m^3/m\n", - "Md=[18.63,22.08]; # kn-m/m\n", - "Logp=numpy.zeros(2)\n", - "k=numpy.zeros(2)\n", - "print \"SheetPile I(m**4/m) H(m) p\\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \\n\"\n", - "for i in range(0,2):\n", - " Logp[i]=math.log10(p[i]);\n", - " k[i]=Md[i]/Mmax;\n", - " print sp[i],\"\\t \",I[i],\" \",H[i],\" \",p[i],\" \",round(Logp[i],2),\" \",S[i],\" \",Md[i],\"\\t \",round(k[i],3)\n", - " \n", - "\n", - "plt.plot(Logp,k);\n", - "plt.title(\"Ex9.5\")\n", - "plt.xlabel(\"LogP\")\n", - "plt.ylabel(\"Md/Mmax\")\n", - "plt.show()\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "SheetPile I(m**4/m) H(m) p\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \n", - "\n", - "PSA-31 \t 4.41e-06 7.9 0.00466 -2.33 0.000108 18.63 \t 0.426\n", - "PSA-23 \t 5.63e-06 7.9 0.00365 -2.44 0.000128 22.08 \t 0.505\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.6:Pg-445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.6\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "R=0.6;\n", - "L1=10.0; # in ft\n", - "L2=20.0; #in ft\n", - "Gammasat=122.4; # in lb/ft^3\n", - "l1=5; # in ft\n", - "Gamma=110.0; # in lb/ft^3\n", - "C=0.68;\n", - "L=L1+L2; # in ft\n", - "Gammaw=62.4; # in lb/ft^3\n", - "Gamma1=Gammasat-Gammaw;#gammadash in lb/ft^3\n", - "Gammaav=(Gamma*L1+Gamma1*L2)/(L1+L2); # in lb/ft^3\n", - "phi=35.0*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "sa=C*Ka*Gammaav*L;#sigmaa in lb/ft^2\n", - "sp=R*sa;#sigmap # in lb/ft^2\n", - "def f(x):\n", - " return x**2+50*x-1000\n", - "[x]=fsolve(f,15);\n", - "D=x;#in ft\n", - "print round(D,2),\" is depth in ft\"\n", - "R=L/D*(L-2*l1)/(2*L+D-2*l1);\n", - "print \"value of R=\",round(R,2),\" is OK\\n\"\n", - "#partb\n", - "F=sa*(L-R*D); # in lb/ft\n", - "print round(F,2),\" is Force in lb/ft\"\n", - "#partc\n", - "Mmax=0.5*sa*L**2*((1-R*D/L)**2-(2*l1/L)*(1-R*D/L)); # in lb-ft/ft\n", - "print round(Mmax,2),\"maximum moment lb-ft/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15.31 is depth in ft\n", - "value of R= 0.6 is OK\n", - "\n", - "8821.24 is Force in lb/ft\n", - "47693.02 maximum moment lb-ft/ft\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.7:Pg-451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.7\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "zbar=3.2; # in m\n", - "c=41; # in KN/m^2\n", - "L1=3; # in m\n", - "L2=6; # in m\n", - "Gamma=17;# in KN/m^3\n", - "Gamma1=20-9.81; # in KN/m^3\n", - "phi=35*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in kN/m**2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in kN/m**2\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2;\n", - "print round(P,2),\"Force in kN/m\"\n", - "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in kN/m**2\n", - "print round(s6,2),\"pressure in kN/m**2\"\n", - "def f(x):\n", - " return x**2+15*x-25.43\n", - "[x]=fsolve(f,1.6);\n", - "D=x; # in m\n", - "print round(D,1),\"depth in m\"\n", - "F=P-s6*D; # in kN/m\n", - "print round(F,2),\"force in kN/m\"\n", - "print \"slight error due to rounding off\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "153.36 Force in kN/m\n", - "51.86 pressure in kN/m**2\n", - "1.5 depth in m\n", - "73.61 force in kN/m\n", - "slight error due to rounding off\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.8\n", - "import math\n", - "pi=math.pi;\n", - "Gamma=105.0; # in lb/ft^3\n", - "Cov=14.0;\n", - "B=15/12.0; # in inch\n", - "Ka=0.26;\n", - "phi=35.0*pi/180; # given angle in degree\n", - "H=37.5/12; # in inch\n", - "h=15/12.0; # in inch\n", - "t=6/12.0; # in inch\n", - "Gc=150.0;#gamma concrete in lb/ft^3\n", - "W=H*t*Gc; # in lb/ft\n", - "k=4.5;#kp*cos(delta)\n", - "Pu=1/2.0*Gamma*H**2*(k-Ka*math.cos(phi)); # in lb/ft\n", - "print round(Pu,2),\"force in lb/ft\"\n", - "Pus=((Cov+1)/(Cov+H/h))*Pu; # in lb/ft\n", - "print round(Pus,2),\"force in lb/ft\"\n", - "Be=0.227*(H+h)+B;\n", - "Pu=Pus*Be; # in lb/ft\n", - "print round(Pu,2),\" is resistance of anchor plate in lb/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2197.94 force in lb/ft\n", - "1998.12 force in lb/ft\n", - "4482.04 is resistance of anchor plate in lb/ft\n" - ] - } - ], - "prompt_number": 37 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter09_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter09_1.ipynb deleted file mode 100755 index 8264fd98..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter09_1.ipynb +++ /dev/null @@ -1,512 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d9cb29be0932a6e1135cb07bf43a7e4c55a006ff68a1efd4e530482a24833ad9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter09:Sheet Pile Walls" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.1:Pg-419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.1\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "sall=30;#sigma allowed\n", - "pi=math.pi;\n", - "zbar=12.1; # in ft\n", - "L1=10.0; # in ft\n", - "L2=20.0; #in ft\n", - "Gamma=0.12; # in lb/ft^3\n", - "Gamma1=0.1294-0.0624; # in lb/ft^3\n", - "phi=40*pi/180; # angle given\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in Kip/ft\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in Kip/ft\n", - "L3=s2/(Gamma1*(Kp-Ka)); # in ft\n", - "print round(L3,2),\"is length in ft\"\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;# in Kip/ft\n", - "print round(P,2),\" is force in kip/ft\"\n", - "s5=Gamma*L1*Kp+Gamma1*L2*Kp+Gamma*L3*(Kp-Ka);#sigma5 in Kip/ft\n", - "print round(s5,2),\" is pressure in kip/ft\"\n", - "A1=s5/(Gamma1*(Kp-Ka)); # in ft^2\n", - "A2=8.0*P/(Gamma1*(Kp-Ka)) # in ft^2\n", - "A3=6.0*P*(2.0*zbar*(Gamma1*(Kp-Ka))+s5)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", - "A4=P*(6.0*zbar*s5+4.0*P)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", - "print \"A1,A2,A3,A4 respectively is \",round(A1,1),round(A2,2),round(A3,2),round(A4,2)\n", - "print \"slight error due to rounding off error\"\n", - "#part(b)\n", - "def f(x):\n", - " return x**4+41.7*x**3-270.5*x**2-13363*x-106863\n", - "[x]=fsolve(f,20);\n", - "D=1.88+x;\n", - "print round(D,2),\" is value of D, in ft\"\n", - "TL=L1+L2+1.3*D;\n", - "print round(TL,2),\" is total length in ft\"\n", - "#partc\n", - "z=math.sqrt(2*P/(Gamma1*(Kp-Ka)));#zdash\n", - "Mmax=P*(z+zbar)-1/2.0*(Gamma1*(Kp-Ka))*z**2*z/3.0;\n", - "S=Mmax*12/sall;\n", - "print round(S,2),\"is section modulus in in^3/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.88 is length in ft\n", - "9.96 is force in kip/ft\n", - "12.67 is pressure in kip/ft\n", - "A1,A2,A3,A4 respectively is 43.2 271.33 13708.16 110880.89\n", - "slight error due to rounding off error\n", - "21.68 is value of D, in ft\n", - "58.19 is total length in ft\n", - "70.06 is section modulus in in^3/ft\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.2:Pg-426" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.2\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "sall=172.5*1000;#sigma allowed in KN/m^2\n", - "pi=math.pi;\n", - "c=47.0; # in KN/m^2\n", - "zbar=1.78; # in m\n", - "L1=2.0; #in m\n", - "L2=3.0; # in m\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "phi=32*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2; # in kN/ft\n", - "print round(P,2),\" is force in kN/m\"\n", - "def f(x):\n", - " return 127.4*x**2-104.4*x-357.15\n", - "[x]=fsolve(f,2);\n", - "D=x;\n", - "print round(D,2),\" is value of D in m\"\n", - "print round(D*1.5,2),\"actual D in m\"\n", - "L4=D*(4*c-(Gamma*L1+Gamma1*L2)-P/D)/4/c;\n", - "print round(L4,2),\" is length in m\"\n", - "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in KN/m^2\n", - "s7=4*c+(Gamma*L1+Gamma1*L2);#sigma7 in KN/m^2\n", - "z=P/s6;#zdash\n", - "Mmax=P*(z+zbar)-1/2.0*s6*z**2; # in KN-m/m\n", - "S=Mmax*12.0/sall; # in m^3/m\n", - "print round(S,4),\" is section modulus in m**3/m\"\n", - "print \"is slight error due to rounding off error\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "52.25 is force in kN/m\n", - "2.13 is value of D in m\n", - "3.2 actual D in m\n", - "1.17 is length in m\n", - "0.0072 is section modulus in m**3/m\n", - "is slight error due to rounding off error\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.3:Pg-433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.3\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "zbar=2.23; # in m\n", - "L1=2.0; # in m\n", - "L2=3.0; # in m\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "phi=32*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", - "L3=s2/(Gamma1*(Kp-Ka)); # in m\n", - "print round(L3,2),\"length in m\"\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;\n", - "print round(P,2),\"force in kN/m\"\n", - "def f(x):\n", - " return x**3+6.99*x**2-14.55\n", - "[x]=fsolve(f,1.4);\n", - "D=L3+x;\n", - "print round(D,2),\"value of D in m\"\n", - "AL=1.4*D;\n", - "print round(AL,2),\"actual length in m\"\n", - "#partb\n", - "L4=1.4;\n", - "F=P-1/2.0*(Gamma1*(Kp-Ka)*L4**2);\n", - "print round(F,2),\"anchor force in kN/m\"\n", - "#partc\n", - "def f(x):\n", - " return x**2+6.682*x-14.44\n", - "[x]=fsolve(f,1.7);\n", - "z=x+2;\n", - "Mmax=-1/2.0*s1*L1*(x+2/3.0)+F*(x+1)-s1*x*x/2-1/2.0*Ka*Gamma1*x**3/3.0;\n", - "print round(Mmax,2),\" is maximum moment in kN-m/m\" \n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.66 length in m\n", - "58.38 force in kN/m\n", - "1.98 value of D in m\n", - "2.78 actual length in m\n", - "30.88 anchor force in kN/m\n", - "43.74 is maximum moment in kN-m/m\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.4:Pg-439" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.4\n", - "\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "GD=0.23; # from fig. 9.16\n", - "CDL1=1.172; # from fig. 9.19\n", - "L1=2; # in m\n", - "L2=3; # in m\n", - "Dth=(L1+L2)*GD*CDL1;\n", - "print round(Dth,2),\"theoritical depth in m\"\n", - "Dac=1.4*Dth;\n", - "print round(Dac,2),\"actual depth in m\"\n", - "print \"approximate it as 2 m\"\n", - "#part(b)\n", - "CFL1=1.073;\n", - "GF=0.07;\n", - "Gammaa=(Gamma*L1**2+Gamma1*L2**2+2*Gamma*L1*L2)/(L1+L2)**2; # in KN/m^3\n", - "F=Gammaa*(L1+L2)**2*GF*CFL1; # in KN/m\n", - "print round(F,2),\"force in kN/m\"\n", - "#part(c)\n", - "GM=0.021; # from fig. 9.18\n", - "CML1=1.036; # from fig. 9.21\n", - "Mmax=Gammaa*(L1+L2)**3*GM*CML1; # in kN-m/m\n", - "print round(Mmax,2),\"maximum moment in kN-m/m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.35 theoritical depth in m\n", - "1.89 actual depth in m\n", - "approximate it as 2 m\n", - "25.54 force in kN/m\n", - "36.99 maximum moment in kN-m/m\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.5:Pg-442" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.5\n", - "import math\n", - "import matplotlib.pyplot as plt\n", - "import numpy\n", - "Mmax=43.72; # in kN-m/m\n", - "sp=[\"PSA-31\",\"PSA-23\"];#sheet pile\n", - "H=[7.9,7.9] # in m\n", - "I=[4.41e-6,5.63e-6]; # in m^4/m\n", - "p=[0.00466,0.00365];\n", - "S=[10.8e-5,12.8e-5]; # in m^3/m\n", - "Md=[18.63,22.08]; # kn-m/m\n", - "Logp=numpy.zeros(2)\n", - "k=numpy.zeros(2)\n", - "print \"SheetPile I(m**4/m) H(m) p\\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \\n\"\n", - "for i in range(0,2):\n", - " Logp[i]=math.log10(p[i]);\n", - " k[i]=Md[i]/Mmax;\n", - " print sp[i],\"\\t \",I[i],\" \",H[i],\" \",p[i],\" \",round(Logp[i],2),\" \",S[i],\" \",Md[i],\"\\t \",round(k[i],3)\n", - " \n", - "\n", - "plt.plot(Logp,k);\n", - "plt.title(\"Ex9.5\")\n", - "plt.xlabel(\"LogP\")\n", - "plt.ylabel(\"Md/Mmax\")\n", - "plt.show()\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "SheetPile I(m**4/m) H(m) p\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \n", - "\n", - "PSA-31 \t 4.41e-06 7.9 0.00466 -2.33 0.000108 18.63 \t 0.426\n", - "PSA-23 \t 5.63e-06 7.9 0.00365 -2.44 0.000128 22.08 \t 0.505\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.6:Pg-445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.6\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "R=0.6;\n", - "L1=10.0; # in ft\n", - "L2=20.0; #in ft\n", - "Gammasat=122.4; # in lb/ft^3\n", - "l1=5; # in ft\n", - "Gamma=110.0; # in lb/ft^3\n", - "C=0.68;\n", - "L=L1+L2; # in ft\n", - "Gammaw=62.4; # in lb/ft^3\n", - "Gamma1=Gammasat-Gammaw;#gammadash in lb/ft^3\n", - "Gammaav=(Gamma*L1+Gamma1*L2)/(L1+L2); # in lb/ft^3\n", - "phi=35.0*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "sa=C*Ka*Gammaav*L;#sigmaa in lb/ft^2\n", - "sp=R*sa;#sigmap # in lb/ft^2\n", - "def f(x):\n", - " return x**2+50*x-1000\n", - "[x]=fsolve(f,15);\n", - "D=x;#in ft\n", - "print round(D,2),\" is depth in ft\"\n", - "R=L/D*(L-2*l1)/(2*L+D-2*l1);\n", - "print \"value of R=\",round(R,2),\" is OK\\n\"\n", - "#partb\n", - "F=sa*(L-R*D); # in lb/ft\n", - "print round(F,2),\" is Force in lb/ft\"\n", - "#partc\n", - "Mmax=0.5*sa*L**2*((1-R*D/L)**2-(2*l1/L)*(1-R*D/L)); # in lb-ft/ft\n", - "print round(Mmax,2),\"maximum moment lb-ft/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15.31 is depth in ft\n", - "value of R= 0.6 is OK\n", - "\n", - "8821.24 is Force in lb/ft\n", - "47693.02 maximum moment lb-ft/ft\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.7:Pg-451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.7\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "zbar=3.2; # in m\n", - "c=41; # in KN/m^2\n", - "L1=3; # in m\n", - "L2=6; # in m\n", - "Gamma=17;# in KN/m^3\n", - "Gamma1=20-9.81; # in KN/m^3\n", - "phi=35*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in kN/m**2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in kN/m**2\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2;\n", - "print round(P,2),\"Force in kN/m\"\n", - "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in kN/m**2\n", - "print round(s6,2),\"pressure in kN/m**2\"\n", - "def f(x):\n", - " return x**2+15*x-25.43\n", - "[x]=fsolve(f,1.6);\n", - "D=x; # in m\n", - "print round(D,1),\"depth in m\"\n", - "F=P-s6*D; # in kN/m\n", - "print round(F,2),\"force in kN/m\"\n", - "print \"slight error due to rounding off\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "153.36 Force in kN/m\n", - "51.86 pressure in kN/m**2\n", - "1.5 depth in m\n", - "73.61 force in kN/m\n", - "slight error due to rounding off\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.8\n", - "import math\n", - "pi=math.pi;\n", - "Gamma=105.0; # in lb/ft^3\n", - "Cov=14.0;\n", - "B=15/12.0; # in inch\n", - "Ka=0.26;\n", - "phi=35.0*pi/180; # given angle in degree\n", - "H=37.5/12; # in inch\n", - "h=15/12.0; # in inch\n", - "t=6/12.0; # in inch\n", - "Gc=150.0;#gamma concrete in lb/ft^3\n", - "W=H*t*Gc; # in lb/ft\n", - "k=4.5;#kp*cos(delta)\n", - "Pu=1/2.0*Gamma*H**2*(k-Ka*math.cos(phi)); # in lb/ft\n", - "print round(Pu,2),\"force in lb/ft\"\n", - "Pus=((Cov+1)/(Cov+H/h))*Pu; # in lb/ft\n", - "print round(Pus,2),\"force in lb/ft\"\n", - "Be=0.227*(H+h)+B;\n", - "Pu=Pus*Be; # in lb/ft\n", - "print round(Pu,2),\" is resistance of anchor plate in lb/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2197.94 force in lb/ft\n", - "1998.12 force in lb/ft\n", - "4482.04 is resistance of anchor plate in lb/ft\n" - ] - } - ], - "prompt_number": 37 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter09_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter09_2.ipynb deleted file mode 100755 index 7d8bec64..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter09_2.ipynb +++ /dev/null @@ -1,520 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a20958eb0a1cf98629a18a836583d76a2fff705e2f3370294ba37a907bebd17b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter09:Sheet Pile Walls" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.1:Pg-419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.1\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "sall=30;#sigma allowed\n", - "pi=math.pi;\n", - "zbar=12.1; # in ft\n", - "L1=10.0; # in ft\n", - "L2=20.0; #in ft\n", - "Gamma=0.12; # in lb/ft^3\n", - "Gamma1=0.1294-0.0624; # in lb/ft^3\n", - "phi=40*pi/180; # angle given\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in Kip/ft\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in Kip/ft\n", - "L3=s2/(Gamma1*(Kp-Ka)); # in ft\n", - "print round(L3,2),\"is length in ft\"\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;# in Kip/ft\n", - "print round(P,2),\" is force in kip/ft\"\n", - "s5=Gamma*L1*Kp+Gamma1*L2*Kp+Gamma*L3*(Kp-Ka);#sigma5 in Kip/ft\n", - "print round(s5,2),\" is pressure in kip/ft\"\n", - "A1=s5/(Gamma1*(Kp-Ka)); # in ft^2\n", - "A2=8.0*P/(Gamma1*(Kp-Ka)) # in ft^2\n", - "A3=6.0*P*(2.0*zbar*(Gamma1*(Kp-Ka))+s5)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", - "A4=P*(6.0*zbar*s5+4.0*P)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", - "print \"A1,A2,A3,A4 respectively is \",round(A1,1),round(A2,2),round(A3,2),round(A4,2)\n", - "print \"slight error due to rounding off error\"\n", - "#part(b)\n", - "def f(x):\n", - " return x**4+41.7*x**3-270.5*x**2-13363*x-106863\n", - "[x]=fsolve(f,20);\n", - "D=1.88+x;\n", - "print round(D,2),\" is value of D, in ft\"\n", - "TL=L1+L2+1.3*D;\n", - "print round(TL,2),\" is total length in ft\"\n", - "#partc\n", - "z=math.sqrt(2*P/(Gamma1*(Kp-Ka)));#zdash\n", - "Mmax=P*(z+zbar)-1/2.0*(Gamma1*(Kp-Ka))*z**2*z/3.0;\n", - "S=Mmax*12/sall;\n", - "print round(S,2),\"is section modulus in in^3/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.88 is length in ft\n", - "9.96 is force in kip/ft\n", - "12.67 is pressure in kip/ft\n", - "A1,A2,A3,A4 respectively is 43.2 271.33 13708.16 110880.89\n", - "slight error due to rounding off error\n", - "21.68 is value of D, in ft\n", - "58.19 is total length in ft\n", - "70.06 is section modulus in in^3/ft\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.2:Pg-426" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.2\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "sall=172.5*1000;#sigma allowed in KN/m^2\n", - "pi=math.pi;\n", - "c=47.0; # in KN/m^2\n", - "zbar=1.78; # in m\n", - "L1=2.0; #in m\n", - "L2=3.0; # in m\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "phi=32*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2; # in kN/ft\n", - "print round(P,2),\" is force in kN/m\"\n", - "def f(x):\n", - " return 127.4*x**2-104.4*x-357.15\n", - "[x]=fsolve(f,2);\n", - "D=x;\n", - "print round(D,2),\" is value of D in m\"\n", - "print round(D*1.5,2),\"actual D in m\"\n", - "L4=D*(4*c-(Gamma*L1+Gamma1*L2)-P/D)/4/c;\n", - "print round(L4,2),\" is length in m\"\n", - "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in KN/m^2\n", - "s7=4*c+(Gamma*L1+Gamma1*L2);#sigma7 in KN/m^2\n", - "z=P/s6;#zdash\n", - "Mmax=P*(z+zbar)-1/2.0*s6*z**2; # in KN-m/m\n", - "S=Mmax*12.0/sall; # in m^3/m\n", - "print round(S,4),\" is section modulus in m**3/m\"\n", - "print \"is slight error due to rounding off error\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "52.25 is force in kN/m\n", - "2.13 is value of D in m\n", - "3.2 actual D in m\n", - "1.17 is length in m\n", - "0.0072 is section modulus in m**3/m\n", - "is slight error due to rounding off error\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.3:Pg-433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.3\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "zbar=2.23; # in m\n", - "L1=2.0; # in m\n", - "L2=3.0; # in m\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "phi=32*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", - "L3=s2/(Gamma1*(Kp-Ka)); # in m\n", - "print round(L3,2),\"length in m\"\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;\n", - "print round(P,2),\"force in kN/m\"\n", - "def f(x):\n", - " return x**3+6.99*x**2-14.55\n", - "[x]=fsolve(f,1.4);\n", - "D=L3+x;\n", - "print round(D,2),\"value of D in m\"\n", - "AL=1.4*D;\n", - "print round(AL,2),\"actual length in m\"\n", - "#partb\n", - "L4=1.4;\n", - "F=P-1/2.0*(Gamma1*(Kp-Ka)*L4**2);\n", - "print round(F,2),\"anchor force in kN/m\"\n", - "#partc\n", - "def f(x):\n", - " return x**2+6.682*x-14.44\n", - "[x]=fsolve(f,1.7);\n", - "z=x+2;\n", - "Mmax=-1/2.0*s1*L1*(x+2/3.0)+F*(x+1)-s1*x*x/2-1/2.0*Ka*Gamma1*x**3/3.0;\n", - "print round(Mmax,2),\" is maximum moment in kN-m/m\" \n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "0.66 length in m\n", - "58.38 force in kN/m\n", - "1.98 value of D in m\n", - "2.78 actual length in m\n", - "30.88 anchor force in kN/m\n", - "43.74 is maximum moment in kN-m/m\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.4:Pg-439" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.4\n", - "\n", - "Gamma=15.9; # in KN/m^3\n", - "Gamma1=19.33-9.81; # in KN/m^3\n", - "GD=0.23; # from fig. 9.16\n", - "CDL1=1.172; # from fig. 9.19\n", - "L1=2; # in m\n", - "L2=3; # in m\n", - "Dth=(L1+L2)*GD*CDL1;\n", - "print round(Dth,2),\"theoritical depth in m\"\n", - "Dac=1.4*Dth;\n", - "print round(Dac,2),\"actual depth in m\"\n", - "print \"approximate it as 2 m\"\n", - "#part(b)\n", - "CFL1=1.073;\n", - "GF=0.07;\n", - "Gammaa=(Gamma*L1**2+Gamma1*L2**2+2*Gamma*L1*L2)/(L1+L2)**2; # in KN/m^3\n", - "F=Gammaa*(L1+L2)**2*GF*CFL1; # in KN/m\n", - "print round(F,2),\"force in kN/m\"\n", - "#part(c)\n", - "GM=0.021; # from fig. 9.18\n", - "CML1=1.036; # from fig. 9.21\n", - "Mmax=Gammaa*(L1+L2)**3*GM*CML1; # in kN-m/m\n", - "print round(Mmax,2),\"maximum moment in kN-m/m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.35 theoritical depth in m\n", - "1.89 actual depth in m\n", - "approximate it as 2 m\n", - "25.54 force in kN/m\n", - "36.99 maximum moment in kN-m/m\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.5:Pg-442" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.5\n", - "import math\n", - "import matplotlib.pyplot as plt\n", - "import numpy\n", - "Mmax=43.72; # in kN-m/m\n", - "sp=[\"PSA-31\",\"PSA-23\"];#sheet pile\n", - "H=[7.9,7.9] # in m\n", - "I=[4.41e-6,5.63e-6]; # in m^4/m\n", - "p=[0.00466,0.00365];\n", - "S=[10.8e-5,12.8e-5]; # in m^3/m\n", - "Md=[18.63,22.08]; # kn-m/m\n", - "Logp=numpy.zeros(2)\n", - "k=numpy.zeros(2)\n", - "print \"SheetPile I(m**4/m) H(m) p\\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \\n\"\n", - "for i in range(0,2):\n", - " Logp[i]=math.log10(p[i]);\n", - " k[i]=Md[i]/Mmax;\n", - " print sp[i],\"\\t \",I[i],\" \",H[i],\" \",p[i],\" \",round(Logp[i],2),\" \",S[i],\" \",Md[i],\"\\t \",round(k[i],3)\n", - " \n", - "\n", - "plt.plot(Logp,k);\n", - "plt.title(\"Ex9.5\")\n", - "plt.xlabel(\"LogP\")\n", - "plt.ylabel(\"Md/Mmax\")\n", - "plt.show()\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "SheetPile I(m**4/m) H(m) p\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \n", - "\n", - "PSA-31 \t 4.41e-06 7.9 0.00466 -2.33 0.000108 18.63 \t 0.426\n", - "PSA-23 \t 5.63e-06 7.9 0.00365 -2.44 0.000128 22.08 \t 0.505\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.6:Pg-445" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.6\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "R=0.6;\n", - "L1=10.0; # in ft\n", - "L2=20.0; #in ft\n", - "Gammasat=122.4; # in lb/ft^3\n", - "l1=5; # in ft\n", - "Gamma=110.0; # in lb/ft^3\n", - "C=0.68;\n", - "L=L1+L2; # in ft\n", - "Gammaw=62.4; # in lb/ft^3\n", - "Gamma1=Gammasat-Gammaw;#gammadash in lb/ft^3\n", - "Gammaav=(Gamma*L1+Gamma1*L2)/(L1+L2); # in lb/ft^3\n", - "phi=35.0*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "sa=C*Ka*Gammaav*L;#sigmaa in lb/ft^2\n", - "sp=R*sa;#sigmap # in lb/ft^2\n", - "def f(x):\n", - " return x**2+50*x-1000\n", - "[x]=fsolve(f,15);\n", - "D=x;#in ft\n", - "print round(D,2),\" is depth in ft\"\n", - "R=L/D*(L-2*l1)/(2*L+D-2*l1);\n", - "print \"value of R=\",round(R,2),\" is OK\\n\"\n", - "#partb\n", - "F=sa*(L-R*D); # in lb/ft\n", - "print round(F,2),\" is Force in lb/ft\"\n", - "#partc\n", - "Mmax=0.5*sa*L**2*((1-R*D/L)**2-(2*l1/L)*(1-R*D/L)); # in lb-ft/ft\n", - "print round(Mmax,2),\"maximum moment lb-ft/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15.31 is depth in ft\n", - "value of R= 0.6 is OK\n", - "\n", - "8821.24 is Force in lb/ft\n", - "47693.02 maximum moment lb-ft/ft\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.7:Pg-451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.7\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "\n", - "pi=math.pi;\n", - "zbar=3.2; # in m\n", - "c=41; # in KN/m^2\n", - "L1=3; # in m\n", - "L2=6; # in m\n", - "Gamma=17;# in KN/m^3\n", - "Gamma1=20-9.81; # in KN/m^3\n", - "phi=35*pi/180;\n", - "Ka=(math.tan(pi/4-phi/2))**2;\n", - "Kp=(math.tan(pi/4+phi/2))**2;\n", - "s1=Gamma*L1*Ka;#sigma1 in kN/m**2\n", - "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in kN/m**2\n", - "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2;\n", - "print round(P,2),\"Force in kN/m\"\n", - "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in kN/m**2\n", - "print round(s6,2),\"pressure in kN/m**2\"\n", - "def f(x):\n", - " return x**2+15*x-25.43\n", - "[x]=fsolve(f,1.6);\n", - "D=x; # in m\n", - "print round(D,1),\"depth in m\"\n", - "F=P-s6*D; # in kN/m\n", - "print round(F,2),\"force in kN/m\"\n", - "print \"slight error due to rounding off\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "153.36 Force in kN/m\n", - "51.86 pressure in kN/m**2\n", - "1.5 depth in m\n", - "73.61 force in kN/m\n", - "slight error due to rounding off\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex9.8:pg-458" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 9.8\n", - "import math\n", - "pi=math.pi;\n", - "Gamma=105.0; # in lb/ft^3\n", - "Cov=14.0;\n", - "B=15/12.0; # in inch\n", - "Ka=0.26;\n", - "phi=35.0*pi/180; # given angle in degree\n", - "H=37.5/12; # in inch\n", - "h=15/12.0; # in inch\n", - "t=6/12.0; # in inch\n", - "Gc=150.0;#gamma concrete in lb/ft^3\n", - "W=H*t*Gc; # in lb/ft\n", - "k=4.5;#kp*cos(delta)\n", - "Pu=1/2.0*Gamma*H**2*(k-Ka*math.cos(phi)); # in lb/ft\n", - "print round(Pu,2),\"force in lb/ft\"\n", - "Pus=((Cov+1)/(Cov+H/h))*Pu; # in lb/ft\n", - "print round(Pus,2),\"force in lb/ft\"\n", - "Be=0.227*(H+h)+B;\n", - "Pu=Pus*Be; # in lb/ft\n", - "print round(Pu,2),\" is resistance of anchor plate in lb/ft\"\n", - "\n", - "# The answers in the book are different due to approximation while here calculations are precise" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2197.94 force in lb/ft\n", - "1998.12 force in lb/ft\n", - "4482.04 is resistance of anchor plate in lb/ft\n" - ] - } - ], - "prompt_number": 37 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter10.ipynb b/Principles_Of_Foundation_Engineering/Chapter10.ipynb deleted file mode 100755 index 3af11efd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter10.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:54ddb8c76d55d78e9f237ddb7f5823ac10a3585adf1b3932a3b8cc9352fd8e76" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10:Braced Cuts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.1: pg-511" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.1 : \n", - "\n", - "Gamma=18.0;\n", - "H=7.0;\n", - "sigmaa=0.3*Gamma*H;\n", - "print\"maximum pressure intensity in kN/m^2 is\",sigmaa ;\n", - "#partb\n", - "A=54.02;\n", - "B1=1.0/2*1.75*37.8+37.8*1.75-A;\n", - "B2=45.2;\n", - "C=54.02;\n", - "s=3.0; #spacing\n", - "Pa=C*s;\n", - "print \"strut loads in kN is\",Pa\n", - "Pb=(B1+B2)*s;\n", - "print \"strut loads in kN is\",Pb\n", - "Pc=C*s;\n", - "print \"strut loads in kN is\", Pc\n", - "#partc\n", - "Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax\n", - "Sall=170e3;#sigmaall\n", - "S=Me/Sall;\n", - "print \"section modulus in m^3/m is \",round(S,7)\n", - "#partd\n", - "Mmax=(B1+B2)*s**2.0/8;\n", - "S=Mmax/Sall;\n", - "print\"section modulus in m^3/m is\",round(S,6)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum pressure intensity in kN/m^2 is 37.8\n", - "strut loads in kN is 162.06\n", - "strut loads in kN is 271.215\n", - "strut loads in kN is 162.06\n", - "section modulus in m^3/m is 0.000159\n", - "section modulus in m^3/m is 0.000598\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.2:pg-514" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.2\n", - "\n", - "import math\n", - "phi=35.0;\n", - "Gamma=17.0; # kN/m^3\n", - "s=4; #spacing in m\n", - "H=9;\n", - "Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2\n", - "sigma=0.65*Gamma*Ka*H\n", - "A=sigma*5*5.0/6;\n", - "B1=sigma*5-A;\n", - "C=sigma*4*4/6.0; \n", - "B2=sigma*s-C;\n", - "Pa=A*s;\n", - "Pb=(B1+B2)*s;\n", - "Pc=C*s;\n", - "print \"strut loads at A in kN is\",round(Pa,2)\n", - "\n", - "print \"strut loads at B in kN is\",round(Pb,2)\n", - "\n", - "print \"strut loads at C in kN is\",round(Pc,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "strut loads at A in kN is 449.17\n", - "strut loads at B in kN is 233.57\n", - "strut loads at C in kN is 287.47\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.3:pg-523" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.3\n", - "\n", - "import math\n", - "q=0;\n", - "Gamma=17; # in KN/m^3\n", - "B=3.0 # in meter\n", - "L=20; # in meter\n", - "c=30;# in KN/m^3\n", - "T=1.5;# in meter\n", - "H=5.5;# in meter\n", - "B1=B/2;#B'\n", - "B11=T*math.sqrt(2);#B''\n", - "FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety\n", - "print\"factor of safety is\",round(FS,2)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "factor of safety is 2.86\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.4:pg-529" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.4\n", - "\n", - "\n", - "L1=5; # in meter\n", - "L2=4;# in meter\n", - "B=5;# in meter\n", - "h=4.5;# in meter\n", - "icr=1 #\n", - "iexit= 0.54*h/L2\n", - "FOS=icr/iexit # Factor of safety\n", - "print \"The Factory of safety is\",round(FOS,3)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Factory of safety is 1.646\n" - ] - } - ], - "prompt_number": 23 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter10_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter10_1.ipynb deleted file mode 100755 index 3af11efd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter10_1.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:54ddb8c76d55d78e9f237ddb7f5823ac10a3585adf1b3932a3b8cc9352fd8e76" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10:Braced Cuts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.1: pg-511" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.1 : \n", - "\n", - "Gamma=18.0;\n", - "H=7.0;\n", - "sigmaa=0.3*Gamma*H;\n", - "print\"maximum pressure intensity in kN/m^2 is\",sigmaa ;\n", - "#partb\n", - "A=54.02;\n", - "B1=1.0/2*1.75*37.8+37.8*1.75-A;\n", - "B2=45.2;\n", - "C=54.02;\n", - "s=3.0; #spacing\n", - "Pa=C*s;\n", - "print \"strut loads in kN is\",Pa\n", - "Pb=(B1+B2)*s;\n", - "print \"strut loads in kN is\",Pb\n", - "Pc=C*s;\n", - "print \"strut loads in kN is\", Pc\n", - "#partc\n", - "Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax\n", - "Sall=170e3;#sigmaall\n", - "S=Me/Sall;\n", - "print \"section modulus in m^3/m is \",round(S,7)\n", - "#partd\n", - "Mmax=(B1+B2)*s**2.0/8;\n", - "S=Mmax/Sall;\n", - "print\"section modulus in m^3/m is\",round(S,6)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum pressure intensity in kN/m^2 is 37.8\n", - "strut loads in kN is 162.06\n", - "strut loads in kN is 271.215\n", - "strut loads in kN is 162.06\n", - "section modulus in m^3/m is 0.000159\n", - "section modulus in m^3/m is 0.000598\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.2:pg-514" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.2\n", - "\n", - "import math\n", - "phi=35.0;\n", - "Gamma=17.0; # kN/m^3\n", - "s=4; #spacing in m\n", - "H=9;\n", - "Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2\n", - "sigma=0.65*Gamma*Ka*H\n", - "A=sigma*5*5.0/6;\n", - "B1=sigma*5-A;\n", - "C=sigma*4*4/6.0; \n", - "B2=sigma*s-C;\n", - "Pa=A*s;\n", - "Pb=(B1+B2)*s;\n", - "Pc=C*s;\n", - "print \"strut loads at A in kN is\",round(Pa,2)\n", - "\n", - "print \"strut loads at B in kN is\",round(Pb,2)\n", - "\n", - "print \"strut loads at C in kN is\",round(Pc,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "strut loads at A in kN is 449.17\n", - "strut loads at B in kN is 233.57\n", - "strut loads at C in kN is 287.47\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.3:pg-523" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.3\n", - "\n", - "import math\n", - "q=0;\n", - "Gamma=17; # in KN/m^3\n", - "B=3.0 # in meter\n", - "L=20; # in meter\n", - "c=30;# in KN/m^3\n", - "T=1.5;# in meter\n", - "H=5.5;# in meter\n", - "B1=B/2;#B'\n", - "B11=T*math.sqrt(2);#B''\n", - "FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety\n", - "print\"factor of safety is\",round(FS,2)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "factor of safety is 2.86\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.4:pg-529" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.4\n", - "\n", - "\n", - "L1=5; # in meter\n", - "L2=4;# in meter\n", - "B=5;# in meter\n", - "h=4.5;# in meter\n", - "icr=1 #\n", - "iexit= 0.54*h/L2\n", - "FOS=icr/iexit # Factor of safety\n", - "print \"The Factory of safety is\",round(FOS,3)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Factory of safety is 1.646\n" - ] - } - ], - "prompt_number": 23 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter10_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter10_2.ipynb deleted file mode 100755 index 3af11efd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter10_2.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:54ddb8c76d55d78e9f237ddb7f5823ac10a3585adf1b3932a3b8cc9352fd8e76" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10:Braced Cuts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.1: pg-511" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.1 : \n", - "\n", - "Gamma=18.0;\n", - "H=7.0;\n", - "sigmaa=0.3*Gamma*H;\n", - "print\"maximum pressure intensity in kN/m^2 is\",sigmaa ;\n", - "#partb\n", - "A=54.02;\n", - "B1=1.0/2*1.75*37.8+37.8*1.75-A;\n", - "B2=45.2;\n", - "C=54.02;\n", - "s=3.0; #spacing\n", - "Pa=C*s;\n", - "print \"strut loads in kN is\",Pa\n", - "Pb=(B1+B2)*s;\n", - "print \"strut loads in kN is\",Pb\n", - "Pc=C*s;\n", - "print \"strut loads in kN is\", Pc\n", - "#partc\n", - "Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax\n", - "Sall=170e3;#sigmaall\n", - "S=Me/Sall;\n", - "print \"section modulus in m^3/m is \",round(S,7)\n", - "#partd\n", - "Mmax=(B1+B2)*s**2.0/8;\n", - "S=Mmax/Sall;\n", - "print\"section modulus in m^3/m is\",round(S,6)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum pressure intensity in kN/m^2 is 37.8\n", - "strut loads in kN is 162.06\n", - "strut loads in kN is 271.215\n", - "strut loads in kN is 162.06\n", - "section modulus in m^3/m is 0.000159\n", - "section modulus in m^3/m is 0.000598\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.2:pg-514" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.2\n", - "\n", - "import math\n", - "phi=35.0;\n", - "Gamma=17.0; # kN/m^3\n", - "s=4; #spacing in m\n", - "H=9;\n", - "Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2\n", - "sigma=0.65*Gamma*Ka*H\n", - "A=sigma*5*5.0/6;\n", - "B1=sigma*5-A;\n", - "C=sigma*4*4/6.0; \n", - "B2=sigma*s-C;\n", - "Pa=A*s;\n", - "Pb=(B1+B2)*s;\n", - "Pc=C*s;\n", - "print \"strut loads at A in kN is\",round(Pa,2)\n", - "\n", - "print \"strut loads at B in kN is\",round(Pb,2)\n", - "\n", - "print \"strut loads at C in kN is\",round(Pc,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "strut loads at A in kN is 449.17\n", - "strut loads at B in kN is 233.57\n", - "strut loads at C in kN is 287.47\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.3:pg-523" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.3\n", - "\n", - "import math\n", - "q=0;\n", - "Gamma=17; # in KN/m^3\n", - "B=3.0 # in meter\n", - "L=20; # in meter\n", - "c=30;# in KN/m^3\n", - "T=1.5;# in meter\n", - "H=5.5;# in meter\n", - "B1=B/2;#B'\n", - "B11=T*math.sqrt(2);#B''\n", - "FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety\n", - "print\"factor of safety is\",round(FS,2)\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "factor of safety is 2.86\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex10.4:pg-529" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 10.4\n", - "\n", - "\n", - "L1=5; # in meter\n", - "L2=4;# in meter\n", - "B=5;# in meter\n", - "h=4.5;# in meter\n", - "icr=1 #\n", - "iexit= 0.54*h/L2\n", - "FOS=icr/iexit # Factor of safety\n", - "print \"The Factory of safety is\",round(FOS,3)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Factory of safety is 1.646\n" - ] - } - ], - "prompt_number": 23 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter11.ipynb b/Principles_Of_Foundation_Engineering/Chapter11.ipynb deleted file mode 100755 index 0afdb4a0..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter11.ipynb +++ /dev/null @@ -1,650 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a4054b3d6b79658bcd763c43dc94ca6de4cd49698c12f912e4c83a9a61f47154" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11:Pile Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.1:Pg-532" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.1\n", - "import math\n", - "\n", - "#parta\n", - "phi=30.0; # angle in degree\n", - "pa=2000.0; \n", - "q=100*50/1000.0;\n", - "Nq=55.0;\n", - "Ap=16*16/16/12; # area in ft^2\n", - "Qp=Ap*q*Nq; # in kip\n", - "qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb\n", - "print round(Qp,2),\"ultimate load in lb\"\n", - "print round(qp/1000,2),\"ultimate load in kip\"\n", - "print \"there is change in answer because of calculation mistake in the book\"\n", - "\n", - "#partb\n", - "Nsigma=36;\n", - "Ap=16*16.0/12.0/12;\n", - "q=110*50.0/1000;\n", - "Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip\n", - "print round(Qp,2),\"ultimate load in kip\"\n", - "#partc\n", - "Nq=18.4;\n", - "Qp=Ap*q*Nq; # in kip\n", - "print round(Qp,2),\"ultimate load in kip\"\n", - "\n", - "# ANSWER IN THE BOOK IS WRONG" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "275.0 ultimate load in lb\n", - "25.4 ultimate load in kip\n", - "there is change in answer because of calculation mistake in the book\n", - "234.67 ultimate load in kip\n", - "179.91 ultimate load in kip\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.2:Pg-533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.2\n", - "\n", - "import math\n", - "#parta\n", - "K=1.3;\n", - "f0=0;\n", - "Delta=0.8*30; # in ft\n", - "D=16.0/12; # in ft\n", - "L1=50.0;\n", - "p=4*16/12.0; # in ft\n", - "Gamma=110/1000.0; # in lb/ft^3\n", - "L=15*D; # in ft\n", - "sigma=Gamma*L; # in kip/ft^2\n", - "f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2\n", - "Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);\n", - "print round(Qs,2),\"ultimate load in kip\"\n", - "#partb\n", - "FS=4; # factor of safety\n", - "Qp=56.45/3+234.7/3+179.9/3; # in kip\n", - "Qu=Qs+Qp; # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall,2),\"is allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "271.65 ultimate load in kip\n", - "107.17 is allowed load in kip\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.3:Pg-534" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.3\n", - "import math\n", - "K=0.25;\n", - "Ap=16*16.0/12/12; # area in ft^2\n", - "phi=30*math.pi/180;\n", - "Nq=25;\n", - "q=110*50.0/1000; # in kip\n", - "sigmao=q/2; # in kip/ft^2\n", - "p=4*16.0/12; # in ft\n", - "L=50; # in ft\n", - "FS=4; # factor of safety\n", - "Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall,1),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "81.5 allowed load in kip\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.4:Pg-535" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.4\n", - "\n", - "import math\n", - "import numpy\n", - "FS=4; # factor of safety\n", - "Ap=0.1295; # area in m^2\n", - "Nc=9;\n", - "cu2=100;\n", - "Qp=Ap*Nc*cu2; # in kN\n", - "D=[5, 10, 30]; # depth in m\n", - "avgD=[2.5, 7.5,20.0]; # average depth in m\n", - "sigma=[45.0, 110.5, 228.5]; # in KN/m^2\n", - "cu=[30, 30, 100]; # in kN/m^2\n", - "alpha=[0.6, 0.9, 0.725];\n", - "L=[5, 5, 20]; # in m\n", - "p=math.pi*0.406;\n", - "Qs=0; # in kN\n", - "cusig=numpy.zeros(3)\n", - "print round(Qp,2),\"bearing capacity in kN\"\n", - "print \"depth (m)\\t avg Depth(m)\\t avgVerticalStress(kN/m**2)\\t cu(kN/m**2)\\t cu/sigma\\t alpha\\n\"\n", - "for i in range(0,3):\n", - " cusig[i]=cu[i]/sigma[i];\n", - " Qs=Qs+alpha[i]*cu[i]*L[i]*p;\n", - " print round(D[i],2),\"\\t \\t \\t\",round(avgD[i],2),\"\\t \\t\",round(sigma[i],2),\"\\t\\t\\t \",round(cu[i],2),\"\\t \",round(cusig[i],2),\"\\t\\t \",round(alpha[i],2),\"\\n\"\n", - "print round(Qs,2),\"bearing capacity in kN\"\n", - "#part2\n", - "Lambda=0.136;\n", - "L=30;\n", - "fav=Lambda*(178.48+2*76.7);\n", - "Qs2=p*L*fav; # in kN\n", - "#part3\n", - "fav1=13;\n", - "fav2=31.9;\n", - "fav3=93.43;\n", - "Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN\n", - "print round(Qs3,1),\"bearing capacity in kN\"\n", - "Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN\n", - "Qu=Qp+Qsavg # in kN\n", - "Qall=Qu/FS; # in kN\n", - "print round(Qall,1),\"allowed bearing capacity in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "116.55 bearing capacity in kN\n", - "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n", - "\n", - "5.0 \t \t \t2.5 \t \t45.0 \t\t\t 30.0 \t 0.67 \t\t 0.6 \n", - "\n", - "10.0 \t \t \t7.5 \t \t110.5 \t\t\t 30.0 \t 0.27 \t\t 0.9 \n", - "\n", - "30.0 \t \t \t20.0 \t \t228.5 \t\t\t 100.0 \t 0.44 \t\t 0.72 \n", - "\n", - "2136.44 bearing capacity in kN\n", - "2669.7 bearing capacity in kN\n", - "573.6 allowed bearing capacity in kN\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.5:Pg-538" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.5\n", - "\n", - "import numpy\n", - "D=[6, 12, 20]; # depth in m\n", - "fc=[34.34, 54.94, 70.63]; # in kN/m**2\n", - "alpha=[0.84, 0.71, 0.63];\n", - "dL=[6, 6, 8]; # in m\n", - "p=4*0.305;\n", - "Qs=0;\n", - "Q=numpy.zeros(3)\n", - "print \" depth(m)\\t fc(kN/m**2)\\t alpha \\t \\t deltaL(m)\\t Q(kN)\\n\"\n", - "for i in range (0,3):\n", - " Q[i]=alpha[i]*fc[i]*p*dL[i];\n", - " Qs=Q[i]+Qs;\n", - " print D[i],\"\\t\\t \",fc[i],\"\\t \",alpha[i],\"\\t \",dL[i],\"\\t\\t \",round(Q[i],2)\n", - "\n", - "print round(Qs),\"bearing force in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n", - "\n", - "6 \t\t 34.34 \t 0.84 \t 6 \t\t 211.15\n", - "12 \t\t 54.94 \t 0.71 \t 6 \t\t 285.53\n", - "20 \t\t 70.63 \t 0.63 \t 8 \t\t 434.29\n", - "931.0 bearing force in kN\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:Pg-545" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.6\n", - "\n", - "import math\n", - "L=21; # in m\n", - "Qwp=502-350; # in kN\n", - "Qws=350; # in kN\n", - "Ap=0.1045; # area in m^2\n", - "Ep=21e6; # in kN/m^2\n", - "epsilon=0.62;\n", - "Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m\n", - "#part2\n", - "Iwp=0.85;\n", - "qwp=152/Ap;\n", - "Es=25e3; # in kN/m^2\n", - "D=0.356; # in m\n", - "mus=0.35;\n", - "Se2=qwp*D/Es*Iwp*(1-mus**2); # in m\n", - "#part3\n", - "p=1.168;\n", - "Iws=2+0.35*math.sqrt(L/D);\n", - "Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m\n", - "Se=Se1+Se2+Se3; # in m\n", - "print round(Se*1000,1),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "19.8 settlement in mm\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.7:Pg-560" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.7\n", - "\n", - "Ep=207e6; # in kN/m^2\n", - "Ip=123e-6; # in m^4\n", - "nh=12000; # in kN/m^3\n", - "#from table 11.13\n", - "xz=0.008;\n", - "Ax=2.435;\n", - "T=(Ep*Ip/nh)**0.2;\n", - "Qg1=xz*Ep*Ip/Ax/T**3;\n", - "#part2\n", - "Fy=248000;\n", - "d1=0.254;\n", - "Am=0.772;\n", - "Mzmax=Fy*Ip*2/d1; # in Kn-m\n", - "Qg2=Mzmax/Am/T; # in kN\n", - "if Qg2>Qg1 :\n", - " Qg=Qg1;\n", - " print round(Qg,2),\"lateral load in kN\"\n", - "# there is slight variation in answer in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "53.27 lateral load in kN\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.8:Pg-561" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.8\n", - "\n", - "import math\n", - "#part1\n", - "Ep=207e6; # in kN/m^2\n", - "Ip=123e-6; # in m^4\n", - "nh=12000; # in kN/m^3\n", - "#from table 11.1a\n", - "xo=0.008; # in m\n", - "L=25;\n", - "Fy=248000; # yield stress in kN/m^2\n", - "D=0.254;\n", - "Am=0.772;\n", - "Gamma=18.0; # in kN/m^3\n", - "phi=35; # in angle\n", - "Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;\n", - "My=Fy*Ip*2/D; # in kN-m\n", - "Qug=140*Kp*D**3*Gamma; # in kN\n", - "\n", - "#part2\n", - "Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN\n", - "\n", - "if Qug>Qg1:\n", - " Qg=Qg1;\n", - " print round(Qg,2),\"lateral load in kN\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "40.2 lateral load in kN\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.9:Pg-567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.9\n", - "\n", - "import math\n", - "Wrh=30*12; # in kip-ft\n", - "E=0.8;\n", - "Wr=7.5; # in kip\n", - "S=1/8.0; \n", - "C=0.1;\n", - "FS=6; # in factor of safety\n", - "n=0.4; # Coefficient of restitution\n", - "Wp=12/12.0*12/12.0*80*150+550; # in lb\n", - "Wp=Wp/1000.0;\n", - "Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed bearing capacity in kip\"\n", - "#part2\n", - "He=30*12.0;\n", - "L=80*12.0;\n", - "Ap=12*12.0; # area in in^2\n", - "Ep=3e6/1000.0; # in kip/in^2\n", - "FS=4; # factor of safety\n", - "Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip\n", - "Qall2=Qu/FS; # in kip\n", - "print round(Qall2),\"allowed bearing capacity in kip\"\n", - "\n", - "#partc\n", - "a=27;\n", - "b=1;\n", - "He=30;\n", - "FS=3; # factor of safety\n", - "Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip\n", - "Qall3=Qu/FS; # in kip\n", - "print round(Qall3),\"allowed bearing capacity in kip\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "101.0 allowed bearing capacity in kip\n", - "104.0 allowed bearing capacity in kip\n", - "84.0 allowed bearing capacity in kip\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.10:Pg-570" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.10\n", - "\n", - "Hp=350; # in HP\n", - "vp=0.0016; # in m/s\n", - "Sl=0.762e-3; # in m/cycle\n", - "f=115; # in Hz\n", - "Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN\n", - "print round(Qu),\"pile load capacity in kN\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2928.0 pile load capacity in kN\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.11:Pg-578" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.11\n", - "\n", - "Lg=9.92; # in ft\n", - "Bg=7.0; # in ft\n", - "n1=3.0;\n", - "Nc=8.75;\n", - "n2=4.0/1000;\n", - "Ap=14.0**2.0/12.0**2;\n", - "cup=1775.0;\n", - "a1=0.4;#alpha1\n", - "p=4*14.0/12.0;\n", - "cu1=1050.0; # in lb/ft^2\n", - "L1=15.0;\n", - "a2=0.54;#alpha2\n", - "cu2=1775.0; # in lb/ft^2\n", - "L2=45.0;\n", - "FS=4; # factor of safety\n", - "Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip\n", - "Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip\n", - "print round(Qu2/1000),\"load in kip\"\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed load in kip\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4314.0 load in kip\n", - "757.0 allowed load in kip\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.12:Pg-583" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.12\n", - "\n", - "import math\n", - "z1=21/2.0; # in ft\n", - "Lg=9.0; # in ft\n", - "Bg=6.0;# in ft\n", - "Qg=500*1000.0; # in kip\n", - "Cc1=0.3;\n", - "Cc2=0.2;\n", - "Cc3=0.25;\n", - "H2=12;\n", - "H3=6;\n", - "H1=21;\n", - "e1=0.82;\n", - "e2=0.7;\n", - "e3=0.75;\n", - "s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3\n", - "s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3\n", - "s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3\n", - "ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3\n", - "ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3\n", - "ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3\n", - "sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch\n", - "sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch\n", - "sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch\n", - "sc=sc1+sc2+sc3; # in inch\n", - "print round(sc*12,1),\"total settlement in inch\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "9.6 total settlement in inch\n" - ] - } - ], - "prompt_number": 45 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter11_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter11_1.ipynb deleted file mode 100755 index 0afdb4a0..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter11_1.ipynb +++ /dev/null @@ -1,650 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a4054b3d6b79658bcd763c43dc94ca6de4cd49698c12f912e4c83a9a61f47154" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11:Pile Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.1:Pg-532" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.1\n", - "import math\n", - "\n", - "#parta\n", - "phi=30.0; # angle in degree\n", - "pa=2000.0; \n", - "q=100*50/1000.0;\n", - "Nq=55.0;\n", - "Ap=16*16/16/12; # area in ft^2\n", - "Qp=Ap*q*Nq; # in kip\n", - "qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb\n", - "print round(Qp,2),\"ultimate load in lb\"\n", - "print round(qp/1000,2),\"ultimate load in kip\"\n", - "print \"there is change in answer because of calculation mistake in the book\"\n", - "\n", - "#partb\n", - "Nsigma=36;\n", - "Ap=16*16.0/12.0/12;\n", - "q=110*50.0/1000;\n", - "Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip\n", - "print round(Qp,2),\"ultimate load in kip\"\n", - "#partc\n", - "Nq=18.4;\n", - "Qp=Ap*q*Nq; # in kip\n", - "print round(Qp,2),\"ultimate load in kip\"\n", - "\n", - "# ANSWER IN THE BOOK IS WRONG" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "275.0 ultimate load in lb\n", - "25.4 ultimate load in kip\n", - "there is change in answer because of calculation mistake in the book\n", - "234.67 ultimate load in kip\n", - "179.91 ultimate load in kip\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.2:Pg-533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.2\n", - "\n", - "import math\n", - "#parta\n", - "K=1.3;\n", - "f0=0;\n", - "Delta=0.8*30; # in ft\n", - "D=16.0/12; # in ft\n", - "L1=50.0;\n", - "p=4*16/12.0; # in ft\n", - "Gamma=110/1000.0; # in lb/ft^3\n", - "L=15*D; # in ft\n", - "sigma=Gamma*L; # in kip/ft^2\n", - "f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2\n", - "Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);\n", - "print round(Qs,2),\"ultimate load in kip\"\n", - "#partb\n", - "FS=4; # factor of safety\n", - "Qp=56.45/3+234.7/3+179.9/3; # in kip\n", - "Qu=Qs+Qp; # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall,2),\"is allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "271.65 ultimate load in kip\n", - "107.17 is allowed load in kip\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.3:Pg-534" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.3\n", - "import math\n", - "K=0.25;\n", - "Ap=16*16.0/12/12; # area in ft^2\n", - "phi=30*math.pi/180;\n", - "Nq=25;\n", - "q=110*50.0/1000; # in kip\n", - "sigmao=q/2; # in kip/ft^2\n", - "p=4*16.0/12; # in ft\n", - "L=50; # in ft\n", - "FS=4; # factor of safety\n", - "Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall,1),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "81.5 allowed load in kip\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.4:Pg-535" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.4\n", - "\n", - "import math\n", - "import numpy\n", - "FS=4; # factor of safety\n", - "Ap=0.1295; # area in m^2\n", - "Nc=9;\n", - "cu2=100;\n", - "Qp=Ap*Nc*cu2; # in kN\n", - "D=[5, 10, 30]; # depth in m\n", - "avgD=[2.5, 7.5,20.0]; # average depth in m\n", - "sigma=[45.0, 110.5, 228.5]; # in KN/m^2\n", - "cu=[30, 30, 100]; # in kN/m^2\n", - "alpha=[0.6, 0.9, 0.725];\n", - "L=[5, 5, 20]; # in m\n", - "p=math.pi*0.406;\n", - "Qs=0; # in kN\n", - "cusig=numpy.zeros(3)\n", - "print round(Qp,2),\"bearing capacity in kN\"\n", - "print \"depth (m)\\t avg Depth(m)\\t avgVerticalStress(kN/m**2)\\t cu(kN/m**2)\\t cu/sigma\\t alpha\\n\"\n", - "for i in range(0,3):\n", - " cusig[i]=cu[i]/sigma[i];\n", - " Qs=Qs+alpha[i]*cu[i]*L[i]*p;\n", - " print round(D[i],2),\"\\t \\t \\t\",round(avgD[i],2),\"\\t \\t\",round(sigma[i],2),\"\\t\\t\\t \",round(cu[i],2),\"\\t \",round(cusig[i],2),\"\\t\\t \",round(alpha[i],2),\"\\n\"\n", - "print round(Qs,2),\"bearing capacity in kN\"\n", - "#part2\n", - "Lambda=0.136;\n", - "L=30;\n", - "fav=Lambda*(178.48+2*76.7);\n", - "Qs2=p*L*fav; # in kN\n", - "#part3\n", - "fav1=13;\n", - "fav2=31.9;\n", - "fav3=93.43;\n", - "Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN\n", - "print round(Qs3,1),\"bearing capacity in kN\"\n", - "Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN\n", - "Qu=Qp+Qsavg # in kN\n", - "Qall=Qu/FS; # in kN\n", - "print round(Qall,1),\"allowed bearing capacity in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "116.55 bearing capacity in kN\n", - "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n", - "\n", - "5.0 \t \t \t2.5 \t \t45.0 \t\t\t 30.0 \t 0.67 \t\t 0.6 \n", - "\n", - "10.0 \t \t \t7.5 \t \t110.5 \t\t\t 30.0 \t 0.27 \t\t 0.9 \n", - "\n", - "30.0 \t \t \t20.0 \t \t228.5 \t\t\t 100.0 \t 0.44 \t\t 0.72 \n", - "\n", - "2136.44 bearing capacity in kN\n", - "2669.7 bearing capacity in kN\n", - "573.6 allowed bearing capacity in kN\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.5:Pg-538" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.5\n", - "\n", - "import numpy\n", - "D=[6, 12, 20]; # depth in m\n", - "fc=[34.34, 54.94, 70.63]; # in kN/m**2\n", - "alpha=[0.84, 0.71, 0.63];\n", - "dL=[6, 6, 8]; # in m\n", - "p=4*0.305;\n", - "Qs=0;\n", - "Q=numpy.zeros(3)\n", - "print \" depth(m)\\t fc(kN/m**2)\\t alpha \\t \\t deltaL(m)\\t Q(kN)\\n\"\n", - "for i in range (0,3):\n", - " Q[i]=alpha[i]*fc[i]*p*dL[i];\n", - " Qs=Q[i]+Qs;\n", - " print D[i],\"\\t\\t \",fc[i],\"\\t \",alpha[i],\"\\t \",dL[i],\"\\t\\t \",round(Q[i],2)\n", - "\n", - "print round(Qs),\"bearing force in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n", - "\n", - "6 \t\t 34.34 \t 0.84 \t 6 \t\t 211.15\n", - "12 \t\t 54.94 \t 0.71 \t 6 \t\t 285.53\n", - "20 \t\t 70.63 \t 0.63 \t 8 \t\t 434.29\n", - "931.0 bearing force in kN\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:Pg-545" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.6\n", - "\n", - "import math\n", - "L=21; # in m\n", - "Qwp=502-350; # in kN\n", - "Qws=350; # in kN\n", - "Ap=0.1045; # area in m^2\n", - "Ep=21e6; # in kN/m^2\n", - "epsilon=0.62;\n", - "Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m\n", - "#part2\n", - "Iwp=0.85;\n", - "qwp=152/Ap;\n", - "Es=25e3; # in kN/m^2\n", - "D=0.356; # in m\n", - "mus=0.35;\n", - "Se2=qwp*D/Es*Iwp*(1-mus**2); # in m\n", - "#part3\n", - "p=1.168;\n", - "Iws=2+0.35*math.sqrt(L/D);\n", - "Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m\n", - "Se=Se1+Se2+Se3; # in m\n", - "print round(Se*1000,1),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "19.8 settlement in mm\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.7:Pg-560" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.7\n", - "\n", - "Ep=207e6; # in kN/m^2\n", - "Ip=123e-6; # in m^4\n", - "nh=12000; # in kN/m^3\n", - "#from table 11.13\n", - "xz=0.008;\n", - "Ax=2.435;\n", - "T=(Ep*Ip/nh)**0.2;\n", - "Qg1=xz*Ep*Ip/Ax/T**3;\n", - "#part2\n", - "Fy=248000;\n", - "d1=0.254;\n", - "Am=0.772;\n", - "Mzmax=Fy*Ip*2/d1; # in Kn-m\n", - "Qg2=Mzmax/Am/T; # in kN\n", - "if Qg2>Qg1 :\n", - " Qg=Qg1;\n", - " print round(Qg,2),\"lateral load in kN\"\n", - "# there is slight variation in answer in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "53.27 lateral load in kN\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.8:Pg-561" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.8\n", - "\n", - "import math\n", - "#part1\n", - "Ep=207e6; # in kN/m^2\n", - "Ip=123e-6; # in m^4\n", - "nh=12000; # in kN/m^3\n", - "#from table 11.1a\n", - "xo=0.008; # in m\n", - "L=25;\n", - "Fy=248000; # yield stress in kN/m^2\n", - "D=0.254;\n", - "Am=0.772;\n", - "Gamma=18.0; # in kN/m^3\n", - "phi=35; # in angle\n", - "Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;\n", - "My=Fy*Ip*2/D; # in kN-m\n", - "Qug=140*Kp*D**3*Gamma; # in kN\n", - "\n", - "#part2\n", - "Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN\n", - "\n", - "if Qug>Qg1:\n", - " Qg=Qg1;\n", - " print round(Qg,2),\"lateral load in kN\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "40.2 lateral load in kN\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.9:Pg-567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.9\n", - "\n", - "import math\n", - "Wrh=30*12; # in kip-ft\n", - "E=0.8;\n", - "Wr=7.5; # in kip\n", - "S=1/8.0; \n", - "C=0.1;\n", - "FS=6; # in factor of safety\n", - "n=0.4; # Coefficient of restitution\n", - "Wp=12/12.0*12/12.0*80*150+550; # in lb\n", - "Wp=Wp/1000.0;\n", - "Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed bearing capacity in kip\"\n", - "#part2\n", - "He=30*12.0;\n", - "L=80*12.0;\n", - "Ap=12*12.0; # area in in^2\n", - "Ep=3e6/1000.0; # in kip/in^2\n", - "FS=4; # factor of safety\n", - "Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip\n", - "Qall2=Qu/FS; # in kip\n", - "print round(Qall2),\"allowed bearing capacity in kip\"\n", - "\n", - "#partc\n", - "a=27;\n", - "b=1;\n", - "He=30;\n", - "FS=3; # factor of safety\n", - "Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip\n", - "Qall3=Qu/FS; # in kip\n", - "print round(Qall3),\"allowed bearing capacity in kip\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "101.0 allowed bearing capacity in kip\n", - "104.0 allowed bearing capacity in kip\n", - "84.0 allowed bearing capacity in kip\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.10:Pg-570" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.10\n", - "\n", - "Hp=350; # in HP\n", - "vp=0.0016; # in m/s\n", - "Sl=0.762e-3; # in m/cycle\n", - "f=115; # in Hz\n", - "Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN\n", - "print round(Qu),\"pile load capacity in kN\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2928.0 pile load capacity in kN\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.11:Pg-578" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.11\n", - "\n", - "Lg=9.92; # in ft\n", - "Bg=7.0; # in ft\n", - "n1=3.0;\n", - "Nc=8.75;\n", - "n2=4.0/1000;\n", - "Ap=14.0**2.0/12.0**2;\n", - "cup=1775.0;\n", - "a1=0.4;#alpha1\n", - "p=4*14.0/12.0;\n", - "cu1=1050.0; # in lb/ft^2\n", - "L1=15.0;\n", - "a2=0.54;#alpha2\n", - "cu2=1775.0; # in lb/ft^2\n", - "L2=45.0;\n", - "FS=4; # factor of safety\n", - "Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip\n", - "Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip\n", - "print round(Qu2/1000),\"load in kip\"\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed load in kip\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4314.0 load in kip\n", - "757.0 allowed load in kip\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.12:Pg-583" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.12\n", - "\n", - "import math\n", - "z1=21/2.0; # in ft\n", - "Lg=9.0; # in ft\n", - "Bg=6.0;# in ft\n", - "Qg=500*1000.0; # in kip\n", - "Cc1=0.3;\n", - "Cc2=0.2;\n", - "Cc3=0.25;\n", - "H2=12;\n", - "H3=6;\n", - "H1=21;\n", - "e1=0.82;\n", - "e2=0.7;\n", - "e3=0.75;\n", - "s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3\n", - "s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3\n", - "s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3\n", - "ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3\n", - "ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3\n", - "ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3\n", - "sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch\n", - "sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch\n", - "sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch\n", - "sc=sc1+sc2+sc3; # in inch\n", - "print round(sc*12,1),\"total settlement in inch\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "9.6 total settlement in inch\n" - ] - } - ], - "prompt_number": 45 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter11_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter11_2.ipynb deleted file mode 100755 index 0afdb4a0..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter11_2.ipynb +++ /dev/null @@ -1,650 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a4054b3d6b79658bcd763c43dc94ca6de4cd49698c12f912e4c83a9a61f47154" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11:Pile Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.1:Pg-532" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.1\n", - "import math\n", - "\n", - "#parta\n", - "phi=30.0; # angle in degree\n", - "pa=2000.0; \n", - "q=100*50/1000.0;\n", - "Nq=55.0;\n", - "Ap=16*16/16/12; # area in ft^2\n", - "Qp=Ap*q*Nq; # in kip\n", - "qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb\n", - "print round(Qp,2),\"ultimate load in lb\"\n", - "print round(qp/1000,2),\"ultimate load in kip\"\n", - "print \"there is change in answer because of calculation mistake in the book\"\n", - "\n", - "#partb\n", - "Nsigma=36;\n", - "Ap=16*16.0/12.0/12;\n", - "q=110*50.0/1000;\n", - "Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip\n", - "print round(Qp,2),\"ultimate load in kip\"\n", - "#partc\n", - "Nq=18.4;\n", - "Qp=Ap*q*Nq; # in kip\n", - "print round(Qp,2),\"ultimate load in kip\"\n", - "\n", - "# ANSWER IN THE BOOK IS WRONG" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "275.0 ultimate load in lb\n", - "25.4 ultimate load in kip\n", - "there is change in answer because of calculation mistake in the book\n", - "234.67 ultimate load in kip\n", - "179.91 ultimate load in kip\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.2:Pg-533" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.2\n", - "\n", - "import math\n", - "#parta\n", - "K=1.3;\n", - "f0=0;\n", - "Delta=0.8*30; # in ft\n", - "D=16.0/12; # in ft\n", - "L1=50.0;\n", - "p=4*16/12.0; # in ft\n", - "Gamma=110/1000.0; # in lb/ft^3\n", - "L=15*D; # in ft\n", - "sigma=Gamma*L; # in kip/ft^2\n", - "f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2\n", - "Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);\n", - "print round(Qs,2),\"ultimate load in kip\"\n", - "#partb\n", - "FS=4; # factor of safety\n", - "Qp=56.45/3+234.7/3+179.9/3; # in kip\n", - "Qu=Qs+Qp; # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall,2),\"is allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "271.65 ultimate load in kip\n", - "107.17 is allowed load in kip\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.3:Pg-534" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.3\n", - "import math\n", - "K=0.25;\n", - "Ap=16*16.0/12/12; # area in ft^2\n", - "phi=30*math.pi/180;\n", - "Nq=25;\n", - "q=110*50.0/1000; # in kip\n", - "sigmao=q/2; # in kip/ft^2\n", - "p=4*16.0/12; # in ft\n", - "L=50; # in ft\n", - "FS=4; # factor of safety\n", - "Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall,1),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "81.5 allowed load in kip\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.4:Pg-535" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.4\n", - "\n", - "import math\n", - "import numpy\n", - "FS=4; # factor of safety\n", - "Ap=0.1295; # area in m^2\n", - "Nc=9;\n", - "cu2=100;\n", - "Qp=Ap*Nc*cu2; # in kN\n", - "D=[5, 10, 30]; # depth in m\n", - "avgD=[2.5, 7.5,20.0]; # average depth in m\n", - "sigma=[45.0, 110.5, 228.5]; # in KN/m^2\n", - "cu=[30, 30, 100]; # in kN/m^2\n", - "alpha=[0.6, 0.9, 0.725];\n", - "L=[5, 5, 20]; # in m\n", - "p=math.pi*0.406;\n", - "Qs=0; # in kN\n", - "cusig=numpy.zeros(3)\n", - "print round(Qp,2),\"bearing capacity in kN\"\n", - "print \"depth (m)\\t avg Depth(m)\\t avgVerticalStress(kN/m**2)\\t cu(kN/m**2)\\t cu/sigma\\t alpha\\n\"\n", - "for i in range(0,3):\n", - " cusig[i]=cu[i]/sigma[i];\n", - " Qs=Qs+alpha[i]*cu[i]*L[i]*p;\n", - " print round(D[i],2),\"\\t \\t \\t\",round(avgD[i],2),\"\\t \\t\",round(sigma[i],2),\"\\t\\t\\t \",round(cu[i],2),\"\\t \",round(cusig[i],2),\"\\t\\t \",round(alpha[i],2),\"\\n\"\n", - "print round(Qs,2),\"bearing capacity in kN\"\n", - "#part2\n", - "Lambda=0.136;\n", - "L=30;\n", - "fav=Lambda*(178.48+2*76.7);\n", - "Qs2=p*L*fav; # in kN\n", - "#part3\n", - "fav1=13;\n", - "fav2=31.9;\n", - "fav3=93.43;\n", - "Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN\n", - "print round(Qs3,1),\"bearing capacity in kN\"\n", - "Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN\n", - "Qu=Qp+Qsavg # in kN\n", - "Qall=Qu/FS; # in kN\n", - "print round(Qall,1),\"allowed bearing capacity in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "116.55 bearing capacity in kN\n", - "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n", - "\n", - "5.0 \t \t \t2.5 \t \t45.0 \t\t\t 30.0 \t 0.67 \t\t 0.6 \n", - "\n", - "10.0 \t \t \t7.5 \t \t110.5 \t\t\t 30.0 \t 0.27 \t\t 0.9 \n", - "\n", - "30.0 \t \t \t20.0 \t \t228.5 \t\t\t 100.0 \t 0.44 \t\t 0.72 \n", - "\n", - "2136.44 bearing capacity in kN\n", - "2669.7 bearing capacity in kN\n", - "573.6 allowed bearing capacity in kN\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.5:Pg-538" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.5\n", - "\n", - "import numpy\n", - "D=[6, 12, 20]; # depth in m\n", - "fc=[34.34, 54.94, 70.63]; # in kN/m**2\n", - "alpha=[0.84, 0.71, 0.63];\n", - "dL=[6, 6, 8]; # in m\n", - "p=4*0.305;\n", - "Qs=0;\n", - "Q=numpy.zeros(3)\n", - "print \" depth(m)\\t fc(kN/m**2)\\t alpha \\t \\t deltaL(m)\\t Q(kN)\\n\"\n", - "for i in range (0,3):\n", - " Q[i]=alpha[i]*fc[i]*p*dL[i];\n", - " Qs=Q[i]+Qs;\n", - " print D[i],\"\\t\\t \",fc[i],\"\\t \",alpha[i],\"\\t \",dL[i],\"\\t\\t \",round(Q[i],2)\n", - "\n", - "print round(Qs),\"bearing force in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n", - "\n", - "6 \t\t 34.34 \t 0.84 \t 6 \t\t 211.15\n", - "12 \t\t 54.94 \t 0.71 \t 6 \t\t 285.53\n", - "20 \t\t 70.63 \t 0.63 \t 8 \t\t 434.29\n", - "931.0 bearing force in kN\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex5.6:Pg-545" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.6\n", - "\n", - "import math\n", - "L=21; # in m\n", - "Qwp=502-350; # in kN\n", - "Qws=350; # in kN\n", - "Ap=0.1045; # area in m^2\n", - "Ep=21e6; # in kN/m^2\n", - "epsilon=0.62;\n", - "Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m\n", - "#part2\n", - "Iwp=0.85;\n", - "qwp=152/Ap;\n", - "Es=25e3; # in kN/m^2\n", - "D=0.356; # in m\n", - "mus=0.35;\n", - "Se2=qwp*D/Es*Iwp*(1-mus**2); # in m\n", - "#part3\n", - "p=1.168;\n", - "Iws=2+0.35*math.sqrt(L/D);\n", - "Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m\n", - "Se=Se1+Se2+Se3; # in m\n", - "print round(Se*1000,1),\"settlement in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "19.8 settlement in mm\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.7:Pg-560" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.7\n", - "\n", - "Ep=207e6; # in kN/m^2\n", - "Ip=123e-6; # in m^4\n", - "nh=12000; # in kN/m^3\n", - "#from table 11.13\n", - "xz=0.008;\n", - "Ax=2.435;\n", - "T=(Ep*Ip/nh)**0.2;\n", - "Qg1=xz*Ep*Ip/Ax/T**3;\n", - "#part2\n", - "Fy=248000;\n", - "d1=0.254;\n", - "Am=0.772;\n", - "Mzmax=Fy*Ip*2/d1; # in Kn-m\n", - "Qg2=Mzmax/Am/T; # in kN\n", - "if Qg2>Qg1 :\n", - " Qg=Qg1;\n", - " print round(Qg,2),\"lateral load in kN\"\n", - "# there is slight variation in answer in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "53.27 lateral load in kN\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.8:Pg-561" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.8\n", - "\n", - "import math\n", - "#part1\n", - "Ep=207e6; # in kN/m^2\n", - "Ip=123e-6; # in m^4\n", - "nh=12000; # in kN/m^3\n", - "#from table 11.1a\n", - "xo=0.008; # in m\n", - "L=25;\n", - "Fy=248000; # yield stress in kN/m^2\n", - "D=0.254;\n", - "Am=0.772;\n", - "Gamma=18.0; # in kN/m^3\n", - "phi=35; # in angle\n", - "Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;\n", - "My=Fy*Ip*2/D; # in kN-m\n", - "Qug=140*Kp*D**3*Gamma; # in kN\n", - "\n", - "#part2\n", - "Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN\n", - "\n", - "if Qug>Qg1:\n", - " Qg=Qg1;\n", - " print round(Qg,2),\"lateral load in kN\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "40.2 lateral load in kN\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.9:Pg-567" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.9\n", - "\n", - "import math\n", - "Wrh=30*12; # in kip-ft\n", - "E=0.8;\n", - "Wr=7.5; # in kip\n", - "S=1/8.0; \n", - "C=0.1;\n", - "FS=6; # in factor of safety\n", - "n=0.4; # Coefficient of restitution\n", - "Wp=12/12.0*12/12.0*80*150+550; # in lb\n", - "Wp=Wp/1000.0;\n", - "Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed bearing capacity in kip\"\n", - "#part2\n", - "He=30*12.0;\n", - "L=80*12.0;\n", - "Ap=12*12.0; # area in in^2\n", - "Ep=3e6/1000.0; # in kip/in^2\n", - "FS=4; # factor of safety\n", - "Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip\n", - "Qall2=Qu/FS; # in kip\n", - "print round(Qall2),\"allowed bearing capacity in kip\"\n", - "\n", - "#partc\n", - "a=27;\n", - "b=1;\n", - "He=30;\n", - "FS=3; # factor of safety\n", - "Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip\n", - "Qall3=Qu/FS; # in kip\n", - "print round(Qall3),\"allowed bearing capacity in kip\"\n", - "\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "101.0 allowed bearing capacity in kip\n", - "104.0 allowed bearing capacity in kip\n", - "84.0 allowed bearing capacity in kip\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.10:Pg-570" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.10\n", - "\n", - "Hp=350; # in HP\n", - "vp=0.0016; # in m/s\n", - "Sl=0.762e-3; # in m/cycle\n", - "f=115; # in Hz\n", - "Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN\n", - "print round(Qu),\"pile load capacity in kN\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2928.0 pile load capacity in kN\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.11:Pg-578" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.11\n", - "\n", - "Lg=9.92; # in ft\n", - "Bg=7.0; # in ft\n", - "n1=3.0;\n", - "Nc=8.75;\n", - "n2=4.0/1000;\n", - "Ap=14.0**2.0/12.0**2;\n", - "cup=1775.0;\n", - "a1=0.4;#alpha1\n", - "p=4*14.0/12.0;\n", - "cu1=1050.0; # in lb/ft^2\n", - "L1=15.0;\n", - "a2=0.54;#alpha2\n", - "cu2=1775.0; # in lb/ft^2\n", - "L2=45.0;\n", - "FS=4; # factor of safety\n", - "Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip\n", - "Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip\n", - "print round(Qu2/1000),\"load in kip\"\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed load in kip\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4314.0 load in kip\n", - "757.0 allowed load in kip\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex11.12:Pg-583" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 11.12\n", - "\n", - "import math\n", - "z1=21/2.0; # in ft\n", - "Lg=9.0; # in ft\n", - "Bg=6.0;# in ft\n", - "Qg=500*1000.0; # in kip\n", - "Cc1=0.3;\n", - "Cc2=0.2;\n", - "Cc3=0.25;\n", - "H2=12;\n", - "H3=6;\n", - "H1=21;\n", - "e1=0.82;\n", - "e2=0.7;\n", - "e3=0.75;\n", - "s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3\n", - "s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3\n", - "s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3\n", - "ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3\n", - "ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3\n", - "ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3\n", - "sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch\n", - "sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch\n", - "sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch\n", - "sc=sc1+sc2+sc3; # in inch\n", - "print round(sc*12,1),\"total settlement in inch\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "9.6 total settlement in inch\n" - ] - } - ], - "prompt_number": 45 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter12.ipynb b/Principles_Of_Foundation_Engineering/Chapter12.ipynb deleted file mode 100755 index fcc14387..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter12.ipynb +++ /dev/null @@ -1,443 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1439e2e46e40a0d47bd1c7e06a03c417c0e1f55ad415a0af82536f86f7ecfea9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12:Drilled-Shaft Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.1:Pg-609" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.1\n", - "\n", - "import math\n", - "Ap=math.pi/4*1.75**2; # area in m^2\n", - "FS=4; # factor of safety\n", - "Nq=37.75; \n", - "L=8;\n", - "Es=50000.0;\n", - "mus=0.265;\n", - "pu=100.0;\n", - "Db=1.75; # in m\n", - "q=6*16.2+2*19.2;\n", - "phi=36*math.pi/180.0;\n", - "Fqs=1+math.tan(phi);\n", - "Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);\n", - "Ir=Es/(2*(1+mus)*q*math.tan(phi));\n", - "delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;\n", - "Irr=Ir/(1+Ir*delta);\n", - "Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));\n", - "Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);\n", - "Qpall=Qp/FS;\n", - "print round(Qpall,2),\"allowed load in kN\"\n", - "print \"due to rounding off error there is slight change in answer\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6648.7 allowed load in kN\n", - "due to rounding off error there is slight change in answer\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.2:Pg-610" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.2\n", - "import math\n", - "Ap=math.pi/4*1.75**2; # area in m^2\n", - "q=135.6; \n", - "w=0.83;\n", - "FS=4; # factor of safety\n", - "phi=36; # given angle\n", - "Nq=0.21*math.exp(0.17*phi);\n", - "Qp=Ap*q*(w*Nq-1); # in kN\n", - "Qpall=Qp/FS; # in kN\n", - "print round(Qpall),\"allowed load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6383.0 allowed load in kN\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.3:Pg-611" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.3\n", - "\n", - "import math\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "Db=1.5; # in m\n", - "z=3.0;\n", - "p=math.pi*1;\n", - "Li=6.0;\n", - "N60=30.0;\n", - "sigmazi=16*z;\n", - "Beta=2.0-0.15*z**0.75;\n", - "fi=Beta*sigmazi; # in kN/m^2\n", - "qp=57.5*N60; # in kN/m^2\n", - "qpr=1.27/Db*qp; # in kN/m^2\n", - "Qunet=qpr*Ap+fi*p*Li; # in kN\n", - "print round(Qunet,2),\"allowed load in kN\"\n", - "#part b\n", - "k1=0.315; #from table\n", - "k2=12.0/1.5/1000*100.0;\n", - "Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN\n", - "print round(Qunet2,2),\"allowed load in kN\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4081.11 allowed load in kN\n", - "2013.14 allowed load in kN\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.4:Pg-617" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.4\n", - "\n", - "Nc=9;\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "cu=105; # in kN/m^2\n", - "Qpnet=Ap*cu*Nc; # in kN\n", - "print round(Qpnet),\"net ultimate bearing point capacity in kN\"\n", - "#part2\n", - "alpha=0.4;\n", - "Ds=1.5; # in m \n", - "p=math.pi*Ds;\n", - "Qs=alpha*p*(50*8+105*3); # in kN\n", - "print int(Qs),\"skin resistance in kN\"\n", - "#part3\n", - "FS=3; # factor of safety\n", - "Qu=Qpnet/FS+Qs/FS; # in kN\n", - "print round(Qu,2),\"working load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1670.0 net ultimate bearing point capacity in kN\n", - "1347 skin resistance in kN\n", - "1005.9 working load in kN\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.5:Pg-618" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.5\n", - "\n", - "import math\n", - "cub=3000;\n", - "L=20+5; # in ft\n", - "Db=4; # in ft\n", - "Ap=math.pi/4*Db**2; # area in ft^2\n", - "alpha=0.55;\n", - "cu1=800; # in lb/ft^2\n", - "L1=7; # in ft\n", - "L2=5.5; # in ft\n", - "cu2=1200; # in lb/ft^2\n", - "p=math.pi*2.5;\n", - "k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi\n", - "j1=6*cub*(1+0.2*L/Db);\n", - "j2=9*cub;\n", - "qp=min(j1,j2);\n", - "Qu=k/1000+qp*Ap/1000; # in kip\n", - "print round(Qu),\"allowed load in kip\"\n", - "#part b\n", - "k1=0.57; #from table\n", - "k2=0.89;\n", - "Qunet2=qp*Ap*k1+k*k2; # in kip\n", - "print round(Qunet2/1000,2),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "392.0 allowed load in kip\n", - "240.3 allowed load in kip\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.6:Pg-621" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.6\n", - "\n", - "import math\n", - "Qws=1005-250; # in kN\n", - "Qwp=250; # in kN\n", - "epsilon=0.65; \n", - "L=11; # in m\n", - "Ds=1.5; # in m\n", - "Es=14000; # in kN/m^2\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "Ep=21e6; # in kN/m^2\n", - "Cp=0.04; # in kN/m^2\n", - "Db=1.5;\n", - "mus=0.3;\n", - "p=math.pi*1.5;\n", - "Nc=9;\n", - "qp=105*Nc; # in kN/m^2\n", - "se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m \n", - "se2=Qwp*Cp/(Db*qp); # in m\n", - "Iws=2+0.35*math.sqrt(L/Ds);\n", - "se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m\n", - "se=se1+se2+se3; # in m\n", - "print round(se*1000,2),\" is net settlement in mm\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11.46 is net settlement in mm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.7:Pg-628" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.7\n", - "\n", - "import math\n", - "import numpy\n", - "from scipy.optimize import fsolve\n", - "Ds=1.0;\n", - "Ep=22e6;\n", - "Ri=1.0;\n", - "cu=100.0;\n", - "Ip=math.pi*Ds**4/64.0;\n", - "Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;\n", - "print round(Qc,2),\"bearing force in kN\"\n", - "Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;\n", - "print round(Mc,2),\"bearing moment in kNm\"\n", - "#from figure\n", - "xoQM=0.0046*1;\n", - "xoMQ=0.0041*1;\n", - "xo=0.5*(xoQM+xoMQ);\n", - "print round(xo*1000,2),\"net ground line deflection in mm\"\n", - "#partb\n", - "Ip=0.049;\n", - "Qg=150.0;\n", - "Mg=200.0;\n", - "def f(T):\n", - " return 338e-6*T**3+300.6e-6*T**2-0.00435\n", - "[x]=fsolve(f,2);\n", - "T=x;\n", - "k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T\n", - "Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];\n", - "Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];\n", - "print \"z/T\\t Am\\t Bm\\t Mz(kN-m)\\n\"\n", - "Mz=numpy.zeros(7)\n", - "for i in range(0,7):\n", - " Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;\n", - " print k[i],\"\\t\",round(Am[i],2),\"\\t\",round(Bm[i],2),\"\\t\",round(Mz[i],2)\n", - "\n", - "print round(1*T,2),\"depth in m\"\n", - "#partc\n", - "Mmax=400;\n", - "sigma=Mmax*Ds/2/Ip;\n", - "print round(sigma,2),\"tensile stress in kN/m**2\"\n", - "#partd\n", - "#from figure\n", - "k=8.5;\n", - "L=k*1;\n", - "print L,\"length in m\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "100615.56 bearing force in kN\n", - "52912.27 bearing moment in kNm\n", - "4.35 net ground line deflection in mm\n", - "z/T\t Am\t Bm\t Mz(kN-m)\n", - "\n", - "0 \t0.0 \t1.0 \t200.0\n", - "0.4 \t0.36 \t0.98 \t308.4\n", - "0.6 \t0.52 \t0.95 \t352.35\n", - "0.8 \t0.63 \t0.9 \t376.69\n", - "1.0 \t0.75 \t0.84 \t403.16\n", - "1.1 \t0.77 \t0.8 \t398.84\n", - "1.25 \t0.75 \t0.73 \t380.16\n", - "2.08 depth in m\n", - "4081.63 tensile stress in kN/m**2\n", - "8.5 length in m\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.8:Pg-634" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.8\n", - "\n", - "qu=3000; # lb/in^2\n", - "Ds=3*12; #in inch\n", - "L=15*12; # in inch\n", - "FS=3; # factor of safety\n", - "Ecore=0.36e6; # in lb/in^2\n", - "f=min(2.5*qu**0.5,0.15*qu);\n", - "Qu=math.pi*Ds*L*f/1000; # in kip\n", - "Emass=Ecore*(0.266*80-1.66); # in lb/in^2\n", - "Ec=17.9*Emass; # in lb/in^2\n", - "Ac=math.pi/4*Ds**2; # area in in^2\n", - "If=0.35;\n", - "se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "929.0 allowed load in kip\n" - ] - } - ], - "prompt_number": 35 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter12_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter12_1.ipynb deleted file mode 100755 index fcc14387..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter12_1.ipynb +++ /dev/null @@ -1,443 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1439e2e46e40a0d47bd1c7e06a03c417c0e1f55ad415a0af82536f86f7ecfea9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12:Drilled-Shaft Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.1:Pg-609" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.1\n", - "\n", - "import math\n", - "Ap=math.pi/4*1.75**2; # area in m^2\n", - "FS=4; # factor of safety\n", - "Nq=37.75; \n", - "L=8;\n", - "Es=50000.0;\n", - "mus=0.265;\n", - "pu=100.0;\n", - "Db=1.75; # in m\n", - "q=6*16.2+2*19.2;\n", - "phi=36*math.pi/180.0;\n", - "Fqs=1+math.tan(phi);\n", - "Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);\n", - "Ir=Es/(2*(1+mus)*q*math.tan(phi));\n", - "delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;\n", - "Irr=Ir/(1+Ir*delta);\n", - "Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));\n", - "Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);\n", - "Qpall=Qp/FS;\n", - "print round(Qpall,2),\"allowed load in kN\"\n", - "print \"due to rounding off error there is slight change in answer\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6648.7 allowed load in kN\n", - "due to rounding off error there is slight change in answer\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.2:Pg-610" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.2\n", - "import math\n", - "Ap=math.pi/4*1.75**2; # area in m^2\n", - "q=135.6; \n", - "w=0.83;\n", - "FS=4; # factor of safety\n", - "phi=36; # given angle\n", - "Nq=0.21*math.exp(0.17*phi);\n", - "Qp=Ap*q*(w*Nq-1); # in kN\n", - "Qpall=Qp/FS; # in kN\n", - "print round(Qpall),\"allowed load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6383.0 allowed load in kN\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.3:Pg-611" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.3\n", - "\n", - "import math\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "Db=1.5; # in m\n", - "z=3.0;\n", - "p=math.pi*1;\n", - "Li=6.0;\n", - "N60=30.0;\n", - "sigmazi=16*z;\n", - "Beta=2.0-0.15*z**0.75;\n", - "fi=Beta*sigmazi; # in kN/m^2\n", - "qp=57.5*N60; # in kN/m^2\n", - "qpr=1.27/Db*qp; # in kN/m^2\n", - "Qunet=qpr*Ap+fi*p*Li; # in kN\n", - "print round(Qunet,2),\"allowed load in kN\"\n", - "#part b\n", - "k1=0.315; #from table\n", - "k2=12.0/1.5/1000*100.0;\n", - "Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN\n", - "print round(Qunet2,2),\"allowed load in kN\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4081.11 allowed load in kN\n", - "2013.14 allowed load in kN\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.4:Pg-617" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.4\n", - "\n", - "Nc=9;\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "cu=105; # in kN/m^2\n", - "Qpnet=Ap*cu*Nc; # in kN\n", - "print round(Qpnet),\"net ultimate bearing point capacity in kN\"\n", - "#part2\n", - "alpha=0.4;\n", - "Ds=1.5; # in m \n", - "p=math.pi*Ds;\n", - "Qs=alpha*p*(50*8+105*3); # in kN\n", - "print int(Qs),\"skin resistance in kN\"\n", - "#part3\n", - "FS=3; # factor of safety\n", - "Qu=Qpnet/FS+Qs/FS; # in kN\n", - "print round(Qu,2),\"working load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1670.0 net ultimate bearing point capacity in kN\n", - "1347 skin resistance in kN\n", - "1005.9 working load in kN\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.5:Pg-618" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.5\n", - "\n", - "import math\n", - "cub=3000;\n", - "L=20+5; # in ft\n", - "Db=4; # in ft\n", - "Ap=math.pi/4*Db**2; # area in ft^2\n", - "alpha=0.55;\n", - "cu1=800; # in lb/ft^2\n", - "L1=7; # in ft\n", - "L2=5.5; # in ft\n", - "cu2=1200; # in lb/ft^2\n", - "p=math.pi*2.5;\n", - "k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi\n", - "j1=6*cub*(1+0.2*L/Db);\n", - "j2=9*cub;\n", - "qp=min(j1,j2);\n", - "Qu=k/1000+qp*Ap/1000; # in kip\n", - "print round(Qu),\"allowed load in kip\"\n", - "#part b\n", - "k1=0.57; #from table\n", - "k2=0.89;\n", - "Qunet2=qp*Ap*k1+k*k2; # in kip\n", - "print round(Qunet2/1000,2),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "392.0 allowed load in kip\n", - "240.3 allowed load in kip\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.6:Pg-621" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.6\n", - "\n", - "import math\n", - "Qws=1005-250; # in kN\n", - "Qwp=250; # in kN\n", - "epsilon=0.65; \n", - "L=11; # in m\n", - "Ds=1.5; # in m\n", - "Es=14000; # in kN/m^2\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "Ep=21e6; # in kN/m^2\n", - "Cp=0.04; # in kN/m^2\n", - "Db=1.5;\n", - "mus=0.3;\n", - "p=math.pi*1.5;\n", - "Nc=9;\n", - "qp=105*Nc; # in kN/m^2\n", - "se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m \n", - "se2=Qwp*Cp/(Db*qp); # in m\n", - "Iws=2+0.35*math.sqrt(L/Ds);\n", - "se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m\n", - "se=se1+se2+se3; # in m\n", - "print round(se*1000,2),\" is net settlement in mm\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11.46 is net settlement in mm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.7:Pg-628" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.7\n", - "\n", - "import math\n", - "import numpy\n", - "from scipy.optimize import fsolve\n", - "Ds=1.0;\n", - "Ep=22e6;\n", - "Ri=1.0;\n", - "cu=100.0;\n", - "Ip=math.pi*Ds**4/64.0;\n", - "Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;\n", - "print round(Qc,2),\"bearing force in kN\"\n", - "Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;\n", - "print round(Mc,2),\"bearing moment in kNm\"\n", - "#from figure\n", - "xoQM=0.0046*1;\n", - "xoMQ=0.0041*1;\n", - "xo=0.5*(xoQM+xoMQ);\n", - "print round(xo*1000,2),\"net ground line deflection in mm\"\n", - "#partb\n", - "Ip=0.049;\n", - "Qg=150.0;\n", - "Mg=200.0;\n", - "def f(T):\n", - " return 338e-6*T**3+300.6e-6*T**2-0.00435\n", - "[x]=fsolve(f,2);\n", - "T=x;\n", - "k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T\n", - "Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];\n", - "Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];\n", - "print \"z/T\\t Am\\t Bm\\t Mz(kN-m)\\n\"\n", - "Mz=numpy.zeros(7)\n", - "for i in range(0,7):\n", - " Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;\n", - " print k[i],\"\\t\",round(Am[i],2),\"\\t\",round(Bm[i],2),\"\\t\",round(Mz[i],2)\n", - "\n", - "print round(1*T,2),\"depth in m\"\n", - "#partc\n", - "Mmax=400;\n", - "sigma=Mmax*Ds/2/Ip;\n", - "print round(sigma,2),\"tensile stress in kN/m**2\"\n", - "#partd\n", - "#from figure\n", - "k=8.5;\n", - "L=k*1;\n", - "print L,\"length in m\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "100615.56 bearing force in kN\n", - "52912.27 bearing moment in kNm\n", - "4.35 net ground line deflection in mm\n", - "z/T\t Am\t Bm\t Mz(kN-m)\n", - "\n", - "0 \t0.0 \t1.0 \t200.0\n", - "0.4 \t0.36 \t0.98 \t308.4\n", - "0.6 \t0.52 \t0.95 \t352.35\n", - "0.8 \t0.63 \t0.9 \t376.69\n", - "1.0 \t0.75 \t0.84 \t403.16\n", - "1.1 \t0.77 \t0.8 \t398.84\n", - "1.25 \t0.75 \t0.73 \t380.16\n", - "2.08 depth in m\n", - "4081.63 tensile stress in kN/m**2\n", - "8.5 length in m\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.8:Pg-634" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.8\n", - "\n", - "qu=3000; # lb/in^2\n", - "Ds=3*12; #in inch\n", - "L=15*12; # in inch\n", - "FS=3; # factor of safety\n", - "Ecore=0.36e6; # in lb/in^2\n", - "f=min(2.5*qu**0.5,0.15*qu);\n", - "Qu=math.pi*Ds*L*f/1000; # in kip\n", - "Emass=Ecore*(0.266*80-1.66); # in lb/in^2\n", - "Ec=17.9*Emass; # in lb/in^2\n", - "Ac=math.pi/4*Ds**2; # area in in^2\n", - "If=0.35;\n", - "se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "929.0 allowed load in kip\n" - ] - } - ], - "prompt_number": 35 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter12_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter12_2.ipynb deleted file mode 100755 index fcc14387..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter12_2.ipynb +++ /dev/null @@ -1,443 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1439e2e46e40a0d47bd1c7e06a03c417c0e1f55ad415a0af82536f86f7ecfea9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12:Drilled-Shaft Foundations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.1:Pg-609" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.1\n", - "\n", - "import math\n", - "Ap=math.pi/4*1.75**2; # area in m^2\n", - "FS=4; # factor of safety\n", - "Nq=37.75; \n", - "L=8;\n", - "Es=50000.0;\n", - "mus=0.265;\n", - "pu=100.0;\n", - "Db=1.75; # in m\n", - "q=6*16.2+2*19.2;\n", - "phi=36*math.pi/180.0;\n", - "Fqs=1+math.tan(phi);\n", - "Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);\n", - "Ir=Es/(2*(1+mus)*q*math.tan(phi));\n", - "delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;\n", - "Irr=Ir/(1+Ir*delta);\n", - "Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));\n", - "Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);\n", - "Qpall=Qp/FS;\n", - "print round(Qpall,2),\"allowed load in kN\"\n", - "print \"due to rounding off error there is slight change in answer\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6648.7 allowed load in kN\n", - "due to rounding off error there is slight change in answer\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.2:Pg-610" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.2\n", - "import math\n", - "Ap=math.pi/4*1.75**2; # area in m^2\n", - "q=135.6; \n", - "w=0.83;\n", - "FS=4; # factor of safety\n", - "phi=36; # given angle\n", - "Nq=0.21*math.exp(0.17*phi);\n", - "Qp=Ap*q*(w*Nq-1); # in kN\n", - "Qpall=Qp/FS; # in kN\n", - "print round(Qpall),\"allowed load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6383.0 allowed load in kN\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.3:Pg-611" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.3\n", - "\n", - "import math\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "Db=1.5; # in m\n", - "z=3.0;\n", - "p=math.pi*1;\n", - "Li=6.0;\n", - "N60=30.0;\n", - "sigmazi=16*z;\n", - "Beta=2.0-0.15*z**0.75;\n", - "fi=Beta*sigmazi; # in kN/m^2\n", - "qp=57.5*N60; # in kN/m^2\n", - "qpr=1.27/Db*qp; # in kN/m^2\n", - "Qunet=qpr*Ap+fi*p*Li; # in kN\n", - "print round(Qunet,2),\"allowed load in kN\"\n", - "#part b\n", - "k1=0.315; #from table\n", - "k2=12.0/1.5/1000*100.0;\n", - "Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN\n", - "print round(Qunet2,2),\"allowed load in kN\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4081.11 allowed load in kN\n", - "2013.14 allowed load in kN\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.4:Pg-617" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.4\n", - "\n", - "Nc=9;\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "cu=105; # in kN/m^2\n", - "Qpnet=Ap*cu*Nc; # in kN\n", - "print round(Qpnet),\"net ultimate bearing point capacity in kN\"\n", - "#part2\n", - "alpha=0.4;\n", - "Ds=1.5; # in m \n", - "p=math.pi*Ds;\n", - "Qs=alpha*p*(50*8+105*3); # in kN\n", - "print int(Qs),\"skin resistance in kN\"\n", - "#part3\n", - "FS=3; # factor of safety\n", - "Qu=Qpnet/FS+Qs/FS; # in kN\n", - "print round(Qu,2),\"working load in kN\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1670.0 net ultimate bearing point capacity in kN\n", - "1347 skin resistance in kN\n", - "1005.9 working load in kN\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.5:Pg-618" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.5\n", - "\n", - "import math\n", - "cub=3000;\n", - "L=20+5; # in ft\n", - "Db=4; # in ft\n", - "Ap=math.pi/4*Db**2; # area in ft^2\n", - "alpha=0.55;\n", - "cu1=800; # in lb/ft^2\n", - "L1=7; # in ft\n", - "L2=5.5; # in ft\n", - "cu2=1200; # in lb/ft^2\n", - "p=math.pi*2.5;\n", - "k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi\n", - "j1=6*cub*(1+0.2*L/Db);\n", - "j2=9*cub;\n", - "qp=min(j1,j2);\n", - "Qu=k/1000+qp*Ap/1000; # in kip\n", - "print round(Qu),\"allowed load in kip\"\n", - "#part b\n", - "k1=0.57; #from table\n", - "k2=0.89;\n", - "Qunet2=qp*Ap*k1+k*k2; # in kip\n", - "print round(Qunet2/1000,2),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "392.0 allowed load in kip\n", - "240.3 allowed load in kip\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.6:Pg-621" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.6\n", - "\n", - "import math\n", - "Qws=1005-250; # in kN\n", - "Qwp=250; # in kN\n", - "epsilon=0.65; \n", - "L=11; # in m\n", - "Ds=1.5; # in m\n", - "Es=14000; # in kN/m^2\n", - "Ap=math.pi/4*1.5**2; # area in m^2\n", - "Ep=21e6; # in kN/m^2\n", - "Cp=0.04; # in kN/m^2\n", - "Db=1.5;\n", - "mus=0.3;\n", - "p=math.pi*1.5;\n", - "Nc=9;\n", - "qp=105*Nc; # in kN/m^2\n", - "se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m \n", - "se2=Qwp*Cp/(Db*qp); # in m\n", - "Iws=2+0.35*math.sqrt(L/Ds);\n", - "se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m\n", - "se=se1+se2+se3; # in m\n", - "print round(se*1000,2),\" is net settlement in mm\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "11.46 is net settlement in mm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.7:Pg-628" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.7\n", - "\n", - "import math\n", - "import numpy\n", - "from scipy.optimize import fsolve\n", - "Ds=1.0;\n", - "Ep=22e6;\n", - "Ri=1.0;\n", - "cu=100.0;\n", - "Ip=math.pi*Ds**4/64.0;\n", - "Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;\n", - "print round(Qc,2),\"bearing force in kN\"\n", - "Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;\n", - "print round(Mc,2),\"bearing moment in kNm\"\n", - "#from figure\n", - "xoQM=0.0046*1;\n", - "xoMQ=0.0041*1;\n", - "xo=0.5*(xoQM+xoMQ);\n", - "print round(xo*1000,2),\"net ground line deflection in mm\"\n", - "#partb\n", - "Ip=0.049;\n", - "Qg=150.0;\n", - "Mg=200.0;\n", - "def f(T):\n", - " return 338e-6*T**3+300.6e-6*T**2-0.00435\n", - "[x]=fsolve(f,2);\n", - "T=x;\n", - "k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T\n", - "Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];\n", - "Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];\n", - "print \"z/T\\t Am\\t Bm\\t Mz(kN-m)\\n\"\n", - "Mz=numpy.zeros(7)\n", - "for i in range(0,7):\n", - " Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;\n", - " print k[i],\"\\t\",round(Am[i],2),\"\\t\",round(Bm[i],2),\"\\t\",round(Mz[i],2)\n", - "\n", - "print round(1*T,2),\"depth in m\"\n", - "#partc\n", - "Mmax=400;\n", - "sigma=Mmax*Ds/2/Ip;\n", - "print round(sigma,2),\"tensile stress in kN/m**2\"\n", - "#partd\n", - "#from figure\n", - "k=8.5;\n", - "L=k*1;\n", - "print L,\"length in m\"\n", - "\n", - "# the answer is slightly different in textbook due to approximation\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "100615.56 bearing force in kN\n", - "52912.27 bearing moment in kNm\n", - "4.35 net ground line deflection in mm\n", - "z/T\t Am\t Bm\t Mz(kN-m)\n", - "\n", - "0 \t0.0 \t1.0 \t200.0\n", - "0.4 \t0.36 \t0.98 \t308.4\n", - "0.6 \t0.52 \t0.95 \t352.35\n", - "0.8 \t0.63 \t0.9 \t376.69\n", - "1.0 \t0.75 \t0.84 \t403.16\n", - "1.1 \t0.77 \t0.8 \t398.84\n", - "1.25 \t0.75 \t0.73 \t380.16\n", - "2.08 depth in m\n", - "4081.63 tensile stress in kN/m**2\n", - "8.5 length in m\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex12.8:Pg-634" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 12.8\n", - "\n", - "qu=3000; # lb/in^2\n", - "Ds=3*12; #in inch\n", - "L=15*12; # in inch\n", - "FS=3; # factor of safety\n", - "Ecore=0.36e6; # in lb/in^2\n", - "f=min(2.5*qu**0.5,0.15*qu);\n", - "Qu=math.pi*Ds*L*f/1000; # in kip\n", - "Emass=Ecore*(0.266*80-1.66); # in lb/in^2\n", - "Ec=17.9*Emass; # in lb/in^2\n", - "Ac=math.pi/4*Ds**2; # area in in^2\n", - "If=0.35;\n", - "se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;\n", - "Qall=Qu/FS; # in kip\n", - "print round(Qall),\"allowed load in kip\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "929.0 allowed load in kip\n" - ] - } - ], - "prompt_number": 35 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter13.ipynb b/Principles_Of_Foundation_Engineering/Chapter13.ipynb deleted file mode 100755 index bfb80602..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter13.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:549425d7a43cc856ebd1610c783821836546fd833bb34512fcafdb71f662b655" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13:Foundations on Difficult Soils" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.1:Pg-653" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.1\n", - "\n", - "Sw=1;\n", - "Z=2; # in m\n", - "deltaSf=0.0033*Z*Sw*1000; # in mm\n", - "print deltaSf,\"free surface swell in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6.6 free surface swell in mm\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.2:Pg-13.2" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.2\n", - "\n", - "#from figure 13.11\n", - "import matplotlib.pyplot as plt\n", - "%matplotlib inline\n", - "import numpy\n", - "deltaS=1/100.0*1/2.0*(0.55+0+0.55+1.2+1.2+2+2+3);\n", - "print deltaS*1000,\"total swell in mm\"\n", - "#partb\n", - "D=numpy.array([5.2, 4.2, 3.2, 2.2, 1.2]);\n", - "deltaS=numpy.array([0, 0.00275, 0.0115, 0.0275, 0.0525]);\n", - "print \"depth(m)\\t total swell (m) \\n\"\n", - "for i in range (0,5):\n", - " print D[i],\"\\t \",deltaS[i],\" \\n\",\n", - "\n", - "plt.plot(deltaS*1000,D);\n", - "plt.title(\"depth vs total swell\")\n", - "plt.xlabel(\"total swell (m)\")\n", - "plt.ylabel(\"depth (m)\")\n", - "plt.show()\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "52.5 total swell in mm\n", - "depth(m)\t total swell (m) \n", - "\n", - "5.2 \t 0.0 \n", - "4.2 \t 0.00275 \n", - "3.2 \t 0.0115 \n", - "2.2 \t 0.0275 \n", - "1.2 \t 0.0525 \n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXm8EJ50wcQHHMzAlNnGWjpIKIWl4nfk73\nd9PS0rrmVN1E8+q1btchK72paYaaSaEmznoQs8ABFEVMBXMGzQmkFORz/1jfI9vNGfYZvmdP7+fj\nsR9993ev/f1+1pHO56y1vmstRQRmZma9Kh2AmZlVBycEMzMDnBDMzCzjhGBmZoATgpmZZZwQzMwM\ncEKwHiTpGkk/zOnaYyVdl8e1K0XSsZImV+jen/w8JQ2StESSf1/UOf8Htp4U2atLJBUkvdzCtXtU\nRxNcngkxB56g1ICcEKynqcau26j882xATgiWG0mDJT0u6X1JNwIrlHw+StJ0Se9I+pOkrYs+e1HS\nmZKelvS2pKslLS+pH3AHsJ6k+dm11yX9RbucpGuzc09J2qGVuH4h6ccl526R9K3s+AxJr2TXmSVp\nrxaucTxwJHB6Fsct2fnPS2rK6vSUpAPaKX+mpOezez0t6aAyf7YrSPqNpLeye02VtLakYZKeLCp3\nj6SpRe8nSxqdHa8nabykeZJmS/pmOfe2OhYRfvnV7S9gOeBvwClAb+ArwEfAudnng4G5wI6kv0aP\n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Xsk7SxpkqQXJB1Q9L07gH/pwH3MluGEYLXoDOCFSBudnJF1w2xL2hRkOPDj7JfwGcDkrNwl\npIW9vhQRO5B+8V7azn2OIO3HMTi79nRgMtC8SuYewFuS1suOJ0nqA/wU+EpEfJG0KdJ/dqBuu5HW\n8Gq2EnBfRGwFzAfOBfYCDs6Om00F9uzAfcyW0afSAZh1QunyzLsB12fL+86TNAnYEXi/pNxywGXZ\nmi8fA5vTtkeAq7MVXCdExBPAAkkrZ0t8DwCuJ/0i3p20yusWpE1z7k1r/dEbeK0DddsQeL3o/UcR\ncVd2PAP4Z0R8LOkp0mZLzV4veW/WYW4hWL0oTRItLdL1beD1iNgG+CIpQbQqIppbA68C10g6Kvvo\nYdLCYc8CD5ESwi7An7I4ns5aJYMjYpuIKN02tSN1WVR0vAT4KIttCZ/+g07U7lr+ViWcEKwWzQdW\nKXo/GTgs283ss6Rf0FOBBSXlVgXeyI6PJv313ipJGwBvRsSVpFUkBxfd7zRgEmn562Gkv9znk5LE\nZyXtnF2jr6QtO1C3vwHrdqB8s3Wz75p1mruMrOZExN8l/Sl7VHRiNo6wC/AE6a/k0yJinqS3gY+z\nLS9/BfwcGC/paOBOUsL45LIt3KoAnCZpESkJHZ2df4i0leuDEbFE0kvAM1lsH0k6BLhU0mqk/49d\nRNq4vhwPkVovj7USV7RyPIS09LhZp3n5a7MqImlj4KcRsX8Hv9dEWuu+Vnf8sirgLiOzKhIRs4H5\nHZ2YBjzvZGBd5RaCmZkBbiGYmVnGCcHMzAAnBDMzyzghmJkZ4IRgZmYZJwQzMwPg/wDP0conunvE\nNwAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.3:Pg-664" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.3\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "phi=12*math.pi/180;\n", - "Ds=0.8; # in m\n", - "Z=5; # in m \n", - "sigmaT=450;\n", - "U=math.pi*Ds*Z*sigmaT*math.tan(phi); # in kN\n", - "def f(D):\n", - " return 1202-450*6.14/1.25*3.14/4*(D**2-0.8**2)\n", - "[x]=fsolve(f,1);\n", - "Db=x; # in m\n", - "print round(Db,2),\"diameter of bell in m\"\n", - "#partb\n", - "D=600; # in kN\n", - "cu=450; # in kN/m^2\n", - "Nc=6.14;\n", - "FS=cu*Nc*math.pi/4*(Db**2-Ds**2)/(U-D);\n", - "if FS>2 :\n", - " print \"the structure is compatible with safety measures\"\n", - "\n", - "#check bearing capacity\n", - "L=D+300;#dead+live load in kN\n", - "Dp=L/math.pi*4/Db**2;#downward pressure\n", - "FS=2763/Dp; # factor of safety\n", - "if FS>3:\n", - " print \"the structure is safe in bearing \"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.15 diameter of bell in m\n", - "the structure is compatible with safety measures\n", - "the structure is safe in bearing \n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter13_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter13_1.ipynb deleted file mode 100755 index bfb80602..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter13_1.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:549425d7a43cc856ebd1610c783821836546fd833bb34512fcafdb71f662b655" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13:Foundations on Difficult Soils" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.1:Pg-653" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.1\n", - "\n", - "Sw=1;\n", - "Z=2; # in m\n", - "deltaSf=0.0033*Z*Sw*1000; # in mm\n", - "print deltaSf,\"free surface swell in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6.6 free surface swell in mm\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.2:Pg-13.2" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.2\n", - "\n", - "#from figure 13.11\n", - "import matplotlib.pyplot as plt\n", - "%matplotlib inline\n", - "import numpy\n", - "deltaS=1/100.0*1/2.0*(0.55+0+0.55+1.2+1.2+2+2+3);\n", - "print deltaS*1000,\"total swell in mm\"\n", - "#partb\n", - "D=numpy.array([5.2, 4.2, 3.2, 2.2, 1.2]);\n", - "deltaS=numpy.array([0, 0.00275, 0.0115, 0.0275, 0.0525]);\n", - "print \"depth(m)\\t total swell (m) \\n\"\n", - "for i in range (0,5):\n", - " print D[i],\"\\t \",deltaS[i],\" \\n\",\n", - "\n", - "plt.plot(deltaS*1000,D);\n", - "plt.title(\"depth vs total swell\")\n", - "plt.xlabel(\"total swell (m)\")\n", - "plt.ylabel(\"depth (m)\")\n", - "plt.show()\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "52.5 total swell in mm\n", - "depth(m)\t total swell (m) \n", - "\n", - "5.2 \t 0.0 \n", - "4.2 \t 0.00275 \n", - "3.2 \t 0.0115 \n", - "2.2 \t 0.0275 \n", - "1.2 \t 0.0525 \n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXm8EJ50wcQHHMzAlNnGWjpIKIWl4nfk73\nd9PS0rrmVN1E8+q1btchK72paYaaSaEmznoQs8AB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OZExN8l/Sl7VHRiNo6wC/AE6a/k0yJinqS3gY+z\nLS9/BfwcGC/paOBOUsL45LIt3KoAnCZpESkJHZ2df4i0leuDEbFE0kvAM1lsH0k6BLhU0mqk/49d\nRNq4vhwPkVovj7USV7RyPIS09LhZp3n5a7MqImlj4KcRsX8Hv9dEWuu+Vnf8sirgLiOzKhIRs4H5\nHZ2YBjzvZGBd5RaCmZkBbiGYmVnGCcHMzAAnBDMzyzghmJkZ4IRgZmYZJwQzMwPg/wDP0conunvE\nNwAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.3:Pg-664" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.3\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "phi=12*math.pi/180;\n", - "Ds=0.8; # in m\n", - "Z=5; # in m \n", - "sigmaT=450;\n", - "U=math.pi*Ds*Z*sigmaT*math.tan(phi); # in kN\n", - "def f(D):\n", - " return 1202-450*6.14/1.25*3.14/4*(D**2-0.8**2)\n", - "[x]=fsolve(f,1);\n", - "Db=x; # in m\n", - "print round(Db,2),\"diameter of bell in m\"\n", - "#partb\n", - "D=600; # in kN\n", - "cu=450; # in kN/m^2\n", - "Nc=6.14;\n", - "FS=cu*Nc*math.pi/4*(Db**2-Ds**2)/(U-D);\n", - "if FS>2 :\n", - " print \"the structure is compatible with safety measures\"\n", - "\n", - "#check bearing capacity\n", - "L=D+300;#dead+live load in kN\n", - "Dp=L/math.pi*4/Db**2;#downward pressure\n", - "FS=2763/Dp; # factor of safety\n", - "if FS>3:\n", - " print \"the structure is safe in bearing \"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.15 diameter of bell in m\n", - "the structure is compatible with safety measures\n", - "the structure is safe in bearing \n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter13_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter13_2.ipynb deleted file mode 100755 index bfb80602..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter13_2.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:549425d7a43cc856ebd1610c783821836546fd833bb34512fcafdb71f662b655" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13:Foundations on Difficult Soils" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.1:Pg-653" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.1\n", - "\n", - "Sw=1;\n", - "Z=2; # in m\n", - "deltaSf=0.0033*Z*Sw*1000; # in mm\n", - "print deltaSf,\"free surface swell in mm\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "6.6 free surface swell in mm\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.2:Pg-13.2" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.2\n", - "\n", - "#from figure 13.11\n", - "import matplotlib.pyplot as plt\n", - "%matplotlib inline\n", - "import numpy\n", - "deltaS=1/100.0*1/2.0*(0.55+0+0.55+1.2+1.2+2+2+3);\n", - "print deltaS*1000,\"total swell in mm\"\n", - "#partb\n", - "D=numpy.array([5.2, 4.2, 3.2, 2.2, 1.2]);\n", - "deltaS=numpy.array([0, 0.00275, 0.0115, 0.0275, 0.0525]);\n", - "print \"depth(m)\\t total swell (m) \\n\"\n", - "for i in range (0,5):\n", - " print D[i],\"\\t \",deltaS[i],\" \\n\",\n", - "\n", - "plt.plot(deltaS*1000,D);\n", - "plt.title(\"depth vs total swell\")\n", - "plt.xlabel(\"total swell (m)\")\n", - "plt.ylabel(\"depth (m)\")\n", - "plt.show()\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "52.5 total swell in mm\n", - "depth(m)\t total swell (m) \n", - "\n", - "5.2 \t 0.0 \n", - "4.2 \t 0.00275 \n", - "3.2 \t 0.0115 \n", - "2.2 \t 0.0275 \n", - "1.2 \t 0.0525 \n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXm8EJ50wcQHHMzAlNnGWjpIKIWl4nfk73\nd9PS0rrmVN1E8+q1btchK72paYaaSaEmznoQs8ABFEVMBXMGzQmkFORz/1jfI9vNGfYZvmdP7+fj\nsR9993ev/f1+1pHO56y1vmstRQRmZma9Kh2AmZlVBycEMzMDnBDMzCzjhGBmZoATgpmZZZwQzMwM\ncEKwHiTpGkk/zOnaYyVdl8e1K0XSsZImV+jen/w8JQ2StESSf1/UOf8Htp4U2atLJBUkvdzCtXtU\nRxNcngkxB56g1ICcEKynqcau26j882xATgiWG0mDJT0u6X1JNwIrlHw+StJ0Se9I+pOkrYs+e1HS\nmZKelvS2pKslLS+pH3AHsJ6k+dm11yX9RbucpGuzc09J2qGVuH4h6ccl526R9K3s+AxJr2TXmSVp\nrxaucTxwJHB6Fsct2fnPS2rK6vSUpAPaKX+mpOezez0t6aAyf7YrSPqNpLeye02VtLakYZKeLCp3\nj6SpRe8nSxqdHa8nabykeZJmS/pmOfe2OhYRfvnV7S9gOeBvwClAb+ArwEfAudnng4G5wI6kv0aP\nBuYAfbPPXwSeBNYH1gAeAn6YfTYUeLnkfmOBfwD7Zdc7H/hzK7HtAbxU9H4NYCGwDvA54CVgneyz\nDYCNW7n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7azn2OIO3HMTi79nRgMtC8SuYewFuS1suOJ0nqA/wU+EpEfJG0KdJ/dqBuu5HW\n8Gq2EnBfRGwFzAfOBfYCDs6Om00F9uzAfcyW0afSAZh1QunyzLsB12fL+86TNAnYEXi/pNxywGXZ\nmi8fA5vTtkeAq7MVXCdExBPAAkkrZ0t8DwCuJ/0i3p20yusWpE1z7k1r/dEbeK0DddsQeL3o/UcR\ncVd2PAP4Z0R8LOkp0mZLzV4veW/WYW4hWL0oTRItLdL1beD1iNgG+CIpQbQqIppbA68C10g6Kvvo\nYdLCYc8CD5ESwi7An7I4ns5aJYMjYpuIKN02tSN1WVR0vAT4KIttCZ/+g07U7lr+ViWcEKwWzQdW\nKXo/GTgs283ss6Rf0FOBBSXlVgXeyI6PJv313ipJGwBvRsSVpFUkBxfd7zRgEmn562Gkv9znk5LE\nZyXtnF2jr6QtO1C3vwHrdqB8s3Wz75p1mruMrOZExN8l/Sl7VHRiNo6wC/AE6a/k0yJinqS3gY+z\nLS9/BfwcGC/paOBOUsL45LIt3KoAnCZpESkJHZ2df4i0leuDEbFE0kvAM1lsH0k6BLhU0mqk/49d\nRNq4vhwPkVovj7USV7RyPIS09LhZp3n5a7MqImlj4KcRsX8Hv9dEWuu+Vnf8sirgLiOzKhIRs4H5\nHZ2YBjzvZGBd5RaCmZkBbiGYmVnGCcHMzAAnBDMzyzghmJkZ4IRgZmYZJwQzMwPg/wDP0conunvE\nNwAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex13.3:Pg-664" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 13.3\n", - "\n", - "import math\n", - "from scipy.optimize import fsolve\n", - "phi=12*math.pi/180;\n", - "Ds=0.8; # in m\n", - "Z=5; # in m \n", - "sigmaT=450;\n", - "U=math.pi*Ds*Z*sigmaT*math.tan(phi); # in kN\n", - "def f(D):\n", - " return 1202-450*6.14/1.25*3.14/4*(D**2-0.8**2)\n", - "[x]=fsolve(f,1);\n", - "Db=x; # in m\n", - "print round(Db,2),\"diameter of bell in m\"\n", - "#partb\n", - "D=600; # in kN\n", - "cu=450; # in kN/m^2\n", - "Nc=6.14;\n", - "FS=cu*Nc*math.pi/4*(Db**2-Ds**2)/(U-D);\n", - "if FS>2 :\n", - " print \"the structure is compatible with safety measures\"\n", - "\n", - "#check bearing capacity\n", - "L=D+300;#dead+live load in kN\n", - "Dp=L/math.pi*4/Db**2;#downward pressure\n", - "FS=2763/Dp; # factor of safety\n", - "if FS>3:\n", - " print \"the structure is safe in bearing \"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.15 diameter of bell in m\n", - "the structure is compatible with safety measures\n", - "the structure is safe in bearing \n" - ] - } - ], - "prompt_number": 9 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter14.ipynb b/Principles_Of_Foundation_Engineering/Chapter14.ipynb deleted file mode 100755 index 9492b61a..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter14.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0607b38129f4394e73e1fea85ea07501579e80864ce509d7b62579d182135871" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter14:Soil Improvement and Ground Modification" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.1:Pg-695" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.1\n", - "\n", - "import math\n", - "Cc=0.28;\n", - "Hc=6.0;\n", - "eo=0.9;\n", - "Cv=0.36; # in m^2/mo.\n", - "H=3.0; # in m\n", - "t=9.0; # in mo.\n", - "sigmao=210.0;# in kN/m^2\n", - "sigmap=115; #deltasigmap in kN/m^2\n", - "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+sigmap)/sigmao); # in m\n", - "print round(Sc*1000,1),\"primary consolidation in mm\"\n", - "Tv=Cv*t/H**2;\n", - "#from table\n", - "k=1.8; #constant\n", - "sf=k*sigmap; # in kN/m**2\n", - "print round(sf,2),\"deltasigmaf in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "167.7 primary consolidation in mm\n", - "207.0 deltasigmaf in kN/m**2\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.2:Pg-703" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.2\n", - "\n", - "import math\n", - "Tv=0.36;\n", - "sigmap=115; # in kN/m^2\n", - "Uv=math.sqrt(4*Tv/math.pi)*100;\n", - "print round(Uv,2),\"Uv in %\"\n", - "#from table \n", - "k=0.12; #constant\n", - "sf=k*sigmap;\n", - "print sf,\"deltasigmaf in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "67.7 Uv in %\n", - "13.8 deltasigmaf in kN/m**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.3:Pg-704" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.3\n", - "\n", - "Cc=0.31;\n", - "Hc=15.0;#ft\n", - "eo=1.1;\n", - "n=10.0;\n", - "Uv=0.09;\n", - "sigmao=1000.0; # in lb/ft^2\n", - "deltasigma=2000.0; # deltasigmap+deltasigmaf\n", - "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+deltasigma)/sigmao);\n", - "print round(Sc,3),\"primary consolidation in ft\"\n", - "m=n**2/(n**2-1)*math.log(n)-(3*n**2-1)/4/n**2;\n", - "A=2/m;\n", - "Ur=(0.096-1/A*(1-math.exp(-A*0.096)))/0.192;\n", - "Uvf=1-(1-Ur)*(1-Uv);\n", - "Sc30=Sc*Uvf*12; #settlement after 30 days\n", - "print round(Sc30,2),\"settlement after 30 days in inch\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.056 primary consolidation in ft\n", - "1.48 settlement after 30 days in inch\n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter14_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter14_1.ipynb deleted file mode 100755 index 9492b61a..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter14_1.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0607b38129f4394e73e1fea85ea07501579e80864ce509d7b62579d182135871" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter14:Soil Improvement and Ground Modification" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.1:Pg-695" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.1\n", - "\n", - "import math\n", - "Cc=0.28;\n", - "Hc=6.0;\n", - "eo=0.9;\n", - "Cv=0.36; # in m^2/mo.\n", - "H=3.0; # in m\n", - "t=9.0; # in mo.\n", - "sigmao=210.0;# in kN/m^2\n", - "sigmap=115; #deltasigmap in kN/m^2\n", - "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+sigmap)/sigmao); # in m\n", - "print round(Sc*1000,1),\"primary consolidation in mm\"\n", - "Tv=Cv*t/H**2;\n", - "#from table\n", - "k=1.8; #constant\n", - "sf=k*sigmap; # in kN/m**2\n", - "print round(sf,2),\"deltasigmaf in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "167.7 primary consolidation in mm\n", - "207.0 deltasigmaf in kN/m**2\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.2:Pg-703" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.2\n", - "\n", - "import math\n", - "Tv=0.36;\n", - "sigmap=115; # in kN/m^2\n", - "Uv=math.sqrt(4*Tv/math.pi)*100;\n", - "print round(Uv,2),\"Uv in %\"\n", - "#from table \n", - "k=0.12; #constant\n", - "sf=k*sigmap;\n", - "print sf,\"deltasigmaf in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "67.7 Uv in %\n", - "13.8 deltasigmaf in kN/m**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.3:Pg-704" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.3\n", - "\n", - "Cc=0.31;\n", - "Hc=15.0;#ft\n", - "eo=1.1;\n", - "n=10.0;\n", - "Uv=0.09;\n", - "sigmao=1000.0; # in lb/ft^2\n", - "deltasigma=2000.0; # deltasigmap+deltasigmaf\n", - "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+deltasigma)/sigmao);\n", - "print round(Sc,3),\"primary consolidation in ft\"\n", - "m=n**2/(n**2-1)*math.log(n)-(3*n**2-1)/4/n**2;\n", - "A=2/m;\n", - "Ur=(0.096-1/A*(1-math.exp(-A*0.096)))/0.192;\n", - "Uvf=1-(1-Ur)*(1-Uv);\n", - "Sc30=Sc*Uvf*12; #settlement after 30 days\n", - "print round(Sc30,2),\"settlement after 30 days in inch\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.056 primary consolidation in ft\n", - "1.48 settlement after 30 days in inch\n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter14_2.ipynb b/Principles_Of_Foundation_Engineering/Chapter14_2.ipynb deleted file mode 100755 index c829bef5..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter14_2.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:23456872c8877381c549ede3a12ff29dc232ffad3142abc24c5d2ad8d9888f99" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter14:Soil Improvement and Ground Modification" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.1:Pg-695" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.1\n", - "\n", - "import math\n", - "Cc=0.28;\n", - "Hc=6.0;\n", - "eo=0.9;\n", - "Cv=0.36; # in m^2/mo.\n", - "H=3.0; # in m\n", - "t=9.0; # in mo.\n", - "sigmao=210.0;# in kN/m^2\n", - "sigmap=115; #deltasigmap in kN/m^2\n", - "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+sigmap)/sigmao); # in m\n", - "print round(Sc*1000,1),\"primary consolidation in mm\"\n", - "Tv=Cv*t/H**2;\n", - "#from table\n", - "k=1.8; #constant\n", - "sf=k*sigmap; # in kN/m**2\n", - "print round(sf,2),\"deltasigmaf in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "167.7 primary consolidation in mm\n", - "207.0 deltasigmaf in kN/m**2\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.2:Pg-703" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.2\n", - "\n", - "import math\n", - "Tv=0.36;\n", - "sigmap=115; # in kN/m^2\n", - "Uv=math.sqrt(4*Tv/math.pi)*100;\n", - "print round(Uv,2),\"Uv in %\"\n", - "#from table \n", - "k=0.12; #constant\n", - "sf=k*sigmap;\n", - "print sf,\"deltasigmaf in kN/m**2\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "67.7 Uv in %\n", - "13.8 deltasigmaf in kN/m**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Ex14.3:Pg-704" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#example 14.3\n", - "\n", - "Cc=0.31;\n", - "Hc=15.0;#ft\n", - "eo=1.1;\n", - "n=10.0;\n", - "Uv=0.09;\n", - "sigmao=1000.0; # in lb/ft^2\n", - "deltasigma=2000.0; # deltasigmap+deltasigmaf\n", - "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+deltasigma)/sigmao);\n", - "print round(Sc,3),\"primary consolidation in ft\"\n", - "m=n**2/(n**2-1)*math.log(n)-(3*n**2-1)/4/n**2;\n", - "A=2/m;\n", - "Ur=(0.096-1/A*(1-math.exp(-A*0.096)))/0.192;\n", - "Uvf=1-(1-Ur)*(1-Uv);\n", - "Sc30=Sc*Uvf*12; #settlement after 30 days\n", - "print round(Sc30,2),\"settlement after 30 days in inch\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1.056 primary consolidation in ft\n", - "1.48 settlement after 30 days in inch\n" - ] - } - ], - "prompt_number": 12 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex1.2.png b/Principles_Of_Foundation_Engineering/screenshots/ex1.2.png deleted file mode 100755 index 8346a9de..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex1.2.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png b/Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png deleted file mode 100755 index 8346a9de..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png b/Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png deleted file mode 100755 index 8346a9de..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex13.1.png b/Principles_Of_Foundation_Engineering/screenshots/ex13.1.png deleted file mode 100755 index 10988711..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex13.1.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png b/Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png deleted file mode 100755 index 10988711..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png b/Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png deleted file mode 100755 index 10988711..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex14.2.png b/Principles_Of_Foundation_Engineering/screenshots/ex14.2.png deleted file mode 100755 index 1a58b738..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex14.2.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png b/Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png deleted file mode 100755 index 1a58b738..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png b/Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png deleted file mode 100755 index 1a58b738..00000000 Binary files a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png and /dev/null differ diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter01_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter01_2.ipynb new file mode 100755 index 00000000..61dc3457 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter01_2.ipynb @@ -0,0 +1,249 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3f5444f542f0d6a3b857b61fbecdc4e8047247ed8828d4cea5a34f91ccdf5eb3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1:Geotechnical Properties of Soil" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1:Pg-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.1\n", + "\n", + "V=0.25; # ft^3\n", + "W=30.8; #lb\n", + "Wd=28.2; # weight dried lb\n", + "Gs=2.7;\n", + "Gammaw=62.4; #lb/ft^3\n", + "Gamma=W/V;\n", + "print Gamma,\" is moist unit weight in lb/ft^3\"\n", + "w=(W-Wd)/W;\n", + "print round(w*100,2),\"is moisture content in %\"\n", + "Gammad=Wd/V;\n", + "print Gammad, \"is dry unit weight in lb/ft^3\"\n", + "Vs=Wd/Gs/Gammaw;\n", + "Vv=V-Vs;\n", + "e=Vv/Vs;\n", + "print round(e,3),\" is void ratio\"\n", + "n=e/(1+e);\n", + "print round(n,2),\"is porosity\"\n", + "Vw=(W-Wd)/Gammaw;\n", + "S=Vw/Vv;\n", + "print round(S*100,2),\"is saturation in %\"\n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "123.2 is moist unit weight in lb/ft^3\n", + "8.44 is moisture content in %\n", + "112.8 is dry unit weight in lb/ft^3\n", + "0.494 is void ratio\n", + "0.33 is porosity\n", + "50.43 is saturation in %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2:Pg-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.2\n", + "\n", + "e=0.72;\n", + "w=12.0/100; #moisture content\n", + "Gs=2.72;\n", + "Gammaw=9.81;#kN/m^3\n", + "Gammad=Gs*Gammaw/(1+e);\n", + "print round(Gammad,2),\"= dry unit weight in kN/m^3\"\n", + "Gamma=Gs*Gammaw*(1+w)/(1+e);\n", + "print round(Gamma,2),\" = moist unit weight in kN/m^3\"\n", + "Gammasat=(Gs+e)*Gammaw/(1+e);\n", + "wa=Gammasat-Gamma;#water added\n", + "print round(wa,2),\" = water added in kN/m^3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "15.51 = dry unit weight in kN/m^3\n", + "17.38 = moist unit weight in kN/m^3\n", + "2.24 = water added in kN/m^3\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3:Pg-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.3\n", + "from scipy.optimize import fsolve\n", + "gmax=17.1; # Gammadmax\n", + "Dr=0.7;\n", + "w=8.0/100;#moisture content\n", + "gmin=14.2; #Gammadmin\n", + "def f(x):\n", + " return (x-14.2)/(17.1-14.2)*17.1/x-0.7 \n", + "x=fsolve(f,16);#solving for gammad\n", + "Gamma=x[0]*(1+w);\n", + "print round(Gamma,2),\"moist unit weight in kN/m^3\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "17.4 moist unit weight in kN/m^3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7:Pg-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.7\n", + "import math\n", + "#part (a)\n", + "e1=0.92;\n", + "e2=0.86;\n", + "Hc=2.8; # in m\n", + "s2=212.0;#sigma2dash Load in kN/m2\n", + "s1=140.0;#sigma1dash Load in kN/m2\n", + "Cc=(e1-e2)/math.log10(s2/s1);\n", + "Sc=Cc*Hc/(1+e1)*math.log10(s2/s1);\n", + "print Sc*1000,\"consolidated depth in mm\"\n", + "#part (b)\n", + "# from Figure (1.21):\n", + "Sct=40.0;# in mm\n", + "T50=0.197;\n", + "t=4.5; # in MIN\n", + "Cr=T50*12.7**2.0/t;\n", + "U=Sct/Sc*100.0/1000;\n", + "H=Hc/2;\n", + "Tv=math.pi/4*U**2.0/100**2;\n", + "t=Tv*H**2.0/Cr*1000.0**2/60.0/24;\n", + "print round(t,1),\" is time required in days\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "87.5 consolidated depth in mm\n", + "31.6 is time required in days\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.8:Pg-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1.8\n", + "\n", + "Cv=7.061; # in mm^2/min\n", + "tc=15*24*60.0;\n", + "H=2.8/2*1000.0;\n", + "Scmax=87.5; # consolidation\n", + "Tc=Cv*tc/H**2;\n", + "tv=31.6*24*60;\n", + "Tv=Cv*tv/H**2;\n", + "#from figure 1.28\n", + "Sct=Scmax*0.36;\n", + "print Sct,\"is consolidation in 31.6 days in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "31.5 is consolidation in 31.6 days in mm\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter02_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter02_2.ipynb new file mode 100755 index 00000000..f284c073 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter02_2.ipynb @@ -0,0 +1,95 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1d0e8ca0a27c4b0cb17e7318d009efc3241a84a31e3f27c8ca705f6cb5276ce4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 02:Natural Soil Deposits and Subsoil Exploration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1:Pg-109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.1\n", + "import matplotlib.pyplot as plt\n", + "import numpy\n", + "import math\n", + "Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];\n", + "Time=(10**(-3))*numpy.array([11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5])\n", + "#part1\n", + "distance=5.25; # in meter\n", + "time=23e-3; # in second\n", + "v1=distance/time;\n", + "print round(v1,2),\"is speed in m/s\"\n", + "#part2\n", + "distance=11; # in meter\n", + "time=13.5e-3;# in second\n", + "v2=distance/time;\n", + "print round(v2,2),\" is speed in m/s\"\n", + "#part3\n", + "distance=14.75;# in meter\n", + "time=3.5e-3;# in second\n", + "v3=distance/time;\n", + "print round(v3,2),\"speed in m/s\"\n", + "plt.plot(Distance,Time);\n", + "plt.title(\"distance vs time\")\n", + "plt.xlabel(\"Distance in m\")\n", + "plt.ylabel(\"time in s\")\n", + "plt.show()\n", + "#part4\n", + "xc=10.4;\n", + "Ta=65e-3;\n", + "Z1=1/2.0*math.sqrt((v2-v1)/(v2+v1))*xc;\n", + "print round(Z1,2),\" is thickness of layer 1 in m\"\n", + "Z2=1/2.0*(Ta-2*Z1*math.sqrt(v3**2-v1**2)/v3/v1)*v3*v2/math.sqrt(v3**2-v2**2);\n", + "print round(Z2,2),\" is thickness of layer 2 in m\"\n", + "\n", + "# the answers are slightly different in textbook due to approximation while here answers are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "228.26 is speed in m/s\n", + "814.81 is speed in m/s\n", + "4214.29 speed in m/s\n", + "3.9" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " is thickness of layer 1 in m\n", + "12.82 is thickness of layer 2 in m\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter03_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter03_2.ipynb new file mode 100755 index 00000000..520b4f21 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter03_2.ipynb @@ -0,0 +1,412 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e3a75199f67af72d14bee528a629ae06b2506206625e1ef3a86291ef88f556ed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 03:Shallow Foundations: Ultimate bearing capacity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1:Pg-130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.1\n", + "# From Table 3.1\n", + "Nc=17.69;\n", + "Nq=7.44;\n", + "Ny=3.64;\n", + "q=3*115;\n", + "Gamma=115.0; #lb/ft**3\n", + "c=320;\n", + "B=5.0;#ft\n", + "FS=4;#factor of safety\n", + "qu=1.3*c*Nc+q*Nq+0.4*Gamma*B*Ny\n", + "qall=qu/FS; #q allowed\n", + "Q=qall*B**2;\n", + "print Q,\"is allowable gross load in lb\" \n", + "\n", + "# the answer is slightly different in textbook due to approximation but here answer are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "67269.0 is allowable gross load in lb\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2:Pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.2\n", + "\n", + "from scipy.optimize import fsolve\n", + "import math\n", + "Gamma=105.0;#lb/ft**3\n", + "Gammasat=118.0;#lb/ft**3\n", + "FS=3.0;\n", + "pa=2014.125;#lb/ft**2\n", + "Depth=[5,10,15,20,25]; # in ft\n", + "N60=[4,6,6,10,5]; # in blow/ft\n", + "sigmao=[0,0,0,0,0]; # in lb/ft^2\n", + "phi=[0,0,0,0,0] # in degree\n", + "Gammaw=62.4;\n", + "s=0;\n", + "print \"depth (ft)\\tN60\\t \\tstress(lb/ft**2)\\t phi(degrees)\\n\"\n", + "for i in range(0,5):\n", + " sigmao[i]=2*Gamma+(Depth[i]-2)*(Gammasat-Gammaw);\n", + " phi[i]=math.sqrt(20*N60[i]*math.sqrt(pa/sigmao[i]))+20;\n", + " print \" \",Depth[i],\"\\t \",N60[i],\"\\t\\t \",sigmao[i],\" \\t \\t \\t\",round(phi[i],1),\" \\n\"\n", + " s=phi[i]+s\n", + "\n", + "avgphi=s/(i+1)\n", + "\n", + "print round(avgphi),\"average friction angle in degrees\"\n", + "#using graph get the values of other terms in terms of B and solve for B\n", + "def f(x):\n", + " return-150000/x**2+5263.9+5527.1/x+228.3*x\n", + "x=fsolve(f,4);\n", + "print round(x[0],1),\" is the width in ft\"\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth (ft)\tN60\t \tstress(lb/ft**2)\t phi(degrees)\n", + "\n", + " 5 \t 4 \t\t 376.8 \t \t \t33.6 \n", + "\n", + " 10 \t 6 \t\t 654.8 \t \t \t34.5 \n", + "\n", + " 15 \t 6 \t\t 932.8 \t \t \t33.3 \n", + "\n", + " 20 \t 10 \t\t 1210.8 \t \t \t36.1 \n", + "\n", + " 25 \t 5 \t\t 1488.8 \t \t \t30.8 \n", + "\n", + "34.0 average friction angle in degrees\n", + "4.5 is the width in ft\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3:Pg-144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.3\n", + "\n", + "import math\n", + "phi=25.0; #degrees\n", + "Es=620.0; #kN/m**2\n", + "Gamma=18.0;#kN/m**2\n", + "Df=0.6;# in m\n", + "B=0.6; # in m\n", + "L=1.2; # in m\n", + "Fqc=0.347;\n", + "Nq=10.66;\n", + "Nc=20.72;\n", + "Ngamma=10.88;\n", + "mu=0.3; # Poisson's ratio\n", + "Fyd=1.0;\n", + "c=48.0;#kN/m**2\n", + "q=Gamma*(Df+B/2);\n", + "Ir=Es/(2*(1+mu)*(c+q*math.tan(phi*math.pi/180.0)));\n", + "print round(Ir,2),\" is value of Ir\"\n", + "Fcc=Fqc-(1-Fqc)/(Nq*math.tan(phi*math.pi/180.0));\n", + "Fcs=1+Nq/Nc*B/L;\n", + "Fqs=1+B/L*math.tan(phi*math.pi/180.0);\n", + "Fys=1-0.4*B/L;\n", + "Fcd=1+0.4*Df/B;\n", + "Fqd=1+2.0*math.tan(phi*math.pi/180.0)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", + "q1=0.6*18;\n", + "Fyc=Fqc;\n", + "qu=c*Nc*Fcs*Fcd*Fcc+q1*Nq*Fqs*Fqd*Fqc+1.0/2*Gamma*Ngamma*Fys*Fyd*Fyc;\n", + "print round(qu,2),\"is ultimate bearing capacity in kN/m**2\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation but here answer are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4.29 is value of Ir\n", + "469.24 is ultimate bearing capacity in kN/m**2\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4:Pg-156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.4\n", + "import math\n", + "q=110*4.0; #lb/ft**2\n", + "Nq=33.3;\n", + "phi=35.0; # in degree\n", + "Df=4.0; # in ft\n", + "B=6.0; # in ft\n", + "Gamma=110.0;#lb/ft**3\n", + "Ngamma=48.03; #lb/ft**3\n", + "B1=6-2*0.5; # in ft\n", + "Fqi=1;\n", + "Fyi=1;\n", + "Fyd=1;\n", + "Fqs=1;\n", + "Fys=1;\n", + "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n", + "qu=q*Nq*Fqs*Fqd*Fqi+1/2.0*B1*Gamma*Ngamma*Fys*Fyd*Fyi;\n", + "Qult=B1*1*qu;\n", + "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\" \n", + "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation but here answer are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "151738.23 is ultimate bearing capacity in lb/ft\n", + "75.87 is ultimate bearing capacity in ton/ft\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5:Pg-158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.5\n", + "\n", + "e=0.5; # in ft\n", + "B=6; # in ft\n", + "k=e/B;\n", + "Gamma=110; # in lb/ft^3 \n", + "q=440;\n", + "print \"get the values of Nqe and Nye from the figure from the value of e/B\"\n", + "Nye=26.8;\n", + "Nqe=33.4;\n", + "Qult=B*1*(q*Nqe+1/2.0*Gamma*B*Nye);\n", + "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\"\n", + "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "get the values of Nqe and Nye from the figure from the value of e/B\n", + "141240.0 is ultimate bearing capacity in lb/ft\n", + "70.62 is ultimate bearing capacity in ton/ft\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6:Pg-159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.6\n", + "\n", + "Df=0.7; # in m\n", + "#from table\n", + "Nq=18.4;\n", + "Ny=22.4;\n", + "q=12.6;\n", + "phi=30; #angle in degree\n", + "L=1.5;# in m\n", + "Fyd=1;\n", + "Gamma=18; # in KN/m^3\n", + "L1=0.85*1.5; # in m\n", + "L2=0.21*1.5; # in m\n", + "B=1.5; # in m\n", + "A=1/2.0*(L1+L2)*B;\n", + "B1=A/L1; #B'\n", + "Fqs=1+B1/L1*math.tan(phi*math.pi/180);\n", + "Fys=1-0.4*B1/L1;\n", + "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180))**2*Df/B;\n", + "Qult=A*(q*Nq*Fqs*Fqd+1/2.0*Gamma*B1*Ny*Fys*Fyd);\n", + "print round(Qult,2),\" is ultimate load in kN\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation but here answer are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "605.45 is ultimate load in kN\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7:Pg-161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.7\n", + "\n", + "e=0.15; # in m\n", + "B=1.5; # in m\n", + "Fqs=1.0;\n", + "L=1.5;# in m\n", + "Gamma=18.0; # in KN/m^3\n", + "q=0.7*18;\n", + "#from table\n", + "Nqe=18.4;\n", + "Nye=11.58;\n", + "Fys=1+(2*e/B-0.68)*(B/L)+(0.43-3/2.0*e/B)*(B/L)**2;\n", + "Qult=B*L*(q*Nqe*Fqs+1/2.0*L*Gamma*Nye*Fys);\n", + "print round(Qult,2),\"is ultimate load in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "803.03 is ultimate load in kN\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8:Pg-163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3.8\n", + "\n", + "q=16.0;# in kN/m^2\n", + "Nqei=14.2;\n", + "Gamma=16.0 # in kN/m^3\n", + "B=1.5;# in m\n", + "Nyet=20.0;\n", + "Qult=B*(Nqei*q+1/2.0*Gamma*B*Nyet);\n", + "print round(Qult,2),\" is ultimate load in kN/m\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "700.8 is ultimate load in kN/m\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter04_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter04_2.ipynb new file mode 100755 index 00000000..1d75ed9f --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter04_2.ipynb @@ -0,0 +1,373 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7e16b5ec29439d0d7eaa54a0826b64a36c559ed79f17d130c42f4478805c682f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 04:Ultimate Bearing Capacity of Shallow Foundations: Special Cases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1:Pg-176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.1\n", + "\n", + "FS=4.0; # FOS\n", + "q=110*2.0; # in 1b/ft^2\n", + "Nq=90.0;\n", + "Ny=50.0;\n", + "Gamma=110.0; # in 1b/ft^3\n", + "m1=0.34; # From Figure 4.6(a)\n", + "B=2.5; # in ft\n", + "L=2.5; # in ft\n", + "H=1.5; # in ft\n", + "phi=35; # in degree\n", + "m2=0.45; # From Figure 4.6(b)\n", + "Fqs=1-0.34*B/L;\n", + "Fys=1-0.45*B/L;\n", + "qu=q*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", + "Qall=qu*B**2/FS;\n", + "print round(Qall,2),\"bearing load in lb\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "26326.95 bearing load in lb\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2:Pg-177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.2\n", + "\n", + "FS=3.0; # FOS\n", + "cu=72.0;\n", + "q=18.0; # in kN/m^3\n", + "B=1.0;# in m\n", + "H=0.25;# in m\n", + "qu=5.14*(1+(0.5*B/H-0.707)/5.14)*cu+q;\n", + "qall=qu/FS;\n", + "print round(qall,1),\"bearing capacity of soil in kN/m**2\" \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "160.4 bearing capacity of soil in kN/m**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3:Pg-183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.3\n", + "import math\n", + "k=0; #B/L;\n", + "c2=30;\n", + "Gamma=17.5; # in kN/m^3\n", + "H=1.5; # in m\n", + "Df=1.2; # in m\n", + "B=2.0; # in m\n", + "Ks=2.5;\n", + "phi=40; # in degree\n", + "pi=math.pi;\n", + "qu=(1+0.2*k)*5.14*c2+(1+k)*Gamma*H**2*(1+2*Df/H)*Ks*math.tan(phi*pi/180)/B+Gamma*H;\n", + "Qu=qu*B;\n", + "print round(Qu,2),\"is bearing capacity in kN/m\"\n", + "print \"there is slight variation due to rounding off error\"\n", + "#soil 2\n", + "Ny=109.4;\n", + "Nq=64.2;\n", + "Fqs=1;\n", + "Fys=1;\n", + "qt=Gamma*Df*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n", + "print qt,\"bearing capacity in kN/m**2\"\n", + "\n", + "# answer in book is different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "575.66 is bearing capacity in kN/m\n", + "there is slight variation due to rounding off error\n", + "3262.7 bearing capacity in kN/m**2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4:Pg-184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.4\n", + "\n", + "B=1.0; # in m\n", + "L=1.5;# in m\n", + "c2=48;# in m\n", + "ca=108; # in KN/m^2\n", + "D=1.0;# in m\n", + "H=1.0;# in m\n", + "Gamma=16.8; # in KN/m^3\n", + "FS=4;\n", + "qu=(1+0.2*B/L)*5.14*c2+(1+B/L)*2*ca*H/B+Gamma*D; # in KN/m^2\n", + "c1=120.0;\n", + "gamma1=16.8; # in kN/m^3\n", + "Df=1.0;\n", + "qt=(1+0.2*B/L)*5.14*c1+gamma1*Df;\n", + "print qt,\"is qt in kN/m**2\"\n", + "print \"no need to calculate qt since it is not useful for calculation\"\n", + "print qu/FS,\"is allowable shear stress in kN/m**2\"\n", + "print qu/FS*1*1.5,\" is allowable load in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "715.84 is qt in kN/m**2\n", + "no need to calculate qt since it is not useful for calculation\n", + "164.104 is allowable shear stress in kN/m**2\n", + "246.156 is allowable load in kN\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.5:Pg-190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.5\n", + "\n", + "c=50; # in KN/m^2\n", + "#from table\n", + "Ncq=6.3;\n", + "FS=4.0;# FOS\n", + "qu=c*Ncq; # in KN/m^2\n", + "qall=qu/4;\n", + "print qall,\"allowed shear stress in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "78.75 allowed shear stress in kN/m**2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.6:Pg-191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.6\n", + "\n", + "Gamma=16.8; # in kN/m^3\n", + "B=1.5;# in m\n", + "#from table\n", + "Nyq=120.0;\n", + "qu=1/2.0*Gamma*B*Nyq; # in KN/m^2\n", + "print qu,\" is shear stress in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1512.0 shear stress in kN/m**2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.7:Pg-198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.7\n", + "import math\n", + "phi=35; # in degree\n", + "Df=1.5; # in m\n", + "B=1.5; # in m\n", + "Gamma=17.4; # in kN/m^3\n", + "A=math.pi/4*Df**2; # in m^2\n", + "m=0.25;\n", + "Ku=0.936;\n", + "Fq=1+2*(1+m*Df/B)*Df/B*Ku*math.tan(phi*math.pi/180);\n", + "Qu=Fq*Gamma*A*Df; # in KN/m^2\n", + "print round(Qu,1),\" is bearing capacity in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "121.7 is bearing capacity in kN\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8:pg-198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#example 4.8\n", + "\n", + "\n", + "\n", + "cu=52; # in kN/m^2\n", + "\n", + "B=1.5; # in m\n", + "\n", + "L=3; # in m\n", + "\n", + "k=0.107*cu+2.5;\n", + "\n", + "print round(k,2),\" is Df/B of square\" \n", + "\n", + "A=L*B; # in m^2\n", + "\n", + "Beta=0.2;\n", + "\n", + "Gamma=18.9; # in kN/m^3\n", + "\n", + "Df=1.8; # in m\n", + "\n", + "Qu=A*(Beta*(7.56+1.44*B/L)*cu+Gamma*Df); # in kN/m^2\n", + "\n", + "print round(Qu,1),\" is ultimate shear force in kN\"\n", + "\n", + " \n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "8.06 is Df/B of square\n", + "540.6 is ultimate shear force in kN\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter05_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter05_2.ipynb new file mode 100755 index 00000000..ca975aae --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter05_2.ipynb @@ -0,0 +1,550 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:77a2cf465cec464205dc151afe10d9acafa79fe1b46b30f4a468368f8af3f8ea" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter05:Shallow Foundations: Allowable Bearing Capacity and Settlement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1:Pg-212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.1\n", + "\n", + "#first solution\n", + "B1=2.5; # in ft\n", + "B2=B1;\n", + "z=12.5; # in ft\n", + "L1=5; # in ft\n", + "L2=L1;\n", + "m=B1/z;\n", + "n=B2/z;\n", + "#from table 5.2 of the values using m,n\n", + "q=2000; # in lb/ft^2\n", + "I=0.0328;\n", + "deltasigma=q*4*I; # in lb/ft**2\n", + "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", + "#second solution\n", + "Ic=0.131;#from table\n", + "deltasigma=q*Ic; # in lb/ft**2\n", + "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "262.4 change in pressure in lb/ft**2\n", + "262.0 change in pressure in lb/ft**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2:Pg-215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.2\n", + "\n", + "qo=100; # in KN/m^2\n", + "H1=3; # in m\n", + "H2=5; # in m\n", + "#from table\n", + "IaH2=0.126;\n", + "IaH1=0.175;\n", + "deltasigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1)); # in kN/m**2\n", + "print round(deltasigma,2),\"change in pressure in kN/m**2\"\n", + "TS=4*deltasigma; # in kN/m**2\n", + "print round(TS,2),\"total change in pressure in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5.25 change in pressure in kN/m**2\n", + "21.0 total change in pressure in kN/m**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3:Pg-217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.3\n", + "H=7;\n", + "Gamma=17.5; # in KN/m^3\n", + "q0=Gamma*H # in KN/m^2\n", + "print q0,\" is pressure change in kN/m**2\"\n", + "#part2\n", + "#from figure\n", + "Ileftside=0.445;\n", + "Irightside=0.445;\n", + "deltasigma=q0*(Ileftside+Irightside); # in KN/m^2\n", + "print round(deltasigma,2),\"is change in stress in kN/m**2\"\n", + "#partc\n", + "#from figure 5.11\n", + "I=0.24;#I'\n", + "Dsigma1=43.75*I;#deltasigma1 in KN/m^2\n", + "I2=0.495;#I'\n", + "Dsigma2=I2*q0;#deltasigma2 in KN/m^2\n", + "I3=0.335;#I'\n", + "Dsigma3=I3*78.75;#deltasigma3 in KN/m^2\n", + "Dsigma=Dsigma1+Dsigma2-Dsigma3; # in KN/m^2\n", + "print round(Dsigma,2),\"is total stress increase in A in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "122.5 is pressure change in kN/m**2\n", + "109.03 is change in stress in kN/m**2\n", + "44.76 is total stress increase in A in kN/m**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4:Pg-228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.4\n", + "\n", + "zbar=5;\n", + "mus=0.3;\n", + "F1=0.641;\n", + "F2=0.031;\n", + "z1=2.0; # in m\n", + "z2=1.0; # in m\n", + "z3=2.0; # in m\n", + "Es1=10000; # in kN/m**2\n", + "Es2=8000; # in kN/m**2\n", + "Es3=12000;# in kN/m**2\n", + "qo=150; # in KN/m^2\n", + "#from table 5.4\n", + "If=0.709;\n", + "Es=(Es1*z1+Es2*z2+Es3*z3)/zbar; # in kN/m**2\n", + "print Es,\" is modulus of elasticity in kN/m**2\"\n", + "Is=F1+(2-mus)/(1-mus)*F2;\n", + "Sc=qo*(1.0/Es-mus**2.0/Es)*Is*If*2;\n", + "Scrigid=0.93*Sc; # in m\n", + "print round(Scrigid*1000,2),\"is settlement in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10400.0 is modulus of elasticity in kN/m**2\n", + "12.4 is settlement in mm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5:Pg-234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.5\n", + "import math\n", + "B=5; # in ft\n", + "L=10; # in ft\n", + "Ef=2.3e6; # in lb/in^2\n", + "Eo=1400.0; # in lb/in^2\n", + "k=25.0; # in lb/in^2/ft\n", + "t=1.0;\n", + "mus=0.3;\n", + "Df=5.0; # in ft\n", + "qo=5000.0; # in lb/ft^2\n", + "Ig=0.69;\n", + "Be=math.sqrt(4*B*L/math.pi);\n", + "If=math.pi/4+1/(4.6+10*(Ef/(Eo+2*Be/2*k))*(2*t/Be)**3);\n", + "Ie=1-1/(3.5*math.exp(1.22*mus-0.4)*(Be/Df+1.6));\n", + "Se=qo*Be*Ig*If*Ie/Eo*(1-mus**2)/144; # in ft\n", + "print round(Se*12,2),\"settlement in inches\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.07 settlement in inches\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.6:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.6\n", + "\n", + "import math\n", + "import numpy\n", + "q=3.06; # in lb/in^2\n", + "qbar=25; # in lb/in^2\n", + "C1=1-0.5*(q/(qbar-q));\n", + "Sum=0;\n", + "C2=1+0.2*math.log10(10/0.1);\n", + "L=[1, 2, 3, 4, 5];\n", + "Dz=[48, 48, 96, 48, 144]; # in inch\n", + "Es=[750, 1250, 1250, 1000, 2000]; # in lb/in^2\n", + "z=[24, 72, 144, 216, 312]; # in inch\n", + "Iz=[0.275, 0.425, 0.417, 0.292, 0.125];\n", + "k=numpy.zeros(5)\n", + "print \"Layer No.\\t deltaz (in)\\t Es(lb/in**2)\\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \\n\"\n", + "for i in range(0,5):\n", + " k[i]=Iz[i]/Es[i]*Dz[i];\n", + " print L[i],\"\\t \\t \",Dz[i],\"\\t\\t \",Es[i],\"\\t\\t \",z[i],\" \\t\\t\\t\\t\\t \",Iz[i],\"\\t\\t \",round(k[i],3)\n", + " Sum=Sum+k[i];\n", + "\n", + "Se=C1*C2*(qbar-q)*Sum; # in inch\n", + "print round(Se,2),\"settlement in inches\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Layer No.\t deltaz (in)\t Es(lb/in**2)\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \n", + "\n", + "1 \t \t 48 \t\t 750 \t\t 24 \t\t\t\t\t 0.275 \t\t 0.018\n", + "2 \t \t 48 \t\t 1250 \t\t 72 \t\t\t\t\t 0.425 \t\t 0.016\n", + "3 \t \t 96 \t\t 1250 \t\t 144 \t\t\t\t\t 0.417 \t\t 0.032\n", + "4 \t \t 48 \t\t 1000 \t\t 216 \t\t\t\t\t 0.292 \t\t 0.014\n", + "5 \t \t 144 \t\t 2000 \t\t 312 \t\t\t\t\t 0.125 \t\t 0.009\n", + "2.54 settlement in inches\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.7:Pg-244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.7\n", + "\n", + "Df=1.0; # in m\n", + "B=1.75; # in m\n", + "L=1.75 # in m\n", + "qnet=120.0; # in KN/m^2\n", + "N60=10.0;# in m\n", + "alpha1=0.14 # for normally consolated sand\n", + "alpha2=1.71/(N60)**1.4 # for normally consolated sand\n", + "alpha3=1.0 # for normally consolated sand\n", + "Se=0.3*alpha1*alpha2*alpha3*(qnet/100)*((B/0.3)**0.7)*((1.25*(L/B)/(0.25+(L/B))))**2\n", + "print round(Se*1000,2),\"settlement in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "11.79 settlement in mm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.8:Pg-245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.8\n", + "\n", + "Df=1; # in m\n", + "B=1.75; # in m\n", + "qnet=120; # in KN/m^2\n", + "N60=10; # in m\n", + "Fd=1+0.33*Df/B;\n", + "Se=2*qnet/N60/Fd*(B/(B+0.3))**2; # in mm\n", + "print round(Se,2),\"settlement in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "14.71 settlement in mm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.9:Pg-251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.9\n", + "\n", + "Ny=23.76; \n", + "Nq=16.51; \n", + "q=3*110.0; # in lb/ft^2\n", + "Gamma=110.0; # in lb/ft^3\n", + "B=4.0; # in ft\n", + "Nqe=0.63*Nq;\n", + "Nye=0.4*Ny;\n", + "que=q*Nqe+1/2.0*Gamma*B*Nye; # in lb/ft^2\n", + "print round(que,2),\" is bearing capacity in lb/ft**2\"\n", + "#part 2\n", + "V=0.4; # in ft/sec\n", + "A=0.32; # given in question\n", + "g=9.81; # acceleration constant in m/sec^2\n", + "kh=0.26;\n", + "k=0.92;#tan(alphae)\n", + "Seq=0.174*k*V**2/A/g*kh**-4/A**-4; # in m\n", + "print round(Seq,3),\"settelement in m\"\n", + "print round(Seq*39.57,2),\"settlement in inches\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5523.31 is bearing capacity in lb/ft**2\n", + "0.019 settelement in m\n", + "0.74 settlement in inches\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.10:Pg-256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.10\n", + "\n", + "import math\n", + "Cc=0.32;\n", + "Hc=2.5;\n", + "eo=0.8;\n", + "sigmao=2.5*16.5+0.5*(17.5-9.81)+1.25*(16-9.81); # in kN/m^2\n", + "m1=[2, 2, 2];\n", + "z=[2, 3.25, 4.5];\n", + "n1=[4, 6.5, 9];\n", + "Ic=[0.19, 0.085, 0.045];\n", + "Dsigma=[28.5, 12.75, 6.75];#deltasigma\n", + "print (\"m1\\t z(m)\\t n1\\t Ic\\t Dsigma \\n\");\n", + "for i in range(0,3):\n", + " print round(m1[i],2),\"\\t \",round(z[i],2),\"\\t \",round(n1[i],2),\"\\t \",round(Ic[i],2),\"\\t \",round(Dsigma[i],2)\n", + "\n", + " Dsigmaav=1/6.0*(Dsigma[0]+4*Dsigma[1]+Dsigma[2]);\n", + " Sc=Cc*Hc/(1+eo)*math.log10((sigmao+Dsigmaav)/sigmao);\n", + "print round(Sc*1000,2),\"settlement in mm\"\n", + "#partb\n", + "B=1.0; # in m\n", + "L=2.0; # in m\n", + "z=0.5+1.5; # in m\n", + "B=B+z; # in m\n", + "L=L+z; # in m\n", + "A=0.6; # given in question\n", + "#from table\n", + "kcr=0.78; # by data\n", + "Sep=kcr*Sc;\n", + "print round(Sep*1000,2),\"settlement in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m1\t z(m)\t n1\t Ic\t Dsigma \n", + "\n", + "2.0 \t 2.0 \t 4.0 \t 0.19 \t 28.5\n", + "2.0 \t 3.25 \t 6.5 \t 0.09 \t 12.75\n", + "2.0 \t 4.5 \t 9.0 \t 0.04 \t 6.75\n", + "46.45 settlement in mm\n", + "36.23 settlement in mm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.11:Pg-262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.11\n", + "\n", + "import numpy\n", + "N60=(3+7+12+12+16)/5.0;\n", + "B=[2, 2.25, 2.3]; # in m\n", + "Fd=[1.248, 1.22, 1.215];\n", + "Qoac=102000*9.81/1000;#actual Qo\n", + "Se=25; # in mm\n", + "qnet=numpy.zeros(3)\n", + "Qo=numpy.zeros(3) # in kN\n", + "print \"B(m)\\t Fd\\t qnet(kN/m**2)\\t \\t Qo \\n\"\n", + "for i in range(0,3):\n", + " qnet[i]=10/0.08*(B[i]+0.3)**2/(B[i])**2*Fd[i]*Se/25;\n", + " Qo[i]=qnet[i]*B[i]**2;\n", + " print B[i],\"\\t\",Fd[i],\" \\t \",round(qnet[i],2),\"\\t\\t \",Qo[i],\"\\n\"\n", + "print int(Qoac),\"value of Qo in kN\"\n", + "print \"since Qo is 1000 kN thus B is equal to 2.3 m from the table\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B(m)\t Fd\t qnet(kN/m**2)\t \t Qo \n", + "\n", + "2 \t1.248 \t 206.31 \t\t 825.24 \n", + "\n", + "2.25 \t1.22 \t 195.88 \t\t 991.63125 \n", + "\n", + "2.3 \t1.215 \t 194.08 \t\t 1026.675 \n", + "\n", + "1000 value of Qo in kN\n", + "since Qo is 1000 kN thus B is equal to 2.3 m from the table\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter06_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter06_2.ipynb new file mode 100755 index 00000000..d87679c7 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter06_2.ipynb @@ -0,0 +1,351 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0ea06255a04932e0bf9952689cf2f6d919d320d1161a790bec574191c6fbafa1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06: Mat Foundations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1:Pg-279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.1\n", + "\n", + "B=30; # in ft\n", + "L=45; # in ft\n", + "Df=6.5; # in ft\n", + "cu=1950;# in lb/ft^2\n", + "qunet=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B);\n", + "print int(qunet),\" is allowed force in lb/ft**2\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "12307 is allowed force in lb/ft**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2:Pg-280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.2\n", + "\n", + "N60=10; # penetration number\n", + "Df=2; # in m\n", + "B=10.0; # in m\n", + "Se=25.0; # in mm\n", + "qnetall=N60/0.08*(1+0.33*Df/B)*Se/25;\n", + "print qnetall,\" is allowed pressure in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "133.25 is allowed pressure in kN/m**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3:Pg-283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.3\n", + "\n", + "cu=2800; # in lb/ft^2\n", + "B=60; # in ft\n", + "L=100; # in ft\n", + "Df=5; # in ft\n", + "\n", + "Gamma=120; # in lb/ft^3\n", + "A=60*100; # in ft^2\n", + "Q=25e6; # load in Kip\n", + "FS=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B)/(Q/A-Gamma*Df);\n", + "print round(FS,2),\" is factor of safety\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4.66 is factor of safety\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4:Pg-284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.4\n", + "\n", + "import math\n", + "Cc=0.28;\n", + "Hc=18*12.0;\n", + "e0=0.9;\n", + "sigmao=11*100+40*(121.5-64)+18/2*(118-62.4); # in lb/ft^2\n", + "H2=5+40+18.0;\n", + "H1=5+40.0;\n", + "qo=3567.0;\n", + "#from table\n", + "IaH2=0.21;\n", + "IaH1=0.225;\n", + "Dsigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1))*4;\n", + "Scp=Cc*Hc/(1+e0)*math.log10(sigmao/sigmao+Dsigma/sigmao);\n", + "print round(Scp,2),\"is settlement in inches\"\n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.76 is settlement in inches\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5:Pg-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.5\n", + "import numpy\n", + "P=['A','B','C','D','E','F','G','H','I','J','K','L','M','N'];#point\n", + "k=1.2*numpy.ones(14);#Q/A\n", + "x=[-38,-24, -12, 0, 12, 24, 38, 38, 24, 12, 0, -12, -24, -38];\n", + "x1=numpy.zeros(14)\n", + "for i in range(0,14):\n", + " x1[i]=0.0017*x[i];\n", + "y=[48,48,48,48,48,48,48, -48, -48, -48, -48, -48, -48, -48];\n", + "y1=numpy.zeros(14)\n", + "for i in range(0,14):\n", + " y1[i]=-0.0011*y[i];\n", + "print \"point\\t Q\\A (kip/ft**2) x(ft)\\t 0.0017x(ft)\\t\\ty(ft)\\t \\t 0.0011y(ft)\\t \\t q(kip/ft**2)\\n\"\n", + "q=numpy.zeros(14)\n", + "for i in range(0,14):\n", + " q[i]=1.2+x1[i]+y1[i];\n", + " print P[i],\"\\t \",k[i],\"\\t\\t \",x[i],\"\\t\\t\",round(x1[i],3),\"\\t\\t\",y[i],\"\\t \\t \",round(y1[i],3),\"\\t \\t \\t\",round(q[i],3),\"\\t\\t \\n \"\n", + "\n", + "print \"the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "point\t Q\\A (kip/ft**2) x(ft)\t 0.0017x(ft)\t\ty(ft)\t \t 0.0011y(ft)\t \t q(kip/ft**2)\n", + "\n", + "A \t 1.2 \t\t -38 \t\t-0.065 \t\t48 \t \t -0.053 \t \t \t1.083 \t\t \n", + " \n", + "B \t 1.2 \t\t -24 \t\t-0.041 \t\t48 \t \t -0.053 \t \t \t1.106 \t\t \n", + " \n", + "C \t 1.2 \t\t -12 \t\t-0.02 \t\t48 \t \t -0.053 \t \t \t1.127 \t\t \n", + " \n", + "D \t 1.2 \t\t 0 \t\t0.0 \t\t48 \t \t -0.053 \t \t \t1.147 \t\t \n", + " \n", + "E \t 1.2 \t\t 12 \t\t0.02 \t\t48 \t \t -0.053 \t \t \t1.168 \t\t \n", + " \n", + "F \t 1.2 \t\t 24 \t\t0.041 \t\t48 \t \t -0.053 \t \t \t1.188 \t\t \n", + " \n", + "G \t 1.2 \t\t 38 \t\t0.065 \t\t48 \t \t -0.053 \t \t \t1.212 \t\t \n", + " \n", + "H \t 1.2 \t\t 38 \t\t0.065 \t\t-48 \t \t 0.053 \t \t \t1.317 \t\t \n", + " \n", + "I \t 1.2 \t\t 24 \t\t0.041 \t\t-48 \t \t 0.053 \t \t \t1.294 \t\t \n", + " \n", + "J \t 1.2 \t\t 12 \t\t0.02 \t\t-48 \t \t 0.053 \t \t \t1.273 \t\t \n", + " \n", + "K \t 1.2 \t\t 0 \t\t0.0 \t\t-48 \t \t 0.053 \t \t \t1.253 \t\t \n", + " \n", + "L \t 1.2 \t\t -12 \t\t-0.02 \t\t-48 \t \t 0.053 \t \t \t1.232 \t\t \n", + " \n", + "M \t 1.2 \t\t -24 \t\t-0.041 \t\t-48 \t \t 0.053 \t \t \t1.212 \t\t \n", + " \n", + "N \t 1.2 \t\t -38 \t\t-0.065 \t\t-48 \t \t 0.053 \t \t \t1.188 \t\t \n", + " \n", + "the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6:Pg-299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6.6\n", + "\n", + "from scipy.optimize import fsolve\n", + "#solving for d\n", + "def f(d):\n", + " return (96+2*d)*d-2615.1\n", + "[x]=fsolve(f,19);\n", + "d1=x;\n", + "def f(d):\n", + " return (96+4*d)*d-6046.4\n", + "[x]=fsolve(f,28);\n", + "d2=x;\n", + "d=max(d2,d1);\n", + "d=round(d)\n", + "#now coming to design part\n", + "h=d+3+1; #in inch\n", + "print h,\"is total slab thickness in inches\"\n", + "qa=1.082; # in kip/ft^2\n", + "qb=1.106; # in kip/ft^2\n", + "qm=1.212; # in kip/ft^2\n", + "qn=1.188; # in kip/ft^2\n", + "q1A=qa/2.0+qb/2.0;\n", + "print round(q1A,3),\"is force in strip ABMN in kip/ft**2\"\n", + "q2A=qm/2.0+qn/2.0;\n", + "print round(q2A,3),\"is force in strip ABMN in kip/ft**2\"\n", + "q1=1.106/3+1.127/3+1.147/3;\n", + "print round(q1,3),\"is force in strip BCDKLM in kip/ft**2\"\n", + "q2=1.253/3+1.233/3+1.212/3;\n", + "print round(q2,3),\"is force in strip BCDKLM in kip/ft**2\"\n", + "q1=1.147/3+1.167/3+1.188/3;\n", + "print round(q1,3),\"is force in strip DEFIJK in kip/ft**2\"\n", + "q2=1.294/3+1.273/3+1.253/3;\n", + "print round(q2,3),\"is force in strip DEFIJK in kip/ft**2\"\n", + "q1=1.188/2+1.212/2;\n", + "print round(q1,3),\"is force in strip FGHI in kip/ft**2\"\n", + "q2=1.318/2+1.294/2;\n", + "print round(q2,3),\" is force in strip FGHI in kip/ft**2\"\n", + "#checking for force\n", + "#net soil reaction 2 :\n", + " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", + "\n", + "#for sliding\n", + "phi2=18*math.pi/180; # the given angle\n", + "V=24.986;\n", + "B=12.5;\n", + "c2=0.9; # in lb/ft^2\n", + "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", + "if FSS>2 :\n", + " print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", + "\n", + "#for bearing\n", + "e=B/2.0-(Sum-Mo)/V;\n", + "qtoe=V/B*(1+6*e/B); # in Kip/ft^2\n", + "Nc=13.1;\n", + "Nq=5.26;\n", + "Ny=4.07;\n", + "D=0.107;\n", + "Gamma2=4.0; # in lb/ft^3\n", + "B1=B-2*e;#Bdash\n", + "q=Gamma2*D # in lb/ft^2\n", + "Fcd=1+0.4*D/B1;\n", + "Fqd=1+2*math.tan(phi2)*(1-math.sin(phi2))**2*(D/B1);\n", + "Fyd=1;\n", + "zi=math.tan(Ph/V);\n", + "Fci=(1-zi/math.pi*2)**2;\n", + "Fqi=Fci;\n", + "Fyi=round((1-zi/phi2)**2);\n", + "qu=c2*Nc*Fcd*Fci+q*Nq*Fqd*Fqi+1/2.0*Gamma2*B1*Fyd*Fyi;\n", + "FSB=qu/qtoe;\n", + "if FSB>3 :\n", + " print \"bearing is safe with FS=\",round(FSB),\"\\n\\n\"\n", + " print \"slight changes due to round off error\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\n", + "\n", + "1.0 \t \t 4.05 \t \t \t5.75 \t \t \t 23.29 \n", + "\n", + "2.0 \t \t 1.35 \t \t \t4.67 \t \t \t 6.3 \n", + "\n", + "3.0 \t \t 5.16 \t \t \t6.25 \t \t \t 32.23 \n", + "\n", + "4.0 \t \t 13.01 \t \t \t9.5 \t \t \t 123.59 \n", + "\n", + "5.0 \t \t 1.42 \t \t \t12.5 \t \t \t 17.75 \n", + "\n", + "safe in overturning with FS= 3.47 \n", + "\n", + "bearing is safe with FS= 4.0 \n", + "\n", + "\n", + "slight changes due to round off error\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2:Pg-369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.2\n", + "\n", + "c=0.9; # # in lb/ft^2\n", + "B=12.5; # in ft\n", + "Gamma2=4; # in lb/ft^3\n", + "Fcd=1.138;\n", + "Fqd=1.107; \n", + "Nc=7.5;\n", + "Nq=4;\n", + "Ny=0;\n", + "q=0.428; # in lb/ft^2\n", + "qtoe=2.44; # in lb/ft^2\n", + "qu=c*Nc*Fcd+q*Nq*Fqd+1/2.0*Gamma2*B*Ny;\n", + "FSB=qu/qtoe; # factor of safety\n", + "if FSB>3.0 :\n", + " print \"safe in bearing with FS=\",round(FSB,2),\"\\n\\n\",\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "safe in bearing with FS= 3.92 \n", + "\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.3:Pg-370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.3\n", + "import math\n", + "import numpy\n", + "Msum=0;#sum of moment\n", + "Vsum=0;#sum of force\n", + "H=15+2.5;#Hdash in ft\n", + "phi=30*math.pi/180; # given angle in degree\n", + "Gamma=121.0; # in lb/ft^3\n", + "Ka=(math.tan(math.pi/4-phi/2))**2;\n", + "Pa=1/2.0*Gamma*H**2*Ka/1000; # in Kip/ft\n", + "Ph=Pa; # in Kip/ft\n", + "Mo=Ph*H/3.0; # in Kip-ft/ft\n", + "AN=[1.0,2.0,3.0,4.0,5.0,6.0];#area number\n", + "W=[0.9,3.375,5.906,3.863,4.764,2.723];#weight\n", + "MA=[1.783,2.8,5.3,5.15,7.05,9.55];#moment arm\n", + "\n", + "print \"AreaNo \\t Weight(kip/ft) \\t Moment Arm(ft) \\t Moment (kip-ft/ft)\\n\"\n", + "M= numpy.zeros(6)\n", + "for i in range(0,6):\n", + " M[i]=W[i]*MA[i];\n", + " Vsum=Vsum+W[i];\n", + " Msum=Msum+M[i];\n", + " print round(AN[i],2),\"\\t\\t \",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", + "\n", + "FSO=(Msum)/Mo;\n", + "if FSO>2 :\n", + " print \"safe in overturning with FS=\",round(FSO,2)\n", + "\n", + "#for sliding\n", + "phi2=20*math.pi/180;\n", + "V=Vsum\n", + "B=10.3; # in ft\n", + "c2=1.0; # in lb/ft^2\n", + "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n", + "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", + "e=B/2.0-(Msum-Mo)/V;\n", + "qtoe=V/B*(1+6*e/B); # in kip/ft**2\n", + "print round(qtoe,2),\" is soil pressure at toe in kip/ft**2\"\n", + "qheel=V/B*(1-6*e/B); # in kip/ft**2\n", + "print round(qheel,2),\" is soil pressure at heel in kip/ft**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AreaNo \t Weight(kip/ft) \t Moment Arm(ft) \t Moment (kip-ft/ft)\n", + "\n", + "1.0 \t\t 0.9 \t \t \t 1.783 \t \t \t 1.6047 \n", + "\n", + "2.0 \t\t 3.38 \t \t \t 2.8 \t \t \t 9.45 \n", + "\n", + "3.0 \t\t 5.91 \t \t \t 5.3 \t \t \t 31.3018 \n", + "\n", + "4.0 \t\t 3.86 \t \t \t 5.15 \t \t \t 19.89445 \n", + "\n", + "5.0 \t\t 4.76 \t \t \t 7.05 \t \t \t 33.5862 \n", + "\n", + "6.0 \t\t 2.72 \t \t \t 9.55 \t \t \t 26.00465 \n", + "\n", + "safe in overturning with FS= 3.38\n", + "safe in sliding with FS= 1.94 \n", + "\n", + "3.51 is soil pressure at toe in kip/ft**2\n", + "0.67 is soil pressure at heel in kip/ft**2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.4:Pg-372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.4\n", + "\n", + "import math\n", + "import numpy\n", + "Msum=0;#sum of moment\n", + "Vsum=0;#sum of force\n", + "H=5+1.5;#Hdash in m\n", + "phi=32*math.pi/180 # angle in degree\n", + "Gamma=18.5; # in KN/m^3\n", + "Ka=0.424;\n", + "Pa=1/2.0*Gamma*H**2*Ka; # in KN/m\n", + "Ph=Pa*math.cos(15*math.pi/180+2/3.0*phi); # in KN/m\n", + "Mo=Ph*H/3.0; # moment\n", + "AN=[1,2,3,4,5];#area number\n", + "A=[4.36, 3.42, 0.77, 2.8, 2.8];#area\n", + "W=[102.81, 80.64, 18.16, 66.02, 93.14];#weight\n", + "MA=[2.18, 1.37, 0.98, 1.75, 2.83];#moment arm\n", + "print \"AreaNo \\t Area(m**2) \\t Weight(kN/m) \\t Moment Arm(m) \\t Moment (kN-m/m)\\n\"\n", + "M= numpy.zeros(5)\n", + "for i in range(0,5):\n", + " M[i]=W[i]*MA[i];\n", + " Vsum=Vsum+W[i];\n", + " Msum=Msum+M[i];\n", + " print round(AN[i],2),\"\\t\\t \",round(A[i],2),\" \\t \\t\",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n", + "\n", + "FSO=Msum/Mo;\n", + "if FSO>2 :\n", + " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n", + "\n", + "#for sliding\n", + "phi2=24*math.pi/180;\n", + "V=Vsum\n", + "B=3.5; # in m\n", + "c2=30; # in KN/m^2\n", + "Pp=1/2.0*2.37*18*1.5**2+2*30*1.54*1.5;\n", + "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2+Pp)/Ph;\n", + "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n", + "print \"if Pp is ignored then FS=1.37\"\n", + "e=B/2.0-(Msum-Mo)/V;\n", + "qtoe=V/B*(1+6*e/B); # in kN/m**2\n", + "print round(qtoe,2),\"soil pressure at toe in kN/m**2\"\n", + "qheel=V/B*(1-6*e/B); # in kN/m**2\n", + "print round(qheel,2),\"soil pressure at heel in kN/m**2\"\n", + "print \"there is difference in answer due to rounding off error\"\n", + "\n", + "# there is difference in answer due to rounding off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AreaNo \t Area(m**2) \t Weight(kN/m) \t Moment Arm(m) \t Moment (kN-m/m)\n", + "\n", + "1.0 \t\t 4.36 \t \t102.81 \t \t \t 2.18 \t \t \t 224.1258 \n", + "\n", + "2.0 \t\t 3.42 \t \t80.64 \t \t \t 1.37 \t \t \t 110.4768 \n", + "\n", + "3.0 \t\t 0.77 \t \t18.16 \t \t \t 0.98 \t \t \t 17.7968 \n", + "\n", + "4.0 \t\t 2.8 \t \t66.02 \t \t \t 1.75 \t \t \t 115.535 \n", + "\n", + "5.0 \t\t 2.8 \t \t93.14 \t \t \t 2.83 \t \t \t 263.5862 \n", + "\n", + "safe in overturning with FS= 2.53 \n", + "\n", + "safe in sliding with FS= 2.7 \n", + "\n", + "if Pp is ignored then FS=1.37\n", + "195.67 soil pressure at toe in kN/m**2\n", + "10.48 soil pressure at heel in kN/m**2\n", + "there is difference in answer due to rounding off error\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.6:Pg-393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.6\n", + "import math\n", + "Sv=2; # in ft\n", + "Sh=3; # in ft\n", + "w=3/12.0; # in inch\n", + "fy=35000*144;\n", + "FSb=3;\n", + "pi=math.pi;\n", + "phi=36*pi/180;\n", + "Gamma1=105; # in lb/ft^3\n", + "H=30;\n", + "t=Gamma1*H*Sv*Sh*FSb/w/fy*(math.tan(pi/4-phi/2))**2;\n", + "t=t*12; #in inch\n", + "print round(t,2),\" is thickness in inches\"\n", + "t=t+0.001*50;\n", + "print \"so take thickness=0.2 inches\"\n", + "#for tie length\n", + "z=[5,10,15,20,25,30];\n", + "TL=[38.45, 35.89, 33.34, 30.79, 28.25, 25.7];#tie length\n", + "print \"z(ft)\\t Tie Length (ft)\\n\"\n", + "for i in range(0,6):\n", + " print z[i],\"\\t\",TL[i]\n", + "\n", + "print \"use tie length=40ft\"\n", + "#check for over turning\n", + "\n", + "z=30/3.0;\n", + "x1=20;\n", + "L=40;\n", + "Ka=0.26;\n", + "Pa=1/2.0*Gamma1*Ka*H**2; # in kip/ft**2\n", + "W1=Gamma1*H*L;\n", + "FSO=W1*x1/(Pa*z);\n", + "print round(FSO,2),\" is factor of safety is\" \n", + "print \"since FS>3 structure is safe\"\n", + "#check for sliding\n", + "k=2/3.0;\n", + "Pa=12285; # in kip/ft**2\n", + "FSS=W1*math.tan(k*phi)/Pa;\n", + "if FSS>3 :\n", + " print \"safe in sliding with FS=\",round(FSS,2)\n", + "\n", + "#check for bearing\n", + "Mr=126000*20; # in lb-ft/ft\n", + "Mo=12285*10; # in lb-ft/ft\n", + "V=126000;\n", + "e=L/2-Mr/V+Mo/V;\n", + "L1=L-2*e;#Ldash\n", + "c2=1000; # in lb/ft^2\n", + "Nc=25.8;\n", + "Gamma2=110; # in lb/ft^3\n", + "Ny=16.72;\n", + "qult=c2*Nc+1/2.0*Gamma2*L1*Ny\n", + "sigma0=Gamma1*H; # in lb/ft^2\n", + "FSB=qult/sigma0;\n", + "if FSB>5 :\n", + " print \"bearing is safe with FS=\",round(FSB,2)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.14 is thickness in inches\n", + "so take thickness=0.2 inches\n", + "z(ft)\t Tie Length (ft)\n", + "\n", + "5 \t38.45\n", + "10 \t35.89\n", + "15 \t33.34\n", + "20 \t30.79\n", + "25 \t28.25\n", + "30 \t25.7\n", + "use tie length=40ft\n", + "20.51 is factor of safety is\n", + "since FS>3 structure is safe\n", + "safe in sliding with FS= 4.57\n", + "safe in bearing with FS= 19.87\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.7:Pg-397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8.7\n", + "import math\n", + "import numpy\n", + "pi=math.pi;\n", + "phi=36.0*pi/180;\n", + "Ka=(math.tan(pi/4-phi/2))**2;\n", + "z=[8.0, 12.0, 16.0]; # in ft\n", + "sigmaG=80*12.0; # in lb/ft^2\n", + "Gamma1=110.0; # in lb/ft^3\n", + "FS=1.5;\n", + "Sv=numpy.zeros(3)\n", + "for i in range(0,3):\n", + " Sv[i]=sigmaG/Gamma1/z[i]/Ka/FS*12.0;\n", + " print \"for z=\",z[i],\" ft Sv = \",round(Sv[i],2),\" inches\\n\"\n", + "\n", + "z=[16.0,56.0,76.0,96.0,112.0,144.0,176.0];\n", + "zf=numpy.zeros(7)\n", + "k2=numpy.zeros(7)\n", + "L=numpy.zeros(7)\n", + "for i in range(0,7):\n", + " zf[i]=z[i]/12.0;#z in ft\n", + "Sv=[1.67,1.67,1.67,1.67,1.33,1.33,1.33];\n", + "k=[7.48,5.78,4.93,4.08,3.4,2.04,0.68];#0.51(H-z)\n", + "print \"z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \\n\"\n", + "for i in range(0,7):\n", + " k2[i]=0.438*Sv[i];#0.438Sv\n", + " L[i]=k[i]+k2[i];\n", + " print round(z[i],2),\"\\t \\t\",round(zf[i],2),\"\\t \",round(Sv[i],2),\"\\t \\t \",round(k[i],2),\"\\t \\t \\t\",round(k2[i],2),\"\\t \\t \\t \",round(L[i],2)\n", + "\n", + "Sv=20/12.0;\n", + "Ka=0.26;\n", + "FS=1.5;\n", + "l1=Sv*Ka*FS/4/math.tan(2/3.0*phi);\n", + "if l1<3:\n", + " l1=3;\n", + " print l1,\"length in ft\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for z= 8.0 ft Sv = 33.62 inches\n", + "\n", + "for z= 12.0 ft Sv = 22.41 inches\n", + "\n", + "for z= 16.0 ft Sv = 16.81 inches\n", + "\n", + "z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \n", + "\n", + "16.0 \t \t1.33 \t 1.67 \t \t 7.48 \t \t \t0.73 \t \t \t 8.21\n", + "56.0 \t \t4.67 \t 1.67 \t \t 5.78 \t \t \t0.73 \t \t \t 6.51\n", + "76.0 \t \t6.33 \t 1.67 \t \t 4.93 \t \t \t0.73 \t \t \t 5.66\n", + "96.0 \t \t8.0 \t 1.67 \t \t 4.08 \t \t \t0.73 \t \t \t 4.81\n", + "112.0 \t \t9.33 \t 1.33 \t \t 3.4 \t \t \t0.58 \t \t \t 3.98\n", + "144.0 \t \t12.0 \t 1.33 \t \t 2.04 \t \t \t0.58 \t \t \t 2.62\n", + "176.0 \t \t14.67 \t 1.33 \t \t 0.68 \t \t \t0.58 \t \t \t 1.26\n", + "3 length in ft\n" + ] + } + ], + "prompt_number": 79 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter09_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter09_2.ipynb new file mode 100755 index 00000000..7d8bec64 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter09_2.ipynb @@ -0,0 +1,520 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a20958eb0a1cf98629a18a836583d76a2fff705e2f3370294ba37a907bebd17b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter09:Sheet Pile Walls" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.1:Pg-419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.1\n", + "\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "sall=30;#sigma allowed\n", + "pi=math.pi;\n", + "zbar=12.1; # in ft\n", + "L1=10.0; # in ft\n", + "L2=20.0; #in ft\n", + "Gamma=0.12; # in lb/ft^3\n", + "Gamma1=0.1294-0.0624; # in lb/ft^3\n", + "phi=40*pi/180; # angle given\n", + "Ka=(math.tan(pi/4-phi/2))**2;\n", + "Kp=(math.tan(pi/4+phi/2))**2;\n", + "s1=Gamma*L1*Ka;#sigma1 in Kip/ft\n", + "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in Kip/ft\n", + "L3=s2/(Gamma1*(Kp-Ka)); # in ft\n", + "print round(L3,2),\"is length in ft\"\n", + "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;# in Kip/ft\n", + "print round(P,2),\" is force in kip/ft\"\n", + "s5=Gamma*L1*Kp+Gamma1*L2*Kp+Gamma*L3*(Kp-Ka);#sigma5 in Kip/ft\n", + "print round(s5,2),\" is pressure in kip/ft\"\n", + "A1=s5/(Gamma1*(Kp-Ka)); # in ft^2\n", + "A2=8.0*P/(Gamma1*(Kp-Ka)) # in ft^2\n", + "A3=6.0*P*(2.0*zbar*(Gamma1*(Kp-Ka))+s5)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", + "A4=P*(6.0*zbar*s5+4.0*P)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n", + "print \"A1,A2,A3,A4 respectively is \",round(A1,1),round(A2,2),round(A3,2),round(A4,2)\n", + "print \"slight error due to rounding off error\"\n", + "#part(b)\n", + "def f(x):\n", + " return x**4+41.7*x**3-270.5*x**2-13363*x-106863\n", + "[x]=fsolve(f,20);\n", + "D=1.88+x;\n", + "print round(D,2),\" is value of D, in ft\"\n", + "TL=L1+L2+1.3*D;\n", + "print round(TL,2),\" is total length in ft\"\n", + "#partc\n", + "z=math.sqrt(2*P/(Gamma1*(Kp-Ka)));#zdash\n", + "Mmax=P*(z+zbar)-1/2.0*(Gamma1*(Kp-Ka))*z**2*z/3.0;\n", + "S=Mmax*12/sall;\n", + "print round(S,2),\"is section modulus in in^3/ft\"\n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.88 is length in ft\n", + "9.96 is force in kip/ft\n", + "12.67 is pressure in kip/ft\n", + "A1,A2,A3,A4 respectively is 43.2 271.33 13708.16 110880.89\n", + "slight error due to rounding off error\n", + "21.68 is value of D, in ft\n", + "58.19 is total length in ft\n", + "70.06 is section modulus in in^3/ft\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2:Pg-426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.2\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "sall=172.5*1000;#sigma allowed in KN/m^2\n", + "pi=math.pi;\n", + "c=47.0; # in KN/m^2\n", + "zbar=1.78; # in m\n", + "L1=2.0; #in m\n", + "L2=3.0; # in m\n", + "Gamma=15.9; # in KN/m^3\n", + "Gamma1=19.33-9.81; # in KN/m^3\n", + "phi=32*pi/180;\n", + "Ka=(math.tan(pi/4-phi/2))**2;\n", + "Kp=(math.tan(pi/4+phi/2))**2;\n", + "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", + "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", + "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2; # in kN/ft\n", + "print round(P,2),\" is force in kN/m\"\n", + "def f(x):\n", + " return 127.4*x**2-104.4*x-357.15\n", + "[x]=fsolve(f,2);\n", + "D=x;\n", + "print round(D,2),\" is value of D in m\"\n", + "print round(D*1.5,2),\"actual D in m\"\n", + "L4=D*(4*c-(Gamma*L1+Gamma1*L2)-P/D)/4/c;\n", + "print round(L4,2),\" is length in m\"\n", + "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in KN/m^2\n", + "s7=4*c+(Gamma*L1+Gamma1*L2);#sigma7 in KN/m^2\n", + "z=P/s6;#zdash\n", + "Mmax=P*(z+zbar)-1/2.0*s6*z**2; # in KN-m/m\n", + "S=Mmax*12.0/sall; # in m^3/m\n", + "print round(S,4),\" is section modulus in m**3/m\"\n", + "print \"is slight error due to rounding off error\"\n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "52.25 is force in kN/m\n", + "2.13 is value of D in m\n", + "3.2 actual D in m\n", + "1.17 is length in m\n", + "0.0072 is section modulus in m**3/m\n", + "is slight error due to rounding off error\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3:Pg-433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.3\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "\n", + "pi=math.pi;\n", + "zbar=2.23; # in m\n", + "L1=2.0; # in m\n", + "L2=3.0; # in m\n", + "Gamma=15.9; # in KN/m^3\n", + "Gamma1=19.33-9.81; # in KN/m^3\n", + "phi=32*pi/180;\n", + "Ka=(math.tan(pi/4-phi/2))**2;\n", + "Kp=(math.tan(pi/4+phi/2))**2;\n", + "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n", + "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n", + "L3=s2/(Gamma1*(Kp-Ka)); # in m\n", + "print round(L3,2),\"length in m\"\n", + "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;\n", + "print round(P,2),\"force in kN/m\"\n", + "def f(x):\n", + " return x**3+6.99*x**2-14.55\n", + "[x]=fsolve(f,1.4);\n", + "D=L3+x;\n", + "print round(D,2),\"value of D in m\"\n", + "AL=1.4*D;\n", + "print round(AL,2),\"actual length in m\"\n", + "#partb\n", + "L4=1.4;\n", + "F=P-1/2.0*(Gamma1*(Kp-Ka)*L4**2);\n", + "print round(F,2),\"anchor force in kN/m\"\n", + "#partc\n", + "def f(x):\n", + " return x**2+6.682*x-14.44\n", + "[x]=fsolve(f,1.7);\n", + "z=x+2;\n", + "Mmax=-1/2.0*s1*L1*(x+2/3.0)+F*(x+1)-s1*x*x/2-1/2.0*Ka*Gamma1*x**3/3.0;\n", + "print round(Mmax,2),\" is maximum moment in kN-m/m\" \n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.66 length in m\n", + "58.38 force in kN/m\n", + "1.98 value of D in m\n", + "2.78 actual length in m\n", + "30.88 anchor force in kN/m\n", + "43.74 is maximum moment in kN-m/m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4:Pg-439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.4\n", + "\n", + "Gamma=15.9; # in KN/m^3\n", + "Gamma1=19.33-9.81; # in KN/m^3\n", + "GD=0.23; # from fig. 9.16\n", + "CDL1=1.172; # from fig. 9.19\n", + "L1=2; # in m\n", + "L2=3; # in m\n", + "Dth=(L1+L2)*GD*CDL1;\n", + "print round(Dth,2),\"theoritical depth in m\"\n", + "Dac=1.4*Dth;\n", + "print round(Dac,2),\"actual depth in m\"\n", + "print \"approximate it as 2 m\"\n", + "#part(b)\n", + "CFL1=1.073;\n", + "GF=0.07;\n", + "Gammaa=(Gamma*L1**2+Gamma1*L2**2+2*Gamma*L1*L2)/(L1+L2)**2; # in KN/m^3\n", + "F=Gammaa*(L1+L2)**2*GF*CFL1; # in KN/m\n", + "print round(F,2),\"force in kN/m\"\n", + "#part(c)\n", + "GM=0.021; # from fig. 9.18\n", + "CML1=1.036; # from fig. 9.21\n", + "Mmax=Gammaa*(L1+L2)**3*GM*CML1; # in kN-m/m\n", + "print round(Mmax,2),\"maximum moment in kN-m/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.35 theoritical depth in m\n", + "1.89 actual depth in m\n", + "approximate it as 2 m\n", + "25.54 force in kN/m\n", + "36.99 maximum moment in kN-m/m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5:Pg-442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.5\n", + "import math\n", + "import matplotlib.pyplot as plt\n", + "import numpy\n", + "Mmax=43.72; # in kN-m/m\n", + "sp=[\"PSA-31\",\"PSA-23\"];#sheet pile\n", + "H=[7.9,7.9] # in m\n", + "I=[4.41e-6,5.63e-6]; # in m^4/m\n", + "p=[0.00466,0.00365];\n", + "S=[10.8e-5,12.8e-5]; # in m^3/m\n", + "Md=[18.63,22.08]; # kn-m/m\n", + "Logp=numpy.zeros(2)\n", + "k=numpy.zeros(2)\n", + "print \"SheetPile I(m**4/m) H(m) p\\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \\n\"\n", + "for i in range(0,2):\n", + " Logp[i]=math.log10(p[i]);\n", + " k[i]=Md[i]/Mmax;\n", + " print sp[i],\"\\t \",I[i],\" \",H[i],\" \",p[i],\" \",round(Logp[i],2),\" \",S[i],\" \",Md[i],\"\\t \",round(k[i],3)\n", + " \n", + "\n", + "plt.plot(Logp,k);\n", + "plt.title(\"Ex9.5\")\n", + "plt.xlabel(\"LogP\")\n", + "plt.ylabel(\"Md/Mmax\")\n", + "plt.show()\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SheetPile I(m**4/m) H(m) p\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \n", + "\n", + "PSA-31 \t 4.41e-06 7.9 0.00466 -2.33 0.000108 18.63 \t 0.426\n", + "PSA-23 \t 5.63e-06 7.9 0.00365 -2.44 0.000128 22.08 \t 0.505\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.6:Pg-445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.6\n", + "\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "\n", + "pi=math.pi;\n", + "R=0.6;\n", + "L1=10.0; # in ft\n", + "L2=20.0; #in ft\n", + "Gammasat=122.4; # in lb/ft^3\n", + "l1=5; # in ft\n", + "Gamma=110.0; # in lb/ft^3\n", + "C=0.68;\n", + "L=L1+L2; # in ft\n", + "Gammaw=62.4; # in lb/ft^3\n", + "Gamma1=Gammasat-Gammaw;#gammadash in lb/ft^3\n", + "Gammaav=(Gamma*L1+Gamma1*L2)/(L1+L2); # in lb/ft^3\n", + "phi=35.0*pi/180;\n", + "Ka=(math.tan(pi/4-phi/2))**2;\n", + "sa=C*Ka*Gammaav*L;#sigmaa in lb/ft^2\n", + "sp=R*sa;#sigmap # in lb/ft^2\n", + "def f(x):\n", + " return x**2+50*x-1000\n", + "[x]=fsolve(f,15);\n", + "D=x;#in ft\n", + "print round(D,2),\" is depth in ft\"\n", + "R=L/D*(L-2*l1)/(2*L+D-2*l1);\n", + "print \"value of R=\",round(R,2),\" is OK\\n\"\n", + "#partb\n", + "F=sa*(L-R*D); # in lb/ft\n", + "print round(F,2),\" is Force in lb/ft\"\n", + "#partc\n", + "Mmax=0.5*sa*L**2*((1-R*D/L)**2-(2*l1/L)*(1-R*D/L)); # in lb-ft/ft\n", + "print round(Mmax,2),\"maximum moment lb-ft/ft\"\n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "15.31 is depth in ft\n", + "value of R= 0.6 is OK\n", + "\n", + "8821.24 is Force in lb/ft\n", + "47693.02 maximum moment lb-ft/ft\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.7:Pg-451" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.7\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "\n", + "pi=math.pi;\n", + "zbar=3.2; # in m\n", + "c=41; # in KN/m^2\n", + "L1=3; # in m\n", + "L2=6; # in m\n", + "Gamma=17;# in KN/m^3\n", + "Gamma1=20-9.81; # in KN/m^3\n", + "phi=35*pi/180;\n", + "Ka=(math.tan(pi/4-phi/2))**2;\n", + "Kp=(math.tan(pi/4+phi/2))**2;\n", + "s1=Gamma*L1*Ka;#sigma1 in kN/m**2\n", + "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in kN/m**2\n", + "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2;\n", + "print round(P,2),\"Force in kN/m\"\n", + "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in kN/m**2\n", + "print round(s6,2),\"pressure in kN/m**2\"\n", + "def f(x):\n", + " return x**2+15*x-25.43\n", + "[x]=fsolve(f,1.6);\n", + "D=x; # in m\n", + "print round(D,1),\"depth in m\"\n", + "F=P-s6*D; # in kN/m\n", + "print round(F,2),\"force in kN/m\"\n", + "print \"slight error due to rounding off\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "153.36 Force in kN/m\n", + "51.86 pressure in kN/m**2\n", + "1.5 depth in m\n", + "73.61 force in kN/m\n", + "slight error due to rounding off\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.8:pg-458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9.8\n", + "import math\n", + "pi=math.pi;\n", + "Gamma=105.0; # in lb/ft^3\n", + "Cov=14.0;\n", + "B=15/12.0; # in inch\n", + "Ka=0.26;\n", + "phi=35.0*pi/180; # given angle in degree\n", + "H=37.5/12; # in inch\n", + "h=15/12.0; # in inch\n", + "t=6/12.0; # in inch\n", + "Gc=150.0;#gamma concrete in lb/ft^3\n", + "W=H*t*Gc; # in lb/ft\n", + "k=4.5;#kp*cos(delta)\n", + "Pu=1/2.0*Gamma*H**2*(k-Ka*math.cos(phi)); # in lb/ft\n", + "print round(Pu,2),\"force in lb/ft\"\n", + "Pus=((Cov+1)/(Cov+H/h))*Pu; # in lb/ft\n", + "print round(Pus,2),\"force in lb/ft\"\n", + "Be=0.227*(H+h)+B;\n", + "Pu=Pus*Be; # in lb/ft\n", + "print round(Pu,2),\" is resistance of anchor plate in lb/ft\"\n", + "\n", + "# The answers in the book are different due to approximation while here calculations are precise" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2197.94 force in lb/ft\n", + "1998.12 force in lb/ft\n", + "4482.04 is resistance of anchor plate in lb/ft\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter10_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter10_2.ipynb new file mode 100755 index 00000000..3af11efd --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter10_2.ipynb @@ -0,0 +1,211 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:54ddb8c76d55d78e9f237ddb7f5823ac10a3585adf1b3932a3b8cc9352fd8e76" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10:Braced Cuts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1: pg-511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10.1 : \n", + "\n", + "Gamma=18.0;\n", + "H=7.0;\n", + "sigmaa=0.3*Gamma*H;\n", + "print\"maximum pressure intensity in kN/m^2 is\",sigmaa ;\n", + "#partb\n", + "A=54.02;\n", + "B1=1.0/2*1.75*37.8+37.8*1.75-A;\n", + "B2=45.2;\n", + "C=54.02;\n", + "s=3.0; #spacing\n", + "Pa=C*s;\n", + "print \"strut loads in kN is\",Pa\n", + "Pb=(B1+B2)*s;\n", + "print \"strut loads in kN is\",Pb\n", + "Pc=C*s;\n", + "print \"strut loads in kN is\", Pc\n", + "#partc\n", + "Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax\n", + "Sall=170e3;#sigmaall\n", + "S=Me/Sall;\n", + "print \"section modulus in m^3/m is \",round(S,7)\n", + "#partd\n", + "Mmax=(B1+B2)*s**2.0/8;\n", + "S=Mmax/Sall;\n", + "print\"section modulus in m^3/m is\",round(S,6)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum pressure intensity in kN/m^2 is 37.8\n", + "strut loads in kN is 162.06\n", + "strut loads in kN is 271.215\n", + "strut loads in kN is 162.06\n", + "section modulus in m^3/m is 0.000159\n", + "section modulus in m^3/m is 0.000598\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.2:pg-514" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10.2\n", + "\n", + "import math\n", + "phi=35.0;\n", + "Gamma=17.0; # kN/m^3\n", + "s=4; #spacing in m\n", + "H=9;\n", + "Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2\n", + "sigma=0.65*Gamma*Ka*H\n", + "A=sigma*5*5.0/6;\n", + "B1=sigma*5-A;\n", + "C=sigma*4*4/6.0; \n", + "B2=sigma*s-C;\n", + "Pa=A*s;\n", + "Pb=(B1+B2)*s;\n", + "Pc=C*s;\n", + "print \"strut loads at A in kN is\",round(Pa,2)\n", + "\n", + "print \"strut loads at B in kN is\",round(Pb,2)\n", + "\n", + "print \"strut loads at C in kN is\",round(Pc,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strut loads at A in kN is 449.17\n", + "strut loads at B in kN is 233.57\n", + "strut loads at C in kN is 287.47\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3:pg-523" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10.3\n", + "\n", + "import math\n", + "q=0;\n", + "Gamma=17; # in KN/m^3\n", + "B=3.0 # in meter\n", + "L=20; # in meter\n", + "c=30;# in KN/m^3\n", + "T=1.5;# in meter\n", + "H=5.5;# in meter\n", + "B1=B/2;#B'\n", + "B11=T*math.sqrt(2);#B''\n", + "FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety\n", + "print\"factor of safety is\",round(FS,2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "factor of safety is 2.86\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.4:pg-529" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10.4\n", + "\n", + "\n", + "L1=5; # in meter\n", + "L2=4;# in meter\n", + "B=5;# in meter\n", + "h=4.5;# in meter\n", + "icr=1 #\n", + "iexit= 0.54*h/L2\n", + "FOS=icr/iexit # Factor of safety\n", + "print \"The Factory of safety is\",round(FOS,3)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Factory of safety is 1.646\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter11_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter11_2.ipynb new file mode 100755 index 00000000..0afdb4a0 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter11_2.ipynb @@ -0,0 +1,650 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a4054b3d6b79658bcd763c43dc94ca6de4cd49698c12f912e4c83a9a61f47154" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter11:Pile Foundations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.1:Pg-532" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.1\n", + "import math\n", + "\n", + "#parta\n", + "phi=30.0; # angle in degree\n", + "pa=2000.0; \n", + "q=100*50/1000.0;\n", + "Nq=55.0;\n", + "Ap=16*16/16/12; # area in ft^2\n", + "Qp=Ap*q*Nq; # in kip\n", + "qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb\n", + "print round(Qp,2),\"ultimate load in lb\"\n", + "print round(qp/1000,2),\"ultimate load in kip\"\n", + "print \"there is change in answer because of calculation mistake in the book\"\n", + "\n", + "#partb\n", + "Nsigma=36;\n", + "Ap=16*16.0/12.0/12;\n", + "q=110*50.0/1000;\n", + "Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip\n", + "print round(Qp,2),\"ultimate load in kip\"\n", + "#partc\n", + "Nq=18.4;\n", + "Qp=Ap*q*Nq; # in kip\n", + "print round(Qp,2),\"ultimate load in kip\"\n", + "\n", + "# ANSWER IN THE BOOK IS WRONG" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "275.0 ultimate load in lb\n", + "25.4 ultimate load in kip\n", + "there is change in answer because of calculation mistake in the book\n", + "234.67 ultimate load in kip\n", + "179.91 ultimate load in kip\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.2:Pg-533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.2\n", + "\n", + "import math\n", + "#parta\n", + "K=1.3;\n", + "f0=0;\n", + "Delta=0.8*30; # in ft\n", + "D=16.0/12; # in ft\n", + "L1=50.0;\n", + "p=4*16/12.0; # in ft\n", + "Gamma=110/1000.0; # in lb/ft^3\n", + "L=15*D; # in ft\n", + "sigma=Gamma*L; # in kip/ft^2\n", + "f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2\n", + "Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);\n", + "print round(Qs,2),\"ultimate load in kip\"\n", + "#partb\n", + "FS=4; # factor of safety\n", + "Qp=56.45/3+234.7/3+179.9/3; # in kip\n", + "Qu=Qs+Qp; # in kip\n", + "Qall=Qu/FS; # in kip\n", + "print round(Qall,2),\"is allowed load in kip\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "271.65 ultimate load in kip\n", + "107.17 is allowed load in kip\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.3:Pg-534" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.3\n", + "import math\n", + "K=0.25;\n", + "Ap=16*16.0/12/12; # area in ft^2\n", + "phi=30*math.pi/180;\n", + "Nq=25;\n", + "q=110*50.0/1000; # in kip\n", + "sigmao=q/2; # in kip/ft^2\n", + "p=4*16.0/12; # in ft\n", + "L=50; # in ft\n", + "FS=4; # factor of safety\n", + "Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip\n", + "Qall=Qu/FS; # in kip\n", + "print round(Qall,1),\"allowed load in kip\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "81.5 allowed load in kip\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.4:Pg-535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.4\n", + "\n", + "import math\n", + "import numpy\n", + "FS=4; # factor of safety\n", + "Ap=0.1295; # area in m^2\n", + "Nc=9;\n", + "cu2=100;\n", + "Qp=Ap*Nc*cu2; # in kN\n", + "D=[5, 10, 30]; # depth in m\n", + "avgD=[2.5, 7.5,20.0]; # average depth in m\n", + "sigma=[45.0, 110.5, 228.5]; # in KN/m^2\n", + "cu=[30, 30, 100]; # in kN/m^2\n", + "alpha=[0.6, 0.9, 0.725];\n", + "L=[5, 5, 20]; # in m\n", + "p=math.pi*0.406;\n", + "Qs=0; # in kN\n", + "cusig=numpy.zeros(3)\n", + "print round(Qp,2),\"bearing capacity in kN\"\n", + "print \"depth (m)\\t avg Depth(m)\\t avgVerticalStress(kN/m**2)\\t cu(kN/m**2)\\t cu/sigma\\t alpha\\n\"\n", + "for i in range(0,3):\n", + " cusig[i]=cu[i]/sigma[i];\n", + " Qs=Qs+alpha[i]*cu[i]*L[i]*p;\n", + " print round(D[i],2),\"\\t \\t \\t\",round(avgD[i],2),\"\\t \\t\",round(sigma[i],2),\"\\t\\t\\t \",round(cu[i],2),\"\\t \",round(cusig[i],2),\"\\t\\t \",round(alpha[i],2),\"\\n\"\n", + "print round(Qs,2),\"bearing capacity in kN\"\n", + "#part2\n", + "Lambda=0.136;\n", + "L=30;\n", + "fav=Lambda*(178.48+2*76.7);\n", + "Qs2=p*L*fav; # in kN\n", + "#part3\n", + "fav1=13;\n", + "fav2=31.9;\n", + "fav3=93.43;\n", + "Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN\n", + "print round(Qs3,1),\"bearing capacity in kN\"\n", + "Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN\n", + "Qu=Qp+Qsavg # in kN\n", + "Qall=Qu/FS; # in kN\n", + "print round(Qall,1),\"allowed bearing capacity in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "116.55 bearing capacity in kN\n", + "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n", + "\n", + "5.0 \t \t \t2.5 \t \t45.0 \t\t\t 30.0 \t 0.67 \t\t 0.6 \n", + "\n", + "10.0 \t \t \t7.5 \t \t110.5 \t\t\t 30.0 \t 0.27 \t\t 0.9 \n", + "\n", + "30.0 \t \t \t20.0 \t \t228.5 \t\t\t 100.0 \t 0.44 \t\t 0.72 \n", + "\n", + "2136.44 bearing capacity in kN\n", + "2669.7 bearing capacity in kN\n", + "573.6 allowed bearing capacity in kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.5:Pg-538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.5\n", + "\n", + "import numpy\n", + "D=[6, 12, 20]; # depth in m\n", + "fc=[34.34, 54.94, 70.63]; # in kN/m**2\n", + "alpha=[0.84, 0.71, 0.63];\n", + "dL=[6, 6, 8]; # in m\n", + "p=4*0.305;\n", + "Qs=0;\n", + "Q=numpy.zeros(3)\n", + "print \" depth(m)\\t fc(kN/m**2)\\t alpha \\t \\t deltaL(m)\\t Q(kN)\\n\"\n", + "for i in range (0,3):\n", + " Q[i]=alpha[i]*fc[i]*p*dL[i];\n", + " Qs=Q[i]+Qs;\n", + " print D[i],\"\\t\\t \",fc[i],\"\\t \",alpha[i],\"\\t \",dL[i],\"\\t\\t \",round(Q[i],2)\n", + "\n", + "print round(Qs),\"bearing force in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n", + "\n", + "6 \t\t 34.34 \t 0.84 \t 6 \t\t 211.15\n", + "12 \t\t 54.94 \t 0.71 \t 6 \t\t 285.53\n", + "20 \t\t 70.63 \t 0.63 \t 8 \t\t 434.29\n", + "931.0 bearing force in kN\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.6:Pg-545" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.6\n", + "\n", + "import math\n", + "L=21; # in m\n", + "Qwp=502-350; # in kN\n", + "Qws=350; # in kN\n", + "Ap=0.1045; # area in m^2\n", + "Ep=21e6; # in kN/m^2\n", + "epsilon=0.62;\n", + "Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m\n", + "#part2\n", + "Iwp=0.85;\n", + "qwp=152/Ap;\n", + "Es=25e3; # in kN/m^2\n", + "D=0.356; # in m\n", + "mus=0.35;\n", + "Se2=qwp*D/Es*Iwp*(1-mus**2); # in m\n", + "#part3\n", + "p=1.168;\n", + "Iws=2+0.35*math.sqrt(L/D);\n", + "Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m\n", + "Se=Se1+Se2+Se3; # in m\n", + "print round(Se*1000,1),\"settlement in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "19.8 settlement in mm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.7:Pg-560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.7\n", + "\n", + "Ep=207e6; # in kN/m^2\n", + "Ip=123e-6; # in m^4\n", + "nh=12000; # in kN/m^3\n", + "#from table 11.13\n", + "xz=0.008;\n", + "Ax=2.435;\n", + "T=(Ep*Ip/nh)**0.2;\n", + "Qg1=xz*Ep*Ip/Ax/T**3;\n", + "#part2\n", + "Fy=248000;\n", + "d1=0.254;\n", + "Am=0.772;\n", + "Mzmax=Fy*Ip*2/d1; # in Kn-m\n", + "Qg2=Mzmax/Am/T; # in kN\n", + "if Qg2>Qg1 :\n", + " Qg=Qg1;\n", + " print round(Qg,2),\"lateral load in kN\"\n", + "# there is slight variation in answer in textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "53.27 lateral load in kN\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.8:Pg-561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.8\n", + "\n", + "import math\n", + "#part1\n", + "Ep=207e6; # in kN/m^2\n", + "Ip=123e-6; # in m^4\n", + "nh=12000; # in kN/m^3\n", + "#from table 11.1a\n", + "xo=0.008; # in m\n", + "L=25;\n", + "Fy=248000; # yield stress in kN/m^2\n", + "D=0.254;\n", + "Am=0.772;\n", + "Gamma=18.0; # in kN/m^3\n", + "phi=35; # in angle\n", + "Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;\n", + "My=Fy*Ip*2/D; # in kN-m\n", + "Qug=140*Kp*D**3*Gamma; # in kN\n", + "\n", + "#part2\n", + "Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN\n", + "\n", + "if Qug>Qg1:\n", + " Qg=Qg1;\n", + " print round(Qg,2),\"lateral load in kN\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "40.2 lateral load in kN\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.9:Pg-567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.9\n", + "\n", + "import math\n", + "Wrh=30*12; # in kip-ft\n", + "E=0.8;\n", + "Wr=7.5; # in kip\n", + "S=1/8.0; \n", + "C=0.1;\n", + "FS=6; # in factor of safety\n", + "n=0.4; # Coefficient of restitution\n", + "Wp=12/12.0*12/12.0*80*150+550; # in lb\n", + "Wp=Wp/1000.0;\n", + "Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip\n", + "Qall=Qu/FS; # in kip\n", + "print round(Qall),\"allowed bearing capacity in kip\"\n", + "#part2\n", + "He=30*12.0;\n", + "L=80*12.0;\n", + "Ap=12*12.0; # area in in^2\n", + "Ep=3e6/1000.0; # in kip/in^2\n", + "FS=4; # factor of safety\n", + "Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip\n", + "Qall2=Qu/FS; # in kip\n", + "print round(Qall2),\"allowed bearing capacity in kip\"\n", + "\n", + "#partc\n", + "a=27;\n", + "b=1;\n", + "He=30;\n", + "FS=3; # factor of safety\n", + "Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip\n", + "Qall3=Qu/FS; # in kip\n", + "print round(Qall3),\"allowed bearing capacity in kip\"\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "101.0 allowed bearing capacity in kip\n", + "104.0 allowed bearing capacity in kip\n", + "84.0 allowed bearing capacity in kip\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.10:Pg-570" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.10\n", + "\n", + "Hp=350; # in HP\n", + "vp=0.0016; # in m/s\n", + "Sl=0.762e-3; # in m/cycle\n", + "f=115; # in Hz\n", + "Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN\n", + "print round(Qu),\"pile load capacity in kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2928.0 pile load capacity in kN\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.11:Pg-578" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.11\n", + "\n", + "Lg=9.92; # in ft\n", + "Bg=7.0; # in ft\n", + "n1=3.0;\n", + "Nc=8.75;\n", + "n2=4.0/1000;\n", + "Ap=14.0**2.0/12.0**2;\n", + "cup=1775.0;\n", + "a1=0.4;#alpha1\n", + "p=4*14.0/12.0;\n", + "cu1=1050.0; # in lb/ft^2\n", + "L1=15.0;\n", + "a2=0.54;#alpha2\n", + "cu2=1775.0; # in lb/ft^2\n", + "L2=45.0;\n", + "FS=4; # factor of safety\n", + "Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip\n", + "Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip\n", + "print round(Qu2/1000),\"load in kip\"\n", + "Qall=Qu/FS; # in kip\n", + "print round(Qall),\"allowed load in kip\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4314.0 load in kip\n", + "757.0 allowed load in kip\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.12:Pg-583" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11.12\n", + "\n", + "import math\n", + "z1=21/2.0; # in ft\n", + "Lg=9.0; # in ft\n", + "Bg=6.0;# in ft\n", + "Qg=500*1000.0; # in kip\n", + "Cc1=0.3;\n", + "Cc2=0.2;\n", + "Cc3=0.25;\n", + "H2=12;\n", + "H3=6;\n", + "H1=21;\n", + "e1=0.82;\n", + "e2=0.7;\n", + "e3=0.75;\n", + "s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3\n", + "s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3\n", + "s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3\n", + "ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3\n", + "ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3\n", + "ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3\n", + "sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch\n", + "sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch\n", + "sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch\n", + "sc=sc1+sc2+sc3; # in inch\n", + "print round(sc*12,1),\"total settlement in inch\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "9.6 total settlement in inch\n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter12_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter12_2.ipynb new file mode 100755 index 00000000..fcc14387 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter12_2.ipynb @@ -0,0 +1,443 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1439e2e46e40a0d47bd1c7e06a03c417c0e1f55ad415a0af82536f86f7ecfea9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter12:Drilled-Shaft Foundations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.1:Pg-609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.1\n", + "\n", + "import math\n", + "Ap=math.pi/4*1.75**2; # area in m^2\n", + "FS=4; # factor of safety\n", + "Nq=37.75; \n", + "L=8;\n", + "Es=50000.0;\n", + "mus=0.265;\n", + "pu=100.0;\n", + "Db=1.75; # in m\n", + "q=6*16.2+2*19.2;\n", + "phi=36*math.pi/180.0;\n", + "Fqs=1+math.tan(phi);\n", + "Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);\n", + "Ir=Es/(2*(1+mus)*q*math.tan(phi));\n", + "delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;\n", + "Irr=Ir/(1+Ir*delta);\n", + "Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));\n", + "Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);\n", + "Qpall=Qp/FS;\n", + "print round(Qpall,2),\"allowed load in kN\"\n", + "print \"due to rounding off error there is slight change in answer\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6648.7 allowed load in kN\n", + "due to rounding off error there is slight change in answer\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.2:Pg-610" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.2\n", + "import math\n", + "Ap=math.pi/4*1.75**2; # area in m^2\n", + "q=135.6; \n", + "w=0.83;\n", + "FS=4; # factor of safety\n", + "phi=36; # given angle\n", + "Nq=0.21*math.exp(0.17*phi);\n", + "Qp=Ap*q*(w*Nq-1); # in kN\n", + "Qpall=Qp/FS; # in kN\n", + "print round(Qpall),\"allowed load in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6383.0 allowed load in kN\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.3:Pg-611" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.3\n", + "\n", + "import math\n", + "Ap=math.pi/4*1.5**2; # area in m^2\n", + "Db=1.5; # in m\n", + "z=3.0;\n", + "p=math.pi*1;\n", + "Li=6.0;\n", + "N60=30.0;\n", + "sigmazi=16*z;\n", + "Beta=2.0-0.15*z**0.75;\n", + "fi=Beta*sigmazi; # in kN/m^2\n", + "qp=57.5*N60; # in kN/m^2\n", + "qpr=1.27/Db*qp; # in kN/m^2\n", + "Qunet=qpr*Ap+fi*p*Li; # in kN\n", + "print round(Qunet,2),\"allowed load in kN\"\n", + "#part b\n", + "k1=0.315; #from table\n", + "k2=12.0/1.5/1000*100.0;\n", + "Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN\n", + "print round(Qunet2,2),\"allowed load in kN\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4081.11 allowed load in kN\n", + "2013.14 allowed load in kN\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.4:Pg-617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.4\n", + "\n", + "Nc=9;\n", + "Ap=math.pi/4*1.5**2; # area in m^2\n", + "cu=105; # in kN/m^2\n", + "Qpnet=Ap*cu*Nc; # in kN\n", + "print round(Qpnet),\"net ultimate bearing point capacity in kN\"\n", + "#part2\n", + "alpha=0.4;\n", + "Ds=1.5; # in m \n", + "p=math.pi*Ds;\n", + "Qs=alpha*p*(50*8+105*3); # in kN\n", + "print int(Qs),\"skin resistance in kN\"\n", + "#part3\n", + "FS=3; # factor of safety\n", + "Qu=Qpnet/FS+Qs/FS; # in kN\n", + "print round(Qu,2),\"working load in kN\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1670.0 net ultimate bearing point capacity in kN\n", + "1347 skin resistance in kN\n", + "1005.9 working load in kN\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.5:Pg-618" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.5\n", + "\n", + "import math\n", + "cub=3000;\n", + "L=20+5; # in ft\n", + "Db=4; # in ft\n", + "Ap=math.pi/4*Db**2; # area in ft^2\n", + "alpha=0.55;\n", + "cu1=800; # in lb/ft^2\n", + "L1=7; # in ft\n", + "L2=5.5; # in ft\n", + "cu2=1200; # in lb/ft^2\n", + "p=math.pi*2.5;\n", + "k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi\n", + "j1=6*cub*(1+0.2*L/Db);\n", + "j2=9*cub;\n", + "qp=min(j1,j2);\n", + "Qu=k/1000+qp*Ap/1000; # in kip\n", + "print round(Qu),\"allowed load in kip\"\n", + "#part b\n", + "k1=0.57; #from table\n", + "k2=0.89;\n", + "Qunet2=qp*Ap*k1+k*k2; # in kip\n", + "print round(Qunet2/1000,2),\"allowed load in kip\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "392.0 allowed load in kip\n", + "240.3 allowed load in kip\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.6:Pg-621" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.6\n", + "\n", + "import math\n", + "Qws=1005-250; # in kN\n", + "Qwp=250; # in kN\n", + "epsilon=0.65; \n", + "L=11; # in m\n", + "Ds=1.5; # in m\n", + "Es=14000; # in kN/m^2\n", + "Ap=math.pi/4*1.5**2; # area in m^2\n", + "Ep=21e6; # in kN/m^2\n", + "Cp=0.04; # in kN/m^2\n", + "Db=1.5;\n", + "mus=0.3;\n", + "p=math.pi*1.5;\n", + "Nc=9;\n", + "qp=105*Nc; # in kN/m^2\n", + "se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m \n", + "se2=Qwp*Cp/(Db*qp); # in m\n", + "Iws=2+0.35*math.sqrt(L/Ds);\n", + "se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m\n", + "se=se1+se2+se3; # in m\n", + "print round(se*1000,2),\" is net settlement in mm\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "11.46 is net settlement in mm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.7:Pg-628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.7\n", + "\n", + "import math\n", + "import numpy\n", + "from scipy.optimize import fsolve\n", + "Ds=1.0;\n", + "Ep=22e6;\n", + "Ri=1.0;\n", + "cu=100.0;\n", + "Ip=math.pi*Ds**4/64.0;\n", + "Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;\n", + "print round(Qc,2),\"bearing force in kN\"\n", + "Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;\n", + "print round(Mc,2),\"bearing moment in kNm\"\n", + "#from figure\n", + "xoQM=0.0046*1;\n", + "xoMQ=0.0041*1;\n", + "xo=0.5*(xoQM+xoMQ);\n", + "print round(xo*1000,2),\"net ground line deflection in mm\"\n", + "#partb\n", + "Ip=0.049;\n", + "Qg=150.0;\n", + "Mg=200.0;\n", + "def f(T):\n", + " return 338e-6*T**3+300.6e-6*T**2-0.00435\n", + "[x]=fsolve(f,2);\n", + "T=x;\n", + "k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T\n", + "Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];\n", + "Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];\n", + "print \"z/T\\t Am\\t Bm\\t Mz(kN-m)\\n\"\n", + "Mz=numpy.zeros(7)\n", + "for i in range(0,7):\n", + " Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;\n", + " print k[i],\"\\t\",round(Am[i],2),\"\\t\",round(Bm[i],2),\"\\t\",round(Mz[i],2)\n", + "\n", + "print round(1*T,2),\"depth in m\"\n", + "#partc\n", + "Mmax=400;\n", + "sigma=Mmax*Ds/2/Ip;\n", + "print round(sigma,2),\"tensile stress in kN/m**2\"\n", + "#partd\n", + "#from figure\n", + "k=8.5;\n", + "L=k*1;\n", + "print L,\"length in m\"\n", + "\n", + "# the answer is slightly different in textbook due to approximation\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "100615.56 bearing force in kN\n", + "52912.27 bearing moment in kNm\n", + "4.35 net ground line deflection in mm\n", + "z/T\t Am\t Bm\t Mz(kN-m)\n", + "\n", + "0 \t0.0 \t1.0 \t200.0\n", + "0.4 \t0.36 \t0.98 \t308.4\n", + "0.6 \t0.52 \t0.95 \t352.35\n", + "0.8 \t0.63 \t0.9 \t376.69\n", + "1.0 \t0.75 \t0.84 \t403.16\n", + "1.1 \t0.77 \t0.8 \t398.84\n", + "1.25 \t0.75 \t0.73 \t380.16\n", + "2.08 depth in m\n", + "4081.63 tensile stress in kN/m**2\n", + "8.5 length in m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.8:Pg-634" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 12.8\n", + "\n", + "qu=3000; # lb/in^2\n", + "Ds=3*12; #in inch\n", + "L=15*12; # in inch\n", + "FS=3; # factor of safety\n", + "Ecore=0.36e6; # in lb/in^2\n", + "f=min(2.5*qu**0.5,0.15*qu);\n", + "Qu=math.pi*Ds*L*f/1000; # in kip\n", + "Emass=Ecore*(0.266*80-1.66); # in lb/in^2\n", + "Ec=17.9*Emass; # in lb/in^2\n", + "Ac=math.pi/4*Ds**2; # area in in^2\n", + "If=0.35;\n", + "se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;\n", + "Qall=Qu/FS; # in kip\n", + "print round(Qall),\"allowed load in kip\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "929.0 allowed load in kip\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter13_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter13_2.ipynb new file mode 100755 index 00000000..bfb80602 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter13_2.ipynb @@ -0,0 +1,176 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:549425d7a43cc856ebd1610c783821836546fd833bb34512fcafdb71f662b655" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter13:Foundations on Difficult Soils" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.1:Pg-653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 13.1\n", + "\n", + "Sw=1;\n", + "Z=2; # in m\n", + "deltaSf=0.0033*Z*Sw*1000; # in mm\n", + "print deltaSf,\"free surface swell in mm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.6 free surface swell in mm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.2:Pg-13.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 13.2\n", + "\n", + "#from figure 13.11\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy\n", + "deltaS=1/100.0*1/2.0*(0.55+0+0.55+1.2+1.2+2+2+3);\n", + "print deltaS*1000,\"total swell in mm\"\n", + "#partb\n", + "D=numpy.array([5.2, 4.2, 3.2, 2.2, 1.2]);\n", + "deltaS=numpy.array([0, 0.00275, 0.0115, 0.0275, 0.0525]);\n", + "print \"depth(m)\\t total swell (m) \\n\"\n", + "for i in range (0,5):\n", + " print D[i],\"\\t \",deltaS[i],\" \\n\",\n", + "\n", + "plt.plot(deltaS*1000,D);\n", + "plt.title(\"depth vs total swell\")\n", + "plt.xlabel(\"total swell (m)\")\n", + "plt.ylabel(\"depth (m)\")\n", + "plt.show()\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "52.5 total swell in mm\n", + "depth(m)\t total swell (m) \n", + "\n", + "5.2 \t 0.0 \n", + "4.2 \t 0.00275 \n", + "3.2 \t 0.0115 \n", + "2.2 \t 0.0275 \n", + "1.2 \t 0.0525 \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXm8EJ50wcQHHMzAlNnGWjpIKIWl4nfk73\nd9PS0rrmVN1E8+q1btchK72paYaaSaEmznoQs8ABFEVMBXMGzQmkFORz/1jfI9vNGfYZvmdP7+fj\nsR9993ev/f1+1pHO56y1vmstRQRmZma9Kh2AmZlVBycEMzMDnBDMzCzjhGBmZoATgpmZZZwQzMwM\ncEKwHiTpGkk/zOnaYyVdl8e1K0XSsZImV+jen/w8JQ2StESSf1/UOf8Htp4U2atLJBUkvdzCtXtU\nRxNcngkxB56g1ICcEKynqcau26j882xATgiWG0mDJT0u6X1JNwIrlHw+StJ0Se9I+pOkrYs+e1HS\nmZKelvS2pKslLS+pH3AHsJ6k+dm11yX9RbucpGuzc09J2qGVuH4h6ccl526R9K3s+AxJr2TXmSVp\nrxaucTxwJHB6Fsct2fnPS2rK6vSUpAPaKX+mpOezez0t6aAyf7YrSPqNpLeye02VtLakYZKeLCp3\nj6SpRe8nSxqdHa8nabykeZJmS/pmOfe2OhYRfvnV7S9gOeBvwClAb+ArwEfAudnng4G5wI6kv0aP\nBuYAfbPPXwSeBNYH1gAeAn6YfTYUeLnkfmOBfwD7Zdc7H/hzK7HtAbxU9H4NYCGwDvA54CVgneyz\nDYCNW7nOr5rrk73vCzwPnAn0AYYB7wObt1Q+O3dI0b0OBRYA/bP3xwKTW7n3CcCtpCSr7Oe5CrBi\n9nNYM4tnLvAy0C/7bGFW317AY8D3s1g3Al4A9in6eV6XHQ8ClgC9Kv3vyq98X24hWF52BvpExCUR\n8XFEjAceKfr8eOCKiHgkkl8DH2bfg/QX/2UR8WpEvAP8J3BE9llr3R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K0DddsQeL3o/UcR\ncVd2PAP4Z0R8LOkp0mZLzV4veW/WYW4hWL0oTRItLdL1beD1iNgG+CIpQbQqIppbA68C10g6Kvvo\nYdLCYc8CD5ESwi7An7I4ns5aJYMjYpuIKN02tSN1WVR0vAT4KIttCZ/+g07U7lr+ViWcEKwWzQdW\nKXo/GTgs283ss6Rf0FOBBSXlVgXeyI6PJv313ipJGwBvRsSVpFUkBxfd7zRgEmn562Gkv9znk5LE\nZyXtnF2jr6QtO1C3vwHrdqB8s3Wz75p1mruMrOZExN8l/Sl7VHRiNo6wC/AE6a/k0yJinqS3gY+z\nLS9/BfwcGC/paOBOUsL45LIt3KoAnCZpESkJHZ2df4i0leuDEbFE0kvAM1lsH0k6BLhU0mqk/49d\nRNq4vhwPkVovj7USV7RyPIS09LhZp3n5a7MqImlj4KcRsX8Hv9dEWuu+Vnf8sirgLiOzKhIRs4H5\nHZ2YBjzvZGBd5RaCmZkBbiGYmVnGCcHMzAAnBDMzyzghmJkZ4IRgZmYZJwQzMwPg/wDP0conunvE\nNwAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex13.3:Pg-664" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 13.3\n", + "\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "phi=12*math.pi/180;\n", + "Ds=0.8; # in m\n", + "Z=5; # in m \n", + "sigmaT=450;\n", + "U=math.pi*Ds*Z*sigmaT*math.tan(phi); # in kN\n", + "def f(D):\n", + " return 1202-450*6.14/1.25*3.14/4*(D**2-0.8**2)\n", + "[x]=fsolve(f,1);\n", + "Db=x; # in m\n", + "print round(Db,2),\"diameter of bell in m\"\n", + "#partb\n", + "D=600; # in kN\n", + "cu=450; # in kN/m^2\n", + "Nc=6.14;\n", + "FS=cu*Nc*math.pi/4*(Db**2-Ds**2)/(U-D);\n", + "if FS>2 :\n", + " print \"the structure is compatible with safety measures\"\n", + "\n", + "#check bearing capacity\n", + "L=D+300;#dead+live load in kN\n", + "Dp=L/math.pi*4/Db**2;#downward pressure\n", + "FS=2763/Dp; # factor of safety\n", + "if FS>3:\n", + " print \"the structure is safe in bearing \"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.15 diameter of bell in m\n", + "the structure is compatible with safety measures\n", + "the structure is safe in bearing \n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter14_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter14_2.ipynb new file mode 100755 index 00000000..c829bef5 --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter14_2.ipynb @@ -0,0 +1,152 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:23456872c8877381c549ede3a12ff29dc232ffad3142abc24c5d2ad8d9888f99" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter14:Soil Improvement and Ground Modification" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.1:Pg-695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 14.1\n", + "\n", + "import math\n", + "Cc=0.28;\n", + "Hc=6.0;\n", + "eo=0.9;\n", + "Cv=0.36; # in m^2/mo.\n", + "H=3.0; # in m\n", + "t=9.0; # in mo.\n", + "sigmao=210.0;# in kN/m^2\n", + "sigmap=115; #deltasigmap in kN/m^2\n", + "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+sigmap)/sigmao); # in m\n", + "print round(Sc*1000,1),\"primary consolidation in mm\"\n", + "Tv=Cv*t/H**2;\n", + "#from table\n", + "k=1.8; #constant\n", + "sf=k*sigmap; # in kN/m**2\n", + "print round(sf,2),\"deltasigmaf in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "167.7 primary consolidation in mm\n", + "207.0 deltasigmaf in kN/m**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.2:Pg-703" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 14.2\n", + "\n", + "import math\n", + "Tv=0.36;\n", + "sigmap=115; # in kN/m^2\n", + "Uv=math.sqrt(4*Tv/math.pi)*100;\n", + "print round(Uv,2),\"Uv in %\"\n", + "#from table \n", + "k=0.12; #constant\n", + "sf=k*sigmap;\n", + "print sf,\"deltasigmaf in kN/m**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "67.7 Uv in %\n", + "13.8 deltasigmaf in kN/m**2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.3:Pg-704" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 14.3\n", + "\n", + "Cc=0.31;\n", + "Hc=15.0;#ft\n", + "eo=1.1;\n", + "n=10.0;\n", + "Uv=0.09;\n", + "sigmao=1000.0; # in lb/ft^2\n", + "deltasigma=2000.0; # deltasigmap+deltasigmaf\n", + "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+deltasigma)/sigmao);\n", + "print round(Sc,3),\"primary consolidation in ft\"\n", + "m=n**2/(n**2-1)*math.log(n)-(3*n**2-1)/4/n**2;\n", + "A=2/m;\n", + "Ur=(0.096-1/A*(1-math.exp(-A*0.096)))/0.192;\n", + "Uvf=1-(1-Ur)*(1-Uv);\n", + "Sc30=Sc*Uvf*12; #settlement after 30 days\n", + "print round(Sc30,2),\"settlement after 30 days in inch\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.056 primary consolidation in ft\n", + "1.48 settlement after 30 days in inch\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex1.2.png b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex1.2.png new file mode 100755 index 00000000..8346a9de Binary files /dev/null and b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex1.2.png differ diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png new file mode 100755 index 00000000..bc9f319c Binary files /dev/null and b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png differ diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex14.2.png b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex14.2.png new file mode 100755 index 00000000..1a58b738 Binary files /dev/null and b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex14.2.png differ diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png old mode 100644 new mode 100755 diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/README.txt b/Process_Heat_Transfer_by_D._Q._Kern/README.txt old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png old mode 100644 new mode 100755 diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png old mode 100644 new mode 100755 diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb deleted file mode 100755 index 68503d70..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb +++ /dev/null @@ -1,2940 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 10: Functions

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.1, Page number: 320

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#user defined function\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "x = 1\n", - "y = 2\n", - "\n", - "#Function definition\n", - "def add(a,b):\n", - " return a+b\n", - "\n", - "#Function call\n", - "z = add(x,y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"z = %d\"%(z))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "z = 3" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.2, Page number: 321

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call user-defined function at different places.\n", - "\n", - "import sys\n", - "\n", - "#Function definitions\n", - "def y():\n", - " sys.stdout.write(\" Y\")\n", - " return\n", - "\n", - "def a():\n", - " sys.stdout.write(\" A\")\n", - " y()\n", - " return\n", - "\n", - "def b():\n", - " sys.stdout.write(\" B\")\n", - " a()\n", - " return\n", - "\n", - "def c():\n", - " a()\n", - " b()\n", - " sys.stdout.write(\" C\")\n", - " return\n", - "\n", - "def d():\n", - " sys.stdout.write(\" D\")\n", - " c()\n", - " b()\n", - " a()\n", - " return\n", - "\n", - "#Function calls\n", - "y()\n", - "a()\n", - "b()\n", - "c()\n", - "d()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Y A Y B A Y A Y B A Y C D A Y B A Y C B A Y A Y" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.3, Page number: 323

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Using similar variable names in different functions.\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def fun():\n", - " b = 20\n", - " c = 10\n", - " sys.stdout.write(\"\\nIn fun() B = %d C = %d\"%(b,c))\n", - " return\n", - "\n", - "#Variable Initialization\n", - "b = 10\n", - "c = 5\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nIn main() B = %d C = %d\"%(b,c))\n", - "fun()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In main() B = 10 C = 5\n", - "In fun() B = 20 C = 10" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.4, Page number: 323

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Global variables on different functions.\n", - "\n", - "import sys\n", - "\n", - "#Global Variable Initialization\n", - "b = 10\n", - "c = 5\n", - "\n", - "def fun():\n", - " global b \n", - " b += 1\n", - " global c \n", - " c -= 1\n", - " sys.stdout.write(\"\\nIn fun() B = %d C = %d\"%(b,c))\n", - " return\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nIn main() B = %d C = %d\"%(b,c))\n", - "fun()\n", - "b += 1\n", - "c -= 1\n", - "sys.stdout.write(\"\\nAgain In main() B = %d C = %d\"%(b,c))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In main() B = 10 C = 5\n", - "In fun() B = 11 C = 4\n", - "Again In main() B = 12 C = 3" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.5, Page number: 325

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Using return statement in different ways\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def pass1(a):\n", - " if a == 0:\n", - " return;\n", - " else:\n", - " return a*a*a\n", - "\n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter value of x : \"))\n", - "\n", - "#Function call & Result\n", - "if x != 1 or x > 0:\n", - " y = pass1(x)\n", - "\n", - "#There is no switch statement in python, so if..else statement\n", - "if y == 1:\n", - " sys.stdout.write(\"The value returned is %d\"%(y))\n", - "else:\n", - " sys.stdout.write(\"The Cube of %d is : %d\"%(x,y))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value of x : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The Cube of 5 is : 125" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.6, Page number: 327

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display message using user defined function\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def message():\n", - " sys.stdout.write(\"Have a nice day\")\n", - "\n", - "#function call\n", - "message()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Have a nice day" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.7, Page number: 328

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display Alphabets 'A','B' and 'C' using functions\n", - "\n", - "import sys\n", - "\n", - "#Functions definitions\n", - "def a():\n", - " sys.stdout.write(\"\\nA\")\n", - " \n", - "def b():\n", - " sys.stdout.write(\" B\")\n", - " \n", - "def c():\n", - " sys.stdout.write(\" C\")\n", - " \n", - "#Function call\n", - "a()\n", - "b()\n", - "c()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "A B C" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.8, Page number: 329

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Send value to user defined function and display results\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def dat(x,y,z):\n", - " sys.stdout.write(\"Date = %d/%d/%d\"%(x,y,z))\n", - " \n", - "#Variable Initialization\n", - "d = int(raw_input(\"Enter date dd/mm/yy\"))\n", - "m = int(raw_input(\"Enter date dd/mm/yy\"))\n", - "y = int(raw_input(\"Enter date dd/mm/yy\"))\n", - "\n", - "#function call & Result\n", - "dat(d,m,y)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter date dd/mm/yy12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter date dd/mm/yy12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter date dd/mm/yy2001\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Date = 12/12/2001" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.9, Page number: 330

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Square of number using user defined function\n", - "\n", - "import sys\n", - "\n", - "#function definition\n", - "def sqr(k):\n", - " sys.stdout.write(\"\\n%d\"%(k*k))\n", - " \n", - "#Variable Initialization\n", - "j = 0\n", - "\n", - "#Function call & Result\n", - "for j in range(1,5):\n", - " sqr(j)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "1\n", - "4\n", - "9\n", - "16" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.10, Page number: 330

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pass the value to main() function\n", - "\n", - "import sys\n", - "\n", - "#There is no main function in python\n", - "sys.stdout.write(\"\\nNumber of command line arguments J = %d\"%(len(sys.argv)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Number of command line arguments J = 6" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.11, Page number: 331

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pass and return values to user defined function. \n", - "\n", - "import sys\n", - "\n", - "#Function Definitions\n", - "def dat(x,y,z):\n", - " sys.stdout.write(\"\\nToday = %d/%d/%d\"%(x,y,z))\n", - " x += 1\n", - " return x\n", - "\n", - "#Variable Initialization\n", - "d = int(raw_input(\"Enter Date dd/mm/yy : \"))\n", - "m = int(raw_input(\"Enter Date dd/mm/yy : \"))\n", - "y = int(raw_input(\"Enter Date dd/mm/yy : \"))\n", - "\n", - "#Function call\n", - "t = dat(d,m,y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nTomorrow = %d/%d/%d\"%(t,m,y))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Date dd/mm/yy : 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Date dd/mm/yy : 12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Date dd/mm/yy : 2001\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Today = 12/12/2001\n", - "Tomorrow = 13/12/2001" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.12, Page number: 332

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Send and recieve values to user defined function \n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def sum1(x,y,z):\n", - " return x+y+z\n", - "\n", - "#Variable Initialization\n", - "a = int(raw_input(\"Enter Three Numbers : \"))\n", - "b = int(raw_input(\"Enter Three Numbers : \"))\n", - "c = int(raw_input(\"Enter Three Numbers : \"))\n", - "\n", - "#Function call\n", - "s = sum1(a,b,c)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Sum = %d\"%(s))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum = 16" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.13, Page number: 333

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Recieve values from user defined function without passing any \n", - "#value through main().\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def sum1():\n", - " x = int(raw_input(\"Enter Three Numbers : \"))\n", - " y = int(raw_input(\"Enter Three Numbers : \"))\n", - " z = int(raw_input(\"Enter Three Numbers : \"))\n", - " return x+y+z\n", - "\n", - "#Function call\n", - "s = sum1()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Sum = %d\"%(s))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum = 12" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.14, Page number: 333

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Return value in the form of address.\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def sum1():\n", - " x = int(raw_input(\"Enter Three Values : \"))\n", - " y = int(raw_input(\"Enter Three Values : \"))\n", - " z = int(raw_input(\"Enter Three Values : \"))\n", - " k = x + y + z\n", - " return k\n", - "\n", - "#There is no pointer concept in python\n", - "\n", - "#Function call\n", - "s = sum1()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Sum = %d\"%(s))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Values : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Values : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Values : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sum = 12" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.15, Page number: 334

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call by value\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def change(a,b):\n", - " k = a\n", - " a = b\n", - " b = k\n", - " sys.stdout.write(\"\\nIn Change() X = %d Y = %d\"%(a,b))\n", - " \n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter Values of X & Y : \"))\n", - "y = int(raw_input(\"Enter Values of X & Y : \"))\n", - "\n", - "#Function call\n", - "change(x,y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nIn main() X = %d Y = %d\"%(x,y))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values of X & Y : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values of X & Y : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In Change() X = 4 Y = 5\n", - "In main() X = 5 Y = 4" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.16, Page number: 335

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call by reference \n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def change(a,b):\n", - " k = a\n", - " a = b\n", - " b = k\n", - " sys.stdout.write(\"\\nIn Change() X = %d Y = %d\"%(a,b))\n", - " \n", - "#There is no pointer concept in python\n", - "\n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter Values of X & Y : \"))\n", - "y = int(raw_input(\"Enter Values of X & Y : \"))\n", - "\n", - "#Function call\n", - "change(x,y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nIn main() X = %d Y = %d\"%(y,x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values of X & Y : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values of X & Y : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In Change() X = 4 Y = 5\n", - "In main() X = 4 Y = 5" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.17, Page number: 336

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Return by reference\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def change(a,b):\n", - " c = a + b\n", - " d = a - b\n", - " return c,d\n", - "\n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter Values of X & Y : \"))\n", - "y = int(raw_input(\"Enter Values of X & Y : \"))\n", - "\n", - "#Function call\n", - "add,sub = change(x,y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nAddition : %d\"%(add))\n", - "sys.stdout.write(\"\\nSubtraction : %d\"%(sub))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values of X & Y : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Values of X & Y : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Addition : 9\n", - "Subtraction : 1" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.18, Page number: 337

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call by value and reference\n", - "\n", - "k = 0\n", - "m = 0\n", - "\n", - "#Function Definition\n", - "def other(k,m):\n", - " sys.stdout.write(\"\\nAddress of k & m in other() : %u %u\"%(id(k),id(m)))\n", - " \n", - "#Result\n", - "sys.stdout.write(\"\\nAddress of k & m in main() : %u %u\"%(id(k),id(m)))\n", - "\n", - "#Function call\n", - "other(k,m)\n", - "\n", - "#there is no pointer concept in python and it uses value tagged method in data storage\n", - "#instead of addressing the memory location, values of same variables are tagged together" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Address of k & m in main() : 30922996 30922996\n", - "Address of k & m in other() : 30922996 30922996" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.19, Page number: 338

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#User defined function as an argument to another function.\n", - "\n", - "#Variable Initialization\n", - "y = 2\n", - "\n", - "#Function Definitions\n", - "def double(m):\n", - " return m*2\n", - "\n", - "def square(k):\n", - " return k*k\n", - "\n", - "#Function call\n", - "x = double(square(y))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"x = %d\"%(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "x = 8" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.20, Page number: 338

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Two functions as arguments for another functions\n", - "\n", - "import sys\n", - "\n", - "#Function definitions\n", - "def x(a,b):\n", - " return abs(a-b)\n", - "\n", - "def y():\n", - " y = int(raw_input(\"Enter First Number : \"))\n", - " return y\n", - "\n", - "def z():\n", - " z = int(raw_input(\"Enter Second Number : \"))\n", - " return z\n", - "\n", - "#Function call\n", - "d = x(y(),z())\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nz() - y() = %d\"%(d))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter First Number : 25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Second Number : 50\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "z() - y() = 25" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.21, Page number: 339

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Return only absolute value like abs() function\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def uabs(y):\n", - " if y < 0:\n", - " return y * -1\n", - " else:\n", - " return y\n", - " \n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter a Negative Value : \"))\n", - "\n", - "#Function call\n", - "x = uabs(x)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nX = %d\"%(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Negative Value : -5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "X = 5" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.22, Page number: 340

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Square and cube of an entered number. \n", - "\n", - "import sys\n", - "\n", - "#Function Definitions\n", - "def input1(): #Since input() is a built in function in python, input1() is used\n", - " k = int(raw_input(\"Number : \"))\n", - " return k\n", - "\n", - "def sqr(m):\n", - " sys.stdout.write(\"\\nSquare : %d\"%(m*m))\n", - " return m\n", - "\n", - "def cube(m):\n", - " return m*m*m\n", - "\n", - "#Function call and Result\n", - "sys.stdout.write(\"\\nCube : %d\"%(cube(sqr(input1()))))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number : 2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Square : 4\n", - "Cube : 8" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.23, Page number: 341

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Assign return value of a function to variable.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def input1():\n", - " k = int(raw_input(\"Enter Value of x = \"))\n", - " return k\n", - "\n", - "#Function call\n", - "x = input1()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nx = %d\"%(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Value of x = 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "x = 5" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.24, Page number: 342

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Addition and subtraction of numbers with return value of function.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def input1():\n", - " k = int(raw_input(\"Enter Value of x = \"))\n", - " return k\n", - "\n", - "def sqr(m):\n", - " return pow(m,2)\n", - "\n", - "#Function call\n", - "x = sqr(1 - input1() + 1)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nSquare = %d\"%(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Value of x = 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Square = 9" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.25, Page number: 343

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Multiplication and division of numbers with return value of function.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def input1():\n", - " k = int(raw_input(\"Enter Value of x = \"))\n", - " return k\n", - "\n", - "def sqr(m):\n", - " return pow(m,2)\n", - "\n", - "#Function call\n", - "x = sqr(5 * input1()/2)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nSquare = %d\"%(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Value of x = 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Square = 144" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.26, Page number: 344

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# ++ operator with return value of function\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def input1():\n", - " k = int(raw_input(\"Enter Value of x = \"))\n", - " return k\n", - "\n", - "def sqr(m):\n", - " return pow(m,2)\n", - "\n", - "#Function call\n", - "#There is no ++ operator in python. so += operator is used\n", - "y = input1()\n", - "y += 1\n", - "x = sqr(y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nSquare = %d\"%(x))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Value of x = 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Square = 64" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.27, Page number: 345

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Use mod(%) with function\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def j():\n", - " x = int(raw_input(\"Enter a Number : \"))\n", - " return x\n", - " \n", - "#Function call & Result\n", - "if j() %2 == 0:\n", - " sys.stdout.write(\"\\nNumber is Even.\")\n", - "else:\n", - " sys.stdout.write(\"\\nNumber is Odd.\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Number is Odd." - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.28, Page number: 346

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Conditional operator(?) with function.\n", - "\n", - "import sys\n", - "\n", - "#Function Definitions\n", - "def sqr(x):\n", - " sys.stdout.write(\"Square \")\n", - " return pow(x,2)\n", - "\n", - "def cube(x):\n", - " sys.stdout.write(\"Cube \")\n", - " return pow(x,3)\n", - "\n", - "def y():\n", - " return 10\n", - "\n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter a Number : \"))\n", - "\n", - "#Function call\n", - "z = sqr(x) if x > y() else cube(x)\n", - "\n", - "#Result\n", - "sys.stdout.write(\" = %d\"%(z))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cube = 125" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.29, Page number: 346

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#compare two return values of functions\n", - "\n", - "import sys\n", - "\n", - "#Function Definitions\n", - "def a():\n", - " x = int(raw_input(\"Enter a Number a() : \"))\n", - " return x\n", - "\n", - "def b():\n", - " x = int(raw_input(\"Enter a Number b() : \"))\n", - " return x\n", - "\n", - "#Function call and Result\n", - "if a() == b():\n", - " sys.stdout.write(\"\\nValue of a() & b() are equal\")\n", - "else:\n", - " sys.stdout.write(\"\\nValue of a() & b() are unique\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number a() : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number b() : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value of a() & b() are equal" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.30, Page number: 347

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Evaluate the equation s = sqr(a() + b()) using function\n", - "\n", - "import sys\n", - "\n", - "#Function Definitions\n", - "def a():\n", - " a = int(raw_input(\"Enter value of a : \"))\n", - " return a\n", - "\n", - "def b():\n", - " b = int(raw_input(\"Enter value of b : \"))\n", - " return b\n", - "\n", - "def sqr(x):\n", - " return x*x\n", - "\n", - "#Function call\n", - "s = sqr(a() + b())\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nSquare of Sum = %d\"%(s))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value of a : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value of b : 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Square of Sum = 64" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.31, Page number: 348

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Evaluate the equation y = x^1+x^2..x^n using function\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def b(m):\n", - " m += 1\n", - " #sys.stdout.write(\"%d\"%(m))\n", - " return m\n", - "\n", - "#Variable Initialization\n", - "x = int(raw_input(\"Values of 'x' and 'n' : \"))\n", - "n = int(raw_input(\"Values of 'x' and 'n' : \"))\n", - "y = 0\n", - "z = 1\n", - "m = 0\n", - "\n", - "while(z <= n):\n", - " m = b(m)\n", - " y = y + pow(x,m)\n", - " sys.stdout.write(\"%d + \"%(y))\n", - " z += 1\n", - " \n", - "if z >= n:\n", - " sys.stdout.write(\"\\nValue of y = %d\"%(y))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Values of 'x' and 'n' : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Values of 'x' and 'n' : 3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "3 + 12 + 39 + \n", - "Value of y = 39" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.32, Page number: 350

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call user defined function through if statement\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def a():\n", - " a = int(raw_input(\"Enter value of a :\"))\n", - " return a\n", - "\n", - "#Function call and Result\n", - "if a()%2 == 0:\n", - " sys.stdout.write(\"\\nThe number is even.\")\n", - "else:\n", - " sys.stdout.write(\"\\nThe number is odd.\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter value of a :5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "The number is odd." - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.33, Page number: 351

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call user defined function through switch() statement\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def a():\n", - " c = raw_input(\"Enter Your Choice Square(s), Cube(c), Double(d) : \")\n", - " c = c.lower()\n", - " return c\n", - "\n", - "#Variable Initialization\n", - "x = 5\n", - "\n", - "#There is no switch() statement in python.\n", - "c = a()\n", - "if c == 's':\n", - " sys.stdout.write(\"\\nSquare of %d is %d\"%(x,pow(x,2)))\n", - "else:\n", - " if c == 'c':\n", - " sys.stdout.write(\"\\nCube of %d is %d\"%(x,pow(x,3)))\n", - " else:\n", - " if c == 'd':\n", - " sys.stdout.write(\"\\nDouble of %d is %d\"%(x,x*2))\n", - " else:\n", - " sys.stdout.write(\"\\nUnexpected Choice printed as it is : %d\"%(x))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Your Choice Square(s), Cube(c), Double(d) : D\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Double of 5 is 10" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.34, Page number: 353

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call function through the for loop\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def plus(k):\n", - " if k == 10:\n", - " return 0\n", - " else:\n", - " return k\n", - " \n", - "#Variable Initialization\n", - "m = 1\n", - "\n", - "#Function call & Result\n", - "#in python, for loop iterates through a range of number. so while loop is used instead.\n", - "while plus(m) != 0:\n", - " sys.stdout.write(\"%3d\"%(m))\n", - " m += 1\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1 2 3 4 5 6 7 8 9" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.35, Page number: 354

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call user defined function through while() loop\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def y():\n", - " x = int(raw_input(\"Enter a Number : \"))\n", - " return x\n", - "\n", - "#Function call & Result\n", - "while y() != 0:\n", - " sys.stdout.write(\"Value enter is non-zero\\n\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Value enter is non-zero\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 0\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.36, Page number: 355

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call user defined function through do while() loop\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def y():\n", - " x = int(raw_input(\"Enter a Number : \"))\n", - " return x\n", - "\n", - "#Function call and Result\n", - "#There is no do-while loop in python\n", - "\n", - "while y() != 0:\n", - " sys.stdout.write(\"\\nValue entered is non-zero\\n\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Value entered is non-zero\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 0\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.37, Page number: 356

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Initialize an array using functions.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def c(m):\n", - " n = int(raw_input(\"Enter Number d[%d]\"%(m+1)))\n", - " return n\n", - "\n", - "#Variable Initialization\n", - "d = [c(i) for i in range(0,5)]\n", - "\n", - "sys.stdout.write(\"\\nArray d[] elements are : \")\n", - "for k in range(0,5):\n", - " sys.stdout.write(\"%2d\"%d[k])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Number d[1]4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Number d[2]5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Number d[3]6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Number d[4]7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Number d[5]8\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Array d[] elements are : 4 5 6 7 8" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.38, Page number: 357

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pass array element to the function using call by value method.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def show(m,u):\n", - " sys.stdout.write(\"\\nnum[%d] = %d\"%(m+1,u))\n", - " \n", - "#Variable initialization\n", - "num = [12,13,14,15,16,17,18]\n", - "\n", - "#Function call & Result\n", - "for k in range(0,7):\n", - " show(k,num[k])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "num[1] = 12\n", - "num[2] = 13\n", - "num[3] = 14\n", - "num[4] = 15\n", - "num[5] = 16\n", - "num[6] = 17\n", - "num[7] = 18" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.39, Page number: 358

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pass array element to the function using call by reference\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def show(u):\n", - " m = 0\n", - " sys.stdout.write(\"\\nnum[7] = {\")\n", - " while m != 7:\n", - " #There is no pointer concept in python\n", - " sys.stdout.write(\"%2d,\"%(u[m]))\n", - " m += 1\n", - " sys.stdout.write(\"\\b}\")\n", - " \n", - "#Variable Initialization\n", - "num = [12,13,14,15,16,17,18]\n", - "\n", - "#Function call\n", - "show(num)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "num[7] = {12,13,14,15,16,17,18,\b}" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.40, Page number: 359

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Array elements in reverse order.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def show(u):\n", - " m = 6\n", - " while m != -1:\n", - " sys.stdout.write(\"\\nnum[%d] = %d\"%(m,u[m]))\n", - " m -= 1\n", - " \n", - "#Variable Initialization\n", - "num = [12,13,14,15,16,17,18]\n", - "\n", - "#Function call\n", - "#There is no pointer concept in python\n", - "show(num)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "num[6] = 18\n", - "num[5] = 17\n", - "num[4] = 16\n", - "num[3] = 15\n", - "num[2] = 14\n", - "num[1] = 13\n", - "num[0] = 12" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.41, Page number: 360

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Copy array elements using user defined function.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def cpy(p,m):\n", - " j = 0\n", - " while j != 5:\n", - " m[j] = p[j]\n", - " j += 1\n", - " \n", - "#Variable Initialization\n", - "a1 = [1,2,3,4,5]\n", - "a2 = [0 for i in range(0,5)]\n", - "\n", - "#Function call\n", - "cpy(a1,a2)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Source Target\")\n", - "for h in range(0,5):\n", - " sys.stdout.write(\"\\n%5d\\t%d\"%(a1[h],a2[h]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Source Target\n", - " 1\t1\n", - " 2\t2\n", - " 3\t3\n", - " 4\t4\n", - " 5\t5" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.42, Page number: 361

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read array of other function in main()\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def arry(k):\n", - " b = [1,2,3,4,5]\n", - " return b[k]\n", - "\n", - "#main() function\n", - "for k in range(0,5):\n", - " sys.stdout.write(\"\\t%d\"%(arry(k)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\t1\t2\t3\t4\t5" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.43, Page number: 361

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Interchange array elements of two arrays using function.\n", - "\n", - "import sys\n", - "global a\n", - "global b\n", - "\n", - "#Function Definitions\n", - "def read():\n", - " x = int(raw_input(\"\"))\n", - " return x\n", - "\n", - "def change(a,b):\n", - "#Since there is no pointer concept in python, exchange is done in the function using global variables.\n", - " for x in range(0,5):\n", - " a[x] = a[x] + b[x]\n", - " b[x] = a[x] - b[x]\n", - " a[x] = a[x] - b[x]\n", - " \n", - "#Variable Initialization\n", - "a = [0 for i in range(0,5)]\n", - "b = [0 for i in range(0,5)]\n", - "\n", - "for x in range(0,10):\n", - " if x < 5:\n", - " a[x] = read()\n", - " else:\n", - " b[x-5] = read()\n", - "\n", - "#Swapping and Result\n", - "sys.stdout.write(\"\\nArray A & B \")\n", - "\n", - "for x in range(0,5):\n", - " sys.stdout.write(\"\\n%7d%8d\"%(a[x],b[x]))\n", - " \n", - "#There is no pointer concept in python.\n", - "change(a,b)\n", - " \n", - "sys.stdout.write(\"\\nNow A & B\")\n", - "for x in range(0,5):\n", - " sys.stdout.write(\"\\n%7d%8d\"%(a[x],b[x]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "9\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "0\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Array A & B \n", - " 1 6\n", - " 2 7\n", - " 3 8\n", - " 4 9\n", - " 5 0\n", - "Now A & B\n", - " 6 1\n", - " 7 2\n", - " 8 3\n", - " 9 4\n", - " 0 5" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.44, Page number: 363

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read array elements declared in different functions using global\n", - "#pointer declaration\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def call(j):\n", - " m = 0\n", - " u = [5,1,6,0,6]\n", - " q = u\n", - " while m != j:\n", - " sys.stdout.write(\"%3d\"%(u[m]))\n", - " m += 1\n", - " sys.stdout.write(\"\\n\")\n", - " \n", - "#Variable Initialization\n", - "m = 0\n", - "k = [3,8,5,2,5]\n", - "q = k\n", - "\n", - "\n", - "\n", - "#Result\n", - "while m != 5:\n", - " sys.stdout.write(\"%3d\"%(q[m]))\n", - " m += 1\n", - "\n", - "sys.stdout.write(\"\\n\")\n", - "call(5)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 3 8 5 2 5\n", - " 5 1 6 0 6\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.45, Page number: 364

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Sum of 1 to 5 numbers using recursion\n", - "\n", - "import sys\n", - "global s\n", - "\n", - "s = 0\n", - "#Function definition\n", - "def main(x,s):\n", - " s = s + x\n", - " sys.stdout.write(\"\\nx = %d s = %d\"%(x,s))\n", - " if x == 5:\n", - " return\n", - " x += 1\n", - " main(x,s)\n", - " \n", - "main(1,s)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "x = 1 s = 1\n", - "x = 2 s = 3\n", - "x = 3 s = 6\n", - "x = 4 s = 10\n", - "x = 5 s = 15" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.46, Page number: 365

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Calculate triangular number of a given number with recursion function method\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def tri_num(m):\n", - " f = 0\n", - " if m == 0:\n", - " return f\n", - " else:\n", - " f = f + m + tri_num(m-1)\n", - " return f\n", - "\n", - "#Variable Initialization\n", - "n = int(raw_input(\"Enter a Number : \"))\n", - "\n", - "#Function call\n", - "t = tri_num(n)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nTriangular number of %d is %d\"%(n,t))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Triangular number of 5 is 15" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.47, Page number: 366

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the given string using recursion\n", - "\n", - "import sys\n", - "import os\n", - "global x\n", - "\n", - "#Variable Initialization\n", - "x = 0\n", - "str1 = \"Have a Good Day\"\n", - "\n", - "#Function Definition\n", - "def main(x):\n", - " if x == len(str1): #There is no null terminating character in python string\n", - " return\n", - " else:\n", - " if str1[x] == 'H':\n", - " os.system('cls')\n", - " sys.stdout.write(\"%c\"%(str1[x]))\n", - " else:\n", - " sys.stdout.write(\"%c\"%(str1[x]))\n", - " x += 1\n", - " main(x)\n", - " \n", - "#Function call\n", - "main(x)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Have a Good Day" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.48, Page number: 367

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the given string 10 times using recursion\n", - "\n", - "import sys\n", - "import os\n", - "\n", - "#Function definition\n", - "def main(x):\n", - " sys.stdout.write(\"\\n%.2d] %s\"%(x,str1))\n", - " x += 1\n", - " if x == 11:\n", - " return\n", - " else:\n", - " if x == 1:\n", - " os.system('cls')\n", - " main(x)\n", - " else:\n", - " main(x)\n", - " \n", - " \n", - "#Variable Initialization\n", - "x = 0\n", - "str1 = \"Have a Good Day\"\n", - "\n", - "#Function call\n", - "main(x)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "00] Have a Good Day\n", - "01] Have a Good Day" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "02] Have a Good Day\n", - "03] Have a Good Day\n", - "04] Have a Good Day\n", - "05] Have a Good Day\n", - "06] Have a Good Day\n", - "07] Have a Good Day\n", - "08] Have a Good Day\n", - "09] Have a Good Day\n", - "10] Have a Good Day" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.49, Page number: 368

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Factorial using recursive function.\n", - "\n", - "import sys\n", - "\n", - "#Function Definition\n", - "def fact(m):\n", - " f = 1\n", - " if m == 1:\n", - " return 1\n", - " else:\n", - " f = m * fact(m-1)\n", - " return f\n", - " \n", - "#Variable Initialization\n", - "x = int(raw_input(\"Enter a Number : \"))\n", - "\n", - "#Function call\n", - "f = fact (x)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nFactorial of %d is %d\"%(x,f))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a Number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Factorial of 5 is 120" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.50, Page number: 369

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display address of user defined function\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def show():\n", - " sys.stdout.write(\"\\nAddress of function show() is : \")\n", - " \n", - "#Function call\n", - "show()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"%u\"%(id(show)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Address of function show() is : 95041520" - ] - } - ], - "prompt_number": 54 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.51, Page number: 369

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call function using pointer\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def show():\n", - " sys.stdout.write(\"\\nAddress of function show() is : \")\n", - " \n", - "#There is no pointer concept in python\n", - "p = id(show)\n", - "show()\n", - "sys.stdout.write(\"%u\"%(id(show)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Address of function show() is : 95041200" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.52, Page number: 370

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the address of library function.\n", - "\n", - "import sys\n", - "import os\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nAddress of printf() is %u\"%(id(sys.stdout.write)))\n", - "sys.stdout.write(\"\\nAddress of scanf() is %u\"%(id(sys.stdout.read)))\n", - "sys.stdout.write(\"\\nAddress of clrscr() is %u\"%(id(os.system('cls'))))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Address of printf() is 60743848\n", - "Address of scanf() is 60743848\n", - "Address of clrscr() is 4774132" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 10.53, Page number: 371

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Call main() using pointer to main() function\n", - "\n", - "import sys\n", - "\n", - "#Variable Initilization\n", - "x = 0\n", - "\n", - "#Function definition\n", - "def main(x):\n", - " p = id(main)\n", - " x += 1\n", - " sys.stdout.write(\"\\nCall %d Address of main() %u\"%(x,id(main)))\n", - " if x == 3:\n", - " return\n", - " main(x)\n", - " \n", - "#function call\n", - "main(x)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Call 1 Address of main() 95040880\n", - "Call 2 Address of main() 95040880\n", - "Call 3 Address of main() 95040880" - ] - } - ], - "prompt_number": 59 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb deleted file mode 100755 index c8fac375..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb +++ /dev/null @@ -1,446 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 11: Storage Class

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.1, Page number: 376

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Working of auto variable\n", - "\n", - "import sys\n", - "\n", - "#Functio definitions\n", - "def call1():\n", - " v = 20\n", - " sys.stdout.write(\"\\nV = %d\"%(v))\n", - " \n", - "def call2():\n", - " v = 30\n", - " call1()\n", - " sys.stdout.write(\"\\nV = %d\"%(v))\n", - " \n", - "#Variable Initialization\n", - "v = 10\n", - "\n", - "#Function call\n", - "call2()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nV = %d\"%(v))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "V = 20\n", - "V = 30\n", - "V = 10" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.2, Page number: 376

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Working of auto variables in different blocks\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "x = 10\n", - "\n", - "sys.stdout.write(\"\\nX = %d\"%(x))\n", - "\n", - "x = 20\n", - "sys.stdout.write(\"\\nX = %d\"%(x))\n", - "\n", - "x = 10\n", - "sys.stdout.write(\"\\nX = %d\"%(x))\n", - "\n", - "#In python, block of statements are indicated using intendation.\n", - "#block of statements can be written for conditional,loop or function statements" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "X = 10\n", - "X = 20\n", - "X = 10" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.3, Page number: 377

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Use same variable in different blocks with different data types\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization & Result\n", - "x = 10\n", - "sys.stdout.write(\"\\nX = %d\"%(x))\n", - "\n", - "x = 2.22\n", - "sys.stdout.write(\"\\nX = %g\"%(x))\n", - "\n", - "x = \"Auto Storage Class\"\n", - "sys.stdout.write(\"\\nX = %s\"%(x))\n", - "\n", - "x = 10\n", - "sys.stdout.write(\"\\nX = %d\"%(x))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "X = 10\n", - "X = 2.22\n", - "X = Auto Storage Class\n", - "X = 10" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.4, Page number: 378

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Working of external variables\n", - "\n", - "import sys\n", - "\n", - "#Function definitions\n", - "def call1():\n", - " sys.stdout.write(\"\\nIn Call1() V = %d\"%(v))\n", - " \n", - "def call2():\n", - " sys.stdout.write(\"\\nIn call2() V = %d\"%(v))\n", - " \n", - "#Variable Initialization\n", - "global v\n", - "v = 10\n", - "\n", - "call1()\n", - "call2()\n", - "sys.stdout.write(\"\\nIn main() V = %d\"%(v))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In Call1() V = 10\n", - "In call2() V = 10\n", - "In main() V = 10" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.5, Page number: 379

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Working of auto and global variables with same name\n", - "\n", - "import sys\n", - "\n", - "#Function definitions\n", - "def call1():\n", - " v = 20\n", - " sys.stdout.write(\"\\nIn Call1() V = %d\"%(v))\n", - " \n", - "def call2():\n", - " sys.stdout.write(\"\\nIn call2() V = %d\"%(v))\n", - " \n", - "#Variable Initialization\n", - "global v\n", - "v = 10\n", - "\n", - "#Function call\n", - "call1()\n", - "call2()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nIn main() V = %d\"%(v))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "In Call1() V = 20\n", - "In call2() V = 10\n", - "In main() V = 10" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.6, Page number: 380

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Declare external variables using extern keyword\n", - "\n", - "#Variable Initialization\n", - "global m\n", - "m = 10\n", - "\n", - "#There is no extern keyword in python, global is used instead\n", - "sys.stdout.write(\"\\nM = %d\"%(m))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "M = 10" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.7, Page number: 380

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Use of static variable\n", - "\n", - "import sys\n", - "\n", - "#Function definition\n", - "def print1(m):\n", - " sys.stdout.write(\"\\nm = %d\"%(m))\n", - " if m == 3:\n", - " return\n", - " \n", - "m = 0\n", - "\n", - "for i in range(0,3):\n", - " m += 1\n", - " print1(m)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "m = 1\n", - "m = 2\n", - "m = 3" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.8, Page number: 381

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Difference between variables of auto and static class\n", - "\n", - "import sys\n", - "\n", - "#Result\n", - "y = 0\n", - "sys.stdout.write(\"\\nx = %d & y = %d\"%(x,y))\n", - "\n", - "#Since x display the junk value which stored already, it differs in different systems" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "x = 10 & y = 0" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.9, Page number: 382

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Register class variable\n", - "\n", - "import sys\n", - "\n", - "#There is no register keyword in python\n", - "m = 1\n", - "\n", - "#Result\n", - "for m in range(1,5+1):\n", - " sys.stdout.write(\"\\t%d\"%(m))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\t1\t2\t3\t4\t5" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 11.10, Page number: 382

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Register class variable\n", - "\n", - "import sys\n", - "\n", - "#There is no register class variable in python\n", - "m = 1\n", - "\n", - "for m in range(1,6):\n", - " sys.stdout.write(\"\\t%d\"%(m))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\t1\t2\t3\t4\t5" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb deleted file mode 100755 index e1acaa2c..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb +++ /dev/null @@ -1,849 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 12: Preprocessor Directives

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.1, Page number: 386

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Area of circle\n", - "\n", - "import sys\n", - "\n", - "#Defining the macro\n", - "#There is no macro definitions/preprocessors in python\n", - "PI = 3.14\n", - "\n", - "#Variable Initialization\n", - "r = float(raw_input(\"Enter radius of circle in cms.\"))\n", - "\n", - "#Calculation\n", - "area = PI * r * r\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Area of a Circle = %.2f cm2\"%(area))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter radius of circle in cms.7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Area of a Circle = 153.86 cm2" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.2, Page number: 387

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Identifers for 'c' statements and variables\n", - "\n", - "import sys\n", - "import os\n", - "\n", - "#Macro definitions\n", - "#in python, function definitions are used instead of macros\n", - "def N():\n", - " return 10\n", - "\n", - "def cls():\n", - " os.system('cls')\n", - " \n", - "def wait():\n", - " t = raw_input(\"\")\n", - " \n", - "def display(s):\n", - " sys.stdout.write(s)\n", - "\n", - "for k in range(1,N()+1):\n", - " display(\"%d\\t\"%(k))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\t2\t3\t4\t5\t6\t7\t8\t9\t10\t" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.3, Page number: 387

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Macros for logical operators\n", - "\n", - "import sys\n", - "\n", - "#Macro definitions\n", - "#in python, function definitions are used as macros\n", - "\n", - "#There is no preprocessors in python\n", - "\n", - "#Variable Initialization\n", - "a = int(raw_input(\"Enter Three Numbers : \"))\n", - "b = int(raw_input(\"Enter Three Numbers : \"))\n", - "c = int(raw_input(\"Enter Three Numbers : \"))\n", - "\n", - "if a > b and a > c:\n", - " sys.stdout.write(\"%d is the larger number\"%(a))\n", - "else:\n", - " if b > a and b > c:\n", - " sys.stdout.write(\"%d is the larger number\"%(b))\n", - " else:\n", - " if c > a and c > b:\n", - " sys.stdout.write(\"%d is the larger number\"%(c))\n", - " else:\n", - " if a == b and b == c:\n", - " sys.stdout.write(\"\\nNumbers are same.\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Three Numbers : 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "7 is the larger number" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.4, Page number: 388

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Identifier for displaying double and triple of a number.\n", - "\n", - "#Macro definitions\n", - "#Function definitions are used as macros in python\n", - "\n", - "def DOUBLE(a):\n", - " return a*2\n", - "\n", - "def TRIPLE(a):\n", - " return a*3\n", - "\n", - "#Variable initialization\n", - "a = 1\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nSINGLE\\tDOUBLE\\tTRIPLE\")\n", - "\n", - "for a in range(1,5+1):\n", - " sys.stdout.write(\"\\n%d\\t%d\\t%d\"%(a,DOUBLE(a),TRIPLE(a)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "SINGLE\tDOUBLE\tTRIPLE\n", - "1\t2\t3\n", - "2\t4\t6\n", - "3\t6\t9\n", - "4\t8\t12\n", - "5\t10\t15" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.5, Page number: 389

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Undefine a macro\n", - "\n", - "#There is no preprocessor directives in python\n", - "\n", - "def wait():\n", - " return (raw_input(\"\"))\n", - "\n", - "#Result\n", - "for k in range(1,5+1):\n", - " sys.stdout.write(\"%d\\t\"%(k))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1\t2\t3\t4\t5\t" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.6, Page number: 389

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Stringizing operation\n", - "\n", - "#Macro definition\n", - "#in python, function definition can be used as macro\n", - "\n", - "def say(m):\n", - " sys.stdout.write(m)\n", - " \n", - "#Function call\n", - "say(\"Hello\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Hello" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.7, Page number: 390

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Stringizing operation and macro arguments\n", - "\n", - "#There is no macro in python, function definitions can be used as macros\n", - "\n", - "def DOUBLE(x):\n", - " sys.stdout.write(\"Double of m = %d\\n\"%(x*2))\n", - " \n", - "def TRIPLE(x):\n", - " sys.stdout.write(\"Triple of m = %d\\n\"%(x*3))\n", - " \n", - "#Variable Initialization\n", - "m = int(raw_input(\"Enter a number : \"))\n", - "\n", - "#Function call & Result\n", - "DOUBLE(m)\n", - "TRIPLE(m)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a number : 5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Double of m = 10\n", - "Triple of m = 15\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.8, Page number: 390

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Larger of two numbers using macro with arguments.\n", - "\n", - "import sys\n", - "\n", - "#Macro definition //function definition itself is used as macro\n", - "def MAX(x,y):\n", - " if x > y:\n", - " c = x\n", - " else:\n", - " c = y\n", - " return c\n", - "\n", - "#Variable Initialization\n", - "x = 5\n", - "y = 8\n", - "\n", - "#Function call\n", - "c = MAX(x,y)\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nLarger of two numbers = %d\"%(c))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Larger of two numbers = 8" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.9, Page number: 391

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Function defined in \"udf.c\" file.\n", - "\n", - "import sys\n", - "#since ipython notebook does not support this function, function is used\n", - "#in python, the udf.c file can be written and saved in udf.py and import command\n", - "#can be used to include that file in this program\n", - "\n", - "def display():\n", - " sys.stdout.write(\"\\nFunction Called\")\n", - " \n", - "#Function call\n", - "display()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Function Called" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.10, Page number: 392

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Conditional compilation \n", - "\n", - "import sys\n", - "\n", - "#There is no preprocessor directives in python\n", - "\n", - "LINE = 1\n", - "\n", - "if LINE:\n", - " sys.stdout.write(\"This is line number one\")\n", - "else:\n", - " sys.stdout.write(\"This is line number two\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This is line number one" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.11, Page number: 393

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Conditional compilation \n", - "import sys\n", - "\n", - "#There is no preprocessor directives in python\n", - "def E():\n", - " return 1\n", - "\n", - "#Function call\n", - "if E():\n", - " a = 2\n", - " b = 3\n", - " sys.stdout.write(\"A = %d & B = %d\"%(a,b))\n", - "else:\n", - " c = 2\n", - " d = 3\n", - " sys.stdout.write(\"C = %d & D = %d\"%(c,d))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "A = 2 & B = 3" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.12, Page number: 394

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Conditional compilation directives \n", - "\n", - "import sys\n", - "\n", - "#There is no preprocessor directives in python\n", - "T = 8\n", - "\n", - "#Result\n", - "if T == 0:\n", - " sys.stdout.write(\"\\nMacro is not defined.\")\n", - "else:\n", - " sys.stdout.write(\"\\nMacro is defined\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Macro is defined" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.13, Page number: 394

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#User defined error message \n", - "\n", - "import sys\n", - "\n", - "#There is no preprocessor directives in python\n", - "B = 1\n", - "A = 0\n", - "\n", - "#Result\n", - "if A == 0:\n", - " sys.stdout.write(\"MACRO A IS NOT DEFINED.\")\n", - "else:\n", - " sys.stdout.write(\"Macro found.\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "MACRO A IS NOT DEFINED." - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.14, Page number: 397

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Set off certain errors \n", - "\n", - "import sys\n", - "\n", - "#There is no preprocessor directives in python\n", - "x = 2\n", - "y = 1\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\ny = %d\"%(y))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "y = 1" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.15, Page number: 398

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Predefined macros \n", - "\n", - "import sys\n", - "import datetime\n", - "\n", - "#Variable Initialization\n", - "FILE = 'PRE_MA~1.C'\n", - "LINE = 10\n", - "STDC = 1\n", - "\n", - "#Date/time can be set using datetime.date(2001,5,12)\n", - "#Result\n", - "sys.stdout.write(\"\\nDATE : %s\"%('Dec 05 2001')) \n", - "sys.stdout.write(\"\\nTIME : %s\"%(datetime.time(21,7,39)))\n", - "sys.stdout.write(\"\\nFILE NAME : %s\"%(FILE))\n", - "sys.stdout.write(\"\\nLINE NO : %d\"%(LINE))\n", - "sys.stdout.write(\"\\n_STDC_ : %x\"%(STDC))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "DATE : Dec 05 2001\n", - "TIME : 21:07:39\n", - "FILE NAME : PRE_MA~1.C\n", - "LINE NO : 10\n", - "_STDC_ : 1" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.16, Page number: 399

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the name of memory model that is currently in use.\n", - "\n", - "import sys\n", - "\n", - "#There is no formal memory model and preprocessor directives in python\n", - "\n", - "TINY = 0\n", - "SMALL = 0\n", - "MEDIUM = 0\n", - "COMPACT = 0\n", - "LARGE = 1\n", - "HUGE = 0\n", - "\n", - "#Result\n", - "if TINY:\n", - " sys.stdout.write(\"\\nTINY %d\"%(TINY))\n", - "else:\n", - " if SMALL:\n", - " sys.stdout.write(\"\\nSMALL %d\"%(SMALL))\n", - " else:\n", - " if MEDIUM:\n", - " sys.stdout.write(\"\\nMEDIUM %d\"%(MEDIUM))\n", - " else:\n", - " if COMPACT:\n", - " sys.stdout.write(\"\\nCOMPACT %d\"%(COMPACT))\n", - " else:\n", - " if LARGE:\n", - " sys.stdout.write(\"\\nLARGE %d\"%(LARGE))\n", - " else:\n", - " sys.stdout.write(\"\\nHUGE %d\"%(HUGE))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "LARGE 1" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.17, Page number: 400

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Macro expansions\n", - "\n", - "import sys\n", - "\n", - "#There is no preprocessor directives in python\n", - "ch = raw_input(\"Input a Text : \")\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Text Input : %s\"%(ch))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Input a Text : Programming\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Text Input : Programming" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.18, Page number: 401

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Predefined macros.\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "d = raw_input(\"Enter any character : \")\n", - "\n", - "#Result\n", - "f = d.isalpha()\n", - "\n", - "if f != 0:\n", - " sys.stdout.write(\"\\n%c is a letter in\"%(d))\n", - " f = d.isupper()\n", - " if f != 0:\n", - " sys.stdout.write(\" Capital case\")\n", - " else:\n", - " sys.stdout.write(\" Small case\")\n", - "else:\n", - " f = d.isdigit()\n", - " if f != 0:\n", - " sys.stdout.write(\"\\n%c is a digit\"%(d))\n", - " else:\n", - " f = d.ispunct()\n", - " if f != 0:\n", - " sys.stdout.write(\"\\n%c is a punctuation symbol\"%(d))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any character : C\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "C is a letter in Capital case" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb deleted file mode 100755 index f9222003..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb +++ /dev/null @@ -1,2367 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 13: Structure and Union

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.1, Page number: 409

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display size of structure elements\n", - "\n", - "import sys\n", - "\n", - "#Class is used instead of structure in python\n", - "class book1:\n", - " book = ''\n", - " pages = 0\n", - " price = 0.00\n", - "\n", - "#Python variables uses value tagged methods for storing the values\n", - "\n", - "#Class variable declaration\n", - "bk1 = book1()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nSize of Structure Elements\")\n", - "sys.stdout.write(\"\\nBook : %d\"%(sys.getsizeof(bk1.book)))\n", - "sys.stdout.write(\"\\nPages : %d\"%(sys.getsizeof(bk1.pages)))\n", - "sys.stdout.write(\"\\nPrice : %d\"%(sys.getsizeof(bk1.price)))\n", - "sys.stdout.write(\"\\nTotal Bytes : %d\"%(sys.getsizeof(bk1)))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Size of Structure Elements\n", - "Book : 21\n", - "Pages : 12\n", - "Price : 16\n", - "Total Bytes : 36" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.2, Page number: 410

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Define a structure and initialize its member variables\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class book1:\n", - " book = ''\n", - " pages = 0\n", - " price = 0.0\n", - " \n", - "#Class variable declaration and Initialization\n", - "bk1 = book1()\n", - "bk1.book = \"C++\"\n", - "bk1.pages = 300\n", - "bk1.price = 285\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nBook Name : %s\"%(bk1.book))\n", - "sys.stdout.write(\"\\nNo. of Pages : %d\"%(bk1.pages))\n", - "sys.stdout.write(\"\\nBook Price : %d\"%(bk1.price))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Book Name : C++\n", - "No. of Pages : 300\n", - "Book Price : 285" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.3, Page number: 411

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Copy structure elements from one object to another object\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class disk:\n", - " co = ''\n", - " type1 = 0.0\n", - " price = 0\n", - " \n", - "#Class variable declaration\n", - "d1 = disk()\n", - "d2 = disk()\n", - "d3 = disk()\n", - "\n", - "#Class variable initialization\n", - "d1.co = \"SONY\"\n", - "d1.type1 = 1.44\n", - "d1.price = 20\n", - "\n", - "#Copying\n", - "d2.co = d1.co\n", - "d2.type1 = d1.type1\n", - "d2.price = d1.price\n", - "\n", - "d3 = d2\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\n%s %g %d\"%(d1.co,d1.type1,d1.price))\n", - "sys.stdout.write(\"\\n%s %g %d\"%(d2.co,d2.type1,d2.price))\n", - "sys.stdout.write(\"\\n%s %g %d\"%(d3.co,d3.type1,d3.price))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "SONY 1.44 20\n", - "SONY 1.44 20\n", - "SONY 1.44 20" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.4, Page number: 412

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read values and assign them to structure variables\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class book1:\n", - " book = ''\n", - " pages = 0\n", - " price = 0.0\n", - " \n", - "#Class variable declaration\n", - "bk1 = book1()\n", - "\n", - "#Variable initialization\n", - "bk1.book = raw_input(\"Enter Book name,pages,price : \")\n", - "bk1.pages = int(raw_input(\"Enter Book name,pages,price : \"))\n", - "bk1.price = float(raw_input(\"Enter Book name, pages,price : \"))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nBook Name : %s\"%(bk1.book))\n", - "sys.stdout.write(\"\\nNo. of Pages : %d\"%(bk1.pages))\n", - "sys.stdout.write(\"\\nBook Price : %d\"%(bk1.price))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Book name,pages,price : C\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Book name,pages,price : 500\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Book name, pages,price : 450\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Book Name : C\n", - "No. of Pages : 500\n", - "Book Price : 450" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.5, Page number: 414

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read and display car details\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class time:\n", - " second = 0\n", - " minute = 0\n", - " hour = 0\n", - " \n", - "class t:\n", - " carno = 0\n", - " st = time()\n", - " rt = time()\n", - " \n", - "#Class variable declaration\n", - "r1 = t()\n", - "\n", - "#Variable Initialization\n", - "r1.carno = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "r1.st.hour = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "r1.st.minute = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "r1.st.second = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "r1.rt.hour = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "r1.rt.minute = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "r1.rt.second = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nCar No. \\tStarting Time \\tReaching Time\\n\")\n", - "sys.stdout.write(\"%d\\t\"%(r1.carno))\n", - "sys.stdout.write(\"\\t%d:%d:%d\\t\\t\"%(r1.st.hour,r1.st.minute,r1.st.second))\n", - "sys.stdout.write(\"%d:%d:%d\"%(r1.rt.hour,r1.rt.minute,r1.rt.second))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :125\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :50\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :30\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :50\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No., Starting Time, Reaching Time :25\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Car No. \tStarting Time \tReaching Time\n", - "125\t\t2:50:30\t\t3:50:25" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.6, Page number: 415

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read and display the details of a person\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class name:\n", - " first = ''\n", - " second = ''\n", - " last = ''\n", - " \n", - "class b_date:\n", - " day = 0\n", - " month = 0\n", - " year = 0\n", - " \n", - "class data:\n", - " nm = name()\n", - " bt = b_date()\n", - " \n", - "#Class variable declaration\n", - "r1 = data()\n", - "\n", - "#Variable Initialization\n", - "r1.nm.first = raw_input(\"Enter Name (First/Second/Last)\")\n", - "r1.nm.second = raw_input(\"Enter Name (First/Second/Last)\")\n", - "r1.nm.last = raw_input(\"Enter Name (First/Second/Last)\")\n", - "r1.bt.day = int(raw_input(\"Enter Birth Date Day/Month/Year\"))\n", - "r1.bt.month = int(raw_input(\"Enter Birth Date Day/Month/Year\"))\n", - "r1.bt.year = int(raw_input(\"Enter Birth Date Day/Month/Year\"))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Name : %s %s %s\\n\"%(r1.nm.first,r1.nm.second,r1.nm.last))\n", - "sys.stdout.write(\"Birth Date : %d.%d.%d\"%(r1.bt.day,r1.bt.month,r1.bt.year))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name (First/Second/Last)Ram\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name (First/Second/Last)Sham\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name (First/Second/Last)Pande\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Birth Date Day/Month/Year12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Birth Date Day/Month/Year12\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Birth Date Day/Month/Year1980\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name : Ram Sham Pande\n", - "Birth Date : 12.12.1980" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.7, Page number: 416

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Create array of structure objects\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class time:\n", - " second = 0\n", - " minute = 0\n", - " hour = 0\n", - " \n", - "class t:\n", - " carno = 0\n", - " st = time()\n", - " rt = time()\n", - " \n", - "#Class variable declaration\n", - "r1 = [t() for i in range(0,3)]\n", - "\n", - "#Variable Initialization\n", - "for k in range(0,3):\n", - " r1[k].carno = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " r1[k].st.hour = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " r1[k].st.minute = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " r1[k].st.second = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " r1[k].rt.hour = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " r1[k].rt.minute = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " r1[k].rt.second = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n", - " \n", - "#Result\n", - "sys.stdout.write(\"\\nCar No.\\t\\tStarting Time\\tReaching Time\")\n", - "for k in range(0,3):\n", - " sys.stdout.write(\"\\n%d\\t\"%(r1[k].carno))\n", - " sys.stdout.write(\"\\t%d:%d:%d\\t\"%(r1[k].st.hour,r1[k].st.minute,r1[k].st.second))\n", - " sys.stdout.write(\"\\t%d:%d:%d\\t\"%(r1[k].rt.hour,r1[k].rt.minute,r1[k].rt.second))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)120\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)20\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)58\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)121\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)40\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)40\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)122\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)30\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)52\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)40\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)10\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Car No.\t\tStarting Time\tReaching Time\n", - "120\t\t4:30:52\t\t5:40:10\t\n", - "121\t\t4:30:52\t\t5:40:10\t\n", - "122\t\t4:30:52\t\t5:40:10\t" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.8, Page number: 417

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read and display student details\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class stud:\n", - " name = ''\n", - " rollno = 0\n", - " grade = ''\n", - " \n", - "#Class variable declaration\n", - "st = [stud() for i in range(0,3)]\n", - "\n", - "#Variable Initialization\n", - "k = 0 \n", - "while k < 3:\n", - " st[k].name = raw_input(\"Name :\")\n", - " st[k].rollno = int(raw_input(\"Roll No. :\"))\n", - " st[k].grade = raw_input(\"Grade : \")\n", - " k += 1\n", - " \n", - "#Result\n", - "k = 0\n", - "sys.stdout.write(\"\\nName \\tRollno \\tGrade\\n\")\n", - "while k < 3:\n", - " sys.stdout.write(\"\\n%s\\t%d\\t%s\"%(st[k].name,st[k].rollno,st[k].grade))\n", - " k += 1\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name :Suresh\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Roll No. :125\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Grade : A\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name :Mahesh\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Roll No. :126\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Grade : B\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name :Rajesh\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Roll No. :127\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Grade : A\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name \tRollno \tGrade\n", - "\n", - "Suresh\t125\tA\n", - "Mahesh\t126\tB\n", - "Rajesh\t127\tA" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.9, Page number: 419

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pointer to structure \n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class book:\n", - " name = ''\n", - " author = ''\n", - " pages = 0\n", - " \n", - "#Class variable declaration\n", - "b1 = book()\n", - "\n", - "#Variable Initialization\n", - "b1.name = \"JAVA COMPLETE REFERENCE\"\n", - "b1.author = \"P.NAUGHTON\"\n", - "b1.pages = 886\n", - "\n", - "#There is no pointer concept in python\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\n%s by %s of %d pages\"%(b1.name,b1.author,b1.pages))\n", - "sys.stdout.write(\"\\n%s by %s of %d pages\"%(b1.name,b1.author,b1.pages))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "JAVA COMPLETE REFERENCE by P.NAUGHTON of 886 pages\n", - "JAVA COMPLETE REFERENCE by P.NAUGHTON of 886 pages" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.10, Page number: 420

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pointer as members of structure \n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class boy:\n", - " name = ''\n", - " age = 0\n", - " height = 0.0\n", - " \n", - "#Class variable declaration\n", - "sp = boy()\n", - "\n", - "#Variable Initialization\n", - "sp.name = \"Mahesh\"\n", - "sp.age = 20\n", - "sp.height = 5.40\n", - "\n", - "#There is no pointer concept in python\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nName = %s\"%(sp.name))\n", - "sys.stdout.write(\"\\nAge = %s\"%(sp.age))\n", - "sys.stdout.write(\"\\nHeight = %s\"%(sp.height))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name = Mahesh\n", - "Age = 20\n", - "Height = 5.4" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.11, Page number: 421

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pointer as members of structure \n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class boy:\n", - " name = ''\n", - " age = 0\n", - " height = 0.0\n", - " \n", - "#Class variable declaration\n", - "b = boy()\n", - "\n", - "#Variable Initialization\n", - "nm = \"Somesh\"\n", - "ag = 20\n", - "ht = 5.40\n", - "\n", - "#There is no pointer concept in python\n", - "b.name = nm\n", - "b.age = ag\n", - "b.height = ht\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nName : %s\"%(b.name))\n", - "sys.stdout.write(\"\\nAge = %d\"%(b.age))\n", - "sys.stdout.write(\"\\nHeight = %.2g\"%(b.height))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name : Somesh\n", - "Age = 20\n", - "Height = 5.4" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.12, Page number: 422

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the contents of the structure using ordinary pointer\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class num:\n", - " a = 0\n", - " b = 0\n", - " c = 0\n", - "\n", - "#Class variable declaration\n", - "d = num()\n", - "\n", - "#Variable Initialization\n", - "d.a = 2\n", - "d.b = 3\n", - "d.c = 4\n", - "\n", - "#There is no pointer concept in python\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\na = %d\"%(d.a))\n", - "sys.stdout.write(\"\\nb = %d\"%(d.b))\n", - "sys.stdout.write(\"\\nc = %d\"%(d.c))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "a = 2\n", - "b = 3\n", - "c = 4" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.13, Page number: 423

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Passing address of structure variable\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class book:\n", - " name = ''\n", - " author = ''\n", - " pages = 0\n", - " \n", - "#Class variable declaration and initialization\n", - "b1 = book()\n", - "b1.name = \"JAVA COMPLETE REFERENCE\"\n", - "b1.author = \"P.NAUGHTON\"\n", - "b1.pages = 886\n", - "\n", - "#Function definition\n", - "def show(b1):\n", - " sys.stdout.write(\"\\n%s by %s of %d pages\"%(b1.name,b1.author,b1.pages))\n", - "\n", - "#Function call\n", - "show(b1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "JAVA COMPLETE REFERENCE by P.NAUGHTON of 886 pages" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.14, Page number: 424

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Passing structure elements to function\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class boy:\n", - " name = ''\n", - " age = 0\n", - " wt = 0\n", - " \n", - "#Class variable declaration and initialization\n", - "b1 = boy()\n", - "b1.name = \"Amit\"\n", - "b1.age = 20\n", - "b1.wt = 25\n", - "\n", - "#Function definition\n", - "def print1(s,t,n):\n", - " sys.stdout.write(\"\\n%s %d %d\"%(s,t,n))\n", - " \n", - "#Function call\n", - "print1(b1.name,b1.age,b1.wt)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Amit 20 25" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.15, Page number: 425

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Pass entire structure to user defined function\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class boy:\n", - " name = ''\n", - " age = 0\n", - " wt = 0\n", - " \n", - "#Class variable declaration and initialization\n", - "b1 = boy()\n", - "b1.name = \"Amit\"\n", - "b1.age = 20\n", - "b1.wt = 25\n", - "\n", - "#Function definition\n", - "def print1(b):\n", - " sys.stdout.write(\"\\n%s %d %d\"%(b.name,b.age,b1.wt))\n", - " \n", - "#Function call\n", - "print1(b1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Amit 20 25" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.16, Page number: 426

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#User defined data type \n", - "\n", - "import sys\n", - "\n", - "#There is no preprocessor directive in python\n", - "H = 60\n", - "\n", - "#There is no typedef function in python and no separate variable declaration is needed\n", - "hrs = int(raw_input(\"Enter Hours :\"))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nMinutes = %d\"%(hrs*H))\n", - "sys.stdout.write(\"\\nSeconds = %d\"%(hrs*H*H))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Hours :2\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Minutes = 120\n", - "Seconds = 7200" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.17, Page number: 426

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#String data type\n", - "\n", - "import sys\n", - "\n", - "#There is no typedef function in python\n", - "a = \" Hello \"\n", - "b = raw_input(\"Enter Your Name : \")\n", - "\n", - "#Result\n", - "sys.stdout.write(\"%s %s\"%(a,b))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Your Name : KAMAL\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Hello KAMAL" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.18, Page number: 427

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Create user defined data type from structure\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "#There is no typedef function in python\n", - "class struct:\n", - " name = ''\n", - " sex = ''\n", - " acno = 0\n", - " \n", - "#class variable declaration and initialization\n", - "employee = struct()\n", - "employee.name = \"Sanjay\"\n", - "employee.sex = \"M\"\n", - "employee.acno = 125\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nName\\tSex\\tA/c No.\\n\")\n", - "sys.stdout.write(\"%s\\t\"%(employee.name))\n", - "sys.stdout.write(\"%s\\t\"%(employee.sex))\n", - "sys.stdout.write(\"%s\\n\"%(employee.acno))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name\tSex\tA/c No.\n", - "Sanjay\tM\t125\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.19, Page number: 427

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Create user defined data type from structure\n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class struct:\n", - " name = ''\n", - " sex = ''\n", - " acno = 0\n", - " \n", - "#class Variable declaration and initialization\n", - "employee = [struct() for i in range(0,2)]\n", - "\n", - "for k in range(0,2):\n", - " employee[k].name = raw_input(\"Name of the Employee :\")\n", - " employee[k].sex = raw_input(\"Sex\")\n", - " employee[k].acno = raw_input(\"A/c No.\")\n", - " \n", - "#Result\n", - "sys.stdout.write(\"\\nName\\tSex\\tA/c No.\\n\")\n", - "for k in range(0,2):\n", - " sys.stdout.write(\"%s\\t\"%(employee[k].name))\n", - " sys.stdout.write(\"%s\\t\"%(employee[k].sex))\n", - " sys.stdout.write(\"%s\\n\"%(employee[k].acno))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name of the Employee :AJAY\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "SexM\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "A/c No.122\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name of the Employee :ANITA\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "SexF\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "A/c No.124\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name\tSex\tA/c No.\n", - "AJAY\tM\t122\n", - "ANITA\tF\t124\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.20, Page number: 429

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Structure containing the details of the employees\n", - "\n", - "import sys\n", - "\n", - "#There is no typedef function in python\n", - "\n", - "#Class definition\n", - "class struct:\n", - " first = ''\n", - " middle = ''\n", - " last = ''\n", - " city = ''\n", - " pincode = 0\n", - " \n", - "#Class variable declaration and initialization\n", - "person = [struct() for i in range(0,2)]\n", - "\n", - "for j in range(0,2):\n", - " person[j].first = raw_input(\"First Name :\")\n", - " person[j].middle = raw_input(\"Middle Name : \")\n", - " person[j].last = raw_input(\"Last Name : \")\n", - " person[j].city = raw_input(\"City & Pincode\")\n", - " person[j].pincode = int(raw_input(\"City & Pincode\"))\n", - " \n", - "#Result\n", - "for j in range(0,2):\n", - " sys.stdout.write(\"\\nRecord No : %d\"%(j+1))\n", - " sys.stdout.write(\"\\nFirst Name : %s\"%(person[j].first))\n", - " sys.stdout.write(\"\\nMiddle Name : %s\"%(person[j].middle))\n", - " sys.stdout.write(\"\\nLast Name : %s\"%(person[j].last))\n", - " sys.stdout.write(\"\\nCity & Pincode : %s - %d\\n\"%(person[j].city,person[j].pincode))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "First Name :Jay\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Middle Name : Mohan\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Last Name : Deshmukh\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "City & PincodeNanded\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "City & Pincode431602\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "First Name :Vijay\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Middle Name : Kamal\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Last Name : Nandedkar\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "City & PincodeNanded\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "City & Pincode431602\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Record No : 1\n", - "First Name : Jay\n", - "Middle Name : Mohan\n", - "Last Name : Deshmukh\n", - "City & Pincode : Nanded - 431602\n", - "\n", - "Record No : 2\n", - "First Name : Vijay\n", - "Middle Name : Kamal\n", - "Last Name : Nandedkar\n", - "City & Pincode : Nanded - 431602\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.21, Page number: 431

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Information of vehicles\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "PETROL = 1\n", - "DISEL = 2\n", - "TWO_WH = 3\n", - "FOUR_WH = 4\n", - "OLD = 5\n", - "NEW = 6\n", - "\n", - "#Class declaration\n", - "class vehicle:\n", - " type1 = 3\n", - " fuel = 2\n", - " model = 3\n", - " \n", - "#Class variable declaration and initialization\n", - "v = vehicle()\n", - "v.type1 = FOUR_WH\n", - "v.fuel = DISEL\n", - "v.model = OLD\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nType of Vehicle : %d\"%(v.type1))\n", - "sys.stdout.write(\"\\nFuel : %d\"%(v.fuel))\n", - "sys.stdout.write(\"\\nModel : %d\"%(v.model))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Type of Vehicle : 4\n", - "Fuel : 2\n", - "Model : 5" - ] - } - ], - "prompt_number": 52 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.22, Page number: 432

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the examination result of the student \n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "#There is no preprocessor directives in python\n", - "PASS = 1\n", - "FAIL = 0\n", - "A = 0\n", - "B = 1\n", - "C = 2\n", - "\n", - "#Class declaration\n", - "class student:\n", - " name = ''\n", - " result = 1\n", - " grade = 2\n", - " \n", - "#Class variable declaration and initialization\n", - "v = student()\n", - "\n", - "v.name = \"Sachin\"\n", - "v.result = PASS\n", - "v.grade = C\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nName : %s\"%(v.name))\n", - "sys.stdout.write(\"\\nResult : %d\"%(v.result))\n", - "sys.stdout.write(\"\\nGrade : %d\"%(v.grade))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Name : Sachin\n", - "Result : 1\n", - "Grade : 2" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.23, Page number: 433

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Enumerated data type for 12 months\n", - "\n", - "import sys\n", - "\n", - "#There is no enumerated data type in python and an alternate is to use class\n", - "#Class declaration\n", - "class month:\n", - " Jan = 0\n", - " Feb = 1\n", - " Mar = 2\n", - " Apr = 3\n", - " May = 4\n", - " June = 5\n", - " July = 6\n", - " Aug = 7\n", - " Sep = 8\n", - " Oct = 9\n", - " Nov = 10\n", - " Dec = 11\n", - " \n", - "#Class variable declaration\n", - "c = month()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nJan = %d\"%(c.Jan))\n", - "sys.stdout.write(\"\\nFeb = %d\"%(c.Feb))\n", - "sys.stdout.write(\"\\nJune = %d\"%(c.June))\n", - "sys.stdout.write(\"\\nDec = %d\"%(c.Dec))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Jan = 0\n", - "Feb = 1\n", - "June = 5\n", - "Dec = 11" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.24, Page number: 434

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Enumerated data type \n", - "\n", - "import sys\n", - "\n", - "#There is no enumerated data type in python and an alternate is to use class\n", - "#Class declaration\n", - "class month:\n", - " Jan = 1\n", - " Feb = 2\n", - " Mar = 3\n", - " Apr = 4\n", - " May = 5\n", - " June = 6\n", - " July = 7\n", - " Aug = 8\n", - " Sep = 9\n", - " Oct = 10\n", - " Nov = 11\n", - " Dec = 12\n", - " \n", - "#Class variable declaration\n", - "c = month()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nJan = %d\"%(c.Jan))\n", - "sys.stdout.write(\"\\nFeb = %d\"%(c.Feb))\n", - "sys.stdout.write(\"\\nJune = %d\"%(c.June))\n", - "sys.stdout.write(\"\\nDec = %d\"%(c.Dec))\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Jan = 1\n", - "Feb = 2\n", - "June = 6\n", - "Dec = 12" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.25, Page number: 434

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display name of month using enumerated data type\n", - "\n", - "import sys\n", - "\n", - "#There is no enumerated data type in python and an alternate is to use class\n", - "#Class declaration\n", - "class month:\n", - " Jan = 1\n", - " Feb = 2\n", - " Mar = 3\n", - " Apr = 4\n", - " May = 5\n", - " June = 6\n", - " July = 7\n", - " Aug = 8\n", - " Sep = 9\n", - " Oct = 10\n", - " Nov = 11\n", - " Dec = 12\n", - " \n", - "#Class variable declaration\n", - "c = month()\n", - "\n", - "#Result\n", - "for f in range(c.Jan,c.Dec+1):\n", - " #There is no switch case statement in python\n", - " if f == c.Jan:\n", - " sys.stdout.write(\"\\nJanuary\")\n", - " else:\n", - " if f == c.Feb:\n", - " sys.stdout.write(\"\\nFebruary\")\n", - " else:\n", - " if f == c.Mar:\n", - " sys.stdout.write(\"\\nMarch\")\n", - " else:\n", - " if f == c.Apr:\n", - " sys.stdout.write(\"\\nApril\")\n", - " else:\n", - " if f == c.May:\n", - " sys.stdout.write(\"\\nMay\")\n", - " else:\n", - " if f == c.June:\n", - " sys.stdout.write(\"\\nJune\")\n", - " else:\n", - " if f == c.July:\n", - " sys.stdout.write(\"\\nJuly\")\n", - " else:\n", - " if f == c.Aug:\n", - " sys.stdout.write(\"\\nAugust\")\n", - " else:\n", - " if f == c.Sep:\n", - " sys.stdout.write(\"\\nSeptember\")\n", - " else:\n", - " if f == c.Oct:\n", - " sys.stdout.write(\"\\nOctober\")\n", - " else:\n", - " if f == c.Nov:\n", - " sys.stdout.write(\"\\nNovember\")\n", - " else:\n", - " sys.stdout.write(\"\\nDecember\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "January\n", - "February\n", - "March\n", - "April\n", - "May\n", - "June\n", - "July\n", - "August\n", - "September\n", - "October\n", - "November\n", - "December" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.26, Page number: 436

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Enumerated data type\n", - "\n", - "import sys\n", - "\n", - "#There is no enumerated data type in python. class is used instead\n", - "class capital:\n", - " Mumbai = 0\n", - " Hyderabad = 1\n", - " Bangalore = 2\n", - "\n", - "class state:\n", - " name = ''\n", - " c = capital()\n", - " \n", - "#Class variable declaration\n", - "s = state()\n", - "c1 = capital()\n", - "\n", - "#Class variable initialization\n", - "s.name = \"Andhra Pradesh\"\n", - "s.c = s.c.Hyderabad\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nState : %s\"%(s.name))\n", - "sys.stdout.write(\"\\nCapital : %d\"%(s.c))\n", - "\n", - "if s.c == c1.Hyderabad:\n", - " sys.stdout.write(\"\\nHyderabad is Capital of %s\"%(s.name))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "State : Andhra Pradesh\n", - "Capital : 1\n", - "Hyderabad is Capital of Andhra Pradesh" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.27, Page number: 437

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Identify the type of entered character using enumerated data type.\n", - "\n", - "import sys\n", - "\n", - "#Class declaration instead of enumerated data type\n", - "class ctype:\n", - " Letter = 0\n", - " Digit = 1\n", - " Other = 2\n", - " \n", - "#Variable Initialization\n", - "ch = raw_input(\"Enter any character\")\n", - "c = ctype()\n", - "f = ch.isalpha()\n", - "\n", - "#Result\n", - "if f != 0:\n", - " sys.stdout.write(\"\\n%c is %d type of symbol\"%(ch,c.Letter))\n", - "else:\n", - " f = ch.isdigit()\n", - " if f != 0:\n", - " sys.stdout.write(\"\\n%c is %d type of symbol\"%(ch,c.Digit))\n", - " else:\n", - " sys.stdout.write(\"\\n%c is %d type of symbol\"%(ch,c.Other))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter any character=\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "= is 2 type of symbol" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.28, Page number: 438

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Size of union and number of bytes reserved for it\n", - "\n", - "import sys\n", - "\n", - "#There is no union/structure in python. class is used instead\n", - "#Class declaration\n", - "class result:\n", - " marks = 0\n", - " grade = ''\n", - " \n", - "class res:\n", - " name = ''\n", - " age = 0\n", - " perf = result()\n", - " \n", - "#Class variable declaration\n", - "data = res()\n", - "\n", - "#Result\n", - "sys.stdout.write(\"Size of Union : %d\\n\"%(sys.getsizeof(data.perf)))\n", - "sys.stdout.write(\"Size of Structure : %d\\n\"%(sys.getsizeof(data)))\n", - "\n", - "#in python, value tagged method is used for data storage and can represent large numbers" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Size of Union : 36\n", - "Size of Structure : 36\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.29, Page number: 440

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Memory size of the computer\n", - "\n", - "import psutil\n", - "\n", - "psutil.phymem_usage()\n", - "\n", - "#Displays current status of the memory\n", - "#different systems will have different memory status" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "pyout", - "prompt_number": 4, - "text": [ - "usage(total=1600512000L, used=1496383488L, free=104128512L, percent=93.5)" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.30, Page number: 440

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the system time at specified cursor position\n", - "\n", - "import sys\n", - "import datetime\n", - "\n", - "#Result\n", - "sys.stdout.write(\"%s\"%(datetime.datetime.now()))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "2013-09-20 11:04:15.649000" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.31, Page number: 441

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Change the cursor in different sizes\n", - "\n", - "import turtle\n", - "#Ipython supports graphics through turtle module\n", - "\n", - "from Tkinter import *\n", - "import Tkinter\n", - "\n", - "top = Tkinter.Tk()\n", - "\n", - "B1 = Tkinter.Button(top, text =\"circle\", relief=RAISED,\\\n", - " cursor=\"circle\")\n", - "B2 = Tkinter.Button(top, text =\"plus\", relief=RAISED,\\\n", - " cursor=\"plus\")\n", - "B1.pack()\n", - "B2.pack()\n", - "#top.mainloop()" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.32, Page number: 441

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Create a directory using dos interrupt\n", - "\n", - "import os\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "dir1 = raw_input(\"Enter Directory Name : \")\n", - "\n", - "#Result\n", - "if not os.path.exists(dir1):\n", - " os.makedirs(dir1)\n", - " sys.stdout.write(\"Directory %s created\"%(dir1))\n", - "else:\n", - " sys.stdout.write(\"Directory %s not created\"%(dir1))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Directory XYZ created" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.33, Page number: 442

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the given character on the screen\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "dl = 67\n", - "\n", - "#Result\n", - "sys.stdout.write(\"%c\"%(chr(dl)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "C" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.34, Page number: 442

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the attributes of a file using DOS interrupt\n", - "\n", - "import sys\n", - "\n", - "import os\n", - "\n", - "print os.stat(\"IO.SYS\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0L, st_atime=1383454467L, st_mtime=1383454467L, st_ctime=1383454467L)\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.35, Page number: 444

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Delete a file using dos interrupt\n", - "\n", - "import os\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "file1 = raw_input(\"Enter a file name : \")\n", - "\n", - "try:\n", - " os.remove(file1)\n", - " sys.stdout.write(\"File successfully deleted\")\n", - "except:\n", - " sys.stdout.write(\"File could not be deleted\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "File successfully deleted" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 13.36, Page number: 445

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Structuret within union\n", - "\n", - "import sys\n", - "\n", - "#there is no union/structure in python. class is used instead\n", - "#Class declaration\n", - "class x:\n", - " f = 0.0\n", - " p = ['' for i in range(0,2)]\n", - " \n", - "class z:\n", - " set1 = x()\n", - " \n", - "#Class variable declaration and initialization\n", - "st = z()\n", - "\n", - "st.set1.f = 5.5\n", - "st.set1.p[0] = 65\n", - "st.set1.p[1] = 66\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\n%g\"%(st.set1.f))\n", - "sys.stdout.write(\"\\n%c\"%(st.set1.p[0]))\n", - "sys.stdout.write(\"\\n%c\"%(st.set1.p[1]))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "5.5\n", - "A\n", - "B" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb deleted file mode 100755 index 409585bd..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb +++ /dev/null @@ -1,2311 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 14: Files

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.1, Page number: 454

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write data to text file and read it\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a')\n", - "\n", - "#Write data to file if successfully created the file\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " sys.stdout.write(\"Write data & to stop press '.'\")\n", - " c = ''\n", - " while c != '.':\n", - " c = raw_input(\"Write data & to stop press '.'\")\n", - " fp.write(c)\n", - " fp.close()\n", - "\n", - " #Read and display the contents of file\n", - " sys.stdout.write(\"\\nContents read : \")\n", - " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n", - " f = fp.readlines()\n", - " for f1 in f:\n", - " print f1\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Write data & to stop press '.'" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Write data & to stop press '.'ABCDEFGHIJK\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Write data & to stop press '.'.\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents read : ABCDEFGHIJK.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.2, Page number: 455

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display the contents of the file before and after appending.\n", - "\n", - "import sys\n", - "\n", - "#Open file for read data\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n", - "\n", - "#Read and display the contents of file\n", - "sys.stdout.write(\"\\nContents of file before appending :\\n\")\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n", - "f = fp.readlines()\n", - "for f1 in f:\n", - " print f1\n", - "\n", - "#Open file for appending\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a')\n", - "\n", - "if f == 0:\n", - " sys.stdout.write(\"File can not appended\")\n", - "else:\n", - " c = ''\n", - " #fp.write('\\n')\n", - " while c != '.':\n", - " c = raw_input(\"Enter string to append\")\n", - " fp.write(c)\n", - " \n", - " fp.close()\n", - " \n", - " #Read and display the contents of file\n", - " sys.stdout.write(\"\\nContents of file After appending\\n\")\n", - " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n", - " f = fp.readlines()\n", - " for f1 in f:\n", - " print f1\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents of file before appending :\n", - "String is terminated with '\\0'.\n", - "\n", - "Contents of file After appending\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String is terminated with '\\0'.This character is called as NULL character.\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.3, Page number: 457

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Writing and reading of a file.\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','w+')\n", - "\n", - "#Write data to file if successfully created the file\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " sys.stdout.write(\"Write data & to stop press '.'\")\n", - " c = ''\n", - " while c != '.':\n", - " c = raw_input(\"Write data & to stop press '.'\")\n", - " fp.write(c)\n", - " fp.close()\n", - "\n", - " #Read and display the contents of file\n", - " sys.stdout.write(\"\\nContents read : \")\n", - " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n", - " f = fp.readlines()\n", - " for f1 in f:\n", - " print f1\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Write data & to stop press '.'\n", - "Contents read : " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "ABCDEFGHIJK.\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.4, Page number: 458

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Open a file in append mode and add new records in it.\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a+')\n", - "\n", - "#Write data to file if successfully created the file\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " sys.stdout.write(\"Write data & to stop press '.'\")\n", - " c = ''\n", - " while c != '.':\n", - " c = raw_input(\"Write data & to stop press '.'\")\n", - " fp.write(c)\n", - " fp.close()\n", - "\n", - " #Read and display the contents of file\n", - " sys.stdout.write(\"\\nContents read : \")\n", - " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a+')\n", - " f = fp.readlines()\n", - " for f1 in f:\n", - " print f1\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Write data & to stop press '.'\n", - "Contents read : " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "This is append and read mode.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.5, Page number: 459

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Open a file in read/write mode in it\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r+')\n", - "\n", - "#Write data to file if successfully created the file\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " #Read and display the contents of file\n", - " sys.stdout.write(\"\\nContents read : \")\n", - " f = fp.readlines()\n", - " for f1 in f:\n", - " print f1\n", - " \n", - " sys.stdout.write(\"Write data & to stop press '.'\")\n", - " c = ''\n", - " while c != '.':\n", - " c = raw_input(\"Write data & to stop press '.'\")\n", - " fp.write(c)\n", - " fp.close()\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents read : Help me.\n", - "Write data & to stop press '.'" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.6, Page number: 460

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Open a file for read/write operation in binary mode\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','wb')\n", - "\n", - "#Write data to file if successfully created the file\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " sys.stdout.write(\"Write data & to stop press '.'\")\n", - " c = ''\n", - " while c != '.':\n", - " c = raw_input(\"Write data & to stop press '.'\")\n", - " fp.write(c)\n", - " fp.close()\n", - "\n", - " #Read and display the contents of file\n", - " sys.stdout.write(\"\\nContents read : \")\n", - " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','rb')\n", - " f = fp.readlines()\n", - " for f1 in f:\n", - " print f1\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Write data & to stop press '.'\n", - "Contents read : " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "ABCDEFGHIJK.\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.7, Page number: 462

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Open a text file and write some text \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','w')\n", - "\n", - "#Read the string\n", - "text = raw_input(\"Enter Text Here : \")\n", - "\n", - "#Write to the file\n", - "#fp.write() is the equivalent function for fprintf() in python\n", - "fp.write(\"%s\"%(text))\n", - "\n", - "#To see the result, open the data.txt file" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 4 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.8, Page number: 463

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Enter data into the text file and read the same. \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','w')\n", - "\n", - "#Read the data\n", - "text = raw_input(\"Name & Age\")\n", - "age = int(raw_input(\"Name & Age\"))\n", - "\n", - "#Write to file\n", - "fp.write(\"%s %d\"%(text,age))\n", - "\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n", - "#Result\n", - "sys.stdout.write(\"Name\\tAge\\n\")\n", - "text = fp.read()\n", - "age = fp.read()\n", - "sys.stdout.write(\"%s\\t%s\\n\"%(text,age))\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Name\tAge\n", - "AMIT 12\t\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.9, Page number: 463

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read the contents of the file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "f = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\list.txt','r')\n", - "\n", - "if f == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " for c in f:\n", - " sys.stdout.write(\"%s\"%(c))\n", - " #Python gives iterative statements there is no getc() fucntion" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "aman\n", - "akash\n", - "amit\n", - "ajay\n", - "ankit" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.10, Page number: 464

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write some text into the file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\words.doc','w')\n", - "\n", - "#Write data to file\n", - "c = ''\n", - "while c != '*':\n", - " c = raw_input(\"Enter Few Words '*' to Exit\")\n", - " fp.write(c)\n", - "\n", - "fp.close()\n", - " #There is no putc() function in python\n", - " #Open the file to see the result" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.11, Page number: 465

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Count\n", - "\n", - "# Total number of statements\n", - "# Total number of included files\n", - "# Total number of blocks and brackets\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fs = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\PRG2.C','r')\n", - "\n", - "#variable initialization\n", - "i = 0\n", - "c = 0\n", - "sb = 0\n", - "b = 0\n", - "\n", - "if fs == 0:\n", - " sys.stdout.write(\"File opening error\")\n", - "else:\n", - " for line in fs:\n", - " k = 0\n", - " while k < len(line):\n", - " if line[k] == ';':\n", - " c += 1\n", - " else:\n", - " if line[k] == '{':\n", - " sb += 1\n", - " else:\n", - " if line[k] == '(':\n", - " b += 1\n", - " else:\n", - " if line[k] == '#':\n", - " i += 1\n", - " k += 1\n", - " \n", - " #Result\n", - " sys.stdout.write(\"\\nSummary of 'C' Program\\n\")\n", - " sys.stdout.write(\"===========================\")\n", - " sys.stdout.write(\"\\nTotal Statments : %d\"%(c+i))\n", - " sys.stdout.write(\"\\nInclude Statements : %d\"%(i))\n", - " sys.stdout.write(\"\\nTotal Blocks {} : %d\"%(sb))\n", - " sys.stdout.write(\"\\nTotal Brackets () : %d\"%(b))\n", - " sys.stdout.write(\"\\n============================\")\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Summary of 'C' Program\n", - "===========================\n", - "Total Statments : 8\n", - "Include Statements : 2\n", - "Total Blocks {} : 2\n", - "Total Brackets () : 9\n", - "============================" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.12, Page number: 466

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write text to a file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\lines.txt','w')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"\")\n", - "else:\n", - " #Write data to file\n", - " c = ''\n", - " while c != '*':\n", - " c = raw_input(\"\")\n", - " fp.write(c)\n", - " fp.close()\n", - " #There is no fputc() function in python\n", - " #Open the file to see the result" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 10 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.13, Page number: 467

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read text from the given file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "\n", - "file1 = raw_input(\"Enter File Name : \")\n", - "fp = open(file1,'r')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"File not found\\n\")\n", - "else:\n", - " for text in fp:\n", - " print text\n", - " #File pointer itself is iterable in python" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "#include \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.14, Page number: 468

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write a string into a file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "\n", - "file1 = raw_input(\"Enter the name of file : \")\n", - "fp = open(file1,'w')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"File can not opened\\n\")\n", - "else:\n", - " text = raw_input(\"Enter Text Here : \")\n", - " fp.write(text)\n", - " \n", - " #Write() function is used to write character or string into the file in python\n", - " # there is no fputc() function in python\n", - "#open the file to see the result" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 13 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.15, Page number: 469

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write integers in a file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('num.txt','w')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"File does not exist\\n\")\n", - "else:\n", - " v = ' '\n", - " while v != '0':\n", - " fp.write(v)\n", - " v = raw_input(\"Enter Numbers\")\n", - " \n", - " #open the file to see the result" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.16, Page number: 470

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read integers from the file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open('num.txt','r')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"File does not exist\\n\")\n", - "else:\n", - " for v in fp:\n", - " print v" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 2 3 4 5\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.17, Page number: 471

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write a block of structure elements to the given file \n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class student:\n", - " name = ''\n", - " age = 0\n", - " \n", - "#Class variable declaration\n", - "stud = [student() for i in range(0,5)]\n", - "\n", - "#Open file\n", - "file1 = raw_input(\"Enter the file name : \")\n", - "fp = open(file1,'w')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"File does not exist\\n\")\n", - "else:\n", - " n = int(raw_input(\"How Many Records : \"))\n", - " for i in range(0,n):\n", - " stud[i].name = raw_input(\"Name : \")\n", - " stud[i].age = int(raw_input(\"Age : \"))\n", - " \n", - " j = 0\n", - " while j < n:\n", - " fp.write(\"%s %d\\n\"%(stud[j].name,stud[j].age))\n", - " j += 1\n", - " \n", - " fp.close()\n", - " \n", - " #open the file to see the result" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.18, Page number: 472

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write and read the information about the player \n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class record:\n", - " player = ''\n", - " age = 0\n", - " runs = 0\n", - " \n", - "#Class variable declaration\n", - "emp = record()\n", - "\n", - "#Open file\n", - "fp = open('record.dat','w')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"Can not open the file\\n\")\n", - "else:\n", - " emp.player = raw_input(\"Enter Player Name\")\n", - " emp.age = int(raw_input(\"Enter Age\"))\n", - " emp.runs = int(raw_input(\"Enter runs scored\"))\n", - " fp.write(\"%s %d %d\"%(emp.player,emp.age,emp.runs))\n", - " fp.close()\n", - " \n", - " fp = open('record.dat','r')\n", - " if fp == 0:\n", - " sys.stdout.write(\"Error in opening file\")\n", - " else:\n", - " sys.stdout.write(\"\\nRecord Entered is\\n\")\n", - " emp.player,emp.age,emp.runs = fp.read().split(' ')\n", - " sys.stdout.write(\"\\n%s %s %s\"%(emp.player,emp.age,emp.runs))\n", - " fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Player NameSachin\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Age25\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter runs scored10000\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Record Entered is\n", - "\n", - "Sachin 25 10000" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.19, Page number: 473

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Write a block of structure elements to the given file \n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "next1 = 'Y'\n", - "\n", - "#Class declaration\n", - "class bike:\n", - " name = ''\n", - " avg = 0\n", - " cost = 0.0\n", - " \n", - "#Class variable declaration\n", - "e = bike()\n", - "\n", - "#open file\n", - "fp = open('bk.txt','wb')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " while next1 == 'Y':\n", - " e.name = raw_input(\"Model Name\")\n", - " e.avg = int(raw_input(\"Average\"))\n", - " e.cost = float(raw_input(\"Price\"))\n", - " fp.write(\"%s %d %f\\n\"%(e.name,e.avg,e.cost))\n", - " \n", - " next1 = raw_input(\"Add Another (Y/N):\")\n", - " fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Model NameHONDA\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average80\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Price45000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Add Another (Y/N):Y\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Model NameSUZUKI\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average65\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Price43000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Add Another (Y/N):Y\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Model NameYAMAHA\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average55\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Price48000\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Add Another (Y/N):N\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.20, Page number: 474

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read the information about the bike \n", - "\n", - "import sys\n", - "\n", - "#Class declaration\n", - "class bike:\n", - " name = ''\n", - " avg = 0\n", - " cost = 0.0\n", - " \n", - "#Class variable declaration\n", - "e = bike()\n", - "\n", - "#open file\n", - "fp = open('bk.txt','rb')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"Cannot open file\")\n", - "else:\n", - " lines = fp.readlines()\n", - " for line in lines:\n", - " e.name,e.avg,e.cost = line.split(' ')\n", - " e.avg = int(e.avg)\n", - " e.cost = float(e.cost)\n", - " sys.stdout.write(\"\\n%s %d %.2f\"%(e.name,e.avg,e.cost))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "HONDA 80 45000.00\n", - "SUZUKI 65 43000.00\n", - "YAMAHA 55 48000.00" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.21, Page number: 476

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read the text after skipping n characters from beginning of the file\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open(\"text.txt\",\"r\")\n", - "\n", - "sys.stdout.write(\"\\nContents of file\\n\")\n", - "ch = fp.read()\n", - "sys.stdout.write(\"%s\"%(ch))\n", - "\n", - "#Read n\n", - "n = int(raw_input(\"How many characters including spaces would you like to skip?\"))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nInformation after %d bytes\\n\"%(n))\n", - "\n", - "ch = ch[n:]\n", - "sys.stdout.write(\"%s\"%(ch))\n", - "\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents of file\n", - "THE C PROGRAMMING LANGUAGE INVENTED BY DENNIS RITCHIE" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many characters including spaces would you like to skip?18\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Information after 18 bytes\n", - "LANGUAGE INVENTED BY DENNIS RITCHIE" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.22, Page number: 477

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read last few characters of the file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open(\"text.txt\",\"r\")\n", - "\n", - "sys.stdout.write(\"\\nContents of file\\n\")\n", - "ch = fp.read()\n", - "sys.stdout.write(\"%s\"%(ch))\n", - "\n", - "#Read n\n", - "n = int(raw_input(\"How many characters including spaces would you like to skip?\"))\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nInformation after %d bytes\\n\"%(n))\n", - "\n", - "print ch[-n:]\n", - "\n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents of file\n", - "HELLO WORLD" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many characters including spaces would you like to skip?5\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Information after 5 bytes\n", - "WORLD\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.23, Page number: 477

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display 'c' program files in current directory. \n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "l = 0\n", - "c = 0\n", - "\n", - "#Open file\n", - "file1 = raw_input(\"Enter the file name : \")\n", - "fp = open(file1,'r')\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nContents of 'c' program file in capital case\")\n", - "sys.stdout.write(\"\\n============================================\\n\")\n", - "\n", - "ch = fp.readlines()\n", - "\n", - "for line in ch:\n", - " i = 0\n", - " #print line.upper()\n", - " while i < len(line):\n", - " if line[i] =='\\n':\n", - " l += 1\n", - " else:\n", - " c += 1\n", - " sys.stdout.write(\"%c\"%(line[i].upper()))\n", - " i += 1\n", - "\n", - "sys.stdout.write(\"\\nTotal Characters : %d\"%(c))\n", - "sys.stdout.write(\"\\nTotal Lines : %d\"%(l))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Contents of 'c' program file in capital case\n", - "============================================\n", - "MAIN()\n", - "{\n", - "PRINTF(\" HELLO WORLD\");\n", - "}\n", - "\n", - "Total Characters : 31\n", - "Total Lines : 4" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.24, Page number: 479

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Detect the end of file \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open(\"text.txt\",\"r\")\n", - "\n", - "#there is no feof() function in python\n", - "c = fp.tell()\n", - "sys.stdout.write(\"File pointer at the beginning of the file : %d\\n\"%(c))\n", - "\n", - "c = fp.read()\n", - "sys.stdout.write(\"%s\"%(c))\n", - "\n", - "c = fp.tell()\n", - "sys.stdout.write(\"\\nFile pointer at the end of file : %d\"%(c))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "File pointer at the beginning of the file : 0\n", - "TECHNOCRATS LEAD THE WORLD \n", - "File pointer at the end of file : 32" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.25, Page number: 480

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Detect an error while read/write operation of a file is in use.\n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "next1 = 'Y'\n", - "\n", - "#open file\n", - "fp = open('marks.dat','r')\n", - "\n", - "if fp == 0:\n", - " sys.stdout.write(\"Can not open file\")\n", - "else:\n", - " while next1 == 'Y':\n", - " name = raw_input(\"Enter Name, Marks, Percentage\")\n", - " marks = int(raw_input(\"Enter Name, Marks, Percentage\"))\n", - " \n", - " p = marks/7\n", - " try:\n", - " fp.write(\"%s %d %f\"%(name,marks,p))\n", - " except:\n", - " sys.stdout.write(\"\\nUnable to write data?\")\n", - " sys.stdout.write(\"\\nFile opening mode is incorrect.\")\n", - " fp.close()\n", - " \n", - " next1 = raw_input(\"Continue Y/N:\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name, Marks, PercentageKAMAL\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter Name, Marks, Percentage540\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Unable to write data?\n", - "File opening mode is incorrect." - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Continue Y/N:N\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.26, Page number: 481

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Catch the error that is occurred while file operation\n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "f = open(\"io8.c\",\"w\")\n", - "\n", - "if f == 0:\n", - " sys.stdout.write(\"\\nCannot open file\")\n", - "else:\n", - " #Exception handling\n", - " try:\n", - " c = fp.readlines()\n", - " sys.stdout.write(\"%s\"%(c))\n", - " except:\n", - " sys.stdout.write(\"\\nCan't read file.\")\n", - "#There is no ferror() function python." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "Can't read file." - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.27, Page number: 482

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Detect and print the error message\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "file1 = \"lines.txt\"\n", - "\n", - "#Open file\n", - "fr = open(file1,\"w\")\n", - "\n", - "sys.stdout.write(\"%s : \"%(file1))\n", - "#Exception handling\n", - "try:\n", - " c = fp.readlines()\n", - "except:\n", - " sys.stdout.write(\"Permission Denied\")\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lines.txt : Permission Denied" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.28, Page number: 482

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Print the current position of the file pointer \n", - "\n", - "import sys\n", - "\n", - "#Open file\n", - "fp = open(\"text.txt\",\"r\")\n", - "\n", - "#Set the pointer\n", - "fp.seek(21)\n", - "\n", - "#Result\n", - "while True:\n", - " c = fp.read(1)\n", - " if not c:\n", - " break\n", - " sys.stdout.write(\"%c\\t%d\\n\"%(c,fp.tell()))\n", - "#There is no endof file in python" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "W\t22\n", - "O\t23\n", - "R\t24\n", - "L\t25\n", - "D\t26\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.29, Page number: 483

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Detect beginning of file\n", - "\n", - "import sys\n", - "\n", - "#open file\n", - "fp = open(\"text.txt\",\"r\")\n", - "\n", - "fp.seek(12)\n", - "sys.stdout.write(\"Pointer is at %d\\n\"%(fp.tell()))\n", - "sys.stdout.write(\"Before rewind() : \")\n", - "\n", - "#Result\n", - "while True:\n", - " c = fp.read(1)\n", - " if not c:\n", - " break\n", - " sys.stdout.write(\"%c\"%(c))\n", - " \n", - "sys.stdout.write(\"\\nAfter rewind() : \")\n", - "fp.seek(0)\n", - "#There is no rewind function in python\n", - "\n", - "while True:\n", - " c = fp.read(1)\n", - " if not c:\n", - " break\n", - " sys.stdout.write(\"%c\"%(c))\n", - " \n", - "fp.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pointer is at 12\n", - "Before rewind() : LEAD THE WORLD\n", - "After rewind() : TECHNOCRATS LEAD THE WORLD" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.30, Page number: 484

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Delete the given file \n", - "\n", - "import sys\n", - "import os\n", - "\n", - "#Read file name\n", - "file1 = raw_input(\"Enter The File Name : \")\n", - "\n", - "#There is no remove or unlink file function in python.\n", - "#A file can be deleted using remove function in the os module.\n", - "\n", - "try:\n", - " os.remove(file1)\n", - " sys.stdout.write(\"\\nFile (%s) has been deleted!\"%(file1))\n", - "except:\n", - " sys.stdout.write(\"\\nFile does not exist\")\n", - "\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "File (TEXT.TXT) has been deleted!" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.31, Page number: 485

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Change the name of the file\n", - "\n", - "import os\n", - "import sys\n", - "\n", - "old = raw_input(\"Old File Name : \")\n", - "\n", - "new = raw_input(\"New File Name : \")\n", - "\n", - "os.rename(old, new)\n", - "\n", - "#Check the directory to see the result\n" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 22 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.32, Page number: 486

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Copy the contents of one file to another file\n", - "\n", - "import sys\n", - "\n", - "fs = open(\"a.txt\",\"r\")\n", - "ft = open(\"b.txt\",\"w\")\n", - "c = 0\n", - "\n", - "if fs == 0:\n", - " sys.stdout.write(\"\\nSource file opening error.\")\n", - "else:\n", - " if ft == 0:\n", - " sys.stdout.write(\"\\nTarget file opening error.\")\n", - " else:\n", - " while True:\n", - " ch = fs.read(1)\n", - " if not ch:\n", - " break\n", - " ft.write(\"%c\"%(ch))\n", - " c += 1\n", - " sys.stdout.write(\"\\n%d Bytes copied from 'a.txt' to 'b.txt'.\"%(c))\n", - " c = 0\n", - " #there is no fcloseall() function in python\n", - " fs.close()\n", - " c += 1\n", - " ft.close()\n", - " c += 1\n", - " sys.stdout.write(\"\\n%d files closed.\"%(c))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "45 Bytes copied from 'a.txt' to 'b.txt'.\n", - "2 files closed." - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.33, Page number: 487

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read the contents of three files and find the largest file\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "y = 0\n", - "k = 0\n", - "t = 0\n", - "name = [\"1.txt\",\"2.txt\",\"3.txt\"]\n", - "f = [0 for i in range(0,3)]\n", - "x = [0 for i in range(0,3)]\n", - "\n", - "#Open all the files\n", - "for l in range(0,3):\n", - " fp = open(name[l],\"r\")\n", - " f[l] = fp\n", - " if fp == 0:\n", - " sys.stdout.write(\"\\n%s file not found.\"%(name[l]))\n", - " break\n", - " \n", - "#Read contents of all files\n", - "for l in range(0,3):\n", - " while True:\n", - " c1 = f[l].read(1)\n", - " if not c1:\n", - " break\n", - " x[l] = y\n", - " y += 1\n", - " y = 0\n", - "\n", - "#close the files\n", - "for l in range(0,3):\n", - " f[l].close()\n", - "\n", - "#Print size of all files\n", - "for l in range(0,2+1):\n", - " sys.stdout.write(\"File : %s Bytes : %d\\n\"%(name[l],x[l]))\n", - " t = t + x[l]\n", - " \n", - "#Find largest\n", - "for l in range(t,1,-1):\n", - " for k in range(0,3):\n", - " if l == x[k]:\n", - " sys.stdout.write(\"\\n%s are the largest file.\"%(name[k]))\n", - " break\n", - " if l == x[k]:\n", - " break" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "File : 1.txt Bytes : 16\n", - "File : 2.txt Bytes : 20\n", - "File : 3.txt Bytes : 25\n", - "\n", - "3.txt are the largest file." - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.34, Page number: 488

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Copy 100 characters from a file to an array\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "SIZE = 100\n", - "s = 0\n", - "x = 0\n", - "ch = ['0' for i in range(0,100)]\n", - "\n", - "#Open the files\n", - "f = open(\"poem.txt\",\"r\")\n", - "f2 = open(\"alpha.txt\",\"w\")\n", - "\n", - "if f ==0 or f2 == 0:\n", - " sys.stdout.write(\"?\")\n", - "else:\n", - " while True:\n", - " c = f.read(1)\n", - " x += 1\n", - " if not c:\n", - " break\n", - " else:\n", - " if x == 99:\n", - " break\n", - " else:\n", - " ch[s] = c\n", - " s += 1\n", - "\n", - "for s in range(0,100):\n", - " f2.write(\"%c\"%(ch[s]))\n", - "\n", - "sys.stdout.write(\"Process Completed : Error 0\")\n", - "f.close()\n", - "f2.close()\n", - "\n", - "#There is no perror() function in python" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Process Completed : Error 0" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.35, Page number: 491

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Low level disk I/O operations.\n", - "\n", - "import sys\n", - "\n", - "\n", - "#Variable Initialization\n", - "file1 = raw_input(\"Enter a file name : \")\n", - "\n", - "#Open file\n", - "s = open(file1,\"w\")\n", - "\n", - "#Result\n", - "if s == -1:\n", - " sys.stdout.write(\"File does not exits\")\n", - "else:\n", - " buff = raw_input(\"Enter text below:\")\n", - " s.write(\"%s\"%(buff))\n", - " s.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a file name : TEXT\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter text below:PROGRAMMING IN C\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.36, Page number: 492

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read text from a specified file \n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "file1 = raw_input(\"Enter a file name \")\n", - "\n", - "#open file\n", - "s = open(file1,\"r\")\n", - "\n", - "#Result\n", - "if s == -1:\n", - " sys.stdout.write(\"File does not exists\")\n", - "else:\n", - " while True:\n", - " ch = s.read(1)\n", - " if not ch:\n", - " break\n", - " sys.stdout.write(\"%c\"%(ch))\n", - " \n", - "s.close()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter a file name TEXT\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "PROGRAMMING IN C" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.37, Page number: 493

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Set a buffer size \n", - "\n", - "import sys\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nThis book teaches C\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "This book teaches C" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.38, Page number: 494

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display number of arguments and their names\n", - "\n", - "import sys\n", - "\n", - "#Result\n", - "sys.stdout.write(\"\\nTotal number of arguments are %d\\n\"%(len(sys.argv)))\n", - "\n", - "print str(sys.argv)\n", - "\n", - "#Command line arguments can be given in python by the command\n", - "\n", - "# python pgmname.py arg1 arg2 arg3\n", - "\n", - "#This is not possible in ipython notebook" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 8 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.39, Page number: 495

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read any file from command prompt\n", - "\n", - "import sys\n", - "\n", - "#open file\n", - "fp = open(sys.argv[1],\"r\")\n", - "\n", - "#Result\n", - "if fp == 0:\n", - " sys.stdout.write(\"Can not open file\")\n", - "else:\n", - " while True:\n", - " ch = fp.read(1)\n", - " if not ch:\n", - " break\n", - " sys.stdout.write(\"%c\"%(ch))\n", - " \n", - "fp.close()\n", - "\n", - "#This program can be run in python as\n", - "\n", - "# python pgmname.py filename" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.40, Page number: 495

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Command line argument to perform the task of DEL command\n", - "\n", - "import sys\n", - "\n", - "#Check number of arguments\n", - "if len(sys.argv) < 2:\n", - " sys.stdout.write(\"Insufficient Arguments\")\n", - "else:\n", - " fp = open(sys.argv[1],\"r\")\n", - " if fp == 0:\n", - " sys.stdout.write(\"File Not Found\")\n", - " fp.close()\n", - " os.remove(sys.argv[1])\n", - " sys.stdout.write(\"File has been deleted\")\n", - " \n", - "#This program can be deleted using\n", - "# python pgmname.py filename\n" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.41, Page number: 496

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Command line argument to perform the task of REN command\n", - "\n", - "import sys\n", - "\n", - "#Check number of arguments\n", - "if len(sys.srgv) < 3:\n", - " sys.stdout.write(\"Insufficient Arguments\")\n", - "else:\n", - " fp = open(sys.argv[1],\"r\")\n", - " if fp == 0:\n", - " sys.stdout.write(\"File Not Found\")\n", - " else:\n", - " sp = open(sys.argv[2],\"r\")\n", - " if sp == 0:\n", - " fp.close()\n", - " sp.close()\n", - " #Rename file\n", - " os.rename(sys.argv[1],sys.argv[2])\n", - " else:\n", - " sys.stdout.write(\"Duplicate file name or file is in use\")\n", - " \n", - "#This program can be executed as\n", - "\n", - "# python pgmname.py oldfilename newfilename\n" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.42, Page number: 497

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Environment variable and display the various settings.\n", - "\n", - "import sys\n", - "import os\n", - "\n", - "#Result\n", - "print os.environ\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "{'TMP': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Local\\\\Temp', 'COMPUTERNAME': 'AATHIRA-PC', 'GUROBI_HOME': 'B:\\\\gurobi510\\\\win32', 'USERDOMAIN': 'Aathira-PC', 'PSMODULEPATH': 'C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules\\\\', 'COMMONPROGRAMFILES': 'C:\\\\Program Files (x86)\\\\Common Files', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 15 Stepping 13, GenuineIntel', 'PROGRAMFILES': 'C:\\\\Program Files (x86)', 'PROCESSOR_REVISION': '0f0d', 'SYSTEMROOT': 'C:\\\\Windows', 'PATH': 'C:\\\\Anaconda\\\\lib\\\\site-packages\\\\numpy\\\\core;B:\\\\gurobi510\\\\win32\\\\bin;C:\\\\Windows\\\\system32;C:\\\\Windows;C:\\\\Windows\\\\System32\\\\Wbem;C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\Program Files (x86)\\\\Common Files\\\\Adobe\\\\AGL;C:\\\\Program Files\\\\MATLAB\\\\R2009a\\\\bin;C:\\\\Program Files\\\\MATLAB\\\\R2009a\\\\bin\\\\win64;c:\\\\python27\\\\scripts;C:\\\\Program Files (x86)\\\\MiKTeX 2.9\\\\miktex\\\\bin\\\\;C:\\\\Anaconda;C:\\\\Anaconda\\\\Scripts;C:\\\\Program Files (x86)\\\\ffmpeg', 'CLICOLOR': '1', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'COMSPEC': 'C:\\\\Windows\\\\system32\\\\cmd.exe', 'TK_LIBRARY': 'C:\\\\Anaconda\\\\tcl\\\\tk8.5', 'TERM': 'xterm-color', 'TEMP': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Local\\\\Temp', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'PROCESSOR_ARCHITECTURE': 'x86', 'TIX_LIBRARY': 'C:\\\\Anaconda\\\\tcl\\\\tix8.4.3', 'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'LOCALAPPDATA': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Local', 'HOMEPATH': '\\\\Users\\\\Aathira', 'PROGRAMW6432': 'C:\\\\Program Files', 'USERNAME': 'Aathira', 'LOGONSERVER': '\\\\\\\\AATHIRA-PC', 'SESSIONNAME': 'Console', 'PROGRAMDATA': 'C:\\\\ProgramData', 'TCL_LIBRARY': 'C:\\\\Anaconda\\\\tcl\\\\tcl8.5', 'GIT_PAGER': 'cat', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'FP_NO_HOST_CHECK': 'NO', 'WINDIR': 'C:\\\\Windows', 'APPDATA': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Roaming', 'HOMEDRIVE': 'C:', 'PAGER': 'cat', 'SYSTEMDRIVE': 'C:', 'NUMBER_OF_PROCESSORS': '2', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_ARCHITEW6432': 'AMD64', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'OS': 'Windows_NT', 'PUBLIC': 'C:\\\\Users\\\\Public', 'USERPROFILE': 'C:\\\\Users\\\\Aathira'}\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.43, Page number: 498

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Read character from keyboard \n", - "\n", - "import sys\n", - "\n", - "c = '0'\n", - "\n", - "#Result\n", - "while c != ' ':\n", - " c = raw_input(\"\")\n", - " sys.stdout.write(\"%c \"%(c))\n", - " \n", - "#Give space at the end" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "1 2 " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "3 4 " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "5 6 " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "7 8 " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "9 " - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 14.44, Page number: 499

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display A to Z characters\n", - "\n", - "import sys\n", - "\n", - "#Result\n", - "for a in range(65,91):\n", - " sys.stdout.write(\"%c\\t\"%(chr(a)))" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "A\tB\tC\tD\tE\tF\tG\tH\tI\tJ\tK\tL\tM\tN\tO\tP\tQ\tR\tS\tT\tU\tV\tW\tX\tY\tZ\t" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb deleted file mode 100755 index 5a99346e..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb +++ /dev/null @@ -1,1480 +0,0 @@ -<<<<<<< HEAD -{ - "metadata": { - "name": "", - "signature": "sha256:23cf65a359a2231e3abd5faae195b73ed4d5756e6083812ae87c387c1bb53f5a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 15: Additional in 'C'

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.1, Page number: 505

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Allocate memory to pointer variable. \n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "j = 0\n", - "k = int(raw_input(\"How many number : \"))\n", - "p = [0 for i in range(0,k)]\n", - "\n", - "#in python, all variables are allocated using dynamic memory allocation technique and no\n", - "#malloc function and pointer concept is available in python.\n", - "\n", - "#Read the numbers\n", - "while j != k:\n", - " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n", - " j += 1\n", - " \n", - "j = 0\n", - "\n", - "#Result\n", - "sys.stdout.write(\"The numbers are : \")\n", - "while j != k:\n", - " sys.stdout.write(\"%d\\t\"%(p[j]))\n", - " j += 1\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many number : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 1 = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 2 = 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 3 = 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 4 = 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numbers are : 1\t2\t3\t4\t" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.2, Page number: 506

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Memory allocation to pointer variable. \n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "j = 0\n", - "k = int(raw_input(\"How many Number : \"))\n", - "p = [0 for i in range(0,k)]\n", - "\n", - "#in python, all variables are allocated using dynamic memory allocation technique and no\n", - "#calloc function and pointer concept is available in python.\n", - "\n", - "#Read the numbers\n", - "while j != k:\n", - " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n", - " j += 1\n", - " \n", - "j = 0\n", - "\n", - "#Result\n", - "sys.stdout.write(\"The numbers are : \")\n", - "while j != k:\n", - " sys.stdout.write(\"%d\\t\"%(p[j]))\n", - " j += 1\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many Number : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 1 = 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 2 = 58\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 3 = 98\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numbers are : 45\t58\t98\t" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.3, Page number: 507

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Reallocate memory \n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "str1 = \"India\"\n", - "\n", - "#in python, value tagged method is used for data storage instead of memory tagging.\n", - "#no realloc function is in python\n", - "\n", - "#Result\n", - "sys.stdout.write(\"str = %s\"%(str1))\n", - "str1 = \"Hindustan\"\n", - "sys.stdout.write(\"\\nNow str = %s\"%(str1))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "str = India\n", - "Now str = Hindustan" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.4, Page number: 508

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display unused memory \n", - "\n", - "import psutil\n", - "\n", - "psutil.phymem_usage()\n", - "\n", - "#There is no coreleft() function in python. phymem_usage function in the module psutil gives the \n", - "#status and usage of physical memory in python." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "pyout", - "prompt_number": 6, - "text": [ - "usage(total=3165270016L, used=987840512L, free=2177429504L, percent=31.2)" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.5, Page number: 510

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Linked list\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialziation\n", - "ch = 'y'\n", - "p = 0\n", - "q = []\n", - "\n", - "#Function Definitions\n", - "def gen_rate(m):\n", - " q.append(m)\n", - " \n", - "def show():\n", - " print q\n", - " \n", - "def addatstart(m):\n", - " q.insert(0,m)\n", - " \n", - "def append(m,po):\n", - " q.insert(po,m)\n", - "\n", - "def erase(d):\n", - " q.remove(d)\n", - " \n", - "def count():\n", - " print len(q)\n", - " \n", - "def descending():\n", - " q.sort(reverse=True)\n", - " \n", - "#Get choice\n", - "while ch == 'y':\n", - " n = int(raw_input(\"1. Generate\\n2. Add at starting\\n3. Append\\n4. Delete\\n5. Show\\n6.Count\\n7.Descending\\nEnter your choice: \"));\n", - " #There is no switch statement in python\n", - " if n == 1:\n", - " i = int(raw_input(\"How many node you want : \"))\n", - " for j in range(0,i):\n", - " m = int(raw_input(\"Enter the element : \"))\n", - " gen_rate(m)\n", - " show()\n", - " else:\n", - " if n == 2:\n", - " m = int(raw_input(\"Enter the element : \"))\n", - " addatstart(m)\n", - " show()\n", - " else:\n", - " if n == 3:\n", - " m = int(raw_input(\"Enter the element and position \"))\n", - " po = int(raw_input(\"Enter the element and position\"))\n", - " append(m,po)\n", - " show()\n", - " else:\n", - " if n == 4:\n", - " d = int(raw_input(\"Enter the number for deletion : \"))\n", - " erase(d)\n", - " show()\n", - " else:\n", - " if n == 5:\n", - " show()\n", - " else:\n", - " if n == 6:\n", - " count()\n", - " else:\n", - " if n == 7:\n", - " descending()\n", - " show()\n", - " else:\n", - " sys.stdout.write(\"Enter value between 1 to 7\")\n", - " \n", - " ch = raw_input(\"Do u wnat to continue (y/n)\")\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. Generate\n", - "2. Add at starting\n", - "3. Append\n", - "4. Delete\n", - "5. Show\n", - "6.Count\n", - "7.Descending\n", - "Enter your choice: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many node you want : 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "[1, 5, 4, 7]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Do u wnat to continue (y/n)n\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.6, Page number: 518

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Draw circle, line and arc using graphics function\n", - "\n", - "%matplotlib inline\n", - "import pylab\n", - "import matplotlib.pyplot as plt\n", - "\n", - "# matplotlib package is used for graphics\n", - "#Give proportionate sizes to draw\n", - "#draw circle\n", - "circle2=plt.Circle((.5,.5),.2,color='b')\n", - "fig = plt.gcf()\n", - "fig.gca().add_artist(circle2)\n", - "\n", - "\n", - "#draw line\n", - "figure()\n", - "pylab.plot([210,110],[150,150])\n", - "\n", - "#Draw ellipse\n", - "figure()\n", - "from matplotlib.patches import Ellipse\n", - "e = Ellipse(xy=(35, -50), width=10, height=5, linewidth=2.0, color='g')\n", - "fig = plt.gcf()\n", - "fig.gca().add_artist(e)\n", - "e.set_clip_box(plt.axes().bbox)\n", - "e.set_alpha(0.7)\n", - "pylab.xlim([20, 50])\n", - "pylab.ylim([-65, -35])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "pyout", - "prompt_number": 5, - "text": [ - "(-65, -35)" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD9CAYAAABHnDf0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG6lJREFUeJzt3X9U1GW+B/D3yAzGkL8p1mbmLgoTPyQGWxS1tcZ+QdTB\ne9NtsW6lcYnrXbM6t5Nte2+Ce64Lu+d01uJW2BJ7XfNHNzuL94ZjWU7uqoA/sRX0DgY1g+WKqRAo\nDOP3/vEsSSQjwsx8Z555v875HhjnYebjI7x5fL7P9/lqFEUBERHJZZTaBRARke8x3ImIJMRwJyKS\nEMOdiEhCDHciIgkx3ImIJOQ13J944om3YmNjT91yyy2fDtZm+fLlr5jNZofFYqk/dOjQdN+XSERE\n18pruC9ZsqTSZrNlD/Z8dXV1TlNTU4LD4TCvXbv2yaVLl77u+xKJiOhaeQ33uXPn/mnChAlnB3t+\n69atuY8//vh/AUBmZmbtuXPnxp86dSrW10USEdG10Y7ki1tbWw0mk8nZ99hoNLpcLpcxNjb2VP92\nGo2Gl8ESEQ2Doiia4XzdiE+oDnzjwYJcURQeioKVK1eqXkOwHOwL9gX7wvsxEiMKd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1Kknmpub47q7uyOvdkJ17969s2Q9iTiU\nvvj888//Lj4+vmnv3r2z1K5X7b7ofyxevLhS1tUyQ+mLxsbGpLvuumtHb29vRGdnpz41NfXTo0eP\npqhduxp98eyzz75cVFS0UlEUfPXVV7EGg8F15syZiWrX7o+jubk5bignVK8lN31aYHV19X0333zz\n8fj4+KbVq1f/XFEUvPHGG4VvvPFGYV+bn/3sZ2Xx8fFNaWlp9QcOHLhV7U7113G1vsjPz//dxIkT\nz6Snpx9KT08/NGPGjDq1a1arL/ofMof7UPviN7/5zXMpKSlHU1NTP12zZs1ytWtWqy9Onz4d88AD\nD/xPWlpafWpq6qdvv/32w2rX7I8jLy9v4+TJk0/qdLoeo9HorKioeMIXualRFOmmvImIwh7vxERE\nJCGGOxGRhBjuREQSYrgTEUmI4U5EJCGGOxGRhP4fViZ/V3kiv9UAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAD9CAYAAABdoNd6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGe9JREFUeJzt3X10U3W+7/HfrpRzikXbLmjokEAjoFCatLEBAU8lIxQK\nXAdRl4t4BW8j67JwXc/RVECdqyT3jFCKxQdm6XSWtCMwB9aZw0BnRqgEIaVzEEufbAUdGExtAzFQ\nSj32QQp03z/mxhs7JRCagu3v/Vprr7X720/fL7SfpnvvZCuqqgoAwOAWdasLAAD0P8IeACRA2AOA\nBAh7AJAAYQ8AEiDsAUACIcPeZrMVaTQav8FgqA+MORwOh1ar9ZpMphqTyVSzd+/eeUII8d133/2j\n1WrdbjQa61JSUo7n5eW92N/FAwCuT8iwz8nJKS4tLc0OHlMURbXb7RtrampMNTU1pnnz5u0VQogd\nO3YsFkKIuro6Y1VVVUZhYeHyxsbGMf1XOgDgeoUM+8zMzPL4+PgLPcdVVVV6jiUlJfna29tvv3Ll\nym3t7e23Dx06tOuOO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mKoiqKooZafjPriaTXXnvt50OH\nDu164okn/u1q6wy0/gLvq3A6nWsCY2qI90kMtP6EEOLy5ctDLly4EH/kyJFpGzZsWPn444//+9XW\nHYj9Pf3005vffvvtf25sbBzzxhtvPG+z2Yqutu5A6K+trS320Ucf3fnWW2/9y/Dhw78NXjYY8qWt\nrS32scce+4+33nrrX2JjY9sC45HIl34Pe41G4//6669HCSGEz+dLSkxMPCuEEKNHjz7d1NSkC6zn\n9Xq1gT8xB5rf/OY3/2PPnj3zf/vb3/73wNhg6O9q76vw+/2awdCfEH97RfTII4/8XgghpkyZcjQq\nKqq7ubl5xGDpr6KiYuqiRYt2CSHEY4899h+BP/UHYn+XLl2KfvTRR3cuWbJk68MPP7xbiMGVL4H+\nnnzyyW2B/oSIYL5E+kJDz49XWLlyZX5eXt5qVVXFunXrXux5geHixYtDv/zyS/1dd911qru7W7nV\nF0rC7W/v3r3ZKSkpx86dOzcieL3B0l/w1NsF2oHe369+9avlr776qlNVVfGXv/zlbp1O1ziY+jOZ\nTNVut3umqqpi//79s8xm89GB2F93d7eyZMmSLYGPaglMgyVfrtZfJPMlogUvXrx4e1JS0pno6Ogu\nrVbbVFRUlHP+/PmEWbNm7e/t1qjXXnvt5XHjxv31nnvu+SJwx8CPeerZ3+bNm23jx48/OWbMmK/S\n09Nr0tPTa1asWPHOQO9v6NChFwP/f8HL9Xr9l8G3Xg6G/rq6uqKffPLJrampqfX33ntv1cGDBy0D\nvb/gn7+jR4+ap06d+klaWlrttGnTPq6urjYNxP7Ky8v/SVGU7rS0tNrAz9revXuzB0u+9Nbfnj17\n5kUyXxRV/dGfxgIA9BFPqgIACRD2ACABwh4AJEDYA4AECHsAkABhDwAS+L8uyejsxMIQUAAAAABJ\nRU5ErkJggg==\n", - "text": [ - "" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD9CAYAAACyYrxEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALE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d7P+yTB2gz799NN/sVqt\npuPHj//gzTff/B+nT5/+78Mfv+3xm4zjTE6nU7t69er/+/rrrz8zuG7evHnXGhsb44UQaGhoSJg3\nb941fx8Pm8j+DW82my1pwYIFl/xd50S0F198cfsrr7zyK5nGb6z+yTB+27Zt22U0GmuTkpJs8fHx\njUFBQfZHH330HVnGbqz+PfbYY4dkGLuxWmFh4c5XX311izfjd8dn9EII5YknnjiYkZFR/swzz/x+\ncP3atWuPvf322xsA4O23396Qn59/5E7XcifcrH+NjY0Jg8vvv//+jzMzMy/5p0LftLS0RA/+6etw\nOPQlJSV5JpPJKsv43ax/wz8RPl3Hb9euXc/V1tYm2my25Hffffen999//yfvvPPOY7KM3Vj9O3To\n0OOy/N/r6ekJ6urqCgUAu90efOLEidWZmZmXvBq/O/0qdPr06WWKoniysrLKhp/u1NraGrly5cqP\np/spXmP176OPPvrBY489digzM/PiwoULP1+3bt2RpqamOH/X6k27ePFipslkupCVlVWWmZl5cc+e\nPc8KMXCKlwzjd7P+yTJ+g81isSwfPCtFlrEb3k6ePGke7N+jjz76jgxjV11dnZyVlVWWlZVVNn/+\n/Mu7du3a5u34KUJMy8NzRER0m3iHKSIiyTHoiYgkx6AnIpIcg56ISHIMeiIiyTHoiYgk9/8B1dqr\nlLRzGX0AAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.7, Page number: 519

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Draw boxes and fill with different designs.\n", - "\n", - "%pylab\n", - "#matplotlib package is used for graphics\n", - "from matplotlib.patches import Rectangle\n", - "from matplotlib.collections import PatchCollection\n", - "\n", - "e = Rectangle(xy=(35, -50), width=10, height=5, linewidth=2.0, color='b')\n", - "fig = plt.gcf()\n", - "fig.gca().add_artist(e)\n", - "e.set_clip_box(ax.bbox)\n", - "e.set_alpha(0.7)\n", - "pylab.xlim([20, 50])\n", - "pylab.ylim([-65, -35])\n", - "\n", - "#There are no different automatic fill styles. user should create the styles." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAErZJREFUeJzt3X9MVff9x/HXuXKbaEoEV3UtN6kILooinNYpf5jsOLlL\nk4WW0YXEpq6J9p/6V0uXOrOIkBRxbizpyDRka5raf+qyxMKW2kBWb2i3uFsQ6w+SggW6C3LNmDZR\nt4Xpzv5ovN8yfqT33At8fe/5SE5y77ncez6ffPTZc4/3Usf3fV8AALNCiz0AAMD8IvQAYByhBwDj\nCD0AGEfoAcA4Qg8AxgUO/cGDB1VWVqby8nLt3LlTiURCkjQyMqKlS5fKdV25rqt9+/ZlbbAAgPQ5\nQT9Hf/PmTeXm5kqSWltb9fHHH+vXv/61RkZGVFVVpYsXL2Z1oACAYAKf0d+LvCTdunVLDz30UFYG\nBADIrpxMnvzjH/9Yb731lpYtW6azZ8+m9g8PD8t1XS1fvlyvvvqqtm/fnvFAAQDBzHnpJhqNKplM\nTtt/+PBhVVVVpe4fOXJEn3zyid544w1NTk7q9u3bys/P17lz51RdXa3Lly9PeQcAAFhAfhZ89tln\n/saNG2d8zPM8v7e3d9r+oqIiXxIbGxsbWxpbUVFR2o0OfI1+cHAwdbu9vV2u60qSJiYmdPfuXUnS\n0NCQBgcHtXbt2mnP//TTT+X7vtnt0KFDiz4G5sf8/hfnZ3luvu/r008/TbvXga/RHzhwQJ988omW\nLFmioqIiHT9+XJLU3d2t+vp6hcNhhUIhtbW1KS8vL+hhAAAZChz63/72tzPur6mpUU1NTeABAQCy\ni2/GzhPP8xZ7CPOK+d3fLM/P8tyCCvyFqYwP7DhapEMDwH0rSDs5owcA4wg9ABhH6AHAOEIPAMYR\negAwjtADgHGEHgCMI/QAYByhBwDjCD0AGEfoAcA4Qg8Axh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f926dX40GvVv3LixEMPJupnm9+677/q7d+/2S0tL/c2bN/tP\nPfWUn0wmF3uoabtw4YLvuq5fVlbml5aW+kePHvV93zezdrPNz8La/bdYLOZXVVX5vm9n/b7szJkz\nqfk9++yzJtZvaGjILysr88vKyvyNGzf6hw8f9n0//fXjC1MAYBz/K0EAMI7QA4BxhB4AjCP0AGAc\noQcA4wg9ABhH6AHAOEIPAMb9B4rEH5DkLOd4AAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 72 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.8, Page number: 520

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display text in different size, font, vertically and horizontally \n", - "\n", - "%matplotlib inline\n", - "\n", - "from pylab import *\n", - "\n", - "#Tkinter package is used for graphics\n", - "# set limits so that it no longer looks on screen to be 45 degrees\n", - "xlim([-5,5])\n", - "\n", - "# Locations to plot text\n", - "l1 = array((1,1))\n", - "l2 = array((5,5))\n", - "\n", - "# Rotate angle\n", - "angle = 90\n", - "trans_angle = gca().transData.transform_angles(array((45,)),\n", - " l2.reshape((1,2)))[0]\n", - "\n", - "# Plot text\n", - "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 25)\\n\\n',fontsize=25,\n", - " rotation=0)\n", - "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 16)',fontsize=16,\n", - " rotation=0)\n", - "th1 = text(l1[0],l1[1],'Hello(Vertical Text)',fontsize=16,\n", - " rotation=angle)\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAA0oAAASvCAYAAAA39ApSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdUFNfj//+ZpRfpoNgAxUZUYpfYAMWKvZfYYmJMSGwx\n3YglxRiVqO8YjcYSeywotogCahKNiga7EU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HTrUtWfP\nnvurV69+z8bGJqdJkyYXFi1aNE2n01X4e3Fubq71Bx98MN/LyyvBwsIiv06dOje/+OKLj5UP8Dk5\nOTYNGza82qZNmz+0Wu3/+9L00KFDXTUajW758uWTEhMTPYraHtGOHTsGajQa3d27d2so06ZPn75Q\no9HoVq9e/ZoyLTIyMkij0eiuXLnSSJL+7613xe1DSXoWQg4fPtylefPmZ5X9WNz5HRoaGurl5ZUg\nSZL02muvrVafA3q9Xl68ePHUBg0aXLOwsMivXr36vXfeeWepctVOodFodDNnzpy7ZMmSd728vBLs\n7Owy/f39Yy5fvuyj1PH09Lx1+/bt2hs3bhyp9F25FfSvv/6q379//11Vq1Z9YGVl9cTDwyNxyJAh\n2woLC00k6f9/652yXwyVdevWjVHarMjXuyExMTH+V69ebTht2rRFxdX18vJKaNOmzR8rV658o6La\nB14kghIA/ANotVpTsSgfsNTu3LlTq02bNn9cuHChSVhY2JSIiIjezZs3Pztw4MAdERERvUvT5sGD\nB7v36tVrn52dXea2bduGLF++fNLFixcbt2/f/td79+5VV9dzdXV9WL9+/b/K0/fz58837dSp09GM\njAz7devWjVm/fv3ozMxMu06dOh09f/58U3XdjIwM++HDh28eOXLkxoMHD3YfMWLEJkn6v7etVa9e\n/d7JkyfbqsuqVasmaDQanY+Pz2VJevZtea9evfatXbt27IwZMxbs3bs3uHv37genTZu26JNPPvlc\n7OPkyZO/NTExKdy8efPwWbNmzd6xY8fAyZMnf6u0p3wr//HHH3+htKncVpaQkOAVGBgYtWrVqgn7\n9+/vOWbMmHWhoaGhhtopD61Wa9qtW7dfVq9e/drUqVMXHzx4sPuECRNWzZ07d+aMGTMWSJIk2djY\n5GzZsmVYXFyc78yZM+dKkiQ9ePCg6ujRo9f37dt396RJk5a7u7snF7U9In9//xhZlvVRUVGByrSo\nqKhAKyurJ+K0atWq3VdfGVMfM0Nt9urVa59S98aNG3WnTJkS9t57732zc+fOAe7u7smDBw/++caN\nG3WN7ZPXX3/9h59//nmwJEnSzJkz5548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ICEoAAAAA\nICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAA\nACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAA\nAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoA\nAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhK\nAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgI\nSgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAI\nCEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAA\nCAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAA\nAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAA\nAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIA\nAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoIS\nAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKC\nEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAAC\nghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAA\nAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAA\nAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAA\nAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQA\nAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAE\nAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICg\nBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICA\noAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACA\ngKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAA\ngICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAA\nAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEA\nAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgB\nAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAo\nAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAg\nKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAg\nICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAA\n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bq6ellLS0vtps+tra011dXVy97+WFCZJk2aFBs2bNjq\nsd///vdxzDHHbPUYAADvrLcVSmPHjr1txowZp0dEzJkz59Cdd955teeT4G93zTXXxOGHHx7PPPPM\nFj+/++67Y//9949f//rXBU0GAFBZOg2lk08+eebhhx/+0NNPPz2wtra25frrr58wbdq0idOmTZsY\nETFmzJjZ/fr1+13//v0XT5w4cdq///u//0PXjP3Xa2hoKHqEsuFcvK7czsW8efPij3/8Yxx00EEx\nffr0aGtriy984QsxevToGDp0aDz22GPb7M8ut3NRJOcCAOiSF86WSqUO99vDW/PKK6/E+eefH9de\ne2306dMnVq9eHVdeeWWcd955RY9GFyuVStFhMwcAKMTb3swBeGe9+93vjsMPPzx69OgRK1asiAED\nBsSxxx5b9FgAABVFKEEZ+cMf/hAnn3xyTJgwIc4444z45S9/GevXr48DDjggfvSjHxU9HgBAxXDr\nHZSRvn37xpo1a+Laa6+N4447LiIi/vSnP8X5558f1113XZx66qkxY8aMgqekq7j1DgCKI5SgjDQ0\nNMQPf/jDqK6u/otjP/3pT+Pss8+OF198sYDJKIJQAoDiCCUoIx0dHVEqvfHfi1taWqK2tvYNj7N9\nEUoAUJyqogcAXrcpkhYuXBgPPvhgrFq1Ks4+++zYY489orm5Ofr06VPwhAAAlcEVJSgj69ati09/\n+tNxyy23RMSfw2n+/Plx0EEHxSc/+cnYZ5994oorrih4SrqKK0oAUBy73kEZ+fKXvxz33Xdf3Hjj\njbFixYrY/AuG0aNHR2NjY4HTAQBUDrfeQRmZOXNmfO1rX4tTTjklNmzYsMWxurq6WLp0aTGDAQBU\nGFeUoIy8+OKLMXjw4K0e27hxY6xbt66LJwIAqExCCcpIXV1dPPTQQ1s9Nn/+/Bg4cGAXTwQAUJmE\nEhTswQcfjDVr1kRExPjx4+OKK66IH/7wh7F+/frX1tx///3xb//2bzFhwoSixgQAqCh2vYOCdevW\nLebMmRPDhg2LDRs2xKmnnho333xz9OjRI9ra2qJnz57x6quvxsknnxw33nhjp+9ZYvti1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AwcOfPre\ne+/9WHV19bJDDjlk/syZM0+ur69ftGnN6tWrdz7iiCN+edddd42sqalpXbly5a677rrryi3+EFeU\n4G+2fv36+Kd/+qf41re+FRER7e3tBU9EV3FFCQCK0+l7lObNmzesf//+i+vq6pZGRIwbN+7Hs2bN\n+sTmofSjH/3olOOPP/6nNTU1rREROZKAv01zc3PMmDEjbrzxxnj22WejV69eceKJJxY9FgBAReg0\nlJYtW1ZdW1vbsulzTU1N69y5c4dvvqa5uXnA+vXrux999NEPrFmzZqfzzz//6tNOO+0/8+91ySWX\nvPbrhoaGaGhoeNvDw/Zm1apV8eMf/zhmzJgR8+bNi27dusWIESPi61//ehx33HHRs2fPokdkG2pq\naoqmpqaixwAA4k1CqVQqven9cuvXr+/+61//+qD77rvvo3/605/+z2GHHfarQw89dM6AAQOaN1+3\neSgBr2tra4s77rgjZsyYEXfeeWesX78+Bg8eHFOmTIlTTz019thjj6JHpIvkL5EmT55c3DAAUOE6\nDaXq6uplLS0ttZs+t7S01G66xW6T2trall133XXlu9/97lfe/e53v3LkkUc+uHDhwiE5lICt2333\n3WP16tXRu3fvmDhxYowfPz4OPvjgoscCAKhone56N3To0AXNzc0Dli5dWtfW1tbjpptuOmns2LG3\nbb7mE5/4xKxf/OIXH2pvb9/hT3/60/+ZO3fu8MGDBz+5bceG7ceRRx4Zt9xySzz//PNxzTXXiCQA\ngDLQ6RWlqqqqDVOnTj135MiRd7W3t+9w5plnXldfX79o2rRpEyMiJk6cOG3QoEFPjRo1qnH//fd/\nrFu3bhvPOuus/xBK8NbdeuutRY8AAEDihbNQsKuvvjrOOeec6NGjx1tav27duvje974X559//jae\njKLZHhwAiiOUoGBDhgyJVatWxYQJE+LTn/507LPPPltd9+STT8bMmTPjhhtuiN69e8fChQu7eFK6\nmlACgOIIJShYe3t7XH/99XHVVVfF4sWLY7fddot99903evfuHRERK1eujN/85jexatWq6NevX1x0\n0UVx1llnRbdunT5iyHZAKAFAcYQSlImOjo5oamqKxsbGmD9/fqx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IHv/Jhv\nn7/4vM65eJ1z8Trn4nXOBQDQaSi1t7fvcO65505tbGwc9eSTTw6eOXPmyYsWLarffM3s2bPHLF68\nuH9zc/OA73//+2efc8453922IwMAAGxbnYbSvHnzhvXv339xXV3d0u7du68fN27cj2fNmvWJzdfc\ndtttY8ePHz89ImL48OFzV69evfOKFSv6bMuhAQAAtqWqzg4uW7asura2tmXT55qamta5c+cOf7M1\nra2tNX369Fmx+bpSqfROzfw3mzx5ctEjlA3n4nXOxeuci9c5FwBQ2ToNpVKp1PFWfpOOjo4tKij/\ne/k4AABAOev01rvq6uplLS0ttZs+t7S01NbU1LR2tqa1tbWmurp62Ts/KgAAQNfoNJSGDh26oLm5\necDSpUvr2traetx0000njR079rbN14wdO/a2GTNmnB4RMWfOnEN33nnn1fm2OwAAgP9NOr31rqqq\nasPUqVPPHTly5F3t7e07nHnmmdfV19cvmjZt2sSIiIkTJ04bM2bM7NmzZ4/p37//4ve85z1/vOGG\nG87omtEBAAC2jVJHx1t6DGm78o1vfOPCiy666KqVK1fu+r73vW9V0fMU5aKLLrrqjjvuOKZHjx5t\ne++99zM33HDDGe9973tfLnqurtLY2Djqggsu+FZ7e/sOn/3sZ6+dNGnSlKJnKkpLS0vt6aefPuOF\nF154f6lU6jj77LO//7nPfe6aoucqSnt7+w5Dhw5dUFNT03r77bcfW/Q8AEDXe9MXzm5vWlpaau+5\n554Re+2117NFz1K0j3/843c/8cQT+y5cuHDIPvvs89uvf/3r/7fombrKW3lHWCXp3r37+m9+85uf\nf+KJJ/adM2fOod/5znf+n0o+H1dfffX5gwcPfvKtbmgDAGx/Ki6UvvCFL/zblVde+cWi5ygHI0aM\nuKdbt24bI/78DqzW1taaomfqKm/lHWGVZPfdd19+wAEHPBoRseOOO66tr69f9Pzzz+9Z9FxFaG1t\nrZk9e/aYz372s9fasRMAKldFhdKsWbM+UVNT07r//vs/VvQs5eb666+fMGbMmNlFz9FVtvb+r2XL\nllUXOVO5WLp0ad0jjzxy4PDhw+cWPUsRPv/5z3/zqquuumjTlwgAQGXqdDOH/41GjBhxz/Lly3fP\nP7/sssu+/PWvf/3/3n333R/f9LNK+Lb4jc7H5Zdf/qVjjz329og/n5sePXq0nXLKKT/q+gmL4Zaq\nrVu7du2OJ5xwwk+uvvrq83fccce1Rc/T1e64445j3v/+979w4IEHPtLU1NRQ9DwAQHG2u1C65557\nRmzt548//vh+S5Ys6TtkyJCFEX++vebggw9+eN68ecPe//73v9C1U3adNzofm/zgBz/4zOzZs8fc\nd999H+2qmcrBW3lHWKVZv3599+OPP/6np5566o3HHXfcrUXPU4SHHnro8Ntuu23s7Nmzx7z66qs9\n//CHP/Q6/fTTZ2x6BQIAUDkqcte7iIi+ffsuefjhhw+u5F3vGhsbR1144YXf+PnPf37UrrvuurLo\nebrShg0bqgYOHPj0fffd99E999zz+WHDhs2bOXPmyfX19YuKnq0IHR0dpfHjx0/v3bv3i9/85jc/\nX/Q85eDnP//5Uf/6r//6j3a9A4DKVFHPKG3OrVcR55133rfXrl2744gRI+458MADH/mHf/iH/6+9\nO7RhIIYBKJp5wowPlXWDkM51E4R0g7Cg4GOdp7SKdLQBeW8CI0tfBj5Xz/Qvvz/Ccs6fUsp710hK\nKaUxxlFrffXeHxFxRcTVWnuunms1ewIA9rXtRQkAAODOthclAACAO0IJAABgIpQAAAAmQgkAAGAi\nlAAAACZCCQAAYPIF5fe6JjownXYAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 15.9, Page number: 521

" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display status of mouse button pressed \n", - "\n", - "from Tkinter import *\n", - "from tkFileDialog import askopenfilename\n", - "import Image, ImageTk\n", - "\n", - "if __name__ == \"__main__\":\n", - " root = Tk()\n", - "\n", - " #setting up a tkinter canvas with scrollbars\n", - " frame = Frame(root, bd=2, relief=SUNKEN)\n", - " frame.grid_rowconfigure(0, weight=1)\n", - " frame.grid_columnconfigure(0, weight=1)\n", - " xscroll = Scrollbar(frame, orient=HORIZONTAL)\n", - " xscroll.grid(row=1, column=0, sticky=E+W)\n", - " yscroll = Scrollbar(frame)\n", - " yscroll.grid(row=0, column=1, sticky=N+S)\n", - " canvas = Canvas(frame, bd=0, xscrollcommand=xscroll.set, yscrollcommand=yscroll.set)\n", - " canvas.grid(row=0, column=0, sticky=N+S+E+W)\n", - " xscroll.config(command=canvas.xview)\n", - " yscroll.config(command=canvas.yview)\n", - " frame.pack(fill=BOTH,expand=1)\n", - "\n", - " \n", - "\n", - " #function to be called when mouse is clicked\n", - " def printcoords(event):\n", - " #outputting x and y coords to console\n", - " print \"Mouse Button pressed\"\n", - " print (event.x,event.y)\n", - " #mouseclick event\n", - " canvas.bind(\"